@g4rcez/components 0.0.37 → 0.0.38
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/components/core/button.d.ts +2 -7
- package/dist/components/core/button.d.ts.map +1 -1
- package/dist/components/core/button.js +13 -10
- package/dist/components/core/tag.d.ts +2 -2
- package/dist/components/core/tag.d.ts.map +1 -1
- package/dist/components/core/tag.js +9 -10
- package/dist/components/display/alert.d.ts +1 -1
- package/dist/components/display/notifications.d.ts +1 -1
- package/dist/components/display/tabs.d.ts.map +1 -1
- package/dist/components/display/tabs.js +7 -25
- package/dist/components/floating/expand.js +1 -1
- package/dist/components/floating/menu.d.ts +11 -5
- package/dist/components/floating/menu.d.ts.map +1 -1
- package/dist/components/floating/menu.js +10 -8
- package/dist/components/floating/modal.js +1 -1
- package/dist/components/floating/toolbar.d.ts +6 -0
- package/dist/components/floating/toolbar.d.ts.map +1 -0
- package/dist/components/floating/toolbar.js +4 -0
- package/dist/components/form/input-field.js +1 -1
- package/dist/components/form/input.js +1 -1
- package/dist/components/form/select.d.ts.map +1 -1
- package/dist/components/form/switch.d.ts.map +1 -1
- package/dist/components/form/switch.js +7 -8
- package/dist/components/index.d.ts +4 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -3
- package/dist/components/table/index.d.ts +7 -4
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +25 -10
- package/dist/components/table/table-lib.d.ts +4 -1
- package/dist/components/table/table-lib.d.ts.map +1 -1
- package/dist/components/table/thead.d.ts +1 -1
- package/dist/components/table/thead.d.ts.map +1 -1
- package/dist/components/table/thead.js +7 -7
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/hooks/use-form.d.ts.map +1 -1
- package/dist/hooks/use-form.js +3 -2
- package/dist/index.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6021 -5888
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +43 -43
- package/dist/index.umd.js.map +1 -1
- package/dist/preset/preset.tailwind.d.ts.map +1 -1
- package/dist/preset/preset.tailwind.js +3 -3
- package/dist/preset/src/styles/theme.d.ts.map +1 -1
- package/dist/preset/src/styles/theme.js +145 -21
- package/dist/preset/src/styles/theme.types.d.ts +12 -13
- package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +145 -21
- package/dist/styles/theme.types.d.ts +12 -13
- package/dist/styles/theme.types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(ee,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(ee=typeof globalThis<"u"?globalThis:ee||self,b(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,b,x,af){"use strict";var SV=Object.defineProperty;var TV=(ee,b,x)=>b in ee?SV(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):ee[b]=x;var oe=(ee,b,x)=>TV(ee,typeof b!="symbol"?b+"":b,x);function lf(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 M=lf(b),cf=lf(af);function uf(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=uf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function nw(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=uf(e))&&(r&&(r+=" "),r+=t);return r}const df=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,ff=nw,ri=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ff(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const h=df(u)||df(d);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...i,...a}[m]):{...i,...a}[m]===v})?[...c,d,h]:c},[]);return ff(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};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 rw(){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 pf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ow(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function iw(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 sw=Error,aw=EvalError,lw=RangeError,cw=ReferenceError,mf=SyntaxError,oi=TypeError,uw=URIError,dw=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 i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},gf=typeof Symbol<"u"&&Symbol,fw=dw,hw=function(){return typeof gf!="function"||typeof Symbol!="function"||typeof gf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:fw()},rl={__proto__:null,foo:{}},pw=Object,mw=function(){return{__proto__:rl}.foo===rl.foo&&!(rl instanceof pw)},gw="Function.prototype.bind called on incompatible ",yw=Object.prototype.toString,vw=Math.max,bw="[object Function]",yf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},ww=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},xw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Sw=function(t){var n=this;if(typeof n!="function"||yw.apply(n)!==bw)throw new TypeError(gw+n);for(var r=ww(arguments,1),o,i=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))},s=vw(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+xw(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},Tw=Sw,ol=Function.prototype.bind||Tw,Ew=Function.prototype.call,Cw=Object.prototype.hasOwnProperty,Pw=ol,kw=Pw.call(Ew,Cw),Se,Iw=sw,Ow=aw,Aw=lw,_w=cw,Gr=mf,Yr=oi,Mw=uw,vf=Function,il=function(e){try{return vf('"use strict"; return ('+e+").constructor;")()}catch{}},vr=Object.getOwnPropertyDescriptor;if(vr)try{vr({},"")}catch{vr=null}var sl=function(){throw new Yr},Dw=vr?function(){try{return arguments.callee,sl}catch{try{return vr(arguments,"callee").get}catch{return sl}}}():sl,qr=hw(),Nw=mw(),bt=Object.getPrototypeOf||(Nw?function(e){return e.__proto__}:null),Kr={},Fw=typeof Uint8Array>"u"||!bt?Se:bt(Uint8Array),br={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":qr&&bt?bt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":Kr,"%AsyncGenerator%":Kr,"%AsyncGeneratorFunction%":Kr,"%AsyncIteratorPrototype%":Kr,"%Atomics%":typeof Atomics>"u"?Se:Atomics,"%BigInt%":typeof BigInt>"u"?Se:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Iw,"%eval%":eval,"%EvalError%":Ow,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":vf,"%GeneratorFunction%":Kr,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qr&&bt?bt(bt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qr||!bt?Se:bt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Se:Promise,"%Proxy%":typeof Proxy>"u"?Se:Proxy,"%RangeError%":Aw,"%ReferenceError%":_w,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qr||!bt?Se:bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qr&&bt?bt(""[Symbol.iterator]()):Se,"%Symbol%":qr?Symbol:Se,"%SyntaxError%":Gr,"%ThrowTypeError%":Dw,"%TypedArray%":Fw,"%TypeError%":Yr,"%Uint8Array%":typeof Uint8Array>"u"?Se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Se:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Se:Uint32Array,"%URIError%":Mw,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(bt)try{null.error}catch(e){var Lw=bt(bt(e));br["%Error.prototype%"]=Lw}var Vw=function e(t){var n;if(t==="%AsyncFunction%")n=il("async function () {}");else if(t==="%GeneratorFunction%")n=il("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=il("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&bt&&(n=bt(o.prototype))}return br[t]=n,n},bf={__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"]},ii=ol,fs=kw,$w=ii.call(Function.call,Array.prototype.concat),Rw=ii.call(Function.apply,Array.prototype.splice),wf=ii.call(Function.call,String.prototype.replace),hs=ii.call(Function.call,String.prototype.slice),jw=ii.call(Function.call,RegExp.prototype.exec),Bw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zw=/\\(\\)?/g,Ww=function(t){var n=hs(t,0,1),r=hs(t,-1);if(n==="%"&&r!=="%")throw new Gr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Gr("invalid intrinsic syntax, expected opening `%`");var o=[];return wf(t,Bw,function(i,s,a,l){o[o.length]=a?wf(l,zw,"$1"):s||i}),o},Hw=function(t,n){var r=t,o;if(fs(bf,r)&&(o=bf[r],r="%"+o[0]+"%"),fs(br,r)){var i=br[r];if(i===Kr&&(i=Vw(r)),typeof i>"u"&&!n)throw new Yr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Gr("intrinsic "+t+" does not exist!")},Zr=function(t,n){if(typeof t!="string"||t.length===0)throw new Yr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Yr('"allowMissing" argument must be a boolean');if(jw(/^%?[^%]*%?$/,t)===null)throw new Gr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Ww(t),o=r.length>0?r[0]:"",i=Hw("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],Rw(r,$w([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var h=r[u],f=hs(h,0,1),p=hs(h,-1);if((f==='"'||f==="'"||f==="`"||p==='"'||p==="'"||p==="`")&&f!==p)throw new Gr("property names with quotes must have matching quotes");if((h==="constructor"||!d)&&(l=!0),o+="."+h,s="%"+o+"%",fs(br,s))a=br[s];else if(a!=null){if(!(h in a)){if(!n)throw new Yr("base intrinsic for "+t+" exists, but the property is not available.");return}if(vr&&u+1>=r.length){var m=vr(a,h);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else d=fs(a,h),a=a[h];d&&!l&&(br[s]=a)}}return a},xf={exports:{}},al,Sf;function ll(){if(Sf)return al;Sf=1;var e=Zr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return al=t,al}var Uw=Zr,ps=Uw("%Object.getOwnPropertyDescriptor%",!0);if(ps)try{ps([],"length")}catch{ps=null}var Tf=ps,Ef=ll(),Gw=mf,Xr=oi,Cf=Tf,Yw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Xr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Xr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Cf&&Cf(t,n);if(Ef)Ef(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new Gw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},cl=ll(),Pf=function(){return!!cl};Pf.hasArrayLengthDefineBug=function(){if(!cl)return null;try{return cl([],"length",{value:1}).length!==1}catch{return!0}};var qw=Pf,Kw=Zr,kf=Yw,Zw=qw(),If=Tf,Of=oi,Xw=Kw("%Math.floor%"),Qw=function(t,n){if(typeof t!="function")throw new Of("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Xw(n)!==n)throw new Of("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&If){var s=If(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Zw?kf(t,"length",n,!0,!0):kf(t,"length",n)),t};(function(e){var t=ol,n=Zr,r=Qw,o=oi,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=ll(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var f=a(t,s,arguments);return r(f,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(xf);var Jw=xf.exports,Af=Zr,_f=Jw,ex=_f(Af("String.prototype.indexOf")),tx=function(t,n){var r=Af(t,!!n);return typeof r=="function"&&ex(t,".prototype.")>-1?_f(r):r};const nx=iw(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ul=typeof Map=="function"&&Map.prototype,dl=Object.getOwnPropertyDescriptor&&ul?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ms=ul&&dl&&typeof dl.get=="function"?dl.get:null,Mf=ul&&Map.prototype.forEach,fl=typeof Set=="function"&&Set.prototype,hl=Object.getOwnPropertyDescriptor&&fl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,gs=fl&&hl&&typeof hl.get=="function"?hl.get:null,Df=fl&&Set.prototype.forEach,rx=typeof WeakMap=="function"&&WeakMap.prototype,si=rx?WeakMap.prototype.has:null,ox=typeof WeakSet=="function"&&WeakSet.prototype,ai=ox?WeakSet.prototype.has:null,ix=typeof WeakRef=="function"&&WeakRef.prototype,Nf=ix?WeakRef.prototype.deref:null,sx=Boolean.prototype.valueOf,ax=Object.prototype.toString,lx=Function.prototype.toString,cx=String.prototype.match,pl=String.prototype.slice,Wn=String.prototype.replace,ux=String.prototype.toUpperCase,Ff=String.prototype.toLowerCase,Lf=RegExp.prototype.test,Vf=Array.prototype.concat,un=Array.prototype.join,dx=Array.prototype.slice,$f=Math.floor,ml=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gl=Object.getOwnPropertySymbols,yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Qr||!0)?Symbol.toStringTag:null,Rf=Object.prototype.propertyIsEnumerable,jf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Bf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Lf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-$f(-e):$f(e);if(r!==e){var o=String(r),i=pl.call(t,o.length+1);return Wn.call(o,n,"$&_")+"."+Wn.call(Wn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Wn.call(t,n,"$&_")}var vl=nx,zf=vl.custom,Wf=Gf(zf)?zf:null,fx=function e(t,n,r,o){var i=n||{};if(Hn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Hn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Hn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Hn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Hn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.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 qf(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Bf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Bf(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return bl(t)?"[Array]":"[Object]";var d=Ax(i,r);if(typeof o>"u")o=[];else if(Yf(o,t)>=0)return"[Circular]";function h(L,k,_){if(k&&(o=dx.call(o),o.push(k)),_){var N={depth:i.depth};return Hn(i,"quoteStyle")&&(N.quoteStyle=i.quoteStyle),e(L,N,r+1,o)}return e(L,i,r+1,o)}if(typeof t=="function"&&!Uf(t)){var f=xx(t),p=ys(t,h);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(Gf(t)){var m=Qr?Wn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):yl.call(t);return typeof t=="object"&&!Qr?li(m):m}if(kx(t)){for(var v="<"+Ff.call(String(t.nodeName)),g=t.attributes||[],w=0;w<g.length;w++)v+=" "+g[w].name+"="+Hf(hx(g[w].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Ff.call(String(t.nodeName))+">",v}if(bl(t)){if(t.length===0)return"[]";var y=ys(t,h);return d&&!Ox(y)?"["+xl(y,d)+"]":"[ "+un.call(y,", ")+" ]"}if(mx(t)){var T=ys(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Rf.call(t,"cause")?"{ ["+String(t)+"] "+un.call(Vf.call("[cause]: "+h(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(T,", ")+" }"}if(typeof t=="object"&&s){if(Wf&&typeof t[Wf]=="function"&&vl)return vl(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Sx(t)){var S=[];return Mf&&Mf.call(t,function(L,k){S.push(h(k,t,!0)+" => "+h(L,t))}),Kf("Map",ms.call(t),S,d)}if(Cx(t)){var E=[];return Df&&Df.call(t,function(L){E.push(h(L,t))}),Kf("Set",gs.call(t),E,d)}if(Tx(t))return wl("WeakMap");if(Px(t))return wl("WeakSet");if(Ex(t))return wl("WeakRef");if(yx(t))return li(h(Number(t)));if(bx(t))return li(h(ml.call(t)));if(vx(t))return li(sx.call(t));if(gx(t))return li(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof pf<"u"&&t===pf)return"{ [object globalThis] }";if(!px(t)&&!Uf(t)){var I=ys(t,h),P=jf?jf(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",C=!P&&Ot&&Object(t)===t&&Ot in t?pl.call(Un(t),8,-1):O?"Object":"",V=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",D=V+(C||O?"["+un.call(Vf.call([],C||[],O||[]),": ")+"] ":"");return I.length===0?D+"{}":d?D+"{"+xl(I,d)+"}":D+"{ "+un.call(I,", ")+" }"}return String(t)};function Hf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function hx(e){return Wn.call(String(e),/"/g,""")}function bl(e){return Un(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function px(e){return Un(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Uf(e){return Un(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function mx(e){return Un(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function gx(e){return Un(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function yx(e){return Un(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function vx(e){return Un(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Gf(e){if(Qr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!yl)return!1;try{return yl.call(e),!0}catch{}return!1}function bx(e){if(!e||typeof e!="object"||!ml)return!1;try{return ml.call(e),!0}catch{}return!1}var wx=Object.prototype.hasOwnProperty||function(e){return e in this};function Hn(e,t){return wx.call(e,t)}function Un(e){return ax.call(e)}function xx(e){if(e.name)return e.name;var t=cx.call(lx.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Yf(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 Sx(e){if(!ms||!e||typeof e!="object")return!1;try{ms.call(e);try{gs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Tx(e){if(!si||!e||typeof e!="object")return!1;try{si.call(e,si);try{ai.call(e,ai)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Ex(e){if(!Nf||!e||typeof e!="object")return!1;try{return Nf.call(e),!0}catch{}return!1}function Cx(e){if(!gs||!e||typeof e!="object")return!1;try{gs.call(e);try{ms.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Px(e){if(!ai||!e||typeof e!="object")return!1;try{ai.call(e,ai);try{si.call(e,si)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function kx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function qf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return qf(pl.call(e,0,t.maxStringLength),t)+r}var o=Wn.call(Wn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ix);return Hf(o,"single",t)}function Ix(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":"")+ux.call(t.toString(16))}function li(e){return"Object("+e+")"}function wl(e){return e+" { ? }"}function Kf(e,t,n,r){var o=r?xl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function Ox(e){for(var t=0;t<e.length;t++)if(Yf(e[t],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
1
|
+
(function(ee,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(ee=typeof globalThis<"u"?globalThis:ee||self,b(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,b,x,cf){"use strict";var PV=Object.defineProperty;var kV=(ee,b,x)=>b in ee?PV(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):ee[b]=x;var oe=(ee,b,x)=>kV(ee,typeof b!="symbol"?b+"":b,x);function uf(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 M=uf(b),df=uf(cf);function ff(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=ff(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function iw(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ff(e))&&(r&&(r+=" "),r+=t);return r}const hf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,pf=iw,ri=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const h=hf(u)||hf(d);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...i,...a}[m]):{...i,...a}[m]===v})?[...c,d,h]:c},[]);return pf(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function mf(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=mf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function sw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mf(e))&&(r&&(r+=" "),r+=t);return r}var gf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lw(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 cw=Error,uw=EvalError,dw=RangeError,fw=ReferenceError,yf=SyntaxError,oi=TypeError,hw=URIError,pw=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 i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},vf=typeof Symbol<"u"&&Symbol,mw=pw,gw=function(){return typeof vf!="function"||typeof Symbol!="function"||typeof vf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:mw()},sl={__proto__:null,foo:{}},yw=Object,vw=function(){return{__proto__:sl}.foo===sl.foo&&!(sl instanceof yw)},bw="Function.prototype.bind called on incompatible ",ww=Object.prototype.toString,xw=Math.max,Sw="[object Function]",bf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},Tw=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},Ew=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Cw=function(t){var n=this;if(typeof n!="function"||ww.apply(n)!==Sw)throw new TypeError(bw+n);for(var r=Tw(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,bf(r,arguments));return Object(u)===u?u:this}return n.apply(t,bf(r,arguments))},s=xw(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Ew(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},Pw=Cw,al=Function.prototype.bind||Pw,kw=Function.prototype.call,Iw=Object.prototype.hasOwnProperty,Ow=al,Aw=Ow.call(kw,Iw),Se,_w=cw,Mw=uw,Dw=dw,Fw=fw,Ur=yf,Gr=oi,Nw=hw,wf=Function,ll=function(e){try{return wf('"use strict"; return ('+e+").constructor;")()}catch{}},yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch{yr=null}var cl=function(){throw new Gr},Lw=yr?function(){try{return arguments.callee,cl}catch{try{return yr(arguments,"callee").get}catch{return cl}}}():cl,Yr=gw(),Vw=vw(),wt=Object.getPrototypeOf||(Vw?function(e){return e.__proto__}:null),qr={},$w=typeof Uint8Array>"u"||!wt?Se:wt(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":Yr&&wt?wt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":qr,"%AsyncGenerator%":qr,"%AsyncGeneratorFunction%":qr,"%AsyncIteratorPrototype%":qr,"%Atomics%":typeof Atomics>"u"?Se:Atomics,"%BigInt%":typeof BigInt>"u"?Se:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":_w,"%eval%":eval,"%EvalError%":Mw,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":wf,"%GeneratorFunction%":qr,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Yr&&wt?wt(wt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Yr||!wt?Se:wt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Se:Promise,"%Proxy%":typeof Proxy>"u"?Se:Proxy,"%RangeError%":Dw,"%ReferenceError%":Fw,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Yr||!wt?Se:wt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Yr&&wt?wt(""[Symbol.iterator]()):Se,"%Symbol%":Yr?Symbol:Se,"%SyntaxError%":Ur,"%ThrowTypeError%":Lw,"%TypedArray%":$w,"%TypeError%":Gr,"%Uint8Array%":typeof Uint8Array>"u"?Se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Se:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Se:Uint32Array,"%URIError%":Nw,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(wt)try{null.error}catch(e){var Rw=wt(wt(e));vr["%Error.prototype%"]=Rw}var jw=function e(t){var n;if(t==="%AsyncFunction%")n=ll("async function () {}");else if(t==="%GeneratorFunction%")n=ll("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=ll("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&wt&&(n=wt(o.prototype))}return vr[t]=n,n},xf={__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"]},ii=al,fs=Aw,Bw=ii.call(Function.call,Array.prototype.concat),zw=ii.call(Function.apply,Array.prototype.splice),Sf=ii.call(Function.call,String.prototype.replace),hs=ii.call(Function.call,String.prototype.slice),Ww=ii.call(Function.call,RegExp.prototype.exec),Hw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Uw=/\\(\\)?/g,Gw=function(t){var n=hs(t,0,1),r=hs(t,-1);if(n==="%"&&r!=="%")throw new Ur("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ur("invalid intrinsic syntax, expected opening `%`");var o=[];return Sf(t,Hw,function(i,s,a,l){o[o.length]=a?Sf(l,Uw,"$1"):s||i}),o},Yw=function(t,n){var r=t,o;if(fs(xf,r)&&(o=xf[r],r="%"+o[0]+"%"),fs(vr,r)){var i=vr[r];if(i===qr&&(i=jw(r)),typeof i>"u"&&!n)throw new Gr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Ur("intrinsic "+t+" does not exist!")},Kr=function(t,n){if(typeof t!="string"||t.length===0)throw new Gr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Gr('"allowMissing" argument must be a boolean');if(Ww(/^%?[^%]*%?$/,t)===null)throw new Ur("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Gw(t),o=r.length>0?r[0]:"",i=Yw("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],zw(r,Bw([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var h=r[u],f=hs(h,0,1),p=hs(h,-1);if((f==='"'||f==="'"||f==="`"||p==='"'||p==="'"||p==="`")&&f!==p)throw new Ur("property names with quotes must have matching quotes");if((h==="constructor"||!d)&&(l=!0),o+="."+h,s="%"+o+"%",fs(vr,s))a=vr[s];else if(a!=null){if(!(h in a)){if(!n)throw new Gr("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&u+1>=r.length){var m=yr(a,h);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else d=fs(a,h),a=a[h];d&&!l&&(vr[s]=a)}}return a},Tf={exports:{}},ul,Ef;function dl(){if(Ef)return ul;Ef=1;var e=Kr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return ul=t,ul}var qw=Kr,ps=qw("%Object.getOwnPropertyDescriptor%",!0);if(ps)try{ps([],"length")}catch{ps=null}var Cf=ps,Pf=dl(),Kw=yf,Zr=oi,kf=Cf,Zw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Zr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Zr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Zr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Zr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Zr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Zr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!kf&&kf(t,n);if(Pf)Pf(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new Kw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},fl=dl(),If=function(){return!!fl};If.hasArrayLengthDefineBug=function(){if(!fl)return null;try{return fl([],"length",{value:1}).length!==1}catch{return!0}};var Xw=If,Qw=Kr,Of=Zw,Jw=Xw(),Af=Cf,_f=oi,ex=Qw("%Math.floor%"),tx=function(t,n){if(typeof t!="function")throw new _f("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||ex(n)!==n)throw new _f("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&Af){var s=Af(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Jw?Of(t,"length",n,!0,!0):Of(t,"length",n)),t};(function(e){var t=al,n=Kr,r=tx,o=oi,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=dl(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var f=a(t,s,arguments);return r(f,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Tf);var nx=Tf.exports,Mf=Kr,Df=nx,rx=Df(Mf("String.prototype.indexOf")),ox=function(t,n){var r=Mf(t,!!n);return typeof r=="function"&&rx(t,".prototype.")>-1?Df(r):r};const ix=lw(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var hl=typeof Map=="function"&&Map.prototype,pl=Object.getOwnPropertyDescriptor&&hl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ms=hl&&pl&&typeof pl.get=="function"?pl.get:null,Ff=hl&&Map.prototype.forEach,ml=typeof Set=="function"&&Set.prototype,gl=Object.getOwnPropertyDescriptor&&ml?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,gs=ml&&gl&&typeof gl.get=="function"?gl.get:null,Nf=ml&&Set.prototype.forEach,sx=typeof WeakMap=="function"&&WeakMap.prototype,si=sx?WeakMap.prototype.has:null,ax=typeof WeakSet=="function"&&WeakSet.prototype,ai=ax?WeakSet.prototype.has:null,lx=typeof WeakRef=="function"&&WeakRef.prototype,Lf=lx?WeakRef.prototype.deref:null,cx=Boolean.prototype.valueOf,ux=Object.prototype.toString,dx=Function.prototype.toString,fx=String.prototype.match,yl=String.prototype.slice,Wn=String.prototype.replace,hx=String.prototype.toUpperCase,Vf=String.prototype.toLowerCase,$f=RegExp.prototype.test,Rf=Array.prototype.concat,un=Array.prototype.join,px=Array.prototype.slice,jf=Math.floor,vl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,bl=Object.getOwnPropertySymbols,wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xr||!0)?Symbol.toStringTag:null,Bf=Object.prototype.propertyIsEnumerable,zf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Wf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||$f.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-jf(-e):jf(e);if(r!==e){var o=String(r),i=yl.call(t,o.length+1);return Wn.call(o,n,"$&_")+"."+Wn.call(Wn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Wn.call(t,n,"$&_")}var xl=ix,Hf=xl.custom,Uf=qf(Hf)?Hf:null,mx=function e(t,n,r,o){var i=n||{};if(Hn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Hn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Hn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Hn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Hn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.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 Zf(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Wf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Wf(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Sl(t)?"[Array]":"[Object]";var d=Dx(i,r);if(typeof o>"u")o=[];else if(Kf(o,t)>=0)return"[Circular]";function h(V,k,_){if(k&&(o=px.call(o),o.push(k)),_){var F={depth:i.depth};return Hn(i,"quoteStyle")&&(F.quoteStyle=i.quoteStyle),e(V,F,r+1,o)}return e(V,i,r+1,o)}if(typeof t=="function"&&!Yf(t)){var f=Ex(t),p=ys(t,h);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(qf(t)){var m=Xr?Wn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):wl.call(t);return typeof t=="object"&&!Xr?li(m):m}if(Ax(t)){for(var v="<"+Vf.call(String(t.nodeName)),y=t.attributes||[],w=0;w<y.length;w++)v+=" "+y[w].name+"="+Gf(gx(y[w].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Vf.call(String(t.nodeName))+">",v}if(Sl(t)){if(t.length===0)return"[]";var g=ys(t,h);return d&&!Mx(g)?"["+El(g,d)+"]":"[ "+un.call(g,", ")+" ]"}if(vx(t)){var T=ys(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Bf.call(t,"cause")?"{ ["+String(t)+"] "+un.call(Rf.call("[cause]: "+h(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(T,", ")+" }"}if(typeof t=="object"&&s){if(Uf&&typeof t[Uf]=="function"&&xl)return xl(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Cx(t)){var S=[];return Ff&&Ff.call(t,function(V,k){S.push(h(k,t,!0)+" => "+h(V,t))}),Xf("Map",ms.call(t),S,d)}if(Ix(t)){var E=[];return Nf&&Nf.call(t,function(V){E.push(h(V,t))}),Xf("Set",gs.call(t),E,d)}if(Px(t))return Tl("WeakMap");if(Ox(t))return Tl("WeakSet");if(kx(t))return Tl("WeakRef");if(wx(t))return li(h(Number(t)));if(Sx(t))return li(h(vl.call(t)));if(xx(t))return li(cx.call(t));if(bx(t))return li(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof gf<"u"&&t===gf)return"{ [object globalThis] }";if(!yx(t)&&!Yf(t)){var I=ys(t,h),P=zf?zf(t)===Object.prototype:t instanceof Object||t.constructor===Object,O=t instanceof Object?"":"null prototype",C=!P&&Ot&&Object(t)===t&&Ot in t?yl.call(Un(t),8,-1):O?"Object":"",L=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",D=L+(C||O?"["+un.call(Rf.call([],C||[],O||[]),": ")+"] ":"");return I.length===0?D+"{}":d?D+"{"+El(I,d)+"}":D+"{ "+un.call(I,", ")+" }"}return String(t)};function Gf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function gx(e){return Wn.call(String(e),/"/g,""")}function Sl(e){return Un(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function yx(e){return Un(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Yf(e){return Un(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function vx(e){return Un(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function bx(e){return Un(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function wx(e){return Un(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function xx(e){return Un(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function qf(e){if(Xr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!wl)return!1;try{return wl.call(e),!0}catch{}return!1}function Sx(e){if(!e||typeof e!="object"||!vl)return!1;try{return vl.call(e),!0}catch{}return!1}var Tx=Object.prototype.hasOwnProperty||function(e){return e in this};function Hn(e,t){return Tx.call(e,t)}function Un(e){return ux.call(e)}function Ex(e){if(e.name)return e.name;var t=fx.call(dx.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Kf(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 Cx(e){if(!ms||!e||typeof e!="object")return!1;try{ms.call(e);try{gs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Px(e){if(!si||!e||typeof e!="object")return!1;try{si.call(e,si);try{ai.call(e,ai)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function kx(e){if(!Lf||!e||typeof e!="object")return!1;try{return Lf.call(e),!0}catch{}return!1}function Ix(e){if(!gs||!e||typeof e!="object")return!1;try{gs.call(e);try{ms.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Ox(e){if(!ai||!e||typeof e!="object")return!1;try{ai.call(e,ai);try{si.call(e,si)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Ax(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Zf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Zf(yl.call(e,0,t.maxStringLength),t)+r}var o=Wn.call(Wn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,_x);return Gf(o,"single",t)}function _x(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":"")+hx.call(t.toString(16))}function li(e){return"Object("+e+")"}function Tl(e){return e+" { ? }"}function Xf(e,t,n,r){var o=r?El(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function Mx(e){for(var t=0;t<e.length;t++)if(Kf(e[t],`
|
|
2
|
+
`)>=0)return!1;return!0}function Dx(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=un.call(Array(e.indent+1)," ");else return null;return{base:n,prev:un.call(Array(t+1),n)}}function El(e,t){if(e.length===0)return"";var n=`
|
|
3
3
|
`+t.prev+t.base;return n+un.call(e,","+n)+`
|
|
4
|
-
`+t.prev}function ys(e,t){var n=bl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Hn(e,o)?t(e[o],e):""}var i=typeof gl=="function"?gl(e):[],s;if(Qr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Hn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Qr&&s["$"+l]instanceof Symbol||(Lf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof gl=="function")for(var c=0;c<i.length;c++)Rf.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var Zf=Zr,Jr=tx,_x=fx,Mx=oi,vs=Zf("%WeakMap%",!0),bs=Zf("%Map%",!0),Dx=Jr("WeakMap.prototype.get",!0),Nx=Jr("WeakMap.prototype.set",!0),Fx=Jr("WeakMap.prototype.has",!0),Lx=Jr("Map.prototype.get",!0),Vx=Jr("Map.prototype.set",!0),$x=Jr("Map.prototype.has",!0),Sl=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},Rx=function(e,t){var n=Sl(e,t);return n&&n.value},jx=function(e,t,n){var r=Sl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Bx=function(e,t){return!!Sl(e,t)},zx=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new Mx("Side channel does not contain "+_x(i))},get:function(i){if(vs&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Dx(t,i)}else if(bs){if(n)return Lx(n,i)}else if(r)return Rx(r,i)},has:function(i){if(vs&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Fx(t,i)}else if(bs){if(n)return $x(n,i)}else if(r)return Bx(r,i);return!1},set:function(i,s){vs&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new vs),Nx(t,i,s)):bs?(n||(n=new bs),Vx(n,i,s)):(r||(r={key:{},next:null}),jx(r,i,s))}};return o},Wx=String.prototype.replace,Hx=/%20/g,Tl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Xf={default:Tl.RFC3986,formatters:{RFC1738:function(e){return Wx.call(e,Hx,"+")},RFC3986:function(e){return String(e)}},RFC1738:Tl.RFC1738,RFC3986:Tl.RFC3986},Ux=Xf,El=Object.prototype.hasOwnProperty,wr=Array.isArray,dn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Gx=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(wr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Qf=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},Yx=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(wr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!El.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 wr(t)&&!wr(n)&&(o=Qf(t,r)),wr(t)&&wr(n)?(n.forEach(function(i,s){if(El.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return El.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},qx=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Kx=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}},Zx=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===Ux.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+dn[c];continue}if(c<2048){a=a+(dn[192|c>>6]+dn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(dn[224|c>>12]+dn[128|c>>6&63]+dn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=dn[240|c>>18]+dn[128|c>>12&63]+dn[128|c>>6&63]+dn[128|c&63]}return a},Xx=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return Gx(n),t},Qx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Jx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},e1=function(t,n){return[].concat(t,n)},t1=function(t,n){if(wr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Jf={arrayToObject:Qf,assign:qx,combine:e1,compact:Xx,decode:Kx,encode:Zx,isBuffer:Jx,isRegExp:Qx,maybeMap:t1,merge:Yx},n1=Jf,eh=Xf,r1=Date.prototype.toISOString,th=eh.default;n1.encode,eh.formatters[th];var o1=Jf;o1.decode;var nh=e=>Array.isArray(e),Cl=e=>e===void 0,Pl=e=>e===null,i1=Function.bind.call(Function.call,Object.prototype.toString),s1=e=>!!e&&i1(e)==="[object Error]"||e instanceof Error,rh=(e,t)=>e instanceof t,a1=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},l1=e=>Object.prototype.toString.call(e)==="[object Date]"&&rh(e,Date),_n={array:nh,date:l1,empty:e=>Pl(e)||Cl(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:rh,isError:s1,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Pl(e)||Cl(e),null:Pl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!nh(e)&&typeof e=="object",primitive:a1,string:e=>typeof e=="string",undefined:Cl},kl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const i=`${+o[0]}`===o[0];e[r]=i?[]:{}}if(typeof e[r]!="object"){const i=`${+o[0]}`===o[0];e[r]=kl(i?[]:{},o,n)}else e[r]=kl(e[r],o,n)}else e[r]=n;return e},c1=e=>Object.keys(e),u1=e=>e.replace("[",".").replace("]","").split("."),oh=(e,t,n)=>{const r=Array.isArray(t)?t:u1(t),o=structuredClone(e);return kl(o,r,n),o};const Il="-";function d1(e){const t=h1(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Il);return a[0]===""&&a.length!==1&&a.shift(),ih(a,t)||f1(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function ih(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ih(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Il);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const sh=/^\[(.+)\]$/;function f1(e){if(sh.test(e)){const t=sh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function h1(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return m1(Object.entries(e.classGroups),n).forEach(([i,s])=>{Ol(s,r,i,t)}),r}function Ol(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:ah(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(p1(o)){Ol(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Ol(s,ah(t,i),n,r)})})}function ah(e,t){let n=e;return t.split(Il).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function p1(e){return e.isThemeGetter}function m1(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function g1(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const lh="!";function y1(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let g=a[v];if(c===0){if(g===o&&(r||a.slice(v,v+i)===t)){l.push(a.slice(u,v)),u=v+i;continue}if(g==="/"){d=v;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(lh),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function v1(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 b1(e){return{cache:g1(e.cacheSize),parseClassName:y1(e),...d1(e)}}const w1=/\s+/;function x1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(w1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let d=!!u,h=r(d?c.substring(0,u):c);if(!h){if(!d)return{isTailwindClass:!1,originalClassName:s};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:s};d=!1}const f=v1(a).join(":");return{isTailwindClass:!0,modifierId:l?f+lh:f,classGroupId:h,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function S1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ch(t))&&(r&&(r+=" "),r+=n);return r}function ch(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ch(e[r]))&&(n&&(n+=" "),n+=t);return n}function T1(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=b1(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=x1(l,n);return o(l,u),u}return function(){return i(S1.apply(null,arguments))}}function Ge(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const uh=/^\[(?:([a-z-]+):)?(.+)\]$/i,E1=/^\d+\/\d+$/,C1=new Set(["px","full","screen"]),P1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k1=/\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$/,I1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,O1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,A1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Mn(e){return xr(e)||C1.has(e)||E1.test(e)}function Gn(e){return eo(e,"length",$1)}function xr(e){return!!e&&!Number.isNaN(Number(e))}function ws(e){return eo(e,"number",xr)}function ci(e){return!!e&&Number.isInteger(Number(e))}function _1(e){return e.endsWith("%")&&xr(e.slice(0,-1))}function ve(e){return uh.test(e)}function Yn(e){return P1.test(e)}const M1=new Set(["length","size","percentage"]);function D1(e){return eo(e,M1,dh)}function N1(e){return eo(e,"position",dh)}const F1=new Set(["image","url"]);function L1(e){return eo(e,F1,j1)}function V1(e){return eo(e,"",R1)}function ui(){return!0}function eo(e,t,n){const r=uh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function $1(e){return k1.test(e)&&!I1.test(e)}function dh(){return!1}function R1(e){return O1.test(e)}function j1(e){return A1.test(e)}function B1(){const e=Ge("colors"),t=Ge("spacing"),n=Ge("blur"),r=Ge("brightness"),o=Ge("borderColor"),i=Ge("borderRadius"),s=Ge("borderSpacing"),a=Ge("borderWidth"),l=Ge("contrast"),c=Ge("grayscale"),u=Ge("hueRotate"),d=Ge("invert"),h=Ge("gap"),f=Ge("gradientColorStops"),p=Ge("gradientColorStopPositions"),m=Ge("inset"),v=Ge("margin"),g=Ge("opacity"),w=Ge("padding"),y=Ge("saturate"),T=Ge("scale"),S=Ge("sepia"),E=Ge("skew"),I=Ge("space"),P=Ge("translate"),O=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ve,t],D=()=>[ve,t],L=()=>["",Mn,Gn],k=()=>["auto",xr,ve],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ve],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[xr,ws],Z=()=>[xr,ve];return{cacheSize:500,separator:":",theme:{colors:[ui],spacing:[Mn,Gn],blur:["none","",Yn,ve],brightness:j(),borderColor:[e],borderRadius:["none","","full",Yn,ve],borderSpacing:D(),borderWidth:L(),contrast:j(),grayscale:U(),hueRotate:Z(),invert:U(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[_1,Gn],inset:V(),margin:V(),opacity:j(),padding:D(),saturate:j(),scale:j(),sepia:U(),skew:Z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Yn]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:[..._(),ve]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ci,ve]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",ci,ve]}],"grid-cols":[{"grid-cols":[ui]}],"col-start-end":[{col:["auto",{span:["full",ci,ve]},ve]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[ui]}],"row-start-end":[{row:["auto",{span:[ci,ve]},ve]}],"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",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Yn]},Yn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Yn,Gn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ws]}],"font-family":[{font:[ui]}],"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",ve]}],"line-clamp":[{"line-clamp":["none",xr,ws]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mn,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mn,Gn]}],"underline-offset":[{"underline-offset":["auto",Mn,ve]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],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",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),N1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",D1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},L1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[g]}],"border-style":[{border:[...N(),"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":[g]}],"divide-style":[{divide:N()}],"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:["",...N()]}],"outline-offset":[{"outline-offset":[Mn,ve]}],"outline-w":[{outline:[Mn,Gn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Mn,Gn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Yn,V1]}],"shadow-color":[{shadow:[ui]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Yn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[S]}],"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":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ci,ve]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",ve]}],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",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mn,Gn,ws]}],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 z1=T1(B1),Al=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},W1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),H1=e=>_n.function(e),Be=(...e)=>z1(rw(e)),xs=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},Ss=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},to=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),U1=ri("inline-flex duration-700 enabled:hover:bg-opacity-80 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent 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 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",primary:"bg-primary text-primary-foreground",main:"bg-primary text-primary-foreground",warn:"bg-warn text-warn-foreground",danger:"bg-danger text-danger-foreground",secondary:"bg-secondary-background text-secondary-foreground disabled:text-secondary-subtle",success:"bg-success text-success-foreground",info:"bg-info text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),qn=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(to,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:Be(U1({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),G1=e=>x.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>x.jsx("li",{className:"flex flex-1",children:x.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:Be("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),Y1=ri("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"}}}),q1=ri("inline-flex rounded-pill gap-1.5 text-main-foreground 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:{raw:"",warn:"bg-warn-subtle text-warn-hover",info:"bg-info-subtle text-info-hover",main:"bg-primary-subtle text-primary-hover",danger:"bg-danger-subtle text-danger-hover",success:"bg-success-subtle text-success-hover",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70",secondary:"bg-secondary-background text-secondary-foreground",neutral:"bg-transparent border-card-border border text-foreground"}},defaultVariants:{theme:"main",size:"default"}}),K1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return x.jsxs(to,{...a,ref:l,"data-theme":i,as:a.as??"span",className:Be(q1({size:s,theme:i}),t),children:[n?x.jsx("span",{className:Y1({theme:n})}):null,r,a.children]})}),no=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ts=b.createContext({}),Es=b.createContext(null),_l=typeof document<"u",Cs=_l?b.useLayoutEffect:b.useEffect,fh=b.createContext({strict:!1}),Ps=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hh="data-"+Ps("framerAppearId"),Z1={skipAnimations:!1,useManualTiming:!1};function X1(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,u=!1,d=!1)=>{const f=d&&r?t:n;return u&&i.add(c),f.has(c)||f.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const ks=["read","resolveKeyframes","update","preRender","render","postRender"],Q1=40;function ph(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=ks.reduce((g,w)=>(g[w]=X1(i),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,f=()=>{const g=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(g-o.timestamp,Q1),1),o.timestamp=g,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},p=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:ks.reduce((g,w)=>{const y=s[w];return g[w]=(T,S=!1,E=!1)=>(n||p(),y.schedule(T,S,E)),g},{}),cancel:g=>{for(let w=0;w<ks.length;w++)s[ks[w]].cancel(g)},state:o,steps:s}}const{schedule:Ml,cancel:kV}=ph(queueMicrotask,!1);function ro(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const mh=b.createContext({});let gh=!1;function J1(e,t,n,r,o){const{visualElement:i}=b.useContext(Ts),s=b.useContext(fh),a=b.useContext(Es),l=b.useContext(no).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(mh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&tS(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const h=b.useRef(!!(n[hh]&&!window.HandoffComplete));return Cs(()=>{u&&(u.updateFeatures(),Ml.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,gh||(gh=!0,queueMicrotask(eS))))}),u}function eS(){window.HandoffComplete=!0}function tS(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yh(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&ro(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function yh(e){if(e)return e.options.allowProjection!==!1?e.projection:yh(e.parent)}function nS(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ro(n)&&(n.current=r))},[t])}function di(e){return typeof e=="string"||Array.isArray(e)}function fi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Dl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Nl=["initial",...Dl];function Is(e){return fi(e.animate)||Nl.some(t=>di(e[t]))}function vh(e){return!!(Is(e)||e.variants)}function rS(e,t){if(Is(e)){const{initial:n,animate:r}=e;return{initial:n===!1||di(n)?n:void 0,animate:di(r)?r:void 0}}return e.inherit!==!1?t:{}}function oS(e){const{initial:t,animate:n}=rS(e,b.useContext(Ts));return b.useMemo(()=>({initial:t,animate:n}),[bh(t),bh(n)])}function bh(e){return Array.isArray(e)?e.join(" "):e}const wh={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"]},oo={};for(const e in wh)oo[e]={isEnabled:t=>wh[e].some(n=>!!t[n])};function iS(e){for(const t in e)oo[t]={...oo[t],...e[t]}}const hi=b.createContext({}),sS=Symbol.for("motionComponentSymbol"),St=e=>e;let io=St,Ut=St;process.env.NODE_ENV!=="production"&&(io=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ut=(e,t)=>{if(!e)throw new Error(t)});function aS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&iS(e);function i(a,l){let c;const u={...b.useContext(no),...a,layoutId:lS(a)},{isStatic:d}=u,h=oS(a),f=r(a,d);if(!d&&_l){cS(u,e);const p=uS(u);c=p.MeasureLayout,h.visualElement=J1(o,f,u,t,p.ProjectionNode)}return x.jsxs(Ts.Provider,{value:h,children:[c&&h.visualElement?x.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,nS(f,h.visualElement,l),f,d,h.visualElement)]})}const s=b.forwardRef(i);return s[sS]=o,s}function lS({layoutId:e}){const t=b.useContext(hi).id;return t&&e!==void 0?t+"-"+e:e}function cS(e,t){const n=b.useContext(fh).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?io(!1,r):Ut(!1,r)}}function uS(e){const{drag:t,layout:n}=oo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function dS(e){function t(r,o={}){return aS(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const fS=["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 Fl(e){return typeof e!="string"||e.includes("-")?!1:!!(fS.indexOf(e)>-1||/[A-Z]/u.test(e))}const Os={};function hS(e){Object.assign(Os,e)}const pi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Kn=new Set(pi);function xh(e,{layout:t,layoutId:n}){return Kn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Os[e]||e==="opacity")}const mt=e=>!!(e&&e.getVelocity),pS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mS=pi.length;function gS(e,t,n){let r="";for(let o=0;o<mS;o++){const i=pi[o];if(e[i]!==void 0){const s=pS[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Sh=e=>t=>typeof t=="string"&&t.startsWith(e),Th=Sh("--"),yS=Sh("var(--"),Ll=e=>yS(e)?vS.test(e.split("/*")[0].trim()):!1,vS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Zn=(e,t,n)=>n>t?t:n<e?e:n,so={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mi={...so,transform:e=>Zn(0,1,e)},As={...so,default:1},gi=e=>Math.round(e*1e5)/1e5,Vl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,wS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,xS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function yi(e){return typeof e=="string"}function SS(e){return e==null}const vi=e=>({test:t=>yi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xn=vi("deg"),fn=vi("%"),fe=vi("px"),TS=vi("vh"),ES=vi("vw"),Eh={...fn,parse:e=>fn.parse(e)/100,transform:e=>fn.transform(e*100)},Ch={...so,transform:Math.round},Ph={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:Xn,rotateX:Xn,rotateY:Xn,rotateZ:Xn,scale:As,scaleX:As,scaleY:As,scaleZ:As,skew:Xn,skewX:Xn,skewY:Xn,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:mi,originX:Eh,originY:Eh,originZ:fe,zIndex:Ch,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:mi,strokeOpacity:mi,numOctaves:Ch};function $l(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(Th(u)){o[u]=d;continue}const h=Ph[u],f=bS(d,h);if(Kn.has(u)){if(a=!0,i[u]=f,!c)continue;d!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=f):r[u]=f}if(t.transform||(a||n?r.transform=gS(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${d} ${h}`}}const Rl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function kh(e,t,n){for(const r in t)!mt(t[r])&&!xh(r,n)&&(e[r]=t[r])}function CS({transformTemplate:e},t){return b.useMemo(()=>{const n=Rl();return $l(n,t,e),Object.assign({},n.vars,n.style)},[t])}function PS(e,t){const n=e.style||{},r={};return kh(r,n,e),Object.assign(r,CS(e,t)),r}function kS(e,t){const n={},r=PS(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 IS=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 _s(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||IS.has(e)}let Ih=e=>!_s(e);function Oh(e){e&&(Ih=t=>t.startsWith("on")?!_s(t):e(t))}try{Oh(require("@emotion/is-prop-valid").default)}catch{}function OS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ih(o)||n===!0&&_s(o)||!t&&!_s(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Ah(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function AS(e,t,n){const r=Ah(t,e.x,e.width),o=Ah(n,e.y,e.height);return`${r} ${o}`}const _S={offset:"stroke-dashoffset",array:"stroke-dasharray"},MS={offset:"strokeDashoffset",array:"strokeDasharray"};function DS(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?_S:MS;e[i.offset]=fe.transform(-r);const s=fe.transform(t),a=fe.transform(n);e[i.array]=`${s} ${a}`}function jl(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if($l(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f,dimensions:p}=e;h.transform&&(p&&(f.transform=h.transform),delete h.transform),p&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=AS(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&DS(h,s,a,l,!1)}const _h=()=>({...Rl(),attrs:{}}),Bl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function NS(e,t,n,r){const o=b.useMemo(()=>{const i=_h();return jl(i,t,Bl(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};kh(i,e.style,e),o.style={...i,...o.style}}return o}function FS(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Fl(n)?NS:kS)(r,i,s,n),c=OS(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,h=b.useMemo(()=>mt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:h})}}function Mh(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Dh=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 Nh(e,t,n,r){Mh(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Dh.has(o)?o:Ps(o),t.attrs[o])}function zl(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(mt(o[s])||t.style&&mt(t.style[s])||xh(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Fh(e,t,n){const r=zl(e,t,n);for(const o in e)if(mt(e[o])||mt(t[o])){const i=pi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Lh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Wl(e,t,n,r){if(typeof t=="function"){const[o,i]=Lh(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Lh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function hn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Hl=e=>Array.isArray(e),LS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),VS=e=>Hl(e)?e[e.length-1]||0:e;function Ms(e){const t=mt(e)?e.get():e;return LS(t)?t.toValue():t}const Vh=new Set(["opacity","clipPath","filter","transform"]);function $h(e){if(Kn.has(e))return"transform";if(Vh.has(e))return Ps(e)}function Ds(e,t){e.indexOf(t)===-1&&e.push(t)}function bi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function $S([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}function RS({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:BS(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Rh=e=>(t,n)=>{const r=b.useContext(Ts),o=b.useContext(Es),i=()=>RS(e,t,r,o,n);return n?i():hn(i)};function jS(e,t){const n=$h(t);n&&Ds(e,n)}function jh(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=Wl(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function BS(e,t,n,r,o){var i;const s={},a=[],l=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(e,{});for(const v in c)s[v]=Ms(c[v]);let{initial:u,animate:d}=e;const h=Is(e),f=vh(e);t&&f&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!fi(m)&&jh(e,m,(v,g)=>{for(const w in v){let y=v[w];if(Array.isArray(y)){const T=p?y.length-1:0;y=y[T]}y!==null&&(s[w]=y)}for(const w in g)s[w]=g[w]}),l&&(d&&u!==!1&&!fi(d)&&jh(e,d,v=>{for(const g in v)jS(a,g)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Me,cancel:pn,state:Tt,steps:Ul}=ph(typeof requestAnimationFrame<"u"?requestAnimationFrame:St,!0),zS={useVisualState:Rh({scrapeMotionValuesFromProps:Fh,createRenderState:_h,onMount:(e,t,{renderState:n,latestValues:r})=>{Me.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Me.render(()=>{jl(n,r,Bl(t.tagName),e.transformTemplate),Nh(t,n)})}})},WS={useVisualState:Rh({applyWillChange:!0,scrapeMotionValuesFromProps:zl,createRenderState:Rl})};function HS(e,{forwardMotionProps:t=!1},n,r){return{...Fl(e)?zS:WS,preloadedFeatures:n,useRender:FS(t),createVisualElement:r,Component:e}}function Dn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Bh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ns(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const US=e=>t=>Bh(t)&&e(t,Ns(t));function Nn(e,t,n,r){return Dn(e,t,US(n),r)}const GS=(e,t)=>n=>t(e(n)),Fn=(...e)=>e.reduce(GS);function zh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Wh=zh("dragHorizontal"),Hh=zh("dragVertical");function Uh(e){let t=!1;if(e==="y")t=Hh();else if(e==="x")t=Wh();else{const n=Wh(),r=Hh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Gh(){const e=Uh(!0);return e?(e(),!1):!0}class Qn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Yh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Gh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Me.postRender(()=>l(i,s))};return Nn(e.current,n,o,{passive:!e.getProps()[r]})}class YS extends Qn{mount(){this.unmount=Fn(Yh(this.node,!0),Yh(this.node,!1))}unmount(){}}class qS extends Qn{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=Fn(Dn(this.node.current,"focus",()=>this.onFocus()),Dn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const qh=(e,t)=>t?e===t?!0:qh(e,t.parentElement):!1;function Gl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ns(n))}class KS extends Qn{constructor(){super(...arguments),this.removeStartListeners=St,this.removeEndListeners=St,this.removeAccessibleListeners=St,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=Nn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),h=!d&&!qh(this.node.current,a.target)?u:c;h&&Me.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=Nn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Fn(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Gl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Me.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Dn(this.node.current,"keyup",s),Gl("down",(a,l)=>{this.startPress(a,l)})},n=Dn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Gl("cancel",(i,s)=>this.cancelPress(i,s))},o=Dn(this.node.current,"blur",r);this.removeAccessibleListeners=Fn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Me.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Gh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Me.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Nn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Dn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Fn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Yl=new WeakMap,ql=new WeakMap,ZS=e=>{const t=Yl.get(e.target);t&&t(e)},XS=e=>{e.forEach(ZS)};function QS({root:e,...t}){const n=e||document;ql.has(n)||ql.set(n,{});const r=ql.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(XS,{root:e,...t})),r[o]}function JS(e,t,n){const r=QS(t);return Yl.set(e,n),r.observe(e),()=>{Yl.delete(e),r.unobserve(e)}}const eT={some:0,all:1};class tT extends Qn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:eT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return JS(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(nT(t,n))&&this.startObserver()}unmount(){}}function nT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const rT={inView:{Feature:tT},tap:{Feature:KS},focus:{Feature:qS},hover:{Feature:YS}};function Kh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Fs(e,t,n){const r=e.getProps();return Wl(r,t,n!==void 0?n:r.custom,e)}const mn=e=>e*1e3,gn=e=>e/1e3,oT={type:"spring",stiffness:500,damping:25,restSpeed:10},iT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sT={type:"keyframes",duration:.8},aT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lT=(e,{keyframes:t})=>t.length>2?sT:Kn.has(e)?e.startsWith("scale")?iT(t[1]):oT:aT;function cT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Kl(e,t){return e[t]||e.default||e}const uT=e=>e!==null;function Ls(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(uT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Vs;function dT(){Vs=void 0}const Jn={now:()=>(Vs===void 0&&Jn.set(Tt.isProcessing||Z1.useManualTiming?Tt.timestamp:performance.now()),Vs),set:e=>{Vs=e,queueMicrotask(dT)}},Zh=e=>/^0[^.\s]+$/u.test(e);function fT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zh(e):!0}const Xh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),hT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pT(e){const t=hT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const mT=4;function Qh(e,t,n=1){Ut(n<=mT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=pT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Xh(s)?parseFloat(s):s}return Ll(o)?Qh(o,t,n+1):o}const gT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Jh=e=>e===so||e===fe,ep=(e,t)=>parseFloat(e.split(", ")[t]),tp=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ep(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?ep(i[1],e):0}},yT=new Set(["x","y","z"]),vT=pi.filter(e=>!yT.has(e));function bT(e){const t=[];return vT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ao={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:tp(4,13),y:tp(5,14)};ao.translateX=ao.x,ao.translateY=ao.y;const np=e=>t=>t.test(e),rp=[so,fe,fn,Xn,ES,TS,{test:e=>e==="auto",parse:e=>e}],op=e=>rp.find(np(e)),Sr=new Set;let Zl=!1,Xl=!1;function ip(){if(Xl){const e=Array.from(Sr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=bT(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xl=!1,Zl=!1,Sr.forEach(e=>e.complete()),Sr.clear()}function sp(){Sr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xl=!0)})}function wT(){sp(),ip()}class Ql{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Sr.add(this),Zl||(Zl=!0,Me.read(sp),Me.resolveKeyframes(ip))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Sr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Sr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Jl=(e,t)=>n=>!!(yi(n)&&xS.test(n)&&n.startsWith(e)||t&&!SS(n)&&Object.prototype.hasOwnProperty.call(n,t)),ap=(e,t,n)=>r=>{if(!yi(r))return r;const[o,i,s,a]=r.match(Vl);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},xT=e=>Zn(0,255,e),ec={...so,transform:e=>Math.round(xT(e))},Tr={test:Jl("rgb","red"),parse:ap("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ec.transform(e)+", "+ec.transform(t)+", "+ec.transform(n)+", "+gi(mi.transform(r))+")"};function ST(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 tc={test:Jl("#"),parse:ST,transform:Tr.transform},lo={test:Jl("hsl","hue"),parse:ap("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fn.transform(gi(t))+", "+fn.transform(gi(n))+", "+gi(mi.transform(r))+")"},At={test:e=>Tr.test(e)||tc.test(e)||lo.test(e),parse:e=>Tr.test(e)?Tr.parse(e):lo.test(e)?lo.parse(e):tc.parse(e),transform:e=>yi(e)?e:e.hasOwnProperty("red")?Tr.transform(e):lo.transform(e)};function TT(e){var t,n;return isNaN(e)&&yi(e)&&(((t=e.match(Vl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(wS))===null||n===void 0?void 0:n.length)||0)>0}const lp="number",cp="color",ET="var",CT="var(",up="${}",PT=/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 wi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(PT,l=>(At.test(l)?(r.color.push(i),o.push(cp),n.push(At.parse(l))):l.startsWith(CT)?(r.var.push(i),o.push(ET),n.push(l)):(r.number.push(i),o.push(lp),n.push(parseFloat(l))),++i,up)).split(up);return{values:n,split:a,indexes:r,types:o}}function dp(e){return wi(e).values}function fp(e){const{split:t,types:n}=wi(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===lp?i+=gi(o[s]):a===cp?i+=At.transform(o[s]):i+=o[s]}return i}}const kT=e=>typeof e=="number"?0:e;function IT(e){const t=dp(e);return fp(e)(t.map(kT))}const er={test:TT,parse:dp,createTransformer:fp,getAnimatableNone:IT},OT=new Set(["brightness","contrast","saturate","opacity"]);function AT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vl)||[];if(!r)return e;const o=n.replace(r,"");let i=OT.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const _T=/\b([a-z-]*)\(.*?\)/gu,nc={...er,getAnimatableNone:e=>{const t=e.match(_T);return t?t.map(AT).join(" "):e}},MT={...Ph,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:nc,WebkitFilter:nc},rc=e=>MT[e];function hp(e,t){let n=rc(e);return n!==nc&&(n=er),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const DT=new Set(["auto","none","0"]);function NT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!DT.has(i)&&wi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=hp(n,o)}class pp extends Ql{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Ll(c))){const u=Qh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!gT.has(r)||t.length!==2)return;const[o,i]=t,s=op(o),a=op(i);if(s!==a)if(Jh(s)&&Jh(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++)fT(t[o])&&r.push(o);r.length&&NT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ao[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=ao[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function mp(e){let t;return()=>(t===void 0&&(t=e()),t)}const gp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(er.test(e)||e==="0")&&!e.startsWith("url("));function FT(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 LT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=gp(o,t),a=gp(i,t);return io(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:FT(e)||n==="spring"&&r}class yp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&wT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!LT(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ls(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function vp(e,t){return t?e*(1e3/t):0}const VT=5;function bp(e,t,n){const r=Math.max(t-VT,0);return vp(n-e(r),t-r)}const oc=.001,$T=.01,wp=10,RT=.05,jT=1;function BT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;io(e<=mn(wp),"Spring duration must be 10 seconds or less");let s=1-t;s=Zn(RT,jT,s),e=Zn($T,wp,gn(e)),s<1?(o=c=>{const u=c*s,d=u*e,h=u-n,f=ic(c,s),p=Math.exp(-d);return oc-h/f*p},i=c=>{const d=c*s*e,h=d*n+n,f=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=ic(Math.pow(c,2),s);return(-o(c)+oc>0?-1:1)*((h-f)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-oc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=WT(o,i,a);if(e=mn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const zT=12;function WT(e,t,n){let r=n;for(let o=1;o<zT;o++)r=r-e(r)/t(r);return r}function ic(e,t){return e*Math.sqrt(1-t*t)}const HT=["duration","bounce"],UT=["stiffness","damping","mass"];function xp(e,t){return t.some(n=>e[n]!==void 0)}function GT(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!xp(e,UT)&&xp(e,HT)){const n=BT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function sc({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=GT({...r,velocity:-gn(r.velocity||0)}),f=d||0,p=l/(2*Math.sqrt(a*c)),m=i-o,v=gn(Math.sqrt(a/c)),g=Math.abs(m)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let w;if(p<1){const y=ic(v,p);w=T=>{const S=Math.exp(-p*v*T);return i-S*((f+p*v*m)/y*Math.sin(y*T)+m*Math.cos(y*T))}}else if(p===1)w=y=>i-Math.exp(-v*y)*(m+(f+v*m)*y);else{const y=v*Math.sqrt(p*p-1);w=T=>{const S=Math.exp(-p*v*T),E=Math.min(y*T,300);return i-S*((f+p*v*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:h&&u||null,next:y=>{const T=w(y);if(h)s.done=y>=u;else{let S=f;y!==0&&(p<1?S=bp(w,y,T):S=0);const E=Math.abs(S)<=n,I=Math.abs(i-T)<=t;s.done=E&&I}return s.value=s.done?i:T,s}}}function Sp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},f=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let m=n*t;const v=d+m,g=s===void 0?v:s(v);g!==v&&(m=g-d);const w=P=>-m*Math.exp(-P/r),y=P=>g+w(P),T=P=>{const O=w(P),C=y(P);h.done=Math.abs(O)<=c,h.value=h.done?g:C};let S,E;const I=P=>{f(h.value)&&(S=P,E=sc({keyframes:[h.value,p(h.value)],velocity:bp(y,P,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return I(0),{calculatedDuration:null,next:P=>{let O=!1;return!E&&S===void 0&&(O=!0,T(P),I(P)),S!==void 0&&P>=S?E.next(P-S):(!O&&T(P),h)}}}const Tp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,YT=1e-7,qT=12;function KT(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Tp(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>YT&&++a<qT);return s}function xi(e,t,n,r){if(e===t&&n===r)return St;const o=i=>KT(i,0,1,e,n);return i=>i===0||i===1?i:Tp(o(i),t,r)}const ZT=xi(.42,0,1,1),XT=xi(0,0,.58,1),Ep=xi(.42,0,.58,1),Cp=e=>Array.isArray(e)&&typeof e[0]!="number",Pp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kp=e=>t=>1-e(1-t),ac=e=>1-Math.sin(Math.acos(e)),Ip=kp(ac),QT=Pp(ac),Op=xi(.33,1.53,.69,.99),lc=kp(Op),JT=Pp(lc),Ap={linear:St,easeIn:ZT,easeInOut:Ep,easeOut:XT,circIn:ac,circInOut:QT,circOut:Ip,backIn:lc,backInOut:JT,backOut:Op,anticipate:e=>(e*=2)<1?.5*lc(e):.5*(2-Math.pow(2,-10*(e-1)))},cc=e=>{if(Array.isArray(e)){Ut(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return xi(t,n,r,o)}else if(typeof e=="string")return Ut(Ap[e]!==void 0,`Invalid easing type '${e}'`),Ap[e];return e},co=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ye=(e,t,n)=>e+(t-e)*n;function uc(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 eE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=uc(l,a,e+1/3),i=uc(l,a,e),s=uc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function $s(e,t){return n=>n>0?t:e}const dc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},tE=[tc,Tr,lo],nE=e=>tE.find(t=>t.test(e));function _p(e){const t=nE(e);if(io(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===lo&&(n=eE(n)),n}const Mp=(e,t)=>{const n=_p(e),r=_p(t);if(!n||!r)return $s(e,t);const o={...n};return i=>(o.red=dc(n.red,r.red,i),o.green=dc(n.green,r.green,i),o.blue=dc(n.blue,r.blue,i),o.alpha=Ye(n.alpha,r.alpha,i),Tr.transform(o))},fc=new Set(["none","hidden"]);function rE(e,t){return fc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function oE(e,t){return n=>Ye(e,t,n)}function hc(e){return typeof e=="number"?oE:typeof e=="string"?Ll(e)?$s:At.test(e)?Mp:aE:Array.isArray(e)?Dp:typeof e=="object"?At.test(e)?Mp:iE:$s}function Dp(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>hc(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function iE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=hc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function sE(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const aE=(e,t)=>{const n=er.createTransformer(t),r=wi(e),o=wi(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?fc.has(e)&&!o.values.length||fc.has(t)&&!r.values.length?rE(e,t):Fn(Dp(sE(r,o),o.values),n):(io(!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.`),$s(e,t))};function Np(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ye(e,t,n):hc(e)(e,t)}function lE(e,t,n){const r=[],o=n||Np,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||St:t;a=Fn(l,a)}r.push(a)}return r}function Fp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ut(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=lE(t,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=co(e[u],e[u+1],c);return s[u](d)};return n?c=>l(Zn(e[0],e[i-1],c)):l}function Lp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=co(0,t,r);e.push(Ye(n,1,o))}}function Vp(e){const t=[0];return Lp(t,e.length-1),t}function cE(e,t){return e.map(n=>n*t)}function uE(e,t){return e.map(()=>t||Ep).splice(0,e.length-1)}function Rs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Cp(r)?r.map(cc):cc(r),i={done:!1,value:t[0]},s=cE(n&&n.length===t.length?n:Vp(t),e),a=Fp(s,t,{ease:Array.isArray(o)?o:uE(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const pc=2e4;function $p(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<pc;)t+=n,r=e.next(t);return t>=pc?1/0:t}const dE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Me.update(t,!0),stop:()=>pn(t),now:()=>Tt.isProcessing?Tt.timestamp:Jn.now()}},fE={decay:Sp,inertia:Sp,tween:Rs,keyframes:Rs,spring:sc},hE=e=>e/100;class mc extends yp{constructor({KeyframeResolver:t=Ql,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new t(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=fE[n]||Rs;let l,c;a!==Rs&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ut(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Fn(hE,Np(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=$p(u));const{calculatedDuration:d}=u,h=d+o,f=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:f,repeatType:p,repeatDelay:m,onUpdate:v}=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 g=this.currentTime-h*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,T=i;if(f){const P=Math.min(this.currentTime,u)/d;let O=Math.floor(P),C=P%1;!C&&P>=1&&(C=1),C===1&&O--,O=Math.min(O,f+1),!!(O%2)&&(p==="reverse"?(C=1-C,m&&(C-=m/d)):p==="mirror"&&(T=s)),y=Zn(0,1,C)*d}const S=w?{done:!1,value:l[0]}:T.next(y);a&&(S.value=a(S.value));let{done:E}=S;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return I&&o!==void 0&&(S.value=Ls(l,this.options,o)),v&&v(S.value),I&&this.finish(),S}get duration(){const{resolved:t}=this;return t?gn(t.calculatedDuration):0}get time(){return gn(this.currentTime)}set time(t){t=mn(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=gn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=dE,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Rp=e=>Array.isArray(e)&&typeof e[0]=="number";function jp(e){return!!(!e||typeof e=="string"&&e in gc||Rp(e)||Array.isArray(e)&&e.every(jp))}const Si=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Si([0,.65,.55,1]),circOut:Si([.55,0,1,.45]),backIn:Si([.31,.01,.66,-.59]),backOut:Si([.33,1.53,.69,.99])};function pE(e){return Bp(e)||gc.easeOut}function Bp(e){if(e)return Rp(e)?Si(e):Array.isArray(e)?e.map(pE):gc[e]}function mE(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Bp(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const gE=mp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),js=10,yE=2e4;function vE(e){return e.type==="spring"||!jp(e.ease)}function bE(e,t){const n=new mc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<yE;)r=n.sample(i),o.push(r.value),i+=js;return{times:void 0,keyframes:o,duration:i-js,ease:"linear"}}class zp extends yp{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new pp(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(vE(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,...p}=this.options,m=bE(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=mE(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=Jn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ls(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return gn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return gn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=mn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return St;const{animation:r}=n;r.timeline=t,r.onfinish=null}return St}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...h}=this.options,f=new mc({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=mn(this.time);c.setWithVelocity(f.sample(p-js).value,f.sample(p).value,js)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return gE()&&r&&Vh.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function wE(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Me.update(r,!0),()=>pn(r)}const xE=mp(()=>window.ScrollTimeline!==void 0);class yc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(xE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),wE(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const vc=(e,t,n,r={},o,i,s)=>a=>{const l=Kl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-mn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};cT(l)||(d={...d,...lT(e,d)}),d.duration&&(d.duration=mn(d.duration)),d.repeatDelay&&(d.repeatDelay=mn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),h&&!i&&t.get()!==void 0){const f=Ls(d.keyframes,l);if(f!==void 0)return Me.update(()=>{d.onUpdate(f),d.onComplete()}),new yc([])}return!i&&zp.supports(d)?new zp(d):new mc(d)};class bc{constructor(){this.subscriptions=[]}add(t){return Ds(this.subscriptions,t),()=>bi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wp=new Set;function wc(e,t,n){e||Wp.has(t)||(console.warn(t),Wp.add(t))}const Hp=30,SE=e=>!isNaN(parseFloat(e)),Ti={current:void 0};class Up{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Jn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=SE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&wc(!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 bc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.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 Ti.current&&Ti.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hp);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 uo(e,t){return new Up(e,t)}function TE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function EE(e,t){const n=Fs(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=VS(i[s]);TE(e,s,a)}}function Gp(e){return e.getProps()[hh]}class CE extends Up{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=$h(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(bi(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function PE(e){return!!(mt(e)&&e.add)}function xc(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new CE("auto"),e.addValue("willChange",r)),PE(r))return r.add(t)}function kE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Sc(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&kE(u,d))continue;const p={delay:n,elapsed:0,...Kl(s||{},d)};let m=!1;if(window.HandoffAppearAnimations){const g=Gp(e);if(g){const w=window.HandoffAppearAnimations(g,d,h,Me);w!==null&&(p.elapsed=w,m=!0)}}h.start(vc(d,h,f,e.shouldReduceMotion&&Kn.has(d)?{type:!1}:p,e,m,xc(e,d)));const v=h.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Me.update(()=>{a&&EE(e,a)})}),c}function Tc(e,t,n={}){var r;const o=Fs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Sc(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return IE(e,t,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function IE(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(OE).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(Tc(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function OE(e,t){return e.sortNodePosition(t)}function AE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Tc(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Tc(e,t,n);else{const o=typeof t=="function"?Fs(e,t,n.custom):t;r=Promise.all(Sc(e,o,n))}return r.then(()=>{Me.postRender(()=>{e.notify("AnimationComplete",t)})})}const _E=[...Dl].reverse(),ME=Dl.length;function DE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>AE(e,n,r)))}function NE(e){let t=DE(e),n=Yp(),r=!0;const o=l=>(c,u)=>{var d;const h=Fs(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],h=new Set;let f={},p=1/0;for(let v=0;v<ME;v++){const g=_E[v],w=n[g],y=c[g]!==void 0?c[g]:u[g],T=di(y),S=g===l?w.isActive:null;S===!1&&(p=v);let E=y===u[g]&&y!==c[g]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...f},!w.isActive&&S===null||!y&&!w.prevProp||fi(y)||typeof y=="boolean")continue;let P=FE(w.prevProp,y)||g===l&&w.isActive&&!E&&T||v>p&&T,O=!1;const C=Array.isArray(y)?y:[y];let V=C.reduce(o(g),{});S===!1&&(V={});const{prevResolvedValues:D={}}=w,L={...D,...V},k=_=>{P=!0,h.has(_)&&(O=!0,h.delete(_)),w.needsAnimating[_]=!0;const N=e.getValue(_);N&&(N.liveStyle=!1)};for(const _ in L){const N=V[_],$=D[_];if(f.hasOwnProperty(_))continue;let z=!1;Hl(N)&&Hl($)?z=!Kh(N,$):z=N!==$,z?N!=null?k(_):h.add(_):N!==void 0&&h.has(_)?k(_):w.protectedKeys[_]=!0}w.prevProp=y,w.prevResolvedValues=V,w.isActive&&(f={...f,...V}),r&&e.blockInitialAnimation&&(P=!1),P&&(!E||O)&&d.push(...C.map(_=>({animation:_,options:{type:g}})))}if(h.size){const v={};h.forEach(g=>{const w=e.getBaseTarget(g),y=e.getValue(g);y&&(y.liveStyle=!0),v[g]=w??null}),d.push({animation:v})}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(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Yp(),r=!0}}}function FE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Kh(t,e):!1}function Er(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yp(){return{animate:Er(!0),whileInView:Er(),whileHover:Er(),whileTap:Er(),whileDrag:Er(),whileFocus:Er(),exit:Er()}}class LE extends Qn{constructor(t){super(t),t.animationState||(t.animationState=NE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fi(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 VE=0;class $E extends Qn{constructor(){super(...arguments),this.id=VE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const RE={animation:{Feature:LE},exit:{Feature:$E}},qp=(e,t)=>Math.abs(e-t);function jE(e,t){const n=qp(e.x,t.x),r=qp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Kp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Cc(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=jE(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:p}=d,{timestamp:m}=Tt;this.history.push({...p,timestamp:m});const{onStart:v,onMove:g}=this.handlers;h||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Ec(h,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Cc(d.type==="pointercancel"?this.lastMoveEventInfo:Ec(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,v),p&&p(d,v)},!Bh(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Ns(t),a=Ec(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=Tt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Cc(a,this.history)),this.removeListeners=Fn(Nn(this.contextWindow,"pointermove",this.handlePointerMove),Nn(this.contextWindow,"pointerup",this.handlePointerUp),Nn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),pn(this.updatePoint)}}function Ec(e,t){return t?{point:t(e.point)}:e}function Zp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Cc({point:e},t){return{point:e,delta:Zp(e,Xp(t)),offset:Zp(e,BE(t)),velocity:zE(t,.1)}}function BE(e){return e[0]}function Xp(e){return e[e.length-1]}function zE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Xp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};const i=gn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Qp=1e-4,WE=1-Qp,HE=1+Qp,Jp=.01,UE=0-Jp,GE=0+Jp;function Gt(e){return e.max-e.min}function YE(e,t,n){return Math.abs(e-t)<=n}function em(e,t,n,r=.5){e.origin=r,e.originPoint=Ye(t.min,t.max,e.origin),e.scale=Gt(n)/Gt(t),e.translate=Ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=WE&&e.scale<=HE||isNaN(e.scale))&&(e.scale=1),(e.translate>=UE&&e.translate<=GE||isNaN(e.translate))&&(e.translate=0)}function Ei(e,t,n,r){em(e.x,t.x,n.x,r?r.originX:void 0),em(e.y,t.y,n.y,r?r.originY:void 0)}function tm(e,t,n){e.min=n.min+t.min,e.max=e.min+Gt(t)}function qE(e,t,n){tm(e.x,t.x,n.x),tm(e.y,t.y,n.y)}function nm(e,t,n){e.min=t.min-n.min,e.max=e.min+Gt(t)}function Ci(e,t,n){nm(e.x,t.x,n.x),nm(e.y,t.y,n.y)}function KE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ye(n,e,r.max):Math.min(e,n)),e}function rm(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 ZE(e,{top:t,left:n,bottom:r,right:o}){return{x:rm(e.x,n,o),y:rm(e.y,t,r)}}function om(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 XE(e,t){return{x:om(e.x,t.x),y:om(e.y,t.y)}}function QE(e,t){let n=.5;const r=Gt(e),o=Gt(t);return o>r?n=co(t.min,t.max-r,e.min):r>o&&(n=co(e.min,e.max-o,t.min)),Zn(0,1,n)}function JE(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 Pc=.35;function eC(e=Pc){return e===!1?e=0:e===!0&&(e=Pc),{x:im(e,"left","right"),y:im(e,"top","bottom")}}function im(e,t,n){return{min:sm(e,t),max:sm(e,n)}}function sm(e,t){return typeof e=="number"?e:e[t]||0}const am=()=>({translate:0,scale:1,origin:0,originPoint:0}),fo=()=>({x:am(),y:am()}),lm=()=>({min:0,max:0}),lt=()=>({x:lm(),y:lm()});function Qt(e){return[e("x"),e("y")]}function cm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function kc(e){return e===void 0||e===1}function Ic({scale:e,scaleX:t,scaleY:n}){return!kc(e)||!kc(t)||!kc(n)}function Cr(e){return Ic(e)||um(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function um(e){return dm(e.x)||dm(e.y)}function dm(e){return e&&e!=="0%"}function Bs(e,t,n){const r=e-n,o=t*r;return n+o}function fm(e,t,n,r,o){return o!==void 0&&(e=Bs(e,o,r)),Bs(e,n,r)+t}function Oc(e,t=0,n=1,r,o){e.min=fm(e.min,t,n,r,o),e.max=fm(e.max,t,n,r,o)}function hm(e,{x:t,y:n}){Oc(e.x,t.translate,t.scale,t.originPoint),Oc(e.y,n.translate,n.scale,n.originPoint)}const pm=.999999999999,mm=1.0000000000001;function rC(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ho(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,hm(e,s)),r&&Cr(i.latestValues)&&ho(e,i.latestValues))}t.x<mm&&t.x>pm&&(t.x=1),t.y<mm&&t.y>pm&&(t.y=1)}function tr(e,t){e.min=e.min+t,e.max=e.max+t}function gm(e,t,n,r,o=.5){const i=Ye(e.min,e.max,o);Oc(e,t,n,i,r)}function ho(e,t){gm(e.x,t.x,t.scaleX,t.scale,t.originX),gm(e.y,t.y,t.scaleY,t.scale,t.originY)}function ym(e,t){return cm(nC(e.getBoundingClientRect(),t))}function oC(e,t,n){const r=ym(e,n),{scroll:o}=t;return o&&(tr(r.x,o.offset.x),tr(r.y,o.offset.y)),r}const vm=({current:e})=>e?e.ownerDocument.defaultView:null,iC=new WeakMap;class sC{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=lt(),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(Ns(u,"page").point)},i=(u,d)=>{var h;const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Uh(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qt(g=>{let w=this.getAxisMotionValue(g).get()||0;if(fn.test(w)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[g];T&&(w=Gt(T)*(parseFloat(w)/100))}}this.originPoint[g]=w}),m&&Me.postRender(()=>m(u,d)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=xc(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=d;if(f&&this.currentDirection===null){this.currentDirection=aC(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Qt(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 Kp(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:vm(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Me.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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!zs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=KE(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&ro(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=ZE(o.layoutBox,n):this.constraints=!1,this.elastic=eC(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Qt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=JE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ro(t))return!1;const r=t.current;Ut(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=oC(r,o.root,this.visualElement.getTransformPagePoint());let s=XE(o.layout.layoutBox,i);if(n){const a=n(tC(s));this.hasMutatedConstraints=!!a,a&&(s=cm(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Qt(u=>{if(!zs(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const h=o?200:1e6,f=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(vc(t,r,0,n,this.visualElement,!1,xc(this.visualElement,t)))}stopAnimation(){Qt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qt(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){Qt(n=>{const{drag:r}=this.getProps();if(!zs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ye(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ro(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=QE({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Qt(s=>{if(!zs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ye(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;iC.set(this.visualElement,this);const t=this.visualElement.current,n=Nn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ro(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Me.read(r);const s=Dn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Qt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Pc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function zs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lC extends Qn{constructor(t){super(t),this.removeGroupControls=St,this.removeListeners=St,this.controls=new sC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||St}unmount(){this.removeGroupControls(),this.removeListeners()}}const bm=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class cC extends Qn{constructor(){super(...arguments),this.removePointerDownListener=St}onPointerDown(t){this.session=new Kp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:bm(t),onStart:bm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Me.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Nn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function uC(){const e=b.useContext(Es);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=wm(e,t.target.x),r=wm(e,t.target.y);return`${n}% ${r}%`}},dC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=er.parse(e);if(o.length>5)return r;const i=er.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ye(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class fC extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;hS(hC),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Me.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ml.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 xm(e){const[t,n]=uC(),r=b.useContext(hi);return x.jsx(fC,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(mh),isPresent:t,safeToRemove:n})}const hC={borderRadius:{...Pi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pi,borderTopRightRadius:Pi,borderBottomLeftRadius:Pi,borderBottomRightRadius:Pi,boxShadow:dC},Sm=["TopLeft","TopRight","BottomLeft","BottomRight"],pC=Sm.length,Tm=e=>typeof e=="string"?parseFloat(e):e,Em=e=>typeof e=="number"||fe.test(e);function mC(e,t,n,r,o,i){o?(e.opacity=Ye(0,n.opacity!==void 0?n.opacity:1,gC(r)),e.opacityExit=Ye(t.opacity!==void 0?t.opacity:1,0,yC(r))):i&&(e.opacity=Ye(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<pC;s++){const a=`border${Sm[s]}Radius`;let l=Cm(t,a),c=Cm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Em(l)===Em(c)?(e[a]=Math.max(Ye(Tm(l),Tm(c),r),0),(fn.test(c)||fn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ye(t.rotate||0,n.rotate||0,r))}function Cm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const gC=Pm(0,.5,Ip),yC=Pm(.5,.95,St);function Pm(e,t,n){return r=>r<e?0:r>t?1:n(co(e,t,r))}function km(e,t){e.min=t.min,e.max=t.max}function Jt(e,t){km(e.x,t.x),km(e.y,t.y)}function Im(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Om(e,t,n,r,o){return e-=t,e=Bs(e,1/n,r),o!==void 0&&(e=Bs(e,1/o,r)),e}function vC(e,t=0,n=1,r=.5,o,i=e,s=e){if(fn.test(t)&&(t=parseFloat(t),t=Ye(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ye(i.min,i.max,r);e===i&&(a-=t),e.min=Om(e.min,t,n,a,o),e.max=Om(e.max,t,n,a,o)}function Am(e,t,[n,r,o],i,s){vC(e,t[n],t[r],t[o],t.scale,i,s)}const bC=["x","scaleX","originX"],wC=["y","scaleY","originY"];function _m(e,t,n,r){Am(e.x,t,bC,n?n.x:void 0,r?r.x:void 0),Am(e.y,t,wC,n?n.y:void 0,r?r.y:void 0)}function Mm(e){return e.translate===0&&e.scale===1}function Dm(e){return Mm(e.x)&&Mm(e.y)}function xC(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Nm(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Fm(e){return Gt(e.x)/Gt(e.y)}function Lm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class SC{constructor(){this.members=[]}add(t){Ds(this.members,t),t.scheduleRender()}remove(t){if(bi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function TC(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}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 EC=(e,t)=>e.depth-t.depth;class CC{constructor(){this.children=[],this.isDirty=!1}add(t){Ds(this.children,t),this.isDirty=!0}remove(t){bi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(EC),this.isDirty=!1,this.children.forEach(t)}}function PC(e,t){const n=Jn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(pn(r),e(i-t))};return Me.read(r,!0),()=>pn(r)}function Vm(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Ac(e,t,n){const r=mt(e)?e:uo(e);return r.start(vc("",r,t,n)),r.animation}const Pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_c=["","X","Y","Z"],kC={visibility:"hidden"},$m=1e3;let IC=0;function Mc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Rm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Gp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Rm(e.parent):!1:!1}function jm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=IC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Pr.totalNodes=Pr.resolvedTargetDeltas=Pr.recalculatedProjection=0),this.nodes.forEach(_C),this.nodes.forEach(LC),this.nodes.forEach(VC),this.nodes.forEach(MC),window.MotionDebug&&window.MotionDebug.record(Pr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new CC)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new bc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Vm(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=PC(h,250),Ws.hasAnimatedSinceResize&&(Ws.hasAnimatedSinceResize=!1,this.nodes.forEach(zm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||zC,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=u.getProps(),w=!this.targetLayout||!Nm(this.targetLayout,p)||f,y=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const T={...Kl(m,"layout"),onPlay:v,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||zm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,pn(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($C),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Rm(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Bm);return}this.isUpdating||this.nodes.forEach(NC),this.isUpdating=!1,this.nodes.forEach(FC),this.nodes.forEach(OC),this.nodes.forEach(AC),this.clearAllSnapshots();const a=Jn.now();Tt.delta=Zn(0,1e3/60,a-Tt.timestamp),Tt.timestamp=a,Tt.isProcessing=!0,Ul.update.process(Tt),Ul.preRender.process(Tt),Ul.render.process(Tt),Tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ml.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(DC),this.sharedNodes.forEach(RC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Dm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||Cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),WC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return lt();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(tr(a.x,l.offset.x),tr(a.y,l.offset.y)),a}removeElementScroll(s){const a=lt();Jt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Jt(a,s);const{scroll:h}=this.root;h&&(tr(a.x,-h.offset.x),tr(a.y,-h.offset.y))}tr(a.x,u.offset.x),tr(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=lt();Jt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ho(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Cr(u.latestValues)&&ho(l,u.latestValues)}return Cr(this.latestValues)&&ho(l,this.latestValues),l}removeTransform(s){const a=lt();Jt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Cr(c.latestValues))continue;Ic(c.latestValues)&&c.updateSnapshot();const u=lt(),d=c.measurePageBox();Jt(u,d),_m(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Cr(this.latestValues)&&_m(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!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(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=Tt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Ci(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Jt(this.target,this.layout.layoutBox),hm(this.target,this.targetDelta)):Jt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Ci(this.relativeTargetOrigin,this.target,f.target),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Pr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ic(this.parent.latestValues)||um(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 s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Tt.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;Jt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;rC(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=lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Im(this.prevProjectionDelta.x,this.projectionDelta.x),Im(this.prevProjectionDelta.y,this.projectionDelta.y)),Ei(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Lm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Lm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Pr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fo(),this.projectionDelta=fo(),this.projectionDeltaWithTransform=fo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=lt(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,v=this.getStack(),g=!v||v.members.length<=1,w=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(BC));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;Wm(d.x,s.x,S),Wm(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ci(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jC(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&xC(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=lt()),Jt(y,this.relativeTarget)),m&&(this.animationValues=u,mC(u,c,this.latestValues,S,w,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(pn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{Ws.hasAnimatedSinceResize=!0,this.currentAnimation=Ac(0,$m,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($m),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&qm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||lt();const d=Gt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const h=Gt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}Jt(a,l),ho(a,u),Ei(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new SC),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Mc("z",s,c,this.animationValues);for(let u=0;u<_c.length;u++)Mc(`rotate${_c[u]}`,s,c,this.animationValues),Mc(`skew${_c[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return kC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ms(s==null?void 0:s.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=Ms(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Cr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=TC(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in Os){if(h[m]===void 0)continue;const{correct:v,applyTo:g}=Os[m],w=c.transform==="none"?h[m]:v(h[m],d);if(g){const y=g.length;for(let T=0;T<y;T++)c[g[T]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=d===this?Ms(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Bm),this.root.sharedNodes.clear()}}}function OC(e){e.updateLayout()}function AC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?Qt(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],f=Gt(h);h.min=r[d].min,h.max=h.min+f}):qm(i,n.layoutBox,r)&&Qt(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],f=Gt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=fo();Ei(a,r,n.layoutBox);const l=fo();s?Ei(l,e.applyTransform(o,!0),n.measuredBox):Ei(l,r,n.layoutBox);const c=!Dm(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=lt();Ci(p,n.layoutBox,h.layoutBox);const m=lt();Ci(m,r,f.layoutBox),Nm(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,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function _C(e){window.MotionDebug&&Pr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function MC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DC(e){e.clearSnapshot()}function Bm(e){e.clearMeasurements()}function NC(e){e.isLayoutDirty=!1}function FC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LC(e){e.resolveTargetDelta()}function VC(e){e.calcProjection()}function $C(e){e.resetSkewAndRotation()}function RC(e){e.removeLeadSnapshot()}function Wm(e,t,n){e.translate=Ye(t.translate,0,n),e.scale=Ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hm(e,t,n,r){e.min=Ye(t.min,n.min,r),e.max=Ye(t.max,n.max,r)}function jC(e,t,n,r){Hm(e.x,t.x,n.x,r),Hm(e.y,t.y,n.y,r)}function BC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zC={duration:.45,ease:[.4,0,.1,1]},Um=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gm=Um("applewebkit/")&&!Um("chrome/")?Math.round:St;function Ym(e){e.min=Gm(e.min),e.max=Gm(e.max)}function WC(e){Ym(e.x),Ym(e.y)}function qm(e,t,n){return e==="position"||e==="preserve-aspect"&&!YE(Fm(t),Fm(n),.2)}const HC=jm({attachResizeListener:(e,t)=>Dn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dc={current:void 0},Km=jm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dc.current){const e=new HC({});e.mount(window),e.setOptions({layoutScroll:!0}),Dc.current=e}return Dc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),UC={pan:{Feature:cC},drag:{Feature:lC,ProjectionNode:Km,MeasureLayout:xm}},Nc={current:null},Zm={current:!1};function GC(){if(Zm.current=!0,!!_l)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Nc.current=e.matches;e.addListener(t),t()}else Nc.current=!1}function YC(e,t,n){for(const r in t){const o=t[r],i=n[r];if(mt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&wc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(mt(i))e.addValue(r,uo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,uo(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ki=new WeakMap,qC=[...rp,At,er],KC=e=>qC.find(np(e)),Xm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ZC=Nl.length;class XC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,f,p,m)=>new this.KeyframeResolver(h,f,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ql,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Me.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;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=!!i,this.isControllingVariants=Is(n),this.isVariantNode=vh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&mt(f)&&f.set(l[h],!1)}}mount(t){this.current=t,ki.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)),Zm.current||GC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Nc.current,process.env.NODE_ENV!=="production"&&wc(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(){ki.delete(this.current),this.projection&&this.projection.unmount(),pn(this.notifyUpdate),pn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Kn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Me.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),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 oo){const n=oo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Xm.length;r++){const o=Xm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=YC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<ZC;r++){const o=Nl[r],i=this.props[o];(di(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uo(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"&&(Xh(o)||Zh(o))?o=parseFloat(o):!KC(o)&&er.test(n)&&(o=hp(t,n)),this.setBaseTarget(t,mt(o)?o.get():o)),mt(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 s=Wl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!mt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new bc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Qm extends XC{constructor(){super(...arguments),this.KeyframeResolver=pp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function QC(e){return window.getComputedStyle(e)}class Jm extends Qm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Mh}readValueFromInstance(t,n){if(Kn.has(n)){const r=rc(n);return r&&r.default||0}else{const r=QC(t),o=(Th(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ym(t,n)}build(t,n,r){$l(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;mt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class eg extends Qm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Kn.has(n)){const r=rc(n);return r&&r.default||0}return n=Dh.has(n)?n:Ps(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fh(t,n,r)}build(t,n,r){jl(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Nh(t,n,r,o)}mount(t){this.isSVGTag=Bl(t.tagName),super.mount(t)}}const JC=(e,t)=>Fl(e)?new eg(t):new Jm(t,{allowProjection:e!==b.Fragment}),eP={...RE,...rT,...UC,...{layout:{ProjectionNode:Km,MeasureLayout:xm}}},Et=dS((e,t)=>HS(e,t,eP,JC));function tg(){const e=b.useRef(!1);return Cs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ng(){const e=tg(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Me.postRender(r),[r]),t]}class tP extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function nP({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(no);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
4
|
+
`+t.prev}function ys(e,t){var n=Sl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Hn(e,o)?t(e[o],e):""}var i=typeof bl=="function"?bl(e):[],s;if(Xr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Hn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Xr&&s["$"+l]instanceof Symbol||($f.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof bl=="function")for(var c=0;c<i.length;c++)Bf.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var Qf=Kr,Qr=ox,Fx=mx,Nx=oi,vs=Qf("%WeakMap%",!0),bs=Qf("%Map%",!0),Lx=Qr("WeakMap.prototype.get",!0),Vx=Qr("WeakMap.prototype.set",!0),$x=Qr("WeakMap.prototype.has",!0),Rx=Qr("Map.prototype.get",!0),jx=Qr("Map.prototype.set",!0),Bx=Qr("Map.prototype.has",!0),Cl=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},zx=function(e,t){var n=Cl(e,t);return n&&n.value},Wx=function(e,t,n){var r=Cl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Hx=function(e,t){return!!Cl(e,t)},Ux=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new Nx("Side channel does not contain "+Fx(i))},get:function(i){if(vs&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Lx(t,i)}else if(bs){if(n)return Rx(n,i)}else if(r)return zx(r,i)},has:function(i){if(vs&&i&&(typeof i=="object"||typeof i=="function")){if(t)return $x(t,i)}else if(bs){if(n)return Bx(n,i)}else if(r)return Hx(r,i);return!1},set:function(i,s){vs&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new vs),Vx(t,i,s)):bs?(n||(n=new bs),jx(n,i,s)):(r||(r={key:{},next:null}),Wx(r,i,s))}};return o},Gx=String.prototype.replace,Yx=/%20/g,Pl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Jf={default:Pl.RFC3986,formatters:{RFC1738:function(e){return Gx.call(e,Yx,"+")},RFC3986:function(e){return String(e)}},RFC1738:Pl.RFC1738,RFC3986:Pl.RFC3986},qx=Jf,kl=Object.prototype.hasOwnProperty,br=Array.isArray,dn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Kx=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(br(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},eh=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},Zx=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!kl.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 br(t)&&!br(n)&&(o=eh(t,r)),br(t)&&br(n)?(n.forEach(function(i,s){if(kl.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return kl.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},Xx=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Qx=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}},Jx=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===qx.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+dn[c];continue}if(c<2048){a=a+(dn[192|c>>6]+dn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(dn[224|c>>12]+dn[128|c>>6&63]+dn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=dn[240|c>>18]+dn[128|c>>12&63]+dn[128|c>>6&63]+dn[128|c&63]}return a},e1=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return Kx(n),t},t1=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},n1=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},r1=function(t,n){return[].concat(t,n)},o1=function(t,n){if(br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},th={arrayToObject:eh,assign:Xx,combine:r1,compact:e1,decode:Qx,encode:Jx,isBuffer:n1,isRegExp:t1,maybeMap:o1,merge:Zx},i1=th,nh=Jf,s1=Date.prototype.toISOString,rh=nh.default;i1.encode,nh.formatters[rh];var a1=th;a1.decode;var oh=e=>Array.isArray(e),Il=e=>e===void 0,Ol=e=>e===null,l1=Function.bind.call(Function.call,Object.prototype.toString),c1=e=>!!e&&l1(e)==="[object Error]"||e instanceof Error,ih=(e,t)=>e instanceof t,u1=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},d1=e=>Object.prototype.toString.call(e)==="[object Date]"&&ih(e,Date),fn={array:oh,date:d1,empty:e=>Ol(e)||Il(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:c1,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Ol(e)||Il(e),null:Ol,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!oh(e)&&typeof e=="object",primitive:u1,string:e=>typeof e=="string",undefined:Il},Al=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const i=`${+o[0]}`===o[0];e[r]=i?[]:{}}if(typeof e[r]!="object"){const i=`${+o[0]}`===o[0];e[r]=Al(i?[]:{},o,n)}else e[r]=Al(e[r],o,n)}else e[r]=n;return e},f1=e=>Object.keys(e),h1=e=>e.replace("[",".").replace("]","").split("."),sh=(e,t,n)=>{const r=Array.isArray(t)?t:h1(t),o=structuredClone(e);return Al(o,r,n),o};const _l="-";function p1(e){const t=g1(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(_l);return a[0]===""&&a.length!==1&&a.shift(),ah(a,t)||m1(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function ah(e,t){var s;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 i=e.join(_l);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const lh=/^\[(.+)\]$/;function m1(e){if(lh.test(e)){const t=lh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function g1(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return v1(Object.entries(e.classGroups),n).forEach(([i,s])=>{Ml(s,r,i,t)}),r}function Ml(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:ch(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(y1(o)){Ml(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Ml(s,ch(t,i),n,r)})})}function ch(e,t){let n=e;return t.split(_l).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function y1(e){return e.isThemeGetter}function v1(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function b1(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const uh="!";function w1(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let y=a[v];if(c===0){if(y===o&&(r||a.slice(v,v+i)===t)){l.push(a.slice(u,v)),u=v+i;continue}if(y==="/"){d=v;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(uh),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function x1(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 S1(e){return{cache:b1(e.cacheSize),parseClassName:w1(e),...p1(e)}}const T1=/\s+/;function E1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(T1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let d=!!u,h=r(d?c.substring(0,u):c);if(!h){if(!d)return{isTailwindClass:!1,originalClassName:s};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:s};d=!1}const f=x1(a).join(":");return{isTailwindClass:!0,modifierId:l?f+uh:f,classGroupId:h,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function C1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=dh(t))&&(r&&(r+=" "),r+=n);return r}function dh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=dh(e[r]))&&(n&&(n+=" "),n+=t);return n}function P1(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=S1(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=E1(l,n);return o(l,u),u}return function(){return i(C1.apply(null,arguments))}}function Ge(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const fh=/^\[(?:([a-z-]+):)?(.+)\]$/i,k1=/^\d+\/\d+$/,I1=new Set(["px","full","screen"]),O1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A1=/\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$/,_1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,M1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,D1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Mn(e){return wr(e)||I1.has(e)||k1.test(e)}function Gn(e){return Jr(e,"length",B1)}function wr(e){return!!e&&!Number.isNaN(Number(e))}function ws(e){return Jr(e,"number",wr)}function ci(e){return!!e&&Number.isInteger(Number(e))}function F1(e){return e.endsWith("%")&&wr(e.slice(0,-1))}function ve(e){return fh.test(e)}function Yn(e){return O1.test(e)}const N1=new Set(["length","size","percentage"]);function L1(e){return Jr(e,N1,hh)}function V1(e){return Jr(e,"position",hh)}const $1=new Set(["image","url"]);function R1(e){return Jr(e,$1,W1)}function j1(e){return Jr(e,"",z1)}function ui(){return!0}function Jr(e,t,n){const r=fh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function B1(e){return A1.test(e)&&!_1.test(e)}function hh(){return!1}function z1(e){return M1.test(e)}function W1(e){return D1.test(e)}function H1(){const e=Ge("colors"),t=Ge("spacing"),n=Ge("blur"),r=Ge("brightness"),o=Ge("borderColor"),i=Ge("borderRadius"),s=Ge("borderSpacing"),a=Ge("borderWidth"),l=Ge("contrast"),c=Ge("grayscale"),u=Ge("hueRotate"),d=Ge("invert"),h=Ge("gap"),f=Ge("gradientColorStops"),p=Ge("gradientColorStopPositions"),m=Ge("inset"),v=Ge("margin"),y=Ge("opacity"),w=Ge("padding"),g=Ge("saturate"),T=Ge("scale"),S=Ge("sepia"),E=Ge("skew"),I=Ge("space"),P=Ge("translate"),O=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ve,t],D=()=>[ve,t],V=()=>["",Mn,Gn],k=()=>["auto",wr,ve],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ve],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[wr,ws],Z=()=>[wr,ve];return{cacheSize:500,separator:":",theme:{colors:[ui],spacing:[Mn,Gn],blur:["none","",Yn,ve],brightness:j(),borderColor:[e],borderRadius:["none","","full",Yn,ve],borderSpacing:D(),borderWidth:V(),contrast:j(),grayscale:U(),hueRotate:Z(),invert:U(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[F1,Gn],inset:L(),margin:L(),opacity:j(),padding:D(),saturate:j(),scale:j(),sepia:U(),skew:Z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Yn]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:[..._(),ve]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ci,ve]}],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",ve]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",ci,ve]}],"grid-cols":[{"grid-cols":[ui]}],"col-start-end":[{col:["auto",{span:["full",ci,ve]},ve]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[ui]}],"row-start-end":[{row:["auto",{span:[ci,ve]},ve]}],"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",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Yn]},Yn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Yn,Gn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ws]}],"font-family":[{font:[ui]}],"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",ve]}],"line-clamp":[{"line-clamp":["none",wr,ws]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mn,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mn,Gn]}],"underline-offset":[{"underline-offset":["auto",Mn,ve]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],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",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),V1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",L1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},R1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Mn,ve]}],"outline-w":[{outline:[Mn,Gn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Mn,Gn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Yn,j1]}],"shadow-color":[{shadow:[ui]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Yn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],"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":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ci,ve]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",ve]}],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",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mn,Gn,ws]}],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 U1=P1(H1),Dl=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},G1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Y1=e=>fn.function(e),$e=(...e)=>U1(sw(e)),Fl=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},xs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},eo=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),q1=ri("inline-flex duration-500 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 border-2 border-transparent 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 p-2 text-sm",min:"h-7 px-2 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 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"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),to=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(eo,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:$e(q1({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),K1=ri("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"}}}),Z1=ri("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"}}),X1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return x.jsxs(eo,{...a,ref:l,"data-theme":i,as:a.as??"span",className:$e(Z1({size:s,theme:i}),t),children:[n?x.jsx("span",{className:K1({theme:n})}):null,r,a.children]})}),no=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ss=b.createContext({}),Ts=b.createContext(null),Nl=typeof document<"u",Es=Nl?b.useLayoutEffect:b.useEffect,ph=b.createContext({strict:!1}),Cs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),mh="data-"+Cs("framerAppearId"),Q1={skipAnimations:!1,useManualTiming:!1};function J1(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,u=!1,d=!1)=>{const f=d&&r?t:n;return u&&i.add(c),f.has(c)||f.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const Ps=["read","resolveKeyframes","update","preRender","render","postRender"],eS=40;function gh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ps.reduce((y,w)=>(y[w]=J1(i),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,f=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,eS),1),o.timestamp=y,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},p=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:Ps.reduce((y,w)=>{const g=s[w];return y[w]=(T,S=!1,E=!1)=>(n||p(),g.schedule(T,S,E)),y},{}),cancel:y=>{for(let w=0;w<Ps.length;w++)s[Ps[w]].cancel(y)},state:o,steps:s}}const{schedule:Ll,cancel:_V}=gh(queueMicrotask,!1);function ro(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const yh=b.createContext({});let vh=!1;function tS(e,t,n,r,o){const{visualElement:i}=b.useContext(Ss),s=b.useContext(ph),a=b.useContext(Ts),l=b.useContext(no).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(yh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&rS(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const h=b.useRef(!!(n[mh]&&!window.HandoffComplete));return Es(()=>{u&&(u.updateFeatures(),Ll.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,vh||(vh=!0,queueMicrotask(nS))))}),u}function nS(){window.HandoffComplete=!0}function rS(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bh(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&ro(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function bh(e){if(e)return e.options.allowProjection!==!1?e.projection:bh(e.parent)}function oS(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ro(n)&&(n.current=r))},[t])}function di(e){return typeof e=="string"||Array.isArray(e)}function fi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Vl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$l=["initial",...Vl];function ks(e){return fi(e.animate)||$l.some(t=>di(e[t]))}function wh(e){return!!(ks(e)||e.variants)}function iS(e,t){if(ks(e)){const{initial:n,animate:r}=e;return{initial:n===!1||di(n)?n:void 0,animate:di(r)?r:void 0}}return e.inherit!==!1?t:{}}function sS(e){const{initial:t,animate:n}=iS(e,b.useContext(Ss));return b.useMemo(()=>({initial:t,animate:n}),[xh(t),xh(n)])}function xh(e){return Array.isArray(e)?e.join(" "):e}const Sh={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"]},oo={};for(const e in Sh)oo[e]={isEnabled:t=>Sh[e].some(n=>!!t[n])};function aS(e){for(const t in e)oo[t]={...oo[t],...e[t]}}const hi=b.createContext({}),lS=Symbol.for("motionComponentSymbol"),Tt=e=>e;let io=Tt,Ut=Tt;process.env.NODE_ENV!=="production"&&(io=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ut=(e,t)=>{if(!e)throw new Error(t)});function cS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&aS(e);function i(a,l){let c;const u={...b.useContext(no),...a,layoutId:uS(a)},{isStatic:d}=u,h=sS(a),f=r(a,d);if(!d&&Nl){dS(u,e);const p=fS(u);c=p.MeasureLayout,h.visualElement=tS(o,f,u,t,p.ProjectionNode)}return x.jsxs(Ss.Provider,{value:h,children:[c&&h.visualElement?x.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,oS(f,h.visualElement,l),f,d,h.visualElement)]})}const s=b.forwardRef(i);return s[lS]=o,s}function uS({layoutId:e}){const t=b.useContext(hi).id;return t&&e!==void 0?t+"-"+e:e}function dS(e,t){const n=b.useContext(ph).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?io(!1,r):Ut(!1,r)}}function fS(e){const{drag:t,layout:n}=oo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function hS(e){function t(r,o={}){return cS(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const pS=["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 Rl(e){return typeof e!="string"||e.includes("-")?!1:!!(pS.indexOf(e)>-1||/[A-Z]/u.test(e))}const Is={};function mS(e){Object.assign(Is,e)}const pi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qn=new Set(pi);function Th(e,{layout:t,layoutId:n}){return qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Is[e]||e==="opacity")}const gt=e=>!!(e&&e.getVelocity),gS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yS=pi.length;function vS(e,t,n){let r="";for(let o=0;o<yS;o++){const i=pi[o];if(e[i]!==void 0){const s=gS[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Eh=e=>t=>typeof t=="string"&&t.startsWith(e),Ch=Eh("--"),bS=Eh("var(--"),jl=e=>bS(e)?wS.test(e.split("/*")[0].trim()):!1,wS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Kn=(e,t,n)=>n>t?t:n<e?e:n,so={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mi={...so,transform:e=>Kn(0,1,e)},Os={...so,default:1},gi=e=>Math.round(e*1e5)/1e5,Bl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,SS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,TS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function yi(e){return typeof e=="string"}function ES(e){return e==null}const vi=e=>({test:t=>yi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zn=vi("deg"),hn=vi("%"),fe=vi("px"),CS=vi("vh"),PS=vi("vw"),Ph={...hn,parse:e=>hn.parse(e)/100,transform:e=>hn.transform(e*100)},kh={...so,transform:Math.round},Ih={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:Zn,rotateX:Zn,rotateY:Zn,rotateZ:Zn,scale:Os,scaleX:Os,scaleY:Os,scaleZ:Os,skew:Zn,skewX:Zn,skewY:Zn,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:mi,originX:Ph,originY:Ph,originZ:fe,zIndex:kh,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:mi,strokeOpacity:mi,numOctaves:kh};function zl(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(Ch(u)){o[u]=d;continue}const h=Ih[u],f=xS(d,h);if(qn.has(u)){if(a=!0,i[u]=f,!c)continue;d!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=f):r[u]=f}if(t.transform||(a||n?r.transform=vS(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${d} ${h}`}}const Wl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Oh(e,t,n){for(const r in t)!gt(t[r])&&!Th(r,n)&&(e[r]=t[r])}function kS({transformTemplate:e},t){return b.useMemo(()=>{const n=Wl();return zl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function IS(e,t){const n=e.style||{},r={};return Oh(r,n,e),Object.assign(r,kS(e,t)),r}function OS(e,t){const n={},r=IS(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 AS=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 As(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||AS.has(e)}let Ah=e=>!As(e);function _h(e){e&&(Ah=t=>t.startsWith("on")?!As(t):e(t))}try{_h(require("@emotion/is-prop-valid").default)}catch{}function _S(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ah(o)||n===!0&&As(o)||!t&&!As(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Mh(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function MS(e,t,n){const r=Mh(t,e.x,e.width),o=Mh(n,e.y,e.height);return`${r} ${o}`}const DS={offset:"stroke-dashoffset",array:"stroke-dasharray"},FS={offset:"strokeDashoffset",array:"strokeDasharray"};function NS(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?DS:FS;e[i.offset]=fe.transform(-r);const s=fe.transform(t),a=fe.transform(n);e[i.array]=`${s} ${a}`}function Hl(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(zl(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f,dimensions:p}=e;h.transform&&(p&&(f.transform=h.transform),delete h.transform),p&&(o!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=MS(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&NS(h,s,a,l,!1)}const Dh=()=>({...Wl(),attrs:{}}),Ul=e=>typeof e=="string"&&e.toLowerCase()==="svg";function LS(e,t,n,r){const o=b.useMemo(()=>{const i=Dh();return Hl(i,t,Ul(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Oh(i,e.style,e),o.style={...i,...o.style}}return o}function VS(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Rl(n)?LS:OS)(r,i,s,n),c=_S(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,h=b.useMemo(()=>gt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:h})}}function Fh(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Nh=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 Lh(e,t,n,r){Fh(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Nh.has(o)?o:Cs(o),t.attrs[o])}function Gl(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(gt(o[s])||t.style&>(t.style[s])||Th(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Vh(e,t,n){const r=Gl(e,t,n);for(const o in e)if(gt(e[o])||gt(t[o])){const i=pi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function $h(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Yl(e,t,n,r){if(typeof t=="function"){const[o,i]=$h(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=$h(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function pn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const ql=e=>Array.isArray(e),$S=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),RS=e=>ql(e)?e[e.length-1]||0:e;function _s(e){const t=gt(e)?e.get():e;return $S(t)?t.toValue():t}const Rh=new Set(["opacity","clipPath","filter","transform"]);function jh(e){if(qn.has(e))return"transform";if(Rh.has(e))return Cs(e)}function Ms(e,t){e.indexOf(t)===-1&&e.push(t)}function bi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function jS([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}function BS({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:WS(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Bh=e=>(t,n)=>{const r=b.useContext(Ss),o=b.useContext(Ts),i=()=>BS(e,t,r,o,n);return n?i():pn(i)};function zS(e,t){const n=jh(t);n&&Ms(e,n)}function zh(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=Yl(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function WS(e,t,n,r,o){var i;const s={},a=[],l=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(e,{});for(const v in c)s[v]=_s(c[v]);let{initial:u,animate:d}=e;const h=ks(e),f=wh(e);t&&f&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!fi(m)&&zh(e,m,(v,y)=>{for(const w in v){let g=v[w];if(Array.isArray(g)){const T=p?g.length-1:0;g=g[T]}g!==null&&(s[w]=g)}for(const w in y)s[w]=y[w]}),l&&(d&&u!==!1&&!fi(d)&&zh(e,d,v=>{for(const y in v)zS(a,y)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Me,cancel:mn,state:Et,steps:Kl}=gh(typeof requestAnimationFrame<"u"?requestAnimationFrame:Tt,!0),HS={useVisualState:Bh({scrapeMotionValuesFromProps:Vh,createRenderState:Dh,onMount:(e,t,{renderState:n,latestValues:r})=>{Me.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Me.render(()=>{Hl(n,r,Ul(t.tagName),e.transformTemplate),Lh(t,n)})}})},US={useVisualState:Bh({applyWillChange:!0,scrapeMotionValuesFromProps:Gl,createRenderState:Wl})};function GS(e,{forwardMotionProps:t=!1},n,r){return{...Rl(e)?HS:US,preloadedFeatures:n,useRender:VS(t),createVisualElement:r,Component:e}}function Dn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Wh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ds(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const YS=e=>t=>Wh(t)&&e(t,Ds(t));function Fn(e,t,n,r){return Dn(e,t,YS(n),r)}const qS=(e,t)=>n=>t(e(n)),Nn=(...e)=>e.reduce(qS);function Hh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Uh=Hh("dragHorizontal"),Gh=Hh("dragVertical");function Yh(e){let t=!1;if(e==="y")t=Gh();else if(e==="x")t=Uh();else{const n=Uh(),r=Gh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function qh(){const e=Yh(!0);return e?(e(),!1):!0}class Xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Kh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||qh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Me.postRender(()=>l(i,s))};return Fn(e.current,n,o,{passive:!e.getProps()[r]})}class KS extends Xn{mount(){this.unmount=Nn(Kh(this.node,!0),Kh(this.node,!1))}unmount(){}}class ZS extends Xn{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=Nn(Dn(this.node.current,"focus",()=>this.onFocus()),Dn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Zh=(e,t)=>t?e===t?!0:Zh(e,t.parentElement):!1;function Zl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ds(n))}class XS extends Xn{constructor(){super(...arguments),this.removeStartListeners=Tt,this.removeEndListeners=Tt,this.removeAccessibleListeners=Tt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=Fn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),h=!d&&!Zh(this.node.current,a.target)?u:c;h&&Me.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=Fn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Nn(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Zl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Me.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Dn(this.node.current,"keyup",s),Zl("down",(a,l)=>{this.startPress(a,l)})},n=Dn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Zl("cancel",(i,s)=>this.cancelPress(i,s))},o=Dn(this.node.current,"blur",r);this.removeAccessibleListeners=Nn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Me.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!qh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Me.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Fn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Dn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Nn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Xl=new WeakMap,Ql=new WeakMap,QS=e=>{const t=Xl.get(e.target);t&&t(e)},JS=e=>{e.forEach(QS)};function eT({root:e,...t}){const n=e||document;Ql.has(n)||Ql.set(n,{});const r=Ql.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(JS,{root:e,...t})),r[o]}function tT(e,t,n){const r=eT(t);return Xl.set(e,n),r.observe(e),()=>{Xl.delete(e),r.unobserve(e)}}const nT={some:0,all:1};class rT extends Xn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:nT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return tT(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(oT(t,n))&&this.startObserver()}unmount(){}}function oT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const iT={inView:{Feature:rT},tap:{Feature:XS},focus:{Feature:ZS},hover:{Feature:KS}};function Xh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Fs(e,t,n){const r=e.getProps();return Yl(r,t,n!==void 0?n:r.custom,e)}const gn=e=>e*1e3,yn=e=>e/1e3,sT={type:"spring",stiffness:500,damping:25,restSpeed:10},aT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lT={type:"keyframes",duration:.8},cT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uT=(e,{keyframes:t})=>t.length>2?lT:qn.has(e)?e.startsWith("scale")?aT(t[1]):sT:cT;function dT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Jl(e,t){return e[t]||e.default||e}const fT=e=>e!==null;function Ns(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(fT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Ls;function hT(){Ls=void 0}const Qn={now:()=>(Ls===void 0&&Qn.set(Et.isProcessing||Q1.useManualTiming?Et.timestamp:performance.now()),Ls),set:e=>{Ls=e,queueMicrotask(hT)}},Qh=e=>/^0[^.\s]+$/u.test(e);function pT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Qh(e):!0}const Jh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),mT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gT(e){const t=mT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const yT=4;function ep(e,t,n=1){Ut(n<=yT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=gT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Jh(s)?parseFloat(s):s}return jl(o)?ep(o,t,n+1):o}const vT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),tp=e=>e===so||e===fe,np=(e,t)=>parseFloat(e.split(", ")[t]),rp=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return np(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?np(i[1],e):0}},bT=new Set(["x","y","z"]),wT=pi.filter(e=>!bT.has(e));function xT(e){const t=[];return wT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ao={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:rp(4,13),y:rp(5,14)};ao.translateX=ao.x,ao.translateY=ao.y;const op=e=>t=>t.test(e),ip=[so,fe,hn,Zn,PS,CS,{test:e=>e==="auto",parse:e=>e}],sp=e=>ip.find(op(e)),xr=new Set;let ec=!1,tc=!1;function ap(){if(tc){const e=Array.from(xr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=xT(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}tc=!1,ec=!1,xr.forEach(e=>e.complete()),xr.clear()}function lp(){xr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tc=!0)})}function ST(){lp(),ap()}class nc{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(xr.add(this),ec||(ec=!0,Me.read(lp),Me.resolveKeyframes(ap))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),xr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,xr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const rc=(e,t)=>n=>!!(yi(n)&&TS.test(n)&&n.startsWith(e)||t&&!ES(n)&&Object.prototype.hasOwnProperty.call(n,t)),cp=(e,t,n)=>r=>{if(!yi(r))return r;const[o,i,s,a]=r.match(Bl);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},TT=e=>Kn(0,255,e),oc={...so,transform:e=>Math.round(TT(e))},Sr={test:rc("rgb","red"),parse:cp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+oc.transform(e)+", "+oc.transform(t)+", "+oc.transform(n)+", "+gi(mi.transform(r))+")"};function ET(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 ic={test:rc("#"),parse:ET,transform:Sr.transform},lo={test:rc("hsl","hue"),parse:cp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+hn.transform(gi(t))+", "+hn.transform(gi(n))+", "+gi(mi.transform(r))+")"},At={test:e=>Sr.test(e)||ic.test(e)||lo.test(e),parse:e=>Sr.test(e)?Sr.parse(e):lo.test(e)?lo.parse(e):ic.parse(e),transform:e=>yi(e)?e:e.hasOwnProperty("red")?Sr.transform(e):lo.transform(e)};function CT(e){var t,n;return isNaN(e)&&yi(e)&&(((t=e.match(Bl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(SS))===null||n===void 0?void 0:n.length)||0)>0}const up="number",dp="color",PT="var",kT="var(",fp="${}",IT=/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 wi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(IT,l=>(At.test(l)?(r.color.push(i),o.push(dp),n.push(At.parse(l))):l.startsWith(kT)?(r.var.push(i),o.push(PT),n.push(l)):(r.number.push(i),o.push(up),n.push(parseFloat(l))),++i,fp)).split(fp);return{values:n,split:a,indexes:r,types:o}}function hp(e){return wi(e).values}function pp(e){const{split:t,types:n}=wi(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===up?i+=gi(o[s]):a===dp?i+=At.transform(o[s]):i+=o[s]}return i}}const OT=e=>typeof e=="number"?0:e;function AT(e){const t=hp(e);return pp(e)(t.map(OT))}const Jn={test:CT,parse:hp,createTransformer:pp,getAnimatableNone:AT},_T=new Set(["brightness","contrast","saturate","opacity"]);function MT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Bl)||[];if(!r)return e;const o=n.replace(r,"");let i=_T.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const DT=/\b([a-z-]*)\(.*?\)/gu,sc={...Jn,getAnimatableNone:e=>{const t=e.match(DT);return t?t.map(MT).join(" "):e}},FT={...Ih,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:sc,WebkitFilter:sc},ac=e=>FT[e];function mp(e,t){let n=ac(e);return n!==sc&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const NT=new Set(["auto","none","0"]);function LT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!NT.has(i)&&wi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=mp(n,o)}class gp extends nc{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),jl(c))){const u=ep(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!vT.has(r)||t.length!==2)return;const[o,i]=t,s=sp(o),a=sp(i);if(s!==a)if(tp(s)&&tp(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)pT(t[o])&&r.push(o);r.length&<(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ao[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=ao[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function yp(e){let t;return()=>(t===void 0&&(t=e()),t)}const vp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jn.test(e)||e==="0")&&!e.startsWith("url("));function VT(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 $T(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=vp(o,t),a=vp(i,t);return io(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:VT(e)||n==="spring"&&r}class bp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ST(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!$T(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ns(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function wp(e,t){return t?e*(1e3/t):0}const RT=5;function xp(e,t,n){const r=Math.max(t-RT,0);return wp(n-e(r),t-r)}const lc=.001,jT=.01,Sp=10,BT=.05,zT=1;function WT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;io(e<=gn(Sp),"Spring duration must be 10 seconds or less");let s=1-t;s=Kn(BT,zT,s),e=Kn(jT,Sp,yn(e)),s<1?(o=c=>{const u=c*s,d=u*e,h=u-n,f=cc(c,s),p=Math.exp(-d);return lc-h/f*p},i=c=>{const d=c*s*e,h=d*n+n,f=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=cc(Math.pow(c,2),s);return(-o(c)+lc>0?-1:1)*((h-f)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-lc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=UT(o,i,a);if(e=gn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const HT=12;function UT(e,t,n){let r=n;for(let o=1;o<HT;o++)r=r-e(r)/t(r);return r}function cc(e,t){return e*Math.sqrt(1-t*t)}const GT=["duration","bounce"],YT=["stiffness","damping","mass"];function Tp(e,t){return t.some(n=>e[n]!==void 0)}function qT(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Tp(e,YT)&&Tp(e,GT)){const n=WT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function uc({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=qT({...r,velocity:-yn(r.velocity||0)}),f=d||0,p=l/(2*Math.sqrt(a*c)),m=i-o,v=yn(Math.sqrt(a/c)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let w;if(p<1){const g=cc(v,p);w=T=>{const S=Math.exp(-p*v*T);return i-S*((f+p*v*m)/g*Math.sin(g*T)+m*Math.cos(g*T))}}else if(p===1)w=g=>i-Math.exp(-v*g)*(m+(f+v*m)*g);else{const g=v*Math.sqrt(p*p-1);w=T=>{const S=Math.exp(-p*v*T),E=Math.min(g*T,300);return i-S*((f+p*v*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:h&&u||null,next:g=>{const T=w(g);if(h)s.done=g>=u;else{let S=f;g!==0&&(p<1?S=xp(w,g,T):S=0);const E=Math.abs(S)<=n,I=Math.abs(i-T)<=t;s.done=E&&I}return s.value=s.done?i:T,s}}}function Ep({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},f=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let m=n*t;const v=d+m,y=s===void 0?v:s(v);y!==v&&(m=y-d);const w=P=>-m*Math.exp(-P/r),g=P=>y+w(P),T=P=>{const O=w(P),C=g(P);h.done=Math.abs(O)<=c,h.value=h.done?y:C};let S,E;const I=P=>{f(h.value)&&(S=P,E=uc({keyframes:[h.value,p(h.value)],velocity:xp(g,P,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return I(0),{calculatedDuration:null,next:P=>{let O=!1;return!E&&S===void 0&&(O=!0,T(P),I(P)),S!==void 0&&P>=S?E.next(P-S):(!O&&T(P),h)}}}const Cp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,KT=1e-7,ZT=12;function XT(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Cp(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>KT&&++a<ZT);return s}function xi(e,t,n,r){if(e===t&&n===r)return Tt;const o=i=>XT(i,0,1,e,n);return i=>i===0||i===1?i:Cp(o(i),t,r)}const QT=xi(.42,0,1,1),JT=xi(0,0,.58,1),Pp=xi(.42,0,.58,1),kp=e=>Array.isArray(e)&&typeof e[0]!="number",Ip=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Op=e=>t=>1-e(1-t),dc=e=>1-Math.sin(Math.acos(e)),Ap=Op(dc),eE=Ip(dc),_p=xi(.33,1.53,.69,.99),fc=Op(_p),tE=Ip(fc),Mp={linear:Tt,easeIn:QT,easeInOut:Pp,easeOut:JT,circIn:dc,circInOut:eE,circOut:Ap,backIn:fc,backInOut:tE,backOut:_p,anticipate:e=>(e*=2)<1?.5*fc(e):.5*(2-Math.pow(2,-10*(e-1)))},hc=e=>{if(Array.isArray(e)){Ut(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return xi(t,n,r,o)}else if(typeof e=="string")return Ut(Mp[e]!==void 0,`Invalid easing type '${e}'`),Mp[e];return e},co=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ye=(e,t,n)=>e+(t-e)*n;function pc(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 nE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=pc(l,a,e+1/3),i=pc(l,a,e),s=pc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Vs(e,t){return n=>n>0?t:e}const mc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},rE=[ic,Sr,lo],oE=e=>rE.find(t=>t.test(e));function Dp(e){const t=oE(e);if(io(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===lo&&(n=nE(n)),n}const Fp=(e,t)=>{const n=Dp(e),r=Dp(t);if(!n||!r)return Vs(e,t);const o={...n};return i=>(o.red=mc(n.red,r.red,i),o.green=mc(n.green,r.green,i),o.blue=mc(n.blue,r.blue,i),o.alpha=Ye(n.alpha,r.alpha,i),Sr.transform(o))},gc=new Set(["none","hidden"]);function iE(e,t){return gc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sE(e,t){return n=>Ye(e,t,n)}function yc(e){return typeof e=="number"?sE:typeof e=="string"?jl(e)?Vs:At.test(e)?Fp:cE:Array.isArray(e)?Np:typeof e=="object"?At.test(e)?Fp:aE:Vs}function Np(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>yc(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function aE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=yc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function lE(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const cE=(e,t)=>{const n=Jn.createTransformer(t),r=wi(e),o=wi(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?gc.has(e)&&!o.values.length||gc.has(t)&&!r.values.length?iE(e,t):Nn(Np(lE(r,o),o.values),n):(io(!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.`),Vs(e,t))};function Lp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ye(e,t,n):yc(e)(e,t)}function uE(e,t,n){const r=[],o=n||Lp,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Tt:t;a=Nn(l,a)}r.push(a)}return r}function Vp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ut(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=uE(t,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=co(e[u],e[u+1],c);return s[u](d)};return n?c=>l(Kn(e[0],e[i-1],c)):l}function $p(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=co(0,t,r);e.push(Ye(n,1,o))}}function Rp(e){const t=[0];return $p(t,e.length-1),t}function dE(e,t){return e.map(n=>n*t)}function fE(e,t){return e.map(()=>t||Pp).splice(0,e.length-1)}function $s({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=kp(r)?r.map(hc):hc(r),i={done:!1,value:t[0]},s=dE(n&&n.length===t.length?n:Rp(t),e),a=Vp(s,t,{ease:Array.isArray(o)?o:fE(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const vc=2e4;function jp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<vc;)t+=n,r=e.next(t);return t>=vc?1/0:t}const hE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Me.update(t,!0),stop:()=>mn(t),now:()=>Et.isProcessing?Et.timestamp:Qn.now()}},pE={decay:Ep,inertia:Ep,tween:$s,keyframes:$s,spring:uc},mE=e=>e/100;class bc extends bp{constructor({KeyframeResolver:t=nc,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new t(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=pE[n]||$s;let l,c;a!==$s&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ut(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Nn(mE,Lp(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=jp(u));const{calculatedDuration:d}=u,h=d+o,f=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:f,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),w=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=i;if(f){const P=Math.min(this.currentTime,u)/d;let O=Math.floor(P),C=P%1;!C&&P>=1&&(C=1),C===1&&O--,O=Math.min(O,f+1),!!(O%2)&&(p==="reverse"?(C=1-C,m&&(C-=m/d)):p==="mirror"&&(T=s)),g=Kn(0,1,C)*d}const S=w?{done:!1,value:l[0]}:T.next(g);a&&(S.value=a(S.value));let{done:E}=S;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return I&&o!==void 0&&(S.value=Ns(l,this.options,o)),v&&v(S.value),I&&this.finish(),S}get duration(){const{resolved:t}=this;return t?yn(t.calculatedDuration):0}get time(){return yn(this.currentTime)}set time(t){t=gn(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=yn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=hE,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Bp=e=>Array.isArray(e)&&typeof e[0]=="number";function zp(e){return!!(!e||typeof e=="string"&&e in wc||Bp(e)||Array.isArray(e)&&e.every(zp))}const Si=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Si([0,.65,.55,1]),circOut:Si([.55,0,1,.45]),backIn:Si([.31,.01,.66,-.59]),backOut:Si([.33,1.53,.69,.99])};function gE(e){return Wp(e)||wc.easeOut}function Wp(e){if(e)return Bp(e)?Si(e):Array.isArray(e)?e.map(gE):wc[e]}function yE(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Wp(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const vE=yp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Rs=10,bE=2e4;function wE(e){return e.type==="spring"||!zp(e.ease)}function xE(e,t){const n=new bc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<bE;)r=n.sample(i),o.push(r.value),i+=Rs;return{times:void 0,keyframes:o,duration:i-Rs,ease:"linear"}}class Hp extends bp{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new gp(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(wE(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,...p}=this.options,m=xE(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=yE(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=Qn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ns(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return yn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return yn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=gn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Tt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return Tt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...h}=this.options,f=new bc({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=gn(this.time);c.setWithVelocity(f.sample(p-Rs).value,f.sample(p).value,Rs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return vE()&&r&&Rh.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function SE(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Me.update(r,!0),()=>mn(r)}const TE=yp(()=>window.ScrollTimeline!==void 0);class xc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(TE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),SE(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Sc=(e,t,n,r={},o,i,s)=>a=>{const l=Jl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-gn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};dT(l)||(d={...d,...uT(e,d)}),d.duration&&(d.duration=gn(d.duration)),d.repeatDelay&&(d.repeatDelay=gn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),h&&!i&&t.get()!==void 0){const f=Ns(d.keyframes,l);if(f!==void 0)return Me.update(()=>{d.onUpdate(f),d.onComplete()}),new xc([])}return!i&&Hp.supports(d)?new Hp(d):new bc(d)};class Tc{constructor(){this.subscriptions=[]}add(t){return Ms(this.subscriptions,t),()=>bi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Up=new Set;function Ec(e,t,n){e||Up.has(t)||(console.warn(t),Up.add(t))}const Gp=30,EE=e=>!isNaN(parseFloat(e)),Ti={current:void 0};class Yp{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Qn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=EE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ec(!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 Tc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.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 Ti.current&&Ti.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Gp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Gp);return wp(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 uo(e,t){return new Yp(e,t)}function CE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function PE(e,t){const n=Fs(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=RS(i[s]);CE(e,s,a)}}function qp(e){return e.getProps()[mh]}class kE extends Yp{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=jh(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(bi(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function IE(e){return!!(gt(e)&&e.add)}function Cc(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new kE("auto"),e.addValue("willChange",r)),IE(r))return r.add(t)}function OE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Pc(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const h=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),f=l[d];if(f===void 0||u&&OE(u,d))continue;const p={delay:n,elapsed:0,...Jl(s||{},d)};let m=!1;if(window.HandoffAppearAnimations){const y=qp(e);if(y){const w=window.HandoffAppearAnimations(y,d,h,Me);w!==null&&(p.elapsed=w,m=!0)}}h.start(Sc(d,h,f,e.shouldReduceMotion&&qn.has(d)?{type:!1}:p,e,m,Cc(e,d)));const v=h.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Me.update(()=>{a&&PE(e,a)})}),c}function kc(e,t,n={}){var r;const o=Fs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Pc(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return AE(e,t,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function AE(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(_E).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(kc(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function _E(e,t){return e.sortNodePosition(t)}function ME(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>kc(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=kc(e,t,n);else{const o=typeof t=="function"?Fs(e,t,n.custom):t;r=Promise.all(Pc(e,o,n))}return r.then(()=>{Me.postRender(()=>{e.notify("AnimationComplete",t)})})}const DE=[...Vl].reverse(),FE=Vl.length;function NE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>ME(e,n,r)))}function LE(e){let t=NE(e),n=Kp(),r=!0;const o=l=>(c,u)=>{var d;const h=Fs(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],h=new Set;let f={},p=1/0;for(let v=0;v<FE;v++){const y=DE[v],w=n[y],g=c[y]!==void 0?c[y]:u[y],T=di(g),S=y===l?w.isActive:null;S===!1&&(p=v);let E=g===u[y]&&g!==c[y]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...f},!w.isActive&&S===null||!g&&!w.prevProp||fi(g)||typeof g=="boolean")continue;let P=VE(w.prevProp,g)||y===l&&w.isActive&&!E&&T||v>p&&T,O=!1;const C=Array.isArray(g)?g:[g];let L=C.reduce(o(y),{});S===!1&&(L={});const{prevResolvedValues:D={}}=w,V={...D,...L},k=_=>{P=!0,h.has(_)&&(O=!0,h.delete(_)),w.needsAnimating[_]=!0;const F=e.getValue(_);F&&(F.liveStyle=!1)};for(const _ in V){const F=L[_],$=D[_];if(f.hasOwnProperty(_))continue;let H=!1;ql(F)&&ql($)?H=!Xh(F,$):H=F!==$,H?F!=null?k(_):h.add(_):F!==void 0&&h.has(_)?k(_):w.protectedKeys[_]=!0}w.prevProp=g,w.prevResolvedValues=L,w.isActive&&(f={...f,...L}),r&&e.blockInitialAnimation&&(P=!1),P&&(!E||O)&&d.push(...C.map(_=>({animation:_,options:{type:y}})))}if(h.size){const v={};h.forEach(y=>{const w=e.getBaseTarget(y),g=e.getValue(y);g&&(g.liveStyle=!0),v[y]=w??null}),d.push({animation:v})}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(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Kp(),r=!0}}}function VE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Xh(t,e):!1}function Tr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kp(){return{animate:Tr(!0),whileInView:Tr(),whileHover:Tr(),whileTap:Tr(),whileDrag:Tr(),whileFocus:Tr(),exit:Tr()}}class $E extends Xn{constructor(t){super(t),t.animationState||(t.animationState=LE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fi(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 RE=0;class jE extends Xn{constructor(){super(...arguments),this.id=RE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const BE={animation:{Feature:$E},exit:{Feature:jE}},Zp=(e,t)=>Math.abs(e-t);function zE(e,t){const n=Zp(e.x,t.x),r=Zp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Oc(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=zE(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:p}=d,{timestamp:m}=Et;this.history.push({...p,timestamp:m});const{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Ic(h,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Oc(d.type==="pointercancel"?this.lastMoveEventInfo:Ic(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,v),p&&p(d,v)},!Wh(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Ds(t),a=Ic(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=Et;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Oc(a,this.history)),this.removeListeners=Nn(Fn(this.contextWindow,"pointermove",this.handlePointerMove),Fn(this.contextWindow,"pointerup",this.handlePointerUp),Fn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),mn(this.updatePoint)}}function Ic(e,t){return t?{point:t(e.point)}:e}function Qp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Oc({point:e},t){return{point:e,delta:Qp(e,Jp(t)),offset:Qp(e,WE(t)),velocity:HE(t,.1)}}function WE(e){return e[0]}function Jp(e){return e[e.length-1]}function HE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Jp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>gn(t)));)n--;if(!r)return{x:0,y:0};const i=yn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const em=1e-4,UE=1-em,GE=1+em,tm=.01,YE=0-tm,qE=0+tm;function Gt(e){return e.max-e.min}function KE(e,t,n){return Math.abs(e-t)<=n}function nm(e,t,n,r=.5){e.origin=r,e.originPoint=Ye(t.min,t.max,e.origin),e.scale=Gt(n)/Gt(t),e.translate=Ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=UE&&e.scale<=GE||isNaN(e.scale))&&(e.scale=1),(e.translate>=YE&&e.translate<=qE||isNaN(e.translate))&&(e.translate=0)}function Ei(e,t,n,r){nm(e.x,t.x,n.x,r?r.originX:void 0),nm(e.y,t.y,n.y,r?r.originY:void 0)}function rm(e,t,n){e.min=n.min+t.min,e.max=e.min+Gt(t)}function ZE(e,t,n){rm(e.x,t.x,n.x),rm(e.y,t.y,n.y)}function om(e,t,n){e.min=t.min-n.min,e.max=e.min+Gt(t)}function Ci(e,t,n){om(e.x,t.x,n.x),om(e.y,t.y,n.y)}function XE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ye(n,e,r.max):Math.min(e,n)),e}function im(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 QE(e,{top:t,left:n,bottom:r,right:o}){return{x:im(e.x,n,o),y:im(e.y,t,r)}}function sm(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 JE(e,t){return{x:sm(e.x,t.x),y:sm(e.y,t.y)}}function eC(e,t){let n=.5;const r=Gt(e),o=Gt(t);return o>r?n=co(t.min,t.max-r,e.min):r>o&&(n=co(e.min,e.max-o,t.min)),Kn(0,1,n)}function tC(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 Ac=.35;function nC(e=Ac){return e===!1?e=0:e===!0&&(e=Ac),{x:am(e,"left","right"),y:am(e,"top","bottom")}}function am(e,t,n){return{min:lm(e,t),max:lm(e,n)}}function lm(e,t){return typeof e=="number"?e:e[t]||0}const cm=()=>({translate:0,scale:1,origin:0,originPoint:0}),fo=()=>({x:cm(),y:cm()}),um=()=>({min:0,max:0}),lt=()=>({x:um(),y:um()});function Qt(e){return[e("x"),e("y")]}function dm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function rC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function oC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function _c(e){return e===void 0||e===1}function Mc({scale:e,scaleX:t,scaleY:n}){return!_c(e)||!_c(t)||!_c(n)}function Er(e){return Mc(e)||fm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fm(e){return hm(e.x)||hm(e.y)}function hm(e){return e&&e!=="0%"}function js(e,t,n){const r=e-n,o=t*r;return n+o}function pm(e,t,n,r,o){return o!==void 0&&(e=js(e,o,r)),js(e,n,r)+t}function Dc(e,t=0,n=1,r,o){e.min=pm(e.min,t,n,r,o),e.max=pm(e.max,t,n,r,o)}function mm(e,{x:t,y:n}){Dc(e.x,t.translate,t.scale,t.originPoint),Dc(e.y,n.translate,n.scale,n.originPoint)}const gm=.999999999999,ym=1.0000000000001;function iC(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ho(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,mm(e,s)),r&&Er(i.latestValues)&&ho(e,i.latestValues))}t.x<ym&&t.x>gm&&(t.x=1),t.y<ym&&t.y>gm&&(t.y=1)}function er(e,t){e.min=e.min+t,e.max=e.max+t}function vm(e,t,n,r,o=.5){const i=Ye(e.min,e.max,o);Dc(e,t,n,i,r)}function ho(e,t){vm(e.x,t.x,t.scaleX,t.scale,t.originX),vm(e.y,t.y,t.scaleY,t.scale,t.originY)}function bm(e,t){return dm(oC(e.getBoundingClientRect(),t))}function sC(e,t,n){const r=bm(e,n),{scroll:o}=t;return o&&(er(r.x,o.offset.x),er(r.y,o.offset.y)),r}const wm=({current:e})=>e?e.ownerDocument.defaultView:null,aC=new WeakMap;class lC{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=lt(),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(Ds(u,"page").point)},i=(u,d)=>{var h;const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Yh(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qt(y=>{let w=this.getAxisMotionValue(y).get()||0;if(hn.test(w)){const{projection:g}=this.visualElement;if(g&&g.layout){const T=g.layout.layoutBox[y];T&&(w=Gt(T)*(parseFloat(w)/100))}}this.originPoint[y]=w}),m&&Me.postRender(()=>m(u,d)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=Cc(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=d;if(f&&this.currentDirection===null){this.currentDirection=cC(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Qt(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 Xp(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:wm(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Me.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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Bs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=XE(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&ro(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=QE(o.layoutBox,n):this.constraints=!1,this.elastic=nC(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Qt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=tC(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ro(t))return!1;const r=t.current;Ut(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=sC(r,o.root,this.visualElement.getTransformPagePoint());let s=JE(o.layout.layoutBox,i);if(n){const a=n(rC(s));this.hasMutatedConstraints=!!a,a&&(s=dm(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Qt(u=>{if(!Bs(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const h=o?200:1e6,f=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Sc(t,r,0,n,this.visualElement,!1,Cc(this.visualElement,t)))}stopAnimation(){Qt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qt(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){Qt(n=>{const{drag:r}=this.getProps();if(!Bs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ye(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ro(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=eC({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Qt(s=>{if(!Bs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ye(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;aC.set(this.visualElement,this);const t=this.visualElement.current,n=Fn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ro(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Me.read(r);const s=Dn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Qt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Ac,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Bs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function cC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class uC extends Xn{constructor(t){super(t),this.removeGroupControls=Tt,this.removeListeners=Tt,this.controls=new lC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Tt}unmount(){this.removeGroupControls(),this.removeListeners()}}const xm=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class dC extends Xn{constructor(){super(...arguments),this.removePointerDownListener=Tt}onPointerDown(t){this.session=new Xp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:xm(t),onStart:xm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Me.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Fn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function fC(){const e=b.useContext(Ts);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const zs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Sm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Pi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=Sm(e,t.target.x),r=Sm(e,t.target.y);return`${n}% ${r}%`}},hC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Jn.parse(e);if(o.length>5)return r;const i=Jn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ye(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class pC extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;mS(mC),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),zs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Me.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ll.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 Tm(e){const[t,n]=fC(),r=b.useContext(hi);return x.jsx(pC,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(yh),isPresent:t,safeToRemove:n})}const mC={borderRadius:{...Pi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pi,borderTopRightRadius:Pi,borderBottomLeftRadius:Pi,borderBottomRightRadius:Pi,boxShadow:hC},Em=["TopLeft","TopRight","BottomLeft","BottomRight"],gC=Em.length,Cm=e=>typeof e=="string"?parseFloat(e):e,Pm=e=>typeof e=="number"||fe.test(e);function yC(e,t,n,r,o,i){o?(e.opacity=Ye(0,n.opacity!==void 0?n.opacity:1,vC(r)),e.opacityExit=Ye(t.opacity!==void 0?t.opacity:1,0,bC(r))):i&&(e.opacity=Ye(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<gC;s++){const a=`border${Em[s]}Radius`;let l=km(t,a),c=km(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Pm(l)===Pm(c)?(e[a]=Math.max(Ye(Cm(l),Cm(c),r),0),(hn.test(c)||hn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ye(t.rotate||0,n.rotate||0,r))}function km(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const vC=Im(0,.5,Ap),bC=Im(.5,.95,Tt);function Im(e,t,n){return r=>r<e?0:r>t?1:n(co(e,t,r))}function Om(e,t){e.min=t.min,e.max=t.max}function Jt(e,t){Om(e.x,t.x),Om(e.y,t.y)}function Am(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function _m(e,t,n,r,o){return e-=t,e=js(e,1/n,r),o!==void 0&&(e=js(e,1/o,r)),e}function wC(e,t=0,n=1,r=.5,o,i=e,s=e){if(hn.test(t)&&(t=parseFloat(t),t=Ye(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ye(i.min,i.max,r);e===i&&(a-=t),e.min=_m(e.min,t,n,a,o),e.max=_m(e.max,t,n,a,o)}function Mm(e,t,[n,r,o],i,s){wC(e,t[n],t[r],t[o],t.scale,i,s)}const xC=["x","scaleX","originX"],SC=["y","scaleY","originY"];function Dm(e,t,n,r){Mm(e.x,t,xC,n?n.x:void 0,r?r.x:void 0),Mm(e.y,t,SC,n?n.y:void 0,r?r.y:void 0)}function Fm(e){return e.translate===0&&e.scale===1}function Nm(e){return Fm(e.x)&&Fm(e.y)}function TC(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Lm(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Vm(e){return Gt(e.x)/Gt(e.y)}function $m(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class EC{constructor(){this.members=[]}add(t){Ms(this.members,t),t.scheduleRender()}remove(t){if(bi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function CC(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}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 PC=(e,t)=>e.depth-t.depth;class kC{constructor(){this.children=[],this.isDirty=!1}add(t){Ms(this.children,t),this.isDirty=!0}remove(t){bi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(PC),this.isDirty=!1,this.children.forEach(t)}}function IC(e,t){const n=Qn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(mn(r),e(i-t))};return Me.read(r,!0),()=>mn(r)}function Rm(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Fc(e,t,n){const r=gt(e)?e:uo(e);return r.start(Sc("",r,t,n)),r.animation}const Cr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Nc=["","X","Y","Z"],OC={visibility:"hidden"},jm=1e3;let AC=0;function Lc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Bm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?qp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Bm(e.parent):!1:!1}function zm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=AC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Cr.totalNodes=Cr.resolvedTargetDeltas=Cr.recalculatedProjection=0),this.nodes.forEach(DC),this.nodes.forEach($C),this.nodes.forEach(RC),this.nodes.forEach(FC),window.MotionDebug&&window.MotionDebug.record(Cr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new kC)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Tc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Rm(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=IC(h,250),zs.hasAnimatedSinceResize&&(zs.hasAnimatedSinceResize=!1,this.nodes.forEach(Hm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||HC,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=u.getProps(),w=!this.targetLayout||!Lm(this.targetLayout,p)||f,g=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...Jl(m,"layout"),onPlay:v,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||Hm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,mn(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(jC),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Bm(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Wm);return}this.isUpdating||this.nodes.forEach(LC),this.isUpdating=!1,this.nodes.forEach(VC),this.nodes.forEach(_C),this.nodes.forEach(MC),this.clearAllSnapshots();const a=Qn.now();Et.delta=Kn(0,1e3/60,a-Et.timestamp),Et.timestamp=a,Et.isProcessing=!0,Kl.update.process(Et),Kl.preRender.process(Et),Kl.render.process(Et),Et.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ll.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NC),this.sharedNodes.forEach(BC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Nm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||Er(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),UC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return lt();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(er(a.x,l.offset.x),er(a.y,l.offset.y)),a}removeElementScroll(s){const a=lt();Jt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Jt(a,s);const{scroll:h}=this.root;h&&(er(a.x,-h.offset.x),er(a.y,-h.offset.y))}er(a.x,u.offset.x),er(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=lt();Jt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ho(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Er(u.latestValues)&&ho(l,u.latestValues)}return Er(this.latestValues)&&ho(l,this.latestValues),l}removeTransform(s){const a=lt();Jt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Er(c.latestValues))continue;Mc(c.latestValues)&&c.updateSnapshot();const u=lt(),d=c.measurePageBox();Jt(u,d),Dm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Er(this.latestValues)&&Dm(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Et.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!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(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=Et.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Ci(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Jt(this.target,this.layout.layoutBox),mm(this.target,this.targetDelta)):Jt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Ci(this.relativeTargetOrigin,this.target,f.target),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Cr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Mc(this.parent.latestValues)||fm(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 s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Et.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;Jt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;iC(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=lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Am(this.prevProjectionDelta.x,this.projectionDelta.x),Am(this.prevProjectionDelta.y,this.projectionDelta.y)),Ei(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!$m(this.projectionDelta.x,this.prevProjectionDelta.x)||!$m(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Cr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fo(),this.projectionDelta=fo(),this.projectionDeltaWithTransform=fo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=lt(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,v=this.getStack(),y=!v||v.members.length<=1,w=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(WC));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const S=T/1e3;Um(d.x,s.x,S),Um(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ci(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zC(this.relativeTarget,this.relativeTargetOrigin,h,S),g&&TC(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=lt()),Jt(g,this.relativeTarget)),m&&(this.animationValues=u,yC(u,c,this.latestValues,S,w,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(mn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{zs.hasAnimatedSinceResize=!0,this.currentAnimation=Fc(0,jm,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Zm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||lt();const d=Gt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const h=Gt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}Jt(a,l),ho(a,u),Ei(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new EC),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Lc("z",s,c,this.animationValues);for(let u=0;u<Nc.length;u++)Lc(`rotate${Nc[u]}`,s,c,this.animationValues),Lc(`skew${Nc[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return OC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=_s(s==null?void 0:s.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=_s(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Er(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=CC(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in Is){if(h[m]===void 0)continue;const{correct:v,applyTo:y}=Is[m],w=c.transform==="none"?h[m]:v(h[m],d);if(y){const g=y.length;for(let T=0;T<g;T++)c[y[T]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=d===this?_s(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Wm),this.root.sharedNodes.clear()}}}function _C(e){e.updateLayout()}function MC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?Qt(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],f=Gt(h);h.min=r[d].min,h.max=h.min+f}):Zm(i,n.layoutBox,r)&&Qt(d=>{const h=s?n.measuredBox[d]:n.layoutBox[d],f=Gt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=fo();Ei(a,r,n.layoutBox);const l=fo();s?Ei(l,e.applyTransform(o,!0),n.measuredBox):Ei(l,r,n.layoutBox);const c=!Nm(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=lt();Ci(p,n.layoutBox,h.layoutBox);const m=lt();Ci(m,r,f.layoutBox),Lm(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,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function DC(e){window.MotionDebug&&Cr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function FC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NC(e){e.clearSnapshot()}function Wm(e){e.clearMeasurements()}function LC(e){e.isLayoutDirty=!1}function VC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Hm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function $C(e){e.resolveTargetDelta()}function RC(e){e.calcProjection()}function jC(e){e.resetSkewAndRotation()}function BC(e){e.removeLeadSnapshot()}function Um(e,t,n){e.translate=Ye(t.translate,0,n),e.scale=Ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gm(e,t,n,r){e.min=Ye(t.min,n.min,r),e.max=Ye(t.max,n.max,r)}function zC(e,t,n,r){Gm(e.x,t.x,n.x,r),Gm(e.y,t.y,n.y,r)}function WC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const HC={duration:.45,ease:[.4,0,.1,1]},Ym=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),qm=Ym("applewebkit/")&&!Ym("chrome/")?Math.round:Tt;function Km(e){e.min=qm(e.min),e.max=qm(e.max)}function UC(e){Km(e.x),Km(e.y)}function Zm(e,t,n){return e==="position"||e==="preserve-aspect"&&!KE(Vm(t),Vm(n),.2)}const GC=zm({attachResizeListener:(e,t)=>Dn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vc={current:void 0},Xm=zm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vc.current){const e=new GC({});e.mount(window),e.setOptions({layoutScroll:!0}),Vc.current=e}return Vc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),YC={pan:{Feature:dC},drag:{Feature:uC,ProjectionNode:Xm,MeasureLayout:Tm}},$c={current:null},Qm={current:!1};function qC(){if(Qm.current=!0,!!Nl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$c.current=e.matches;e.addListener(t),t()}else $c.current=!1}function KC(e,t,n){for(const r in t){const o=t[r],i=n[r];if(gt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Ec(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(gt(i))e.addValue(r,uo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,uo(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ki=new WeakMap,ZC=[...ip,At,Jn],XC=e=>ZC.find(op(e)),Jm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],QC=$l.length;class JC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,f,p,m)=>new this.KeyframeResolver(h,f,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Me.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;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=!!i,this.isControllingVariants=ks(n),this.isVariantNode=wh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&>(f)&&f.set(l[h],!1)}}mount(t){this.current=t,ki.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)),Qm.current||qC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$c.current,process.env.NODE_ENV!=="production"&&Ec(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(){ki.delete(this.current),this.projection&&this.projection.unmount(),mn(this.notifyUpdate),mn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=qn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Me.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),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 oo){const n=oo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Jm.length;r++){const o=Jm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=KC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<QC;r++){const o=$l[r],i=this.props[o];(di(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uo(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"&&(Jh(o)||Qh(o))?o=parseFloat(o):!XC(o)&&Jn.test(n)&&(o=mp(t,n)),this.setBaseTarget(t,gt(o)?o.get():o)),gt(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 s=Yl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!gt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Tc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class eg extends JC{constructor(){super(...arguments),this.KeyframeResolver=gp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function eP(e){return window.getComputedStyle(e)}class tg extends eg{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Fh}readValueFromInstance(t,n){if(qn.has(n)){const r=ac(n);return r&&r.default||0}else{const r=eP(t),o=(Ch(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bm(t,n)}build(t,n,r){zl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Gl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;gt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ng extends eg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qn.has(n)){const r=ac(n);return r&&r.default||0}return n=Nh.has(n)?n:Cs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Vh(t,n,r)}build(t,n,r){Hl(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Lh(t,n,r,o)}mount(t){this.isSVGTag=Ul(t.tagName),super.mount(t)}}const tP=(e,t)=>Rl(e)?new ng(t):new tg(t,{allowProjection:e!==b.Fragment}),nP={...BE,...iT,...YC,...{layout:{ProjectionNode:Xm,MeasureLayout:Tm}}},Ct=hS((e,t)=>GS(e,t,nP,tP));function rg(){const e=b.useRef(!1);return Es(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function og(){const e=rg(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Me.postRender(r),[r]),t]}class rP extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function oP({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(no);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
5
5
|
[data-motion-pop-id="${n}"] {
|
|
6
6
|
position: absolute !important;
|
|
7
7
|
width: ${s}px !important;
|
|
@@ -9,137 +9,137 @@
|
|
|
9
9
|
top: ${l}px !important;
|
|
10
10
|
left: ${c}px !important;
|
|
11
11
|
}
|
|
12
|
-
`),()=>{document.head.removeChild(u)}},[t]),x.jsx(tP,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const Fc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=hn(rP),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=x.jsx(nP,{isPresent:n,children:e})),x.jsx(Es.Provider,{value:c,children:e})};function rP(){return new Map}function rg(e){return b.useEffect(()=>()=>e(),[])}const kr=e=>e.key||"";function oP(e,t){e.forEach(n=>{const r=kr(n);t.set(r,n)})}function iP(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Ii=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Ut(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(hi).forceRender||ng()[0],l=tg(),c=iP(e);let u=c;const d=b.useRef(new Map).current,h=b.useRef(u),f=b.useRef(new Map).current,p=b.useRef(!0);if(Cs(()=>{p.current=!1,oP(c,f),h.current=u}),rg(()=>{p.current=!0,f.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(w=>x.jsx(Fc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:w},kr(w)))});u=[...u];const m=h.current.map(kr),v=c.map(kr),g=m.length;for(let w=0;w<g;w++){const y=m[w];v.indexOf(y)===-1&&!d.has(y)&&d.set(y,void 0)}return s==="wait"&&d.size&&(u=[]),d.forEach((w,y)=>{if(v.indexOf(y)!==-1)return;const T=f.get(y);if(!T)return;const S=m.indexOf(y);let E=w;if(!E){const I=()=>{d.delete(y);const P=Array.from(f.keys()).filter(O=>!v.includes(O));if(P.forEach(O=>f.delete(O)),h.current=c.filter(O=>{const C=kr(O);return C===y||P.includes(C)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Fc,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:i,mode:s,children:T},kr(T)),d.set(y,E)}u.splice(S,0,E)}),u=u.map(w=>{const y=w.key;return d.has(y)?w:x.jsx(Fc,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:w},kr(w))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:d.size?u:u.map(w=>b.cloneElement(w))})};function sP({children:e,isValidProp:t,...n}){t&&Oh(t),n={...b.useContext(no),...n},n.isStatic=hn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(no.Provider,{value:r,children:e})}const aP=b.createContext(null),lP=e=>!e.isLayoutDirty&&e.willUpdate(!1);function og(){const e=new Set,t=new WeakMap,n=()=>e.forEach(lP);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 ig=e=>e===!0,cP=e=>ig(e===!0)||e==="id",uP=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(hi),o=b.useContext(aP),[i,s]=ng(),a=b.useRef(null),l=r.id||o;a.current===null&&(cP(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:ig(n)&&r.group||og()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return x.jsx(hi.Provider,{value:c,children:e})},sg=b.createContext(null);function dP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=Ye(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?$S(e,o,o+i):e}function fP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=hn(()=>Et(t)),l=[],c=b.useRef(!1);Ut(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,h)=>{const f=l.findIndex(p=>d===p.value);f!==-1?l[f].layout=h[n]:l.push({value:d,layout:h[n]}),l.sort(mP)},updateOrder:(d,h,f)=>{if(c.current)return;const p=dP(l,d,h,f);l!==p&&(c.current=!0,r(p.map(pP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),x.jsx(a,{...i,ref:s,ignoreStrict:!0,children:x.jsx(sg.Provider,{value:u,children:e})})}const hP=b.forwardRef(fP);function pP(e){return e.value}function mP(e,t){return e.layout.min-t.layout.min}function po(e){const t=hn(()=>uo(e)),{isStatic:n}=b.useContext(no);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const gP=e=>e&&typeof e=="object"&&e.mix,yP=e=>gP(e)?e.mix:void 0;function vP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=Fp(o,i,{mixer:yP(i[0]),...s});return t?a(r):a}function ag(e,t){const n=po(t()),r=()=>n.set(t());return r(),Cs(()=>{const o=()=>Me.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),pn(r)}}),n}function bP(e){Ti.current=[],e();const t=ag(Ti.current,e);return Ti.current=void 0,t}function wP(e,t,n,r){if(typeof e=="function")return bP(e);const o=typeof t=="function"?t:vP(t,n,r);return Array.isArray(e)?lg(e,o):lg([e],([i])=>o(i))}function lg(e,t){const n=hn(()=>[]);return ag(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function cg(e,t=0){return mt(e)?e:po(t)}function xP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=hn(()=>Et(r)),c=b.useContext(sg),u={x:cg(t.x),y:cg(t.y)},d=wP([u.x,u.y],([m,v])=>m||v?1:"unset");Ut(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:f,updateOrder:p}=c;return x.jsx(l,{drag:h,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(m,v)=>{const{velocity:g}=v;g[h]&&p(n,u[h].get(),g[h]),o&&o(m,v)},onLayoutMeasure:m=>f(n,m),ref:a,ignoreStrict:!0,children:e})}const SP=b.forwardRef(xP),Hs={Group:hP,Item:SP};function ug(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Ut(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function TP(e){return typeof e=="object"&&!Array.isArray(e)}function EP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Vm(e)?new eg(t):new Jm(t);n.mount(e),ki.set(e,n)}function CP(e,t=100){const n=sc({keyframes:[0,t],...e}),r=Math.min($p(n),pc);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:gn(r)}}function dg(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const PP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function kP(e,t){return Cp(e)?e[PP(0,e.length,t)]:e}function IP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(bi(e,o),r--)}}function OP(e,t,n,r,o,i){IP(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Ye(o,i,r[s]),easing:kP(n,s)})}function AP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const _P="easeInOut";function MP(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,i=new Map,s=new Map,a={},l=new Map;let c=0,u=0,d=0;for(let h=0;h<e.length;h++){const f=e[h];if(typeof f=="string"){l.set(f,u);continue}else if(!Array.isArray(f)){l.set(f.name,dg(u,f.at,c,l));continue}let[p,m,v={}]=f;v.at!==void 0&&(u=dg(u,v.at,c,l));let g=0;const w=(y,T,S,E=0,I=0)=>{const P=DP(y),{delay:O=0,times:C=Vp(P),type:V="keyframes",...D}=T;let{ease:L=t.ease||"easeOut",duration:k}=T;const _=typeof O=="function"?O(E,I):O,N=P.length;if(N<=2&&V==="spring"){let A=100;if(N===2&&LP(P)){const ne=P[1]-P[0];A=Math.abs(ne)}const j={...D};k!==void 0&&(j.duration=mn(k));const Z=CP(j,A);L=Z.ease,k=Z.duration}k??(k=o);const $=u+_,z=$+k;C.length===1&&C[0]===0&&(C[1]=1);const U=C.length-P.length;U>0&&Lp(C,U),P.length===1&&P.unshift(null),OP(S,P,L,C,$,z),g=Math.max(_+k,g),d=Math.max(z,d)};if(mt(p)){const y=fg(p,s);w(m,v,hg("default",y))}else{const y=ug(p,r,a),T=y.length;for(let S=0;S<T;S++){m=m,v=v;const E=y[S],I=fg(E,s);for(const P in m)w(m[P],NP(v,P),hg(P,I),S,T)}}c=u,u+=g}return s.forEach((h,f)=>{for(const p in h){const m=h[p];m.sort(AP);const v=[],g=[],w=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:I}=m[T];v.push(E),g.push(co(0,d,S)),w.push(I||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),w.unshift(_P)),g[g.length-1]!==1&&(g.push(1),v.push(null)),i.has(f)||i.set(f,{keyframes:{},transition:{}});const y=i.get(f);y.keyframes[p]=v,y.transition[p]={...t,duration:d,ease:w,times:g,...n}}}),i}function fg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function hg(e,t){return t[e]||(t[e]=[]),t[e]}function DP(e){return Array.isArray(e)?e:[e]}function NP(e,t){return e[t]?{...e,...e[t]}:{...e}}const FP=e=>typeof e=="number",LP=e=>e.every(FP);function pg(e,t,n,r){const o=ug(e,r),i=o.length;Ut(!!i,"No valid element provided.");const s=[];for(let a=0;a<i;a++){const l=o[a];ki.has(l)||EP(l);const c=ki.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,i)),s.push(...Sc(c,{...t,transition:u},{}))}return new yc(s)}const VP=e=>Array.isArray(e)&&Array.isArray(e[0]);function $P(e,t,n){const r=[];return MP(e,t,n).forEach(({keyframes:i,transition:s},a)=>{let l;mt(a)?l=Ac(a,i.default,s.default):l=pg(a,i,s),r.push(l)}),new yc(r)}const RP=e=>{function t(n,r,o){let i;return VP(n)?i=$P(n,r,e):TP(r)?i=pg(n,r,o,e):i=Ac(n,r,o),e&&e.animations.push(i),i}return t};function jP(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>RP(e));return rg(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class BP{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 zP=()=>new BP;function WP(){return hn(zP)}function HP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function UP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:HP(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=cc(r)(l/c)*c}return t+l}}/**
|
|
12
|
+
`),()=>{document.head.removeChild(u)}},[t]),x.jsx(rP,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const Rc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=pn(iP),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=x.jsx(oP,{isPresent:n,children:e})),x.jsx(Ts.Provider,{value:c,children:e})};function iP(){return new Map}function ig(e){return b.useEffect(()=>()=>e(),[])}const Pr=e=>e.key||"";function sP(e,t){e.forEach(n=>{const r=Pr(n);t.set(r,n)})}function aP(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Ii=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Ut(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(hi).forceRender||og()[0],l=rg(),c=aP(e);let u=c;const d=b.useRef(new Map).current,h=b.useRef(u),f=b.useRef(new Map).current,p=b.useRef(!0);if(Es(()=>{p.current=!1,sP(c,f),h.current=u}),ig(()=>{p.current=!0,f.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(w=>x.jsx(Rc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:w},Pr(w)))});u=[...u];const m=h.current.map(Pr),v=c.map(Pr),y=m.length;for(let w=0;w<y;w++){const g=m[w];v.indexOf(g)===-1&&!d.has(g)&&d.set(g,void 0)}return s==="wait"&&d.size&&(u=[]),d.forEach((w,g)=>{if(v.indexOf(g)!==-1)return;const T=f.get(g);if(!T)return;const S=m.indexOf(g);let E=w;if(!E){const I=()=>{d.delete(g);const P=Array.from(f.keys()).filter(O=>!v.includes(O));if(P.forEach(O=>f.delete(O)),h.current=c.filter(O=>{const C=Pr(O);return C===g||P.includes(C)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Rc,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:i,mode:s,children:T},Pr(T)),d.set(g,E)}u.splice(S,0,E)}),u=u.map(w=>{const g=w.key;return d.has(g)?w:x.jsx(Rc,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:w},Pr(w))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:d.size?u:u.map(w=>b.cloneElement(w))})};function lP({children:e,isValidProp:t,...n}){t&&_h(t),n={...b.useContext(no),...n},n.isStatic=pn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(no.Provider,{value:r,children:e})}const cP=b.createContext(null),uP=e=>!e.isLayoutDirty&&e.willUpdate(!1);function sg(){const e=new Set,t=new WeakMap,n=()=>e.forEach(uP);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 ag=e=>e===!0,dP=e=>ag(e===!0)||e==="id",fP=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(hi),o=b.useContext(cP),[i,s]=og(),a=b.useRef(null),l=r.id||o;a.current===null&&(dP(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:ag(n)&&r.group||sg()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return x.jsx(hi.Provider,{value:c,children:e})},lg=b.createContext(null);function hP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=Ye(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?jS(e,o,o+i):e}function pP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=pn(()=>Ct(t)),l=[],c=b.useRef(!1);Ut(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,h)=>{const f=l.findIndex(p=>d===p.value);f!==-1?l[f].layout=h[n]:l.push({value:d,layout:h[n]}),l.sort(yP)},updateOrder:(d,h,f)=>{if(c.current)return;const p=hP(l,d,h,f);l!==p&&(c.current=!0,r(p.map(gP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),x.jsx(a,{...i,ref:s,ignoreStrict:!0,children:x.jsx(lg.Provider,{value:u,children:e})})}const mP=b.forwardRef(pP);function gP(e){return e.value}function yP(e,t){return e.layout.min-t.layout.min}function po(e){const t=pn(()=>uo(e)),{isStatic:n}=b.useContext(no);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const vP=e=>e&&typeof e=="object"&&e.mix,bP=e=>vP(e)?e.mix:void 0;function wP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=Vp(o,i,{mixer:bP(i[0]),...s});return t?a(r):a}function cg(e,t){const n=po(t()),r=()=>n.set(t());return r(),Es(()=>{const o=()=>Me.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),mn(r)}}),n}function xP(e){Ti.current=[],e();const t=cg(Ti.current,e);return Ti.current=void 0,t}function SP(e,t,n,r){if(typeof e=="function")return xP(e);const o=typeof t=="function"?t:wP(t,n,r);return Array.isArray(e)?ug(e,o):ug([e],([i])=>o(i))}function ug(e,t){const n=pn(()=>[]);return cg(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function dg(e,t=0){return gt(e)?e:po(t)}function TP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=pn(()=>Ct(r)),c=b.useContext(lg),u={x:dg(t.x),y:dg(t.y)},d=SP([u.x,u.y],([m,v])=>m||v?1:"unset");Ut(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:f,updateOrder:p}=c;return x.jsx(l,{drag:h,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(m,v)=>{const{velocity:y}=v;y[h]&&p(n,u[h].get(),y[h]),o&&o(m,v)},onLayoutMeasure:m=>f(n,m),ref:a,ignoreStrict:!0,children:e})}const EP=b.forwardRef(TP),Ws={Group:mP,Item:EP};function fg(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Ut(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function CP(e){return typeof e=="object"&&!Array.isArray(e)}function PP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Rm(e)?new ng(t):new tg(t);n.mount(e),ki.set(e,n)}function kP(e,t=100){const n=uc({keyframes:[0,t],...e}),r=Math.min(jp(n),vc);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:yn(r)}}function hg(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const IP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function OP(e,t){return kp(e)?e[IP(0,e.length,t)]:e}function AP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(bi(e,o),r--)}}function _P(e,t,n,r,o,i){AP(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Ye(o,i,r[s]),easing:OP(n,s)})}function MP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const DP="easeInOut";function FP(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,i=new Map,s=new Map,a={},l=new Map;let c=0,u=0,d=0;for(let h=0;h<e.length;h++){const f=e[h];if(typeof f=="string"){l.set(f,u);continue}else if(!Array.isArray(f)){l.set(f.name,hg(u,f.at,c,l));continue}let[p,m,v={}]=f;v.at!==void 0&&(u=hg(u,v.at,c,l));let y=0;const w=(g,T,S,E=0,I=0)=>{const P=NP(g),{delay:O=0,times:C=Rp(P),type:L="keyframes",...D}=T;let{ease:V=t.ease||"easeOut",duration:k}=T;const _=typeof O=="function"?O(E,I):O,F=P.length;if(F<=2&&L==="spring"){let A=100;if(F===2&&$P(P)){const ne=P[1]-P[0];A=Math.abs(ne)}const j={...D};k!==void 0&&(j.duration=gn(k));const Z=kP(j,A);V=Z.ease,k=Z.duration}k??(k=o);const $=u+_,H=$+k;C.length===1&&C[0]===0&&(C[1]=1);const U=C.length-P.length;U>0&&$p(C,U),P.length===1&&P.unshift(null),_P(S,P,V,C,$,H),y=Math.max(_+k,y),d=Math.max(H,d)};if(gt(p)){const g=pg(p,s);w(m,v,mg("default",g))}else{const g=fg(p,r,a),T=g.length;for(let S=0;S<T;S++){m=m,v=v;const E=g[S],I=pg(E,s);for(const P in m)w(m[P],LP(v,P),mg(P,I),S,T)}}c=u,u+=y}return s.forEach((h,f)=>{for(const p in h){const m=h[p];m.sort(MP);const v=[],y=[],w=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:I}=m[T];v.push(E),y.push(co(0,d,S)),w.push(I||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),w.unshift(DP)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(f)||i.set(f,{keyframes:{},transition:{}});const g=i.get(f);g.keyframes[p]=v,g.transition[p]={...t,duration:d,ease:w,times:y,...n}}}),i}function pg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function mg(e,t){return t[e]||(t[e]=[]),t[e]}function NP(e){return Array.isArray(e)?e:[e]}function LP(e,t){return e[t]?{...e,...e[t]}:{...e}}const VP=e=>typeof e=="number",$P=e=>e.every(VP);function gg(e,t,n,r){const o=fg(e,r),i=o.length;Ut(!!i,"No valid element provided.");const s=[];for(let a=0;a<i;a++){const l=o[a];ki.has(l)||PP(l);const c=ki.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,i)),s.push(...Pc(c,{...t,transition:u},{}))}return new xc(s)}const RP=e=>Array.isArray(e)&&Array.isArray(e[0]);function jP(e,t,n){const r=[];return FP(e,t,n).forEach(({keyframes:i,transition:s},a)=>{let l;gt(a)?l=Fc(a,i.default,s.default):l=gg(a,i,s),r.push(l)}),new xc(r)}const BP=e=>{function t(n,r,o){let i;return RP(n)?i=jP(n,r,e):CP(r)?i=gg(n,r,o,e):i=Fc(n,r,o),e&&e.animations.push(i),i}return t};function zP(){const e=pn(()=>({current:null,animations:[]})),t=pn(()=>BP(e));return ig(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class WP{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 HP=()=>new WP;function UP(){return pn(HP)}function GP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function YP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:GP(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=hc(r)(l/c)*c}return t+l}}/**
|
|
13
13
|
* @license lucide-react v0.414.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const
|
|
17
|
+
*/const qP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yg=(...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 KP={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 ZP=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>b.createElement("svg",{ref:l,...KP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:yg("lucide",o),...a},[...s.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
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 tt=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(
|
|
32
|
+
*/const tt=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(ZP,{ref:i,iconNode:t,className:yg(`lucide-${qP(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 XP=tt("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 QP=tt("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 vg=tt("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 JP=tt("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 ek=tt("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 bg=tt("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 tk=tt("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 jc=tt("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 nk=tt("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
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 wg=tt("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"}]]);/**
|
|
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 rk=tt("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"}]]);/**
|
|
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 ok=tt("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"}]]);/**
|
|
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 ik=tt("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"}]]);/**
|
|
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 xg=tt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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 sk=tt("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
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 Bc=tt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 ak=tt("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"}]]);/**
|
|
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 lk=tt("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"}]]);/**
|
|
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 mo=tt("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"}]]);/**
|
|
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 ck=tt("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 uk=tt("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 lk=tt("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),xg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},ck={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Sg=e=>x.jsx(Et.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:xg.false,transition:ck,variants:xg,children:e.children}),uk=ri("px-4 py-4 border relative rounded-lg text-sm",{variants:{theme:{neutral:"border-border bg-background",danger:"text-danger-contrast bg-danger/10 border-danger/50",success:"text-success-foreground bg-success/10 border-success/50",info:"text-info bg-info/10 border-info/50"}},defaultVariants:{theme:"neutral"}}),dk=b.forwardRef(function({className:t,theme:n,onClose:r,open:o=!0,...i},s){return x.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"pointer-events-none isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:x.jsx(Sg,{"data-open":!!o,open:!!o,children:x.jsxs(to,{...i,className:Be(uk({theme:n}),t),ref:s,"data-theme":n,role:"alert",as:i.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?x.jsx(vg,{size:20}):null,n==="info"?x.jsx(bg,{size:20}):null,n==="danger"?x.jsx(ek,{size:20}):null,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,r!==void 0?x.jsx("button",{type:"button",onClick:()=>r(!1),className:"duration-300 ease-in-out absolute right-3 top-3 text-foreground transition-colors hover:text-danger",children:x.jsx(wg,{size:20})}):null]})})})});function De(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 qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function go(e,t){const n=De(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Us(e,t){const n=De(e);if(isNaN(t))return qe(e,NaN);if(!t)return n;const r=n.getDate(),o=qe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Tg=6048e5,fk=864e5,hk=6e4,pk=36e5,mk=1e3;let gk={};function Ir(){return gk}function yn(e,t){var a,l,c,u;const n=Ir(),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=De(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function yo(e){return yn(e,{weekStartsOn:1})}function Eg(e){const t=De(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=yo(r),i=qe(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=yo(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function vo(e){const t=De(e);return t.setHours(0,0,0,0),t}function Gs(e){const t=De(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 yk(e,t){const n=vo(e),r=vo(t),o=+n-Gs(n),i=+r-Gs(r);return Math.round((o-i)/fk)}function vk(e){const t=Eg(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),yo(n)}function Cg(e,t){const n=t*7;return go(e,n)}function Pg(e,t){return Us(e,t*12)}function bk(e){return qe(e,Date.now())}function wk(e,t){const n=vo(e),r=vo(t);return+n==+r}function xk(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function kg(e){if(!xk(e)&&typeof e!="number")return!1;const t=De(e);return!isNaN(Number(t))}function Ig(e,t){const n=De(e.start),r=De(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(De(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function Og(e){const t=De(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Sk(e){const t=De(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Tk(e,t){var a,l;const n=Ir(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=De(e),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const Ek={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"}},Ck=(e,t,n)=>{let r;const o=Ek[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 $c(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Pk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ik={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ok={date:$c({formats:Pk,defaultWidth:"full"}),time:$c({formats:kk,defaultWidth:"full"}),dateTime:$c({formats:Ik,defaultWidth:"full"})},Ak={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_k=(e,t,n,r)=>Ak[e];function Oi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Mk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Dk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Nk={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"]},Fk={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"]},Lk={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"}},Vk={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"}},$k={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:Oi({values:Mk,defaultWidth:"wide"}),quarter:Oi({values:Dk,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Oi({values:Nk,defaultWidth:"wide"}),day:Oi({values:Fk,defaultWidth:"wide"}),dayPeriod:Oi({values:Lk,defaultWidth:"wide",formattingValues:Vk,defaultFormattingWidth:"wide"})};function Ai(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?jk(a,d=>d.test(s)):Rk(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function Rk(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function jk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Bk(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const zk=/^(\d+)(th|st|nd|rd)?/i,Wk=/\d+/i,Hk={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},Uk={any:[/^b/i,/^(a|c)/i]},Gk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yk={any:[/1/i,/2/i,/3/i,/4/i]},qk={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},Kk={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]},Zk={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},Xk={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]},Qk={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},Jk={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}},eI={ordinalNumber:Bk({matchPattern:zk,parsePattern:Wk,valueCallback:e=>parseInt(e,10)}),era:Ai({matchPatterns:Hk,defaultMatchWidth:"wide",parsePatterns:Uk,defaultParseWidth:"any"}),quarter:Ai({matchPatterns:Gk,defaultMatchWidth:"wide",parsePatterns:Yk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ai({matchPatterns:qk,defaultMatchWidth:"wide",parsePatterns:Kk,defaultParseWidth:"any"}),day:Ai({matchPatterns:Zk,defaultMatchWidth:"wide",parsePatterns:Xk,defaultParseWidth:"any"}),dayPeriod:Ai({matchPatterns:Qk,defaultMatchWidth:"any",parsePatterns:Jk,defaultParseWidth:"any"})},Ag={code:"en-US",formatDistance:Ck,formatLong:Ok,formatRelative:_k,localize:$k,match:eI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tI(e){const t=De(e);return yk(t,Sk(t))+1}function _g(e){const t=De(e),n=+yo(t)-+vk(t);return Math.round(n/Tg)+1}function Rc(e,t){var u,d,h,f;const n=De(e),r=n.getFullYear(),o=Ir(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(h=o.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,s=qe(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=yn(s,t),l=qe(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=yn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function nI(e,t){var a,l,c,u;const n=Ir(),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=Rc(e,t),i=qe(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),yn(i,t)}function Mg(e,t){const n=De(e),r=+yn(n,t)-+nI(n,t);return Math.round(r/Tg)+1}function $e(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const nr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return $e(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):$e(n+1,2)},d(e,t){return $e(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 $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return $e(o,t.length)}},bo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dg={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 nr.y(e,t)},Y:function(e,t,n,r){const o=Rc(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return $e(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):$e(i,t.length)},R:function(e,t){const n=Eg(e);return $e(n,t.length)},u:function(e,t){const n=e.getFullYear();return $e(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 $e(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 $e(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 nr.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 $e(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=Mg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):$e(o,t.length)},I:function(e,t,n){const r=_g(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):nr.d(e,t)},D:function(e,t,n){const r=tI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):$e(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return $e(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return $e(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return $e(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=bo.noon:r===0?o=bo.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=bo.evening:r>=12?o=bo.afternoon:r>=4?o=bo.morning:o=bo.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 nr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):nr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):nr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):nr.s(e,t)},S:function(e,t){return nr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Fg(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Fg(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ng(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ng(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return $e(r,t.length)},T:function(e,t,n){const r=e.getTime();return $e(r,t.length)}};function Ng(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+$e(i,2)}function Fg(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=$e(Math.trunc(r/60),2),i=$e(r%60,2);return n+o+t+i}const Lg=(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"})}},Vg=(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"})}},jc={p:Vg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Lg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Lg(r,t)).replace("{{time}}",Vg(o,t))}},rI=/^D+$/,oI=/^Y+$/,iI=["D","DD","YY","YYYY"];function $g(e){return rI.test(e)}function Rg(e){return oI.test(e)}function Bc(e,t,n){const r=sI(e,t,n);if(console.warn(r),iI.includes(e))throw new RangeError(r)}function sI(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 aI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cI=/^'([^]*?)'?$/,uI=/''/g,dI=/[a-zA-Z]/;function fI(e,t,n){var u,d,h,f;const r=Ir(),o=r.locale??Ag,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,a=De(e);if(!kg(a))throw new RangeError("Invalid time value");let l=t.match(lI).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=jc[m];return v(p,o.formatLong)}return p}).join("").match(aI).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:hI(p)};if(Dg[m])return{isToken:!0,value:p};if(m.match(dI))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:i,weekStartsOn:s,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Rg(m)||$g(m))&&Bc(m,t,String(e));const v=Dg[m[0]];return v(a,m,o.localize,c)}).join("")}function hI(e){const t=e.match(cI);return t?t[1].replace(uI,"'"):e}function pI(){return Object.assign({},Ir())}function mI(e){let n=De(e).getDay();return n===0&&(n=7),n}function gI(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function yI(e,t){const n=De(e),r=De(t);return+n<+r}function vI(e,t){const n=t instanceof Date?qe(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 bI=10;class jg{constructor(){oe(this,"subPriority",0)}validate(t,n){return!0}}class wI extends jg{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class xI extends jg{constructor(){super(...arguments);oe(this,"priority",bI);oe(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,vI(n,Date))}}class Ne{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new wI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class SI extends Ne{constructor(){super(...arguments);oe(this,"priority",140);oe(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 ct={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}/},vn={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 ut(e,t){return e&&{value:t(e.value),rest:e.rest}}function Qe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function bn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*pk+i*hk+s*mk),rest:t.slice(n[0].length)}}function Bg(e){return Qe(ct.anyDigitsSigned,e)}function nt(e,t){switch(e){case 1:return Qe(ct.singleDigit,t);case 2:return Qe(ct.twoDigits,t);case 3:return Qe(ct.threeDigits,t);case 4:return Qe(ct.fourDigits,t);default:return Qe(new RegExp("^\\d{1,"+e+"}"),t)}}function Ys(e,t){switch(e){case 1:return Qe(ct.singleDigitSigned,t);case 2:return Qe(ct.twoDigitsSigned,t);case 3:return Qe(ct.threeDigitsSigned,t);case 4:return Qe(ct.fourDigitsSigned,t);default:return Qe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function zc(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 zg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function Wg(e){return e%400===0||e%4===0&&e%100!==0}class TI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return ut(nt(4,n),i);case"yo":return ut(o.ordinalNumber(n,{unit:"year"}),i);default:return ut(nt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const a=zg(o.year,i);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class EI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ut(nt(4,n),i);case"Yo":return ut(o.ordinalNumber(n,{unit:"year"}),i);default:return ut(nt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=Rc(n,i);if(o.isTwoDigitYear){const l=zg(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),yn(n,i)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),yn(n,i)}}class CI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Ys(r==="R"?4:r.length,n)}set(n,r,o){const i=qe(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),yo(i)}}class PI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Ys(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class kI extends Ne{constructor(){super(...arguments);oe(this,"priority",120);oe(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 nt(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 II extends Ne{constructor(){super(...arguments);oe(this,"priority",120);oe(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 nt(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 OI extends Ne{constructor(){super(...arguments);oe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);oe(this,"priority",110)}parse(n,r,o){const i=s=>s-1;switch(r){case"M":return ut(Qe(ct.month,n),i);case"MM":return ut(nt(2,n),i);case"Mo":return ut(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class AI extends Ne{constructor(){super(...arguments);oe(this,"priority",110);oe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=s=>s-1;switch(r){case"L":return ut(Qe(ct.month,n),i);case"LL":return ut(nt(2,n),i);case"Lo":return ut(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function _I(e,t,n){const r=De(e),o=Mg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class MI extends Ne{constructor(){super(...arguments);oe(this,"priority",100);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Qe(ct.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return yn(_I(n,o,i),i)}}function DI(e,t){const n=De(e),r=_g(n)-t;return n.setDate(n.getDate()-r*7),n}class NI extends Ne{constructor(){super(...arguments);oe(this,"priority",100);oe(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 Qe(ct.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return yo(DI(n,o))}}const FI=[31,28,31,30,31,30,31,31,30,31,30,31],LI=[31,29,31,30,31,30,31,31,30,31,30,31];class VI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"subPriority",1);oe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Qe(ct.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return nt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Wg(o),s=n.getMonth();return i?r>=1&&r<=LI[s]:r>=1&&r<=FI[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class $I extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"subpriority",1);oe(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 Qe(ct.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return nt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Wg(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 Wc(e,t,n){var d,h,f,p;const r=Ir(),o=(n==null?void 0:n.weekStartsOn)??((h=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,i=De(e),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return go(i,u)}class RI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Wc(n,o,i),n.setHours(0,0,0,0),n}}class jI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ut(nt(r.length,n),s);case"eo":return ut(o.ordinalNumber(n,{unit:"day"}),s);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Wc(n,o,i),n.setHours(0,0,0,0),n}}class BI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ut(nt(r.length,n),s);case"co":return ut(o.ordinalNumber(n,{unit:"day"}),s);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Wc(n,o,i),n.setHours(0,0,0,0),n}}function zI(e,t){const n=De(e),r=mI(n),o=t-r;return go(n,o)}class WI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=s=>s===0?7:s;switch(r){case"i":case"ii":return nt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ut(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return ut(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return ut(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return ut(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=zI(n,o),n.setHours(0,0,0,0),n}}class HI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(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(zc(o),0,0,0),n}}class UI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(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(zc(o),0,0,0),n}}class GI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(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(zc(o),0,0,0),n}}class YI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Qe(ct.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class qI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Qe(ct.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class KI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Qe(ct.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return nt(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 ZI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Qe(ct.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class XI extends Ne{constructor(){super(...arguments);oe(this,"priority",60);oe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Qe(ct.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class QI extends Ne{constructor(){super(...arguments);oe(this,"priority",50);oe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Qe(ct.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class JI extends Ne{constructor(){super(...arguments);oe(this,"priority",30);oe(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return ut(nt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class eO extends Ne{constructor(){super(...arguments);oe(this,"priority",10);oe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return bn(vn.basicOptionalMinutes,n);case"XX":return bn(vn.basic,n);case"XXXX":return bn(vn.basicOptionalSeconds,n);case"XXXXX":return bn(vn.extendedOptionalSeconds,n);case"XXX":default:return bn(vn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-Gs(n)-o)}}class tO extends Ne{constructor(){super(...arguments);oe(this,"priority",10);oe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return bn(vn.basicOptionalMinutes,n);case"xx":return bn(vn.basic,n);case"xxxx":return bn(vn.basicOptionalSeconds,n);case"xxxxx":return bn(vn.extendedOptionalSeconds,n);case"xxx":default:return bn(vn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-Gs(n)-o)}}class nO extends Ne{constructor(){super(...arguments);oe(this,"priority",40);oe(this,"incompatibleTokens","*")}parse(n){return Bg(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class rO extends Ne{constructor(){super(...arguments);oe(this,"priority",20);oe(this,"incompatibleTokens","*")}parse(n){return Bg(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const oO={G:new SI,y:new TI,Y:new EI,R:new CI,u:new PI,Q:new kI,q:new II,M:new OI,L:new AI,w:new MI,I:new NI,d:new VI,D:new $I,E:new RI,e:new jI,c:new BI,i:new WI,a:new HI,b:new UI,B:new GI,h:new YI,H:new qI,K:new KI,k:new ZI,m:new XI,s:new QI,S:new JI,X:new eO,x:new tO,t:new nO,T:new rO},iO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,sO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aO=/^'([^]*?)'?$/,lO=/''/g,cO=/\S/,uO=/[a-zA-Z]/;function dO(e,t,n,r){var m,v,g,w;const o=pI(),i=o.locale??Ag,s=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(g=o.locale)==null?void 0:g.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?De(n):qe(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new xI],u=t.match(sO).map(y=>{const T=y[0];if(T in jc){const S=jc[T];return S(y,i.formatLong)}return y}).join("").match(iO),d=[];for(let y of u){Rg(y)&&Bc(y,t,e),$g(y)&&Bc(y,t,e);const T=y[0],S=oO[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const P=d.find(O=>E.includes(O.token)||O.token===T);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${y}\` at the same time`)}else if(S.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);d.push({token:T,fullToken:y});const I=S.run(e,y,i.match,l);if(!I)return qe(n,NaN);c.push(I.setter),e=I.rest}else{if(T.match(uO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(y==="''"?y="'":T==="'"&&(y=fO(y)),e.indexOf(y)===0)e=e.slice(y.length);else return qe(n,NaN)}}if(e.length>0&&cO.test(e))return qe(n,NaN);const h=c.map(y=>y.priority).sort((y,T)=>T-y).filter((y,T,S)=>S.indexOf(y)===T).map(y=>c.filter(T=>T.priority===y).sort((T,S)=>S.subPriority-T.subPriority)).map(y=>y[0]);let f=De(n);if(isNaN(f.getTime()))return qe(n,NaN);const p={};for(const y of h){if(!y.validate(f,l))return qe(n,NaN);const T=y.set(f,p,l);Array.isArray(T)?(f=T[0],Object.assign(p,T[1])):f=T}return qe(n,f)}function fO(e){return e.match(aO)[1].replace(lO,"'")}function hO(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function pO(e){return wk(e,bk(e))}function mO(e,t){return go(e,-t)}function Hg(e,t){return Us(e,-t)}function gO(e,t){return Cg(e,-t)}function yO(e,t){return Pg(e,-t)}var Ct=function(){return Ct=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ct.apply(this,arguments)};function Hc(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 Uc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var _i=function(e){return e.replace(new RegExp(" ","g")," ")},Ug=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)},vO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Gg=function(e,t,n){var r=e.length-2,o=vO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Yg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},qg=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},bO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Gc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},wO=function(e){return e==="money"||e==="currency"},xO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Ct(Ct({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Yc=function(e,t){var n=Ug(Yg(e),t.fraction.length),r="".concat(t.currency).concat(Gg(n,t.group,t.decimal));return _i(r)},SO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Hc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=xO(r,i,a);return p.currency=_i("".concat(p.currency.trim()," ")),p.literal=_i(p.literal.trim()),p},[r,i]),h=function(p){var m=Yc(p.target.value,d),v=qg(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)},f=c.defaultValue?Yc(c.defaultValue,d):void 0;return b.createElement("input",Ct({},c,{value:typeof c.value=="string"?Yc(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),TO=1,EO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},CO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Ct(Ct({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},qc=function(e,t){var n=Ug(Yg(e),t.fraction.length),r="".concat(Gg(n,t.group,t.decimal)," ").concat(t.percentSign);return _i(r)},PO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Hc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Uc(b.useState(function(){var g,w;return(w=(g=s.value)===null||g===void 0?void 0:g.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var g,w=Number.parseFloat("".concat((g=s.value)!==null&&g!==void 0?g:"0")).toFixed(d.fraction.length);u(qc(w,d))},[s.value]);var d=b.useMemo(function(){var g=CO(r);return g.percentSign=_i("".concat(g.percentSign)),g},[r]),h=c.length-d.percentSign.length-TO,f=function(g){var w,y=a.current;y&&(y.setSelectionRange(h,h),g&&((w=s.onFocus)===null||w===void 0||w.call(s,g)))},p=function(g){var w=g.currentTarget;if(w.selectionStart!==null){var y=w.selectionStart,T=w.selectionEnd,S=y!==T,E=h<y;!S&&E&&f()}i==null||i(g)},m=function(g){var w=qc(g.target.value,d),y=qg(w);u(w),g.target.value=w,g.target.setAttribute("data-number",y.toString()),o==null||o(g)};b.useEffect(function(){return f()},[c]);var v=s.defaultValue?qc(s.defaultValue,d):void 0;return b.createElement("input",Ct({},s,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:f,onKeyUp:p,ref:a,type:"text"}))}),Mi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},kO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=qs[i];s===void 0?r.push(i.replace(Mi.dots,"\\.").replace(Mi.openParenthesis,"\\(").replace(Mi.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Mi.leadingBars,"\\")},Di=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Kc(o,n);var i=kO(o);return n?"^".concat(i,"$"):i},IO=function(e){return e.replace(Mi.escape,"\\$&")},Kc=function(e,t){var n=e.map(function(r){return typeof r=="string"?IO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},qs={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]/}},OO=/\d/,Kg="(dd) 9dddd-dddd",Zg="(dd) dddd-dddd",Xg="ddd.ddd.ddd-dd",Qg="dd.ddd.ddd/dddd-dd",Ks=function(e){return e.replace(/\D/g,"")},AO=["2",/[0-3]/,":",/[0-5]/,/\d/],_O=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],jt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Xg,isoDate:"dddd-dd-dd",cnpj:Qg,telephone:Zg,cellphone:Kg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ks(e).length<=11?Xg:Qg},int:function(e){return e===void 0&&(e=""),OO.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=Ks(e);return t.length<11?Zg:Kg},time:function(e){var t=Ks(e),n=t[0];return n==="2"?AO:_O}},Bt=function(e,t,n){var r;return n===void 0&&(n={}),Ct({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Di(e,"",!0),infinity:n.infinity},n)},_t={cellTelephone:Bt(jt.cellTelephone,"tel"),cellphone:Bt(jt.cellphone,"tel"),cep:Bt(jt.cep,"decimal"),cnpj:Bt(jt.cnpj,"decimal"),color:Bt(jt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Bt(jt.cpf,"decimal"),cpfCnpj:Bt(jt.cpfCnpj,"decimal",{transform:Ks}),creditCard:Bt(jt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Bt(jt.date,"decimal"),int:Bt(jt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Bt(jt.isoDate,"decimal"),telephone:Bt(jt.telephone,"tel"),time:Bt(jt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Bt(jt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Jg(e,t,n,r){var o,i;r===void 0&&(r=qs);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],h=s[c];if(d===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(h)&&(a+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,h))!==null&&i!==void 0?i:h),c+=1,l+=1}return a}var ey=function(e){return e},MO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Di(e,n,t));return r.test(n)};function DO(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var NO=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,h=e.as,f=Hc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Gc(a),v=Gc(d),g=Gc(u),w=b.useRef(MO(u,i,f.value||f.defaultValue)),y=h??"input",T=Uc(b.useState(""),2),S=T[0],E=T[1],I=DO(S),P=b.useCallback(function(_,N){var $,z,U=($=_??N)!==null&&$!==void 0?$:"";if(u===void 0)return U;var A=(z=U==null?void 0:U.toString())!==null&&z!==void 0?z:"";return Jg(A,typeof u=="function"?u(A):u,s??ey,c??qs)},[s,u,c]),O=Uc(b.useState(function(){return P(f.value,f.defaultValue)}),2),C=O[0],V=O[1],D=P(f.defaultValue,f.defaultValue),L=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(C);return Array.isArray(_)?Kc(_,i):Di(u,C,i)}return typeof u=="string"?Di(u,C,i):Kc(u,i)},[l,C,i,u]);b.useEffect(function(){if(f.value!==void 0){var _=P(f.value,f.defaultValue);V(_),p.current!==null&&(p.current.value=_)}},[f.value,u,s,f.defaultValue]);var k=function(_){var N,$,z,U,A,j=_.currentTarget,Z=_.target.value;if(g.current===void 0)return V(Z),(N=v.current)===null||N===void 0||N.call(v,Z),($=m.current)===null||$===void 0||$.call(m,_),d==null?void 0:d(Z);var ne=new RegExp(Di(g.current,Z,i)),Q=(z=j.selectionEnd)!==null&&z!==void 0?z:0,G=function(Y,se,H){if(Y.type!=="number")return Y.setSelectionRange(se,H)};if(r&&w.current&&Z.length>=C.length)return j.value=C,G(j,Q-1,Q-1);var F=!1;Z.length<I.length&&(w.current=!1,F=!0),ne.test(Z)&&(w.current=!0);var B=Q,W=Z[B-1],R=Jg(Z,typeof g.current=="function"?g.current(Z):g.current,s??ey,c??qs);for(j.value=R,V(R);B<R.length&&R.charAt(B-1)!==W;)B+=1;F?G(j,Q,Q):G(j,B,B),_.target.value=R,E(R),(U=v.current)===null||U===void 0||U.call(v,R),(A=m.current)===null||A===void 0||A.call(m,_)};return b.createElement(y,Ct({},f,{ref:p,pattern:L,onChange:k,defaultValue:ty(f.defaultValue)?D:void 0,value:ty(f.value)?P(f.value,f.value):f.value}))}),ty=function(e){return typeof e=="string"},ny=b.forwardRef(function(e,t){return wO(e.mask)?b.createElement(SO,Ct({},e,{mask:void 0,ref:t})):EO(e.mask)?b.createElement(PO,Ct({},e,{mask:void 0,ref:t})):b.createElement(NO,Ct({},e,{ref:t}))}),zt=function(e){return function(t){return b.createElement(ny,Ct({},e,t))}};zt(_t.cellTelephone),zt(_t.cellphone),zt(_t.cep),zt(_t.cnpj),zt(_t.color),zt(_t.cpf),zt(_t.cpfCnpj),zt(_t.creditCard),zt(_t.date),zt(_t.int),zt(_t.isoDate),zt(_t.telephone),zt(_t.time),zt(_t.uuid);var ry=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&bO(_t,t.mask)?_t[t.mask]:{mask:t.mask}},[t.mask]),o=Ct(Ct({},t),r);return b.createElement(ny,Ct({},o,{ref:n}))}),Zc={},Xc={exports:{}},Qc={};/**
|
|
142
|
+
*/const Sg=tt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Tg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},dk={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Eg=e=>x.jsx(Ct.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:Tg.false,transition:dk,variants:Tg,children:e.children}),fk=ri("px-4 py-4 border relative rounded-lg text-sm",{variants:{theme:{neutral:"border-border bg-background",danger:"text-danger-contrast bg-danger/10 border-danger/50",success:"text-success-foreground bg-success/10 border-success/50",info:"text-info bg-info/10 border-info/50"}},defaultVariants:{theme:"neutral"}}),hk=b.forwardRef(function({className:t,theme:n,onClose:r,open:o=!0,...i},s){return x.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"pointer-events-none isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:x.jsx(Eg,{"data-open":!!o,open:!!o,children:x.jsxs(eo,{...i,className:$e(fk({theme:n}),t),ref:s,"data-theme":n,role:"alert",as:i.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?x.jsx(wg,{size:20}):null,n==="info"?x.jsx(xg,{size:20}):null,n==="danger"?x.jsx(nk,{size:20}):null,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,r!==void 0?x.jsx("button",{type:"button",onClick:()=>r(!1),className:"duration-300 ease-in-out absolute right-3 top-3 text-foreground transition-colors hover:text-danger",children:x.jsx(Sg,{size:20})}):null]})})})});function De(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 qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function go(e,t){const n=De(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Hs(e,t){const n=De(e);if(isNaN(t))return qe(e,NaN);if(!t)return n;const r=n.getDate(),o=qe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Cg=6048e5,pk=864e5,mk=6e4,gk=36e5,yk=1e3;let vk={};function kr(){return vk}function vn(e,t){var a,l,c,u;const n=kr(),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=De(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function yo(e){return vn(e,{weekStartsOn:1})}function Pg(e){const t=De(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=yo(r),i=qe(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=yo(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function vo(e){const t=De(e);return t.setHours(0,0,0,0),t}function Us(e){const t=De(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 bk(e,t){const n=vo(e),r=vo(t),o=+n-Us(n),i=+r-Us(r);return Math.round((o-i)/pk)}function wk(e){const t=Pg(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),yo(n)}function kg(e,t){const n=t*7;return go(e,n)}function Ig(e,t){return Hs(e,t*12)}function xk(e){return qe(e,Date.now())}function Sk(e,t){const n=vo(e),r=vo(t);return+n==+r}function Tk(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Og(e){if(!Tk(e)&&typeof e!="number")return!1;const t=De(e);return!isNaN(Number(t))}function Ag(e,t){const n=De(e.start),r=De(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(De(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function _g(e){const t=De(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ek(e){const t=De(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ck(e,t){var a,l;const n=kr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=De(e),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const Pk={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"}},kk=(e,t,n)=>{let r;const o=Pk[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 zc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ik={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ok={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ak={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_k={date:zc({formats:Ik,defaultWidth:"full"}),time:zc({formats:Ok,defaultWidth:"full"}),dateTime:zc({formats:Ak,defaultWidth:"full"})},Mk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dk=(e,t,n,r)=>Mk[e];function Oi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Fk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Nk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lk={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"]},Vk={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"]},$k={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"}},Rk={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"}},jk={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:Oi({values:Fk,defaultWidth:"wide"}),quarter:Oi({values:Nk,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Oi({values:Lk,defaultWidth:"wide"}),day:Oi({values:Vk,defaultWidth:"wide"}),dayPeriod:Oi({values:$k,defaultWidth:"wide",formattingValues:Rk,defaultFormattingWidth:"wide"})};function Ai(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?zk(a,d=>d.test(s)):Bk(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function Bk(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function zk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Wk(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const Hk=/^(\d+)(th|st|nd|rd)?/i,Uk=/\d+/i,Gk={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},Yk={any:[/^b/i,/^(a|c)/i]},qk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Kk={any:[/1/i,/2/i,/3/i,/4/i]},Zk={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},Xk={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]},Qk={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},Jk={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]},eI={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},tI={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}},nI={ordinalNumber:Wk({matchPattern:Hk,parsePattern:Uk,valueCallback:e=>parseInt(e,10)}),era:Ai({matchPatterns:Gk,defaultMatchWidth:"wide",parsePatterns:Yk,defaultParseWidth:"any"}),quarter:Ai({matchPatterns:qk,defaultMatchWidth:"wide",parsePatterns:Kk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ai({matchPatterns:Zk,defaultMatchWidth:"wide",parsePatterns:Xk,defaultParseWidth:"any"}),day:Ai({matchPatterns:Qk,defaultMatchWidth:"wide",parsePatterns:Jk,defaultParseWidth:"any"}),dayPeriod:Ai({matchPatterns:eI,defaultMatchWidth:"any",parsePatterns:tI,defaultParseWidth:"any"})},Mg={code:"en-US",formatDistance:kk,formatLong:_k,formatRelative:Dk,localize:jk,match:nI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function rI(e){const t=De(e);return bk(t,Ek(t))+1}function Dg(e){const t=De(e),n=+yo(t)-+wk(t);return Math.round(n/Cg)+1}function Wc(e,t){var u,d,h,f;const n=De(e),r=n.getFullYear(),o=kr(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(h=o.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,s=qe(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=vn(s,t),l=qe(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=vn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function oI(e,t){var a,l,c,u;const n=kr(),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=Wc(e,t),i=qe(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),vn(i,t)}function Fg(e,t){const n=De(e),r=+vn(n,t)-+oI(n,t);return Math.round(r/Cg)+1}function Re(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const tr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Re(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Re(n+1,2)},d(e,t){return Re(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 Re(e.getHours()%12||12,t.length)},H(e,t){return Re(e.getHours(),t.length)},m(e,t){return Re(e.getMinutes(),t.length)},s(e,t){return Re(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Re(o,t.length)}},bo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ng={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 tr.y(e,t)},Y:function(e,t,n,r){const o=Wc(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Re(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Re(i,t.length)},R:function(e,t){const n=Pg(e);return Re(n,t.length)},u:function(e,t){const n=e.getFullYear();return Re(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 Re(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 Re(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 tr.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 Re(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=Fg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Re(o,t.length)},I:function(e,t,n){const r=Dg(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Re(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):tr.d(e,t)},D:function(e,t,n){const r=rI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Re(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Re(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Re(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Re(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=bo.noon:r===0?o=bo.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=bo.evening:r>=12?o=bo.afternoon:r>=4?o=bo.morning:o=bo.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 tr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):tr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Re(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Re(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):tr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):tr.s(e,t)},S:function(e,t){return tr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Vg(r);case"XXXX":case"XX":return Ir(r);case"XXXXX":case"XXX":default:return Ir(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Vg(r);case"xxxx":case"xx":return Ir(r);case"xxxxx":case"xxx":default:return Ir(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Lg(r,":");case"OOOO":default:return"GMT"+Ir(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Lg(r,":");case"zzzz":default:return"GMT"+Ir(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Re(r,t.length)},T:function(e,t,n){const r=e.getTime();return Re(r,t.length)}};function Lg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Re(i,2)}function Vg(e,t){return e%60===0?(e>0?"-":"+")+Re(Math.abs(e)/60,2):Ir(e,t)}function Ir(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Re(Math.trunc(r/60),2),i=Re(r%60,2);return n+o+t+i}const $g=(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"})}},Rg=(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"})}},Hc={p:Rg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $g(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",$g(r,t)).replace("{{time}}",Rg(o,t))}},iI=/^D+$/,sI=/^Y+$/,aI=["D","DD","YY","YYYY"];function jg(e){return iI.test(e)}function Bg(e){return sI.test(e)}function Uc(e,t,n){const r=lI(e,t,n);if(console.warn(r),aI.includes(e))throw new RangeError(r)}function lI(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 cI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dI=/^'([^]*?)'?$/,fI=/''/g,hI=/[a-zA-Z]/;function pI(e,t,n){var u,d,h,f;const r=kr(),o=r.locale??Mg,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,a=De(e);if(!Og(a))throw new RangeError("Invalid time value");let l=t.match(uI).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Hc[m];return v(p,o.formatLong)}return p}).join("").match(cI).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:mI(p)};if(Ng[m])return{isToken:!0,value:p};if(m.match(hI))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:i,weekStartsOn:s,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Bg(m)||jg(m))&&Uc(m,t,String(e));const v=Ng[m[0]];return v(a,m,o.localize,c)}).join("")}function mI(e){const t=e.match(dI);return t?t[1].replace(fI,"'"):e}function gI(){return Object.assign({},kr())}function yI(e){let n=De(e).getDay();return n===0&&(n=7),n}function vI(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function bI(e,t){const n=De(e),r=De(t);return+n<+r}function wI(e,t){const n=t instanceof Date?qe(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 xI=10;class zg{constructor(){oe(this,"subPriority",0)}validate(t,n){return!0}}class SI extends zg{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class TI extends zg{constructor(){super(...arguments);oe(this,"priority",xI);oe(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,wI(n,Date))}}class Fe{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new SI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class EI extends Fe{constructor(){super(...arguments);oe(this,"priority",140);oe(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 ct={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}/},bn={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 ut(e,t){return e&&{value:t(e.value),rest:e.rest}}function Qe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function wn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*gk+i*mk+s*yk),rest:t.slice(n[0].length)}}function Wg(e){return Qe(ct.anyDigitsSigned,e)}function nt(e,t){switch(e){case 1:return Qe(ct.singleDigit,t);case 2:return Qe(ct.twoDigits,t);case 3:return Qe(ct.threeDigits,t);case 4:return Qe(ct.fourDigits,t);default:return Qe(new RegExp("^\\d{1,"+e+"}"),t)}}function Gs(e,t){switch(e){case 1:return Qe(ct.singleDigitSigned,t);case 2:return Qe(ct.twoDigitsSigned,t);case 3:return Qe(ct.threeDigitsSigned,t);case 4:return Qe(ct.fourDigitsSigned,t);default:return Qe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Gc(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 Hg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function Ug(e){return e%400===0||e%4===0&&e%100!==0}class CI extends Fe{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return ut(nt(4,n),i);case"yo":return ut(o.ordinalNumber(n,{unit:"year"}),i);default:return ut(nt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const a=Hg(o.year,i);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class PI extends Fe{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ut(nt(4,n),i);case"Yo":return ut(o.ordinalNumber(n,{unit:"year"}),i);default:return ut(nt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=Wc(n,i);if(o.isTwoDigitYear){const l=Hg(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,i)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,i)}}class kI extends Fe{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Gs(r==="R"?4:r.length,n)}set(n,r,o){const i=qe(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),yo(i)}}class II extends Fe{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Gs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class OI extends Fe{constructor(){super(...arguments);oe(this,"priority",120);oe(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 nt(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 AI extends Fe{constructor(){super(...arguments);oe(this,"priority",120);oe(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 nt(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 _I extends Fe{constructor(){super(...arguments);oe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);oe(this,"priority",110)}parse(n,r,o){const i=s=>s-1;switch(r){case"M":return ut(Qe(ct.month,n),i);case"MM":return ut(nt(2,n),i);case"Mo":return ut(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class MI extends Fe{constructor(){super(...arguments);oe(this,"priority",110);oe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=s=>s-1;switch(r){case"L":return ut(Qe(ct.month,n),i);case"LL":return ut(nt(2,n),i);case"Lo":return ut(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function DI(e,t,n){const r=De(e),o=Fg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class FI extends Fe{constructor(){super(...arguments);oe(this,"priority",100);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Qe(ct.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return vn(DI(n,o,i),i)}}function NI(e,t){const n=De(e),r=Dg(n)-t;return n.setDate(n.getDate()-r*7),n}class LI extends Fe{constructor(){super(...arguments);oe(this,"priority",100);oe(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 Qe(ct.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return yo(NI(n,o))}}const VI=[31,28,31,30,31,30,31,31,30,31,30,31],$I=[31,29,31,30,31,30,31,31,30,31,30,31];class RI extends Fe{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"subPriority",1);oe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Qe(ct.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return nt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Ug(o),s=n.getMonth();return i?r>=1&&r<=$I[s]:r>=1&&r<=VI[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class jI extends Fe{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"subpriority",1);oe(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 Qe(ct.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return nt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Ug(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 Yc(e,t,n){var d,h,f,p;const r=kr(),o=(n==null?void 0:n.weekStartsOn)??((h=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,i=De(e),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return go(i,u)}class BI extends Fe{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Yc(n,o,i),n.setHours(0,0,0,0),n}}class zI extends Fe{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ut(nt(r.length,n),s);case"eo":return ut(o.ordinalNumber(n,{unit:"day"}),s);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Yc(n,o,i),n.setHours(0,0,0,0),n}}class WI extends Fe{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ut(nt(r.length,n),s);case"co":return ut(o.ordinalNumber(n,{unit:"day"}),s);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Yc(n,o,i),n.setHours(0,0,0,0),n}}function HI(e,t){const n=De(e),r=yI(n),o=t-r;return go(n,o)}class UI extends Fe{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=s=>s===0?7:s;switch(r){case"i":case"ii":return nt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ut(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return ut(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return ut(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return ut(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=HI(n,o),n.setHours(0,0,0,0),n}}class GI extends Fe{constructor(){super(...arguments);oe(this,"priority",80);oe(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(Gc(o),0,0,0),n}}class YI extends Fe{constructor(){super(...arguments);oe(this,"priority",80);oe(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(Gc(o),0,0,0),n}}class qI extends Fe{constructor(){super(...arguments);oe(this,"priority",80);oe(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(Gc(o),0,0,0),n}}class KI extends Fe{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Qe(ct.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class ZI extends Fe{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Qe(ct.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class XI extends Fe{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Qe(ct.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return nt(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 QI extends Fe{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Qe(ct.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class JI extends Fe{constructor(){super(...arguments);oe(this,"priority",60);oe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Qe(ct.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class eO extends Fe{constructor(){super(...arguments);oe(this,"priority",50);oe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Qe(ct.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class tO extends Fe{constructor(){super(...arguments);oe(this,"priority",30);oe(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return ut(nt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class nO extends Fe{constructor(){super(...arguments);oe(this,"priority",10);oe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return wn(bn.basicOptionalMinutes,n);case"XX":return wn(bn.basic,n);case"XXXX":return wn(bn.basicOptionalSeconds,n);case"XXXXX":return wn(bn.extendedOptionalSeconds,n);case"XXX":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-Us(n)-o)}}class rO extends Fe{constructor(){super(...arguments);oe(this,"priority",10);oe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return wn(bn.basicOptionalMinutes,n);case"xx":return wn(bn.basic,n);case"xxxx":return wn(bn.basicOptionalSeconds,n);case"xxxxx":return wn(bn.extendedOptionalSeconds,n);case"xxx":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-Us(n)-o)}}class oO extends Fe{constructor(){super(...arguments);oe(this,"priority",40);oe(this,"incompatibleTokens","*")}parse(n){return Wg(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class iO extends Fe{constructor(){super(...arguments);oe(this,"priority",20);oe(this,"incompatibleTokens","*")}parse(n){return Wg(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const sO={G:new EI,y:new CI,Y:new PI,R:new kI,u:new II,Q:new OI,q:new AI,M:new _I,L:new MI,w:new FI,I:new LI,d:new RI,D:new jI,E:new BI,e:new zI,c:new WI,i:new UI,a:new GI,b:new YI,B:new qI,h:new KI,H:new ZI,K:new XI,k:new QI,m:new JI,s:new eO,S:new tO,X:new nO,x:new rO,t:new oO,T:new iO},aO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cO=/^'([^]*?)'?$/,uO=/''/g,dO=/\S/,fO=/[a-zA-Z]/;function hO(e,t,n,r){var m,v,y,w;const o=gI(),i=o.locale??Mg,s=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(y=o.locale)==null?void 0:y.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?De(n):qe(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new TI],u=t.match(lO).map(g=>{const T=g[0];if(T in Hc){const S=Hc[T];return S(g,i.formatLong)}return g}).join("").match(aO),d=[];for(let g of u){Bg(g)&&Uc(g,t,e),jg(g)&&Uc(g,t,e);const T=g[0],S=sO[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const P=d.find(O=>E.includes(O.token)||O.token===T);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${g}\` at the same time`)}else if(S.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:T,fullToken:g});const I=S.run(e,g,i.match,l);if(!I)return qe(n,NaN);c.push(I.setter),e=I.rest}else{if(T.match(fO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=pO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return qe(n,NaN)}}if(e.length>0&&dO.test(e))return qe(n,NaN);const h=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,S)=>S.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,S)=>S.subPriority-T.subPriority)).map(g=>g[0]);let f=De(n);if(isNaN(f.getTime()))return qe(n,NaN);const p={};for(const g of h){if(!g.validate(f,l))return qe(n,NaN);const T=g.set(f,p,l);Array.isArray(T)?(f=T[0],Object.assign(p,T[1])):f=T}return qe(n,f)}function pO(e){return e.match(cO)[1].replace(uO,"'")}function mO(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function gO(e){return Sk(e,xk(e))}function yO(e,t){return go(e,-t)}function Gg(e,t){return Hs(e,-t)}function vO(e,t){return kg(e,-t)}function bO(e,t){return Ig(e,-t)}var dt=function(){return dt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},dt.apply(this,arguments)};function qc(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 Kc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var _i=function(e){return e.replace(new RegExp(" ","g")," ")},Yg=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)},wO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},qg=function(e,t,n){var r=e.length-2,o=wO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Kg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ys=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},xO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Zc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},SO=function(e){return e==="money"||e==="currency"},TO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return dt(dt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},qs=function(e,t){var n=Yg(Kg(e),t.fraction.length),r="".concat(t.currency).concat(qg(n,t.group,t.decimal));return _i(r)},EO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=qc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=TO(r,i,a);return p.currency=_i("".concat(p.currency.trim()," ")),p.literal=_i(p.literal.trim()),p},[r,i]),h=function(p){var m=qs(p.target.value,d),v=Ys(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)};b.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=qs(p,d),v=Ys(m);u.current.value=m,u.current.setAttribute("data-number",v.toString());var y=new InputEvent("change",{});l==null||l(dt(dt({},y),{target:u.current,currentTarget:u.current})),v!==0&&(u.current.selectionEnd=m.length)}}},[d]);var f=c.defaultValue?qs(c.defaultValue,d):void 0;return b.createElement("input",dt({},c,{value:typeof c.value=="string"?qs(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),CO=1,PO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},kO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return dt(dt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Ks=function(e,t){var n=Yg(Kg(e),t.fraction.length),r="".concat(qg(n,t.group,t.decimal)," ").concat(t.percentSign);return _i(r)},IO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=qc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Kc(b.useState(function(){var y,w;return(w=(y=s.value)===null||y===void 0?void 0:y.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var y,w=Number.parseFloat("".concat((y=s.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(Ks(w,d))},[s.value]);var d=b.useMemo(function(){var y=kO(r);return y.percentSign=_i("".concat(y.percentSign)),y},[r]),h=c.length-d.percentSign.length-CO,f=function(y){var w,g=a.current;g&&(g.setSelectionRange(h,h),y&&((w=s.onFocus)===null||w===void 0||w.call(s,y)))},p=function(y){var w=y.currentTarget;if(w.selectionStart!==null){var g=w.selectionStart,T=w.selectionEnd,S=g!==T,E=h<g;!S&&E&&f()}i==null||i(y)},m=function(y){var w=Ks(y.target.value,d),g=Ys(w);u(w),y.target.value=w,y.target.setAttribute("data-number",g.toString()),o==null||o(y)};b.useEffect(function(){if(a.current!==null){var y=a.current.value;if(y!==""){var w=Ks(y,d),g=Ys(w);u(w),a.current.value=w,a.current.setAttribute("data-number",g.toString());var T=new InputEvent("change",{});o==null||o(dt(dt({},T),{target:a.current,currentTarget:a.current}))}}},[]),b.useEffect(function(){return f()},[c]);var v=s.defaultValue?Ks(s.defaultValue,d):void 0;return b.createElement("input",dt({},s,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:f,onKeyUp:p,ref:a,type:"text"}))}),Mi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},OO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=Zs[i];s===void 0?r.push(i.replace(Mi.dots,"\\.").replace(Mi.openParenthesis,"\\(").replace(Mi.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Mi.leadingBars,"\\")},Di=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Xc(o,n);var i=OO(o);return n?"^".concat(i,"$"):i},AO=function(e){return e.replace(Mi.escape,"\\$&")},Xc=function(e,t){var n=e.map(function(r){return typeof r=="string"?AO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Zs={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]/}},_O=/\d/,Zg="(dd) 9dddd-dddd",Xg="(dd) dddd-dddd",Qg="ddd.ddd.ddd-dd",Jg="dd.ddd.ddd/dddd-dd",Xs=function(e){return e.replace(/\D/g,"")},MO=["2",/[0-3]/,":",/[0-5]/,/\d/],DO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],jt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Qg,isoDate:"dddd-dd-dd",cnpj:Jg,telephone:Xg,cellphone:Zg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Xs(e).length<=11?Qg:Jg},int:function(e){return e===void 0&&(e=""),_O.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=Xs(e);return t.length<11?Xg:Zg},time:function(e){var t=Xs(e),n=t[0];return n==="2"?MO:DO}},Bt=function(e,t,n){var r;return n===void 0&&(n={}),dt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Di(e,"",!0),infinity:n.infinity},n)},_t={cellTelephone:Bt(jt.cellTelephone,"tel"),cellphone:Bt(jt.cellphone,"tel"),cep:Bt(jt.cep,"decimal"),cnpj:Bt(jt.cnpj,"decimal"),color:Bt(jt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Bt(jt.cpf,"decimal"),cpfCnpj:Bt(jt.cpfCnpj,"decimal",{transform:Xs}),creditCard:Bt(jt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Bt(jt.date,"decimal"),int:Bt(jt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Bt(jt.isoDate,"decimal"),telephone:Bt(jt.telephone,"tel"),time:Bt(jt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Bt(jt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ey(e,t,n,r){var o,i;r===void 0&&(r=Zs);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],h=s[c];if(d===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(h)&&(a+=(i=(o=f.parse)===null||o===void 0?void 0:o.call(f,h))!==null&&i!==void 0?i:h),c+=1,l+=1}return a}var ty=function(e){return e},FO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Di(e,n,t));return r.test(n)};function NO(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var LO=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,h=e.as,f=qc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Zc(a),v=Zc(d),y=Zc(u),w=b.useRef(FO(u,i,f.value||f.defaultValue)),g=h??"input",T=Kc(b.useState(""),2),S=T[0],E=T[1],I=NO(S),P=b.useCallback(function(_,F){var $,H,U=($=_??F)!==null&&$!==void 0?$:"";if(u===void 0)return U;var A=(H=U==null?void 0:U.toString())!==null&&H!==void 0?H:"";return ey(A,typeof u=="function"?u(A):u,s??ty,c??Zs)},[s,u,c]),O=Kc(b.useState(function(){return P(f.value,f.defaultValue)}),2),C=O[0],L=O[1],D=P(f.defaultValue,f.defaultValue),V=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(C);return Array.isArray(_)?Xc(_,i):Di(u,C,i)}return typeof u=="string"?Di(u,C,i):Xc(u,i)},[l,C,i,u]);b.useEffect(function(){if(f.value!==void 0){var _=P(f.value,f.defaultValue);L(_),p.current!==null&&(p.current.value=_)}},[f.value,u,s,f.defaultValue]);var k=function(_){var F,$,H,U,A,j=_.currentTarget,Z=_.target.value;if(y.current===void 0)return L(Z),(F=v.current)===null||F===void 0||F.call(v,Z),($=m.current)===null||$===void 0||$.call(m,_),d==null?void 0:d(Z);var ne=new RegExp(Di(y.current,Z,i)),Q=(H=j.selectionEnd)!==null&&H!==void 0?H:0,G=function(Y,se,W){if(Y.type!=="number")return Y.setSelectionRange(se,W)};if(r&&w.current&&Z.length>=C.length)return j.value=C,G(j,Q-1,Q-1);var N=!1;Z.length<I.length&&(w.current=!1,N=!0),ne.test(Z)&&(w.current=!0);var B=Q,z=Z[B-1],R=ey(Z,typeof y.current=="function"?y.current(Z):y.current,s??ty,c??Zs);for(j.value=R,L(R);B<R.length&&R.charAt(B-1)!==z;)B+=1;N?G(j,Q,Q):G(j,B,B),_.target.value=R,E(R),(U=v.current)===null||U===void 0||U.call(v,R),(A=m.current)===null||A===void 0||A.call(m,_)};return b.createElement(g,dt({},f,{ref:p,pattern:V,onChange:k,defaultValue:ny(f.defaultValue)?D:void 0,value:ny(f.value)?P(f.value,f.value):f.value}))}),ny=function(e){return typeof e=="string"},ry=b.forwardRef(function(e,t){return SO(e.mask)?b.createElement(EO,dt({},e,{mask:void 0,ref:t})):PO(e.mask)?b.createElement(IO,dt({},e,{mask:void 0,ref:t})):b.createElement(LO,dt({},e,{ref:t}))}),zt=function(e){return function(t){return b.createElement(ry,dt({},e,t))}};zt(_t.cellTelephone),zt(_t.cellphone),zt(_t.cep),zt(_t.cnpj),zt(_t.color),zt(_t.cpf),zt(_t.cpfCnpj),zt(_t.creditCard),zt(_t.date),zt(_t.int),zt(_t.isoDate),zt(_t.telephone),zt(_t.time),zt(_t.uuid);var oy=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&xO(_t,t.mask)?_t[t.mask]:{mask:t.mask}},[t.mask]),o=dt(dt({},t),r);return b.createElement(ry,dt({},o,{ref:n}))}),Qc={},Jc={exports:{}},eu={};/**
|
|
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 iy;function VO(){if(iy)return eu;iy=1;var e=b;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),m=p[0].inst,v=p[1];return i(function(){m.value=f,m.getSnapshot=h,l(m)&&v({inst:m})},[d,f,h]),o(function(){return l(m)&&v({inst:m}),d(function(){l(m)&&v({inst:m})})},[d]),s(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return eu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,eu}var sy={};/**
|
|
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 ay;function $O(){return ay||(ay=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=b,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var T=arguments.length,S=new Array(T>1?T-1:0),E=1;E<T;E++)S[E-1]=arguments[E];r("error",g,S)}}function r(g,T,S){{var E=t.ReactDebugCurrentFrame,I=E.getStackAddendum();I!==""&&(T+="%s",S=S.concat([I]));var P=S.map(function(O){return String(O)});P.unshift("Warning: "+T),Function.prototype.apply.call(console[g],console,P)}}function o(g,T){return g===T&&(g!==0||1/g===1/T)||g!==g&&T!==T}var i=typeof Object.is=="function"?Object.is:o,s=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function h(g,T,S){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=T();if(!d){var I=T();i(E,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var P=s({inst:{value:E,getSnapshot:T}}),O=P[0].inst,C=P[1];return l(function(){O.value=E,O.getSnapshot=T,f(O)&&C({inst:O})},[g,E,T]),a(function(){f(O)&&C({inst:O});var L=function(){f(O)&&C({inst:O})};return g(L)},[g]),c(E),E}function f(g){var T=g.getSnapshot,S=g.value;try{var E=T();return!i(S,E)}catch{return!0}}function p(g,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,y=v?p:h,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;sy.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),sy}var ly;function cy(){return ly||(ly=1,process.env.NODE_ENV==="production"?Jc.exports=VO():Jc.exports=$O()),Jc.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 uy;function RO(){if(uy)return Qc;uy=1;var e=b,t=cy();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Qc.useSyncExternalStoreWithSelector=function(c,u,d,h,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(E){if(!w){if(w=!0,g=E,E=h(E),f!==void 0&&m.hasValue){var I=m.value;if(f(I,E))return T=I}return T=E}if(I=T,r(g,E))return I;var P=h(E);return f!==void 0&&f(I,P)?I:(g=E,T=P)}var w=!1,g,T,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,h,f]);var v=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},Qc}var dy={};/**
|
|
167
167
|
* @license React
|
|
168
168
|
* use-sync-external-store-shim/with-selector.development.js
|
|
169
169
|
*
|
|
@@ -171,31 +171,31 @@
|
|
|
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 dy;function $O(){return dy||(dy=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=b,t=ly();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,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,h,f,p){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var g=a(function(){var S=!1,E,I,P=function(D){if(!S){S=!0,E=D;var L=f(D);if(p!==void 0&&v.hasValue){var k=v.value;if(p(k,L))return I=k,k}return I=L,L}var _=E,N=I;if(r(_,D))return N;var $=f(D);return p!==void 0&&p(N,$)?N:(E=D,I=$,$)},O=h===void 0?null:h,C=function(){return P(d())},V=O===null?void 0:function(){return P(O())};return[C,V]},[d,h,f,p]),w=g[0],y=g[1],T=o(u,w,y);return s(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}uy.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),uy}process.env.NODE_ENV==="production"?VO():$O();const wo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},RO=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},jO=e=>Object.entries(e),fy=e=>e instanceof Promise,hy=(e,t,n,r)=>t===e?n.reduce((o,i)=>i(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,i)=>i(o,t,r),{...t,...e}):n.reduce((o,i)=>i(o,t,r),e),BO=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,d)=>n(h=>hy(u,h,i,d));return fy(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))},zO=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>hy(c,u,i,o.current));return fy(a)?a.then(c=>l(c)):l(a)},Jc=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=wo(r),s=wo((n==null?void 0:n.props)??{}),a=wo(t),l=wo((n==null?void 0:n.postMiddleware)??[]),c=wo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=RO(r),h=wo(d),f=b.useRef(null);b.useEffect(()=>{if(f.current===null)return;const m=f.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>s.current,v=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>h.current});return jO(v).reduce((g,[w,y])=>({...g,[w]:n!=null&&n.debug?BO(w,y,o,m,f,c.current):zO(w,y,o,m,f,c.current)}),{})});return[r,p,s.current]},WO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function HO(e,t){return b.useRef(WO(e,t)).current}const eu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",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",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(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To"},py=b.createContext({translations:eu}),UO=e=>{const t=b.useMemo(()=>({translations:{...eu,...e.map}}),[e.map]);return x.jsx(py.Provider,{value:t,children:e.children})},Wt=()=>{const e=b.useContext(py);return e?e.translations:eu},Zs=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),my=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),gy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},yy=(e,t)=>{const n=my(t,gy.basic,e)||my(t,gy.extend,e);return n===void 0||n===e?void 0:n},Xs=()=>typeof window>"u",tu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),vy=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},GO={type:"spring",bounce:.3,duration:.6},by=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),wy={middle:{x:"0%",opacity:1},enter:by(1),exit:by(-1)},xy={exit:{visibility:"hidden"}},YO=e=>{const t=yn(Og(e));return Ig({start:t,end:go(t,41)})},Sy=(e,t)=>e.toLocaleDateString(t,{month:"long"}),qO=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Og(new Date(e).setMonth(r)),i=Sy(o,t);return x.jsx("option",{value:i,"data-index":r,children:i},i)}),nu={ArrowLeft:(e,t)=>t==="days"?mO(e,1):Hg(e,1),ArrowRight:(e,t)=>t==="days"?go(e,1):Us(e,1),ArrowUp:(e,t)=>t==="days"?gO(e,1):yO(e,1),ArrowDown:(e,t)=>t==="days"?Cg(e,1):Pg(e,1)},Ty=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var s;if(e!=null&&e.dataset.focustrap){const a=(s=t.current)==null?void 0:s.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&&i(),setTimeout(i,r)},Ar=e=>e.getFullYear().toString().padStart(4,"0"),KO=(e,t,n)=>e===void 0||n===void 0?!1:gI(t,e)&&yI(t,n),Ey=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:i,onChangeYear:s,rangeMode:a=!1,onChange:l,styles:c,...u})=>{const d=Wt(),h=b.useRef(null),{date:f,range:p}=u,m=f||new Date,v=b.useRef(null),[g,w]=Jc({date:m,isAnimating:!1,year:Ar(m),months:qO(m,r),direction:void 0,range:{from:p==null?void 0:p.from,to:p==null?void 0:p.to},selectMode:a?"from":void 0,week:Ig({start:yn(m),end:Tk(m)})},P=>({onChangeYear:O=>({year:O}),setToday:()=>({date:vo(new Date)}),onExitComplete:()=>(Ty(v.current||null,h,P.state().date,200),v.current=null,{isAnimating:!1}),date:O=>{const C=O(P.state().date);return{date:C,year:Ar(C)}},nextMonth:O=>{v.current=O.currentTarget;const C=P.state();if(C.isAnimating)return C;const V=Us(C.date,1);return{date:V,isAnimating:!0,direction:1,year:Ar(V)}},previousMonth:O=>{v.current=O.currentTarget;const C=P.state();if(C.isAnimating)return C;const V=Hg(C.date,1);return{date:V,isAnimating:!0,direction:-1,year:Ar(V)}},onSelectDate:O=>{const C=P.state(),V=O.currentTarget.dataset.range==="true",D=O.currentTarget.dataset.date||"",L=new Date(D);return{date:L,year:Ar(L),selectMode:C.selectMode===void 0?void 0:C.selectMode==="from"?"to":"from",range:V?{from:C.selectMode==="from"?L:C.range.from,to:C.selectMode==="to"?L:C.range.to}:C.range}},onChangeMonth:O=>{const C=O.target.value,D=Array.from(O.target.options).find(k=>k.value===C),L=P.state();if(D){const k=D.dataset.index||"",_=new Date(P.state().date);return _.setMonth(+k),{...L,date:_,year:Ar(_)}}return L},onKeyDown:O=>{const C=O.key,V=P.state();if(C in nu){(C==="ArrowUp"||C==="ArrowDown")&&O.preventDefault();const D=P.state().date,L=_n.keyof(nu,C)?nu[C](D,O.shiftKey?"month":"days"):null;if(L!==null)return Ty(O.target,h,L),{...V,date:L,year:Ar(L)}}return P.state()}}),{props:{onChangeMonth:i,onChangeYear:s},postMiddleware:[(P,O,C)=>{var D,L;return(C.method==="onChangeMonth"||C.method==="previousMonth"||C.method==="nextMonth")&&((L=(D=C.props).onChangeMonth)==null||L.call(D,P.date)),P},(P,O,C)=>{var D,L;return C.method==="onChangeYear"&&((L=(D=C.props).onChangeYear)==null||L.call(D,P.date)),P},(P,O,C)=>{const V=C.method==="onSelectDate"||C.method==="setToday"||C.method==="onKeyDown";return a&&V&&t?(l==null||l(P.range),P):(V&&t&&(l==null||l(P.date)),P)}]}),y=vy(YO(g.date),7),T=g.date.toISOString(),S=Sy(g.date,r);b.useEffect(()=>{t||l==null||l(g.date)},[T]);const E=HO(P=>{w.date(O=>{const C=new Date(O);return C.setFullYear(+P),C})},1200),I=P=>{const O=P.currentTarget.value;w.onChangeYear(O),s==null||s(new Date(O)),E(O)};return x.jsx(sP,{transition:GO,children:x.jsxs("div",{ref:h,className:Be("relative overflow-hidden",c==null?void 0:c.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(Ii,{initial:!1,mode:"popLayout",custom:g.direction,onExitComplete:w.onExitComplete,children:x.jsxs(Et.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(Et.button,{layout:!0,"data-focustrap":"prev",variants:xy,onClick:w.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(JP,{className:"h-4 w-4"})}),x.jsx(Et.span,{layout:!0,variants:wy,custom:g.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:`${S.length}ch`},value:S,onChange:w.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:g.months}),x.jsx(ry,{mask:"int",value:g.year,maxLength:4,placeholder:"YYYY",onChange:I,style:{width:`${g.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(Et.button,{layout:!0,"data-focustrap":"next",variants:xy,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:w.nextMonth,children:x.jsx(Lc,{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(Et.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:g.week.map(P=>x.jsx("th",{className:Be("py-2 text-sm font-medium capitalize",c==null?void 0:c.weekDay),children:P.toLocaleDateString(r,{weekday:"short"})},P.toString()))})}),x.jsx(Et.tbody,{layout:!0,variants:wy,custom:g.direction,onKeyDown:w.onKeyDown,className:Be(c==null?void 0:c.week),children:y.map((P,O)=>x.jsx("tr",{className:c==null?void 0:c.week,children:P.map(C=>{var $,z,U,A;const V=C.toISOString(),D=a?V===(($=p==null?void 0:p.to)==null?void 0:$.toISOString())||V===((z=p==null?void 0:p.from)==null?void 0:z.toISOString()):V===(f==null?void 0:f.toISOString()),L=pO(C)&&o,k=(n==null?void 0:n(C))||!1,_=!hO(C,g.date)||k,N=a?KO(p==null?void 0:p.from,C,p==null?void 0:p.to):!1;return x.jsxs("td",{align:"center",className:Be("relative",c==null?void 0:c.dayFrame),children:[x.jsxs("button",{type:"button","data-date":V,disabled:k,"data-range":a,onClick:w.onSelectDate,"data-view":g.date.getMonth().toString(),className:Be(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${L?"text-primary":""} ${_?"text-disabled":""} ${D?"bg-primary text-primary-foreground":""}`,c==null?void 0:c.day,N?"size-10 border border-dashed border-card-border":""),children:[C.getDate(),D&&((U=g.range.from)==null?void 0:U.toISOString())===V?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs",children:d.calendarFromDate})}):null,D&&((A=g.range.to)==null?void 0:A.toISOString())===V?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs",children:d.calendarToDate})}):null]}),e?x.jsx(e,{date:C}):null]},V)})},`week-${P.length}-${O}`))})]})]},S)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:w.setToday,children:"Today"})})]})})},Cy=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>x.jsxs(to,{...s,as:n,className:Be("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?x.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,x.jsx("div",{className:Be("min-w-full px-8",i),children:e})]}),ZO=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:Be("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]}),Py=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},XO=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t};function rr(e){return ky(e)?(e.nodeName||"").toLowerCase():"#document"}function Lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ln(e){var t;return(t=(ky(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ky(e){return e instanceof Node||e instanceof Lt(e).Node}function ze(e){return e instanceof Element||e instanceof Lt(e).Element}function dt(e){return e instanceof HTMLElement||e instanceof Lt(e).HTMLElement}function ru(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Lt(e).ShadowRoot}function Ni(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function QO(e){return["table","td","th"].includes(rr(e))}function Qs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ou(e){const t=iu(),n=ze(e)?Yt(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 JO(e){let t=Vn(e);for(;dt(t)&&!or(t);){if(ou(t))return t;if(Qs(t))return null;t=Vn(t)}return null}function iu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function or(e){return["html","body","#document"].includes(rr(e))}function Yt(e){return Lt(e).getComputedStyle(e)}function Js(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vn(e){if(rr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ru(e)&&e.host||Ln(e);return ru(t)?t.host:t}function Iy(e){const t=Vn(e);return or(t)?e.ownerDocument?e.ownerDocument.body:e.body:dt(t)&&Ni(t)?t:Iy(t)}function ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Iy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Lt(o);if(i){const a=su(s);return t.concat(s,s.visualViewport||[],Ni(o)?o:[],a&&n?ir(a):[])}return t.concat(o,ir(o,[],n))}function su(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function rt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ru(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function au(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Oy(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Ay(e){return e.mozInputSource===0&&e.isTrusted?!0:uu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function lu(e){return eA()?!1:!uu()&&e.width===0&&e.height===0||uu()&&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 cu(){return/apple/i.test(navigator.vendor)}function uu(){const e=/android/i;return e.test(au())||e.test(Oy())}function _y(){return au().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function eA(){return Oy().includes("jsdom/")}function xo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function tA(e){return"nativeEvent"in e}function nA(e){return e.matches("html,body")}function wt(e){return(e==null?void 0:e.ownerDocument)||document}function du(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 wn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const rA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function fu(e){return dt(e)&&e.matches(rA)}function Pt(e){e.preventDefault(),e.stopPropagation()}function My(e){return e?e.getAttribute("role")==="combobox"&&fu(e):!1}const xn=Math.min,qt=Math.max,ea=Math.round,So=Math.floor,sr=e=>({x:e,y:e}),oA={left:"right",right:"left",bottom:"top",top:"bottom"},iA={start:"end",end:"start"};function hu(e,t,n){return qt(e,xn(t,n))}function To(e,t){return typeof e=="function"?e(t):e}function ar(e){return e.split("-")[0]}function Eo(e){return e.split("-")[1]}function Dy(e){return e==="x"?"y":"x"}function pu(e){return e==="y"?"height":"width"}function _r(e){return["top","bottom"].includes(ar(e))?"y":"x"}function mu(e){return Dy(_r(e))}function sA(e,t,n){n===void 0&&(n=!1);const r=Eo(e),o=mu(e),i=pu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ta(s)),[s,ta(s)]}function aA(e){const t=ta(e);return[gu(e),t,gu(t)]}function gu(e){return e.replace(/start|end/g,t=>iA[t])}function lA(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function cA(e,t,n,r){const o=Eo(e);let i=lA(ar(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(gu)))),i}function ta(e){return e.replace(/left|right|bottom|top/g,t=>oA[t])}function uA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ny(e){return typeof e!="number"?uA(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}}/*!
|
|
174
|
+
*/var fy;function jO(){return fy||(fy=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=b,t=cy();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,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,h,f,p){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var y=a(function(){var S=!1,E,I,P=function(D){if(!S){S=!0,E=D;var V=f(D);if(p!==void 0&&v.hasValue){var k=v.value;if(p(k,V))return I=k,k}return I=V,V}var _=E,F=I;if(r(_,D))return F;var $=f(D);return p!==void 0&&p(F,$)?F:(E=D,I=$,$)},O=h===void 0?null:h,C=function(){return P(d())},L=O===null?void 0:function(){return P(O())};return[C,L]},[d,h,f,p]),w=y[0],g=y[1],T=o(u,w,g);return s(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}dy.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),dy}process.env.NODE_ENV==="production"?RO():jO();const wo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},BO=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},zO=e=>Object.entries(e),hy=e=>e instanceof Promise,py=(e,t,n,r)=>t===e?n.reduce((o,i)=>i(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,i)=>i(o,t,r),{...t,...e}):n.reduce((o,i)=>i(o,t,r),e),WO=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,d)=>n(h=>py(u,h,i,d));return hy(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))},HO=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>py(c,u,i,o.current));return hy(a)?a.then(c=>l(c)):l(a)},tu=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=wo(r),s=wo((n==null?void 0:n.props)??{}),a=wo(t),l=wo((n==null?void 0:n.postMiddleware)??[]),c=wo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=BO(r),h=wo(d),f=b.useRef(null);b.useEffect(()=>{if(f.current===null)return;const m=f.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>s.current,v=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>h.current});return zO(v).reduce((y,[w,g])=>({...y,[w]:n!=null&&n.debug?WO(w,g,o,m,f,c.current):HO(w,g,o,m,f,c.current)}),{})});return[r,p,s.current]},UO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function GO(e,t){return b.useRef(UO(e,t)).current}const nu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",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",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(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To"},my=b.createContext({translations:nu}),YO=e=>{const t=b.useMemo(()=>({translations:{...nu,...e.map}}),[e.map]);return x.jsx(my.Provider,{value:t,children:e.children})},Wt=()=>{const e=b.useContext(my);return e?e.translations:nu},Qs=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),gy=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),yy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},vy=(e,t)=>{const n=gy(t,yy.basic,e)||gy(t,yy.extend,e);return n===void 0||n===e?void 0:n},Js=()=>typeof window>"u",ru=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),by=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},qO={type:"spring",bounce:.3,duration:.6},wy=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),xy={middle:{x:"0%",opacity:1},enter:wy(1),exit:wy(-1)},Sy={exit:{visibility:"hidden"}},KO=e=>{const t=vn(_g(e));return Ag({start:t,end:go(t,41)})},Ty=(e,t)=>e.toLocaleDateString(t,{month:"long"}),ZO=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=_g(new Date(e).setMonth(r)),i=Ty(o,t);return x.jsx("option",{value:i,"data-index":r,children:i},i)}),ou={ArrowLeft:(e,t)=>t==="days"?yO(e,1):Gg(e,1),ArrowRight:(e,t)=>t==="days"?go(e,1):Hs(e,1),ArrowUp:(e,t)=>t==="days"?vO(e,1):bO(e,1),ArrowDown:(e,t)=>t==="days"?kg(e,1):Ig(e,1)},Ey=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var s;if(e!=null&&e.dataset.focustrap){const a=(s=t.current)==null?void 0:s.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&&i(),setTimeout(i,r)},Or=e=>e.getFullYear().toString().padStart(4,"0"),XO=(e,t,n)=>e===void 0||n===void 0?!1:vI(t,e)&&bI(t,n),Cy=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:i,onChangeYear:s,rangeMode:a=!1,onChange:l,styles:c,...u})=>{const d=Wt(),h=b.useRef(null),{date:f,range:p}=u,m=f||new Date,v=b.useRef(null),[y,w]=tu({date:m,isAnimating:!1,year:Or(m),months:ZO(m,r),direction:void 0,range:{from:p==null?void 0:p.from,to:p==null?void 0:p.to},selectMode:a?"from":void 0,week:Ag({start:vn(m),end:Ck(m)})},P=>({onChangeYear:O=>({year:O}),setToday:()=>({date:vo(new Date)}),onExitComplete:()=>(Ey(v.current||null,h,P.state().date,200),v.current=null,{isAnimating:!1}),date:O=>{const C=O(P.state().date);return{date:C,year:Or(C)}},nextMonth:O=>{v.current=O.currentTarget;const C=P.state();if(C.isAnimating)return C;const L=Hs(C.date,1);return{date:L,isAnimating:!0,direction:1,year:Or(L)}},previousMonth:O=>{v.current=O.currentTarget;const C=P.state();if(C.isAnimating)return C;const L=Gg(C.date,1);return{date:L,isAnimating:!0,direction:-1,year:Or(L)}},onSelectDate:O=>{const C=P.state(),L=O.currentTarget.dataset.range==="true",D=O.currentTarget.dataset.date||"",V=new Date(D);return{date:V,year:Or(V),selectMode:C.selectMode===void 0?void 0:C.selectMode==="from"?"to":"from",range:L?{from:C.selectMode==="from"?V:C.range.from,to:C.selectMode==="to"?V:C.range.to}:C.range}},onChangeMonth:O=>{const C=O.target.value,D=Array.from(O.target.options).find(k=>k.value===C),V=P.state();if(D){const k=D.dataset.index||"",_=new Date(P.state().date);return _.setMonth(+k),{...V,date:_,year:Or(_)}}return V},onKeyDown:O=>{const C=O.key,L=P.state();if(C in ou){(C==="ArrowUp"||C==="ArrowDown")&&O.preventDefault();const D=P.state().date,V=fn.keyof(ou,C)?ou[C](D,O.shiftKey?"month":"days"):null;if(V!==null)return Ey(O.target,h,V),{...L,date:V,year:Or(V)}}return P.state()}}),{props:{onChangeMonth:i,onChangeYear:s},postMiddleware:[(P,O,C)=>{var D,V;return(C.method==="onChangeMonth"||C.method==="previousMonth"||C.method==="nextMonth")&&((V=(D=C.props).onChangeMonth)==null||V.call(D,P.date)),P},(P,O,C)=>{var D,V;return C.method==="onChangeYear"&&((V=(D=C.props).onChangeYear)==null||V.call(D,P.date)),P},(P,O,C)=>{const L=C.method==="onSelectDate"||C.method==="setToday"||C.method==="onKeyDown";return a&&L&&t?(l==null||l(P.range),P):(L&&t&&(l==null||l(P.date)),P)}]}),g=by(KO(y.date),7),T=y.date.toISOString(),S=Ty(y.date,r);b.useEffect(()=>{t||l==null||l(y.date)},[T]);const E=GO(P=>{w.date(O=>{const C=new Date(O);return C.setFullYear(+P),C})},1200),I=P=>{const O=P.currentTarget.value;w.onChangeYear(O),s==null||s(new Date(O)),E(O)};return x.jsx(lP,{transition:qO,children:x.jsxs("div",{ref:h,className:$e("relative overflow-hidden",c==null?void 0:c.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(Ii,{initial:!1,mode:"popLayout",custom:y.direction,onExitComplete:w.onExitComplete,children:x.jsxs(Ct.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(Ct.button,{layout:!0,"data-focustrap":"prev",variants:Sy,onClick:w.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(tk,{className:"h-4 w-4"})}),x.jsx(Ct.span,{layout:!0,variants:xy,custom:y.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:`${S.length}ch`},value:S,onChange:w.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:y.months}),x.jsx(oy,{mask:"int",value:y.year,maxLength:4,placeholder:"YYYY",onChange:I,style:{width:`${y.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(Ct.button,{layout:!0,"data-focustrap":"next",variants:Sy,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:w.nextMonth,children:x.jsx(jc,{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(Ct.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:y.week.map(P=>x.jsx("th",{className:$e("py-2 text-sm font-medium capitalize",c==null?void 0:c.weekDay),children:P.toLocaleDateString(r,{weekday:"short"})},P.toString()))})}),x.jsx(Ct.tbody,{layout:!0,variants:xy,custom:y.direction,onKeyDown:w.onKeyDown,className:$e(c==null?void 0:c.week),children:g.map((P,O)=>x.jsx("tr",{className:c==null?void 0:c.week,children:P.map(C=>{var $,H,U,A;const L=C.toISOString(),D=a?L===(($=p==null?void 0:p.to)==null?void 0:$.toISOString())||L===((H=p==null?void 0:p.from)==null?void 0:H.toISOString()):L===(f==null?void 0:f.toISOString()),V=gO(C)&&o,k=(n==null?void 0:n(C))||!1,_=!mO(C,y.date)||k,F=a?XO(p==null?void 0:p.from,C,p==null?void 0:p.to):!1;return x.jsxs("td",{align:"center",className:$e("relative",c==null?void 0:c.dayFrame),children:[x.jsxs("button",{type:"button","data-date":L,disabled:k,"data-range":a,onClick:w.onSelectDate,"data-view":y.date.getMonth().toString(),className:$e(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${V?"text-primary":""} ${_?"text-disabled":""} ${D?"bg-primary text-primary-foreground":""}`,c==null?void 0:c.day,F?"size-10 border border-dashed border-card-border":""),children:[C.getDate(),D&&((U=y.range.from)==null?void 0:U.toISOString())===L?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs",children:d.calendarFromDate})}):null,D&&((A=y.range.to)==null?void 0:A.toISOString())===L?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs",children:d.calendarToDate})}):null]}),e?x.jsx(e,{date:C}):null]},L)})},`week-${P.length}-${O}`))})]})]},S)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:w.setToday,children:"Today"})})]})})},Py=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>x.jsxs(eo,{...s,as:n,className:$e("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?x.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,x.jsx("div",{className:$e("min-w-full px-8",i),children:e})]}),QO=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]}),ky=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},JO=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t},Iy=b.createContext(""),eA=e=>{const[t,n]=ky(e.active),r=po(0),o=po(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=i.current;if(u===null)return;const d=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",h);let f=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(f=u.querySelector(`li[data-id=${p}]`),n(p)),f===null){f=u.querySelector("li[data-id]");const m=f.getAttribute("data-id")||"";n(m)}return d(f),()=>window.removeEventListener("resize",h)},[]);const a=JO(e.onChange);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=b.Children.toArray(e.children),c=u=>{const d=u.currentTarget,h=d.getBoundingClientRect();o.set(h.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return x.jsx(Iy.Provider,{value:t,children:x.jsx(Py,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:i,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(s,{"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})})},tA=()=>b.useContext(Iy),nA=e=>{const t=tA();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})};function nr(e){return Oy(e)?(e.nodeName||"").toLowerCase():"#document"}function Lt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ln(e){var t;return(t=(Oy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Oy(e){return e instanceof Node||e instanceof Lt(e).Node}function ze(e){return e instanceof Element||e instanceof Lt(e).Element}function ft(e){return e instanceof HTMLElement||e instanceof Lt(e).HTMLElement}function iu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Lt(e).ShadowRoot}function Fi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function rA(e){return["table","td","th"].includes(nr(e))}function ea(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function su(e){const t=au(),n=ze(e)?Yt(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 oA(e){let t=Vn(e);for(;ft(t)&&!rr(t);){if(su(t))return t;if(ea(t))return null;t=Vn(t)}return null}function au(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rr(e){return["html","body","#document"].includes(nr(e))}function Yt(e){return Lt(e).getComputedStyle(e)}function ta(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vn(e){if(nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iu(e)&&e.host||Ln(e);return iu(t)?t.host:t}function Ay(e){const t=Vn(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ft(t)&&Fi(t)?t:Ay(t)}function or(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ay(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Lt(o);if(i){const a=lu(s);return t.concat(s,s.visualViewport||[],Fi(o)?o:[],a&&n?or(a):[])}return t.concat(o,or(o,[],n))}function lu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function rt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&iu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function cu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function _y(){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 My(e){return e.mozInputSource===0&&e.isTrusted?!0:fu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function uu(e){return iA()?!1:!fu()&&e.width===0&&e.height===0||fu()&&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 du(){return/apple/i.test(navigator.vendor)}function fu(){const e=/android/i;return e.test(cu())||e.test(_y())}function Dy(){return cu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function iA(){return _y().includes("jsdom/")}function xo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function sA(e){return"nativeEvent"in e}function aA(e){return e.matches("html,body")}function xt(e){return(e==null?void 0:e.ownerDocument)||document}function hu(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 xn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const lA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function pu(e){return ft(e)&&e.matches(lA)}function Pt(e){e.preventDefault(),e.stopPropagation()}function Fy(e){return e?e.getAttribute("role")==="combobox"&&pu(e):!1}const Sn=Math.min,qt=Math.max,na=Math.round,So=Math.floor,ir=e=>({x:e,y:e}),cA={left:"right",right:"left",bottom:"top",top:"bottom"},uA={start:"end",end:"start"};function mu(e,t,n){return qt(e,Sn(t,n))}function To(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function Eo(e){return e.split("-")[1]}function Ny(e){return e==="x"?"y":"x"}function gu(e){return e==="y"?"height":"width"}function Ar(e){return["top","bottom"].includes(sr(e))?"y":"x"}function yu(e){return Ny(Ar(e))}function dA(e,t,n){n===void 0&&(n=!1);const r=Eo(e),o=yu(e),i=gu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ra(s)),[s,ra(s)]}function fA(e){const t=ra(e);return[vu(e),t,vu(t)]}function vu(e){return e.replace(/start|end/g,t=>uA[t])}function hA(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function pA(e,t,n,r){const o=Eo(e);let i=hA(sr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(vu)))),i}function ra(e){return e.replace(/left|right|bottom|top/g,t=>cA[t])}function mA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ly(e){return typeof e!="number"?mA(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}}/*!
|
|
175
175
|
* tabbable 6.2.0
|
|
176
176
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
177
|
-
*/var dA=["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])"],ra=dA.join(","),Fy=typeof Element>"u",Co=Fy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,oa=!Fy&&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},ia=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},fA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},hA=function(t,n,r){if(ia(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ra));return n&&Co.call(t,ra)&&o.unshift(t),o=o.filter(r),o},pA=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!ia(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Co.call(s,ra);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!ia(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&h){var f=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:s,candidates:f})}else i.unshift.apply(i,s.children)}}return o},Ly=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Vy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||fA(t))&&!Ly(t)?0:t.tabIndex},mA=function(t,n){var r=Vy(t);return r<0&&n&&!Ly(t)?0:r},gA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},$y=function(t){return t.tagName==="INPUT"},yA=function(t){return $y(t)&&t.type==="hidden"},vA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},bA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},wA=function(t){if(!t.name)return!0;var n=t.form||oa(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=bA(o,t.form);return!i||i===t},xA=function(t){return $y(t)&&t.type==="radio"},SA=function(t){return xA(t)&&!wA(t)},TA=function(t){var n,r=t&&oa(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=oa(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Ry=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},EA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Co.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(Co.call(s,"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=oa(t);if(l&&!l.shadowRoot&&o(l)===!0)return Ry(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(TA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ry(t);return!1},CA=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 Co.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},PA=function(t,n){return!(n.disabled||ia(n)||yA(n)||EA(n,t)||vA(n)||CA(n))},yu=function(t,n){return!(SA(n)||Vy(n)<0||!PA(t,n))},kA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},IA=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=mA(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(gA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Fi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=pA([t],n.includeContainer,{filter:yu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:kA}):r=hA(t,n.includeContainer,yu.bind(null,n)),IA(r)},OA=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Co.call(t,ra)===!1?!1:yu(n,t)};function jy(e,t,n){let{reference:r,floating:o}=e;const i=_r(t),s=mu(t),a=pu(s),l=ar(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Eo(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1);break}return f}const AA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=jy(c,r,l),h=r,f={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:g}=a[m],{x:w,y,data:T,reset:S}=await g({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,d=y??d,f={...f,[v]:{...f[v],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=jy(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}};async function vu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=To(t,e),p=Ny(f),v=a[h?d==="floating"?"reference":"floating":d],g=na(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},S=na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:l}):w);return{top:(g.top-S.top+p.top)/T.y,bottom:(S.bottom-g.bottom+p.bottom)/T.y,left:(g.left-S.left+p.left)/T.x,right:(S.right-g.right+p.right)/T.x}}const _A=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=To(e,t)||{};if(c==null)return{};const d=Ny(u),h={x:n,y:r},f=mu(o),p=pu(f),m=await s.getDimensions(c),v=f==="y",g=v?"top":"left",w=v?"bottom":"right",y=v?"clientHeight":"clientWidth",T=i.reference[p]+i.reference[f]-h[f]-i.floating[p],S=h[f]-i.reference[f],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let I=E?E[y]:0;(!I||!await(s.isElement==null?void 0:s.isElement(E)))&&(I=a.floating[y]||i.floating[p]);const P=T/2-S/2,O=I/2-m[p]/2-1,C=xn(d[g],O),V=xn(d[w],O),D=C,L=I-m[p]-V,k=I/2-m[p]/2+P,_=hu(D,k,L),N=!l.arrow&&Eo(o)!=null&&k!==_&&i.reference[p]/2-(k<D?C:V)-m[p]/2<0,$=N?k<D?k-D:k-L:0;return{[f]:h[f]+$,data:{[f]:_,centerOffset:k-_-$,...N&&{alignmentOffset:$}},reset:N}}}),MA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=To(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=ar(o),w=_r(a),y=ar(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(y||!m?[ta(a)]:aA(a)),E=p!=="none";!h&&E&&S.push(...cA(a,m,p,T));const I=[a,...S],P=await vu(t,v),O=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&O.push(P[g]),d){const k=sA(o,s,T);O.push(P[k[0]],P[k[1]])}if(C=[...C,{placement:o,overflows:O}],!O.every(k=>k<=0)){var V,D;const k=(((V=i.flip)==null?void 0:V.index)||0)+1,_=I[k];if(_)return{data:{index:k,overflows:C},reset:{placement:_}};let N=(D=C.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:D.placement;if(!N)switch(f){case"bestFit":{var L;const $=(L=C.filter(z=>{if(E){const U=_r(z.placement);return U===w||U==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(U=>U>0).reduce((U,A)=>U+A,0)]).sort((z,U)=>z[1]-U[1])[0])==null?void 0:L[0];$&&(N=$);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function DA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ar(n),a=Eo(n),l=_r(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=To(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const NA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await DA(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},FA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:g,y:w}=v;return{x:g,y:w}}},...l}=To(e,t),c={x:n,y:r},u=await vu(t,l),d=_r(ar(o)),h=Dy(d);let f=c[h],p=c[d];if(i){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=f+u[v],y=f-u[g];f=hu(w,f,y)}if(s){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=p+u[v],y=p-u[g];p=hu(w,p,y)}const m=a.fn({...t,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},LA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=To(e,t),l=await vu(t,a),c=ar(n),u=Eo(n),d=_r(n)==="y",{width:h,height:f}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=f-l.top-l.bottom,g=h-l.left-l.right,w=xn(f-l[p],v),y=xn(h-l[m],g),T=!t.middlewareData.shift;let S=w,E=y;if(d?E=u||T?xn(y,g):g:S=u||T?xn(w,v):v,T&&!u){const P=qt(l.left,0),O=qt(l.right,0),C=qt(l.top,0),V=qt(l.bottom,0);d?E=h-2*(P!==0||O!==0?P+O:qt(l.left,l.right)):S=f-2*(C!==0||V!==0?C+V:qt(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:S});const I=await o.getDimensions(i.floating);return h!==I.width||f!==I.height?{reset:{rects:!0}}:{}}}};function By(e){const t=Yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=dt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ea(n)!==i||ea(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function bu(e){return ze(e)?e:e.contextElement}function Po(e){const t=bu(e);if(!dt(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=By(t);let s=(i?ea(n.width):n.width)/r,a=(i?ea(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const VA=sr(0);function zy(e){const t=Lt(e);return!iu()||!t.visualViewport?VA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $A(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Lt(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=bu(e);let s=sr(1);t&&(r?ze(r)&&(s=Po(r)):s=Po(e));const a=$A(i,n,r)?zy(i):sr(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const h=Lt(i),f=r&&ze(r)?Lt(r):r;let p=h,m=su(p);for(;m&&r&&f!==p;){const v=Po(m),g=m.getBoundingClientRect(),w=Yt(m),y=g.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,T=g.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=y,c+=T,p=Lt(m),m=su(p)}}return na({width:u,height:d,x:l,y:c})}function RA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ln(r),a=t?Qs(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=dt(r);if((d||!d&&!i)&&((rr(r)!=="body"||Ni(s))&&(l=Js(r)),dt(r))){const h=Mr(r);c=Po(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function jA(e){return Array.from(e.getClientRects())}function Wy(e){return Mr(Ln(e)).left+Js(e).scrollLeft}function BA(e){const t=Ln(e),n=Js(e),r=e.ownerDocument.body,o=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Wy(e);const a=-n.scrollTop;return Yt(r).direction==="rtl"&&(s+=qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function zA(e,t){const n=Lt(e),r=Ln(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=iu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function WA(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=dt(e)?Po(e):sr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Hy(e,t,n){let r;if(t==="viewport")r=zA(e,n);else if(t==="document")r=BA(Ln(e));else if(ze(t))r=WA(t,n);else{const o=zy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return na(r)}function Uy(e,t){const n=Vn(e);return n===t||!ze(n)||or(n)?!1:Yt(n).position==="fixed"||Uy(n,t)}function HA(e,t){const n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(a=>ze(a)&&rr(a)!=="body"),o=null;const i=Yt(e).position==="fixed";let s=i?Vn(e):e;for(;ze(s)&&!or(s);){const a=Yt(s),l=ou(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ni(s)&&!l&&Uy(e,s))?r=r.filter(u=>u!==s):o=a,s=Vn(s)}return t.set(e,r),r}function UA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Qs(t)?[]:HA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Hy(t,u,o);return c.top=qt(d.top,c.top),c.right=xn(d.right,c.right),c.bottom=xn(d.bottom,c.bottom),c.left=qt(d.left,c.left),c},Hy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function GA(e){const{width:t,height:n}=By(e);return{width:t,height:n}}function YA(e,t,n){const r=dt(t),o=Ln(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!i)if((rr(t)!=="body"||Ni(o))&&(a=Js(t)),r){const d=Mr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Wy(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function wu(e){return Yt(e).position==="static"}function Gy(e,t){return!dt(e)||Yt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Yy(e,t){const n=Lt(e);if(Qs(e))return n;if(!dt(e)){let o=Vn(e);for(;o&&!or(o);){if(ze(o)&&!wu(o))return o;o=Vn(o)}return n}let r=Gy(e,t);for(;r&&QO(r)&&wu(r);)r=Gy(r,t);return r&&or(r)&&wu(r)&&!ou(r)?n:r||JO(e)||n}const qA=async function(e){const t=this.getOffsetParent||Yy,n=this.getDimensions,r=await n(e.floating);return{reference:YA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function KA(e){return Yt(e).direction==="rtl"}const ZA={convertOffsetParentRelativeRectToViewportRelativeRect:RA,getDocumentElement:Ln,getClippingRect:UA,getOffsetParent:Yy,getElementRects:qA,getClientRects:jA,getDimensions:GA,getScale:Po,isElement:ze,isRTL:KA};function XA(e,t){let n=null,r;const o=Ln(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const f=So(u),p=So(o.clientWidth-(c+d)),m=So(o.clientHeight-(u+h)),v=So(c),w={rootMargin:-f+"px "+-p+"px "+-m+"px "+-v+"px",threshold:qt(0,xn(1,l))||1};let y=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!y)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(T,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,w)}n.observe(e)}return s(!0),i}function sa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=bu(e),u=o||i?[...c?ir(c):[],...ir(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=c&&a?XA(c,n):null;let h=-1,f=null;s&&(f=new ResizeObserver(g=>{let[w]=g;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let p,m=l?Mr(e):null;l&&v();function v(){const g=Mr(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(v)}return n(),()=>{var g;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const QA=NA,JA=FA,e_=MA,t_=LA,qy=_A,n_=(e,t,n)=>{const r=new Map,o={platform:ZA,...n},i={...o.platform,_c:r};return AA(e,t,{...o,platform:i})};var aa=typeof document<"u"?b.useLayoutEffect:b.useEffect;function la(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(!la(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!la(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zy(e,t){const n=Ky(e);return Math.round(t*n)/n}function Xy(e){const t=M.useRef(e);return aa(()=>{t.current=e}),t}function r_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=M.useState(r);la(h,r)||f(r);const[p,m]=M.useState(null),[v,g]=M.useState(null),w=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),y=M.useCallback($=>{$!==I.current&&(I.current=$,g($))},[]),T=i||p,S=s||v,E=M.useRef(null),I=M.useRef(null),P=M.useRef(u),O=l!=null,C=Xy(l),V=Xy(o),D=M.useCallback(()=>{if(!E.current||!I.current)return;const $={placement:t,strategy:n,middleware:h};V.current&&($.platform=V.current),n_(E.current,I.current,$).then(z=>{const U={...z,isPositioned:!0};L.current&&!la(P.current,U)&&(P.current=U,cf.flushSync(()=>{d(U)}))})},[h,t,n,V]);aa(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const L=M.useRef(!1);aa(()=>(L.current=!0,()=>{L.current=!1}),[]),aa(()=>{if(T&&(E.current=T),S&&(I.current=S),T&&S){if(C.current)return C.current(T,S,D);D()}},[T,S,D,C,O]);const k=M.useMemo(()=>({reference:E,floating:I,setReference:w,setFloating:y}),[w,y]),_=M.useMemo(()=>({reference:T,floating:S}),[T,S]),N=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!_.floating)return $;const z=Zy(_.floating,u.x),U=Zy(_.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+U+"px)",...Ky(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:U}},[n,a,_.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:D,refs:k,elements:_,floatingStyles:N}),[u,D,k,_,N])}const o_=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?qy({element:r.current,padding:o}).fn(n):{}:r?qy({element:r,padding:o}).fn(n):{}}}},ca=(e,t)=>({...QA(e),options:[e,t]}),xu=(e,t)=>({...JA(e),options:[e,t]}),Su=(e,t)=>({...e_(e),options:[e,t]}),i_=(e,t)=>({...t_(e),options:[e,t]}),Qy=(e,t)=>({...o_(e),options:[e,t]});function Tu(e){return M.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Jy={...M},s_=Jy.useInsertionEffect||(e=>e());function gt(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return s_(()=>{t.current=e}),M.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 Eu="ArrowUp",Li="ArrowDown",ko="ArrowLeft",Io="ArrowRight";function ua(e,t,n){return Math.floor(e/t)!==n}function Vi(e,t){return t<0||t>=e.current.length}function Cu(e,t){return Mt(e,{disabledIndices:t})}function ev(e,t){return Mt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Mt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const s=e.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&da(s,a,o));return a}function a_(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Eu){if(u&&Pt(n),c===-1)d=l;else if(d=Mt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||d<0)){const h=c%i,f=l%i,p=l-(f-h);f===h?d=l:d=f>h?p:p-i}Vi(e,d)&&(d=c)}if(n.key===Li&&(u&&Pt(n),c===-1?d=a:(d=Mt(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(d=Mt(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Vi(e,d)&&(d=c)),r==="both"){const h=So(c/i);n.key===Io&&(u&&Pt(n),c%i!==i-1?(d=Mt(e,{startingIndex:c,disabledIndices:s}),o&&ua(d,i,h)&&(d=Mt(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(d=Mt(e,{startingIndex:c-c%i-1,disabledIndices:s})),ua(d,i,h)&&(d=c)),n.key===ko&&(u&&Pt(n),c%i!==0?(d=Mt(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&ua(d,i,h)&&(d=Mt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(d=Mt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),ua(d,i,h)&&(d=c));const f=So(l/i)===h;Vi(e,d)&&(o&&f?d=n.key===ko?l:Mt(e,{startingIndex:c-c%i-1,disabledIndices:s}):d=c)}return d}function l_(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let h=0;h<l;h++)u.push(o+d+h*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function c_(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function u_(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function da(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 tv=0;function lr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(tv);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():tv=requestAnimationFrame(i)}var ke=typeof document<"u"?b.useLayoutEffect:b.useEffect;function d_(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function f_(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 nv=M.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function h_(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=M.useState(()=>new Map),s=M.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=M.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return ke(()=>{const l=new Map(o);Array.from(l.keys()).sort(d_).forEach((u,d)=>{l.set(u,d)}),f_(o,l)||i(l)},[o]),M.createElement(nv.Provider,{value:M.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function rv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=M.useContext(nv),[a,l]=M.useState(null),c=M.useRef(null),u=M.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var h;const f=t!==void 0;s.current[a]=f?t:(h=d==null?void 0:d.textContent)!=null?h:null}},[a,i,s,t]);return ke(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),ke(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),M.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oo.apply(this,arguments)}let ov=!1,p_=0;const iv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+p_++;function m_(){const[e,t]=M.useState(()=>ov?iv():void 0);return ke(()=>{e==null&&t(iv())},[]),M.useEffect(()=>{ov=!0},[]),e}const Ao=Jy.useId||m_;let $i;process.env.NODE_ENV!=="production"&&($i=new Set);function fa(){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=$i)!=null&&e.has(o))){var i;(i=$i)==null||i.add(o),console.warn(o)}}function g_(){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=$i)!=null&&e.has(o))){var i;(i=$i)==null||i.add(o),console.error(o)}}const sv=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:h,style:{transform:f,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||fa("The `ref` prop is required for `FloatingArrow`."));const v=Ao(),[g,w]=M.useState(!1);if(ke(()=>{if(!o)return;Yt(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const y=c*2,T=y/2,S=s/2*(l/-8+1),E=a/2*l/4,[I,P]=r.split("-"),O=!!h,C=I==="top"||I==="bottom",V=u&&P==="end"?"bottom":"top";let D=u&&P==="end"?"right":"left";u&&g&&(D=P==="end"?"left":"right");const L=(i==null?void 0:i.x)!=null?u||i.x:"",k=(i==null?void 0:i.y)!=null?u||i.y:"",_=h||"M0,0"+(" H"+s)+(" L"+(s-S)+","+(a-E))+(" Q"+s/2+","+a+" "+S+","+(a-E))+" Z",N={top:O?"rotate(180deg)":"",left:O?"rotate(90deg)":"rotate(-90deg)",bottom:O?"":"rotate(180deg)",right:O?"rotate(-90deg)":"rotate(90deg)"}[I];return M.createElement("svg",Oo({},m,{"aria-hidden":!0,ref:n,width:O?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[D]:L,[V]:k,[I]:C||O?"100%":"calc(100% - "+y/2+"px)",transform:""+N+(f??""),...p}}),y>0&&M.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:y+(h?0:1),d:_}),M.createElement("path",{stroke:y&&!h?m.fill:"none",d:_}),M.createElement("clipPath",{id:v},M.createElement("rect",{x:-T,y:T*(O?-1:1),width:s+y,height:s})))});function av(){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 lv=M.createContext(null),cv=M.createContext(null),cr=()=>{var e;return((e=M.useContext(lv))==null?void 0:e.id)||null},ur=()=>M.useContext(cv);function y_(e){const t=Ao(),n=ur(),o=cr();return ke(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function v_(e){const{children:t,id:n}=e,r=cr();return M.createElement(lv.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function b_(e){const{children:t}=e,n=M.useRef([]),r=M.useCallback(s=>{n.current=[...n.current,s]},[]),o=M.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=M.useState(()=>av())[0];return M.createElement(cv.Provider,{value:M.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function dr(e){return"data-floating-ui-"+e}function kt(e){const t=b.useRef(e);return ke(()=>{t.current=e}),t}const uv=dr("safe-polygon");function Pu(e,t,n){return n&&!xo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function dv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:h=!0}=t,f=ur(),p=cr(),m=kt(c),v=kt(l),g=kt(n),w=M.useRef(),y=M.useRef(-1),T=M.useRef(),S=M.useRef(-1),E=M.useRef(!0),I=M.useRef(!1),P=M.useRef(()=>{}),O=M.useCallback(()=>{var _;const N=(_=o.current.openEvent)==null?void 0:_.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function _(N){let{open:$}=N;$||(clearTimeout(y.current),clearTimeout(S.current),E.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[a,i]),M.useEffect(()=>{if(!a||!m.current||!n)return;function _($){O()&&r(!1,$,"hover")}const N=wt(s.floating).documentElement;return N.addEventListener("mouseleave",_),()=>{N.removeEventListener("mouseleave",_)}},[s.floating,n,r,a,m,O]);const C=M.useCallback(function(_,N,$){N===void 0&&(N=!0),$===void 0&&($="hover");const z=Pu(v.current,"close",w.current);z&&!T.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,_,$),z)):N&&(clearTimeout(y.current),r(!1,_,$))},[v,r]),V=gt(()=>{P.current(),T.current=void 0}),D=gt(()=>{if(I.current){const _=wt(s.floating).body;_.style.pointerEvents="",_.removeAttribute(uv),I.current=!1}});M.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(A){if(clearTimeout(y.current),E.current=!1,u&&!xo(w.current)||d>0&&!Pu(v.current,"open"))return;const j=Pu(v.current,"open",w.current);j?y.current=window.setTimeout(()=>{g.current||r(!0,A,"hover")},j):r(!0,A,"hover")}function $(A){if(_())return;P.current();const j=wt(s.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),T.current=m.current({...o.current.floatingContext,tree:f,x:A.clientX,y:A.clientY,onClose(){D(),V(),C(A,!0,"safe-polygon")}});const ne=T.current;j.addEventListener("mousemove",ne),P.current=()=>{j.removeEventListener("mousemove",ne)};return}(w.current==="touch"?!rt(s.floating,A.relatedTarget):!0)&&C(A)}function z(A){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:f,x:A.clientX,y:A.clientY,onClose(){D(),V(),C(A)}})(A))}if(ze(s.domReference)){var U;const A=s.domReference;return n&&A.addEventListener("mouseleave",z),(U=s.floating)==null||U.addEventListener("mouseleave",z),h&&A.addEventListener("mousemove",N,{once:!0}),A.addEventListener("mouseenter",N),A.addEventListener("mouseleave",$),()=>{var j;n&&A.removeEventListener("mouseleave",z),(j=s.floating)==null||j.removeEventListener("mouseleave",z),h&&A.removeEventListener("mousemove",N),A.removeEventListener("mouseenter",N),A.removeEventListener("mouseleave",$)}}},[s,a,e,u,d,h,C,V,D,r,n,g,f,v,m,o]),ke(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&O()){const $=wt(s.floating).body;$.setAttribute(uv,""),$.style.pointerEvents="none",I.current=!0;const z=s.floating;if(ze(s.domReference)&&z){var N;const U=s.domReference,A=f==null||(N=f.nodesRef.current.find(j=>j.id===p))==null||(N=N.context)==null?void 0:N.elements.floating;return A&&(A.style.pointerEvents=""),U.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{U.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,f,m,O]),ke(()=>{n||(w.current=void 0,V(),D())},[n,V,D]),M.useEffect(()=>()=>{V(),clearTimeout(y.current),clearTimeout(S.current),D()},[a,s.domReference,V,D]);const L=M.useMemo(()=>{function _(N){w.current=N.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(N){const{nativeEvent:$}=N;function z(){!E.current&&!g.current&&r(!0,$,"hover")}u&&!xo(w.current)||n||d===0||(clearTimeout(S.current),w.current==="touch"?z():S.current=window.setTimeout(z,d))}}},[u,r,n,g,d]),k=M.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(_){C(_.nativeEvent,!1)}}),[C]);return M.useMemo(()=>a?{reference:L,floating:k}:{},[a,L,k])}function w_(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Dr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function x_(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),Dr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let _o=new WeakMap,ha=new WeakSet,pa={},ku=0;const S_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,fv=e=>e&&(e.host||fv(e.parentNode)),T_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function E_(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=T_(t,e),a=new Set,l=new Set(s),c=[];pa[o]||(pa[o]=new WeakMap);const u=pa[o];s.forEach(d),h(t),a.clear();function d(f){!f||a.has(f)||(a.add(f),f.parentNode&&d(f.parentNode))}function h(f){!f||l.has(f)||[].forEach.call(f.children,p=>{if(rr(p)!=="script")if(a.has(p))h(p);else{const m=i?p.getAttribute(i):null,v=m!==null&&m!=="false",g=(_o.get(p)||0)+1,w=(u.get(p)||0)+1;_o.set(p,g),u.set(p,w),c.push(p),g===1&&v&&ha.add(p),w===1&&p.setAttribute(o,""),!v&&i&&p.setAttribute(i,"true")}})}return ku++,()=>{c.forEach(f=>{const p=(_o.get(f)||0)-1,m=(u.get(f)||0)-1;_o.set(f,p),u.set(f,m),p||(!ha.has(f)&&i&&f.removeAttribute(i),ha.delete(f)),m||f.removeAttribute(o)}),ku--,ku||(_o=new WeakMap,_o=new WeakMap,ha=new WeakSet,pa={})}}function hv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=wt(e[0]).body;return E_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Mo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pv(e,t){const n=Fi(e,Mo());t==="prev"&&n.reverse();const r=n.indexOf(nn(wt(e)));return n.slice(r+1)[0]}function mv(){return pv(document.body,"next")}function gv(){return pv(document.body,"prev")}function Ri(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!rt(n,r)}function C_(e){Fi(e,Mo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function P_(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 k_(e,t,n){const r=e.indexOf(t);function o(s){const a=dr("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||rt(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Iu={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 I_;function yv(e){e.key==="Tab"&&(e.target,clearTimeout(I_))}const ma=M.forwardRef(function(t,n){const[r,o]=M.useState();ke(()=>(cu()&&o("button"),document.addEventListener("keydown",yv),()=>{document.removeEventListener("keydown",yv)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[dr("focus-guard")]:"",style:Iu};return M.createElement("span",Oo({},t,i))}),vv=M.createContext(null),bv=dr("portal");function O_(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ao(),o=wv(),[i,s]=M.useState(null),a=M.useRef(null);return ke(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),ke(()=>{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(bv,""),l.appendChild(c),a.current=c,s(c)},[t,r]),ke(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!ze(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(bv,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function Do(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=O_({id:n,root:r}),[s,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return M.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function f(p){i&&Ri(p)&&(p.type==="focusin"?P_:C_)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,s==null?void 0:s.modal]),M.createElement(vv.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},h&&i&&M.createElement(ma,{"data-type":"outside",ref:l,onFocus:f=>{if(Ri(f,i)){var p;(p=u.current)==null||p.focus()}else{const m=gv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),h&&i&&M.createElement("span",{"aria-owns":i.id,style:Iu}),i&&cf.createPortal(t,i),h&&i&&M.createElement(ma,{"data-type":"outside",ref:c,onFocus:f=>{if(Ri(f,i)){var p;(p=d.current)==null||p.focus()}else{const m=mv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,f.nativeEvent))}}}))}const wv=()=>M.useContext(vv),xv=20;let Nr=[];function Ou(e){Nr=Nr.filter(n=>n.isConnected);let t=e;if(!(!t||rr(t)==="body")){if(!OA(t,Mo())){const n=Fi(t,Mo())[0];n&&(t=n)}Nr.push(t),Nr.length>xv&&(Nr=Nr.slice(-xv))}}function Sv(){return Nr.slice().reverse().find(e=>e.isConnected)}const A_=M.forwardRef(function(t,n){return M.createElement("button",Oo({},t,{type:"button",ref:n,tabIndex:-1,style:Iu}))});function ji(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:h,refs:f,nodeId:p,onOpenChange:m,events:v,dataRef:g,floatingId:w,elements:{domReference:y,floating:T}}=t,S=typeof s=="number"&&s<0,E=My(y)&&S,I=S_()?i:!0,P=kt(o),O=kt(s),C=kt(a),V=ur(),D=wv(),L=M.useRef(null),k=M.useRef(null),_=M.useRef(!1),N=M.useRef(!1),$=M.useRef(-1),z=D!=null,U=T==null?void 0:T.firstElementChild,A=(U==null?void 0:U.id)===w?U:T,j=gt(function(G){return G===void 0&&(G=A),G?Fi(G,Mo()):[]}),Z=gt(G=>{const F=j(G);return P.current.map(B=>y&&B==="reference"?y:A&&B==="floating"?A:F).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){rt(A,nn(wt(A)))&&j().length===0&&!E&&Pt(B);const W=Z(),R=wn(B);P.current[0]==="reference"&&R===y&&(Pt(B),B.shiftKey?lr(W[W.length-1]):lr(W[1])),P.current[1]==="floating"&&R===A&&B.shiftKey&&(Pt(B),lr(W[0]))}}const F=wt(A);return F.addEventListener("keydown",G),()=>{F.removeEventListener("keydown",G)}},[r,y,A,c,P,E,j,Z]),M.useEffect(()=>{if(r||!T)return;function G(F){const B=wn(F),R=j().indexOf(B);R!==-1&&($.current=R)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,j]),M.useEffect(()=>{if(r||!d)return;function G(){N.current=!0,setTimeout(()=>{N.current=!1})}function F(B){const W=B.relatedTarget;queueMicrotask(()=>{const R=!(rt(y,W)||rt(T,W)||rt(W,T)||rt(D==null?void 0:D.portalNode,W)||W!=null&&W.hasAttribute(dr("focus-guard"))||V&&(Dr(V.nodesRef.current,p).find(Y=>{var se,H;return rt((se=Y.context)==null?void 0:se.elements.floating,W)||rt((H=Y.context)==null?void 0:H.elements.domReference,W)})||w_(V.nodesRef.current,p).find(Y=>{var se,H;return((se=Y.context)==null?void 0:se.elements.floating)===W||((H=Y.context)==null?void 0:H.elements.domReference)===W})));if(l&&R&&nn(wt(A))===wt(A).body){dt(A)&&(A==null||A.focus());const Y=$.current,se=j(),H=se[Y]||se[se.length-1]||A;dt(H)&&H.focus()}(E||!c)&&W&&R&&!N.current&&W!==Sv()&&(_.current=!0,m(!1,B))})}if(T&&dt(y))return y.addEventListener("focusout",F),y.addEventListener("pointerdown",G),T.addEventListener("focusout",F),()=>{y.removeEventListener("focusout",F),y.removeEventListener("pointerdown",G),T.removeEventListener("focusout",F)}},[r,y,T,A,c,p,V,D,m,d,l,j,E]),M.useEffect(()=>{var G;if(r)return;const F=Array.from((D==null||(G=D.portalNode)==null?void 0:G.querySelectorAll("["+dr("portal")+"]"))||[]);if(T){const B=[T,...F,L.current,k.current,P.current.includes("reference")||E?y:null].filter(R=>R!=null),W=c||E?hv(B,I,!I):hv(B);return()=>{W()}}},[r,y,T,c,P,D,E,I]),ke(()=>{if(r||!dt(A))return;const G=wt(A),F=nn(G);queueMicrotask(()=>{const B=Z(A),W=O.current,R=(typeof W=="number"?B[W]:W.current)||A,Y=rt(A,F);!S&&!Y&&h&&lr(R,{preventScroll:R===A})})},[r,h,A,S,Z,O]),ke(()=>{if(r||!A)return;let G=!1;const F=wt(A),B=nn(F);let R=g.current.openEvent;const Y=f.domReference.current;Ou(B);function se(H){let{open:Pe,reason:st,event:Ue,nested:at}=H;Pe&&(R=Ue),st==="escape-key"&&f.domReference.current&&Ou(f.domReference.current),st==="hover"&&Ue.type==="mouseleave"&&(_.current=!0),st==="outside-press"&&(at?(_.current=!1,G=!0):_.current=!(Ay(Ue)||lu(Ue)))}return v.on("openchange",se),()=>{v.off("openchange",se);const H=nn(F),Pe=rt(T,H)||V&&Dr(V.nodesRef.current,p).some(de=>{var Ee;return rt((Ee=de.context)==null?void 0:Ee.elements.floating,H)});(Pe||R&&["click","mousedown"].includes(R.type))&&f.domReference.current&&Ou(f.domReference.current);const Ue=Y||B,at=Fi(wt(Ue).body,Mo());queueMicrotask(()=>{let de=Sv();!de&&dt(Ue)&&T&&(de=k_(at,Ue,T)),C.current&&!_.current&&dt(de)&&(!(de!==H&&H!==F.body)||Pe)&&de.focus({preventScroll:G})})}},[r,T,A,C,g,f,v,V,p]),ke(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:m,refs:f}),()=>{D.setFocusManagerState(null)}},[r,D,c,h,m,f,d]),ke(()=>{if(r||!A||typeof MutationObserver!="function"||S)return;const G=()=>{const B=A.getAttribute("tabindex"),W=j(),R=nn(wt(T)),Y=W.indexOf(R);Y!==-1&&($.current=Y),P.current.includes("floating")||R!==f.domReference.current&&W.length===0?B!=="0"&&A.setAttribute("tabindex","0"):B!=="-1"&&A.setAttribute("tabindex","-1")};G();const F=new MutationObserver(G);return F.observe(A,{childList:!0,subtree:!0,attributes:!0}),()=>{F.disconnect()}},[r,T,A,f,P,j,S]);function ne(G){return r||!u||!c?null:M.createElement(A_,{ref:G==="start"?L:k,onClick:F=>m(!1,F.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&I&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,Q&&M.createElement(ma,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:G=>{if(c){const B=Z();lr(o[0]==="reference"?B[0]:B[B.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(_.current=!1,Ri(G,D.portalNode)){const B=mv()||y;B==null||B.focus()}else{var F;(F=D.beforeOutsideRef.current)==null||F.focus()}}}),!E&&ne("start"),n,ne("end"),Q&&M.createElement(ma,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:G=>{if(c)lr(Z()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(_.current=!0),Ri(G,D.portalNode)){const B=gv()||y;B==null||B.focus()}else{var F;(F=D.afterOutsideRef.current)==null||F.focus()}}}))}const Au=new Set,__=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Ao();return ke(()=>{if(!r)return;Au.add(i);const s=/iP(hone|ad|od)|iOS/.test(au()),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,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var f,p;const m=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Au.delete(i),Au.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,h)))}},[i,r]),M.createElement("div",Oo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Tv(e){return dt(e.target)&&e.target.tagName==="BUTTON"}function Ev(e){return fu(e)}function ga(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=M.useRef(),h=M.useRef(!1),f=M.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(xo(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}xo(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||Tv(p))&&(p.key===" "&&!Ev(i)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Tv(p)||Ev(i)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return M.useMemo(()=>s?{reference:f}:{},[s,f])}function M_(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=(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(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,h=s.x,f=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),h-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,h=a&&t.x!=null?t.x:h,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:h,y:f,top:f,right:h+u,bottom:f+d,left:h}}}}function Cv(e){return e!=null&&e.clientX!=null}function D_(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=M.useRef(!1),h=M.useRef(null),[f,p]=M.useState(),[m,v]=M.useState([]),g=gt((E,I)=>{d.current||r.current.openEvent&&!Cv(r.current.openEvent)||s.setPositionReference(M_(i,{x:E,y:I,axis:l,dataRef:r,pointerType:f}))}),w=gt(E=>{c!=null||u!=null||(n?h.current||v([]):g(E.clientX,E.clientY))}),y=xo(f)?o:n,T=M.useCallback(()=>{if(!y||!a||c!=null||u!=null)return;const E=Lt(o);function I(P){const O=wn(P);rt(o,O)?(E.removeEventListener("mousemove",I),h.current=null):g(P.clientX,P.clientY)}if(!r.current.openEvent||Cv(r.current.openEvent)){E.addEventListener("mousemove",I);const P=()=>{E.removeEventListener("mousemove",I),h.current=null};return h.current=P,P}s.setPositionReference(i)},[y,a,c,u,o,r,s,i,g]);M.useEffect(()=>T(),[T,m]),M.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),M.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),ke(()=>{a&&(c!=null||u!=null)&&(d.current=!1,g(c,u))},[a,c,u,g]);const S=M.useMemo(()=>{function E(I){let{pointerType:P}=I;p(P)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:w,onMouseEnter:w}},[w]);return M.useMemo(()=>a?{reference:S}:{},[a,S])}const N_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},F_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Pv=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 No(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:p}=t,m=ur(),v=gt(typeof l=="function"?l:()=>!1),g=typeof l=="function"?v:l,w=M.useRef(!1),y=M.useRef(!1),{escapeKey:T,outsidePress:S}=Pv(f),{escapeKey:E,outsidePress:I}=Pv(p),P=gt(k=>{var _;if(!n||!s||!a||k.key!=="Escape")return;const N=(_=i.current.floatingContext)==null?void 0:_.nodeId,$=m?Dr(m.nodesRef.current,N):[];if(!T&&(k.stopPropagation(),$.length>0)){let z=!0;if($.forEach(U=>{var A;if((A=U.context)!=null&&A.open&&!U.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,tA(k)?k.nativeEvent:k,"escape-key")}),O=gt(k=>{var _;const N=()=>{var $;P(k),($=wn(k))==null||$.removeEventListener("keydown",N)};(_=wn(k))==null||_.addEventListener("keydown",N)}),C=gt(k=>{var _;const N=w.current;w.current=!1;const $=y.current;if(y.current=!1,c==="click"&&$||N||typeof g=="function"&&!g(k))return;const z=wn(k),U="["+dr("inert")+"]",A=wt(o.floating).querySelectorAll(U);let j=ze(z)?z:null;for(;j&&!or(j);){const G=Vn(j);if(or(G)||!ze(G))break;j=G}if(A.length&&ze(z)&&!nA(z)&&!rt(z,o.floating)&&Array.from(A).every(G=>!rt(j,G)))return;if(dt(z)&&L){const G=z.clientWidth>0&&z.scrollWidth>z.clientWidth,F=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let B=F&&k.offsetX>z.clientWidth;if(F&&Yt(z).direction==="rtl"&&(B=k.offsetX<=z.offsetWidth-z.clientWidth),B||G&&k.offsetY>z.clientHeight)return}const Z=(_=i.current.floatingContext)==null?void 0:_.nodeId,ne=m&&Dr(m.nodesRef.current,Z).some(G=>{var F;return du(k,(F=G.context)==null?void 0:F.elements.floating)});if(du(k,o.floating)||du(k,o.domReference)||ne)return;const Q=m?Dr(m.nodesRef.current,Z):[];if(Q.length>0){let G=!0;if(Q.forEach(F=>{var B;if((B=F.context)!=null&&B.open&&!F.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,k,"outside-press")}),V=gt(k=>{var _;const N=()=>{var $;C(k),($=wn(k))==null||$.removeEventListener(c,N)};(_=wn(k))==null||_.addEventListener(c,N)});M.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=S;function k($){r(!1,$,"ancestor-scroll")}const _=wt(o.floating);a&&_.addEventListener("keydown",E?O:P,E),g&&_.addEventListener(c,I?V:C,I);let N=[];return h&&(ze(o.domReference)&&(N=ir(o.domReference)),ze(o.floating)&&(N=N.concat(ir(o.floating))),!ze(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(ir(o.reference.contextElement)))),N=N.filter($=>{var z;return $!==((z=_.defaultView)==null?void 0:z.visualViewport)}),N.forEach($=>{$.addEventListener("scroll",k,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",E?O:P,E),g&&_.removeEventListener(c,I?V:C,I),N.forEach($=>{$.removeEventListener("scroll",k)})}},[i,o,a,g,c,n,r,h,s,T,S,P,E,O,C,I,V]),M.useEffect(()=>{w.current=!1},[g,c]);const D=M.useMemo(()=>({onKeyDown:P,[N_[d]]:k=>{u&&r(!1,k.nativeEvent,"reference-press")}}),[P,r,u,d]),L=M.useMemo(()=>({onKeyDown:P,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[F_[c]]:()=>{w.current=!0}}),[P,c]);return M.useMemo(()=>s?{reference:D,floating:L}:{},[s,D,L])}function L_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ao(),i=M.useRef({}),[s]=M.useState(()=>av()),a=cr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!ze(f)&&g_("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]=M.useState(r.reference),u=gt((f,p,m)=>{i.current.openEvent=f?p:void 0,s.emit("openchange",{open:f,event:p,reason:m,nested:a}),n==null||n(f,p,m)}),d=M.useMemo(()=>({setPositionReference:c}),[]),h=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:d}),[t,u,h,s,o,d])}function Fo(e){e===void 0&&(e={});const{nodeId:t}=e,n=L_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||i,d=M.useRef(null),h=ur();ke(()=>{u&&(d.current=u)},[u]);const f=r_({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(y=>{const T=ze(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(T),f.refs.setReference(T)},[f.refs]),m=M.useCallback(y=>{(ze(y)||y===null)&&(d.current=y,s(y)),(ze(f.refs.reference.current)||f.refs.reference.current===null||y!==null&&!ze(y))&&f.refs.setReference(y)},[f.refs]),v=M.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:d}),[f.refs,m,p]),g=M.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),w=M.useMemo(()=>({...f,...r,refs:v,elements:g,nodeId:t}),[f,v,g,t,r]);return ke(()=>{r.dataRef.current.floatingContext=w;const y=h==null?void 0:h.nodesRef.current.find(T=>T.id===t);y&&(y.context=w)}),M.useMemo(()=>({...f,context:w,refs:v,elements:g}),[f,v,g,w])}function V_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),d=M.useRef(!0);M.useEffect(()=>{if(!a)return;const f=Lt(s.domReference);function p(){!n&&dt(s.domReference)&&s.domReference===nn(wt(s.domReference))&&(c.current=!0)}function m(){d.current=!0}return f.addEventListener("blur",p),f.addEventListener("keydown",m,!0),()=>{f.removeEventListener("blur",p),f.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),M.useEffect(()=>{if(!a)return;function f(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=M.useMemo(()=>({onPointerDown(f){lu(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const p=wn(f.nativeEvent);if(l&&ze(p))try{if(cu()&&_y())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!fu(p))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const p=f.relatedTarget,m=f.nativeEvent,v=ze(p)&&p.hasAttribute(dr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var g;const w=nn(s.domReference?s.domReference.ownerDocument:document);!p&&w===s.domReference||rt((g=i.current.floatingContext)==null?void 0:g.refs.floating.current,w)||rt(s.domReference,w)||v||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return M.useMemo(()=>a?{reference:h}:{},[a,h])}const kv="active",Iv="selected";function _u(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[kv]:s,[Iv]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[kv,Iv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var h,f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(v=>v(...p)).find(v=>v!==void 0)}}}else s[c]=u}),s),{})}}function Lo(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=M.useCallback(a=>_u(a,e,"reference"),t),i=M.useCallback(a=>_u(a,e,"floating"),n),s=M.useCallback(a=>_u(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let Ov=!1;function ya(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Av(e,t){return ya(t,e===Eu||e===Li,e===ko||e===Io)}function Mu(e,t,n){return ya(t,e===Li,n?e===ko:e===Io)||e==="Enter"||e===" "||e===""}function $_(e,t,n){return ya(t,n?e===ko:e===Io,e===Li)}function _v(e,t,n){return ya(t,n?e===Io:e===ko,e===Eu)}function Mv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:h=!1,rtl:f=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:g=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:I,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||fa("`useListNavigation` looping must be enabled to allow escaping."),p||fa("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&T>1&&fa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const O=cr(),C=ur(),V=gt(a),D=M.useRef(m),L=M.useRef(c??-1),k=M.useRef(null),_=M.useRef(!0),N=M.useRef(V),$=M.useRef(!!o.floating),z=M.useRef(n),U=M.useRef(!1),A=M.useRef(!1),j=kt(w),Z=kt(n),ne=kt(S),Q=kt(o.floating),G=kt(c),[F,B]=M.useState(),[W,R]=M.useState(),Y=gt(function(de,Ee,ce){ce===void 0&&(ce=!1);function Oe(Ae){p?(B(Ae.id),C==null||C.events.emit("virtualfocus",Ae),E&&(E.current=Ae)):lr(Ae,{preventScroll:!0,sync:_y()&&cu()?Ov||U.current:!1})}const ht=de.current[Ee.current];ht&&Oe(ht),requestAnimationFrame(()=>{const Ae=de.current[Ee.current]||ht;if(!Ae)return;ht||Oe(Ae);const pt=ne.current;pt&&H&&(ce||!_.current)&&(Ae.scrollIntoView==null||Ae.scrollIntoView(typeof pt=="boolean"?{block:"nearest",inline:"nearest"}:pt))})});ke(()=>{document.createElement("div").focus({get preventScroll(){return Ov=!0,!1}})},[]),ke(()=>{l&&(n&&o.floating?D.current&&c!=null&&(A.current=!0,L.current=c,V(c)):$.current&&(L.current=-1,N.current(null)))},[l,n,o.floating,c,V]),ke(()=>{if(l&&n&&o.floating)if(s==null){if(U.current=!1,G.current!=null)return;if($.current&&(L.current=-1,Y(i,L)),(!z.current||!$.current)&&D.current&&(k.current!=null||D.current===!0&&k.current==null)){let de=0;const Ee=()=>{i.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):(L.current=k.current==null||Mu(k.current,y,f)||h?Cu(i,j.current):ev(i,j.current),k.current=null,V(L.current))};Ee()}}else Vi(i,s)||(L.current=s,Y(i,L,A.current),A.current=!1)},[l,n,o.floating,s,G,h,i,y,f,V,Y,j]),ke(()=>{var de;if(!l||o.floating||!C||p||!$.current)return;const Ee=C.nodesRef.current,ce=(de=Ee.find(Ae=>Ae.id===O))==null||(de=de.context)==null?void 0:de.elements.floating,Oe=nn(wt(o.floating)),ht=Ee.some(Ae=>Ae.context&&rt(Ae.context.elements.floating,Oe));ce&&!ht&&_.current&&ce.focus({preventScroll:!0})},[l,o.floating,C,O,p]),ke(()=>{if(!l||!C||!p||O)return;function de(Ee){R(Ee.id),E&&(E.current=Ee)}return C.events.on("virtualfocus",de),()=>{C.events.off("virtualfocus",de)}},[l,C,p,O,E]),ke(()=>{N.current=V,$.current=!!o.floating}),ke(()=>{n||(k.current=null)},[n]),ke(()=>{z.current=n},[n]);const se=s!=null,H=M.useMemo(()=>{function de(ce){if(!n)return;const Oe=i.current.indexOf(ce);Oe!==-1&&V(Oe)}return{onFocus(ce){let{currentTarget:Oe}=ce;de(Oe)},onClick:ce=>{let{currentTarget:Oe}=ce;return Oe.focus({preventScroll:!0})},...v&&{onMouseMove(ce){let{currentTarget:Oe}=ce;de(Oe)},onPointerLeave(ce){let{pointerType:Oe}=ce;!_.current||Oe==="touch"||(L.current=-1,Y(i,L),V(null),p||lr(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,v,i,V,p]),Pe=gt(de=>{if(_.current=!1,U.current=!0,!Z.current&&de.currentTarget===Q.current)return;if(h&&_v(de.key,y,f)){Pt(de),r(!1,de.nativeEvent,"list-navigation"),dt(o.domReference)&&!p&&o.domReference.focus();return}const Ee=L.current,ce=Cu(i,w),Oe=ev(i,w);if(de.key==="Home"&&(Pt(de),L.current=ce,V(L.current)),de.key==="End"&&(Pt(de),L.current=Oe,V(L.current)),T>1){const ht=I||Array.from({length:i.current.length},()=>({width:1,height:1})),Ae=l_(ht,T,P),pt=Ae.findIndex(ae=>ae!=null&&!da(i.current,ae,w)),J=Ae.reduce((ae,_e,Xe)=>_e!=null&&!da(i.current,_e,w)?Xe:ae,-1);if(L.current=Ae[a_({current:Ae.map(ae=>ae!=null?i.current[ae]:null)},{event:de,orientation:y,loop:d,cols:T,disabledIndices:u_([...w||i.current.map((ae,_e)=>da(i.current,_e)?_e:void 0),void 0],Ae),minIndex:pt,maxIndex:J,prevIndex:c_(L.current>Oe?ce:L.current,ht,Ae,T,de.key===Li?"bl":de.key===Io?"tr":"tl"),stopEvent:!0})],V(L.current),y==="both")return}if(Av(de.key,y)){if(Pt(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){L.current=Mu(de.key,y,f)?ce:Oe,V(L.current);return}Mu(de.key,y,f)?d?L.current=Ee>=Oe?u&&Ee!==i.current.length?-1:ce:Mt(i,{startingIndex:Ee,disabledIndices:w}):L.current=Math.min(Oe,Mt(i,{startingIndex:Ee,disabledIndices:w})):d?L.current=Ee<=ce?u&&Ee!==-1?i.current.length:Oe:Mt(i,{startingIndex:Ee,decrement:!0,disabledIndices:w}):L.current=Math.max(ce,Mt(i,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Vi(i,L.current)?V(null):V(L.current)}}),st=M.useMemo(()=>p&&n&&se&&{"aria-activedescendant":W||F},[p,n,se,W,F]),Ue=M.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!My(o.domReference)&&st,onKeyDown:Pe,onPointerMove(){_.current=!0}}),[st,Pe,o.domReference,y]),at=M.useMemo(()=>{function de(ce){m==="auto"&&Ay(ce.nativeEvent)&&(D.current=!0)}function Ee(ce){D.current=m,m==="auto"&&lu(ce.nativeEvent)&&(D.current=!0)}return{...st,onKeyDown(ce){_.current=!1;const Oe=ce.key.indexOf("Arrow")===0,ht=$_(ce.key,y,f),Ae=_v(ce.key,y,f),pt=Av(ce.key,y),J=(h?ht:pt)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const It=C==null?void 0:C.nodesRef.current.find(Rt=>Rt.parentId==null),Ft=C&&It?x_(C.nodesRef.current,It.id):null;if(Oe&&Ft&&E){const Rt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ht||Ae){var ae,_e;const Ur=((ae=Ft.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,ti=Ae&&!Ur?(_e=Ft.context)==null?void 0:_e.elements.domReference:ht?i.current.find(ni=>(ni==null?void 0:ni.id)===F):null;ti&&(Pt(ce),ti.dispatchEvent(Rt),R(void 0))}if(pt&&Ft.context&&Ft.context.open&&Ft.parentId&&ce.currentTarget!==Ft.context.elements.domReference){var Xe;Pt(ce),(Xe=Ft.context.elements.domReference)==null||Xe.dispatchEvent(Rt);return}}return Pe(ce)}if(!(!n&&!g&&Oe)){if(J&&(k.current=h&&pt?null:ce.key),h){ht&&(Pt(ce),n?(L.current=Cu(i,j.current),V(L.current)):r(!0,ce.nativeEvent,"list-navigation"));return}pt&&(c!=null&&(L.current=c),Pt(ce),!n&&g?r(!0,ce.nativeEvent,"list-navigation"):Pe(ce),n&&V(L.current))}},onFocus(){n&&!p&&V(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[F,st,Pe,j,m,i,h,V,r,n,g,y,f,c,C,p,E]);return M.useMemo(()=>l?{reference:at,floating:Ue,item:H}:{},[l,at,Ue,H])}const R_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Vo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=R_.get(s))!=null?n:s,l=Ao(),u=cr()!=null,d=M.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="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"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),h=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),f=M.useCallback(p=>{let{active:m,selected:v}=p;const g={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...g,"aria-selected":m&&v};case"combobox":return{...g,...m&&{"aria-selected":!0}}}return{}},[o,s]);return M.useMemo(()=>i?{reference:d,floating:h,item:f}:{},[i,d,h,f])}const Dv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function $o(e,t){return typeof e=="function"?e(t):e}function j_(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function B_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=j_(n,s);return!c&&a==="close"&&l("unmounted"),ke(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function z_(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,h=(u?s:s.close)||0,[f,p]=M.useState(()=>({...$o(i,c),...$o(n,c)})),{isMounted:m,status:v}=B_(e,{duration:s}),g=kt(n),w=kt(r),y=kt(o),T=kt(i);return ke(()=>{const S=$o(g.current,c),E=$o(y.current,c),I=$o(T.current,c),P=$o(w.current,c)||Object.keys(S).reduce((O,C)=>(O[C]="",O),{});if(v==="initial"&&p(O=>({transitionProperty:O.transitionProperty,...I,...S})),v==="open"&&p({transitionProperty:Object.keys(P).map(Dv).join(","),transitionDuration:d+"ms",...I,...P}),v==="close"){const O=E||S;p({transitionProperty:Object.keys(O).map(Dv).join(","),transitionDuration:h+"ms",...I,...O})}},[h,y,g,w,T,d,v,c]),{isMounted:m,styles:f}}function W_(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:h=[],selectedIndex:f=null}=t,p=M.useRef(),m=M.useRef(""),v=M.useRef((n=f??s)!=null?n:-1),g=M.useRef(null),w=gt(a),y=gt(l),T=kt(u),S=kt(h);ke(()=>{r&&(clearTimeout(p.current),g.current=null,m.current="")},[r]),ke(()=>{if(r&&m.current===""){var C;v.current=(C=f??s)!=null?C:-1}},[r,f,s]);const E=gt(C=>{C?o.current.typing||(o.current.typing=C,y(C)):o.current.typing&&(o.current.typing=C,y(C))}),I=gt(C=>{function V(N,$,z){const U=T.current?T.current($,z):$.find(A=>(A==null?void 0:A.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return U?N.indexOf(U):-1}const D=i.current;if(m.current.length>0&&m.current[0]!==" "&&(V(D,D,m.current)===-1?E(!1):C.key===" "&&Pt(C)),D==null||S.current.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&(Pt(C),E(!0)),D.every(N=>{var $,z;return N?(($=N[0])==null?void 0:$.toLocaleLowerCase())!==((z=N[1])==null?void 0:z.toLocaleLowerCase()):!0})&&m.current===C.key&&(m.current="",v.current=g.current),m.current+=C.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=g.current,E(!1)},d);const k=v.current,_=V(D,[...D.slice((k||0)+1),...D.slice(0,(k||0)+1)],m.current);_!==-1?(w(_),g.current=_):C.key!==" "&&(m.current="",E(!1))}),P=M.useMemo(()=>({onKeyDown:I}),[I]),O=M.useMemo(()=>({onKeyDown:I,onKeyUp(C){C.key===" "&&E(!1)}}),[I,E]);return M.useMemo(()=>c?{reference:P,floating:O}:{},[c,P,O])}function Nv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function H_(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function U_(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();function c(d,h){const f=performance.now(),p=f-l;if(s===null||a===null||p===0)return s=d,a=h,l=f,null;const m=d-s,v=h-a,w=Math.sqrt(m*m+v*v)/p;return s=d,a=h,l=f,w}const u=d=>{let{x:h,y:f,placement:p,elements:m,onClose:v,nodeId:g,tree:w}=d;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||f==null)return;const{clientX:E,clientY:I}=T,P=[E,I],O=wn(T),C=T.type==="mouseleave",V=rt(m.floating,O),D=rt(m.domReference,O),L=m.domReference.getBoundingClientRect(),k=m.floating.getBoundingClientRect(),_=p.split("-")[0],N=h>k.right-k.width/2,$=f>k.bottom-k.height/2,z=H_(P,L),U=k.width>L.width,A=k.height>L.height,j=(U?L:k).left,Z=(U?L:k).right,ne=(A?L:k).top,Q=(A?L:k).bottom;if(V&&(i=!0,!C))return;if(D&&(i=!1),D&&!C){i=!0;return}if(C&&ze(T.relatedTarget)&&rt(m.floating,T.relatedTarget)||w&&Dr(w.nodesRef.current,g).some(B=>{let{context:W}=B;return W==null?void 0:W.open}))return;if(_==="top"&&f>=L.bottom-1||_==="bottom"&&f<=L.top+1||_==="left"&&h>=L.right-1||_==="right"&&h<=L.left+1)return S();let G=[];switch(_){case"top":G=[[j,L.top+1],[j,k.bottom-1],[Z,k.bottom-1],[Z,L.top+1]];break;case"bottom":G=[[j,k.top+1],[j,L.bottom-1],[Z,L.bottom-1],[Z,k.top+1]];break;case"left":G=[[k.right-1,Q],[k.right-1,ne],[L.left+1,ne],[L.left+1,Q]];break;case"right":G=[[L.right-1,Q],[L.right-1,ne],[k.left+1,ne],[k.left+1,Q]];break}function F(B){let[W,R]=B;switch(_){case"top":{const Y=[U?W+t/2:N?W+t*4:W-t*4,R+t+1],se=[U?W-t/2:N?W+t*4:W-t*4,R+t+1],H=[[k.left,N||U?k.bottom-t:k.top],[k.right,N?U?k.bottom-t:k.top:k.bottom-t]];return[Y,se,...H]}case"bottom":{const Y=[U?W+t/2:N?W+t*4:W-t*4,R-t],se=[U?W-t/2:N?W+t*4:W-t*4,R-t],H=[[k.left,N||U?k.top+t:k.bottom],[k.right,N?U?k.top+t:k.bottom:k.top+t]];return[Y,se,...H]}case"left":{const Y=[W+t+1,A?R+t/2:$?R+t*4:R-t*4],se=[W+t+1,A?R-t/2:$?R+t*4:R-t*4];return[...[[$||A?k.right-t:k.left,k.top],[$?A?k.right-t:k.left:k.right-t,k.bottom]],Y,se]}case"right":{const Y=[W-t,A?R+t/2:$?R+t*4:R-t*4],se=[W-t,A?R-t/2:$?R+t*4:R-t*4],H=[[$||A?k.left+t:k.right,k.top],[$?A?k.left+t:k.right:k.left+t,k.bottom]];return[Y,se,...H]}}}if(!Nv([E,I],G)){if(i&&!z)return S();if(!C&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}Nv([E,I],F([h,f]))?!i&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}function G_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Y_(...e){return t=>e.forEach(n=>G_(n,t))}var Du=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),i=o.find(K_);if(i){const s=i.props.children,a=o.map(l=>l===i?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return x.jsx(Nu,{...r,ref:t,children:M.isValidElement(s)?M.cloneElement(s,void 0,a):null})}return x.jsx(Nu,{...r,ref:t,children:n})});Du.displayName="Slot";var Nu=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=X_(n);return M.cloneElement(n,{...Z_(r,n.props),ref:t?Y_(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});Nu.displayName="SlotClone";var q_=({children:e})=>x.jsx(x.Fragment,{children:e});function K_(e){return M.isValidElement(e)&&e.type===q_}function Z_(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].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)}const Q_=(e,t)=>Xs()?t:window.matchMedia(e).matches,J_=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Q_(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},rn="600ms",eM={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:rn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:rn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:rn}},tM={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:rn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:rn}},Fu={drawer:e=>e==="left"?eM:tM,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:rn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:rn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:rn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:rn},enter:{opacity:1,scale:[1.05,1],animationDuration:rn},exit:{opacity:0,scale:.97,animationDuration:rn}}},nM=ri("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"}}),rM={top:0,left:0,right:0,bottom:-1},oM=e=>e*.62,iM=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 i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=oM(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(Et.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:rM,whileDrag:{cursor:"grabbing"},className:Be("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})},Lu={drawer:"right",sheet:"none",dialog:"none"},Fv=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),l=J_("(min-width: 48rem)"),c=e!=="dialog",u=l?e==="drawer"?i.position:Lu[e]:r?Lu[e]:Lu.sheet,d=l||r?Fu[e]:Fu.sheet,h=typeof d=="function"?d(u):d,f=l||r?e:"sheet",{refs:p,context:m}=Fo({open:i.open,onOpenChange:i.onChange}),v=ga(m),g=Vo(m),w=No(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:T}=Lo([v,g,w]),S=i.trigger,E=po(void 0),I=()=>i.onChange(!1);return x.jsxs(b.Fragment,{children:[i.trigger?x.jsx(b.Fragment,{children:i.asChild?x.jsx(Du,{ref:p.setReference,...y({layoutId:i.layoutId}),children:S}):x.jsx(Et.button,{ref:p.setReference,...y(),layoutId:i.layoutId,type:"button",children:S})}):null,x.jsx(Do,{children:x.jsx(Ii,{presenceAffectsLayout:!0,children:i.open?x.jsx(__,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${f==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:x.jsx(ji,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(Et.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:nM({position:u,type:f}),exit:"exit",layoutId:i.layoutId,initial:"initial",ref:p.setFloating,style:f==="drawer"?{width:E}:{height:E},variants:h,...T(),children:[i.title?x.jsx("header",{className:"relative w-full",children:i.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i.children}),i.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:I,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(wg,{})})}):null,c&&t?x.jsx(iM,{onChange:i.onChange,parent:p.floating,position:u,sheet:f==="sheet",value:E}):null]})})}):null})})]})},Lv=b.createContext(""),sM=e=>{var o;const[t,n]=b.useState(!1),r=e.items.find(i=>i.props.id===e.active);return x.jsxs("div",{className:"my-4 flex min-w-full px-8 text-center lg:hidden",children:[x.jsx(qn,{className:"min-w-full",onClick:()=>n(!0),children:(o=r==null?void 0:r.props)==null?void 0:o.title}),x.jsx(Fv,{closable:!0,onChange:n,open:t,type:"dialog",children:x.jsx("ul",{className:"mt-4 space-y-4",children:e.items.map(i=>{const s=i.props,a=()=>{e.setActive(s.id),n(!1)};return x.jsx("li",{className:"min-w-full",children:x.jsx(qn,{className:"w-full",onClick:a,theme:s.id===e.active?"primary":"secondary",children:s.title})},s.id)})})})]})},aM=e=>{const[t,n]=Py(e.active),r=po(0),o=po(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=i.current;if(u===null)return;const d=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",h);let f=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(f=u.querySelector(`li[data-id=${p}]`),n(p)),f===null){f=u.querySelector("li[data-id]");const m=f.getAttribute("data-id")||"";n(m)}return d(f),()=>window.removeEventListener("resize",h)},[]);const a=XO(e.onChange);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=b.Children.toArray(e.children),c=u=>{const d=u.currentTarget,h=d.getBoundingClientRect();o.set(h.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return x.jsx(Lv.Provider,{value:t,children:x.jsx(Cy,{container:"pt-0",className:e.className,header:x.jsxs("header",{ref:i,className:"relative mb-2 border-b border-card-border",children:[x.jsx(Et.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"absolute bottom-0 hidden h-0.5 w-28 bg-primary transition-all duration-300 lg:block"}),x.jsxs("nav",{children:[x.jsx(sM,{setActive:n,items:l,active:t}),x.jsx("ul",{className:"hidden justify-between divide-x divide-card-border overflow-x-auto md:justify-start lg:flex",children:l.map(u=>{const d=u.props;return x.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full data-[active=true]:text-primary md:w-auto",children:x.jsx(s,{"data-id":d.id,onClick:c,"aria-current":"page",className:"block w-full whitespace-nowrap px-10 py-4 font-medium",href:e.useHash?`#${d.id}`:void 0,children:d.title})},`tab-header-${d.id}`)})})]})]}),children:e.children})})},lM=()=>b.useContext(Lv),cM=e=>{const t=lM();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})},Ro=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[ca(10),Su({fallbackAxisSideDirection:"end"}),xu(),Qy({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Fo({open:n,middleware:i,transform:!0,whileElementsMounted:sa,onOpenChange:(p,m)=>{var g;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(g=e.onChange)==null||g.call(e,p))}}),c=ga(l),u=No(l),d=Vo(l),{getReferenceProps:h,getFloatingProps:f}=Lo([c,u,d]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:s.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(Do,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(ji,{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:s.setFloating,style:a,"aria-labelledby":t,...f(),children:[x.jsx(sv,{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]})})})]})},Vv=300,$v=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:i,...s})=>{const[a,l]=b.useState(!1),c=b.useRef(null),u=o||"span",{refs:d,floatingStyles:h,context:f}=Fo({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:sa,middleware:[ca(5),Su({fallbackAxisSideDirection:"start"}),xu(),Qy({element:c,padding:5})]}),p=dv(f,{move:!0,enabled:r,delay:{open:Vv}}),m=V_(f,{enabled:r}),v=No(f,{enabled:r}),g=Vo(f,{role:"tooltip",enabled:r}),w=D_(f,{enabled:!!r&&!!t}),{getReferenceProps:y,getFloatingProps:T}=Lo([p,m,v,g,w]);return x.jsxs(b.Fragment,{children:[x.jsx(u,{ref:d.setReference,...y(s),children:i}),x.jsx(Do,{children:a&&x.jsxs(to,{...T(),ref:d.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(sv,{ref:c,context:f,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class va{static getDescendantProperty(t,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=t[o],a!==null&&typeof a<"u")if(!i&&(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++)va.getDescendantProperty(a[l],i,r);else i&&va.getDescendantProperty(a,i,r)}else r.push(t);return r}}class jo{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 i=jo.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=va.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=jo.isMatch(s[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=jo.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 jo.indexesOfFirstLetter(t,n).forEach((s,a)=>{let l=s+1;o[a]=[s];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(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Rv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("div",{className:Be("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx($v,{title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(bg,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?x.jsxs(b.Fragment,{children:[x.jsx(vg,{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(tk,{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]}),ba=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:h="",name:f,title:p,placeholder:m,hideLeft:v,required:g})=>{const w=d??f,y=Wt(),T=e??y.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:Be("group inline-flex w-full gap-1.5",r),children:[x.jsxs("label",{form:u,htmlFor:w,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-hover:border-primary group-error:text-danger",children:[!v&&!n?x.jsx(Rv,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:m,children:T||n?x.jsxs(b.Fragment,{children:[g?null:x.jsx("span",{className:"text-opacity-70",children:T}),n?x.jsx(b.Fragment,{children:n}):null]}):null}):null,x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger ${h} focus:ring-2 focus:ring-inset focus:ring-primary`,children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:s}):null]})]}),x.jsx("p",{className:"hidden text-xs empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:block group-error:block group-error:text-danger",children:c}),x.jsx("p",{className:"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})]})},jv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>x.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[r.label??r.value,t?x.jsx("span",{children:x.jsx(QP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})),uM={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},dM={caseSensitive:!1,sort:!1},fM=[],hM=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:h=!1,...f},p)=>{const m=Wt(),v=b.useRef(null),[g,w]=b.useState(!1),[y,T]=b.useState(""),[S,E]=b.useState(f.value??f.defaultValue??""),[I,P]=b.useState(f.value??f.defaultValue??""),[O,C]=b.useState(null),V=b.useRef(fM),D=t&&y!==""?[{value:y,label:y,"data-dynamic":"true"},...e]:e,L=new jo(D,["value","label"],dM).search(y),k=t?void 0:`^(${e.map(R=>`${tu(R.value)}${R.label?"|"+tu(R.label):""}`).join("|")})$`;b.useEffect(()=>{const R=z.reference.current;if(R)return Ss(R)},[]),b.useEffect(()=>{if(f.value){const R=e.find(Y=>Y.value===f.value);E((R==null?void 0:R.label)??f.value)}},[f.value]);const{x:_,y:N,strategy:$,refs:z,context:U}=Fo({open:g,transform:!0,onOpenChange:w,whileElementsMounted:sa,middleware:[ca(4),i_({padding:10,apply(R){Object.assign(R.elements.floating.style,{width:`${R.rects.reference.width}px`,maxHeight:`${Math.min(480,R.availableHeight)}px`})}})]}),A=z_(U,uM),{getReferenceProps:j,getFloatingProps:Z,getItemProps:ne}=Lo([Vo(U,{role:"listbox"}),No(U),Mv(U,{activeIndex:O,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:V,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:O,virtual:!0,onNavigate:R=>C(Y=>R??Y)})]),Q=(R,Y)=>{var H,Pe;E(R.value),(H=z.reference.current)==null||H.setAttribute("data-value",R.value),P(R.label??"");const se=xs(v.current,R.value);se&&((Pe=f.onChange)==null||Pe.call(f,se)),w(!1),T(""),C(Y)},G=R=>{var se;const Y=R.target.value;return T(Y),!g&&Y===""?w(!0):(R.target.name=f.name||"",Y?w(!0):(se=f.onChange)==null?void 0:se.call(f,R))},F=()=>{w(!0),T("")},B=()=>{var R;T(""),E(""),(R=z.reference.current)==null||R.setAttribute("data-value",""),P(""),xs(z.reference.current),w(!1)},W=f.id||f.name;return x.jsxs(ba,{...f,container:Be("group inline-block w-full",a),error:d,feedback:n,form:f.form,hideLeft:l,id:f.name||f.id,interactive:o,labelClassName:r,left:u,name:f.name,optionalText:s,placeholder:f.placeholder,required:h,rightLabel:i,title:f.title,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[x.jsx(yg,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),S?x.jsx("button",{type:"button",onClick:B,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{...j({...f,onChange:G,onFocus:F,pattern:k,ref:z.setReference,name:`${W}-shadow`,id:`${W}-shadow`,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),w(!1);if(R.key==="Enter"){if(O!==null&&L[O])return R.preventDefault(),Q(L[O],O);if(L.length===1)return R.preventDefault(),Q(L[0],0)}}}),"data-value":S,"data-error":!!d,"data-name":W,"data-target":W,required:h,value:g?y:I||S,"aria-autocomplete":"list",autoComplete:"off",className:Be("input placeholder-input-mask group h-10 w-full flex-1 rounded-md bg-transparent px-2 py-1 text-base text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||y?"pe-12":"",u?"ps-8":"",f.className)}),x.jsx("input",{id:W,name:W,type:"hidden","data-origin":W,ref:p,required:h,defaultValue:f.value||S||void 0}),x.jsx(Do,{preserveTabOrder:!0,children:g?x.jsx(ji,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...Z({ref:z.setFloating,style:{position:$,left:_??0,top:N??0,...A.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:L.map((R,Y)=>b.createElement(jv,{...ne({onClick:()=>Q(R,Y),ref:se=>void(V.current[Y]=se),selected:O===Y,active:S===R.value}),key:`${R.value}-option`,option:R,selected:O===Y,active:S===R.value}))})}):null})]})}),Bv=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:s,...a},l)=>x.jsxs("label",{"data-task":t,"data-disabled":a.disabled,"aria-disabled":a.disabled,className:Be("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[x.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Be("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:Be("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),pM=e=>{const[t,n]=jP();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:UP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,ref:t})},Bi=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:h,...f},p)=>{const m=f.id??f.name,v=b.useRef(null);return b.useEffect(()=>{if(v.current===null)return;const g=v.current,w=Ss(v.current),y=T=>{const S=T;if(S.key==="Enter"&&g.enterKeyHint==="next"){const E=g.getAttribute("data-next");if(E){const I=document.getElementById(E);if(I)return I.focus(),void S.preventDefault()}}};return g.addEventListener("keydown",y),()=>{w(),g.removeEventListener("keydown",y)}},[]),x.jsx(ba,{info:n,container:Be("group inline-block w-full",l),error:h,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:s,interactive:i,form:f.form,id:f.name||f.id,name:f.name,labelClassName:r,title:f.title,placeholder:f.placeholder,required:f.required,children:x.jsx(ry,{...f,type:e,"data-next":o,ref:Al(p,v),id:m,name:m,className:Be("input placeholder-input-mask group h-10 w-full flex-1 rounded-md bg-transparent px-2 py-1 text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-4":"",d?"ps-4":"",f.className)})})}),zv=new Date(1970,11,31),Vu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Wv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},mM={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")},$u=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},gM=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},s)=>{const a=b.useId(),l=Wt(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,d]=b.useState(e||void 0),[h,f]=b.useState(!1),p=$u(c,zv).flatMap(E=>_n.keyof(Vu,E.type)?Vu[E.type](E.value):[]),m=$u(c,zv).reduce((E,I)=>E+(_n.keyof(Wv,I.type)?Wv[I.type](I.value):""),""),[v,g]=b.useState(u?$u(c,u).reduce((E,I)=>E+(_n.keyof(Vu,I.type)?mM[I.type](u,I.value):""),""):""),w=E=>{const I=E.target.value;if(g(I),p.length===I.length&&p.every((O,C)=>{const V=I.charAt(C);return typeof O=="string"?V===O:O.test(V)})){const O=vo(dO(I,m,new Date));return d(O),r==null?void 0:r(O)}return d(void 0),r==null?void 0:r(void 0)},y=E=>(d(E),r==null||r(E),g(E?fI(E,m):"")),T=kg(u),S=T?u.toISOString():void 0;return x.jsx(Bi,{...i,mask:p,value:v,"data-value":S,"data-target":i.name,className:"uppercase",formNoValidate:!h,placeholder:m,onChange:w,required:i.required??!0,error:h?void 0:i.error,name:void 0,id:void 0,right:x.jsxs(b.Fragment,{children:[x.jsx("input",{"data-origin":i.name,hidden:!0,type:"date",id:i.name,ref:s,name:i.name,defaultValue:S}),x.jsx(Ro,{open:h,onChange:f,trigger:x.jsxs("span",{"aria-labelledby":a,children:[x.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),x.jsx(XP,{})]}),buttonProps:{"aria-describedby":a},children:x.jsx(Ey,{...i,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:y,disabledDate:n,date:T?u:void 0})})]})})}),yM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],vM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],bM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],wM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Hv=(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 Uv(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?wM:bM:t.binary?vM:yM,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=Hv(e,t.locale,s);return i+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,s||(e=e.toPrecision(3));const l=Hv(Number(e),t.locale,s),c=n[a];return i+l+r+c}var Ru={exports:{}},wa={exports:{}},Le={};/** @license React v16.13.1
|
|
177
|
+
*/var gA=["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])"],ia=gA.join(","),Vy=typeof Element>"u",Co=Vy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,sa=!Vy&&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},aa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},yA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},vA=function(t,n,r){if(aa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ia));return n&&Co.call(t,ia)&&o.unshift(t),o=o.filter(r),o},bA=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!aa(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Co.call(s,ia);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!aa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&h){var f=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:s,candidates:f})}else i.unshift.apply(i,s.children)}}return o},$y=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ry=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yA(t))&&!$y(t)?0:t.tabIndex},wA=function(t,n){var r=Ry(t);return r<0&&n&&!$y(t)?0:r},xA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},jy=function(t){return t.tagName==="INPUT"},SA=function(t){return jy(t)&&t.type==="hidden"},TA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},EA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},CA=function(t){if(!t.name)return!0;var n=t.form||sa(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=EA(o,t.form);return!i||i===t},PA=function(t){return jy(t)&&t.type==="radio"},kA=function(t){return PA(t)&&!CA(t)},IA=function(t){var n,r=t&&sa(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=sa(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},By=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},OA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Co.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(Co.call(s,"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=sa(t);if(l&&!l.shadowRoot&&o(l)===!0)return By(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(IA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return By(t);return!1},AA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Co.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},_A=function(t,n){return!(n.disabled||aa(n)||SA(n)||OA(n,t)||TA(n)||AA(n))},bu=function(t,n){return!(kA(n)||Ry(n)<0||!_A(t,n))},MA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},DA=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=wA(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(xA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ni=function(t,n){n=n||{};var r;return n.getShadowRoot?r=bA([t],n.includeContainer,{filter:bu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:MA}):r=vA(t,n.includeContainer,bu.bind(null,n)),DA(r)},FA=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Co.call(t,ia)===!1?!1:bu(n,t)};function zy(e,t,n){let{reference:r,floating:o}=e;const i=Ar(t),s=yu(t),a=gu(s),l=sr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Eo(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1);break}return f}const NA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=zy(c,r,l),h=r,f={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:y}=a[m],{x:w,y:g,data:T,reset:S}=await y({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,d=g??d,f={...f,[v]:{...f[v],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=zy(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}};async function wu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=To(t,e),p=Ly(f),v=a[h?d==="floating"?"reference":"floating":d],y=oa(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},S=oa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:l}):w);return{top:(y.top-S.top+p.top)/T.y,bottom:(S.bottom-y.bottom+p.bottom)/T.y,left:(y.left-S.left+p.left)/T.x,right:(S.right-y.right+p.right)/T.x}}const LA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=To(e,t)||{};if(c==null)return{};const d=Ly(u),h={x:n,y:r},f=yu(o),p=gu(f),m=await s.getDimensions(c),v=f==="y",y=v?"top":"left",w=v?"bottom":"right",g=v?"clientHeight":"clientWidth",T=i.reference[p]+i.reference[f]-h[f]-i.floating[p],S=h[f]-i.reference[f],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let I=E?E[g]:0;(!I||!await(s.isElement==null?void 0:s.isElement(E)))&&(I=a.floating[g]||i.floating[p]);const P=T/2-S/2,O=I/2-m[p]/2-1,C=Sn(d[y],O),L=Sn(d[w],O),D=C,V=I-m[p]-L,k=I/2-m[p]/2+P,_=mu(D,k,V),F=!l.arrow&&Eo(o)!=null&&k!==_&&i.reference[p]/2-(k<D?C:L)-m[p]/2<0,$=F?k<D?k-D:k-V:0;return{[f]:h[f]+$,data:{[f]:_,centerOffset:k-_-$,...F&&{alignmentOffset:$}},reset:F}}}),VA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=To(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=sr(o),w=Ar(a),g=sr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(g||!m?[ra(a)]:fA(a)),E=p!=="none";!h&&E&&S.push(...pA(a,m,p,T));const I=[a,...S],P=await wu(t,v),O=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&O.push(P[y]),d){const k=dA(o,s,T);O.push(P[k[0]],P[k[1]])}if(C=[...C,{placement:o,overflows:O}],!O.every(k=>k<=0)){var L,D;const k=(((L=i.flip)==null?void 0:L.index)||0)+1,_=I[k];if(_)return{data:{index:k,overflows:C},reset:{placement:_}};let F=(D=C.filter($=>$.overflows[0]<=0).sort(($,H)=>$.overflows[1]-H.overflows[1])[0])==null?void 0:D.placement;if(!F)switch(f){case"bestFit":{var V;const $=(V=C.filter(H=>{if(E){const U=Ar(H.placement);return U===w||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,A)=>U+A,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:V[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function $A(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=sr(n),a=Eo(n),l=Ar(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=To(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const RA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await $A(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},jA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...l}=To(e,t),c={x:n,y:r},u=await wu(t,l),d=Ar(sr(o)),h=Ny(d);let f=c[h],p=c[d];if(i){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",w=f+u[v],g=f-u[y];f=mu(w,f,g)}if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",w=p+u[v],g=p-u[y];p=mu(w,p,g)}const m=a.fn({...t,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},BA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=To(e,t),l=await wu(t,a),c=sr(n),u=Eo(n),d=Ar(n)==="y",{width:h,height:f}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=f-l.top-l.bottom,y=h-l.left-l.right,w=Sn(f-l[p],v),g=Sn(h-l[m],y),T=!t.middlewareData.shift;let S=w,E=g;if(d?E=u||T?Sn(g,y):y:S=u||T?Sn(w,v):v,T&&!u){const P=qt(l.left,0),O=qt(l.right,0),C=qt(l.top,0),L=qt(l.bottom,0);d?E=h-2*(P!==0||O!==0?P+O:qt(l.left,l.right)):S=f-2*(C!==0||L!==0?C+L:qt(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:S});const I=await o.getDimensions(i.floating);return h!==I.width||f!==I.height?{reset:{rects:!0}}:{}}}};function Wy(e){const t=Yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ft(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=na(n)!==i||na(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function xu(e){return ze(e)?e:e.contextElement}function Po(e){const t=xu(e);if(!ft(t))return ir(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Wy(t);let s=(i?na(n.width):n.width)/r,a=(i?na(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const zA=ir(0);function Hy(e){const t=Lt(e);return!au()||!t.visualViewport?zA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Lt(e)?!1:t}function _r(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=xu(e);let s=ir(1);t&&(r?ze(r)&&(s=Po(r)):s=Po(e));const a=WA(i,n,r)?Hy(i):ir(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const h=Lt(i),f=r&&ze(r)?Lt(r):r;let p=h,m=lu(p);for(;m&&r&&f!==p;){const v=Po(m),y=m.getBoundingClientRect(),w=Yt(m),g=y.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,T=y.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=g,c+=T,p=Lt(m),m=lu(p)}}return oa({width:u,height:d,x:l,y:c})}function HA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ln(r),a=t?ea(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ir(1);const u=ir(0),d=ft(r);if((d||!d&&!i)&&((nr(r)!=="body"||Fi(s))&&(l=ta(r)),ft(r))){const h=_r(r);c=Po(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function UA(e){return Array.from(e.getClientRects())}function Uy(e){return _r(Ln(e)).left+ta(e).scrollLeft}function GA(e){const t=Ln(e),n=ta(e),r=e.ownerDocument.body,o=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Uy(e);const a=-n.scrollTop;return Yt(r).direction==="rtl"&&(s+=qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function YA(e,t){const n=Lt(e),r=Ln(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=au();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function qA(e,t){const n=_r(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ft(e)?Po(e):ir(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Gy(e,t,n){let r;if(t==="viewport")r=YA(e,n);else if(t==="document")r=GA(Ln(e));else if(ze(t))r=qA(t,n);else{const o=Hy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return oa(r)}function Yy(e,t){const n=Vn(e);return n===t||!ze(n)||rr(n)?!1:Yt(n).position==="fixed"||Yy(n,t)}function KA(e,t){const n=t.get(e);if(n)return n;let r=or(e,[],!1).filter(a=>ze(a)&&nr(a)!=="body"),o=null;const i=Yt(e).position==="fixed";let s=i?Vn(e):e;for(;ze(s)&&!rr(s);){const a=Yt(s),l=su(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Fi(s)&&!l&&Yy(e,s))?r=r.filter(u=>u!==s):o=a,s=Vn(s)}return t.set(e,r),r}function ZA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?ea(t)?[]:KA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Gy(t,u,o);return c.top=qt(d.top,c.top),c.right=Sn(d.right,c.right),c.bottom=Sn(d.bottom,c.bottom),c.left=qt(d.left,c.left),c},Gy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XA(e){const{width:t,height:n}=Wy(e);return{width:t,height:n}}function QA(e,t,n){const r=ft(t),o=Ln(t),i=n==="fixed",s=_r(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ir(0);if(r||!r&&!i)if((nr(t)!=="body"||Fi(o))&&(a=ta(t)),r){const d=_r(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Uy(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function Su(e){return Yt(e).position==="static"}function qy(e,t){return!ft(e)||Yt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ky(e,t){const n=Lt(e);if(ea(e))return n;if(!ft(e)){let o=Vn(e);for(;o&&!rr(o);){if(ze(o)&&!Su(o))return o;o=Vn(o)}return n}let r=qy(e,t);for(;r&&rA(r)&&Su(r);)r=qy(r,t);return r&&rr(r)&&Su(r)&&!su(r)?n:r||oA(e)||n}const JA=async function(e){const t=this.getOffsetParent||Ky,n=this.getDimensions,r=await n(e.floating);return{reference:QA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function e_(e){return Yt(e).direction==="rtl"}const t_={convertOffsetParentRelativeRectToViewportRelativeRect:HA,getDocumentElement:Ln,getClippingRect:ZA,getOffsetParent:Ky,getElementRects:JA,getClientRects:UA,getDimensions:XA,getScale:Po,isElement:ze,isRTL:e_};function n_(e,t){let n=null,r;const o=Ln(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const f=So(u),p=So(o.clientWidth-(c+d)),m=So(o.clientHeight-(u+h)),v=So(c),w={rootMargin:-f+"px "+-p+"px "+-m+"px "+-v+"px",threshold:qt(0,Sn(1,l))||1};let g=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!g)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,w)}n.observe(e)}return s(!0),i}function la(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=xu(e),u=o||i?[...c?or(c):[],...or(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?n_(c,n):null;let h=-1,f=null;s&&(f=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var g;(g=f)==null||g.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let p,m=l?_r(e):null;l&&v();function v(){const y=_r(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const r_=RA,o_=jA,i_=VA,s_=BA,Zy=LA,a_=(e,t,n)=>{const r=new Map,o={platform:t_,...n},i={...o.platform,_c:r};return NA(e,t,{...o,platform:i})};var ca=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ua(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(!ua(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ua(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Xy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qy(e,t){const n=Xy(e);return Math.round(t*n)/n}function Jy(e){const t=M.useRef(e);return ca(()=>{t.current=e}),t}function l_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=M.useState(r);ua(h,r)||f(r);const[p,m]=M.useState(null),[v,y]=M.useState(null),w=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=M.useCallback($=>{$!==I.current&&(I.current=$,y($))},[]),T=i||p,S=s||v,E=M.useRef(null),I=M.useRef(null),P=M.useRef(u),O=l!=null,C=Jy(l),L=Jy(o),D=M.useCallback(()=>{if(!E.current||!I.current)return;const $={placement:t,strategy:n,middleware:h};L.current&&($.platform=L.current),a_(E.current,I.current,$).then(H=>{const U={...H,isPositioned:!0};V.current&&!ua(P.current,U)&&(P.current=U,df.flushSync(()=>{d(U)}))})},[h,t,n,L]);ca(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const V=M.useRef(!1);ca(()=>(V.current=!0,()=>{V.current=!1}),[]),ca(()=>{if(T&&(E.current=T),S&&(I.current=S),T&&S){if(C.current)return C.current(T,S,D);D()}},[T,S,D,C,O]);const k=M.useMemo(()=>({reference:E,floating:I,setReference:w,setFloating:g}),[w,g]),_=M.useMemo(()=>({reference:T,floating:S}),[T,S]),F=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!_.floating)return $;const H=Qy(_.floating,u.x),U=Qy(_.floating,u.y);return a?{...$,transform:"translate("+H+"px, "+U+"px)",...Xy(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:U}},[n,a,_.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:D,refs:k,elements:_,floatingStyles:F}),[u,D,k,_,F])}const c_=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?Zy({element:r.current,padding:o}).fn(n):{}:r?Zy({element:r,padding:o}).fn(n):{}}}},da=(e,t)=>({...r_(e),options:[e,t]}),Tu=(e,t)=>({...o_(e),options:[e,t]}),Eu=(e,t)=>({...i_(e),options:[e,t]}),u_=(e,t)=>({...s_(e),options:[e,t]}),ev=(e,t)=>({...c_(e),options:[e,t]});function Cu(e){return M.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const tv={...M},d_=tv.useInsertionEffect||(e=>e());function yt(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return d_(()=>{t.current=e}),M.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 Pu="ArrowUp",Li="ArrowDown",ko="ArrowLeft",Io="ArrowRight";function fa(e,t,n){return Math.floor(e/t)!==n}function Vi(e,t){return t<0||t>=e.current.length}function ku(e,t){return Mt(e,{disabledIndices:t})}function nv(e,t){return Mt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Mt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const s=e.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&ha(s,a,o));return a}function f_(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Pu){if(u&&Pt(n),c===-1)d=l;else if(d=Mt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||d<0)){const h=c%i,f=l%i,p=l-(f-h);f===h?d=l:d=f>h?p:p-i}Vi(e,d)&&(d=c)}if(n.key===Li&&(u&&Pt(n),c===-1?d=a:(d=Mt(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(d=Mt(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Vi(e,d)&&(d=c)),r==="both"){const h=So(c/i);n.key===Io&&(u&&Pt(n),c%i!==i-1?(d=Mt(e,{startingIndex:c,disabledIndices:s}),o&&fa(d,i,h)&&(d=Mt(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(d=Mt(e,{startingIndex:c-c%i-1,disabledIndices:s})),fa(d,i,h)&&(d=c)),n.key===ko&&(u&&Pt(n),c%i!==0?(d=Mt(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&fa(d,i,h)&&(d=Mt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(d=Mt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),fa(d,i,h)&&(d=c));const f=So(l/i)===h;Vi(e,d)&&(o&&f?d=n.key===ko?l:Mt(e,{startingIndex:c-c%i-1,disabledIndices:s}):d=c)}return d}function h_(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let h=0;h<l;h++)u.push(o+d+h*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function p_(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function m_(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ha(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 rv=0;function ar(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(rv);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():rv=requestAnimationFrame(i)}var ke=typeof document<"u"?b.useLayoutEffect:b.useEffect;function g_(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 y_(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 ov=M.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function v_(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=M.useState(()=>new Map),s=M.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=M.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return ke(()=>{const l=new Map(o);Array.from(l.keys()).sort(g_).forEach((u,d)=>{l.set(u,d)}),y_(o,l)||i(l)},[o]),M.createElement(ov.Provider,{value:M.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function iv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=M.useContext(ov),[a,l]=M.useState(null),c=M.useRef(null),u=M.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var h;const f=t!==void 0;s.current[a]=f?t:(h=d==null?void 0:d.textContent)!=null?h:null}},[a,i,s,t]);return ke(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),ke(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),M.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oo.apply(this,arguments)}let sv=!1,b_=0;const av=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+b_++;function w_(){const[e,t]=M.useState(()=>sv?av():void 0);return ke(()=>{e==null&&t(av())},[]),M.useEffect(()=>{sv=!0},[]),e}const Ao=tv.useId||w_;let $i;process.env.NODE_ENV!=="production"&&($i=new Set);function pa(){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=$i)!=null&&e.has(o))){var i;(i=$i)==null||i.add(o),console.warn(o)}}function x_(){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=$i)!=null&&e.has(o))){var i;(i=$i)==null||i.add(o),console.error(o)}}const lv=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:h,style:{transform:f,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||pa("The `ref` prop is required for `FloatingArrow`."));const v=Ao(),[y,w]=M.useState(!1);if(ke(()=>{if(!o)return;Yt(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const g=c*2,T=g/2,S=s/2*(l/-8+1),E=a/2*l/4,[I,P]=r.split("-"),O=!!h,C=I==="top"||I==="bottom",L=u&&P==="end"?"bottom":"top";let D=u&&P==="end"?"right":"left";u&&y&&(D=P==="end"?"left":"right");const V=(i==null?void 0:i.x)!=null?u||i.x:"",k=(i==null?void 0:i.y)!=null?u||i.y:"",_=h||"M0,0"+(" H"+s)+(" L"+(s-S)+","+(a-E))+(" Q"+s/2+","+a+" "+S+","+(a-E))+" Z",F={top:O?"rotate(180deg)":"",left:O?"rotate(90deg)":"rotate(-90deg)",bottom:O?"":"rotate(180deg)",right:O?"rotate(-90deg)":"rotate(90deg)"}[I];return M.createElement("svg",Oo({},m,{"aria-hidden":!0,ref:n,width:O?s:s+g,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[D]:V,[L]:k,[I]:C||O?"100%":"calc(100% - "+g/2+"px)",transform:""+F+(f??""),...p}}),g>0&&M.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:g+(h?0:1),d:_}),M.createElement("path",{stroke:g&&!h?m.fill:"none",d:_}),M.createElement("clipPath",{id:v},M.createElement("rect",{x:-T,y:T*(O?-1:1),width:s+g,height:s})))});function cv(){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 uv=M.createContext(null),dv=M.createContext(null),lr=()=>{var e;return((e=M.useContext(uv))==null?void 0:e.id)||null},cr=()=>M.useContext(dv);function S_(e){const t=Ao(),n=cr(),o=lr();return ke(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function T_(e){const{children:t,id:n}=e,r=lr();return M.createElement(uv.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function E_(e){const{children:t}=e,n=M.useRef([]),r=M.useCallback(s=>{n.current=[...n.current,s]},[]),o=M.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=M.useState(()=>cv())[0];return M.createElement(dv.Provider,{value:M.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function ur(e){return"data-floating-ui-"+e}function kt(e){const t=b.useRef(e);return ke(()=>{t.current=e}),t}const fv=ur("safe-polygon");function Iu(e,t,n){return n&&!xo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function hv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:h=!0}=t,f=cr(),p=lr(),m=kt(c),v=kt(l),y=kt(n),w=M.useRef(),g=M.useRef(-1),T=M.useRef(),S=M.useRef(-1),E=M.useRef(!0),I=M.useRef(!1),P=M.useRef(()=>{}),O=M.useCallback(()=>{var _;const F=(_=o.current.openEvent)==null?void 0:_.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function _(F){let{open:$}=F;$||(clearTimeout(g.current),clearTimeout(S.current),E.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[a,i]),M.useEffect(()=>{if(!a||!m.current||!n)return;function _($){O()&&r(!1,$,"hover")}const F=xt(s.floating).documentElement;return F.addEventListener("mouseleave",_),()=>{F.removeEventListener("mouseleave",_)}},[s.floating,n,r,a,m,O]);const C=M.useCallback(function(_,F,$){F===void 0&&(F=!0),$===void 0&&($="hover");const H=Iu(v.current,"close",w.current);H&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,_,$),H)):F&&(clearTimeout(g.current),r(!1,_,$))},[v,r]),L=yt(()=>{P.current(),T.current=void 0}),D=yt(()=>{if(I.current){const _=xt(s.floating).body;_.style.pointerEvents="",_.removeAttribute(fv),I.current=!1}});M.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(A){if(clearTimeout(g.current),E.current=!1,u&&!xo(w.current)||d>0&&!Iu(v.current,"open"))return;const j=Iu(v.current,"open",w.current);j?g.current=window.setTimeout(()=>{y.current||r(!0,A,"hover")},j):r(!0,A,"hover")}function $(A){if(_())return;P.current();const j=xt(s.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:f,x:A.clientX,y:A.clientY,onClose(){D(),L(),C(A,!0,"safe-polygon")}});const ne=T.current;j.addEventListener("mousemove",ne),P.current=()=>{j.removeEventListener("mousemove",ne)};return}(w.current==="touch"?!rt(s.floating,A.relatedTarget):!0)&&C(A)}function H(A){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:f,x:A.clientX,y:A.clientY,onClose(){D(),L(),C(A)}})(A))}if(ze(s.domReference)){var U;const A=s.domReference;return n&&A.addEventListener("mouseleave",H),(U=s.floating)==null||U.addEventListener("mouseleave",H),h&&A.addEventListener("mousemove",F,{once:!0}),A.addEventListener("mouseenter",F),A.addEventListener("mouseleave",$),()=>{var j;n&&A.removeEventListener("mouseleave",H),(j=s.floating)==null||j.removeEventListener("mouseleave",H),h&&A.removeEventListener("mousemove",F),A.removeEventListener("mouseenter",F),A.removeEventListener("mouseleave",$)}}},[s,a,e,u,d,h,C,L,D,r,n,y,f,v,m,o]),ke(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&O()){const $=xt(s.floating).body;$.setAttribute(fv,""),$.style.pointerEvents="none",I.current=!0;const H=s.floating;if(ze(s.domReference)&&H){var F;const U=s.domReference,A=f==null||(F=f.nodesRef.current.find(j=>j.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return A&&(A.style.pointerEvents=""),U.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{U.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,s,f,m,O]),ke(()=>{n||(w.current=void 0,L(),D())},[n,L,D]),M.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(S.current),D()},[a,s.domReference,L,D]);const V=M.useMemo(()=>{function _(F){w.current=F.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(F){const{nativeEvent:$}=F;function H(){!E.current&&!y.current&&r(!0,$,"hover")}u&&!xo(w.current)||n||d===0||(clearTimeout(S.current),w.current==="touch"?H():S.current=window.setTimeout(H,d))}}},[u,r,n,y,d]),k=M.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(_){C(_.nativeEvent,!1)}}),[C]);return M.useMemo(()=>a?{reference:V,floating:k}:{},[a,V,k])}function C_(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Mr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function P_(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),Mr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let _o=new WeakMap,ma=new WeakSet,ga={},Ou=0;const k_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,pv=e=>e&&(e.host||pv(e.parentNode)),I_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=pv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function O_(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=I_(t,e),a=new Set,l=new Set(s),c=[];ga[o]||(ga[o]=new WeakMap);const u=ga[o];s.forEach(d),h(t),a.clear();function d(f){!f||a.has(f)||(a.add(f),f.parentNode&&d(f.parentNode))}function h(f){!f||l.has(f)||[].forEach.call(f.children,p=>{if(nr(p)!=="script")if(a.has(p))h(p);else{const m=i?p.getAttribute(i):null,v=m!==null&&m!=="false",y=(_o.get(p)||0)+1,w=(u.get(p)||0)+1;_o.set(p,y),u.set(p,w),c.push(p),y===1&&v&&ma.add(p),w===1&&p.setAttribute(o,""),!v&&i&&p.setAttribute(i,"true")}})}return Ou++,()=>{c.forEach(f=>{const p=(_o.get(f)||0)-1,m=(u.get(f)||0)-1;_o.set(f,p),u.set(f,m),p||(!ma.has(f)&&i&&f.removeAttribute(i),ma.delete(f)),m||f.removeAttribute(o)}),Ou--,Ou||(_o=new WeakMap,_o=new WeakMap,ma=new WeakSet,ga={})}}function mv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=xt(e[0]).body;return O_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Mo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function gv(e,t){const n=Ni(e,Mo());t==="prev"&&n.reverse();const r=n.indexOf(nn(xt(e)));return n.slice(r+1)[0]}function yv(){return gv(document.body,"next")}function vv(){return gv(document.body,"prev")}function Ri(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!rt(n,r)}function A_(e){Ni(e,Mo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function __(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 M_(e,t,n){const r=e.indexOf(t);function o(s){const a=ur("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||rt(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Au={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 D_;function bv(e){e.key==="Tab"&&(e.target,clearTimeout(D_))}const ya=M.forwardRef(function(t,n){const[r,o]=M.useState();ke(()=>(du()&&o("button"),document.addEventListener("keydown",bv),()=>{document.removeEventListener("keydown",bv)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ur("focus-guard")]:"",style:Au};return M.createElement("span",Oo({},t,i))}),wv=M.createContext(null),xv=ur("portal");function F_(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ao(),o=Sv(),[i,s]=M.useState(null),a=M.useRef(null);return ke(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),ke(()=>{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(xv,""),l.appendChild(c),a.current=c,s(c)},[t,r]),ke(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!ze(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(xv,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function Do(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=F_({id:n,root:r}),[s,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return M.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function f(p){i&&Ri(p)&&(p.type==="focusin"?__:A_)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,s==null?void 0:s.modal]),M.createElement(wv.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},h&&i&&M.createElement(ya,{"data-type":"outside",ref:l,onFocus:f=>{if(Ri(f,i)){var p;(p=u.current)==null||p.focus()}else{const m=vv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),h&&i&&M.createElement("span",{"aria-owns":i.id,style:Au}),i&&df.createPortal(t,i),h&&i&&M.createElement(ya,{"data-type":"outside",ref:c,onFocus:f=>{if(Ri(f,i)){var p;(p=d.current)==null||p.focus()}else{const m=yv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,f.nativeEvent))}}}))}const Sv=()=>M.useContext(wv),Tv=20;let Dr=[];function _u(e){Dr=Dr.filter(n=>n.isConnected);let t=e;if(!(!t||nr(t)==="body")){if(!FA(t,Mo())){const n=Ni(t,Mo())[0];n&&(t=n)}Dr.push(t),Dr.length>Tv&&(Dr=Dr.slice(-Tv))}}function Ev(){return Dr.slice().reverse().find(e=>e.isConnected)}const N_=M.forwardRef(function(t,n){return M.createElement("button",Oo({},t,{type:"button",ref:n,tabIndex:-1,style:Au}))});function ji(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:h,refs:f,nodeId:p,onOpenChange:m,events:v,dataRef:y,floatingId:w,elements:{domReference:g,floating:T}}=t,S=typeof s=="number"&&s<0,E=Fy(g)&&S,I=k_()?i:!0,P=kt(o),O=kt(s),C=kt(a),L=cr(),D=Sv(),V=M.useRef(null),k=M.useRef(null),_=M.useRef(!1),F=M.useRef(!1),$=M.useRef(-1),H=D!=null,U=T==null?void 0:T.firstElementChild,A=(U==null?void 0:U.id)===w?U:T,j=yt(function(G){return G===void 0&&(G=A),G?Ni(G,Mo()):[]}),Z=yt(G=>{const N=j(G);return P.current.map(B=>g&&B==="reference"?g:A&&B==="floating"?A:N).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){rt(A,nn(xt(A)))&&j().length===0&&!E&&Pt(B);const z=Z(),R=xn(B);P.current[0]==="reference"&&R===g&&(Pt(B),B.shiftKey?ar(z[z.length-1]):ar(z[1])),P.current[1]==="floating"&&R===A&&B.shiftKey&&(Pt(B),ar(z[0]))}}const N=xt(A);return N.addEventListener("keydown",G),()=>{N.removeEventListener("keydown",G)}},[r,g,A,c,P,E,j,Z]),M.useEffect(()=>{if(r||!T)return;function G(N){const B=xn(N),R=j().indexOf(B);R!==-1&&($.current=R)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,j]),M.useEffect(()=>{if(r||!d)return;function G(){F.current=!0,setTimeout(()=>{F.current=!1})}function N(B){const z=B.relatedTarget;queueMicrotask(()=>{const R=!(rt(g,z)||rt(T,z)||rt(z,T)||rt(D==null?void 0:D.portalNode,z)||z!=null&&z.hasAttribute(ur("focus-guard"))||L&&(Mr(L.nodesRef.current,p).find(Y=>{var se,W;return rt((se=Y.context)==null?void 0:se.elements.floating,z)||rt((W=Y.context)==null?void 0:W.elements.domReference,z)})||C_(L.nodesRef.current,p).find(Y=>{var se,W;return((se=Y.context)==null?void 0:se.elements.floating)===z||((W=Y.context)==null?void 0:W.elements.domReference)===z})));if(l&&R&&nn(xt(A))===xt(A).body){ft(A)&&(A==null||A.focus());const Y=$.current,se=j(),W=se[Y]||se[se.length-1]||A;ft(W)&&W.focus()}(E||!c)&&z&&R&&!F.current&&z!==Ev()&&(_.current=!0,m(!1,B))})}if(T&&ft(g))return g.addEventListener("focusout",N),g.addEventListener("pointerdown",G),T.addEventListener("focusout",N),()=>{g.removeEventListener("focusout",N),g.removeEventListener("pointerdown",G),T.removeEventListener("focusout",N)}},[r,g,T,A,c,p,L,D,m,d,l,j,E]),M.useEffect(()=>{var G;if(r)return;const N=Array.from((D==null||(G=D.portalNode)==null?void 0:G.querySelectorAll("["+ur("portal")+"]"))||[]);if(T){const B=[T,...N,V.current,k.current,P.current.includes("reference")||E?g:null].filter(R=>R!=null),z=c||E?mv(B,I,!I):mv(B);return()=>{z()}}},[r,g,T,c,P,D,E,I]),ke(()=>{if(r||!ft(A))return;const G=xt(A),N=nn(G);queueMicrotask(()=>{const B=Z(A),z=O.current,R=(typeof z=="number"?B[z]:z.current)||A,Y=rt(A,N);!S&&!Y&&h&&ar(R,{preventScroll:R===A})})},[r,h,A,S,Z,O]),ke(()=>{if(r||!A)return;let G=!1;const N=xt(A),B=nn(N);let R=y.current.openEvent;const Y=f.domReference.current;_u(B);function se(W){let{open:Pe,reason:st,event:Ue,nested:at}=W;Pe&&(R=Ue),st==="escape-key"&&f.domReference.current&&_u(f.domReference.current),st==="hover"&&Ue.type==="mouseleave"&&(_.current=!0),st==="outside-press"&&(at?(_.current=!1,G=!0):_.current=!(My(Ue)||uu(Ue)))}return v.on("openchange",se),()=>{v.off("openchange",se);const W=nn(N),Pe=rt(T,W)||L&&Mr(L.nodesRef.current,p).some(de=>{var Ee;return rt((Ee=de.context)==null?void 0:Ee.elements.floating,W)});(Pe||R&&["click","mousedown"].includes(R.type))&&f.domReference.current&&_u(f.domReference.current);const Ue=Y||B,at=Ni(xt(Ue).body,Mo());queueMicrotask(()=>{let de=Ev();!de&&ft(Ue)&&T&&(de=M_(at,Ue,T)),C.current&&!_.current&&ft(de)&&(!(de!==W&&W!==N.body)||Pe)&&de.focus({preventScroll:G})})}},[r,T,A,C,y,f,v,L,p]),ke(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:m,refs:f}),()=>{D.setFocusManagerState(null)}},[r,D,c,h,m,f,d]),ke(()=>{if(r||!A||typeof MutationObserver!="function"||S)return;const G=()=>{const B=A.getAttribute("tabindex"),z=j(),R=nn(xt(T)),Y=z.indexOf(R);Y!==-1&&($.current=Y),P.current.includes("floating")||R!==f.domReference.current&&z.length===0?B!=="0"&&A.setAttribute("tabindex","0"):B!=="-1"&&A.setAttribute("tabindex","-1")};G();const N=new MutationObserver(G);return N.observe(A,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,T,A,f,P,j,S]);function ne(G){return r||!u||!c?null:M.createElement(N_,{ref:G==="start"?V:k,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&I&&(c?!E:!0)&&(H||c);return M.createElement(M.Fragment,null,Q&&M.createElement(ya,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:G=>{if(c){const B=Z();ar(o[0]==="reference"?B[0]:B[B.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(_.current=!1,Ri(G,D.portalNode)){const B=yv()||g;B==null||B.focus()}else{var N;(N=D.beforeOutsideRef.current)==null||N.focus()}}}),!E&&ne("start"),n,ne("end"),Q&&M.createElement(ya,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:G=>{if(c)ar(Z()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(_.current=!0),Ri(G,D.portalNode)){const B=vv()||g;B==null||B.focus()}else{var N;(N=D.afterOutsideRef.current)==null||N.focus()}}}))}const Mu=new Set,L_=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Ao();return ke(()=>{if(!r)return;Mu.add(i);const s=/iP(hone|ad|od)|iOS/.test(cu()),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,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var f,p;const m=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Mu.delete(i),Mu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,h)))}},[i,r]),M.createElement("div",Oo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Cv(e){return ft(e.target)&&e.target.tagName==="BUTTON"}function Pv(e){return pu(e)}function va(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=M.useRef(),h=M.useRef(!1),f=M.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(xo(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}xo(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||Cv(p))&&(p.key===" "&&!Pv(i)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Cv(p)||Pv(i)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return M.useMemo(()=>s?{reference:f}:{},[s,f])}function V_(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=(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(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,h=s.x,f=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),h-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,h=a&&t.x!=null?t.x:h,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:h,y:f,top:f,right:h+u,bottom:f+d,left:h}}}}function kv(e){return e!=null&&e.clientX!=null}function $_(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=M.useRef(!1),h=M.useRef(null),[f,p]=M.useState(),[m,v]=M.useState([]),y=yt((E,I)=>{d.current||r.current.openEvent&&!kv(r.current.openEvent)||s.setPositionReference(V_(i,{x:E,y:I,axis:l,dataRef:r,pointerType:f}))}),w=yt(E=>{c!=null||u!=null||(n?h.current||v([]):y(E.clientX,E.clientY))}),g=xo(f)?o:n,T=M.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Lt(o);function I(P){const O=xn(P);rt(o,O)?(E.removeEventListener("mousemove",I),h.current=null):y(P.clientX,P.clientY)}if(!r.current.openEvent||kv(r.current.openEvent)){E.addEventListener("mousemove",I);const P=()=>{E.removeEventListener("mousemove",I),h.current=null};return h.current=P,P}s.setPositionReference(i)},[g,a,c,u,o,r,s,i,y]);M.useEffect(()=>T(),[T,m]),M.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),M.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),ke(()=>{a&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[a,c,u,y]);const S=M.useMemo(()=>{function E(I){let{pointerType:P}=I;p(P)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:w,onMouseEnter:w}},[w]);return M.useMemo(()=>a?{reference:S}:{},[a,S])}const R_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},j_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Iv=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 Fo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:p}=t,m=cr(),v=yt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?v:l,w=M.useRef(!1),g=M.useRef(!1),{escapeKey:T,outsidePress:S}=Iv(f),{escapeKey:E,outsidePress:I}=Iv(p),P=yt(k=>{var _;if(!n||!s||!a||k.key!=="Escape")return;const F=(_=i.current.floatingContext)==null?void 0:_.nodeId,$=m?Mr(m.nodesRef.current,F):[];if(!T&&(k.stopPropagation(),$.length>0)){let H=!0;if($.forEach(U=>{var A;if((A=U.context)!=null&&A.open&&!U.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,sA(k)?k.nativeEvent:k,"escape-key")}),O=yt(k=>{var _;const F=()=>{var $;P(k),($=xn(k))==null||$.removeEventListener("keydown",F)};(_=xn(k))==null||_.addEventListener("keydown",F)}),C=yt(k=>{var _;const F=w.current;w.current=!1;const $=g.current;if(g.current=!1,c==="click"&&$||F||typeof y=="function"&&!y(k))return;const H=xn(k),U="["+ur("inert")+"]",A=xt(o.floating).querySelectorAll(U);let j=ze(H)?H:null;for(;j&&!rr(j);){const G=Vn(j);if(rr(G)||!ze(G))break;j=G}if(A.length&&ze(H)&&!aA(H)&&!rt(H,o.floating)&&Array.from(A).every(G=>!rt(j,G)))return;if(ft(H)&&V){const G=H.clientWidth>0&&H.scrollWidth>H.clientWidth,N=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let B=N&&k.offsetX>H.clientWidth;if(N&&Yt(H).direction==="rtl"&&(B=k.offsetX<=H.offsetWidth-H.clientWidth),B||G&&k.offsetY>H.clientHeight)return}const Z=(_=i.current.floatingContext)==null?void 0:_.nodeId,ne=m&&Mr(m.nodesRef.current,Z).some(G=>{var N;return hu(k,(N=G.context)==null?void 0:N.elements.floating)});if(hu(k,o.floating)||hu(k,o.domReference)||ne)return;const Q=m?Mr(m.nodesRef.current,Z):[];if(Q.length>0){let G=!0;if(Q.forEach(N=>{var B;if((B=N.context)!=null&&B.open&&!N.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,k,"outside-press")}),L=yt(k=>{var _;const F=()=>{var $;C(k),($=xn(k))==null||$.removeEventListener(c,F)};(_=xn(k))==null||_.addEventListener(c,F)});M.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=S;function k($){r(!1,$,"ancestor-scroll")}const _=xt(o.floating);a&&_.addEventListener("keydown",E?O:P,E),y&&_.addEventListener(c,I?L:C,I);let F=[];return h&&(ze(o.domReference)&&(F=or(o.domReference)),ze(o.floating)&&(F=F.concat(or(o.floating))),!ze(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(or(o.reference.contextElement)))),F=F.filter($=>{var H;return $!==((H=_.defaultView)==null?void 0:H.visualViewport)}),F.forEach($=>{$.addEventListener("scroll",k,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",E?O:P,E),y&&_.removeEventListener(c,I?L:C,I),F.forEach($=>{$.removeEventListener("scroll",k)})}},[i,o,a,y,c,n,r,h,s,T,S,P,E,O,C,I,L]),M.useEffect(()=>{w.current=!1},[y,c]);const D=M.useMemo(()=>({onKeyDown:P,[R_[d]]:k=>{u&&r(!1,k.nativeEvent,"reference-press")}}),[P,r,u,d]),V=M.useMemo(()=>({onKeyDown:P,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[j_[c]]:()=>{w.current=!0}}),[P,c]);return M.useMemo(()=>s?{reference:D,floating:V}:{},[s,D,V])}function B_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ao(),i=M.useRef({}),[s]=M.useState(()=>cv()),a=lr()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!ze(f)&&x_("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]=M.useState(r.reference),u=yt((f,p,m)=>{i.current.openEvent=f?p:void 0,s.emit("openchange",{open:f,event:p,reason:m,nested:a}),n==null||n(f,p,m)}),d=M.useMemo(()=>({setPositionReference:c}),[]),h=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:d}),[t,u,h,s,o,d])}function No(e){e===void 0&&(e={});const{nodeId:t}=e,n=B_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||i,d=M.useRef(null),h=cr();ke(()=>{u&&(d.current=u)},[u]);const f=l_({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(g=>{const T=ze(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),f.refs.setReference(T)},[f.refs]),m=M.useCallback(g=>{(ze(g)||g===null)&&(d.current=g,s(g)),(ze(f.refs.reference.current)||f.refs.reference.current===null||g!==null&&!ze(g))&&f.refs.setReference(g)},[f.refs]),v=M.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:d}),[f.refs,m,p]),y=M.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),w=M.useMemo(()=>({...f,...r,refs:v,elements:y,nodeId:t}),[f,v,y,t,r]);return ke(()=>{r.dataRef.current.floatingContext=w;const g=h==null?void 0:h.nodesRef.current.find(T=>T.id===t);g&&(g.context=w)}),M.useMemo(()=>({...f,context:w,refs:v,elements:y}),[f,v,y,w])}function z_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),d=M.useRef(!0);M.useEffect(()=>{if(!a)return;const f=Lt(s.domReference);function p(){!n&&ft(s.domReference)&&s.domReference===nn(xt(s.domReference))&&(c.current=!0)}function m(){d.current=!0}return f.addEventListener("blur",p),f.addEventListener("keydown",m,!0),()=>{f.removeEventListener("blur",p),f.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),M.useEffect(()=>{if(!a)return;function f(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=M.useMemo(()=>({onPointerDown(f){uu(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const p=xn(f.nativeEvent);if(l&&ze(p))try{if(du()&&Dy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!pu(p))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const p=f.relatedTarget,m=f.nativeEvent,v=ze(p)&&p.hasAttribute(ur("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const w=nn(s.domReference?s.domReference.ownerDocument:document);!p&&w===s.domReference||rt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,w)||rt(s.domReference,w)||v||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return M.useMemo(()=>a?{reference:h}:{},[a,h])}const Ov="active",Av="selected";function Du(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Ov]:s,[Av]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Ov,Av].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var h,f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(v=>v(...p)).find(v=>v!==void 0)}}}else s[c]=u}),s),{})}}function Lo(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=M.useCallback(a=>Du(a,e,"reference"),t),i=M.useCallback(a=>Du(a,e,"floating"),n),s=M.useCallback(a=>Du(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let _v=!1;function ba(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Mv(e,t){return ba(t,e===Pu||e===Li,e===ko||e===Io)}function Fu(e,t,n){return ba(t,e===Li,n?e===ko:e===Io)||e==="Enter"||e===" "||e===""}function W_(e,t,n){return ba(t,n?e===ko:e===Io,e===Li)}function Dv(e,t,n){return ba(t,n?e===Io:e===ko,e===Pu)}function Fv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:h=!1,rtl:f=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:w=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:I,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||pa("`useListNavigation` looping must be enabled to allow escaping."),p||pa("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&pa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const O=lr(),C=cr(),L=yt(a),D=M.useRef(m),V=M.useRef(c??-1),k=M.useRef(null),_=M.useRef(!0),F=M.useRef(L),$=M.useRef(!!o.floating),H=M.useRef(n),U=M.useRef(!1),A=M.useRef(!1),j=kt(w),Z=kt(n),ne=kt(S),Q=kt(o.floating),G=kt(c),[N,B]=M.useState(),[z,R]=M.useState(),Y=yt(function(de,Ee,ce){ce===void 0&&(ce=!1);function Oe(Ae){p?(B(Ae.id),C==null||C.events.emit("virtualfocus",Ae),E&&(E.current=Ae)):ar(Ae,{preventScroll:!0,sync:Dy()&&du()?_v||U.current:!1})}const pt=de.current[Ee.current];pt&&Oe(pt),requestAnimationFrame(()=>{const Ae=de.current[Ee.current]||pt;if(!Ae)return;pt||Oe(Ae);const mt=ne.current;mt&&W&&(ce||!_.current)&&(Ae.scrollIntoView==null||Ae.scrollIntoView(typeof mt=="boolean"?{block:"nearest",inline:"nearest"}:mt))})});ke(()=>{document.createElement("div").focus({get preventScroll(){return _v=!0,!1}})},[]),ke(()=>{l&&(n&&o.floating?D.current&&c!=null&&(A.current=!0,V.current=c,L(c)):$.current&&(V.current=-1,F.current(null)))},[l,n,o.floating,c,L]),ke(()=>{if(l&&n&&o.floating)if(s==null){if(U.current=!1,G.current!=null)return;if($.current&&(V.current=-1,Y(i,V)),(!H.current||!$.current)&&D.current&&(k.current!=null||D.current===!0&&k.current==null)){let de=0;const Ee=()=>{i.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):(V.current=k.current==null||Fu(k.current,g,f)||h?ku(i,j.current):nv(i,j.current),k.current=null,L(V.current))};Ee()}}else Vi(i,s)||(V.current=s,Y(i,V,A.current),A.current=!1)},[l,n,o.floating,s,G,h,i,g,f,L,Y,j]),ke(()=>{var de;if(!l||o.floating||!C||p||!$.current)return;const Ee=C.nodesRef.current,ce=(de=Ee.find(Ae=>Ae.id===O))==null||(de=de.context)==null?void 0:de.elements.floating,Oe=nn(xt(o.floating)),pt=Ee.some(Ae=>Ae.context&&rt(Ae.context.elements.floating,Oe));ce&&!pt&&_.current&&ce.focus({preventScroll:!0})},[l,o.floating,C,O,p]),ke(()=>{if(!l||!C||!p||O)return;function de(Ee){R(Ee.id),E&&(E.current=Ee)}return C.events.on("virtualfocus",de),()=>{C.events.off("virtualfocus",de)}},[l,C,p,O,E]),ke(()=>{F.current=L,$.current=!!o.floating}),ke(()=>{n||(k.current=null)},[n]),ke(()=>{H.current=n},[n]);const se=s!=null,W=M.useMemo(()=>{function de(ce){if(!n)return;const Oe=i.current.indexOf(ce);Oe!==-1&&L(Oe)}return{onFocus(ce){let{currentTarget:Oe}=ce;de(Oe)},onClick:ce=>{let{currentTarget:Oe}=ce;return Oe.focus({preventScroll:!0})},...v&&{onMouseMove(ce){let{currentTarget:Oe}=ce;de(Oe)},onPointerLeave(ce){let{pointerType:Oe}=ce;!_.current||Oe==="touch"||(V.current=-1,Y(i,V),L(null),p||ar(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,v,i,L,p]),Pe=yt(de=>{if(_.current=!1,U.current=!0,!Z.current&&de.currentTarget===Q.current)return;if(h&&Dv(de.key,g,f)){Pt(de),r(!1,de.nativeEvent,"list-navigation"),ft(o.domReference)&&!p&&o.domReference.focus();return}const Ee=V.current,ce=ku(i,w),Oe=nv(i,w);if(de.key==="Home"&&(Pt(de),V.current=ce,L(V.current)),de.key==="End"&&(Pt(de),V.current=Oe,L(V.current)),T>1){const pt=I||Array.from({length:i.current.length},()=>({width:1,height:1})),Ae=h_(pt,T,P),mt=Ae.findIndex(ae=>ae!=null&&!ha(i.current,ae,w)),J=Ae.reduce((ae,_e,Xe)=>_e!=null&&!ha(i.current,_e,w)?Xe:ae,-1);if(V.current=Ae[f_({current:Ae.map(ae=>ae!=null?i.current[ae]:null)},{event:de,orientation:g,loop:d,cols:T,disabledIndices:m_([...w||i.current.map((ae,_e)=>ha(i.current,_e)?_e:void 0),void 0],Ae),minIndex:mt,maxIndex:J,prevIndex:p_(V.current>Oe?ce:V.current,pt,Ae,T,de.key===Li?"bl":de.key===Io?"tr":"tl"),stopEvent:!0})],L(V.current),g==="both")return}if(Mv(de.key,g)){if(Pt(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){V.current=Fu(de.key,g,f)?ce:Oe,L(V.current);return}Fu(de.key,g,f)?d?V.current=Ee>=Oe?u&&Ee!==i.current.length?-1:ce:Mt(i,{startingIndex:Ee,disabledIndices:w}):V.current=Math.min(Oe,Mt(i,{startingIndex:Ee,disabledIndices:w})):d?V.current=Ee<=ce?u&&Ee!==-1?i.current.length:Oe:Mt(i,{startingIndex:Ee,decrement:!0,disabledIndices:w}):V.current=Math.max(ce,Mt(i,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Vi(i,V.current)?L(null):L(V.current)}}),st=M.useMemo(()=>p&&n&&se&&{"aria-activedescendant":z||N},[p,n,se,z,N]),Ue=M.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Fy(o.domReference)&&st,onKeyDown:Pe,onPointerMove(){_.current=!0}}),[st,Pe,o.domReference,g]),at=M.useMemo(()=>{function de(ce){m==="auto"&&My(ce.nativeEvent)&&(D.current=!0)}function Ee(ce){D.current=m,m==="auto"&&uu(ce.nativeEvent)&&(D.current=!0)}return{...st,onKeyDown(ce){_.current=!1;const Oe=ce.key.indexOf("Arrow")===0,pt=W_(ce.key,g,f),Ae=Dv(ce.key,g,f),mt=Mv(ce.key,g),J=(h?pt:mt)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const It=C==null?void 0:C.nodesRef.current.find(Rt=>Rt.parentId==null),Nt=C&&It?P_(C.nodesRef.current,It.id):null;if(Oe&&Nt&&E){const Rt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(pt||Ae){var ae,_e;const Hr=((ae=Nt.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,ti=Ae&&!Hr?(_e=Nt.context)==null?void 0:_e.elements.domReference:pt?i.current.find(ni=>(ni==null?void 0:ni.id)===N):null;ti&&(Pt(ce),ti.dispatchEvent(Rt),R(void 0))}if(mt&&Nt.context&&Nt.context.open&&Nt.parentId&&ce.currentTarget!==Nt.context.elements.domReference){var Xe;Pt(ce),(Xe=Nt.context.elements.domReference)==null||Xe.dispatchEvent(Rt);return}}return Pe(ce)}if(!(!n&&!y&&Oe)){if(J&&(k.current=h&&mt?null:ce.key),h){pt&&(Pt(ce),n?(V.current=ku(i,j.current),L(V.current)):r(!0,ce.nativeEvent,"list-navigation"));return}mt&&(c!=null&&(V.current=c),Pt(ce),!n&&y?r(!0,ce.nativeEvent,"list-navigation"):Pe(ce),n&&L(V.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[N,st,Pe,j,m,i,h,L,r,n,y,g,f,c,C,p,E]);return M.useMemo(()=>l?{reference:at,floating:Ue,item:W}:{},[l,at,Ue,W])}const H_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Vo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=H_.get(s))!=null?n:s,l=Ao(),u=lr()!=null,d=M.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="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"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),h=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),f=M.useCallback(p=>{let{active:m,selected:v}=p;const y={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...y,"aria-selected":m&&v};case"combobox":return{...y,...m&&{"aria-selected":!0}}}return{}},[o,s]);return M.useMemo(()=>i?{reference:d,floating:h,item:f}:{},[i,d,h,f])}const Nv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function $o(e,t){return typeof e=="function"?e(t):e}function U_(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function G_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=U_(n,s);return!c&&a==="close"&&l("unmounted"),ke(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Y_(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,h=(u?s:s.close)||0,[f,p]=M.useState(()=>({...$o(i,c),...$o(n,c)})),{isMounted:m,status:v}=G_(e,{duration:s}),y=kt(n),w=kt(r),g=kt(o),T=kt(i);return ke(()=>{const S=$o(y.current,c),E=$o(g.current,c),I=$o(T.current,c),P=$o(w.current,c)||Object.keys(S).reduce((O,C)=>(O[C]="",O),{});if(v==="initial"&&p(O=>({transitionProperty:O.transitionProperty,...I,...S})),v==="open"&&p({transitionProperty:Object.keys(P).map(Nv).join(","),transitionDuration:d+"ms",...I,...P}),v==="close"){const O=E||S;p({transitionProperty:Object.keys(O).map(Nv).join(","),transitionDuration:h+"ms",...I,...O})}},[h,g,y,w,T,d,v,c]),{isMounted:m,styles:f}}function q_(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:h=[],selectedIndex:f=null}=t,p=M.useRef(),m=M.useRef(""),v=M.useRef((n=f??s)!=null?n:-1),y=M.useRef(null),w=yt(a),g=yt(l),T=kt(u),S=kt(h);ke(()=>{r&&(clearTimeout(p.current),y.current=null,m.current="")},[r]),ke(()=>{if(r&&m.current===""){var C;v.current=(C=f??s)!=null?C:-1}},[r,f,s]);const E=yt(C=>{C?o.current.typing||(o.current.typing=C,g(C)):o.current.typing&&(o.current.typing=C,g(C))}),I=yt(C=>{function L(F,$,H){const U=T.current?T.current($,H):$.find(A=>(A==null?void 0:A.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return U?F.indexOf(U):-1}const D=i.current;if(m.current.length>0&&m.current[0]!==" "&&(L(D,D,m.current)===-1?E(!1):C.key===" "&&Pt(C)),D==null||S.current.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&(Pt(C),E(!0)),D.every(F=>{var $,H;return F?(($=F[0])==null?void 0:$.toLocaleLowerCase())!==((H=F[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===C.key&&(m.current="",v.current=y.current),m.current+=C.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=y.current,E(!1)},d);const k=v.current,_=L(D,[...D.slice((k||0)+1),...D.slice(0,(k||0)+1)],m.current);_!==-1?(w(_),y.current=_):C.key!==" "&&(m.current="",E(!1))}),P=M.useMemo(()=>({onKeyDown:I}),[I]),O=M.useMemo(()=>({onKeyDown:I,onKeyUp(C){C.key===" "&&E(!1)}}),[I,E]);return M.useMemo(()=>c?{reference:P,floating:O}:{},[c,P,O])}function Lv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function K_(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Z_(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();function c(d,h){const f=performance.now(),p=f-l;if(s===null||a===null||p===0)return s=d,a=h,l=f,null;const m=d-s,v=h-a,w=Math.sqrt(m*m+v*v)/p;return s=d,a=h,l=f,w}const u=d=>{let{x:h,y:f,placement:p,elements:m,onClose:v,nodeId:y,tree:w}=d;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||f==null)return;const{clientX:E,clientY:I}=T,P=[E,I],O=xn(T),C=T.type==="mouseleave",L=rt(m.floating,O),D=rt(m.domReference,O),V=m.domReference.getBoundingClientRect(),k=m.floating.getBoundingClientRect(),_=p.split("-")[0],F=h>k.right-k.width/2,$=f>k.bottom-k.height/2,H=K_(P,V),U=k.width>V.width,A=k.height>V.height,j=(U?V:k).left,Z=(U?V:k).right,ne=(A?V:k).top,Q=(A?V:k).bottom;if(L&&(i=!0,!C))return;if(D&&(i=!1),D&&!C){i=!0;return}if(C&&ze(T.relatedTarget)&&rt(m.floating,T.relatedTarget)||w&&Mr(w.nodesRef.current,y).some(B=>{let{context:z}=B;return z==null?void 0:z.open}))return;if(_==="top"&&f>=V.bottom-1||_==="bottom"&&f<=V.top+1||_==="left"&&h>=V.right-1||_==="right"&&h<=V.left+1)return S();let G=[];switch(_){case"top":G=[[j,V.top+1],[j,k.bottom-1],[Z,k.bottom-1],[Z,V.top+1]];break;case"bottom":G=[[j,k.top+1],[j,V.bottom-1],[Z,V.bottom-1],[Z,k.top+1]];break;case"left":G=[[k.right-1,Q],[k.right-1,ne],[V.left+1,ne],[V.left+1,Q]];break;case"right":G=[[V.right-1,Q],[V.right-1,ne],[k.left+1,ne],[k.left+1,Q]];break}function N(B){let[z,R]=B;switch(_){case"top":{const Y=[U?z+t/2:F?z+t*4:z-t*4,R+t+1],se=[U?z-t/2:F?z+t*4:z-t*4,R+t+1],W=[[k.left,F||U?k.bottom-t:k.top],[k.right,F?U?k.bottom-t:k.top:k.bottom-t]];return[Y,se,...W]}case"bottom":{const Y=[U?z+t/2:F?z+t*4:z-t*4,R-t],se=[U?z-t/2:F?z+t*4:z-t*4,R-t],W=[[k.left,F||U?k.top+t:k.bottom],[k.right,F?U?k.top+t:k.bottom:k.top+t]];return[Y,se,...W]}case"left":{const Y=[z+t+1,A?R+t/2:$?R+t*4:R-t*4],se=[z+t+1,A?R-t/2:$?R+t*4:R-t*4];return[...[[$||A?k.right-t:k.left,k.top],[$?A?k.right-t:k.left:k.right-t,k.bottom]],Y,se]}case"right":{const Y=[z-t,A?R+t/2:$?R+t*4:R-t*4],se=[z-t,A?R-t/2:$?R+t*4:R-t*4],W=[[$||A?k.left+t:k.right,k.top],[$?A?k.left+t:k.right:k.left+t,k.bottom]];return[Y,se,...W]}}}if(!Lv([E,I],G)){if(i&&!H)return S();if(!C&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}Lv([E,I],N([h,f]))?!i&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Ro=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[da(10),Eu({fallbackAxisSideDirection:"end"}),Tu(),ev({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=No({open:n,middleware:i,transform:!0,whileElementsMounted:la,onOpenChange:(p,m)=>{var y;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(y=e.onChange)==null||y.call(e,p))}}),c=va(l),u=Fo(l),d=Vo(l),{getReferenceProps:h,getFloatingProps:f}=Lo([c,u,d]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:s.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(Do,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(ji,{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:s.setFloating,style:a,"aria-labelledby":t,...f(),children:[x.jsx(lv,{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]})})})]})},X_=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=b.useState(!1),{context:a,refs:l}=No({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=va(a),u=Vo(a),d=Fo(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:f}=Lo([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(to,{...f(e),as:Ct.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:x.jsx(Ct.span,{layoutId:o,children:e.trigger})}),x.jsx(Ii,{children:i?x.jsx(Do,{root:t,children:x.jsx(ji,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(Ct.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})};function Q_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function J_(...e){return t=>e.forEach(n=>Q_(n,t))}var Nu=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),i=o.find(tM);if(i){const s=i.props.children,a=o.map(l=>l===i?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return x.jsx(Lu,{...r,ref:t,children:M.isValidElement(s)?M.cloneElement(s,void 0,a):null})}return x.jsx(Lu,{...r,ref:t,children:n})});Nu.displayName="Slot";var Lu=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=rM(n);return M.cloneElement(n,{...nM(r,n.props),ref:t?J_(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});Lu.displayName="SlotClone";var eM=({children:e})=>x.jsx(x.Fragment,{children:e});function tM(e){return M.isValidElement(e)&&e.type===eM}function nM(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function rM(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)}const Vv=300,oM=500,$v=(e="")=>$e("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Vu=b.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Rv=b.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:i,...s},a)=>{const l=lr(),c=l!==null,[u,d]=b.useState(!1),[h,f]=b.useState(!1),[p,m]=b.useState(null),v=b.useRef([]),y=b.useRef([]),w=b.useContext(Vu),g=cr(),T=S_(),S=iv(),{floatingStyles:E,refs:I,context:P}=No({nodeId:T,open:u,transform:!0,onOpenChange:d,whileElementsMounted:la,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[da({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Eu(),Tu()]}),O=Vo(P,{role:"menu",enabled:!0}),C=Fo(P,{bubbles:!0}),L=hv(P,{enabled:n,delay:{open:Vv},handleClose:Z_({blockPointerEvents:!0})}),D=va(P,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),V=Fv(P,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:v,scrollItemIntoView:!0,onNavigate:m}),k=q_(P,{activeIndex:p,listRef:y,resetMs:oM,onMatch:u?m:void 0}),{getReferenceProps:_,getFloatingProps:F,getItemProps:$}=Lo([L,D,O,C,V,k]);b.useEffect(()=>{if(!g)return;const U=()=>d(!1),A=j=>{j.nodeId!==T&&j.parentId===l&&d(!1)};return g.events.on("click",U),g.events.on("menuopen",A),()=>{g.events.off("click",U),g.events.off("menuopen",A)}},[g,T,l]),b.useEffect(()=>{u&&g&&g.events.emit("menuopen",{parentId:l,nodeId:T})},[g,u,T,l]);const H=r?s.className:$e($v(s.className));return x.jsxs(T_,{id:T,children:[x.jsx(b.Fragment,{children:s.asChild?x.jsx(Nu,{children:i,ref:Cu([I.setReference,S.ref,a]),tabIndex:c?w.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,..._(w.getItemProps({...s,onFocus(U){var A;(A=s.onFocus)==null||A.call(s,U),f(!1),w.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:Cu([I.setReference,S.ref,a]),tabIndex:c?w.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,..._(w.getItemProps({...s,onFocus(U){var A;(A=s.onFocus)==null||A.call(s,U),f(!1),w.setHasFocusInside(!0)}})),children:[i,c&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(jc,{size:14})]})]})}),x.jsx(Vu.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:$,setHasFocusInside:f,isOpen:u},children:x.jsx(v_,{elementsRef:v,labelsRef:y,children:u&&x.jsx(Do,{preserveTabOrder:!0,children:x.jsx(ji,{context:P,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...F(),ref:I.setFloating,style:{...s.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})})})})})]})}),iM=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(Vu),a=iv({label:r?null:typeof e=="string"?e:t}),l=cr(),c=a.index===s.activeIndex;return x.jsxs("button",{...o,ref:Cu([a.ref,i]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:$v(o.className),...s.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),s.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),sM=b.forwardRef((e,t)=>lr()!==null?x.jsx(Rv,{...e,isParent:!1,ref:t}):x.jsx(E_,{children:x.jsx(Rv,{...e,isParent:!0,ref:t})})),aM=(e,t)=>Js()?t:window.matchMedia(e).matches,lM=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(aM(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},rn="600ms",cM={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:rn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:rn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:rn}},uM={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:rn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:rn}},$u={drawer:e=>e==="left"?cM:uM,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:rn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:rn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:rn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:rn},enter:{opacity:1,scale:[1.05,1],animationDuration:rn},exit:{opacity:0,scale:.97,animationDuration:rn}}},dM=ri("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"}}),fM={top:0,left:0,right:0,bottom:-1},hM=e=>e*.62,pM=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 i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=hM(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(Ct.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:fM,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})},Ru={drawer:"right",sheet:"none",dialog:"none"},mM=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),l=lM("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?i.position:Ru[e]:r?Ru[e]:Ru.sheet,d=l||r?$u[e]:$u.sheet,h=typeof d=="function"?d(u):d,f=l||r?e:"sheet",{refs:p,context:m}=No({open:i.open,onOpenChange:i.onChange}),v=va(m),y=Vo(m),w=Fo(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:g,getFloatingProps:T}=Lo([v,y,w]),S=i.trigger,E=po(void 0),I=()=>i.onChange(!1);return x.jsxs(b.Fragment,{children:[i.trigger?x.jsx(b.Fragment,{children:i.asChild?x.jsx(Nu,{ref:p.setReference,...g({layoutId:i.layoutId}),children:S}):x.jsx(Ct.button,{ref:p.setReference,...g(),layoutId:i.layoutId,type:"button",children:S})}):null,x.jsx(Do,{children:x.jsx(Ii,{presenceAffectsLayout:!0,children:i.open?x.jsx(L_,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${f==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:x.jsx(ji,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(Ct.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:dM({position:u,type:f}),exit:"exit",layoutId:i.layoutId,initial:"initial",ref:p.setFloating,style:f==="drawer"?{width:E}:{height:E},variants:h,...T(),children:[i.title?x.jsx("header",{className:"relative w-full",children:i.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i.children}),i.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:I,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(Sg,{})})}):null,c&&t?x.jsx(pM,{onChange:i.onChange,parent:p.floating,position:u,sheet:f==="sheet",value:E}):null]})})}):null})})]})},gM=e=>x.jsx(Ct.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),jv=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:i,...s})=>{const[a,l]=b.useState(!1),c=b.useRef(null),u=o||"span",{refs:d,floatingStyles:h,context:f}=No({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:la,middleware:[da(5),Eu({fallbackAxisSideDirection:"start"}),Tu(),ev({element:c,padding:5})]}),p=hv(f,{move:!0,enabled:r,delay:{open:Vv}}),m=z_(f,{enabled:r}),v=Fo(f,{enabled:r}),y=Vo(f,{role:"tooltip",enabled:r}),w=$_(f,{enabled:!!r&&!!t}),{getReferenceProps:g,getFloatingProps:T}=Lo([p,m,v,y,w]);return x.jsxs(b.Fragment,{children:[x.jsx(u,{ref:d.setReference,...g(s),children:i}),x.jsx(Do,{children:a&&x.jsxs(eo,{...T(),ref:d.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(lv,{ref:c,context:f,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class wa{static getDescendantProperty(t,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=t[o],a!==null&&typeof a<"u")if(!i&&(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++)wa.getDescendantProperty(a[l],i,r);else i&&wa.getDescendantProperty(a,i,r)}else r.push(t);return r}}class jo{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 i=jo.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=wa.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=jo.isMatch(s[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=jo.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 jo.indexesOfFirstLetter(t,n).forEach((s,a)=>{let l=s+1;o[a]=[s];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(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Bv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>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-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(jv,{title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(xg,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?x.jsxs(b.Fragment,{children:[x.jsx(wg,{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(rk,{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]}),xa=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:h="",name:f,title:p,placeholder:m,hideLeft:v,required:y})=>{const w=d??f,g=Wt(),T=e??g.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:$e("group inline-flex w-full gap-input-gap",r),children:[x.jsxs("label",{form:u,htmlFor:w,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-hover:border-primary group-error:text-danger",children:[!v&&!n?x.jsx(Bv,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:m,children:T||n?x.jsxs(b.Fragment,{children:[y?null:x.jsx("span",{className:"text-opacity-70",children:T}),n?x.jsx(b.Fragment,{children:n}):null]}):null}):null,x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger ${h} focus:ring-2 focus:ring-inset focus:ring-primary`,children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:s}):null]})]}),x.jsx("p",{className:"hidden text-xs empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:block group-error:block group-error:text-danger",children:c}),x.jsx("p",{className:"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})]})},zv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>x.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[r.label??r.value,t?x.jsx("span",{children:x.jsx(ek,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})),yM={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},vM={caseSensitive:!1,sort:!1},bM=[],wM=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:h=!1,...f},p)=>{const m=Wt(),v=b.useRef(null),[y,w]=b.useState(!1),[g,T]=b.useState(""),[S,E]=b.useState(f.value??f.defaultValue??""),[I,P]=b.useState(f.value??f.defaultValue??""),[O,C]=b.useState(null),L=b.useRef(bM),D=t&&g!==""?[{value:g,label:g,"data-dynamic":"true"},...e]:e,V=new jo(D,["value","label"],vM).search(g),k=t?void 0:`^(${e.map(R=>`${ru(R.value)}${R.label?"|"+ru(R.label):""}`).join("|")})$`;b.useEffect(()=>{const R=H.reference.current;if(R)return xs(R)},[]),b.useEffect(()=>{if(f.value){const R=e.find(Y=>Y.value===f.value);E((R==null?void 0:R.label)??f.value)}},[f.value]);const{x:_,y:F,strategy:$,refs:H,context:U}=No({open:y,transform:!0,onOpenChange:w,whileElementsMounted:la,middleware:[da(4),u_({padding:10,apply(R){Object.assign(R.elements.floating.style,{width:`${R.rects.reference.width}px`,maxHeight:`${Math.min(480,R.availableHeight)}px`})}})]}),A=Y_(U,yM),{getReferenceProps:j,getFloatingProps:Z,getItemProps:ne}=Lo([Vo(U,{role:"listbox"}),Fo(U),Fv(U,{activeIndex:O,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:L,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:O,virtual:!0,onNavigate:R=>C(Y=>R??Y)})]),Q=(R,Y)=>{var W,Pe;E(R.value),(W=H.reference.current)==null||W.setAttribute("data-value",R.value),P(R.label??"");const se=Fl(v.current,R.value);se&&((Pe=f.onChange)==null||Pe.call(f,se)),w(!1),T(""),C(Y)},G=R=>{var se;const Y=R.target.value;return T(Y),!y&&Y===""?w(!0):(R.target.name=f.name||"",Y?w(!0):(se=f.onChange)==null?void 0:se.call(f,R))},N=()=>{w(!0),T("")},B=()=>{var R;T(""),E(""),(R=H.reference.current)==null||R.setAttribute("data-value",""),P(""),Fl(H.reference.current),w(!1)},z=f.id||f.name;return x.jsxs(xa,{...f,container:$e("group inline-block w-full",a),error:d,feedback:n,form:f.form,hideLeft:l,id:f.name||f.id,interactive:o,labelClassName:r,left:u,name:f.name,optionalText:s,placeholder:f.placeholder,required:h,rightLabel:i,title:f.title,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[x.jsx(bg,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),S?x.jsx("button",{type:"button",onClick:B,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{...j({...f,onChange:G,onFocus:N,pattern:k,ref:H.setReference,name:`${z}-shadow`,id:`${z}-shadow`,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),w(!1);if(R.key==="Enter"){if(O!==null&&V[O])return R.preventDefault(),Q(V[O],O);if(V.length===1)return R.preventDefault(),Q(V[0],0)}}}),"data-value":S,"data-error":!!d,"data-name":z,"data-target":z,required:h,value:y?g:I||S,"aria-autocomplete":"list",autoComplete:"off",className:$e("input placeholder-input-mask group h-10 w-full flex-1 rounded-md bg-transparent px-2 py-1 text-base text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||g?"pe-12":"",u?"ps-8":"",f.className)}),x.jsx("input",{id:z,name:z,type:"hidden","data-origin":z,ref:p,required:h,defaultValue:f.value||S||void 0}),x.jsx(Do,{preserveTabOrder:!0,children:y?x.jsx(ji,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...Z({ref:H.setFloating,style:{position:$,left:_??0,top:F??0,...A.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:V.map((R,Y)=>b.createElement(zv,{...ne({onClick:()=>Q(R,Y),ref:se=>void(L.current[Y]=se),selected:O===Y,active:S===R.value}),key:`${R.value}-option`,option:R,selected:O===Y,active:S===R.value}))})}):null})]})}),Wv=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:s,...a},l)=>x.jsxs("label",{"data-task":t,"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":"",s),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})]})),Bi=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:h,...f},p)=>{const m=f.id??f.name,v=b.useRef(null);return b.useEffect(()=>{if(v.current===null)return;const y=v.current,w=xs(v.current),g=T=>{const S=T;if(S.key==="Enter"&&y.enterKeyHint==="next"){const E=y.getAttribute("data-next");if(E){const I=document.getElementById(E);if(I)return I.focus(),void S.preventDefault()}}};return y.addEventListener("keydown",g),()=>{w(),y.removeEventListener("keydown",g)}},[]),x.jsx(xa,{info:n,container:$e("group inline-block w-full",l),error:h,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:s,interactive:i,form:f.form,id:f.name||f.id,name:f.name,labelClassName:r,title:f.title,placeholder:f.placeholder,required:f.required,children:x.jsx(oy,{...f,type:e,"data-next":o,ref:Dl(p,v),id:m,name:m,className:$e("input placeholder-input-mask h-input-height px-input-x py-input-y group w-full flex-1 rounded-md bg-transparent text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-input-inline":"",d?"ps-input-inline":"",f.className)})})}),Hv=new Date(1970,11,31),ju={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Uv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},xM={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")},Bu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},SM=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},s)=>{const a=b.useId(),l=Wt(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,d]=b.useState(e||void 0),[h,f]=b.useState(!1),p=Bu(c,Hv).flatMap(E=>fn.keyof(ju,E.type)?ju[E.type](E.value):[]),m=Bu(c,Hv).reduce((E,I)=>E+(fn.keyof(Uv,I.type)?Uv[I.type](I.value):""),""),[v,y]=b.useState(u?Bu(c,u).reduce((E,I)=>E+(fn.keyof(ju,I.type)?xM[I.type](u,I.value):""),""):""),w=E=>{const I=E.target.value;if(y(I),p.length===I.length&&p.every((O,C)=>{const L=I.charAt(C);return typeof O=="string"?L===O:O.test(L)})){const O=vo(hO(I,m,new Date));return d(O),r==null?void 0:r(O)}return d(void 0),r==null?void 0:r(void 0)},g=E=>(d(E),r==null||r(E),y(E?pI(E,m):"")),T=Og(u),S=T?u.toISOString():void 0;return x.jsx(Bi,{...i,mask:p,value:v,"data-value":S,"data-target":i.name,className:"uppercase",formNoValidate:!h,placeholder:m,onChange:w,required:i.required??!0,error:h?void 0:i.error,name:void 0,id:void 0,right:x.jsxs(b.Fragment,{children:[x.jsx("input",{"data-origin":i.name,hidden:!0,type:"date",id:i.name,ref:s,name:i.name,defaultValue:S}),x.jsx(Ro,{open:h,onChange:f,trigger:x.jsxs("span",{"aria-labelledby":a,children:[x.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),x.jsx(JP,{})]}),buttonProps:{"aria-describedby":a},children:x.jsx(Cy,{...i,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:g,disabledDate:n,date:T?u:void 0})})]})})}),TM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],EM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],CM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],PM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Gv=(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 Yv(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?PM:CM:t.binary?EM:TM,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=Gv(e,t.locale,s);return i+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,s||(e=e.toPrecision(3));const l=Gv(Number(e),t.locale,s),c=n[a];return i+l+r+c}var zu={exports:{}},Sa={exports:{}},Le={};/** @license React v16.13.1
|
|
178
178
|
* react-is.production.min.js
|
|
179
179
|
*
|
|
180
180
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
181
181
|
*
|
|
182
182
|
* This source code is licensed under the MIT license found in the
|
|
183
183
|
* LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/var
|
|
184
|
+
*/var qv;function kM(){if(qv)return Le;qv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function g(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case i:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case f:case s:return S;default:return E}}case n:return E}}}function T(S){return g(S)===c}return Le.AsyncMode=l,Le.ConcurrentMode=c,Le.ContextConsumer=a,Le.ContextProvider=s,Le.Element=t,Le.ForwardRef=u,Le.Fragment=r,Le.Lazy=p,Le.Memo=f,Le.Portal=n,Le.Profiler=i,Le.StrictMode=o,Le.Suspense=d,Le.isAsyncMode=function(S){return T(S)||g(S)===l},Le.isConcurrentMode=T,Le.isContextConsumer=function(S){return g(S)===a},Le.isContextProvider=function(S){return g(S)===s},Le.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Le.isForwardRef=function(S){return g(S)===u},Le.isFragment=function(S){return g(S)===r},Le.isLazy=function(S){return g(S)===p},Le.isMemo=function(S){return g(S)===f},Le.isPortal=function(S){return g(S)===n},Le.isProfiler=function(S){return g(S)===i},Le.isStrictMode=function(S){return g(S)===o},Le.isSuspense=function(S){return g(S)===d},Le.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===i||S===o||S===d||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===f||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===v||S.$$typeof===y||S.$$typeof===w||S.$$typeof===m)},Le.typeOf=g,Le}var Ve={};/** @license React v16.13.1
|
|
185
185
|
* react-is.development.js
|
|
186
186
|
*
|
|
187
187
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the MIT license found in the
|
|
190
190
|
* LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/var
|
|
191
|
+
*/var Kv;function IM(){return Kv||(Kv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function g(W){return typeof W=="string"||typeof W=="function"||W===r||W===c||W===i||W===o||W===d||W===h||typeof W=="object"&&W!==null&&(W.$$typeof===p||W.$$typeof===f||W.$$typeof===s||W.$$typeof===a||W.$$typeof===u||W.$$typeof===v||W.$$typeof===y||W.$$typeof===w||W.$$typeof===m)}function T(W){if(typeof W=="object"&&W!==null){var Pe=W.$$typeof;switch(Pe){case t:var st=W.type;switch(st){case l:case c:case r:case i:case o:case d:return st;default:var Ue=st&&st.$$typeof;switch(Ue){case a:case u:case p:case f:case s:return Ue;default:return Pe}}case n:return Pe}}}var S=l,E=c,I=a,P=s,O=t,C=u,L=r,D=p,V=f,k=n,_=i,F=o,$=d,H=!1;function U(W){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(W)||T(W)===l}function A(W){return T(W)===c}function j(W){return T(W)===a}function Z(W){return T(W)===s}function ne(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function Q(W){return T(W)===u}function G(W){return T(W)===r}function N(W){return T(W)===p}function B(W){return T(W)===f}function z(W){return T(W)===n}function R(W){return T(W)===i}function Y(W){return T(W)===o}function se(W){return T(W)===d}Ve.AsyncMode=S,Ve.ConcurrentMode=E,Ve.ContextConsumer=I,Ve.ContextProvider=P,Ve.Element=O,Ve.ForwardRef=C,Ve.Fragment=L,Ve.Lazy=D,Ve.Memo=V,Ve.Portal=k,Ve.Profiler=_,Ve.StrictMode=F,Ve.Suspense=$,Ve.isAsyncMode=U,Ve.isConcurrentMode=A,Ve.isContextConsumer=j,Ve.isContextProvider=Z,Ve.isElement=ne,Ve.isForwardRef=Q,Ve.isFragment=G,Ve.isLazy=N,Ve.isMemo=B,Ve.isPortal=z,Ve.isProfiler=R,Ve.isStrictMode=Y,Ve.isSuspense=se,Ve.isValidElementType=g,Ve.typeOf=T}()),Ve}var Zv;function Xv(){return Zv||(Zv=1,process.env.NODE_ENV==="production"?Sa.exports=kM():Sa.exports=IM()),Sa.exports}/*
|
|
192
192
|
object-assign
|
|
193
193
|
(c) Sindre Sorhus
|
|
194
194
|
@license MIT
|
|
195
|
-
*/var
|
|
196
|
-
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var
|
|
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 xb(e,t){if(e){if(typeof e=="string")return Zu(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 Zu(e,t)}}function Zu(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 bD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function wD(e){if(Array.isArray(e))return e}function Sb(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 Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sb(Object(n),!0).forEach(function(r){Xu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ea(e,t){if(e==null)return{};var n=xD(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Qu=b.forwardRef(function(e,t){var n=e.children,r=Ea(e,uD),o=Eb(r),i=o.open,s=Ea(o,dD);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Je(Je({},s),{},{open:i})))});Qu.displayName="Dropzone";var Tb={disabled:!1,getFilesFromEvent:DM,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};Qu.defaultProps=Tb,Qu.propTypes={children:We.func,accept:We.objectOf(We.arrayOf(We.string)),multiple:We.bool,preventDropOnDocument:We.bool,noClick:We.bool,noKeyboard:We.bool,noDrag:We.bool,noDragEventsBubbling:We.bool,minSize:We.number,maxSize:We.number,maxFiles:We.number,disabled:We.bool,getFilesFromEvent:We.func,onFileDialogCancel:We.func,onFileDialogOpen:We.func,useFsAccessApi:We.bool,autoFocus:We.bool,onDragEnter:We.func,onDragLeave:We.func,onDragOver:We.func,onDrop:We.func,onDropAccepted:We.func,onDropRejected:We.func,onError:We.func,validator:We.func};var Ju={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Eb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Je(Je({},Tb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,h=t.onDrop,f=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,g=t.useFsAccessApi,w=t.autoFocus,y=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,I=t.noDragEventsBubbling,P=t.onError,O=t.validator,C=b.useMemo(function(){return aD(n)},[n]),V=b.useMemo(function(){return sD(n)},[n]),D=b.useMemo(function(){return typeof v=="function"?v:Cb},[v]),L=b.useMemo(function(){return typeof m=="function"?m:Cb},[m]),k=b.useRef(null),_=b.useRef(null),N=b.useReducer(SD,Ju),$=Ku(N,2),z=$[0],U=$[1],A=z.isFocused,j=z.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&iD()),ne=function(){!Z.current&&j&&setTimeout(function(){if(_.current){var ae=_.current.files;ae.length||(U({type:"closeDialog"}),L())}},300)};b.useEffect(function(){return window.addEventListener("focus",ne,!1),function(){window.removeEventListener("focus",ne,!1)}},[_,j,L,Z]);var Q=b.useRef([]),G=function(ae){k.current&&k.current.contains(ae.target)||(ae.preventDefault(),Q.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",vb,!1),document.addEventListener("drop",G,!1)),function(){y&&(document.removeEventListener("dragover",vb),document.removeEventListener("drop",G))}},[k,y]),b.useEffect(function(){return!r&&w&&k.current&&k.current.focus(),function(){}},[k,w,r]);var F=b.useCallback(function(J){P?P(J):console.error(J)},[P]),B=b.useCallback(function(J){J.preventDefault(),J.persist(),Oe(J),Q.current=[].concat(pD(Q.current),[J.target]),Ta(J)&&Promise.resolve(o(J)).then(function(ae){if(!(Sa(J)&&!I)){var _e=ae.length,Xe=_e>0&&tD({files:ae,accept:C,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:O}),It=_e>0&&!Xe;U({isDragAccept:Xe,isDragReject:It,isDragActive:!0,type:"setDraggedFiles"}),c&&c(J)}}).catch(function(ae){return F(ae)})},[o,c,F,I,C,s,i,a,l,O]),W=b.useCallback(function(J){J.preventDefault(),J.persist(),Oe(J);var ae=Ta(J);if(ae&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(J),!1},[d,I]),R=b.useCallback(function(J){J.preventDefault(),J.persist(),Oe(J);var ae=Q.current.filter(function(Xe){return k.current&&k.current.contains(Xe)}),_e=ae.indexOf(J.target);_e!==-1&&ae.splice(_e,1),Q.current=ae,!(ae.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ta(J)&&u&&u(J))},[k,u,I]),Y=b.useCallback(function(J,ae){var _e=[],Xe=[];J.forEach(function(It){var Ft=gb(It,C),Rt=Ku(Ft,2),Ur=Rt[0],ti=Rt[1],ni=yb(It,s,i),nl=Ku(ni,2),tf=nl[0],nf=nl[1],rf=O?O(It):null;if(Ur&&tf&&!rf)_e.push(It);else{var of=[ti,nf];rf&&(of=of.concat(rf)),Xe.push({file:It,errors:of.filter(function(xV){return xV})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(It){Xe.push({file:It,errors:[eD]})}),_e.splice(0)),U({acceptedFiles:_e,fileRejections:Xe,type:"setFiles"}),h&&h(_e,Xe,ae),Xe.length>0&&p&&p(Xe,ae),_e.length>0&&f&&f(_e,ae)},[U,a,C,s,i,l,h,f,p,O]),se=b.useCallback(function(J){J.preventDefault(),J.persist(),Oe(J),Q.current=[],Ta(J)&&Promise.resolve(o(J)).then(function(ae){Sa(J)&&!I||Y(ae,J)}).catch(function(ae){return F(ae)}),U({type:"reset"})},[o,Y,F,I]),H=b.useCallback(function(){if(Z.current){U({type:"openDialog"}),D();var J={multiple:a,types:V};window.showOpenFilePicker(J).then(function(ae){return o(ae)}).then(function(ae){Y(ae,null),U({type:"closeDialog"})}).catch(function(ae){lD(ae)?(L(ae),U({type:"closeDialog"})):cD(ae)?(Z.current=!1,_.current?(_.current.value=null,_.current.click()):F(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."))):F(ae)});return}_.current&&(U({type:"openDialog"}),D(),_.current.value=null,_.current.click())},[U,D,L,g,Y,F,V,a]),Pe=b.useCallback(function(J){!k.current||!k.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),H())},[k,H]),st=b.useCallback(function(){U({type:"focus"})},[]),Ue=b.useCallback(function(){U({type:"blur"})},[]),at=b.useCallback(function(){T||(oD()?setTimeout(H,0):H())},[T,H]),de=function(ae){return r?null:ae},Ee=function(ae){return S?null:de(ae)},ce=function(ae){return E?null:de(ae)},Oe=function(ae){I&&ae.stopPropagation()},ht=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=J.refKey,_e=ae===void 0?"ref":ae,Xe=J.role,It=J.onKeyDown,Ft=J.onFocus,Rt=J.onBlur,Ur=J.onClick,ti=J.onDragEnter,ni=J.onDragOver,nl=J.onDragLeave,tf=J.onDrop,nf=Ea(J,fD);return Je(Je(Xu({onKeyDown:Ee(Sn(It,Pe)),onFocus:Ee(Sn(Ft,st)),onBlur:Ee(Sn(Rt,Ue)),onClick:de(Sn(Ur,at)),onDragEnter:ce(Sn(ti,B)),onDragOver:ce(Sn(ni,W)),onDragLeave:ce(Sn(nl,R)),onDrop:ce(Sn(tf,se)),role:typeof Xe=="string"&&Xe!==""?Xe:"presentation"},_e,k),!r&&!S?{tabIndex:0}:{}),nf)}},[k,Pe,st,Ue,at,B,W,R,se,S,E,r]),Ae=b.useCallback(function(J){J.stopPropagation()},[]),pt=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=J.refKey,_e=ae===void 0?"ref":ae,Xe=J.onChange,It=J.onClick,Ft=Ea(J,hD),Rt=Xu({accept:C,multiple:a,type:"file",style:{display:"none"},onChange:de(Sn(Xe,se)),onClick:de(Sn(It,Ae)),tabIndex:-1},_e,_);return Je(Je({},Rt),Ft)}},[_,n,a,se,r]);return Je(Je({},z),{},{isFocused:A&&!r,getRootProps:ht,getInputProps:pt,rootRef:k,inputRef:_,open:de(H)})}function SD(e,t){switch(t.type){case"focus":return Je(Je({},e),{},{isFocused:!0});case"blur":return Je(Je({},e),{},{isFocused:!1});case"openDialog":return Je(Je({},Ju),{},{isFileDialogActive:!0});case"closeDialog":return Je(Je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Je(Je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Je(Je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Je({},Ju);default:return e}}function Cb(){}const TD={isImage:e=>e.type.includes("image")},ED=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(TD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Uv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Uv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-jade-200 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(qn,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(mo,{})})]}):x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[x.jsx(nk,{size:48}),x.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(qn,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(mo,{className:"text-danger"})})]})},CD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(ED,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),PD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(CD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),kD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(ak,{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"})]})]}),ID=({idle:e=kD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=d=>{n==null||n(d),i(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Eb({onDrop:s});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(PD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},OD=["INPUT","SELECT"],ed=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{OD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},AD=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})},_D=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:Be("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),Lr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:h,error:f,...p},m)=>{const v=Wt(),g=b.useRef(null),w=p.id??p.name;b.useImperativeHandle(m,()=>g.current),b.useEffect(()=>{if(g.current===null)return;const T=g.current,S=Ss(g.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const y=()=>{var T;return(T=g.current)==null?void 0:T.focus()};return x.jsx(ba,{container:Be("group inline-block w-full",c),error:f,feedback:o,hideLeft:u,left:h,info:n,optionalText:l,rightLabel:a,interactive:s,form:p.form,id:p.name||p.id,name:p.name,labelClassName:i,title:p.title,placeholder:p.placeholder,required:e,right:x.jsx("label",{htmlFor:w,children:x.jsxs("button",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(yg,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:w,name:w,value:p.value,required:e,ref:Al(m,g),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Be("input appearance-none select group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent 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(T=>x.jsx("option",{...T,children:T.label??T.value},`${w}-select-option-${T.value}`))]})})}),td=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},MD=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),l=s,c=b.useRef(null),u=td(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const h=f=>{f.target.checked=!f.target.checked,u.current&&u.current(f)};return c.current.addEventListener("change",h),()=>{var f;return(f=c.current)==null?void 0:f.removeEventListener("change",h)}}},[]);const d=h=>{var m;const p=h.target.dataset.checked!=="true";a(p),(m=r==null?void 0:r.onCheck)==null||m.call(r,p),c.current!==null&&(xs(c.current,p.toString()),c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Be("flex flex-wrap items-center",t),children:[x.jsx("input",{...r,id:r.id||i,ref:c,hidden:!0,type:"checkbox",checked:l,onChange:h=>a(h.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"duration-300 ease-in-out relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors 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:"duration-300 duration-300 ease-in-out inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition 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||i,className:"inline-block ml-3 text-sm",id:`${i}-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})]})}),Ca=0,fr=1,Wo=2,Pb=4;function Hi(e,t){return n=>e(t(n))}function DD(e,t){return t(e)}function kb(e,t){return n=>e(t,n)}function Ib(e,t){return()=>e(t)}function Pa(e,t){return t(e),e}function Ke(...e){return e}function ND(e){e()}function Ob(e){return()=>e}function FD(...e){return()=>{e.map(ND)}}function nd(e){return e!==void 0}function Vr(){}function Re(e,t){return e(fr,t)}function be(e,t){e(Ca,t)}function rd(e){e(Wo)}function Dt(e){return e(Pb)}function ue(e,t){return Re(e,kb(t,Ca))}function Tn(e,t){const n=e(fr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Wo:e.splice(0,e.length);return;case fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ca:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case fr:o(t);break;case Ca:t=o;break;case Pb:return t}return n(r,o)}}function LD(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case fr:return i?n===i?void 0:(r(),n=i,t=Re(e,i),t):(r(),Vr);case Wo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Kt(e){return Pa(Ce(),t=>ue(e,t))}function Nt(e,t){return Pa(X(t),n=>ue(e,n))}function VD(...e){return t=>e.reduceRight(DD,t)}function q(e,...t){const n=VD(...t);return(r,o)=>{switch(r){case fr:return Re(e,n(o));case Wo:rd(e);return}}}function Ab(e,t){return e===t}function Ze(e=Ab){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function ie(e){return t=>Hi(t,e)}function En(e){return t=>()=>t(e)}function Cn(e,t){return n=>r=>n(t=e(t,r))}function Ho(e){return t=>n=>{e>0?e--:t(n)}}function hr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function _b(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);Re(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function Mb(...e){return function(t,n){switch(t){case fr:return FD(...e.map(r=>Re(r,n)));case Wo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=Ab){return q(e,Ze(t))}function xt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);Re(i,l=>{n[s]=l,r=r|a,r===o&&be(t,n)})}),function(i,s){switch(i){case fr:return r===o&&s(n),Re(t,s);case Wo:return rd(t);default:throw new Error(`unrecognized action ${i}`)}}}function Fe(e,t=[],{singleton:n}={singleton:!0}){return{id:$D(),constructor:e,dependencies:t,singleton:n}}const $D=()=>Symbol();function RD(e){const t=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=o(i.map(l=>n(l)));return s&&t.set(r,a),a};return n(e)}function jD(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n}const ka=typeof document<"u"?b.useLayoutEffect:b.useEffect;function od(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=b.createContext({});function l(g,w){g.propsReady&&be(g.propsReady,!1);for(const y of r){const T=g[t.required[y]];be(T,w[y])}for(const y of o)if(y in w){const T=g[t.optional[y]];be(T,w[y])}g.propsReady&&be(g.propsReady,!0)}function c(g){return i.reduce((w,y)=>(w[y]=T=>{const S=g[t.methods[y]];be(S,T)},w),{})}function u(g){return s.reduce((w,y)=>(w[y]=LD(g[t.events[y]]),w),{})}const d=b.forwardRef((g,w)=>{const{children:y,...T}=g,[S]=b.useState(()=>Pa(RD(e),I=>l(I,T))),[E]=b.useState(Ib(u,S));return ka(()=>{for(const I of s)I in T&&Re(E[I],T[I]);return()=>{Object.values(E).map(rd)}},[T,E,S]),ka(()=>{l(S,T)}),b.useImperativeHandle(w,Ob(c(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,jD([...r,...o,...s],T),y):y)}),h=g=>b.useCallback(kb(be,b.useContext(a)[g]),[g]),f=g=>{const y=b.useContext(a)[g],T=b.useCallback(S=>Re(y,S),[y]);return b.useSyncExternalStore(T,()=>Dt(y),()=>Dt(y))},p=g=>{const y=b.useContext(a)[g],[T,S]=b.useState(Ib(Dt,y));return ka(()=>Re(y,E=>{E!==T&&S(Ob(E))}),[y,T]),T},m=b.version.startsWith("18")?f:p;return{Component:d,usePublisher:h,useEmitterValue:m,useEmitter:(g,w)=>{const T=b.useContext(a)[g];ka(()=>Re(T,w),[w,T])}}}const BD=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Zt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Zt||{});const zD={0:"debug",1:"log",2:"warn",3:"error"},WD=()=>typeof globalThis>"u"?window:globalThis,pr=Fe(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=WD().VIRTUOSO_LOG_LEVEL)!=null?i:Dt(e);o>=s&&console[zD[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function id(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&e(s)})}),[e]);r=i=>{i&&t?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Pn(e,t=!0){return id(e,t).callbackRef}function Db(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=HD(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",h=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,f=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:f,viewportHeight:p}),i==null||i(UD("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return id(a,n)}function HD(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(!a||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},Zt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function UD(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zt.WARN),t==="normal"?0:parseInt(t??"0",10)}function on(e,t){return Math.round(e.getBoundingClientRect()[t])}function Nb(e,t){return Math.abs(e-t)<1.01}function Fb(e,t,n,r=Vr,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const h=d.target,f=h===window||h===document,p=f?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=f?document.documentElement.scrollHeight:h.scrollHeight,v=f?window.innerHeight:h.offsetHeight,g=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?g():af.flushSync(g),s.current!==null&&(p===s.current||p<=0||p===m-v)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||i.current;return r(o||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(d){const h=i.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const f=d.behavior==="smooth";let p,m,v;h===window?(m=Math.max(on(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=h.scrollHeight,p=on(h,"height"),v=h.scrollTop);const g=m-p;if(d.top=Math.ceil(Math.max(Math.min(g,d.top),0)),Nb(p,m)||d.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),f&&t(!0);return}f?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,h.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const Vt=Fe(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),i=Ce(),s=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),h=Ce(),f=X(!1);return ue(q(e,ie(({scrollTop:p})=>p)),t),ue(q(e,ie(({scrollHeight:p})=>p)),s),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:d,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:f}},[],{singleton:!0}),Ui={lvl:0};function Lb(e,t,n,r=Ui,o=Ui){return{k:e,v:t,lvl:n,l:r,r:o}}function He(e){return e===Ui}function Uo(){return Ui}function sd(e,t){if(He(e))return Ui;const{k:n,l:r,r:o}=e;if(t===n){if(He(r))return o;if(He(o))return r;{const[i,s]=Vb(r);return Ia(yt(e,{k:i,v:s,l:$b(r)}))}}else return t<n?Ia(yt(e,{l:sd(r,t)})):Ia(yt(e,{r:sd(o,t)}))}function Gi(e,t){if(!He(e))return t===e.k?e.v:t<e.k?Gi(e.l,t):Gi(e.r,t)}function sn(e,t,n="k"){if(He(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return sn(e.l,t,n)}function Xt(e,t,n){return He(e)?Lb(t,n,1):t===e.k?yt(e,{k:t,v:n}):t<e.k?Rb(yt(e,{l:Xt(e.l,t,n)})):Rb(yt(e,{r:Xt(e.r,t,n)}))}function ad(e,t,n){if(He(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(ad(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(ad(s,t,n))),a}function $r(e){return He(e)?[]:[...$r(e.l),{k:e.k,v:e.v},...$r(e.r)]}function Vb(e){return He(e.r)?[e.k,e.v]:Vb(e.r)}function $b(e){return He(e.r)?e.l:Ia(yt(e,{r:$b(e.r)}))}function yt(e,t){return Lb(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 ld(e){return He(e)||e.lvl>e.r.lvl}function Rb(e){return cd(Bb(e))}function Ia(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(ld(t))return Bb(yt(e,{lvl:r-1}));if(!He(t)&&!He(t.r))return yt(t.r,{l:yt(t,{r:t.r.l}),r:yt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(ld(e))return cd(yt(e,{lvl:r-1}));if(!He(n)&&!He(n.l)){const o=n.l,i=ld(o)?n.lvl-1:n.lvl;return yt(o,{l:yt(e,{r:o.l,lvl:r-1}),r:cd(yt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Oa(e,t,n){if(He(e))return[];const r=sn(e,t)[0];return GD(ad(e,r,n))}function jb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function GD(e){return jb(e,({k:t,v:n})=>({index:t,value:n}))}function cd(e){const{r:t,lvl:n}=e;return!He(t)&&!He(t.r)&&t.lvl===n&&t.r.lvl===n?yt(t,{l:yt(e,{r:t.l}),lvl:n+1}):e}function Bb(e){const{l:t}=e;return!He(t)&&t.lvl===e.lvl?yt(t,{r:yt(e,{l:t.r})}):e}function Aa(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function zb(e,t,n){return e[Aa(e,t,n)]}function YD(e,t,n,r){const o=Aa(e,t,r),i=Aa(e,n,r,o);return e.slice(o,i+1)}const ud=Fe(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function qD(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 Wb(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 KD(e,t){let n=He(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),He(e)){e=Xt(e,0,o);continue}const a=Oa(e,i-1,s+1);if(a.some(qD(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:h}of a)l?(s>=u||o===h)&&(e=sd(e,u)):(c=h!==o,l=!0),d>s&&s>=u&&h!==o&&(e=Xt(e,s+1,h));c&&(e=Xt(e,i,o))}return[e,n]}function ZD(){return{offsetTree:[],sizeTree:Uo(),groupOffsetTree:Uo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function dd({index:e},t){return t===e?0:t<e?-1:1}function XD({offset:e},t){return t===e?0:t<e?-1:1}function QD(e){return{index:e.index,value:e}}function JD(e,t,n,r=0){return r>0&&(t=Math.max(t,zb(e,r,dd).offset)),jb(YD(e,t,n,XD),QD)}function fd(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Aa(o,t-1,dd),a=o[l].offset;const u=sn(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Oa(n,t,1/0)){const d=c-i,h=d*s+a+d*r;o.push({offset:h,size:u,index:c}),i=c,a=h,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function eN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Zt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&He(i)&&t.length===2){const h=t[0].size,f=t[1].size;s=n.reduce((p,m)=>Xt(Xt(p,m,h),m+1,f),s)}else[s,a]=KD(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=fd(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((h,f)=>Xt(h,f,Yi(f,l,o)),Uo()),groupIndices:n}}function Yi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=zb(t,e,dd),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function tN(e){return typeof e.groupIndex<"u"}function Hb(e,t,n){if(tN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Ub(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Ub(e,t){if(!_a(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _a(e){return!He(e.groupOffsetTree)}function nN(e){return $r(e).map(({k:t,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const rN={offsetHeight:"height",offsetWidth:"width"},kn=Fe(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Nt(r,0),i=Ce(),s=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((S,E)=>on(S,rN[E])),h=X(void 0),f=X(0),p=ZD(),m=Nt(q(n,we(l,e,f),Cn(eN,p),Ze()),p),v=Nt(q(l,Ze(),Cn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),ie(({prev:S})=>S)),[]);ue(q(l,pe(S=>S.length>0),we(m,f),ie(([S,E,I])=>{const P=S.reduce((O,C,V)=>Xt(O,C,Yi(C,E.offsetTree,I)||V),Uo());return{...E,groupIndices:S,groupOffsetTree:P}})),m),ue(q(r,we(m),pe(([S,{lastIndex:E}])=>S<E),ie(([S,{lastIndex:E,lastSize:I}])=>[{startIndex:S,endIndex:E,size:I}])),n),ue(c,u);const g=Nt(q(c,ie(S=>S===void 0)),!0);ue(q(u,pe(S=>S!==void 0&&He(Dt(m).sizeTree)),ie(S=>[{startIndex:0,endIndex:0,size:S}])),n);const w=Kt(q(n,we(m),Cn(({sizes:S},[E,I])=>({changed:I!==S,sizes:I}),{changed:!1,sizes:p}),ie(S=>S.changed)));Re(q(a,Cn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),ie(S=>S.diff)),S=>{const{groupIndices:E}=Dt(m);if(S>0)be(t,!0),be(i,S+Wb(S,E));else if(S<0){const I=Dt(v);I.length>0&&(S-=Wb(-S,I)),be(s,S)}}),Re(q(a,we(e)),([S,E])=>{S<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},Zt.ERROR)});const y=Kt(i);ue(q(i,we(m),ie(([S,E])=>{const I=E.groupIndices.length>0,P=[],O=E.lastSize;if(I){const C=Gi(E.sizeTree,0);let V=0,D=0;for(;V<S;){const _=E.groupIndices[D],N=E.groupIndices.length===D+1?1/0:E.groupIndices[D+1]-_-1;P.push({startIndex:_,endIndex:_,size:C}),P.push({startIndex:_+1,endIndex:_+1+N-1,size:O}),D++,V+=N+1}const L=$r(E.sizeTree);return V!==S&&L.shift(),L.reduce((_,{k:N,v:$})=>{let z=_.ranges;return _.prevSize!==0&&(z=[..._.ranges,{startIndex:_.prevIndex,endIndex:N+S-1,size:_.prevSize}]),{ranges:z,prevIndex:N+S,prevSize:$}},{ranges:P,prevIndex:S,prevSize:0}).ranges}return $r(E.sizeTree).reduce((C,{k:V,v:D})=>({ranges:[...C.ranges,{startIndex:C.prevIndex,endIndex:V+S-1,size:C.prevSize}],prevIndex:V+S,prevSize:D}),{ranges:[],prevIndex:0,prevSize:O}).ranges})),n);const T=Kt(q(s,we(m,f),ie(([S,{offsetTree:E},I])=>{const P=-S;return Yi(P,E,I)})));return ue(q(s,we(m,f),ie(([S,E,I])=>{if(E.groupIndices.length>0){if(He(E.sizeTree))return E;let O=Uo();const C=Dt(v);let V=0,D=0,L=0;for(;V<-S;){L=C[D];const _=C[D+1]-L-1;D++,V+=_+1}if(O=$r(E.sizeTree).reduce((_,{k:N,v:$})=>Xt(_,Math.max(0,N+S),$),O),V!==-S){const _=Gi(E.sizeTree,L);O=Xt(O,0,_);const N=sn(E.sizeTree,-S+1)[1];O=Xt(O,1,N)}return{...E,sizeTree:O,...fd(E.offsetTree,0,O,I)}}else{const O=$r(E.sizeTree).reduce((C,{k:V,v:D})=>Xt(C,Math.max(0,V+S),D),Uo());return{...E,sizeTree:O,...fd(E.offsetTree,0,O,I)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:T,beforeUnshiftWith:y,firstItemIndex:a,gap:f,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:g,itemSize:d}},Ke(pr,ud),{singleton:!0}),oN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Gb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!oN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const qi=Fe(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:h}])=>{const f=Ce(),p=Ce(),m=X(0);let v=null,g=null,w=null;function y(){v&&(v(),v=null),w&&(w(),w=null),g&&(clearTimeout(g),g=null),be(o,!1)}return ue(q(f,we(e,i,t,m,l,c,h),we(r,u,d),ie(([[T,S,E,I,P,O,C,V],D,L,k])=>{const _=Gb(T),{align:N,behavior:$,offset:z}=_,U=I-1,A=Hb(_,S,U);let j=Yi(A,S.offsetTree,D)+O;N==="end"?(j+=L+sn(S.sizeTree,A)[1]-E+k,A===U&&(j+=C)):N==="center"?j+=(L+sn(S.sizeTree,A)[1]-E+k)/2:j-=P,z&&(j+=z);const Z=ne=>{y(),ne?(V("retrying to scroll to",{location:T},Zt.DEBUG),be(f,T)):(be(p,!0),V("list did not change, scroll successful",{},Zt.DEBUG))};if(y(),$==="smooth"){let ne=!1;w=Re(n,Q=>{ne=ne||Q}),v=Tn(a,()=>{Z(ne)})}else v=Tn(q(n,iN(150)),Z);return g=setTimeout(()=>{y()},1200),be(o,!0),V("scrolling from index to",{index:A,top:j,behavior:$},Zt.DEBUG),{top:j,behavior:$}})),s),{scrollToIndex:f,scrollTargetReached:p,topListHeight:m}},Ke(kn,Vt,pr),{singleton:!0});function iN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Ki="up",Zi="down",sN="none",aN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},lN=0,Xi=Fe(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(lN),h=Nt(q(Mb(q(ge(t),Ho(1),En(!0)),q(ge(t),Ho(1),En(!1),_b(100))),Ze()),!1),f=Nt(q(Mb(q(i,En(!0)),q(i,En(!1),_b(200))),Ze()),!1);ue(q(xt(ge(t),ge(d)),ie(([w,y])=>w<=y),Ze()),a),ue(q(a,hr(50)),c);const p=Kt(q(xt(e,ge(n),ge(r),ge(o),ge(u)),Cn((w,[{scrollTop:y,scrollHeight:T},S,E,I,P])=>{const O=y+S-T>-P,C={viewportHeight:S,scrollTop:y,scrollHeight:T};if(O){let D,L;return y>w.state.scrollTop?(D="SCROLLED_DOWN",L=w.state.scrollTop-y):(D="SIZE_DECREASED",L=w.state.scrollTop-y||w.scrollTopDelta),{atBottom:!0,state:C,atBottomBecause:D,scrollTopDelta:L}}let V;return C.scrollHeight>w.state.scrollHeight?V="SIZE_INCREASED":S<w.state.viewportHeight?V="VIEWPORT_HEIGHT_DECREASING":y<w.state.scrollTop?V="SCROLLING_UPWARDS":V="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:V,state:C}},aN),Ze((w,y)=>w&&w.atBottom===y.atBottom))),m=Nt(q(e,Cn((w,{scrollTop:y,scrollHeight:T,viewportHeight:S})=>{if(Nb(w.scrollHeight,T))return{scrollTop:y,scrollHeight:T,jump:0,changed:!1};{const E=T-(y+S)<1;return w.scrollTop!==y&&E?{scrollHeight:T,scrollTop:y,jump:w.scrollTop-y,changed:!0}:{scrollHeight:T,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),ie(w=>w.jump)),0);ue(q(p,ie(w=>w.atBottom)),s),ue(q(s,hr(50)),l);const v=X(Zi);ue(q(e,ie(({scrollTop:w})=>w),Ze(),Cn((w,y)=>Dt(f)?{direction:w.direction,prevScrollTop:y}:{direction:y<w.prevScrollTop?Ki:Zi,prevScrollTop:y},{direction:Zi,prevScrollTop:0}),ie(w=>w.direction)),v),ue(q(e,hr(50),En(sN)),v);const g=X(0);return ue(q(h,pe(w=>!w),En(0)),g),ue(q(t,hr(100),we(h),pe(([w,y])=>!!y),Cn(([w,y],[T])=>[y,T],[0,0]),ie(([w,y])=>y-w)),g),{isScrolling:h,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:g,lastJumpDueToItemResize:m}},Ke(Vt)),mr=Fe(([{log:e}])=>{const t=X(!1),n=Kt(q(t,pe(r=>r),Ze()));return Re(t,r=>{r&&Dt(e)("props updated",{},Zt.DEBUG)}),{propsReady:t,didMount:n}},Ke(pr),{singleton:!0});function hd(e,t){e==0?t():requestAnimationFrame(()=>hd(e-1,t))}function pd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Qi=Fe(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(s,we(l),pe(([u,d])=>!!d),En(!1)),a),ue(q(s,we(l),pe(([u,d])=>!!d),En(!1)),c),Re(q(xt(t,s),we(a,e,n,c),pe(([[,u],d,{sizeTree:h},f,p])=>u&&(!He(h)||nd(f))&&!d&&!p),we(l)),([,u])=>{Tn(i,()=>{be(c,!0)}),hd(4,()=>{Tn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ke(kn,Vt,qi,mr),{singleton:!0});function Yb(e){return e?e==="smooth"?"smooth":"auto":!1}const cN=(e,t)=>typeof e=="function"?Yb(e(t)):t&&Yb(e),uN=Fe(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let h=null;function f(m){be(o,{index:"LAST",align:"end",behavior:m})}Re(q(xt(q(ge(e),Ho(1)),a),we(ge(u),n,i,c),ie(([[m,v],g,w,y,T])=>{let S=v&&y,E="auto";return S&&(E=cN(g,w||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{h&&(h(),h=null),h=Tn(t,()=>{Dt(l)("following output to ",{totalCount:m},Zt.DEBUG),f(v),h=null})});function p(m){const v=Tn(r,g=>{m&&!g.atBottom&&g.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Dt(l)("scrolling to bottom due to increased size",{},Zt.DEBUG),f("auto"))});setTimeout(v,100)}return Re(q(xt(ge(u),e,s),pe(([m,,v])=>m&&v),Cn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(i)&&p(m!==!1)}),Re(d,()=>{p(Dt(u)!==!1)}),Re(xt(ge(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{followOutput:u,autoscrollToBottom:d}},Ke(kn,Xi,qi,Qi,mr,pr,Vt));function dN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const qb=Fe(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ce(),s=Ce(),a=Kt(q(i,ie(dN)));return ue(q(a,ie(l=>l.totalCount)),e),ue(q(a,ie(l=>l.groupIndices)),t),ue(q(xt(r,n,o),pe(([l,c])=>_a(c)),ie(([l,c,u])=>sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ze(),ie(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Ke(kn,Vt));function Ji(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Kb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Ma="top",Da="bottom",Zb="none";function Xb(e,t,n){return typeof e=="number"?n===Ki&&t===Ma||n===Zi&&t===Da?e:0:n===Ki?t===Ma?e.main:e.reverse:t===Da?e.main:e.reverse}function Qb(e,t){return typeof e=="number"?e:e[t]||0}const md=Fe(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ce(),s=X(0),a=X(0),l=X(0),c=Nt(q(xt(ge(e),ge(t),ge(r),ge(i,Ji),ge(l),ge(s),ge(o),ge(n),ge(a)),ie(([u,d,h,[f,p],m,v,g,w,y])=>{const T=u-w,S=v+g,E=Math.max(h-T,0);let I=Zb;const P=Qb(y,Ma),O=Qb(y,Da);return f-=w,f+=h+g,p+=h+g,p-=w,f>u+S-P&&(I=Ki),p<u-E+d+O&&(I=Zi),I!==Zb?[Math.max(T-h-Xb(m,Ma,I)-P,0),T-E-g+d+Xb(m,Da,I)+O]:null}),pe(u=>u!=null),Ze(Ji)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Ke(Vt),{singleton:!0});function fN(e,t,n){if(_a(t)){const r=Ub(e,t);return[{index:sn(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 gd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Jb(e,t,n){if(e.length===0)return[];if(!_a(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=Oa(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Na(e,t,n,r,o,i){const{lastSize:s,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,h=a+d*s+(d-1)*r,f=c,p=h-u;return{items:Jb(e,o,i),topItems:Jb(t,o,i),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:f,bottom:u,totalCount:n,firstItemIndex:i}}function e0(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=pd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return Na(c,[],a,o,n,r)}const Rr=Fe(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},h,{didMount:f},{recalcInProgress:p}])=>{const m=X([]),v=X(0),g=Ce();ue(i.topItemsIndexes,m);const w=Nt(q(xt(f,p,ge(s,Ji),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,I,,P,,,,,,,O])=>{const C=O&&O.length!==P;return E&&!I&&!C}),ie(([,,[E,I],P,O,C,V,D,L,k,_])=>{const N=O,{sizeTree:$,offsetTree:z}=N,U=Dt(v);if(P===0)return{...gd,totalCount:P};if(E===0&&I===0)return U===0?{...gd,totalCount:P}:e0(U,C,O,L,k,_||[]);if(He($))return U>0?null:Na(fN(pd(C,P),N,_),[],P,k,N,L);const A=[];if(D.length>0){const G=D[0],F=D[D.length-1];let B=0;for(const W of Oa($,G,F)){const R=W.value,Y=Math.max(W.start,G),se=Math.min(W.end,F);for(let H=Y;H<=se;H++)A.push({index:H,size:R,offset:B,data:_&&_[H]}),B+=R}}if(!V)return Na([],A,P,k,N,L);const j=D.length>0?D[D.length-1]+1:0,Z=JD(z,E,I,j);if(Z.length===0)return null;const ne=P-1,Q=Pa([],G=>{for(const F of Z){const B=F.value;let W=B.offset,R=F.start;const Y=B.size;if(B.offset<E){R+=Math.floor((E-B.offset+k)/(Y+k));const H=R-F.start;W+=H*Y+H*k}R<j&&(W+=(j-R)*Y,R=j);const se=Math.min(F.end,ne);for(let H=R;H<=se&&!(W>=I);H++)G.push({index:H,size:Y,offset:W,data:_&&_[H]}),W+=Y+k}});return Na(Q,A,P,k,N,L)}),pe(E=>E!==null),Ze()),gd);ue(q(n,pe(nd),ie(E=>E==null?void 0:E.length)),t),ue(q(w,ie(E=>E.topListHeight)),d),ue(d,l),ue(q(w,ie(E=>[E.top,E.bottom])),a),ue(q(w,ie(E=>E.items)),g);const y=Kt(q(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},I])=>E[E.length-1].originalIndex===I-1),ie(([,E,I])=>[E-1,I]),Ze(Ji),ie(([E])=>E))),T=Kt(q(w,hr(200),pe(({items:E,topItems:I})=>E.length>0&&E[0].originalIndex===I.length),ie(({items:E})=>E[0].index),Ze())),S=Kt(q(w,pe(({items:E})=>E.length>0),ie(({items:E})=>{let I=0,P=E.length-1;for(;E[I].type==="group"&&I<P;)I++;for(;E[P].type==="group"&&P>I;)P--;return{startIndex:E[I].index,endIndex:E[P].index}}),Ze(Kb)));return{listState:w,topItemsIndexes:m,endReached:y,startReached:T,rangeChanged:S,itemsRendered:g,initialItemCount:v,...h}},Ke(kn,qb,md,Qi,qi,Xi,mr,ud),{singleton:!0}),hN=Fe(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ue(q(a,we(i),pe(([,l])=>l!==0),we(o,e,t,r,n),ie(([[,l],c,u,d,h,f=[]])=>e0(l,c,u,d,h,f))),s),{}),Ke(kn,Qi,Rr,mr),{singleton:!0}),t0=Fe(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,i])=>!!i),ie(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),Ze()),t),Re(q(xt(t,e,n),we(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ke(Xi),{singleton:!0}),pN=Fe(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,pe(n=>n>0),ie(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ke(Rr)),n0=Fe(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ce(),s=Nt(q(xt(e,r,t,n,o),ie(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(ge(s),i),{totalListHeight:s,totalListHeightChanged:i}},Ke(Vt,Rr),{singleton:!0});function r0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const mN=r0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),gN=Fe(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:h},{log:f},{recalcInProgress:p}])=>{const m=Kt(q(l,we(a),Cn(([,g,w,y],[{items:T,totalCount:S,bottom:E,offsetBottom:I},P])=>{const O=E+I;let C=0;return w===S&&g.length>0&&T.length>0&&(T[0].originalIndex===0&&g[0].originalIndex===0||(C=O-y,C!==0&&(C+=P))),[C,T,S,O]},[0,[],0,0]),pe(([g])=>g!==0),we(t,s,r,i,f,p),pe(([,g,w,y,,,T])=>!T&&!y&&g!==0&&w===Ki),ie(([[g],,,,,w])=>(w("Upward scrolling compensation",{amount:g},Zt.DEBUG),g))));function v(g){g>0?(be(e,{top:-g,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-g,behavior:"auto"}))}return Re(q(m,we(n,o)),([g,w,y])=>{y&&mN()?be(n,w-g):v(-g)}),Re(q(xt(Nt(o,!1),n,p),pe(([g,w,y])=>!g&&!y&&w!==0),ie(([g,w])=>w),hr(1)),v),ue(q(u,ie(g=>({top:-g}))),e),Re(q(c,we(d,h),ie(([g,{lastSize:w,groupIndices:y,sizeTree:T},S])=>{function E(I){return I*(w+S)}if(y.length===0)return E(g);{let I=0;const P=Gi(T,0);let O=0,C=0;for(;O<g;){O++,I+=P;let V=y.length===C+1?1/0:y[C+1]-y[C]-1;O+V>g&&(I-=P,V=g-O+1),O+=V,I+=E(V),C++}return I}})),g=>{be(n,g),requestAnimationFrame(()=>{be(e,{top:g}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ke(Vt,Xi,Rr,kn,pr,ud)),yN=Fe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return Re(q(e,we(r),pe(([,o])=>o!==0),ie(([,o])=>({top:o}))),o=>{Tn(q(n,Ho(1),pe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ke(mr,Vt,Rr),{singleton:!0}),vN=Fe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Nt(q(xt(n,e,t),pe(([o])=>o),ie(([,o,i])=>Math.max(0,o-i)),hr(0),Ze()),0);return{alignToBottom:n,paddingTopAddition:r}},Ke(Vt,n0),{singleton:!0}),yd=Fe(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),i=X(!1),s=X(void 0);return ue(q(xt(n,r),ie(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,we(r),ie(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ke(Vt)),bN=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>e<n?{...s,behavior:o,align:i??"start"}:t>r?{...s,behavior:o,align:i??"end"}:null,wN=Fe(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,i,s,a,r),we(n),ie(([[d,h,f,p,m,v,g,w],y])=>{const{done:T,behavior:S,align:E,calculateViewLocation:I=bN,...P}=d,O=Hb(d,h,p-1),C=Yi(O,h.offsetTree,y)+m+v,V=C+sn(h.sizeTree,O)[1],D=w+v,L=w+f-g,k=I({itemTop:C,itemBottom:V,viewportTop:D,viewportBottom:L,locationParams:{behavior:S,align:E,...P}});return k?T&&Tn(q(l,pe(_=>_===!1),Ho(Dt(l)?1:2)),T):T&&T(),k}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ke(kn,Vt,qi,Rr,pr),{singleton:!0}),xN=Fe(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),h=X(null);return ue(a,d),ue(l,h),Re(q(c,we(e,n,s,d,h,r)),([f,p,m,v,g,w,y])=>{const T=nN(p.sizeTree);v&&g!==null&&w!==null&&(m=g.scrollTop-w.offsetTop),m-=y,f({ranges:T,scrollTop:m})}),ue(q(u,pe(nd),ie(SN)),o),ue(q(i,we(u),pe(([,f])=>f!==void 0),Ze(),ie(([,f])=>f.ranges)),t),{getState:c,restoreStateFrom:u}},Ke(kn,Vt,Qi,mr,yd));function SN(e){return{offset:e.scrollTop,index:0,align:"start"}}const TN=Fe(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),Ke(md,hN,mr,t0,n0,yN,vN,yd,wN,pr)),o0=Fe(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:p},m,v,g,{listState:w,topItemsIndexes:y,...T},{scrollToIndex:S},E,{topItemCount:I},{groupCounts:P},O])=>(ue(T.rangeChanged,O.scrollSeekRangeChanged),ue(q(O.windowViewportRect,ie(C=>C.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:I,groupCounts:P,fixedItemHeight:n,defaultItemHeight:r,gap:u,...g,statefulTotalCount:c,listState:w,scrollToIndex:S,trackItemSizes:o,itemSize:i,groupIndices:l,...T,...O,...m,sizes:d,...v}),Ke(kn,Qi,Vt,xN,uN,Rr,qi,gN,pN,qb,TN)),vd="-webkit-sticky",i0="sticky",s0=r0(()=>{if(typeof document>"u")return i0;const e=document.createElement("div");return e.style.position=vd,e.style.position===vd?vd:i0});function bd(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const h=t.getBoundingClientRect(),f=l.top-h.top;u=h.height-Math.max(0,f),d=f+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:i}=id(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),o}const Fa=b.createContext(void 0),a0=b.createContext(void 0);function wd(e){return e}const EN=Fe(([e,t])=>({...e,...t}),Ke(o0,Fe(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(wd),i=X("div"),s=X(Vr),a=(l,c=null)=>Nt(q(r,ie(u=>u[l]),Ze()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,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")}}))),CN=({height:e})=>b.createElement("div",{style:{height:e}}),PN={position:s0(),zIndex:1,overflowAnchor:"none"},kN={overflowAnchor:"none"},l0=b.memo(function({showTopList:t=!1}){const n=Te("listState"),r=en("sizeRanges"),o=Te("useWindowScroll"),i=Te("customScrollParent"),s=en("windowScrollContainerState"),a=en("scrollContainerState"),l=i||o?s:a,c=Te("itemContent"),u=Te("context"),d=Te("groupContent"),h=Te("trackItemSizes"),f=Te("itemSize"),p=Te("log"),m=en("gap"),{callbackRef:v}=Db(r,f,h,t?Vr:l,p,m,i),[g,w]=b.useState(0);Td("deviation",k=>{g!==k&&w(k)});const y=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||CN,S=Te("ListComponent"),E=Te("ItemComponent"),I=Te("GroupComponent"),P=Te("computeItemKey"),O=Te("isSeeking"),C=Te("groupIndices").length>0,V=Te("alignToBottom"),D=Te("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:g!==0?g:V?"auto":0,...D?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,ot(y,u)):b.createElement(S,{...ot(S,u),ref:v,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const _=k.originalIndex,N=P(_+n.firstItemIndex,k.data,u);return O?b.createElement(T,{...ot(T,u),key:N,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?b.createElement(I,{...ot(I,u),key:N,"data-index":_,"data-known-size":k.size,"data-item-index":k.index,style:PN},d(k.index,u)):b.createElement(E,{...ot(E,u),...c0(E,k.data),key:N,"data-index":_,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:kN},C?c(k.index,k.groupIndex,k.data,u):c(k.index,k.data,u))}))}),IN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Go=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),ON={width:"100%",position:s0(),top:0,zIndex:1};function ot(e,t){if(typeof e!="string")return{context:t}}function c0(e,t){return{item:typeof e=="string"?void 0:t}}const AN=b.memo(function(){const t=Te("HeaderComponent"),n=en("headerHeight"),r=Te("headerFooterTag"),o=Pn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,i))):null}),_N=b.memo(function(){const t=Te("FooterComponent"),n=en("footerHeight"),r=Te("headerFooterTag"),o=Pn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,i))):null});function xd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),h=n("context"),{scrollerRef:f,scrollByCallback:p,scrollToCallback:m}=Fb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:f,style:{...IN,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ot(c,h)},s)})}function Sd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),h=n("deviation"),f=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:g}=Fb(l,u,c,Vr,f);return BD(()=>(m.current=f||window,()=>{m.current=null}),[m,f]),t("windowScrollTo",g),t("scrollBy",v),b.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+h}:{}},"data-virtuoso-scroller":!0,...a,...ot(c,p)},s)})}const MN=({children:e})=>{const t=b.useContext(Fa),n=en("viewportHeight"),r=en("fixedItemHeight"),o=Te("alignToBottom"),i=Pn(b.useMemo(()=>Hi(n,s=>on(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Go(o),ref:i,"data-viewport-type":"element"},e)},DN=({children:e})=>{const t=b.useContext(Fa),n=en("windowViewportRect"),r=en("fixedItemHeight"),o=Te("customScrollParent"),i=bd(n,o),s=Te("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Go(s),"data-viewport-type":"window"},e)},NN=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={...ON,marginTop:`${n}px`},o=Te("context");return b.createElement(t,{style:r,...ot(t,o)},e)},FN=b.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),i=o||n?$N:VN,s=o||n?DN:MN;return b.createElement(i,{...t},r&&b.createElement(NN,null,b.createElement(l0,{showTopList:!0})),b.createElement(s,null,b.createElement(AN,null),b.createElement(l0,null),b.createElement(_N,null)))}),{Component:LN,usePublisher:en,useEmitterValue:Te,useEmitter:Td}=od(EN,{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"}},FN),VN=xd({usePublisher:en,useEmitterValue:Te,useEmitter:Td}),$N=Sd({usePublisher:en,useEmitterValue:Te,useEmitter:Td}),RN=LN,u0={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},jN={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:d0,ceil:f0,floor:La,min:Ed,max:es}=Math;function BN(e){return{...jN,items:e}}function h0(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const i=n===null?null:n[o+e];return{index:o+e,data:i}})}function zN(e,t){return e&&e.column===t.column&&e.row===t.row}function Va(e,t){return e&&e.width===t.width&&e.height===t.height}const WN=Fe(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,h,{propsReady:f,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:w,windowScrollTo:y},T])=>{const S=X(0),E=X(0),I=X(u0),P=X({height:0,width:0}),O=X({height:0,width:0}),C=Ce(),V=Ce(),D=X(0),L=X(null),k=X({row:0,column:0}),_=Ce(),N=Ce(),$=X(!1),z=X(0),U=X(!0),A=X(!1);Re(q(p,we(z),pe(([F,B])=>!!B)),()=>{be(U,!1),be(E,0)}),Re(q(xt(p,U,O,P,z,A),pe(([F,B,W,R,,Y])=>F&&!B&&W.height!==0&&R.height!==0&&!Y)),([,,,,F])=>{be(A,!0),hd(1,()=>{be(C,F)}),Tn(q(r),()=>{be(n,[0,0]),be(U,!0)})}),ue(q(N,pe(F=>F!=null&&F.scrollTop>0),En(0)),E),Re(q(p,we(N),pe(([,F])=>F!=null)),([,F])=>{F&&(be(P,F.viewport),be(O,F==null?void 0:F.item),be(k,F.gap),F.scrollTop>0&&(be($,!0),Tn(q(r,Ho(1)),B=>{be($,!1)}),be(s,{top:F.scrollTop})))}),ue(q(P,ie(({height:F})=>F)),o),ue(q(xt(ge(P,Va),ge(O,Va),ge(k,(F,B)=>F&&F.column===B.column&&F.row===B.row),ge(r)),ie(([F,B,W,R])=>({viewport:F,item:B,gap:W,scrollTop:R}))),_),ue(q(xt(ge(S),t,ge(k,zN),ge(O,Va),ge(P,Va),ge(L),ge(E),ge($),ge(U),ge(z)),pe(([,,,,,,,F])=>!F),ie(([F,[B,W],R,Y,se,H,Pe,,st,Ue])=>{const{row:at,column:de}=R,{height:Ee,width:ce}=Y,{width:Oe}=se;if(Pe===0&&(F===0||Oe===0))return u0;if(ce===0){const Rt=pd(Ue,F),Ur=Rt===0?Math.max(Pe-1,0):Rt;return BN(h0(Rt,Ur,H))}const ht=m0(Oe,ce,de);let Ae,pt;st?B===0&&W===0&&Pe>0?(Ae=0,pt=Pe-1):(Ae=ht*La((B+at)/(Ee+at)),pt=ht*f0((W+at)/(Ee+at))-1,pt=Ed(F-1,es(pt,ht-1)),Ae=Ed(pt,es(0,Ae))):(Ae=0,pt=-1);const J=h0(Ae,pt,H),{top:ae,bottom:_e}=p0(se,R,Y,J),Xe=f0(F/ht),Ft=Xe*Ee+(Xe-1)*at-_e;return{items:J,offsetTop:ae,offsetBottom:Ft,top:ae,bottom:_e,itemHeight:Ee,itemWidth:ce}})),I),ue(q(L,pe(F=>F!==null),ie(F=>F.length)),S),ue(q(xt(P,O,I,k),pe(([F,B,{items:W}])=>W.length>0&&B.height!==0&&F.height!==0),ie(([F,B,{items:W},R])=>{const{top:Y,bottom:se}=p0(F,R,B,W);return[Y,se]}),Ze(Ji)),n);const j=X(!1);ue(q(r,we(j),ie(([F,B])=>B||F!==0)),j);const Z=Kt(q(ge(I),pe(({items:F})=>F.length>0),we(S,j),pe(([{items:F},B,W])=>W&&F[F.length-1].index===B-1),ie(([,F])=>F-1),Ze())),ne=Kt(q(ge(I),pe(({items:F})=>F.length>0&&F[0].index===0),En(0),Ze())),Q=Kt(q(ge(I),we($),pe(([{items:F},B])=>F.length>0&&!B),ie(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),Ze(Kb),hr(0)));ue(Q,h.scrollSeekRangeChanged),ue(q(C,we(P,O,S,k),ie(([F,B,W,R,Y])=>{const se=Gb(F),{align:H,behavior:Pe,offset:st}=se;let Ue=se.index;Ue==="LAST"&&(Ue=R-1),Ue=es(0,Ue,Ed(R-1,Ue));let at=Cd(B,Y,W,Ue);return H==="end"?at=d0(at-B.height+W.height):H==="center"&&(at=d0(at-B.height/2+W.height/2)),st&&(at+=st),{top:at,behavior:Pe}})),s);const G=Nt(q(I,ie(F=>F.offsetBottom+F.bottom)),0);return ue(q(m,ie(F=>({width:F.visibleWidth,height:F.visibleHeight}))),P),{data:L,totalCount:S,viewportDimensions:P,itemDimensions:O,scrollTop:r,scrollHeight:V,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:C,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:w,deviation:D,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:k,restoreStateFrom:N,...h,initialTopMostItemIndex:z,gridState:I,totalListHeight:G,...d,startReached:ne,endReached:Z,rangeChanged:Q,stateChanged:_,propsReady:f,stateRestoreInProgress:$,...T}},Ke(md,Vt,Xi,t0,mr,yd,pr));function p0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=Cd(e,t,n,r[0].index),s=Cd(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function Cd(e,t,n,r){const o=m0(e.width,n.width,t.column),i=La(r/o),s=i*n.height+es(0,i-1)*t.row;return s>0?s+t.row:s}function m0(e,t,n){return es(1,La((e+n)/(La(t)+n)))}const HN=Fe(([e,t])=>({...e,...t}),Ke(WN,Fe(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X(wd),s=X("div"),a=X(Vr),l=(c,u=null)=>Nt(q(t,ie(d=>d[c]),Ze()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),UN=b.memo(function(){const t=et("gridState"),n=et("listClassName"),r=et("itemClassName"),o=et("itemContent"),i=et("computeItemKey"),s=et("isSeeking"),a=an("scrollHeight"),l=et("ItemComponent"),c=et("ListComponent"),u=et("ScrollSeekPlaceholder"),d=et("context"),h=an("itemDimensions"),f=an("gap"),p=et("log"),m=et("stateRestoreInProgress"),v=Pn(b.useMemo(()=>g=>{const w=g.parentElement.parentElement.scrollHeight;a(w);const y=g.firstChild;if(y){const{width:T,height:S}=y.getBoundingClientRect();h({width:T,height:S})}f({row:y0("row-gap",getComputedStyle(g).rowGap,p),column:y0("column-gap",getComputedStyle(g).columnGap,p)})},[a,h,f,p]));return m?null:b.createElement(c,{ref:v,className:n,...ot(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(g=>{const w=i(g.index,g.data,d);return s?b.createElement(u,{key:w,...ot(u,d),index:g.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...ot(l,d),className:r,"data-index":g.index,key:w},o(g.index,g.data,d))}))}),GN=b.memo(function(){const t=et("HeaderComponent"),n=an("headerHeight"),r=et("headerFooterTag"),o=Pn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,i))):null}),YN=b.memo(function(){const t=et("FooterComponent"),n=an("footerHeight"),r=et("headerFooterTag"),o=Pn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,i))):null}),qN=({children:e})=>{const t=b.useContext(a0),n=an("itemDimensions"),r=an("viewportDimensions"),o=Pn(b.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:Go(!1),ref:o},e)},KN=({children:e})=>{const t=b.useContext(a0),n=an("windowViewportRect"),r=an("itemDimensions"),o=et("customScrollParent"),i=bd(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:i,style:Go(!1)},e)},ZN=b.memo(function({...t}){const n=et("useWindowScroll"),r=et("customScrollParent"),o=r||n?QN:XN,i=r||n?KN:qN;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(GN,null),b.createElement(UN,null),b.createElement(YN,null)))}),{Component:$V,usePublisher:an,useEmitterValue:et,useEmitter:g0}=od(HN,{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"}},ZN),XN=xd({usePublisher:an,useEmitterValue:et,useEmitter:g0}),QN=Sd({usePublisher:an,useEmitterValue:et,useEmitter:g0});function y0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zt.WARN),t==="normal"?0:parseInt(t??"0",10)}const JN=Fe(([e,t])=>({...e,...t}),Ke(o0,Fe(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X(wd),s=X(Vr),a=(l,c=null)=>Nt(q(o,ie(u=>u[l]),Ze()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,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")}}))),eF=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),tF=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),nF={overflowAnchor:"none"},rF=b.memo(function(){const t=je("listState"),n=ln("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=ln("windowScrollContainerState"),s=ln("scrollContainerState"),a=o||r?i:s,l=je("itemContent"),c=je("trackItemSizes"),u=je("itemSize"),d=je("log"),{callbackRef:h,ref:f}=Db(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);Pd("deviation",N=>{p!==N&&(f.current.style.marginTop=`${N}px`,m(N))});const v=je("EmptyPlaceholder"),g=je("ScrollSeekPlaceholder")||eF,w=je("FillerRow")||tF,y=je("TableBodyComponent"),T=je("TableRowComponent"),S=je("computeItemKey"),E=je("isSeeking"),I=je("paddingTopAddition"),P=je("firstItemIndex"),O=je("statefulTotalCount"),C=je("context");if(O===0&&v)return b.createElement(v,ot(v,C));const V=t.offsetTop+I+p,D=t.offsetBottom,L=V>0?b.createElement(w,{height:V,key:"padding-top",context:C}):null,k=D>0?b.createElement(w,{height:D,key:"padding-bottom",context:C}):null,_=t.items.map(N=>{const $=N.originalIndex,z=S($+P,N.data,C);return E?b.createElement(g,{...ot(g,C),key:z,index:N.index,height:N.size,type:N.type||"item"}):b.createElement(T,{...ot(T,C),...c0(T,N.data),key:z,"data-index":$,"data-known-size":N.size,"data-item-index":N.index,style:nF},l(N.index,N.data,C))});return b.createElement(y,{ref:h,"data-testid":"virtuoso-item-list",...ot(y,C)},[L,..._,k])}),oF=({children:e})=>{const t=b.useContext(Fa),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=Pn(b.useMemo(()=>Hi(n,i=>on(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Go(!1),ref:o,"data-viewport-type":"element"},e)},iF=({children:e})=>{const t=b.useContext(Fa),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=je("customScrollParent"),i=bd(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Go(!1),"data-viewport-type":"window"},e)},sF=b.memo(function(t){const n=je("useWindowScroll"),r=je("customScrollParent"),o=ln("fixedHeaderHeight"),i=ln("fixedFooterHeight"),s=je("fixedHeaderContent"),a=je("fixedFooterContent"),l=je("context"),c=Pn(b.useMemo(()=>Hi(o,w=>on(w,"height")),[o])),u=Pn(b.useMemo(()=>Hi(i,w=>on(w,"height")),[i])),d=r||n?cF:lF,h=r||n?iF:oF,f=je("TableComponent"),p=je("TableHeadComponent"),m=je("TableFooterComponent"),v=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ot(p,l)},s()):null,g=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ot(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(h,null,b.createElement(f,{style:{borderSpacing:0,overflowAnchor:"none"},...ot(f,l)},[v,b.createElement(rF,{key:"TableBody"}),g])))}),{Component:aF,usePublisher:ln,useEmitterValue:je,useEmitter:Pd}=od(JN,{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"}},sF),lF=xd({usePublisher:ln,useEmitterValue:je,useEmitter:Pd}),cF=Sd({usePublisher:ln,useEmitterValue:je,useEmitter:Pd}),uF=aF,dF=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},fF={Item:b.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},hF=e=>{const t=b.useRef(null),n=dF(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(Bi,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(RN,{height:n,useWindowScroll:!0,data:e.source,components:fF,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(Bv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(qn,{children:x.jsx(Lc,{})})}),x.jsx("div",{})]})};var pF=Object.defineProperty,v0=Object.getOwnPropertySymbols,mF=Object.prototype.hasOwnProperty,gF=Object.prototype.propertyIsEnumerable,b0=(e,t,n)=>t in e?pF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yF=(e,t)=>{for(var n in t||(t={}))mF.call(t,n)&&b0(e,n,t[n]);if(v0)for(var n of v0(t))gF.call(t,n)&&b0(e,n,t[n]);return e},kd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},vF=(e,t,n,r)=>Ra(kd,e,t,n,r),Yo=e=>typeof e=="object",gr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Yo(e)&&!Yo(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=>gr(e[r],t[r]))},bF=(e,t)=>(Yo(e)||Array.isArray(e))&&t?e[t]:e,wF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,$a=e=>/[0-9.]+/.test(e),w0=e=>["string","number"].includes(typeof e),x0=e=>e==null||(e==null?void 0:e.length)===0||e==="",S0={eq:gr,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:x0,notEmpty:e=>!x0(e),in:(e,t)=>kd(t,n=>gr(e,n)),notIn:(e,t)=>T0(t,n=>!gr(e,n))},xF=e=>{if(e in S0)return S0[e];throw new Error("Linq - Symbol not found")},qo=(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},Ra=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=xF(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},SF=(e,t,n,r)=>Ra(qo,e,t,n,r),T0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},TF=(e,t,n,r)=>Ra(T0,e,t,n,r),E0=e=>{if(e===null)return null;const t=yF({},e);return Object.keys(t).forEach(n=>t[n]=Yo(e[n])?E0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},C0=(e,t)=>{if(Yo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1},EF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},CF=e=>qo(e,(t,n,r)=>Yo(t)?n===r.findIndex(o=>gr(o,t)):n===r.indexOf(t)),PF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},P0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},kF=(e,t)=>P0(e,n=>n[t]),k0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},IF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},OF=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return $a(e)&&$a(t)?r.map(s=>Number.parseInt(s)):r},Id=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&$a(e)&&$a(t)){const o=[],[i,s]=IF(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return OF(e,t,r)},AF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Id(r,o,1):Id(r,i,Number.parseInt(o,10))}return w0(e)&&w0(t)?Id(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Od=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},I0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},_F=(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)},MF=(e,t,n,r)=>Ra(_F,e,t,n,r),O0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(wF(t))},A0=(e=>(e.Asc="asc",e.Desc="desc",e))(A0||{}),DF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),NF=(e,t)=>e.sort(DF(t)),FF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:qo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},LF=class sf{constructor(t=[]){this.array=t}static Range(...t){return AF(...t)}static New(t){return new sf(t)}Where(t,n,r){return this.array=SF(this.array,t,n,r),this}Some(t,n,r){return vF(this.array,t,n,r)}All(t,n,r){return TF(this.array,t,n,r)}Reverse(){return this.array=I0(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=MF(this.array,t,n,r),this}Distinct(){return this.array=CF(this.array),this}First(t){return t===void 0?this.array[0]:PF(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?Od((n,r)=>n+r,0,this.array):Od((n,r)=>n+bF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return kF(this.array,t)}GroupWith(t){return P0(this.array,t)}Except(t){return qo(this.array,n=>!C0(t,n))}Intersect(t){return qo(this.array,n=>C0(t,n))}OrderBy(t,n){let r;return r=t?O0(this.array,t):this.array.toSorted(),this.array=n==="desc"?I0(r):r,this}Includes(t){return kd(this.array,n=>gr(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 Od(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(k0(this.array,n=>[t,n]))}Zip(t,n){return k0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:qo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new sf(E0(this.array))}ToObject(t){return EF(this.array,t)}Sort(t){return Array.isArray(t)?NF(this.array,t):O0(this.array,t)}Unique(t){return FF(this.array,t)}},_0=LF,Ad={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,g)=>{try{Object.keys(v).forEach(g)}catch(w){window.console.log(w)}},n=v=>v==null,r=v=>{const g=typeof v;return g==="string"||g==="number"||g==="boolean"||n(v)},o=(v,g)=>{const w=g.getItem(v);try{return JSON.parse(w)}catch{return w??null}},i=v=>Object.keys(v).reduce((g,w)=>({...g,[w]:o(w,v)}),{}),s=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,g)=>(v[decodeURIComponent(g[0].trim())]=decodeURIComponent(g[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(g=>g(v))},d=[{name:"expires",parse:v=>`expires=${s(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${s(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const g=v.domain??"";return g===""?"":`domain=${v.multiDomain?".":""}${g}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],h={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(g=>g.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const g=h.json()[v];if(n(g))return null;try{return JSON.parse(decodeURIComponent(g))}catch{return g}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,g,w={})=>{const y=r(g)?g:encodeURIComponent(JSON.stringify(g)),T=d.reduce((S,E)=>{const I=E.parse(w);return I===""?S:S.concat(I)},[`${encodeURIComponent(v)}=${y}`]).join(";");document.cookie=T,u()}},f=v=>{const g=new Set,w=y=>{v().removeItem(y);const T=i(v());g.forEach(S=>S(T))};return{delete:w,listener:y=>(g.add(y),()=>g.delete(y)),clearListeners:()=>g.clear(),json:(y=!1)=>y?i(v()):v(),has:y=>{const T=v().getItem(y);return!n(T)},deleteAll:()=>{t(v(),w),g.forEach(y=>y(v()))},get:y=>o(y,v()),set:(y,T)=>{v().setItem(y,JSON.stringify(T)),g.forEach(S=>S(v()))}}},p=f(()=>window.sessionStorage),m=f(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=f})(Ad);const _d=e=>e.headerLabel??e.thead??e.id,Md=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ko=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ko||{});const Dd=e=>e.type==="number"?e.valueAsNumber:e.value,VF=e=>{let t=[];return e({add:(o,i,s)=>t.push({...s,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},$F={},RF=(e,t=$F)=>{const n=Xs()?null:Ad.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Jc({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const l=i.state(),c={...l,...a};return Xs()||Ad.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},Nd=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??Ko.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:Zs(),operation:a,label:_d(e),name:o,type:i,value:"",...r}},Fd=()=>{const e=Wt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},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{operationOptions:b.useMemo(()=>({[Ko.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ko.Boolean]:[t.is,t.isNot],[Ko.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},jF=e=>{const t=Wt(),{operationOptions:n,operations:r}=Fd(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,Nd(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(h=>h.map(f=>{if(u!==f.id)return f;const p=e.cols.find(m=>d===m.id);return Nd(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(h=>h.map(f=>f.id===u?{...f,operation:r[d]}:f))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(h=>h.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=Dd(c.target);e.set(h=>h.map(f=>f.id===u?{...f,value:d}:f))};return x.jsx(b.Fragment,{children:x.jsx(Ro,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(ok,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const u=n[c.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Lr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:i}),x.jsx(Lr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Bi,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),x.jsx("div",{className:"flex items-center justify-center mt-5",children:x.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:x.jsx(mo,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Vc,{size:14})," ",t.tableFilterNewFilter]})})]})})})},BF=({filter:e,onDelete:t,set:n})=>{const r=Wt(),{operationOptions:o,operations:i}=Fd(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(h=>h.id===u?{...h,operation:i[c]}:h))},a=l=>{const c=l.target.dataset.id||"",u=Dd(l.target);n(d=>d.map(h=>h.id===c?{...h,value:u}:h))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Lr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),x.jsx(Bi,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(mo,{className:"text-danger",size:14})})]})},zF=({item:e,onPointerDown:t})=>{const n=po(0);return x.jsxs(Hs.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(rk,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},WF=e=>{var l;const t=Wt(),n=Md(e.cols),r=WP(),[o,i]=b.useState(((l=e.groups[0])==null?void 0:l.thead)||""),s=c=>{var v;const u=c.target,d=u.value,h=u.options.selectedIndex,f=((v=u.options.item(h))==null?void 0:v.label)||"";i(f);const p=new _0(e.rows).GroupBy(d),m=e.cols.find(g=>g.id===d);e.setGroups(c1(p).map((g,w)=>{const y=p[g];return{...m,groupId:Zs(),groupKey:d,index:w,rows:y,groupName:g}}))},a=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(Ro,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(sk,{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(Lr,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),x.jsx(qn,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(mo,{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(uP,{children:x.jsx(Hs.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(zF,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},HF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),UF=(e,t)=>e.toSorted(HF(t)),M0=(e,t,n)=>({id:Zs(),type:n,value:e.id,label:t}),GF=e=>{const t=Wt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,M0(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,value:u}:h))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(b.Fragment,{children:x.jsx(Ro,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(gg,{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(Lr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Lr,{onChange:s(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(mo,{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(Vc,{size:14})," ",t.tableSortAddButton]})})]})})})},YF=e=>{const t=Wt(),[n,r]=b.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");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=M0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=_d(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?x.jsx(ZP,{size:14}):null,n==="desc"?x.jsx(KP,{size:14}):null,n==="undefined"?x.jsx(gg,{size:14}):null]})},qF=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(jF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(GF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(WF,{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=Dd(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function KF(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,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const ZF=e=>{const t=b.useId(),n=Wt(),r=e.asLink||"button",o=b.useMemo(()=>KF(e.current,e.pages),[e.current,e.pages]),i=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(b.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:s=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(s.target.value))},children:e.sizes.map(s=>x.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):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(s=>s===null?null:x.jsx(b.Fragment,{children:typeof s=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:s,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${s===e.current?"text-primary border-primary":"border-transparent"}`,children:s})})},`pagination-${s}`)),i?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},XF={opacity:1},QF={opacity:.75,backgroundColor:"var(--table-border)"},JF={opacity:0,transition:{duration:.4,type:"spring"}},eL=e=>{var d;const t=Wt(),n=e.filters.filter(h=>h.name===e.header.id),o=n.length>0?lk:ik,{operationOptions:i,operations:s}=Fd(),a=h=>{const f=h.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==f))},l=e.sorters.find(h=>e.header.id===h.value),c=l!=null&&l.type?l.type===A0.Asc?"ascending":"descending":"none",u=_d(e.header);return x.jsx(Hs.Item,{...e.header.thProps,as:"th",layout:!0,exit:JF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:QF,"aria-sort":c,"aria-busy":e.loading,animate:XF,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(Ro,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(h=>x.jsx("li",{className:"my-1",children:x.jsx(BF,{onDelete:a,filter:h,set:e.setFilters})},`thead-filter-${h.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(h=>h.concat(Nd(e.header,i,s))),type:"button",className:"text-primary flex items-center gap-1",children:[x.jsx(Vc,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),x.jsx(YF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},tL=e=>x.jsx(Hs.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:x.jsx(Ii,{children:e.headers.map(t=>x.jsx(eL,{loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),nL=e=>Math.min(Math.max(e+e*(e%2===0?2:4)+10,50),90),rL=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Ii,{children:e.children})})),oL=b.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),iL=b.forwardRef(({context:e,...t},n)=>x.jsx("thead",{...t,role:"rowgroup",className:"bg-card-background shadow-xs group:sticky top-0",ref:n})),sL=b.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${n.className??""}`})),aL=b.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:"px-2 h-14 bg-card-background",children:x.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),lL={TableHead:iL,Table:oL,TableBody:rL,TableRow:sL,TableFoot:aL},cL=[0,0,0,0,0,0,0,0,0,0],uL=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=yy(t,i.id),c=i.Element;return b.createElement("td",{...i.cellProps,"data-matrix":a,role:"cell",key:`accessor-${e}-${s}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?x.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded",style:{width:`${nL(e)}%`}}):c?x.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:_n.nil(l)?"":l}))})})},dL=()=>x.jsx(b.Fragment,{}),D0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[h,f]=b.useState(!1),p=td(n),m=td(u.loadingMore),v=b.useMemo(()=>{if(u.loading)return cL;if(r)return u.rows;const g=new _0(u.rows);return e.length>0&&e.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:g.Where(w.name,w.operation.symbol,w.value)),s.length===0?g.Select():UF(g.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const g=d.current,w=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void f(!0)):f(!1)});return w.observe(g),()=>w.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[x.jsx(uF,{data:v,useWindowScroll:!0,components:lL,totalCount:v.length,itemContent:uL,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?dL:null,fixedHeaderContent:()=>x.jsx(tL,{headers:a,sorters:s,filters:e,setCols:o,setSorters:c,setFilters:i,loading:!!u.loading})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(ZF,{...t}):null]})},fL=(e,t)=>typeof t=="function"?t(e):t,hL=e=>{const t=e.operations??!0,n=b.useMemo(()=>Md(e.cols),[e.cols]),[r,o]=Jc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const s=a=>l=>{const c=i.state();return{...c,[a]:fL(c[a],l)}};return{cols:s("cols"),filters:s("filters"),groups:s("groups"),sorters:s("sorters")}},{postMiddleware:[i=>{var s;return(s=e.set)==null||s.call(e,i),i}]});return x.jsxs("div",{className:"relative min-w-full",children:[t?x.jsx(qF,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?x.jsx(D0,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((i,s)=>x.jsx(Et.div,{className:"min-w-full",children:x.jsx(D0,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:i,groups:r.groups,index:s,optionCols:n,options:n,rows:i.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${i.groupId}`))})]})},N0=(e="")=>Be("w-full min-w-36 outline-none px-2 py-1 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Ld=b.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),F0=b.forwardRef(({children:e,hover:t=!0,isParent:n,label:r,...o},i)=>{const s=cr(),a=s!==null,[l,c]=b.useState(!1),[u,d]=b.useState(!1),[h,f]=b.useState(null),p=b.useRef([]),m=b.useRef([]),v=b.useContext(Ld),g=ur(),w=y_(),y=rv(),{floatingStyles:T,refs:S,context:E}=Fo({nodeId:w,open:l,transform:!0,onOpenChange:c,whileElementsMounted:sa,placement:a?"right-start":"bottom-start",middleware:[ca({mainAxis:a?0:4,alignmentAxis:a?-4:0}),Su(),xu()]}),I=Vo(E,{role:"menu",enabled:!0}),P=No(E,{bubbles:!0}),O=dv(E,{enabled:t,delay:{open:Vv},handleClose:U_({blockPointerEvents:!0})}),C=ga(E,{event:"mousedown",toggle:!a,ignoreMouse:a,keyboardHandlers:!0}),V=Mv(E,{loop:!0,activeIndex:h,virtual:!0,nested:a,allowEscape:!0,listRef:p,scrollItemIntoView:!0,onNavigate:f}),D=W_(E,{activeIndex:h,listRef:m,onMatch:l?f:void 0}),{getReferenceProps:L,getFloatingProps:k,getItemProps:_}=Lo([O,C,I,P,V,D]);b.useEffect(()=>{if(!g)return;const $=()=>c(!1),z=U=>{U.nodeId!==w&&U.parentId===s&&c(!1)};return g.events.on("click",$),g.events.on("menuopen",z),()=>{g.events.off("click",$),g.events.off("menuopen",z)}},[g,w,s]),b.useEffect(()=>{l&&g&&g.events.emit("menuopen",{parentId:s,nodeId:w})},[g,l,w,s]);const N=n?o.className:N0(o.className);return x.jsxs(v_,{id:w,children:[x.jsx(b.Fragment,{children:o.asChild?x.jsx(Du,{children:r,ref:Tu([S.setReference,y.ref,i]),tabIndex:a?v.activeIndex===y.index?0:-1:void 0,"data-open":l?"":void 0,"data-nested":a?"":void 0,role:a?"menuitem":void 0,"data-focus-inside":u?"":void 0,className:N,...L(v.getItemProps({...o,onFocus($){var z;(z=o.onFocus)==null||z.call(o,$),d(!1),v.setHasFocusInside(!0)}}))}):x.jsxs("button",{ref:Tu([S.setReference,y.ref,i]),tabIndex:a?v.activeIndex===y.index?0:-1:void 0,"data-open":l?"":void 0,"data-nested":a?"":void 0,role:a?"menuitem":void 0,"data-focus-inside":u?"":void 0,className:N,...L(v.getItemProps({...o,onFocus($){var z;(z=o.onFocus)==null||z.call(o,$),d(!1),v.setHasFocusInside(!0)}})),children:[r,a&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Lc,{size:14})]})]})}),x.jsx(Ld.Provider,{value:{activeIndex:h,setActiveIndex:f,getItemProps:_,setHasFocusInside:d,isOpen:l},children:x.jsx(h_,{elementsRef:p,labelsRef:m,children:l&&x.jsx(Do,{preserveTabOrder:!0,children:x.jsx(ji,{context:E,modal:!1,initialFocus:a?-1:0,returnFocus:!a,children:x.jsx("div",{ref:S.setFloating,style:T,className:"isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",...k(),children:e})})})})})]})}),pL=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(Ld),a=rv({label:r?null:typeof e=="string"?e:t}),l=ur(),c=a.index===s.activeIndex;return x.jsxs("button",{...o,ref:Tu([a.ref,i]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:N0(o.className),...s.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),s.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),mL=b.forwardRef((e,t)=>cr()!==null?x.jsx(F0,{...e,isParent:!1,ref:t}):x.jsx(b_,{children:x.jsx(F0,{...e,isParent:!0,ref:t})})),gL=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=b.useState(!1),{context:a,refs:l}=Fo({transform:!0,open:i!==null,onOpenChange:s,nodeId:n,strategy:"absolute"}),c=ga(a),u=Vo(a),d=No(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:f}=Lo([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(qn,{...f(e),as:Et.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:x.jsx(Et.span,{layoutId:o,children:e.trigger})}),x.jsx(Ii,{children:i?x.jsx(Do,{root:t,children:x.jsx(ji,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(Et.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})};var yL=String.prototype.replace,vL=/%20/g,Vd={RFC1738:"RFC1738",RFC3986:"RFC3986"},$d={default:Vd.RFC3986,formatters:{RFC1738:function(e){return yL.call(e,vL,"+")},RFC3986:function(e){return String(e)}},RFC1738:Vd.RFC1738,RFC3986:Vd.RFC3986},bL=$d,Rd=Object.prototype.hasOwnProperty,jr=Array.isArray,In=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),wL=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(jr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},L0=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},xL=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(jr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Rd.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 jr(t)&&!jr(n)&&(o=L0(t,r)),jr(t)&&jr(n)?(n.forEach(function(i,s){if(Rd.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Rd.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},SL=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},TL=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}},jd=1024,EL=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=jd){for(var c=s.length>=jd?s.slice(l,l+jd):s,u=[],d=0;d<c.length;++d){var h=c.charCodeAt(d);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===bL.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(d);continue}if(h<128){u[u.length]=In[h];continue}if(h<2048){u[u.length]=In[192|h>>6]+In[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=In[224|h>>12]+In[128|h>>6&63]+In[128|h&63];continue}d+=1,h=65536+((h&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=In[240|h>>18]+In[128|h>>12&63]+In[128|h>>6&63]+In[128|h&63]}a+=u.join("")}return a},CL=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return wL(n),t},PL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},kL=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},IL=function(t,n){return[].concat(t,n)},OL=function(t,n){if(jr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},V0={arrayToObject:L0,assign:SL,combine:IL,compact:CL,decode:TL,encode:EL,isBuffer:kL,isRegExp:PL,maybeMap:OL,merge:xL},$0=zx,ja=V0,ts=$d,AL=Object.prototype.hasOwnProperty,R0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},On=Array.isArray,_L=Array.prototype.push,j0=function(e,t){_L.apply(e,On(t)?t:[t])},ML=Date.prototype.toISOString,B0=ts.default,vt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ja.encode,encodeValuesOnly:!1,format:B0,formatter:ts.formatters[B0],indices:!1,serializeDate:function(t){return ML.call(t)},skipNulls:!1,strictNullHandling:!1},DL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Bd={},NL=function e(t,n,r,o,i,s,a,l,c,u,d,h,f,p,m,v,g,w){for(var y=t,T=w,S=0,E=!1;(T=T.get(Bd))!==void 0&&!E;){var I=T.get(t);if(S+=1,typeof I<"u"){if(I===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Bd)>"u"&&(S=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=f(y):r==="comma"&&On(y)&&(y=ja.maybeMap(y,function(A){return A instanceof Date?f(A):A})),y===null){if(s)return c&&!v?c(n,vt.encoder,g,"key",p):n;y=""}if(DL(y)||ja.isBuffer(y)){if(c){var P=v?n:c(n,vt.encoder,g,"key",p);return[m(P)+"="+m(c(y,vt.encoder,g,"value",p))]}return[m(n)+"="+m(String(y))]}var O=[];if(typeof y>"u")return O;var C;if(r==="comma"&&On(y))v&&c&&(y=ja.maybeMap(y,c)),C=[{value:y.length>0?y.join(",")||null:void 0}];else if(On(u))C=u;else{var V=Object.keys(y);C=d?V.sort(d):V}var D=l?n.replace(/\./g,"%2E"):n,L=o&&On(y)&&y.length===1?D+"[]":D;if(i&&On(y)&&y.length===0)return L+"[]";for(var k=0;k<C.length;++k){var _=C[k],N=typeof _=="object"&&typeof _.value<"u"?_.value:y[_];if(!(a&&N===null)){var $=h&&l?_.replace(/\./g,"%2E"):_,z=On(y)?typeof r=="function"?r(L,$):L:L+(h?"."+$:"["+$+"]");w.set(t,S);var U=$0();U.set(Bd,w),j0(O,e(N,z,r,o,i,s,a,l,r==="comma"&&v&&On(y)?null:c,u,d,h,f,p,m,v,g,U))}}return O},FL=function(t){if(!t)return vt;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||vt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ts.default;if(typeof t.format<"u"){if(!AL.call(ts.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ts.formatters[r],i=vt.filter;(typeof t.filter=="function"||On(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in R0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=vt.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:vt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:vt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:vt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:vt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?vt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:vt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:vt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:vt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:vt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:vt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:vt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:vt.strictNullHandling}},LL=function(e,t){var n=e,r=FL(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):On(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=R0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=$0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||j0(s,NL(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 h=s.join(r.delimiter),f=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),h.length>0?f+h:""},Zo=V0,zd=Object.prototype.hasOwnProperty,VL=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Zo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},$L=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},z0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},RL="utf8=%26%2310003%3B",jL="utf8=%E2%9C%93",BL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===jL?c="utf-8":s[l]===RL&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],d=u.indexOf("]="),h=d===-1?u.indexOf("="):d+1,f,p;h===-1?(f=n.decoder(u,ft.decoder,c,"key"),p=n.strictNullHandling?null:""):(f=n.decoder(u.slice(0,h),ft.decoder,c,"key"),p=Zo.maybeMap(z0(u.slice(h+1),n),function(v){return n.decoder(v,ft.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=$L(p)),u.indexOf("[]=")>-1&&(p=VL(p)?[p]:p);var m=zd.call(r,f);m&&n.duplicates==="combine"?r[f]=Zo.combine(r[f],p):(!m||n.duplicates==="last")&&(r[f]=p)}return r},zL=function(e,t,n,r){for(var o=r?t:z0(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=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===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},WL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&zd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(i))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&zd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),zL(u,n,r,o)}},HL=function(t){if(!t)return ft;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"?ft.charset:t.charset,r=typeof t.duplicates>"u"?ft.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:ft.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ft.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ft.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ft.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ft.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ft.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ft.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ft.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ft.decoder,delimiter:typeof t.delimiter=="string"||Zo.isRegExp(t.delimiter)?t.delimiter:ft.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ft.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ft.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ft.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ft.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ft.strictNullHandling}},UL=function(e,t){var n=HL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?BL(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=WL(a,r[a],n,typeof e=="string");o=Zo.merge(o,l,n)}return n.allowSparse===!0?o:Zo.compact(o)},GL=LL,YL=UL,qL=$d,KL={formats:qL,parse:YL,stringify:GL},Ie;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ie||(Ie={}));var W0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(W0||(W0={}));const re=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Br=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}},K=Ie.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 tn 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(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof tn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.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()}}tn.create=e=>new tn(e);const ns=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ie.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.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}"`:Ie.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.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 K.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 K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ie.assertNever(e)}return{message:n}};let ZL=ns;function Wd(){return ZL}const Hd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function te(e,t){const n=Wd(),r=Hd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ns?void 0:ns].filter(o=>!!o)});e.common.issues.push(r)}class $t{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 me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return $t.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),rs=e=>({status:"dirty",value:e}),Ht=e=>({status:"valid",value:e}),H0=e=>e.status==="aborted",U0=e=>e.status==="dirty",Ba=e=>e.status==="valid",za=e=>typeof Promise<"u"&&e instanceof Promise;function Wa(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 G0(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 le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var os,is;class An{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 Y0=(e,t)=>{if(Ba(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 tn(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=e;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{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 Br(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $t,ctx:{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(za(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:Br(t)},i=this._parseSync({data:t,path:o.path,parent:o});return Y0(o,i)}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:Br(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(za(o)?o:Promise.resolve(o));return Y0(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Bn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return zn.create(this,this._def)}nullable(){return Hr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cn.create(this,this._def)}promise(){return ls.create(this,this._def)}or(t){return Ga.create([this,t],this._def)}and(t){return Ya.create(this,t,this._def)}transform(t){return new Bn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Qa({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new X0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ja({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return el.create(this,t)}readonly(){return tl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const XL=/^c[^\s-]{8,}$/i,QL=/^[0-9a-z]+$/,JL=/^[0-9A-HJKMNP-TV-Z]{26}$/,eV=/^[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,tV=/^[a-z0-9_-]{21}$/i,nV=/^[-+]?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)?)??$/,rV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ud;const iV=/^(?:(?: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])$/,sV=/^(([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})))$/,aV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,q0="((\\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])))",lV=new RegExp(`^${q0}$`);function K0(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 cV(e){return new RegExp(`^${K0(e)}$`)}function uV(e){let t=`${q0}T${K0(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 dV(e,t){return!!((t==="v4"||!t)&&iV.test(e)||(t==="v6"||!t)&&sV.test(e))}class $n extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.string,received:i.parsedType}),me}const r=new $t;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?te(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&te(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")rV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ud||(Ud=new RegExp(oV,"u")),Ud.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")eV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")tV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")XL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")QL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")JL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:K.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:K.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?uV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?lV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?cV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?nV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?dV(t.data,i.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?aV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:K.invalid_string,message:i.message}),r.dirty()):Ie.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new $n({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.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,...le.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,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new $n({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $n({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $n({...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}}$n.create=e=>{var t;return new $n({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function fV(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class zr extends xe{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)!==re.number){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.number,received:i.parsedType}),me}let r;const o=new $t;for(const i of this._def.checks)i.kind==="int"?Ie.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?fV(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_finite,message:i.message}),o.dirty()):Ie.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new zr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new zr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.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"&&Ie.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)}}zr.create=e=>new zr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Xo extends xe{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)!==re.bigint){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.bigint,received:i.parsedType}),me}let r;const o=new $t;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ie.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Xo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.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}}Xo.create=e=>{var t;return new Xo({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Gd extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.boolean,received:r.parsedType}),me}return Ht(t.data)}}Gd.create=e=>new Gd({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class ss extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_date}),me}const r=new $t;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ie.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ss({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.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}}ss.create=e=>new ss({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Yd extends xe{_parse(t){if(this._getType(t)!==re.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.symbol,received:r.parsedType}),me}return Ht(t.data)}}Yd.create=e=>new Yd({typeName:he.ZodSymbol,...ye(e)});class Ha extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.undefined,received:r.parsedType}),me}return Ht(t.data)}}Ha.create=e=>new Ha({typeName:he.ZodUndefined,...ye(e)});class Ua extends xe{_parse(t){if(this._getType(t)!==re.null){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.null,received:r.parsedType}),me}return Ht(t.data)}}Ua.create=e=>new Ua({typeName:he.ZodNull,...ye(e)});class qd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return Ht(t.data)}}qd.create=e=>new qd({typeName:he.ZodAny,...ye(e)});class Qo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ht(t.data)}}Qo.create=e=>new Qo({typeName:he.ZodUnknown,...ye(e)});class yr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:K.invalid_type,expected:re.never,received:n.parsedType}),me}}yr.create=e=>new yr({typeName:he.ZodNever,...ye(e)});class Kd extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.void,received:r.parsedType}),me}return Ht(t.data)}}Kd.create=e=>new Kd({typeName:he.ZodVoid,...ye(e)});class cn extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==re.array)return te(n,{code:K.invalid_type,expected:re.array,received:n.parsedType}),me;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(te(n,{code:s?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(te(n,{code:K.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&&(te(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new An(n,s,n.path,a)))).then(s=>$t.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new An(n,s,n.path,a)));return $t.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cn({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new cn({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new cn({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}cn.create=(e,t)=>new cn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Jo(e){if(e instanceof it){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=zn.create(Jo(r))}return new it({...e._def,shape:()=>t})}else return e instanceof cn?new cn({...e._def,type:Jo(e.element)}):e instanceof zn?zn.create(Jo(e.unwrap())):e instanceof Hr?Hr.create(Jo(e.unwrap())):e instanceof jn?jn.create(e.items.map(t=>Jo(t))):e}class it extends xe{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=Ie.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==re.object){const c=this._getOrReturnCtx(t);return te(c,{code:K.invalid_type,expected:re.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof yr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new An(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof yr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(te(o,{code:K.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 An(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,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>$t.mergeObjectSync(r,c)):$t.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new it({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new it({...this._def,unknownKeys:"strip"})}passthrough(){return new it({...this._def,unknownKeys:"passthrough"})}extend(t){return new it({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new it({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new it({...this._def,catchall:t})}pick(t){const n={};return Ie.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new it({...this._def,shape:()=>n})}omit(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new it({...this._def,shape:()=>n})}deepPartial(){return Jo(this)}partial(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new it({...this._def,shape:()=>n})}required(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof zn;)i=i._def.innerType;n[r]=i}}),new it({...this._def,shape:()=>n})}keyof(){return Z0(Ie.objectKeys(this.shape))}}it.create=(e,t)=>new it({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),it.strictCreate=(e,t)=>new it({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),it.lazycreate=(e,t)=>new it({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)});class Ga extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new tn(a.ctx.common.issues));return te(n,{code:K.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new tn(l));return te(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Ga.create=(e,t)=>new Ga({options:e,typeName:he.ZodUnion,...ye(t)});const Rn=e=>e instanceof Ka?Rn(e.schema):e instanceof Bn?Rn(e.innerType()):e instanceof Za?[e.value]:e instanceof Wr?e.options:e instanceof Xa?Ie.objectValues(e.enum):e instanceof Qa?Rn(e._def.innerType):e instanceof Ha?[void 0]:e instanceof Ua?[null]:e instanceof zn?[void 0,...Rn(e.unwrap())]:e instanceof Hr?[null,...Rn(e.unwrap())]:e instanceof X0||e instanceof tl?Rn(e.unwrap()):e instanceof Ja?Rn(e._def.innerType):[];class Zd extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.object)return te(n,{code:K.invalid_type,expected:re.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const s=Rn(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new Zd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Xd(e,t){const n=Br(e),r=Br(t);if(e===t)return{valid:!0,data:e};if(n===re.object&&r===re.object){const o=Ie.objectKeys(t),i=Ie.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Xd(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===re.array&&r===re.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=Xd(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===re.date&&r===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ya extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(H0(i)||H0(s))return me;const a=Xd(i.value,s.value);return a.valid?((U0(i)||U0(s))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:K.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ya.create=(e,t,n)=>new Ya({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class jn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.array)return te(r,{code:K.invalid_type,expected:re.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return te(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new An(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>$t.mergeArray(n,s)):$t.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new jn({...this._def,rest:t})}}jn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class qa extends xe{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!==re.object)return te(r,{code:K.invalid_type,expected:re.object,received:r.parsedType}),me;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new An(r,a,r.path,a)),value:s._parse(new An(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?$t.mergeObjectAsync(n,o):$t.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new qa({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new qa({keyType:$n.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Qd extends xe{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!==re.map)return te(r,{code:K.invalid_type,expected:re.map,received:r.parsedType}),me;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new An(r,a,r.path,[c,"key"])),value:i._parse(new An(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Qd.create=(e,t,n)=>new Qd({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class ei extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.set)return te(r,{code:K.invalid_type,expected:re.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:K.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&&(te(r,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new An(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new ei({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new ei({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ei.create=(e,t)=>new ei({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class as extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.function)return te(n,{code:K.invalid_type,expected:re.function,received:n.parsedType}),me;function r(a,l){return Hd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wd(),ns].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Hd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wd(),ns].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ls){const a=this;return Ht(async function(...l){const c=new tn([]),u=await a._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const a=this;return Ht(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new tn([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new tn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new as({...this._def,args:jn.create(t).rest(Qo.create())})}returns(t){return new as({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new as({args:t||jn.create([]).rest(Qo.create()),returns:n||Qo.create(),typeName:he.ZodFunction,...ye(r)})}}class Ka extends xe{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})}}Ka.create=(e,t)=>new Ka({getter:e,typeName:he.ZodLazy,...ye(t)});class Za extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Za.create=(e,t)=>new Za({value:e,typeName:he.ZodLiteral,...ye(t)});function Z0(e,t){return new Wr({values:e,typeName:he.ZodEnum,...ye(t)})}class Wr extends xe{constructor(){super(...arguments),os.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:Ie.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Wa(this,os)||G0(this,os,new Set(this._def.values)),!Wa(this,os).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:K.invalid_enum_value,options:r}),me}return Ht(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 Wr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Wr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}os=new WeakMap,Wr.create=Z0;class Xa extends xe{constructor(){super(...arguments),is.set(this,void 0)}_parse(t){const n=Ie.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==re.string&&r.parsedType!==re.number){const o=Ie.objectValues(n);return te(r,{expected:Ie.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Wa(this,is)||G0(this,is,new Set(Ie.getValidEnumValues(this._def.values))),!Wa(this,is).has(t.data)){const o=Ie.objectValues(n);return te(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return Ht(t.data)}get enum(){return this._def.values}}is=new WeakMap,Xa.create=(e,t)=>new Xa({values:e,typeName:he.ZodNativeEnum,...ye(t)});class ls extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.promise&&n.common.async===!1)return te(n,{code:K.invalid_type,expected:re.promise,received:n.parsedType}),me;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return Ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ls.create=(e,t)=>new ls({type:e,typeName:he.ZodPromise,...ye(t)});class Bn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{te(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?rs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?rs(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ba(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ba(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);Ie.assertNever(o)}}Bn.create=(e,t,n)=>new Bn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),Bn.createWithPreprocess=(e,t,n)=>new Bn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class zn extends xe{_parse(t){return this._getType(t)===re.undefined?Ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zn.create=(e,t)=>new zn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Hr extends xe{_parse(t){return this._getType(t)===re.null?Ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hr.create=(e,t)=>new Hr({innerType:e,typeName:he.ZodNullable,...ye(t)});class Qa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Qa.create=(e,t)=>new Qa({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Ja extends xe{_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 za(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new tn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ja.create=(e,t)=>new Ja({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Jd extends xe{_parse(t){if(this._getType(t)!==re.nan){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Jd.create=e=>new Jd({typeName:he.ZodNaN,...ye(e)});class X0 extends xe{_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 el extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),rs(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me: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 el({in:t,out:n,typeName:he.ZodPipeline})}}class tl extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ba(o)&&(o.value=Object.freeze(o.value)),o);return za(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}tl.create=(e,t)=>new tl({innerType:e,typeName:he.ZodReadonly,...ye(t)}),it.lazycreate;var he;(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"})(he||(he={})),$n.create,zr.create,Jd.create,Xo.create,Gd.create,ss.create,Yd.create,Ha.create,Ua.create,qd.create,Qo.create,yr.create,Kd.create,cn.create,it.create,it.strictCreate,Ga.create,Zd.create,Ya.create,jn.create,qa.create,Qd.create,ei.create,as.create,Ka.create,Za.create,Wr.create,Xa.create,ls.create,Bn.create,zn.create,Hr.create,Bn.createWithPreprocess,el.create;const hV={sort:(e,t)=>e.localeCompare(t),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},Q0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return KL.parse(n.toString(),hV)},J0=e=>e.replace("[",".").replace("]","").split("."),cs=(e,t)=>J0(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof cn?o.element:o},t),us=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),pV=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(u,d)=>{const h=cs(u,e);return{...d,name:u,id:u,required:!h.isOptional(),error:t==null?void 0:t[u],ref:f=>{f!==null&&(r.current[u]={element:f,schema:h})}}},i=(u,d)=>{const h=cs(u,e);return{...d,name:u,id:u,required:!h.isOptional(),error:t==null?void 0:t[u],ref:f=>{f!==null&&(r.current[u]={element:f,schema:h})}}},s=(u,d)=>{const h=cs(u,e);return{...d,name:u,id:u,required:!h.isOptional(),error:t==null?void 0:t[u],ref:f=>{f!==null&&(r.current[u]={element:f,schema:h})}}},a=(u,d)=>{const h=cs(u,e);return{...d,name:u,id:u,required:!h.isOptional(),type:_n.instance(h,zr)?"number":(d==null?void 0:d.type)??"text",error:t==null?void 0:t[u],ref:f=>{f!==null&&(r.current[u]={element:f,schema:h})}}};b.useEffect(()=>{const u=Object.values(r.current).map(h=>{const f=h.element.dataset.origin?document.querySelector(`[data-target=${h.element.name}]`):h.element,p=h.schema.safeParse(us(f)),m=v=>{const g=f.dataset.target||f.name;if(!g)return;const w=us(v.target)||(v.relatedTarget?us(v.relatedTarget):""),y=h.schema.safeParse(w);if(y.success)return f.setCustomValidity(""),n(T=>{const{[g]:S,...E}=T||{};return E===null||_n.empty(E)?null:E});if(f.required){const T=y.error.issues[0].message;f.setCustomValidity(T),n(S=>({...S,[g]:T}))}};return f.addEventListener("blur",m),f.tagName==="SELECT"&&f.addEventListener("change",m),{input:h,hasInitialError:f.required?!p.success:!1,unsubscribe:()=>{f.removeEventListener("blur",m),f.tagName==="SELECT"&&f.addEventListener("change",m)}}});return u.some(h=>h.hasInitialError)&&n(h=>h===null?{}:h),()=>u.forEach(h=>h.unsubscribe())});const l=b.useCallback(u=>d=>{const h=d.currentTarget,f=Object.values(r.current).reduce((m,v)=>{const g=v.element,w=v.schema.safeParse(us(g));if(g.dataset.ignore==="ignore"||w.success)return m;const y=w.error.issues[0].message;g.setAttribute("data-initialized","true");const T=g.dataset.name||g.name||"";return{...m,[T]:y}},{}),p=_n.empty(f)?null:f;n(p),u==null||u({form:h,errors:p||{}})},[]),c=b.useCallback(u=>d=>{d.preventDefault();const h=d.currentTarget;let f=Q0(h);Array.from(h.elements).forEach(m=>{if(m.tagName==="SELECT"){const v=m;f=oh(f,v.name,v.value)}if(m.tagName==="INPUT"){const v=m;f=oh(f,v.name,us(v))}});const p=e.safeParse(f);return p.success?u({form:h,json:f,data:p.data,event:d,reset:()=>ed(h),success:!0,errors:[]}):u({form:h,json:f,event:d,data:f,success:!1,reset:()=>ed(h),errors:p.error.issues.map(m=>({message:m.message,path:m.path.map(v=>String(v))}))})},[]);return{input:a,datepicker:o,checkbox:s,select:i,onSubmit:c,errors:t,onInvalid:l,disabled:t!==null}},mV=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},gV={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},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"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},yV={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"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 75%)",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%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(0, 0%, 85%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},vV={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>)`},ds=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(ds(s,t,n,a))},[]),ew=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:ew(s,t,n,a)}},{}),tw={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ef=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},bV={default:e=>ef(e,{result:tw.default}),dark:e=>ef(e,{result:tw.dark})},wV=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=ds(e.colors,n),o=ds(e.spacing,n),i=ds(e.rounded,n);return ef(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=dk,ee.Autocomplete=hM,ee.Button=qn,ee.ButtonGroup=G1,ee.Calendar=Ey,ee.Card=Cy,ee.Checkbox=Bv,ee.ColType=Ko,ee.Collapse=Sg,ee.ComponentsProvider=UO,ee.DatePicker=gM,ee.Dropdown=Ro,ee.Expand=gL,ee.FileUpload=ID,ee.Form=AD,ee.Input=Bi,ee.InputFeedback=Rv,ee.InputField=ba,ee.Menu=mL,ee.MenuItem=pL,ee.Modal=Fv,ee.Option=jv,ee.Polymorph=to,ee.Radiobox=_D,ee.Select=Lr,ee.Stats=ZO,ee.Switch=MD,ee.Tab=cM,ee.Table=hL,ee.Tabs=aM,ee.Tag=K1,ee.TaskList=pM,ee.Tooltip=$v,ee.TransferList=hF,ee.convertPath=J0,ee.createColumns=VF,ee.createDesignTokens=ew,ee.createOptionCols=Md,ee.createStyles=bV,ee.createTheme=wV,ee.css=Be,ee.defaultDarkTheme=gV,ee.defaultLightTheme=yV,ee.dispatchInput=xs,ee.formReset=ed,ee.formToJson=Q0,ee.getSchemaShape=cs,ee.initializeInputDataset=Ss,ee.isReactComponent=W1,ee.isReactFC=H1,ee.isSsr=Xs,ee.mergeRefs=Al,ee.parsers=vV,ee.path=yy,ee.reduceTokens=ds,ee.safeRegex=tu,ee.splitInto=vy,ee.useForm=pV,ee.usePrevious=mV,ee.useReactive=Py,ee.useTablePreferences=RF,ee.useTranslations=Wt,ee.uuid=Zs,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
195
|
+
*/var Wu,Qv;function OM(){if(Qv)return Wu;Qv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Wu=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},Wu}var Hu,Jv;function Uu(){if(Jv)return Hu;Jv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hu=e,Hu}var Gu,eb;function tb(){return eb||(eb=1,Gu=Function.call.bind(Object.prototype.hasOwnProperty)),Gu}var Yu,nb;function AM(){if(nb)return Yu;nb=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Uu(),n={},r=tb();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var h=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}d=i[u](s,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 f=c?c():"";e("Failed "+a+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yu=o,Yu}var qu,rb;function _M(){if(rb)return qu;rb=1;var e=Xv(),t=OM(),n=Uu(),r=tb(),o=AM(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return qu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(A){var j=A&&(c&&A[c]||A[u]);if(typeof j=="function")return j}var h="<<anonymous>>",f={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:w(),arrayOf:g,element:T(),elementType:S(),instanceOf:E,node:C(),objectOf:P,oneOf:I,oneOfType:O,shape:D,exact:V};function p(A,j){return A===j?A!==0||1/A===1/j:A!==A&&j!==j}function m(A,j){this.message=A,this.data=j&&typeof j=="object"?j:{},this.stack=""}m.prototype=Error.prototype;function v(A){if(process.env.NODE_ENV!=="production")var j={},Z=0;function ne(G,N,B,z,R,Y,se){if(z=z||h,Y=Y||B,se!==n){if(l){var W=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw W.name="Invariant Violation",W}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=z+":"+B;!j[Pe]&&Z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),j[Pe]=!0,Z++)}}return N[B]==null?G?N[B]===null?new m("The "+R+" `"+Y+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+R+" `"+Y+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:A(N,B,z,R,Y)}var Q=ne.bind(null,!1);return Q.isRequired=ne.bind(null,!0),Q}function y(A){function j(Z,ne,Q,G,N,B){var z=Z[ne],R=F(z);if(R!==A){var Y=$(z);return new m("Invalid "+G+" `"+N+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return v(j)}function w(){return v(s)}function g(A){function j(Z,ne,Q,G,N){if(typeof A!="function")return new m("Property `"+N+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var B=Z[ne];if(!Array.isArray(B)){var z=F(B);return new m("Invalid "+G+" `"+N+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected an array."))}for(var R=0;R<B.length;R++){var Y=A(B,R,Q,G,N+"["+R+"]",n);if(Y instanceof Error)return Y}return null}return v(j)}function T(){function A(j,Z,ne,Q,G){var N=j[Z];if(!a(N)){var B=F(N);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+B+"` supplied to `"+ne+"`, expected a single ReactElement."))}return null}return v(A)}function S(){function A(j,Z,ne,Q,G){var N=j[Z];if(!e.isValidElementType(N)){var B=F(N);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+B+"` supplied to `"+ne+"`, expected a single ReactElement type."))}return null}return v(A)}function E(A){function j(Z,ne,Q,G,N){if(!(Z[ne]instanceof A)){var B=A.name||h,z=U(Z[ne]);return new m("Invalid "+G+" `"+N+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected ")+("instance of `"+B+"`."))}return null}return v(j)}function I(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function j(Z,ne,Q,G,N){for(var B=Z[ne],z=0;z<A.length;z++)if(p(B,A[z]))return null;var R=JSON.stringify(A,function(se,W){var Pe=$(W);return Pe==="symbol"?String(W):W});return new m("Invalid "+G+" `"+N+"` of value `"+String(B)+"` "+("supplied to `"+Q+"`, expected one of "+R+"."))}return v(j)}function P(A){function j(Z,ne,Q,G,N){if(typeof A!="function")return new m("Property `"+N+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var B=Z[ne],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+N+"` of type "+("`"+z+"` supplied to `"+Q+"`, expected an object."));for(var R in B)if(r(B,R)){var Y=A(B,R,Q,G,N+"."+R,n);if(Y instanceof Error)return Y}return null}return v(j)}function O(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var j=0;j<A.length;j++){var Z=A[j];if(typeof Z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(Z)+" at index "+j+"."),s}function ne(Q,G,N,B,z){for(var R=[],Y=0;Y<A.length;Y++){var se=A[Y],W=se(Q,G,N,B,z,n);if(W==null)return null;W.data&&r(W.data,"expectedType")&&R.push(W.data.expectedType)}var Pe=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new m("Invalid "+B+" `"+z+"` supplied to "+("`"+N+"`"+Pe+"."))}return v(ne)}function C(){function A(j,Z,ne,Q,G){return k(j[Z])?null:new m("Invalid "+Q+" `"+G+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return v(A)}function L(A,j,Z,ne,Q){return new m((A||"React class")+": "+j+" type `"+Z+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function D(A){function j(Z,ne,Q,G,N){var B=Z[ne],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+N+"` of type `"+z+"` "+("supplied to `"+Q+"`, expected `object`."));for(var R in A){var Y=A[R];if(typeof Y!="function")return L(Q,G,N,R,$(Y));var se=Y(B,R,Q,G,N+"."+R,n);if(se)return se}return null}return v(j)}function V(A){function j(Z,ne,Q,G,N){var B=Z[ne],z=F(B);if(z!=="object")return new m("Invalid "+G+" `"+N+"` of type `"+z+"` "+("supplied to `"+Q+"`, expected `object`."));var R=t({},Z[ne],A);for(var Y in R){var se=A[Y];if(r(A,Y)&&typeof se!="function")return L(Q,G,N,Y,$(se));if(!se)return new m("Invalid "+G+" `"+N+"` key `"+Y+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(Z[ne],null," ")+`
|
|
196
|
+
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var W=se(B,Y,Q,G,N+"."+Y,n);if(W)return W}return null}return v(j)}function k(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(k);if(A===null||a(A))return!0;var j=d(A);if(j){var Z=j.call(A),ne;if(j!==A.entries){for(;!(ne=Z.next()).done;)if(!k(ne.value))return!1}else for(;!(ne=Z.next()).done;){var Q=ne.value;if(Q&&!k(Q[1]))return!1}}else return!1;return!0;default:return!1}}function _(A,j){return A==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function F(A){var j=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":_(j,A)?"symbol":j}function $(A){if(typeof A>"u"||A===null)return""+A;var j=F(A);if(j==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return j}function H(A){var j=$(A);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function U(A){return!A.constructor||!A.constructor.name?h:A.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},qu}var Ku,ob;function MM(){if(ob)return Ku;ob=1;var e=Uu();function t(){}function n(){}return n.resetWarningCache=t,Ku=function(){function r(s,a,l,c,u,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Ku}if(process.env.NODE_ENV!=="production"){var DM=Xv(),FM=!0;zu.exports=_M()(DM.isElement,FM)}else zu.exports=MM()();var NM=zu.exports;const We=aw(NM);function Bo(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function zo(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=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(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ib(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function sb(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var LM=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 zi(e,t){var n=VM(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 VM(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=LM.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var $M=[".DS_Store","Thumbs.db"];function RM(e){return Bo(this,void 0,void 0,function(){return zo(this,function(t){return Ta(e)&&jM(e.dataTransfer)?[2,HM(e.dataTransfer,e.type)]:BM(e)?[2,zM(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,WM(e)]:[2,[]]})})}function jM(e){return Ta(e)}function BM(e){return Ta(e)&&Ta(e.target)}function Ta(e){return typeof e=="object"&&e!==null}function zM(e){return Zu(e.target.files).map(function(t){return zi(t)})}function WM(e){return Bo(this,void 0,void 0,function(){var t;return zo(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 zi(r)})]}})})}function HM(e,t){return Bo(this,void 0,void 0,function(){var n,r;return zo(this,function(o){switch(o.label){case 0:return e.items?(n=Zu(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(UM))]):[3,2];case 1:return r=o.sent(),[2,ab(lb(r))];case 2:return[2,ab(Zu(e.files).map(function(i){return zi(i)}))]}})})}function ab(e){return e.filter(function(t){return $M.indexOf(t.name)===-1})}function Zu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function UM(e){if(typeof e.webkitGetAsEntry!="function")return cb(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ub(t):cb(e)}function lb(e){return e.reduce(function(t,n){return sb(sb([],ib(t),!1),ib(Array.isArray(n)?lb(n):[n]),!1)},[])}function cb(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=zi(t);return Promise.resolve(n)}function GM(e){return Bo(this,void 0,void 0,function(){return zo(this,function(t){return[2,e.isDirectory?ub(e):YM(e)]})})}function ub(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return Bo(s,void 0,void 0,function(){var l,c,u;return zo(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(GM)),o.push(u),i(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function YM(e){return Bo(this,void 0,void 0,function(){return zo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=zi(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var qM=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function db(e){return XM(e)||ZM(e)||mb(e)||KM()}function KM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
197
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XM(e){if(Array.isArray(e))return Xu(e)}function fb(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 hb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fb(Object(n),!0).forEach(function(r){pb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wi(e,t){return eD(e)||JM(e,t)||mb(e,t)||QM()}function QM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
198
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mb(e,t){if(e){if(typeof e=="string")return Xu(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 Xu(e,t)}}function Xu(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 JM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function eD(e){if(Array.isArray(e))return e}var tD="file-invalid-type",nD="file-too-large",rD="file-too-small",oD="too-many-files",iD=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:tD,message:"File type must be ".concat(n)}},gb=function(t){return{code:nD,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},yb=function(t){return{code:rD,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},sD={code:oD,message:"Too many files"};function vb(e,t){var n=e.type==="application/x-moz-file"||qM(e,t);return[n,n?null:iD(t)]}function bb(e,t,n){if(Fr(e.size))if(Fr(t)&&Fr(n)){if(e.size>n)return[!1,gb(n)];if(e.size<t)return[!1,yb(t)]}else{if(Fr(t)&&e.size<t)return[!1,yb(t)];if(Fr(n)&&e.size>n)return[!1,gb(n)]}return[!0,null]}function Fr(e){return e!=null}function aD(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=vb(l,n),u=Wi(c,1),d=u[0],h=bb(l,r,o),f=Wi(h,1),p=f[0],m=a?a(l):null;return d&&p&&!m})}function Ea(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ca(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 wb(e){e.preventDefault()}function lD(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function cD(e){return e.indexOf("Edge/")!==-1}function uD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return lD(e)||cD(e)}function Tn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!Ea(r)&&a&&a.apply(void 0,[r].concat(i)),Ea(r)})}}function dD(){return"showOpenFilePicker"in window}function fD(e){if(Fr(e)){var t=Object.entries(e).filter(function(n){var r=Wi(n,2),o=r[0],i=r[1],s=!0;return xb(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(Sb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Wi(r,2),i=o[0],s=o[1];return hb(hb({},n),{},pb({},i,s))},{});return[{description:"Files",accept:t}]}return e}function hD(e){if(Fr(e))return Object.entries(e).reduce(function(t,n){var r=Wi(n,2),o=r[0],i=r[1];return[].concat(db(t),[o],db(i))},[]).filter(function(t){return xb(t)||Sb(t)}).join(",")}function pD(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function mD(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function xb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Sb(e){return/^.*\.[\w]+$/.test(e)}var gD=["children"],yD=["open"],vD=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],bD=["refKey","onChange","onClick"];function wD(e){return TD(e)||SD(e)||Tb(e)||xD()}function xD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
199
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function TD(e){if(Array.isArray(e))return Ju(e)}function Qu(e,t){return PD(e)||CD(e,t)||Tb(e,t)||ED()}function ED(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
200
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tb(e,t){if(e){if(typeof e=="string")return Ju(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 Ju(e,t)}}function Ju(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 CD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function PD(e){if(Array.isArray(e))return e}function Eb(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 Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Eb(Object(n),!0).forEach(function(r){ed(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ed(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pa(e,t){if(e==null)return{};var n=kD(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var td=b.forwardRef(function(e,t){var n=e.children,r=Pa(e,gD),o=Pb(r),i=o.open,s=Pa(o,yD);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Je(Je({},s),{},{open:i})))});td.displayName="Dropzone";var Cb={disabled:!1,getFilesFromEvent:RM,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};td.defaultProps=Cb,td.propTypes={children:We.func,accept:We.objectOf(We.arrayOf(We.string)),multiple:We.bool,preventDropOnDocument:We.bool,noClick:We.bool,noKeyboard:We.bool,noDrag:We.bool,noDragEventsBubbling:We.bool,minSize:We.number,maxSize:We.number,maxFiles:We.number,disabled:We.bool,getFilesFromEvent:We.func,onFileDialogCancel:We.func,onFileDialogOpen:We.func,useFsAccessApi:We.bool,autoFocus:We.bool,onDragEnter:We.func,onDragLeave:We.func,onDragOver:We.func,onDrop:We.func,onDropAccepted:We.func,onDropRejected:We.func,onError:We.func,validator:We.func};var nd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Pb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Je(Je({},Cb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,h=t.onDrop,f=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,y=t.useFsAccessApi,w=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,I=t.noDragEventsBubbling,P=t.onError,O=t.validator,C=b.useMemo(function(){return hD(n)},[n]),L=b.useMemo(function(){return fD(n)},[n]),D=b.useMemo(function(){return typeof v=="function"?v:kb},[v]),V=b.useMemo(function(){return typeof m=="function"?m:kb},[m]),k=b.useRef(null),_=b.useRef(null),F=b.useReducer(ID,nd),$=Qu(F,2),H=$[0],U=$[1],A=H.isFocused,j=H.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&y&&dD()),ne=function(){!Z.current&&j&&setTimeout(function(){if(_.current){var ae=_.current.files;ae.length||(U({type:"closeDialog"}),V())}},300)};b.useEffect(function(){return window.addEventListener("focus",ne,!1),function(){window.removeEventListener("focus",ne,!1)}},[_,j,V,Z]);var Q=b.useRef([]),G=function(ae){k.current&&k.current.contains(ae.target)||(ae.preventDefault(),Q.current=[])};b.useEffect(function(){return g&&(document.addEventListener("dragover",wb,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",wb),document.removeEventListener("drop",G))}},[k,g]),b.useEffect(function(){return!r&&w&&k.current&&k.current.focus(),function(){}},[k,w,r]);var N=b.useCallback(function(J){P?P(J):console.error(J)},[P]),B=b.useCallback(function(J){J.preventDefault(),J.persist(),Oe(J),Q.current=[].concat(wD(Q.current),[J.target]),Ca(J)&&Promise.resolve(o(J)).then(function(ae){if(!(Ea(J)&&!I)){var _e=ae.length,Xe=_e>0&&aD({files:ae,accept:C,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:O}),It=_e>0&&!Xe;U({isDragAccept:Xe,isDragReject:It,isDragActive:!0,type:"setDraggedFiles"}),c&&c(J)}}).catch(function(ae){return N(ae)})},[o,c,N,I,C,s,i,a,l,O]),z=b.useCallback(function(J){J.preventDefault(),J.persist(),Oe(J);var ae=Ca(J);if(ae&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(J),!1},[d,I]),R=b.useCallback(function(J){J.preventDefault(),J.persist(),Oe(J);var ae=Q.current.filter(function(Xe){return k.current&&k.current.contains(Xe)}),_e=ae.indexOf(J.target);_e!==-1&&ae.splice(_e,1),Q.current=ae,!(ae.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ca(J)&&u&&u(J))},[k,u,I]),Y=b.useCallback(function(J,ae){var _e=[],Xe=[];J.forEach(function(It){var Nt=vb(It,C),Rt=Qu(Nt,2),Hr=Rt[0],ti=Rt[1],ni=bb(It,s,i),il=Qu(ni,2),rf=il[0],of=il[1],sf=O?O(It):null;if(Hr&&rf&&!sf)_e.push(It);else{var af=[ti,of];sf&&(af=af.concat(sf)),Xe.push({file:It,errors:af.filter(function(CV){return CV})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(It){Xe.push({file:It,errors:[sD]})}),_e.splice(0)),U({acceptedFiles:_e,fileRejections:Xe,type:"setFiles"}),h&&h(_e,Xe,ae),Xe.length>0&&p&&p(Xe,ae),_e.length>0&&f&&f(_e,ae)},[U,a,C,s,i,l,h,f,p,O]),se=b.useCallback(function(J){J.preventDefault(),J.persist(),Oe(J),Q.current=[],Ca(J)&&Promise.resolve(o(J)).then(function(ae){Ea(J)&&!I||Y(ae,J)}).catch(function(ae){return N(ae)}),U({type:"reset"})},[o,Y,N,I]),W=b.useCallback(function(){if(Z.current){U({type:"openDialog"}),D();var J={multiple:a,types:L};window.showOpenFilePicker(J).then(function(ae){return o(ae)}).then(function(ae){Y(ae,null),U({type:"closeDialog"})}).catch(function(ae){pD(ae)?(V(ae),U({type:"closeDialog"})):mD(ae)?(Z.current=!1,_.current?(_.current.value=null,_.current.click()):N(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):N(ae)});return}_.current&&(U({type:"openDialog"}),D(),_.current.value=null,_.current.click())},[U,D,V,y,Y,N,L,a]),Pe=b.useCallback(function(J){!k.current||!k.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),W())},[k,W]),st=b.useCallback(function(){U({type:"focus"})},[]),Ue=b.useCallback(function(){U({type:"blur"})},[]),at=b.useCallback(function(){T||(uD()?setTimeout(W,0):W())},[T,W]),de=function(ae){return r?null:ae},Ee=function(ae){return S?null:de(ae)},ce=function(ae){return E?null:de(ae)},Oe=function(ae){I&&ae.stopPropagation()},pt=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=J.refKey,_e=ae===void 0?"ref":ae,Xe=J.role,It=J.onKeyDown,Nt=J.onFocus,Rt=J.onBlur,Hr=J.onClick,ti=J.onDragEnter,ni=J.onDragOver,il=J.onDragLeave,rf=J.onDrop,of=Pa(J,vD);return Je(Je(ed({onKeyDown:Ee(Tn(It,Pe)),onFocus:Ee(Tn(Nt,st)),onBlur:Ee(Tn(Rt,Ue)),onClick:de(Tn(Hr,at)),onDragEnter:ce(Tn(ti,B)),onDragOver:ce(Tn(ni,z)),onDragLeave:ce(Tn(il,R)),onDrop:ce(Tn(rf,se)),role:typeof Xe=="string"&&Xe!==""?Xe:"presentation"},_e,k),!r&&!S?{tabIndex:0}:{}),of)}},[k,Pe,st,Ue,at,B,z,R,se,S,E,r]),Ae=b.useCallback(function(J){J.stopPropagation()},[]),mt=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=J.refKey,_e=ae===void 0?"ref":ae,Xe=J.onChange,It=J.onClick,Nt=Pa(J,bD),Rt=ed({accept:C,multiple:a,type:"file",style:{display:"none"},onChange:de(Tn(Xe,se)),onClick:de(Tn(It,Ae)),tabIndex:-1},_e,_);return Je(Je({},Rt),Nt)}},[_,n,a,se,r]);return Je(Je({},H),{},{isFocused:A&&!r,getRootProps:pt,getInputProps:mt,rootRef:k,inputRef:_,open:de(W)})}function ID(e,t){switch(t.type){case"focus":return Je(Je({},e),{},{isFocused:!0});case"blur":return Je(Je({},e),{},{isFocused:!1});case"openDialog":return Je(Je({},nd),{},{isFileDialogActive:!0});case"closeDialog":return Je(Je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Je(Je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Je(Je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Je({},nd);default:return e}}function kb(){}const OD={isImage:e=>e.type.includes("image")},AD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(OD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Yv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Yv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-jade-200 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(to,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(mo,{})})]}):x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[x.jsx(ok,{size:48}),x.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(to,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(mo,{className:"text-danger"})})]})},_D=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(AD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),MD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(_D,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),DD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(uk,{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"})]})]}),FD=({idle:e=DD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=d=>{n==null||n(d),i(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Pb({onDrop:s});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(MD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},ND=["INPUT","SELECT"],rd=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{ND.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},LD=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})},VD=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:$e("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),Nr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:h,error:f,...p},m)=>{const v=Wt(),y=b.useRef(null),w=p.id??p.name;b.useImperativeHandle(m,()=>y.current),b.useEffect(()=>{if(y.current===null)return;const T=y.current,S=xs(y.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const g=()=>{var T;return(T=y.current)==null?void 0:T.focus()};return x.jsx(xa,{container:$e("group inline-block w-full",c),error:f,feedback:o,hideLeft:u,left:h,info:n,optionalText:l,rightLabel:a,interactive:s,form:p.form,id:p.name||p.id,name:p.name,labelClassName:i,title:p.title,placeholder:p.placeholder,required:e,right:x.jsx("label",{htmlFor:w,children:x.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(bg,{size:20}),x.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:w,name:w,value:p.value,required:e,ref:Dl(m,y),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:$e("input appearance-none select group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent 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(T=>x.jsx("option",{...T,children:T.label??T.value},`${w}-select-option-${T.value}`))]})})}),od=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},$D=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),l=s,c=b.useRef(null),u=od(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const h=f=>{f.target.checked=!f.target.checked,u.current&&u.current(f)};return c.current.addEventListener("change",h),()=>{var f;return(f=c.current)==null?void 0:f.removeEventListener("change",h)}}},[]);const d=()=>{var f,p;const h=!((f=c.current)!=null&&f.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:$e("flex flex-wrap items-center",t),children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||i,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-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||i,className:"ml-3 inline-block text-sm",id:`${i}-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})]})}),RD=e=>{const[t,n]=zP();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:YP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,ref:t})},ka=0,dr=1,Wo=2,Ib=4;function Hi(e,t){return n=>e(t(n))}function jD(e,t){return t(e)}function Ob(e,t){return n=>e(t,n)}function Ab(e,t){return()=>e(t)}function Ia(e,t){return t(e),e}function Ke(...e){return e}function BD(e){e()}function _b(e){return()=>e}function zD(...e){return()=>{e.map(BD)}}function id(e){return e!==void 0}function Lr(){}function je(e,t){return e(dr,t)}function be(e,t){e(ka,t)}function sd(e){e(Wo)}function Dt(e){return e(Ib)}function ue(e,t){return je(e,Ob(t,ka))}function En(e,t){const n=e(dr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Wo:e.splice(0,e.length);return;case dr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ka:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case dr:o(t);break;case ka:t=o;break;case Ib:return t}return n(r,o)}}function WD(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case dr:return i?n===i?void 0:(r(),n=i,t=je(e,i),t):(r(),Lr);case Wo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Kt(e){return Ia(Ce(),t=>ue(e,t))}function Ft(e,t){return Ia(X(t),n=>ue(e,n))}function HD(...e){return t=>e.reduceRight(jD,t)}function q(e,...t){const n=HD(...t);return(r,o)=>{switch(r){case dr:return je(e,n(o));case Wo:sd(e);return}}}function Mb(e,t){return e===t}function Ze(e=Mb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function ie(e){return t=>Hi(t,e)}function Cn(e){return t=>()=>t(e)}function Pn(e,t){return n=>r=>n(t=e(t,r))}function Ho(e){return t=>n=>{e>0?e--:t(n)}}function fr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Db(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);je(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function Fb(...e){return function(t,n){switch(t){case dr:return zD(...e.map(r=>je(r,n)));case Wo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=Mb){return q(e,Ze(t))}function St(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);je(i,l=>{n[s]=l,r=r|a,r===o&&be(t,n)})}),function(i,s){switch(i){case dr:return r===o&&s(n),je(t,s);case Wo:return sd(t);default:throw new Error(`unrecognized action ${i}`)}}}function Ne(e,t=[],{singleton:n}={singleton:!0}){return{id:UD(),constructor:e,dependencies:t,singleton:n}}const UD=()=>Symbol();function GD(e){const t=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=o(i.map(l=>n(l)));return s&&t.set(r,a),a};return n(e)}function YD(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n}const Oa=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ad(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=b.createContext({});function l(y,w){y.propsReady&&be(y.propsReady,!1);for(const g of r){const T=y[t.required[g]];be(T,w[g])}for(const g of o)if(g in w){const T=y[t.optional[g]];be(T,w[g])}y.propsReady&&be(y.propsReady,!0)}function c(y){return i.reduce((w,g)=>(w[g]=T=>{const S=y[t.methods[g]];be(S,T)},w),{})}function u(y){return s.reduce((w,g)=>(w[g]=WD(y[t.events[g]]),w),{})}const d=b.forwardRef((y,w)=>{const{children:g,...T}=y,[S]=b.useState(()=>Ia(GD(e),I=>l(I,T))),[E]=b.useState(Ab(u,S));return Oa(()=>{for(const I of s)I in T&&je(E[I],T[I]);return()=>{Object.values(E).map(sd)}},[T,E,S]),Oa(()=>{l(S,T)}),b.useImperativeHandle(w,_b(c(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,YD([...r,...o,...s],T),g):g)}),h=y=>b.useCallback(Ob(be,b.useContext(a)[y]),[y]),f=y=>{const g=b.useContext(a)[y],T=b.useCallback(S=>je(g,S),[g]);return b.useSyncExternalStore(T,()=>Dt(g),()=>Dt(g))},p=y=>{const g=b.useContext(a)[y],[T,S]=b.useState(Ab(Dt,g));return Oa(()=>je(g,E=>{E!==T&&S(_b(E))}),[g,T]),T},m=b.version.startsWith("18")?f:p;return{Component:d,usePublisher:h,useEmitterValue:m,useEmitter:(y,w)=>{const T=b.useContext(a)[y];Oa(()=>je(T,w),[w,T])}}}const qD=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Zt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Zt||{});const KD={0:"debug",1:"log",2:"warn",3:"error"},ZD=()=>typeof globalThis>"u"?window:globalThis,hr=Ne(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=ZD().VIRTUOSO_LOG_LEVEL)!=null?i:Dt(e);o>=s&&console[KD[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function ld(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&e(s)})}),[e]);r=i=>{i&&t?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function kn(e,t=!0){return ld(e,t).callbackRef}function Nb(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=XD(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",h=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,f=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:f,viewportHeight:p}),i==null||i(QD("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return ld(a,n)}function XD(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(!a||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},Zt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function QD(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zt.WARN),t==="normal"?0:parseInt(t??"0",10)}function on(e,t){return Math.round(e.getBoundingClientRect()[t])}function Lb(e,t){return Math.abs(e-t)<1.01}function Vb(e,t,n,r=Lr,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const h=d.target,f=h===window||h===document,p=f?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=f?document.documentElement.scrollHeight:h.scrollHeight,v=f?window.innerHeight:h.offsetHeight,y=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?y():cf.flushSync(y),s.current!==null&&(p===s.current||p<=0||p===m-v)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||i.current;return r(o||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(d){const h=i.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const f=d.behavior==="smooth";let p,m,v;h===window?(m=Math.max(on(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=h.scrollHeight,p=on(h,"height"),v=h.scrollTop);const y=m-p;if(d.top=Math.ceil(Math.max(Math.min(y,d.top),0)),Lb(p,m)||d.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),f&&t(!0);return}f?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,h.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const Vt=Ne(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),i=Ce(),s=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),h=Ce(),f=X(!1);return ue(q(e,ie(({scrollTop:p})=>p)),t),ue(q(e,ie(({scrollHeight:p})=>p)),s),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:d,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:f}},[],{singleton:!0}),Ui={lvl:0};function $b(e,t,n,r=Ui,o=Ui){return{k:e,v:t,lvl:n,l:r,r:o}}function He(e){return e===Ui}function Uo(){return Ui}function cd(e,t){if(He(e))return Ui;const{k:n,l:r,r:o}=e;if(t===n){if(He(r))return o;if(He(o))return r;{const[i,s]=Rb(r);return Aa(vt(e,{k:i,v:s,l:jb(r)}))}}else return t<n?Aa(vt(e,{l:cd(r,t)})):Aa(vt(e,{r:cd(o,t)}))}function Gi(e,t){if(!He(e))return t===e.k?e.v:t<e.k?Gi(e.l,t):Gi(e.r,t)}function sn(e,t,n="k"){if(He(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return sn(e.l,t,n)}function Xt(e,t,n){return He(e)?$b(t,n,1):t===e.k?vt(e,{k:t,v:n}):t<e.k?Bb(vt(e,{l:Xt(e.l,t,n)})):Bb(vt(e,{r:Xt(e.r,t,n)}))}function ud(e,t,n){if(He(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(ud(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(ud(s,t,n))),a}function Vr(e){return He(e)?[]:[...Vr(e.l),{k:e.k,v:e.v},...Vr(e.r)]}function Rb(e){return He(e.r)?[e.k,e.v]:Rb(e.r)}function jb(e){return He(e.r)?e.l:Aa(vt(e,{r:jb(e.r)}))}function vt(e,t){return $b(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 dd(e){return He(e)||e.lvl>e.r.lvl}function Bb(e){return fd(Wb(e))}function Aa(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(dd(t))return Wb(vt(e,{lvl:r-1}));if(!He(t)&&!He(t.r))return vt(t.r,{l:vt(t,{r:t.r.l}),r:vt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(dd(e))return fd(vt(e,{lvl:r-1}));if(!He(n)&&!He(n.l)){const o=n.l,i=dd(o)?n.lvl-1:n.lvl;return vt(o,{l:vt(e,{r:o.l,lvl:r-1}),r:fd(vt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function _a(e,t,n){if(He(e))return[];const r=sn(e,t)[0];return JD(ud(e,r,n))}function zb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function JD(e){return zb(e,({k:t,v:n})=>({index:t,value:n}))}function fd(e){const{r:t,lvl:n}=e;return!He(t)&&!He(t.r)&&t.lvl===n&&t.r.lvl===n?vt(t,{l:vt(e,{r:t.l}),lvl:n+1}):e}function Wb(e){const{l:t}=e;return!He(t)&&t.lvl===e.lvl?vt(t,{r:vt(e,{l:t.r})}):e}function Ma(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Hb(e,t,n){return e[Ma(e,t,n)]}function eF(e,t,n,r){const o=Ma(e,t,r),i=Ma(e,n,r,o);return e.slice(o,i+1)}const hd=Ne(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function tF(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 Ub(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 nF(e,t){let n=He(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),He(e)){e=Xt(e,0,o);continue}const a=_a(e,i-1,s+1);if(a.some(tF(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:h}of a)l?(s>=u||o===h)&&(e=cd(e,u)):(c=h!==o,l=!0),d>s&&s>=u&&h!==o&&(e=Xt(e,s+1,h));c&&(e=Xt(e,i,o))}return[e,n]}function rF(){return{offsetTree:[],sizeTree:Uo(),groupOffsetTree:Uo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function pd({index:e},t){return t===e?0:t<e?-1:1}function oF({offset:e},t){return t===e?0:t<e?-1:1}function iF(e){return{index:e.index,value:e}}function sF(e,t,n,r=0){return r>0&&(t=Math.max(t,Hb(e,r,pd).offset)),zb(eF(e,t,n,oF),iF)}function md(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Ma(o,t-1,pd),a=o[l].offset;const u=sn(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of _a(n,t,1/0)){const d=c-i,h=d*s+a+d*r;o.push({offset:h,size:u,index:c}),i=c,a=h,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function aF(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Zt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&He(i)&&t.length===2){const h=t[0].size,f=t[1].size;s=n.reduce((p,m)=>Xt(Xt(p,m,h),m+1,f),s)}else[s,a]=nF(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=md(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((h,f)=>Xt(h,f,Yi(f,l,o)),Uo()),groupIndices:n}}function Yi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Hb(t,e,pd),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function lF(e){return typeof e.groupIndex<"u"}function Gb(e,t,n){if(lF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Yb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Yb(e,t){if(!Da(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Da(e){return!He(e.groupOffsetTree)}function cF(e){return Vr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const uF={offsetHeight:"height",offsetWidth:"width"},In=Ne(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Ft(r,0),i=Ce(),s=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((S,E)=>on(S,uF[E])),h=X(void 0),f=X(0),p=rF(),m=Ft(q(n,we(l,e,f),Pn(aF,p),Ze()),p),v=Ft(q(l,Ze(),Pn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),ie(({prev:S})=>S)),[]);ue(q(l,pe(S=>S.length>0),we(m,f),ie(([S,E,I])=>{const P=S.reduce((O,C,L)=>Xt(O,C,Yi(C,E.offsetTree,I)||L),Uo());return{...E,groupIndices:S,groupOffsetTree:P}})),m),ue(q(r,we(m),pe(([S,{lastIndex:E}])=>S<E),ie(([S,{lastIndex:E,lastSize:I}])=>[{startIndex:S,endIndex:E,size:I}])),n),ue(c,u);const y=Ft(q(c,ie(S=>S===void 0)),!0);ue(q(u,pe(S=>S!==void 0&&He(Dt(m).sizeTree)),ie(S=>[{startIndex:0,endIndex:0,size:S}])),n);const w=Kt(q(n,we(m),Pn(({sizes:S},[E,I])=>({changed:I!==S,sizes:I}),{changed:!1,sizes:p}),ie(S=>S.changed)));je(q(a,Pn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),ie(S=>S.diff)),S=>{const{groupIndices:E}=Dt(m);if(S>0)be(t,!0),be(i,S+Ub(S,E));else if(S<0){const I=Dt(v);I.length>0&&(S-=Ub(-S,I)),be(s,S)}}),je(q(a,we(e)),([S,E])=>{S<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},Zt.ERROR)});const g=Kt(i);ue(q(i,we(m),ie(([S,E])=>{const I=E.groupIndices.length>0,P=[],O=E.lastSize;if(I){const C=Gi(E.sizeTree,0);let L=0,D=0;for(;L<S;){const _=E.groupIndices[D],F=E.groupIndices.length===D+1?1/0:E.groupIndices[D+1]-_-1;P.push({startIndex:_,endIndex:_,size:C}),P.push({startIndex:_+1,endIndex:_+1+F-1,size:O}),D++,L+=F+1}const V=Vr(E.sizeTree);return L!==S&&V.shift(),V.reduce((_,{k:F,v:$})=>{let H=_.ranges;return _.prevSize!==0&&(H=[..._.ranges,{startIndex:_.prevIndex,endIndex:F+S-1,size:_.prevSize}]),{ranges:H,prevIndex:F+S,prevSize:$}},{ranges:P,prevIndex:S,prevSize:0}).ranges}return Vr(E.sizeTree).reduce((C,{k:L,v:D})=>({ranges:[...C.ranges,{startIndex:C.prevIndex,endIndex:L+S-1,size:C.prevSize}],prevIndex:L+S,prevSize:D}),{ranges:[],prevIndex:0,prevSize:O}).ranges})),n);const T=Kt(q(s,we(m,f),ie(([S,{offsetTree:E},I])=>{const P=-S;return Yi(P,E,I)})));return ue(q(s,we(m,f),ie(([S,E,I])=>{if(E.groupIndices.length>0){if(He(E.sizeTree))return E;let O=Uo();const C=Dt(v);let L=0,D=0,V=0;for(;L<-S;){V=C[D];const _=C[D+1]-V-1;D++,L+=_+1}if(O=Vr(E.sizeTree).reduce((_,{k:F,v:$})=>Xt(_,Math.max(0,F+S),$),O),L!==-S){const _=Gi(E.sizeTree,V);O=Xt(O,0,_);const F=sn(E.sizeTree,-S+1)[1];O=Xt(O,1,F)}return{...E,sizeTree:O,...md(E.offsetTree,0,O,I)}}else{const O=Vr(E.sizeTree).reduce((C,{k:L,v:D})=>Xt(C,Math.max(0,L+S),D),Uo());return{...E,sizeTree:O,...md(E.offsetTree,0,O,I)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:f,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:y,itemSize:d}},Ke(hr,hd),{singleton:!0}),dF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function qb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!dF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const qi=Ne(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:h}])=>{const f=Ce(),p=Ce(),m=X(0);let v=null,y=null,w=null;function g(){v&&(v(),v=null),w&&(w(),w=null),y&&(clearTimeout(y),y=null),be(o,!1)}return ue(q(f,we(e,i,t,m,l,c,h),we(r,u,d),ie(([[T,S,E,I,P,O,C,L],D,V,k])=>{const _=qb(T),{align:F,behavior:$,offset:H}=_,U=I-1,A=Gb(_,S,U);let j=Yi(A,S.offsetTree,D)+O;F==="end"?(j+=V+sn(S.sizeTree,A)[1]-E+k,A===U&&(j+=C)):F==="center"?j+=(V+sn(S.sizeTree,A)[1]-E+k)/2:j-=P,H&&(j+=H);const Z=ne=>{g(),ne?(L("retrying to scroll to",{location:T},Zt.DEBUG),be(f,T)):(be(p,!0),L("list did not change, scroll successful",{},Zt.DEBUG))};if(g(),$==="smooth"){let ne=!1;w=je(n,Q=>{ne=ne||Q}),v=En(a,()=>{Z(ne)})}else v=En(q(n,fF(150)),Z);return y=setTimeout(()=>{g()},1200),be(o,!0),L("scrolling from index to",{index:A,top:j,behavior:$},Zt.DEBUG),{top:j,behavior:$}})),s),{scrollToIndex:f,scrollTargetReached:p,topListHeight:m}},Ke(In,Vt,hr),{singleton:!0});function fF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Ki="up",Zi="down",hF="none",pF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},mF=0,Xi=Ne(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(mF),h=Ft(q(Fb(q(ge(t),Ho(1),Cn(!0)),q(ge(t),Ho(1),Cn(!1),Db(100))),Ze()),!1),f=Ft(q(Fb(q(i,Cn(!0)),q(i,Cn(!1),Db(200))),Ze()),!1);ue(q(St(ge(t),ge(d)),ie(([w,g])=>w<=g),Ze()),a),ue(q(a,fr(50)),c);const p=Kt(q(St(e,ge(n),ge(r),ge(o),ge(u)),Pn((w,[{scrollTop:g,scrollHeight:T},S,E,I,P])=>{const O=g+S-T>-P,C={viewportHeight:S,scrollTop:g,scrollHeight:T};if(O){let D,V;return g>w.state.scrollTop?(D="SCROLLED_DOWN",V=w.state.scrollTop-g):(D="SIZE_DECREASED",V=w.state.scrollTop-g||w.scrollTopDelta),{atBottom:!0,state:C,atBottomBecause:D,scrollTopDelta:V}}let L;return C.scrollHeight>w.state.scrollHeight?L="SIZE_INCREASED":S<w.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<w.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:C}},pF),Ze((w,g)=>w&&w.atBottom===g.atBottom))),m=Ft(q(e,Pn((w,{scrollTop:g,scrollHeight:T,viewportHeight:S})=>{if(Lb(w.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+S)<1;return w.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:w.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),ie(w=>w.jump)),0);ue(q(p,ie(w=>w.atBottom)),s),ue(q(s,fr(50)),l);const v=X(Zi);ue(q(e,ie(({scrollTop:w})=>w),Ze(),Pn((w,g)=>Dt(f)?{direction:w.direction,prevScrollTop:g}:{direction:g<w.prevScrollTop?Ki:Zi,prevScrollTop:g},{direction:Zi,prevScrollTop:0}),ie(w=>w.direction)),v),ue(q(e,fr(50),Cn(hF)),v);const y=X(0);return ue(q(h,pe(w=>!w),Cn(0)),y),ue(q(t,fr(100),we(h),pe(([w,g])=>!!g),Pn(([w,g],[T])=>[g,T],[0,0]),ie(([w,g])=>g-w)),y),{isScrolling:h,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:y,lastJumpDueToItemResize:m}},Ke(Vt)),pr=Ne(([{log:e}])=>{const t=X(!1),n=Kt(q(t,pe(r=>r),Ze()));return je(t,r=>{r&&Dt(e)("props updated",{},Zt.DEBUG)}),{propsReady:t,didMount:n}},Ke(hr),{singleton:!0});function gd(e,t){e==0?t():requestAnimationFrame(()=>gd(e-1,t))}function yd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Qi=Ne(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(s,we(l),pe(([u,d])=>!!d),Cn(!1)),a),ue(q(s,we(l),pe(([u,d])=>!!d),Cn(!1)),c),je(q(St(t,s),we(a,e,n,c),pe(([[,u],d,{sizeTree:h},f,p])=>u&&(!He(h)||id(f))&&!d&&!p),we(l)),([,u])=>{En(i,()=>{be(c,!0)}),gd(4,()=>{En(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ke(In,Vt,qi,pr),{singleton:!0});function Kb(e){return e?e==="smooth"?"smooth":"auto":!1}const gF=(e,t)=>typeof e=="function"?Kb(e(t)):t&&Kb(e),yF=Ne(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let h=null;function f(m){be(o,{index:"LAST",align:"end",behavior:m})}je(q(St(q(ge(e),Ho(1)),a),we(ge(u),n,i,c),ie(([[m,v],y,w,g,T])=>{let S=v&&g,E="auto";return S&&(E=gF(y,w||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{h&&(h(),h=null),h=En(t,()=>{Dt(l)("following output to ",{totalCount:m},Zt.DEBUG),f(v),h=null})});function p(m){const v=En(r,y=>{m&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Dt(l)("scrolling to bottom due to increased size",{},Zt.DEBUG),f("auto"))});setTimeout(v,100)}return je(q(St(ge(u),e,s),pe(([m,,v])=>m&&v),Pn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(i)&&p(m!==!1)}),je(d,()=>{p(Dt(u)!==!1)}),je(St(ge(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{followOutput:u,autoscrollToBottom:d}},Ke(In,Xi,qi,Qi,pr,hr,Vt));function vF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Zb=Ne(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ce(),s=Ce(),a=Kt(q(i,ie(vF)));return ue(q(a,ie(l=>l.totalCount)),e),ue(q(a,ie(l=>l.groupIndices)),t),ue(q(St(r,n,o),pe(([l,c])=>Da(c)),ie(([l,c,u])=>sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ze(),ie(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Ke(In,Vt));function Ji(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Xb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Fa="top",Na="bottom",Qb="none";function Jb(e,t,n){return typeof e=="number"?n===Ki&&t===Fa||n===Zi&&t===Na?e:0:n===Ki?t===Fa?e.main:e.reverse:t===Na?e.main:e.reverse}function e0(e,t){return typeof e=="number"?e:e[t]||0}const vd=Ne(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ce(),s=X(0),a=X(0),l=X(0),c=Ft(q(St(ge(e),ge(t),ge(r),ge(i,Ji),ge(l),ge(s),ge(o),ge(n),ge(a)),ie(([u,d,h,[f,p],m,v,y,w,g])=>{const T=u-w,S=v+y,E=Math.max(h-T,0);let I=Qb;const P=e0(g,Fa),O=e0(g,Na);return f-=w,f+=h+y,p+=h+y,p-=w,f>u+S-P&&(I=Ki),p<u-E+d+O&&(I=Zi),I!==Qb?[Math.max(T-h-Jb(m,Fa,I)-P,0),T-E-y+d+Jb(m,Na,I)+O]:null}),pe(u=>u!=null),Ze(Ji)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Ke(Vt),{singleton:!0});function bF(e,t,n){if(Da(t)){const r=Yb(e,t);return[{index:sn(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 bd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function t0(e,t,n){if(e.length===0)return[];if(!Da(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=_a(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function La(e,t,n,r,o,i){const{lastSize:s,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,h=a+d*s+(d-1)*r,f=c,p=h-u;return{items:t0(e,o,i),topItems:t0(t,o,i),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:f,bottom:u,totalCount:n,firstItemIndex:i}}function n0(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=yd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return La(c,[],a,o,n,r)}const $r=Ne(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},h,{didMount:f},{recalcInProgress:p}])=>{const m=X([]),v=X(0),y=Ce();ue(i.topItemsIndexes,m);const w=Ft(q(St(f,p,ge(s,Ji),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,I,,P,,,,,,,O])=>{const C=O&&O.length!==P;return E&&!I&&!C}),ie(([,,[E,I],P,O,C,L,D,V,k,_])=>{const F=O,{sizeTree:$,offsetTree:H}=F,U=Dt(v);if(P===0)return{...bd,totalCount:P};if(E===0&&I===0)return U===0?{...bd,totalCount:P}:n0(U,C,O,V,k,_||[]);if(He($))return U>0?null:La(bF(yd(C,P),F,_),[],P,k,F,V);const A=[];if(D.length>0){const G=D[0],N=D[D.length-1];let B=0;for(const z of _a($,G,N)){const R=z.value,Y=Math.max(z.start,G),se=Math.min(z.end,N);for(let W=Y;W<=se;W++)A.push({index:W,size:R,offset:B,data:_&&_[W]}),B+=R}}if(!L)return La([],A,P,k,F,V);const j=D.length>0?D[D.length-1]+1:0,Z=sF(H,E,I,j);if(Z.length===0)return null;const ne=P-1,Q=Ia([],G=>{for(const N of Z){const B=N.value;let z=B.offset,R=N.start;const Y=B.size;if(B.offset<E){R+=Math.floor((E-B.offset+k)/(Y+k));const W=R-N.start;z+=W*Y+W*k}R<j&&(z+=(j-R)*Y,R=j);const se=Math.min(N.end,ne);for(let W=R;W<=se&&!(z>=I);W++)G.push({index:W,size:Y,offset:z,data:_&&_[W]}),z+=Y+k}});return La(Q,A,P,k,F,V)}),pe(E=>E!==null),Ze()),bd);ue(q(n,pe(id),ie(E=>E==null?void 0:E.length)),t),ue(q(w,ie(E=>E.topListHeight)),d),ue(d,l),ue(q(w,ie(E=>[E.top,E.bottom])),a),ue(q(w,ie(E=>E.items)),y);const g=Kt(q(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},I])=>E[E.length-1].originalIndex===I-1),ie(([,E,I])=>[E-1,I]),Ze(Ji),ie(([E])=>E))),T=Kt(q(w,fr(200),pe(({items:E,topItems:I})=>E.length>0&&E[0].originalIndex===I.length),ie(({items:E})=>E[0].index),Ze())),S=Kt(q(w,pe(({items:E})=>E.length>0),ie(({items:E})=>{let I=0,P=E.length-1;for(;E[I].type==="group"&&I<P;)I++;for(;E[P].type==="group"&&P>I;)P--;return{startIndex:E[I].index,endIndex:E[P].index}}),Ze(Xb)));return{listState:w,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:S,itemsRendered:y,initialItemCount:v,...h}},Ke(In,Zb,vd,Qi,qi,Xi,pr,hd),{singleton:!0}),wF=Ne(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ue(q(a,we(i),pe(([,l])=>l!==0),we(o,e,t,r,n),ie(([[,l],c,u,d,h,f=[]])=>n0(l,c,u,d,h,f))),s),{}),Ke(In,Qi,$r,pr),{singleton:!0}),r0=Ne(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,i])=>!!i),ie(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),Ze()),t),je(q(St(t,e,n),we(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ke(Xi),{singleton:!0}),xF=Ne(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,pe(n=>n>0),ie(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ke($r)),o0=Ne(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ce(),s=Ft(q(St(e,r,t,n,o),ie(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(ge(s),i),{totalListHeight:s,totalListHeightChanged:i}},Ke(Vt,$r),{singleton:!0});function i0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const SF=i0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),TF=Ne(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:h},{log:f},{recalcInProgress:p}])=>{const m=Kt(q(l,we(a),Pn(([,y,w,g],[{items:T,totalCount:S,bottom:E,offsetBottom:I},P])=>{const O=E+I;let C=0;return w===S&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(C=O-g,C!==0&&(C+=P))),[C,T,S,O]},[0,[],0,0]),pe(([y])=>y!==0),we(t,s,r,i,f,p),pe(([,y,w,g,,,T])=>!T&&!g&&y!==0&&w===Ki),ie(([[y],,,,,w])=>(w("Upward scrolling compensation",{amount:y},Zt.DEBUG),y))));function v(y){y>0?(be(e,{top:-y,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-y,behavior:"auto"}))}return je(q(m,we(n,o)),([y,w,g])=>{g&&SF()?be(n,w-y):v(-y)}),je(q(St(Ft(o,!1),n,p),pe(([y,w,g])=>!y&&!g&&w!==0),ie(([y,w])=>w),fr(1)),v),ue(q(u,ie(y=>({top:-y}))),e),je(q(c,we(d,h),ie(([y,{lastSize:w,groupIndices:g,sizeTree:T},S])=>{function E(I){return I*(w+S)}if(g.length===0)return E(y);{let I=0;const P=Gi(T,0);let O=0,C=0;for(;O<y;){O++,I+=P;let L=g.length===C+1?1/0:g[C+1]-g[C]-1;O+L>y&&(I-=P,L=y-O+1),O+=L,I+=E(L),C++}return I}})),y=>{be(n,y),requestAnimationFrame(()=>{be(e,{top:y}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ke(Vt,Xi,$r,In,hr,hd)),EF=Ne(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return je(q(e,we(r),pe(([,o])=>o!==0),ie(([,o])=>({top:o}))),o=>{En(q(n,Ho(1),pe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ke(pr,Vt,$r),{singleton:!0}),CF=Ne(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Ft(q(St(n,e,t),pe(([o])=>o),ie(([,o,i])=>Math.max(0,o-i)),fr(0),Ze()),0);return{alignToBottom:n,paddingTopAddition:r}},Ke(Vt,o0),{singleton:!0}),wd=Ne(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),i=X(!1),s=X(void 0);return ue(q(St(n,r),ie(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,we(r),ie(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ke(Vt)),PF=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>e<n?{...s,behavior:o,align:i??"start"}:t>r?{...s,behavior:o,align:i??"end"}:null,kF=Ne(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,i,s,a,r),we(n),ie(([[d,h,f,p,m,v,y,w],g])=>{const{done:T,behavior:S,align:E,calculateViewLocation:I=PF,...P}=d,O=Gb(d,h,p-1),C=Yi(O,h.offsetTree,g)+m+v,L=C+sn(h.sizeTree,O)[1],D=w+v,V=w+f-y,k=I({itemTop:C,itemBottom:L,viewportTop:D,viewportBottom:V,locationParams:{behavior:S,align:E,...P}});return k?T&&En(q(l,pe(_=>_===!1),Ho(Dt(l)?1:2)),T):T&&T(),k}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ke(In,Vt,qi,$r,hr),{singleton:!0}),IF=Ne(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),h=X(null);return ue(a,d),ue(l,h),je(q(c,we(e,n,s,d,h,r)),([f,p,m,v,y,w,g])=>{const T=cF(p.sizeTree);v&&y!==null&&w!==null&&(m=y.scrollTop-w.offsetTop),m-=g,f({ranges:T,scrollTop:m})}),ue(q(u,pe(id),ie(OF)),o),ue(q(i,we(u),pe(([,f])=>f!==void 0),Ze(),ie(([,f])=>f.ranges)),t),{getState:c,restoreStateFrom:u}},Ke(In,Vt,Qi,pr,wd));function OF(e){return{offset:e.scrollTop,index:0,align:"start"}}const AF=Ne(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),Ke(vd,wF,pr,r0,o0,EF,CF,wd,kF,hr)),s0=Ne(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:p},m,v,y,{listState:w,topItemsIndexes:g,...T},{scrollToIndex:S},E,{topItemCount:I},{groupCounts:P},O])=>(ue(T.rangeChanged,O.scrollSeekRangeChanged),ue(q(O.windowViewportRect,ie(C=>C.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:I,groupCounts:P,fixedItemHeight:n,defaultItemHeight:r,gap:u,...y,statefulTotalCount:c,listState:w,scrollToIndex:S,trackItemSizes:o,itemSize:i,groupIndices:l,...T,...O,...m,sizes:d,...v}),Ke(In,Qi,Vt,IF,yF,$r,qi,TF,xF,Zb,AF)),xd="-webkit-sticky",a0="sticky",l0=i0(()=>{if(typeof document>"u")return a0;const e=document.createElement("div");return e.style.position=xd,e.style.position===xd?xd:a0});function Sd(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const h=t.getBoundingClientRect(),f=l.top-h.top;u=h.height-Math.max(0,f),d=f+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:i}=ld(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),o}const Va=b.createContext(void 0),c0=b.createContext(void 0);function Td(e){return e}const _F=Ne(([e,t])=>({...e,...t}),Ke(s0,Ne(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(Td),i=X("div"),s=X(Lr),a=(l,c=null)=>Ft(q(r,ie(u=>u[l]),Ze()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,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")}}))),MF=({height:e})=>b.createElement("div",{style:{height:e}}),DF={position:l0(),zIndex:1,overflowAnchor:"none"},FF={overflowAnchor:"none"},u0=b.memo(function({showTopList:t=!1}){const n=Te("listState"),r=en("sizeRanges"),o=Te("useWindowScroll"),i=Te("customScrollParent"),s=en("windowScrollContainerState"),a=en("scrollContainerState"),l=i||o?s:a,c=Te("itemContent"),u=Te("context"),d=Te("groupContent"),h=Te("trackItemSizes"),f=Te("itemSize"),p=Te("log"),m=en("gap"),{callbackRef:v}=Nb(r,f,h,t?Lr:l,p,m,i),[y,w]=b.useState(0);Pd("deviation",k=>{y!==k&&w(k)});const g=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||MF,S=Te("ListComponent"),E=Te("ItemComponent"),I=Te("GroupComponent"),P=Te("computeItemKey"),O=Te("isSeeking"),C=Te("groupIndices").length>0,L=Te("alignToBottom"),D=Te("initialItemFinalLocationReached"),V=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:y!==0?y:L?"auto":0,...D?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?b.createElement(g,ot(g,u)):b.createElement(S,{...ot(S,u),ref:v,style:V,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(k=>{const _=k.originalIndex,F=P(_+n.firstItemIndex,k.data,u);return O?b.createElement(T,{...ot(T,u),key:F,index:k.index,height:k.size,type:k.type||"item",...k.type==="group"?{}:{groupIndex:k.groupIndex}}):k.type==="group"?b.createElement(I,{...ot(I,u),key:F,"data-index":_,"data-known-size":k.size,"data-item-index":k.index,style:DF},d(k.index,u)):b.createElement(E,{...ot(E,u),...d0(E,k.data),key:F,"data-index":_,"data-known-size":k.size,"data-item-index":k.index,"data-item-group-index":k.groupIndex,style:FF},C?c(k.index,k.groupIndex,k.data,u):c(k.index,k.data,u))}))}),NF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Go=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),LF={width:"100%",position:l0(),top:0,zIndex:1};function ot(e,t){if(typeof e!="string")return{context:t}}function d0(e,t){return{item:typeof e=="string"?void 0:t}}const VF=b.memo(function(){const t=Te("HeaderComponent"),n=en("headerHeight"),r=Te("headerFooterTag"),o=kn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,i))):null}),$F=b.memo(function(){const t=Te("FooterComponent"),n=en("footerHeight"),r=Te("headerFooterTag"),o=kn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,i))):null});function Ed({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),h=n("context"),{scrollerRef:f,scrollByCallback:p,scrollToCallback:m}=Vb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:f,style:{...NF,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ot(c,h)},s)})}function Cd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),h=n("deviation"),f=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:y}=Vb(l,u,c,Lr,f);return qD(()=>(m.current=f||window,()=>{m.current=null}),[m,f]),t("windowScrollTo",y),t("scrollBy",v),b.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+h}:{}},"data-virtuoso-scroller":!0,...a,...ot(c,p)},s)})}const RF=({children:e})=>{const t=b.useContext(Va),n=en("viewportHeight"),r=en("fixedItemHeight"),o=Te("alignToBottom"),i=kn(b.useMemo(()=>Hi(n,s=>on(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Go(o),ref:i,"data-viewport-type":"element"},e)},jF=({children:e})=>{const t=b.useContext(Va),n=en("windowViewportRect"),r=en("fixedItemHeight"),o=Te("customScrollParent"),i=Sd(n,o),s=Te("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Go(s),"data-viewport-type":"window"},e)},BF=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={...LF,marginTop:`${n}px`},o=Te("context");return b.createElement(t,{style:r,...ot(t,o)},e)},zF=b.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),i=o||n?UF:HF,s=o||n?jF:RF;return b.createElement(i,{...t},r&&b.createElement(BF,null,b.createElement(u0,{showTopList:!0})),b.createElement(s,null,b.createElement(VF,null),b.createElement(u0,null),b.createElement($F,null)))}),{Component:WF,usePublisher:en,useEmitterValue:Te,useEmitter:Pd}=ad(_F,{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"}},zF),HF=Ed({usePublisher:en,useEmitterValue:Te,useEmitter:Pd}),UF=Cd({usePublisher:en,useEmitterValue:Te,useEmitter:Pd}),GF=WF,f0={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},YF={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:h0,ceil:p0,floor:$a,min:kd,max:es}=Math;function qF(e){return{...YF,items:e}}function m0(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const i=n===null?null:n[o+e];return{index:o+e,data:i}})}function KF(e,t){return e&&e.column===t.column&&e.row===t.row}function Ra(e,t){return e&&e.width===t.width&&e.height===t.height}const ZF=Ne(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,h,{propsReady:f,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:y,windowScrollContainerState:w,windowScrollTo:g},T])=>{const S=X(0),E=X(0),I=X(f0),P=X({height:0,width:0}),O=X({height:0,width:0}),C=Ce(),L=Ce(),D=X(0),V=X(null),k=X({row:0,column:0}),_=Ce(),F=Ce(),$=X(!1),H=X(0),U=X(!0),A=X(!1);je(q(p,we(H),pe(([N,B])=>!!B)),()=>{be(U,!1),be(E,0)}),je(q(St(p,U,O,P,H,A),pe(([N,B,z,R,,Y])=>N&&!B&&z.height!==0&&R.height!==0&&!Y)),([,,,,N])=>{be(A,!0),gd(1,()=>{be(C,N)}),En(q(r),()=>{be(n,[0,0]),be(U,!0)})}),ue(q(F,pe(N=>N!=null&&N.scrollTop>0),Cn(0)),E),je(q(p,we(F),pe(([,N])=>N!=null)),([,N])=>{N&&(be(P,N.viewport),be(O,N==null?void 0:N.item),be(k,N.gap),N.scrollTop>0&&(be($,!0),En(q(r,Ho(1)),B=>{be($,!1)}),be(s,{top:N.scrollTop})))}),ue(q(P,ie(({height:N})=>N)),o),ue(q(St(ge(P,Ra),ge(O,Ra),ge(k,(N,B)=>N&&N.column===B.column&&N.row===B.row),ge(r)),ie(([N,B,z,R])=>({viewport:N,item:B,gap:z,scrollTop:R}))),_),ue(q(St(ge(S),t,ge(k,KF),ge(O,Ra),ge(P,Ra),ge(V),ge(E),ge($),ge(U),ge(H)),pe(([,,,,,,,N])=>!N),ie(([N,[B,z],R,Y,se,W,Pe,,st,Ue])=>{const{row:at,column:de}=R,{height:Ee,width:ce}=Y,{width:Oe}=se;if(Pe===0&&(N===0||Oe===0))return f0;if(ce===0){const Rt=yd(Ue,N),Hr=Rt===0?Math.max(Pe-1,0):Rt;return qF(m0(Rt,Hr,W))}const pt=y0(Oe,ce,de);let Ae,mt;st?B===0&&z===0&&Pe>0?(Ae=0,mt=Pe-1):(Ae=pt*$a((B+at)/(Ee+at)),mt=pt*p0((z+at)/(Ee+at))-1,mt=kd(N-1,es(mt,pt-1)),Ae=kd(mt,es(0,Ae))):(Ae=0,mt=-1);const J=m0(Ae,mt,W),{top:ae,bottom:_e}=g0(se,R,Y,J),Xe=p0(N/pt),Nt=Xe*Ee+(Xe-1)*at-_e;return{items:J,offsetTop:ae,offsetBottom:Nt,top:ae,bottom:_e,itemHeight:Ee,itemWidth:ce}})),I),ue(q(V,pe(N=>N!==null),ie(N=>N.length)),S),ue(q(St(P,O,I,k),pe(([N,B,{items:z}])=>z.length>0&&B.height!==0&&N.height!==0),ie(([N,B,{items:z},R])=>{const{top:Y,bottom:se}=g0(N,R,B,z);return[Y,se]}),Ze(Ji)),n);const j=X(!1);ue(q(r,we(j),ie(([N,B])=>B||N!==0)),j);const Z=Kt(q(ge(I),pe(({items:N})=>N.length>0),we(S,j),pe(([{items:N},B,z])=>z&&N[N.length-1].index===B-1),ie(([,N])=>N-1),Ze())),ne=Kt(q(ge(I),pe(({items:N})=>N.length>0&&N[0].index===0),Cn(0),Ze())),Q=Kt(q(ge(I),we($),pe(([{items:N},B])=>N.length>0&&!B),ie(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),Ze(Xb),fr(0)));ue(Q,h.scrollSeekRangeChanged),ue(q(C,we(P,O,S,k),ie(([N,B,z,R,Y])=>{const se=qb(N),{align:W,behavior:Pe,offset:st}=se;let Ue=se.index;Ue==="LAST"&&(Ue=R-1),Ue=es(0,Ue,kd(R-1,Ue));let at=Id(B,Y,z,Ue);return W==="end"?at=h0(at-B.height+z.height):W==="center"&&(at=h0(at-B.height/2+z.height/2)),st&&(at+=st),{top:at,behavior:Pe}})),s);const G=Ft(q(I,ie(N=>N.offsetBottom+N.bottom)),0);return ue(q(m,ie(N=>({width:N.visibleWidth,height:N.visibleHeight}))),P),{data:V,totalCount:S,viewportDimensions:P,itemDimensions:O,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:C,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:v,customScrollParent:y,windowScrollContainerState:w,deviation:D,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:k,restoreStateFrom:F,...h,initialTopMostItemIndex:H,gridState:I,totalListHeight:G,...d,startReached:ne,endReached:Z,rangeChanged:Q,stateChanged:_,propsReady:f,stateRestoreInProgress:$,...T}},Ke(vd,Vt,Xi,r0,pr,wd,hr));function g0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=Id(e,t,n,r[0].index),s=Id(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function Id(e,t,n,r){const o=y0(e.width,n.width,t.column),i=$a(r/o),s=i*n.height+es(0,i-1)*t.row;return s>0?s+t.row:s}function y0(e,t,n){return es(1,$a((e+n)/($a(t)+n)))}const XF=Ne(([e,t])=>({...e,...t}),Ke(ZF,Ne(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X(Td),s=X("div"),a=X(Lr),l=(c,u=null)=>Ft(q(t,ie(d=>d[c]),Ze()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),QF=b.memo(function(){const t=et("gridState"),n=et("listClassName"),r=et("itemClassName"),o=et("itemContent"),i=et("computeItemKey"),s=et("isSeeking"),a=an("scrollHeight"),l=et("ItemComponent"),c=et("ListComponent"),u=et("ScrollSeekPlaceholder"),d=et("context"),h=an("itemDimensions"),f=an("gap"),p=et("log"),m=et("stateRestoreInProgress"),v=kn(b.useMemo(()=>y=>{const w=y.parentElement.parentElement.scrollHeight;a(w);const g=y.firstChild;if(g){const{width:T,height:S}=g.getBoundingClientRect();h({width:T,height:S})}f({row:b0("row-gap",getComputedStyle(y).rowGap,p),column:b0("column-gap",getComputedStyle(y).columnGap,p)})},[a,h,f,p]));return m?null:b.createElement(c,{ref:v,className:n,...ot(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(y=>{const w=i(y.index,y.data,d);return s?b.createElement(u,{key:w,...ot(u,d),index:y.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...ot(l,d),className:r,"data-index":y.index,key:w},o(y.index,y.data,d))}))}),JF=b.memo(function(){const t=et("HeaderComponent"),n=an("headerHeight"),r=et("headerFooterTag"),o=kn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,i))):null}),eN=b.memo(function(){const t=et("FooterComponent"),n=an("footerHeight"),r=et("headerFooterTag"),o=kn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,i))):null}),tN=({children:e})=>{const t=b.useContext(c0),n=an("itemDimensions"),r=an("viewportDimensions"),o=kn(b.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:Go(!1),ref:o},e)},nN=({children:e})=>{const t=b.useContext(c0),n=an("windowViewportRect"),r=an("itemDimensions"),o=et("customScrollParent"),i=Sd(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:i,style:Go(!1)},e)},rN=b.memo(function({...t}){const n=et("useWindowScroll"),r=et("customScrollParent"),o=r||n?iN:oN,i=r||n?nN:tN;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(JF,null),b.createElement(QF,null),b.createElement(eN,null)))}),{Component:zV,usePublisher:an,useEmitterValue:et,useEmitter:v0}=ad(XF,{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"}},rN),oN=Ed({usePublisher:an,useEmitterValue:et,useEmitter:v0}),iN=Cd({usePublisher:an,useEmitterValue:et,useEmitter:v0});function b0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zt.WARN),t==="normal"?0:parseInt(t??"0",10)}const sN=Ne(([e,t])=>({...e,...t}),Ke(s0,Ne(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X(Td),s=X(Lr),a=(l,c=null)=>Ft(q(o,ie(u=>u[l]),Ze()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,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")}}))),aN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),lN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),cN={overflowAnchor:"none"},uN=b.memo(function(){const t=Be("listState"),n=ln("sizeRanges"),r=Be("useWindowScroll"),o=Be("customScrollParent"),i=ln("windowScrollContainerState"),s=ln("scrollContainerState"),a=o||r?i:s,l=Be("itemContent"),c=Be("trackItemSizes"),u=Be("itemSize"),d=Be("log"),{callbackRef:h,ref:f}=Nb(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);Od("deviation",F=>{p!==F&&(f.current.style.marginTop=`${F}px`,m(F))});const v=Be("EmptyPlaceholder"),y=Be("ScrollSeekPlaceholder")||aN,w=Be("FillerRow")||lN,g=Be("TableBodyComponent"),T=Be("TableRowComponent"),S=Be("computeItemKey"),E=Be("isSeeking"),I=Be("paddingTopAddition"),P=Be("firstItemIndex"),O=Be("statefulTotalCount"),C=Be("context");if(O===0&&v)return b.createElement(v,ot(v,C));const L=t.offsetTop+I+p,D=t.offsetBottom,V=L>0?b.createElement(w,{height:L,key:"padding-top",context:C}):null,k=D>0?b.createElement(w,{height:D,key:"padding-bottom",context:C}):null,_=t.items.map(F=>{const $=F.originalIndex,H=S($+P,F.data,C);return E?b.createElement(y,{...ot(y,C),key:H,index:F.index,height:F.size,type:F.type||"item"}):b.createElement(T,{...ot(T,C),...d0(T,F.data),key:H,"data-index":$,"data-known-size":F.size,"data-item-index":F.index,style:cN},l(F.index,F.data,C))});return b.createElement(g,{ref:h,"data-testid":"virtuoso-item-list",...ot(g,C)},[V,..._,k])}),dN=({children:e})=>{const t=b.useContext(Va),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=kn(b.useMemo(()=>Hi(n,i=>on(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Go(!1),ref:o,"data-viewport-type":"element"},e)},fN=({children:e})=>{const t=b.useContext(Va),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=Be("customScrollParent"),i=Sd(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Go(!1),"data-viewport-type":"window"},e)},hN=b.memo(function(t){const n=Be("useWindowScroll"),r=Be("customScrollParent"),o=ln("fixedHeaderHeight"),i=ln("fixedFooterHeight"),s=Be("fixedHeaderContent"),a=Be("fixedFooterContent"),l=Be("context"),c=kn(b.useMemo(()=>Hi(o,w=>on(w,"height")),[o])),u=kn(b.useMemo(()=>Hi(i,w=>on(w,"height")),[i])),d=r||n?gN:mN,h=r||n?fN:dN,f=Be("TableComponent"),p=Be("TableHeadComponent"),m=Be("TableFooterComponent"),v=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ot(p,l)},s()):null,y=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ot(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(h,null,b.createElement(f,{style:{borderSpacing:0,overflowAnchor:"none"},...ot(f,l)},[v,b.createElement(uN,{key:"TableBody"}),y])))}),{Component:pN,usePublisher:ln,useEmitterValue:Be,useEmitter:Od}=ad(sN,{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"}},hN),mN=Ed({usePublisher:ln,useEmitterValue:Be,useEmitter:Od}),gN=Cd({usePublisher:ln,useEmitterValue:Be,useEmitter:Od}),yN=pN,vN=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},bN={Item:b.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},wN=e=>{const t=b.useRef(null),n=vN(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(Bi,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(GF,{height:n,useWindowScroll:!0,data:e.source,components:bN,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(Wv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(to,{children:x.jsx(jc,{})})}),x.jsx("div",{})]})};var xN=Object.defineProperty,w0=Object.getOwnPropertySymbols,SN=Object.prototype.hasOwnProperty,TN=Object.prototype.propertyIsEnumerable,x0=(e,t,n)=>t in e?xN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EN=(e,t)=>{for(var n in t||(t={}))SN.call(t,n)&&x0(e,n,t[n]);if(w0)for(var n of w0(t))TN.call(t,n)&&x0(e,n,t[n]);return e},Ad=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},CN=(e,t,n,r)=>Ba(Ad,e,t,n,r),Yo=e=>typeof e=="object",mr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Yo(e)&&!Yo(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=>mr(e[r],t[r]))},PN=(e,t)=>(Yo(e)||Array.isArray(e))&&t?e[t]:e,kN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ja=e=>/[0-9.]+/.test(e),S0=e=>["string","number"].includes(typeof e),T0=e=>e==null||(e==null?void 0:e.length)===0||e==="",E0={eq:mr,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:T0,notEmpty:e=>!T0(e),in:(e,t)=>Ad(t,n=>mr(e,n)),notIn:(e,t)=>C0(t,n=>!mr(e,n))},IN=e=>{if(e in E0)return E0[e];throw new Error("Linq - Symbol not found")},qo=(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},Ba=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=IN(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},ON=(e,t,n,r)=>Ba(qo,e,t,n,r),C0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},AN=(e,t,n,r)=>Ba(C0,e,t,n,r),P0=e=>{if(e===null)return null;const t=EN({},e);return Object.keys(t).forEach(n=>t[n]=Yo(e[n])?P0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},k0=(e,t)=>{if(Yo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1},_N=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},MN=e=>qo(e,(t,n,r)=>Yo(t)?n===r.findIndex(o=>mr(o,t)):n===r.indexOf(t)),DN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},I0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},FN=(e,t)=>I0(e,n=>n[t]),O0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},NN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},LN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return ja(e)&&ja(t)?r.map(s=>Number.parseInt(s)):r},_d=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ja(e)&&ja(t)){const o=[],[i,s]=NN(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return LN(e,t,r)},VN=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?_d(r,o,1):_d(r,i,Number.parseInt(o,10))}return S0(e)&&S0(t)?_d(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Md=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},A0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},$N=(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)},RN=(e,t,n,r)=>Ba($N,e,t,n,r),_0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(kN(t))},M0=(e=>(e.Asc="asc",e.Desc="desc",e))(M0||{}),jN=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),BN=(e,t)=>e.sort(jN(t)),zN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:qo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},WN=class lf{constructor(t=[]){this.array=t}static Range(...t){return VN(...t)}static New(t){return new lf(t)}Where(t,n,r){return this.array=ON(this.array,t,n,r),this}Some(t,n,r){return CN(this.array,t,n,r)}All(t,n,r){return AN(this.array,t,n,r)}Reverse(){return this.array=A0(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=RN(this.array,t,n,r),this}Distinct(){return this.array=MN(this.array),this}First(t){return t===void 0?this.array[0]:DN(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?Md((n,r)=>n+r,0,this.array):Md((n,r)=>n+PN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return FN(this.array,t)}GroupWith(t){return I0(this.array,t)}Except(t){return qo(this.array,n=>!k0(t,n))}Intersect(t){return qo(this.array,n=>k0(t,n))}OrderBy(t,n){let r;return r=t?_0(this.array,t):this.array.toSorted(),this.array=n==="desc"?A0(r):r,this}Includes(t){return Ad(this.array,n=>mr(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 Md(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(O0(this.array,n=>[t,n]))}Zip(t,n){return O0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:qo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new lf(P0(this.array))}ToObject(t){return _N(this.array,t)}Sort(t){return Array.isArray(t)?BN(this.array,t):_0(this.array,t)}Unique(t){return zN(this.array,t)}},D0=WN,Dd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,y)=>{try{Object.keys(v).forEach(y)}catch(w){window.console.log(w)}},n=v=>v==null,r=v=>{const y=typeof v;return y==="string"||y==="number"||y==="boolean"||n(v)},o=(v,y)=>{const w=y.getItem(v);try{return JSON.parse(w)}catch{return w??null}},i=v=>Object.keys(v).reduce((y,w)=>({...y,[w]:o(w,v)}),{}),s=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,y)=>(v[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(y=>y(v))},d=[{name:"expires",parse:v=>`expires=${s(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${s(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const y=v.domain??"";return y===""?"":`domain=${v.multiDomain?".":""}${y}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],h={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(y=>y.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const y=h.json()[v];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,y,w={})=>{const g=r(y)?y:encodeURIComponent(JSON.stringify(y)),T=d.reduce((S,E)=>{const I=E.parse(w);return I===""?S:S.concat(I)},[`${encodeURIComponent(v)}=${g}`]).join(";");document.cookie=T,u()}},f=v=>{const y=new Set,w=g=>{v().removeItem(g);const T=i(v());y.forEach(S=>S(T))};return{delete:w,listener:g=>(y.add(g),()=>y.delete(g)),clearListeners:()=>y.clear(),json:(g=!1)=>g?i(v()):v(),has:g=>{const T=v().getItem(g);return!n(T)},deleteAll:()=>{t(v(),w),y.forEach(g=>g(v()))},get:g=>o(g,v()),set:(g,T)=>{v().setItem(g,JSON.stringify(T)),y.forEach(S=>S(v()))}}},p=f(()=>window.sessionStorage),m=f(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=f})(Dd);const Fd=e=>e.headerLabel??e.thead??e.id,Nd=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ko=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ko||{});const Ld=e=>e.type==="number"?e.valueAsNumber:e.value,HN=e=>{let t=[];return e({add:(o,i,s)=>t.push({...s,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},UN={},GN=(e,t=UN)=>{const n=Js()?null:Dd.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=tu({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const l=i.state(),c={...l,...a};return Js()||Dd.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},Vd=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??Ko.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:Qs(),operation:a,label:Fd(e),name:o,type:i,value:"",...r}},$d=()=>{const e=Wt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},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{operationOptions:b.useMemo(()=>({[Ko.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ko.Boolean]:[t.is,t.isNot],[Ko.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},YN=e=>{const t=Wt(),{operationOptions:n,operations:r}=$d(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,Vd(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(h=>h.map(f=>{if(u!==f.id)return f;const p=e.cols.find(m=>d===m.id);return Vd(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(h=>h.map(f=>f.id===u?{...f,operation:r[d]}:f))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(h=>h.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=Ld(c.target);e.set(h=>h.map(f=>f.id===u?{...f,value:d}:f))};return x.jsx(b.Fragment,{children:x.jsx(Ro,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(sk,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const u=n[c.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Nr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:i}),x.jsx(Nr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Bi,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),x.jsx("div",{className:"flex items-center justify-center mt-5",children:x.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:x.jsx(mo,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Bc,{size:14})," ",t.tableFilterNewFilter]})})]})})})},qN=({filter:e,onDelete:t,set:n})=>{const r=Wt(),{operationOptions:o,operations:i}=$d(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(h=>h.id===u?{...h,operation:i[c]}:h))},a=l=>{const c=l.target.dataset.id||"",u=Ld(l.target);n(d=>d.map(h=>h.id===c?{...h,value:u}:h))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Nr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),x.jsx(Bi,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(mo,{className:"text-danger",size:14})})]})},KN=({item:e,onPointerDown:t})=>{const n=po(0);return x.jsxs(Ws.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(ik,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},ZN=e=>{var l;const t=Wt(),n=Nd(e.cols),r=UP(),[o,i]=b.useState(((l=e.groups[0])==null?void 0:l.thead)||""),s=c=>{var v;const u=c.target,d=u.value,h=u.options.selectedIndex,f=((v=u.options.item(h))==null?void 0:v.label)||"";i(f);const p=new D0(e.rows).GroupBy(d),m=e.cols.find(y=>y.id===d);e.setGroups(f1(p).map((y,w)=>{const g=p[y];return{...m,groupId:Qs(),groupKey:d,index:w,rows:g,groupName:y}}))},a=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(Ro,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(ck,{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(Nr,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),x.jsx(to,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(mo,{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(fP,{children:x.jsx(Ws.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(KN,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},XN=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),QN=(e,t)=>e.toSorted(XN(t)),F0=(e,t,n)=>({id:Qs(),type:n,value:e.id,label:t}),JN=e=>{const t=Wt(),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,F0(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,value:u}:h))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(b.Fragment,{children:x.jsx(Ro,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(vg,{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(Nr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Nr,{onChange:s(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(mo,{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(Bc,{size:14})," ",t.tableSortAddButton]})})]})})})},eL=e=>{const t=Wt(),[n,r]=b.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");b.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=F0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Fd(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?x.jsx(QP,{size:14}):null,n==="desc"?x.jsx(XP,{size:14}):null,n==="undefined"?x.jsx(vg,{size:14}):null]})},tL=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(YN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(JN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(ZN,{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=Ld(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function nL(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,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const rL=e=>{const t=b.useId(),n=Wt(),r=e.asLink||"button",o=b.useMemo(()=>nL(e.current,e.pages),[e.current,e.pages]),i=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(b.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:s=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(s.target.value))},children:e.sizes.map(s=>x.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):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(s=>s===null?null:x.jsx(b.Fragment,{children:typeof s=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:s,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${s===e.current?"text-primary border-primary":"border-transparent"}`,children:s})})},`pagination-${s}`)),i?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},oL={opacity:1},iL={opacity:.75,backgroundColor:"var(--table-border)"},sL={opacity:0,transition:{duration:.4,type:"spring"}},aL=e=>{var d;const t=Wt(),n=e.filters.filter(h=>h.name===e.header.id),o=n.length>0?ak:lk,{operationOptions:i,operations:s}=$d(),a=h=>{const f=h.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==f))},l=e.sorters.find(h=>e.header.id===h.value),c=l!=null&&l.type?l.type===M0.Asc?"ascending":"descending":"none",u=Fd(e.header);return x.jsx(Ws.Item,{...e.header.thProps,as:"th",layout:!0,exit:sL,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:iL,"aria-sort":c,"aria-busy":e.loading,animate:oL,className:`hidden px-2 py-4 font-medium first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(Ro,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),e.inlineFilter?x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14}):null]}),title:x.jsxs("span",{className:"font-medium text-lg",children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(h=>x.jsx("li",{className:"my-1",children:x.jsx(qN,{onDelete:a,filter:h,set:e.setFilters})},`thead-filter-${h.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(h=>h.concat(Vd(e.header,i,s))),type:"button",className:"flex items-center gap-1 text-primary",children:[x.jsx(Bc,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter?x.jsx(eL,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})})})},lL=e=>x.jsx(Ws.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"border-none bg-table-background text-lg",children:x.jsx(Ii,{children:e.headers.map(t=>x.jsx(aL,{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}`))})}),N0=b.createContext({}),cL=()=>b.useContext(N0),uL=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Ii,{children:e.children})})),dL=b.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${e.className??""}`})),fL=b.forwardRef(({context:e,...t},n)=>{var i;const r=cL(),o={...t.style,sticky:fn.number(r.sticky)?`${r.sticky}px`:(i=t.style)==null?void 0:i.sticky};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),hL=b.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${n.className??""}`})),pL=b.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),mL={TableHead:fL,Table:dL,TableBody:uL,TableRow:hL,TableFoot:pL},gL=[0,0,0,0,0,0,0,0,0,0],yL=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((i,s)=>{var d;const a=`${s},${e}`,l=vy(t,i.id),c=i.Element,u=((d=i.cellProps)==null?void 0:d.className)||"";return b.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`hidden h-14 border-none px-2 first:table-cell md:table-cell ${u}`},o?x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):c?x.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:fn.nil(l)?"":l}))})})},vL=()=>x.jsx(b.Fragment,{}),L0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[h,f]=b.useState(!1),p=od(n),m=od(u.loadingMore),v=b.useMemo(()=>{if(u.loading)return gL;if(r)return u.rows;const y=new D0(u.rows);return e.length>0&&e.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:y.Where(w.name,w.operation.symbol,w.value)),s.length===0?y.Select():QN(y.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,w=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void f(!0)):f(!1)});return w.observe(y),()=>w.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[x.jsx(yN,{data:v,useWindowScroll:!0,components:mL,totalCount:v.length,itemContent:yL,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?vL:null,fixedHeaderContent:()=>x.jsx(lL,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:i,setSorters:c,sorters:s})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(rL,{...t}):null]})},bL=(e,t)=>typeof t=="function"?t(e):t,za=(e,t,n)=>e===t||n==null?void 0:n(t),wL=e=>{const t=b.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=b.useMemo(()=>Nd(e.cols),[e.cols]),[o,i]=tu({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const a=l=>c=>{const u=s.state();return{...u,[l]:bL(u[l],c)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(s,a)=>{var l;return(l=e.set)==null||l.call(e,s),za(a.filters,s.filters,e.setFilters),za(a.sorters,s.sorters,e.setSorters),za(a.groups,s.groups,e.setGroups),za(a.cols,s.cols,e.setCols),s}]});return x.jsx(N0.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full",children:[n?x.jsx(tL,{cols:o.cols,filters:o.filters,groups:o.groups,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,options:r,pagination:e.pagination??null,rows:e.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters}):null,o.groups.length===0?x.jsx(L0,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,groups:o.groups,index:0,optionCols:r,options:r,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((s,a)=>x.jsx(Ct.div,{className:"min-w-full",children:x.jsx(L0,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,pagination:null,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,group:s,groups:o.groups,index:a,optionCols:r,options:r,rows:s.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters})},`group-${s.groupId}`))})]})})};var xL=String.prototype.replace,SL=/%20/g,Rd={RFC1738:"RFC1738",RFC3986:"RFC3986"},jd={default:Rd.RFC3986,formatters:{RFC1738:function(e){return xL.call(e,SL,"+")},RFC3986:function(e){return String(e)}},RFC1738:Rd.RFC1738,RFC3986:Rd.RFC3986},TL=jd,Bd=Object.prototype.hasOwnProperty,Rr=Array.isArray,On=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),EL=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Rr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},V0=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},CL=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Rr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Bd.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 Rr(t)&&!Rr(n)&&(o=V0(t,r)),Rr(t)&&Rr(n)?(n.forEach(function(i,s){if(Bd.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Bd.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},PL=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},kL=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}},zd=1024,IL=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=zd){for(var c=s.length>=zd?s.slice(l,l+zd):s,u=[],d=0;d<c.length;++d){var h=c.charCodeAt(d);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===TL.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(d);continue}if(h<128){u[u.length]=On[h];continue}if(h<2048){u[u.length]=On[192|h>>6]+On[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=On[224|h>>12]+On[128|h>>6&63]+On[128|h&63];continue}d+=1,h=65536+((h&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=On[240|h>>18]+On[128|h>>12&63]+On[128|h>>6&63]+On[128|h&63]}a+=u.join("")}return a},OL=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return EL(n),t},AL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},_L=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},ML=function(t,n){return[].concat(t,n)},DL=function(t,n){if(Rr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},$0={arrayToObject:V0,assign:PL,combine:ML,compact:OL,decode:kL,encode:IL,isBuffer:_L,isRegExp:AL,maybeMap:DL,merge:CL},R0=Ux,Wa=$0,ts=jd,FL=Object.prototype.hasOwnProperty,j0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},An=Array.isArray,NL=Array.prototype.push,B0=function(e,t){NL.apply(e,An(t)?t:[t])},LL=Date.prototype.toISOString,z0=ts.default,bt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Wa.encode,encodeValuesOnly:!1,format:z0,formatter:ts.formatters[z0],indices:!1,serializeDate:function(t){return LL.call(t)},skipNulls:!1,strictNullHandling:!1},VL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Wd={},$L=function e(t,n,r,o,i,s,a,l,c,u,d,h,f,p,m,v,y,w){for(var g=t,T=w,S=0,E=!1;(T=T.get(Wd))!==void 0&&!E;){var I=T.get(t);if(S+=1,typeof I<"u"){if(I===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Wd)>"u"&&(S=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=f(g):r==="comma"&&An(g)&&(g=Wa.maybeMap(g,function(A){return A instanceof Date?f(A):A})),g===null){if(s)return c&&!v?c(n,bt.encoder,y,"key",p):n;g=""}if(VL(g)||Wa.isBuffer(g)){if(c){var P=v?n:c(n,bt.encoder,y,"key",p);return[m(P)+"="+m(c(g,bt.encoder,y,"value",p))]}return[m(n)+"="+m(String(g))]}var O=[];if(typeof g>"u")return O;var C;if(r==="comma"&&An(g))v&&c&&(g=Wa.maybeMap(g,c)),C=[{value:g.length>0?g.join(",")||null:void 0}];else if(An(u))C=u;else{var L=Object.keys(g);C=d?L.sort(d):L}var D=l?n.replace(/\./g,"%2E"):n,V=o&&An(g)&&g.length===1?D+"[]":D;if(i&&An(g)&&g.length===0)return V+"[]";for(var k=0;k<C.length;++k){var _=C[k],F=typeof _=="object"&&typeof _.value<"u"?_.value:g[_];if(!(a&&F===null)){var $=h&&l?_.replace(/\./g,"%2E"):_,H=An(g)?typeof r=="function"?r(V,$):V:V+(h?"."+$:"["+$+"]");w.set(t,S);var U=R0();U.set(Wd,w),B0(O,e(F,H,r,o,i,s,a,l,r==="comma"&&v&&An(g)?null:c,u,d,h,f,p,m,v,y,U))}}return O},RL=function(t){if(!t)return bt;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||bt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ts.default;if(typeof t.format<"u"){if(!FL.call(ts.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ts.formatters[r],i=bt.filter;(typeof t.filter=="function"||An(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in j0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=bt.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:bt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:bt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:bt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:bt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?bt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:bt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:bt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:bt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:bt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:bt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:bt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:bt.strictNullHandling}},jL=function(e,t){var n=e,r=RL(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):An(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=j0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=R0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||B0(s,$L(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 h=s.join(r.delimiter),f=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),h.length>0?f+h:""},Zo=$0,Hd=Object.prototype.hasOwnProperty,BL=Array.isArray,ht={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Zo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},zL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},W0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},WL="utf8=%26%2310003%3B",HL="utf8=%E2%9C%93",UL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===HL?c="utf-8":s[l]===WL&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],d=u.indexOf("]="),h=d===-1?u.indexOf("="):d+1,f,p;h===-1?(f=n.decoder(u,ht.decoder,c,"key"),p=n.strictNullHandling?null:""):(f=n.decoder(u.slice(0,h),ht.decoder,c,"key"),p=Zo.maybeMap(W0(u.slice(h+1),n),function(v){return n.decoder(v,ht.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=zL(p)),u.indexOf("[]=")>-1&&(p=BL(p)?[p]:p);var m=Hd.call(r,f);m&&n.duplicates==="combine"?r[f]=Zo.combine(r[f],p):(!m||n.duplicates==="last")&&(r[f]=p)}return r},GL=function(e,t,n,r){for(var o=r?t:W0(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=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===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},YL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&Hd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(i))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&Hd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),GL(u,n,r,o)}},qL=function(t){if(!t)return ht;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"?ht.charset:t.charset,r=typeof t.duplicates>"u"?ht.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:ht.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ht.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ht.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ht.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ht.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ht.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ht.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ht.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ht.decoder,delimiter:typeof t.delimiter=="string"||Zo.isRegExp(t.delimiter)?t.delimiter:ht.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ht.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ht.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ht.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ht.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ht.strictNullHandling}},KL=function(e,t){var n=qL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?UL(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=YL(a,r[a],n,typeof e=="string");o=Zo.merge(o,l,n)}return n.allowSparse===!0?o:Zo.compact(o)},ZL=jL,XL=KL,QL=jd,JL={formats:QL,parse:XL,stringify:ZL},Ie;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ie||(Ie={}));var H0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(H0||(H0={}));const re=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}},K=Ie.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 tn 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(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof tn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.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()}}tn.create=e=>new tn(e);const ns=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ie.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.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}"`:Ie.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.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 K.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 K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ie.assertNever(e)}return{message:n}};let eV=ns;function Ud(){return eV}const Gd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function te(e,t){const n=Ud(),r=Gd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ns?void 0:ns].filter(o=>!!o)});e.common.issues.push(r)}class $t{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 me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return $t.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),rs=e=>({status:"dirty",value:e}),Ht=e=>({status:"valid",value:e}),U0=e=>e.status==="aborted",G0=e=>e.status==="dirty",Ha=e=>e.status==="valid",Ua=e=>typeof Promise<"u"&&e instanceof Promise;function Ga(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 Y0(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 le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var os,is;class _n{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 q0=(e,t)=>{if(Ha(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 tn(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=e;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{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 jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $t,ctx:{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ua(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:jr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return q0(o,i)}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:jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Ua(o)?o:Promise.resolve(o));return q0(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Bn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return zn.create(this,this._def)}nullable(){return Wr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cn.create(this,this._def)}promise(){return ls.create(this,this._def)}or(t){return Ka.create([this,t],this._def)}and(t){return Za.create(this,t,this._def)}transform(t){return new Bn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new tl({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new Q0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new nl({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rl.create(this,t)}readonly(){return ol.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tV=/^c[^\s-]{8,}$/i,nV=/^[0-9a-z]+$/,rV=/^[0-9A-HJKMNP-TV-Z]{26}$/,oV=/^[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,iV=/^[a-z0-9_-]{21}$/i,sV=/^[-+]?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)?)??$/,aV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Yd;const cV=/^(?:(?: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])$/,uV=/^(([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})))$/,dV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,K0="((\\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])))",fV=new RegExp(`^${K0}$`);function Z0(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 hV(e){return new RegExp(`^${Z0(e)}$`)}function pV(e){let t=`${K0}T${Z0(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 mV(e,t){return!!((t==="v4"||!t)&&cV.test(e)||(t==="v6"||!t)&&uV.test(e))}class $n extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.string,received:i.parsedType}),me}const r=new $t;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?te(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&te(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")aV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Yd||(Yd=new RegExp(lV,"u")),Yd.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")oV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")iV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")tV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")nV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")rV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:K.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:K.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?pV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?fV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?hV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?sV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?mV(t.data,i.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?dV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:K.invalid_string,message:i.message}),r.dirty()):Ie.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new $n({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.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,...le.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,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new $n({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $n({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $n({...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}}$n.create=e=>{var t;return new $n({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function gV(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class Br extends xe{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)!==re.number){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.number,received:i.parsedType}),me}let r;const o=new $t;for(const i of this._def.checks)i.kind==="int"?Ie.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?gV(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_finite,message:i.message}),o.dirty()):Ie.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Br({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Br({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.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"&&Ie.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)}}Br.create=e=>new Br({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Xo extends xe{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)!==re.bigint){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.bigint,received:i.parsedType}),me}let r;const o=new $t;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ie.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Xo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Xo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.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}}Xo.create=e=>{var t;return new Xo({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class qd extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.boolean,received:r.parsedType}),me}return Ht(t.data)}}qd.create=e=>new qd({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class ss extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_date}),me}const r=new $t;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ie.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ss({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.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}}ss.create=e=>new ss({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Kd extends xe{_parse(t){if(this._getType(t)!==re.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.symbol,received:r.parsedType}),me}return Ht(t.data)}}Kd.create=e=>new Kd({typeName:he.ZodSymbol,...ye(e)});class Ya extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.undefined,received:r.parsedType}),me}return Ht(t.data)}}Ya.create=e=>new Ya({typeName:he.ZodUndefined,...ye(e)});class qa extends xe{_parse(t){if(this._getType(t)!==re.null){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.null,received:r.parsedType}),me}return Ht(t.data)}}qa.create=e=>new qa({typeName:he.ZodNull,...ye(e)});class Zd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return Ht(t.data)}}Zd.create=e=>new Zd({typeName:he.ZodAny,...ye(e)});class Qo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ht(t.data)}}Qo.create=e=>new Qo({typeName:he.ZodUnknown,...ye(e)});class gr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:K.invalid_type,expected:re.never,received:n.parsedType}),me}}gr.create=e=>new gr({typeName:he.ZodNever,...ye(e)});class Xd extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.void,received:r.parsedType}),me}return Ht(t.data)}}Xd.create=e=>new Xd({typeName:he.ZodVoid,...ye(e)});class cn extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==re.array)return te(n,{code:K.invalid_type,expected:re.array,received:n.parsedType}),me;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(te(n,{code:s?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(te(n,{code:K.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&&(te(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new _n(n,s,n.path,a)))).then(s=>$t.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new _n(n,s,n.path,a)));return $t.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cn({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new cn({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new cn({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}cn.create=(e,t)=>new cn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Jo(e){if(e instanceof it){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=zn.create(Jo(r))}return new it({...e._def,shape:()=>t})}else return e instanceof cn?new cn({...e._def,type:Jo(e.element)}):e instanceof zn?zn.create(Jo(e.unwrap())):e instanceof Wr?Wr.create(Jo(e.unwrap())):e instanceof jn?jn.create(e.items.map(t=>Jo(t))):e}class it extends xe{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=Ie.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==re.object){const c=this._getOrReturnCtx(t);return te(c,{code:K.invalid_type,expected:re.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof gr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new _n(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){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&&(te(o,{code:K.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 _n(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,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>$t.mergeObjectSync(r,c)):$t.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new it({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new it({...this._def,unknownKeys:"strip"})}passthrough(){return new it({...this._def,unknownKeys:"passthrough"})}extend(t){return new it({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new it({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new it({...this._def,catchall:t})}pick(t){const n={};return Ie.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new it({...this._def,shape:()=>n})}omit(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new it({...this._def,shape:()=>n})}deepPartial(){return Jo(this)}partial(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new it({...this._def,shape:()=>n})}required(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof zn;)i=i._def.innerType;n[r]=i}}),new it({...this._def,shape:()=>n})}keyof(){return X0(Ie.objectKeys(this.shape))}}it.create=(e,t)=>new it({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:he.ZodObject,...ye(t)}),it.strictCreate=(e,t)=>new it({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:he.ZodObject,...ye(t)}),it.lazycreate=(e,t)=>new it({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:he.ZodObject,...ye(t)});class Ka extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new tn(a.ctx.common.issues));return te(n,{code:K.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new tn(l));return te(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Ka.create=(e,t)=>new Ka({options:e,typeName:he.ZodUnion,...ye(t)});const Rn=e=>e instanceof Qa?Rn(e.schema):e instanceof Bn?Rn(e.innerType()):e instanceof Ja?[e.value]:e instanceof zr?e.options:e instanceof el?Ie.objectValues(e.enum):e instanceof tl?Rn(e._def.innerType):e instanceof Ya?[void 0]:e instanceof qa?[null]:e instanceof zn?[void 0,...Rn(e.unwrap())]:e instanceof Wr?[null,...Rn(e.unwrap())]:e instanceof Q0||e instanceof ol?Rn(e.unwrap()):e instanceof nl?Rn(e._def.innerType):[];class Qd extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.object)return te(n,{code:K.invalid_type,expected:re.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const s=Rn(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new Qd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Jd(e,t){const n=jr(e),r=jr(t);if(e===t)return{valid:!0,data:e};if(n===re.object&&r===re.object){const o=Ie.objectKeys(t),i=Ie.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Jd(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===re.array&&r===re.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=Jd(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===re.date&&r===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Za extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(U0(i)||U0(s))return me;const a=Jd(i.value,s.value);return a.valid?((G0(i)||G0(s))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:K.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Za.create=(e,t,n)=>new Za({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class jn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.array)return te(r,{code:K.invalid_type,expected:re.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return te(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new _n(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>$t.mergeArray(n,s)):$t.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new jn({...this._def,rest:t})}}jn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Xa extends xe{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!==re.object)return te(r,{code:K.invalid_type,expected:re.object,received:r.parsedType}),me;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new _n(r,a,r.path,a)),value:s._parse(new _n(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?$t.mergeObjectAsync(n,o):$t.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Xa({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Xa({keyType:$n.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class ef extends xe{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!==re.map)return te(r,{code:K.invalid_type,expected:re.map,received:r.parsedType}),me;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new _n(r,a,r.path,[c,"key"])),value:i._parse(new _n(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}ef.create=(e,t,n)=>new ef({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class ei extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.set)return te(r,{code:K.invalid_type,expected:re.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:K.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&&(te(r,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new _n(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new ei({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new ei({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ei.create=(e,t)=>new ei({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class as extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.function)return te(n,{code:K.invalid_type,expected:re.function,received:n.parsedType}),me;function r(a,l){return Gd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ud(),ns].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Gd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ud(),ns].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ls){const a=this;return Ht(async function(...l){const c=new tn([]),u=await a._def.args.parseAsync(l,i).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const a=this;return Ht(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new tn([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new tn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new as({...this._def,args:jn.create(t).rest(Qo.create())})}returns(t){return new as({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new as({args:t||jn.create([]).rest(Qo.create()),returns:n||Qo.create(),typeName:he.ZodFunction,...ye(r)})}}class Qa extends xe{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})}}Qa.create=(e,t)=>new Qa({getter:e,typeName:he.ZodLazy,...ye(t)});class Ja extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ja.create=(e,t)=>new Ja({value:e,typeName:he.ZodLiteral,...ye(t)});function X0(e,t){return new zr({values:e,typeName:he.ZodEnum,...ye(t)})}class zr extends xe{constructor(){super(...arguments),os.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:Ie.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Ga(this,os)||Y0(this,os,new Set(this._def.values)),!Ga(this,os).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:K.invalid_enum_value,options:r}),me}return Ht(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 zr.create(t,{...this._def,...n})}exclude(t,n=this._def){return zr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}os=new WeakMap,zr.create=X0;class el extends xe{constructor(){super(...arguments),is.set(this,void 0)}_parse(t){const n=Ie.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==re.string&&r.parsedType!==re.number){const o=Ie.objectValues(n);return te(r,{expected:Ie.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Ga(this,is)||Y0(this,is,new Set(Ie.getValidEnumValues(this._def.values))),!Ga(this,is).has(t.data)){const o=Ie.objectValues(n);return te(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return Ht(t.data)}get enum(){return this._def.values}}is=new WeakMap,el.create=(e,t)=>new el({values:e,typeName:he.ZodNativeEnum,...ye(t)});class ls extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.promise&&n.common.async===!1)return te(n,{code:K.invalid_type,expected:re.promise,received:n.parsedType}),me;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return Ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ls.create=(e,t)=>new ls({type:e,typeName:he.ZodPromise,...ye(t)});class Bn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{te(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?rs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?rs(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ha(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ha(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);Ie.assertNever(o)}}Bn.create=(e,t,n)=>new Bn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),Bn.createWithPreprocess=(e,t,n)=>new Bn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class zn extends xe{_parse(t){return this._getType(t)===re.undefined?Ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zn.create=(e,t)=>new zn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Wr extends xe{_parse(t){return this._getType(t)===re.null?Ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wr.create=(e,t)=>new Wr({innerType:e,typeName:he.ZodNullable,...ye(t)});class tl extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}tl.create=(e,t)=>new tl({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class nl extends xe{_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 Ua(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new tn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}nl.create=(e,t)=>new nl({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class tf extends xe{_parse(t){if(this._getType(t)!==re.nan){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}tf.create=e=>new tf({typeName:he.ZodNaN,...ye(e)});class Q0 extends xe{_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 rl extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),rs(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me: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 rl({in:t,out:n,typeName:he.ZodPipeline})}}class ol extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ha(o)&&(o.value=Object.freeze(o.value)),o);return Ua(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}ol.create=(e,t)=>new ol({innerType:e,typeName:he.ZodReadonly,...ye(t)}),it.lazycreate;var he;(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"})(he||(he={})),$n.create,Br.create,tf.create,Xo.create,qd.create,ss.create,Kd.create,Ya.create,qa.create,Zd.create,Qo.create,gr.create,Xd.create,cn.create,it.create,it.strictCreate,Ka.create,Qd.create,Za.create,jn.create,Xa.create,ef.create,ei.create,as.create,Qa.create,Ja.create,zr.create,el.create,ls.create,Bn.create,zn.create,Wr.create,Bn.createWithPreprocess,rl.create;const yV={sort:(e,t)=>e.localeCompare(t),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},J0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return JL.parse(n.toString(),yV)},ew=e=>e.replace("[",".").replace("]","").split("."),cs=(e,t)=>ew(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof cn?o.element:o},t),us=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),vV=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(u,d)=>{const h=cs(u,e);return{...d,name:u,id:u,required:!h.isOptional(),error:t==null?void 0:t[u],ref:f=>{f!==null&&(r.current[u]={element:f,schema:h})}}},i=(u,d)=>{const h=cs(u,e);return{...d,name:u,id:u,required:!h.isOptional(),error:t==null?void 0:t[u],ref:f=>{f!==null&&(r.current[u]={element:f,schema:h})}}},s=(u,d)=>{const h=cs(u,e);return{...d,name:u,id:u,required:!h.isOptional(),error:t==null?void 0:t[u],ref:f=>{f!==null&&(r.current[u]={element:f,schema:h})}}},a=(u,d)=>{const h=cs(u,e);return{...d,name:u,id:u,required:!h.isOptional(),type:fn.instance(h,Br)?"number":(d==null?void 0:d.type)??"text",error:t==null?void 0:t[u],ref:f=>{f!==null&&(r.current[u]={element:f,schema:h})}}};b.useEffect(()=>{const u=Object.values(r.current).map(h=>{const f=h.element.dataset.origin?document.querySelector(`[data-target=${h.element.name}]`):h.element,p=h.schema.safeParse(us(f)),m=y=>{const w=f.dataset.target||f.name;if(!w)return;const g=us(y.target)||(y.relatedTarget?us(y.relatedTarget):""),T=h.schema.safeParse(g);if(T.success)return f.setCustomValidity(""),n(S=>{const{[w]:E,...I}=S||{};return I===null||fn.empty(I)?null:I});if(f.required){const S=T.error.issues[0].message;f.setCustomValidity(S),n(E=>({...E,[w]:S}))}},v=f.getAttribute("data-trigger")||"blur";return f.addEventListener(v,m),f.tagName==="SELECT"&&f.addEventListener("change",m),{input:h,hasInitialError:f.required?!p.success:!1,unsubscribe:()=>{f.removeEventListener(v,m),f.tagName==="SELECT"&&f.addEventListener("change",m)}}});return u.some(h=>h.hasInitialError)&&n(h=>h===null?{}:h),()=>u.forEach(h=>h.unsubscribe())});const l=b.useCallback(u=>d=>{const h=d.currentTarget,f=Object.values(r.current).reduce((m,v)=>{const y=v.element,w=v.schema.safeParse(us(y));if(y.dataset.ignore==="ignore"||w.success)return m;const g=w.error.issues[0].message;y.setAttribute("data-initialized","true");const T=y.dataset.name||y.name||"";return{...m,[T]:g}},{}),p=fn.empty(f)?null:f;n(p),u==null||u({form:h,errors:p||{}})},[]),c=b.useCallback(u=>d=>{d.preventDefault();const h=d.currentTarget;let f=J0(h);Array.from(h.elements).forEach(m=>{if(m.tagName==="SELECT"){const v=m;f=sh(f,v.name,v.value)}if(m.tagName==="INPUT"){const v=m;f=sh(f,v.name,us(v))}});const p=e.safeParse(f);return p.success?u({form:h,json:f,data:p.data,event:d,reset:()=>rd(h),success:!0,errors:[]}):u({form:h,json:f,event:d,data:f,success:!1,reset:()=>rd(h),errors:p.error.issues.map(m=>({message:m.message,path:m.path.map(v=>String(v))}))})},[]);return{input:a,datepicker:o,checkbox:s,select:i,onSubmit:c,errors:t,onInvalid:l,disabled:t!==null}},bV=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},tw={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},nw={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.375rem"},wV={name:"dark",rounded:tw,spacing:nw,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%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}}}},xV={name:"light",rounded:tw,spacing:nw,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%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{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%)"}}}},SV={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>)`},ds=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(ds(s,t,n,a))},[]),rw=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:rw(s,t,n,a)}},{}),ow={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},nf=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},TV={default:e=>nf(e,{result:ow.default}),dark:e=>nf(e,{result:ow.dark})},EV=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=ds(e.colors,n),o=ds(e.spacing,n),i=ds(e.rounded,n);return nf(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=hk,ee.Autocomplete=wM,ee.Button=to,ee.Calendar=Cy,ee.Card=Py,ee.Checkbox=Wv,ee.ColType=Ko,ee.Collapse=Eg,ee.ComponentsProvider=YO,ee.DatePicker=SM,ee.Dropdown=Ro,ee.Expand=X_,ee.FileUpload=FD,ee.Form=LD,ee.Input=Bi,ee.InputFeedback=Bv,ee.InputField=xa,ee.Menu=sM,ee.MenuItem=iM,ee.Modal=mM,ee.Option=zv,ee.Polymorph=eo,ee.Radiobox=VD,ee.Select=Nr,ee.Stats=QO,ee.Switch=$D,ee.Tab=nA,ee.Table=wL,ee.Tabs=eA,ee.Tag=X1,ee.TaskList=RD,ee.Toolbar=gM,ee.Tooltip=jv,ee.TransferList=wN,ee.convertPath=ew,ee.createColumns=HN,ee.createDesignTokens=rw,ee.createOptionCols=Nd,ee.createStyles=TV,ee.createTheme=EV,ee.css=$e,ee.defaultDarkTheme=wV,ee.defaultLightTheme=xV,ee.dispatchInput=Fl,ee.formReset=rd,ee.formToJson=J0,ee.getSchemaShape=cs,ee.initializeInputDataset=xs,ee.isReactComponent=G1,ee.isReactFC=Y1,ee.isSsr=Js,ee.mergeRefs=Dl,ee.parsers=SV,ee.path=vy,ee.reduceTokens=ds,ee.safeRegex=ru,ee.splitInto=by,ee.useForm=vV,ee.usePrevious=bV,ee.useReactive=ky,ee.useTablePreferences=GN,ee.useTranslations=Wt,ee.uuid=Qs,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
201
201
|
//# sourceMappingURL=index.umd.js.map
|