@g4rcez/components 0.0.73 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +38 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1439 -1395
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +36 -36
- package/dist/index.umd.js.map +1 -1
- package/dist/preset/preset.tailwind.js +1 -1
- package/dist/preset.tailwind.js +1 -1
- package/dist/src/components/display/alert.js +1 -1
- package/dist/src/components/display/calendar.d.ts +6 -5
- package/dist/src/components/display/calendar.d.ts.map +1 -1
- package/dist/src/components/display/calendar.js +20 -13
- package/dist/src/components/floating/menu.d.ts +15 -18
- package/dist/src/components/floating/menu.d.ts.map +1 -1
- package/dist/src/components/floating/menu.js +10 -12
- package/dist/src/components/floating/modal.d.ts +8 -3
- package/dist/src/components/floating/modal.d.ts.map +1 -1
- package/dist/src/components/floating/modal.js +10 -5
- package/dist/src/components/form/date-picker.d.ts +10 -10
- package/dist/src/components/form/input-field.d.ts.map +1 -1
- package/dist/src/components/form/input-field.js +1 -1
- package/dist/src/hooks/use-components-provider.d.ts +2 -0
- package/dist/src/hooks/use-components-provider.d.ts.map +1 -1
- package/dist/src/hooks/use-components-provider.js +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var Xw=Object.defineProperty;var Qw=(e,t,n)=>t in e?Xw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>Qw(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),S=require("react/jsx-runtime"),pi=require("react-dom");function wy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const R=wy(w),gi=wy(pi);function Sy(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=Sy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sy(e))&&(r&&(r+=" "),r+=t);return r}var uh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t1(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 n1=Error,r1=EvalError,o1=RangeError,s1=ReferenceError,Ty=SyntaxError,yi=TypeError,i1=URIError,a1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},dh=typeof Symbol<"u"&&Symbol,l1=a1,c1=function(){return typeof dh!="function"||typeof Symbol!="function"||typeof dh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:l1()},Wl={__proto__:null,foo:{}},u1=Object,d1=function(){return{__proto__:Wl}.foo===Wl.foo&&!(Wl instanceof u1)},f1="Function.prototype.bind called on incompatible ",h1=Object.prototype.toString,m1=Math.max,p1="[object Function]",fh=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},g1=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},y1=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},v1=function(t){var n=this;if(typeof n!="function"||h1.apply(n)!==p1)throw new TypeError(f1+n);for(var r=g1(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,fh(r,arguments));return Object(u)===u?u:this}return n.apply(t,fh(r,arguments))},i=m1(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+y1(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},b1=v1,fd=Function.prototype.bind||b1,x1=Function.prototype.call,w1=Object.prototype.hasOwnProperty,S1=fd,T1=S1.call(x1,w1),Re,E1=n1,C1=r1,R1=o1,P1=s1,Do=Ty,Co=yi,k1=i1,Ey=Function,zl=function(e){try{return Ey('"use strict"; return ('+e+").constructor;")()}catch{}},Nr=Object.getOwnPropertyDescriptor;if(Nr)try{Nr({},"")}catch{Nr=null}var Hl=function(){throw new Co},I1=Nr?function(){try{return arguments.callee,Hl}catch{try{return Nr(arguments,"callee").get}catch{return Hl}}}():Hl,so=c1(),A1=d1(),wt=Object.getPrototypeOf||(A1?function(e){return e.__proto__}:null),po={},O1=typeof Uint8Array>"u"||!wt?Re:wt(Uint8Array),jr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Re:ArrayBuffer,"%ArrayIteratorPrototype%":so&&wt?wt([][Symbol.iterator]()):Re,"%AsyncFromSyncIteratorPrototype%":Re,"%AsyncFunction%":po,"%AsyncGenerator%":po,"%AsyncGeneratorFunction%":po,"%AsyncIteratorPrototype%":po,"%Atomics%":typeof Atomics>"u"?Re:Atomics,"%BigInt%":typeof BigInt>"u"?Re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E1,"%eval%":eval,"%EvalError%":C1,"%Float32Array%":typeof Float32Array>"u"?Re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Re:FinalizationRegistry,"%Function%":Ey,"%GeneratorFunction%":po,"%Int8Array%":typeof Int8Array>"u"?Re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":so&&wt?wt(wt([][Symbol.iterator]())):Re,"%JSON%":typeof JSON=="object"?JSON:Re,"%Map%":typeof Map>"u"?Re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!so||!wt?Re:wt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Re:Promise,"%Proxy%":typeof Proxy>"u"?Re:Proxy,"%RangeError%":R1,"%ReferenceError%":P1,"%Reflect%":typeof Reflect>"u"?Re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!so||!wt?Re:wt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":so&&wt?wt(""[Symbol.iterator]()):Re,"%Symbol%":so?Symbol:Re,"%SyntaxError%":Do,"%ThrowTypeError%":I1,"%TypedArray%":O1,"%TypeError%":Co,"%Uint8Array%":typeof Uint8Array>"u"?Re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Re:Uint32Array,"%URIError%":k1,"%WeakMap%":typeof WeakMap>"u"?Re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Re:WeakSet};if(wt)try{null.error}catch(e){var _1=wt(wt(e));jr["%Error.prototype%"]=_1}var M1=function e(t){var n;if(t==="%AsyncFunction%")n=zl("async function () {}");else if(t==="%GeneratorFunction%")n=zl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=zl("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 jr[t]=n,n},hh={__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"]},vi=fd,ba=T1,D1=vi.call(Function.call,Array.prototype.concat),N1=vi.call(Function.apply,Array.prototype.splice),mh=vi.call(Function.call,String.prototype.replace),xa=vi.call(Function.call,String.prototype.slice),j1=vi.call(Function.call,RegExp.prototype.exec),L1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F1=/\\(\\)?/g,V1=function(t){var n=xa(t,0,1),r=xa(t,-1);if(n==="%"&&r!=="%")throw new Do("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Do("invalid intrinsic syntax, expected opening `%`");var o=[];return mh(t,L1,function(s,i,a,l){o[o.length]=a?mh(l,F1,"$1"):i||s}),o},$1=function(t,n){var r=t,o;if(ba(hh,r)&&(o=hh[r],r="%"+o[0]+"%"),ba(jr,r)){var s=jr[r];if(s===po&&(s=M1(r)),typeof s>"u"&&!n)throw new Co("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Do("intrinsic "+t+" does not exist!")},ts=function(t,n){if(typeof t!="string"||t.length===0)throw new Co("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Co('"allowMissing" argument must be a boolean');if(j1(/^%?[^%]*%?$/,t)===null)throw new Do("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=V1(t),o=r.length>0?r[0]:"",s=$1("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],N1(r,D1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=xa(f,0,1),p=xa(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Do("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",ba(jr,i))a=jr[i];else if(a!=null){if(!(f in a)){if(!n)throw new Co("base intrinsic for "+t+" exists, but the property is not available.");return}if(Nr&&u+1>=r.length){var m=Nr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=ba(a,f),a=a[f];d&&!l&&(jr[i]=a)}}return a},Cy={exports:{}},Ul,ph;function hd(){if(ph)return Ul;ph=1;var e=ts,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ul=t,Ul}var B1=ts,ia=B1("%Object.getOwnPropertyDescriptor%",!0);if(ia)try{ia([],"length")}catch{ia=null}var Ry=ia,gh=hd(),W1=Ty,io=yi,yh=Ry,z1=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new io("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new io("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new io("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new io("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new io("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new io("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!yh&&yh(t,n);if(gh)gh(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new W1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},eu=hd(),Py=function(){return!!eu};Py.hasArrayLengthDefineBug=function(){if(!eu)return null;try{return eu([],"length",{value:1}).length!==1}catch{return!0}};var H1=Py,U1=ts,vh=z1,G1=H1(),bh=Ry,xh=yi,Y1=U1("%Math.floor%"),q1=function(t,n){if(typeof t!="function")throw new xh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Y1(n)!==n)throw new xh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&bh){var i=bh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(G1?vh(t,"length",n,!0,!0):vh(t,"length",n)),t};(function(e){var t=fd,n=ts,r=q1,o=yi,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=hd(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Cy);var K1=Cy.exports,ky=ts,Iy=K1,Z1=Iy(ky("String.prototype.indexOf")),X1=function(t,n){var r=ky(t,!!n);return typeof r=="function"&&Z1(t,".prototype.")>-1?Iy(r):r};const Q1={},J1=Object.freeze(Object.defineProperty({__proto__:null,default:Q1},Symbol.toStringTag,{value:"Module"})),eS=t1(J1);var md=typeof Map=="function"&&Map.prototype,Gl=Object.getOwnPropertyDescriptor&&md?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wa=md&&Gl&&typeof Gl.get=="function"?Gl.get:null,wh=md&&Map.prototype.forEach,pd=typeof Set=="function"&&Set.prototype,Yl=Object.getOwnPropertyDescriptor&&pd?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Sa=pd&&Yl&&typeof Yl.get=="function"?Yl.get:null,Sh=pd&&Set.prototype.forEach,tS=typeof WeakMap=="function"&&WeakMap.prototype,Ms=tS?WeakMap.prototype.has:null,nS=typeof WeakSet=="function"&&WeakSet.prototype,Ds=nS?WeakSet.prototype.has:null,rS=typeof WeakRef=="function"&&WeakRef.prototype,Th=rS?WeakRef.prototype.deref:null,oS=Boolean.prototype.valueOf,sS=Object.prototype.toString,iS=Function.prototype.toString,aS=String.prototype.match,gd=String.prototype.slice,tr=String.prototype.replace,lS=String.prototype.toUpperCase,Eh=String.prototype.toLowerCase,Ay=RegExp.prototype.test,Ch=Array.prototype.concat,bn=Array.prototype.join,cS=Array.prototype.slice,Rh=Math.floor,tu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ql=Object.getOwnPropertySymbols,nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,No=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Nt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===No||!0)?Symbol.toStringTag:null,Oy=Object.prototype.propertyIsEnumerable,Ph=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function kh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Ay.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Rh(-e):Rh(e);if(r!==e){var o=String(r),s=gd.call(t,o.length+1);return tr.call(o,n,"$&_")+"."+tr.call(tr.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return tr.call(t,n,"$&_")}var ru=eS,Ih=ru.custom,Ah=My(Ih)?Ih:null,uS=function e(t,n,r,o){var s=n||{};if(Qn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Qn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Ny(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?kh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?kh(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return ou(t)?"[Array]":"[Object]";var d=kS(s,r);if(typeof o>"u")o=[];else if(Dy(o,t)>=0)return"[Circular]";function f(L,P,M){if(P&&(o=cS.call(o),o.push(P)),M){var j={depth:s.depth};return Qn(s,"quoteStyle")&&(j.quoteStyle=s.quoteStyle),e(L,j,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!Oh(t)){var h=bS(t),p=Fi(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+bn.call(p,", ")+" }":"")}if(My(t)){var m=No?tr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):nu.call(t);return typeof t=="object"&&!No?xs(m):m}if(CS(t)){for(var v="<"+Eh.call(String(t.nodeName)),b=t.attributes||[],y=0;y<b.length;y++)v+=" "+b[y].name+"="+_y(dS(b[y].value),"double",s);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Eh.call(String(t.nodeName))+">",v}if(ou(t)){if(t.length===0)return"[]";var g=Fi(t,f);return d&&!PS(g)?"["+su(g,d)+"]":"[ "+bn.call(g,", ")+" ]"}if(hS(t)){var T=Fi(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Oy.call(t,"cause")?"{ ["+String(t)+"] "+bn.call(Ch.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+bn.call(T,", ")+" }"}if(typeof t=="object"&&i){if(Ah&&typeof t[Ah]=="function"&&ru)return ru(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(xS(t)){var x=[];return wh&&wh.call(t,function(L,P){x.push(f(P,t,!0)+" => "+f(L,t))}),_h("Map",wa.call(t),x,d)}if(TS(t)){var E=[];return Sh&&Sh.call(t,function(L){E.push(f(L,t))}),_h("Set",Sa.call(t),E,d)}if(wS(t))return Kl("WeakMap");if(ES(t))return Kl("WeakSet");if(SS(t))return Kl("WeakRef");if(pS(t))return xs(f(Number(t)));if(yS(t))return xs(f(tu.call(t)));if(gS(t))return xs(oS.call(t));if(mS(t))return xs(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof uh<"u"&&t===uh)return"{ [object globalThis] }";if(!fS(t)&&!Oh(t)){var C=Fi(t,f),k=Ph?Ph(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",A=!k&&Nt&&Object(t)===t&&Nt in t?gd.call(dr(t),8,-1):I?"Object":"",N=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",O=N+(A||I?"["+bn.call(Ch.call([],A||[],I||[]),": ")+"] ":"");return C.length===0?O+"{}":d?O+"{"+su(C,d)+"}":O+"{ "+bn.call(C,", ")+" }"}return String(t)};function _y(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function dS(e){return tr.call(String(e),/"/g,""")}function ou(e){return dr(e)==="[object Array]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function fS(e){return dr(e)==="[object Date]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function Oh(e){return dr(e)==="[object RegExp]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function hS(e){return dr(e)==="[object Error]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function mS(e){return dr(e)==="[object String]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function pS(e){return dr(e)==="[object Number]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function gS(e){return dr(e)==="[object Boolean]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function My(e){if(No)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!nu)return!1;try{return nu.call(e),!0}catch{}return!1}function yS(e){if(!e||typeof e!="object"||!tu)return!1;try{return tu.call(e),!0}catch{}return!1}var vS=Object.prototype.hasOwnProperty||function(e){return e in this};function Qn(e,t){return vS.call(e,t)}function dr(e){return sS.call(e)}function bS(e){if(e.name)return e.name;var t=aS.call(iS.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Dy(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 xS(e){if(!wa||!e||typeof e!="object")return!1;try{wa.call(e);try{Sa.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function wS(e){if(!Ms||!e||typeof e!="object")return!1;try{Ms.call(e,Ms);try{Ds.call(e,Ds)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function SS(e){if(!Th||!e||typeof e!="object")return!1;try{return Th.call(e),!0}catch{}return!1}function TS(e){if(!Sa||!e||typeof e!="object")return!1;try{Sa.call(e);try{wa.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ES(e){if(!Ds||!e||typeof e!="object")return!1;try{Ds.call(e,Ds);try{Ms.call(e,Ms)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function CS(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ny(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Ny(gd.call(e,0,t.maxStringLength),t)+r}var o=tr.call(tr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,RS);return _y(o,"single",t)}function RS(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":"")+lS.call(t.toString(16))}function xs(e){return"Object("+e+")"}function Kl(e){return e+" { ? }"}function _h(e,t,n,r){var o=r?su(n,r):bn.call(n,", ");return e+" ("+t+") {"+o+"}"}function PS(e){for(var t=0;t<e.length;t++)if(Dy(e[t],`
|
|
1
|
+
"use strict";var Xw=Object.defineProperty;var Qw=(e,t,n)=>t in e?Xw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>Qw(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),w=require("react/jsx-runtime"),pi=require("react-dom");function wy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const R=wy(x),gi=wy(pi);function Sy(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=Sy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sy(e))&&(r&&(r+=" "),r+=t);return r}var uh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t1(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 n1=Error,r1=EvalError,o1=RangeError,s1=ReferenceError,Ty=SyntaxError,yi=TypeError,i1=URIError,a1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},dh=typeof Symbol<"u"&&Symbol,l1=a1,c1=function(){return typeof dh!="function"||typeof Symbol!="function"||typeof dh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:l1()},Wl={__proto__:null,foo:{}},u1=Object,d1=function(){return{__proto__:Wl}.foo===Wl.foo&&!(Wl instanceof u1)},f1="Function.prototype.bind called on incompatible ",h1=Object.prototype.toString,m1=Math.max,p1="[object Function]",fh=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},g1=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},y1=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},v1=function(t){var n=this;if(typeof n!="function"||h1.apply(n)!==p1)throw new TypeError(f1+n);for(var r=g1(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,fh(r,arguments));return Object(u)===u?u:this}return n.apply(t,fh(r,arguments))},i=m1(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+y1(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},b1=v1,fd=Function.prototype.bind||b1,x1=Function.prototype.call,w1=Object.prototype.hasOwnProperty,S1=fd,T1=S1.call(x1,w1),Re,E1=n1,C1=r1,R1=o1,P1=s1,Do=Ty,Co=yi,k1=i1,Ey=Function,zl=function(e){try{return Ey('"use strict"; return ('+e+").constructor;")()}catch{}},Nr=Object.getOwnPropertyDescriptor;if(Nr)try{Nr({},"")}catch{Nr=null}var Hl=function(){throw new Co},I1=Nr?function(){try{return arguments.callee,Hl}catch{try{return Nr(arguments,"callee").get}catch{return Hl}}}():Hl,so=c1(),A1=d1(),St=Object.getPrototypeOf||(A1?function(e){return e.__proto__}:null),po={},O1=typeof Uint8Array>"u"||!St?Re:St(Uint8Array),jr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Re:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Re:ArrayBuffer,"%ArrayIteratorPrototype%":so&&St?St([][Symbol.iterator]()):Re,"%AsyncFromSyncIteratorPrototype%":Re,"%AsyncFunction%":po,"%AsyncGenerator%":po,"%AsyncGeneratorFunction%":po,"%AsyncIteratorPrototype%":po,"%Atomics%":typeof Atomics>"u"?Re:Atomics,"%BigInt%":typeof BigInt>"u"?Re:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Re:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Re:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Re:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E1,"%eval%":eval,"%EvalError%":C1,"%Float32Array%":typeof Float32Array>"u"?Re:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Re:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Re:FinalizationRegistry,"%Function%":Ey,"%GeneratorFunction%":po,"%Int8Array%":typeof Int8Array>"u"?Re:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Re:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Re:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":so&&St?St(St([][Symbol.iterator]())):Re,"%JSON%":typeof JSON=="object"?JSON:Re,"%Map%":typeof Map>"u"?Re:Map,"%MapIteratorPrototype%":typeof Map>"u"||!so||!St?Re:St(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Re:Promise,"%Proxy%":typeof Proxy>"u"?Re:Proxy,"%RangeError%":R1,"%ReferenceError%":P1,"%Reflect%":typeof Reflect>"u"?Re:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Re:Set,"%SetIteratorPrototype%":typeof Set>"u"||!so||!St?Re:St(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Re:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":so&&St?St(""[Symbol.iterator]()):Re,"%Symbol%":so?Symbol:Re,"%SyntaxError%":Do,"%ThrowTypeError%":I1,"%TypedArray%":O1,"%TypeError%":Co,"%Uint8Array%":typeof Uint8Array>"u"?Re:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Re:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Re:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Re:Uint32Array,"%URIError%":k1,"%WeakMap%":typeof WeakMap>"u"?Re:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Re:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Re:WeakSet};if(St)try{null.error}catch(e){var _1=St(St(e));jr["%Error.prototype%"]=_1}var M1=function e(t){var n;if(t==="%AsyncFunction%")n=zl("async function () {}");else if(t==="%GeneratorFunction%")n=zl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=zl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&St&&(n=St(o.prototype))}return jr[t]=n,n},hh={__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"]},vi=fd,ba=T1,D1=vi.call(Function.call,Array.prototype.concat),N1=vi.call(Function.apply,Array.prototype.splice),mh=vi.call(Function.call,String.prototype.replace),xa=vi.call(Function.call,String.prototype.slice),j1=vi.call(Function.call,RegExp.prototype.exec),L1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F1=/\\(\\)?/g,V1=function(t){var n=xa(t,0,1),r=xa(t,-1);if(n==="%"&&r!=="%")throw new Do("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Do("invalid intrinsic syntax, expected opening `%`");var o=[];return mh(t,L1,function(s,i,a,l){o[o.length]=a?mh(l,F1,"$1"):i||s}),o},$1=function(t,n){var r=t,o;if(ba(hh,r)&&(o=hh[r],r="%"+o[0]+"%"),ba(jr,r)){var s=jr[r];if(s===po&&(s=M1(r)),typeof s>"u"&&!n)throw new Co("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Do("intrinsic "+t+" does not exist!")},ts=function(t,n){if(typeof t!="string"||t.length===0)throw new Co("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Co('"allowMissing" argument must be a boolean');if(j1(/^%?[^%]*%?$/,t)===null)throw new Do("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=V1(t),o=r.length>0?r[0]:"",s=$1("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],N1(r,D1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=xa(f,0,1),p=xa(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Do("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",ba(jr,i))a=jr[i];else if(a!=null){if(!(f in a)){if(!n)throw new Co("base intrinsic for "+t+" exists, but the property is not available.");return}if(Nr&&u+1>=r.length){var m=Nr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=ba(a,f),a=a[f];d&&!l&&(jr[i]=a)}}return a},Cy={exports:{}},Ul,ph;function hd(){if(ph)return Ul;ph=1;var e=ts,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ul=t,Ul}var B1=ts,ia=B1("%Object.getOwnPropertyDescriptor%",!0);if(ia)try{ia([],"length")}catch{ia=null}var Ry=ia,gh=hd(),W1=Ty,io=yi,yh=Ry,z1=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new io("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new io("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new io("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new io("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new io("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new io("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!yh&&yh(t,n);if(gh)gh(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new W1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},eu=hd(),Py=function(){return!!eu};Py.hasArrayLengthDefineBug=function(){if(!eu)return null;try{return eu([],"length",{value:1}).length!==1}catch{return!0}};var H1=Py,U1=ts,vh=z1,G1=H1(),bh=Ry,xh=yi,Y1=U1("%Math.floor%"),q1=function(t,n){if(typeof t!="function")throw new xh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Y1(n)!==n)throw new xh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&bh){var i=bh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(G1?vh(t,"length",n,!0,!0):vh(t,"length",n)),t};(function(e){var t=fd,n=ts,r=q1,o=yi,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=hd(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Cy);var K1=Cy.exports,ky=ts,Iy=K1,Z1=Iy(ky("String.prototype.indexOf")),X1=function(t,n){var r=ky(t,!!n);return typeof r=="function"&&Z1(t,".prototype.")>-1?Iy(r):r};const Q1={},J1=Object.freeze(Object.defineProperty({__proto__:null,default:Q1},Symbol.toStringTag,{value:"Module"})),eS=t1(J1);var md=typeof Map=="function"&&Map.prototype,Gl=Object.getOwnPropertyDescriptor&&md?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wa=md&&Gl&&typeof Gl.get=="function"?Gl.get:null,wh=md&&Map.prototype.forEach,pd=typeof Set=="function"&&Set.prototype,Yl=Object.getOwnPropertyDescriptor&&pd?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Sa=pd&&Yl&&typeof Yl.get=="function"?Yl.get:null,Sh=pd&&Set.prototype.forEach,tS=typeof WeakMap=="function"&&WeakMap.prototype,Ms=tS?WeakMap.prototype.has:null,nS=typeof WeakSet=="function"&&WeakSet.prototype,Ds=nS?WeakSet.prototype.has:null,rS=typeof WeakRef=="function"&&WeakRef.prototype,Th=rS?WeakRef.prototype.deref:null,oS=Boolean.prototype.valueOf,sS=Object.prototype.toString,iS=Function.prototype.toString,aS=String.prototype.match,gd=String.prototype.slice,tr=String.prototype.replace,lS=String.prototype.toUpperCase,Eh=String.prototype.toLowerCase,Ay=RegExp.prototype.test,Ch=Array.prototype.concat,bn=Array.prototype.join,cS=Array.prototype.slice,Rh=Math.floor,tu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ql=Object.getOwnPropertySymbols,nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,No=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Nt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===No||!0)?Symbol.toStringTag:null,Oy=Object.prototype.propertyIsEnumerable,Ph=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function kh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Ay.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Rh(-e):Rh(e);if(r!==e){var o=String(r),s=gd.call(t,o.length+1);return tr.call(o,n,"$&_")+"."+tr.call(tr.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return tr.call(t,n,"$&_")}var ru=eS,Ih=ru.custom,Ah=My(Ih)?Ih:null,uS=function e(t,n,r,o){var s=n||{};if(Qn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Qn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Ny(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?kh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?kh(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return ou(t)?"[Array]":"[Object]";var d=kS(s,r);if(typeof o>"u")o=[];else if(Dy(o,t)>=0)return"[Circular]";function f(L,P,O){if(P&&(o=cS.call(o),o.push(P)),O){var j={depth:s.depth};return Qn(s,"quoteStyle")&&(j.quoteStyle=s.quoteStyle),e(L,j,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!Oh(t)){var h=bS(t),p=Fi(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+bn.call(p,", ")+" }":"")}if(My(t)){var m=No?tr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):nu.call(t);return typeof t=="object"&&!No?xs(m):m}if(CS(t)){for(var v="<"+Eh.call(String(t.nodeName)),b=t.attributes||[],y=0;y<b.length;y++)v+=" "+b[y].name+"="+_y(dS(b[y].value),"double",s);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Eh.call(String(t.nodeName))+">",v}if(ou(t)){if(t.length===0)return"[]";var g=Fi(t,f);return d&&!PS(g)?"["+su(g,d)+"]":"[ "+bn.call(g,", ")+" ]"}if(hS(t)){var T=Fi(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Oy.call(t,"cause")?"{ ["+String(t)+"] "+bn.call(Ch.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+bn.call(T,", ")+" }"}if(typeof t=="object"&&i){if(Ah&&typeof t[Ah]=="function"&&ru)return ru(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(xS(t)){var S=[];return wh&&wh.call(t,function(L,P){S.push(f(P,t,!0)+" => "+f(L,t))}),_h("Map",wa.call(t),S,d)}if(TS(t)){var E=[];return Sh&&Sh.call(t,function(L){E.push(f(L,t))}),_h("Set",Sa.call(t),E,d)}if(wS(t))return Kl("WeakMap");if(ES(t))return Kl("WeakSet");if(SS(t))return Kl("WeakRef");if(pS(t))return xs(f(Number(t)));if(yS(t))return xs(f(tu.call(t)));if(gS(t))return xs(oS.call(t));if(mS(t))return xs(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof uh<"u"&&t===uh)return"{ [object globalThis] }";if(!fS(t)&&!Oh(t)){var C=Fi(t,f),k=Ph?Ph(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",A=!k&&Nt&&Object(t)===t&&Nt in t?gd.call(dr(t),8,-1):I?"Object":"",N=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",M=N+(A||I?"["+bn.call(Ch.call([],A||[],I||[]),": ")+"] ":"");return C.length===0?M+"{}":d?M+"{"+su(C,d)+"}":M+"{ "+bn.call(C,", ")+" }"}return String(t)};function _y(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function dS(e){return tr.call(String(e),/"/g,""")}function ou(e){return dr(e)==="[object Array]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function fS(e){return dr(e)==="[object Date]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function Oh(e){return dr(e)==="[object RegExp]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function hS(e){return dr(e)==="[object Error]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function mS(e){return dr(e)==="[object String]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function pS(e){return dr(e)==="[object Number]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function gS(e){return dr(e)==="[object Boolean]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function My(e){if(No)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!nu)return!1;try{return nu.call(e),!0}catch{}return!1}function yS(e){if(!e||typeof e!="object"||!tu)return!1;try{return tu.call(e),!0}catch{}return!1}var vS=Object.prototype.hasOwnProperty||function(e){return e in this};function Qn(e,t){return vS.call(e,t)}function dr(e){return sS.call(e)}function bS(e){if(e.name)return e.name;var t=aS.call(iS.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Dy(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 xS(e){if(!wa||!e||typeof e!="object")return!1;try{wa.call(e);try{Sa.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function wS(e){if(!Ms||!e||typeof e!="object")return!1;try{Ms.call(e,Ms);try{Ds.call(e,Ds)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function SS(e){if(!Th||!e||typeof e!="object")return!1;try{return Th.call(e),!0}catch{}return!1}function TS(e){if(!Sa||!e||typeof e!="object")return!1;try{Sa.call(e);try{wa.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ES(e){if(!Ds||!e||typeof e!="object")return!1;try{Ds.call(e,Ds);try{Ms.call(e,Ms)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function CS(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ny(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Ny(gd.call(e,0,t.maxStringLength),t)+r}var o=tr.call(tr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,RS);return _y(o,"single",t)}function RS(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":"")+lS.call(t.toString(16))}function xs(e){return"Object("+e+")"}function Kl(e){return e+" { ? }"}function _h(e,t,n,r){var o=r?su(n,r):bn.call(n,", ");return e+" ("+t+") {"+o+"}"}function PS(e){for(var t=0;t<e.length;t++)if(Dy(e[t],`
|
|
2
2
|
`)>=0)return!1;return!0}function kS(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=bn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:bn.call(Array(t+1),n)}}function su(e,t){if(e.length===0)return"";var n=`
|
|
3
3
|
`+t.prev+t.base;return n+bn.call(e,","+n)+`
|
|
4
|
-
`+t.prev}function Fi(e,t){var n=ou(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Qn(e,o)?t(e[o],e):""}var s=typeof ql=="function"?ql(e):[],i;if(No){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Qn(e,l)&&(n&&String(Number(l))===l&&l<e.length||No&&i["$"+l]instanceof Symbol||(Ay.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof ql=="function")for(var c=0;c<s.length;c++)Oy.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var jy=ts,ns=X1,IS=uS,AS=yi,Vi=jy("%WeakMap%",!0),$i=jy("%Map%",!0),OS=ns("WeakMap.prototype.get",!0),_S=ns("WeakMap.prototype.set",!0),MS=ns("WeakMap.prototype.has",!0),DS=ns("Map.prototype.get",!0),NS=ns("Map.prototype.set",!0),jS=ns("Map.prototype.has",!0),yd=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},LS=function(e,t){var n=yd(e,t);return n&&n.value},FS=function(e,t,n){var r=yd(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},VS=function(e,t){return!!yd(e,t)},$S=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new AS("Side channel does not contain "+IS(s))},get:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return OS(t,s)}else if($i){if(n)return DS(n,s)}else if(r)return LS(r,s)},has:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return MS(t,s)}else if($i){if(n)return jS(n,s)}else if(r)return VS(r,s);return!1},set:function(s,i){Vi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Vi),_S(t,s,i)):$i?(n||(n=new $i),NS(n,s,i)):(r||(r={key:{},next:null}),FS(r,s,i))}};return o},Mh=e=>Array.isArray(e),Zl=e=>e===void 0,Xl=e=>e===null,BS=Function.bind.call(Function.call,Object.prototype.toString),WS=e=>!!e&&BS(e)==="[object Error]"||e instanceof Error,Ly=(e,t)=>e instanceof t,zS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},HS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Ly(e,Date),Pt={array:Mh,date:HS,empty:e=>Xl(e)||Zl(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:Ly,isError:WS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Xl(e)||Zl(e),null:Xl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Mh(e)&&typeof e=="object",primitive:zS,string:e=>typeof e=="string",undefined:Zl},US=e=>Object.keys(e),wr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((s,i)=>s&&s[i],e);return o===void 0?n:o};const vd="-";function GS(e){const t=qS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(vd);return a[0]===""&&a.length!==1&&a.shift(),Fy(a,t)||YS(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Fy(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Fy(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(vd);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Dh=/^\[(.+)\]$/;function YS(e){if(Dh.test(e)){const t=Dh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function qS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ZS(Object.entries(e.classGroups),n).forEach(([s,i])=>{iu(i,r,s,t)}),r}function iu(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Nh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(KS(o)){iu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{iu(i,Nh(t,s),n,r)})})}function Nh(e,t){let n=e;return t.split(vd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function KS(e){return e.isThemeGetter}function ZS(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function XS(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const Vy="!";function QS(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let b=a[v];if(c===0){if(b===o&&(r||a.slice(v,v+s)===t)){l.push(a.slice(u,v)),u=v+s;continue}if(b==="/"){d=v;continue}}b==="["?c++:b==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Vy),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function JS(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 eT(e){return{cache:XS(e.cacheSize),parseClassName:QS(e),...GS(e)}}const tT=/\s+/;function nT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(tT).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=JS(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Vy:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function rT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=$y(t))&&(r&&(r+=" "),r+=n);return r}function $y(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$y(e[r]))&&(n&&(n+=" "),n+=t);return n}function oT(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=eT(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=nT(l,n);return o(l,u),u}return function(){return s(rT.apply(null,arguments))}}function Ze(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const By=/^\[(?:([a-z-]+):)?(.+)\]$/i,sT=/^\d+\/\d+$/,iT=new Set(["px","full","screen"]),aT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lT=/\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$/,cT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Ln(e){return Or(e)||iT.has(e)||sT.test(e)}function qn(e){return rs(e,"length",bT)}function Or(e){return!!e&&!Number.isNaN(Number(e))}function Bi(e){return rs(e,"number",Or)}function ws(e){return!!e&&Number.isInteger(Number(e))}function fT(e){return e.endsWith("%")&&Or(e.slice(0,-1))}function we(e){return By.test(e)}function Kn(e){return aT.test(e)}const hT=new Set(["length","size","percentage"]);function mT(e){return rs(e,hT,Wy)}function pT(e){return rs(e,"position",Wy)}const gT=new Set(["image","url"]);function yT(e){return rs(e,gT,wT)}function vT(e){return rs(e,"",xT)}function Ss(){return!0}function rs(e,t,n){const r=By.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function bT(e){return lT.test(e)&&!cT.test(e)}function Wy(){return!1}function xT(e){return uT.test(e)}function wT(e){return dT.test(e)}function ST(){const e=Ze("colors"),t=Ze("spacing"),n=Ze("blur"),r=Ze("brightness"),o=Ze("borderColor"),s=Ze("borderRadius"),i=Ze("borderSpacing"),a=Ze("borderWidth"),l=Ze("contrast"),c=Ze("grayscale"),u=Ze("hueRotate"),d=Ze("invert"),f=Ze("gap"),h=Ze("gradientColorStops"),p=Ze("gradientColorStopPositions"),m=Ze("inset"),v=Ze("margin"),b=Ze("opacity"),y=Ze("padding"),g=Ze("saturate"),T=Ze("scale"),x=Ze("sepia"),E=Ze("skew"),C=Ze("space"),k=Ze("translate"),I=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",we,t],O=()=>[we,t],L=()=>["",Ln,qn],P=()=>["auto",Or,we],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",we],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Or,Bi],Z=()=>[Or,we];return{cacheSize:500,separator:":",theme:{colors:[Ss],spacing:[Ln,qn],blur:["none","",Kn,we],brightness:$(),borderColor:[e],borderRadius:["none","","full",Kn,we],borderSpacing:O(),borderWidth:L(),contrast:$(),grayscale:z(),hueRotate:Z(),invert:z(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[fT,qn],inset:N(),margin:N(),opacity:$(),padding:O(),saturate:$(),scale:$(),sepia:z(),skew:Z(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",we]}],container:["container"],columns:[{columns:[Kn]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),we]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],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",ws,we]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",we]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",ws,we]}],"grid-cols":[{"grid-cols":[Ss]}],"col-start-end":[{col:["auto",{span:["full",ws,we]},we]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Ss]}],"row-start-end":[{row:["auto",{span:[ws,we]},we]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",we]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",we]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[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":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",we,t]}],"min-w":[{"min-w":[we,t,"min","max","fit"]}],"max-w":[{"max-w":[we,t,"none","full","min","max","fit","prose",{screen:[Kn]},Kn]}],h:[{h:[we,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[we,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[we,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[we,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kn,qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bi]}],"font-family":[{font:[Ss]}],"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",we]}],"line-clamp":[{"line-clamp":["none",Or,Bi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ln,we]}],"list-image":[{"list-image":["none",we]}],"list-style-type":[{list:["none","disc","decimal",we]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ln,qn]}],"underline-offset":[{"underline-offset":["auto",Ln,we]}],"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:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we]}],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",we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),pT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[Ln,we]}],"outline-w":[{outline:[Ln,qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Ln,qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kn,vT]}],"shadow-color":[{shadow:[Ss]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kn,we]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",we]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",we]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",we]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ws,we]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"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",we]}],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",we]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",we]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ln,qn,Bi]}],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 TT=oT(ST),bd=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},ET=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),CT=e=>Pt.function(e),Me=(...e)=>TT(Jw(e)),xd=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},bi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Jt=(e,t=2)=>e.toString(16).padStart(t,"0"),xi=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${Jt(t,4)+Jt(n,3)}-${Jt(r[0])+Jt(r[1])}-${Jt(r[2])+Jt(r[3])}-${Jt(r[4])+Jt(r[5])}-${Jt(r[6])+Jt(r[7])+Jt(r[8])+Jt(r[9])}`},jh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Lh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},wd=(e,t)=>{const n=jh(t,Lh.basic,e)||jh(t,Lh.extend,e);return n===void 0||n===e?void 0:n},Ta=()=>typeof window>"u",au=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),zy=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},RT=e=>!e,Sd=()=>{};function Hy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Hy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function PT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Hy(e))&&(r&&(r+=" "),r+=t);return r}const Fh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Vh=PT,os=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Vh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=Fh(u)||Fh(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...s,...a}[m]):{...s,...a}[m]===v})?[...c,d,f]:c},[]);return Vh(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},kT="span",ss=w.forwardRef(function(t,n){const r=t.as||kT;return S.jsx(r,{ref:n,...t,as:void 0})}),IT=os("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),jo=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return S.jsxs(ss,{...l,ref:c,type:s,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Me(IT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),Ys=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function AT(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const OT=({children:e,...t})=>{const n=Ys(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:AT(r.current));return w.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(d=>c.isIntersecting?!0:d)});return a.observe(i),()=>a.disconnect()},[]),S.jsx("div",{...t,ref:r,children:o?e:null})},_T=os("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),MT=os("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",muted:"bg-tag-muted-bg text-tag-muted-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"}}),Td=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return S.jsxs(ss,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:Me(MT({size:i,theme:s}),t),children:[n?S.jsx("span",{className:_T({theme:n})}):null,r,a.children]})}),qs=w.createContext({});function hn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const ml=w.createContext(null),Lo=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class DT extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function NT({children:e,isPresent:t,anchorX:n}){const r=w.useId(),o=w.useRef(null),s=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=w.useContext(Lo);return w.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u,right:d}=s.current;if(t||!o.current||!a||!l)return;const f=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const h=document.createElement("style");return i&&(h.nonce=i),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
4
|
+
`+t.prev}function Fi(e,t){var n=ou(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Qn(e,o)?t(e[o],e):""}var s=typeof ql=="function"?ql(e):[],i;if(No){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Qn(e,l)&&(n&&String(Number(l))===l&&l<e.length||No&&i["$"+l]instanceof Symbol||(Ay.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof ql=="function")for(var c=0;c<s.length;c++)Oy.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var jy=ts,ns=X1,IS=uS,AS=yi,Vi=jy("%WeakMap%",!0),$i=jy("%Map%",!0),OS=ns("WeakMap.prototype.get",!0),_S=ns("WeakMap.prototype.set",!0),MS=ns("WeakMap.prototype.has",!0),DS=ns("Map.prototype.get",!0),NS=ns("Map.prototype.set",!0),jS=ns("Map.prototype.has",!0),yd=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},LS=function(e,t){var n=yd(e,t);return n&&n.value},FS=function(e,t,n){var r=yd(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},VS=function(e,t){return!!yd(e,t)},$S=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new AS("Side channel does not contain "+IS(s))},get:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return OS(t,s)}else if($i){if(n)return DS(n,s)}else if(r)return LS(r,s)},has:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return MS(t,s)}else if($i){if(n)return jS(n,s)}else if(r)return VS(r,s);return!1},set:function(s,i){Vi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Vi),_S(t,s,i)):$i?(n||(n=new $i),NS(n,s,i)):(r||(r={key:{},next:null}),FS(r,s,i))}};return o},Mh=e=>Array.isArray(e),Zl=e=>e===void 0,Xl=e=>e===null,BS=Function.bind.call(Function.call,Object.prototype.toString),WS=e=>!!e&&BS(e)==="[object Error]"||e instanceof Error,Ly=(e,t)=>e instanceof t,zS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},HS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Ly(e,Date),it={array:Mh,date:HS,empty:e=>Xl(e)||Zl(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:Ly,isError:WS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Xl(e)||Zl(e),null:Xl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Mh(e)&&typeof e=="object",primitive:zS,string:e=>typeof e=="string",undefined:Zl},US=e=>Object.keys(e),wr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((s,i)=>s&&s[i],e);return o===void 0?n:o};const vd="-";function GS(e){const t=qS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(vd);return a[0]===""&&a.length!==1&&a.shift(),Fy(a,t)||YS(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Fy(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Fy(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(vd);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Dh=/^\[(.+)\]$/;function YS(e){if(Dh.test(e)){const t=Dh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function qS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ZS(Object.entries(e.classGroups),n).forEach(([s,i])=>{iu(i,r,s,t)}),r}function iu(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Nh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(KS(o)){iu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{iu(i,Nh(t,s),n,r)})})}function Nh(e,t){let n=e;return t.split(vd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function KS(e){return e.isThemeGetter}function ZS(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function XS(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const Vy="!";function QS(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let b=a[v];if(c===0){if(b===o&&(r||a.slice(v,v+s)===t)){l.push(a.slice(u,v)),u=v+s;continue}if(b==="/"){d=v;continue}}b==="["?c++:b==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Vy),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function JS(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 eT(e){return{cache:XS(e.cacheSize),parseClassName:QS(e),...GS(e)}}const tT=/\s+/;function nT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(tT).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=JS(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Vy:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function rT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=$y(t))&&(r&&(r+=" "),r+=n);return r}function $y(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$y(e[r]))&&(n&&(n+=" "),n+=t);return n}function oT(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=eT(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=nT(l,n);return o(l,u),u}return function(){return s(rT.apply(null,arguments))}}function Ze(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const By=/^\[(?:([a-z-]+):)?(.+)\]$/i,sT=/^\d+\/\d+$/,iT=new Set(["px","full","screen"]),aT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lT=/\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$/,cT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Ln(e){return Or(e)||iT.has(e)||sT.test(e)}function qn(e){return rs(e,"length",bT)}function Or(e){return!!e&&!Number.isNaN(Number(e))}function Bi(e){return rs(e,"number",Or)}function ws(e){return!!e&&Number.isInteger(Number(e))}function fT(e){return e.endsWith("%")&&Or(e.slice(0,-1))}function we(e){return By.test(e)}function Kn(e){return aT.test(e)}const hT=new Set(["length","size","percentage"]);function mT(e){return rs(e,hT,Wy)}function pT(e){return rs(e,"position",Wy)}const gT=new Set(["image","url"]);function yT(e){return rs(e,gT,wT)}function vT(e){return rs(e,"",xT)}function Ss(){return!0}function rs(e,t,n){const r=By.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function bT(e){return lT.test(e)&&!cT.test(e)}function Wy(){return!1}function xT(e){return uT.test(e)}function wT(e){return dT.test(e)}function ST(){const e=Ze("colors"),t=Ze("spacing"),n=Ze("blur"),r=Ze("brightness"),o=Ze("borderColor"),s=Ze("borderRadius"),i=Ze("borderSpacing"),a=Ze("borderWidth"),l=Ze("contrast"),c=Ze("grayscale"),u=Ze("hueRotate"),d=Ze("invert"),f=Ze("gap"),h=Ze("gradientColorStops"),p=Ze("gradientColorStopPositions"),m=Ze("inset"),v=Ze("margin"),b=Ze("opacity"),y=Ze("padding"),g=Ze("saturate"),T=Ze("scale"),S=Ze("sepia"),E=Ze("skew"),C=Ze("space"),k=Ze("translate"),I=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",we,t],M=()=>[we,t],L=()=>["",Ln,qn],P=()=>["auto",Or,we],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",we],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Or,Bi],K=()=>[Or,we];return{cacheSize:500,separator:":",theme:{colors:[Ss],spacing:[Ln,qn],blur:["none","",Kn,we],brightness:$(),borderColor:[e],borderRadius:["none","","full",Kn,we],borderSpacing:M(),borderWidth:L(),contrast:$(),grayscale:H(),hueRotate:K(),invert:H(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[fT,qn],inset:N(),margin:N(),opacity:$(),padding:M(),saturate:$(),scale:$(),sepia:H(),skew:K(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",we]}],container:["container"],columns:[{columns:[Kn]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),we]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],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",ws,we]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",we]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",ws,we]}],"grid-cols":[{"grid-cols":[Ss]}],"col-start-end":[{col:["auto",{span:["full",ws,we]},we]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Ss]}],"row-start-end":[{row:["auto",{span:[ws,we]},we]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",we]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",we]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[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":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",we,t]}],"min-w":[{"min-w":[we,t,"min","max","fit"]}],"max-w":[{"max-w":[we,t,"none","full","min","max","fit","prose",{screen:[Kn]},Kn]}],h:[{h:[we,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[we,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[we,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[we,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kn,qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bi]}],"font-family":[{font:[Ss]}],"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",we]}],"line-clamp":[{"line-clamp":["none",Or,Bi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ln,we]}],"list-image":[{"list-image":["none",we]}],"list-style-type":[{list:["none","disc","decimal",we]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ln,qn]}],"underline-offset":[{"underline-offset":["auto",Ln,we]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we]}],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",we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),pT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[Ln,we]}],"outline-w":[{outline:[Ln,qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Ln,qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kn,vT]}],"shadow-color":[{shadow:[Ss]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kn,we]}],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":[b]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",we]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",we]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",we]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ws,we]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"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",we]}],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",we]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",we]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ln,qn,Bi]}],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 TT=oT(ST),bd=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},ET=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),CT=e=>it.function(e),Me=(...e)=>TT(Jw(e)),xd=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},bi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},Jt=(e,t=2)=>e.toString(16).padStart(t,"0"),xi=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${Jt(t,4)+Jt(n,3)}-${Jt(r[0])+Jt(r[1])}-${Jt(r[2])+Jt(r[3])}-${Jt(r[4])+Jt(r[5])}-${Jt(r[6])+Jt(r[7])+Jt(r[8])+Jt(r[9])}`},jh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Lh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},wd=(e,t)=>{const n=jh(t,Lh.basic,e)||jh(t,Lh.extend,e);return n===void 0||n===e?void 0:n},Ta=()=>typeof window>"u",au=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),zy=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},RT=e=>!e,Sd=()=>{};function Hy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Hy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function PT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Hy(e))&&(r&&(r+=" "),r+=t);return r}const Fh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Vh=PT,os=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Vh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=Fh(u)||Fh(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...s,...a}[m]):{...s,...a}[m]===v})?[...c,d,f]:c},[]);return Vh(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},kT="span",ss=x.forwardRef(function(t,n){const r=t.as||kT;return w.jsx(r,{ref:n,...t,as:void 0})}),IT=os("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-primary text-primary-foreground",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),jo=x.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return w.jsxs(ss,{...l,ref:c,type:s,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Me(IT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),Ys=e=>{const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t};function AT(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const OT=({children:e,...t})=>{const n=Ys(t.onIntersection),r=x.useRef(null),[o,s]=x.useState(()=>r.current===null?!1:AT(r.current));return x.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(d=>c.isIntersecting?!0:d)});return a.observe(i),()=>a.disconnect()},[]),w.jsx("div",{...t,ref:r,children:o?e:null})},_T=os("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),MT=os("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",muted:"bg-tag-muted-bg text-tag-muted-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"}}),Td=x.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return w.jsxs(ss,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:Me(MT({size:i,theme:s}),t),children:[n?w.jsx("span",{className:_T({theme:n})}):null,r,a.children]})}),qs=x.createContext({});function hn(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const ml=x.createContext(null),Lo=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class DT extends R.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function NT({children:e,isPresent:t,anchorX:n}){const r=x.useId(),o=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=x.useContext(Lo);return x.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u,right:d}=s.current;if(t||!o.current||!a||!l)return;const f=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const h=document.createElement("style");return i&&(h.nonce=i),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
5
5
|
[data-motion-pop-id="${r}"] {
|
|
6
6
|
position: absolute !important;
|
|
7
7
|
width: ${a}px !important;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
${f}px !important;
|
|
10
10
|
top: ${c}px !important;
|
|
11
11
|
}
|
|
12
|
-
`),()=>{document.head.removeChild(h)}},[t]),S.jsx(DT,{isPresent:t,childRef:o,sizeRef:s,children:R.cloneElement(e,{ref:o})})}const jT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=hn(LT),c=w.useId(),u=w.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=w.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return w.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),R.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=S.jsx(NT,{isPresent:n,anchorX:a,children:e})),S.jsx(ml.Provider,{value:d,children:e})};function LT(){return new Map}function Uy(e=!0){const t=w.useContext(ml);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=w.useId();w.useEffect(()=>{if(e)return o(s)},[e]);const i=w.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Wi=e=>e.key||"";function $h(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Ed=typeof window<"u",pl=Ed?w.useLayoutEffect:w.useEffect,fr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left"})=>{const[l,c]=Uy(i),u=w.useMemo(()=>$h(e),[e]),d=i&&!l?[]:u.map(Wi),f=w.useRef(!0),h=w.useRef(u),p=hn(()=>new Map),[m,v]=w.useState(u),[b,y]=w.useState(u);pl(()=>{f.current=!1,h.current=u;for(let x=0;x<b.length;x++){const E=Wi(b[x]);d.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[b,d.length,d.join("-")]);const g=[];if(u!==m){let x=[...u];for(let E=0;E<b.length;E++){const C=b[E],k=Wi(C);d.includes(k)||(x.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(x=g),y($h(x)),v(u),null}process.env.NODE_ENV!=="production"&&s==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=w.useContext(qs);return S.jsx(S.Fragment,{children:b.map(x=>{const E=Wi(x),C=i&&!l?!1:u===b||d.includes(E),k=()=>{if(p.has(E))p.set(E,!0);else return;let I=!0;p.forEach(A=>{A||(I=!1)}),I&&(T==null||T(),y(h.current),i&&(c==null||c()),r&&r())};return S.jsx(jT,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:k,anchorX:a,children:x},E)})})},FT=w.createContext(null);function VT(){const e=w.useRef(!1);return pl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Ht=e=>e;let is=Ht,on=Ht;process.env.NODE_ENV!=="production"&&(is=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},on=(e,t)=>{if(!e)throw new Error(t)});const $T={skipAnimations:!1,useManualTiming:!1},zi=["read","resolveKeyframes","update","preRender","render","postRender"],Bh={value:null,addProjectionMetrics:null};function BT(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Bh.value&&Bh.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const WT=40;function Gy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=zi.reduce((b,y)=>(b[y]=BT(s,t?y:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,WT),1),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:zi.reduce((b,y)=>{const g=i[y];return b[y]=(T,x=!1,E=!1)=>(n||p(),g.schedule(T,x,E)),b},{}),cancel:b=>{for(let y=0;y<zi.length;y++)i[zi[y]].cancel(b)},state:o,steps:i}}const{schedule:Ue,cancel:Bn,state:Rt,steps:Ql}=Gy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ht,!0);function zT(){const e=VT(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Ue.postRender(r),[r]),t]}const HT=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Wh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(HT);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 Yy=e=>e===!0,UT=e=>Yy(e===!0)||e==="id",GT=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(qs),o=w.useContext(FT),[s,i]=zT(),a=w.useRef(null),l=r.id||o;a.current===null&&(UT(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Yy(n)&&r.group||Wh()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return S.jsx(qs.Provider,{value:c,children:e})},qy=w.createContext({strict:!1}),zh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fo={};for(const e in zh)Fo[e]={isEnabled:t=>zh[e].some(n=>!!t[n])};function YT(e){for(const t in e)Fo[t]={...Fo[t],...e[t]}}const qT=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 Ea(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qT.has(e)}let Ky=e=>!Ea(e);function Zy(e){e&&(Ky=t=>t.startsWith("on")?!Ea(t):e(t))}try{Zy(require("@emotion/is-prop-valid").default)}catch{}function KT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ky(o)||n===!0&&Ea(o)||!t&&!Ea(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function ZT({children:e,isValidProp:t,...n}){t&&Zy(t),n={...w.useContext(Lo),...n},n.isStatic=hn(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return S.jsx(Lo.Provider,{value:r,children:e})}const Hh=new Set;function gl(e,t,n){e||Hh.has(t)||(console.warn(t),Hh.add(t))}function XT(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&gl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const yl=w.createContext({});function vl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ks(e){return typeof e=="string"||Array.isArray(e)}const Cd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rd=["initial",...Cd];function bl(e){return vl(e.animate)||Rd.some(t=>Ks(e[t]))}function Xy(e){return!!(bl(e)||e.variants)}function QT(e,t){if(bl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ks(n)?n:void 0,animate:Ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function JT(e){const{initial:t,animate:n}=QT(e,w.useContext(yl));return w.useMemo(()=>({initial:t,animate:n}),[Uh(t),Uh(n)])}function Uh(e){return Array.isArray(e)?e.join(" "):e}const eE=Symbol.for("motionComponentSymbol");function yo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tE(e,t,n){return w.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):yo(n)&&(n.current=r))},[t])}const Pd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),nE="framerAppearId",Qy="data-"+Pd(nE),{schedule:kd,cancel:x$}=Gy(queueMicrotask,!1),Jy=w.createContext({});function rE(e,t,n,r,o){var s,i;const{visualElement:a}=w.useContext(yl),l=w.useContext(qy),c=w.useContext(ml),u=w.useContext(Lo).reducedMotion,d=w.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=w.useContext(Jy);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&oE(d.current,n,o,h);const p=w.useRef(!1);w.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[Qy],v=w.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return pl(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),kd.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),w.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),v.current=!1))}),f}function oE(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ev(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&yo(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ev(e){if(e)return e.options.allowProjection!==!1?e.projection:ev(e.parent)}function sE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&YT(e);function a(c,u){let d;const f={...w.useContext(Lo),...c,layoutId:iE(c)},{isStatic:h}=f,p=JT(c),m=r(c,h);if(!h&&Ed){aE(f,e);const v=lE(f);d=v.MeasureLayout,p.visualElement=rE(o,m,f,t,v.ProjectionNode)}return S.jsxs(yl.Provider,{value:p,children:[d&&p.visualElement?S.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,tE(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=w.forwardRef(a);return l[eE]=o,l}function iE({layoutId:e}){const t=w.useContext(qs).id;return t&&e!==void 0?t+"-"+e:e}function aE(e,t){const n=w.useContext(qy).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?is(!1,r):on(!1,r)}}function lE(e){const{drag:t,layout:n}=Fo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const tv=e=>t=>typeof t=="string"&&t.startsWith(e),Id=tv("--"),cE=tv("var(--"),Ad=e=>cE(e)?uE.test(e.split("/*")[0].trim()):!1,uE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zs={};function dE(e){for(const t in e)Zs[t]=e[t],Id(t)&&(Zs[t].isCSSVariable=!0)}const as=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qr=new Set(as);function nv(e,{layout:t,layoutId:n}){return qr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zs[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),rv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wn=(e,t,n)=>n>t?t:n<e?e:n,ls={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xs={...ls,transform:e=>Wn(0,1,e)},Hi={...ls,default:1},wi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xn=wi("deg"),Pn=wi("%"),me=wi("px"),fE=wi("vh"),hE=wi("vw"),Gh={...Pn,parse:e=>Pn.parse(e)/100,transform:e=>Pn.transform(e*100)},mE={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,radius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,backgroundPositionX:me,backgroundPositionY:me},pE={rotate:Xn,rotateX:Xn,rotateY:Xn,rotateZ:Xn,scale:Hi,scaleX:Hi,scaleY:Hi,scaleZ:Hi,skew:Xn,skewX:Xn,skewY:Xn,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Xs,originX:Gh,originY:Gh,originZ:me},Yh={...ls,transform:Math.round},Od={...mE,...pE,zIndex:Yh,size:me,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:Yh},gE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yE=as.length;function vE(e,t,n){let r="",o=!0;for(let s=0;s<yE;s++){const i=as[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=rv(a,Od[i]);if(!l){o=!1;const u=gE[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function _d(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(qr.has(l)){i=!0;continue}else if(Id(l)){o[l]=c;continue}else{const u=rv(c,Od[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=vE(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const Md=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ov(e,t,n){for(const r in t)!xt(t[r])&&!nv(r,n)&&(e[r]=t[r])}function bE({transformTemplate:e},t){return w.useMemo(()=>{const n=Md();return _d(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xE(e,t){const n=e.style||{},r={};return ov(r,n,e),Object.assign(r,bE(e,t)),r}function wE(e,t){const n={},r=xE(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 SE=["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 Dd(e){return typeof e!="string"||e.includes("-")?!1:!!(SE.indexOf(e)>-1||/[A-Z]/u.test(e))}const TE={offset:"stroke-dashoffset",array:"stroke-dasharray"},EE={offset:"strokeDashoffset",array:"strokeDasharray"};function CE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?TE:EE;e[s.offset]=me.transform(-r);const i=me.transform(t),a=me.transform(n);e[s.array]=`${i} ${a}`}function qh(e,t,n){return typeof e=="string"?e:me.transform(t+n*e)}function RE(e,t,n){const r=qh(t,e.x,e.width),o=qh(n,e.y,e.height);return`${r} ${o}`}function Nd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(_d(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=RE(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&CE(f,i,a,l,!1)}const sv=()=>({...Md(),attrs:{}}),jd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function PE(e,t,n,r){const o=w.useMemo(()=>{const s=sv();return Nd(s,t,jd(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};ov(s,e.style,e),o.style={...s,...o.style}}return o}function kE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Dd(n)?PE:wE)(r,s,i,n),c=KT(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=w.useMemo(()=>xt(d)?d.get():d,[d]);return w.createElement(n,{...u,children:f})}}function Kh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ld(e,t,n,r){if(typeof t=="function"){const[o,s]=Kh(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Kh(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const lu=e=>Array.isArray(e),IE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),AE=e=>lu(e)?e[e.length-1]||0:e;function aa(e){const t=xt(e)?e.get():e;return IE(t)?t.toValue():t}function OE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:_E(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const iv=e=>(t,n)=>{const r=w.useContext(yl),o=w.useContext(ml),s=()=>OE(e,t,r,o);return n?s():hn(s)};function _E(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=aa(s[f]);let{initial:i,animate:a}=e;const l=bl(e),c=Xy(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!vl(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Ld(e,f[h]);if(p){const{transitionEnd:m,transition:v,...b}=p;for(const y in b){let g=b[y];if(Array.isArray(g)){const T=u?g.length-1:0;g=g[T]}g!==null&&(o[y]=g)}for(const y in m)o[y]=m[y]}}}return o}function Fd(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(xt(o[i])||t.style&&xt(t.style[i])||nv(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const ME={useVisualState:iv({scrapeMotionValuesFromProps:Fd,createRenderState:Md})};function av(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function lv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const cv=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 uv(e,t,n,r){lv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(cv.has(o)?o:Pd(o),t.attrs[o])}function dv(e,t,n){const r=Fd(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const s=as.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const Zh=["x","y","width","height","cx","cy","r"],DE={useVisualState:iv({scrapeMotionValuesFromProps:dv,createRenderState:sv,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(qr.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<Zh.length;a++){const l=Zh[a];e[l]!==t[l]&&(i=!0)}i&&Ue.read(()=>{av(n,r),Ue.render(()=>{Nd(r,o,jd(n.tagName),e.transformTemplate),uv(n,r)})})}})};function NE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...Dd(r)?DE:ME,preloadedFeatures:e,useRender:kE(o),createVisualElement:t,Component:r};return sE(i)}}function Qs(e,t,n){const r=e.getProps();return Ld(r,t,n!==void 0?n:r.custom,e)}function Vd(e,t){return e?e[t]||e.default||e:void 0}const fv=new Set(["width","height","top","left","right","bottom",...as]);let la;function jE(){la=void 0}const kn={now:()=>(la===void 0&&kn.set(Rt.isProcessing||$T.useManualTiming?Rt.timestamp:performance.now()),la),set:e=>{la=e,queueMicrotask(jE)}};function $d(e,t){e.indexOf(t)===-1&&e.push(t)}function xl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function LE([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}class Bd{constructor(){this.subscriptions=[]}add(t){return $d(this.subscriptions,t),()=>xl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function hv(e,t){return t?e*(1e3/t):0}const Xh=30,FE=e=>!isNaN(parseFloat(e)),Ns={current:void 0};class VE{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=kn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=FE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gl(!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 Bd);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ue.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 Ns.current&&Ns.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Xh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Xh);return hv(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 Vo(e,t){return new VE(e,t)}function $E(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vo(n))}function BE(e,t){const n=Qs(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=AE(s[i]);$E(e,i,a)}}function WE(e){return!!(xt(e)&&e.add)}function cu(e,t){const n=e.getValue("willChange");if(WE(n))return n.add(t)}function mv(e){return e.props[Qy]}function Wd(e){let t;return()=>(t===void 0&&(t=e()),t)}const zE=Wd(()=>window.ScrollTimeline!==void 0);class HE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(zE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class pv extends HE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const un=e=>e*1e3,In=e=>e/1e3;function wl(e){return typeof e=="function"}function Qh(e,t){e.timeline=t,e.onfinish=null}const zd=e=>Array.isArray(e)&&typeof e[0]=="number",UE={linearEasing:void 0};function GE(e,t){const n=Wd(e);return()=>{var r;return(r=UE[t])!==null&&r!==void 0?r:n()}}const Ca=GE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},gv=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Vr(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function yv(e){return!!(typeof e=="function"&&Ca()||!e||typeof e=="string"&&(e in uu||Ca())||zd(e)||Array.isArray(e)&&e.every(yv))}const Ps=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ps([0,.65,.55,1]),circOut:Ps([.55,0,1,.45]),backIn:Ps([.31,.01,.66,-.59]),backOut:Ps([.33,1.53,.69,.99])};function vv(e,t){if(e)return typeof e=="function"&&Ca()?gv(e,t):zd(e)?Ps(e):Array.isArray(e)?e.map(n=>vv(n,t)||uu.easeOut):uu[e]}const bv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,YE=1e-7,qE=12;function KE(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=bv(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>YE&&++a<qE);return i}function Si(e,t,n,r){if(e===t&&n===r)return Ht;const o=s=>KE(s,0,1,e,n);return s=>s===0||s===1?s:bv(o(s),t,r)}const xv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wv=e=>t=>1-e(1-t),Sv=Si(.33,1.53,.69,.99),Hd=wv(Sv),Tv=xv(Hd),Ev=e=>(e*=2)<1?.5*Hd(e):.5*(2-Math.pow(2,-10*(e-1))),Ud=e=>1-Math.sin(Math.acos(e)),Cv=wv(Ud),Rv=xv(Ud),Pv=e=>/^0[^.\s]+$/u.test(e);function ZE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Pv(e):!0}const js=e=>Math.round(e*1e5)/1e5,Gd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function XE(e){return e==null}const QE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yd=(e,t)=>n=>!!(typeof n=="string"&&QE.test(n)&&n.startsWith(e)||t&&!XE(n)&&Object.prototype.hasOwnProperty.call(n,t)),kv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(Gd);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},JE=e=>Wn(0,255,e),Jl={...ls,transform:e=>Math.round(JE(e))},_r={test:Yd("rgb","red"),parse:kv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Jl.transform(e)+", "+Jl.transform(t)+", "+Jl.transform(n)+", "+js(Xs.transform(r))+")"};function eC(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 du={test:Yd("#"),parse:eC,transform:_r.transform},vo={test:Yd("hsl","hue"),parse:kv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pn.transform(js(t))+", "+Pn.transform(js(n))+", "+js(Xs.transform(r))+")"},Ot={test:e=>_r.test(e)||du.test(e)||vo.test(e),parse:e=>_r.test(e)?_r.parse(e):vo.test(e)?vo.parse(e):du.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_r.transform(e):vo.transform(e)},tC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Gd))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(tC))===null||n===void 0?void 0:n.length)||0)>0}const Iv="number",Av="color",rC="var",oC="var(",Jh="${}",sC=/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 Js(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(sC,l=>(Ot.test(l)?(r.color.push(s),o.push(Av),n.push(Ot.parse(l))):l.startsWith(oC)?(r.var.push(s),o.push(rC),n.push(l)):(r.number.push(s),o.push(Iv),n.push(parseFloat(l))),++s,Jh)).split(Jh);return{values:n,split:a,indexes:r,types:o}}function Ov(e){return Js(e).values}function _v(e){const{split:t,types:n}=Js(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Iv?s+=js(o[i]):a===Av?s+=Ot.transform(o[i]):s+=o[i]}return s}}const iC=e=>typeof e=="number"?0:e;function aC(e){const t=Ov(e);return _v(e)(t.map(iC))}const sr={test:nC,parse:Ov,createTransformer:_v,getAnimatableNone:aC},lC=new Set(["brightness","contrast","saturate","opacity"]);function cC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Gd)||[];if(!r)return e;const o=n.replace(r,"");let s=lC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const uC=/\b([a-z-]*)\(.*?\)/gu,fu={...sr,getAnimatableNone:e=>{const t=e.match(uC);return t?t.map(cC).join(" "):e}},dC={...Od,color:Ot,backgroundColor:Ot,outlineColor:Ot,fill:Ot,stroke:Ot,borderColor:Ot,borderTopColor:Ot,borderRightColor:Ot,borderBottomColor:Ot,borderLeftColor:Ot,filter:fu,WebkitFilter:fu},qd=e=>dC[e];function Mv(e,t){let n=qd(e);return n!==fu&&(n=sr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fC=new Set(["auto","none","0"]);function hC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!fC.has(s)&&Js(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Mv(n,o)}const em=e=>e===ls||e===me,tm=(e,t)=>parseFloat(e.split(", ")[t]),nm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return tm(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?tm(s[1],e):0}},mC=new Set(["x","y","z"]),pC=as.filter(e=>!mC.has(e));function gC(e){const t=[];return pC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $o={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:nm(4,13),y:nm(5,14)};$o.translateX=$o.x;$o.translateY=$o.y;const Lr=new Set;let hu=!1,mu=!1;function Dv(){if(mu){const e=Array.from(Lr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=gC(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}mu=!1,hu=!1,Lr.forEach(e=>e.complete()),Lr.clear()}function Nv(){Lr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mu=!0)})}function yC(){Nv(),Dv()}class Kd{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Lr.add(this),hu||(hu=!0,Ue.read(Nv),Ue.resolveKeyframes(Dv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Lr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Lr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bC(e){const t=vC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const xC=4;function Lv(e,t,n=1){on(n<=xC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=bC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return jv(i)?parseFloat(i):i}return Ad(o)?Lv(o,t,n+1):o}const Fv=e=>t=>t.test(e),wC={test:e=>e==="auto",parse:e=>e},Vv=[ls,me,Pn,Xn,hE,fE,wC],rm=e=>Vv.find(Fv(e));class $v extends Kd{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Ad(c))){const u=Lv(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!fv.has(r)||t.length!==2)return;const[o,s]=t,i=rm(o),a=rm(s);if(i!==a)if(em(i)&&em(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++)ZE(t[o])&&r.push(o);r.length&&hC(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$o[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=$o[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const om=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sr.test(e)||e==="0")&&!e.startsWith("url("));function SC(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 TC(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=om(o,t),a=om(s,t);return is(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:SC(e)||(n==="spring"||wl(n))&&r}const EC=e=>e!==null;function Sl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(EC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const CC=40;class Bv{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=kn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>CC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&yC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!TC(t,r,o,s))if(i)this.options.duration=0;else{l&&l(Sl(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ra=2e4;function Zd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ra;)t+=n,r=e.next(t);return t>=Ra?1/0:t}const Qe=(e,t,n)=>e+(t-e)*n;function ec(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 RC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=ec(l,a,e+1/3),s=ec(l,a,e),i=ec(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Pa(e,t){return n=>n>0?t:e}const tc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},PC=[du,_r,vo],kC=e=>PC.find(t=>t.test(e));function sm(e){const t=kC(e);if(is(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===vo&&(n=RC(n)),n}const im=(e,t)=>{const n=sm(e),r=sm(t);if(!n||!r)return Pa(e,t);const o={...n};return s=>(o.red=tc(n.red,r.red,s),o.green=tc(n.green,r.green,s),o.blue=tc(n.blue,r.blue,s),o.alpha=Qe(n.alpha,r.alpha,s),_r.transform(o))},IC=(e,t)=>n=>t(e(n)),Ti=(...e)=>e.reduce(IC),pu=new Set(["none","hidden"]);function AC(e,t){return pu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OC(e,t){return n=>Qe(e,t,n)}function Xd(e){return typeof e=="number"?OC:typeof e=="string"?Ad(e)?Pa:Ot.test(e)?im:DC:Array.isArray(e)?Wv:typeof e=="object"?Ot.test(e)?im:_C:Pa}function Wv(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Xd(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function _C(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Xd(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function MC(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const DC=(e,t)=>{const n=sr.createTransformer(t),r=Js(e),o=Js(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?pu.has(e)&&!o.values.length||pu.has(t)&&!r.values.length?AC(e,t):Ti(Wv(MC(r,o),o.values),n):(is(!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.`),Pa(e,t))};function zv(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qe(e,t,n):Xd(e)(e,t)}const NC=5;function Hv(e,t,n){const r=Math.max(t-NC,0);return hv(n-e(r),t-r)}const rt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},nc=.001;function jC({duration:e=rt.duration,bounce:t=rt.bounce,velocity:n=rt.velocity,mass:r=rt.mass}){let o,s;is(e<=un(rt.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Wn(rt.minDamping,rt.maxDamping,i),e=Wn(rt.minDuration,rt.maxDuration,In(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=gu(c,i),p=Math.exp(-d);return nc-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=gu(Math.pow(c,2),i);return(-o(c)+nc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-nc+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=FC(o,s,a);if(e=un(e),isNaN(l))return{stiffness:rt.stiffness,damping:rt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const LC=12;function FC(e,t,n){let r=n;for(let o=1;o<LC;o++)r=r-e(r)/t(r);return r}function gu(e,t){return e*Math.sqrt(1-t*t)}const VC=["duration","bounce"],$C=["stiffness","damping","mass"];function am(e,t){return t.some(n=>e[n]!==void 0)}function BC(e){let t={velocity:rt.velocity,stiffness:rt.stiffness,damping:rt.damping,mass:rt.mass,isResolvedFromDuration:!1,...e};if(!am(e,$C)&&am(e,VC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Wn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:rt.mass,stiffness:o,damping:s}}else{const n=jC(e);t={...t,...n,mass:rt.mass},t.isResolvedFromDuration=!0}return t}function Qd(e=rt.visualDuration,t=rt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=BC({...n,velocity:-In(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),v=i-s,b=In(Math.sqrt(l/u)),y=Math.abs(v)<5;r||(r=y?rt.restSpeed.granular:rt.restSpeed.default),o||(o=y?rt.restDelta.granular:rt.restDelta.default);let g;if(m<1){const x=gu(b,m);g=E=>{const C=Math.exp(-m*b*E);return i-C*((p+m*b*v)/x*Math.sin(x*E)+v*Math.cos(x*E))}}else if(m===1)g=x=>i-Math.exp(-b*x)*(v+(p+b*v)*x);else{const x=b*Math.sqrt(m*m-1);g=E=>{const C=Math.exp(-m*b*E),k=Math.min(x*E,300);return i-C*((p+m*b*v)*Math.sinh(k)+x*v*Math.cosh(k))/x}}const T={calculatedDuration:h&&d||null,next:x=>{const E=g(x);if(h)a.done=x>=d;else{let C=0;m<1&&(C=x===0?un(p):Hv(g,x,E));const k=Math.abs(C)<=r,I=Math.abs(i-E)<=o;a.done=k&&I}return a.value=a.done?i:E,a},toString:()=>{const x=Math.min(Zd(T),Ra),E=gv(C=>T.next(x*C).value,x,30);return x+"ms "+E}};return T}function lm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=k=>a!==void 0&&k<a||l!==void 0&&k>l,p=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let m=n*t;const v=d+m,b=i===void 0?v:i(v);b!==v&&(m=b-d);const y=k=>-m*Math.exp(-k/r),g=k=>b+y(k),T=k=>{const I=y(k),A=g(k);f.done=Math.abs(I)<=c,f.value=f.done?b:A};let x,E;const C=k=>{h(f.value)&&(x=k,E=Qd({keyframes:[f.value,p(f.value)],velocity:Hv(g,k,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!E&&x===void 0&&(I=!0,T(k),C(k)),x!==void 0&&k>=x?E.next(k-x):(!I&&T(k),f)}}}const WC=Si(.42,0,1,1),zC=Si(0,0,.58,1),Uv=Si(.42,0,.58,1),Gv=e=>Array.isArray(e)&&typeof e[0]!="number",cm={linear:Ht,easeIn:WC,easeInOut:Uv,easeOut:zC,circIn:Ud,circInOut:Rv,circOut:Cv,backIn:Hd,backInOut:Tv,backOut:Sv,anticipate:Ev},yu=e=>{if(zd(e)){on(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Si(t,n,r,o)}else if(typeof e=="string")return on(cm[e]!==void 0,`Invalid easing type '${e}'`),cm[e];return e};function HC(e,t,n){const r=[],o=n||zv,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Ht:t;a=Ti(l,a)}r.push(a)}return r}function Yv(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(on(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=HC(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Vr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Wn(e[0],e[s-1],u)):c}function qv(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Vr(0,t,r);e.push(Qe(n,1,o))}}function Kv(e){const t=[0];return qv(t,e.length-1),t}function UC(e,t){return e.map(n=>n*t)}function GC(e,t){return e.map(()=>t||Uv).splice(0,e.length-1)}function Ls({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Gv(r)?r.map(yu):yu(r),s={done:!1,value:t[0]},i=UC(n&&n.length===t.length?n:Kv(t),e),a=Yv(i,t,{ease:Array.isArray(o)?o:GC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const YC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ue.update(t,!0),stop:()=>Bn(t),now:()=>Rt.isProcessing?Rt.timestamp:kn.now()}},qC={decay:lm,inertia:lm,tween:Ls,keyframes:Ls,spring:Qd},KC=e=>e/100;class Jd extends Bv{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||Kd,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=wl(n)?n:qC[n]||Ls;let l,c;process.env.NODE_ENV!=="production"&&a!==Ls&&on(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Ls&&typeof t[0]!="number"&&(l=Ti(KC,zv(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Zd(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate: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 b=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/d)):p==="mirror"&&(T=i)),g=Wn(0,1,A)*d}const x=y?{done:!1,value:l[0]}:T.next(g);a&&(x.value=a(x.value));let{done:E}=x;!y&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(x.value=Sl(l,this.options,o)),v&&v(x.value),C&&this.finish(),x}get duration(){const{resolved:t}=this;return t?In(t.calculatedDuration):0}get time(){return In(this.currentTime)}set time(t){t=un(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=In(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=YC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const ZC=new Set(["opacity","clipPath","filter","transform"]);function XC(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=vv(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const QC=Wd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ka=10,JC=2e4;function eR(e){return wl(e.type)||e.type==="spring"||!yv(e.ease)}function tR(e,t){const n=new Jd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<JC;)r=n.sample(s),o.push(r.value),s+=ka;return{times:void 0,keyframes:o,duration:s-ka,ease:"linear"}}const Zv={anticipate:Ev,backInOut:Tv,circInOut:Rv};function nR(e){return e in Zv}class um extends Bv{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new $v(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Ca()&&nR(s)&&(s=Zv[s]),eR(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,v=tR(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=XC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Qh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(Sl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return In(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return In(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=un(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ht;const{animation:r}=n;Qh(r,t)}return Ht}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new Jd({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=un(this.time);c.setWithVelocity(p.sample(m-ka).value,p.sample(m).value,ka)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return QC()&&r&&ZC.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const rR={type:"spring",stiffness:500,damping:25,restSpeed:10},oR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sR={type:"keyframes",duration:.8},iR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aR=(e,{keyframes:t})=>t.length>2?sR:qr.has(e)?e.startsWith("scale")?oR(t[1]):rR:iR;function lR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ef=(e,t,n,r={},o,s)=>i=>{const a=Vd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-un(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};lR(a)||(u={...u,...aR(e,u)}),u.duration&&(u.duration=un(u.duration)),u.repeatDelay&&(u.repeatDelay=un(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const f=Sl(u.keyframes,a);if(f!==void 0)return Ue.update(()=>{u.onUpdate(f),u.onComplete()}),new pv([])}return!s&&um.supports(u)?new um(u):new Jd(u)};function cR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&cR(u,d))continue;const p={delay:n,...Vd(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=mv(e);if(b){const y=window.MotionHandoffAnimation(b,d,Ue);y!==null&&(p.startTime=y,m=!0)}}cu(e,d),f.start(ef(d,f,h,e.shouldReduceMotion&&fv.has(d)?{type:!1}:p,e,m));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Ue.update(()=>{a&&BE(e,a)})}),c}function vu(e,t,n={}){var r;const o=Qs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(tf(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return uR(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function uR(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(dR).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(vu(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function dR(e,t){return e.sortNodePosition(t)}function fR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>vu(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=vu(e,t,n);else{const o=typeof t=="function"?Qs(e,t,n.custom):t;r=Promise.all(tf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Xv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const hR=Rd.length;function Qv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Qv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<hR;n++){const r=Rd[n],o=e.props[r];(Ks(o)||o===!1)&&(t[r]=o)}return t}const mR=[...Cd].reverse(),pR=Cd.length;function gR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fR(e,n,r)))}function yR(e){let t=gR(e),n=dm(),r=!0;const o=l=>(c,u)=>{var d;const f=Qs(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=Qv(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<pR;v++){const b=mR[v],y=n[b],g=c[b]!==void 0?c[b]:u[b],T=Ks(g),x=b===l?y.isActive:null;x===!1&&(p=v);let E=g===u[b]&&g!==c[b]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...h},!y.isActive&&x===null||!g&&!y.prevProp||vl(g)||typeof g=="boolean")continue;const C=vR(y.prevProp,g);let k=C||b===l&&y.isActive&&!E&&T||v>p&&T,I=!1;const A=Array.isArray(g)?g:[g];let N=A.reduce(o(b),{});x===!1&&(N={});const{prevResolvedValues:O={}}=y,L={...O,...N},P=D=>{k=!0,f.has(D)&&(I=!0,f.delete(D)),y.needsAnimating[D]=!0;const V=e.getValue(D);V&&(V.liveStyle=!1)};for(const D in L){const V=N[D],z=O[D];if(h.hasOwnProperty(D))continue;let _=!1;lu(V)&&lu(z)?_=!Xv(V,z):_=V!==z,_?V!=null?P(D):f.add(D):V!==void 0&&f.has(D)?P(D):y.protectedKeys[D]=!0}y.prevProp=g,y.prevResolvedValues=N,y.isActive&&(h={...h,...N}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(E&&C)||I)&&d.push(...A.map(D=>({animation:D,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=Qs(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const y=e.getBaseTarget(b),g=e.getValue(b);g&&(g.liveStyle=!0),v[b]=y??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(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=dm(),r=!0}}}function vR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Xv(t,e):!1}function Sr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dm(){return{animate:Sr(!0),whileInView:Sr(),whileHover:Sr(),whileTap:Sr(),whileDrag:Sr(),whileFocus:Sr(),exit:Sr()}}class hr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class bR extends hr{constructor(t){super(t),t.animationState||(t.animationState=yR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vl(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 xR=0;class wR extends hr{constructor(){super(...arguments),this.id=xR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const SR={animation:{Feature:bR},exit:{Feature:wR}},an={x:!1,y:!1};function Jv(){return an.x||an.y}function TR(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function ei(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const nf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ei(e){return{point:{x:e.pageX,y:e.pageY}}}const ER=e=>t=>nf(t)&&e(t,Ei(t));function bo(e,t,n,r){return ei(e,t,ER(n),r)}function eb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function CR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function RR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const tb=1e-4,PR=1-tb,kR=1+tb,nb=.01,IR=0-nb,AR=0+nb;function Ft(e){return e.max-e.min}function OR(e,t,n){return Math.abs(e-t)<=n}function fm(e,t,n,r=.5){e.origin=r,e.originPoint=Qe(t.min,t.max,e.origin),e.scale=Ft(n)/Ft(t),e.translate=Qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=PR&&e.scale<=kR||isNaN(e.scale))&&(e.scale=1),(e.translate>=IR&&e.translate<=AR||isNaN(e.translate))&&(e.translate=0)}function Fs(e,t,n,r){fm(e.x,t.x,n.x,r?r.originX:void 0),fm(e.y,t.y,n.y,r?r.originY:void 0)}function hm(e,t,n){e.min=n.min+t.min,e.max=e.min+Ft(t)}function _R(e,t,n){hm(e.x,t.x,n.x),hm(e.y,t.y,n.y)}function mm(e,t,n){e.min=t.min-n.min,e.max=e.min+Ft(t)}function Vs(e,t,n){mm(e.x,t.x,n.x),mm(e.y,t.y,n.y)}const pm=()=>({translate:0,scale:1,origin:0,originPoint:0}),xo=()=>({x:pm(),y:pm()}),gm=()=>({min:0,max:0}),st=()=>({x:gm(),y:gm()});function tn(e){return[e("x"),e("y")]}function rc(e){return e===void 0||e===1}function bu({scale:e,scaleX:t,scaleY:n}){return!rc(e)||!rc(t)||!rc(n)}function Er(e){return bu(e)||rb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rb(e){return ym(e.x)||ym(e.y)}function ym(e){return e&&e!=="0%"}function Ia(e,t,n){const r=e-n,o=t*r;return n+o}function vm(e,t,n,r,o){return o!==void 0&&(e=Ia(e,o,r)),Ia(e,n,r)+t}function xu(e,t=0,n=1,r,o){e.min=vm(e.min,t,n,r,o),e.max=vm(e.max,t,n,r,o)}function ob(e,{x:t,y:n}){xu(e.x,t.translate,t.scale,t.originPoint),xu(e.y,n.translate,n.scale,n.originPoint)}const bm=.999999999999,xm=1.0000000000001;function MR(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&So(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,ob(e,i)),r&&Er(s.latestValues)&&So(e,s.latestValues))}t.x<xm&&t.x>bm&&(t.x=1),t.y<xm&&t.y>bm&&(t.y=1)}function wo(e,t){e.min=e.min+t,e.max=e.max+t}function wm(e,t,n,r,o=.5){const s=Qe(e.min,e.max,o);xu(e,t,n,s,r)}function So(e,t){wm(e.x,t.x,t.scaleX,t.scale,t.originX),wm(e.y,t.y,t.scaleY,t.scale,t.originY)}function sb(e,t){return eb(RR(e.getBoundingClientRect(),t))}function DR(e,t,n){const r=sb(e,n),{scroll:o}=t;return o&&(wo(r.x,o.offset.x),wo(r.y,o.offset.y)),r}function Aa(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Sm=(e,t)=>Math.abs(e-t);function NR(e,t){const n=Sm(e.x,t.x),r=Sm(e.y,t.y);return Math.sqrt(n**2+r**2)}class ib{constructor(t,n,{transformPagePoint:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=sc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=NR(u.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:h}=u,{timestamp:p}=Rt;this.history.push({...h,timestamp:p});const{onStart:m,onMove:v}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=oc(d,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{Aa(u,"release"),this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=sc(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:oc(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!nf(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=Ei(t),i=oc(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=Rt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,sc(i,this.history)),Aa(t,"set"),this.removeListeners=Ti(bo(t.currentTarget,"pointermove",this.handlePointerMove),bo(t.currentTarget,"pointerup",this.handlePointerUp),bo(t.currentTarget,"pointercancel",this.handlePointerUp),bo(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bn(this.updatePoint)}}function oc(e,t){return t?{point:t(e.point)}:e}function Tm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sc({point:e},t){return{point:e,delta:Tm(e,ab(t)),offset:Tm(e,jR(t)),velocity:LR(t,.1)}}function jR(e){return e[0]}function ab(e){return e[e.length-1]}function LR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ab(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>un(t)));)n--;if(!r)return{x:0,y:0};const s=In(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function FR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Qe(n,e,r.max):Math.min(e,n)),e}function Em(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 VR(e,{top:t,left:n,bottom:r,right:o}){return{x:Em(e.x,n,o),y:Em(e.y,t,r)}}function Cm(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 $R(e,t){return{x:Cm(e.x,t.x),y:Cm(e.y,t.y)}}function BR(e,t){let n=.5;const r=Ft(e),o=Ft(t);return o>r?n=Vr(t.min,t.max-r,e.min):r>o&&(n=Vr(e.min,e.max-o,t.min)),Wn(0,1,n)}function WR(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 wu=.35;function zR(e=wu){return e===!1?e=0:e===!0&&(e=wu),{x:Rm(e,"left","right"),y:Rm(e,"top","bottom")}}function Rm(e,t,n){return{min:Pm(e,t),max:Pm(e,n)}}function Pm(e,t){return typeof e=="number"?e:e[t]||0}const HR=new WeakMap;class UR{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ei(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TR(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tn(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Pn.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[v];g&&(b=Ft(g)*(parseFloat(b)/100))}}this.originPoint[v]=b}),p&&Ue.postRender(()=>p(u,d)),cu(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=GR(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=()=>tn(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 ib(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&Ue.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ui(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=FR(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&yo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=VR(o.layoutBox,n):this.constraints=!1,this.elastic=zR(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&tn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=WR(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yo(t))return!1;const r=t.current;on(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=DR(r,o.root,this.visualElement.getTransformPagePoint());let i=$R(o.layout.layoutBox,s);if(n){const a=n(CR(i));this.hasMutatedConstraints=!!a,a&&(i=eb(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=tn(u=>{if(!Ui(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return cu(this.visualElement,t),r.start(ef(t,r,0,n,this.visualElement,!1))}stopAnimation(){tn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tn(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){tn(n=>{const{drag:r}=this.getProps();if(!Ui(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Qe(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};tn(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=BR({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),tn(i=>{if(!Ui(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Qe(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;HR.set(this.visualElement,this);const t=this.visualElement.current,n=bo(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();yo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ue.read(r);const i=ei(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(tn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=wu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Ui(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function GR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class YR extends hr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new UR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const km=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class qR extends hr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new ib(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:km(t),onStart:km(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ue.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=bo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ca={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Im(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ts={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const n=Im(e,t.target.x),r=Im(e,t.target.y);return`${n}% ${r}%`}},KR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=sr.parse(e);if(o.length>5)return r;const s=sr.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Qe(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class ZR extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;dE(XR),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ca.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Ue.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kd.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 lb(e){const[t,n]=Uy(),r=w.useContext(qs);return S.jsx(ZR,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Jy),isPresent:t,safeToRemove:n})}const XR={borderRadius:{...Ts,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ts,borderTopRightRadius:Ts,borderBottomLeftRadius:Ts,borderBottomRightRadius:Ts,boxShadow:KR};function cb(e,t,n){const r=xt(e)?e:Vo(e);return r.start(ef("",r,t,n)),r.animation}function ub(e){return e instanceof SVGElement&&e.tagName!=="svg"}const QR=(e,t)=>e.depth-t.depth;class JR{constructor(){this.children=[],this.isDirty=!1}add(t){$d(this.children,t),this.isDirty=!0}remove(t){xl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QR),this.isDirty=!1,this.children.forEach(t)}}function eP(e,t){const n=kn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Bn(r),e(s-t))};return Ue.read(r,!0),()=>Bn(r)}const db=["TopLeft","TopRight","BottomLeft","BottomRight"],tP=db.length,Am=e=>typeof e=="string"?parseFloat(e):e,Om=e=>typeof e=="number"||me.test(e);function nP(e,t,n,r,o,s){o?(e.opacity=Qe(0,n.opacity!==void 0?n.opacity:1,rP(r)),e.opacityExit=Qe(t.opacity!==void 0?t.opacity:1,0,oP(r))):s&&(e.opacity=Qe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<tP;i++){const a=`border${db[i]}Radius`;let l=_m(t,a),c=_m(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Om(l)===Om(c)?(e[a]=Math.max(Qe(Am(l),Am(c),r),0),(Pn.test(c)||Pn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Qe(t.rotate||0,n.rotate||0,r))}function _m(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rP=fb(0,.5,Cv),oP=fb(.5,.95,Ht);function fb(e,t,n){return r=>r<e?0:r>t?1:n(Vr(e,t,r))}function Mm(e,t){e.min=t.min,e.max=t.max}function en(e,t){Mm(e.x,t.x),Mm(e.y,t.y)}function Dm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Nm(e,t,n,r,o){return e-=t,e=Ia(e,1/n,r),o!==void 0&&(e=Ia(e,1/o,r)),e}function sP(e,t=0,n=1,r=.5,o,s=e,i=e){if(Pn.test(t)&&(t=parseFloat(t),t=Qe(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Qe(s.min,s.max,r);e===s&&(a-=t),e.min=Nm(e.min,t,n,a,o),e.max=Nm(e.max,t,n,a,o)}function jm(e,t,[n,r,o],s,i){sP(e,t[n],t[r],t[o],t.scale,s,i)}const iP=["x","scaleX","originX"],aP=["y","scaleY","originY"];function Lm(e,t,n,r){jm(e.x,t,iP,n?n.x:void 0,r?r.x:void 0),jm(e.y,t,aP,n?n.y:void 0,r?r.y:void 0)}function Fm(e){return e.translate===0&&e.scale===1}function hb(e){return Fm(e.x)&&Fm(e.y)}function Vm(e,t){return e.min===t.min&&e.max===t.max}function lP(e,t){return Vm(e.x,t.x)&&Vm(e.y,t.y)}function $m(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mb(e,t){return $m(e.x,t.x)&&$m(e.y,t.y)}function Bm(e){return Ft(e.x)/Ft(e.y)}function Wm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class cP{constructor(){this.members=[]}add(t){$d(this.members,t),t.scheduleRender()}remove(t){if(xl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uP(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ic=["","X","Y","Z"],dP={visibility:"hidden"},zm=1e3;let fP=0;function ac(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mv(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ue,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pb(r)}function gb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=fP++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(pP),this.nodes.forEach(xP),this.nodes.forEach(wP),this.nodes.forEach(gP)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new JR)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Bd),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ub(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=eP(f,250),ca.hasAnimatedSinceResize&&(ca.hasAnimatedSinceResize=!1,this.nodes.forEach(Um))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||RP,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),y=!this.targetLayout||!mb(this.targetLayout,p),g=!f&&h;if(this.options.layoutRoot||this.resumeFrom||g||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...Vd(m,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||Um(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Bn(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(SP),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Hm);return}this.isUpdating||this.nodes.forEach(vP),this.isUpdating=!1,this.nodes.forEach(bP),this.nodes.forEach(hP),this.nodes.forEach(mP),this.clearAllSnapshots();const a=kn.now();Rt.delta=Wn(0,1e3/60,a-Rt.timestamp),Rt.timestamp=a,Rt.isProcessing=!0,Ql.update.process(Rt),Ql.preRender.process(Rt),Ql.render.process(Rt),Rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yP),this.sharedNodes.forEach(TP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ft(this.snapshot.measuredBox.x)&&!Ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!hb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Er(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),PP(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return st();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(kP))){const{scroll:u}=this.root;u&&(wo(l.x,u.offset.x),wo(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=st();if(en(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&en(l,i),wo(l.x,d.offset.x),wo(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=st();en(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&So(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Er(u.latestValues)&&So(l,u.latestValues)}return Er(this.latestValues)&&So(l,this.latestValues),l}removeTransform(i){const a=st();en(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Er(c.latestValues))continue;bu(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();en(u,d),Lm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Er(this.latestValues)&&Lm(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Rt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Rt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),Vs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_R(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):en(this.target,this.layout.layoutBox),ob(this.target,this.targetDelta)):en(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),Vs(this.relativeTargetOrigin,this.target,h.target),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||bu(this.parent.latestValues)||rb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Rt.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;en(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;MR(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=st());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Dm(this.prevProjectionDelta.x,this.projectionDelta.x),Dm(this.prevProjectionDelta.y,this.projectionDelta.y)),Fs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Wm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xo(),this.projectionDelta=xo(),this.projectionDeltaWithTransform=xo()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=xo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),b=!v||v.members.length<=1,y=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(CP));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const x=T/1e3;Gm(d.x,i.x,x),Gm(d.y,i.y,x),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),EP(this.relativeTarget,this.relativeTargetOrigin,f,x),g&&lP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),en(g,this.relativeTarget)),m&&(this.animationValues=u,nP(u,c,this.latestValues,x,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Bn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ue.update(()=>{ca.hasAnimatedSinceResize=!0,this.currentAnimation=cb(0,zm,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(zm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&yb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=Ft(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Ft(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}en(a,l),So(a,u),Fs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new cP),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ac("z",i,c,this.animationValues);for(let u=0;u<ic.length;u++)ac(`rotate${ic[u]}`,i,c,this.animationValues),ac(`skew${ic[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return dP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=aa(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=aa(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Er(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=uP(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Zs){if(f[m]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:y}=Zs[m],g=c.transform==="none"?f[m]:v(f[m],d);if(b){const T=b.length;for(let x=0;x<T;x++)c[b[x]]=g}else y?this.options.visualElement.renderState.vars[m]=g:c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?aa(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Hm),this.root.sharedNodes.clear()}}}function hP(e){e.updateLayout()}function mP(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?tn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Ft(f);f.min=r[d].min,f.max=f.min+h}):yb(s,n.layoutBox,r)&&tn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Ft(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=xo();Fs(a,r,n.layoutBox);const l=xo();i?Fs(l,e.applyTransform(o,!0),n.measuredBox):Fs(l,r,n.layoutBox);const c=!hb(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=st();Vs(p,n.layoutBox,f.layoutBox);const m=st();Vs(m,r,h.layoutBox),mb(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function pP(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function gP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yP(e){e.clearSnapshot()}function Hm(e){e.clearMeasurements()}function vP(e){e.isLayoutDirty=!1}function bP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Um(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xP(e){e.resolveTargetDelta()}function wP(e){e.calcProjection()}function SP(e){e.resetSkewAndRotation()}function TP(e){e.removeLeadSnapshot()}function Gm(e,t,n){e.translate=Qe(t.translate,0,n),e.scale=Qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ym(e,t,n,r){e.min=Qe(t.min,n.min,r),e.max=Qe(t.max,n.max,r)}function EP(e,t,n,r){Ym(e.x,t.x,n.x,r),Ym(e.y,t.y,n.y,r)}function CP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const RP={duration:.45,ease:[.4,0,.1,1]},qm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Km=qm("applewebkit/")&&!qm("chrome/")?Math.round:Ht;function Zm(e){e.min=Km(e.min),e.max=Km(e.max)}function PP(e){Zm(e.x),Zm(e.y)}function yb(e,t,n){return e==="position"||e==="preserve-aspect"&&!OR(Bm(t),Bm(n),.2)}function kP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const IP=gb({attachResizeListener:(e,t)=>ei(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lc={current:void 0},vb=gb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lc.current){const e=new IP({});e.mount(window),e.setOptions({layoutScroll:!0}),lc.current=e}return lc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),AP={pan:{Feature:qR},drag:{Feature:YR,ProjectionNode:vb,MeasureLayout:lb}};function bb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const s=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function xb(e,t){const n=bb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Xm(e){return!(e.pointerType==="touch"||Jv())}function OP(e,t,n={}){const[r,o,s]=xb(e,n),i=a=>{if(!Xm(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Xm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Qm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&Ue.postRender(()=>s(t,Ei(t)))}class _P extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=OP(t,(n,r)=>(Qm(this.node,r,"Start"),o=>Qm(this.node,o,"End"))))}unmount(){}}class MP extends hr{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=Ti(ei(this.node.current,"focus",()=>this.onFocus()),ei(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const wb=(e,t)=>t?e===t?!0:wb(e,t.parentElement):!1,DP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function NP(e){return DP.has(e.tagName)||e.tabIndex!==-1}const ks=new WeakSet;function Jm(e){return t=>{t.key==="Enter"&&e(t)}}function cc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const jP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Jm(()=>{if(ks.has(n))return;cc(n,"down");const o=Jm(()=>{cc(n,"up")}),s=()=>cc(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ep(e){return nf(e)&&!Jv()}function LP(e,t,n={}){const[r,o,s]=xb(e,n),i=a=>{const l=a.currentTarget;if(!l||!ep(a)||ks.has(l))return;ks.add(l),Aa(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Aa(h,"release"),!(!ep(h)||!ks.has(l))&&(ks.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?FP(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||wb(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!NP(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>jP(c,o),o)}),s}function FP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function tp(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&Ue.postRender(()=>s(t,Ei(t)))}class VP extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=LP(t,(n,r)=>(tp(this.node,r,"Start"),(o,{success:s})=>tp(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Su=new WeakMap,uc=new WeakMap,$P=e=>{const t=Su.get(e.target);t&&t(e)},BP=e=>{e.forEach($P)};function WP({root:e,...t}){const n=e||document;uc.has(n)||uc.set(n,{});const r=uc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(BP,{root:e,...t})),r[o]}function zP(e,t,n){const r=WP(t);return Su.set(e,n),r.observe(e),()=>{Su.delete(e),r.unobserve(e)}}const HP={some:0,all:1};class UP extends hr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:HP[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return zP(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(GP(t,n))&&this.startObserver()}unmount(){}}function GP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YP={inView:{Feature:UP},tap:{Feature:VP},focus:{Feature:MP},hover:{Feature:_P}},qP={layout:{ProjectionNode:vb,MeasureLayout:lb}},Tu={current:null},Sb={current:!1};function KP(){if(Sb.current=!0,!!Ed)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Tu.current=e.matches;e.addListener(t),t()}else Tu.current=!1}const ZP=[...Vv,Ot,sr],XP=e=>ZP.find(Fv(e)),ti=new WeakMap;function QP(e,t,n){for(const r in t){const o=t[r],s=n[r];if(xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&gl(o.version==="12.4.7",`Attempting to mix Motion versions ${o.version} with 12.4.7 may not work as expected.`);else if(xt(s))e.addValue(r,Vo(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Vo(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const np=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Tb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=kn.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Ue.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=bl(n),this.isVariantNode=Xy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&xt(p)&&p.set(l[h],!1)}}mount(t){this.current=t,ti.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)),Sb.current||KP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Tu.current,process.env.NODE_ENV!=="production"&&gl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Bn(this.notifyUpdate),Bn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=qr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Fo){const n=Fo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):st()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<np.length;r++){const o=np[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=QP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Vo(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"&&(jv(o)||Pv(o))?o=parseFloat(o):!XP(o)&&sr.test(n)&&(o=Mv(t,n)),this.setBaseTarget(t,xt(o)?o.get():o)),xt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=Ld(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!xt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Eb extends Tb{constructor(){super(...arguments),this.KeyframeResolver=$v}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function JP(e){return window.getComputedStyle(e)}class Cb extends Eb{constructor(){super(...arguments),this.type="html",this.renderInstance=lv}readValueFromInstance(t,n){if(qr.has(n)){const r=qd(n);return r&&r.default||0}else{const r=JP(t),o=(Id(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return sb(t,n)}build(t,n,r){_d(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fd(t,n,r)}}class Rb extends Eb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&av(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qr.has(n)){const r=qd(n);return r&&r.default||0}return n=cv.has(n)?n:Pd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return dv(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ue.postRender(this.updateDimensions)}build(t,n,r){Nd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){uv(t,n,r,o)}mount(t){this.isSVGTag=jd(t.tagName),super.mount(t)}}const ek=(e,t)=>Dd(e)?new Rb(t):new Cb(t,{allowProjection:e!==w.Fragment}),tk=NE({...SR,...YP,...AP,...qP},ek),lt=XT(tk);function $r(e){const t=hn(()=>Vo(e)),{isStatic:n}=w.useContext(Lo);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}function Pb(e,t){const n=$r(t()),r=()=>n.set(t());return r(),pl(()=>{const o=()=>Ue.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Bn(r)}}),n}const nk=e=>e&&typeof e=="object"&&e.mix,rk=e=>nk(e)?e.mix:void 0;function ok(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Yv(o,s,{mixer:rk(s[0]),...i});return t?a(r):a}function sk(e){Ns.current=[],e();const t=Pb(Ns.current,e);return Ns.current=void 0,t}function ik(e,t,n,r){if(typeof e=="function")return sk(e);const o=typeof t=="function"?t:ok(t,n,r);return Array.isArray(e)?rp(e,o):rp([e],([s])=>o(s))}function rp(e,t){const n=hn(()=>[]);return Pb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ak(e){return w.useEffect(()=>()=>e(),[])}function lk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Zd(r),Ra);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:In(o)}}const ck=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function kb(e,t){return Gv(e)?e[ck(0,e.length,t)]:e}function rf(e){return typeof e=="object"&&!Array.isArray(e)}function Ib(e,t,n,r){return typeof e=="string"&&rf(t)?bb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function uk(e,t,n){return e*(t+1)}function op(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function dk(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(xl(e,o),r--)}}function fk(e,t,n,r,o,s){dk(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Qe(o,s,r[i]),easing:kb(n,i)})}function hk(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function mk(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const pk="easeInOut",gk=20;function yk(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const p=e[h];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,op(d,p.at,u,c));continue}let[m,v,b={}]=p;b.at!==void 0&&(d=op(d,b.at,u,c));let y=0;const g=(T,x,E,C=0,k=0)=>{const I=vk(T),{delay:A=0,times:N=Kv(I),type:O="keyframes",repeat:L,repeatType:P,repeatDelay:M=0,...j}=x;let{ease:D=t.ease||"easeOut",duration:V}=x;const z=typeof A=="function"?A(C,k):A,_=I.length,$=wl(O)?O:o==null?void 0:o[O];if(_<=2&&$){let G=100;if(_===2&&wk(I)){const H=I[1]-I[0];G=Math.abs(H)}const F={...j};V!==void 0&&(F.duration=un(V));const B=lk(F,G,$);D=B.ease,V=B.duration}V??(V=s);const Z=d+z;N.length===1&&N[0]===0&&(N[1]=1);const re=N.length-I.length;if(re>0&&qv(N,re),I.length===1&&I.unshift(null),L){on(L<gk,"Repeat count too high, must be less than 20"),V=uk(V,L);const G=[...I],F=[...N];D=Array.isArray(D)?[...D]:[D];const B=[...D];for(let H=0;H<L;H++){I.push(...G);for(let Y=0;Y<G.length;Y++)N.push(F[Y]+(H+1)),D.push(Y===0?"linear":kb(B,Y-1))}hk(N,L)}const ee=Z+V;fk(E,I,D,N,Z,ee),y=Math.max(z+V,y),f=Math.max(ee,f)};if(xt(m)){const T=sp(m,a);g(v,b,ip("default",T))}else{const T=Ib(m,v,r,l),x=T.length;for(let E=0;E<x;E++){v=v,b=b;const C=T[E],k=sp(C,a);for(const I in v)g(v[I],bk(b,I),ip(I,k),E,x)}}u=d,d+=y}return a.forEach((h,p)=>{for(const m in h){const v=h[m];v.sort(mk);const b=[],y=[],g=[];for(let x=0;x<v.length;x++){const{at:E,value:C,easing:k}=v[x];b.push(C),y.push(Vr(0,f,E)),g.push(k||"easeOut")}y[0]!==0&&(y.unshift(0),b.unshift(b[0]),g.unshift(pk)),y[y.length-1]!==1&&(y.push(1),b.push(null)),i.has(p)||i.set(p,{keyframes:{},transition:{}});const T=i.get(p);T.keyframes[m]=b,T.transition[m]={...t,duration:f,ease:g,times:y,...n}}}),i}function sp(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ip(e,t){return t[e]||(t[e]=[]),t[e]}function vk(e){return Array.isArray(e)?e:[e]}function bk(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const xk=e=>typeof e=="number",wk=e=>e.every(xk);function Sk(e,t){return e in t}class Tk extends Tb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Sk(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return st()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function Ek(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ub(e)?new Rb(t):new Cb(t);n.mount(e),ti.set(e,n)}function Ck(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Tk(t);n.mount(e),ti.set(e,n)}function Rk(e,t){return xt(e)||typeof e=="number"||typeof e=="string"&&!rf(t)}function Ab(e,t,n,r){const o=[];if(Rk(e,t))o.push(cb(e,rf(t)&&t.default||t,n&&(n.default||n)));else{const s=Ib(e,t,r),i=s.length;on(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?Ek:Ck;ti.has(l)||c(l);const u=ti.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...tf(u,{...t,transition:d},{}))}}return o}function Pk(e,t,n){const r=[];return yk(e,t,n,{spring:Qd}).forEach(({keyframes:s,transition:i},a)=>{r.push(...Ab(a,s,i))}),r}function kk(e){return Array.isArray(e)&&e.some(Array.isArray)}function Ik(e){function t(n,r,o){let s=[];kk(n)?s=Pk(n,r,e):s=Ab(n,r,o,e);const i=new pv(s);return e&&e.animations.push(i),i}return t}function Ak(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>Ik(e));return ak(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class Ok{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 _k=()=>new Ok;function Mk(){return hn(_k)}function Dk(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function Nk(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:Dk(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=yu(r)(l/c)*c}return t+l}}const Ob=w.createContext(null);function jk(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Qe(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?LE(e,o,o+s):e}function Lk({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=hn(()=>lt[t]),l=[],c=w.useRef(!1);on(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(Vk)},updateOrder:(d,f,h)=>{if(c.current)return;const p=jk(l,d,f,h);l!==p&&(c.current=!0,r(p.map(Fk).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),S.jsx(a,{...s,ref:i,ignoreStrict:!0,children:S.jsx(Ob.Provider,{value:u,children:e})})}const _b=w.forwardRef(Lk);function Fk(e){return e.value}function Vk(e,t){return e.layout.min-t.layout.min}function ap(e,t=0){return xt(e)?e:$r(t)}function $k({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=hn(()=>lt[r]),c=w.useContext(Ob),u={x:ap(t.x),y:ap(t.y)},d=ik([u.x,u.y],([m,v])=>m||v?1:"unset");on(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return S.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,v)=>{const{velocity:b}=v;b[f]&&p(n,u[f].get(),b[f]),o&&o(m,v)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const Mb=w.forwardRef($k);/**
|
|
12
|
+
`),()=>{document.head.removeChild(h)}},[t]),w.jsx(DT,{isPresent:t,childRef:o,sizeRef:s,children:R.cloneElement(e,{ref:o})})}const jT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=hn(LT),c=x.useId(),u=x.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=x.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return x.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),R.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=w.jsx(NT,{isPresent:n,anchorX:a,children:e})),w.jsx(ml.Provider,{value:d,children:e})};function LT(){return new Map}function Uy(e=!0){const t=x.useContext(ml);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=x.useId();x.useEffect(()=>{if(e)return o(s)},[e]);const i=x.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Wi=e=>e.key||"";function $h(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const Ed=typeof window<"u",pl=Ed?x.useLayoutEffect:x.useEffect,fr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left"})=>{const[l,c]=Uy(i),u=x.useMemo(()=>$h(e),[e]),d=i&&!l?[]:u.map(Wi),f=x.useRef(!0),h=x.useRef(u),p=hn(()=>new Map),[m,v]=x.useState(u),[b,y]=x.useState(u);pl(()=>{f.current=!1,h.current=u;for(let S=0;S<b.length;S++){const E=Wi(b[S]);d.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[b,d.length,d.join("-")]);const g=[];if(u!==m){let S=[...u];for(let E=0;E<b.length;E++){const C=b[E],k=Wi(C);d.includes(k)||(S.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(S=g),y($h(S)),v(u),null}process.env.NODE_ENV!=="production"&&s==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=x.useContext(qs);return w.jsx(w.Fragment,{children:b.map(S=>{const E=Wi(S),C=i&&!l?!1:u===b||d.includes(E),k=()=>{if(p.has(E))p.set(E,!0);else return;let I=!0;p.forEach(A=>{A||(I=!1)}),I&&(T==null||T(),y(h.current),i&&(c==null||c()),r&&r())};return w.jsx(jT,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:k,anchorX:a,children:S},E)})})},FT=x.createContext(null);function VT(){const e=x.useRef(!1);return pl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Ht=e=>e;let is=Ht,on=Ht;process.env.NODE_ENV!=="production"&&(is=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},on=(e,t)=>{if(!e)throw new Error(t)});const $T={skipAnimations:!1,useManualTiming:!1},zi=["read","resolveKeyframes","update","preRender","render","postRender"],Bh={value:null,addProjectionMetrics:null};function BT(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Bh.value&&Bh.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const WT=40;function Gy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=zi.reduce((b,y)=>(b[y]=BT(s,t?y:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,WT),1),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:zi.reduce((b,y)=>{const g=i[y];return b[y]=(T,S=!1,E=!1)=>(n||p(),g.schedule(T,S,E)),b},{}),cancel:b=>{for(let y=0;y<zi.length;y++)i[zi[y]].cancel(b)},state:o,steps:i}}const{schedule:Ue,cancel:Bn,state:Pt,steps:Ql}=Gy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ht,!0);function zT(){const e=VT(),[t,n]=x.useState(0),r=x.useCallback(()=>{e.current&&n(t+1)},[t]);return[x.useCallback(()=>Ue.postRender(r),[r]),t]}const HT=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Wh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(HT);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 Yy=e=>e===!0,UT=e=>Yy(e===!0)||e==="id",GT=({children:e,id:t,inherit:n=!0})=>{const r=x.useContext(qs),o=x.useContext(FT),[s,i]=zT(),a=x.useRef(null),l=r.id||o;a.current===null&&(UT(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Yy(n)&&r.group||Wh()});const c=x.useMemo(()=>({...a.current,forceRender:s}),[i]);return w.jsx(qs.Provider,{value:c,children:e})},qy=x.createContext({strict:!1}),zh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fo={};for(const e in zh)Fo[e]={isEnabled:t=>zh[e].some(n=>!!t[n])};function YT(e){for(const t in e)Fo[t]={...Fo[t],...e[t]}}const qT=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 Ea(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qT.has(e)}let Ky=e=>!Ea(e);function Zy(e){e&&(Ky=t=>t.startsWith("on")?!Ea(t):e(t))}try{Zy(require("@emotion/is-prop-valid").default)}catch{}function KT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ky(o)||n===!0&&Ea(o)||!t&&!Ea(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function ZT({children:e,isValidProp:t,...n}){t&&Zy(t),n={...x.useContext(Lo),...n},n.isStatic=hn(()=>n.isStatic);const r=x.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(Lo.Provider,{value:r,children:e})}const Hh=new Set;function gl(e,t,n){e||Hh.has(t)||(console.warn(t),Hh.add(t))}function XT(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&gl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const yl=x.createContext({});function vl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ks(e){return typeof e=="string"||Array.isArray(e)}const Cd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rd=["initial",...Cd];function bl(e){return vl(e.animate)||Rd.some(t=>Ks(e[t]))}function Xy(e){return!!(bl(e)||e.variants)}function QT(e,t){if(bl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ks(n)?n:void 0,animate:Ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function JT(e){const{initial:t,animate:n}=QT(e,x.useContext(yl));return x.useMemo(()=>({initial:t,animate:n}),[Uh(t),Uh(n)])}function Uh(e){return Array.isArray(e)?e.join(" "):e}const eE=Symbol.for("motionComponentSymbol");function yo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tE(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):yo(n)&&(n.current=r))},[t])}const Pd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),nE="framerAppearId",Qy="data-"+Pd(nE),{schedule:kd,cancel:x$}=Gy(queueMicrotask,!1),Jy=x.createContext({});function rE(e,t,n,r,o){var s,i;const{visualElement:a}=x.useContext(yl),l=x.useContext(qy),c=x.useContext(ml),u=x.useContext(Lo).reducedMotion,d=x.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=x.useContext(Jy);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&oE(d.current,n,o,h);const p=x.useRef(!1);x.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[Qy],v=x.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return pl(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),kd.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),v.current=!1))}),f}function oE(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ev(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&yo(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ev(e){if(e)return e.options.allowProjection!==!1?e.projection:ev(e.parent)}function sE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&YT(e);function a(c,u){let d;const f={...x.useContext(Lo),...c,layoutId:iE(c)},{isStatic:h}=f,p=JT(c),m=r(c,h);if(!h&&Ed){aE(f,e);const v=lE(f);d=v.MeasureLayout,p.visualElement=rE(o,m,f,t,v.ProjectionNode)}return w.jsxs(yl.Provider,{value:p,children:[d&&p.visualElement?w.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,tE(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=x.forwardRef(a);return l[eE]=o,l}function iE({layoutId:e}){const t=x.useContext(qs).id;return t&&e!==void 0?t+"-"+e:e}function aE(e,t){const n=x.useContext(qy).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?is(!1,r):on(!1,r)}}function lE(e){const{drag:t,layout:n}=Fo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const tv=e=>t=>typeof t=="string"&&t.startsWith(e),Id=tv("--"),cE=tv("var(--"),Ad=e=>cE(e)?uE.test(e.split("/*")[0].trim()):!1,uE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zs={};function dE(e){for(const t in e)Zs[t]=e[t],Id(t)&&(Zs[t].isCSSVariable=!0)}const as=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qr=new Set(as);function nv(e,{layout:t,layoutId:n}){return qr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Zs[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),rv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wn=(e,t,n)=>n>t?t:n<e?e:n,ls={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Xs={...ls,transform:e=>Wn(0,1,e)},Hi={...ls,default:1},wi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xn=wi("deg"),Pn=wi("%"),me=wi("px"),fE=wi("vh"),hE=wi("vw"),Gh={...Pn,parse:e=>Pn.parse(e)/100,transform:e=>Pn.transform(e*100)},mE={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,radius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,backgroundPositionX:me,backgroundPositionY:me},pE={rotate:Xn,rotateX:Xn,rotateY:Xn,rotateZ:Xn,scale:Hi,scaleX:Hi,scaleY:Hi,scaleZ:Hi,skew:Xn,skewX:Xn,skewY:Xn,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Xs,originX:Gh,originY:Gh,originZ:me},Yh={...ls,transform:Math.round},Od={...mE,...pE,zIndex:Yh,size:me,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:Yh},gE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yE=as.length;function vE(e,t,n){let r="",o=!0;for(let s=0;s<yE;s++){const i=as[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=rv(a,Od[i]);if(!l){o=!1;const u=gE[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function _d(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(qr.has(l)){i=!0;continue}else if(Id(l)){o[l]=c;continue}else{const u=rv(c,Od[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=vE(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const Md=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ov(e,t,n){for(const r in t)!wt(t[r])&&!nv(r,n)&&(e[r]=t[r])}function bE({transformTemplate:e},t){return x.useMemo(()=>{const n=Md();return _d(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xE(e,t){const n=e.style||{},r={};return ov(r,n,e),Object.assign(r,bE(e,t)),r}function wE(e,t){const n={},r=xE(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 SE=["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 Dd(e){return typeof e!="string"||e.includes("-")?!1:!!(SE.indexOf(e)>-1||/[A-Z]/u.test(e))}const TE={offset:"stroke-dashoffset",array:"stroke-dasharray"},EE={offset:"strokeDashoffset",array:"strokeDasharray"};function CE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?TE:EE;e[s.offset]=me.transform(-r);const i=me.transform(t),a=me.transform(n);e[s.array]=`${i} ${a}`}function qh(e,t,n){return typeof e=="string"?e:me.transform(t+n*e)}function RE(e,t,n){const r=qh(t,e.x,e.width),o=qh(n,e.y,e.height);return`${r} ${o}`}function Nd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(_d(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=RE(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&CE(f,i,a,l,!1)}const sv=()=>({...Md(),attrs:{}}),jd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function PE(e,t,n,r){const o=x.useMemo(()=>{const s=sv();return Nd(s,t,jd(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};ov(s,e.style,e),o.style={...s,...o.style}}return o}function kE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Dd(n)?PE:wE)(r,s,i,n),c=KT(r,typeof n=="string",e),u=n!==x.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=x.useMemo(()=>wt(d)?d.get():d,[d]);return x.createElement(n,{...u,children:f})}}function Kh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ld(e,t,n,r){if(typeof t=="function"){const[o,s]=Kh(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Kh(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const lu=e=>Array.isArray(e),IE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),AE=e=>lu(e)?e[e.length-1]||0:e;function aa(e){const t=wt(e)?e.get():e;return IE(t)?t.toValue():t}function OE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:_E(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const iv=e=>(t,n)=>{const r=x.useContext(yl),o=x.useContext(ml),s=()=>OE(e,t,r,o);return n?s():hn(s)};function _E(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=aa(s[f]);let{initial:i,animate:a}=e;const l=bl(e),c=Xy(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!vl(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Ld(e,f[h]);if(p){const{transitionEnd:m,transition:v,...b}=p;for(const y in b){let g=b[y];if(Array.isArray(g)){const T=u?g.length-1:0;g=g[T]}g!==null&&(o[y]=g)}for(const y in m)o[y]=m[y]}}}return o}function Fd(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(wt(o[i])||t.style&&wt(t.style[i])||nv(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const ME={useVisualState:iv({scrapeMotionValuesFromProps:Fd,createRenderState:Md})};function av(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function lv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const cv=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 uv(e,t,n,r){lv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(cv.has(o)?o:Pd(o),t.attrs[o])}function dv(e,t,n){const r=Fd(e,t,n);for(const o in e)if(wt(e[o])||wt(t[o])){const s=as.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const Zh=["x","y","width","height","cx","cy","r"],DE={useVisualState:iv({scrapeMotionValuesFromProps:dv,createRenderState:sv,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(qr.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<Zh.length;a++){const l=Zh[a];e[l]!==t[l]&&(i=!0)}i&&Ue.read(()=>{av(n,r),Ue.render(()=>{Nd(r,o,jd(n.tagName),e.transformTemplate),uv(n,r)})})}})};function NE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...Dd(r)?DE:ME,preloadedFeatures:e,useRender:kE(o),createVisualElement:t,Component:r};return sE(i)}}function Qs(e,t,n){const r=e.getProps();return Ld(r,t,n!==void 0?n:r.custom,e)}function Vd(e,t){return e?e[t]||e.default||e:void 0}const fv=new Set(["width","height","top","left","right","bottom",...as]);let la;function jE(){la=void 0}const kn={now:()=>(la===void 0&&kn.set(Pt.isProcessing||$T.useManualTiming?Pt.timestamp:performance.now()),la),set:e=>{la=e,queueMicrotask(jE)}};function $d(e,t){e.indexOf(t)===-1&&e.push(t)}function xl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function LE([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}class Bd{constructor(){this.subscriptions=[]}add(t){return $d(this.subscriptions,t),()=>xl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function hv(e,t){return t?e*(1e3/t):0}const Xh=30,FE=e=>!isNaN(parseFloat(e)),Ns={current:void 0};class VE{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=kn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=FE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&gl(!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 Bd);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ue.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 Ns.current&&Ns.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Xh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Xh);return hv(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 Vo(e,t){return new VE(e,t)}function $E(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vo(n))}function BE(e,t){const n=Qs(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=AE(s[i]);$E(e,i,a)}}function WE(e){return!!(wt(e)&&e.add)}function cu(e,t){const n=e.getValue("willChange");if(WE(n))return n.add(t)}function mv(e){return e.props[Qy]}function Wd(e){let t;return()=>(t===void 0&&(t=e()),t)}const zE=Wd(()=>window.ScrollTimeline!==void 0);class HE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(zE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class pv extends HE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const un=e=>e*1e3,In=e=>e/1e3;function wl(e){return typeof e=="function"}function Qh(e,t){e.timeline=t,e.onfinish=null}const zd=e=>Array.isArray(e)&&typeof e[0]=="number",UE={linearEasing:void 0};function GE(e,t){const n=Wd(e);return()=>{var r;return(r=UE[t])!==null&&r!==void 0?r:n()}}const Ca=GE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},gv=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Vr(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function yv(e){return!!(typeof e=="function"&&Ca()||!e||typeof e=="string"&&(e in uu||Ca())||zd(e)||Array.isArray(e)&&e.every(yv))}const Ps=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ps([0,.65,.55,1]),circOut:Ps([.55,0,1,.45]),backIn:Ps([.31,.01,.66,-.59]),backOut:Ps([.33,1.53,.69,.99])};function vv(e,t){if(e)return typeof e=="function"&&Ca()?gv(e,t):zd(e)?Ps(e):Array.isArray(e)?e.map(n=>vv(n,t)||uu.easeOut):uu[e]}const bv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,YE=1e-7,qE=12;function KE(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=bv(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>YE&&++a<qE);return i}function Si(e,t,n,r){if(e===t&&n===r)return Ht;const o=s=>KE(s,0,1,e,n);return s=>s===0||s===1?s:bv(o(s),t,r)}const xv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wv=e=>t=>1-e(1-t),Sv=Si(.33,1.53,.69,.99),Hd=wv(Sv),Tv=xv(Hd),Ev=e=>(e*=2)<1?.5*Hd(e):.5*(2-Math.pow(2,-10*(e-1))),Ud=e=>1-Math.sin(Math.acos(e)),Cv=wv(Ud),Rv=xv(Ud),Pv=e=>/^0[^.\s]+$/u.test(e);function ZE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Pv(e):!0}const js=e=>Math.round(e*1e5)/1e5,Gd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function XE(e){return e==null}const QE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yd=(e,t)=>n=>!!(typeof n=="string"&&QE.test(n)&&n.startsWith(e)||t&&!XE(n)&&Object.prototype.hasOwnProperty.call(n,t)),kv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(Gd);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},JE=e=>Wn(0,255,e),Jl={...ls,transform:e=>Math.round(JE(e))},_r={test:Yd("rgb","red"),parse:kv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Jl.transform(e)+", "+Jl.transform(t)+", "+Jl.transform(n)+", "+js(Xs.transform(r))+")"};function eC(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 du={test:Yd("#"),parse:eC,transform:_r.transform},vo={test:Yd("hsl","hue"),parse:kv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pn.transform(js(t))+", "+Pn.transform(js(n))+", "+js(Xs.transform(r))+")"},Ot={test:e=>_r.test(e)||du.test(e)||vo.test(e),parse:e=>_r.test(e)?_r.parse(e):vo.test(e)?vo.parse(e):du.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_r.transform(e):vo.transform(e)},tC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Gd))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(tC))===null||n===void 0?void 0:n.length)||0)>0}const Iv="number",Av="color",rC="var",oC="var(",Jh="${}",sC=/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 Js(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(sC,l=>(Ot.test(l)?(r.color.push(s),o.push(Av),n.push(Ot.parse(l))):l.startsWith(oC)?(r.var.push(s),o.push(rC),n.push(l)):(r.number.push(s),o.push(Iv),n.push(parseFloat(l))),++s,Jh)).split(Jh);return{values:n,split:a,indexes:r,types:o}}function Ov(e){return Js(e).values}function _v(e){const{split:t,types:n}=Js(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Iv?s+=js(o[i]):a===Av?s+=Ot.transform(o[i]):s+=o[i]}return s}}const iC=e=>typeof e=="number"?0:e;function aC(e){const t=Ov(e);return _v(e)(t.map(iC))}const sr={test:nC,parse:Ov,createTransformer:_v,getAnimatableNone:aC},lC=new Set(["brightness","contrast","saturate","opacity"]);function cC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Gd)||[];if(!r)return e;const o=n.replace(r,"");let s=lC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const uC=/\b([a-z-]*)\(.*?\)/gu,fu={...sr,getAnimatableNone:e=>{const t=e.match(uC);return t?t.map(cC).join(" "):e}},dC={...Od,color:Ot,backgroundColor:Ot,outlineColor:Ot,fill:Ot,stroke:Ot,borderColor:Ot,borderTopColor:Ot,borderRightColor:Ot,borderBottomColor:Ot,borderLeftColor:Ot,filter:fu,WebkitFilter:fu},qd=e=>dC[e];function Mv(e,t){let n=qd(e);return n!==fu&&(n=sr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fC=new Set(["auto","none","0"]);function hC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!fC.has(s)&&Js(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Mv(n,o)}const em=e=>e===ls||e===me,tm=(e,t)=>parseFloat(e.split(", ")[t]),nm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return tm(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?tm(s[1],e):0}},mC=new Set(["x","y","z"]),pC=as.filter(e=>!mC.has(e));function gC(e){const t=[];return pC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $o={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:nm(4,13),y:nm(5,14)};$o.translateX=$o.x;$o.translateY=$o.y;const Lr=new Set;let hu=!1,mu=!1;function Dv(){if(mu){const e=Array.from(Lr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=gC(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}mu=!1,hu=!1,Lr.forEach(e=>e.complete()),Lr.clear()}function Nv(){Lr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mu=!0)})}function yC(){Nv(),Dv()}class Kd{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Lr.add(this),hu||(hu=!0,Ue.read(Nv),Ue.resolveKeyframes(Dv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Lr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Lr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bC(e){const t=vC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const xC=4;function Lv(e,t,n=1){on(n<=xC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=bC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return jv(i)?parseFloat(i):i}return Ad(o)?Lv(o,t,n+1):o}const Fv=e=>t=>t.test(e),wC={test:e=>e==="auto",parse:e=>e},Vv=[ls,me,Pn,Xn,hE,fE,wC],rm=e=>Vv.find(Fv(e));class $v extends Kd{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Ad(c))){const u=Lv(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!fv.has(r)||t.length!==2)return;const[o,s]=t,i=rm(o),a=rm(s);if(i!==a)if(em(i)&&em(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++)ZE(t[o])&&r.push(o);r.length&&hC(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$o[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=$o[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const om=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sr.test(e)||e==="0")&&!e.startsWith("url("));function SC(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 TC(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=om(o,t),a=om(s,t);return is(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:SC(e)||(n==="spring"||wl(n))&&r}const EC=e=>e!==null;function Sl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(EC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const CC=40;class Bv{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=kn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>CC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&yC(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!TC(t,r,o,s))if(i)this.options.duration=0;else{l&&l(Sl(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ra=2e4;function Zd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ra;)t+=n,r=e.next(t);return t>=Ra?1/0:t}const Qe=(e,t,n)=>e+(t-e)*n;function ec(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 RC({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=ec(l,a,e+1/3),s=ec(l,a,e),i=ec(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Pa(e,t){return n=>n>0?t:e}const tc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},PC=[du,_r,vo],kC=e=>PC.find(t=>t.test(e));function sm(e){const t=kC(e);if(is(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===vo&&(n=RC(n)),n}const im=(e,t)=>{const n=sm(e),r=sm(t);if(!n||!r)return Pa(e,t);const o={...n};return s=>(o.red=tc(n.red,r.red,s),o.green=tc(n.green,r.green,s),o.blue=tc(n.blue,r.blue,s),o.alpha=Qe(n.alpha,r.alpha,s),_r.transform(o))},IC=(e,t)=>n=>t(e(n)),Ti=(...e)=>e.reduce(IC),pu=new Set(["none","hidden"]);function AC(e,t){return pu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OC(e,t){return n=>Qe(e,t,n)}function Xd(e){return typeof e=="number"?OC:typeof e=="string"?Ad(e)?Pa:Ot.test(e)?im:DC:Array.isArray(e)?Wv:typeof e=="object"?Ot.test(e)?im:_C:Pa}function Wv(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Xd(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function _C(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Xd(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function MC(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const DC=(e,t)=>{const n=sr.createTransformer(t),r=Js(e),o=Js(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?pu.has(e)&&!o.values.length||pu.has(t)&&!r.values.length?AC(e,t):Ti(Wv(MC(r,o),o.values),n):(is(!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.`),Pa(e,t))};function zv(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qe(e,t,n):Xd(e)(e,t)}const NC=5;function Hv(e,t,n){const r=Math.max(t-NC,0);return hv(n-e(r),t-r)}const rt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},nc=.001;function jC({duration:e=rt.duration,bounce:t=rt.bounce,velocity:n=rt.velocity,mass:r=rt.mass}){let o,s;is(e<=un(rt.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Wn(rt.minDamping,rt.maxDamping,i),e=Wn(rt.minDuration,rt.maxDuration,In(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=gu(c,i),p=Math.exp(-d);return nc-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=gu(Math.pow(c,2),i);return(-o(c)+nc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-nc+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=FC(o,s,a);if(e=un(e),isNaN(l))return{stiffness:rt.stiffness,damping:rt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const LC=12;function FC(e,t,n){let r=n;for(let o=1;o<LC;o++)r=r-e(r)/t(r);return r}function gu(e,t){return e*Math.sqrt(1-t*t)}const VC=["duration","bounce"],$C=["stiffness","damping","mass"];function am(e,t){return t.some(n=>e[n]!==void 0)}function BC(e){let t={velocity:rt.velocity,stiffness:rt.stiffness,damping:rt.damping,mass:rt.mass,isResolvedFromDuration:!1,...e};if(!am(e,$C)&&am(e,VC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Wn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:rt.mass,stiffness:o,damping:s}}else{const n=jC(e);t={...t,...n,mass:rt.mass},t.isResolvedFromDuration=!0}return t}function Qd(e=rt.visualDuration,t=rt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=BC({...n,velocity:-In(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),v=i-s,b=In(Math.sqrt(l/u)),y=Math.abs(v)<5;r||(r=y?rt.restSpeed.granular:rt.restSpeed.default),o||(o=y?rt.restDelta.granular:rt.restDelta.default);let g;if(m<1){const S=gu(b,m);g=E=>{const C=Math.exp(-m*b*E);return i-C*((p+m*b*v)/S*Math.sin(S*E)+v*Math.cos(S*E))}}else if(m===1)g=S=>i-Math.exp(-b*S)*(v+(p+b*v)*S);else{const S=b*Math.sqrt(m*m-1);g=E=>{const C=Math.exp(-m*b*E),k=Math.min(S*E,300);return i-C*((p+m*b*v)*Math.sinh(k)+S*v*Math.cosh(k))/S}}const T={calculatedDuration:h&&d||null,next:S=>{const E=g(S);if(h)a.done=S>=d;else{let C=0;m<1&&(C=S===0?un(p):Hv(g,S,E));const k=Math.abs(C)<=r,I=Math.abs(i-E)<=o;a.done=k&&I}return a.value=a.done?i:E,a},toString:()=>{const S=Math.min(Zd(T),Ra),E=gv(C=>T.next(S*C).value,S,30);return S+"ms "+E}};return T}function lm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=k=>a!==void 0&&k<a||l!==void 0&&k>l,p=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let m=n*t;const v=d+m,b=i===void 0?v:i(v);b!==v&&(m=b-d);const y=k=>-m*Math.exp(-k/r),g=k=>b+y(k),T=k=>{const I=y(k),A=g(k);f.done=Math.abs(I)<=c,f.value=f.done?b:A};let S,E;const C=k=>{h(f.value)&&(S=k,E=Qd({keyframes:[f.value,p(f.value)],velocity:Hv(g,k,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!E&&S===void 0&&(I=!0,T(k),C(k)),S!==void 0&&k>=S?E.next(k-S):(!I&&T(k),f)}}}const WC=Si(.42,0,1,1),zC=Si(0,0,.58,1),Uv=Si(.42,0,.58,1),Gv=e=>Array.isArray(e)&&typeof e[0]!="number",cm={linear:Ht,easeIn:WC,easeInOut:Uv,easeOut:zC,circIn:Ud,circInOut:Rv,circOut:Cv,backIn:Hd,backInOut:Tv,backOut:Sv,anticipate:Ev},yu=e=>{if(zd(e)){on(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Si(t,n,r,o)}else if(typeof e=="string")return on(cm[e]!==void 0,`Invalid easing type '${e}'`),cm[e];return e};function HC(e,t,n){const r=[],o=n||zv,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Ht:t;a=Ti(l,a)}r.push(a)}return r}function Yv(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(on(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=HC(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Vr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Wn(e[0],e[s-1],u)):c}function qv(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Vr(0,t,r);e.push(Qe(n,1,o))}}function Kv(e){const t=[0];return qv(t,e.length-1),t}function UC(e,t){return e.map(n=>n*t)}function GC(e,t){return e.map(()=>t||Uv).splice(0,e.length-1)}function Ls({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Gv(r)?r.map(yu):yu(r),s={done:!1,value:t[0]},i=UC(n&&n.length===t.length?n:Kv(t),e),a=Yv(i,t,{ease:Array.isArray(o)?o:GC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const YC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ue.update(t,!0),stop:()=>Bn(t),now:()=>Pt.isProcessing?Pt.timestamp:kn.now()}},qC={decay:lm,inertia:lm,tween:Ls,keyframes:Ls,spring:Qd},KC=e=>e/100;class Jd extends Bv{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||Kd,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=wl(n)?n:qC[n]||Ls;let l,c;process.env.NODE_ENV!=="production"&&a!==Ls&&on(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Ls&&typeof t[0]!="number"&&(l=Ti(KC,zv(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Zd(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate: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 b=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/d)):p==="mirror"&&(T=i)),g=Wn(0,1,A)*d}const S=y?{done:!1,value:l[0]}:T.next(g);a&&(S.value=a(S.value));let{done:E}=S;!y&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(S.value=Sl(l,this.options,o)),v&&v(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?In(t.calculatedDuration):0}get time(){return In(this.currentTime)}set time(t){t=un(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=In(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=YC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const ZC=new Set(["opacity","clipPath","filter","transform"]);function XC(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=vv(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const QC=Wd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ka=10,JC=2e4;function eR(e){return wl(e.type)||e.type==="spring"||!yv(e.ease)}function tR(e,t){const n=new Jd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<JC;)r=n.sample(s),o.push(r.value),s+=ka;return{times:void 0,keyframes:o,duration:s-ka,ease:"linear"}}const Zv={anticipate:Ev,backInOut:Tv,circInOut:Rv};function nR(e){return e in Zv}class um extends Bv{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new $v(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Ca()&&nR(s)&&(s=Zv[s]),eR(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,v=tR(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=XC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Qh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(Sl(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return In(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return In(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=un(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ht;const{animation:r}=n;Qh(r,t)}return Ht}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new Jd({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=un(this.time);c.setWithVelocity(p.sample(m-ka).value,p.sample(m).value,ka)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return QC()&&r&&ZC.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const rR={type:"spring",stiffness:500,damping:25,restSpeed:10},oR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sR={type:"keyframes",duration:.8},iR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aR=(e,{keyframes:t})=>t.length>2?sR:qr.has(e)?e.startsWith("scale")?oR(t[1]):rR:iR;function lR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ef=(e,t,n,r={},o,s)=>i=>{const a=Vd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-un(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};lR(a)||(u={...u,...aR(e,u)}),u.duration&&(u.duration=un(u.duration)),u.repeatDelay&&(u.repeatDelay=un(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const f=Sl(u.keyframes,a);if(f!==void 0)return Ue.update(()=>{u.onUpdate(f),u.onComplete()}),new pv([])}return!s&&um.supports(u)?new um(u):new Jd(u)};function cR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tf(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&cR(u,d))continue;const p={delay:n,...Vd(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=mv(e);if(b){const y=window.MotionHandoffAnimation(b,d,Ue);y!==null&&(p.startTime=y,m=!0)}}cu(e,d),f.start(ef(d,f,h,e.shouldReduceMotion&&fv.has(d)?{type:!1}:p,e,m));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Ue.update(()=>{a&&BE(e,a)})}),c}function vu(e,t,n={}){var r;const o=Qs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(tf(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return uR(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function uR(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(dR).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(vu(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function dR(e,t){return e.sortNodePosition(t)}function fR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>vu(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=vu(e,t,n);else{const o=typeof t=="function"?Qs(e,t,n.custom):t;r=Promise.all(tf(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Xv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const hR=Rd.length;function Qv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Qv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<hR;n++){const r=Rd[n],o=e.props[r];(Ks(o)||o===!1)&&(t[r]=o)}return t}const mR=[...Cd].reverse(),pR=Cd.length;function gR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fR(e,n,r)))}function yR(e){let t=gR(e),n=dm(),r=!0;const o=l=>(c,u)=>{var d;const f=Qs(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=Qv(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<pR;v++){const b=mR[v],y=n[b],g=c[b]!==void 0?c[b]:u[b],T=Ks(g),S=b===l?y.isActive:null;S===!1&&(p=v);let E=g===u[b]&&g!==c[b]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...h},!y.isActive&&S===null||!g&&!y.prevProp||vl(g)||typeof g=="boolean")continue;const C=vR(y.prevProp,g);let k=C||b===l&&y.isActive&&!E&&T||v>p&&T,I=!1;const A=Array.isArray(g)?g:[g];let N=A.reduce(o(b),{});S===!1&&(N={});const{prevResolvedValues:M={}}=y,L={...M,...N},P=D=>{k=!0,f.has(D)&&(I=!0,f.delete(D)),y.needsAnimating[D]=!0;const V=e.getValue(D);V&&(V.liveStyle=!1)};for(const D in L){const V=N[D],H=M[D];if(h.hasOwnProperty(D))continue;let _=!1;lu(V)&&lu(H)?_=!Xv(V,H):_=V!==H,_?V!=null?P(D):f.add(D):V!==void 0&&f.has(D)?P(D):y.protectedKeys[D]=!0}y.prevProp=g,y.prevResolvedValues=N,y.isActive&&(h={...h,...N}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(E&&C)||I)&&d.push(...A.map(D=>({animation:D,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=Qs(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const y=e.getBaseTarget(b),g=e.getValue(b);g&&(g.liveStyle=!0),v[b]=y??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(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=dm(),r=!0}}}function vR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Xv(t,e):!1}function Sr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dm(){return{animate:Sr(!0),whileInView:Sr(),whileHover:Sr(),whileTap:Sr(),whileDrag:Sr(),whileFocus:Sr(),exit:Sr()}}class hr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class bR extends hr{constructor(t){super(t),t.animationState||(t.animationState=yR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vl(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 xR=0;class wR extends hr{constructor(){super(...arguments),this.id=xR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const SR={animation:{Feature:bR},exit:{Feature:wR}},an={x:!1,y:!1};function Jv(){return an.x||an.y}function TR(e){return e==="x"||e==="y"?an[e]?null:(an[e]=!0,()=>{an[e]=!1}):an.x||an.y?null:(an.x=an.y=!0,()=>{an.x=an.y=!1})}function ei(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const nf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ei(e){return{point:{x:e.pageX,y:e.pageY}}}const ER=e=>t=>nf(t)&&e(t,Ei(t));function bo(e,t,n,r){return ei(e,t,ER(n),r)}function eb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function CR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function RR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const tb=1e-4,PR=1-tb,kR=1+tb,nb=.01,IR=0-nb,AR=0+nb;function Ft(e){return e.max-e.min}function OR(e,t,n){return Math.abs(e-t)<=n}function fm(e,t,n,r=.5){e.origin=r,e.originPoint=Qe(t.min,t.max,e.origin),e.scale=Ft(n)/Ft(t),e.translate=Qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=PR&&e.scale<=kR||isNaN(e.scale))&&(e.scale=1),(e.translate>=IR&&e.translate<=AR||isNaN(e.translate))&&(e.translate=0)}function Fs(e,t,n,r){fm(e.x,t.x,n.x,r?r.originX:void 0),fm(e.y,t.y,n.y,r?r.originY:void 0)}function hm(e,t,n){e.min=n.min+t.min,e.max=e.min+Ft(t)}function _R(e,t,n){hm(e.x,t.x,n.x),hm(e.y,t.y,n.y)}function mm(e,t,n){e.min=t.min-n.min,e.max=e.min+Ft(t)}function Vs(e,t,n){mm(e.x,t.x,n.x),mm(e.y,t.y,n.y)}const pm=()=>({translate:0,scale:1,origin:0,originPoint:0}),xo=()=>({x:pm(),y:pm()}),gm=()=>({min:0,max:0}),st=()=>({x:gm(),y:gm()});function tn(e){return[e("x"),e("y")]}function rc(e){return e===void 0||e===1}function bu({scale:e,scaleX:t,scaleY:n}){return!rc(e)||!rc(t)||!rc(n)}function Er(e){return bu(e)||rb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rb(e){return ym(e.x)||ym(e.y)}function ym(e){return e&&e!=="0%"}function Ia(e,t,n){const r=e-n,o=t*r;return n+o}function vm(e,t,n,r,o){return o!==void 0&&(e=Ia(e,o,r)),Ia(e,n,r)+t}function xu(e,t=0,n=1,r,o){e.min=vm(e.min,t,n,r,o),e.max=vm(e.max,t,n,r,o)}function ob(e,{x:t,y:n}){xu(e.x,t.translate,t.scale,t.originPoint),xu(e.y,n.translate,n.scale,n.originPoint)}const bm=.999999999999,xm=1.0000000000001;function MR(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&So(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,ob(e,i)),r&&Er(s.latestValues)&&So(e,s.latestValues))}t.x<xm&&t.x>bm&&(t.x=1),t.y<xm&&t.y>bm&&(t.y=1)}function wo(e,t){e.min=e.min+t,e.max=e.max+t}function wm(e,t,n,r,o=.5){const s=Qe(e.min,e.max,o);xu(e,t,n,s,r)}function So(e,t){wm(e.x,t.x,t.scaleX,t.scale,t.originX),wm(e.y,t.y,t.scaleY,t.scale,t.originY)}function sb(e,t){return eb(RR(e.getBoundingClientRect(),t))}function DR(e,t,n){const r=sb(e,n),{scroll:o}=t;return o&&(wo(r.x,o.offset.x),wo(r.y,o.offset.y)),r}function Aa(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Sm=(e,t)=>Math.abs(e-t);function NR(e,t){const n=Sm(e.x,t.x),r=Sm(e.y,t.y);return Math.sqrt(n**2+r**2)}class ib{constructor(t,n,{transformPagePoint:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=sc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=NR(u.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:h}=u,{timestamp:p}=Pt;this.history.push({...h,timestamp:p});const{onStart:m,onMove:v}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=oc(d,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{Aa(u,"release"),this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=sc(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:oc(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!nf(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=Ei(t),i=oc(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=Pt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,sc(i,this.history)),Aa(t,"set"),this.removeListeners=Ti(bo(t.currentTarget,"pointermove",this.handlePointerMove),bo(t.currentTarget,"pointerup",this.handlePointerUp),bo(t.currentTarget,"pointercancel",this.handlePointerUp),bo(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bn(this.updatePoint)}}function oc(e,t){return t?{point:t(e.point)}:e}function Tm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sc({point:e},t){return{point:e,delta:Tm(e,ab(t)),offset:Tm(e,jR(t)),velocity:LR(t,.1)}}function jR(e){return e[0]}function ab(e){return e[e.length-1]}function LR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ab(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>un(t)));)n--;if(!r)return{x:0,y:0};const s=In(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function FR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Qe(n,e,r.max):Math.min(e,n)),e}function Em(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 VR(e,{top:t,left:n,bottom:r,right:o}){return{x:Em(e.x,n,o),y:Em(e.y,t,r)}}function Cm(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 $R(e,t){return{x:Cm(e.x,t.x),y:Cm(e.y,t.y)}}function BR(e,t){let n=.5;const r=Ft(e),o=Ft(t);return o>r?n=Vr(t.min,t.max-r,e.min):r>o&&(n=Vr(e.min,e.max-o,t.min)),Wn(0,1,n)}function WR(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 wu=.35;function zR(e=wu){return e===!1?e=0:e===!0&&(e=wu),{x:Rm(e,"left","right"),y:Rm(e,"top","bottom")}}function Rm(e,t,n){return{min:Pm(e,t),max:Pm(e,n)}}function Pm(e,t){return typeof e=="number"?e:e[t]||0}const HR=new WeakMap;class UR{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ei(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TR(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tn(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Pn.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[v];g&&(b=Ft(g)*(parseFloat(b)/100))}}this.originPoint[v]=b}),p&&Ue.postRender(()=>p(u,d)),cu(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=GR(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=()=>tn(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 ib(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&Ue.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ui(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=FR(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&yo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=VR(o.layoutBox,n):this.constraints=!1,this.elastic=zR(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&tn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=WR(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yo(t))return!1;const r=t.current;on(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=DR(r,o.root,this.visualElement.getTransformPagePoint());let i=$R(o.layout.layoutBox,s);if(n){const a=n(CR(i));this.hasMutatedConstraints=!!a,a&&(i=eb(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=tn(u=>{if(!Ui(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return cu(this.visualElement,t),r.start(ef(t,r,0,n,this.visualElement,!1))}stopAnimation(){tn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tn(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){tn(n=>{const{drag:r}=this.getProps();if(!Ui(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Qe(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!yo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};tn(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=BR({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),tn(i=>{if(!Ui(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Qe(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;HR.set(this.visualElement,this);const t=this.visualElement.current,n=bo(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();yo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ue.read(r);const i=ei(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(tn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=wu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Ui(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function GR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class YR extends hr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new UR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const km=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class qR extends hr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new ib(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:km(t),onStart:km(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ue.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=bo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ca={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Im(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ts={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const n=Im(e,t.target.x),r=Im(e,t.target.y);return`${n}% ${r}%`}},KR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=sr.parse(e);if(o.length>5)return r;const s=sr.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Qe(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class ZR extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;dE(XR),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ca.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Ue.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kd.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 lb(e){const[t,n]=Uy(),r=x.useContext(qs);return w.jsx(ZR,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Jy),isPresent:t,safeToRemove:n})}const XR={borderRadius:{...Ts,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ts,borderTopRightRadius:Ts,borderBottomLeftRadius:Ts,borderBottomRightRadius:Ts,boxShadow:KR};function cb(e,t,n){const r=wt(e)?e:Vo(e);return r.start(ef("",r,t,n)),r.animation}function ub(e){return e instanceof SVGElement&&e.tagName!=="svg"}const QR=(e,t)=>e.depth-t.depth;class JR{constructor(){this.children=[],this.isDirty=!1}add(t){$d(this.children,t),this.isDirty=!0}remove(t){xl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(QR),this.isDirty=!1,this.children.forEach(t)}}function eP(e,t){const n=kn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Bn(r),e(s-t))};return Ue.read(r,!0),()=>Bn(r)}const db=["TopLeft","TopRight","BottomLeft","BottomRight"],tP=db.length,Am=e=>typeof e=="string"?parseFloat(e):e,Om=e=>typeof e=="number"||me.test(e);function nP(e,t,n,r,o,s){o?(e.opacity=Qe(0,n.opacity!==void 0?n.opacity:1,rP(r)),e.opacityExit=Qe(t.opacity!==void 0?t.opacity:1,0,oP(r))):s&&(e.opacity=Qe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<tP;i++){const a=`border${db[i]}Radius`;let l=_m(t,a),c=_m(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Om(l)===Om(c)?(e[a]=Math.max(Qe(Am(l),Am(c),r),0),(Pn.test(c)||Pn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Qe(t.rotate||0,n.rotate||0,r))}function _m(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rP=fb(0,.5,Cv),oP=fb(.5,.95,Ht);function fb(e,t,n){return r=>r<e?0:r>t?1:n(Vr(e,t,r))}function Mm(e,t){e.min=t.min,e.max=t.max}function en(e,t){Mm(e.x,t.x),Mm(e.y,t.y)}function Dm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Nm(e,t,n,r,o){return e-=t,e=Ia(e,1/n,r),o!==void 0&&(e=Ia(e,1/o,r)),e}function sP(e,t=0,n=1,r=.5,o,s=e,i=e){if(Pn.test(t)&&(t=parseFloat(t),t=Qe(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Qe(s.min,s.max,r);e===s&&(a-=t),e.min=Nm(e.min,t,n,a,o),e.max=Nm(e.max,t,n,a,o)}function jm(e,t,[n,r,o],s,i){sP(e,t[n],t[r],t[o],t.scale,s,i)}const iP=["x","scaleX","originX"],aP=["y","scaleY","originY"];function Lm(e,t,n,r){jm(e.x,t,iP,n?n.x:void 0,r?r.x:void 0),jm(e.y,t,aP,n?n.y:void 0,r?r.y:void 0)}function Fm(e){return e.translate===0&&e.scale===1}function hb(e){return Fm(e.x)&&Fm(e.y)}function Vm(e,t){return e.min===t.min&&e.max===t.max}function lP(e,t){return Vm(e.x,t.x)&&Vm(e.y,t.y)}function $m(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mb(e,t){return $m(e.x,t.x)&&$m(e.y,t.y)}function Bm(e){return Ft(e.x)/Ft(e.y)}function Wm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class cP{constructor(){this.members=[]}add(t){$d(this.members,t),t.scheduleRender()}remove(t){if(xl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uP(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ic=["","X","Y","Z"],dP={visibility:"hidden"},zm=1e3;let fP=0;function ac(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mv(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ue,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pb(r)}function gb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=fP++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(pP),this.nodes.forEach(xP),this.nodes.forEach(wP),this.nodes.forEach(gP)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new JR)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Bd),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ub(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=eP(f,250),ca.hasAnimatedSinceResize&&(ca.hasAnimatedSinceResize=!1,this.nodes.forEach(Um))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||RP,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),y=!this.targetLayout||!mb(this.targetLayout,p),g=!f&&h;if(this.options.layoutRoot||this.resumeFrom||g||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...Vd(m,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||Um(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Bn(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(SP),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Hm);return}this.isUpdating||this.nodes.forEach(vP),this.isUpdating=!1,this.nodes.forEach(bP),this.nodes.forEach(hP),this.nodes.forEach(mP),this.clearAllSnapshots();const a=kn.now();Pt.delta=Wn(0,1e3/60,a-Pt.timestamp),Pt.timestamp=a,Pt.isProcessing=!0,Ql.update.process(Pt),Ql.preRender.process(Pt),Ql.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yP),this.sharedNodes.forEach(TP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ft(this.snapshot.measuredBox.x)&&!Ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!hb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Er(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),PP(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return st();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(kP))){const{scroll:u}=this.root;u&&(wo(l.x,u.offset.x),wo(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=st();if(en(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&en(l,i),wo(l.x,d.offset.x),wo(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=st();en(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&So(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Er(u.latestValues)&&So(l,u.latestValues)}return Er(this.latestValues)&&So(l,this.latestValues),l}removeTransform(i){const a=st();en(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Er(c.latestValues))continue;bu(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();en(u,d),Lm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Er(this.latestValues)&&Lm(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),Vs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_R(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):en(this.target,this.layout.layoutBox),ob(this.target,this.targetDelta)):en(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),Vs(this.relativeTargetOrigin,this.target,h.target),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||bu(this.parent.latestValues)||rb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Pt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;en(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;MR(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=st());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Dm(this.prevProjectionDelta.x,this.projectionDelta.x),Dm(this.prevProjectionDelta.y,this.projectionDelta.y)),Fs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Wm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xo(),this.projectionDelta=xo(),this.projectionDeltaWithTransform=xo()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=xo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),b=!v||v.members.length<=1,y=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(CP));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const S=T/1e3;Gm(d.x,i.x,S),Gm(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),EP(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&lP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),en(g,this.relativeTarget)),m&&(this.animationValues=u,nP(u,c,this.latestValues,S,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Bn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ue.update(()=>{ca.hasAnimatedSinceResize=!0,this.currentAnimation=cb(0,zm,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(zm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&yb(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=Ft(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Ft(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}en(a,l),So(a,u),Fs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new cP),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ac("z",i,c,this.animationValues);for(let u=0;u<ic.length;u++)ac(`rotate${ic[u]}`,i,c,this.animationValues),ac(`skew${ic[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return dP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=aa(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=aa(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Er(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=uP(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Zs){if(f[m]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:y}=Zs[m],g=c.transform==="none"?f[m]:v(f[m],d);if(b){const T=b.length;for(let S=0;S<T;S++)c[b[S]]=g}else y?this.options.visualElement.renderState.vars[m]=g:c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?aa(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Hm),this.root.sharedNodes.clear()}}}function hP(e){e.updateLayout()}function mP(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?tn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Ft(f);f.min=r[d].min,f.max=f.min+h}):yb(s,n.layoutBox,r)&&tn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Ft(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=xo();Fs(a,r,n.layoutBox);const l=xo();i?Fs(l,e.applyTransform(o,!0),n.measuredBox):Fs(l,r,n.layoutBox);const c=!hb(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=st();Vs(p,n.layoutBox,f.layoutBox);const m=st();Vs(m,r,h.layoutBox),mb(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function pP(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function gP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yP(e){e.clearSnapshot()}function Hm(e){e.clearMeasurements()}function vP(e){e.isLayoutDirty=!1}function bP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Um(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xP(e){e.resolveTargetDelta()}function wP(e){e.calcProjection()}function SP(e){e.resetSkewAndRotation()}function TP(e){e.removeLeadSnapshot()}function Gm(e,t,n){e.translate=Qe(t.translate,0,n),e.scale=Qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ym(e,t,n,r){e.min=Qe(t.min,n.min,r),e.max=Qe(t.max,n.max,r)}function EP(e,t,n,r){Ym(e.x,t.x,n.x,r),Ym(e.y,t.y,n.y,r)}function CP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const RP={duration:.45,ease:[.4,0,.1,1]},qm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Km=qm("applewebkit/")&&!qm("chrome/")?Math.round:Ht;function Zm(e){e.min=Km(e.min),e.max=Km(e.max)}function PP(e){Zm(e.x),Zm(e.y)}function yb(e,t,n){return e==="position"||e==="preserve-aspect"&&!OR(Bm(t),Bm(n),.2)}function kP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const IP=gb({attachResizeListener:(e,t)=>ei(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lc={current:void 0},vb=gb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lc.current){const e=new IP({});e.mount(window),e.setOptions({layoutScroll:!0}),lc.current=e}return lc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),AP={pan:{Feature:qR},drag:{Feature:YR,ProjectionNode:vb,MeasureLayout:lb}};function bb(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const s=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function xb(e,t){const n=bb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Xm(e){return!(e.pointerType==="touch"||Jv())}function OP(e,t,n={}){const[r,o,s]=xb(e,n),i=a=>{if(!Xm(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Xm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Qm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&Ue.postRender(()=>s(t,Ei(t)))}class _P extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=OP(t,(n,r)=>(Qm(this.node,r,"Start"),o=>Qm(this.node,o,"End"))))}unmount(){}}class MP extends hr{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=Ti(ei(this.node.current,"focus",()=>this.onFocus()),ei(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const wb=(e,t)=>t?e===t?!0:wb(e,t.parentElement):!1,DP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function NP(e){return DP.has(e.tagName)||e.tabIndex!==-1}const ks=new WeakSet;function Jm(e){return t=>{t.key==="Enter"&&e(t)}}function cc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const jP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Jm(()=>{if(ks.has(n))return;cc(n,"down");const o=Jm(()=>{cc(n,"up")}),s=()=>cc(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ep(e){return nf(e)&&!Jv()}function LP(e,t,n={}){const[r,o,s]=xb(e,n),i=a=>{const l=a.currentTarget;if(!l||!ep(a)||ks.has(l))return;ks.add(l),Aa(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Aa(h,"release"),!(!ep(h)||!ks.has(l))&&(ks.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?FP(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||wb(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!NP(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>jP(c,o),o)}),s}function FP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function tp(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&Ue.postRender(()=>s(t,Ei(t)))}class VP extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=LP(t,(n,r)=>(tp(this.node,r,"Start"),(o,{success:s})=>tp(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Su=new WeakMap,uc=new WeakMap,$P=e=>{const t=Su.get(e.target);t&&t(e)},BP=e=>{e.forEach($P)};function WP({root:e,...t}){const n=e||document;uc.has(n)||uc.set(n,{});const r=uc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(BP,{root:e,...t})),r[o]}function zP(e,t,n){const r=WP(t);return Su.set(e,n),r.observe(e),()=>{Su.delete(e),r.unobserve(e)}}const HP={some:0,all:1};class UP extends hr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:HP[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return zP(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(GP(t,n))&&this.startObserver()}unmount(){}}function GP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YP={inView:{Feature:UP},tap:{Feature:VP},focus:{Feature:MP},hover:{Feature:_P}},qP={layout:{ProjectionNode:vb,MeasureLayout:lb}},Tu={current:null},Sb={current:!1};function KP(){if(Sb.current=!0,!!Ed)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Tu.current=e.matches;e.addListener(t),t()}else Tu.current=!1}const ZP=[...Vv,Ot,sr],XP=e=>ZP.find(Fv(e)),ti=new WeakMap;function QP(e,t,n){for(const r in t){const o=t[r],s=n[r];if(wt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&gl(o.version==="12.4.7",`Attempting to mix Motion versions ${o.version} with 12.4.7 may not work as expected.`);else if(wt(s))e.addValue(r,Vo(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Vo(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const np=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Tb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=kn.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Ue.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=bl(n),this.isVariantNode=Xy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&wt(p)&&p.set(l[h],!1)}}mount(t){this.current=t,ti.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)),Sb.current||KP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Tu.current,process.env.NODE_ENV!=="production"&&gl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Bn(this.notifyUpdate),Bn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=qr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Fo){const n=Fo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):st()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<np.length;r++){const o=np[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=QP(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Vo(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"&&(jv(o)||Pv(o))?o=parseFloat(o):!XP(o)&&sr.test(n)&&(o=Mv(t,n)),this.setBaseTarget(t,wt(o)?o.get():o)),wt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=Ld(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!wt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Eb extends Tb{constructor(){super(...arguments),this.KeyframeResolver=$v}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function JP(e){return window.getComputedStyle(e)}class Cb extends Eb{constructor(){super(...arguments),this.type="html",this.renderInstance=lv}readValueFromInstance(t,n){if(qr.has(n)){const r=qd(n);return r&&r.default||0}else{const r=JP(t),o=(Id(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return sb(t,n)}build(t,n,r){_d(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fd(t,n,r)}}class Rb extends Eb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&av(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qr.has(n)){const r=qd(n);return r&&r.default||0}return n=cv.has(n)?n:Pd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return dv(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ue.postRender(this.updateDimensions)}build(t,n,r){Nd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){uv(t,n,r,o)}mount(t){this.isSVGTag=jd(t.tagName),super.mount(t)}}const ek=(e,t)=>Dd(e)?new Rb(t):new Cb(t,{allowProjection:e!==x.Fragment}),tk=NE({...SR,...YP,...AP,...qP},ek),ct=XT(tk);function $r(e){const t=hn(()=>Vo(e)),{isStatic:n}=x.useContext(Lo);if(n){const[,r]=x.useState(e);x.useEffect(()=>t.on("change",r),[])}return t}function Pb(e,t){const n=$r(t()),r=()=>n.set(t());return r(),pl(()=>{const o=()=>Ue.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Bn(r)}}),n}const nk=e=>e&&typeof e=="object"&&e.mix,rk=e=>nk(e)?e.mix:void 0;function ok(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Yv(o,s,{mixer:rk(s[0]),...i});return t?a(r):a}function sk(e){Ns.current=[],e();const t=Pb(Ns.current,e);return Ns.current=void 0,t}function ik(e,t,n,r){if(typeof e=="function")return sk(e);const o=typeof t=="function"?t:ok(t,n,r);return Array.isArray(e)?rp(e,o):rp([e],([s])=>o(s))}function rp(e,t){const n=hn(()=>[]);return Pb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ak(e){return x.useEffect(()=>()=>e(),[])}function lk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Zd(r),Ra);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:In(o)}}const ck=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function kb(e,t){return Gv(e)?e[ck(0,e.length,t)]:e}function rf(e){return typeof e=="object"&&!Array.isArray(e)}function Ib(e,t,n,r){return typeof e=="string"&&rf(t)?bb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function uk(e,t,n){return e*(t+1)}function op(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function dk(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(xl(e,o),r--)}}function fk(e,t,n,r,o,s){dk(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Qe(o,s,r[i]),easing:kb(n,i)})}function hk(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function mk(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const pk="easeInOut",gk=20;function yk(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const p=e[h];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,op(d,p.at,u,c));continue}let[m,v,b={}]=p;b.at!==void 0&&(d=op(d,b.at,u,c));let y=0;const g=(T,S,E,C=0,k=0)=>{const I=vk(T),{delay:A=0,times:N=Kv(I),type:M="keyframes",repeat:L,repeatType:P,repeatDelay:O=0,...j}=S;let{ease:D=t.ease||"easeOut",duration:V}=S;const H=typeof A=="function"?A(C,k):A,_=I.length,$=wl(M)?M:o==null?void 0:o[M];if(_<=2&&$){let G=100;if(_===2&&wk(I)){const z=I[1]-I[0];G=Math.abs(z)}const F={...j};V!==void 0&&(F.duration=un(V));const B=lk(F,G,$);D=B.ease,V=B.duration}V??(V=s);const K=d+H;N.length===1&&N[0]===0&&(N[1]=1);const re=N.length-I.length;if(re>0&&qv(N,re),I.length===1&&I.unshift(null),L){on(L<gk,"Repeat count too high, must be less than 20"),V=uk(V,L);const G=[...I],F=[...N];D=Array.isArray(D)?[...D]:[D];const B=[...D];for(let z=0;z<L;z++){I.push(...G);for(let Y=0;Y<G.length;Y++)N.push(F[Y]+(z+1)),D.push(Y===0?"linear":kb(B,Y-1))}hk(N,L)}const ee=K+V;fk(E,I,D,N,K,ee),y=Math.max(H+V,y),f=Math.max(ee,f)};if(wt(m)){const T=sp(m,a);g(v,b,ip("default",T))}else{const T=Ib(m,v,r,l),S=T.length;for(let E=0;E<S;E++){v=v,b=b;const C=T[E],k=sp(C,a);for(const I in v)g(v[I],bk(b,I),ip(I,k),E,S)}}u=d,d+=y}return a.forEach((h,p)=>{for(const m in h){const v=h[m];v.sort(mk);const b=[],y=[],g=[];for(let S=0;S<v.length;S++){const{at:E,value:C,easing:k}=v[S];b.push(C),y.push(Vr(0,f,E)),g.push(k||"easeOut")}y[0]!==0&&(y.unshift(0),b.unshift(b[0]),g.unshift(pk)),y[y.length-1]!==1&&(y.push(1),b.push(null)),i.has(p)||i.set(p,{keyframes:{},transition:{}});const T=i.get(p);T.keyframes[m]=b,T.transition[m]={...t,duration:f,ease:g,times:y,...n}}}),i}function sp(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ip(e,t){return t[e]||(t[e]=[]),t[e]}function vk(e){return Array.isArray(e)?e:[e]}function bk(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const xk=e=>typeof e=="number",wk=e=>e.every(xk);function Sk(e,t){return e in t}class Tk extends Tb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Sk(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return st()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function Ek(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ub(e)?new Rb(t):new Cb(t);n.mount(e),ti.set(e,n)}function Ck(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Tk(t);n.mount(e),ti.set(e,n)}function Rk(e,t){return wt(e)||typeof e=="number"||typeof e=="string"&&!rf(t)}function Ab(e,t,n,r){const o=[];if(Rk(e,t))o.push(cb(e,rf(t)&&t.default||t,n&&(n.default||n)));else{const s=Ib(e,t,r),i=s.length;on(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?Ek:Ck;ti.has(l)||c(l);const u=ti.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...tf(u,{...t,transition:d},{}))}}return o}function Pk(e,t,n){const r=[];return yk(e,t,n,{spring:Qd}).forEach(({keyframes:s,transition:i},a)=>{r.push(...Ab(a,s,i))}),r}function kk(e){return Array.isArray(e)&&e.some(Array.isArray)}function Ik(e){function t(n,r,o){let s=[];kk(n)?s=Pk(n,r,e):s=Ab(n,r,o,e);const i=new pv(s);return e&&e.animations.push(i),i}return t}function Ak(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>Ik(e));return ak(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class Ok{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 _k=()=>new Ok;function Mk(){return hn(_k)}function Dk(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function Nk(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:Dk(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=yu(r)(l/c)*c}return t+l}}const Ob=x.createContext(null);function jk(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Qe(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?LE(e,o,o+s):e}function Lk({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=hn(()=>ct[t]),l=[],c=x.useRef(!1);on(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(Vk)},updateOrder:(d,f,h)=>{if(c.current)return;const p=jk(l,d,f,h);l!==p&&(c.current=!0,r(p.map(Fk).filter(m=>o.indexOf(m)!==-1)))}};return x.useEffect(()=>{c.current=!1}),w.jsx(a,{...s,ref:i,ignoreStrict:!0,children:w.jsx(Ob.Provider,{value:u,children:e})})}const _b=x.forwardRef(Lk);function Fk(e){return e.value}function Vk(e,t){return e.layout.min-t.layout.min}function ap(e,t=0){return wt(e)?e:$r(t)}function $k({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=hn(()=>ct[r]),c=x.useContext(Ob),u={x:ap(t.x),y:ap(t.y)},d=ik([u.x,u.y],([m,v])=>m||v?1:"unset");on(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return w.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,v)=>{const{velocity:b}=v;b[f]&&p(n,u[f].get(),b[f]),o&&o(m,v)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const Mb=x.forwardRef($k);/**
|
|
13
13
|
* @license lucide-react v0.414.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
@@ -24,117 +24,117 @@
|
|
|
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 zk=
|
|
27
|
+
*/const zk=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>x.createElement("svg",{ref:l,...Wk,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Db("lucide",o),...a},[...i.map(([c,u])=>x.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
28
28
|
* @license lucide-react v0.414.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
32
|
+
*/const yt=(e,t)=>{const n=x.forwardRef(({className:r,...o},s)=>x.createElement(zk,{ref:s,iconNode:t,className:Db(`lucide-${Bk(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 Hk=
|
|
37
|
+
*/const Hk=yt("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 Uk=
|
|
42
|
+
*/const Uk=yt("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 Nb=
|
|
47
|
+
*/const Nb=yt("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 Gk=
|
|
52
|
+
*/const Gk=yt("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 of=
|
|
57
|
+
*/const of=yt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
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 Yk=
|
|
62
|
+
*/const Yk=yt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
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 sf=
|
|
67
|
+
*/const sf=yt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
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 jb=
|
|
72
|
+
*/const jb=yt("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"}]]);/**
|
|
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 qk=
|
|
77
|
+
*/const qk=yt("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"}]]);/**
|
|
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 Lb=
|
|
82
|
+
*/const Lb=yt("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"}]]);/**
|
|
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 Kk=
|
|
87
|
+
*/const Kk=yt("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"}]]);/**
|
|
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 Fb=
|
|
92
|
+
*/const Fb=yt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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 Zk=
|
|
97
|
+
*/const Zk=yt("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
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 af=
|
|
102
|
+
*/const af=yt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 Xk=
|
|
107
|
+
*/const Xk=yt("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"}]]);/**
|
|
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 Qk=
|
|
112
|
+
*/const Qk=yt("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"}]]);/**
|
|
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 Bo=
|
|
117
|
+
*/const Bo=yt("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"}]]);/**
|
|
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 Jk=
|
|
122
|
+
*/const Jk=yt("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
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 eI=
|
|
127
|
+
*/const eI=yt("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"}]]);/**
|
|
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 tI=
|
|
132
|
+
*/const tI=yt("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"}]]);/**
|
|
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 lf=gt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lp={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},nI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Vb=e=>S.jsx(lt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:lp,exit:lp.false,transition:nI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Me("aria-hidden:pointer-events-none",e.className),children:e.children}),rI=os("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),oI=w.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return S.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:Me("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:S.jsx(Vb,{"data-open":!!s,open:!!s,children:S.jsxs(ss,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:Me(rI({theme:n}),t),children:[S.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?S.jsx(jb,{size:20}):null,!r&&n==="info"?S.jsx(Fb,{size:20}):null,!r&&n==="danger"?S.jsx(Jk,{size:20}):null,r,S.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?S.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:S.jsx(lf,{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 Xe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function cs(e,t){const n=De(e);return isNaN(t)?Xe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Tl(e,t){const n=De(e);if(isNaN(t))return Xe(e,NaN);if(!t)return n;const r=n.getDate(),o=Xe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const $b=6048e5,sI=864e5,iI=6e4,aI=36e5,lI=1e3;let cI={};function Kr(){return cI}function On(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),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Wo(e){return On(e,{weekStartsOn:1})}function Bb(e){const t=De(e),n=t.getFullYear(),r=Xe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Wo(r),s=Xe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Wo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function zo(e){const t=De(e);return t.setHours(0,0,0,0),t}function Oa(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 uI(e,t){const n=zo(e),r=zo(t),o=+n-Oa(n),s=+r-Oa(r);return Math.round((o-s)/sI)}function dI(e){const t=Bb(e),n=Xe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Wo(n)}function Wb(e,t){const n=t*7;return cs(e,n)}function zb(e,t){return Tl(e,t*12)}function fI(e){return Xe(e,Date.now())}function hI(e,t){const n=zo(e),r=zo(t);return+n==+r}function mI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Hb(e){if(!mI(e)&&typeof e!="number")return!1;const t=De(e);return!isNaN(Number(t))}function Ub(e,t){const n=De(e.start),r=De(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(De(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Gb(e){const t=De(e);return t.setDate(1),t.setHours(0,0,0,0),t}function pI(e){const t=De(e),n=Xe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function gI(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),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const yI={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"}},vI=(e,t,n)=>{let r;const o=yI[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 dc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const bI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},SI={date:dc({formats:bI,defaultWidth:"full"}),time:dc({formats:xI,defaultWidth:"full"}),dateTime:dc({formats:wI,defaultWidth:"full"})},TI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EI=(e,t,n,r)=>TI[e];function Es(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const CI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},PI={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"]},kI={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"]},II={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"}},AI={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"}},OI=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},_I={ordinalNumber:OI,era:Es({values:CI,defaultWidth:"wide"}),quarter:Es({values:RI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Es({values:PI,defaultWidth:"wide"}),day:Es({values:kI,defaultWidth:"wide"}),dayPeriod:Es({values:II,defaultWidth:"wide",formattingValues:AI,defaultFormattingWidth:"wide"})};function Cs(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?DI(a,d=>d.test(i)):MI(a,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function MI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function DI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function NI(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const jI=/^(\d+)(th|st|nd|rd)?/i,LI=/\d+/i,FI={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},VI={any:[/^b/i,/^(a|c)/i]},$I={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},BI={any:[/1/i,/2/i,/3/i,/4/i]},WI={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},zI={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]},HI={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},UI={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]},GI={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},YI={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}},qI={ordinalNumber:NI({matchPattern:jI,parsePattern:LI,valueCallback:e=>parseInt(e,10)}),era:Cs({matchPatterns:FI,defaultMatchWidth:"wide",parsePatterns:VI,defaultParseWidth:"any"}),quarter:Cs({matchPatterns:$I,defaultMatchWidth:"wide",parsePatterns:BI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cs({matchPatterns:WI,defaultMatchWidth:"wide",parsePatterns:zI,defaultParseWidth:"any"}),day:Cs({matchPatterns:HI,defaultMatchWidth:"wide",parsePatterns:UI,defaultParseWidth:"any"}),dayPeriod:Cs({matchPatterns:GI,defaultMatchWidth:"any",parsePatterns:YI,defaultParseWidth:"any"})},Yb={code:"en-US",formatDistance:vI,formatLong:SI,formatRelative:EI,localize:_I,match:qI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function KI(e){const t=De(e);return uI(t,pI(t))+1}function qb(e){const t=De(e),n=+Wo(t)-+dI(t);return Math.round(n/$b)+1}function cf(e,t){var u,d,f,h;const n=De(e),r=n.getFullYear(),o=Kr(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Xe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=On(i,t),l=Xe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=On(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ZI(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=cf(e,t),s=Xe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),On(s,t)}function Kb(e,t){const n=De(e),r=+On(n,t)-+ZI(n,t);return Math.round(r/$b)+1}function We(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Zn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return We(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):We(n+1,2)},d(e,t){return We(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 We(e.getHours()%12||12,t.length)},H(e,t){return We(e.getHours(),t.length)},m(e,t){return We(e.getMinutes(),t.length)},s(e,t){return We(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return We(o,t.length)}},ao={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cp={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 Zn.y(e,t)},Y:function(e,t,n,r){const o=cf(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return We(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):We(s,t.length)},R:function(e,t){const n=Bb(e);return We(n,t.length)},u:function(e,t){const n=e.getFullYear();return We(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 We(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 We(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 Zn.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 We(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=Kb(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):We(o,t.length)},I:function(e,t,n){const r=qb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):We(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Zn.d(e,t)},D:function(e,t,n){const r=KI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):We(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return We(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return We(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return We(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=ao.noon:r===0?o=ao.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=ao.evening:r>=12?o=ao.afternoon:r>=4?o=ao.morning:o=ao.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 Zn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Zn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Zn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Zn.s(e,t)},S:function(e,t){return Zn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return dp(r);case"XXXX":case"XX":return Cr(r);case"XXXXX":case"XXX":default:return Cr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return dp(r);case"xxxx":case"xx":return Cr(r);case"xxxxx":case"xxx":default:return Cr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+up(r,":");case"OOOO":default:return"GMT"+Cr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+up(r,":");case"zzzz":default:return"GMT"+Cr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return We(r,t.length)},T:function(e,t,n){const r=e.getTime();return We(r,t.length)}};function up(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+We(s,2)}function dp(e,t){return e%60===0?(e>0?"-":"+")+We(Math.abs(e)/60,2):Cr(e,t)}function Cr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=We(Math.trunc(r/60),2),s=We(r%60,2);return n+o+t+s}const fp=(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"})}},Zb=(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"})}},XI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return fp(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",fp(r,t)).replace("{{time}}",Zb(o,t))},Eu={p:Zb,P:XI},QI=/^D+$/,JI=/^Y+$/,eA=["D","DD","YY","YYYY"];function Xb(e){return QI.test(e)}function Qb(e){return JI.test(e)}function Cu(e,t,n){const r=tA(e,t,n);if(console.warn(r),eA.includes(e))throw new RangeError(r)}function tA(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 nA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oA=/^'([^]*?)'?$/,sA=/''/g,iA=/[a-zA-Z]/;function aA(e,t,n){var u,d,f,h;const r=Kr(),o=r.locale??Yb,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=De(e);if(!Hb(a))throw new RangeError("Invalid time value");let l=t.match(rA).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Eu[m];return v(p,o.formatLong)}return p}).join("").match(nA).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:lA(p)};if(cp[m])return{isToken:!0,value:p};if(m.match(iA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Qb(m)||Xb(m))&&Cu(m,t,String(e));const v=cp[m[0]];return v(a,m,o.localize,c)}).join("")}function lA(e){const t=e.match(oA);return t?t[1].replace(sA,"'"):e}function cA(){return Object.assign({},Kr())}function uA(e){let n=De(e).getDay();return n===0&&(n=7),n}function dA(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function fA(e,t){const n=De(e),r=De(t);return+n<+r}function hA(e,t){const n=t instanceof Date?Xe(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 mA=10;class Jb{constructor(){ae(this,"subPriority",0)}validate(t,n){return!0}}class pA extends Jb{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class gA extends Jb{constructor(){super(...arguments);ae(this,"priority",mA);ae(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Xe(n,hA(n,Date))}}class Ne{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new pA(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class yA extends Ne{constructor(){super(...arguments);ae(this,"priority",140);ae(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 ht={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}/},wn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ot(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Sn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*aI+s*iI+i*lI),rest:t.slice(n[0].length)}}function e0(e){return ot(ht.anyDigitsSigned,e)}function ut(e,t){switch(e){case 1:return ot(ht.singleDigit,t);case 2:return ot(ht.twoDigits,t);case 3:return ot(ht.threeDigits,t);case 4:return ot(ht.fourDigits,t);default:return ot(new RegExp("^\\d{1,"+e+"}"),t)}}function _a(e,t){switch(e){case 1:return ot(ht.singleDigitSigned,t);case 2:return ot(ht.twoDigitsSigned,t);case 3:return ot(ht.threeDigitsSigned,t);case 4:return ot(ht.fourDigitsSigned,t);default:return ot(new RegExp("^-?\\d{1,"+e+"}"),t)}}function uf(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 t0(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function n0(e){return e%400===0||e%4===0&&e%100!==0}class vA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return mt(ut(4,n),s);case"yo":return mt(o.ordinalNumber(n,{unit:"year"}),s);default:return mt(ut(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=t0(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class bA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return mt(ut(4,n),s);case"Yo":return mt(o.ordinalNumber(n,{unit:"year"}),s);default:return mt(ut(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=cf(n,s);if(o.isTwoDigitYear){const l=t0(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),On(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),On(n,s)}}class xA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return _a(r==="R"?4:r.length,n)}set(n,r,o){const s=Xe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Wo(s)}}class wA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return _a(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class SA extends Ne{constructor(){super(...arguments);ae(this,"priority",120);ae(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 ut(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 TA extends Ne{constructor(){super(...arguments);ae(this,"priority",120);ae(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 ut(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 EA extends Ne{constructor(){super(...arguments);ae(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ae(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return mt(ot(ht.month,n),s);case"MM":return mt(ut(2,n),s);case"Mo":return mt(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class CA extends Ne{constructor(){super(...arguments);ae(this,"priority",110);ae(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return mt(ot(ht.month,n),s);case"LL":return mt(ut(2,n),s);case"Lo":return mt(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function RA(e,t,n){const r=De(e),o=Kb(r,n)-t;return r.setDate(r.getDate()-o*7),r}class PA extends Ne{constructor(){super(...arguments);ae(this,"priority",100);ae(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ot(ht.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return ut(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return On(RA(n,o,s),s)}}function kA(e,t){const n=De(e),r=qb(n)-t;return n.setDate(n.getDate()-r*7),n}class IA extends Ne{constructor(){super(...arguments);ae(this,"priority",100);ae(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 ot(ht.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return ut(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Wo(kA(n,o))}}const AA=[31,28,31,30,31,30,31,31,30,31,30,31],OA=[31,29,31,30,31,30,31,31,30,31,30,31];class _A extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"subPriority",1);ae(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ot(ht.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return ut(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=n0(o),i=n.getMonth();return s?r>=1&&r<=OA[i]:r>=1&&r<=AA[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class MA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"subpriority",1);ae(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 ot(ht.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return ut(r.length,n)}}validate(n,r){const o=n.getFullYear();return n0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function df(e,t,n){var d,f,h,p;const r=Kr(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=De(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return cs(s,u)}class DA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=df(n,o,s),n.setHours(0,0,0,0),n}}class NA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return mt(ut(r.length,n),i);case"eo":return mt(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=df(n,o,s),n.setHours(0,0,0,0),n}}class jA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return mt(ut(r.length,n),i);case"co":return mt(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=df(n,o,s),n.setHours(0,0,0,0),n}}function LA(e,t){const n=De(e),r=uA(n),o=t-r;return cs(n,o)}class FA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return ut(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return mt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return mt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return mt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return mt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=LA(n,o),n.setHours(0,0,0,0),n}}class VA extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class $A extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class BA extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class WA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ot(ht.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return ut(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class zA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ot(ht.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return ut(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class HA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ot(ht.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return ut(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 UA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ot(ht.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return ut(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class GA extends Ne{constructor(){super(...arguments);ae(this,"priority",60);ae(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ot(ht.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return ut(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class YA extends Ne{constructor(){super(...arguments);ae(this,"priority",50);ae(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ot(ht.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return ut(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class qA extends Ne{constructor(){super(...arguments);ae(this,"priority",30);ae(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return mt(ut(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class KA extends Ne{constructor(){super(...arguments);ae(this,"priority",10);ae(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Sn(wn.basicOptionalMinutes,n);case"XX":return Sn(wn.basic,n);case"XXXX":return Sn(wn.basicOptionalSeconds,n);case"XXXXX":return Sn(wn.extendedOptionalSeconds,n);case"XXX":default:return Sn(wn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Xe(n,n.getTime()-Oa(n)-o)}}class ZA extends Ne{constructor(){super(...arguments);ae(this,"priority",10);ae(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Sn(wn.basicOptionalMinutes,n);case"xx":return Sn(wn.basic,n);case"xxxx":return Sn(wn.basicOptionalSeconds,n);case"xxxxx":return Sn(wn.extendedOptionalSeconds,n);case"xxx":default:return Sn(wn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Xe(n,n.getTime()-Oa(n)-o)}}class XA extends Ne{constructor(){super(...arguments);ae(this,"priority",40);ae(this,"incompatibleTokens","*")}parse(n){return e0(n)}set(n,r,o){return[Xe(n,o*1e3),{timestampIsSet:!0}]}}class QA extends Ne{constructor(){super(...arguments);ae(this,"priority",20);ae(this,"incompatibleTokens","*")}parse(n){return e0(n)}set(n,r,o){return[Xe(n,o),{timestampIsSet:!0}]}}const JA={G:new yA,y:new vA,Y:new bA,R:new xA,u:new wA,Q:new SA,q:new TA,M:new EA,L:new CA,w:new PA,I:new IA,d:new _A,D:new MA,E:new DA,e:new NA,c:new jA,i:new FA,a:new VA,b:new $A,B:new BA,h:new WA,H:new zA,K:new HA,k:new UA,m:new GA,s:new YA,S:new qA,X:new KA,x:new ZA,t:new XA,T:new QA},eO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nO=/^'([^]*?)'?$/,rO=/''/g,oO=/\S/,sO=/[a-zA-Z]/;function iO(e,t,n,r){var m,v,b,y;const o=cA(),s=o.locale??Yb,i=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((y=(b=o.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0;if(t==="")return e===""?De(n):Xe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new gA],u=t.match(tO).map(g=>{const T=g[0];if(T in Eu){const x=Eu[T];return x(g,s.formatLong)}return g}).join("").match(eO),d=[];for(let g of u){Qb(g)&&Cu(g,t,e),Xb(g)&&Cu(g,t,e);const T=g[0],x=JA[T];if(x){const{incompatibleTokens:E}=x;if(Array.isArray(E)){const k=d.find(I=>E.includes(I.token)||I.token===T);if(k)throw new RangeError(`The format string mustn't contain \`${k.fullToken}\` and \`${g}\` at the same time`)}else if(x.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 C=x.run(e,g,s.match,l);if(!C)return Xe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(sO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=aO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Xe(n,NaN)}}if(e.length>0&&oO.test(e))return Xe(n,NaN);const f=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,x)=>x.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,x)=>x.subPriority-T.subPriority)).map(g=>g[0]);let h=De(n);if(isNaN(h.getTime()))return Xe(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Xe(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return Xe(n,h)}function aO(e){return e.match(nO)[1].replace(rO,"'")}function lO(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function cO(e){return hI(e,fI(e))}function uO(e,t){return cs(e,-t)}function r0(e,t){return Tl(e,-t)}function dO(e,t){return Wb(e,-t)}function fO(e,t){return zb(e,-t)}var pt=function(){return pt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pt.apply(this,arguments)};function ff(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 Ru(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}var ni=function(e){return e.replace(new RegExp(" ","g")," ")},o0=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)},hO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},s0=function(e,t,n){var r=e.length-2,o=hO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},i0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ma=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},mO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},fc=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},pO=function(e){return e==="money"||e==="currency"},gO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return pt(pt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Gi=function(e,t){var n=o0(i0(e),t.fraction.length),r="".concat(t.currency).concat(s0(n,t.group,t.decimal));return ni(r)},yO=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=ff(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var d=w.useMemo(function(){var p=gO(r,s,a);return p.currency=ni("".concat(p.currency.trim()," ")),p.literal=ni(p.literal.trim()),p},[r,s]),f=function(p){var m=Gi(p.target.value,d),v=Ma(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)};w.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Gi(p,d),v=Ma(m);u.current.value=m,u.current.setAttribute("data-number",v.toString());var b=new InputEvent("change",{});l==null||l(pt(pt({},b),{target:u.current,currentTarget:u.current})),v!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?Gi(c.defaultValue,d):void 0;return w.createElement("input",pt({},c,{value:typeof c.value=="string"?Gi(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),vO=1,bO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},xO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return pt(pt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Yi=function(e,t){var n=o0(i0(e),t.fraction.length),r="".concat(s0(n,t.group,t.decimal)," ").concat(t.percentSign);return ni(r)},wO=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=ff(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=Ru(w.useState(function(){var b,y;return(y=(b=i.value)===null||b===void 0?void 0:b.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var b,y=Number.parseFloat("".concat((b=i.value)!==null&&b!==void 0?b:"0")).toFixed(d.fraction.length);u(Yi(y,d))},[i.value]);var d=w.useMemo(function(){var b=xO(r);return b.percentSign=ni("".concat(b.percentSign)),b},[r]),f=c.length-d.percentSign.length-vO,h=function(b){var y,g=a.current;g&&(g.setSelectionRange(f,f),b&&((y=i.onFocus)===null||y===void 0||y.call(i,b)))},p=function(b){var y=b.currentTarget;if(y.selectionStart!==null){var g=y.selectionStart,T=y.selectionEnd,x=g!==T,E=f<g;!x&&E&&h()}s==null||s(b)},m=function(b){var y=Yi(b.target.value,d),g=Ma(y);u(y),b.target.value=y,b.target.setAttribute("data-number",g.toString()),o==null||o(b)};w.useEffect(function(){if(a.current!==null){var b=a.current.value;if(b!==""){var y=Yi(b,d),g=Ma(y);u(y),a.current.value=y,a.current.setAttribute("data-number",g.toString());var T=new InputEvent("change",{});o==null||o(pt(pt({},T),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return h()},[c]);var v=i.defaultValue?Yi(i.defaultValue,d):void 0;return w.createElement("input",pt({},i,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Is={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},SO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Da[s];i===void 0?r.push(s.replace(Is.dots,"\\.").replace(Is.openParenthesis,"\\(").replace(Is.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Is.leadingBars,"\\")},$s=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Pu(o,n);var s=SO(o);return n?"^".concat(s,"$"):s},TO=function(e){return e.replace(Is.escape,"\\$&")},Pu=function(e,t){var n=e.map(function(r){return typeof r=="string"?TO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Da={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]/}},EO=/\d/,hp="(dd) 9dddd-dddd",mp="(dd) dddd-dddd",pp="ddd.ddd.ddd-dd",gp="dd.ddd.ddd/dddd-dd",ua=function(e){return e.replace(/\D/g,"")},CO=["2",/[0-3]/,":",/[0-5]/,/\d/],RO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Wt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:pp,isoDate:"dddd-dd-dd",cnpj:gp,telephone:mp,cellphone:hp,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ua(e).length<=11?pp:gp},int:function(e){return e===void 0&&(e=""),EO.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=ua(e);return t.length<11?mp:hp},time:function(e){var t=ua(e),n=t[0];return n==="2"?CO:RO}},zt=function(e,t,n){var r;return n===void 0&&(n={}),pt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:$s(e,"",!0),infinity:n.infinity},n)},jt={cellTelephone:zt(Wt.cellTelephone,"tel"),cellphone:zt(Wt.cellphone,"tel"),cep:zt(Wt.cep,"decimal"),cnpj:zt(Wt.cnpj,"decimal"),color:zt(Wt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:zt(Wt.cpf,"decimal"),cpfCnpj:zt(Wt.cpfCnpj,"decimal",{transform:ua}),creditCard:zt(Wt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:zt(Wt.date,"decimal"),int:zt(Wt.int,"decimal",{pattern:"[0-9]+"}),isoDate:zt(Wt.isoDate,"decimal"),telephone:zt(Wt.telephone,"tel"),time:zt(Wt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:zt(Wt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function yp(e,t,n,r){var o,s;r===void 0&&(r=Da);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var vp=function(e){return e},PO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp($s(e,n,t));return r.test(n)};function kO(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var IO=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=ff(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=fc(a),v=fc(d),b=fc(u),y=w.useRef(PO(u,s,h.value||h.defaultValue)),g=f??"input",T=Ru(w.useState(""),2),x=T[0],E=T[1],C=kO(x),k=w.useCallback(function(M,j){var D,V,z=(D=M??j)!==null&&D!==void 0?D:"";if(u===void 0)return z;var _=(V=z==null?void 0:z.toString())!==null&&V!==void 0?V:"";return yp(_,typeof u=="function"?u(_):u,i??vp,c??Da)},[i,u,c]),I=Ru(w.useState(function(){return k(h.value,h.defaultValue)}),2),A=I[0],N=I[1],O=k(h.defaultValue,h.defaultValue),L=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var M=u(A);return Array.isArray(M)?Pu(M,s):$s(u,A,s)}return typeof u=="string"?$s(u,A,s):Pu(u,s)},[l,A,s,u]);w.useEffect(function(){if(h.value!==void 0){var M=k(h.value,h.defaultValue);N(M),p.current!==null&&(p.current.value=M)}},[h.value,u,i,h.defaultValue]);var P=function(M){var j,D,V,z,_,$=M.currentTarget,Z=M.target.value;if(b.current===void 0)return N(Z),(j=v.current)===null||j===void 0||j.call(v,Z),(D=m.current)===null||D===void 0||D.call(m,M),d==null?void 0:d(Z);var re=new RegExp($s(b.current,Z,s)),ee=(V=$.selectionEnd)!==null&&V!==void 0?V:0,G=function(Q,ue,U){if(Q.type!=="number")return Q.setSelectionRange(ue,U)};if(r&&y.current&&Z.length>=A.length)return $.value=A,G($,ee-1,ee-1);var F=!1;Z.length<C.length&&(y.current=!1,F=!0),re.test(Z)&&(y.current=!0);var B=ee,H=Z[B-1],Y=yp(Z,typeof b.current=="function"?b.current(Z):b.current,i??vp,c??Da);for($.value=Y,N(Y);B<Y.length&&Y.charAt(B-1)!==H;)B+=1;F?G($,ee,ee):G($,B,B),M.target.value=Y,E(Y),(z=v.current)===null||z===void 0||z.call(v,Y),(_=m.current)===null||_===void 0||_.call(m,M)};return w.createElement(g,pt({},h,{ref:p,pattern:L,onChange:P,defaultValue:bp(h.defaultValue)?O:void 0,value:bp(h.value)?k(h.value,h.value):h.value}))}),bp=function(e){return typeof e=="string"},a0=w.forwardRef(function(e,t){return pO(e.mask)?w.createElement(yO,pt({},e,{mask:void 0,ref:t})):bO(e.mask)?w.createElement(wO,pt({},e,{mask:void 0,ref:t})):w.createElement(IO,pt({},e,{ref:t}))}),Gt=function(e){return function(t){return w.createElement(a0,pt({},e,t))}};Gt(jt.cellTelephone);Gt(jt.cellphone);Gt(jt.cep);Gt(jt.cnpj);Gt(jt.color);Gt(jt.cpf);Gt(jt.cpfCnpj);Gt(jt.creditCard);Gt(jt.date);Gt(jt.int);Gt(jt.isoDate);Gt(jt.telephone);Gt(jt.time);Gt(jt.uuid);var l0=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&mO(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=pt(pt({},t),r);return w.createElement(a0,pt({},o,{ref:n}))}),hc={},mc={exports:{}},pc={};/**
|
|
137
|
+
*/const lf=yt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lp={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},nI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Vb=e=>w.jsx(ct.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:lp,exit:lp.false,transition:nI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Me("aria-hidden:pointer-events-none",e.className),children:e.children}),rI=os("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),oI=x.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return w.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:Me("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:w.jsx(Vb,{"data-open":!!s,open:!!s,children:w.jsxs(ss,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:Me(rI({theme:n}),t),children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(jb,{size:20}):null,!r&&n==="info"?w.jsx(Fb,{size:20}):null,!r&&n==="danger"?w.jsx(Jk,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0&&s?w.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:w.jsx(lf,{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 Xe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function cs(e,t){const n=De(e);return isNaN(t)?Xe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Tl(e,t){const n=De(e);if(isNaN(t))return Xe(e,NaN);if(!t)return n;const r=n.getDate(),o=Xe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const $b=6048e5,sI=864e5,iI=6e4,aI=36e5,lI=1e3;let cI={};function Kr(){return cI}function On(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),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Wo(e){return On(e,{weekStartsOn:1})}function Bb(e){const t=De(e),n=t.getFullYear(),r=Xe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Wo(r),s=Xe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Wo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function zo(e){const t=De(e);return t.setHours(0,0,0,0),t}function Oa(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 uI(e,t){const n=zo(e),r=zo(t),o=+n-Oa(n),s=+r-Oa(r);return Math.round((o-s)/sI)}function dI(e){const t=Bb(e),n=Xe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Wo(n)}function Wb(e,t){const n=t*7;return cs(e,n)}function zb(e,t){return Tl(e,t*12)}function fI(e){return Xe(e,Date.now())}function hI(e,t){const n=zo(e),r=zo(t);return+n==+r}function mI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Hb(e){if(!mI(e)&&typeof e!="number")return!1;const t=De(e);return!isNaN(Number(t))}function Ub(e,t){const n=De(e.start),r=De(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(De(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Gb(e){const t=De(e);return t.setDate(1),t.setHours(0,0,0,0),t}function pI(e){const t=De(e),n=Xe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function gI(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),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const yI={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"}},vI=(e,t,n)=>{let r;const o=yI[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 dc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const bI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},SI={date:dc({formats:bI,defaultWidth:"full"}),time:dc({formats:xI,defaultWidth:"full"}),dateTime:dc({formats:wI,defaultWidth:"full"})},TI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EI=(e,t,n,r)=>TI[e];function Es(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const CI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},PI={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"]},kI={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"]},II={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"}},AI={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"}},OI=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},_I={ordinalNumber:OI,era:Es({values:CI,defaultWidth:"wide"}),quarter:Es({values:RI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Es({values:PI,defaultWidth:"wide"}),day:Es({values:kI,defaultWidth:"wide"}),dayPeriod:Es({values:II,defaultWidth:"wide",formattingValues:AI,defaultFormattingWidth:"wide"})};function Cs(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?DI(a,d=>d.test(i)):MI(a,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function MI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function DI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function NI(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const jI=/^(\d+)(th|st|nd|rd)?/i,LI=/\d+/i,FI={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},VI={any:[/^b/i,/^(a|c)/i]},$I={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},BI={any:[/1/i,/2/i,/3/i,/4/i]},WI={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},zI={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]},HI={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},UI={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]},GI={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},YI={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}},qI={ordinalNumber:NI({matchPattern:jI,parsePattern:LI,valueCallback:e=>parseInt(e,10)}),era:Cs({matchPatterns:FI,defaultMatchWidth:"wide",parsePatterns:VI,defaultParseWidth:"any"}),quarter:Cs({matchPatterns:$I,defaultMatchWidth:"wide",parsePatterns:BI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cs({matchPatterns:WI,defaultMatchWidth:"wide",parsePatterns:zI,defaultParseWidth:"any"}),day:Cs({matchPatterns:HI,defaultMatchWidth:"wide",parsePatterns:UI,defaultParseWidth:"any"}),dayPeriod:Cs({matchPatterns:GI,defaultMatchWidth:"any",parsePatterns:YI,defaultParseWidth:"any"})},Yb={code:"en-US",formatDistance:vI,formatLong:SI,formatRelative:EI,localize:_I,match:qI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function KI(e){const t=De(e);return uI(t,pI(t))+1}function qb(e){const t=De(e),n=+Wo(t)-+dI(t);return Math.round(n/$b)+1}function cf(e,t){var u,d,f,h;const n=De(e),r=n.getFullYear(),o=Kr(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Xe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=On(i,t),l=Xe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=On(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ZI(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=cf(e,t),s=Xe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),On(s,t)}function Kb(e,t){const n=De(e),r=+On(n,t)-+ZI(n,t);return Math.round(r/$b)+1}function We(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Zn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return We(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):We(n+1,2)},d(e,t){return We(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 We(e.getHours()%12||12,t.length)},H(e,t){return We(e.getHours(),t.length)},m(e,t){return We(e.getMinutes(),t.length)},s(e,t){return We(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return We(o,t.length)}},ao={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cp={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 Zn.y(e,t)},Y:function(e,t,n,r){const o=cf(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return We(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):We(s,t.length)},R:function(e,t){const n=Bb(e);return We(n,t.length)},u:function(e,t){const n=e.getFullYear();return We(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 We(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 We(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 Zn.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 We(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=Kb(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):We(o,t.length)},I:function(e,t,n){const r=qb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):We(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Zn.d(e,t)},D:function(e,t,n){const r=KI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):We(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return We(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return We(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return We(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=ao.noon:r===0?o=ao.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=ao.evening:r>=12?o=ao.afternoon:r>=4?o=ao.morning:o=ao.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 Zn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Zn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Zn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Zn.s(e,t)},S:function(e,t){return Zn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return dp(r);case"XXXX":case"XX":return Cr(r);case"XXXXX":case"XXX":default:return Cr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return dp(r);case"xxxx":case"xx":return Cr(r);case"xxxxx":case"xxx":default:return Cr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+up(r,":");case"OOOO":default:return"GMT"+Cr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+up(r,":");case"zzzz":default:return"GMT"+Cr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return We(r,t.length)},T:function(e,t,n){const r=e.getTime();return We(r,t.length)}};function up(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+We(s,2)}function dp(e,t){return e%60===0?(e>0?"-":"+")+We(Math.abs(e)/60,2):Cr(e,t)}function Cr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=We(Math.trunc(r/60),2),s=We(r%60,2);return n+o+t+s}const fp=(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"})}},Zb=(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"})}},XI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return fp(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",fp(r,t)).replace("{{time}}",Zb(o,t))},Eu={p:Zb,P:XI},QI=/^D+$/,JI=/^Y+$/,eA=["D","DD","YY","YYYY"];function Xb(e){return QI.test(e)}function Qb(e){return JI.test(e)}function Cu(e,t,n){const r=tA(e,t,n);if(console.warn(r),eA.includes(e))throw new RangeError(r)}function tA(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 nA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oA=/^'([^]*?)'?$/,sA=/''/g,iA=/[a-zA-Z]/;function aA(e,t,n){var u,d,f,h;const r=Kr(),o=r.locale??Yb,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=De(e);if(!Hb(a))throw new RangeError("Invalid time value");let l=t.match(rA).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Eu[m];return v(p,o.formatLong)}return p}).join("").match(nA).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:lA(p)};if(cp[m])return{isToken:!0,value:p};if(m.match(iA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Qb(m)||Xb(m))&&Cu(m,t,String(e));const v=cp[m[0]];return v(a,m,o.localize,c)}).join("")}function lA(e){const t=e.match(oA);return t?t[1].replace(sA,"'"):e}function cA(){return Object.assign({},Kr())}function uA(e){let n=De(e).getDay();return n===0&&(n=7),n}function dA(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function fA(e,t){const n=De(e),r=De(t);return+n<+r}function hA(e,t){const n=t instanceof Date?Xe(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 mA=10;class Jb{constructor(){ae(this,"subPriority",0)}validate(t,n){return!0}}class pA extends Jb{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class gA extends Jb{constructor(){super(...arguments);ae(this,"priority",mA);ae(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Xe(n,hA(n,Date))}}class Ne{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new pA(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class yA extends Ne{constructor(){super(...arguments);ae(this,"priority",140);ae(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 mt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},wn={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 pt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ot(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Sn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*aI+s*iI+i*lI),rest:t.slice(n[0].length)}}function e0(e){return ot(mt.anyDigitsSigned,e)}function dt(e,t){switch(e){case 1:return ot(mt.singleDigit,t);case 2:return ot(mt.twoDigits,t);case 3:return ot(mt.threeDigits,t);case 4:return ot(mt.fourDigits,t);default:return ot(new RegExp("^\\d{1,"+e+"}"),t)}}function _a(e,t){switch(e){case 1:return ot(mt.singleDigitSigned,t);case 2:return ot(mt.twoDigitsSigned,t);case 3:return ot(mt.threeDigitsSigned,t);case 4:return ot(mt.fourDigitsSigned,t);default:return ot(new RegExp("^-?\\d{1,"+e+"}"),t)}}function uf(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 t0(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function n0(e){return e%400===0||e%4===0&&e%100!==0}class vA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return pt(dt(4,n),s);case"yo":return pt(o.ordinalNumber(n,{unit:"year"}),s);default:return pt(dt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=t0(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class bA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return pt(dt(4,n),s);case"Yo":return pt(o.ordinalNumber(n,{unit:"year"}),s);default:return pt(dt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=cf(n,s);if(o.isTwoDigitYear){const l=t0(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),On(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),On(n,s)}}class xA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return _a(r==="R"?4:r.length,n)}set(n,r,o){const s=Xe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Wo(s)}}class wA extends Ne{constructor(){super(...arguments);ae(this,"priority",130);ae(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return _a(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class SA extends Ne{constructor(){super(...arguments);ae(this,"priority",120);ae(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 dt(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 TA extends Ne{constructor(){super(...arguments);ae(this,"priority",120);ae(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 dt(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 EA extends Ne{constructor(){super(...arguments);ae(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ae(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return pt(ot(mt.month,n),s);case"MM":return pt(dt(2,n),s);case"Mo":return pt(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class CA extends Ne{constructor(){super(...arguments);ae(this,"priority",110);ae(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return pt(ot(mt.month,n),s);case"LL":return pt(dt(2,n),s);case"Lo":return pt(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function RA(e,t,n){const r=De(e),o=Kb(r,n)-t;return r.setDate(r.getDate()-o*7),r}class PA extends Ne{constructor(){super(...arguments);ae(this,"priority",100);ae(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ot(mt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return dt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return On(RA(n,o,s),s)}}function kA(e,t){const n=De(e),r=qb(n)-t;return n.setDate(n.getDate()-r*7),n}class IA extends Ne{constructor(){super(...arguments);ae(this,"priority",100);ae(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 ot(mt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return dt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Wo(kA(n,o))}}const AA=[31,28,31,30,31,30,31,31,30,31,30,31],OA=[31,29,31,30,31,30,31,31,30,31,30,31];class _A extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"subPriority",1);ae(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ot(mt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return dt(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=n0(o),i=n.getMonth();return s?r>=1&&r<=OA[i]:r>=1&&r<=AA[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class MA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"subpriority",1);ae(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 ot(mt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return dt(r.length,n)}}validate(n,r){const o=n.getFullYear();return n0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function df(e,t,n){var d,f,h,p;const r=Kr(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=De(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return cs(s,u)}class DA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=df(n,o,s),n.setHours(0,0,0,0),n}}class NA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return pt(dt(r.length,n),i);case"eo":return pt(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=df(n,o,s),n.setHours(0,0,0,0),n}}class jA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return pt(dt(r.length,n),i);case"co":return pt(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=df(n,o,s),n.setHours(0,0,0,0),n}}function LA(e,t){const n=De(e),r=uA(n),o=t-r;return cs(n,o)}class FA extends Ne{constructor(){super(...arguments);ae(this,"priority",90);ae(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return dt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return pt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return pt(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return pt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return pt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=LA(n,o),n.setHours(0,0,0,0),n}}class VA extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class $A extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class BA extends Ne{constructor(){super(...arguments);ae(this,"priority",80);ae(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(uf(o),0,0,0),n}}class WA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ot(mt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return dt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class zA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ot(mt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return dt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class HA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ot(mt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return dt(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 UA extends Ne{constructor(){super(...arguments);ae(this,"priority",70);ae(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ot(mt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return dt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class GA extends Ne{constructor(){super(...arguments);ae(this,"priority",60);ae(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ot(mt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return dt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class YA extends Ne{constructor(){super(...arguments);ae(this,"priority",50);ae(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ot(mt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return dt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class qA extends Ne{constructor(){super(...arguments);ae(this,"priority",30);ae(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return pt(dt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class KA extends Ne{constructor(){super(...arguments);ae(this,"priority",10);ae(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Sn(wn.basicOptionalMinutes,n);case"XX":return Sn(wn.basic,n);case"XXXX":return Sn(wn.basicOptionalSeconds,n);case"XXXXX":return Sn(wn.extendedOptionalSeconds,n);case"XXX":default:return Sn(wn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Xe(n,n.getTime()-Oa(n)-o)}}class ZA extends Ne{constructor(){super(...arguments);ae(this,"priority",10);ae(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Sn(wn.basicOptionalMinutes,n);case"xx":return Sn(wn.basic,n);case"xxxx":return Sn(wn.basicOptionalSeconds,n);case"xxxxx":return Sn(wn.extendedOptionalSeconds,n);case"xxx":default:return Sn(wn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Xe(n,n.getTime()-Oa(n)-o)}}class XA extends Ne{constructor(){super(...arguments);ae(this,"priority",40);ae(this,"incompatibleTokens","*")}parse(n){return e0(n)}set(n,r,o){return[Xe(n,o*1e3),{timestampIsSet:!0}]}}class QA extends Ne{constructor(){super(...arguments);ae(this,"priority",20);ae(this,"incompatibleTokens","*")}parse(n){return e0(n)}set(n,r,o){return[Xe(n,o),{timestampIsSet:!0}]}}const JA={G:new yA,y:new vA,Y:new bA,R:new xA,u:new wA,Q:new SA,q:new TA,M:new EA,L:new CA,w:new PA,I:new IA,d:new _A,D:new MA,E:new DA,e:new NA,c:new jA,i:new FA,a:new VA,b:new $A,B:new BA,h:new WA,H:new zA,K:new HA,k:new UA,m:new GA,s:new YA,S:new qA,X:new KA,x:new ZA,t:new XA,T:new QA},eO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nO=/^'([^]*?)'?$/,rO=/''/g,oO=/\S/,sO=/[a-zA-Z]/;function iO(e,t,n,r){var m,v,b,y;const o=cA(),s=o.locale??Yb,i=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((y=(b=o.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0;if(t==="")return e===""?De(n):Xe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new gA],u=t.match(tO).map(g=>{const T=g[0];if(T in Eu){const S=Eu[T];return S(g,s.formatLong)}return g}).join("").match(eO),d=[];for(let g of u){Qb(g)&&Cu(g,t,e),Xb(g)&&Cu(g,t,e);const T=g[0],S=JA[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const k=d.find(I=>E.includes(I.token)||I.token===T);if(k)throw new RangeError(`The format string mustn't contain \`${k.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 C=S.run(e,g,s.match,l);if(!C)return Xe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(sO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=aO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Xe(n,NaN)}}if(e.length>0&&oO.test(e))return Xe(n,NaN);const f=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 h=De(n);if(isNaN(h.getTime()))return Xe(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Xe(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return Xe(n,h)}function aO(e){return e.match(nO)[1].replace(rO,"'")}function lO(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function cO(e){return hI(e,fI(e))}function uO(e,t){return cs(e,-t)}function r0(e,t){return Tl(e,-t)}function dO(e,t){return Wb(e,-t)}function fO(e,t){return zb(e,-t)}var gt=function(){return gt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},gt.apply(this,arguments)};function ff(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 Ru(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}var ni=function(e){return e.replace(new RegExp(" ","g")," ")},o0=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)},hO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},s0=function(e,t,n){var r=e.length-2,o=hO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},i0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ma=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},mO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},fc=function(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t},pO=function(e){return e==="money"||e==="currency"},gO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return gt(gt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Gi=function(e,t){var n=o0(i0(e),t.fraction.length),r="".concat(t.currency).concat(s0(n,t.group,t.decimal));return ni(r)},yO=x.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=ff(e,["locale","currency","currencyDisplay","mask","onChange"]),u=x.useRef(null);x.useImperativeHandle(t,function(){return u.current});var d=x.useMemo(function(){var p=gO(r,s,a);return p.currency=ni("".concat(p.currency.trim()," ")),p.literal=ni(p.literal.trim()),p},[r,s]),f=function(p){var m=Gi(p.target.value,d),v=Ma(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)};x.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Gi(p,d),v=Ma(m);u.current.value=m,u.current.setAttribute("data-number",v.toString());var b=new InputEvent("change",{});l==null||l(gt(gt({},b),{target:u.current,currentTarget:u.current})),v!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?Gi(c.defaultValue,d):void 0;return x.createElement("input",gt({},c,{value:typeof c.value=="string"?Gi(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),vO=1,bO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},xO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return gt(gt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Yi=function(e,t){var n=o0(i0(e),t.fraction.length),r="".concat(s0(n,t.group,t.decimal)," ").concat(t.percentSign);return ni(r)},wO=x.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=ff(e,["locale","mask","onChange","onKeyUp"]),a=x.useRef(null),l=Ru(x.useState(function(){var b,y;return(y=(b=i.value)===null||b===void 0?void 0:b.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];x.useImperativeHandle(t,function(){return a.current}),x.useEffect(function(){var b,y=Number.parseFloat("".concat((b=i.value)!==null&&b!==void 0?b:"0")).toFixed(d.fraction.length);u(Yi(y,d))},[i.value]);var d=x.useMemo(function(){var b=xO(r);return b.percentSign=ni("".concat(b.percentSign)),b},[r]),f=c.length-d.percentSign.length-vO,h=function(b){var y,g=a.current;g&&(g.setSelectionRange(f,f),b&&((y=i.onFocus)===null||y===void 0||y.call(i,b)))},p=function(b){var y=b.currentTarget;if(y.selectionStart!==null){var g=y.selectionStart,T=y.selectionEnd,S=g!==T,E=f<g;!S&&E&&h()}s==null||s(b)},m=function(b){var y=Yi(b.target.value,d),g=Ma(y);u(y),b.target.value=y,b.target.setAttribute("data-number",g.toString()),o==null||o(b)};x.useEffect(function(){if(a.current!==null){var b=a.current.value;if(b!==""){var y=Yi(b,d),g=Ma(y);u(y),a.current.value=y,a.current.setAttribute("data-number",g.toString());var T=new InputEvent("change",{});o==null||o(gt(gt({},T),{target:a.current,currentTarget:a.current}))}}},[]),x.useEffect(function(){return h()},[c]);var v=i.defaultValue?Yi(i.defaultValue,d):void 0;return x.createElement("input",gt({},i,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Is={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},SO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Da[s];i===void 0?r.push(s.replace(Is.dots,"\\.").replace(Is.openParenthesis,"\\(").replace(Is.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Is.leadingBars,"\\")},$s=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Pu(o,n);var s=SO(o);return n?"^".concat(s,"$"):s},TO=function(e){return e.replace(Is.escape,"\\$&")},Pu=function(e,t){var n=e.map(function(r){return typeof r=="string"?TO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Da={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]/}},EO=/\d/,hp="(dd) 9dddd-dddd",mp="(dd) dddd-dddd",pp="ddd.ddd.ddd-dd",gp="dd.ddd.ddd/dddd-dd",ua=function(e){return e.replace(/\D/g,"")},CO=["2",/[0-3]/,":",/[0-5]/,/\d/],RO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Wt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:pp,isoDate:"dddd-dd-dd",cnpj:gp,telephone:mp,cellphone:hp,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ua(e).length<=11?pp:gp},int:function(e){return e===void 0&&(e=""),EO.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=ua(e);return t.length<11?mp:hp},time:function(e){var t=ua(e),n=t[0];return n==="2"?CO:RO}},zt=function(e,t,n){var r;return n===void 0&&(n={}),gt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:$s(e,"",!0),infinity:n.infinity},n)},jt={cellTelephone:zt(Wt.cellTelephone,"tel"),cellphone:zt(Wt.cellphone,"tel"),cep:zt(Wt.cep,"decimal"),cnpj:zt(Wt.cnpj,"decimal"),color:zt(Wt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:zt(Wt.cpf,"decimal"),cpfCnpj:zt(Wt.cpfCnpj,"decimal",{transform:ua}),creditCard:zt(Wt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:zt(Wt.date,"decimal"),int:zt(Wt.int,"decimal",{pattern:"[0-9]+"}),isoDate:zt(Wt.isoDate,"decimal"),telephone:zt(Wt.telephone,"tel"),time:zt(Wt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:zt(Wt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function yp(e,t,n,r){var o,s;r===void 0&&(r=Da);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var vp=function(e){return e},PO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp($s(e,n,t));return r.test(n)};function kO(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t.current}var IO=x.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=ff(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=x.useRef(null);x.useImperativeHandle(t,function(){return p.current});var m=fc(a),v=fc(d),b=fc(u),y=x.useRef(PO(u,s,h.value||h.defaultValue)),g=f??"input",T=Ru(x.useState(""),2),S=T[0],E=T[1],C=kO(S),k=x.useCallback(function(O,j){var D,V,H=(D=O??j)!==null&&D!==void 0?D:"";if(u===void 0)return H;var _=(V=H==null?void 0:H.toString())!==null&&V!==void 0?V:"";return yp(_,typeof u=="function"?u(_):u,i??vp,c??Da)},[i,u,c]),I=Ru(x.useState(function(){return k(h.value,h.defaultValue)}),2),A=I[0],N=I[1],M=k(h.defaultValue,h.defaultValue),L=x.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(A);return Array.isArray(O)?Pu(O,s):$s(u,A,s)}return typeof u=="string"?$s(u,A,s):Pu(u,s)},[l,A,s,u]);x.useEffect(function(){if(h.value!==void 0){var O=k(h.value,h.defaultValue);N(O),p.current!==null&&(p.current.value=O)}},[h.value,u,i,h.defaultValue]);var P=function(O){var j,D,V,H,_,$=O.currentTarget,K=O.target.value;if(b.current===void 0)return N(K),(j=v.current)===null||j===void 0||j.call(v,K),(D=m.current)===null||D===void 0||D.call(m,O),d==null?void 0:d(K);var re=new RegExp($s(b.current,K,s)),ee=(V=$.selectionEnd)!==null&&V!==void 0?V:0,G=function(Q,ue,U){if(Q.type!=="number")return Q.setSelectionRange(ue,U)};if(r&&y.current&&K.length>=A.length)return $.value=A,G($,ee-1,ee-1);var F=!1;K.length<C.length&&(y.current=!1,F=!0),re.test(K)&&(y.current=!0);var B=ee,z=K[B-1],Y=yp(K,typeof b.current=="function"?b.current(K):b.current,i??vp,c??Da);for($.value=Y,N(Y);B<Y.length&&Y.charAt(B-1)!==z;)B+=1;F?G($,ee,ee):G($,B,B),O.target.value=Y,E(Y),(H=v.current)===null||H===void 0||H.call(v,Y),(_=m.current)===null||_===void 0||_.call(m,O)};return x.createElement(g,gt({},h,{ref:p,pattern:L,onChange:P,defaultValue:bp(h.defaultValue)?M:void 0,value:bp(h.value)?k(h.value,h.value):h.value}))}),bp=function(e){return typeof e=="string"},a0=x.forwardRef(function(e,t){return pO(e.mask)?x.createElement(yO,gt({},e,{mask:void 0,ref:t})):bO(e.mask)?x.createElement(wO,gt({},e,{mask:void 0,ref:t})):x.createElement(IO,gt({},e,{ref:t}))}),Gt=function(e){return function(t){return x.createElement(a0,gt({},e,t))}};Gt(jt.cellTelephone);Gt(jt.cellphone);Gt(jt.cep);Gt(jt.cnpj);Gt(jt.color);Gt(jt.cpf);Gt(jt.cpfCnpj);Gt(jt.creditCard);Gt(jt.date);Gt(jt.int);Gt(jt.isoDate);Gt(jt.telephone);Gt(jt.time);Gt(jt.uuid);var l0=x.forwardRef(function(t,n){var r=x.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&mO(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=gt(gt({},t),r);return x.createElement(a0,gt({},o,{ref:n}))}),hc={},mc={exports:{}},pc={};/**
|
|
138
138
|
* @license React
|
|
139
139
|
* use-sync-external-store-shim.production.min.js
|
|
140
140
|
*
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
*
|
|
143
143
|
* This source code is licensed under the MIT license found in the
|
|
144
144
|
* LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/var xp;function AO(){if(xp)return pc;xp=1;var e=
|
|
145
|
+
*/var xp;function AO(){if(xp)return pc;xp=1;var e=x;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,v=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&v({inst:m})},[d,h,f]),o(function(){return l(m)&&v({inst:m}),d(function(){l(m)&&v({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return pc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,pc}var wp={};/**
|
|
146
146
|
* @license React
|
|
147
147
|
* use-sync-external-store-shim.development.js
|
|
148
148
|
*
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
*
|
|
151
151
|
* This source code is licensed under the MIT license found in the
|
|
152
152
|
* LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/var Sp;function OO(){return Sp||(Sp=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=
|
|
153
|
+
*/var Sp;function OO(){return Sp||(Sp=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=x,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(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,C=E.getStackAddendum();C!==""&&(T+="%s",S=S.concat([C]));var k=S.map(function(I){return String(I)});k.unshift("Warning: "+T),Function.prototype.apply.call(console[g],console,k)}}function o(g,T){return g===T&&(g!==0||1/g===1/T)||g!==g&&T!==T}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(g,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 C=T();s(E,C)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var k=i({inst:{value:E,getSnapshot:T}}),I=k[0].inst,A=k[1];return l(function(){I.value=E,I.getSnapshot=T,h(I)&&A({inst:I})},[g,E,T]),a(function(){h(I)&&A({inst:I});var N=function(){h(I)&&A({inst:I})};return g(N)},[g]),c(E),E}function h(g){var T=g.getSnapshot,S=g.value;try{var E=T();return!s(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,b=v?p:f,y=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b;wp.useSyncExternalStore=y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),wp}var Tp;function c0(){return Tp||(Tp=1,process.env.NODE_ENV==="production"?mc.exports=AO():mc.exports=OO()),mc.exports}/**
|
|
154
154
|
* @license React
|
|
155
155
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
156
156
|
*
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the MIT license found in the
|
|
160
160
|
* LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/var Ep;function _O(){if(Ep)return hc;Ep=1;var e=
|
|
161
|
+
*/var Ep;function _O(){if(Ep)return hc;Ep=1;var e=x,t=c0();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return hc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function b(E){if(!y){if(y=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var C=m.value;if(h(C,E))return T=C}return T=E}if(C=T,r(g,E))return C;var k=f(E);return h!==void 0&&h(C,k)?C:(g=E,T=k)}var y=!1,g,T,S=d===void 0?null:d;return[function(){return b(u())},S===null?void 0:function(){return b(S())}]},[u,d,f,h]);var v=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},hc}var Cp={};/**
|
|
162
162
|
* @license React
|
|
163
163
|
* use-sync-external-store-shim/with-selector.development.js
|
|
164
164
|
*
|
|
@@ -166,10 +166,10 @@
|
|
|
166
166
|
*
|
|
167
167
|
* This source code is licensed under the MIT license found in the
|
|
168
168
|
* LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/var Rp;function MO(){return Rp||(Rp=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=c0();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var b=a(function(){var x=!1,E,C,k=function(O){if(!x){x=!0,E=O;var L=h(O);if(p!==void 0&&v.hasValue){var P=v.value;if(p(P,L))return C=P,P}return C=L,L}var M=E,j=C;if(r(M,O))return j;var D=h(O);return p!==void 0&&p(j,D)?j:(E=O,C=D,D)},I=f===void 0?null:f,A=function(){return k(d())},N=I===null?void 0:function(){return k(I())};return[A,N]},[d,f,h,p]),y=b[0],g=b[1],T=o(u,y,g);return i(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}Cp.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Cp}process.env.NODE_ENV==="production"?_O():MO();const lo=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},DO=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},NO=e=>Object.entries(e),u0=e=>e instanceof Promise,d0=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),jO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>d0(u,f,s,d));return u0(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))},LO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>d0(c,u,s,o.current));return u0(a)?a.then(c=>l(c)):l(a)},hf=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=lo(r),i=lo((n==null?void 0:n.props)??{}),a=lo(t),l=lo((n==null?void 0:n.postMiddleware)??[]),c=lo((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),d=DO(r),f=lo(d),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=w.useState(()=>{const m=()=>i.current,v=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return NO(v).reduce((b,[y,g])=>({...b,[y]:n!=null&&n.debug?jO(y,g,o,m,h,c.current):LO(y,g,o,m,h,c.current)}),{})});return[r,p,i.current]},FO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function VO(e,t){return w.useRef(FO(e,t)).current}const El={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>)`},To=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(To(i,t,n,a))},[]),f0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:f0(i,t,n,a)}},{}),Pp={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Na=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},$O={default:e=>Na(e,{result:Pp.default}),dark:e=>Na(e,{result:Pp.dark})},mf=(e,t)=>{const n=a=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return a?a(d):d},r=To(e.colors,n(t==null?void 0:t.colors)),o=To(e.spacing,n(t==null?void 0:t.spacing)),s=To(e.rounded,n(t==null?void 0:t.rounded)),i=e.custom?To(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,s,i)},BO=(e,t)=>Na(mf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),WO=(e,t)=>mf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),zO=(e,t)=>Na(mf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),h0={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},m0={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},HO={name:"dark",rounded:h0,spacing:m0,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%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},UO={rounded:h0,spacing:m0,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 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:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},GO=HO,YO=UO,pf={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>S.jsxs(w.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",multiComboboxSelectedLabel:"Selected",multiComboboxInnerPlaceholder:"Search..."},gf={input:{iconFeedback:!0}},Ci=w.createContext({tweaks:gf,parser:El.hsla,map:pf,locale:void 0}),qO=e=>{const t=w.useMemo(()=>({locale:e.locale,tweaks:{...gf,...e.tweaks},parser:e.parser||El.hsla,map:{...pf,...e.map}}),[e]);return S.jsx(Ci.Provider,{value:t,children:e.children})},yf=e=>{if(e)return e;const t=w.useContext(Ci);if(t)return t.locale||e},Et=()=>{const e=w.useContext(Ci);return e?e.map:pf},KO=()=>{const e=w.useContext(Ci);return e?e.parser:El.hsla},ZO=()=>{const e=w.useContext(Ci);return e?e.tweaks:gf},XO={type:"spring",bounce:.3,duration:.6},kp=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),p0={middle:{x:"0%",opacity:1},enter:kp(1),exit:kp(-1)},Ip={exit:{visibility:"hidden"}},QO=e=>{const t=On(Gb(e));return Ub({start:t,end:cs(t,41)})},g0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),JO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=Gb(new Date(1970,o,1).setMonth(o)),i=g0(s,n);return S.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),gc={ArrowLeft:(e,t)=>t==="days"?uO(e,1):r0(e,1),ArrowRight:(e,t)=>t==="days"?cs(e,1):Tl(e,1),ArrowUp:(e,t)=>t==="days"?dO(e,1):fO(e,1),ArrowDown:(e,t)=>t==="days"?Wb(e,1):zb(e,1)},Ap=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},Tr=e=>e.getFullYear().toString().padStart(4,"0"),e_=(e,t,n)=>e===void 0||n===void 0?!1:dA(t,e)&&fA(t,n),t_=e=>{var n;const t=Et();return S.jsx(lt.tbody,{layout:!0,variants:p0,custom:e.direction,onKeyDown:e.onKeyDown,className:Me((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var s;return S.jsx("tr",{className:(s=e.styles)==null?void 0:s.week,children:r.map(i=>{var h,p,m,v,b,y,g,T,x,E,C,k,I,A;const a=i.toISOString(),l=e.rangeMode?a===((p=(h=e.range)==null?void 0:h.to)==null?void 0:p.toISOString())||a===((v=(m=e.range)==null?void 0:m.from)==null?void 0:v.toISOString()):a===((b=e.date)==null?void 0:b.toISOString()),c=cO(i)&&e.markToday,u=((y=e.disabledDate)==null?void 0:y.call(e,i))||!1,d=!lO(i,e.stateDate)||u,f=e.rangeMode?e_((g=e.range)==null?void 0:g.from,i,(T=e.range)==null?void 0:T.to):!1;return S.jsxs("td",{align:"center",className:Me("relative",(x=e.styles)==null?void 0:x.dayFrame),children:[S.jsxs("button",{type:"button","data-date":a,disabled:u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Me(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${d?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,f&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((C=e.stateRange.from)==null?void 0:C.toISOString())===a?S.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:S.jsx("span",{className:"text-xs text-foreground",children:((k=e.labelRange)==null?void 0:k.from)??t.calendarFromDate})}):null,l&&((I=e.stateRange.to)==null?void 0:I.toISOString())===a?S.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:S.jsx("span",{className:"text-xs text-foreground",children:((A=e.labelRange)==null?void 0:A.to)??t.calendarToDate})}):null]}),e.RenderOnDay?S.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},y0=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...f})=>{const h=w.useRef(xi()),p=Et(),m=yf(o),v=w.useRef(null),{date:b,range:y}=f,g=b||new Date,T=w.useRef(null),[x,E]=hf({date:g,isAnimating:!1,year:Tr(g),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:JO(h.current,g,m),selectMode:l?"from":void 0,week:Ub({start:On(g),end:gI(g)})},O=>({onChangeYear:L=>({year:L}),setToday:()=>({date:zo(new Date)}),onExitComplete:()=>(Ap(T.current||null,v,O.state().date,200),T.current=null,{isAnimating:!1}),date:L=>{const P=L(O.state().date);return{date:P,year:Tr(P)}},nextMonth:L=>{T.current=L.currentTarget;const P=O.state();if(P.isAnimating)return P;const M=Tl(P.date,1);return{date:M,isAnimating:!0,direction:1,year:Tr(M)}},previousMonth:L=>{T.current=L.currentTarget;const P=O.state();if(P.isAnimating)return P;const M=r0(P.date,1);return{date:M,isAnimating:!0,direction:-1,year:Tr(M)}},onSelectDate:L=>{const P=O.state(),M=L.currentTarget.dataset.range==="true",j=L.currentTarget.dataset.date||"",D=new Date(j);return{date:D,year:Tr(D),selectMode:P.selectMode===void 0?void 0:P.selectMode==="from"?"to":"from",range:M?{from:P.selectMode==="from"?D:P.range.from,to:P.selectMode==="to"?D:P.range.to}:P.range}},onChangeMonth:L=>{const P=L.target.value,j=Array.from(L.target.options).find(V=>V.value===P),D=O.state();if(j){const V=j.dataset.index||"",z=new Date(O.state().date);return z.setMonth(+V),{...D,date:z,year:Tr(z)}}return D},onKeyDown:L=>{const P=L.key,M=O.state();if(P in gc){(P==="ArrowUp"||P==="ArrowDown")&&L.preventDefault();const j=O.state().date,D=Pt.keyof(gc,P)?gc[P](j,L.shiftKey?"month":"days"):null;if(D!==null)return Ap(L.target,v,D),{...M,date:D,year:Tr(D)}}return O.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(O,L,P)=>{var j,D;return(P.method==="onChangeMonth"||P.method==="previousMonth"||P.method==="nextMonth")&&((D=(j=P.props).onChangeMonth)==null||D.call(j,O.date)),O},(O,L,P)=>{var j,D;return P.method==="onChangeYear"&&((D=(j=P.props).onChangeYear)==null||D.call(j,O.date)),O},(O,L,P)=>{const M=P.method==="onSelectDate"||P.method==="setToday"||P.method==="onKeyDown";return l&&M&&t?(c==null||c(O.range),O):(M&&t&&(c==null||c(O.date)),O)}]}),C=zy(QO(x.date),7),k=x.date.toISOString(),I=g0(x.date,m);w.useEffect(()=>{t||c==null||c(x.date)},[k]);const A=VO(O=>{E.date(L=>{const P=new Date(L);return P.setFullYear(+O),P})},1200),N=O=>{const L=O.currentTarget.value;E.onChangeYear(L),a==null||a(new Date(L)),A(L)};return S.jsx(ZT,{transition:XO,children:S.jsxs("div",{"data-component":"calendar",ref:v,className:Me("relative overflow-hidden",u==null?void 0:u.calendar),children:[S.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:S.jsx(fr,{initial:!1,mode:"popLayout",custom:x.direction,onExitComplete:E.onExitComplete,children:S.jsxs(lt.div,{initial:"enter",animate:"middle",exit:"exit",children:[S.jsxs("header",{className:"relative flex justify-between",children:[S.jsx(lt.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Ip,onClick:E.previousMonth,title:p.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:S.jsx(Yk,{className:"h-4 w-4"})}),S.jsx(lt.span,{layout:!0,variants:p0,custom:x.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:S.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[S.jsx("select",{value:I,onChange:E.onChangeMonth,style:{width:`${I.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:x.months}),S.jsx(l0,{mask:"int",maxLength:4,placeholder:"YYYY",value:x.year,onChange:N,style:{width:`${x.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),S.jsx(lt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Ip,onClick:E.nextMonth,title:p.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:S.jsx(sf,{className:"h-4 w-4"})}),S.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%)"}})]}),S.jsxs(lt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[S.jsx("thead",{children:S.jsx("tr",{children:x.week.map(O=>S.jsx("th",{className:Me("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:O.toLocaleDateString(m,{weekday:"short"})},O.toString()))})}),S.jsx(t_,{zip:C,range:y,styles:u,date:b||null,dispatch:E,markRange:d,markToday:s,rangeMode:l,stateDate:x.date,labelRange:n,stateRange:x.range,RenderOnDay:e,direction:x.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},I)})}),S.jsx("footer",{className:"mt-2 text-center text-primary",children:S.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:E.setToday,children:p.calendarToday})})]})})},v0=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>S.jsxs(ss,{...a,as:r,"data-componen":"card",className:Me("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?S.jsx("header",{className:Me("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,S.jsx("div",{className:Me("min-w-full px-8",i),children:e})]}),b0=e=>{const t=e.Icon??Lb,n=Et();return S.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[S.jsx(t,{size:64,className:"text-disabled"}),S.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function n_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function x0(...e){return t=>e.forEach(n=>n_(n,t))}function Br(...e){return R.useCallback(x0(...e),e)}function w0(e,t=[]){let n=[];function r(s,i){const a=R.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...p}=d,m=(f==null?void 0:f[e][l])||a,v=R.useMemo(()=>p,Object.values(p));return S.jsx(m.Provider,{value:v,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,p=R.useContext(h);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>R.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return R.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,r_(o,...t)]}function r_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Ho=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),s=o.find(s_);if(s){const i=s.props.children,a=o.map(l=>l===s?R.Children.count(i)>1?R.Children.only(null):R.isValidElement(i)?i.props.children:null:l);return S.jsx(ku,{...r,ref:t,children:R.isValidElement(i)?R.cloneElement(i,void 0,a):null})}return S.jsx(ku,{...r,ref:t,children:n})});Ho.displayName="Slot";var ku=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=a_(n);return R.cloneElement(n,{...i_(r,n.props),ref:t?x0(t,o):o})}return R.Children.count(n)>1?R.Children.only(null):null});ku.displayName="SlotClone";var o_=({children:e})=>S.jsx(S.Fragment,{children:e});function s_(e){return R.isValidElement(e)&&e.type===o_}function i_(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function a_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function l_(e){const t=e+"CollectionProvider",[n,r]=w0(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,v=w.useRef(null),b=w.useRef(new Map).current;return S.jsx(o,{scope:p,itemMap:b,collectionRef:v,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((h,p)=>{const{scope:m,children:v}=h,b=s(a,m),y=Br(p,b.collectionRef);return S.jsx(Ho,{ref:y,children:v})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=w.forwardRef((h,p)=>{const{scope:m,children:v,...b}=h,y=w.useRef(null),g=Br(p,y),T=s(c,m);return w.useEffect(()=>(T.itemMap.set(y,{ref:y,...b}),()=>void T.itemMap.delete(y))),S.jsx(Ho,{[u]:"",ref:g,children:v})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return w.useCallback(()=>{const v=p.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((T,x)=>b.indexOf(T.ref.current)-b.indexOf(x.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var c_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Nn=c_.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?Ho:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function S0(e,t){e&&gi.flushSync(()=>e.dispatchEvent(t))}function zn(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function u_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e);R.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var d_="DismissableLayer",Iu="dismissableLayer.update",f_="dismissableLayer.pointerDownOutside",h_="dismissableLayer.focusOutside",Op,T0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),E0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=R.useContext(T0),[u,d]=R.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=R.useState({}),p=Br(t,C=>d(C)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),y=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=b,x=p_(C=>{const k=C.target,I=[...c.branches].some(A=>A.contains(k));!T||I||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),E=g_(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return u_(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),R.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Op=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_p(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Op)}},[u,f,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_p())},[u,c]),R.useEffect(()=>{const C=()=>h({});return document.addEventListener(Iu,C),()=>document.removeEventListener(Iu,C)},[]),S.jsx(Nn.div,{...l,ref:p,style:{pointerEvents:g?T?"auto":"none":void 0,...e.style},onFocusCapture:qt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:qt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:qt(e.onPointerDownCapture,x.onPointerDownCapture)})});E0.displayName=d_;var m_="DismissableLayerBranch",C0=R.forwardRef((e,t)=>{const n=R.useContext(T0),r=R.useRef(null),o=Br(t,r);return R.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),S.jsx(Nn.div,{...e,ref:o})});C0.displayName=m_;function p_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e),r=R.useRef(!1),o=R.useRef(()=>{});return R.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){R0(f_,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function g_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e),r=R.useRef(!1);return R.useEffect(()=>{const o=s=>{s.target&&!r.current&&R0(h_,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _p(){const e=new CustomEvent(Iu);document.dispatchEvent(e)}function R0(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S0(o,s):o.dispatchEvent(s)}var y_=E0,v_=C0,ja=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},b_="Portal",P0=R.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=R.useState(!1);ja(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?pi.createPortal(S.jsx(Nn.div,{...r,ref:t}),i):null});P0.displayName=b_;function x_(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var k0=e=>{const{present:t,children:n}=e,r=w_(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),s=Br(r.ref,S_(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:s}):null};k0.displayName="Presence";function w_(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),s=R.useRef("none"),i=e?"mounted":"unmounted",[a,l]=x_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=qi(r.current);s.current=a==="mounted"?c:"none"},[a]),ja(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=qi(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ja(()=>{if(t){const c=d=>{const h=qi(r.current).includes(d.animationName);d.target===t&&h&&gi.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=qi(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function qi(e){return(e==null?void 0:e.animationName)||"none"}function S_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function T_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=E_({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=zn(n),l=R.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[s,e,o,a]);return[i,l]}function E_({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),s=zn(t);return R.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var C_="VisuallyHidden",vf=R.forwardRef((e,t)=>S.jsx(Nn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));vf.displayName=C_;var bf="ToastProvider",[xf,R_,P_]=l_("Toast"),[I0,S$]=w0("Toast",[P_]),[k_,Cl]=I0(bf),A0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=R.useState(null),[c,u]=R.useState(0),d=R.useRef(!1),f=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${bf}\`. Expected non-empty \`string\`.`),S.jsx(xf.Provider,{scope:t,children:S.jsx(k_,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:R.useCallback(()=>u(h=>h+1),[]),onToastRemove:R.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};A0.displayName=bf;var O0="ToastViewport",I_=["F8"],Au="toast.viewportPause",Ou="toast.viewportResume",_0=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=I_,label:o="Notifications ({hotkey})",...s}=e,i=Cl(O0,n),a=R_(n),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),f=Br(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;R.useEffect(()=>{const v=b=>{var g;r.every(T=>b[T]||b.code===T)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),R.useEffect(()=>{const v=l.current,b=d.current;if(p&&v&&b){const y=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Au);b.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Ou);b.dispatchEvent(E),i.isClosePausedRef.current=!1}},T=E=>{!v.contains(E.relatedTarget)&&g()},x=()=>{v.contains(document.activeElement)||g()};return v.addEventListener("focusin",y),v.addEventListener("focusout",T),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",x),window.addEventListener("blur",y),window.addEventListener("focus",g),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",T),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",x),window.removeEventListener("blur",y),window.removeEventListener("focus",g)}}},[p,i.isClosePausedRef]);const m=R.useCallback(({tabbingDirection:v})=>{const y=a().map(g=>{const T=g.ref.current,x=[T,...z_(T)];return v==="forwards"?x:x.reverse()});return(v==="forwards"?y.reverse():y).flat()},[a]);return R.useEffect(()=>{const v=d.current;if(v){const b=y=>{var x,E,C;const g=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!g){const k=document.activeElement,I=y.shiftKey;if(y.target===v&&I){(x=c.current)==null||x.focus();return}const O=m({tabbingDirection:I?"backwards":"forwards"}),L=O.findIndex(P=>P===k);yc(O.slice(L+1))?y.preventDefault():I?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return v.addEventListener("keydown",b),()=>v.removeEventListener("keydown",b)}},[a,m]),S.jsxs(v_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&S.jsx(_u,{ref:c,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});yc(v)}}),S.jsx(xf.Slot,{scope:n,children:S.jsx(Nn.ol,{tabIndex:-1,...s,ref:f})}),p&&S.jsx(_u,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});yc(v)}})]})});_0.displayName=O0;var M0="ToastFocusProxy",_u=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Cl(M0,n);return S.jsx(vf,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});_u.displayName=M0;var Rl="Toast",A_="toast.swipeStart",O_="toast.swipeMove",__="toast.swipeCancel",M_="toast.swipeEnd",D0=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=T_({prop:r,defaultProp:o,onChange:s});return S.jsx(k0,{present:n||a,children:S.jsx(j_,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:zn(e.onPause),onResume:zn(e.onResume),onSwipeStart:qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});D0.displayName=Rl;var[D_,N_]=I0(Rl,{onClose(){}}),j_=R.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=Cl(Rl,n),[v,b]=R.useState(null),y=Br(t,P=>b(P)),g=R.useRef(null),T=R.useRef(null),x=o||m.duration,E=R.useRef(0),C=R.useRef(x),k=R.useRef(0),{onToastAdd:I,onToastRemove:A}=m,N=zn(()=>{var M;(v==null?void 0:v.contains(document.activeElement))&&((M=m.viewport)==null||M.focus()),i()}),O=R.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),E.current=new Date().getTime(),k.current=window.setTimeout(N,P))},[N]);R.useEffect(()=>{const P=m.viewport;if(P){const M=()=>{O(C.current),c==null||c()},j=()=>{const D=new Date().getTime()-E.current;C.current=C.current-D,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(Au,j),P.addEventListener(Ou,M),()=>{P.removeEventListener(Au,j),P.removeEventListener(Ou,M)}}},[m.viewport,x,l,c,O]),R.useEffect(()=>{s&&!m.isClosePausedRef.current&&O(x)},[s,x,m.isClosePausedRef,O]),R.useEffect(()=>(I(),()=>A()),[I,A]);const L=R.useMemo(()=>v?$0(v):null,[v]);return m.viewport?S.jsxs(S.Fragment,{children:[L&&S.jsx(L_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),S.jsx(D_,{scope:n,onClose:N,children:gi.createPortal(S.jsx(xf.ItemSlot,{scope:n,children:S.jsx(y_,{asChild:!0,onEscapeKeyDown:qt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||N(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:S.jsx(Nn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:qt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:qt(e.onPointerDown,P=>{P.button===0&&(g.current={x:P.clientX,y:P.clientY})}),onPointerMove:qt(e.onPointerMove,P=>{if(!g.current)return;const M=P.clientX-g.current.x,j=P.clientY-g.current.y,D=!!T.current,V=["left","right"].includes(m.swipeDirection),z=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,_=V?z(0,M):0,$=V?0:z(0,j),Z=P.pointerType==="touch"?10:2,re={x:_,y:$},ee={originalEvent:P,delta:re};D?(T.current=re,Ki(O_,d,ee,{discrete:!1})):Mp(re,m.swipeDirection,Z)?(T.current=re,Ki(A_,u,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(M)>Z||Math.abs(j)>Z)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,P=>{const M=T.current,j=P.target;if(j.hasPointerCapture(P.pointerId)&&j.releasePointerCapture(P.pointerId),T.current=null,g.current=null,M){const D=P.currentTarget,V={originalEvent:P,delta:M};Mp(M,m.swipeDirection,m.swipeThreshold)?Ki(M_,h,V,{discrete:!0}):Ki(__,f,V,{discrete:!0}),D.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),L_=e=>{const{__scopeToast:t,children:n,...r}=e,o=Cl(Rl,t),[s,i]=R.useState(!1),[a,l]=R.useState(!1);return B_(()=>i(!0)),R.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:S.jsx(P0,{asChild:!0,children:S.jsx(vf,{...r,children:s&&S.jsxs(S.Fragment,{children:[o.label," ",n]})})})},F_="ToastTitle",N0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return S.jsx(Nn.div,{...r,ref:t})});N0.displayName=F_;var V_="ToastDescription",j0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return S.jsx(Nn.div,{...r,ref:t})});j0.displayName=V_;var L0="ToastAction",$_=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?S.jsx(V0,{altText:n,asChild:!0,children:S.jsx(wf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${L0}\`. Expected non-empty \`string\`.`),null)});$_.displayName=L0;var F0="ToastClose",wf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=N_(F0,n);return S.jsx(V0,{asChild:!0,children:S.jsx(Nn.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});wf.displayName=F0;var V0=R.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return S.jsx(Nn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function $0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),W_(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...$0(r))}}),t}function Ki(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S0(o,s):o.dispatchEvent(s)}var Mp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function B_(e=()=>{}){const t=zn(e);ja(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function W_(e){return e.nodeType===e.ELEMENT_NODE}function z_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var H_=A0,U_=_0,G_=D0,Y_=N0,q_=j0,K_=wf;const Z_=e=>{const[t,n]=w.useState(!1),r=()=>n(!0),o=()=>n(!1);return w.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},X_=os("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),B0=w.createContext(()=>{throw new Error("Not implemented")}),Q_=()=>w.useContext(B0),Dp={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},J_=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=X_({theme:t.theme||"default"});return S.jsx(G_,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:S.jsx(lt.li,{layout:!0,layoutScroll:!0,animate:s,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Dp[t.reversedIndex]||Dp.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:S.jsxs("div",{className:i,children:[S.jsxs("div",{className:"flex flex-col p-4",children:[t.title?S.jsx(Y_,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,S.jsx(q_,{className:"select-text truncate",children:t.text})]}),r?S.jsx(K_,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:S.jsx(lf,{className:"h-5 w-5"})}):null]})})})});function eM({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=Z_(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const p=[...h,{...u,id:d,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(h=>h.filter(p=>p.id!==d))}},[t]);return S.jsxs(H_,{duration:n,swipeThreshold:150,children:[S.jsx(B0.Provider,{value:l,children:e}),S.jsx(fr,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(p=>p.id!==c.id));return w.createElement(J_,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),S.jsx(U_,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const tM=e=>S.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[S.jsxs("header",{className:"p-6 items-start flex gap-4",children:[S.jsx("div",{className:Me("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:S.jsx("div",{children:S.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsx("header",{children:S.jsx("h3",{className:"text-base leading-none",children:e.title})}),S.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?S.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),W0=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},z0=w.createContext(""),nM=e=>{const[t,n]=W0(e.active),r=$r(0),o=$r(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=Ys(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.Children.toArray(e.children),c=u=>{const d=u.currentTarget,f=d.getBoundingClientRect();o.set(f.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return S.jsx(z0.Provider,{value:t,children:S.jsx(v0,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:S.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:S.jsx("nav",{className:"min-w-0",children:S.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 S.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:S.jsx(i,{"data-id":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},rM=()=>w.useContext(z0),oM=e=>{const t=rM();return S.jsx(w.Fragment,{children:e.id===t?e.children:null})};function mr(e){return H0(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){var t;return(t=(H0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function H0(e){return e instanceof Node||e instanceof Vt(e).Node}function He(e){return e instanceof Element||e instanceof Vt(e).Element}function ft(e){return e instanceof HTMLElement||e instanceof Vt(e).HTMLElement}function Mu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}function Ri(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sM(e){return["table","td","th"].includes(mr(e))}function Pl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Sf(e){const t=Tf(),n=He(e)?Qt(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 iM(e){let t=Hn(e);for(;ft(t)&&!ir(t);){if(Sf(t))return t;if(Pl(t))return null;t=Hn(t)}return null}function Tf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(mr(e))}function Qt(e){return Vt(e).getComputedStyle(e)}function kl(e){return He(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mu(e)&&e.host||Yn(e);return Mu(t)?t.host:t}function U0(e){const t=Hn(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:ft(t)&&Ri(t)?t:U0(t)}function rr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=U0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Vt(o);if(s){const a=Du(i);return t.concat(i,i.visualViewport||[],Ri(o)?o:[],a&&n?rr(a):[])}return t.concat(o,rr(o,[],n))}function Du(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ln(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 it(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Mu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ef(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function G0(){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 Y0(e){return e.mozInputSource===0&&e.isTrusted?!0:Nu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cf(e){return aM()?!1:!Nu()&&e.width===0&&e.height===0||Nu()&&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 Rf(){return/apple/i.test(navigator.vendor)}function Nu(){const e=/android/i;return e.test(Ef())||e.test(G0())}function q0(){return Ef().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function aM(){return G0().includes("jsdom/")}function Uo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function lM(e){return"nativeEvent"in e}function cM(e){return e.matches("html,body")}function St(e){return(e==null?void 0:e.ownerDocument)||document}function vc(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 Tn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const uM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Pf(e){return ft(e)&&e.matches(uM)}function kt(e){e.preventDefault(),e.stopPropagation()}function K0(e){return e?e.getAttribute("role")==="combobox"&&Pf(e):!1}const Cn=Math.min,Yt=Math.max,La=Math.round,Eo=Math.floor,ar=e=>({x:e,y:e}),dM={left:"right",right:"left",bottom:"top",top:"bottom"},fM={start:"end",end:"start"};function ju(e,t,n){return Yt(e,Cn(t,n))}function us(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function ds(e){return e.split("-")[1]}function Z0(e){return e==="x"?"y":"x"}function kf(e){return e==="y"?"height":"width"}function Wr(e){return["top","bottom"].includes(lr(e))?"y":"x"}function If(e){return Z0(Wr(e))}function hM(e,t,n){n===void 0&&(n=!1);const r=ds(e),o=If(e),s=kf(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Fa(i)),[i,Fa(i)]}function mM(e){const t=Fa(e);return[Lu(e),t,Lu(t)]}function Lu(e){return e.replace(/start|end/g,t=>fM[t])}function pM(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function gM(e,t,n,r){const o=ds(e);let s=pM(lr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Lu)))),s}function Fa(e){return e.replace(/left|right|bottom|top/g,t=>dM[t])}function yM(e){return{top:0,right:0,bottom:0,left:0,...e}}function X0(e){return typeof e!="number"?yM(e):{top:e,right:e,bottom:e,left:e}}function Va(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}}/*!
|
|
169
|
+
*/var Rp;function MO(){return Rp||(Rp=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=x,t=c0();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var b=a(function(){var S=!1,E,C,k=function(M){if(!S){S=!0,E=M;var L=h(M);if(p!==void 0&&v.hasValue){var P=v.value;if(p(P,L))return C=P,P}return C=L,L}var O=E,j=C;if(r(O,M))return j;var D=h(M);return p!==void 0&&p(j,D)?j:(E=M,C=D,D)},I=f===void 0?null:f,A=function(){return k(d())},N=I===null?void 0:function(){return k(I())};return[A,N]},[d,f,h,p]),y=b[0],g=b[1],T=o(u,y,g);return i(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}Cp.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Cp}process.env.NODE_ENV==="production"?_O():MO();const lo=e=>{const t=x.useRef(e??{});return x.useEffect(()=>void(t.current=e),[e]),t},DO=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current},NO=e=>Object.entries(e),u0=e=>e instanceof Promise,d0=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),jO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>d0(u,f,s,d));return u0(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))},LO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>d0(c,u,s,o.current));return u0(a)?a.then(c=>l(c)):l(a)},hf=(e,t,n)=>{const[r,o]=x.useState(()=>e),s=lo(r),i=lo((n==null?void 0:n.props)??{}),a=lo(t),l=lo((n==null?void 0:n.postMiddleware)??[]),c=lo((n==null?void 0:n.interceptor)??[]),u=x.useRef(e),d=DO(r),f=lo(d),h=x.useRef(null);x.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=x.useState(()=>{const m=()=>i.current,v=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return NO(v).reduce((b,[y,g])=>({...b,[y]:n!=null&&n.debug?jO(y,g,o,m,h,c.current):LO(y,g,o,m,h,c.current)}),{})});return[r,p,i.current]},FO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function VO(e,t){return x.useRef(FO(e,t)).current}const El={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>)`},To=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(To(i,t,n,a))},[]),f0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:f0(i,t,n,a)}},{}),Pp={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Na=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},$O={default:e=>Na(e,{result:Pp.default}),dark:e=>Na(e,{result:Pp.dark})},mf=(e,t)=>{const n=a=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return a?a(d):d},r=To(e.colors,n(t==null?void 0:t.colors)),o=To(e.spacing,n(t==null?void 0:t.spacing)),s=To(e.rounded,n(t==null?void 0:t.rounded)),i=e.custom?To(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,s,i)},BO=(e,t)=>Na(mf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),WO=(e,t)=>mf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),zO=(e,t)=>Na(mf(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),h0={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},m0={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},HO={name:"dark",rounded:h0,spacing:m0,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%)",muted:"hsla(0, 0%, 12%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 27%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},UO={rounded:h0,spacing:m0,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 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:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 88%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},GO=HO,YO=UO,pf={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>w.jsxs(x.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today",calendarBackMonth:"Back month",calendarNextMonth:"Next month",calendarMonthLabel:"Month",multiComboboxSelectedLabel:"Selected",multiComboboxInnerPlaceholder:"Search..."},gf={input:{iconFeedback:!0}},Ci=x.createContext({tweaks:gf,parser:El.hsla,map:pf,locale:void 0}),qO=e=>{const t=x.useMemo(()=>({locale:e.locale,tweaks:{...gf,...e.tweaks},parser:e.parser||El.hsla,map:{...pf,...e.map}}),[e]);return w.jsx(Ci.Provider,{value:t,children:e.children})},yf=e=>{if(e)return e;const t=x.useContext(Ci);if(t)return t.locale||e},Ct=()=>{const e=x.useContext(Ci);return e?e.map:pf},KO=()=>{const e=x.useContext(Ci);return e?e.parser:El.hsla},ZO=()=>{const e=x.useContext(Ci);return e?e.tweaks:gf},XO={type:"spring",bounce:.3,duration:.6},kp=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),p0={middle:{x:"0%",opacity:1},enter:kp(1),exit:kp(-1)},Ip={exit:{visibility:"hidden"}},QO=e=>{const t=On(Gb(e));return Ub({start:t,end:cs(t,41)})},g0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),JO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=Gb(new Date(1970,o,1).setMonth(o)),i=g0(s,n);return w.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),gc={ArrowLeft:(e,t)=>t==="days"?uO(e,1):r0(e,1),ArrowRight:(e,t)=>t==="days"?cs(e,1):Tl(e,1),ArrowUp:(e,t)=>t==="days"?dO(e,1):fO(e,1),ArrowDown:(e,t)=>t==="days"?Wb(e,1):zb(e,1)},Ap=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},Tr=e=>e.getFullYear().toString().padStart(4,"0"),e_=(e,t,n)=>e===void 0||n===void 0?!1:dA(t,e)&&fA(t,n),t_=e=>{var n;const t=Ct();return w.jsx(ct.tbody,{layout:!0,variants:p0,custom:e.direction,onKeyDown:e.onKeyDown,className:Me((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var i,a,l;const s=it.function((i=e.styles)==null?void 0:i.week)?(a=e.styles)==null?void 0:a.week(r):(l=e.styles)==null?void 0:l.week;return w.jsx("tr",{className:s,children:r.map(c=>{var b,y,g,T,S,E,C,k,I,A,N,M,L,P,O,j,D,V;const u=c.toISOString(),d=e.rangeMode?u===((y=(b=e.range)==null?void 0:b.to)==null?void 0:y.toISOString())||u===((T=(g=e.range)==null?void 0:g.from)==null?void 0:T.toISOString()):u===((S=e.date)==null?void 0:S.toISOString()),f=cO(c)&&e.markToday,h=((E=e.disabledDate)==null?void 0:E.call(e,c))||!1,p=lO(c,e.stateDate),m=!p||h,v=e.rangeMode?e_((C=e.range)==null?void 0:C.from,c,(k=e.range)==null?void 0:k.to):!1;return w.jsxs("td",{align:"center",className:Me("relative",it.function((I=e.styles)==null?void 0:I.dayFrame)?(A=e.styles)==null?void 0:A.dayFrame(c):(N=e.styles)==null?void 0:N.dayFrame),children:[w.jsxs("button",{type:"button","data-date":u,disabled:h,"data-samemonth":p,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Me(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${f?"text-emphasis":""} ${m?"text-disabled":""} ${d?"bg-primary text-primary-foreground":""}`,v&&e.markRange?"size-10 border border-dashed border-card-border":"",it.function((M=e.styles)==null?void 0:M.day)?(L=e.styles)==null?void 0:L.day(c):(P=e.styles)==null?void 0:P.day),children:[c.getDate(),d&&((O=e.stateRange.from)==null?void 0:O.toISOString())===u?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((j=e.labelRange)==null?void 0:j.from)??t.calendarFromDate})}):null,d&&((D=e.stateRange.to)==null?void 0:D.toISOString())===u?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((V=e.labelRange)==null?void 0:V.to)??t.calendarToDate})}):null]}),e.RenderOnDay?w.jsx(e.RenderOnDay,{date:c}):null]},u)})},`week-${r.length}-${o}`)})})},y0=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...f})=>{const h=x.useRef(xi()),p=Ct(),m=yf(o),v=x.useRef(null),{date:b,range:y}=f,g=b||new Date,T=x.useRef(null),[S,E]=hf({date:g,isAnimating:!1,year:Tr(g),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:JO(h.current,g,m),selectMode:l?"from":void 0,week:Ub({start:On(g),end:gI(g)})},L=>({onChangeYear:P=>({year:P}),setToday:()=>({date:zo(new Date)}),onExitComplete:()=>(Ap(T.current||null,v,L.state().date,200),T.current=null,{isAnimating:!1}),date:P=>{const O=P(L.state().date);return{date:O,year:Tr(O)}},nextMonth:P=>{T.current=P.currentTarget;const O=L.state();if(O.isAnimating)return O;const j=Tl(O.date,1);return{date:j,isAnimating:!0,direction:1,year:Tr(j)}},previousMonth:P=>{T.current=P.currentTarget;const O=L.state();if(O.isAnimating)return O;const j=r0(O.date,1);return{date:j,isAnimating:!0,direction:-1,year:Tr(j)}},onSelectDate:P=>{const O=L.state(),j=P.currentTarget.dataset.range==="true",D=P.currentTarget.dataset.date||"",V=new Date(D);return{date:V,year:Tr(V),selectMode:O.selectMode===void 0?void 0:O.selectMode==="from"?"to":"from",range:j?{from:O.selectMode==="from"?V:O.range.from,to:O.selectMode==="to"?V:O.range.to}:O.range}},onChangeMonth:P=>{const O=P.target.value,D=Array.from(P.target.options).find(H=>H.value===O),V=L.state();if(D){const H=D.dataset.index||"",_=new Date(L.state().date);return _.setMonth(+H),{...V,date:_,year:Tr(_)}}return V},onKeyDown:P=>{const O=P.key,j=L.state();if(O in gc){(O==="ArrowUp"||O==="ArrowDown")&&P.preventDefault();const D=L.state().date,V=it.keyof(gc,O)?gc[O](D,P.shiftKey?"month":"days"):null;if(V!==null)return Ap(P.target,v,V),{...j,date:V,year:Tr(V)}}return L.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(L,P,O)=>{var D,V;return(O.method==="onChangeMonth"||O.method==="previousMonth"||O.method==="nextMonth")&&((V=(D=O.props).onChangeMonth)==null||V.call(D,L.date)),L},(L,P,O)=>{var D,V;return O.method==="onChangeYear"&&((V=(D=O.props).onChangeYear)==null||V.call(D,L.date)),L},(L,P,O)=>{const j=O.method==="onSelectDate"||O.method==="setToday"||O.method==="onKeyDown";return l&&j&&t?(c==null||c(L.range),L):(j&&t&&(c==null||c(L.date)),L)}]}),C=QO(S.date),k=zy(C,7),I=S.date.toISOString(),A=g0(S.date,m);x.useEffect(()=>{t||c==null||c(S.date)},[I]);const N=VO(L=>{E.date(P=>{const O=new Date(P);return O.setFullYear(+L),O})},1200),M=L=>{const P=L.currentTarget.value;E.onChangeYear(P),a==null||a(new Date(P)),N(P)};return w.jsx(ZT,{transition:XO,children:w.jsxs("div",{"data-component":"calendar",ref:v,className:Me("relative overflow-hidden",it.function(u==null?void 0:u.calendar)?u==null?void 0:u.calendar(C):u==null?void 0:u.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(fr,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:E.onExitComplete,children:w.jsxs(ct.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(ct.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Ip,onClick:E.previousMonth,title:p.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:w.jsx(Yk,{className:"h-4 w-4"})}),w.jsx(ct.span,{layout:!0,variants:p0,custom:S.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:w.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[w.jsx("select",{"aria-label":p.calendarMonthLabel,value:A,onChange:E.onChangeMonth,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:S.months}),w.jsx(l0,{mask:"int",maxLength:4,placeholder:"YYYY",value:S.year,onChange:M,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(ct.button,{layout:!0,type:"button","data-focustrap":"next",variants:Ip,onClick:E.nextMonth,title:p.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:w.jsx(sf,{className:"h-4 w-4"})}),w.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),w.jsxs(ct.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:S.week.map(L=>w.jsx("th",{role:"columnheader",className:Me("py-2 text-sm font-medium capitalize",it.function(u==null?void 0:u.weekDay)?u.weekDay(L):u==null?void 0:u.weekDay),children:L.toLocaleDateString(m,{weekday:"short"})},L.toString()))})}),w.jsx(t_,{zip:k,range:y,styles:u,date:b||null,dispatch:E,markRange:d,markToday:s,rangeMode:l,stateDate:S.date,labelRange:n,stateRange:S.range,RenderOnDay:e,direction:S.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},A)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:E.setToday,children:p.calendarToday})})]})})},v0=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>w.jsxs(ss,{...a,as:r,"data-componen":"card",className:Me("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?w.jsx("header",{className:Me("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,w.jsx("div",{className:Me("min-w-full px-8",i),children:e})]}),b0=e=>{const t=e.Icon??Lb,n=Ct();return w.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[w.jsx(t,{size:64,className:"text-disabled"}),w.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function n_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function x0(...e){return t=>e.forEach(n=>n_(n,t))}function Br(...e){return R.useCallback(x0(...e),e)}function w0(e,t=[]){let n=[];function r(s,i){const a=R.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...p}=d,m=(f==null?void 0:f[e][l])||a,v=R.useMemo(()=>p,Object.values(p));return w.jsx(m.Provider,{value:v,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,p=R.useContext(h);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>R.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return R.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,r_(o,...t)]}function r_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Ho=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),s=o.find(s_);if(s){const i=s.props.children,a=o.map(l=>l===s?R.Children.count(i)>1?R.Children.only(null):R.isValidElement(i)?i.props.children:null:l);return w.jsx(ku,{...r,ref:t,children:R.isValidElement(i)?R.cloneElement(i,void 0,a):null})}return w.jsx(ku,{...r,ref:t,children:n})});Ho.displayName="Slot";var ku=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=a_(n);return R.cloneElement(n,{...i_(r,n.props),ref:t?x0(t,o):o})}return R.Children.count(n)>1?R.Children.only(null):null});ku.displayName="SlotClone";var o_=({children:e})=>w.jsx(w.Fragment,{children:e});function s_(e){return R.isValidElement(e)&&e.type===o_}function i_(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function a_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function l_(e){const t=e+"CollectionProvider",[n,r]=w0(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,v=x.useRef(null),b=x.useRef(new Map).current;return w.jsx(o,{scope:p,itemMap:b,collectionRef:v,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=x.forwardRef((h,p)=>{const{scope:m,children:v}=h,b=s(a,m),y=Br(p,b.collectionRef);return w.jsx(Ho,{ref:y,children:v})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=x.forwardRef((h,p)=>{const{scope:m,children:v,...b}=h,y=x.useRef(null),g=Br(p,y),T=s(c,m);return x.useEffect(()=>(T.itemMap.set(y,{ref:y,...b}),()=>void T.itemMap.delete(y))),w.jsx(Ho,{[u]:"",ref:g,children:v})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return x.useCallback(()=>{const v=p.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((T,S)=>b.indexOf(T.ref.current)-b.indexOf(S.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var c_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Nn=c_.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?Ho:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function S0(e,t){e&&gi.flushSync(()=>e.dispatchEvent(t))}function zn(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function u_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e);R.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var d_="DismissableLayer",Iu="dismissableLayer.update",f_="dismissableLayer.pointerDownOutside",h_="dismissableLayer.focusOutside",Op,T0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),E0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=R.useContext(T0),[u,d]=R.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=R.useState({}),p=Br(t,C=>d(C)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),y=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,T=y>=b,S=p_(C=>{const k=C.target,I=[...c.branches].some(A=>A.contains(k));!T||I||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),E=g_(C=>{const k=C.target;[...c.branches].some(A=>A.contains(k))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return u_(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),R.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Op=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_p(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Op)}},[u,f,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_p())},[u,c]),R.useEffect(()=>{const C=()=>h({});return document.addEventListener(Iu,C),()=>document.removeEventListener(Iu,C)},[]),w.jsx(Nn.div,{...l,ref:p,style:{pointerEvents:g?T?"auto":"none":void 0,...e.style},onFocusCapture:qt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:qt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:qt(e.onPointerDownCapture,S.onPointerDownCapture)})});E0.displayName=d_;var m_="DismissableLayerBranch",C0=R.forwardRef((e,t)=>{const n=R.useContext(T0),r=R.useRef(null),o=Br(t,r);return R.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(Nn.div,{...e,ref:o})});C0.displayName=m_;function p_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e),r=R.useRef(!1),o=R.useRef(()=>{});return R.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){R0(f_,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function g_(e,t=globalThis==null?void 0:globalThis.document){const n=zn(e),r=R.useRef(!1);return R.useEffect(()=>{const o=s=>{s.target&&!r.current&&R0(h_,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _p(){const e=new CustomEvent(Iu);document.dispatchEvent(e)}function R0(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S0(o,s):o.dispatchEvent(s)}var y_=E0,v_=C0,ja=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},b_="Portal",P0=R.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=R.useState(!1);ja(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?pi.createPortal(w.jsx(Nn.div,{...r,ref:t}),i):null});P0.displayName=b_;function x_(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var k0=e=>{const{present:t,children:n}=e,r=w_(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),s=Br(r.ref,S_(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:s}):null};k0.displayName="Presence";function w_(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),s=R.useRef("none"),i=e?"mounted":"unmounted",[a,l]=x_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=qi(r.current);s.current=a==="mounted"?c:"none"},[a]),ja(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=qi(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ja(()=>{if(t){const c=d=>{const h=qi(r.current).includes(d.animationName);d.target===t&&h&&gi.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=qi(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function qi(e){return(e==null?void 0:e.animationName)||"none"}function S_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function T_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=E_({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=zn(n),l=R.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[s,e,o,a]);return[i,l]}function E_({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,o=R.useRef(r),s=zn(t);return R.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var C_="VisuallyHidden",vf=R.forwardRef((e,t)=>w.jsx(Nn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));vf.displayName=C_;var bf="ToastProvider",[xf,R_,P_]=l_("Toast"),[I0,S$]=w0("Toast",[P_]),[k_,Cl]=I0(bf),A0=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=R.useState(null),[c,u]=R.useState(0),d=R.useRef(!1),f=R.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${bf}\`. Expected non-empty \`string\`.`),w.jsx(xf.Provider,{scope:t,children:w.jsx(k_,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:R.useCallback(()=>u(h=>h+1),[]),onToastRemove:R.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};A0.displayName=bf;var O0="ToastViewport",I_=["F8"],Au="toast.viewportPause",Ou="toast.viewportResume",_0=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=I_,label:o="Notifications ({hotkey})",...s}=e,i=Cl(O0,n),a=R_(n),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),f=Br(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;R.useEffect(()=>{const v=b=>{var g;r.every(T=>b[T]||b.code===T)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),R.useEffect(()=>{const v=l.current,b=d.current;if(p&&v&&b){const y=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Au);b.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Ou);b.dispatchEvent(E),i.isClosePausedRef.current=!1}},T=E=>{!v.contains(E.relatedTarget)&&g()},S=()=>{v.contains(document.activeElement)||g()};return v.addEventListener("focusin",y),v.addEventListener("focusout",T),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",S),window.addEventListener("blur",y),window.addEventListener("focus",g),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",T),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",S),window.removeEventListener("blur",y),window.removeEventListener("focus",g)}}},[p,i.isClosePausedRef]);const m=R.useCallback(({tabbingDirection:v})=>{const y=a().map(g=>{const T=g.ref.current,S=[T,...z_(T)];return v==="forwards"?S:S.reverse()});return(v==="forwards"?y.reverse():y).flat()},[a]);return R.useEffect(()=>{const v=d.current;if(v){const b=y=>{var S,E,C;const g=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!g){const k=document.activeElement,I=y.shiftKey;if(y.target===v&&I){(S=c.current)==null||S.focus();return}const M=m({tabbingDirection:I?"backwards":"forwards"}),L=M.findIndex(P=>P===k);yc(M.slice(L+1))?y.preventDefault():I?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return v.addEventListener("keydown",b),()=>v.removeEventListener("keydown",b)}},[a,m]),w.jsxs(v_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&w.jsx(_u,{ref:c,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});yc(v)}}),w.jsx(xf.Slot,{scope:n,children:w.jsx(Nn.ol,{tabIndex:-1,...s,ref:f})}),p&&w.jsx(_u,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});yc(v)}})]})});_0.displayName=O0;var M0="ToastFocusProxy",_u=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Cl(M0,n);return w.jsx(vf,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});_u.displayName=M0;var Rl="Toast",A_="toast.swipeStart",O_="toast.swipeMove",__="toast.swipeCancel",M_="toast.swipeEnd",D0=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=T_({prop:r,defaultProp:o,onChange:s});return w.jsx(k0,{present:n||a,children:w.jsx(j_,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:zn(e.onPause),onResume:zn(e.onResume),onSwipeStart:qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});D0.displayName=Rl;var[D_,N_]=I0(Rl,{onClose(){}}),j_=R.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=Cl(Rl,n),[v,b]=R.useState(null),y=Br(t,P=>b(P)),g=R.useRef(null),T=R.useRef(null),S=o||m.duration,E=R.useRef(0),C=R.useRef(S),k=R.useRef(0),{onToastAdd:I,onToastRemove:A}=m,N=zn(()=>{var O;(v==null?void 0:v.contains(document.activeElement))&&((O=m.viewport)==null||O.focus()),i()}),M=R.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),E.current=new Date().getTime(),k.current=window.setTimeout(N,P))},[N]);R.useEffect(()=>{const P=m.viewport;if(P){const O=()=>{M(C.current),c==null||c()},j=()=>{const D=new Date().getTime()-E.current;C.current=C.current-D,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(Au,j),P.addEventListener(Ou,O),()=>{P.removeEventListener(Au,j),P.removeEventListener(Ou,O)}}},[m.viewport,S,l,c,M]),R.useEffect(()=>{s&&!m.isClosePausedRef.current&&M(S)},[s,S,m.isClosePausedRef,M]),R.useEffect(()=>(I(),()=>A()),[I,A]);const L=R.useMemo(()=>v?$0(v):null,[v]);return m.viewport?w.jsxs(w.Fragment,{children:[L&&w.jsx(L_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),w.jsx(D_,{scope:n,onClose:N,children:gi.createPortal(w.jsx(xf.ItemSlot,{scope:n,children:w.jsx(y_,{asChild:!0,onEscapeKeyDown:qt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||N(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Nn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:qt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:qt(e.onPointerDown,P=>{P.button===0&&(g.current={x:P.clientX,y:P.clientY})}),onPointerMove:qt(e.onPointerMove,P=>{if(!g.current)return;const O=P.clientX-g.current.x,j=P.clientY-g.current.y,D=!!T.current,V=["left","right"].includes(m.swipeDirection),H=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,_=V?H(0,O):0,$=V?0:H(0,j),K=P.pointerType==="touch"?10:2,re={x:_,y:$},ee={originalEvent:P,delta:re};D?(T.current=re,Ki(O_,d,ee,{discrete:!1})):Mp(re,m.swipeDirection,K)?(T.current=re,Ki(A_,u,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(O)>K||Math.abs(j)>K)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,P=>{const O=T.current,j=P.target;if(j.hasPointerCapture(P.pointerId)&&j.releasePointerCapture(P.pointerId),T.current=null,g.current=null,O){const D=P.currentTarget,V={originalEvent:P,delta:O};Mp(O,m.swipeDirection,m.swipeThreshold)?Ki(M_,h,V,{discrete:!0}):Ki(__,f,V,{discrete:!0}),D.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),L_=e=>{const{__scopeToast:t,children:n,...r}=e,o=Cl(Rl,t),[s,i]=R.useState(!1),[a,l]=R.useState(!1);return B_(()=>i(!0)),R.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:w.jsx(P0,{asChild:!0,children:w.jsx(vf,{...r,children:s&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},F_="ToastTitle",N0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(Nn.div,{...r,ref:t})});N0.displayName=F_;var V_="ToastDescription",j0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(Nn.div,{...r,ref:t})});j0.displayName=V_;var L0="ToastAction",$_=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(V0,{altText:n,asChild:!0,children:w.jsx(wf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${L0}\`. Expected non-empty \`string\`.`),null)});$_.displayName=L0;var F0="ToastClose",wf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=N_(F0,n);return w.jsx(V0,{asChild:!0,children:w.jsx(Nn.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});wf.displayName=F0;var V0=R.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return w.jsx(Nn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function $0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),W_(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...$0(r))}}),t}function Ki(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S0(o,s):o.dispatchEvent(s)}var Mp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function B_(e=()=>{}){const t=zn(e);ja(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function W_(e){return e.nodeType===e.ELEMENT_NODE}function z_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var H_=A0,U_=_0,G_=D0,Y_=N0,q_=j0,K_=wf;const Z_=e=>{const[t,n]=x.useState(!1),r=()=>n(!0),o=()=>n(!1);return x.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},X_=os("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),B0=x.createContext(()=>{throw new Error("Not implemented")}),Q_=()=>x.useContext(B0),Dp={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},J_=x.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=X_({theme:t.theme||"default"});return w.jsx(G_,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:w.jsx(ct.li,{layout:!0,layoutScroll:!0,animate:s,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Dp[t.reversedIndex]||Dp.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:w.jsxs("div",{className:i,children:[w.jsxs("div",{className:"flex flex-col p-4",children:[t.title?w.jsx(Y_,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,w.jsx(q_,{className:"select-text truncate",children:t.text})]}),r?w.jsx(K_,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:w.jsx(lf,{className:"h-5 w-5"})}):null]})})})});function eM({children:e,max:t=5,duration:n=5e3}){const r=x.useRef(null),o=Z_(r),[s,i]=x.useState([]),a=x.useCallback(()=>i([]),[]);x.useEffect(()=>()=>a(),[a]);const l=x.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const p=[...h,{...u,id:d,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(h=>h.filter(p=>p.id!==d))}},[t]);return w.jsxs(H_,{duration:n,swipeThreshold:150,children:[w.jsx(B0.Provider,{value:l,children:e}),w.jsx(fr,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(p=>p.id!==c.id));return x.createElement(J_,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),w.jsx(U_,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const tM=e=>w.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[w.jsxs("header",{className:"p-6 items-start flex gap-4",children:[w.jsx("div",{className:Me("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:w.jsx("div",{children:w.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx("header",{children:w.jsx("h3",{className:"text-base leading-none",children:e.title})}),w.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?w.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),W0=(e,t)=>{const[n,r]=x.useState(()=>t||e);return x.useEffect(()=>{r(e)},[e]),[n,r]},z0=x.createContext(""),nM=e=>{const[t,n]=W0(e.active),r=$r(0),o=$r(0),s=x.useRef(null),i=e.useHash?"a":"button";x.useEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=Ys(e.onChange);x.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=x.Children.toArray(e.children),c=u=>{const d=u.currentTarget,f=d.getBoundingClientRect();o.set(f.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return w.jsx(z0.Provider,{value:t,children:w.jsx(v0,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:w.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:w.jsx("nav",{className:"min-w-0",children:w.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const d=u.props;return w.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full border-b-2 transition-all border-card-border data-[active=true]:border-primary data-[active=true]:text-primary",children:w.jsx(i,{"data-id":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},rM=()=>x.useContext(z0),oM=e=>{const t=rM();return w.jsx(x.Fragment,{children:e.id===t?e.children:null})};function mr(e){return H0(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){var t;return(t=(H0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function H0(e){return e instanceof Node||e instanceof Vt(e).Node}function He(e){return e instanceof Element||e instanceof Vt(e).Element}function ht(e){return e instanceof HTMLElement||e instanceof Vt(e).HTMLElement}function Mu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}function Ri(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sM(e){return["table","td","th"].includes(mr(e))}function Pl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Sf(e){const t=Tf(),n=He(e)?Qt(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 iM(e){let t=Hn(e);for(;ht(t)&&!ir(t);){if(Sf(t))return t;if(Pl(t))return null;t=Hn(t)}return null}function Tf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ir(e){return["html","body","#document"].includes(mr(e))}function Qt(e){return Vt(e).getComputedStyle(e)}function kl(e){return He(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mu(e)&&e.host||Yn(e);return Mu(t)?t.host:t}function U0(e){const t=Hn(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:ht(t)&&Ri(t)?t:U0(t)}function rr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=U0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Vt(o);if(s){const a=Du(i);return t.concat(i,i.visualViewport||[],Ri(o)?o:[],a&&n?rr(a):[])}return t.concat(o,rr(o,[],n))}function Du(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ln(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 at(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Mu(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ef(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function G0(){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 Y0(e){return e.mozInputSource===0&&e.isTrusted?!0:Nu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cf(e){return aM()?!1:!Nu()&&e.width===0&&e.height===0||Nu()&&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 Rf(){return/apple/i.test(navigator.vendor)}function Nu(){const e=/android/i;return e.test(Ef())||e.test(G0())}function q0(){return Ef().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function aM(){return G0().includes("jsdom/")}function Uo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function lM(e){return"nativeEvent"in e}function cM(e){return e.matches("html,body")}function Tt(e){return(e==null?void 0:e.ownerDocument)||document}function vc(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 Tn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const uM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Pf(e){return ht(e)&&e.matches(uM)}function kt(e){e.preventDefault(),e.stopPropagation()}function K0(e){return e?e.getAttribute("role")==="combobox"&&Pf(e):!1}const Cn=Math.min,Yt=Math.max,La=Math.round,Eo=Math.floor,ar=e=>({x:e,y:e}),dM={left:"right",right:"left",bottom:"top",top:"bottom"},fM={start:"end",end:"start"};function ju(e,t,n){return Yt(e,Cn(t,n))}function us(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function ds(e){return e.split("-")[1]}function Z0(e){return e==="x"?"y":"x"}function kf(e){return e==="y"?"height":"width"}function Wr(e){return["top","bottom"].includes(lr(e))?"y":"x"}function If(e){return Z0(Wr(e))}function hM(e,t,n){n===void 0&&(n=!1);const r=ds(e),o=If(e),s=kf(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Fa(i)),[i,Fa(i)]}function mM(e){const t=Fa(e);return[Lu(e),t,Lu(t)]}function Lu(e){return e.replace(/start|end/g,t=>fM[t])}function pM(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function gM(e,t,n,r){const o=ds(e);let s=pM(lr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Lu)))),s}function Fa(e){return e.replace(/left|right|bottom|top/g,t=>dM[t])}function yM(e){return{top:0,right:0,bottom:0,left:0,...e}}function X0(e){return typeof e!="number"?yM(e):{top:e,right:e,bottom:e,left:e}}function Va(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}}/*!
|
|
170
170
|
* tabbable 6.2.0
|
|
171
171
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
172
|
-
*/var vM=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],$a=vM.join(","),Q0=typeof Element>"u",Go=Q0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ba=!Q0&&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},Wa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},bM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},xM=function(t,n,r){if(Wa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll($a));return n&&Go.call(t,$a)&&o.unshift(t),o=o.filter(r),o},wM=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Wa(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Go.call(i,$a);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Wa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},J0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ex=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||bM(t))&&!J0(t)?0:t.tabIndex},SM=function(t,n){var r=ex(t);return r<0&&n&&!J0(t)?0:r},TM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},tx=function(t){return t.tagName==="INPUT"},EM=function(t){return tx(t)&&t.type==="hidden"},CM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},RM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},PM=function(t){if(!t.name)return!0;var n=t.form||Ba(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=RM(o,t.form);return!s||s===t},kM=function(t){return tx(t)&&t.type==="radio"},IM=function(t){return kM(t)&&!PM(t)},AM=function(t){var n,r=t&&Ba(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=Ba(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},Np=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},OM=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Go.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Go.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Ba(t);if(l&&!l.shadowRoot&&o(l)===!0)return Np(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(AM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Np(t);return!1},_M=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 Go.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},MM=function(t,n){return!(n.disabled||Wa(n)||EM(n)||OM(n,t)||CM(n)||_M(n))},Fu=function(t,n){return!(IM(n)||ex(n)<0||!MM(t,n))},DM=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NM=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=SM(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(TM).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ri=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wM([t],n.includeContainer,{filter:Fu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DM}):r=xM(t,n.includeContainer,Fu.bind(null,n)),NM(r)},jM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Go.call(t,$a)===!1?!1:Fu(n,t)};function jp(e,t,n){let{reference:r,floating:o}=e;const s=Wr(t),i=If(t),a=kf(i),l=lr(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(ds(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const LM=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=jp(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:b}=a[m],{x:y,y:g,data:T,reset:x}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=g??d,h={...h,[v]:{...h[v],...T}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(c=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:d}=jp(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function Af(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=us(t,e),p=X0(h),v=a[f?d==="floating"?"reference":"floating":d],b=Va(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},x=Va(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(b.top-x.top+p.top)/T.y,bottom:(x.bottom-b.bottom+p.bottom)/T.y,left:(b.left-x.left+p.left)/T.x,right:(x.right-b.right+p.right)/T.x}}const FM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=us(e,t)||{};if(c==null)return{};const d=X0(u),f={x:n,y:r},h=If(o),p=kf(h),m=await i.getDimensions(c),v=h==="y",b=v?"top":"left",y=v?"bottom":"right",g=v?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-f[h]-s.floating[p],x=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const k=T/2-x/2,I=C/2-m[p]/2-1,A=Cn(d[b],I),N=Cn(d[y],I),O=A,L=C-m[p]-N,P=C/2-m[p]/2+k,M=ju(O,P,L),j=!l.arrow&&ds(o)!=null&&P!==M&&s.reference[p]/2-(P<O?A:N)-m[p]/2<0,D=j?P<O?P-O:P-L:0;return{[h]:f[h]+D,data:{[h]:M,centerOffset:P-M-D,...j&&{alignmentOffset:D}},reset:j}}}),VM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=us(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=lr(o),y=Wr(a),g=lr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=f||(g||!m?[Fa(a)]:mM(a)),E=p!=="none";!f&&E&&x.push(...gM(a,m,p,T));const C=[a,...x],k=await Af(t,v),I=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[b]),d){const P=hM(o,i,T);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var N,O;const P=(((N=s.flip)==null?void 0:N.index)||0)+1,M=C[P];if(M)return{data:{index:P,overflows:A},reset:{placement:M}};let j=(O=A.filter(D=>D.overflows[0]<=0).sort((D,V)=>D.overflows[1]-V.overflows[1])[0])==null?void 0:O.placement;if(!j)switch(h){case"bestFit":{var L;const D=(L=A.filter(V=>{if(E){const z=Wr(V.placement);return z===y||z==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(z=>z>0).reduce((z,_)=>z+_,0)]).sort((V,z)=>V[1]-z[1])[0])==null?void 0:L[0];D&&(j=D);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};async function $M(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=lr(n),a=ds(n),l=Wr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=us(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const BM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await $M(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},WM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...l}=us(e,t),c={x:n,y:r},u=await Af(t,l),d=Wr(lr(o)),f=Z0(d);let h=c[f],p=c[d];if(s){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=h+u[v],g=h-u[b];h=ju(y,h,g)}if(i){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=p+u[v],g=p-u[b];p=ju(y,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},zM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=us(e,t),l=await Af(t,a),c=lr(n),u=ds(n),d=Wr(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=h-l.top-l.bottom,b=f-l.left-l.right,y=Cn(h-l[p],v),g=Cn(f-l[m],b),T=!t.middlewareData.shift;let x=y,E=g;if(d?E=u||T?Cn(g,b):b:x=u||T?Cn(y,v):v,T&&!u){const k=Yt(l.left,0),I=Yt(l.right,0),A=Yt(l.top,0),N=Yt(l.bottom,0);d?E=f-2*(k!==0||I!==0?k+I:Yt(l.left,l.right)):x=h-2*(A!==0||N!==0?A+N:Yt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:x});const C=await o.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function nx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ft(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=La(n)!==s||La(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Of(e){return He(e)?e:e.contextElement}function Ro(e){const t=Of(e);if(!ft(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=nx(t);let i=(s?La(n.width):n.width)/r,a=(s?La(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const HM=ar(0);function rx(e){const t=Vt(e);return!Tf()||!t.visualViewport?HM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function zr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Of(e);let i=ar(1);t&&(r?He(r)&&(i=Ro(r)):i=Ro(e));const a=UM(s,n,r)?rx(s):ar(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Vt(s),h=r&&He(r)?Vt(r):r;let p=f,m=Du(p);for(;m&&r&&h!==p;){const v=Ro(m),b=m.getBoundingClientRect(),y=Qt(m),g=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,T=b.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=g,c+=T,p=Vt(m),m=Du(p)}}return Va({width:u,height:d,x:l,y:c})}function GM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Yn(r),a=t?Pl(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1);const u=ar(0),d=ft(r);if((d||!d&&!s)&&((mr(r)!=="body"||Ri(i))&&(l=kl(r)),ft(r))){const f=zr(r);c=Ro(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function YM(e){return Array.from(e.getClientRects())}function ox(e){return zr(Yn(e)).left+kl(e).scrollLeft}function qM(e){const t=Yn(e),n=kl(e),r=e.ownerDocument.body,o=Yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ox(e);const a=-n.scrollTop;return Qt(r).direction==="rtl"&&(i+=Yt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function KM(e,t){const n=Vt(e),r=Yn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Tf();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function ZM(e,t){const n=zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ft(e)?Ro(e):ar(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Lp(e,t,n){let r;if(t==="viewport")r=KM(e,n);else if(t==="document")r=qM(Yn(e));else if(He(t))r=ZM(t,n);else{const o=rx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Va(r)}function sx(e,t){const n=Hn(e);return n===t||!He(n)||ir(n)?!1:Qt(n).position==="fixed"||sx(n,t)}function XM(e,t){const n=t.get(e);if(n)return n;let r=rr(e,[],!1).filter(a=>He(a)&&mr(a)!=="body"),o=null;const s=Qt(e).position==="fixed";let i=s?Hn(e):e;for(;He(i)&&!ir(i);){const a=Qt(i),l=Sf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ri(i)&&!l&&sx(e,i))?r=r.filter(u=>u!==i):o=a,i=Hn(i)}return t.set(e,r),r}function QM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Pl(t)?[]:XM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Lp(t,u,o);return c.top=Yt(d.top,c.top),c.right=Cn(d.right,c.right),c.bottom=Cn(d.bottom,c.bottom),c.left=Yt(d.left,c.left),c},Lp(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function JM(e){const{width:t,height:n}=nx(e);return{width:t,height:n}}function eD(e,t,n){const r=ft(t),o=Yn(t),s=n==="fixed",i=zr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ar(0);if(r||!r&&!s)if((mr(t)!=="body"||Ri(o))&&(a=kl(t)),r){const d=zr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=ox(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function bc(e){return Qt(e).position==="static"}function Fp(e,t){return!ft(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ix(e,t){const n=Vt(e);if(Pl(e))return n;if(!ft(e)){let o=Hn(e);for(;o&&!ir(o);){if(He(o)&&!bc(o))return o;o=Hn(o)}return n}let r=Fp(e,t);for(;r&&sM(r)&&bc(r);)r=Fp(r,t);return r&&ir(r)&&bc(r)&&!Sf(r)?n:r||iM(e)||n}const tD=async function(e){const t=this.getOffsetParent||ix,n=this.getDimensions,r=await n(e.floating);return{reference:eD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nD(e){return Qt(e).direction==="rtl"}const rD={convertOffsetParentRelativeRectToViewportRelativeRect:GM,getDocumentElement:Yn,getClippingRect:QM,getOffsetParent:ix,getElementRects:tD,getClientRects:YM,getDimensions:JM,getScale:Ro,isElement:He,isRTL:nD};function oD(e,t){let n=null,r;const o=Yn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Eo(u),p=Eo(o.clientWidth-(c+d)),m=Eo(o.clientHeight-(u+f)),v=Eo(c),y={rootMargin:-h+"px "+-p+"px "+-m+"px "+-v+"px",threshold:Yt(0,Cn(1,l))||1};let g=!0;function T(x){const E=x[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return i(!0),s}function Pi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Of(e),u=o||s?[...c?rr(c):[],...rr(t)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=c&&a?oD(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(b=>{let[y]=b;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?zr(e):null;l&&v();function v(){const b=zr(e);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&n(),m=b,p=requestAnimationFrame(v)}return n(),()=>{var b;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const sD=BM,iD=WM,aD=VM,lD=zM,Vp=FM,cD=(e,t,n)=>{const r=new Map,o={platform:rD,...n},s={...o.platform,_c:r};return LM(e,t,{...o,platform:s})};var da=typeof document<"u"?w.useLayoutEffect:w.useEffect;function za(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(!za(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!za(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ax(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $p(e,t){const n=ax(e);return Math.round(t*n)/n}function Bp(e){const t=R.useRef(e);return da(()=>{t.current=e}),t}function uD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=R.useState(r);za(f,r)||h(r);const[p,m]=R.useState(null),[v,b]=R.useState(null),y=R.useCallback(D=>{D!==E.current&&(E.current=D,m(D))},[]),g=R.useCallback(D=>{D!==C.current&&(C.current=D,b(D))},[]),T=s||p,x=i||v,E=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=l!=null,A=Bp(l),N=Bp(o),O=R.useCallback(()=>{if(!E.current||!C.current)return;const D={placement:t,strategy:n,middleware:f};N.current&&(D.platform=N.current),cD(E.current,C.current,D).then(V=>{const z={...V,isPositioned:!0};L.current&&!za(k.current,z)&&(k.current=z,gi.flushSync(()=>{d(z)}))})},[f,t,n,N]);da(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[c]);const L=R.useRef(!1);da(()=>(L.current=!0,()=>{L.current=!1}),[]),da(()=>{if(T&&(E.current=T),x&&(C.current=x),T&&x){if(A.current)return A.current(T,x,O);O()}},[T,x,O,A,I]);const P=R.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:g}),[y,g]),M=R.useMemo(()=>({reference:T,floating:x}),[T,x]),j=R.useMemo(()=>{const D={position:n,left:0,top:0};if(!M.floating)return D;const V=$p(M.floating,u.x),z=$p(M.floating,u.y);return a?{...D,transform:"translate("+V+"px, "+z+"px)",...ax(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:z}},[n,a,M.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:O,refs:P,elements:M,floatingStyles:j}),[u,O,P,M,j])}const dD=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?Vp({element:r.current,padding:o}).fn(n):{}:r?Vp({element:r,padding:o}).fn(n):{}}}},ki=(e,t)=>({...sD(e),options:[e,t]}),_f=(e,t)=>({...iD(e),options:[e,t]}),Mf=(e,t)=>({...aD(e),options:[e,t]}),lx=(e,t)=>({...lD(e),options:[e,t]}),cx=(e,t)=>({...dD(e),options:[e,t]});function Vu(e){return R.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const ux={...R},fD=ux.useInsertionEffect,hD=fD||(e=>e());function bt(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hD(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Df="ArrowUp",Ii="ArrowDown",Yo="ArrowLeft",fs="ArrowRight";function Zi(e,t,n){return Math.floor(e/t)!==n}function Bs(e,t){return t<0||t>=e.current.length}function xc(e,t){return _t(e,{disabledIndices:t})}function Wp(e,t){return _t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function _t(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&fa(i,a,o));return a}function mD(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Df){if(u&&kt(n),c===-1)d=l;else if(d=_t(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}Bs(e,d)&&(d=c)}if(n.key===Ii&&(u&&kt(n),c===-1?d=a:(d=_t(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=_t(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Bs(e,d)&&(d=c)),r==="both"){const f=Eo(c/s);n.key===fs&&(u&&kt(n),c%s!==s-1?(d=_t(e,{startingIndex:c,disabledIndices:i}),o&&Zi(d,s,f)&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i})),Zi(d,s,f)&&(d=c)),n.key===Yo&&(u&&kt(n),c%s!==0?(d=_t(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Zi(d,s,f)&&(d=_t(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=_t(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Zi(d,s,f)&&(d=c));const h=Eo(l/s)===f;Bs(e,d)&&(o&&h?d=n.key===Yo?l:_t(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function pD(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function gD(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function yD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function fa(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 zp=0;function Jn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(zp);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():zp=requestAnimationFrame(s)}var Ae=typeof document<"u"?w.useLayoutEffect:w.useEffect;function vD(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function bD(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const dx=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function xD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=R.useState(()=>new Map),i=R.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=R.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ae(()=>{const l=new Map(o);Array.from(l.keys()).sort(vD).forEach((u,d)=>{l.set(u,d)}),bD(o,l)||s(l)},[o]),R.createElement(dx.Provider,{value:R.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function fx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=R.useContext(dx),[a,l]=R.useState(null),c=R.useRef(null),u=R.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return Ae(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ae(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),R.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function qo(){return qo=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},qo.apply(this,arguments)}let Hp=!1,wD=0;const Up=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wD++;function SD(){const[e,t]=R.useState(()=>Hp?Up():void 0);return Ae(()=>{e==null&&t(Up())},[]),R.useEffect(()=>{Hp=!0},[]),e}const TD=ux.useId,hs=TD||SD;let oi;process.env.NODE_ENV!=="production"&&(oi=new Set);function ha(){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=oi)!=null&&e.has(o))){var s;(s=oi)==null||s.add(o),console.warn(o)}}function ED(){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=oi)!=null&&e.has(o))){var s;(s=oi)==null||s.add(o),console.error(o)}}const hx=R.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||ha("The `ref` prop is required for `FloatingArrow`."));const v=hs(),[b,y]=R.useState(!1);if(Ae(()=>{if(!o)return;Qt(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const g=c*2,T=g/2,x=i/2*(l/-8+1),E=a/2*l/4,[C,k]=r.split("-"),I=!!f,A=C==="top"||C==="bottom",N=u&&k==="end"?"bottom":"top";let O=u&&k==="end"?"right":"left";u&&b&&(O=k==="end"?"left":"right");const L=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",M=f||"M0,0"+(" H"+i)+(" L"+(i-x)+","+(a-E))+(" Q"+i/2+","+a+" "+x+","+(a-E))+" Z",j={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",qo({},m,{"aria-hidden":!0,ref:n,width:I?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[O]:L,[N]:P,[C]:A||I?"100%":"calc(100% - "+g/2+"px)",transform:""+j+(h??""),...p}}),g>0&&R.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:M}),R.createElement("path",{stroke:g&&!f?m.fill:"none",d:M}),R.createElement("clipPath",{id:v},R.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function mx(){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 px=R.createContext(null),gx=R.createContext(null),pr=()=>{var e;return((e=R.useContext(px))==null?void 0:e.id)||null},gr=()=>R.useContext(gx);function CD(e){const t=hs(),n=gr(),o=pr();return Ae(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function RD(e){const{children:t,id:n}=e,r=pr();return R.createElement(px.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function PD(e){const{children:t}=e,n=R.useRef([]),r=R.useCallback(i=>{n.current=[...n.current,i]},[]),o=R.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=R.useState(()=>mx())[0];return R.createElement(gx.Provider,{value:R.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function cr(e){return"data-floating-ui-"+e}function It(e){const t=w.useRef(e);return Ae(()=>{t.current=e}),t}const Gp=cr("safe-polygon");function wc(e,t,n){return n&&!Uo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function yx(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=gr(),p=pr(),m=It(c),v=It(l),b=It(n),y=R.useRef(),g=R.useRef(-1),T=R.useRef(),x=R.useRef(-1),E=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),I=R.useCallback(()=>{var M;const j=(M=o.current.openEvent)==null?void 0:M.type;return(j==null?void 0:j.includes("mouse"))&&j!=="mousedown"},[o]);R.useEffect(()=>{if(!a)return;function M(j){let{open:D}=j;D||(clearTimeout(g.current),clearTimeout(x.current),E.current=!0)}return s.on("openchange",M),()=>{s.off("openchange",M)}},[a,s]),R.useEffect(()=>{if(!a||!m.current||!n)return;function M(D){I()&&r(!1,D,"hover")}const j=St(i.floating).documentElement;return j.addEventListener("mouseleave",M),()=>{j.removeEventListener("mouseleave",M)}},[i.floating,n,r,a,m,I]);const A=R.useCallback(function(M,j,D){j===void 0&&(j=!0),D===void 0&&(D="hover");const V=wc(v.current,"close",y.current);V&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,M,D),V)):j&&(clearTimeout(g.current),r(!1,M,D))},[v,r]),N=bt(()=>{k.current(),T.current=void 0}),O=bt(()=>{if(C.current){const M=St(i.floating).body;M.style.pointerEvents="",M.removeAttribute(Gp),C.current=!1}});R.useEffect(()=>{if(!a)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function j(_){if(clearTimeout(g.current),E.current=!1,u&&!Uo(y.current)||d>0&&!wc(v.current,"open"))return;const $=wc(v.current,"open",y.current);$?g.current=window.setTimeout(()=>{b.current||r(!0,_,"hover")},$):r(!0,_,"hover")}function D(_){if(M())return;k.current();const $=St(i.floating);if(clearTimeout(x.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){O(),N(),A(_,!0,"safe-polygon")}});const re=T.current;$.addEventListener("mousemove",re),k.current=()=>{$.removeEventListener("mousemove",re)};return}(y.current==="touch"?!it(i.floating,_.relatedTarget):!0)&&A(_)}function V(_){M()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){O(),N(),A(_)}})(_))}if(He(i.domReference)){var z;const _=i.domReference;return n&&_.addEventListener("mouseleave",V),(z=i.floating)==null||z.addEventListener("mouseleave",V),f&&_.addEventListener("mousemove",j,{once:!0}),_.addEventListener("mouseenter",j),_.addEventListener("mouseleave",D),()=>{var $;n&&_.removeEventListener("mouseleave",V),($=i.floating)==null||$.removeEventListener("mouseleave",V),f&&_.removeEventListener("mousemove",j),_.removeEventListener("mouseenter",j),_.removeEventListener("mouseleave",D)}}},[i,a,e,u,d,f,A,N,O,r,n,b,h,v,m,o]),Ae(()=>{var M;if(a&&n&&(M=m.current)!=null&&M.__options.blockPointerEvents&&I()){const D=St(i.floating).body;D.setAttribute(Gp,""),D.style.pointerEvents="none",C.current=!0;const V=i.floating;if(He(i.domReference)&&V){var j;const z=i.domReference,_=h==null||(j=h.nodesRef.current.find($=>$.id===p))==null||(j=j.context)==null?void 0:j.elements.floating;return _&&(_.style.pointerEvents=""),z.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{z.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,p,i,h,m,I]),Ae(()=>{n||(y.current=void 0,N(),O())},[n,N,O]),R.useEffect(()=>()=>{N(),clearTimeout(g.current),clearTimeout(x.current),O()},[a,i.domReference,N,O]);const L=R.useMemo(()=>{function M(j){y.current=j.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(j){const{nativeEvent:D}=j;function V(){!E.current&&!b.current&&r(!0,D,"hover")}u&&!Uo(y.current)||n||d===0||(clearTimeout(x.current),y.current==="touch"?V():x.current=window.setTimeout(V,d))}}},[u,r,n,b,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(M){A(M.nativeEvent,!1)}}),[A]);return R.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function kD(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Fr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function ID(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Fr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let co=new WeakMap,Xi=new WeakSet,Qi={},Sc=0;const AD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,vx=e=>e&&(e.host||vx(e.parentNode)),OD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=vx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function _D(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=OD(t,e),a=new Set,l=new Set(i),c=[];Qi[o]||(Qi[o]=new WeakMap);const u=Qi[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(mr(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,v=m!==null&&m!=="false",b=(co.get(p)||0)+1,y=(u.get(p)||0)+1;co.set(p,b),u.set(p,y),c.push(p),b===1&&v&&Xi.add(p),y===1&&p.setAttribute(o,""),!v&&s&&p.setAttribute(s,"true")}})}return Sc++,()=>{c.forEach(h=>{const p=(co.get(h)||0)-1,m=(u.get(h)||0)-1;co.set(h,p),u.set(h,m),p||(!Xi.has(h)&&s&&h.removeAttribute(s),Xi.delete(h)),m||h.removeAttribute(o)}),Sc--,Sc||(co=new WeakMap,co=new WeakMap,Xi=new WeakSet,Qi={})}}function Yp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=St(e[0]).body;return _D(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ko=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function bx(e,t){const n=ri(e,Ko());t==="prev"&&n.reverse();const r=n.indexOf(ln(St(e)));return n.slice(r+1)[0]}function xx(){return bx(document.body,"next")}function wx(){return bx(document.body,"prev")}function Ws(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!it(n,r)}function MD(e){ri(e,Ko()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function DD(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 ND(e,t,n){const r=e.indexOf(t);function o(i){const a=cr("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||it(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Nf={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 jD;function qp(e){e.key==="Tab"&&(e.target,clearTimeout(jD))}const Ha=R.forwardRef(function(t,n){const[r,o]=R.useState();Ae(()=>(Rf()&&o("button"),document.addEventListener("keydown",qp),()=>{document.removeEventListener("keydown",qp)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[cr("focus-guard")]:"",style:Nf};return R.createElement("span",qo({},t,s))}),Sx=R.createContext(null),Kp=cr("portal");function LD(e){e===void 0&&(e={});const{id:t,root:n}=e,r=hs(),o=Tx(),[s,i]=R.useState(null),a=R.useRef(null);return Ae(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ae(()=>{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(Kp,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Ae(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!He(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(Kp,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Zr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=LD({id:n,root:r}),[i,a]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return R.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Ws(p)&&(p.type==="focusin"?DD:MD)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),R.createElement(Sx.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&R.createElement(Ha,{"data-type":"outside",ref:l,onFocus:h=>{if(Ws(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=wx()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&R.createElement("span",{"aria-owns":s.id,style:Nf}),s&&gi.createPortal(t,s),f&&s&&R.createElement(Ha,{"data-type":"outside",ref:c,onFocus:h=>{if(Ws(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=xx()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Tx=()=>R.useContext(Sx),Zp=20;let Rr=[];function Tc(e){Rr=Rr.filter(n=>n.isConnected);let t=e;if(!(!t||mr(t)==="body")){if(!jM(t,Ko())){const n=ri(t,Ko())[0];n&&(t=n)}Rr.push(t),Rr.length>Zp&&(Rr=Rr.slice(-Zp))}}function Xp(){return Rr.slice().reverse().find(e=>e.isConnected)}const FD=R.forwardRef(function(t,n){return R.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:Nf}))});function ms(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:v,dataRef:b,floatingId:y,elements:{domReference:g,floating:T}}=t,x=typeof i=="number"&&i<0,E=K0(g)&&x,C=AD()?s:!0,k=It(o),I=It(i),A=It(a),N=gr(),O=Tx(),L=R.useRef(null),P=R.useRef(null),M=R.useRef(!1),j=R.useRef(!1),D=R.useRef(-1),V=O!=null,z=T==null?void 0:T.firstElementChild,_=(z==null?void 0:z.id)===y?z:T,$=bt(function(G){return G===void 0&&(G=_),G?ri(G,Ko()):[]}),Z=bt(G=>{const F=$(G);return k.current.map(B=>g&&B==="reference"?g:_&&B==="floating"?_:F).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){it(_,ln(St(_)))&&$().length===0&&!E&&kt(B);const H=Z(),Y=Tn(B);k.current[0]==="reference"&&Y===g&&(kt(B),B.shiftKey?Jn(H[H.length-1]):Jn(H[1])),k.current[1]==="floating"&&Y===_&&B.shiftKey&&(kt(B),Jn(H[0]))}}const F=St(_);return F.addEventListener("keydown",G),()=>{F.removeEventListener("keydown",G)}},[r,g,_,c,k,E,$,Z]),R.useEffect(()=>{if(r||!T)return;function G(F){const B=Tn(F),Y=$().indexOf(B);Y!==-1&&(D.current=Y)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,$]),R.useEffect(()=>{if(r||!d)return;function G(){j.current=!0,setTimeout(()=>{j.current=!1})}function F(B){const H=B.relatedTarget;queueMicrotask(()=>{const Y=!(it(g,H)||it(T,H)||it(H,T)||it(O==null?void 0:O.portalNode,H)||H!=null&&H.hasAttribute(cr("focus-guard"))||N&&(Fr(N.nodesRef.current,p).find(Q=>{var ue,U;return it((ue=Q.context)==null?void 0:ue.elements.floating,H)||it((U=Q.context)==null?void 0:U.elements.domReference,H)})||kD(N.nodesRef.current,p).find(Q=>{var ue,U;return((ue=Q.context)==null?void 0:ue.elements.floating)===H||((U=Q.context)==null?void 0:U.elements.domReference)===H})));if(l&&Y&&ln(St(_))===St(_).body){ft(_)&&(_==null||_.focus());const Q=D.current,ue=$(),U=ue[Q]||ue[ue.length-1]||_;ft(U)&&U.focus()}(E||!c)&&H&&Y&&!j.current&&H!==Xp()&&(M.current=!0,m(!1,B))})}if(T&&ft(g))return g.addEventListener("focusout",F),g.addEventListener("pointerdown",G),T.addEventListener("focusout",F),()=>{g.removeEventListener("focusout",F),g.removeEventListener("pointerdown",G),T.removeEventListener("focusout",F)}},[r,g,T,_,c,p,N,O,m,d,l,$,E]),R.useEffect(()=>{var G;if(r)return;const F=Array.from((O==null||(G=O.portalNode)==null?void 0:G.querySelectorAll("["+cr("portal")+"]"))||[]);if(T){const B=[T,...F,L.current,P.current,k.current.includes("reference")||E?g:null].filter(Y=>Y!=null),H=c||E?Yp(B,C,!C):Yp(B);return()=>{H()}}},[r,g,T,c,k,O,E,C]),Ae(()=>{if(r||!ft(_))return;const G=St(_),F=ln(G);queueMicrotask(()=>{const B=Z(_),H=I.current,Y=(typeof H=="number"?B[H]:H.current)||_,Q=it(_,F);!x&&!Q&&f&&Jn(Y,{preventScroll:Y===_})})},[r,f,_,x,Z,I]),Ae(()=>{if(r||!_)return;let G=!1;const F=St(_),B=ln(F);let Y=b.current.openEvent;const Q=h.domReference.current;Tc(B);function ue(U){let{open:ke,reason:qe,event:Le,nested:Te}=U;ke&&(Y=Le),qe==="escape-key"&&h.domReference.current&&Tc(h.domReference.current),qe==="hover"&&Le.type==="mouseleave"&&(M.current=!0),qe==="outside-press"&&(Te?(M.current=!1,G=!0):M.current=!(Y0(Le)||Cf(Le)))}return v.on("openchange",ue),()=>{v.off("openchange",ue);const U=ln(F),ke=it(T,U)||N&&Fr(N.nodesRef.current,p).some(q=>{var se;return it((se=q.context)==null?void 0:se.elements.floating,U)});(ke||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&Tc(h.domReference.current);const Le=Q||B,Te=ri(St(Le).body,Ko());queueMicrotask(()=>{let q=Xp();!q&&ft(Le)&&T&&(q=ND(Te,Le,T)),A.current&&!M.current&&ft(q)&&(!(q!==U&&U!==F.body)||ke)&&q.focus({preventScroll:G})})}},[r,T,_,A,b,h,v,N,p]),Ae(()=>{if(!r&&O)return O.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{O.setFocusManagerState(null)}},[r,O,c,f,m,h,d]),Ae(()=>{if(r||!_||typeof MutationObserver!="function"||x)return;const G=()=>{const B=_.getAttribute("tabindex"),H=$(),Y=ln(St(T)),Q=H.indexOf(Y);Q!==-1&&(D.current=Q),k.current.includes("floating")||Y!==h.domReference.current&&H.length===0?B!=="0"&&_.setAttribute("tabindex","0"):B!=="-1"&&_.setAttribute("tabindex","-1")};G();const F=new MutationObserver(G);return F.observe(_,{childList:!0,subtree:!0,attributes:!0}),()=>{F.disconnect()}},[r,T,_,h,k,$,x]);function re(G){return r||!u||!c?null:R.createElement(FD,{ref:G==="start"?L:P,onClick:F=>m(!1,F.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!E:!0)&&(V||c);return R.createElement(R.Fragment,null,ee&&R.createElement(Ha,{"data-type":"inside",ref:O==null?void 0:O.beforeInsideRef,onFocus:G=>{if(c){const B=Z();Jn(o[0]==="reference"?B[0]:B[B.length-1])}else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(M.current=!1,Ws(G,O.portalNode)){const B=xx()||g;B==null||B.focus()}else{var F;(F=O.beforeOutsideRef.current)==null||F.focus()}}}),!E&&re("start"),n,re("end"),ee&&R.createElement(Ha,{"data-type":"inside",ref:O==null?void 0:O.afterInsideRef,onFocus:G=>{if(c)Jn(Z()[0]);else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(d&&(M.current=!0),Ws(G,O.portalNode)){const B=wx()||g;B==null||B.focus()}else{var F;(F=O.afterOutsideRef.current)==null||F.focus()}}}))}const Ec=new Set,VD=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=hs();return Ae(()=>{if(!r)return;Ec.add(s);const i=/iP(hone|ad|od)|iOS/.test(Ef()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Ec.delete(s),Ec.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),R.createElement("div",qo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Qp(e){return ft(e.target)&&e.target.tagName==="BUTTON"}function Jp(e){return Pf(e)}function Ai(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=R.useRef(),f=R.useRef(!1),h=R.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Uo(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}Uo(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||Qp(p))&&(p.key===" "&&!Jp(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Qp(p)||Jp(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return R.useMemo(()=>i?{reference:h}:{},[i,h])}function $D(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,d=i.height,f=i.x,h=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function eg(e){return e!=null&&e.clientX!=null}function BD(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=R.useRef(!1),f=R.useRef(null),[h,p]=R.useState(),[m,v]=R.useState([]),b=bt((E,C)=>{d.current||r.current.openEvent&&!eg(r.current.openEvent)||i.setPositionReference($D(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),y=bt(E=>{c!=null||u!=null||(n?f.current||v([]):b(E.clientX,E.clientY))}),g=Uo(h)?o:n,T=R.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Vt(o);function C(k){const I=Tn(k);it(o,I)?(E.removeEventListener("mousemove",C),f.current=null):b(k.clientX,k.clientY)}if(!r.current.openEvent||eg(r.current.openEvent)){E.addEventListener("mousemove",C);const k=()=>{E.removeEventListener("mousemove",C),f.current=null};return f.current=k,k}i.setPositionReference(s)},[g,a,c,u,o,r,i,s,b]);R.useEffect(()=>T(),[T,m]),R.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),R.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),Ae(()=>{a&&(c!=null||u!=null)&&(d.current=!1,b(c,u))},[a,c,u,b]);const x=R.useMemo(()=>{function E(C){let{pointerType:k}=C;p(k)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return R.useMemo(()=>a?{reference:x}:{},[a,x])}const WD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},zD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tg=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 Xr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=gr(),v=bt(typeof l=="function"?l:()=>!1),b=typeof l=="function"?v:l,y=R.useRef(!1),g=R.useRef(!1),{escapeKey:T,outsidePress:x}=tg(h),{escapeKey:E,outsidePress:C}=tg(p),k=bt(P=>{var M;if(!n||!i||!a||P.key!=="Escape")return;const j=(M=s.current.floatingContext)==null?void 0:M.nodeId,D=m?Fr(m.nodesRef.current,j):[];if(!T&&(P.stopPropagation(),D.length>0)){let V=!0;if(D.forEach(z=>{var _;if((_=z.context)!=null&&_.open&&!z.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,lM(P)?P.nativeEvent:P,"escape-key")}),I=bt(P=>{var M;const j=()=>{var D;k(P),(D=Tn(P))==null||D.removeEventListener("keydown",j)};(M=Tn(P))==null||M.addEventListener("keydown",j)}),A=bt(P=>{var M;const j=y.current;y.current=!1;const D=g.current;if(g.current=!1,c==="click"&&D||j||typeof b=="function"&&!b(P))return;const V=Tn(P),z="["+cr("inert")+"]",_=St(o.floating).querySelectorAll(z);let $=He(V)?V:null;for(;$&&!ir($);){const G=Hn($);if(ir(G)||!He(G))break;$=G}if(_.length&&He(V)&&!cM(V)&&!it(V,o.floating)&&Array.from(_).every(G=>!it($,G)))return;if(ft(V)&&L){const G=V.clientWidth>0&&V.scrollWidth>V.clientWidth,F=V.clientHeight>0&&V.scrollHeight>V.clientHeight;let B=F&&P.offsetX>V.clientWidth;if(F&&Qt(V).direction==="rtl"&&(B=P.offsetX<=V.offsetWidth-V.clientWidth),B||G&&P.offsetY>V.clientHeight)return}const Z=(M=s.current.floatingContext)==null?void 0:M.nodeId,re=m&&Fr(m.nodesRef.current,Z).some(G=>{var F;return vc(P,(F=G.context)==null?void 0:F.elements.floating)});if(vc(P,o.floating)||vc(P,o.domReference)||re)return;const ee=m?Fr(m.nodesRef.current,Z):[];if(ee.length>0){let G=!0;if(ee.forEach(F=>{var B;if((B=F.context)!=null&&B.open&&!F.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),N=bt(P=>{var M;const j=()=>{var D;A(P),(D=Tn(P))==null||D.removeEventListener(c,j)};(M=Tn(P))==null||M.addEventListener(c,j)});R.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=x;function P(D){r(!1,D,"ancestor-scroll")}const M=St(o.floating);a&&M.addEventListener("keydown",E?I:k,E),b&&M.addEventListener(c,C?N:A,C);let j=[];return f&&(He(o.domReference)&&(j=rr(o.domReference)),He(o.floating)&&(j=j.concat(rr(o.floating))),!He(o.reference)&&o.reference&&o.reference.contextElement&&(j=j.concat(rr(o.reference.contextElement)))),j=j.filter(D=>{var V;return D!==((V=M.defaultView)==null?void 0:V.visualViewport)}),j.forEach(D=>{D.addEventListener("scroll",P,{passive:!0})}),()=>{a&&M.removeEventListener("keydown",E?I:k,E),b&&M.removeEventListener(c,C?N:A,C),j.forEach(D=>{D.removeEventListener("scroll",P)})}},[s,o,a,b,c,n,r,f,i,T,x,k,E,I,A,C,N]),R.useEffect(()=>{y.current=!1},[b,c]);const O=R.useMemo(()=>({onKeyDown:k,[WD[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),L=R.useMemo(()=>({onKeyDown:k,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[zD[c]]:()=>{y.current=!0}}),[k,c]);return R.useMemo(()=>i?{reference:O,floating:L}:{},[i,O,L])}function HD(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=hs(),s=R.useRef({}),[i]=R.useState(()=>mx()),a=pr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!He(h)&&ED("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=R.useState(r.reference),u=bt((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=R.useMemo(()=>({setPositionReference:c}),[]),f=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Qr(e){e===void 0&&(e={});const{nodeId:t}=e,n=HD({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=R.useState(null),[a,l]=R.useState(null),u=(o==null?void 0:o.reference)||s,d=R.useRef(null),f=gr();Ae(()=>{u&&(d.current=u)},[u]);const h=uD({...e,elements:{...o,...a&&{reference:a}}}),p=R.useCallback(g=>{const T=He(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=R.useCallback(g=>{(He(g)||g===null)&&(d.current=g,i(g)),(He(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!He(g))&&h.refs.setReference(g)},[h.refs]),v=R.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),b=R.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),y=R.useMemo(()=>({...h,...r,refs:v,elements:b,nodeId:t}),[h,v,b,t,r]);return Ae(()=>{r.dataRef.current.floatingContext=y;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=y)}),R.useMemo(()=>({...h,context:y,refs:v,elements:b}),[h,v,b,y])}function UD(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=R.useRef(!1),u=R.useRef(),d=R.useRef(!0);R.useEffect(()=>{if(!a)return;const h=Vt(i.domReference);function p(){!n&&ft(i.domReference)&&i.domReference===ln(St(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),R.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=R.useMemo(()=>({onPointerDown(h){Cf(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Tn(h.nativeEvent);if(l&&He(p))try{if(Rf()&&q0())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Pf(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,v=He(p)&&p.hasAttribute(cr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var b;const y=ln(i.domReference?i.domReference.ownerDocument:document);!p&&y===i.domReference||it((b=s.current.floatingContext)==null?void 0:b.refs.floating.current,y)||it(i.domReference,y)||v||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}const ng="active",rg="selected";function Cc(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[ng]:i,[rg]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[ng,rg].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(v=>v(...p)).find(v=>v!==void 0)}}}else i[c]=u}),i),{})}}function Jr(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=R.useCallback(a=>Cc(a,e,"reference"),t),s=R.useCallback(a=>Cc(a,e,"floating"),n),i=R.useCallback(a=>Cc(a,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let og=!1;function Il(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function sg(e,t){return Il(t,e===Df||e===Ii,e===Yo||e===fs)}function Rc(e,t,n){return Il(t,e===Ii,n?e===Yo:e===fs)||e==="Enter"||e===" "||e===""}function GD(e,t,n){return Il(t,n?e===Yo:e===fs,e===Ii)}function ig(e,t,n){return Il(t,n?e===fs:e===Yo,e===Df)}function jf(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:y=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:x=!0,virtualItemRef:E,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||ha("`useListNavigation` looping must be enabled to allow escaping."),p||ha("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&ha("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=pr(),A=gr(),N=bt(a),O=R.useRef(m),L=R.useRef(c??-1),P=R.useRef(null),M=R.useRef(!0),j=R.useRef(N),D=R.useRef(!!o.floating),V=R.useRef(n),z=R.useRef(!1),_=R.useRef(!1),$=It(y),Z=It(n),re=It(x),ee=It(o.floating),G=It(c),[F,B]=R.useState(),[H,Y]=R.useState(),Q=bt(function(q,se,W){W===void 0&&(W=!1);function J(ce){p?(B(ce.id),A==null||A.events.emit("virtualfocus",ce),E&&(E.current=ce)):Jn(ce,{preventScroll:!0,sync:q0()&&Rf()?og||z.current:!1})}const pe=q.current[se.current];pe&&J(pe),requestAnimationFrame(()=>{const ce=q.current[se.current]||pe;if(!ce)return;pe||J(ce);const Fe=re.current;Fe&&U&&(W||!M.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof Fe=="boolean"?{block:"nearest",inline:"nearest"}:Fe))})});Ae(()=>{document.createElement("div").focus({get preventScroll(){return og=!0,!1}})},[]),Ae(()=>{l&&(n&&o.floating?O.current&&c!=null&&(_.current=!0,L.current=c,N(c)):D.current&&(L.current=-1,j.current(null)))},[l,n,o.floating,c,N]),Ae(()=>{if(l&&n&&o.floating)if(i==null){if(z.current=!1,G.current!=null)return;if(D.current&&(L.current=-1,Q(s,L)),(!V.current||!D.current)&&O.current&&(P.current!=null||O.current===!0&&P.current==null)){let q=0;const se=()=>{s.current[0]==null?(q<2&&(q?requestAnimationFrame:queueMicrotask)(se),q++):(L.current=P.current==null||Rc(P.current,g,h)||f?xc(s,$.current):Wp(s,$.current),P.current=null,N(L.current))};se()}}else Bs(s,i)||(L.current=i,Q(s,L,_.current),_.current=!1)},[l,n,o.floating,i,G,f,s,g,h,N,Q,$]),Ae(()=>{var q;if(!l||o.floating||!A||p||!D.current)return;const se=A.nodesRef.current,W=(q=se.find(ce=>ce.id===I))==null||(q=q.context)==null?void 0:q.elements.floating,J=ln(St(o.floating)),pe=se.some(ce=>ce.context&&it(ce.context.elements.floating,J));W&&!pe&&M.current&&W.focus({preventScroll:!0})},[l,o.floating,A,I,p]),Ae(()=>{if(!l||!A||!p||I)return;function q(se){Y(se.id),E&&(E.current=se)}return A.events.on("virtualfocus",q),()=>{A.events.off("virtualfocus",q)}},[l,A,p,I,E]),Ae(()=>{j.current=N,D.current=!!o.floating}),Ae(()=>{n||(P.current=null)},[n]),Ae(()=>{V.current=n},[n]);const ue=i!=null,U=R.useMemo(()=>{function q(W){if(!n)return;const J=s.current.indexOf(W);J!==-1&&N(J)}return{onFocus(W){let{currentTarget:J}=W;q(J)},onClick:W=>{let{currentTarget:J}=W;return J.focus({preventScroll:!0})},...v&&{onMouseMove(W){let{currentTarget:J}=W;q(J)},onPointerLeave(W){let{pointerType:J}=W;!M.current||J==="touch"||(L.current=-1,Q(s,L),N(null),p||Jn(ee.current,{preventScroll:!0}))}}}},[n,ee,Q,v,s,N,p]),ke=bt(q=>{if(M.current=!1,z.current=!0,!Z.current&&q.currentTarget===ee.current)return;if(f&&ig(q.key,g,h)){kt(q),r(!1,q.nativeEvent,"list-navigation"),ft(o.domReference)&&!p&&o.domReference.focus();return}const se=L.current,W=xc(s,y),J=Wp(s,y);if(q.key==="Home"&&(kt(q),L.current=W,N(L.current)),q.key==="End"&&(kt(q),L.current=J,N(L.current)),T>1){const pe=C||Array.from({length:s.current.length},()=>({width:1,height:1})),ce=pD(pe,T,k),Fe=ce.findIndex(ie=>ie!=null&&!fa(s.current,ie,y)),te=ce.reduce((ie,_e,Ke)=>_e!=null&&!fa(s.current,_e,y)?Ke:ie,-1);if(L.current=ce[mD({current:ce.map(ie=>ie!=null?s.current[ie]:null)},{event:q,orientation:g,loop:d,cols:T,disabledIndices:yD([...y||s.current.map((ie,_e)=>fa(s.current,_e)?_e:void 0),void 0],ce),minIndex:Fe,maxIndex:te,prevIndex:gD(L.current>J?W:L.current,pe,ce,T,q.key===Ii?"bl":q.key===fs?"tr":"tl"),stopEvent:!0})],N(L.current),g==="both")return}if(sg(q.key,g)){if(kt(q),n&&!p&&ln(q.currentTarget.ownerDocument)===q.currentTarget){L.current=Rc(q.key,g,h)?W:J,N(L.current);return}Rc(q.key,g,h)?d?L.current=se>=J?u&&se!==s.current.length?-1:W:_t(s,{startingIndex:se,disabledIndices:y}):L.current=Math.min(J,_t(s,{startingIndex:se,disabledIndices:y})):d?L.current=se<=W?u&&se!==-1?s.current.length:J:_t(s,{startingIndex:se,decrement:!0,disabledIndices:y}):L.current=Math.max(W,_t(s,{startingIndex:se,decrement:!0,disabledIndices:y})),Bs(s,L.current)?N(null):N(L.current)}}),qe=R.useMemo(()=>p&&n&&ue&&{"aria-activedescendant":H||F},[p,n,ue,H,F]),Le=R.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!K0(o.domReference)&&qe,onKeyDown:ke,onPointerMove(){M.current=!0}}),[qe,ke,o.domReference,g]),Te=R.useMemo(()=>{function q(W){m==="auto"&&Y0(W.nativeEvent)&&(O.current=!0)}function se(W){O.current=m,m==="auto"&&Cf(W.nativeEvent)&&(O.current=!0)}return{...qe,onKeyDown(W){M.current=!1;const J=W.key.indexOf("Arrow")===0,pe=GD(W.key,g,h),ce=ig(W.key,g,h),Fe=sg(W.key,g),te=(f?pe:Fe)||W.key==="Enter"||W.key.trim()==="";if(p&&n){const Ct=A==null?void 0:A.nodesRef.current.find(Lt=>Lt.parentId==null),At=A&&Ct?ID(A.nodesRef.current,Ct.id):null;if(J&&At&&E){const Lt=new KeyboardEvent("keydown",{key:W.key,bubbles:!0});if(pe||ce){var ie,_e;const xr=((ie=At.context)==null?void 0:ie.elements.domReference)===W.currentTarget,ro=ce&&!xr?(_e=At.context)==null?void 0:_e.elements.domReference:pe?s.current.find(oo=>(oo==null?void 0:oo.id)===F):null;ro&&(kt(W),ro.dispatchEvent(Lt),Y(void 0))}if(Fe&&At.context&&At.context.open&&At.parentId&&W.currentTarget!==At.context.elements.domReference){var Ke;kt(W),(Ke=At.context.elements.domReference)==null||Ke.dispatchEvent(Lt);return}}return ke(W)}if(!(!n&&!b&&J)){if(te&&(P.current=f&&Fe?null:W.key),f){pe&&(kt(W),n?(L.current=xc(s,$.current),N(L.current)):r(!0,W.nativeEvent,"list-navigation"));return}Fe&&(c!=null&&(L.current=c),kt(W),!n&&b?r(!0,W.nativeEvent,"list-navigation"):ke(W),n&&N(L.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:se,onMouseDown:q,onClick:q}},[F,qe,ke,$,m,s,f,N,r,n,b,g,h,c,A,p,E]);return R.useMemo(()=>l?{reference:Te,floating:Le,item:U}:{},[l,Te,Le,U])}const YD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function eo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=YD.get(i))!=null?n:i,l=hs(),u=pr()!=null,d=R.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),f=R.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=R.useCallback(p=>{let{active:m,selected:v}=p;const b={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...b,"aria-selected":m&&v};case"combobox":return{...b,...m&&{"aria-selected":!0}}}return{}},[o,i]);return R.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const ag=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function uo(e,t){return typeof e=="function"?e(t):e}function qD(e,t){const[n,r]=R.useState(e);return e&&!n&&r(!0),R.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function KD(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=R.useState("unmounted"),c=qD(n,i);return!c&&a==="close"&&l("unmounted"),Ae(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Ex(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=R.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=R.useState(()=>({...uo(s,c),...uo(n,c)})),{isMounted:m,status:v}=KD(e,{duration:i}),b=It(n),y=It(r),g=It(o),T=It(s);return Ae(()=>{const x=uo(b.current,c),E=uo(g.current,c),C=uo(T.current,c),k=uo(y.current,c)||Object.keys(x).reduce((I,A)=>(I[A]="",I),{});if(v==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...x})),v==="open"&&p({transitionProperty:Object.keys(k).map(ag).join(","),transitionDuration:d+"ms",...C,...k}),v==="close"){const I=E||x;p({transitionProperty:Object.keys(I).map(ag).join(","),transitionDuration:f+"ms",...C,...I})}},[f,g,b,y,T,d,v,c]),{isMounted:m,styles:h}}function ZD(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=R.useRef(),m=R.useRef(""),v=R.useRef((n=h??i)!=null?n:-1),b=R.useRef(null),y=bt(a),g=bt(l),T=It(u),x=It(f);Ae(()=>{r&&(clearTimeout(p.current),b.current=null,m.current="")},[r]),Ae(()=>{if(r&&m.current===""){var A;v.current=(A=h??i)!=null?A:-1}},[r,h,i]);const E=bt(A=>{A?o.current.typing||(o.current.typing=A,g(A)):o.current.typing&&(o.current.typing=A,g(A))}),C=bt(A=>{function N(j,D,V){const z=T.current?T.current(D,V):D.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))===0);return z?j.indexOf(z):-1}const O=s.current;if(m.current.length>0&&m.current[0]!==" "&&(N(O,O,m.current)===-1?E(!1):A.key===" "&&kt(A)),O==null||x.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(kt(A),E(!0)),O.every(j=>{var D,V;return j?((D=j[0])==null?void 0:D.toLocaleLowerCase())!==((V=j[1])==null?void 0:V.toLocaleLowerCase()):!0})&&m.current===A.key&&(m.current="",v.current=b.current),m.current+=A.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=b.current,E(!1)},d);const P=v.current,M=N(O,[...O.slice((P||0)+1),...O.slice(0,(P||0)+1)],m.current);M!==-1?(y(M),b.current=M):A.key!==" "&&(m.current="",E(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),I=R.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&E(!1)}}),[C,E]);return R.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function lg(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function XD(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Cx(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,v=f-a,y=Math.sqrt(m*m+v*v)/p;return i=d,a=f,l=h,y}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:v,nodeId:b,tree:y}=d;return function(T){function x(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:C}=T,k=[E,C],I=Tn(T),A=T.type==="mouseleave",N=it(m.floating,I),O=it(m.domReference,I),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),M=p.split("-")[0],j=f>P.right-P.width/2,D=h>P.bottom-P.height/2,V=XD(k,L),z=P.width>L.width,_=P.height>L.height,$=(z?L:P).left,Z=(z?L:P).right,re=(_?L:P).top,ee=(_?L:P).bottom;if(N&&(s=!0,!A))return;if(O&&(s=!1),O&&!A){s=!0;return}if(A&&He(T.relatedTarget)&&it(m.floating,T.relatedTarget)||y&&Fr(y.nodesRef.current,b).some(B=>{let{context:H}=B;return H==null?void 0:H.open}))return;if(M==="top"&&h>=L.bottom-1||M==="bottom"&&h<=L.top+1||M==="left"&&f>=L.right-1||M==="right"&&f<=L.left+1)return x();let G=[];switch(M){case"top":G=[[$,L.top+1],[$,P.bottom-1],[Z,P.bottom-1],[Z,L.top+1]];break;case"bottom":G=[[$,P.top+1],[$,L.bottom-1],[Z,L.bottom-1],[Z,P.top+1]];break;case"left":G=[[P.right-1,ee],[P.right-1,re],[L.left+1,re],[L.left+1,ee]];break;case"right":G=[[L.right-1,ee],[L.right-1,re],[P.left+1,re],[P.left+1,ee]];break}function F(B){let[H,Y]=B;switch(M){case"top":{const Q=[z?H+t/2:j?H+t*4:H-t*4,Y+t+1],ue=[z?H-t/2:j?H+t*4:H-t*4,Y+t+1],U=[[P.left,j||z?P.bottom-t:P.top],[P.right,j?z?P.bottom-t:P.top:P.bottom-t]];return[Q,ue,...U]}case"bottom":{const Q=[z?H+t/2:j?H+t*4:H-t*4,Y-t],ue=[z?H-t/2:j?H+t*4:H-t*4,Y-t],U=[[P.left,j||z?P.top+t:P.bottom],[P.right,j?z?P.top+t:P.bottom:P.top+t]];return[Q,ue,...U]}case"left":{const Q=[H+t+1,_?Y+t/2:D?Y+t*4:Y-t*4],ue=[H+t+1,_?Y-t/2:D?Y+t*4:Y-t*4];return[...[[D||_?P.right-t:P.left,P.top],[D?_?P.right-t:P.left:P.right-t,P.bottom]],Q,ue]}case"right":{const Q=[H-t,_?Y+t/2:D?Y+t*4:Y-t*4],ue=[H-t,_?Y-t/2:D?Y+t*4:Y-t*4],U=[[D||_?P.left+t:P.right,P.top],[D?_?P.left+t:P.right:P.left+t,P.bottom]];return[Q,ue,...U]}}}if(!lg([E,C],G)){if(s&&!V)return x();if(!A&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return x()}lg([E,C],F([f,h]))?!s&&r&&(o=window.setTimeout(x,40)):x()}}};return u.__options={blockPointerEvents:n},u}const ps=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[ki(10),Mf({fallbackAxisSideDirection:"end"}),_f(),cx({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Qr({open:n,middleware:s,transform:!0,whileElementsMounted:Pi,onOpenChange:(p,m)=>{var b;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(b=e.onChange)==null||b.call(e,p))}}),c=Ai(l),u=Xr(l),d=eo(l),{getReferenceProps:f,getFloatingProps:h}=Jr([c,u,d]);return S.jsxs(w.Fragment,{children:[S.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&S.jsx(Zr,{preserveTabOrder:!0,id:`${t}-portal`,children:S.jsx(ms,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:S.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[S.jsx(hx,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),S.jsx("header",{className:"mb-2",children:S.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},QD=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=Qr({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=Ai(a),u=eo(a),d=Xr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Jr([c,u,d]);return S.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[S.jsx(jo,{...h(e),as:lt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:S.jsx(lt.span,{layoutId:o,children:e.trigger})}),S.jsx(fr,{children:s?S.jsx(Zr,{root:t,children:S.jsx(ms,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:S.jsx(lt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Rx=300,JD=500,Px=(e="")=>Me("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),$u=w.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),cg=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const[l,c]=w.useState(!1),[u,d]=w.useState(!1),[f,h]=w.useState(null),p=w.useRef([]),m=w.useRef([]),v=w.useContext($u),b=pr(),y=gr(),g=CD(),T=fx(),x=b!==null,{floatingStyles:E,refs:C,context:k}=Qr({nodeId:g,open:l,transform:!0,strategy:"absolute",onOpenChange:c,whileElementsMounted:Pi,placement:x?"right":"bottom-start",middleware:[ki({mainAxis:x?0:4,alignmentAxis:x?-4:0}),Mf(),_f()]}),I=eo(k,{role:"menu",enabled:!0}),A=Xr(k,{bubbles:!0}),N=yx(k,{move:!1,enabled:n,delay:{open:Rx},handleClose:Cx({blockPointerEvents:!0})}),O=Ai(k,{event:"mousedown",toggle:!x,ignoreMouse:x,keyboardHandlers:!0}),L=jf(k,{loop:!0,listRef:p,activeIndex:f,nested:x,onNavigate:h}),P=ZD(k,{activeIndex:f,listRef:m,resetMs:JD,onMatch:l?h:void 0}),{getReferenceProps:M,getFloatingProps:j,getItemProps:D}=Jr([N,O,I,A,L,P]);w.useEffect(()=>{if(!y)return;function z(){c(!1)}function _($){$.nodeId!==g&&$.parentId===b&&c(!1)}return y.events.on("click",z),y.events.on("menuopen",_),()=>{y.events.off("click",z),y.events.off("menuopen",_)}},[y,g,b]),w.useEffect(()=>{l&&y&&y.events.emit("menuopen",{parentId:b,nodeId:g})},[y,l,g,b]);const V=r?i.className:Me(Px(i.className));return S.jsxs(RD,{id:g,children:[S.jsx(w.Fragment,{children:i.asChild?S.jsx(Ho,{children:s,ref:Vu([C.setReference,T.ref,a]),tabIndex:x?v.activeIndex===T.index?0:-1:void 0,"data-open":l?"":void 0,"data-nested":x?"":void 0,role:x?"menuitem":void 0,"data-focus-inside":u?"":void 0,className:V,...M(v.getItemProps({...i,onFocus(z){var _;(_=i.onFocus)==null||_.call(i,z),d(!1),v.setHasFocusInside(!0)}}))}):S.jsxs("button",{type:"button",className:V,"data-open":l?"":void 0,"data-nested":x?"":void 0,role:x?"menuitem":void 0,"data-focus-inside":u?"":void 0,ref:Vu([C.setReference,T.ref,a]),tabIndex:x?v.activeIndex===T.index?0:-1:void 0,...M(v.getItemProps({...i,onFocus(z){var _;(_=i.onFocus)==null||_.call(i,z),d(!1),v.setHasFocusInside(!0)}})),children:[s,x&&S.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[S.jsx("span",{className:"sr-only",children:"Next menu"}),S.jsx(sf,{size:14})]})]})}),S.jsx($u.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:D,setHasFocusInside:d,isOpen:l},children:S.jsx(xD,{elementsRef:p,labelsRef:m,children:l&&S.jsx(Zr,{preserveTabOrder:!0,children:S.jsx(ms,{context:k,modal:!1,initialFocus:x?-1:0,returnFocus:!x,children:S.jsx(t,{...j(),ref:C.setFloating,style:{...i.style,...E},className:Me("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})})})})})]})}),eN=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext($u),a=fx({label:r?null:typeof e=="string"?e:t}),l=gr(),c=a.index===i.activeIndex;return S.jsxs("button",{...o,type:"button",role:"menuitem",disabled:r,"data-active":c,"data-open":i.isOpen,tabIndex:c?0:-1,ref:Vu([a.ref,s]),className:Px(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?S.jsx(n,{size:16}):null]})}),tN=w.forwardRef((e,t)=>pr()!==null?S.jsx(cg,{...e,isParent:!1,ref:t}):S.jsx(PD,{children:S.jsx(cg,{...e,isParent:!0,ref:t})}));var En=function(){return En=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},En.apply(this,arguments)};function kx(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 gs(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function ys(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ug(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Bu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ma="right-scroll-bar-position",pa="width-before-scroll-bar",nN="with-scroll-bars-hidden",rN="--removed-body-scroll-bar-size";function Pc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oN(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var sN=typeof window<"u"?R.useLayoutEffect:R.useEffect,dg=new WeakMap;function iN(e,t){var n=oN(null,function(r){return e.forEach(function(o){return Pc(o,r)})});return sN(function(){var r=dg.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Pc(a,null)}),s.forEach(function(a){o.has(a)||Pc(a,i)})}dg.set(n,e)},[e]),n}function aN(e){return e}function lN(e,t){t===void 0&&(t=aN);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function cN(e){e===void 0&&(e={});var t=lN(null);return t.options=En({async:!0,ssr:!1},e),t}var Ix=function(e){var t=e.sideCar,n=kx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return R.createElement(r,En({},n))};Ix.isSideCarExport=!0;function uN(e,t){return e.useMedium(t),Ix}var Ax=cN(),kc=function(){},Al=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:kc,onWheelCapture:kc,onTouchMoveCapture:kc}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,y=e.gapMode,g=kx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,x=iN([n,t]),E=En(En({},g),o);return R.createElement(R.Fragment,null,u&&R.createElement(T,{sideCar:Ax,removeScrollBar:c,shards:d,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?R.cloneElement(R.Children.only(a),En(En({},E),{ref:x})):R.createElement(b,En({},E,{className:l,ref:x}),a))});Al.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Al.classNames={fullWidth:pa,zeroRight:ma};var dN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dN();return t&&e.setAttribute("nonce",t),e}function hN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fN())&&(hN(t,n),mN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gN=function(){var e=pN();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ox=function(){var e=gN(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},yN={left:0,top:0,right:0,gap:0},Ic=function(e){return parseInt(e||"",10)||0},vN=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ic(n),Ic(r),Ic(o)]},bN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yN;var t=vN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xN=Ox(),Po="data-scroll-locked",wN=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
172
|
+
*/var vM=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],$a=vM.join(","),Q0=typeof Element>"u",Go=Q0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ba=!Q0&&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},Wa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},bM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},xM=function(t,n,r){if(Wa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll($a));return n&&Go.call(t,$a)&&o.unshift(t),o=o.filter(r),o},wM=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Wa(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Go.call(i,$a);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Wa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},J0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ex=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||bM(t))&&!J0(t)?0:t.tabIndex},SM=function(t,n){var r=ex(t);return r<0&&n&&!J0(t)?0:r},TM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},tx=function(t){return t.tagName==="INPUT"},EM=function(t){return tx(t)&&t.type==="hidden"},CM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},RM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},PM=function(t){if(!t.name)return!0;var n=t.form||Ba(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=RM(o,t.form);return!s||s===t},kM=function(t){return tx(t)&&t.type==="radio"},IM=function(t){return kM(t)&&!PM(t)},AM=function(t){var n,r=t&&Ba(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=Ba(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},Np=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},OM=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Go.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Go.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Ba(t);if(l&&!l.shadowRoot&&o(l)===!0)return Np(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(AM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Np(t);return!1},_M=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 Go.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},MM=function(t,n){return!(n.disabled||Wa(n)||EM(n)||OM(n,t)||CM(n)||_M(n))},Fu=function(t,n){return!(IM(n)||ex(n)<0||!MM(t,n))},DM=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NM=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=SM(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(TM).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ri=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wM([t],n.includeContainer,{filter:Fu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DM}):r=xM(t,n.includeContainer,Fu.bind(null,n)),NM(r)},jM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Go.call(t,$a)===!1?!1:Fu(n,t)};function jp(e,t,n){let{reference:r,floating:o}=e;const s=Wr(t),i=If(t),a=kf(i),l=lr(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(ds(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const LM=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=jp(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:b}=a[m],{x:y,y:g,data:T,reset:S}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=g??d,h={...h,[v]:{...h[v],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=jp(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function Af(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=us(t,e),p=X0(h),v=a[f?d==="floating"?"reference":"floating":d],b=Va(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},S=Va(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(b.top-S.top+p.top)/T.y,bottom:(S.bottom-b.bottom+p.bottom)/T.y,left:(b.left-S.left+p.left)/T.x,right:(S.right-b.right+p.right)/T.x}}const FM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=us(e,t)||{};if(c==null)return{};const d=X0(u),f={x:n,y:r},h=If(o),p=kf(h),m=await i.getDimensions(c),v=h==="y",b=v?"top":"left",y=v?"bottom":"right",g=v?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-f[h]-s.floating[p],S=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const k=T/2-S/2,I=C/2-m[p]/2-1,A=Cn(d[b],I),N=Cn(d[y],I),M=A,L=C-m[p]-N,P=C/2-m[p]/2+k,O=ju(M,P,L),j=!l.arrow&&ds(o)!=null&&P!==O&&s.reference[p]/2-(P<M?A:N)-m[p]/2<0,D=j?P<M?P-M:P-L:0;return{[h]:f[h]+D,data:{[h]:O,centerOffset:P-O-D,...j&&{alignmentOffset:D}},reset:j}}}),VM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=us(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=lr(o),y=Wr(a),g=lr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(g||!m?[Fa(a)]:mM(a)),E=p!=="none";!f&&E&&S.push(...gM(a,m,p,T));const C=[a,...S],k=await Af(t,v),I=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[b]),d){const P=hM(o,i,T);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var N,M;const P=(((N=s.flip)==null?void 0:N.index)||0)+1,O=C[P];if(O)return{data:{index:P,overflows:A},reset:{placement:O}};let j=(M=A.filter(D=>D.overflows[0]<=0).sort((D,V)=>D.overflows[1]-V.overflows[1])[0])==null?void 0:M.placement;if(!j)switch(h){case"bestFit":{var L;const D=(L=A.filter(V=>{if(E){const H=Wr(V.placement);return H===y||H==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(H=>H>0).reduce((H,_)=>H+_,0)]).sort((V,H)=>V[1]-H[1])[0])==null?void 0:L[0];D&&(j=D);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}};async function $M(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=lr(n),a=ds(n),l=Wr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=us(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const BM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await $M(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},WM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...l}=us(e,t),c={x:n,y:r},u=await Af(t,l),d=Wr(lr(o)),f=Z0(d);let h=c[f],p=c[d];if(s){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=h+u[v],g=h-u[b];h=ju(y,h,g)}if(i){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",y=p+u[v],g=p-u[b];p=ju(y,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},zM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=us(e,t),l=await Af(t,a),c=lr(n),u=ds(n),d=Wr(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=h-l.top-l.bottom,b=f-l.left-l.right,y=Cn(h-l[p],v),g=Cn(f-l[m],b),T=!t.middlewareData.shift;let S=y,E=g;if(d?E=u||T?Cn(g,b):b:S=u||T?Cn(y,v):v,T&&!u){const k=Yt(l.left,0),I=Yt(l.right,0),A=Yt(l.top,0),N=Yt(l.bottom,0);d?E=f-2*(k!==0||I!==0?k+I:Yt(l.left,l.right)):S=h-2*(A!==0||N!==0?A+N:Yt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:S});const C=await o.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function nx(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ht(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=La(n)!==s||La(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Of(e){return He(e)?e:e.contextElement}function Ro(e){const t=Of(e);if(!ht(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=nx(t);let i=(s?La(n.width):n.width)/r,a=(s?La(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const HM=ar(0);function rx(e){const t=Vt(e);return!Tf()||!t.visualViewport?HM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function zr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Of(e);let i=ar(1);t&&(r?He(r)&&(i=Ro(r)):i=Ro(e));const a=UM(s,n,r)?rx(s):ar(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Vt(s),h=r&&He(r)?Vt(r):r;let p=f,m=Du(p);for(;m&&r&&h!==p;){const v=Ro(m),b=m.getBoundingClientRect(),y=Qt(m),g=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,T=b.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=g,c+=T,p=Vt(m),m=Du(p)}}return Va({width:u,height:d,x:l,y:c})}function GM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Yn(r),a=t?Pl(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1);const u=ar(0),d=ht(r);if((d||!d&&!s)&&((mr(r)!=="body"||Ri(i))&&(l=kl(r)),ht(r))){const f=zr(r);c=Ro(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function YM(e){return Array.from(e.getClientRects())}function ox(e){return zr(Yn(e)).left+kl(e).scrollLeft}function qM(e){const t=Yn(e),n=kl(e),r=e.ownerDocument.body,o=Yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ox(e);const a=-n.scrollTop;return Qt(r).direction==="rtl"&&(i+=Yt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function KM(e,t){const n=Vt(e),r=Yn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Tf();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function ZM(e,t){const n=zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ht(e)?Ro(e):ar(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Lp(e,t,n){let r;if(t==="viewport")r=KM(e,n);else if(t==="document")r=qM(Yn(e));else if(He(t))r=ZM(t,n);else{const o=rx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Va(r)}function sx(e,t){const n=Hn(e);return n===t||!He(n)||ir(n)?!1:Qt(n).position==="fixed"||sx(n,t)}function XM(e,t){const n=t.get(e);if(n)return n;let r=rr(e,[],!1).filter(a=>He(a)&&mr(a)!=="body"),o=null;const s=Qt(e).position==="fixed";let i=s?Hn(e):e;for(;He(i)&&!ir(i);){const a=Qt(i),l=Sf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ri(i)&&!l&&sx(e,i))?r=r.filter(u=>u!==i):o=a,i=Hn(i)}return t.set(e,r),r}function QM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Pl(t)?[]:XM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Lp(t,u,o);return c.top=Yt(d.top,c.top),c.right=Cn(d.right,c.right),c.bottom=Cn(d.bottom,c.bottom),c.left=Yt(d.left,c.left),c},Lp(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function JM(e){const{width:t,height:n}=nx(e);return{width:t,height:n}}function eD(e,t,n){const r=ht(t),o=Yn(t),s=n==="fixed",i=zr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ar(0);if(r||!r&&!s)if((mr(t)!=="body"||Ri(o))&&(a=kl(t)),r){const d=zr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=ox(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function bc(e){return Qt(e).position==="static"}function Fp(e,t){return!ht(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ix(e,t){const n=Vt(e);if(Pl(e))return n;if(!ht(e)){let o=Hn(e);for(;o&&!ir(o);){if(He(o)&&!bc(o))return o;o=Hn(o)}return n}let r=Fp(e,t);for(;r&&sM(r)&&bc(r);)r=Fp(r,t);return r&&ir(r)&&bc(r)&&!Sf(r)?n:r||iM(e)||n}const tD=async function(e){const t=this.getOffsetParent||ix,n=this.getDimensions,r=await n(e.floating);return{reference:eD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nD(e){return Qt(e).direction==="rtl"}const rD={convertOffsetParentRelativeRectToViewportRelativeRect:GM,getDocumentElement:Yn,getClippingRect:QM,getOffsetParent:ix,getElementRects:tD,getClientRects:YM,getDimensions:JM,getScale:Ro,isElement:He,isRTL:nD};function oD(e,t){let n=null,r;const o=Yn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Eo(u),p=Eo(o.clientWidth-(c+d)),m=Eo(o.clientHeight-(u+f)),v=Eo(c),y={rootMargin:-h+"px "+-p+"px "+-m+"px "+-v+"px",threshold:Yt(0,Cn(1,l))||1};let g=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,y)}n.observe(e)}return i(!0),s}function Pi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Of(e),u=o||s?[...c?rr(c):[],...rr(t)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=c&&a?oD(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(b=>{let[y]=b;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?zr(e):null;l&&v();function v(){const b=zr(e);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&n(),m=b,p=requestAnimationFrame(v)}return n(),()=>{var b;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const sD=BM,iD=WM,aD=VM,lD=zM,Vp=FM,cD=(e,t,n)=>{const r=new Map,o={platform:rD,...n},s={...o.platform,_c:r};return LM(e,t,{...o,platform:s})};var da=typeof document<"u"?x.useLayoutEffect:x.useEffect;function za(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(!za(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!za(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ax(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $p(e,t){const n=ax(e);return Math.round(t*n)/n}function Bp(e){const t=R.useRef(e);return da(()=>{t.current=e}),t}function uD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=R.useState(r);za(f,r)||h(r);const[p,m]=R.useState(null),[v,b]=R.useState(null),y=R.useCallback(D=>{D!==E.current&&(E.current=D,m(D))},[]),g=R.useCallback(D=>{D!==C.current&&(C.current=D,b(D))},[]),T=s||p,S=i||v,E=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=l!=null,A=Bp(l),N=Bp(o),M=R.useCallback(()=>{if(!E.current||!C.current)return;const D={placement:t,strategy:n,middleware:f};N.current&&(D.platform=N.current),cD(E.current,C.current,D).then(V=>{const H={...V,isPositioned:!0};L.current&&!za(k.current,H)&&(k.current=H,gi.flushSync(()=>{d(H)}))})},[f,t,n,N]);da(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[c]);const L=R.useRef(!1);da(()=>(L.current=!0,()=>{L.current=!1}),[]),da(()=>{if(T&&(E.current=T),S&&(C.current=S),T&&S){if(A.current)return A.current(T,S,M);M()}},[T,S,M,A,I]);const P=R.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:g}),[y,g]),O=R.useMemo(()=>({reference:T,floating:S}),[T,S]),j=R.useMemo(()=>{const D={position:n,left:0,top:0};if(!O.floating)return D;const V=$p(O.floating,u.x),H=$p(O.floating,u.y);return a?{...D,transform:"translate("+V+"px, "+H+"px)",...ax(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:H}},[n,a,O.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:M,refs:P,elements:O,floatingStyles:j}),[u,M,P,O,j])}const dD=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?Vp({element:r.current,padding:o}).fn(n):{}:r?Vp({element:r,padding:o}).fn(n):{}}}},ki=(e,t)=>({...sD(e),options:[e,t]}),_f=(e,t)=>({...iD(e),options:[e,t]}),Mf=(e,t)=>({...aD(e),options:[e,t]}),lx=(e,t)=>({...lD(e),options:[e,t]}),cx=(e,t)=>({...dD(e),options:[e,t]});function Vu(e){return R.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const ux={...R},fD=ux.useInsertionEffect,hD=fD||(e=>e());function xt(e){const t=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hD(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Df="ArrowUp",Ii="ArrowDown",Yo="ArrowLeft",fs="ArrowRight";function Zi(e,t,n){return Math.floor(e/t)!==n}function Bs(e,t){return t<0||t>=e.current.length}function xc(e,t){return _t(e,{disabledIndices:t})}function Wp(e,t){return _t(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function _t(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&fa(i,a,o));return a}function mD(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Df){if(u&&kt(n),c===-1)d=l;else if(d=_t(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}Bs(e,d)&&(d=c)}if(n.key===Ii&&(u&&kt(n),c===-1?d=a:(d=_t(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=_t(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Bs(e,d)&&(d=c)),r==="both"){const f=Eo(c/s);n.key===fs&&(u&&kt(n),c%s!==s-1?(d=_t(e,{startingIndex:c,disabledIndices:i}),o&&Zi(d,s,f)&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i})),Zi(d,s,f)&&(d=c)),n.key===Yo&&(u&&kt(n),c%s!==0?(d=_t(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Zi(d,s,f)&&(d=_t(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=_t(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Zi(d,s,f)&&(d=c));const h=Eo(l/s)===f;Bs(e,d)&&(o&&h?d=n.key===Yo?l:_t(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function pD(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function gD(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function yD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function fa(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 zp=0;function Jn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(zp);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():zp=requestAnimationFrame(s)}var Ae=typeof document<"u"?x.useLayoutEffect:x.useEffect;function vD(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function bD(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const dx=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function xD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=R.useState(()=>new Map),i=R.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=R.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ae(()=>{const l=new Map(o);Array.from(l.keys()).sort(vD).forEach((u,d)=>{l.set(u,d)}),bD(o,l)||s(l)},[o]),R.createElement(dx.Provider,{value:R.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function fx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=R.useContext(dx),[a,l]=R.useState(null),c=R.useRef(null),u=R.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return Ae(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ae(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),R.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function qo(){return qo=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},qo.apply(this,arguments)}let Hp=!1,wD=0;const Up=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wD++;function SD(){const[e,t]=R.useState(()=>Hp?Up():void 0);return Ae(()=>{e==null&&t(Up())},[]),R.useEffect(()=>{Hp=!0},[]),e}const TD=ux.useId,hs=TD||SD;let oi;process.env.NODE_ENV!=="production"&&(oi=new Set);function ha(){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=oi)!=null&&e.has(o))){var s;(s=oi)==null||s.add(o),console.warn(o)}}function ED(){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=oi)!=null&&e.has(o))){var s;(s=oi)==null||s.add(o),console.error(o)}}const hx=R.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||ha("The `ref` prop is required for `FloatingArrow`."));const v=hs(),[b,y]=R.useState(!1);if(Ae(()=>{if(!o)return;Qt(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const g=c*2,T=g/2,S=i/2*(l/-8+1),E=a/2*l/4,[C,k]=r.split("-"),I=!!f,A=C==="top"||C==="bottom",N=u&&k==="end"?"bottom":"top";let M=u&&k==="end"?"right":"left";u&&b&&(M=k==="end"?"left":"right");const L=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",O=f||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",j={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",qo({},m,{"aria-hidden":!0,ref:n,width:I?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[M]:L,[N]:P,[C]:A||I?"100%":"calc(100% - "+g/2+"px)",transform:""+j+(h??""),...p}}),g>0&&R.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:O}),R.createElement("path",{stroke:g&&!f?m.fill:"none",d:O}),R.createElement("clipPath",{id:v},R.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function mx(){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 px=R.createContext(null),gx=R.createContext(null),pr=()=>{var e;return((e=R.useContext(px))==null?void 0:e.id)||null},gr=()=>R.useContext(gx);function CD(e){const t=hs(),n=gr(),o=pr();return Ae(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function RD(e){const{children:t,id:n}=e,r=pr();return R.createElement(px.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function PD(e){const{children:t}=e,n=R.useRef([]),r=R.useCallback(i=>{n.current=[...n.current,i]},[]),o=R.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=R.useState(()=>mx())[0];return R.createElement(gx.Provider,{value:R.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function cr(e){return"data-floating-ui-"+e}function It(e){const t=x.useRef(e);return Ae(()=>{t.current=e}),t}const Gp=cr("safe-polygon");function wc(e,t,n){return n&&!Uo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function yx(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=gr(),p=pr(),m=It(c),v=It(l),b=It(n),y=R.useRef(),g=R.useRef(-1),T=R.useRef(),S=R.useRef(-1),E=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),I=R.useCallback(()=>{var O;const j=(O=o.current.openEvent)==null?void 0:O.type;return(j==null?void 0:j.includes("mouse"))&&j!=="mousedown"},[o]);R.useEffect(()=>{if(!a)return;function O(j){let{open:D}=j;D||(clearTimeout(g.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",O),()=>{s.off("openchange",O)}},[a,s]),R.useEffect(()=>{if(!a||!m.current||!n)return;function O(D){I()&&r(!1,D,"hover")}const j=Tt(i.floating).documentElement;return j.addEventListener("mouseleave",O),()=>{j.removeEventListener("mouseleave",O)}},[i.floating,n,r,a,m,I]);const A=R.useCallback(function(O,j,D){j===void 0&&(j=!0),D===void 0&&(D="hover");const V=wc(v.current,"close",y.current);V&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,O,D),V)):j&&(clearTimeout(g.current),r(!1,O,D))},[v,r]),N=xt(()=>{k.current(),T.current=void 0}),M=xt(()=>{if(C.current){const O=Tt(i.floating).body;O.style.pointerEvents="",O.removeAttribute(Gp),C.current=!1}});R.useEffect(()=>{if(!a)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function j(_){if(clearTimeout(g.current),E.current=!1,u&&!Uo(y.current)||d>0&&!wc(v.current,"open"))return;const $=wc(v.current,"open",y.current);$?g.current=window.setTimeout(()=>{b.current||r(!0,_,"hover")},$):r(!0,_,"hover")}function D(_){if(O())return;k.current();const $=Tt(i.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){M(),N(),A(_,!0,"safe-polygon")}});const re=T.current;$.addEventListener("mousemove",re),k.current=()=>{$.removeEventListener("mousemove",re)};return}(y.current==="touch"?!at(i.floating,_.relatedTarget):!0)&&A(_)}function V(_){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){M(),N(),A(_)}})(_))}if(He(i.domReference)){var H;const _=i.domReference;return n&&_.addEventListener("mouseleave",V),(H=i.floating)==null||H.addEventListener("mouseleave",V),f&&_.addEventListener("mousemove",j,{once:!0}),_.addEventListener("mouseenter",j),_.addEventListener("mouseleave",D),()=>{var $;n&&_.removeEventListener("mouseleave",V),($=i.floating)==null||$.removeEventListener("mouseleave",V),f&&_.removeEventListener("mousemove",j),_.removeEventListener("mouseenter",j),_.removeEventListener("mouseleave",D)}}},[i,a,e,u,d,f,A,N,M,r,n,b,h,v,m,o]),Ae(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&I()){const D=Tt(i.floating).body;D.setAttribute(Gp,""),D.style.pointerEvents="none",C.current=!0;const V=i.floating;if(He(i.domReference)&&V){var j;const H=i.domReference,_=h==null||(j=h.nodesRef.current.find($=>$.id===p))==null||(j=j.context)==null?void 0:j.elements.floating;return _&&(_.style.pointerEvents=""),H.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{H.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,p,i,h,m,I]),Ae(()=>{n||(y.current=void 0,N(),M())},[n,N,M]),R.useEffect(()=>()=>{N(),clearTimeout(g.current),clearTimeout(S.current),M()},[a,i.domReference,N,M]);const L=R.useMemo(()=>{function O(j){y.current=j.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(j){const{nativeEvent:D}=j;function V(){!E.current&&!b.current&&r(!0,D,"hover")}u&&!Uo(y.current)||n||d===0||(clearTimeout(S.current),y.current==="touch"?V():S.current=window.setTimeout(V,d))}}},[u,r,n,b,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(O){A(O.nativeEvent,!1)}}),[A]);return R.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function kD(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Fr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function ID(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Fr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let co=new WeakMap,Xi=new WeakSet,Qi={},Sc=0;const AD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,vx=e=>e&&(e.host||vx(e.parentNode)),OD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=vx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function _D(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=OD(t,e),a=new Set,l=new Set(i),c=[];Qi[o]||(Qi[o]=new WeakMap);const u=Qi[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(mr(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,v=m!==null&&m!=="false",b=(co.get(p)||0)+1,y=(u.get(p)||0)+1;co.set(p,b),u.set(p,y),c.push(p),b===1&&v&&Xi.add(p),y===1&&p.setAttribute(o,""),!v&&s&&p.setAttribute(s,"true")}})}return Sc++,()=>{c.forEach(h=>{const p=(co.get(h)||0)-1,m=(u.get(h)||0)-1;co.set(h,p),u.set(h,m),p||(!Xi.has(h)&&s&&h.removeAttribute(s),Xi.delete(h)),m||h.removeAttribute(o)}),Sc--,Sc||(co=new WeakMap,co=new WeakMap,Xi=new WeakSet,Qi={})}}function Yp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Tt(e[0]).body;return _D(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ko=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function bx(e,t){const n=ri(e,Ko());t==="prev"&&n.reverse();const r=n.indexOf(ln(Tt(e)));return n.slice(r+1)[0]}function xx(){return bx(document.body,"next")}function wx(){return bx(document.body,"prev")}function Ws(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!at(n,r)}function MD(e){ri(e,Ko()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function DD(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 ND(e,t,n){const r=e.indexOf(t);function o(i){const a=cr("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||at(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Nf={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 jD;function qp(e){e.key==="Tab"&&(e.target,clearTimeout(jD))}const Ha=R.forwardRef(function(t,n){const[r,o]=R.useState();Ae(()=>(Rf()&&o("button"),document.addEventListener("keydown",qp),()=>{document.removeEventListener("keydown",qp)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[cr("focus-guard")]:"",style:Nf};return R.createElement("span",qo({},t,s))}),Sx=R.createContext(null),Kp=cr("portal");function LD(e){e===void 0&&(e={});const{id:t,root:n}=e,r=hs(),o=Tx(),[s,i]=R.useState(null),a=R.useRef(null);return Ae(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ae(()=>{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(Kp,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Ae(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!He(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(Kp,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Zr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=LD({id:n,root:r}),[i,a]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),d=R.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return R.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Ws(p)&&(p.type==="focusin"?DD:MD)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),R.createElement(Sx.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&R.createElement(Ha,{"data-type":"outside",ref:l,onFocus:h=>{if(Ws(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=wx()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&R.createElement("span",{"aria-owns":s.id,style:Nf}),s&&gi.createPortal(t,s),f&&s&&R.createElement(Ha,{"data-type":"outside",ref:c,onFocus:h=>{if(Ws(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=xx()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Tx=()=>R.useContext(Sx),Zp=20;let Rr=[];function Tc(e){Rr=Rr.filter(n=>n.isConnected);let t=e;if(!(!t||mr(t)==="body")){if(!jM(t,Ko())){const n=ri(t,Ko())[0];n&&(t=n)}Rr.push(t),Rr.length>Zp&&(Rr=Rr.slice(-Zp))}}function Xp(){return Rr.slice().reverse().find(e=>e.isConnected)}const FD=R.forwardRef(function(t,n){return R.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:Nf}))});function ms(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:v,dataRef:b,floatingId:y,elements:{domReference:g,floating:T}}=t,S=typeof i=="number"&&i<0,E=K0(g)&&S,C=AD()?s:!0,k=It(o),I=It(i),A=It(a),N=gr(),M=Tx(),L=R.useRef(null),P=R.useRef(null),O=R.useRef(!1),j=R.useRef(!1),D=R.useRef(-1),V=M!=null,H=T==null?void 0:T.firstElementChild,_=(H==null?void 0:H.id)===y?H:T,$=xt(function(G){return G===void 0&&(G=_),G?ri(G,Ko()):[]}),K=xt(G=>{const F=$(G);return k.current.map(B=>g&&B==="reference"?g:_&&B==="floating"?_:F).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){at(_,ln(Tt(_)))&&$().length===0&&!E&&kt(B);const z=K(),Y=Tn(B);k.current[0]==="reference"&&Y===g&&(kt(B),B.shiftKey?Jn(z[z.length-1]):Jn(z[1])),k.current[1]==="floating"&&Y===_&&B.shiftKey&&(kt(B),Jn(z[0]))}}const F=Tt(_);return F.addEventListener("keydown",G),()=>{F.removeEventListener("keydown",G)}},[r,g,_,c,k,E,$,K]),R.useEffect(()=>{if(r||!T)return;function G(F){const B=Tn(F),Y=$().indexOf(B);Y!==-1&&(D.current=Y)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,$]),R.useEffect(()=>{if(r||!d)return;function G(){j.current=!0,setTimeout(()=>{j.current=!1})}function F(B){const z=B.relatedTarget;queueMicrotask(()=>{const Y=!(at(g,z)||at(T,z)||at(z,T)||at(M==null?void 0:M.portalNode,z)||z!=null&&z.hasAttribute(cr("focus-guard"))||N&&(Fr(N.nodesRef.current,p).find(Q=>{var ue,U;return at((ue=Q.context)==null?void 0:ue.elements.floating,z)||at((U=Q.context)==null?void 0:U.elements.domReference,z)})||kD(N.nodesRef.current,p).find(Q=>{var ue,U;return((ue=Q.context)==null?void 0:ue.elements.floating)===z||((U=Q.context)==null?void 0:U.elements.domReference)===z})));if(l&&Y&&ln(Tt(_))===Tt(_).body){ht(_)&&(_==null||_.focus());const Q=D.current,ue=$(),U=ue[Q]||ue[ue.length-1]||_;ht(U)&&U.focus()}(E||!c)&&z&&Y&&!j.current&&z!==Xp()&&(O.current=!0,m(!1,B))})}if(T&&ht(g))return g.addEventListener("focusout",F),g.addEventListener("pointerdown",G),T.addEventListener("focusout",F),()=>{g.removeEventListener("focusout",F),g.removeEventListener("pointerdown",G),T.removeEventListener("focusout",F)}},[r,g,T,_,c,p,N,M,m,d,l,$,E]),R.useEffect(()=>{var G;if(r)return;const F=Array.from((M==null||(G=M.portalNode)==null?void 0:G.querySelectorAll("["+cr("portal")+"]"))||[]);if(T){const B=[T,...F,L.current,P.current,k.current.includes("reference")||E?g:null].filter(Y=>Y!=null),z=c||E?Yp(B,C,!C):Yp(B);return()=>{z()}}},[r,g,T,c,k,M,E,C]),Ae(()=>{if(r||!ht(_))return;const G=Tt(_),F=ln(G);queueMicrotask(()=>{const B=K(_),z=I.current,Y=(typeof z=="number"?B[z]:z.current)||_,Q=at(_,F);!S&&!Q&&f&&Jn(Y,{preventScroll:Y===_})})},[r,f,_,S,K,I]),Ae(()=>{if(r||!_)return;let G=!1;const F=Tt(_),B=ln(F);let Y=b.current.openEvent;const Q=h.domReference.current;Tc(B);function ue(U){let{open:ke,reason:qe,event:Le,nested:Te}=U;ke&&(Y=Le),qe==="escape-key"&&h.domReference.current&&Tc(h.domReference.current),qe==="hover"&&Le.type==="mouseleave"&&(O.current=!0),qe==="outside-press"&&(Te?(O.current=!1,G=!0):O.current=!(Y0(Le)||Cf(Le)))}return v.on("openchange",ue),()=>{v.off("openchange",ue);const U=ln(F),ke=at(T,U)||N&&Fr(N.nodesRef.current,p).some(q=>{var se;return at((se=q.context)==null?void 0:se.elements.floating,U)});(ke||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&Tc(h.domReference.current);const Le=Q||B,Te=ri(Tt(Le).body,Ko());queueMicrotask(()=>{let q=Xp();!q&&ht(Le)&&T&&(q=ND(Te,Le,T)),A.current&&!O.current&&ht(q)&&(!(q!==U&&U!==F.body)||ke)&&q.focus({preventScroll:G})})}},[r,T,_,A,b,h,v,N,p]),Ae(()=>{if(!r&&M)return M.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{M.setFocusManagerState(null)}},[r,M,c,f,m,h,d]),Ae(()=>{if(r||!_||typeof MutationObserver!="function"||S)return;const G=()=>{const B=_.getAttribute("tabindex"),z=$(),Y=ln(Tt(T)),Q=z.indexOf(Y);Q!==-1&&(D.current=Q),k.current.includes("floating")||Y!==h.domReference.current&&z.length===0?B!=="0"&&_.setAttribute("tabindex","0"):B!=="-1"&&_.setAttribute("tabindex","-1")};G();const F=new MutationObserver(G);return F.observe(_,{childList:!0,subtree:!0,attributes:!0}),()=>{F.disconnect()}},[r,T,_,h,k,$,S]);function re(G){return r||!u||!c?null:R.createElement(FD,{ref:G==="start"?L:P,onClick:F=>m(!1,F.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!E:!0)&&(V||c);return R.createElement(R.Fragment,null,ee&&R.createElement(Ha,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:G=>{if(c){const B=K();Jn(o[0]==="reference"?B[0]:B[B.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(O.current=!1,Ws(G,M.portalNode)){const B=xx()||g;B==null||B.focus()}else{var F;(F=M.beforeOutsideRef.current)==null||F.focus()}}}),!E&&re("start"),n,re("end"),ee&&R.createElement(Ha,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:G=>{if(c)Jn(K()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(d&&(O.current=!0),Ws(G,M.portalNode)){const B=wx()||g;B==null||B.focus()}else{var F;(F=M.afterOutsideRef.current)==null||F.focus()}}}))}const Ec=new Set,VD=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=hs();return Ae(()=>{if(!r)return;Ec.add(s);const i=/iP(hone|ad|od)|iOS/.test(Ef()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Ec.delete(s),Ec.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),R.createElement("div",qo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Qp(e){return ht(e.target)&&e.target.tagName==="BUTTON"}function Jp(e){return Pf(e)}function Ai(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=R.useRef(),f=R.useRef(!1),h=R.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Uo(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}Uo(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||Qp(p))&&(p.key===" "&&!Jp(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Qp(p)||Jp(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return R.useMemo(()=>i?{reference:h}:{},[i,h])}function $D(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,d=i.height,f=i.x,h=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function eg(e){return e!=null&&e.clientX!=null}function BD(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=R.useRef(!1),f=R.useRef(null),[h,p]=R.useState(),[m,v]=R.useState([]),b=xt((E,C)=>{d.current||r.current.openEvent&&!eg(r.current.openEvent)||i.setPositionReference($D(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),y=xt(E=>{c!=null||u!=null||(n?f.current||v([]):b(E.clientX,E.clientY))}),g=Uo(h)?o:n,T=R.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Vt(o);function C(k){const I=Tn(k);at(o,I)?(E.removeEventListener("mousemove",C),f.current=null):b(k.clientX,k.clientY)}if(!r.current.openEvent||eg(r.current.openEvent)){E.addEventListener("mousemove",C);const k=()=>{E.removeEventListener("mousemove",C),f.current=null};return f.current=k,k}i.setPositionReference(s)},[g,a,c,u,o,r,i,s,b]);R.useEffect(()=>T(),[T,m]),R.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),R.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),Ae(()=>{a&&(c!=null||u!=null)&&(d.current=!1,b(c,u))},[a,c,u,b]);const S=R.useMemo(()=>{function E(C){let{pointerType:k}=C;p(k)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return R.useMemo(()=>a?{reference:S}:{},[a,S])}const WD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},zD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},tg=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 Xr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=gr(),v=xt(typeof l=="function"?l:()=>!1),b=typeof l=="function"?v:l,y=R.useRef(!1),g=R.useRef(!1),{escapeKey:T,outsidePress:S}=tg(h),{escapeKey:E,outsidePress:C}=tg(p),k=xt(P=>{var O;if(!n||!i||!a||P.key!=="Escape")return;const j=(O=s.current.floatingContext)==null?void 0:O.nodeId,D=m?Fr(m.nodesRef.current,j):[];if(!T&&(P.stopPropagation(),D.length>0)){let V=!0;if(D.forEach(H=>{var _;if((_=H.context)!=null&&_.open&&!H.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,lM(P)?P.nativeEvent:P,"escape-key")}),I=xt(P=>{var O;const j=()=>{var D;k(P),(D=Tn(P))==null||D.removeEventListener("keydown",j)};(O=Tn(P))==null||O.addEventListener("keydown",j)}),A=xt(P=>{var O;const j=y.current;y.current=!1;const D=g.current;if(g.current=!1,c==="click"&&D||j||typeof b=="function"&&!b(P))return;const V=Tn(P),H="["+cr("inert")+"]",_=Tt(o.floating).querySelectorAll(H);let $=He(V)?V:null;for(;$&&!ir($);){const G=Hn($);if(ir(G)||!He(G))break;$=G}if(_.length&&He(V)&&!cM(V)&&!at(V,o.floating)&&Array.from(_).every(G=>!at($,G)))return;if(ht(V)&&L){const G=V.clientWidth>0&&V.scrollWidth>V.clientWidth,F=V.clientHeight>0&&V.scrollHeight>V.clientHeight;let B=F&&P.offsetX>V.clientWidth;if(F&&Qt(V).direction==="rtl"&&(B=P.offsetX<=V.offsetWidth-V.clientWidth),B||G&&P.offsetY>V.clientHeight)return}const K=(O=s.current.floatingContext)==null?void 0:O.nodeId,re=m&&Fr(m.nodesRef.current,K).some(G=>{var F;return vc(P,(F=G.context)==null?void 0:F.elements.floating)});if(vc(P,o.floating)||vc(P,o.domReference)||re)return;const ee=m?Fr(m.nodesRef.current,K):[];if(ee.length>0){let G=!0;if(ee.forEach(F=>{var B;if((B=F.context)!=null&&B.open&&!F.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),N=xt(P=>{var O;const j=()=>{var D;A(P),(D=Tn(P))==null||D.removeEventListener(c,j)};(O=Tn(P))==null||O.addEventListener(c,j)});R.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function P(D){r(!1,D,"ancestor-scroll")}const O=Tt(o.floating);a&&O.addEventListener("keydown",E?I:k,E),b&&O.addEventListener(c,C?N:A,C);let j=[];return f&&(He(o.domReference)&&(j=rr(o.domReference)),He(o.floating)&&(j=j.concat(rr(o.floating))),!He(o.reference)&&o.reference&&o.reference.contextElement&&(j=j.concat(rr(o.reference.contextElement)))),j=j.filter(D=>{var V;return D!==((V=O.defaultView)==null?void 0:V.visualViewport)}),j.forEach(D=>{D.addEventListener("scroll",P,{passive:!0})}),()=>{a&&O.removeEventListener("keydown",E?I:k,E),b&&O.removeEventListener(c,C?N:A,C),j.forEach(D=>{D.removeEventListener("scroll",P)})}},[s,o,a,b,c,n,r,f,i,T,S,k,E,I,A,C,N]),R.useEffect(()=>{y.current=!1},[b,c]);const M=R.useMemo(()=>({onKeyDown:k,[WD[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),L=R.useMemo(()=>({onKeyDown:k,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[zD[c]]:()=>{y.current=!0}}),[k,c]);return R.useMemo(()=>i?{reference:M,floating:L}:{},[i,M,L])}function HD(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=hs(),s=R.useRef({}),[i]=R.useState(()=>mx()),a=pr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!He(h)&&ED("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=R.useState(r.reference),u=xt((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=R.useMemo(()=>({setPositionReference:c}),[]),f=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Qr(e){e===void 0&&(e={});const{nodeId:t}=e,n=HD({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=R.useState(null),[a,l]=R.useState(null),u=(o==null?void 0:o.reference)||s,d=R.useRef(null),f=gr();Ae(()=>{u&&(d.current=u)},[u]);const h=uD({...e,elements:{...o,...a&&{reference:a}}}),p=R.useCallback(g=>{const T=He(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=R.useCallback(g=>{(He(g)||g===null)&&(d.current=g,i(g)),(He(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!He(g))&&h.refs.setReference(g)},[h.refs]),v=R.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),b=R.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),y=R.useMemo(()=>({...h,...r,refs:v,elements:b,nodeId:t}),[h,v,b,t,r]);return Ae(()=>{r.dataRef.current.floatingContext=y;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=y)}),R.useMemo(()=>({...h,context:y,refs:v,elements:b}),[h,v,b,y])}function UD(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=R.useRef(!1),u=R.useRef(),d=R.useRef(!0);R.useEffect(()=>{if(!a)return;const h=Vt(i.domReference);function p(){!n&&ht(i.domReference)&&i.domReference===ln(Tt(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),R.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=R.useMemo(()=>({onPointerDown(h){Cf(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Tn(h.nativeEvent);if(l&&He(p))try{if(Rf()&&q0())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Pf(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,v=He(p)&&p.hasAttribute(cr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var b;const y=ln(i.domReference?i.domReference.ownerDocument:document);!p&&y===i.domReference||at((b=s.current.floatingContext)==null?void 0:b.refs.floating.current,y)||at(i.domReference,y)||v||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}const ng="active",rg="selected";function Cc(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[ng]:i,[rg]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[ng,rg].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(v=>v(...p)).find(v=>v!==void 0)}}}else i[c]=u}),i),{})}}function Jr(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=R.useCallback(a=>Cc(a,e,"reference"),t),s=R.useCallback(a=>Cc(a,e,"floating"),n),i=R.useCallback(a=>Cc(a,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let og=!1;function Il(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function sg(e,t){return Il(t,e===Df||e===Ii,e===Yo||e===fs)}function Rc(e,t,n){return Il(t,e===Ii,n?e===Yo:e===fs)||e==="Enter"||e===" "||e===""}function GD(e,t,n){return Il(t,n?e===Yo:e===fs,e===Ii)}function ig(e,t,n){return Il(t,n?e===fs:e===Yo,e===Df)}function jf(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:y=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||ha("`useListNavigation` looping must be enabled to allow escaping."),p||ha("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&ha("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=pr(),A=gr(),N=xt(a),M=R.useRef(m),L=R.useRef(c??-1),P=R.useRef(null),O=R.useRef(!0),j=R.useRef(N),D=R.useRef(!!o.floating),V=R.useRef(n),H=R.useRef(!1),_=R.useRef(!1),$=It(y),K=It(n),re=It(S),ee=It(o.floating),G=It(c),[F,B]=R.useState(),[z,Y]=R.useState(),Q=xt(function(q,se,W){W===void 0&&(W=!1);function J(ce){p?(B(ce.id),A==null||A.events.emit("virtualfocus",ce),E&&(E.current=ce)):Jn(ce,{preventScroll:!0,sync:q0()&&Rf()?og||H.current:!1})}const pe=q.current[se.current];pe&&J(pe),requestAnimationFrame(()=>{const ce=q.current[se.current]||pe;if(!ce)return;pe||J(ce);const Fe=re.current;Fe&&U&&(W||!O.current)&&(ce.scrollIntoView==null||ce.scrollIntoView(typeof Fe=="boolean"?{block:"nearest",inline:"nearest"}:Fe))})});Ae(()=>{document.createElement("div").focus({get preventScroll(){return og=!0,!1}})},[]),Ae(()=>{l&&(n&&o.floating?M.current&&c!=null&&(_.current=!0,L.current=c,N(c)):D.current&&(L.current=-1,j.current(null)))},[l,n,o.floating,c,N]),Ae(()=>{if(l&&n&&o.floating)if(i==null){if(H.current=!1,G.current!=null)return;if(D.current&&(L.current=-1,Q(s,L)),(!V.current||!D.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let q=0;const se=()=>{s.current[0]==null?(q<2&&(q?requestAnimationFrame:queueMicrotask)(se),q++):(L.current=P.current==null||Rc(P.current,g,h)||f?xc(s,$.current):Wp(s,$.current),P.current=null,N(L.current))};se()}}else Bs(s,i)||(L.current=i,Q(s,L,_.current),_.current=!1)},[l,n,o.floating,i,G,f,s,g,h,N,Q,$]),Ae(()=>{var q;if(!l||o.floating||!A||p||!D.current)return;const se=A.nodesRef.current,W=(q=se.find(ce=>ce.id===I))==null||(q=q.context)==null?void 0:q.elements.floating,J=ln(Tt(o.floating)),pe=se.some(ce=>ce.context&&at(ce.context.elements.floating,J));W&&!pe&&O.current&&W.focus({preventScroll:!0})},[l,o.floating,A,I,p]),Ae(()=>{if(!l||!A||!p||I)return;function q(se){Y(se.id),E&&(E.current=se)}return A.events.on("virtualfocus",q),()=>{A.events.off("virtualfocus",q)}},[l,A,p,I,E]),Ae(()=>{j.current=N,D.current=!!o.floating}),Ae(()=>{n||(P.current=null)},[n]),Ae(()=>{V.current=n},[n]);const ue=i!=null,U=R.useMemo(()=>{function q(W){if(!n)return;const J=s.current.indexOf(W);J!==-1&&N(J)}return{onFocus(W){let{currentTarget:J}=W;q(J)},onClick:W=>{let{currentTarget:J}=W;return J.focus({preventScroll:!0})},...v&&{onMouseMove(W){let{currentTarget:J}=W;q(J)},onPointerLeave(W){let{pointerType:J}=W;!O.current||J==="touch"||(L.current=-1,Q(s,L),N(null),p||Jn(ee.current,{preventScroll:!0}))}}}},[n,ee,Q,v,s,N,p]),ke=xt(q=>{if(O.current=!1,H.current=!0,!K.current&&q.currentTarget===ee.current)return;if(f&&ig(q.key,g,h)){kt(q),r(!1,q.nativeEvent,"list-navigation"),ht(o.domReference)&&!p&&o.domReference.focus();return}const se=L.current,W=xc(s,y),J=Wp(s,y);if(q.key==="Home"&&(kt(q),L.current=W,N(L.current)),q.key==="End"&&(kt(q),L.current=J,N(L.current)),T>1){const pe=C||Array.from({length:s.current.length},()=>({width:1,height:1})),ce=pD(pe,T,k),Fe=ce.findIndex(ie=>ie!=null&&!fa(s.current,ie,y)),te=ce.reduce((ie,_e,Ke)=>_e!=null&&!fa(s.current,_e,y)?Ke:ie,-1);if(L.current=ce[mD({current:ce.map(ie=>ie!=null?s.current[ie]:null)},{event:q,orientation:g,loop:d,cols:T,disabledIndices:yD([...y||s.current.map((ie,_e)=>fa(s.current,_e)?_e:void 0),void 0],ce),minIndex:Fe,maxIndex:te,prevIndex:gD(L.current>J?W:L.current,pe,ce,T,q.key===Ii?"bl":q.key===fs?"tr":"tl"),stopEvent:!0})],N(L.current),g==="both")return}if(sg(q.key,g)){if(kt(q),n&&!p&&ln(q.currentTarget.ownerDocument)===q.currentTarget){L.current=Rc(q.key,g,h)?W:J,N(L.current);return}Rc(q.key,g,h)?d?L.current=se>=J?u&&se!==s.current.length?-1:W:_t(s,{startingIndex:se,disabledIndices:y}):L.current=Math.min(J,_t(s,{startingIndex:se,disabledIndices:y})):d?L.current=se<=W?u&&se!==-1?s.current.length:J:_t(s,{startingIndex:se,decrement:!0,disabledIndices:y}):L.current=Math.max(W,_t(s,{startingIndex:se,decrement:!0,disabledIndices:y})),Bs(s,L.current)?N(null):N(L.current)}}),qe=R.useMemo(()=>p&&n&&ue&&{"aria-activedescendant":z||F},[p,n,ue,z,F]),Le=R.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!K0(o.domReference)&&qe,onKeyDown:ke,onPointerMove(){O.current=!0}}),[qe,ke,o.domReference,g]),Te=R.useMemo(()=>{function q(W){m==="auto"&&Y0(W.nativeEvent)&&(M.current=!0)}function se(W){M.current=m,m==="auto"&&Cf(W.nativeEvent)&&(M.current=!0)}return{...qe,onKeyDown(W){O.current=!1;const J=W.key.indexOf("Arrow")===0,pe=GD(W.key,g,h),ce=ig(W.key,g,h),Fe=sg(W.key,g),te=(f?pe:Fe)||W.key==="Enter"||W.key.trim()==="";if(p&&n){const Rt=A==null?void 0:A.nodesRef.current.find(Lt=>Lt.parentId==null),At=A&&Rt?ID(A.nodesRef.current,Rt.id):null;if(J&&At&&E){const Lt=new KeyboardEvent("keydown",{key:W.key,bubbles:!0});if(pe||ce){var ie,_e;const xr=((ie=At.context)==null?void 0:ie.elements.domReference)===W.currentTarget,ro=ce&&!xr?(_e=At.context)==null?void 0:_e.elements.domReference:pe?s.current.find(oo=>(oo==null?void 0:oo.id)===F):null;ro&&(kt(W),ro.dispatchEvent(Lt),Y(void 0))}if(Fe&&At.context&&At.context.open&&At.parentId&&W.currentTarget!==At.context.elements.domReference){var Ke;kt(W),(Ke=At.context.elements.domReference)==null||Ke.dispatchEvent(Lt);return}}return ke(W)}if(!(!n&&!b&&J)){if(te&&(P.current=f&&Fe?null:W.key),f){pe&&(kt(W),n?(L.current=xc(s,$.current),N(L.current)):r(!0,W.nativeEvent,"list-navigation"));return}Fe&&(c!=null&&(L.current=c),kt(W),!n&&b?r(!0,W.nativeEvent,"list-navigation"):ke(W),n&&N(L.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:se,onMouseDown:q,onClick:q}},[F,qe,ke,$,m,s,f,N,r,n,b,g,h,c,A,p,E]);return R.useMemo(()=>l?{reference:Te,floating:Le,item:U}:{},[l,Te,Le,U])}const YD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function eo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=YD.get(i))!=null?n:i,l=hs(),u=pr()!=null,d=R.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),f=R.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=R.useCallback(p=>{let{active:m,selected:v}=p;const b={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...b,"aria-selected":m&&v};case"combobox":return{...b,...m&&{"aria-selected":!0}}}return{}},[o,i]);return R.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const ag=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function uo(e,t){return typeof e=="function"?e(t):e}function qD(e,t){const[n,r]=R.useState(e);return e&&!n&&r(!0),R.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function KD(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=R.useState("unmounted"),c=qD(n,i);return!c&&a==="close"&&l("unmounted"),Ae(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Ex(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=R.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=R.useState(()=>({...uo(s,c),...uo(n,c)})),{isMounted:m,status:v}=KD(e,{duration:i}),b=It(n),y=It(r),g=It(o),T=It(s);return Ae(()=>{const S=uo(b.current,c),E=uo(g.current,c),C=uo(T.current,c),k=uo(y.current,c)||Object.keys(S).reduce((I,A)=>(I[A]="",I),{});if(v==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...S})),v==="open"&&p({transitionProperty:Object.keys(k).map(ag).join(","),transitionDuration:d+"ms",...C,...k}),v==="close"){const I=E||S;p({transitionProperty:Object.keys(I).map(ag).join(","),transitionDuration:f+"ms",...C,...I})}},[f,g,b,y,T,d,v,c]),{isMounted:m,styles:h}}function ZD(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=R.useRef(),m=R.useRef(""),v=R.useRef((n=h??i)!=null?n:-1),b=R.useRef(null),y=xt(a),g=xt(l),T=It(u),S=It(f);Ae(()=>{r&&(clearTimeout(p.current),b.current=null,m.current="")},[r]),Ae(()=>{if(r&&m.current===""){var A;v.current=(A=h??i)!=null?A:-1}},[r,h,i]);const E=xt(A=>{A?o.current.typing||(o.current.typing=A,g(A)):o.current.typing&&(o.current.typing=A,g(A))}),C=xt(A=>{function N(j,D,V){const H=T.current?T.current(D,V):D.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))===0);return H?j.indexOf(H):-1}const M=s.current;if(m.current.length>0&&m.current[0]!==" "&&(N(M,M,m.current)===-1?E(!1):A.key===" "&&kt(A)),M==null||S.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(kt(A),E(!0)),M.every(j=>{var D,V;return j?((D=j[0])==null?void 0:D.toLocaleLowerCase())!==((V=j[1])==null?void 0:V.toLocaleLowerCase()):!0})&&m.current===A.key&&(m.current="",v.current=b.current),m.current+=A.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=b.current,E(!1)},d);const P=v.current,O=N(M,[...M.slice((P||0)+1),...M.slice(0,(P||0)+1)],m.current);O!==-1?(y(O),b.current=O):A.key!==" "&&(m.current="",E(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),I=R.useMemo(()=>({onKeyDown:C,onKeyUp(A){A.key===" "&&E(!1)}}),[C,E]);return R.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function lg(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function XD(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Cx(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,v=f-a,y=Math.sqrt(m*m+v*v)/p;return i=d,a=f,l=h,y}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:v,nodeId:b,tree:y}=d;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:C}=T,k=[E,C],I=Tn(T),A=T.type==="mouseleave",N=at(m.floating,I),M=at(m.domReference,I),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),O=p.split("-")[0],j=f>P.right-P.width/2,D=h>P.bottom-P.height/2,V=XD(k,L),H=P.width>L.width,_=P.height>L.height,$=(H?L:P).left,K=(H?L:P).right,re=(_?L:P).top,ee=(_?L:P).bottom;if(N&&(s=!0,!A))return;if(M&&(s=!1),M&&!A){s=!0;return}if(A&&He(T.relatedTarget)&&at(m.floating,T.relatedTarget)||y&&Fr(y.nodesRef.current,b).some(B=>{let{context:z}=B;return z==null?void 0:z.open}))return;if(O==="top"&&h>=L.bottom-1||O==="bottom"&&h<=L.top+1||O==="left"&&f>=L.right-1||O==="right"&&f<=L.left+1)return S();let G=[];switch(O){case"top":G=[[$,L.top+1],[$,P.bottom-1],[K,P.bottom-1],[K,L.top+1]];break;case"bottom":G=[[$,P.top+1],[$,L.bottom-1],[K,L.bottom-1],[K,P.top+1]];break;case"left":G=[[P.right-1,ee],[P.right-1,re],[L.left+1,re],[L.left+1,ee]];break;case"right":G=[[L.right-1,ee],[L.right-1,re],[P.left+1,re],[P.left+1,ee]];break}function F(B){let[z,Y]=B;switch(O){case"top":{const Q=[H?z+t/2:j?z+t*4:z-t*4,Y+t+1],ue=[H?z-t/2:j?z+t*4:z-t*4,Y+t+1],U=[[P.left,j||H?P.bottom-t:P.top],[P.right,j?H?P.bottom-t:P.top:P.bottom-t]];return[Q,ue,...U]}case"bottom":{const Q=[H?z+t/2:j?z+t*4:z-t*4,Y-t],ue=[H?z-t/2:j?z+t*4:z-t*4,Y-t],U=[[P.left,j||H?P.top+t:P.bottom],[P.right,j?H?P.top+t:P.bottom:P.top+t]];return[Q,ue,...U]}case"left":{const Q=[z+t+1,_?Y+t/2:D?Y+t*4:Y-t*4],ue=[z+t+1,_?Y-t/2:D?Y+t*4:Y-t*4];return[...[[D||_?P.right-t:P.left,P.top],[D?_?P.right-t:P.left:P.right-t,P.bottom]],Q,ue]}case"right":{const Q=[z-t,_?Y+t/2:D?Y+t*4:Y-t*4],ue=[z-t,_?Y-t/2:D?Y+t*4:Y-t*4],U=[[D||_?P.left+t:P.right,P.top],[D?_?P.left+t:P.right:P.left+t,P.bottom]];return[Q,ue,...U]}}}if(!lg([E,C],G)){if(s&&!V)return S();if(!A&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}lg([E,C],F([f,h]))?!s&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const ps=e=>{const t=x.useId(),[n,r]=x.useState(e.open),o=x.useRef(null),s=x.useMemo(()=>[ki(10),Mf({fallbackAxisSideDirection:"end"}),_f(),cx({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Qr({open:n,middleware:s,transform:!0,whileElementsMounted:Pi,onOpenChange:(p,m)=>{var b;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(b=e.onChange)==null||b.call(e,p))}}),c=Ai(l),u=Xr(l),d=eo(l),{getReferenceProps:f,getFloatingProps:h}=Jr([c,u,d]);return w.jsxs(x.Fragment,{children:[w.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(Zr,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(ms,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:w.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[w.jsx(hx,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),w.jsx("header",{className:"mb-2",children:w.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},QD=e=>{const t=x.useRef(null),n=x.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=x.useState(!1),{context:a,refs:l}=Qr({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=Ai(a),u=eo(a),d=Xr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Jr([c,u,d]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(jo,{...h(e),as:ct.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:w.jsx(ct.span,{layoutId:o,children:e.trigger})}),w.jsx(fr,{children:s?w.jsx(Zr,{root:t,children:w.jsx(ms,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(ct.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Rx=300,JD=500,Px=(e="")=>Me("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),$u=x.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),cg=x.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o,floatingClassName:s="",label:i,...a},l)=>{const[c,u]=x.useState(r??!1),[d,f]=x.useState(!1),[h,p]=x.useState(null),m=x.useRef([]),v=x.useRef([]),b=x.useContext($u),y=pr(),g=gr(),T=CD(),S=fx(),E=y!==null,{floatingStyles:C,refs:k,context:I}=Qr({nodeId:T,open:c,transform:!0,strategy:"absolute",onOpenChange:u,whileElementsMounted:Pi,placement:E?"right":"bottom-start",middleware:[ki({mainAxis:E?0:4,alignmentAxis:E?-4:0}),Mf(),_f()]}),A=eo(I,{role:"menu",enabled:!0}),N=Xr(I,{bubbles:!0}),M=yx(I,{move:!1,enabled:n,delay:{open:Rx},handleClose:Cx({blockPointerEvents:!0})}),L=Ai(I,{event:"mousedown",toggle:!E,ignoreMouse:E,keyboardHandlers:!0}),P=jf(I,{loop:!0,listRef:m,activeIndex:h,nested:E,onNavigate:p}),O=ZD(I,{activeIndex:h,listRef:v,resetMs:JD,onMatch:c?p:void 0}),{getReferenceProps:j,getFloatingProps:D,getItemProps:V}=Jr([M,L,A,N,P,O]);x.useEffect(()=>{if(!g)return;function _(){u(!1)}function $(K){K.nodeId!==T&&K.parentId===y&&u(!1)}return g.events.on("click",_),g.events.on("menuopen",$),()=>{g.events.off("click",_),g.events.off("menuopen",$)}},[g,T,y]),x.useEffect(()=>{c&&g&&g.events.emit("menuopen",{parentId:y,nodeId:T})},[g,c,T,y]);const H=o?a.className:Me(Px(a.className));return w.jsxs(RD,{id:T,children:[w.jsx(x.Fragment,{children:a.asChild?w.jsx(Ho,{...j(b.getItemProps({...a,onFocus(_){var $;($=a.onFocus)==null||$.call(a,_),f(!1),b.setHasFocusInside(!0)}})),children:i,ref:Vu([k.setReference,S.ref,l]),tabIndex:E?b.activeIndex===S.index?0:-1:void 0,"data-open":c?"":void 0,"data-nested":E?"":void 0,role:E?"menuitem":void 0,"data-focus-inside":d?"":void 0,className:H}):w.jsxs("button",{type:"button",className:H,"data-open":c?"":void 0,"data-nested":E?"":void 0,role:E?"menuitem":void 0,"data-focus-inside":d?"":void 0,ref:Vu([k.setReference,S.ref,l]),tabIndex:E?b.activeIndex===S.index?0:-1:void 0,...j(b.getItemProps({...a,onFocus(_){var $;($=a.onFocus)==null||$.call(a,_),f(!1),b.setHasFocusInside(!0)}})),children:[i,E&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(sf,{size:14})]})]})}),w.jsx($u.Provider,{value:{activeIndex:h,setActiveIndex:p,getItemProps:V,setHasFocusInside:f,isOpen:c},children:w.jsx(xD,{elementsRef:m,labelsRef:v,children:c&&w.jsx(Zr,{preserveTabOrder:!0,children:w.jsx(ms,{context:I,modal:!1,initialFocus:E?-1:0,returnFocus:!E,children:w.jsx(t,{...D(),ref:k.setFloating,style:{...a.style,...C},className:Me("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",s),children:e})})})})})]})}),eN=x.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},s)=>{const i=x.useContext($u),a=fx({label:n?null:e}),l=gr(),c=a.index===i.activeIndex;return w.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":i.isOpen,tabIndex:c?0:-1,ref:Vu([a.ref,s]),className:Px(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[r,t?w.jsx(t,{size:16}):null]})}),tN=x.forwardRef((e,t)=>pr()!==null?w.jsx(cg,{...e,isParent:!1,ref:t}):w.jsx(PD,{children:w.jsx(cg,{...e,isParent:!0,ref:t})}));var En=function(){return En=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},En.apply(this,arguments)};function kx(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 gs(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function ys(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ug(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Bu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ma="right-scroll-bar-position",pa="width-before-scroll-bar",nN="with-scroll-bars-hidden",rN="--removed-body-scroll-bar-size";function Pc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oN(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var sN=typeof window<"u"?R.useLayoutEffect:R.useEffect,dg=new WeakMap;function iN(e,t){var n=oN(null,function(r){return e.forEach(function(o){return Pc(o,r)})});return sN(function(){var r=dg.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Pc(a,null)}),s.forEach(function(a){o.has(a)||Pc(a,i)})}dg.set(n,e)},[e]),n}function aN(e){return e}function lN(e,t){t===void 0&&(t=aN);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function cN(e){e===void 0&&(e={});var t=lN(null);return t.options=En({async:!0,ssr:!1},e),t}var Ix=function(e){var t=e.sideCar,n=kx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return R.createElement(r,En({},n))};Ix.isSideCarExport=!0;function uN(e,t){return e.useMedium(t),Ix}var Ax=cN(),kc=function(){},Al=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:kc,onWheelCapture:kc,onTouchMoveCapture:kc}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,y=e.gapMode,g=kx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,S=iN([n,t]),E=En(En({},g),o);return R.createElement(R.Fragment,null,u&&R.createElement(T,{sideCar:Ax,removeScrollBar:c,shards:d,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?R.cloneElement(R.Children.only(a),En(En({},E),{ref:S})):R.createElement(b,En({},E,{className:l,ref:S}),a))});Al.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Al.classNames={fullWidth:pa,zeroRight:ma};var dN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dN();return t&&e.setAttribute("nonce",t),e}function hN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fN())&&(hN(t,n),mN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gN=function(){var e=pN();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ox=function(){var e=gN(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},yN={left:0,top:0,right:0,gap:0},Ic=function(e){return parseInt(e||"",10)||0},vN=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ic(n),Ic(r),Ic(o)]},bN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yN;var t=vN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xN=Ox(),Po="data-scroll-locked",wN=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
173
173
|
.`.concat(nN,` {
|
|
174
174
|
overflow: hidden `).concat(r,`;
|
|
175
175
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
@@ -209,29 +209,29 @@
|
|
|
209
209
|
`)},fg=function(){var e=parseInt(document.body.getAttribute(Po)||"0",10);return isFinite(e)?e:0},SN=function(){R.useEffect(function(){return document.body.setAttribute(Po,(fg()+1).toString()),function(){var e=fg()-1;e<=0?document.body.removeAttribute(Po):document.body.setAttribute(Po,e.toString())}},[])},TN=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;SN();var s=R.useMemo(function(){return bN(o)},[o]);return R.createElement(xN,{styles:wN(s,!t,o,n?"":"!important")})},Wu=!1;if(typeof window<"u")try{var Ji=Object.defineProperty({},"passive",{get:function(){return Wu=!0,!0}});window.addEventListener("test",Ji,Ji),window.removeEventListener("test",Ji,Ji)}catch{Wu=!1}var fo=Wu?{passive:!1}:!1,EN=function(e){return e.tagName==="TEXTAREA"},_x=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!EN(e)&&n[t]==="visible")},CN=function(e){return _x(e,"overflowY")},RN=function(e){return _x(e,"overflowX")},hg=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Mx(e,r);if(o){var s=Dx(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},PN=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},kN=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Mx=function(e,t){return e==="v"?CN(t):RN(t)},Dx=function(e,t){return e==="v"?PN(t):kN(t)},IN=function(e,t){return e==="h"&&t==="rtl"?-1:1},AN=function(e,t,n,r,o){var s=IN(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,u=i>0,d=0,f=0;do{var h=Dx(e,a),p=h[0],m=h[1],v=h[2],b=m-v-s*p;(p||b)&&Mx(e,a)&&(d+=b,f+=p),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(d)<1||!o)||!u&&(Math.abs(f)<1||!o))&&(c=!0),c},ea=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mg=function(e){return[e.deltaX,e.deltaY]},pg=function(e){return e&&"current"in e?e.current:e},ON=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_N=function(e){return`
|
|
210
210
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
211
211
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
212
|
-
`)},MN=0,ho=[];function DN(e){var t=R.useRef([]),n=R.useRef([0,0]),r=R.useRef(),o=R.useState(MN++)[0],s=R.useState(Ox)[0],i=R.useRef(e);R.useEffect(function(){i.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Bu([e.lockRef.current],(e.shards||[]).map(pg),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=R.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var b=ea(m),y=n.current,g="deltaX"in m?m.deltaX:y[0]-b[0],T="deltaY"in m?m.deltaY:y[1]-b[1],x,E=m.target,C=Math.abs(g)>Math.abs(T)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var k=hg(C,E);if(!k)return!0;if(k?x=C:(x=C==="v"?"h":"v",k=hg(C,E)),!k)return!1;if(!r.current&&"changedTouches"in m&&(g||T)&&(r.current=x),!x)return!0;var I=r.current||x;return AN(I,v,m,I==="h"?g:T,!0)},[]),l=R.useCallback(function(m){var v=m;if(!(!ho.length||ho[ho.length-1]!==s)){var b="deltaY"in v?mg(v):ea(v),y=t.current.filter(function(x){return x.name===v.type&&(x.target===v.target||v.target===x.shadowParent)&&ON(x.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var g=(i.current.shards||[]).map(pg).filter(Boolean).filter(function(x){return x.contains(v.target)}),T=g.length>0?a(v,g[0]):!i.current.noIsolation;T&&v.cancelable&&v.preventDefault()}}},[]),c=R.useCallback(function(m,v,b,y){var g={name:m,delta:v,target:b,should:y,shadowParent:NN(b)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(T){return T!==g})},1)},[]),u=R.useCallback(function(m){n.current=ea(m),r.current=void 0},[]),d=R.useCallback(function(m){c(m.type,mg(m),m.target,a(m,e.lockRef.current))},[]),f=R.useCallback(function(m){c(m.type,ea(m),m.target,a(m,e.lockRef.current))},[]);R.useEffect(function(){return ho.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,fo),document.addEventListener("touchmove",l,fo),document.addEventListener("touchstart",u,fo),function(){ho=ho.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,fo),document.removeEventListener("touchmove",l,fo),document.removeEventListener("touchstart",u,fo)}},[]);var h=e.removeScrollBar,p=e.inert;return R.createElement(R.Fragment,null,p?R.createElement(s,{styles:_N(o)}):null,h?R.createElement(TN,{gapMode:e.gapMode}):null)}function NN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jN=uN(Ax,DN);var Nx=R.forwardRef(function(e,t){return R.createElement(Al,En({},e,{ref:t,sideCar:jN}))});Nx.classNames=Al.classNames;const LN=(e,t)=>Ta()?t:window.matchMedia(e).matches,FN=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(LN(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},cn="600ms",VN={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:cn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:cn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:cn}},$N={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:cn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:cn}},Ac={drawer:e=>e==="left"?VN:$N,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:cn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:cn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:cn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:cn},enter:{opacity:1,scale:[1.05,1],animationDuration:cn},exit:{opacity:0,scale:.97,animationDuration:cn}}},BN=os("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"}}),WN={top:0,left:0,right:0,bottom:-1},zN=e=>e*.62,HN=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=zN(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return S.jsx(lt.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:WN,whileDrag:{cursor:"grabbing"},className:Me("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?S.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Oc={drawer:"right",sheet:"none",dialog:"none"},UN=({open:e,title:t,footer:n,asChild:r,trigger:o,children:s,layoutId:i,onChange:a,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:f="",type:h="dialog",position:p,overlayClickClose:m=!1,...v})=>{const b=w.useId(),y=w.useId(),g=FN("(min-width: 64rem)"),T=h!=="dialog",x=g?h==="drawer"?p:Oc[h]:d?Oc[h]:Oc.sheet,E=g||d?Ac[h]:Ac.sheet,C=typeof E=="function"?E(x):E,k=g||d?h:"sheet",{refs:I,context:A}=Qr({open:e,onOpenChange:a}),N=Ai(A),O=eo(A),L=Xr(A,{escapeKey:!0,referencePress:!0,outsidePress:m}),{getReferenceProps:P,getFloatingProps:M}=Jr([N,O,L]),j=o,D=$r(void 0),V=()=>a(!1);return S.jsxs(w.Fragment,{children:[o?S.jsx(w.Fragment,{children:r?S.jsx(Ho,{ref:I.setReference,...P({layoutId:i}),children:j}):S.jsx(lt.button,{ref:I.setReference,...P(),layoutId:i,type:"button",children:j})}):null,S.jsx(Zr,{children:S.jsx(fr,{mode:"wait",presenceAffectsLayout:!0,children:e?S.jsx(Nx,{enabled:!0,forwardProps:!0,removeScrollBar:!0,inert:!0,noIsolation:!0,children:S.jsx(VD,{lockScroll:!0,className:Me(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${k==="drawer"?"":"flex items-start justify-center p-10"}`,f),children:S.jsx(ms,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:A,children:S.jsxs(lt.div,{...v,exit:"exit",animate:"enter",initial:"initial",variants:C,"data-component":"modal",ref:I.setFloating,"aria-modal":e,layoutId:i,"aria-labelledby":b,"aria-describedby":y,className:Me(BN({position:x,type:k}),l),style:k==="drawer"?{width:D}:{height:D},...M(),children:[t?S.jsx("header",{className:"relative w-full",children:t?S.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,S.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s}),n?S.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?S.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:S.jsx("button",{type:"button",onClick:V,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:S.jsx(lf,{})})}):null,T&&c?S.jsx(HN,{onChange:a,parent:I.floating,position:x,sheet:k==="sheet",value:D}):null]})})})}):null})})]})},GN=e=>S.jsx(lt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),jx=({as:e,title:t,children:n,placement:r,open:o,focus:s=!0,hover:i=!0,enabled:a=!0,popover:l=!0,followCursor:c=!1,onChange:u=Sd,...d})=>{const[f,h]=w.useState(o??!1),p=w.useRef(null),m=e||"span",v=O=>{h(O),u==null||u(O)},{refs:b,floatingStyles:y,context:g}=Qr({open:f,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:Pi,onOpenChange:o?void 0:v,middleware:[_f(),ki(5),Mf({fallbackAxisSideDirection:"start"}),cx({padding:5,element:p})]}),T=yx(g,{move:!0,delay:{open:Rx},enabled:a?i:!1,handleClose:l?Cx():null}),x=UD(g,{enabled:a?s:!1}),E=Ai(g,{enabled:a?l:!1}),C=Xr(g,{enabled:a}),k=eo(g,{role:"tooltip",enabled:a}),I=BD(g,{enabled:!!a&&!!c}),{getReferenceProps:A,getFloatingProps:N}=Jr([k,C,I,s?x:void 0,i?T:void 0,l?E:void 0]);return w.useEffect(()=>h(o===void 0?!1:o),[o]),S.jsxs(w.Fragment,{children:[S.jsx(m,{ref:b.setReference,...A(d),children:t}),f&&S.jsx(Zr,{preserveTabOrder:!0,children:S.jsxs(ss,{...N(),ref:b.setFloating,style:y,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[S.jsx(hx,{ref:p,context:g,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Ua{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Ua.getDescendantProperty(a[l],s,r);else s&&Ua.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Mr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Mr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Ua.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Mr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Mr.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 Mr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const Ol=0,yr=1,vs=2,Lx=4;function si(e,t){return n=>e(t(n))}function YN(e,t){return t(e)}function Fx(e,t){return n=>e(t,n)}function gg(e,t){return()=>e(t)}function _l(e,t){return t(e),e}function et(...e){return e}function qN(e){e()}function yg(e){return()=>e}function KN(...e){return()=>{e.map(qN)}}function Lf(e){return e!==void 0}function to(){}function ze(e,t){return e(yr,t)}function Se(e,t){e(Ol,t)}function Ff(e){e(vs)}function Mt(e){return e(Lx)}function he(e,t){return ze(e,Fx(t,Ol))}function _n(e,t){const n=e(yr,r=>{n(),t(r)});return n}function Ie(){const e=[];return(t,n)=>{switch(t){case vs:e.splice(0,e.length);return;case yr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ol:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ne(e){let t=e;const n=Ie();return(r,o)=>{switch(r){case yr:o(t);break;case Ol:t=o;break;case Lx:return t}return n(r,o)}}function ZN(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case yr:return s?n===s?void 0:(r(),n=s,t=ze(e,s),t):(r(),to);case vs:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Zt(e){return _l(Ie(),t=>he(e,t))}function Dt(e,t){return _l(ne(t),n=>he(e,n))}function XN(...e){return t=>e.reduceRight(YN,t)}function K(e,...t){const n=XN(...t);return(r,o)=>{switch(r){case yr:return ze(e,n(o));case vs:Ff(e);return}}}function Vx(e,t){return e===t}function Je(e=Vx){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ye(e){return t=>n=>{e(n)&&t(n)}}function de(e){return t=>si(t,e)}function xn(e){return t=>()=>t(e)}function Rn(e,t){return n=>r=>n(t=e(t,r))}function Zo(e){return t=>n=>{e>0?e--:t(n)}}function nr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function vg(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ee(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);ze(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function bg(...e){return function(t,n){switch(t){case yr:return KN(...e.map(r=>ze(r,n)));case vs:return;default:throw new Error(`unrecognized action ${t}`)}}}function be(e,t=Vx){return K(e,Je(t))}function Tt(...e){const t=Ie(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);ze(s,l=>{n[i]=l,r=r|a,r===o&&Se(t,n)})}),function(s,i){switch(s){case yr:return r===o&&i(n),ze(t,i);case vs:return Ff(t);default:throw new Error(`unrecognized action ${s}`)}}}function je(e,t=[],{singleton:n}={singleton:!0}){return{id:QN(),constructor:e,dependencies:t,singleton:n}}const QN=()=>Symbol();function JN(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function ej(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const ta=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Vf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(b,y){b.propsReady&&Se(b.propsReady,!1);for(const g of r){const T=b[t.required[g]];Se(T,y[g])}for(const g of o)if(g in y){const T=b[t.optional[g]];Se(T,y[g])}b.propsReady&&Se(b.propsReady,!0)}function c(b){return s.reduce((y,g)=>(y[g]=T=>{const x=b[t.methods[g]];Se(x,T)},y),{})}function u(b){return i.reduce((y,g)=>(y[g]=ZN(b[t.events[g]]),y),{})}const d=w.forwardRef((b,y)=>{const{children:g,...T}=b,[x]=w.useState(()=>_l(JN(e),C=>l(C,T))),[E]=w.useState(gg(u,x));return ta(()=>{for(const C of i)C in T&&ze(E[C],T[C]);return()=>{Object.values(E).map(Ff)}},[T,E,x]),ta(()=>{l(x,T)}),w.useImperativeHandle(y,yg(c(x))),w.createElement(a.Provider,{value:x},n?w.createElement(n,ej([...r,...o,...i],T),g):g)}),f=b=>w.useCallback(Fx(Se,w.useContext(a)[b]),[b]),h=b=>{const g=w.useContext(a)[b],T=w.useCallback(x=>ze(g,x),[g]);return w.useSyncExternalStore(T,()=>Mt(g),()=>Mt(g))},p=b=>{const g=w.useContext(a)[b],[T,x]=w.useState(gg(Mt,g));return ta(()=>ze(g,E=>{E!==T&&x(yg(E))}),[g,T]),T},m=w.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(b,y)=>{const T=w.useContext(a)[b];ta(()=>ze(T,y),[y,T])}}}const tj=typeof document<"u"?w.useLayoutEffect:w.useEffect,nj=tj;var Xt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Xt||{});const rj={0:"debug",1:"log",2:"warn",3:"error"},oj=()=>typeof globalThis>"u"?window:globalThis,vr=je(()=>{const e=ne(3);return{log:ne((n,r,o=1)=>{var s;const i=(s=oj().VIRTUOSO_LOG_LEVEL)!=null?s:Mt(e);o>=i&&console[rj[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function $f(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Mn(e,t=!0){return $f(e,t).callbackRef}function $x(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=sj(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(ij("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return $f(a,n)}function sj(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Xt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function ij(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Xt.WARN),t==="normal"?0:parseInt(t??"0",10)}function mn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Bx(e,t){return Math.abs(e-t)<1.01}function Wx(e,t,n,r=to,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,v=h?window.innerHeight:f.offsetHeight,b=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?b():pi.flushSync(b),i.current!==null&&(p===i.current||p<=0||p===m-v)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,v;f===window?(m=Math.max(mn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=f.scrollHeight,p=mn(f,"height"),v=f.scrollTop);const b=m-p;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),Bx(p,m)||d.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Bt=je(()=>{const e=Ie(),t=Ie(),n=ne(0),r=Ie(),o=ne(0),s=Ie(),i=Ie(),a=ne(0),l=ne(0),c=ne(0),u=ne(0),d=Ie(),f=Ie(),h=ne(!1);return he(K(e,de(({scrollTop:p})=>p)),t),he(K(e,de(({scrollHeight:p})=>p)),i),he(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),ii={lvl:0};function zx(e,t,n,r=ii,o=ii){return{k:e,v:t,lvl:n,l:r,r:o}}function Ye(e){return e===ii}function ko(){return ii}function zu(e,t){if(Ye(e))return ii;const{k:n,l:r,r:o}=e;if(t===n){if(Ye(r))return o;if(Ye(o))return r;{const[s,i]=Hx(r);return ga(vt(e,{k:s,v:i,l:Ux(r)}))}}else return t<n?ga(vt(e,{l:zu(r,t)})):ga(vt(e,{r:zu(o,t)}))}function ai(e,t){if(!Ye(e))return t===e.k?e.v:t<e.k?ai(e.l,t):ai(e.r,t)}function pn(e,t,n="k"){if(Ye(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=pn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return pn(e.l,t,n)}function Kt(e,t,n){return Ye(e)?zx(t,n,1):t===e.k?vt(e,{k:t,v:n}):t<e.k?xg(vt(e,{l:Kt(e.l,t,n)})):xg(vt(e,{r:Kt(e.r,t,n)}))}function Hu(e,t,n){if(Ye(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Hu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Hu(i,t,n))),a}function Dr(e){return Ye(e)?[]:[...Dr(e.l),{k:e.k,v:e.v},...Dr(e.r)]}function Hx(e){return Ye(e.r)?[e.k,e.v]:Hx(e.r)}function Ux(e){return Ye(e.r)?e.l:ga(vt(e,{r:Ux(e.r)}))}function vt(e,t){return zx(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 _c(e){return Ye(e)||e.lvl>e.r.lvl}function xg(e){return Uu(Yx(e))}function ga(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(_c(t))return Yx(vt(e,{lvl:r-1}));if(!Ye(t)&&!Ye(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(_c(e))return Uu(vt(e,{lvl:r-1}));if(!Ye(n)&&!Ye(n.l)){const o=n.l,s=_c(o)?n.lvl-1:n.lvl;return vt(o,{l:vt(e,{r:o.l,lvl:r-1}),r:Uu(vt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Ml(e,t,n){if(Ye(e))return[];const r=pn(e,t)[0];return aj(Hu(e,r,n))}function Gx(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function aj(e){return Gx(e,({k:t,v:n})=>({index:t,value:n}))}function Uu(e){const{r:t,lvl:n}=e;return!Ye(t)&&!Ye(t.r)&&t.lvl===n&&t.r.lvl===n?vt(t,{l:vt(e,{r:t.l}),lvl:n+1}):e}function Yx(e){const{l:t}=e;return!Ye(t)&&t.lvl===e.lvl?vt(t,{r:vt(e,{l:t.r})}):e}function Ga(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function qx(e,t,n){return e[Ga(e,t,n)]}function lj(e,t,n,r){const o=Ga(e,t,r),s=Ga(e,n,r,o);return e.slice(o,s+1)}const Bf=je(()=>({recalcInProgress:ne(!1)}),[],{singleton:!0});function cj(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 wg(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 uj(e,t){let n=Ye(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Ye(e)){e=Kt(e,0,o);continue}const a=Ml(e,s-1,i+1);if(a.some(cj(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=zu(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Kt(e,i+1,f));c&&(e=Kt(e,s,o))}return[e,n]}function dj(){return{offsetTree:[],sizeTree:ko(),groupOffsetTree:ko(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Wf({index:e},t){return t===e?0:t<e?-1:1}function fj({offset:e},t){return t===e?0:t<e?-1:1}function hj(e){return{index:e.index,value:e}}function mj(e,t,n,r=0){return r>0&&(t=Math.max(t,qx(e,r,Wf).offset)),Gx(lj(e,t,n,fj),hj)}function Gu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ga(o,t-1,Wf),a=o[l].offset;const u=pn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===pn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ml(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function pj(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Xt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Ye(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Kt(Kt(p,m,f),m+1,h),i)}else[i,a]=uj(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Gu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,li(h,l,o)),ko()),groupIndices:n}}function li(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=qx(t,e,Wf),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function gj(e){return typeof e.groupIndex<"u"}function Kx(e,t,n){if(gj(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Zx(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Zx(e,t){if(!Dl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Dl(e){return!Ye(e.groupOffsetTree)}function yj(e){return Dr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const vj={offsetHeight:"height",offsetWidth:"width"},jn=je(([{log:e},{recalcInProgress:t}])=>{const n=Ie(),r=Ie(),o=Dt(r,0),s=Ie(),i=Ie(),a=ne(0),l=ne([]),c=ne(void 0),u=ne(void 0),d=ne((x,E)=>mn(x,vj[E])),f=ne(void 0),h=ne(0),p=dj(),m=Dt(K(n,Ee(l,e,h),Rn(pj,p),Je()),p),v=Dt(K(l,Je(),Rn((x,E)=>({prev:x.current,current:E}),{prev:[],current:[]}),de(({prev:x})=>x)),[]);he(K(l,ye(x=>x.length>0),Ee(m,h),de(([x,E,C])=>{const k=x.reduce((I,A,N)=>Kt(I,A,li(A,E.offsetTree,C)||N),ko());return{...E,groupIndices:x,groupOffsetTree:k}})),m),he(K(r,Ee(m),ye(([x,{lastIndex:E}])=>x<E),de(([x,{lastIndex:E,lastSize:C}])=>[{startIndex:x,endIndex:E,size:C}])),n),he(c,u);const b=Dt(K(c,de(x=>x===void 0)),!0);he(K(u,ye(x=>x!==void 0&&Ye(Mt(m).sizeTree)),de(x=>[{startIndex:0,endIndex:0,size:x}])),n);const y=Zt(K(n,Ee(m),Rn(({sizes:x},[E,C])=>({changed:C!==x,sizes:C}),{changed:!1,sizes:p}),de(x=>x.changed)));ze(K(a,Rn((x,E)=>({diff:x.prev-E,prev:E}),{diff:0,prev:0}),de(x=>x.diff)),x=>{const{groupIndices:E}=Mt(m);if(x>0)Se(t,!0),Se(s,x+wg(x,E));else if(x<0){const C=Mt(v);C.length>0&&(x-=wg(-x,C)),Se(i,x)}}),ze(K(a,Ee(e)),([x,E])=>{x<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},Xt.ERROR)});const g=Zt(s);he(K(s,Ee(m),de(([x,E])=>{const C=E.groupIndices.length>0,k=[],I=E.lastSize;if(C){const A=ai(E.sizeTree,0);let N=0,O=0;for(;N<x;){const M=E.groupIndices[O],j=E.groupIndices.length===O+1?1/0:E.groupIndices[O+1]-M-1;k.push({startIndex:M,endIndex:M,size:A}),k.push({startIndex:M+1,endIndex:M+1+j-1,size:I}),O++,N+=j+1}const L=Dr(E.sizeTree);return N!==x&&L.shift(),L.reduce((M,{k:j,v:D})=>{let V=M.ranges;return M.prevSize!==0&&(V=[...M.ranges,{startIndex:M.prevIndex,endIndex:j+x-1,size:M.prevSize}]),{ranges:V,prevIndex:j+x,prevSize:D}},{ranges:k,prevIndex:x,prevSize:0}).ranges}return Dr(E.sizeTree).reduce((A,{k:N,v:O})=>({ranges:[...A.ranges,{startIndex:A.prevIndex,endIndex:N+x-1,size:A.prevSize}],prevIndex:N+x,prevSize:O}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Zt(K(i,Ee(m,h),de(([x,{offsetTree:E},C])=>{const k=-x;return li(k,E,C)})));return he(K(i,Ee(m,h),de(([x,E,C])=>{if(E.groupIndices.length>0){if(Ye(E.sizeTree))return E;let I=ko();const A=Mt(v);let N=0,O=0,L=0;for(;N<-x;){L=A[O];const M=A[O+1]-L-1;O++,N+=M+1}if(I=Dr(E.sizeTree).reduce((M,{k:j,v:D})=>Kt(M,Math.max(0,j+x),D),I),N!==-x){const M=ai(E.sizeTree,L);I=Kt(I,0,M);const j=pn(E.sizeTree,-x+1)[1];I=Kt(I,1,j)}return{...E,sizeTree:I,...Gu(E.offsetTree,0,I,C)}}else{const I=Dr(E.sizeTree).reduce((A,{k:N,v:O})=>Kt(A,Math.max(0,N+x),O),ko());return{...E,sizeTree:I,...Gu(E.offsetTree,0,I,C)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:y,statefulTotalCount:o,trackItemSizes:b,itemSize:d}},et(vr,Bf),{singleton:!0}),bj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Xx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oi=je(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ie(),p=Ie(),m=ne(0);let v=null,b=null,y=null;function g(){v&&(v(),v=null),y&&(y(),y=null),b&&(clearTimeout(b),b=null),Se(o,!1)}return he(K(h,Ee(e,s,t,m,l,c,f),Ee(r,u,d),de(([[T,x,E,C,k,I,A,N],O,L,P])=>{const M=Xx(T),{align:j,behavior:D,offset:V}=M,z=C-1,_=Kx(M,x,z);let $=li(_,x.offsetTree,O)+I;j==="end"?($+=L+pn(x.sizeTree,_)[1]-E+P,_===z&&($+=A)):j==="center"?$+=(L+pn(x.sizeTree,_)[1]-E+P)/2:$-=k,V&&($+=V);const Z=re=>{g(),re?(N("retrying to scroll to",{location:T},Xt.DEBUG),Se(h,T)):(Se(p,!0),N("list did not change, scroll successful",{},Xt.DEBUG))};if(g(),D==="smooth"){let re=!1;y=ze(n,ee=>{re=re||ee}),v=_n(a,()=>{Z(re)})}else v=_n(K(n,xj(150)),Z);return b=setTimeout(()=>{g()},1200),Se(o,!0),N("scrolling from index to",{index:_,top:$,behavior:D},Xt.DEBUG),{top:$,behavior:D}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},et(jn,Bt,vr),{singleton:!0});function xj(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ci="up",zs="down",wj="none",Sj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},Tj=0,_i=je(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ne(!1),a=ne(!0),l=Ie(),c=Ie(),u=ne(4),d=ne(Tj),f=Dt(K(bg(K(be(t),Zo(1),xn(!0)),K(be(t),Zo(1),xn(!1),vg(100))),Je()),!1),h=Dt(K(bg(K(s,xn(!0)),K(s,xn(!1),vg(200))),Je()),!1);he(K(Tt(be(t),be(d)),de(([y,g])=>y<=g),Je()),a),he(K(a,nr(50)),c);const p=Zt(K(Tt(e,be(n),be(r),be(o),be(u)),Rn((y,[{scrollTop:g,scrollHeight:T},x,E,C,k])=>{const I=g+x-T>-k,A={viewportHeight:x,scrollTop:g,scrollHeight:T};if(I){let O,L;return g>y.state.scrollTop?(O="SCROLLED_DOWN",L=y.state.scrollTop-g):(O="SIZE_DECREASED",L=y.state.scrollTop-g||y.scrollTopDelta),{atBottom:!0,state:A,atBottomBecause:O,scrollTopDelta:L}}let N;return A.scrollHeight>y.state.scrollHeight?N="SIZE_INCREASED":x<y.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":g<y.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:A}},Sj),Je((y,g)=>y&&y.atBottom===g.atBottom))),m=Dt(K(e,Rn((y,{scrollTop:g,scrollHeight:T,viewportHeight:x})=>{if(Bx(y.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+x)<1;return y.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:y.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ye(y=>y.changed),de(y=>y.jump)),0);he(K(p,de(y=>y.atBottom)),i),he(K(i,nr(50)),l);const v=ne(zs);he(K(e,de(({scrollTop:y})=>y),Je(),Rn((y,g)=>Mt(h)?{direction:y.direction,prevScrollTop:g}:{direction:g<y.prevScrollTop?ci:zs,prevScrollTop:g},{direction:zs,prevScrollTop:0}),de(y=>y.direction)),v),he(K(e,nr(50),xn(wj)),v);const b=ne(0);return he(K(f,ye(y=>!y),xn(0)),b),he(K(t,nr(100),Ee(f),ye(([y,g])=>!!g),Rn(([y,g],[T])=>[g,T],[0,0]),de(([y,g])=>g-y)),b),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:m}},et(Bt)),br=je(([{log:e}])=>{const t=ne(!1),n=Zt(K(t,ye(r=>r),Je()));return ze(t,r=>{r&&Mt(e)("props updated",{},Xt.DEBUG)}),{propsReady:t,didMount:n}},et(vr),{singleton:!0});function zf(e,t){e==0?t():requestAnimationFrame(()=>zf(e-1,t))}function Hf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Mi=je(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=ne(!0),l=ne(0),c=ne(!0);return he(K(i,Ee(l),ye(([u,d])=>!!d),xn(!1)),a),he(K(i,Ee(l),ye(([u,d])=>!!d),xn(!1)),c),ze(K(Tt(t,i),Ee(a,e,n,c),ye(([[,u],d,{sizeTree:f},h,p])=>u&&(!Ye(f)||Lf(h))&&!d&&!p),Ee(l)),([,u])=>{_n(s,()=>{Se(c,!0)}),zf(4,()=>{_n(r,()=>{Se(a,!0)}),Se(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},et(jn,Bt,Oi,br),{singleton:!0});function Sg(e){return e?e==="smooth"?"smooth":"auto":!1}const Ej=(e,t)=>typeof e=="function"?Sg(e(t)):t&&Sg(e),Cj=je(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ne(!1),d=Ie();let f=null;function h(m){Se(o,{index:"LAST",align:"end",behavior:m})}ze(K(Tt(K(be(e),Zo(1)),a),Ee(be(u),n,s,c),de(([[m,v],b,y,g,T])=>{let x=v&&g,E="auto";return x&&(E=Ej(b,y||T),x=x&&!!E),{totalCount:m,shouldFollow:x,followOutputBehavior:E}}),ye(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{f&&(f(),f=null),f=_n(t,()=>{Mt(l)("following output to ",{totalCount:m},Xt.DEBUG),h(v),f=null})});function p(m){const v=_n(r,b=>{m&&!b.atBottom&&b.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Mt(l)("scrolling to bottom due to increased size",{},Xt.DEBUG),h("auto"))});setTimeout(v,100)}return ze(K(Tt(be(u),e,i),ye(([m,,v])=>m&&v),Rn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),ye(({refreshed:m})=>m),Ee(u,e)),([,m])=>{Mt(s)&&p(m!==!1)}),ze(d,()=>{p(Mt(u)!==!1)}),ze(Tt(be(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},et(jn,_i,Oi,Mi,br,vr,Bt));function Rj(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Qx=je(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ie(),i=Ie(),a=Zt(K(s,de(Rj)));return he(K(a,de(l=>l.totalCount)),e),he(K(a,de(l=>l.groupIndices)),t),he(K(Tt(r,n,o),ye(([l,c])=>Dl(c)),de(([l,c,u])=>pn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Je(),de(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},et(jn,Bt));function ui(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Jx(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Ya="top",qa="bottom",Tg="none";function Eg(e,t,n){return typeof e=="number"?n===ci&&t===Ya||n===zs&&t===qa?e:0:n===ci?t===Ya?e.main:e.reverse:t===qa?e.main:e.reverse}function Cg(e,t){return typeof e=="number"?e:e[t]||0}const Uf=je(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ie(),i=ne(0),a=ne(0),l=ne(0),c=Dt(K(Tt(be(e),be(t),be(r),be(s,ui),be(l),be(i),be(o),be(n),be(a)),de(([u,d,f,[h,p],m,v,b,y,g])=>{const T=u-y,x=v+b,E=Math.max(f-T,0);let C=Tg;const k=Cg(g,Ya),I=Cg(g,qa);return h-=y,h+=f+b,p+=f+b,p-=y,h>u+x-k&&(C=ci),p<u-E+d+I&&(C=zs),C!==Tg?[Math.max(T-f-Eg(m,Ya,C)-k,0),T-E-b+d+Eg(m,qa,C)+I]:null}),ye(u=>u!=null),Je(ui)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},et(Bt),{singleton:!0});function Pj(e,t,n){if(Dl(t)){const r=Zx(e,t);return[{index:pn(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 Mc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Rg(e,t,n){if(e.length===0)return[];if(!Dl(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=Ml(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function ya(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:Rg(e,o,s),topItems:Rg(t,o,s),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function ew(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Hf(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return ya(c,[],a,o,n,r)}const no=je(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=ne([]),v=ne(0),b=Ie();he(s.topItemsIndexes,m);const y=Dt(K(Tt(h,p,be(i,ui),be(t),be(e),be(u),c,be(m),be(r),be(o),n),ye(([E,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return E&&!C&&!A}),de(([,,[E,C],k,I,A,N,O,L,P,M])=>{const j=I,{sizeTree:D,offsetTree:V}=j,z=Mt(v);if(k===0)return{...Mc,totalCount:k};if(E===0&&C===0)return z===0?{...Mc,totalCount:k}:ew(z,A,I,L,P,M||[]);if(Ye(D))return z>0?null:ya(Pj(Hf(A,k),j,M),[],k,P,j,L);const _=[];if(O.length>0){const G=O[0],F=O[O.length-1];let B=0;for(const H of Ml(D,G,F)){const Y=H.value,Q=Math.max(H.start,G),ue=Math.min(H.end,F);for(let U=Q;U<=ue;U++)_.push({index:U,size:Y,offset:B,data:M&&M[U]}),B+=Y}}if(!N)return ya([],_,k,P,j,L);const $=O.length>0?O[O.length-1]+1:0,Z=mj(V,E,C,$);if(Z.length===0)return null;const re=k-1,ee=_l([],G=>{for(const F of Z){const B=F.value;let H=B.offset,Y=F.start;const Q=B.size;if(B.offset<E){Y+=Math.floor((E-B.offset+P)/(Q+P));const U=Y-F.start;H+=U*Q+U*P}Y<$&&(H+=($-Y)*Q,Y=$);const ue=Math.min(F.end,re);for(let U=Y;U<=ue&&!(H>=C);U++)G.push({index:U,size:Q,offset:H,data:M&&M[U]}),H+=Q+P}});return ya(ee,_,k,P,j,L)}),ye(E=>E!==null),Je()),Mc);he(K(n,ye(Lf),de(E=>E==null?void 0:E.length)),t),he(K(y,de(E=>E.topListHeight)),d),he(d,l),he(K(y,de(E=>[E.top,E.bottom])),a),he(K(y,de(E=>E.items)),b);const g=Zt(K(y,ye(({items:E})=>E.length>0),Ee(t,n),ye(([{items:E},C])=>E[E.length-1].originalIndex===C-1),de(([,E,C])=>[E-1,C]),Je(ui),de(([E])=>E))),T=Zt(K(y,nr(200),ye(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),de(({items:E})=>E[0].index),Je())),x=Zt(K(y,ye(({items:E})=>E.length>0),de(({items:E})=>{let C=0,k=E.length-1;for(;E[C].type==="group"&&C<k;)C++;for(;E[k].type==="group"&&k>C;)k--;return{startIndex:E[C].index,endIndex:E[k].index}}),Je(Jx)));return{listState:y,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:x,itemsRendered:b,initialItemCount:v,...f}},et(jn,Qx,Uf,Mi,Oi,_i,br,Bf),{singleton:!0}),kj=je(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(he(K(a,Ee(s),ye(([,l])=>l!==0),Ee(o,e,t,r,n),de(([[,l],c,u,d,f,h=[]])=>ew(l,c,u,d,f,h))),i),{}),et(jn,Mi,no,br),{singleton:!0}),tw=je(([{scrollVelocity:e}])=>{const t=ne(!1),n=Ie(),r=ne(!1);return he(K(e,Ee(r,t,n),ye(([o,s])=>!!s),de(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Je()),t),ze(K(Tt(t,e,n),Ee(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},et(_i),{singleton:!0}),Ij=je(([{topItemsIndexes:e}])=>{const t=ne(0);return he(K(t,ye(n=>n>0),de(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},et(no)),nw=je(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ie(),i=Dt(K(Tt(e,r,t,n,o),de(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return he(be(i),s),{totalListHeight:i,totalListHeightChanged:s}},et(Bt,no),{singleton:!0});function rw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const Aj=rw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Oj=je(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Zt(K(l,Ee(a),Rn(([,b,y,g],[{items:T,totalCount:x,bottom:E,offsetBottom:C},k])=>{const I=E+C;let A=0;return y===x&&b.length>0&&T.length>0&&(T[0].originalIndex===0&&b[0].originalIndex===0||(A=I-g,A!==0&&(A+=k))),[A,T,x,I]},[0,[],0,0]),ye(([b])=>b!==0),Ee(t,i,r,s,h,p),ye(([,b,y,g,,,T])=>!T&&!g&&b!==0&&y===ci),de(([[b],,,,,y])=>(y("Upward scrolling compensation",{amount:b},Xt.DEBUG),b))));function v(b){b>0?(Se(e,{top:-b,behavior:"auto"}),Se(n,0)):(Se(n,0),Se(e,{top:-b,behavior:"auto"}))}return ze(K(m,Ee(n,o)),([b,y,g])=>{g&&Aj()?Se(n,y-b):v(-b)}),ze(K(Tt(Dt(o,!1),n,p),ye(([b,y,g])=>!b&&!g&&y!==0),de(([b,y])=>y),nr(1)),v),he(K(u,de(b=>({top:-b}))),e),ze(K(c,Ee(d,f),de(([b,{lastSize:y,groupIndices:g,sizeTree:T},x])=>{function E(C){return C*(y+x)}if(g.length===0)return E(b);{let C=0;const k=ai(T,0);let I=0,A=0;for(;I<b;){I++,C+=k;let N=g.length===A+1?1/0:g[A+1]-g[A]-1;I+N>b&&(C-=k,N=b-I+1),I+=N,C+=E(N),A++}return C}})),b=>{Se(n,b),requestAnimationFrame(()=>{Se(e,{top:b}),requestAnimationFrame(()=>{Se(n,0),Se(p,!1)})})}),{deviation:n}},et(Bt,_i,no,jn,vr,Bf)),_j=je(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ne(0);return ze(K(e,Ee(r),ye(([,o])=>o!==0),de(([,o])=>({top:o}))),o=>{_n(K(n,Zo(1),ye(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Se(t,o)})})}),{initialScrollTop:r}},et(br,Bt,no),{singleton:!0}),Mj=je(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ne(!1),r=Dt(K(Tt(n,e,t),ye(([o])=>o),de(([,o,s])=>Math.max(0,o-s)),nr(0),Je()),0);return{alignToBottom:n,paddingTopAddition:r}},et(Bt,nw),{singleton:!0}),Gf=je(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ie(),r=Ie(),o=Ie(),s=ne(!1),i=ne(void 0);return he(K(Tt(n,r),de(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),he(K(e,Ee(r),de(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},et(Bt)),Dj=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,Nj=je(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ie();return he(K(u,Ee(e,o,t,s,i,a,r),Ee(n),de(([[d,f,h,p,m,v,b,y],g])=>{const{done:T,behavior:x,align:E,calculateViewLocation:C=Dj,...k}=d,I=Kx(d,f,p-1),A=li(I,f.offsetTree,g)+m+v,N=A+pn(f.sizeTree,I)[1],O=y+v,L=y+h-b,P=C({itemTop:A,itemBottom:N,viewportTop:O,viewportBottom:L,locationParams:{behavior:x,align:E,...k}});return P?T&&_n(K(l,ye(M=>M===!1),Zo(Mt(l)?1:2)),T):T&&T(),P}),ye(d=>d!==null)),c),{scrollIntoView:u}},et(jn,Bt,Oi,no,vr),{singleton:!0}),jj=je(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ie(),u=ne(void 0),d=ne(null),f=ne(null);return he(a,d),he(l,f),ze(K(c,Ee(e,n,i,d,f,r)),([h,p,m,v,b,y,g])=>{const T=yj(p.sizeTree);v&&b!==null&&y!==null&&(m=b.scrollTop-y.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),he(K(u,ye(Lf),de(Lj)),o),he(K(s,Ee(u),ye(([,h])=>h!==void 0),Je(),de(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},et(jn,Bt,Mi,br,Gf));function Lj(e){return{offset:e.scrollTop,index:0,align:"start"}}const Fj=je(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),et(Uf,kj,br,tw,nw,_j,Mj,Gf,Nj,vr)),ow=je(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,v,b,{listState:y,topItemsIndexes:g,...T},{scrollToIndex:x},E,{topItemCount:C},{groupCounts:k},I])=>(he(T.rangeChanged,I.scrollSeekRangeChanged),he(K(I.windowViewportRect,de(A=>A.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:u,...b,statefulTotalCount:c,listState:y,scrollToIndex:x,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:d,...v}),et(jn,Mi,Bt,jj,Cj,no,Oi,Oj,Ij,Qx,Fj)),Dc="-webkit-sticky",Pg="sticky",sw=rw(()=>{if(typeof document>"u")return Pg;const e=document.createElement("div");return e.style.position=Dc,e.style.position===Dc?Dc:Pg});function Yf(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=$f(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Nl=w.createContext(void 0),iw=w.createContext(void 0);function qf(e){return e}const Vj=je(()=>{const e=ne(l=>`Item ${l}`),t=ne(null),n=ne(l=>`Group ${l}`),r=ne({}),o=ne(qf),s=ne("div"),i=ne(to),a=(l,c=null)=>Dt(K(r,de(u=>u[l]),Je()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),$j=je(([e,t])=>({...e,...t}),et(ow,Vj)),Bj=({height:e})=>w.createElement("div",{style:{height:e}}),Wj={position:sw(),zIndex:1,overflowAnchor:"none"},zj={overflowAnchor:"none"},kg=w.memo(function({showTopList:t=!1}){const n=Pe("listState"),r=nn("sizeRanges"),o=Pe("useWindowScroll"),s=Pe("customScrollParent"),i=nn("windowScrollContainerState"),a=nn("scrollContainerState"),l=s||o?i:a,c=Pe("itemContent"),u=Pe("context"),d=Pe("groupContent"),f=Pe("trackItemSizes"),h=Pe("itemSize"),p=Pe("log"),m=nn("gap"),{callbackRef:v}=$x(r,h,f,t?to:l,p,m,s),[b,y]=w.useState(0);Xf("deviation",P=>{b!==P&&y(P)});const g=Pe("EmptyPlaceholder"),T=Pe("ScrollSeekPlaceholder")||Bj,x=Pe("ListComponent"),E=Pe("ItemComponent"),C=Pe("GroupComponent"),k=Pe("computeItemKey"),I=Pe("isSeeking"),A=Pe("groupIndices").length>0,N=Pe("alignToBottom"),O=Pe("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:N?"auto":0,...O?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?w.createElement(g,ct(g,u)):w.createElement(x,{...ct(x,u),ref:v,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const M=P.originalIndex,j=k(M+n.firstItemIndex,P.data,u);return I?w.createElement(T,{...ct(T,u),key:j,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?w.createElement(C,{...ct(C,u),key:j,"data-index":M,"data-known-size":P.size,"data-item-index":P.index,style:Wj},d(P.index,u)):w.createElement(E,{...ct(E,u),...aw(E,P.data),key:j,"data-index":M,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:zj},A?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),Hj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},bs=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),Uj={width:"100%",position:sw(),top:0,zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function aw(e,t){return{item:typeof e=="string"?void 0:t}}const Gj=w.memo(function(){const t=Pe("HeaderComponent"),n=nn("headerHeight"),r=Pe("headerFooterTag"),o=Mn(w.useMemo(()=>i=>n(mn(i,"height")),[n])),s=Pe("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),Yj=w.memo(function(){const t=Pe("FooterComponent"),n=nn("footerHeight"),r=Pe("headerFooterTag"),o=Mn(w.useMemo(()=>i=>n(mn(i,"height")),[n])),s=Pe("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null});function Kf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=Wx(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:h,style:{...Hj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ct(c,f)},i)})}function Zf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:b}=Wx(l,u,c,to,h);return nj(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",b),t("scrollBy",v),w.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...ct(c,p)},i)})}const qj=({children:e})=>{const t=w.useContext(Nl),n=nn("viewportHeight"),r=nn("fixedItemHeight"),o=Pe("alignToBottom"),s=Mn(w.useMemo(()=>si(n,i=>mn(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:bs(o),ref:s,"data-viewport-type":"element"},e)},Kj=({children:e})=>{const t=w.useContext(Nl),n=nn("windowViewportRect"),r=nn("fixedItemHeight"),o=Pe("customScrollParent"),s=Yf(n,o),i=Pe("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:bs(i),"data-viewport-type":"window"},e)},Zj=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...Uj,marginTop:`${n}px`},o=Pe("context");return w.createElement(t,{style:r,...ct(t,o)},e)},Xj=w.memo(function(t){const n=Pe("useWindowScroll"),r=Pe("topItemsIndexes").length>0,o=Pe("customScrollParent"),s=o||n?eL:Jj,i=o||n?Kj:qj;return w.createElement(s,{...t},r&&w.createElement(Zj,null,w.createElement(kg,{showTopList:!0})),w.createElement(i,null,w.createElement(Gj,null),w.createElement(kg,null),w.createElement(Yj,null)))}),{Component:Qj,usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}=Vf($j,{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"}},Xj),Jj=Kf({usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}),eL=Zf({usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}),Qf=Qj,Ig={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},tL={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Ag,ceil:Og,floor:Ka,min:Nc,max:Hs}=Math;function nL(e){return{...tL,items:e}}function _g(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function rL(e,t){return e&&e.column===t.column&&e.row===t.row}function na(e,t){return e&&e.width===t.width&&e.height===t.height}const oL=je(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:b,windowScrollContainerState:y,windowScrollTo:g},T])=>{const x=ne(0),E=ne(0),C=ne(Ig),k=ne({height:0,width:0}),I=ne({height:0,width:0}),A=Ie(),N=Ie(),O=ne(0),L=ne(null),P=ne({row:0,column:0}),M=Ie(),j=Ie(),D=ne(!1),V=ne(0),z=ne(!0),_=ne(!1);ze(K(p,Ee(V),ye(([F,B])=>!!B)),()=>{Se(z,!1),Se(E,0)}),ze(K(Tt(p,z,I,k,V,_),ye(([F,B,H,Y,,Q])=>F&&!B&&H.height!==0&&Y.height!==0&&!Q)),([,,,,F])=>{Se(_,!0),zf(1,()=>{Se(A,F)}),_n(K(r),()=>{Se(n,[0,0]),Se(z,!0)})}),he(K(j,ye(F=>F!=null&&F.scrollTop>0),xn(0)),E),ze(K(p,Ee(j),ye(([,F])=>F!=null)),([,F])=>{F&&(Se(k,F.viewport),Se(I,F==null?void 0:F.item),Se(P,F.gap),F.scrollTop>0&&(Se(D,!0),_n(K(r,Zo(1)),B=>{Se(D,!1)}),Se(i,{top:F.scrollTop})))}),he(K(k,de(({height:F})=>F)),o),he(K(Tt(be(k,na),be(I,na),be(P,(F,B)=>F&&F.column===B.column&&F.row===B.row),be(r)),de(([F,B,H,Y])=>({viewport:F,item:B,gap:H,scrollTop:Y}))),M),he(K(Tt(be(x),t,be(P,rL),be(I,na),be(k,na),be(L),be(E),be(D),be(z),be(V)),ye(([,,,,,,,F])=>!F),de(([F,[B,H],Y,Q,ue,U,ke,,qe,Le])=>{const{row:Te,column:q}=Y,{height:se,width:W}=Q,{width:J}=ue;if(ke===0&&(F===0||J===0))return Ig;if(W===0){const Lt=Hf(Le,F),xr=Lt===0?Math.max(ke-1,0):Lt;return nL(_g(Lt,xr,U))}const pe=lw(J,W,q);let ce,Fe;qe?B===0&&H===0&&ke>0?(ce=0,Fe=ke-1):(ce=pe*Ka((B+Te)/(se+Te)),Fe=pe*Og((H+Te)/(se+Te))-1,Fe=Nc(F-1,Hs(Fe,pe-1)),ce=Nc(Fe,Hs(0,ce))):(ce=0,Fe=-1);const te=_g(ce,Fe,U),{top:ie,bottom:_e}=Mg(ue,Y,Q,te),Ke=Og(F/pe),At=Ke*se+(Ke-1)*Te-_e;return{items:te,offsetTop:ie,offsetBottom:At,top:ie,bottom:_e,itemHeight:se,itemWidth:W}})),C),he(K(L,ye(F=>F!==null),de(F=>F.length)),x),he(K(Tt(k,I,C,P),ye(([F,B,{items:H}])=>H.length>0&&B.height!==0&&F.height!==0),de(([F,B,{items:H},Y])=>{const{top:Q,bottom:ue}=Mg(F,Y,B,H);return[Q,ue]}),Je(ui)),n);const $=ne(!1);he(K(r,Ee($),de(([F,B])=>B||F!==0)),$);const Z=Zt(K(be(C),ye(({items:F})=>F.length>0),Ee(x,$),ye(([{items:F},B,H])=>H&&F[F.length-1].index===B-1),de(([,F])=>F-1),Je())),re=Zt(K(be(C),ye(({items:F})=>F.length>0&&F[0].index===0),xn(0),Je())),ee=Zt(K(be(C),Ee(D),ye(([{items:F},B])=>F.length>0&&!B),de(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),Je(Jx),nr(0)));he(ee,f.scrollSeekRangeChanged),he(K(A,Ee(k,I,x,P),de(([F,B,H,Y,Q])=>{const ue=Xx(F),{align:U,behavior:ke,offset:qe}=ue;let Le=ue.index;Le==="LAST"&&(Le=Y-1),Le=Hs(0,Le,Nc(Y-1,Le));let Te=Yu(B,Q,H,Le);return U==="end"?Te=Ag(Te-B.height+H.height):U==="center"&&(Te=Ag(Te-B.height/2+H.height/2)),qe&&(Te+=qe),{top:Te,behavior:ke}})),i);const G=Dt(K(C,de(F=>F.offsetBottom+F.bottom)),0);return he(K(m,de(F=>({width:F.visibleWidth,height:F.visibleHeight}))),k),{data:L,totalCount:x,viewportDimensions:k,itemDimensions:I,scrollTop:r,scrollHeight:N,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:A,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:v,customScrollParent:b,windowScrollContainerState:y,deviation:O,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:j,...f,initialTopMostItemIndex:V,gridState:C,totalListHeight:G,...d,startReached:re,endReached:Z,rangeChanged:ee,stateChanged:M,propsReady:h,stateRestoreInProgress:D,...T}},et(Uf,Bt,_i,tw,br,Gf,vr));function Mg(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Yu(e,t,n,r[0].index),i=Yu(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Yu(e,t,n,r){const o=lw(e.width,n.width,t.column),s=Ka(r/o),i=s*n.height+Hs(0,s-1)*t.row;return i>0?i+t.row:i}function lw(e,t,n){return Hs(1,Ka((e+n)/(Ka(t)+n)))}const sL=je(()=>{const e=ne(c=>`Item ${c}`),t=ne({}),n=ne(null),r=ne("virtuoso-grid-item"),o=ne("virtuoso-grid-list"),s=ne(qf),i=ne("div"),a=ne(to),l=(c,u=null)=>Dt(K(t,de(d=>d[c]),Je()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),iL=je(([e,t])=>({...e,...t}),et(oL,sL)),aL=w.memo(function(){const t=nt("gridState"),n=nt("listClassName"),r=nt("itemClassName"),o=nt("itemContent"),s=nt("computeItemKey"),i=nt("isSeeking"),a=dn("scrollHeight"),l=nt("ItemComponent"),c=nt("ListComponent"),u=nt("ScrollSeekPlaceholder"),d=nt("context"),f=dn("itemDimensions"),h=dn("gap"),p=nt("log"),m=nt("stateRestoreInProgress"),v=Mn(w.useMemo(()=>b=>{const y=b.parentElement.parentElement.scrollHeight;a(y);const g=b.firstChild;if(g){const{width:T,height:x}=g.getBoundingClientRect();f({width:T,height:x})}h({row:Dg("row-gap",getComputedStyle(b).rowGap,p),column:Dg("column-gap",getComputedStyle(b).columnGap,p)})},[a,f,h,p]));return m?null:w.createElement(c,{ref:v,className:n,...ct(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(b=>{const y=s(b.index,b.data,d);return i?w.createElement(u,{key:y,...ct(u,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...ct(l,d),className:r,"data-index":b.index,key:y},o(b.index,b.data,d))}))}),lL=w.memo(function(){const t=nt("HeaderComponent"),n=dn("headerHeight"),r=nt("headerFooterTag"),o=Mn(w.useMemo(()=>i=>n(mn(i,"height")),[n])),s=nt("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),cL=w.memo(function(){const t=nt("FooterComponent"),n=dn("footerHeight"),r=nt("headerFooterTag"),o=Mn(w.useMemo(()=>i=>n(mn(i,"height")),[n])),s=nt("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),uL=({children:e})=>{const t=w.useContext(iw),n=dn("itemDimensions"),r=dn("viewportDimensions"),o=Mn(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:bs(!1),ref:o},e)},dL=({children:e})=>{const t=w.useContext(iw),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=nt("customScrollParent"),s=Yf(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:bs(!1)},e)},fL=w.memo(function({...t}){const n=nt("useWindowScroll"),r=nt("customScrollParent"),o=r||n?mL:hL,s=r||n?dL:uL;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(lL,null),w.createElement(aL,null),w.createElement(cL,null)))}),{Component:T$,usePublisher:dn,useEmitterValue:nt,useEmitter:cw}=Vf(iL,{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"}},fL),hL=Kf({usePublisher:dn,useEmitterValue:nt,useEmitter:cw}),mL=Zf({usePublisher:dn,useEmitterValue:nt,useEmitter:cw});function Dg(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Xt.WARN),t==="normal"?0:parseInt(t??"0",10)}const pL=je(()=>{const e=ne(l=>w.createElement("td",null,"Item $",l)),t=ne(null),n=ne(null),r=ne(null),o=ne({}),s=ne(qf),i=ne(to),a=(l,c=null)=>Dt(K(o,de(u=>u[l]),Je()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}),gL=je(([e,t])=>({...e,...t}),et(ow,pL)),yL=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),vL=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),bL={overflowAnchor:"none"},xL=w.memo(function(){const t=Be("listState"),n=fn("sizeRanges"),r=Be("useWindowScroll"),o=Be("customScrollParent"),s=fn("windowScrollContainerState"),i=fn("scrollContainerState"),a=o||r?s:i,l=Be("itemContent"),c=Be("trackItemSizes"),u=Be("itemSize"),d=Be("log"),{callbackRef:f,ref:h}=$x(n,u,c,a,d,void 0,o),[p,m]=w.useState(0);Jf("deviation",j=>{p!==j&&(h.current.style.marginTop=`${j}px`,m(j))});const v=Be("EmptyPlaceholder"),b=Be("ScrollSeekPlaceholder")||yL,y=Be("FillerRow")||vL,g=Be("TableBodyComponent"),T=Be("TableRowComponent"),x=Be("computeItemKey"),E=Be("isSeeking"),C=Be("paddingTopAddition"),k=Be("firstItemIndex"),I=Be("statefulTotalCount"),A=Be("context");if(I===0&&v)return w.createElement(v,ct(v,A));const N=t.offsetTop+C+p,O=t.offsetBottom,L=N>0?w.createElement(y,{height:N,key:"padding-top",context:A}):null,P=O>0?w.createElement(y,{height:O,key:"padding-bottom",context:A}):null,M=t.items.map(j=>{const D=j.originalIndex,V=x(D+k,j.data,A);return E?w.createElement(b,{...ct(b,A),key:V,index:j.index,height:j.size,type:j.type||"item"}):w.createElement(T,{...ct(T,A),...aw(T,j.data),key:V,"data-index":D,"data-known-size":j.size,"data-item-index":j.index,style:bL},l(j.index,j.data,A))});return w.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...ct(g,A)},[L,...M,P])}),wL=({children:e})=>{const t=w.useContext(Nl),n=fn("viewportHeight"),r=fn("fixedItemHeight"),o=Mn(w.useMemo(()=>si(n,s=>mn(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:bs(!1),ref:o,"data-viewport-type":"element"},e)},SL=({children:e})=>{const t=w.useContext(Nl),n=fn("windowViewportRect"),r=fn("fixedItemHeight"),o=Be("customScrollParent"),s=Yf(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:bs(!1),"data-viewport-type":"window"},e)},TL=w.memo(function(t){const n=Be("useWindowScroll"),r=Be("customScrollParent"),o=fn("fixedHeaderHeight"),s=fn("fixedFooterHeight"),i=Be("fixedHeaderContent"),a=Be("fixedFooterContent"),l=Be("context"),c=Mn(w.useMemo(()=>si(o,y=>mn(y,"height")),[o])),u=Mn(w.useMemo(()=>si(s,y=>mn(y,"height")),[s])),d=r||n?RL:CL,f=r||n?SL:wL,h=Be("TableComponent"),p=Be("TableHeadComponent"),m=Be("TableFooterComponent"),v=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ct(p,l)},i()):null,b=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ct(m,l)},a()):null;return w.createElement(d,{...t},w.createElement(f,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(h,l)},[v,w.createElement(xL,{key:"TableBody"}),b])))}),{Component:EL,usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}=Vf(gL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},TL),CL=Kf({usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}),RL=Zf({usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}),PL=EL,uw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>S.jsxs("div",{className:Me("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:S.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||r?S.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?S.jsx(jx,{as:"button",type:"button",title:S.jsxs("span",{className:"cursor-help",children:[S.jsx("span",{className:"sr-only",children:r}),S.jsx(Fb,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:S.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?S.jsxs(w.Fragment,{children:[S.jsx(jb,{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}),S.jsx(qk,{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]}),Di=w.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,componentName:m,placeholder:v,hideLeft:b=!1,required:y,disabled:g,reportStatus:T},x)=>{const E=ZO(),C=T!==void 0?T:E.input.iconFeedback,k=d??h,I=Et(),A=e??I.inputOptionalLabel;return S.jsxs("fieldset",{ref:x,form:u,disabled:g,"data-error":!!c,"aria-disabled":g,"data-component":m,"data-interactive":!!s,className:Me("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[S.jsxs("label",{form:u,htmlFor:k,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[S.jsx(uw,{info:a,hideLeft:b,reportStatus:C,title:p,placeholder:v,children:A||n?S.jsxs(w.Fragment,{children:[y?null:S.jsx("span",{"aria-disabled":g,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?S.jsx(w.Fragment,{children:n}):null]}):null}),S.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?S.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?S.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),S.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),S.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),kL=e=>S.jsx(w.Fragment,{children:e.children}),IL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},AL={caseSensitive:!1,sort:!1},OL=[],_L=w.forwardRef(function(t,n){return S.jsx(lt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:S.jsx(fr,{children:t.children})})}),ML=w.forwardRef(function({item:t,context:n,...r},o){return S.jsx(lt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),DL={List:_L,Item:ML},mo=320,jc=40,NL=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const v=w.useRef(null),b=w.useRef(null),y=p.value??p.defaultValue??"",g=Et(),[T,x]=w.useState(()=>Math.min(mo,jc*e.length)),[E,C]=w.useState(!1),[k,I]=w.useState(""),[A,N]=w.useState(y),[O,L]=w.useState(()=>{var q;return((q=e.find(se=>se.value===y))==null?void 0:q.label)??y}),[P,M]=w.useState(null),j=w.useRef(OL),D=t&&k!==""?[{value:k,label:k,"data-dynamic":"true"},...e]:e,V=new Mr(D,["value","label"],AL).search(k),z=()=>{C(!1),x(0)},_=V.filter(q=>q.hidden!==!0),$=t?void 0:`^(${e.map(q=>`${au(q.value)}${q.label?"|"+au(q.label):""}`).join("|")})$`;w.useEffect(()=>{if(p.value){const q=e.find(se=>se.value===p.value);N((q==null?void 0:q.label)??p.value)}},[p.value]),w.useEffect(()=>{E||x(0)},[E]),w.useEffect(()=>{if(!E)return;const q=G.floating;if(q.current===null)return;let se=0;Array.from(q.current.querySelectorAll("li")).slice(0,Math.min(V.length,10)).forEach(pe=>{const ce=pe.getBoundingClientRect();se+=ce.height});const J=Math.min(se,mo);x(J)},[k,E]);const{x:Z,y:re,strategy:ee,refs:G,context:F}=Qr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Pi,middleware:[ki(4),lx({padding:10,elementContext:"reference",apply(q){var ce;const se=(ce=v.current)==null?void 0:ce.getBoundingClientRect().width,W=q.elements.floating.querySelector("ul"),J=(W==null?void 0:W.getBoundingClientRect().height)||0,pe=Math.min(J<jc?mo:J,mo);pi.flushSync(()=>setTimeout(()=>{const Fe=(W==null?void 0:W.getBoundingClientRect().height)??0;return Fe<jc?void x(pe):void x(Math.min(Fe,mo))},50)),Object.assign(q.elements.floating.style,{width:`${se}px`,maxWidth:`${se}px`,maxHeight:`${mo}`})}})]}),B=Ex(F,IL),{getReferenceProps:H,getFloatingProps:Y,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),jf(F,{cols:0,listRef:j,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:q=>M(se=>q??se)})]);w.useEffect(()=>{const q=G.reference.current;if(q)return bi(q)},[]);const ue=(q,se)=>{N(q.value);const W=G.reference.current;if(!W)return;W==null||W.setAttribute("data-value",q.value),W.value=q.value;const J=new Event("change",{bubbles:!1,cancelable:!0});W.dispatchEvent(J),p.onChange&&p.onChange(J),L(q.label??""),z(),I(""),M(se)},U=q=>{var W;const se=q.target.value;return I(se),!E&&se===""?C(!0):(q.target.name=p.name||"",se?C(!0):(W=p.onChange)==null?void 0:W.call(p,q))},ke=()=>{var q;C(!0),I(""),(q=G.reference.current)==null||q.focus()},qe=()=>{C(!0),I("")},Le=()=>{var q;(q=G.reference.current)==null||q.setAttribute("data-value",""),I(""),N(""),L(""),xd(G.reference.current),z()},Te=p.id||p.name;return S.jsxs(Di,{...p,left:d,error:f,ref:v,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:S.jsxs("span",{className:"flex items-center gap-0.5",children:[S.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:ke,children:[S.jsx(of,{size:20}),S.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),A?S.jsx("button",{type:"button",onClick:Le,className:"p-2 transition-colors link:text-danger md:p-1",children:S.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:S.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:[S.jsx("input",{"data-shadow":"true",...H({...p,onChange:U,onFocus:qe,pattern:$,ref:G.setReference,name:`${Te}-shadow`,id:`${Te}-shadow`,onClick:q=>q.currentTarget.focus(),onKeyDown(q){var se,W;if(q.key==="ArrowDown"){let J=P+1;return J>V.length-1&&(J=0),(se=b.current)==null||se.scrollIntoView({index:J}),M(J)}if(q.key==="ArrowUp"){let J=P-1;return J<0&&(J=V.length-1),(W=b.current)==null||W.scrollIntoView({index:J}),M(J)}if(q.key==="Escape")return q.currentTarget.blur(),z();if(q.key==="Enter"){if(P!==null&&V[P])return q.preventDefault(),ue(V[P],P);if(V.length===1)return q.preventDefault(),ue(V[0],0)}}}),"data-value":A,"data-error":!!f,"data-name":Te,"data-target":Te,required:h,value:E?k:O||A,"aria-autocomplete":"list",autoComplete:"off",className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",p.className)}),S.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:m,required:h,defaultValue:p.value||A||void 0}),S.jsx(Zr,{preserveTabOrder:!0,children:E?S.jsx(ms,{guards:!0,returnFocus:!1,context:F,initialFocus:-1,visuallyHiddenDismiss:!0,children:S.jsxs("ul",{...Y({ref:G.setFloating,style:{...B.styles,position:ee,left:(Z??0)+(A?26:18),top:re??0}}),"data-floating":"true",className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[V.length===0?S.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:S.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:o||g.autocompleteEmpty})}):null,S.jsx(Qf,{ref:b,data:_,components:DL,hidden:_.length===0,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:T},itemContent:(q,se)=>{const W=se.Render??kL,J=A===se.value||A===se.label,pe=P===q,ce=se.label??se.value;return S.jsx("button",{"data-value":se.value,...Q({ref:Fe=>void(j.current[q]=Fe),role:"option",type:"button","aria-checked":J,"aria-current":J,"aria-selected":J,"aria-busy":se.disabled,onClick:()=>ue(se,q),className:`cursor-pointer w-full p-2 text-left ${J?"bg-primary-hover text-primary-foreground":""} ${pe?"bg-floating-hover text-floating-foreground":""}`}),children:S.jsx(W,{...p,label:se.label,value:se.value,children:ce})})}})]})}):null})]})});class Io extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Io&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}delete(t){const n=super.delete(t);return this.list=Array.from(this.entries())??[],n}map(t){return this.list.map(n=>t(n[1]))}clone(){return new Io(this)}}const eh=w.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>S.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:Me("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[S.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Me("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,S.jsx("span",{"data-name":"checkbox-label",className:Me("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),jL=e=>S.jsx(w.Fragment,{children:e.children}),LL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},FL={caseSensitive:!1,sort:!1},Ng=[],VL=w.forwardRef(function(t,n){return S.jsx(lt.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:S.jsx(fr,{children:t.children})})}),$L=w.forwardRef(function({item:t,context:n,...r},o){return S.jsx(lt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),BL={List:VL,Item:$L},WL=e=>{const t=Et(),n=w.useRef(null),r=w.Children.count(e.children),[o,s]=w.useState(!1);return w.useEffect(()=>{if(n.current===null)return;const i=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return s(!1);if(l>i.width)return s(!0)},[r]),S.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?S.jsxs(Td,{size:"small","data-multicounter":"true",children:[r," ",t.multiComboboxSelectedLabel]}):e.children})},zL=w.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:s,interactive:i,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:h=!1,dynamicOption:p=!1,...m},v)=>{const b=w.useMemo(()=>new Io(r.map(W=>[W.value,W])),[r]),y=w.useRef(null),g=w.useRef(null),T=m.value??m.defaultValue??Ng,x=Et(),[E,C]=w.useState(0),[k,I]=w.useState(!1),[A,N]=w.useState(""),[O,L]=w.useState(()=>{const W=new Io;return T.forEach(J=>{const pe=b.get(J);return pe?W.set(J,pe):void 0}),W}),P=w.useMemo(()=>Array.from(O.keys()),[O]),[M,j]=w.useState(()=>{const W=new Set(T);return r.reduce((J,pe)=>W.has(pe.value)?[...J,pe.label??pe.value]:J,[])??T}),[D,V]=w.useState(null),z=w.useRef(Ng),_=p&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...r]:r,$=new Mr(_,["value","label"],FL).search(A);w.useEffect(()=>{k||C(0)},[k]),w.useEffect(()=>{m.value&&L(new Io(m.value.map(W=>[W,b.get(W)])))},[m.value,b]);const{x:Z,y:re,strategy:ee,refs:G,context:F}=Qr({open:k,transform:!0,strategy:"absolute",onOpenChange:I,whileElementsMounted:Pi,middleware:[ki(4),lx({padding:10,elementContext:"reference",apply(W){var ce;const J=(ce=y.current)==null?void 0:ce.getBoundingClientRect().width,pe=360;pi.flushSync(()=>setTimeout(()=>C(pe),200)),Object.assign(W.elements.floating.style,{width:`${J}px`,maxWidth:`${J}px`,maxHeight:`${pe}px`,height:`${pe}px`})}})]}),B=Ex(F,LL),{getReferenceProps:H,getFloatingProps:Y,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),jf(F,{cols:0,listRef:z,loop:!0,virtual:!0,allowEscape:!0,activeIndex:D,selectedIndex:D,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:W=>V(J=>W??J)})]);w.useEffect(()=>{const W=G.reference.current;if(W)return bi(W)},[]);const ue=(W,J)=>{const pe=O.clone();O.has(W.value)?pe.delete(W.value):pe.set(W.value,W),L(pe);const ce=G.reference.current;if(!ce)return;ce==null||ce.setAttribute("data-value",W.value),ce.value=Array.from(pe.values());const Fe=new Event("change",{bubbles:!1,cancelable:!0});ce.dispatchEvent(Fe),m.onChange&&m.onChange(Fe),j(te=>te.concat(W.label??"")),N(""),V(J)},U=W=>{const J=W.target.value;return N(J),!k&&J===""?I(!0):(W.target.name=m.name||"",J?I(!0):void 0)},ke=()=>{var W;I(!0),N(""),(W=G.reference.current)==null||W.focus()},qe=()=>{I(!0),N("")},Le=()=>{var W;(W=G.reference.current)==null||W.setAttribute("data-value",""),N(""),xd(G.reference.current),I(!1)},Te=m.id||m.name,q=O.map(W=>S.jsx(Td,{size:"small",children:W.label??W.value},`multicombobox-${W.value}-x`)),se=$.filter(W=>W.hidden!==!0);return S.jsxs(Di,{...m,left:e,error:t,ref:y,form:m.form,name:m.name,feedback:d,hideLeft:f,required:h,title:m.title,container:o,rightLabel:s,interactive:i,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:S.jsxs("span",{className:"flex items-center gap-0.5",children:[S.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ke,children:[S.jsx(of,{size:20}),S.jsx("span",{className:"sr-only",children:x.inputCaretDown})]}),O?S.jsx("button",{type:"button",onClick:Le,className:"transition-colors link:text-danger",children:S.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:S.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:[S.jsx("button",{...H({...m,onFocus:qe,id:`${Te}-shadow`,name:`${Te}-shadow`,ref:G.setReference}),type:"button","data-name":Te,"data-target":Te,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":P.join(","),value:k?A:M||O,className:Me("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","truncate overflow-ellipsis",m.className),children:S.jsx(WL,{label:c,children:q})}),S.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:v,required:h,defaultValue:m.value||P||void 0}),S.jsx(Zr,{preserveTabOrder:!0,children:k?S.jsx(ms,{guards:!0,returnFocus:!1,context:F,initialFocus:-1,visuallyHiddenDismiss:!0,children:S.jsxs("div",{...Y({ref:G.setFloating,style:{...B.styles,position:ee,left:(Z??0)+(O?26:18),top:re??0}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[S.jsx("input",{autoFocus:!0,value:A,onChange:U,title:m.title,placeholder:x.multiComboboxInnerPlaceholder,onKeyDown:W=>{var J,pe;if(W.key==="ArrowDown"){let ce=D+1;return ce>$.length-1&&(ce=0),(J=g.current)==null||J.scrollIntoView({index:ce}),V(ce)}if(W.key==="ArrowUp"){let ce=D-1;return ce<0&&(ce=$.length-1),(pe=g.current)==null||pe.scrollIntoView({index:ce}),V(ce)}if(W.key==="Escape")return W.currentTarget.blur(),I(!1);if(W.key==="Enter"){if(D!==null&&$[D])return W.preventDefault(),ue($[D],D);if($.length===1)return W.preventDefault(),ue($[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),$.length===0?S.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:S.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||x.autocompleteEmpty})}):null,S.jsx(Qf,{ref:g,data:se,components:BL,hidden:se.length===0,style:{height:O.size===0?E-49:E-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(W,J)=>{const pe=J.Render??jL,ce=O.has(J.value)||O.has(J.label??""),Fe=D===W,te=J.label??J.value;return S.jsx("button",{"data-value":J.value,...Q({ref:ie=>void(z.current[W]=ie),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":J.disabled,onClick:()=>ue(J,W)}),className:`w-full cursor-pointer p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ce||Fe?"bg-floating-hover text-floating-foreground":""}`,children:S.jsx(eh,{onChange:Sd,checked:ce,"aria-checked":ce,onClick:ie=>(ie.stopPropagation(),void ie.preventDefault()),children:S.jsx(pe,{...m,label:J.label,value:J.value,children:te})})})}}),O.size===0?null:S.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:q})]})}):null})]})}),dw=(e,t,n,r)=>w.forwardRef(({info:s,left:i,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:h,type:p="text",labelClassName:m,feedback:v=null,hideLeft:b=!1,...y},g)=>{const T=e,x=y.id??y.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const C=E.current,k=bi(E.current),I=r==null?void 0:r(C),A=N=>{const O=N;if(O.key==="Enter"&&C.enterKeyHint==="next"){const L=C.getAttribute("data-next");if(L){const P=document.getElementById(L);if(P)return P.focus(),void O.preventDefault()}}};return C.addEventListener("keydown",A),()=>{I==null||I(),k(),C.removeEventListener("keydown",A)}},[]),S.jsx(Di,{...n,info:s,left:i,error:l,right:c,form:y.form,name:y.name,feedback:v,hideLeft:b,title:y.title,container:u,rightLabel:d,disabled:y.disabled,interactive:f,required:y.required,componentName:t,id:y.name||y.id,optionalText:h,labelClassName:m,placeholder:y.placeholder,children:S.jsx(T,{...n,...y,id:x,name:x,type:p,"data-next":a,"aria-busy":y.disabled,"aria-disabled":y.disabled,"aria-readonly":y.readOnly,ref:bd(g,E),className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",y.className)})})}),Ni=dw(l0,"input",{type:"text"}),jg=new Date(1970,11,31),Lc={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Lg={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},HL={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")},Fc=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},UL=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||yf(),l=w.useId(),c=Et(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=w.useState(e||void 0),[h,p]=w.useState(!1),m=Fc(u,jg).flatMap(C=>Pt.keyof(Lc,C.type)?Lc[C.type](C.value):[]),v=Fc(u,jg).reduce((C,k)=>C+(Pt.keyof(Lg,k.type)?Lg[k.type](k.value):""),""),[b,y]=w.useState(d?Fc(u,d).reduce((C,k)=>C+(Pt.keyof(Lc,k.type)?HL[k.type](d,k.value):""),""):""),g=C=>{const k=C.target.value;if(y(k),m.length===k.length&&m.every((A,N)=>{const O=k.charAt(N);return typeof A=="string"?O===A:A.test(O)})){const A=zo(iO(k,v,new Date));return f(A),r==null?void 0:r(A)}return f(void 0),r==null?void 0:r(void 0)},T=C=>(f(C),r==null||r(C),y(C?aA(C,v):"")),x=Hb(d),E=x?d.toISOString():void 0;return S.jsx(Ni,{...s,mask:m,value:b,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:g,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??v,right:S.jsxs(w.Fragment,{children:[S.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),S.jsx(ps,{open:h,onChange:p,trigger:S.jsxs("span",{"aria-labelledby":l,children:[S.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),S.jsx(Gk,{})]}),buttonProps:{"aria-describedby":l},children:S.jsx(y0,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:x?d:void 0})})]})})}),GL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],YL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],KL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Fg=(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 Vg(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?KL:qL:t.binary?YL:GL,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=Fg(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=Fg(Number(e),t.locale,i),c=n[a];return s+l+r+c}var qu={exports:{}},ra={exports:{}},Ve={};/** @license React v16.13.1
|
|
212
|
+
`)},MN=0,ho=[];function DN(e){var t=R.useRef([]),n=R.useRef([0,0]),r=R.useRef(),o=R.useState(MN++)[0],s=R.useState(Ox)[0],i=R.useRef(e);R.useEffect(function(){i.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Bu([e.lockRef.current],(e.shards||[]).map(pg),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=R.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var b=ea(m),y=n.current,g="deltaX"in m?m.deltaX:y[0]-b[0],T="deltaY"in m?m.deltaY:y[1]-b[1],S,E=m.target,C=Math.abs(g)>Math.abs(T)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var k=hg(C,E);if(!k)return!0;if(k?S=C:(S=C==="v"?"h":"v",k=hg(C,E)),!k)return!1;if(!r.current&&"changedTouches"in m&&(g||T)&&(r.current=S),!S)return!0;var I=r.current||S;return AN(I,v,m,I==="h"?g:T,!0)},[]),l=R.useCallback(function(m){var v=m;if(!(!ho.length||ho[ho.length-1]!==s)){var b="deltaY"in v?mg(v):ea(v),y=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&ON(S.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var g=(i.current.shards||[]).map(pg).filter(Boolean).filter(function(S){return S.contains(v.target)}),T=g.length>0?a(v,g[0]):!i.current.noIsolation;T&&v.cancelable&&v.preventDefault()}}},[]),c=R.useCallback(function(m,v,b,y){var g={name:m,delta:v,target:b,should:y,shadowParent:NN(b)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(T){return T!==g})},1)},[]),u=R.useCallback(function(m){n.current=ea(m),r.current=void 0},[]),d=R.useCallback(function(m){c(m.type,mg(m),m.target,a(m,e.lockRef.current))},[]),f=R.useCallback(function(m){c(m.type,ea(m),m.target,a(m,e.lockRef.current))},[]);R.useEffect(function(){return ho.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,fo),document.addEventListener("touchmove",l,fo),document.addEventListener("touchstart",u,fo),function(){ho=ho.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,fo),document.removeEventListener("touchmove",l,fo),document.removeEventListener("touchstart",u,fo)}},[]);var h=e.removeScrollBar,p=e.inert;return R.createElement(R.Fragment,null,p?R.createElement(s,{styles:_N(o)}):null,h?R.createElement(TN,{gapMode:e.gapMode}):null)}function NN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jN=uN(Ax,DN);var Nx=R.forwardRef(function(e,t){return R.createElement(Al,En({},e,{ref:t,sideCar:jN}))});Nx.classNames=Al.classNames;const LN=(e,t)=>Ta()?t:window.matchMedia(e).matches,FN=(e,t=!0)=>{const[n,r]=x.useState(t);return x.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(LN(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},cn="600ms",VN={exit:{translateX:["0%","-30%"],opacity:0,animationDuration:cn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:cn},initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:cn}},$N={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:cn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:cn}},Ac={drawer:e=>e==="left"?VN:$N,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:cn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:cn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:cn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:cn},enter:{opacity:1,scale:[1.05,1],animationDuration:cn},exit:{opacity:0,scale:.97,animationDuration:cn}}},BN=os("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"}}),WN={top:0,left:0,right:0,bottom:-1},zN=e=>e*.62,HN=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=zN(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.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:WN,whileDrag:{cursor:"grabbing"},className:Me("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Oc={drawer:"right",sheet:"none",dialog:"none"},UN=({open:e,title:t,footer:n,asChild:r,trigger:o,children:s,layoutId:i,onChange:a,className:l,resizer:c=!0,closable:u=!0,forceType:d=!1,overlayClassName:f="",type:h="dialog",position:p,overlayClickClose:m=!1,ariaTitle:v,...b})=>{const y=x.useId(),g=x.useId(),T=FN("(min-width: 64rem)"),S=h!=="dialog",E=T?h==="drawer"?p:Oc[h]:d?Oc[h]:Oc.sheet,C=T||d?Ac[h]:Ac.sheet,k=typeof C=="function"?C(E):C,I=T||d?h:"sheet",{refs:A,context:N}=Qr({open:e,onOpenChange:a}),M=Ai(N),L=eo(N),P=Xr(N,{escapeKey:!0,referencePress:!0,outsidePress:m}),{getReferenceProps:O,getFloatingProps:j}=Jr([M,L,P]),D=o,V=$r(void 0),H=()=>a(!1);return w.jsxs(x.Fragment,{children:[o?w.jsx(x.Fragment,{children:r?w.jsx(Ho,{ref:A.setReference,...O({layoutId:i}),children:D}):w.jsx(ct.button,{ref:A.setReference,...O(),layoutId:i,type:"button",children:D})}):null,w.jsx(Zr,{children:w.jsx(fr,{mode:"wait",presenceAffectsLayout:!0,children:e?w.jsx(Nx,{enabled:!0,forwardProps:!0,removeScrollBar:!0,inert:!0,noIsolation:!0,children:w.jsx(VD,{lockScroll:!0,className:Me(`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${I==="drawer"?"":"flex items-start justify-center p-10"}`,f),children:w.jsx(ms,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:N,children:w.jsxs(ct.div,{...b,exit:"exit",animate:"enter",initial:"initial",variants:k,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:i,className:Me(BN({position:E,type:I}),l),style:I==="drawer"?{width:V}:{height:V},...t?{"aria-labelledby":y,"aria-describedby":g}:{"aria-label":v},...j(),children:[t?w.jsx("header",{className:"relative w-full",children:t?w.jsx("h2",{id:y,className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s}),n?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:n}):null,u?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:H,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(lf,{})})}):null,S&&c?w.jsx(HN,{onChange:a,parent:A.floating,position:E,sheet:I==="sheet",value:V}):null]})})})}):null})})]})},GN=e=>w.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}),jx=({as:e,title:t,children:n,placement:r,open:o,focus:s=!0,hover:i=!0,enabled:a=!0,popover:l=!0,followCursor:c=!1,onChange:u=Sd,...d})=>{const[f,h]=x.useState(o??!1),p=x.useRef(null),m=e||"span",v=M=>{h(M),u==null||u(M)},{refs:b,floatingStyles:y,context:g}=Qr({open:f,placement:r,transform:!0,strategy:"absolute",whileElementsMounted:Pi,onOpenChange:o?void 0:v,middleware:[_f(),ki(5),Mf({fallbackAxisSideDirection:"start"}),cx({padding:5,element:p})]}),T=yx(g,{move:!0,delay:{open:Rx},enabled:a?i:!1,handleClose:l?Cx():null}),S=UD(g,{enabled:a?s:!1}),E=Ai(g,{enabled:a?l:!1}),C=Xr(g,{enabled:a}),k=eo(g,{role:"tooltip",enabled:a}),I=BD(g,{enabled:!!a&&!!c}),{getReferenceProps:A,getFloatingProps:N}=Jr([k,C,I,s?S:void 0,i?T:void 0,l?E:void 0]);return x.useEffect(()=>h(o===void 0?!1:o),[o]),w.jsxs(x.Fragment,{children:[w.jsx(m,{ref:b.setReference,...A(d),children:t}),f&&w.jsx(Zr,{preserveTabOrder:!0,children:w.jsxs(ss,{...N(),ref:b.setFloating,style:y,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(hx,{ref:p,context:g,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Ua{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Ua.getDescendantProperty(a[l],s,r);else s&&Ua.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Mr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Mr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Ua.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Mr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Mr.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 Mr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const Ol=0,yr=1,vs=2,Lx=4;function si(e,t){return n=>e(t(n))}function YN(e,t){return t(e)}function Fx(e,t){return n=>e(t,n)}function gg(e,t){return()=>e(t)}function _l(e,t){return t(e),e}function et(...e){return e}function qN(e){e()}function yg(e){return()=>e}function KN(...e){return()=>{e.map(qN)}}function Lf(e){return e!==void 0}function to(){}function ze(e,t){return e(yr,t)}function Se(e,t){e(Ol,t)}function Ff(e){e(vs)}function Mt(e){return e(Lx)}function he(e,t){return ze(e,Fx(t,Ol))}function _n(e,t){const n=e(yr,r=>{n(),t(r)});return n}function Ie(){const e=[];return(t,n)=>{switch(t){case vs:e.splice(0,e.length);return;case yr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ol:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ne(e){let t=e;const n=Ie();return(r,o)=>{switch(r){case yr:o(t);break;case Ol:t=o;break;case Lx:return t}return n(r,o)}}function ZN(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case yr:return s?n===s?void 0:(r(),n=s,t=ze(e,s),t):(r(),to);case vs:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Zt(e){return _l(Ie(),t=>he(e,t))}function Dt(e,t){return _l(ne(t),n=>he(e,n))}function XN(...e){return t=>e.reduceRight(YN,t)}function Z(e,...t){const n=XN(...t);return(r,o)=>{switch(r){case yr:return ze(e,n(o));case vs:Ff(e);return}}}function Vx(e,t){return e===t}function Je(e=Vx){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ye(e){return t=>n=>{e(n)&&t(n)}}function de(e){return t=>si(t,e)}function xn(e){return t=>()=>t(e)}function Rn(e,t){return n=>r=>n(t=e(t,r))}function Zo(e){return t=>n=>{e>0?e--:t(n)}}function nr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function vg(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ee(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);ze(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function bg(...e){return function(t,n){switch(t){case yr:return KN(...e.map(r=>ze(r,n)));case vs:return;default:throw new Error(`unrecognized action ${t}`)}}}function be(e,t=Vx){return Z(e,Je(t))}function Et(...e){const t=Ie(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);ze(s,l=>{n[i]=l,r=r|a,r===o&&Se(t,n)})}),function(s,i){switch(s){case yr:return r===o&&i(n),ze(t,i);case vs:return Ff(t);default:throw new Error(`unrecognized action ${s}`)}}}function je(e,t=[],{singleton:n}={singleton:!0}){return{id:QN(),constructor:e,dependencies:t,singleton:n}}const QN=()=>Symbol();function JN(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function ej(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const ta=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Vf(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=x.createContext({});function l(b,y){b.propsReady&&Se(b.propsReady,!1);for(const g of r){const T=b[t.required[g]];Se(T,y[g])}for(const g of o)if(g in y){const T=b[t.optional[g]];Se(T,y[g])}b.propsReady&&Se(b.propsReady,!0)}function c(b){return s.reduce((y,g)=>(y[g]=T=>{const S=b[t.methods[g]];Se(S,T)},y),{})}function u(b){return i.reduce((y,g)=>(y[g]=ZN(b[t.events[g]]),y),{})}const d=x.forwardRef((b,y)=>{const{children:g,...T}=b,[S]=x.useState(()=>_l(JN(e),C=>l(C,T))),[E]=x.useState(gg(u,S));return ta(()=>{for(const C of i)C in T&&ze(E[C],T[C]);return()=>{Object.values(E).map(Ff)}},[T,E,S]),ta(()=>{l(S,T)}),x.useImperativeHandle(y,yg(c(S))),x.createElement(a.Provider,{value:S},n?x.createElement(n,ej([...r,...o,...i],T),g):g)}),f=b=>x.useCallback(Fx(Se,x.useContext(a)[b]),[b]),h=b=>{const g=x.useContext(a)[b],T=x.useCallback(S=>ze(g,S),[g]);return x.useSyncExternalStore(T,()=>Mt(g),()=>Mt(g))},p=b=>{const g=x.useContext(a)[b],[T,S]=x.useState(gg(Mt,g));return ta(()=>ze(g,E=>{E!==T&&S(yg(E))}),[g,T]),T},m=x.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(b,y)=>{const T=x.useContext(a)[b];ta(()=>ze(T,y),[y,T])}}}const tj=typeof document<"u"?x.useLayoutEffect:x.useEffect,nj=tj;var Xt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Xt||{});const rj={0:"debug",1:"log",2:"warn",3:"error"},oj=()=>typeof globalThis>"u"?window:globalThis,vr=je(()=>{const e=ne(3);return{log:ne((n,r,o=1)=>{var s;const i=(s=oj().VIRTUOSO_LOG_LEVEL)!=null?s:Mt(e);o>=i&&console[rj[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function $f(e,t=!0){const n=x.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=x.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Mn(e,t=!0){return $f(e,t).callbackRef}function $x(e,t,n,r,o,s,i){const a=x.useCallback(l=>{const c=sj(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(ij("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return $f(a,n)}function sj(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Xt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function ij(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Xt.WARN),t==="normal"?0:parseInt(t??"0",10)}function mn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Bx(e,t){return Math.abs(e-t)<1.01}function Wx(e,t,n,r=to,o){const s=x.useRef(null),i=x.useRef(null),a=x.useRef(null),l=x.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,v=h?window.innerHeight:f.offsetHeight,b=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?b():pi.flushSync(b),i.current!==null&&(p===i.current||p<=0||p===m-v)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);x.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,v;f===window?(m=Math.max(mn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=f.scrollHeight,p=mn(f,"height"),v=f.scrollTop);const b=m-p;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),Bx(p,m)||d.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Bt=je(()=>{const e=Ie(),t=Ie(),n=ne(0),r=Ie(),o=ne(0),s=Ie(),i=Ie(),a=ne(0),l=ne(0),c=ne(0),u=ne(0),d=Ie(),f=Ie(),h=ne(!1);return he(Z(e,de(({scrollTop:p})=>p)),t),he(Z(e,de(({scrollHeight:p})=>p)),i),he(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),ii={lvl:0};function zx(e,t,n,r=ii,o=ii){return{k:e,v:t,lvl:n,l:r,r:o}}function Ye(e){return e===ii}function ko(){return ii}function zu(e,t){if(Ye(e))return ii;const{k:n,l:r,r:o}=e;if(t===n){if(Ye(r))return o;if(Ye(o))return r;{const[s,i]=Hx(r);return ga(bt(e,{k:s,v:i,l:Ux(r)}))}}else return t<n?ga(bt(e,{l:zu(r,t)})):ga(bt(e,{r:zu(o,t)}))}function ai(e,t){if(!Ye(e))return t===e.k?e.v:t<e.k?ai(e.l,t):ai(e.r,t)}function pn(e,t,n="k"){if(Ye(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=pn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return pn(e.l,t,n)}function Kt(e,t,n){return Ye(e)?zx(t,n,1):t===e.k?bt(e,{k:t,v:n}):t<e.k?xg(bt(e,{l:Kt(e.l,t,n)})):xg(bt(e,{r:Kt(e.r,t,n)}))}function Hu(e,t,n){if(Ye(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Hu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Hu(i,t,n))),a}function Dr(e){return Ye(e)?[]:[...Dr(e.l),{k:e.k,v:e.v},...Dr(e.r)]}function Hx(e){return Ye(e.r)?[e.k,e.v]:Hx(e.r)}function Ux(e){return Ye(e.r)?e.l:ga(bt(e,{r:Ux(e.r)}))}function bt(e,t){return zx(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 _c(e){return Ye(e)||e.lvl>e.r.lvl}function xg(e){return Uu(Yx(e))}function ga(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(_c(t))return Yx(bt(e,{lvl:r-1}));if(!Ye(t)&&!Ye(t.r))return bt(t.r,{l:bt(t,{r:t.r.l}),r:bt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(_c(e))return Uu(bt(e,{lvl:r-1}));if(!Ye(n)&&!Ye(n.l)){const o=n.l,s=_c(o)?n.lvl-1:n.lvl;return bt(o,{l:bt(e,{r:o.l,lvl:r-1}),r:Uu(bt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Ml(e,t,n){if(Ye(e))return[];const r=pn(e,t)[0];return aj(Hu(e,r,n))}function Gx(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function aj(e){return Gx(e,({k:t,v:n})=>({index:t,value:n}))}function Uu(e){const{r:t,lvl:n}=e;return!Ye(t)&&!Ye(t.r)&&t.lvl===n&&t.r.lvl===n?bt(t,{l:bt(e,{r:t.l}),lvl:n+1}):e}function Yx(e){const{l:t}=e;return!Ye(t)&&t.lvl===e.lvl?bt(t,{r:bt(e,{l:t.r})}):e}function Ga(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function qx(e,t,n){return e[Ga(e,t,n)]}function lj(e,t,n,r){const o=Ga(e,t,r),s=Ga(e,n,r,o);return e.slice(o,s+1)}const Bf=je(()=>({recalcInProgress:ne(!1)}),[],{singleton:!0});function cj(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 wg(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 uj(e,t){let n=Ye(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Ye(e)){e=Kt(e,0,o);continue}const a=Ml(e,s-1,i+1);if(a.some(cj(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=zu(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Kt(e,i+1,f));c&&(e=Kt(e,s,o))}return[e,n]}function dj(){return{offsetTree:[],sizeTree:ko(),groupOffsetTree:ko(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Wf({index:e},t){return t===e?0:t<e?-1:1}function fj({offset:e},t){return t===e?0:t<e?-1:1}function hj(e){return{index:e.index,value:e}}function mj(e,t,n,r=0){return r>0&&(t=Math.max(t,qx(e,r,Wf).offset)),Gx(lj(e,t,n,fj),hj)}function Gu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ga(o,t-1,Wf),a=o[l].offset;const u=pn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===pn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ml(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function pj(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Xt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Ye(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Kt(Kt(p,m,f),m+1,h),i)}else[i,a]=uj(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Gu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,li(h,l,o)),ko()),groupIndices:n}}function li(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=qx(t,e,Wf),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function gj(e){return typeof e.groupIndex<"u"}function Kx(e,t,n){if(gj(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Zx(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Zx(e,t){if(!Dl(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Dl(e){return!Ye(e.groupOffsetTree)}function yj(e){return Dr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const vj={offsetHeight:"height",offsetWidth:"width"},jn=je(([{log:e},{recalcInProgress:t}])=>{const n=Ie(),r=Ie(),o=Dt(r,0),s=Ie(),i=Ie(),a=ne(0),l=ne([]),c=ne(void 0),u=ne(void 0),d=ne((S,E)=>mn(S,vj[E])),f=ne(void 0),h=ne(0),p=dj(),m=Dt(Z(n,Ee(l,e,h),Rn(pj,p),Je()),p),v=Dt(Z(l,Je(),Rn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),de(({prev:S})=>S)),[]);he(Z(l,ye(S=>S.length>0),Ee(m,h),de(([S,E,C])=>{const k=S.reduce((I,A,N)=>Kt(I,A,li(A,E.offsetTree,C)||N),ko());return{...E,groupIndices:S,groupOffsetTree:k}})),m),he(Z(r,Ee(m),ye(([S,{lastIndex:E}])=>S<E),de(([S,{lastIndex:E,lastSize:C}])=>[{startIndex:S,endIndex:E,size:C}])),n),he(c,u);const b=Dt(Z(c,de(S=>S===void 0)),!0);he(Z(u,ye(S=>S!==void 0&&Ye(Mt(m).sizeTree)),de(S=>[{startIndex:0,endIndex:0,size:S}])),n);const y=Zt(Z(n,Ee(m),Rn(({sizes:S},[E,C])=>({changed:C!==S,sizes:C}),{changed:!1,sizes:p}),de(S=>S.changed)));ze(Z(a,Rn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),de(S=>S.diff)),S=>{const{groupIndices:E}=Mt(m);if(S>0)Se(t,!0),Se(s,S+wg(S,E));else if(S<0){const C=Mt(v);C.length>0&&(S-=wg(-S,C)),Se(i,S)}}),ze(Z(a,Ee(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},Xt.ERROR)});const g=Zt(s);he(Z(s,Ee(m),de(([S,E])=>{const C=E.groupIndices.length>0,k=[],I=E.lastSize;if(C){const A=ai(E.sizeTree,0);let N=0,M=0;for(;N<S;){const O=E.groupIndices[M],j=E.groupIndices.length===M+1?1/0:E.groupIndices[M+1]-O-1;k.push({startIndex:O,endIndex:O,size:A}),k.push({startIndex:O+1,endIndex:O+1+j-1,size:I}),M++,N+=j+1}const L=Dr(E.sizeTree);return N!==S&&L.shift(),L.reduce((O,{k:j,v:D})=>{let V=O.ranges;return O.prevSize!==0&&(V=[...O.ranges,{startIndex:O.prevIndex,endIndex:j+S-1,size:O.prevSize}]),{ranges:V,prevIndex:j+S,prevSize:D}},{ranges:k,prevIndex:S,prevSize:0}).ranges}return Dr(E.sizeTree).reduce((A,{k:N,v:M})=>({ranges:[...A.ranges,{startIndex:A.prevIndex,endIndex:N+S-1,size:A.prevSize}],prevIndex:N+S,prevSize:M}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Zt(Z(i,Ee(m,h),de(([S,{offsetTree:E},C])=>{const k=-S;return li(k,E,C)})));return he(Z(i,Ee(m,h),de(([S,E,C])=>{if(E.groupIndices.length>0){if(Ye(E.sizeTree))return E;let I=ko();const A=Mt(v);let N=0,M=0,L=0;for(;N<-S;){L=A[M];const O=A[M+1]-L-1;M++,N+=O+1}if(I=Dr(E.sizeTree).reduce((O,{k:j,v:D})=>Kt(O,Math.max(0,j+S),D),I),N!==-S){const O=ai(E.sizeTree,L);I=Kt(I,0,O);const j=pn(E.sizeTree,-S+1)[1];I=Kt(I,1,j)}return{...E,sizeTree:I,...Gu(E.offsetTree,0,I,C)}}else{const I=Dr(E.sizeTree).reduce((A,{k:N,v:M})=>Kt(A,Math.max(0,N+S),M),ko());return{...E,sizeTree:I,...Gu(E.offsetTree,0,I,C)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:y,statefulTotalCount:o,trackItemSizes:b,itemSize:d}},et(vr,Bf),{singleton:!0}),bj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Xx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oi=je(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ie(),p=Ie(),m=ne(0);let v=null,b=null,y=null;function g(){v&&(v(),v=null),y&&(y(),y=null),b&&(clearTimeout(b),b=null),Se(o,!1)}return he(Z(h,Ee(e,s,t,m,l,c,f),Ee(r,u,d),de(([[T,S,E,C,k,I,A,N],M,L,P])=>{const O=Xx(T),{align:j,behavior:D,offset:V}=O,H=C-1,_=Kx(O,S,H);let $=li(_,S.offsetTree,M)+I;j==="end"?($+=L+pn(S.sizeTree,_)[1]-E+P,_===H&&($+=A)):j==="center"?$+=(L+pn(S.sizeTree,_)[1]-E+P)/2:$-=k,V&&($+=V);const K=re=>{g(),re?(N("retrying to scroll to",{location:T},Xt.DEBUG),Se(h,T)):(Se(p,!0),N("list did not change, scroll successful",{},Xt.DEBUG))};if(g(),D==="smooth"){let re=!1;y=ze(n,ee=>{re=re||ee}),v=_n(a,()=>{K(re)})}else v=_n(Z(n,xj(150)),K);return b=setTimeout(()=>{g()},1200),Se(o,!0),N("scrolling from index to",{index:_,top:$,behavior:D},Xt.DEBUG),{top:$,behavior:D}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},et(jn,Bt,vr),{singleton:!0});function xj(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ci="up",zs="down",wj="none",Sj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},Tj=0,_i=je(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ne(!1),a=ne(!0),l=Ie(),c=Ie(),u=ne(4),d=ne(Tj),f=Dt(Z(bg(Z(be(t),Zo(1),xn(!0)),Z(be(t),Zo(1),xn(!1),vg(100))),Je()),!1),h=Dt(Z(bg(Z(s,xn(!0)),Z(s,xn(!1),vg(200))),Je()),!1);he(Z(Et(be(t),be(d)),de(([y,g])=>y<=g),Je()),a),he(Z(a,nr(50)),c);const p=Zt(Z(Et(e,be(n),be(r),be(o),be(u)),Rn((y,[{scrollTop:g,scrollHeight:T},S,E,C,k])=>{const I=g+S-T>-k,A={viewportHeight:S,scrollTop:g,scrollHeight:T};if(I){let M,L;return g>y.state.scrollTop?(M="SCROLLED_DOWN",L=y.state.scrollTop-g):(M="SIZE_DECREASED",L=y.state.scrollTop-g||y.scrollTopDelta),{atBottom:!0,state:A,atBottomBecause:M,scrollTopDelta:L}}let N;return A.scrollHeight>y.state.scrollHeight?N="SIZE_INCREASED":S<y.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":g<y.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:A}},Sj),Je((y,g)=>y&&y.atBottom===g.atBottom))),m=Dt(Z(e,Rn((y,{scrollTop:g,scrollHeight:T,viewportHeight:S})=>{if(Bx(y.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+S)<1;return y.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:y.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ye(y=>y.changed),de(y=>y.jump)),0);he(Z(p,de(y=>y.atBottom)),i),he(Z(i,nr(50)),l);const v=ne(zs);he(Z(e,de(({scrollTop:y})=>y),Je(),Rn((y,g)=>Mt(h)?{direction:y.direction,prevScrollTop:g}:{direction:g<y.prevScrollTop?ci:zs,prevScrollTop:g},{direction:zs,prevScrollTop:0}),de(y=>y.direction)),v),he(Z(e,nr(50),xn(wj)),v);const b=ne(0);return he(Z(f,ye(y=>!y),xn(0)),b),he(Z(t,nr(100),Ee(f),ye(([y,g])=>!!g),Rn(([y,g],[T])=>[g,T],[0,0]),de(([y,g])=>g-y)),b),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:m}},et(Bt)),br=je(([{log:e}])=>{const t=ne(!1),n=Zt(Z(t,ye(r=>r),Je()));return ze(t,r=>{r&&Mt(e)("props updated",{},Xt.DEBUG)}),{propsReady:t,didMount:n}},et(vr),{singleton:!0});function zf(e,t){e==0?t():requestAnimationFrame(()=>zf(e-1,t))}function Hf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Mi=je(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=ne(!0),l=ne(0),c=ne(!0);return he(Z(i,Ee(l),ye(([u,d])=>!!d),xn(!1)),a),he(Z(i,Ee(l),ye(([u,d])=>!!d),xn(!1)),c),ze(Z(Et(t,i),Ee(a,e,n,c),ye(([[,u],d,{sizeTree:f},h,p])=>u&&(!Ye(f)||Lf(h))&&!d&&!p),Ee(l)),([,u])=>{_n(s,()=>{Se(c,!0)}),zf(4,()=>{_n(r,()=>{Se(a,!0)}),Se(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},et(jn,Bt,Oi,br),{singleton:!0});function Sg(e){return e?e==="smooth"?"smooth":"auto":!1}const Ej=(e,t)=>typeof e=="function"?Sg(e(t)):t&&Sg(e),Cj=je(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ne(!1),d=Ie();let f=null;function h(m){Se(o,{index:"LAST",align:"end",behavior:m})}ze(Z(Et(Z(be(e),Zo(1)),a),Ee(be(u),n,s,c),de(([[m,v],b,y,g,T])=>{let S=v&&g,E="auto";return S&&(E=Ej(b,y||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),ye(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{f&&(f(),f=null),f=_n(t,()=>{Mt(l)("following output to ",{totalCount:m},Xt.DEBUG),h(v),f=null})});function p(m){const v=_n(r,b=>{m&&!b.atBottom&&b.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Mt(l)("scrolling to bottom due to increased size",{},Xt.DEBUG),h("auto"))});setTimeout(v,100)}return ze(Z(Et(be(u),e,i),ye(([m,,v])=>m&&v),Rn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),ye(({refreshed:m})=>m),Ee(u,e)),([,m])=>{Mt(s)&&p(m!==!1)}),ze(d,()=>{p(Mt(u)!==!1)}),ze(Et(be(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},et(jn,_i,Oi,Mi,br,vr,Bt));function Rj(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Qx=je(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ie(),i=Ie(),a=Zt(Z(s,de(Rj)));return he(Z(a,de(l=>l.totalCount)),e),he(Z(a,de(l=>l.groupIndices)),t),he(Z(Et(r,n,o),ye(([l,c])=>Dl(c)),de(([l,c,u])=>pn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Je(),de(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},et(jn,Bt));function ui(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Jx(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Ya="top",qa="bottom",Tg="none";function Eg(e,t,n){return typeof e=="number"?n===ci&&t===Ya||n===zs&&t===qa?e:0:n===ci?t===Ya?e.main:e.reverse:t===qa?e.main:e.reverse}function Cg(e,t){return typeof e=="number"?e:e[t]||0}const Uf=je(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ie(),i=ne(0),a=ne(0),l=ne(0),c=Dt(Z(Et(be(e),be(t),be(r),be(s,ui),be(l),be(i),be(o),be(n),be(a)),de(([u,d,f,[h,p],m,v,b,y,g])=>{const T=u-y,S=v+b,E=Math.max(f-T,0);let C=Tg;const k=Cg(g,Ya),I=Cg(g,qa);return h-=y,h+=f+b,p+=f+b,p-=y,h>u+S-k&&(C=ci),p<u-E+d+I&&(C=zs),C!==Tg?[Math.max(T-f-Eg(m,Ya,C)-k,0),T-E-b+d+Eg(m,qa,C)+I]:null}),ye(u=>u!=null),Je(ui)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},et(Bt),{singleton:!0});function Pj(e,t,n){if(Dl(t)){const r=Zx(e,t);return[{index:pn(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 Mc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Rg(e,t,n){if(e.length===0)return[];if(!Dl(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=Ml(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function ya(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:Rg(e,o,s),topItems:Rg(t,o,s),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function ew(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Hf(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return ya(c,[],a,o,n,r)}const no=je(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=ne([]),v=ne(0),b=Ie();he(s.topItemsIndexes,m);const y=Dt(Z(Et(h,p,be(i,ui),be(t),be(e),be(u),c,be(m),be(r),be(o),n),ye(([E,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return E&&!C&&!A}),de(([,,[E,C],k,I,A,N,M,L,P,O])=>{const j=I,{sizeTree:D,offsetTree:V}=j,H=Mt(v);if(k===0)return{...Mc,totalCount:k};if(E===0&&C===0)return H===0?{...Mc,totalCount:k}:ew(H,A,I,L,P,O||[]);if(Ye(D))return H>0?null:ya(Pj(Hf(A,k),j,O),[],k,P,j,L);const _=[];if(M.length>0){const G=M[0],F=M[M.length-1];let B=0;for(const z of Ml(D,G,F)){const Y=z.value,Q=Math.max(z.start,G),ue=Math.min(z.end,F);for(let U=Q;U<=ue;U++)_.push({index:U,size:Y,offset:B,data:O&&O[U]}),B+=Y}}if(!N)return ya([],_,k,P,j,L);const $=M.length>0?M[M.length-1]+1:0,K=mj(V,E,C,$);if(K.length===0)return null;const re=k-1,ee=_l([],G=>{for(const F of K){const B=F.value;let z=B.offset,Y=F.start;const Q=B.size;if(B.offset<E){Y+=Math.floor((E-B.offset+P)/(Q+P));const U=Y-F.start;z+=U*Q+U*P}Y<$&&(z+=($-Y)*Q,Y=$);const ue=Math.min(F.end,re);for(let U=Y;U<=ue&&!(z>=C);U++)G.push({index:U,size:Q,offset:z,data:O&&O[U]}),z+=Q+P}});return ya(ee,_,k,P,j,L)}),ye(E=>E!==null),Je()),Mc);he(Z(n,ye(Lf),de(E=>E==null?void 0:E.length)),t),he(Z(y,de(E=>E.topListHeight)),d),he(d,l),he(Z(y,de(E=>[E.top,E.bottom])),a),he(Z(y,de(E=>E.items)),b);const g=Zt(Z(y,ye(({items:E})=>E.length>0),Ee(t,n),ye(([{items:E},C])=>E[E.length-1].originalIndex===C-1),de(([,E,C])=>[E-1,C]),Je(ui),de(([E])=>E))),T=Zt(Z(y,nr(200),ye(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),de(({items:E})=>E[0].index),Je())),S=Zt(Z(y,ye(({items:E})=>E.length>0),de(({items:E})=>{let C=0,k=E.length-1;for(;E[C].type==="group"&&C<k;)C++;for(;E[k].type==="group"&&k>C;)k--;return{startIndex:E[C].index,endIndex:E[k].index}}),Je(Jx)));return{listState:y,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:S,itemsRendered:b,initialItemCount:v,...f}},et(jn,Qx,Uf,Mi,Oi,_i,br,Bf),{singleton:!0}),kj=je(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(he(Z(a,Ee(s),ye(([,l])=>l!==0),Ee(o,e,t,r,n),de(([[,l],c,u,d,f,h=[]])=>ew(l,c,u,d,f,h))),i),{}),et(jn,Mi,no,br),{singleton:!0}),tw=je(([{scrollVelocity:e}])=>{const t=ne(!1),n=Ie(),r=ne(!1);return he(Z(e,Ee(r,t,n),ye(([o,s])=>!!s),de(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Je()),t),ze(Z(Et(t,e,n),Ee(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},et(_i),{singleton:!0}),Ij=je(([{topItemsIndexes:e}])=>{const t=ne(0);return he(Z(t,ye(n=>n>0),de(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},et(no)),nw=je(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ie(),i=Dt(Z(Et(e,r,t,n,o),de(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return he(be(i),s),{totalListHeight:i,totalListHeightChanged:s}},et(Bt,no),{singleton:!0});function rw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const Aj=rw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Oj=je(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Zt(Z(l,Ee(a),Rn(([,b,y,g],[{items:T,totalCount:S,bottom:E,offsetBottom:C},k])=>{const I=E+C;let A=0;return y===S&&b.length>0&&T.length>0&&(T[0].originalIndex===0&&b[0].originalIndex===0||(A=I-g,A!==0&&(A+=k))),[A,T,S,I]},[0,[],0,0]),ye(([b])=>b!==0),Ee(t,i,r,s,h,p),ye(([,b,y,g,,,T])=>!T&&!g&&b!==0&&y===ci),de(([[b],,,,,y])=>(y("Upward scrolling compensation",{amount:b},Xt.DEBUG),b))));function v(b){b>0?(Se(e,{top:-b,behavior:"auto"}),Se(n,0)):(Se(n,0),Se(e,{top:-b,behavior:"auto"}))}return ze(Z(m,Ee(n,o)),([b,y,g])=>{g&&Aj()?Se(n,y-b):v(-b)}),ze(Z(Et(Dt(o,!1),n,p),ye(([b,y,g])=>!b&&!g&&y!==0),de(([b,y])=>y),nr(1)),v),he(Z(u,de(b=>({top:-b}))),e),ze(Z(c,Ee(d,f),de(([b,{lastSize:y,groupIndices:g,sizeTree:T},S])=>{function E(C){return C*(y+S)}if(g.length===0)return E(b);{let C=0;const k=ai(T,0);let I=0,A=0;for(;I<b;){I++,C+=k;let N=g.length===A+1?1/0:g[A+1]-g[A]-1;I+N>b&&(C-=k,N=b-I+1),I+=N,C+=E(N),A++}return C}})),b=>{Se(n,b),requestAnimationFrame(()=>{Se(e,{top:b}),requestAnimationFrame(()=>{Se(n,0),Se(p,!1)})})}),{deviation:n}},et(Bt,_i,no,jn,vr,Bf)),_j=je(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ne(0);return ze(Z(e,Ee(r),ye(([,o])=>o!==0),de(([,o])=>({top:o}))),o=>{_n(Z(n,Zo(1),ye(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Se(t,o)})})}),{initialScrollTop:r}},et(br,Bt,no),{singleton:!0}),Mj=je(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ne(!1),r=Dt(Z(Et(n,e,t),ye(([o])=>o),de(([,o,s])=>Math.max(0,o-s)),nr(0),Je()),0);return{alignToBottom:n,paddingTopAddition:r}},et(Bt,nw),{singleton:!0}),Gf=je(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ie(),r=Ie(),o=Ie(),s=ne(!1),i=ne(void 0);return he(Z(Et(n,r),de(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),he(Z(e,Ee(r),de(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},et(Bt)),Dj=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,Nj=je(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ie();return he(Z(u,Ee(e,o,t,s,i,a,r),Ee(n),de(([[d,f,h,p,m,v,b,y],g])=>{const{done:T,behavior:S,align:E,calculateViewLocation:C=Dj,...k}=d,I=Kx(d,f,p-1),A=li(I,f.offsetTree,g)+m+v,N=A+pn(f.sizeTree,I)[1],M=y+v,L=y+h-b,P=C({itemTop:A,itemBottom:N,viewportTop:M,viewportBottom:L,locationParams:{behavior:S,align:E,...k}});return P?T&&_n(Z(l,ye(O=>O===!1),Zo(Mt(l)?1:2)),T):T&&T(),P}),ye(d=>d!==null)),c),{scrollIntoView:u}},et(jn,Bt,Oi,no,vr),{singleton:!0}),jj=je(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ie(),u=ne(void 0),d=ne(null),f=ne(null);return he(a,d),he(l,f),ze(Z(c,Ee(e,n,i,d,f,r)),([h,p,m,v,b,y,g])=>{const T=yj(p.sizeTree);v&&b!==null&&y!==null&&(m=b.scrollTop-y.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),he(Z(u,ye(Lf),de(Lj)),o),he(Z(s,Ee(u),ye(([,h])=>h!==void 0),Je(),de(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},et(jn,Bt,Mi,br,Gf));function Lj(e){return{offset:e.scrollTop,index:0,align:"start"}}const Fj=je(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),et(Uf,kj,br,tw,nw,_j,Mj,Gf,Nj,vr)),ow=je(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,v,b,{listState:y,topItemsIndexes:g,...T},{scrollToIndex:S},E,{topItemCount:C},{groupCounts:k},I])=>(he(T.rangeChanged,I.scrollSeekRangeChanged),he(Z(I.windowViewportRect,de(A=>A.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:u,...b,statefulTotalCount:c,listState:y,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:d,...v}),et(jn,Mi,Bt,jj,Cj,no,Oi,Oj,Ij,Qx,Fj)),Dc="-webkit-sticky",Pg="sticky",sw=rw(()=>{if(typeof document>"u")return Pg;const e=document.createElement("div");return e.style.position=Dc,e.style.position===Dc?Dc:Pg});function Yf(e,t){const n=x.useRef(null),r=x.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=$f(r),i=x.useCallback(()=>{r(s.current)},[r,s]);return x.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Nl=x.createContext(void 0),iw=x.createContext(void 0);function qf(e){return e}const Vj=je(()=>{const e=ne(l=>`Item ${l}`),t=ne(null),n=ne(l=>`Group ${l}`),r=ne({}),o=ne(qf),s=ne("div"),i=ne(to),a=(l,c=null)=>Dt(Z(r,de(u=>u[l]),Je()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),$j=je(([e,t])=>({...e,...t}),et(ow,Vj)),Bj=({height:e})=>x.createElement("div",{style:{height:e}}),Wj={position:sw(),zIndex:1,overflowAnchor:"none"},zj={overflowAnchor:"none"},kg=x.memo(function({showTopList:t=!1}){const n=Pe("listState"),r=nn("sizeRanges"),o=Pe("useWindowScroll"),s=Pe("customScrollParent"),i=nn("windowScrollContainerState"),a=nn("scrollContainerState"),l=s||o?i:a,c=Pe("itemContent"),u=Pe("context"),d=Pe("groupContent"),f=Pe("trackItemSizes"),h=Pe("itemSize"),p=Pe("log"),m=nn("gap"),{callbackRef:v}=$x(r,h,f,t?to:l,p,m,s),[b,y]=x.useState(0);Xf("deviation",P=>{b!==P&&y(P)});const g=Pe("EmptyPlaceholder"),T=Pe("ScrollSeekPlaceholder")||Bj,S=Pe("ListComponent"),E=Pe("ItemComponent"),C=Pe("GroupComponent"),k=Pe("computeItemKey"),I=Pe("isSeeking"),A=Pe("groupIndices").length>0,N=Pe("alignToBottom"),M=Pe("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:N?"auto":0,...M?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?x.createElement(g,ut(g,u)):x.createElement(S,{...ut(S,u),ref:v,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const O=P.originalIndex,j=k(O+n.firstItemIndex,P.data,u);return I?x.createElement(T,{...ut(T,u),key:j,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?x.createElement(C,{...ut(C,u),key:j,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,style:Wj},d(P.index,u)):x.createElement(E,{...ut(E,u),...aw(E,P.data),key:j,"data-index":O,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:zj},A?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),Hj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},bs=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),Uj={width:"100%",position:sw(),top:0,zIndex:1};function ut(e,t){if(typeof e!="string")return{context:t}}function aw(e,t){return{item:typeof e=="string"?void 0:t}}const Gj=x.memo(function(){const t=Pe("HeaderComponent"),n=nn("headerHeight"),r=Pe("headerFooterTag"),o=Mn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=Pe("context");return t?x.createElement(r,{ref:o},x.createElement(t,ut(t,s))):null}),Yj=x.memo(function(){const t=Pe("FooterComponent"),n=nn("footerHeight"),r=Pe("headerFooterTag"),o=Mn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=Pe("context");return t?x.createElement(r,{ref:o},x.createElement(t,ut(t,s))):null});function Kf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return x.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=Wx(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),x.createElement(c,{ref:h,style:{...Hj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ut(c,f)},i)})}function Zf({usePublisher:e,useEmitter:t,useEmitterValue:n}){return x.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:b}=Wx(l,u,c,to,h);return nj(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",b),t("scrollBy",v),x.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...ut(c,p)},i)})}const qj=({children:e})=>{const t=x.useContext(Nl),n=nn("viewportHeight"),r=nn("fixedItemHeight"),o=Pe("alignToBottom"),s=Mn(x.useMemo(()=>si(n,i=>mn(i,"height")),[n]));return x.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.createElement("div",{style:bs(o),ref:s,"data-viewport-type":"element"},e)},Kj=({children:e})=>{const t=x.useContext(Nl),n=nn("windowViewportRect"),r=nn("fixedItemHeight"),o=Pe("customScrollParent"),s=Yf(n,o),i=Pe("alignToBottom");return x.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.createElement("div",{ref:s,style:bs(i),"data-viewport-type":"window"},e)},Zj=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...Uj,marginTop:`${n}px`},o=Pe("context");return x.createElement(t,{style:r,...ut(t,o)},e)},Xj=x.memo(function(t){const n=Pe("useWindowScroll"),r=Pe("topItemsIndexes").length>0,o=Pe("customScrollParent"),s=o||n?eL:Jj,i=o||n?Kj:qj;return x.createElement(s,{...t},r&&x.createElement(Zj,null,x.createElement(kg,{showTopList:!0})),x.createElement(i,null,x.createElement(Gj,null),x.createElement(kg,null),x.createElement(Yj,null)))}),{Component:Qj,usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}=Vf($j,{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"}},Xj),Jj=Kf({usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}),eL=Zf({usePublisher:nn,useEmitterValue:Pe,useEmitter:Xf}),Qf=Qj,Ig={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},tL={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Ag,ceil:Og,floor:Ka,min:Nc,max:Hs}=Math;function nL(e){return{...tL,items:e}}function _g(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function rL(e,t){return e&&e.column===t.column&&e.row===t.row}function na(e,t){return e&&e.width===t.width&&e.height===t.height}const oL=je(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:b,windowScrollContainerState:y,windowScrollTo:g},T])=>{const S=ne(0),E=ne(0),C=ne(Ig),k=ne({height:0,width:0}),I=ne({height:0,width:0}),A=Ie(),N=Ie(),M=ne(0),L=ne(null),P=ne({row:0,column:0}),O=Ie(),j=Ie(),D=ne(!1),V=ne(0),H=ne(!0),_=ne(!1);ze(Z(p,Ee(V),ye(([F,B])=>!!B)),()=>{Se(H,!1),Se(E,0)}),ze(Z(Et(p,H,I,k,V,_),ye(([F,B,z,Y,,Q])=>F&&!B&&z.height!==0&&Y.height!==0&&!Q)),([,,,,F])=>{Se(_,!0),zf(1,()=>{Se(A,F)}),_n(Z(r),()=>{Se(n,[0,0]),Se(H,!0)})}),he(Z(j,ye(F=>F!=null&&F.scrollTop>0),xn(0)),E),ze(Z(p,Ee(j),ye(([,F])=>F!=null)),([,F])=>{F&&(Se(k,F.viewport),Se(I,F==null?void 0:F.item),Se(P,F.gap),F.scrollTop>0&&(Se(D,!0),_n(Z(r,Zo(1)),B=>{Se(D,!1)}),Se(i,{top:F.scrollTop})))}),he(Z(k,de(({height:F})=>F)),o),he(Z(Et(be(k,na),be(I,na),be(P,(F,B)=>F&&F.column===B.column&&F.row===B.row),be(r)),de(([F,B,z,Y])=>({viewport:F,item:B,gap:z,scrollTop:Y}))),O),he(Z(Et(be(S),t,be(P,rL),be(I,na),be(k,na),be(L),be(E),be(D),be(H),be(V)),ye(([,,,,,,,F])=>!F),de(([F,[B,z],Y,Q,ue,U,ke,,qe,Le])=>{const{row:Te,column:q}=Y,{height:se,width:W}=Q,{width:J}=ue;if(ke===0&&(F===0||J===0))return Ig;if(W===0){const Lt=Hf(Le,F),xr=Lt===0?Math.max(ke-1,0):Lt;return nL(_g(Lt,xr,U))}const pe=lw(J,W,q);let ce,Fe;qe?B===0&&z===0&&ke>0?(ce=0,Fe=ke-1):(ce=pe*Ka((B+Te)/(se+Te)),Fe=pe*Og((z+Te)/(se+Te))-1,Fe=Nc(F-1,Hs(Fe,pe-1)),ce=Nc(Fe,Hs(0,ce))):(ce=0,Fe=-1);const te=_g(ce,Fe,U),{top:ie,bottom:_e}=Mg(ue,Y,Q,te),Ke=Og(F/pe),At=Ke*se+(Ke-1)*Te-_e;return{items:te,offsetTop:ie,offsetBottom:At,top:ie,bottom:_e,itemHeight:se,itemWidth:W}})),C),he(Z(L,ye(F=>F!==null),de(F=>F.length)),S),he(Z(Et(k,I,C,P),ye(([F,B,{items:z}])=>z.length>0&&B.height!==0&&F.height!==0),de(([F,B,{items:z},Y])=>{const{top:Q,bottom:ue}=Mg(F,Y,B,z);return[Q,ue]}),Je(ui)),n);const $=ne(!1);he(Z(r,Ee($),de(([F,B])=>B||F!==0)),$);const K=Zt(Z(be(C),ye(({items:F})=>F.length>0),Ee(S,$),ye(([{items:F},B,z])=>z&&F[F.length-1].index===B-1),de(([,F])=>F-1),Je())),re=Zt(Z(be(C),ye(({items:F})=>F.length>0&&F[0].index===0),xn(0),Je())),ee=Zt(Z(be(C),Ee(D),ye(([{items:F},B])=>F.length>0&&!B),de(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),Je(Jx),nr(0)));he(ee,f.scrollSeekRangeChanged),he(Z(A,Ee(k,I,S,P),de(([F,B,z,Y,Q])=>{const ue=Xx(F),{align:U,behavior:ke,offset:qe}=ue;let Le=ue.index;Le==="LAST"&&(Le=Y-1),Le=Hs(0,Le,Nc(Y-1,Le));let Te=Yu(B,Q,z,Le);return U==="end"?Te=Ag(Te-B.height+z.height):U==="center"&&(Te=Ag(Te-B.height/2+z.height/2)),qe&&(Te+=qe),{top:Te,behavior:ke}})),i);const G=Dt(Z(C,de(F=>F.offsetBottom+F.bottom)),0);return he(Z(m,de(F=>({width:F.visibleWidth,height:F.visibleHeight}))),k),{data:L,totalCount:S,viewportDimensions:k,itemDimensions:I,scrollTop:r,scrollHeight:N,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:A,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:v,customScrollParent:b,windowScrollContainerState:y,deviation:M,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:j,...f,initialTopMostItemIndex:V,gridState:C,totalListHeight:G,...d,startReached:re,endReached:K,rangeChanged:ee,stateChanged:O,propsReady:h,stateRestoreInProgress:D,...T}},et(Uf,Bt,_i,tw,br,Gf,vr));function Mg(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Yu(e,t,n,r[0].index),i=Yu(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Yu(e,t,n,r){const o=lw(e.width,n.width,t.column),s=Ka(r/o),i=s*n.height+Hs(0,s-1)*t.row;return i>0?i+t.row:i}function lw(e,t,n){return Hs(1,Ka((e+n)/(Ka(t)+n)))}const sL=je(()=>{const e=ne(c=>`Item ${c}`),t=ne({}),n=ne(null),r=ne("virtuoso-grid-item"),o=ne("virtuoso-grid-list"),s=ne(qf),i=ne("div"),a=ne(to),l=(c,u=null)=>Dt(Z(t,de(d=>d[c]),Je()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),iL=je(([e,t])=>({...e,...t}),et(oL,sL)),aL=x.memo(function(){const t=nt("gridState"),n=nt("listClassName"),r=nt("itemClassName"),o=nt("itemContent"),s=nt("computeItemKey"),i=nt("isSeeking"),a=dn("scrollHeight"),l=nt("ItemComponent"),c=nt("ListComponent"),u=nt("ScrollSeekPlaceholder"),d=nt("context"),f=dn("itemDimensions"),h=dn("gap"),p=nt("log"),m=nt("stateRestoreInProgress"),v=Mn(x.useMemo(()=>b=>{const y=b.parentElement.parentElement.scrollHeight;a(y);const g=b.firstChild;if(g){const{width:T,height:S}=g.getBoundingClientRect();f({width:T,height:S})}h({row:Dg("row-gap",getComputedStyle(b).rowGap,p),column:Dg("column-gap",getComputedStyle(b).columnGap,p)})},[a,f,h,p]));return m?null:x.createElement(c,{ref:v,className:n,...ut(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(b=>{const y=s(b.index,b.data,d);return i?x.createElement(u,{key:y,...ut(u,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):x.createElement(l,{...ut(l,d),className:r,"data-index":b.index,key:y},o(b.index,b.data,d))}))}),lL=x.memo(function(){const t=nt("HeaderComponent"),n=dn("headerHeight"),r=nt("headerFooterTag"),o=Mn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=nt("context");return t?x.createElement(r,{ref:o},x.createElement(t,ut(t,s))):null}),cL=x.memo(function(){const t=nt("FooterComponent"),n=dn("footerHeight"),r=nt("headerFooterTag"),o=Mn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=nt("context");return t?x.createElement(r,{ref:o},x.createElement(t,ut(t,s))):null}),uL=({children:e})=>{const t=x.useContext(iw),n=dn("itemDimensions"),r=dn("viewportDimensions"),o=Mn(x.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return x.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),x.createElement("div",{style:bs(!1),ref:o},e)},dL=({children:e})=>{const t=x.useContext(iw),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=nt("customScrollParent"),s=Yf(n,o);return x.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),x.createElement("div",{ref:s,style:bs(!1)},e)},fL=x.memo(function({...t}){const n=nt("useWindowScroll"),r=nt("customScrollParent"),o=r||n?mL:hL,s=r||n?dL:uL;return x.createElement(o,{...t},x.createElement(s,null,x.createElement(lL,null),x.createElement(aL,null),x.createElement(cL,null)))}),{Component:T$,usePublisher:dn,useEmitterValue:nt,useEmitter:cw}=Vf(iL,{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"}},fL),hL=Kf({usePublisher:dn,useEmitterValue:nt,useEmitter:cw}),mL=Zf({usePublisher:dn,useEmitterValue:nt,useEmitter:cw});function Dg(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Xt.WARN),t==="normal"?0:parseInt(t??"0",10)}const pL=je(()=>{const e=ne(l=>x.createElement("td",null,"Item $",l)),t=ne(null),n=ne(null),r=ne(null),o=ne({}),s=ne(qf),i=ne(to),a=(l,c=null)=>Dt(Z(o,de(u=>u[l]),Je()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}),gL=je(([e,t])=>({...e,...t}),et(ow,pL)),yL=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e}})),vL=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e,padding:0,border:0}})),bL={overflowAnchor:"none"},xL=x.memo(function(){const t=Be("listState"),n=fn("sizeRanges"),r=Be("useWindowScroll"),o=Be("customScrollParent"),s=fn("windowScrollContainerState"),i=fn("scrollContainerState"),a=o||r?s:i,l=Be("itemContent"),c=Be("trackItemSizes"),u=Be("itemSize"),d=Be("log"),{callbackRef:f,ref:h}=$x(n,u,c,a,d,void 0,o),[p,m]=x.useState(0);Jf("deviation",j=>{p!==j&&(h.current.style.marginTop=`${j}px`,m(j))});const v=Be("EmptyPlaceholder"),b=Be("ScrollSeekPlaceholder")||yL,y=Be("FillerRow")||vL,g=Be("TableBodyComponent"),T=Be("TableRowComponent"),S=Be("computeItemKey"),E=Be("isSeeking"),C=Be("paddingTopAddition"),k=Be("firstItemIndex"),I=Be("statefulTotalCount"),A=Be("context");if(I===0&&v)return x.createElement(v,ut(v,A));const N=t.offsetTop+C+p,M=t.offsetBottom,L=N>0?x.createElement(y,{height:N,key:"padding-top",context:A}):null,P=M>0?x.createElement(y,{height:M,key:"padding-bottom",context:A}):null,O=t.items.map(j=>{const D=j.originalIndex,V=S(D+k,j.data,A);return E?x.createElement(b,{...ut(b,A),key:V,index:j.index,height:j.size,type:j.type||"item"}):x.createElement(T,{...ut(T,A),...aw(T,j.data),key:V,"data-index":D,"data-known-size":j.size,"data-item-index":j.index,style:bL},l(j.index,j.data,A))});return x.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...ut(g,A)},[L,...O,P])}),wL=({children:e})=>{const t=x.useContext(Nl),n=fn("viewportHeight"),r=fn("fixedItemHeight"),o=Mn(x.useMemo(()=>si(n,s=>mn(s,"height")),[n]));return x.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.createElement("div",{style:bs(!1),ref:o,"data-viewport-type":"element"},e)},SL=({children:e})=>{const t=x.useContext(Nl),n=fn("windowViewportRect"),r=fn("fixedItemHeight"),o=Be("customScrollParent"),s=Yf(n,o);return x.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),x.createElement("div",{ref:s,style:bs(!1),"data-viewport-type":"window"},e)},TL=x.memo(function(t){const n=Be("useWindowScroll"),r=Be("customScrollParent"),o=fn("fixedHeaderHeight"),s=fn("fixedFooterHeight"),i=Be("fixedHeaderContent"),a=Be("fixedFooterContent"),l=Be("context"),c=Mn(x.useMemo(()=>si(o,y=>mn(y,"height")),[o])),u=Mn(x.useMemo(()=>si(s,y=>mn(y,"height")),[s])),d=r||n?RL:CL,f=r||n?SL:wL,h=Be("TableComponent"),p=Be("TableHeadComponent"),m=Be("TableFooterComponent"),v=i?x.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ut(p,l)},i()):null,b=a?x.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ut(m,l)},a()):null;return x.createElement(d,{...t},x.createElement(f,null,x.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ut(h,l)},[v,x.createElement(xL,{key:"TableBody"}),b])))}),{Component:EL,usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}=Vf(gL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},TL),CL=Kf({usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}),RL=Zf({usePublisher:fn,useEmitterValue:Be,useEmitter:Jf}),PL=EL,uw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>w.jsxs("div",{className:Me("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx(jx,{as:"button",type:"button","aria-description":r,title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(Fb,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:w.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?w.jsxs(x.Fragment,{children:[w.jsx(jb,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),w.jsx(qk,{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]}),Di=x.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,componentName:m,placeholder:v,hideLeft:b=!1,required:y,disabled:g,reportStatus:T},S)=>{const E=ZO(),C=T!==void 0?T:E.input.iconFeedback,k=d??h,I=Ct(),A=e??I.inputOptionalLabel;return w.jsxs("fieldset",{ref:S,form:u,disabled:g,"data-error":!!c,"aria-disabled":g,"data-component":m,"data-interactive":!!s,className:Me("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[w.jsxs("label",{form:u,htmlFor:k,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[w.jsx(uw,{info:a,hideLeft:b,reportStatus:C,title:p,placeholder:v,children:A||n?w.jsxs(x.Fragment,{children:[y?null:w.jsx("span",{"aria-disabled":g,className:"text-opacity-70 aria-disabled:text-disabled",children:A}),n?w.jsx(x.Fragment,{children:n}):null]}):null}),w.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?w.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?w.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),w.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),w.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),kL=e=>w.jsx(x.Fragment,{children:e.children}),IL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},AL={caseSensitive:!1,sort:!1},OL=[],_L=x.forwardRef(function(t,n){return w.jsx(ct.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:w.jsx(fr,{children:t.children})})}),ML=x.forwardRef(function({item:t,context:n,...r},o){return w.jsx(ct.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),DL={List:_L,Item:ML},mo=320,jc=40,NL=x.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const v=x.useRef(null),b=x.useRef(null),y=p.value??p.defaultValue??"",g=Ct(),[T,S]=x.useState(()=>Math.min(mo,jc*e.length)),[E,C]=x.useState(!1),[k,I]=x.useState(""),[A,N]=x.useState(y),[M,L]=x.useState(()=>{var q;return((q=e.find(se=>se.value===y))==null?void 0:q.label)??y}),[P,O]=x.useState(null),j=x.useRef(OL),D=t&&k!==""?[{value:k,label:k,"data-dynamic":"true"},...e]:e,V=new Mr(D,["value","label"],AL).search(k),H=()=>{C(!1),S(0)},_=V.filter(q=>q.hidden!==!0),$=t?void 0:`^(${e.map(q=>`${au(q.value)}${q.label?"|"+au(q.label):""}`).join("|")})$`;x.useEffect(()=>{if(p.value){const q=e.find(se=>se.value===p.value);N((q==null?void 0:q.label)??p.value)}},[p.value]),x.useEffect(()=>{E||S(0)},[E]),x.useEffect(()=>{if(!E)return;const q=G.floating;if(q.current===null)return;let se=0;Array.from(q.current.querySelectorAll("li")).slice(0,Math.min(V.length,10)).forEach(pe=>{const ce=pe.getBoundingClientRect();se+=ce.height});const J=Math.min(se,mo);S(J)},[k,E]);const{x:K,y:re,strategy:ee,refs:G,context:F}=Qr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Pi,middleware:[ki(4),lx({padding:10,elementContext:"reference",apply(q){var ce;const se=(ce=v.current)==null?void 0:ce.getBoundingClientRect().width,W=q.elements.floating.querySelector("ul"),J=(W==null?void 0:W.getBoundingClientRect().height)||0,pe=Math.min(J<jc?mo:J,mo);pi.flushSync(()=>setTimeout(()=>{const Fe=(W==null?void 0:W.getBoundingClientRect().height)??0;return Fe<jc?void S(pe):void S(Math.min(Fe,mo))},50)),Object.assign(q.elements.floating.style,{width:`${se}px`,maxWidth:`${se}px`,maxHeight:`${mo}`})}})]}),B=Ex(F,IL),{getReferenceProps:z,getFloatingProps:Y,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),jf(F,{cols:0,listRef:j,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:q=>O(se=>q??se)})]);x.useEffect(()=>{const q=G.reference.current;if(q)return bi(q)},[]);const ue=(q,se)=>{N(q.value);const W=G.reference.current;if(!W)return;W==null||W.setAttribute("data-value",q.value),W.value=q.value;const J=new Event("change",{bubbles:!1,cancelable:!0});W.dispatchEvent(J),p.onChange&&p.onChange(J),L(q.label??""),H(),I(""),O(se)},U=q=>{var W;const se=q.target.value;return I(se),!E&&se===""?C(!0):(q.target.name=p.name||"",se?C(!0):(W=p.onChange)==null?void 0:W.call(p,q))},ke=()=>{var q;C(!0),I(""),(q=G.reference.current)==null||q.focus()},qe=()=>{C(!0),I("")},Le=()=>{var q;(q=G.reference.current)==null||q.setAttribute("data-value",""),I(""),N(""),L(""),xd(G.reference.current),H()},Te=p.id||p.name;return w.jsxs(Di,{...p,left:d,error:f,ref:v,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:ke,children:[w.jsx(of,{size:20}),w.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),A?w.jsx("button",{type:"button",onClick:Le,className:"p-2 transition-colors link:text-danger md:p-1",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[w.jsx("input",{"data-shadow":"true",...z({...p,onChange:U,onFocus:qe,pattern:$,ref:G.setReference,name:`${Te}-shadow`,id:`${Te}-shadow`,onClick:q=>q.currentTarget.focus(),onKeyDown(q){var se,W;if(q.key==="ArrowDown"){let J=P+1;return J>V.length-1&&(J=0),(se=b.current)==null||se.scrollIntoView({index:J}),O(J)}if(q.key==="ArrowUp"){let J=P-1;return J<0&&(J=V.length-1),(W=b.current)==null||W.scrollIntoView({index:J}),O(J)}if(q.key==="Escape")return q.currentTarget.blur(),H();if(q.key==="Enter"){if(P!==null&&V[P])return q.preventDefault(),ue(V[P],P);if(V.length===1)return q.preventDefault(),ue(V[0],0)}}}),"data-value":A,"data-error":!!f,"data-name":Te,"data-target":Te,required:h,value:E?k:M||A,"aria-autocomplete":"list",autoComplete:"off",className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",p.className)}),w.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:m,required:h,defaultValue:p.value||A||void 0}),w.jsx(Zr,{preserveTabOrder:!0,children:E?w.jsx(ms,{guards:!0,returnFocus:!1,context:F,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsxs("ul",{...Y({ref:G.setFloating,style:{...B.styles,position:ee,left:(K??0)+(A?26:18),top:re??0}}),"data-floating":"true",className:"isolate z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[V.length===0?w.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:o||g.autocompleteEmpty})}):null,w.jsx(Qf,{ref:b,data:_,components:DL,hidden:_.length===0,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:T},itemContent:(q,se)=>{const W=se.Render??kL,J=A===se.value||A===se.label,pe=P===q,ce=se.label??se.value;return w.jsx("button",{"data-value":se.value,...Q({ref:Fe=>void(j.current[q]=Fe),role:"option",type:"button","aria-checked":J,"aria-current":J,"aria-selected":J,"aria-busy":se.disabled,onClick:()=>ue(se,q),className:`cursor-pointer w-full p-2 text-left ${J?"bg-primary-hover text-primary-foreground":""} ${pe?"bg-floating-hover text-floating-foreground":""}`}),children:w.jsx(W,{...p,label:se.label,value:se.value,children:ce})})}})]})}):null})]})});class Io extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Io&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}delete(t){const n=super.delete(t);return this.list=Array.from(this.entries())??[],n}map(t){return this.list.map(n=>t(n[1]))}clone(){return new Io(this)}}const eh=x.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>w.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:Me("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[w.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Me("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,w.jsx("span",{"data-name":"checkbox-label",className:Me("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),jL=e=>w.jsx(x.Fragment,{children:e.children}),LL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},FL={caseSensitive:!1,sort:!1},Ng=[],VL=x.forwardRef(function(t,n){return w.jsx(ct.ul,{...t,ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:w.jsx(fr,{children:t.children})})}),$L=x.forwardRef(function({item:t,context:n,...r},o){return w.jsx(ct.li,{...r,ref:o,className:"last:rounded-t-lg"})}),BL={List:VL,Item:$L},WL=e=>{const t=Ct(),n=x.useRef(null),r=x.Children.count(e.children),[o,s]=x.useState(!1);return x.useEffect(()=>{if(n.current===null)return;const i=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return s(!1);if(l>i.width)return s(!0)},[r]),w.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?w.jsxs(Td,{size:"small","data-multicounter":"true",children:[r," ",t.multiComboboxSelectedLabel]}):e.children})},zL=x.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:s,interactive:i,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:h=!1,dynamicOption:p=!1,...m},v)=>{const b=x.useMemo(()=>new Io(r.map(W=>[W.value,W])),[r]),y=x.useRef(null),g=x.useRef(null),T=m.value??m.defaultValue??Ng,S=Ct(),[E,C]=x.useState(0),[k,I]=x.useState(!1),[A,N]=x.useState(""),[M,L]=x.useState(()=>{const W=new Io;return T.forEach(J=>{const pe=b.get(J);return pe?W.set(J,pe):void 0}),W}),P=x.useMemo(()=>Array.from(M.keys()),[M]),[O,j]=x.useState(()=>{const W=new Set(T);return r.reduce((J,pe)=>W.has(pe.value)?[...J,pe.label??pe.value]:J,[])??T}),[D,V]=x.useState(null),H=x.useRef(Ng),_=p&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...r]:r,$=new Mr(_,["value","label"],FL).search(A);x.useEffect(()=>{k||C(0)},[k]),x.useEffect(()=>{m.value&&L(new Io(m.value.map(W=>[W,b.get(W)])))},[m.value,b]);const{x:K,y:re,strategy:ee,refs:G,context:F}=Qr({open:k,transform:!0,strategy:"absolute",onOpenChange:I,whileElementsMounted:Pi,middleware:[ki(4),lx({padding:10,elementContext:"reference",apply(W){var ce;const J=(ce=y.current)==null?void 0:ce.getBoundingClientRect().width,pe=360;pi.flushSync(()=>setTimeout(()=>C(pe),200)),Object.assign(W.elements.floating.style,{width:`${J}px`,maxWidth:`${J}px`,maxHeight:`${pe}px`,height:`${pe}px`})}})]}),B=Ex(F,LL),{getReferenceProps:z,getFloatingProps:Y,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),jf(F,{cols:0,listRef:H,loop:!0,virtual:!0,allowEscape:!0,activeIndex:D,selectedIndex:D,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:W=>V(J=>W??J)})]);x.useEffect(()=>{const W=G.reference.current;if(W)return bi(W)},[]);const ue=(W,J)=>{const pe=M.clone();M.has(W.value)?pe.delete(W.value):pe.set(W.value,W),L(pe);const ce=G.reference.current;if(!ce)return;ce==null||ce.setAttribute("data-value",W.value),ce.value=Array.from(pe.values());const Fe=new Event("change",{bubbles:!1,cancelable:!0});ce.dispatchEvent(Fe),m.onChange&&m.onChange(Fe),j(te=>te.concat(W.label??"")),N(""),V(J)},U=W=>{const J=W.target.value;return N(J),!k&&J===""?I(!0):(W.target.name=m.name||"",J?I(!0):void 0)},ke=()=>{var W;I(!0),N(""),(W=G.reference.current)==null||W.focus()},qe=()=>{I(!0),N("")},Le=()=>{var W;(W=G.reference.current)==null||W.setAttribute("data-value",""),N(""),xd(G.reference.current),I(!1)},Te=m.id||m.name,q=M.map(W=>w.jsx(Td,{size:"small",children:W.label??W.value},`multicombobox-${W.value}-x`)),se=$.filter(W=>W.hidden!==!0);return w.jsxs(Di,{...m,left:e,error:t,ref:y,form:m.form,name:m.name,feedback:d,hideLeft:f,required:h,title:m.title,container:o,rightLabel:s,interactive:i,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ke,children:[w.jsx(of,{size:20}),w.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),M?w.jsx("button",{type:"button",onClick:Le,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[w.jsx("button",{...z({...m,onFocus:qe,id:`${Te}-shadow`,name:`${Te}-shadow`,ref:G.setReference}),type:"button","data-name":Te,"data-target":Te,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":P.join(","),value:k?A:O||M,className:Me("input placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","truncate overflow-ellipsis",m.className),children:w.jsx(WL,{label:c,children:q})}),w.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:v,required:h,defaultValue:m.value||P||void 0}),w.jsx(Zr,{preserveTabOrder:!0,children:k?w.jsx(ms,{guards:!0,returnFocus:!1,context:F,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsxs("div",{...Y({ref:G.setFloating,style:{...B.styles,position:ee,left:(K??0)+(M?26:18),top:re??0}}),"data-floating":"true",className:"isolate z-floating m-0 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[w.jsx("input",{autoFocus:!0,value:A,onChange:U,title:m.title,placeholder:S.multiComboboxInnerPlaceholder,onKeyDown:W=>{var J,pe;if(W.key==="ArrowDown"){let ce=D+1;return ce>$.length-1&&(ce=0),(J=g.current)==null||J.scrollIntoView({index:ce}),V(ce)}if(W.key==="ArrowUp"){let ce=D-1;return ce<0&&(ce=$.length-1),(pe=g.current)==null||pe.scrollIntoView({index:ce}),V(ce)}if(W.key==="Escape")return W.currentTarget.blur(),I(!1);if(W.key==="Enter"){if(D!==null&&$[D])return W.preventDefault(),ue($[D],D);if($.length===1)return W.preventDefault(),ue($[0],0)}},className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary"}),$.length===0?w.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||S.autocompleteEmpty})}):null,w.jsx(Qf,{ref:g,data:se,components:BL,hidden:se.length===0,style:{height:M.size===0?E-49:E-86},className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(W,J)=>{const pe=J.Render??jL,ce=M.has(J.value)||M.has(J.label??""),Fe=D===W,te=J.label??J.value;return w.jsx("button",{"data-value":J.value,...Q({ref:ie=>void(H.current[W]=ie),role:"option",type:"button","aria-checked":ce,"aria-current":ce,"aria-selected":ce,"aria-busy":J.disabled,onClick:()=>ue(J,W)}),className:`w-full cursor-pointer p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ce||Fe?"bg-floating-hover text-floating-foreground":""}`,children:w.jsx(eh,{onChange:Sd,checked:ce,"aria-checked":ce,onClick:ie=>(ie.stopPropagation(),void ie.preventDefault()),children:w.jsx(pe,{...m,label:J.label,value:J.value,children:te})})})}}),M.size===0?null:w.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:q})]})}):null})]})}),dw=(e,t,n,r)=>x.forwardRef(({info:s,left:i,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:h,type:p="text",labelClassName:m,feedback:v=null,hideLeft:b=!1,...y},g)=>{const T=e,S=y.id??y.name,E=x.useRef(null);return x.useEffect(()=>{if(E.current===null)return;const C=E.current,k=bi(E.current),I=r==null?void 0:r(C),A=N=>{const M=N;if(M.key==="Enter"&&C.enterKeyHint==="next"){const L=C.getAttribute("data-next");if(L){const P=document.getElementById(L);if(P)return P.focus(),void M.preventDefault()}}};return C.addEventListener("keydown",A),()=>{I==null||I(),k(),C.removeEventListener("keydown",A)}},[]),w.jsx(Di,{...n,info:s,left:i,error:l,right:c,form:y.form,name:y.name,feedback:v,hideLeft:b,title:y.title,container:u,rightLabel:d,disabled:y.disabled,interactive:f,required:y.required,componentName:t,id:y.name||y.id,optionalText:h,labelClassName:m,placeholder:y.placeholder,children:w.jsx(T,{...n,...y,id:S,name:S,type:p,"data-next":a,"aria-busy":y.disabled,"aria-disabled":y.disabled,"aria-readonly":y.readOnly,ref:bd(g,E),className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",y.className)})})}),Ni=dw(l0,"input",{type:"text"}),jg=new Date(1970,11,31),Lc={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Lg={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},HL={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")},Fc=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},UL=x.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||yf(),l=x.useId(),c=Ct(),u=x.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=x.useState(e||void 0),[h,p]=x.useState(!1),m=Fc(u,jg).flatMap(C=>it.keyof(Lc,C.type)?Lc[C.type](C.value):[]),v=Fc(u,jg).reduce((C,k)=>C+(it.keyof(Lg,k.type)?Lg[k.type](k.value):""),""),[b,y]=x.useState(d?Fc(u,d).reduce((C,k)=>C+(it.keyof(Lc,k.type)?HL[k.type](d,k.value):""),""):""),g=C=>{const k=C.target.value;if(y(k),m.length===k.length&&m.every((A,N)=>{const M=k.charAt(N);return typeof A=="string"?M===A:A.test(M)})){const A=zo(iO(k,v,new Date));return f(A),r==null?void 0:r(A)}return f(void 0),r==null?void 0:r(void 0)},T=C=>(f(C),r==null||r(C),y(C?aA(C,v):"")),S=Hb(d),E=S?d.toISOString():void 0;return w.jsx(Ni,{...s,mask:m,value:b,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:g,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??v,right:w.jsxs(x.Fragment,{children:[w.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),w.jsx(ps,{open:h,onChange:p,trigger:w.jsxs("span",{"aria-labelledby":l,children:[w.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),w.jsx(Gk,{})]}),buttonProps:{"aria-describedby":l},children:w.jsx(y0,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:S?d:void 0})})]})})}),GL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],YL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],KL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Fg=(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 Vg(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?KL:qL:t.binary?YL:GL,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=Fg(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=Fg(Number(e),t.locale,i),c=n[a];return s+l+r+c}var qu={exports:{}},ra={exports:{}},Ve={};/** @license React v16.13.1
|
|
213
213
|
* react-is.production.min.js
|
|
214
214
|
*
|
|
215
215
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
216
216
|
*
|
|
217
217
|
* This source code is licensed under the MIT license found in the
|
|
218
218
|
* LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/var $g;function ZL(){if($g)return Ve;$g=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function g(
|
|
219
|
+
*/var $g;function ZL(){if($g)return Ve;$g=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=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 s:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case h:case i:return S;default:return E}}case n:return E}}}function T(S){return g(S)===c}return Ve.AsyncMode=l,Ve.ConcurrentMode=c,Ve.ContextConsumer=a,Ve.ContextProvider=i,Ve.Element=t,Ve.ForwardRef=u,Ve.Fragment=r,Ve.Lazy=p,Ve.Memo=h,Ve.Portal=n,Ve.Profiler=s,Ve.StrictMode=o,Ve.Suspense=d,Ve.isAsyncMode=function(S){return T(S)||g(S)===l},Ve.isConcurrentMode=T,Ve.isContextConsumer=function(S){return g(S)===a},Ve.isContextProvider=function(S){return g(S)===i},Ve.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ve.isForwardRef=function(S){return g(S)===u},Ve.isFragment=function(S){return g(S)===r},Ve.isLazy=function(S){return g(S)===p},Ve.isMemo=function(S){return g(S)===h},Ve.isPortal=function(S){return g(S)===n},Ve.isProfiler=function(S){return g(S)===s},Ve.isStrictMode=function(S){return g(S)===o},Ve.isSuspense=function(S){return g(S)===d},Ve.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===s||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===h||S.$$typeof===i||S.$$typeof===a||S.$$typeof===u||S.$$typeof===v||S.$$typeof===b||S.$$typeof===y||S.$$typeof===m)},Ve.typeOf=g,Ve}var $e={};/** @license React v16.13.1
|
|
220
220
|
* react-is.development.js
|
|
221
221
|
*
|
|
222
222
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
223
223
|
*
|
|
224
224
|
* This source code is licensed under the MIT license found in the
|
|
225
225
|
* LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/var Bg;function XL(){return Bg||(Bg=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function g(U){return typeof U=="string"||typeof U=="function"||U===r||U===c||U===s||U===o||U===d||U===f||typeof U=="object"&&U!==null&&(U.$$typeof===p||U.$$typeof===h||U.$$typeof===i||U.$$typeof===a||U.$$typeof===u||U.$$typeof===v||U.$$typeof===b||U.$$typeof===y||U.$$typeof===m)}function T(U){if(typeof U=="object"&&U!==null){var ke=U.$$typeof;switch(ke){case t:var qe=U.type;switch(qe){case l:case c:case r:case s:case o:case d:return qe;default:var Le=qe&&qe.$$typeof;switch(Le){case a:case u:case p:case h:case i:return Le;default:return ke}}case n:return ke}}}var
|
|
226
|
+
*/var Bg;function XL(){return Bg||(Bg=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function g(U){return typeof U=="string"||typeof U=="function"||U===r||U===c||U===s||U===o||U===d||U===f||typeof U=="object"&&U!==null&&(U.$$typeof===p||U.$$typeof===h||U.$$typeof===i||U.$$typeof===a||U.$$typeof===u||U.$$typeof===v||U.$$typeof===b||U.$$typeof===y||U.$$typeof===m)}function T(U){if(typeof U=="object"&&U!==null){var ke=U.$$typeof;switch(ke){case t:var qe=U.type;switch(qe){case l:case c:case r:case s:case o:case d:return qe;default:var Le=qe&&qe.$$typeof;switch(Le){case a:case u:case p:case h:case i:return Le;default:return ke}}case n:return ke}}}var S=l,E=c,C=a,k=i,I=t,A=u,N=r,M=p,L=h,P=n,O=s,j=o,D=d,V=!1;function H(U){return V||(V=!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.")),_(U)||T(U)===l}function _(U){return T(U)===c}function $(U){return T(U)===a}function K(U){return T(U)===i}function re(U){return typeof U=="object"&&U!==null&&U.$$typeof===t}function ee(U){return T(U)===u}function G(U){return T(U)===r}function F(U){return T(U)===p}function B(U){return T(U)===h}function z(U){return T(U)===n}function Y(U){return T(U)===s}function Q(U){return T(U)===o}function ue(U){return T(U)===d}$e.AsyncMode=S,$e.ConcurrentMode=E,$e.ContextConsumer=C,$e.ContextProvider=k,$e.Element=I,$e.ForwardRef=A,$e.Fragment=N,$e.Lazy=M,$e.Memo=L,$e.Portal=P,$e.Profiler=O,$e.StrictMode=j,$e.Suspense=D,$e.isAsyncMode=H,$e.isConcurrentMode=_,$e.isContextConsumer=$,$e.isContextProvider=K,$e.isElement=re,$e.isForwardRef=ee,$e.isFragment=G,$e.isLazy=F,$e.isMemo=B,$e.isPortal=z,$e.isProfiler=Y,$e.isStrictMode=Q,$e.isSuspense=ue,$e.isValidElementType=g,$e.typeOf=T}()),$e}var Wg;function fw(){return Wg||(Wg=1,process.env.NODE_ENV==="production"?ra.exports=ZL():ra.exports=XL()),ra.exports}/*
|
|
227
227
|
object-assign
|
|
228
228
|
(c) Sindre Sorhus
|
|
229
229
|
@license MIT
|
|
230
|
-
*/var Vc,zg;function QL(){if(zg)return Vc;zg=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Vc=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Vc}var $c,Hg;function th(){if(Hg)return $c;Hg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $c=e,$c}var Bc,Ug;function hw(){return Ug||(Ug=1,Bc=Function.call.bind(Object.prototype.hasOwnProperty)),Bc}var Wc,Gg;function JL(){if(Gg)return Wc;Gg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=th(),n={},r=hw();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Wc=o,Wc}var zc,Yg;function eF(){if(Yg)return zc;Yg=1;var e=fw(),t=QL(),n=th(),r=hw(),o=JL(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return zc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(_){var $=_&&(c&&_[c]||_[u]);if(typeof $=="function")return $}var f="<<anonymous>>",h={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:y(),arrayOf:g,element:T(),elementType:
|
|
231
|
-
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var U=ue(B,Q,ee,G,F+"."+Q,n);if(U)return U}return null}return v($)}function P(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(P);if(_===null||a(_))return!0;var $=d(_);if($){var
|
|
230
|
+
*/var Vc,zg;function QL(){if(zg)return Vc;zg=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Vc=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Vc}var $c,Hg;function th(){if(Hg)return $c;Hg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $c=e,$c}var Bc,Ug;function hw(){return Ug||(Ug=1,Bc=Function.call.bind(Object.prototype.hasOwnProperty)),Bc}var Wc,Gg;function JL(){if(Gg)return Wc;Gg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=th(),n={},r=hw();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Wc=o,Wc}var zc,Yg;function eF(){if(Yg)return zc;Yg=1;var e=fw(),t=QL(),n=th(),r=hw(),o=JL(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return zc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(_){var $=_&&(c&&_[c]||_[u]);if(typeof $=="function")return $}var f="<<anonymous>>",h={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:y(),arrayOf:g,element:T(),elementType:S(),instanceOf:E,node:A(),objectOf:k,oneOf:C,oneOfType:I,shape:M,exact:L};function p(_,$){return _===$?_!==0||1/_===1/$:_!==_&&$!==$}function m(_,$){this.message=_,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function v(_){if(process.env.NODE_ENV!=="production")var $={},K=0;function re(G,F,B,z,Y,Q,ue){if(z=z||f,Q=Q||B,ue!==n){if(l){var U=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 U.name="Invariant Violation",U}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=z+":"+B;!$[ke]&&K<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Q+"` 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."),$[ke]=!0,K++)}}return F[B]==null?G?F[B]===null?new m("The "+Y+" `"+Q+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+Y+" `"+Q+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:_(F,B,z,Y,Q)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function b(_){function $(K,re,ee,G,F,B){var z=K[re],Y=j(z);if(Y!==_){var Q=D(z);return new m("Invalid "+G+" `"+F+"` of type "+("`"+Q+"` supplied to `"+ee+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return v($)}function y(){return v(i)}function g(_){function $(K,re,ee,G,F){if(typeof _!="function")return new m("Property `"+F+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var B=K[re];if(!Array.isArray(B)){var z=j(B);return new m("Invalid "+G+" `"+F+"` of type "+("`"+z+"` supplied to `"+ee+"`, expected an array."))}for(var Y=0;Y<B.length;Y++){var Q=_(B,Y,ee,G,F+"["+Y+"]",n);if(Q instanceof Error)return Q}return null}return v($)}function T(){function _($,K,re,ee,G){var F=$[K];if(!a(F)){var B=j(F);return new m("Invalid "+ee+" `"+G+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return v(_)}function S(){function _($,K,re,ee,G){var F=$[K];if(!e.isValidElementType(F)){var B=j(F);return new m("Invalid "+ee+" `"+G+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return v(_)}function E(_){function $(K,re,ee,G,F){if(!(K[re]instanceof _)){var B=_.name||f,z=H(K[re]);return new m("Invalid "+G+" `"+F+"` of type "+("`"+z+"` supplied to `"+ee+"`, expected ")+("instance of `"+B+"`."))}return null}return v($)}function C(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function $(K,re,ee,G,F){for(var B=K[re],z=0;z<_.length;z++)if(p(B,_[z]))return null;var Y=JSON.stringify(_,function(ue,U){var ke=D(U);return ke==="symbol"?String(U):U});return new m("Invalid "+G+" `"+F+"` of value `"+String(B)+"` "+("supplied to `"+ee+"`, expected one of "+Y+"."))}return v($)}function k(_){function $(K,re,ee,G,F){if(typeof _!="function")return new m("Property `"+F+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var B=K[re],z=j(B);if(z!=="object")return new m("Invalid "+G+" `"+F+"` of type "+("`"+z+"` supplied to `"+ee+"`, expected an object."));for(var Y in B)if(r(B,Y)){var Q=_(B,Y,ee,G,F+"."+Y,n);if(Q instanceof Error)return Q}return null}return v($)}function I(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var $=0;$<_.length;$++){var K=_[$];if(typeof K!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(K)+" at index "+$+"."),i}function re(ee,G,F,B,z){for(var Y=[],Q=0;Q<_.length;Q++){var ue=_[Q],U=ue(ee,G,F,B,z,n);if(U==null)return null;U.data&&r(U.data,"expectedType")&&Y.push(U.data.expectedType)}var ke=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new m("Invalid "+B+" `"+z+"` supplied to "+("`"+F+"`"+ke+"."))}return v(re)}function A(){function _($,K,re,ee,G){return P($[K])?null:new m("Invalid "+ee+" `"+G+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return v(_)}function N(_,$,K,re,ee){return new m((_||"React class")+": "+$+" type `"+K+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function M(_){function $(K,re,ee,G,F){var B=K[re],z=j(B);if(z!=="object")return new m("Invalid "+G+" `"+F+"` of type `"+z+"` "+("supplied to `"+ee+"`, expected `object`."));for(var Y in _){var Q=_[Y];if(typeof Q!="function")return N(ee,G,F,Y,D(Q));var ue=Q(B,Y,ee,G,F+"."+Y,n);if(ue)return ue}return null}return v($)}function L(_){function $(K,re,ee,G,F){var B=K[re],z=j(B);if(z!=="object")return new m("Invalid "+G+" `"+F+"` of type `"+z+"` "+("supplied to `"+ee+"`, expected `object`."));var Y=t({},K[re],_);for(var Q in Y){var ue=_[Q];if(r(_,Q)&&typeof ue!="function")return N(ee,G,F,Q,D(ue));if(!ue)return new m("Invalid "+G+" `"+F+"` key `"+Q+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(K[re],null," ")+`
|
|
231
|
+
Valid keys: `+JSON.stringify(Object.keys(_),null," "));var U=ue(B,Q,ee,G,F+"."+Q,n);if(U)return U}return null}return v($)}function P(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(P);if(_===null||a(_))return!0;var $=d(_);if($){var K=$.call(_),re;if($!==_.entries){for(;!(re=K.next()).done;)if(!P(re.value))return!1}else for(;!(re=K.next()).done;){var ee=re.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function O(_,$){return _==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function j(_){var $=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":O($,_)?"symbol":$}function D(_){if(typeof _>"u"||_===null)return""+_;var $=j(_);if($==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return $}function V(_){var $=D(_);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function H(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},zc}var Hc,qg;function tF(){if(qg)return Hc;qg=1;var e=th();function t(){}function n(){}return n.resetWarningCache=t,Hc=function(){function r(i,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Hc}if(process.env.NODE_ENV!=="production"){var nF=fw(),rF=!0;qu.exports=eF()(nF.isElement,rF)}else qu.exports=tF()();var oF=qu.exports;const Ge=e1(oF);var sF=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 ji(e,t){var n=iF(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 iF(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=sF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var aF=[".DS_Store","Thumbs.db"];function lF(e){return gs(this,void 0,void 0,function(){return ys(this,function(t){return Za(e)&&cF(e.dataTransfer)?[2,hF(e.dataTransfer,e.type)]:uF(e)?[2,dF(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,fF(e)]:[2,[]]})})}function cF(e){return Za(e)}function uF(e){return Za(e)&&Za(e.target)}function Za(e){return typeof e=="object"&&e!==null}function dF(e){return Ku(e.target.files).map(function(t){return ji(t)})}function fF(e){return gs(this,void 0,void 0,function(){var t;return ys(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 ji(r)})]}})})}function hF(e,t){return gs(this,void 0,void 0,function(){var n,r;return ys(this,function(o){switch(o.label){case 0:return e.items?(n=Ku(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(mF))]):[3,2];case 1:return r=o.sent(),[2,Kg(mw(r))];case 2:return[2,Kg(Ku(e.files).map(function(s){return ji(s)}))]}})})}function Kg(e){return e.filter(function(t){return aF.indexOf(t.name)===-1})}function Ku(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function mF(e){if(typeof e.webkitGetAsEntry!="function")return Zg(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?pw(t):Zg(e)}function mw(e){return e.reduce(function(t,n){return Bu(Bu([],ug(t),!1),ug(Array.isArray(n)?mw(n):[n]),!1)},[])}function Zg(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=ji(t);return Promise.resolve(n)}function pF(e){return gs(this,void 0,void 0,function(){return ys(this,function(t){return[2,e.isDirectory?pw(e):gF(e)]})})}function pw(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return gs(i,void 0,void 0,function(){var l,c,u;return ys(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(pF)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function gF(e){return gs(this,void 0,void 0,function(){return ys(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=ji(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var yF=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function Xg(e){return xF(e)||bF(e)||yw(e)||vF()}function vF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
232
232
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xF(e){if(Array.isArray(e))return Zu(e)}function Qg(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 Jg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qg(Object(n),!0).forEach(function(r){gw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function di(e,t){return TF(e)||SF(e,t)||yw(e,t)||wF()}function wF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
233
233
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yw(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 SF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function TF(e){if(Array.isArray(e))return e}var EF="file-invalid-type",CF="file-too-large",RF="file-too-small",PF="too-many-files",kF=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:EF,message:"File type must be ".concat(n)}},ey=function(t){return{code:CF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ty=function(t){return{code:RF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},IF={code:PF,message:"Too many files"};function vw(e,t){var n=e.type==="application/x-moz-file"||yF(e,t);return[n,n?null:kF(t)]}function bw(e,t,n){if(kr(e.size))if(kr(t)&&kr(n)){if(e.size>n)return[!1,ey(n)];if(e.size<t)return[!1,ty(t)]}else{if(kr(t)&&e.size<t)return[!1,ty(t)];if(kr(n)&&e.size>n)return[!1,ey(n)]}return[!0,null]}function kr(e){return e!=null}function AF(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=vw(l,n),u=di(c,1),d=u[0],f=bw(l,r,o),h=di(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function Xa(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function oa(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 ny(e){e.preventDefault()}function OF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function _F(e){return e.indexOf("Edge/")!==-1}function MF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return OF(e)||_F(e)}function gn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!Xa(r)&&a&&a.apply(void 0,[r].concat(s)),Xa(r)})}}function DF(){return"showOpenFilePicker"in window}function NF(e){if(kr(e)){var t=Object.entries(e).filter(function(n){var r=di(n,2),o=r[0],s=r[1],i=!0;return xw(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(ww))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=di(r,2),s=o[0],i=o[1];return Jg(Jg({},n),{},gw({},s,i))},{});return[{description:"Files",accept:t}]}return e}function jF(e){if(kr(e))return Object.entries(e).reduce(function(t,n){var r=di(n,2),o=r[0],s=r[1];return[].concat(Xg(t),[o],Xg(s))},[]).filter(function(t){return xw(t)||ww(t)}).join(",")}function LF(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function FF(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function xw(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function ww(e){return/^.*\.[\w]+$/.test(e)}var VF=["children"],$F=["open"],BF=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],WF=["refKey","onChange","onClick"];function zF(e){return GF(e)||UF(e)||Sw(e)||HF()}function HF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
234
234
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GF(e){if(Array.isArray(e))return Xu(e)}function Uc(e,t){return KF(e)||qF(e,t)||Sw(e,t)||YF()}function YF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
235
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sw(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 qF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function KF(e){if(Array.isArray(e))return e}function ry(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 tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(n),!0).forEach(function(r){Qu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ry(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qa(e,t){if(e==null)return{};var n=ZF(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZF(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var nh=w.forwardRef(function(e,t){var n=e.children,r=Qa(e,VF),o=Ew(r),s=o.open,i=Qa(o,$F);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(tt(tt({},i),{},{open:s})))});nh.displayName="Dropzone";var Tw={disabled:!1,getFilesFromEvent:lF,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};nh.defaultProps=Tw;nh.propTypes={children:Ge.func,accept:Ge.objectOf(Ge.arrayOf(Ge.string)),multiple:Ge.bool,preventDropOnDocument:Ge.bool,noClick:Ge.bool,noKeyboard:Ge.bool,noDrag:Ge.bool,noDragEventsBubbling:Ge.bool,minSize:Ge.number,maxSize:Ge.number,maxFiles:Ge.number,disabled:Ge.bool,getFilesFromEvent:Ge.func,onFileDialogCancel:Ge.func,onFileDialogOpen:Ge.func,useFsAccessApi:Ge.bool,autoFocus:Ge.bool,onDragEnter:Ge.func,onDragLeave:Ge.func,onDragOver:Ge.func,onDrop:Ge.func,onDropAccepted:Ge.func,onDropRejected:Ge.func,onError:Ge.func,validator:Ge.func};var Ju={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Ew(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=tt(tt({},Tw),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,b=t.useFsAccessApi,y=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,x=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=w.useMemo(function(){return jF(n)},[n]),N=w.useMemo(function(){return NF(n)},[n]),O=w.useMemo(function(){return typeof v=="function"?v:oy},[v]),L=w.useMemo(function(){return typeof m=="function"?m:oy},[m]),P=w.useRef(null),M=w.useRef(null),j=w.useReducer(XF,Ju),D=Uc(j,2),V=D[0],z=D[1],_=V.isFocused,$=V.isFileDialogActive,Z=w.useRef(typeof window<"u"&&window.isSecureContext&&b&&DF()),re=function(){!Z.current&&$&&setTimeout(function(){if(M.current){var ie=M.current.files;ie.length||(z({type:"closeDialog"}),L())}},300)};w.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[M,$,L,Z]);var ee=w.useRef([]),G=function(ie){P.current&&P.current.contains(ie.target)||(ie.preventDefault(),ee.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",ny,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",ny),document.removeEventListener("drop",G))}},[P,g]),w.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var F=w.useCallback(function(te){k?k(te):console.error(te)},[k]),B=w.useCallback(function(te){te.preventDefault(),te.persist(),J(te),ee.current=[].concat(zF(ee.current),[te.target]),oa(te)&&Promise.resolve(o(te)).then(function(ie){if(!(Xa(te)&&!C)){var _e=ie.length,Ke=_e>0&&AF({files:ie,accept:A,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),Ct=_e>0&&!Ke;z({isDragAccept:Ke,isDragReject:Ct,isDragActive:!0,type:"setDraggedFiles"}),c&&c(te)}}).catch(function(ie){return F(ie)})},[o,c,F,C,A,i,s,a,l,I]),H=w.useCallback(function(te){te.preventDefault(),te.persist(),J(te);var ie=oa(te);if(ie&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return ie&&d&&d(te),!1},[d,C]),Y=w.useCallback(function(te){te.preventDefault(),te.persist(),J(te);var ie=ee.current.filter(function(Ke){return P.current&&P.current.contains(Ke)}),_e=ie.indexOf(te.target);_e!==-1&&ie.splice(_e,1),ee.current=ie,!(ie.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oa(te)&&u&&u(te))},[P,u,C]),Q=w.useCallback(function(te,ie){var _e=[],Ke=[];te.forEach(function(Ct){var At=vw(Ct,A),Lt=Uc(At,2),xr=Lt[0],ro=Lt[1],oo=bw(Ct,i,s),Li=Uc(oo,2),Fl=Li[0],Vl=Li[1],$l=I?I(Ct):null;if(xr&&Fl&&!$l)_e.push(Ct);else{var Bl=[ro,Vl];$l&&(Bl=Bl.concat($l)),Ke.push({file:Ct,errors:Bl.filter(function(Zw){return Zw})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(Ct){Ke.push({file:Ct,errors:[IF]})}),_e.splice(0)),z({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,ie),Ke.length>0&&p&&p(Ke,ie),_e.length>0&&h&&h(_e,ie)},[z,a,A,i,s,l,f,h,p,I]),ue=w.useCallback(function(te){te.preventDefault(),te.persist(),J(te),ee.current=[],oa(te)&&Promise.resolve(o(te)).then(function(ie){Xa(te)&&!C||Q(ie,te)}).catch(function(ie){return F(ie)}),z({type:"reset"})},[o,Q,F,C]),U=w.useCallback(function(){if(Z.current){z({type:"openDialog"}),O();var te={multiple:a,types:N};window.showOpenFilePicker(te).then(function(ie){return o(ie)}).then(function(ie){Q(ie,null),z({type:"closeDialog"})}).catch(function(ie){LF(ie)?(L(ie),z({type:"closeDialog"})):FF(ie)?(Z.current=!1,M.current?(M.current.value=null,M.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(ie)});return}M.current&&(z({type:"openDialog"}),O(),M.current.value=null,M.current.click())},[z,O,L,b,Q,F,N,a]),ke=w.useCallback(function(te){!P.current||!P.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),U())},[P,U]),qe=w.useCallback(function(){z({type:"focus"})},[]),Le=w.useCallback(function(){z({type:"blur"})},[]),Te=w.useCallback(function(){T||(MF()?setTimeout(U,0):U())},[T,U]),q=function(ie){return r?null:ie},se=function(ie){return x?null:q(ie)},W=function(ie){return E?null:q(ie)},J=function(ie){C&&ie.stopPropagation()},pe=w.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=te.refKey,_e=ie===void 0?"ref":ie,Ke=te.role,Ct=te.onKeyDown,At=te.onFocus,Lt=te.onBlur,xr=te.onClick,ro=te.onDragEnter,oo=te.onDragOver,Li=te.onDragLeave,Fl=te.onDrop,Vl=Qa(te,BF);return tt(tt(Qu({onKeyDown:se(gn(Ct,ke)),onFocus:se(gn(At,qe)),onBlur:se(gn(Lt,Le)),onClick:q(gn(xr,Te)),onDragEnter:W(gn(ro,B)),onDragOver:W(gn(oo,H)),onDragLeave:W(gn(Li,Y)),onDrop:W(gn(Fl,ue)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,P),!r&&!x?{tabIndex:0}:{}),Vl)}},[P,ke,qe,Le,Te,B,H,Y,ue,x,E,r]),ce=w.useCallback(function(te){te.stopPropagation()},[]),Fe=w.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=te.refKey,_e=ie===void 0?"ref":ie,Ke=te.onChange,Ct=te.onClick,At=Qa(te,WF),Lt=Qu({accept:A,multiple:a,type:"file",style:{display:"none"},onChange:q(gn(Ke,ue)),onClick:q(gn(Ct,ce)),tabIndex:-1},_e,M);return tt(tt({},Lt),At)}},[M,n,a,ue,r]);return tt(tt({},V),{},{isFocused:_&&!r,getRootProps:pe,getInputProps:Fe,rootRef:P,inputRef:M,open:q(U)})}function XF(e,t){switch(t.type){case"focus":return tt(tt({},e),{},{isFocused:!0});case"blur":return tt(tt({},e),{},{isFocused:!1});case"openDialog":return tt(tt({},Ju),{},{isFileDialogActive:!0});case"closeDialog":return tt(tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return tt(tt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return tt(tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return tt({},Ju);default:return e}}function oy(){}const QF={isImage:e=>e.type.includes("image")},JF=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(QF.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Vg(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Vg(e.file.size)})},[e.file]),t.type==="img"?S.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[S.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[S.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),S.jsxs("div",{className:"flex flex-col",children:[S.jsx("span",{children:e.file.name}),S.jsx("span",{children:t.size})]})]}),S.jsx(jo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:S.jsx(Bo,{})})]}):S.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[S.jsxs("header",{className:"flex flex-row items-center gap-4",children:[S.jsx(Lb,{size:48}),S.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[S.jsx("span",{children:e.file.name}),S.jsx("span",{children:t.size})]})]}),S.jsx(jo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:S.jsx(Bo,{className:"text-danger"})})]})},e2=e=>S.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>S.jsx(JF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),t2=e=>e.isDragActive?S.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?S.jsx(e2,{onDeleteFile:e.onDeleteFile,files:e.files}):S.jsx(w.Fragment,{children:e.idle}),n2=S.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[S.jsx(tI,{size:64}),S.jsxs("p",{children:["You can drag your files or"," ",S.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),r2=({idle:e=n2,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Ew({onDrop:i});return S.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[S.jsx("input",{...l(r),name:r.name,id:r.name}),S.jsx(t2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},o2=["INPUT","SELECT"],Cw=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{o2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},s2=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return S.jsx("form",{...e,onSubmit:t})},i2=({children:e,className:t="",size:n,...r})=>S.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[S.jsx("input",{...r,type:"radio",className:Me("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),Hr=w.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const v=Et(),b=w.useRef(null),y=p.id??p.name;w.useImperativeHandle(m,()=>b.current),w.useEffect(()=>{if(b.current===null)return;const T=new AbortController,x=b.current,E=bi(b.current);return x.addEventListener("change",()=>x.setAttribute("data-selected","true"),{once:!0,signal:T.signal}),()=>{E(),T.abort()}},[]);const g=()=>{var T;return(T=b.current)==null?void 0:T.focus()};return S.jsx(Di,{info:n,left:f,error:h,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:S.jsx("label",{htmlFor:y,children:S.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[S.jsx(of,{size:20}),S.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:S.jsxs("select",{...p,id:y,name:y,value:p.value,required:e,ref:bd(m,b),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",title:typeof p.title=="string"?p.title:void 0,className:Me("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[S.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>w.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${y}-select-option-${T.value}`}))]})})}),a2=w.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=w.useId(),[i,a]=w.useState(r.checked??!1),l=i,c=w.useRef(null),u=Ys(r.onChange);w.useImperativeHandle(o,()=>c.current),w.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=()=>{var h,p;const f=!((h=c.current)!=null&&h.checked);a(f),(p=r==null?void 0:r.onCheck)==null||p.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return S.jsxs("fieldset",{className:Me("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[S.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[S.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:f=>a(f.target.checked),ref:c,type:"checkbox"}),S.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:S.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"})}),S.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:S.jsx("span",{className:"font-medium text-foreground",children:e})})]}),S.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),l2=e=>{const[t,n]=Ak();return w.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:Nk(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),S.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},c2=dw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
236
|
-
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),u2=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},d2={Item:w.forwardRef(function(t,n){return S.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return S.jsx("ul",{...t,ref:n,className:"space-y-3"})})},f2=e=>{const t=w.useRef(null),n=u2(t);return S.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[S.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:[S.jsx("header",{className:"border-b border-card-border pb-2"}),S.jsxs("div",{className:"px-8 space-y-2",children:[S.jsx(Ni,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),S.jsx(Qf,{height:n,useWindowScroll:!0,data:e.source,components:d2,itemContent:(r,o)=>S.jsx(w.Fragment,{children:S.jsx(eh,{children:S.jsx(e.Item,{data:o})})})})]})]}),S.jsx("div",{children:S.jsx(jo,{children:S.jsx(sf,{})})}),S.jsx("div",{})]})};var h2=Object.defineProperty,sy=Object.getOwnPropertySymbols,m2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable,iy=(e,t,n)=>t in e?h2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g2=(e,t)=>{for(var n in t||(t={}))m2.call(t,n)&&iy(e,n,t[n]);if(sy)for(var n of sy(t))p2.call(t,n)&&iy(e,n,t[n]);return e},rh=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},y2=(e,t,n,r)=>jl(rh,e,t,n,r),Xo=e=>typeof e=="object",or=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Xo(e)&&!Xo(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=>or(e[r],t[r]))},v2=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,b2=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ja=e=>/[0-9.]+/.test(e),ay=e=>["string","number"].includes(typeof e),ly=e=>e==null||(e==null?void 0:e.length)===0||e==="",cy={eq:or,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:ly,notEmpty:e=>!ly(e),in:(e,t)=>rh(t,n=>or(e,n)),notIn:(e,t)=>Rw(t,n=>!or(e,n))},x2=e=>{if(e in cy)return cy[e];throw new Error("Linq - Symbol not found")},Ao=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},jl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=x2(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},w2=(e,t,n,r)=>jl(Ao,e,t,n,r),Rw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},S2=(e,t,n,r)=>jl(Rw,e,t,n,r),Pw=e=>{if(e===null)return null;const t=g2({},e);return Object.keys(t).forEach(n=>t[n]=Xo(e[n])?Pw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},uy=(e,t)=>{if(Xo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(or(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(or(t,r))return!0}return!1},T2=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},E2=e=>Ao(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>or(o,t)):n===r.indexOf(t)),C2=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},kw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},R2=(e,t)=>kw(e,n=>n[t]),dy=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},P2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},k2=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Ja(e)&&Ja(t)?r.map(i=>Number.parseInt(i)):r},Gc=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ja(e)&&Ja(t)){const o=[],[s,i]=P2(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return k2(e,t,r)},I2=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Gc(r,o,1):Gc(r,s,Number.parseInt(o,10))}return ay(e)&&ay(t)?Gc(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Yc=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},fy=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},A2=(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)},O2=(e,t,n,r)=>jl(A2,e,t,n,r),hy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(b2(t))},Iw=(e=>(e.Asc="asc",e.Desc="desc",e))(Iw||{}),_2=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),M2=(e,t)=>e.sort(_2(t)),D2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Ao(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},N2=class ed{constructor(t=[]){this.array=t}static Range(...t){return I2(...t)}static New(t){return new ed(t)}Where(t,n,r){return this.array=w2(this.array,t,n,r),this}Some(t,n,r){return y2(this.array,t,n,r)}All(t,n,r){return S2(this.array,t,n,r)}Reverse(){return this.array=fy(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=O2(this.array,t,n,r),this}Distinct(){return this.array=E2(this.array),this}First(t){return t===void 0?this.array[0]:C2(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?Yc((n,r)=>n+r,0,this.array):Yc((n,r)=>n+v2(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return R2(this.array,t)}GroupWith(t){return kw(this.array,t)}Except(t){return Ao(this.array,n=>!uy(t,n))}Intersect(t){return Ao(this.array,n=>uy(t,n))}OrderBy(t,n){let r;return r=t?hy(this.array,t):this.array.toSorted(),this.array=n==="desc"?fy(r):r,this}Includes(t){return rh(this.array,n=>or(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 Yc(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(dy(this.array,n=>[t,n]))}Zip(t,n){return dy(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Ao(this.array,t).length}Get(t){return this.array[t]}Clone(){return new ed(Pw(this.array))}ToObject(t){return T2(this.array,t)}Sort(t){return Array.isArray(t)?M2(this.array,t):hy(this.array,t)}Unique(t){return D2(this.array,t)}},Aw=N2,Oo={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,b)=>{try{Object.keys(v).forEach(b)}catch(y){window.console.log(y)}},n=v=>v==null,r=v=>{const b=typeof v;return b==="string"||b==="number"||b==="boolean"||n(v)},o=(v,b)=>{const y=b.getItem(v);try{return JSON.parse(y)}catch{return y??null}},s=v=>Object.keys(v).reduce((b,y)=>({...b,[y]:o(y,v)}),{}),i=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,b)=>(v[decodeURIComponent(b[0].trim())]=decodeURIComponent(b[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(b=>b(v))},d=[{name:"expires",parse:v=>`expires=${i(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${i(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 b=v.domain??"";return b===""?"":`domain=${v.multiDomain?".":""}${b}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],f={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(b=>b.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const b=f.json()[v];if(n(b))return null;try{return JSON.parse(decodeURIComponent(b))}catch{return b}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,b,y={})=>{const g=r(b)?b:encodeURIComponent(JSON.stringify(b)),T=d.reduce((x,E)=>{const C=E.parse(y);return C===""?x:x.concat(C)},[`${encodeURIComponent(v)}=${g}`]).join(";");document.cookie=T,u()}},h=v=>{const b=new Set,y=g=>{v().removeItem(g);const T=s(v());b.forEach(x=>x(T))};return{delete:y,listener:g=>(b.add(g),()=>b.delete(g)),clearListeners:()=>b.clear(),json:(g=!1)=>g?s(v()):v(),has:g=>{const T=v().getItem(g);return!n(T)},deleteAll:()=>{t(v(),y),b.forEach(g=>g(v()))},get:g=>o(g,v()),set:(g,T)=>{v().setItem(g,JSON.stringify(T)),b.forEach(x=>x(v()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Oo);const oh=e=>e.headerLabel??e.thead??e.id,sh=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var _o=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(_o||{});const ih=e=>e.type==="number"?e.valueAsNumber:e.value,j2=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},L2={},F2=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,s)=>{const i=r.get(o.id);return i===void 0?e[s]:i})},V2=(e,t,n=L2)=>{const r=Ta()?null:Oo.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=hf({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:F2(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Ta()||Oo.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(i.state()),{set:l=>a(l)}});return{...o,...s,name:e}},td=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??_o.Text,i=t[s]??[],a=((c=i.find(d=>d["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:xi(),operation:l,label:oh(e),name:o,type:s,value:"",...r}},ah=()=>{const e=Et(),t=w.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:w.useMemo(()=>({[_o.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[_o.Boolean]:[t.is,t.isNot],[_o.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},$2=e=>{const t=Et(),n=ah(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,td(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(p=>u===p.id);return td(h,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=ih(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return S.jsx(w.Fragment,{children:S.jsx(ps,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(Zk,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:S.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return S.jsxs("li",{className:"flex flex-nowrap gap-3",children:[S.jsx(Hr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),S.jsx(Hr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),S.jsx(Ni,{"data-id":l.id,onChange:a,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),S.jsx("div",{className:"mt-5 flex items-center justify-center",children:S.jsx("button",{"data-id":l.id,type:"button",onClick:i,children:S.jsx(Bo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[S.jsx(af,{size:14})," ",t.tableFilterNewFilter]})})]})})})},B2=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=ah(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},i=a=>{const l=a.target.dataset.id||"",c=ih(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return S.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[S.jsx(Hr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),S.jsx(Ni,{"data-id":e.id,onChange:i,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),S.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:S.jsx(Bo,{className:"text-danger",size:14})})]})},W2=({item:e,onPointerDown:t})=>{const n=$r(0);return S.jsxs(Mb,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[S.jsx("button",{type:"button",className:"cursor-grab",children:S.jsx(Kk,{size:14})}),S.jsx("span",{children:e.groupName})]},e.groupId)},z2=e=>{var l;const t=Et(),n=sh(e.cols),r=Mk(),[o,s]=w.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var v;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((v=u.options.item(f))==null?void 0:v.label)||"";s(h);const p=new Aw(e.rows).GroupBy(d),m=e.cols.find(b=>b.id===d);e.setGroups(US(p).map((b,y)=>{const g=p[b];return{...m,groupId:xi(),groupKey:d,index:y,rows:g,groupName:b}}))},a=()=>e.setGroups([]);return S.jsx(w.Fragment,{children:S.jsxs(ps,{arrow:!1,title:t.tableGroupLabel,trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(eI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[S.jsxs("div",{className:"flex flex-nowrap items-center",children:[S.jsx(Hr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),S.jsx(jo,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:S.jsx(Bo,{size:16,className:"text-danger"})})]}),e.groups.length>0?S.jsxs("section",{className:"my-4",children:[S.jsx("header",{children:S.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),S.jsx(GT,{children:S.jsx(_b,{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=>S.jsx(W2,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},H2=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),U2=(e,t)=>e.toSorted(H2(t)),Ow=(e,t,n)=>({id:xi(),type:n,value:e.id,label:t}),G2=e=>{const t=Et(),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,Ow(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return S.jsx(w.Fragment,{children:S.jsx(ps,{title:t.tableSortDropdownTitle,trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(Nb,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:S.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>S.jsxs("li",{className:"flex flex-nowrap gap-3",children:[S.jsx(Hr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),S.jsx(Hr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),S.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:S.jsx(Bo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[S.jsx(af,{size:14})," ",t.tableSortAddButton]})})]})})})},Y2=e=>{const t=Et(),[n,r]=w.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");w.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=Ow(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=oh(e.col);return S.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[S.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?S.jsx(Uk,{size:14}):null,n==="desc"?S.jsx(Hk,{size:14}):null,n==="undefined"?S.jsx(Nb,{size:14}):null]})},q2=e=>S.jsx("header",{className:"min-w-full mb-1",children:S.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[S.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[S.jsx("span",{children:S.jsx($2,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),S.jsx("span",{children:S.jsx(G2,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),S.jsx("span",{children:S.jsx(z2,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),S.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=>S.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[S.jsxs("span",{children:[S.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),S.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[S.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),S.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=ih(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function K2(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const Z2=e=>{const t=w.useId(),n=Et(),r=e.asLink||"button",o=w.useMemo(()=>K2(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return S.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[S.jsx("p",{children:S.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?S.jsxs(w.Fragment,{children:[S.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),S.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>S.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),S.jsx("nav",{children:S.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?S.jsx("li",{children:S.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:S.jsx(w.Fragment,{children:typeof i=="string"?S.jsx("li",{children:"..."}):S.jsx("li",{children:S.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?S.jsx("li",{children:S.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},X2={top:0,left:0,right:0,bottom:-1},Q2=e=>{var p;const t=Et(),n=e.filters.filter(m=>m.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=ah(),a=r?Xk:Qk,l=m=>{const v=m.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(y=>y.id!==v))},c=w.useCallback(m=>{if(m===null)return;const v=new AbortController;return m.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===Iw.Asc?"ascending":"descending":"none",f=oh(e.header),h=$r(void 0);return S.jsxs(Mb,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:h},role:"columnheader","aria-sort":d,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[S.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:S.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?S.jsx(ps,{arrow:!0,trigger:S.jsxs("span",{children:[S.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),S.jsx(a,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:S.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",S.jsx("span",{className:"text-primary",children:f})]}),children:n.length===0===null?null:S.jsxs("ul",{className:"font-medium",children:[n.map(m=>S.jsx("li",{className:"my-1",children:S.jsx(B2,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),S.jsx("li",{children:S.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(td(e.header,i.options,i.operations))),children:[S.jsx(af,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,S.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?S.jsx(Y2,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),S.jsx(lt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:X2,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,v)=>{const b=m.target,y=h.get()||b.getBoundingClientRect().width,g=v.delta.x;return h.set(Math.abs(y+g))}})]})},J2=e=>S.jsx(_b,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:S.jsx(fr,{children:e.headers.map(t=>S.jsx(Q2,{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}`))})}),_w=w.createContext({}),eV=()=>w.useContext(_w),tV=w.forwardRef(({context:e,className:t="",...n},r)=>S.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:S.jsx(fr,{children:n.children})})),nV=w.forwardRef(({context:e,className:t="",...n},r)=>S.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),rV=w.forwardRef(({context:e,...t},n)=>{const r=eV(),o={...t==null?void 0:t.style,top:Pt.number(r.sticky)?`${r.sticky}px`:void 0};return S.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),oV=w.forwardRef(({context:e,item:t,...n},r)=>S.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),sV=w.forwardRef((e,t)=>e.context.loadingMore?S.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:S.jsx("tr",{role:"row",className:"bg-card-background",children:S.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:S.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),iV={TableHead:rV,Table:nV,TableBody:tV,TableRow:oV,TableFoot:sV},aV=[0,0,0,0,0,0,0,0,0,0],Mw=S.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),lV=(e,t,n)=>S.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?Mw:S.jsx(b0,{})}),cV=(e,t,n)=>{const r=n.cols,o=n.loading;return S.jsx(w.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=wd(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.className)||"";return w.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?Mw:c?S.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):S.jsx(w.Fragment,{children:Pt.nil(l)?"":l}))})})},uV=()=>S.jsx(w.Fragment,{}),dV=[{}],my=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=w.useRef(null),[f,h]=w.useState(!1),p=Ys(i),m=Ys(u.loadingMore),v=w.useMemo(()=>{if(u.loading)return aV;if(c)return u.rows;const b=new Aw(u.rows);return t.length>0&&t.forEach(y=>y.value===""||Number.isNaN(y.value)?void 0:b.Where(y.name,y.operation.symbol,y.value)),r.length===0?b.Select():U2(b.Select(),r)},[u.rows,t,r,u.loading]);return w.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,y=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return y.observe(b),()=>y.disconnect()},[]),S.jsxs("div",{className:"min-w-full",children:[S.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[S.jsx(PL,{useWindowScroll:!0,followOutput:"smooth",components:iV,totalCount:v.length,data:v.length===0?dV:v,fixedFooterContent:f?uV:null,itemContent:v.length===0?lV:cV,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>S.jsx(J2,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),S.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?S.jsx(Z2,{...l}):null]})},fV=(e,t)=>typeof t=="function"?t(e):t,sa=(e,t,n)=>e===t||n==null?void 0:n(t),hV=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>sh(e.cols),[e.cols]),[o,s]=hf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:fV(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),sa((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),sa((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),sa((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),sa((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return S.jsx(_w.Provider,{value:t,children:S.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?S.jsx(q2,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?S.jsx(my,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):S.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>S.jsx("div",{className:"min-w-full",children:S.jsx(my,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var mV=String.prototype.replace,pV=/%20/g,qc={RFC1738:"RFC1738",RFC3986:"RFC3986"},lh={default:qc.RFC3986,formatters:{RFC1738:function(e){return mV.call(e,pV,"+")},RFC3986:function(e){return String(e)}},RFC1738:qc.RFC1738,RFC3986:qc.RFC3986},gV=lh,Kc=Object.prototype.hasOwnProperty,Ir=Array.isArray,yn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),yV=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ir(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Dw=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},vV=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ir(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Kc.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Ir(t)&&!Ir(n)&&(o=Dw(t,r)),Ir(t)&&Ir(n)?(n.forEach(function(s,i){if(Kc.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Kc.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},bV=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},xV=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}},Zc=1024,wV=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Zc){for(var c=i.length>=Zc?i.slice(l,l+Zc):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===gV.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=yn[f];continue}if(f<2048){u[u.length]=yn[192|f>>6]+yn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=yn[224|f>>12]+yn[128|f>>6&63]+yn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=yn[240|f>>18]+yn[128|f>>12&63]+yn[128|f>>6&63]+yn[128|f&63]}a+=u.join("")}return a},SV=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return yV(n),t},TV=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},EV=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},CV=function(t,n){return[].concat(t,n)},RV=function(t,n){if(Ir(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Nw={arrayToObject:Dw,assign:bV,combine:CV,compact:SV,decode:xV,encode:wV,isBuffer:EV,isRegExp:TV,maybeMap:RV,merge:vV},jw=$S,va=Nw,Us=lh,PV=Object.prototype.hasOwnProperty,Lw={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},vn=Array.isArray,kV=Array.prototype.push,Fw=function(e,t){kV.apply(e,vn(t)?t:[t])},IV=Date.prototype.toISOString,py=Us.default,yt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:va.encode,encodeValuesOnly:!1,format:py,formatter:Us.formatters[py],indices:!1,serializeDate:function(t){return IV.call(t)},skipNulls:!1,strictNullHandling:!1},AV=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Xc={},OV=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,v,b,y){for(var g=t,T=y,x=0,E=!1;(T=T.get(Xc))!==void 0&&!E;){var C=T.get(t);if(x+=1,typeof C<"u"){if(C===x)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Xc)>"u"&&(x=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&vn(g)&&(g=va.maybeMap(g,function(_){return _ instanceof Date?h(_):_})),g===null){if(i)return c&&!v?c(n,yt.encoder,b,"key",p):n;g=""}if(AV(g)||va.isBuffer(g)){if(c){var k=v?n:c(n,yt.encoder,b,"key",p);return[m(k)+"="+m(c(g,yt.encoder,b,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var A;if(r==="comma"&&vn(g))v&&c&&(g=va.maybeMap(g,c)),A=[{value:g.length>0?g.join(",")||null:void 0}];else if(vn(u))A=u;else{var N=Object.keys(g);A=d?N.sort(d):N}var O=l?n.replace(/\./g,"%2E"):n,L=o&&vn(g)&&g.length===1?O+"[]":O;if(s&&vn(g)&&g.length===0)return L+"[]";for(var P=0;P<A.length;++P){var M=A[P],j=typeof M=="object"&&typeof M.value<"u"?M.value:g[M];if(!(a&&j===null)){var D=f&&l?M.replace(/\./g,"%2E"):M,V=vn(g)?typeof r=="function"?r(L,D):L:L+(f?"."+D:"["+D+"]");y.set(t,x);var z=jw();z.set(Xc,y),Fw(I,e(j,V,r,o,s,i,a,l,r==="comma"&&v&&vn(g)?null:c,u,d,f,h,p,m,v,b,z))}}return I},_V=function(t){if(!t)return yt;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||yt.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=Us.default;if(typeof t.format<"u"){if(!PV.call(Us.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Us.formatters[r],s=yt.filter;(typeof t.filter=="function"||vn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in Lw?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=yt.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:yt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:yt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:yt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:yt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?yt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:yt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:yt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:yt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:yt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:yt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:yt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:yt.strictNullHandling}},MV=function(e,t){var n=e,r=_V(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):vn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=Lw[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=jw(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||Fw(i,OV(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},Qo=Nw,nd=Object.prototype.hasOwnProperty,DV=Array.isArray,dt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Qo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},NV=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Vw=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},jV="utf8=%26%2310003%3B",LV="utf8=%E2%9C%93",FV=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===LV?c="utf-8":i[l]===jV&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,dt.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),dt.decoder,c,"key"),p=Qo.maybeMap(Vw(u.slice(f+1),n),function(v){return n.decoder(v,dt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=NV(p)),u.indexOf("[]=")>-1&&(p=DV(p)?[p]:p);var m=nd.call(r,h);m&&n.duplicates==="combine"?r[h]=Qo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},VV=function(e,t,n,r){for(var o=r?t:Vw(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},$V=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&nd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&nd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),VV(u,n,r,o)}},BV=function(t){if(!t)return dt;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"?dt.charset:t.charset,r=typeof t.duplicates>"u"?dt.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:dt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:dt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:dt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:dt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:dt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:dt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:dt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:dt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:dt.decoder,delimiter:typeof t.delimiter=="string"||Qo.isRegExp(t.delimiter)?t.delimiter:dt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:dt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:dt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:dt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:dt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:dt.strictNullHandling}},WV=function(e,t){var n=BV(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?FV(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=$V(a,r[a],n,typeof e=="string");o=Qo.merge(o,l,n)}return n.allowSparse===!0?o:Qo.compact(o)},zV=MV,HV=WV,UV=lh,GV={formats:UV,parse:HV,stringify:zV},Oe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Oe||(Oe={}));var gy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(gy||(gy={}));const le=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ar=e=>{switch(typeof e){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(e)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(e)?le.array:e===null?le.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?le.promise:typeof Map<"u"&&e instanceof Map?le.map:typeof Set<"u"&&e instanceof Set?le.set:typeof Date<"u"&&e instanceof Date?le.date:le.object;default:return le.unknown}},X=Oe.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 rn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof rn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.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()}}rn.create=e=>new rn(e);const fi=(e,t)=>{let n;switch(e.code){case X.invalid_type:e.received===le.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Oe.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oe.joinValues(e.keys,", ")}`;break;case X.invalid_union:n="Invalid input";break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oe.joinValues(e.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${Oe.joinValues(e.options)}, received '${e.received}'`;break;case X.invalid_arguments:n="Invalid function arguments";break;case X.invalid_return_type:n="Invalid function return type";break;case X.invalid_date:n="Invalid date";break;case X.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}"`:Oe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case X.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 X.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 X.custom:n="Invalid input";break;case X.invalid_intersection_types:n="Intersection results could not be merged";break;case X.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case X.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oe.assertNever(e)}return{message:n}};let YV=fi;function rd(){return YV}const od=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function oe(e,t){const n=rd(),r=od({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===fi?void 0:fi].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 ve;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return $t.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const ve=Object.freeze({status:"aborted"}),As=e=>({status:"dirty",value:e}),Ut=e=>({status:"valid",value:e}),yy=e=>e.status==="aborted",vy=e=>e.status==="dirty",el=e=>e.status==="valid",tl=e=>typeof Promise<"u"&&e instanceof Promise;function nl(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 $w(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}var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));var Os,_s;class Dn{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 by=(e,t)=>{if(el(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 rn(e.common.issues);return this._error=n,this._error}}};function xe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class Ce{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 Ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ar(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:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},s=this._parseSync({data:t,path:o.path,parent:o});return by(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(tl(o)?o:Promise.resolve(o));return by(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:X.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Gn({schema:this,typeName:ge.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return $n.create(this,this._def)}nullable(){return Yr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return An.create(this,this._def)}promise(){return mi.create(this,this._def)}or(t){return sl.create([this,t],this._def)}and(t){return il.create(this,t,this._def)}transform(t){return new Gn({...xe(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new dl({...xe(this._def),innerType:this,defaultValue:n,typeName:ge.ZodDefault})}brand(){return new Hw({typeName:ge.ZodBranded,type:this,...xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new fl({...xe(this._def),innerType:this,catchValue:n,typeName:ge.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ll.create(this,t)}readonly(){return hl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qV=/^c[^\s-]{8,}$/i,KV=/^[0-9a-z]+$/,ZV=/^[0-9A-HJKMNP-TV-Z]{26}$/,XV=/^[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,QV=/^[a-z0-9_-]{21}$/i,JV=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,e$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,t$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qc;const n$=/^(?:(?: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])$/,r$=/^(([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})))$/,o$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Bw="((\\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])))",s$=new RegExp(`^${Bw}$`);function Ww(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 i$(e){return new RegExp(`^${Ww(e)}$`)}function a$(e){let t=`${Bw}T${Ww(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 l$(e,t){return!!((t==="v4"||!t)&&n$.test(e)||(t==="v6"||!t)&&r$.test(e))}class Vn extends Ce{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==le.string){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.string,received:s.parsedType}),ve}const r=new $t;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?oe(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&oe(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")e$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"email",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Qc||(Qc=new RegExp(t$,"u")),Qc.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"emoji",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")XV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"uuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")QV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"nanoid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")qV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")KV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid2",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")ZV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ulid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),oe(o,{validation:"url",code:X.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"regex",code:X.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?a$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?s$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?i$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?JV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"duration",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?l$(t.data,s.version)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ip",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?o$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"base64",code:X.invalid_string,message:s.message}),r.dirty()):Oe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:X.invalid_string,...fe.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.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,...fe.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,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vn({...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}}Vn.create=e=>{var t;return new Vn({checks:[],typeName:ge.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...xe(e)})};function c$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Ur extends Ce{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)!==le.number){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.number,received:s.parsedType}),ve}let r;const o=new $t;for(const s of this._def.checks)s.kind==="int"?Oe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:X.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?c$(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:X.not_finite,message:s.message}),o.dirty()):Oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,o){return new Ur({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(o)}]})}_addCheck(t){return new Ur({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.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"&&Oe.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)}}Ur.create=e=>new Ur({checks:[],typeName:ge.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...xe(e)});class Jo extends Ce{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)!==le.bigint){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.bigint,received:s.parsedType}),ve}let r;const o=new $t;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(o)}]})}_addCheck(t){return new Jo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.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}}Jo.create=e=>{var t;return new Jo({checks:[],typeName:ge.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...xe(e)})};class sd extends Ce{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==le.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.boolean,received:r.parsedType}),ve}return Ut(t.data)}}sd.create=e=>new sd({typeName:ge.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...xe(e)});class hi extends Ce{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==le.date){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.date,received:s.parsedType}),ve}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_date}),ve}const r=new $t;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Oe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.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}}hi.create=e=>new hi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ge.ZodDate,...xe(e)});class id extends Ce{_parse(t){if(this._getType(t)!==le.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.symbol,received:r.parsedType}),ve}return Ut(t.data)}}id.create=e=>new id({typeName:ge.ZodSymbol,...xe(e)});class rl extends Ce{_parse(t){if(this._getType(t)!==le.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.undefined,received:r.parsedType}),ve}return Ut(t.data)}}rl.create=e=>new rl({typeName:ge.ZodUndefined,...xe(e)});class ol extends Ce{_parse(t){if(this._getType(t)!==le.null){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.null,received:r.parsedType}),ve}return Ut(t.data)}}ol.create=e=>new ol({typeName:ge.ZodNull,...xe(e)});class ad extends Ce{constructor(){super(...arguments),this._any=!0}_parse(t){return Ut(t.data)}}ad.create=e=>new ad({typeName:ge.ZodAny,...xe(e)});class Mo extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ut(t.data)}}Mo.create=e=>new Mo({typeName:ge.ZodUnknown,...xe(e)});class ur extends Ce{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:X.invalid_type,expected:le.never,received:n.parsedType}),ve}}ur.create=e=>new ur({typeName:ge.ZodNever,...xe(e)});class ld extends Ce{_parse(t){if(this._getType(t)!==le.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.void,received:r.parsedType}),ve}return Ut(t.data)}}ld.create=e=>new ld({typeName:ge.ZodVoid,...xe(e)});class An extends Ce{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==le.array)return oe(n,{code:X.invalid_type,expected:le.array,received:n.parsedType}),ve;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(oe(n,{code:i?X.too_big:X.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(oe(n,{code:X.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(oe(n,{code:X.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Dn(n,i,n.path,a)))).then(i=>$t.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Dn(n,i,n.path,a)));return $t.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new An({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new An({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new An({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}}An.create=(e,t)=>new An({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...xe(t)});function go(e){if(e instanceof at){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$n.create(go(r))}return new at({...e._def,shape:()=>t})}else return e instanceof An?new An({...e._def,type:go(e.element)}):e instanceof $n?$n.create(go(e.unwrap())):e instanceof Yr?Yr.create(go(e.unwrap())):e instanceof Un?Un.create(e.items.map(t=>go(t))):e}class at extends Ce{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=Oe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==le.object){const c=this._getOrReturnCtx(t);return oe(c,{code:X.invalid_type,expected:le.object,received:c.parsedType}),ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof ur&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Dn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof ur){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(oe(o,{code:X.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 Dn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>$t.mergeObjectSync(r,c)):$t.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new at({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=fe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new at({...this._def,unknownKeys:"strip"})}passthrough(){return new at({...this._def,unknownKeys:"passthrough"})}extend(t){return new at({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new at({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ge.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new at({...this._def,catchall:t})}pick(t){const n={};return Oe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new at({...this._def,shape:()=>n})}omit(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new at({...this._def,shape:()=>n})}deepPartial(){return go(this)}partial(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new at({...this._def,shape:()=>n})}required(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof $n;)s=s._def.innerType;n[r]=s}}),new at({...this._def,shape:()=>n})}keyof(){return zw(Oe.objectKeys(this.shape))}}at.create=(e,t)=>new at({shape:()=>e,unknownKeys:"strip",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});at.strictCreate=(e,t)=>new at({shape:()=>e,unknownKeys:"strict",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});at.lazycreate=(e,t)=>new at({shape:e,unknownKeys:"strip",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});class sl extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new rn(a.ctx.common.issues));return oe(n,{code:X.invalid_union,unionErrors:i}),ve}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new rn(l));return oe(n,{code:X.invalid_union,unionErrors:a}),ve}}get options(){return this._def.options}}sl.create=(e,t)=>new sl({options:e,typeName:ge.ZodUnion,...xe(t)});const Fn=e=>e instanceof ll?Fn(e.schema):e instanceof Gn?Fn(e.innerType()):e instanceof cl?[e.value]:e instanceof Gr?e.options:e instanceof ul?Oe.objectValues(e.enum):e instanceof dl?Fn(e._def.innerType):e instanceof rl?[void 0]:e instanceof ol?[null]:e instanceof $n?[void 0,...Fn(e.unwrap())]:e instanceof Yr?[null,...Fn(e.unwrap())]:e instanceof Hw||e instanceof hl?Fn(e.unwrap()):e instanceof fl?Fn(e._def.innerType):[];class ch extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.object)return oe(n,{code:X.invalid_type,expected:le.object,received:n.parsedType}),ve;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Fn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new ch({typeName:ge.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...xe(r)})}}function cd(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===le.object&&r===le.object){const o=Oe.objectKeys(t),s=Oe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=cd(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===le.array&&r===le.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=cd(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===le.date&&r===le.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class il extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(yy(s)||yy(i))return ve;const a=cd(s.value,i.value);return a.valid?((vy(s)||vy(i))&&n.dirty(),{status:n.value,value:a.data}):(oe(r,{code:X.invalid_intersection_types}),ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}il.create=(e,t,n)=>new il({left:e,right:t,typeName:ge.ZodIntersection,...xe(n)});class Un extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==le.array)return oe(r,{code:X.invalid_type,expected:le.array,received:r.parsedType}),ve;if(r.data.length<this._def.items.length)return oe(r,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Dn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>$t.mergeArray(n,i)):$t.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Un({...this._def,rest:t})}}Un.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Un({items:e,typeName:ge.ZodTuple,rest:null,...xe(t)})};class al extends Ce{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!==le.object)return oe(r,{code:X.invalid_type,expected:le.object,received:r.parsedType}),ve;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Dn(r,a,r.path,a)),value:i._parse(new Dn(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 Ce?new al({keyType:t,valueType:n,typeName:ge.ZodRecord,...xe(r)}):new al({keyType:Vn.create(),valueType:t,typeName:ge.ZodRecord,...xe(n)})}}class ud extends Ce{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!==le.map)return oe(r,{code:X.invalid_type,expected:le.map,received:r.parsedType}),ve;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Dn(r,a,r.path,[c,"key"])),value:s._parse(new Dn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return ve;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return ve;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}ud.create=(e,t,n)=>new ud({valueType:t,keyType:e,typeName:ge.ZodMap,...xe(n)});class es extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==le.set)return oe(r,{code:X.invalid_type,expected:le.set,received:r.parsedType}),ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(oe(r,{code:X.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(oe(r,{code:X.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return ve;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Dn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new es({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new es({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}es.create=(e,t)=>new es({valueType:e,minSize:null,maxSize:null,typeName:ge.ZodSet,...xe(t)});class Gs extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.function)return oe(n,{code:X.invalid_type,expected:le.function,received:n.parsedType}),ve;function r(a,l){return od({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rd(),fi].filter(c=>!!c),issueData:{code:X.invalid_arguments,argumentsError:l}})}function o(a,l){return od({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rd(),fi].filter(c=>!!c),issueData:{code:X.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof mi){const a=this;return Ut(async function(...l){const c=new rn([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return Ut(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new rn([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new rn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Gs({...this._def,args:Un.create(t).rest(Mo.create())})}returns(t){return new Gs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Gs({args:t||Un.create([]).rest(Mo.create()),returns:n||Mo.create(),typeName:ge.ZodFunction,...xe(r)})}}class ll extends Ce{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})}}ll.create=(e,t)=>new ll({getter:e,typeName:ge.ZodLazy,...xe(t)});class cl extends Ce{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:X.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}cl.create=(e,t)=>new cl({value:e,typeName:ge.ZodLiteral,...xe(t)});function zw(e,t){return new Gr({values:e,typeName:ge.ZodEnum,...xe(t)})}class Gr extends Ce{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 oe(n,{expected:Oe.joinValues(r),received:n.parsedType,code:X.invalid_type}),ve}if(nl(this,Os)||$w(this,Os,new Set(this._def.values)),!nl(this,Os).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:X.invalid_enum_value,options:r}),ve}return Ut(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 Gr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Gr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Os=new WeakMap;Gr.create=zw;class ul extends Ce{constructor(){super(...arguments),_s.set(this,void 0)}_parse(t){const n=Oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==le.string&&r.parsedType!==le.number){const o=Oe.objectValues(n);return oe(r,{expected:Oe.joinValues(o),received:r.parsedType,code:X.invalid_type}),ve}if(nl(this,_s)||$w(this,_s,new Set(Oe.getValidEnumValues(this._def.values))),!nl(this,_s).has(t.data)){const o=Oe.objectValues(n);return oe(r,{received:r.data,code:X.invalid_enum_value,options:o}),ve}return Ut(t.data)}get enum(){return this._def.values}}_s=new WeakMap;ul.create=(e,t)=>new ul({values:e,typeName:ge.ZodNativeEnum,...xe(t)});class mi extends Ce{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.promise&&n.common.async===!1)return oe(n,{code:X.invalid_type,expected:le.promise,received:n.parsedType}),ve;const r=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return Ut(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}mi.create=(e,t)=>new mi({type:e,typeName:ge.ZodPromise,...xe(t)});class Gn extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ge.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{oe(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return ve;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ve:l.status==="dirty"||n.value==="dirty"?As(l.value):l});{if(n.value==="aborted")return ve;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ve:a.status==="dirty"||n.value==="dirty"?As(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!el(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>el(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Oe.assertNever(o)}}Gn.create=(e,t,n)=>new Gn({schema:e,typeName:ge.ZodEffects,effect:t,...xe(n)});Gn.createWithPreprocess=(e,t,n)=>new Gn({schema:t,effect:{type:"preprocess",transform:e},typeName:ge.ZodEffects,...xe(n)});class $n extends Ce{_parse(t){return this._getType(t)===le.undefined?Ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$n.create=(e,t)=>new $n({innerType:e,typeName:ge.ZodOptional,...xe(t)});class Yr extends Ce{_parse(t){return this._getType(t)===le.null?Ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yr.create=(e,t)=>new Yr({innerType:e,typeName:ge.ZodNullable,...xe(t)});class dl extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===le.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}dl.create=(e,t)=>new dl({innerType:e,typeName:ge.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...xe(t)});class fl extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tl(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}fl.create=(e,t)=>new fl({innerType:e,typeName:ge.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...xe(t)});class dd extends Ce{_parse(t){if(this._getType(t)!==le.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.nan,received:r.parsedType}),ve}return{status:"valid",value:t.data}}}dd.create=e=>new dd({typeName:ge.ZodNaN,...xe(e)});class Hw extends Ce{_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 Ll extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ve:s.status==="dirty"?(n.dirty(),As(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ve: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 Ll({in:t,out:n,typeName:ge.ZodPipeline})}}class hl extends Ce{_parse(t){const n=this._def.innerType._parse(t),r=o=>(el(o)&&(o.value=Object.freeze(o.value)),o);return tl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}hl.create=(e,t)=>new hl({innerType:e,typeName:ge.ZodReadonly,...xe(t)});at.lazycreate;var ge;(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"})(ge||(ge={}));Vn.create;Ur.create;dd.create;Jo.create;sd.create;hi.create;id.create;rl.create;ol.create;ad.create;Mo.create;ur.create;ld.create;An.create;at.create;at.strictCreate;sl.create;ch.create;il.create;Un.create;al.create;ud.create;es.create;Gs.create;ll.create;cl.create;Gr.create;ul.create;mi.create;Gn.create;$n.create;Yr.create;Gn.createWithPreprocess;Ll.create;const u$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},d$=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const s=t[o];if(o===r)e[s]=n;else{if(!(s in e)||typeof e[s]!="object"){const i=t[o+1];e[s]=isNaN(Number(i))?{}:[]}e=e[s]}}},Uw=e=>e.replace(/\[(\d+)]/g,".$1").split("."),sn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Uw(t),o=structuredClone(e);return d$(o,r,n),o},f$=(e,t)=>e.localeCompare(t),Rs={},Gw=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return Yw(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=Gw(e._def.innerType);return t==="ZodArray"?n??[]:n}},Yw=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,Gw(n)])),qw=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],s=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof s=="object"&&s!==null&&!Array.isArray(s)?n[r]=qw(s,o):n[r]=o||s)}return n},h$={sort:f$,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},Kw=e=>{const t=new FormData(e),n=new URLSearchParams(t);return GV.parse(n.toString(),h$)},Pr=(e,t)=>Uw(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),er=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Jc=e=>{const t=e.dataset.target;if(!t)return er(e);const n=document.querySelector(`[data-origin="${t}"]`);return er(n||e)},m$={state:{},loading:!1,useOnChange:!1},xy=e=>e.dataset.target||e.name,p$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Oo.LocalStorage.get(t);return u$(n)?n:{}},clear:()=>void Oo.LocalStorage.delete(t),set:n=>Oo.LocalStorage.set(t,n)}},g$=(e,t,n=m$)=>{const[r,o]=w.useState(null),s=w.useRef({}),[i,a]=w.useState(()=>Pt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??Yw(e)??{}),l=w.useCallback(y=>{var I;const g=y.target,T=y.currentTarget;if(g.dataset.optional==="true")return;const E=xy(g),C=Jc(g)||(T?er(T):""),k=Pr(E,e);if(g.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),N=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(O=>sn(O??{},E,N))}},[]),c=w.useCallback(y=>g=>{const T=g.currentTarget,x=Object.values(s.current).reduce((C,k)=>{var L;const I=k.element,A=k.schema.safeParse(er(I));if(I.dataset.ignore==="ignore"||A.success)return C;const N=(L=A.error.issues[0])==null?void 0:L.message;I.setAttribute("data-initialized","true");const O=I.dataset.name||I.name||"";return sn(C,O,N)},{}),E=Pt.empty(x)?null:x;o(E),console.error(E),y==null||y({form:T,errors:E||{}})},[]),u=(y,g=Rs)=>{const T=Pr(y,e),x=E=>{var k;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(I=>sn(I,y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)};return{...g,loading:n.loading,name:y,id:y,onChange:x,form:t,date:Pt.string(i[y])?new Date(i[y]):i[y],required:g.required??!T.isOptional(),error:r==null?void 0:r[y],ref:E=>{E!==null&&(s.current[y]={element:E,schema:T})}}},d=(y,g=Rs)=>{const T=Pr(y,e);return{...g,name:y,id:y,onChange:E=>{var k;const C=E.target.value;a(I=>sn(I,y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),value:wr(i,y,void 0)||"",required:g.required??!T.isOptional(),ref:E=>E!==null?s.current[y]={element:E,schema:T}:void 0}},f=(y,g=Rs)=>{const T=Pr(y,e);return{...g,name:y,id:y,onChange:E=>{var k;const C=E.target.checked;a(I=>sn(I??{},y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),ref:E=>E!==null?void(s.current[y]={element:E,schema:T}):void 0}},h=(y,g=Rs)=>{const T=Pr(y,e),x=E=>{var k,I;(k=E.persist)==null||k.call(E);const C=E.target.value;(I=g==null?void 0:g.onChange)==null||I.call(g,E),a(A=>sn(A,y,C))};return{...g,loading:n.loading,name:y,id:y,onChange:x,form:t,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),value:wr(i,y,void 0)||(g==null?void 0:g.value)||"",type:Pt.instance(T,Ur)?"number":(g==null?void 0:g.type)??"text",ref:E=>E===null?void 0:s.current[y]={element:E,schema:T}}},p=(y,g=Rs)=>{const T=Pr(y,e),x=T._def.typeName==="ZodNumber";return{...g,name:y,id:y,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const k=x?C.target.valueAsNumber:C.target.value;(A=g==null?void 0:g.onChange)==null||A.call(g,C),a(N=>sn(N,y,k))},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),type:x?"number":(g==null?void 0:g.type)??"text",value:wr(i,y,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[y]={element:C,schema:T})}};w.useEffect(()=>{const y=Object.values(s.current).map(T=>{const x=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,E=T.schema.safeParse(er(x)),C=N=>{var j;const O=xy(N.target);if(!O)return!1;const L=N.target,P=Jc(N.target)||(N.relatedTarget?er(N.relatedTarget):""),M=T.schema.safeParse(P);if(L.setAttribute("value",P),M.success)return x.setCustomValidity(""),o(D=>{if(Pt.null(D))return null;const V=sn(D,O,void 0);return Pt.empty(D)||Pt.nil(D)||Pt.empty(V)?null:V}),!1;if(x.required){const D=((j=M.error.issues[0])==null?void 0:j.message)||"";x.setCustomValidity(D),o(V=>{if(Pt.null(V))return null;const z=sn(V,O,D||void 0);return Pt.empty(z)?null:z})}return!1},k=new AbortController,I=x.getAttribute("data-trigger")||"blur";x.addEventListener(I,C,{signal:k.signal});const A=x.dataset.shadow?!1:x.required?!E.success:!1;return{input:T,hasInitialError:A,unsubscribe:()=>k.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const m=y=>g=>{var A;g.preventDefault();const T=g.currentTarget;let x=Kw(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(N=>{if(N.tagName==="SELECT"){const O=N;x=sn(x,O.name,O.value)}if(N.tagName==="INPUT"){const O=N,L=Jc(O)||(O?er(O):"");x=sn(x,O.dataset.target||O.name,L)}});const C=qw(x,i),k=e.safeParse(C),I=()=>{var N;Cw(T),(N=n.interceptor)==null||N.clear()};if(k.success){const N=JSON.stringify(k.data);return T.setAttribute("data-json",N),(A=n.interceptor)==null||A.clear(),y==null?void 0:y(g,{form:T,event:g,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(g,{form:T,json:x,event:g,reset:I,data:x,success:!1,errors:k.error.issues.map(N=>({message:N.message,path:N.path.map(O=>String(O))}))})},v=y=>wd(i,y)||"",b=y=>({...y,id:t,name:t});return w.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(i))},[i]),{get:v,input:p,state:i,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,disabled:r!==null}},y$=e=>e?JSON.parse(e.getAttribute("data-json")):{},v$=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=oI;exports.Autocomplete=NL;exports.Button=jo;exports.Calendar=y0;exports.Card=v0;exports.Checkbox=eh;exports.ColType=_o;exports.Collapse=Vb;exports.ComponentsProvider=qO;exports.DatePicker=UL;exports.Dropdown=ps;exports.Empty=b0;exports.Expand=QD;exports.FileUpload=r2;exports.Form=s2;exports.Input=Ni;exports.InputFeedback=uw;exports.InputField=Di;exports.Menu=tN;exports.MenuItem=eN;exports.Modal=UN;exports.MultiCombobox=zL;exports.Notifications=eM;exports.Polymorph=ss;exports.Radiobox=i2;exports.RenderOnView=OT;exports.Select=Hr;exports.Stats=tM;exports.Switch=a2;exports.Tab=oM;exports.Table=hV;exports.Tabs=nM;exports.Tag=Td;exports.TaskList=l2;exports.Textarea=c2;exports.Toolbar=GN;exports.Tooltip=jx;exports.TransferList=f2;exports.createColumns=j2;exports.createCssProperties=WO;exports.createDesignTokens=f0;exports.createFormStorage=p$;exports.createOptionCols=sh;exports.createStyles=$O;exports.createTheme=BO;exports.createTokenStyles=zO;exports.css=Me;exports.defaultDarkTheme=GO;exports.defaultLightTheme=YO;exports.dispatchInput=xd;exports.formReset=Cw;exports.formToJson=Kw;exports.getJsonForm=y$;exports.getSchemaShape=Pr;exports.initializeInputDataset=bi;exports.isReactComponent=ET;exports.isReactFC=CT;exports.isSsr=Ta;exports.mergeRefs=bd;exports.negate=RT;exports.noop=Sd;exports.parsers=El;exports.path=wd;exports.reduceTokens=To;exports.safeRegex=au;exports.splitInto=zy;exports.useColorParser=KO;exports.useForm=g$;exports.useLocale=yf;exports.useNotification=Q_;exports.usePrevious=v$;exports.useReactive=W0;exports.useTablePreferences=V2;exports.useTranslations=Et;exports.uuid=xi;
|
|
235
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sw(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 qF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function KF(e){if(Array.isArray(e))return e}function ry(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 tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(n),!0).forEach(function(r){Qu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ry(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qa(e,t){if(e==null)return{};var n=ZF(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZF(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var nh=x.forwardRef(function(e,t){var n=e.children,r=Qa(e,VF),o=Ew(r),s=o.open,i=Qa(o,$F);return x.useImperativeHandle(t,function(){return{open:s}},[s]),x.createElement(x.Fragment,null,n(tt(tt({},i),{},{open:s})))});nh.displayName="Dropzone";var Tw={disabled:!1,getFilesFromEvent:lF,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};nh.defaultProps=Tw;nh.propTypes={children:Ge.func,accept:Ge.objectOf(Ge.arrayOf(Ge.string)),multiple:Ge.bool,preventDropOnDocument:Ge.bool,noClick:Ge.bool,noKeyboard:Ge.bool,noDrag:Ge.bool,noDragEventsBubbling:Ge.bool,minSize:Ge.number,maxSize:Ge.number,maxFiles:Ge.number,disabled:Ge.bool,getFilesFromEvent:Ge.func,onFileDialogCancel:Ge.func,onFileDialogOpen:Ge.func,useFsAccessApi:Ge.bool,autoFocus:Ge.bool,onDragEnter:Ge.func,onDragLeave:Ge.func,onDragOver:Ge.func,onDrop:Ge.func,onDropAccepted:Ge.func,onDropRejected:Ge.func,onError:Ge.func,validator:Ge.func};var Ju={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Ew(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=tt(tt({},Tw),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,b=t.useFsAccessApi,y=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=x.useMemo(function(){return jF(n)},[n]),N=x.useMemo(function(){return NF(n)},[n]),M=x.useMemo(function(){return typeof v=="function"?v:oy},[v]),L=x.useMemo(function(){return typeof m=="function"?m:oy},[m]),P=x.useRef(null),O=x.useRef(null),j=x.useReducer(XF,Ju),D=Uc(j,2),V=D[0],H=D[1],_=V.isFocused,$=V.isFileDialogActive,K=x.useRef(typeof window<"u"&&window.isSecureContext&&b&&DF()),re=function(){!K.current&&$&&setTimeout(function(){if(O.current){var ie=O.current.files;ie.length||(H({type:"closeDialog"}),L())}},300)};x.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[O,$,L,K]);var ee=x.useRef([]),G=function(ie){P.current&&P.current.contains(ie.target)||(ie.preventDefault(),ee.current=[])};x.useEffect(function(){return g&&(document.addEventListener("dragover",ny,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",ny),document.removeEventListener("drop",G))}},[P,g]),x.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var F=x.useCallback(function(te){k?k(te):console.error(te)},[k]),B=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te),ee.current=[].concat(zF(ee.current),[te.target]),oa(te)&&Promise.resolve(o(te)).then(function(ie){if(!(Xa(te)&&!C)){var _e=ie.length,Ke=_e>0&&AF({files:ie,accept:A,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),Rt=_e>0&&!Ke;H({isDragAccept:Ke,isDragReject:Rt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(te)}}).catch(function(ie){return F(ie)})},[o,c,F,C,A,i,s,a,l,I]),z=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te);var ie=oa(te);if(ie&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return ie&&d&&d(te),!1},[d,C]),Y=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te);var ie=ee.current.filter(function(Ke){return P.current&&P.current.contains(Ke)}),_e=ie.indexOf(te.target);_e!==-1&&ie.splice(_e,1),ee.current=ie,!(ie.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oa(te)&&u&&u(te))},[P,u,C]),Q=x.useCallback(function(te,ie){var _e=[],Ke=[];te.forEach(function(Rt){var At=vw(Rt,A),Lt=Uc(At,2),xr=Lt[0],ro=Lt[1],oo=bw(Rt,i,s),Li=Uc(oo,2),Fl=Li[0],Vl=Li[1],$l=I?I(Rt):null;if(xr&&Fl&&!$l)_e.push(Rt);else{var Bl=[ro,Vl];$l&&(Bl=Bl.concat($l)),Ke.push({file:Rt,errors:Bl.filter(function(Zw){return Zw})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(Rt){Ke.push({file:Rt,errors:[IF]})}),_e.splice(0)),H({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,ie),Ke.length>0&&p&&p(Ke,ie),_e.length>0&&h&&h(_e,ie)},[H,a,A,i,s,l,f,h,p,I]),ue=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te),ee.current=[],oa(te)&&Promise.resolve(o(te)).then(function(ie){Xa(te)&&!C||Q(ie,te)}).catch(function(ie){return F(ie)}),H({type:"reset"})},[o,Q,F,C]),U=x.useCallback(function(){if(K.current){H({type:"openDialog"}),M();var te={multiple:a,types:N};window.showOpenFilePicker(te).then(function(ie){return o(ie)}).then(function(ie){Q(ie,null),H({type:"closeDialog"})}).catch(function(ie){LF(ie)?(L(ie),H({type:"closeDialog"})):FF(ie)?(K.current=!1,O.current?(O.current.value=null,O.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(ie)});return}O.current&&(H({type:"openDialog"}),M(),O.current.value=null,O.current.click())},[H,M,L,b,Q,F,N,a]),ke=x.useCallback(function(te){!P.current||!P.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),U())},[P,U]),qe=x.useCallback(function(){H({type:"focus"})},[]),Le=x.useCallback(function(){H({type:"blur"})},[]),Te=x.useCallback(function(){T||(MF()?setTimeout(U,0):U())},[T,U]),q=function(ie){return r?null:ie},se=function(ie){return S?null:q(ie)},W=function(ie){return E?null:q(ie)},J=function(ie){C&&ie.stopPropagation()},pe=x.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=te.refKey,_e=ie===void 0?"ref":ie,Ke=te.role,Rt=te.onKeyDown,At=te.onFocus,Lt=te.onBlur,xr=te.onClick,ro=te.onDragEnter,oo=te.onDragOver,Li=te.onDragLeave,Fl=te.onDrop,Vl=Qa(te,BF);return tt(tt(Qu({onKeyDown:se(gn(Rt,ke)),onFocus:se(gn(At,qe)),onBlur:se(gn(Lt,Le)),onClick:q(gn(xr,Te)),onDragEnter:W(gn(ro,B)),onDragOver:W(gn(oo,z)),onDragLeave:W(gn(Li,Y)),onDrop:W(gn(Fl,ue)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,P),!r&&!S?{tabIndex:0}:{}),Vl)}},[P,ke,qe,Le,Te,B,z,Y,ue,S,E,r]),ce=x.useCallback(function(te){te.stopPropagation()},[]),Fe=x.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=te.refKey,_e=ie===void 0?"ref":ie,Ke=te.onChange,Rt=te.onClick,At=Qa(te,WF),Lt=Qu({accept:A,multiple:a,type:"file",style:{display:"none"},onChange:q(gn(Ke,ue)),onClick:q(gn(Rt,ce)),tabIndex:-1},_e,O);return tt(tt({},Lt),At)}},[O,n,a,ue,r]);return tt(tt({},V),{},{isFocused:_&&!r,getRootProps:pe,getInputProps:Fe,rootRef:P,inputRef:O,open:q(U)})}function XF(e,t){switch(t.type){case"focus":return tt(tt({},e),{},{isFocused:!0});case"blur":return tt(tt({},e),{},{isFocused:!1});case"openDialog":return tt(tt({},Ju),{},{isFileDialogActive:!0});case"closeDialog":return tt(tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return tt(tt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return tt(tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return tt({},Ju);default:return e}}function oy(){}const QF={isImage:e=>e.type.includes("image")},JF=e=>{const[t,n]=x.useState({url:"",type:"",size:""});return x.useEffect(()=>{if(QF.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Vg(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Vg(e.file.size)})},[e.file]),t.type==="img"?w.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[w.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[w.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(jo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Bo,{})})]}):w.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[w.jsxs("header",{className:"flex flex-row items-center gap-4",children:[w.jsx(Lb,{size:48}),w.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(jo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Bo,{className:"text-danger"})})]})},e2=e=>w.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>w.jsx(JF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),t2=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(e2,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(x.Fragment,{children:e.idle}),n2=w.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[w.jsx(tI,{size:64}),w.jsxs("p",{children:["You can drag your files or"," ",w.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),r2=({idle:e=n2,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=x.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Ew({onDrop:i});return w.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[w.jsx("input",{...l(r),name:r.name,id:r.name}),w.jsx(t2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},o2=["INPUT","SELECT"],Cw=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{o2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},s2=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return w.jsx("form",{...e,onSubmit:t})},i2=({children:e,className:t="",size:n,...r})=>w.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[w.jsx("input",{...r,type:"radio",className:Me("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),Hr=x.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const v=Ct(),b=x.useRef(null),y=p.id??p.name;x.useImperativeHandle(m,()=>b.current),x.useEffect(()=>{if(b.current===null)return;const T=new AbortController,S=b.current,E=bi(b.current);return S.addEventListener("change",()=>S.setAttribute("data-selected","true"),{once:!0,signal:T.signal}),()=>{E(),T.abort()}},[]);const g=()=>{var T;return(T=b.current)==null?void 0:T.focus()};return w.jsx(Di,{info:n,left:f,error:h,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:w.jsx("label",{htmlFor:y,children:w.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(of,{size:20}),w.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:y,name:y,value:p.value,required:e,ref:bd(m,b),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",title:typeof p.title=="string"?p.title:void 0,className:Me("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>x.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${y}-select-option-${T.value}`}))]})})}),a2=x.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=x.useId(),[i,a]=x.useState(r.checked??!1),l=i,c=x.useRef(null),u=Ys(r.onChange);x.useImperativeHandle(o,()=>c.current),x.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=()=>{var h,p;const f=!((h=c.current)!=null&&h.checked);a(f),(p=r==null?void 0:r.onCheck)==null||p.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:Me("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[w.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[w.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:f=>a(f.target.checked),ref:c,type:"checkbox"}),w.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:w.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),w.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:w.jsx("span",{className:"font-medium text-foreground",children:e})})]}),w.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),l2=e=>{const[t,n]=Ak();return x.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:Nk(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},c2=dw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
|
|
236
|
+
`);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),u2=e=>{const[t,n]=x.useState(0);return x.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},d2={Item:x.forwardRef(function(t,n){return w.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:x.forwardRef(function(t,n){return w.jsx("ul",{...t,ref:n,className:"space-y-3"})})},f2=e=>{const t=x.useRef(null),n=u2(t);return w.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[w.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[w.jsx("header",{className:"border-b border-card-border pb-2"}),w.jsxs("div",{className:"px-8 space-y-2",children:[w.jsx(Ni,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(Qf,{height:n,useWindowScroll:!0,data:e.source,components:d2,itemContent:(r,o)=>w.jsx(x.Fragment,{children:w.jsx(eh,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(jo,{children:w.jsx(sf,{})})}),w.jsx("div",{})]})};var h2=Object.defineProperty,sy=Object.getOwnPropertySymbols,m2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable,iy=(e,t,n)=>t in e?h2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g2=(e,t)=>{for(var n in t||(t={}))m2.call(t,n)&&iy(e,n,t[n]);if(sy)for(var n of sy(t))p2.call(t,n)&&iy(e,n,t[n]);return e},rh=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},y2=(e,t,n,r)=>jl(rh,e,t,n,r),Xo=e=>typeof e=="object",or=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Xo(e)&&!Xo(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=>or(e[r],t[r]))},v2=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,b2=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ja=e=>/[0-9.]+/.test(e),ay=e=>["string","number"].includes(typeof e),ly=e=>e==null||(e==null?void 0:e.length)===0||e==="",cy={eq:or,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:ly,notEmpty:e=>!ly(e),in:(e,t)=>rh(t,n=>or(e,n)),notIn:(e,t)=>Rw(t,n=>!or(e,n))},x2=e=>{if(e in cy)return cy[e];throw new Error("Linq - Symbol not found")},Ao=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},jl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=x2(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},w2=(e,t,n,r)=>jl(Ao,e,t,n,r),Rw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},S2=(e,t,n,r)=>jl(Rw,e,t,n,r),Pw=e=>{if(e===null)return null;const t=g2({},e);return Object.keys(t).forEach(n=>t[n]=Xo(e[n])?Pw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},uy=(e,t)=>{if(Xo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(or(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(or(t,r))return!0}return!1},T2=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},E2=e=>Ao(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>or(o,t)):n===r.indexOf(t)),C2=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},kw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},R2=(e,t)=>kw(e,n=>n[t]),dy=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},P2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},k2=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Ja(e)&&Ja(t)?r.map(i=>Number.parseInt(i)):r},Gc=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ja(e)&&Ja(t)){const o=[],[s,i]=P2(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return k2(e,t,r)},I2=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Gc(r,o,1):Gc(r,s,Number.parseInt(o,10))}return ay(e)&&ay(t)?Gc(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Yc=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},fy=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},A2=(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)},O2=(e,t,n,r)=>jl(A2,e,t,n,r),hy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(b2(t))},Iw=(e=>(e.Asc="asc",e.Desc="desc",e))(Iw||{}),_2=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),M2=(e,t)=>e.sort(_2(t)),D2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Ao(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},N2=class ed{constructor(t=[]){this.array=t}static Range(...t){return I2(...t)}static New(t){return new ed(t)}Where(t,n,r){return this.array=w2(this.array,t,n,r),this}Some(t,n,r){return y2(this.array,t,n,r)}All(t,n,r){return S2(this.array,t,n,r)}Reverse(){return this.array=fy(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=O2(this.array,t,n,r),this}Distinct(){return this.array=E2(this.array),this}First(t){return t===void 0?this.array[0]:C2(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?Yc((n,r)=>n+r,0,this.array):Yc((n,r)=>n+v2(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return R2(this.array,t)}GroupWith(t){return kw(this.array,t)}Except(t){return Ao(this.array,n=>!uy(t,n))}Intersect(t){return Ao(this.array,n=>uy(t,n))}OrderBy(t,n){let r;return r=t?hy(this.array,t):this.array.toSorted(),this.array=n==="desc"?fy(r):r,this}Includes(t){return rh(this.array,n=>or(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 Yc(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(dy(this.array,n=>[t,n]))}Zip(t,n){return dy(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Ao(this.array,t).length}Get(t){return this.array[t]}Clone(){return new ed(Pw(this.array))}ToObject(t){return T2(this.array,t)}Sort(t){return Array.isArray(t)?M2(this.array,t):hy(this.array,t)}Unique(t){return D2(this.array,t)}},Aw=N2,Oo={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,b)=>{try{Object.keys(v).forEach(b)}catch(y){window.console.log(y)}},n=v=>v==null,r=v=>{const b=typeof v;return b==="string"||b==="number"||b==="boolean"||n(v)},o=(v,b)=>{const y=b.getItem(v);try{return JSON.parse(y)}catch{return y??null}},s=v=>Object.keys(v).reduce((b,y)=>({...b,[y]:o(y,v)}),{}),i=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,b)=>(v[decodeURIComponent(b[0].trim())]=decodeURIComponent(b[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(b=>b(v))},d=[{name:"expires",parse:v=>`expires=${i(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${i(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 b=v.domain??"";return b===""?"":`domain=${v.multiDomain?".":""}${b}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],f={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(b=>b.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const b=f.json()[v];if(n(b))return null;try{return JSON.parse(decodeURIComponent(b))}catch{return b}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,b,y={})=>{const g=r(b)?b:encodeURIComponent(JSON.stringify(b)),T=d.reduce((S,E)=>{const C=E.parse(y);return C===""?S:S.concat(C)},[`${encodeURIComponent(v)}=${g}`]).join(";");document.cookie=T,u()}},h=v=>{const b=new Set,y=g=>{v().removeItem(g);const T=s(v());b.forEach(S=>S(T))};return{delete:y,listener:g=>(b.add(g),()=>b.delete(g)),clearListeners:()=>b.clear(),json:(g=!1)=>g?s(v()):v(),has:g=>{const T=v().getItem(g);return!n(T)},deleteAll:()=>{t(v(),y),b.forEach(g=>g(v()))},get:g=>o(g,v()),set:(g,T)=>{v().setItem(g,JSON.stringify(T)),b.forEach(S=>S(v()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Oo);const oh=e=>e.headerLabel??e.thead??e.id,sh=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var _o=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(_o||{});const ih=e=>e.type==="number"?e.valueAsNumber:e.value,j2=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},L2={},F2=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,s)=>{const i=r.get(o.id);return i===void 0?e[s]:i})},V2=(e,t,n=L2)=>{const r=Ta()?null:Oo.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=hf({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:F2(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Ta()||Oo.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(i.state()),{set:l=>a(l)}});return{...o,...s,name:e}},td=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??_o.Text,i=t[s]??[],a=((c=i.find(d=>d["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:xi(),operation:l,label:oh(e),name:o,type:s,value:"",...r}},ah=()=>{const e=Ct(),t=x.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:x.useMemo(()=>({[_o.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[_o.Boolean]:[t.is,t.isNot],[_o.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},$2=e=>{const t=Ct(),n=ah(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,td(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(p=>u===p.id);return td(h,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=ih(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return w.jsx(x.Fragment,{children:w.jsx(ps,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Zk,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(Hr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),w.jsx(Hr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(Ni,{"data-id":l.id,onChange:a,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),w.jsx("div",{className:"mt-5 flex items-center justify-center",children:w.jsx("button",{"data-id":l.id,type:"button",onClick:i,children:w.jsx(Bo,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[w.jsx(af,{size:14})," ",t.tableFilterNewFilter]})})]})})})},B2=({filter:e,onDelete:t,set:n})=>{const r=Ct(),o=ah(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},i=a=>{const l=a.target.dataset.id||"",c=ih(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(Hr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),w.jsx(Ni,{"data-id":e.id,onChange:i,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),w.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:w.jsx(Bo,{className:"text-danger",size:14})})]})},W2=({item:e,onPointerDown:t})=>{const n=$r(0);return w.jsxs(Mb,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[w.jsx("button",{type:"button",className:"cursor-grab",children:w.jsx(Kk,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},z2=e=>{var l;const t=Ct(),n=sh(e.cols),r=Mk(),[o,s]=x.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var v;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((v=u.options.item(f))==null?void 0:v.label)||"";s(h);const p=new Aw(e.rows).GroupBy(d),m=e.cols.find(b=>b.id===d);e.setGroups(US(p).map((b,y)=>{const g=p[b];return{...m,groupId:xi(),groupKey:d,index:y,rows:g,groupName:b}}))},a=()=>e.setGroups([]);return w.jsx(x.Fragment,{children:w.jsxs(ps,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(eI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[w.jsxs("div",{className:"flex flex-nowrap items-center",children:[w.jsx(Hr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),w.jsx(jo,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(Bo,{size:16,className:"text-danger"})})]}),e.groups.length>0?w.jsxs("section",{className:"my-4",children:[w.jsx("header",{children:w.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),w.jsx(GT,{children:w.jsx(_b,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>w.jsx(W2,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},H2=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),U2=(e,t)=>e.toSorted(H2(t)),Ow=(e,t,n)=>({id:xi(),type:n,value:e.id,label:t}),G2=e=>{const t=Ct(),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,Ow(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return w.jsx(x.Fragment,{children:w.jsx(ps,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Nb,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(Hr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(Hr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:w.jsx(Bo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(af,{size:14})," ",t.tableSortAddButton]})})]})})})},Y2=e=>{const t=Ct(),[n,r]=x.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");x.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=Ow(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=oh(e.col);return w.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?w.jsx(Uk,{size:14}):null,n==="desc"?w.jsx(Hk,{size:14}):null,n==="undefined"?w.jsx(Nb,{size:14}):null]})},q2=e=>w.jsx("header",{className:"min-w-full mb-1",children:w.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[w.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[w.jsx("span",{children:w.jsx($2,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(G2,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(z2,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),w.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>w.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[w.jsxs("span",{children:[w.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),w.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[w.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),w.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=ih(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function K2(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const Z2=e=>{const t=x.useId(),n=Ct(),r=e.asLink||"button",o=x.useMemo(()=>K2(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return w.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[w.jsx("p",{children:w.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?w.jsxs(x.Fragment,{children:[w.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),w.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>w.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),w.jsx("nav",{children:w.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?w.jsx("li",{children:w.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:w.jsx(x.Fragment,{children:typeof i=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},X2={top:0,left:0,right:0,bottom:-1},Q2=e=>{var p;const t=Ct(),n=e.filters.filter(m=>m.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=ah(),a=r?Xk:Qk,l=m=>{const v=m.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(y=>y.id!==v))},c=x.useCallback(m=>{if(m===null)return;const v=new AbortController;return m.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:v.signal}),()=>v.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===Iw.Asc?"ascending":"descending":"none",f=oh(e.header),h=$r(void 0);return w.jsxs(Mb,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:h},role:"columnheader","aria-sort":d,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[w.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:w.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?w.jsx(ps,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),w.jsx(a,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:w.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:f})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(m=>w.jsx("li",{className:"my-1",children:w.jsx(B2,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(td(e.header,i.options,i.operations))),children:[w.jsx(af,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?w.jsx(Y2,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),w.jsx(ct.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:X2,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,v)=>{const b=m.target,y=h.get()||b.getBoundingClientRect().width,g=v.delta.x;return h.set(Math.abs(y+g))}})]})},J2=e=>w.jsx(_b,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:w.jsx(fr,{children:e.headers.map(t=>w.jsx(Q2,{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}`))})}),_w=x.createContext({}),eV=()=>x.useContext(_w),tV=x.forwardRef(({context:e,className:t="",...n},r)=>w.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:w.jsx(fr,{children:n.children})})),nV=x.forwardRef(({context:e,className:t="",...n},r)=>w.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),rV=x.forwardRef(({context:e,...t},n)=>{const r=eV(),o={...t==null?void 0:t.style,top:it.number(r.sticky)?`${r.sticky}px`:void 0};return w.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),oV=x.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),sV=x.forwardRef((e,t)=>e.context.loadingMore?w.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:w.jsx("tr",{role:"row",className:"bg-card-background",children:w.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:w.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),iV={TableHead:rV,Table:nV,TableBody:tV,TableRow:oV,TableFoot:sV},aV=[0,0,0,0,0,0,0,0,0,0],Mw=w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),lV=(e,t,n)=>w.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?Mw:w.jsx(b0,{})}),cV=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(x.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=wd(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.className)||"";return x.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?Mw:c?w.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):w.jsx(x.Fragment,{children:it.nil(l)?"":l}))})})},uV=()=>w.jsx(x.Fragment,{}),dV=[{}],my=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=x.useRef(null),[f,h]=x.useState(!1),p=Ys(i),m=Ys(u.loadingMore),v=x.useMemo(()=>{if(u.loading)return aV;if(c)return u.rows;const b=new Aw(u.rows);return t.length>0&&t.forEach(y=>y.value===""||Number.isNaN(y.value)?void 0:b.Where(y.name,y.operation.symbol,y.value)),r.length===0?b.Select():U2(b.Select(),r)},[u.rows,t,r,u.loading]);return x.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,y=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return y.observe(b),()=>y.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[w.jsx(PL,{useWindowScroll:!0,followOutput:"smooth",components:iV,totalCount:v.length,data:v.length===0?dV:v,fixedFooterContent:f?uV:null,itemContent:v.length===0?lV:cV,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>w.jsx(J2,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),w.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?w.jsx(Z2,{...l}):null]})},fV=(e,t)=>typeof t=="function"?t(e):t,sa=(e,t,n)=>e===t||n==null?void 0:n(t),hV=e=>{const t=x.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=x.useMemo(()=>sh(e.cols),[e.cols]),[o,s]=hf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:fV(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),sa((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),sa((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),sa((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),sa((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return w.jsx(_w.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?w.jsx(q2,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?w.jsx(my,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):w.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>w.jsx("div",{className:"min-w-full",children:w.jsx(my,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var mV=String.prototype.replace,pV=/%20/g,qc={RFC1738:"RFC1738",RFC3986:"RFC3986"},lh={default:qc.RFC3986,formatters:{RFC1738:function(e){return mV.call(e,pV,"+")},RFC3986:function(e){return String(e)}},RFC1738:qc.RFC1738,RFC3986:qc.RFC3986},gV=lh,Kc=Object.prototype.hasOwnProperty,Ir=Array.isArray,yn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),yV=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ir(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Dw=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},vV=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ir(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Kc.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Ir(t)&&!Ir(n)&&(o=Dw(t,r)),Ir(t)&&Ir(n)?(n.forEach(function(s,i){if(Kc.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Kc.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},bV=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},xV=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}},Zc=1024,wV=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Zc){for(var c=i.length>=Zc?i.slice(l,l+Zc):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===gV.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=yn[f];continue}if(f<2048){u[u.length]=yn[192|f>>6]+yn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=yn[224|f>>12]+yn[128|f>>6&63]+yn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=yn[240|f>>18]+yn[128|f>>12&63]+yn[128|f>>6&63]+yn[128|f&63]}a+=u.join("")}return a},SV=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return yV(n),t},TV=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},EV=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},CV=function(t,n){return[].concat(t,n)},RV=function(t,n){if(Ir(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Nw={arrayToObject:Dw,assign:bV,combine:CV,compact:SV,decode:xV,encode:wV,isBuffer:EV,isRegExp:TV,maybeMap:RV,merge:vV},jw=$S,va=Nw,Us=lh,PV=Object.prototype.hasOwnProperty,Lw={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},vn=Array.isArray,kV=Array.prototype.push,Fw=function(e,t){kV.apply(e,vn(t)?t:[t])},IV=Date.prototype.toISOString,py=Us.default,vt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:va.encode,encodeValuesOnly:!1,format:py,formatter:Us.formatters[py],indices:!1,serializeDate:function(t){return IV.call(t)},skipNulls:!1,strictNullHandling:!1},AV=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Xc={},OV=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,v,b,y){for(var g=t,T=y,S=0,E=!1;(T=T.get(Xc))!==void 0&&!E;){var C=T.get(t);if(S+=1,typeof C<"u"){if(C===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Xc)>"u"&&(S=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&vn(g)&&(g=va.maybeMap(g,function(_){return _ instanceof Date?h(_):_})),g===null){if(i)return c&&!v?c(n,vt.encoder,b,"key",p):n;g=""}if(AV(g)||va.isBuffer(g)){if(c){var k=v?n:c(n,vt.encoder,b,"key",p);return[m(k)+"="+m(c(g,vt.encoder,b,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var A;if(r==="comma"&&vn(g))v&&c&&(g=va.maybeMap(g,c)),A=[{value:g.length>0?g.join(",")||null:void 0}];else if(vn(u))A=u;else{var N=Object.keys(g);A=d?N.sort(d):N}var M=l?n.replace(/\./g,"%2E"):n,L=o&&vn(g)&&g.length===1?M+"[]":M;if(s&&vn(g)&&g.length===0)return L+"[]";for(var P=0;P<A.length;++P){var O=A[P],j=typeof O=="object"&&typeof O.value<"u"?O.value:g[O];if(!(a&&j===null)){var D=f&&l?O.replace(/\./g,"%2E"):O,V=vn(g)?typeof r=="function"?r(L,D):L:L+(f?"."+D:"["+D+"]");y.set(t,S);var H=jw();H.set(Xc,y),Fw(I,e(j,V,r,o,s,i,a,l,r==="comma"&&v&&vn(g)?null:c,u,d,f,h,p,m,v,b,H))}}return I},_V=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=Us.default;if(typeof t.format<"u"){if(!PV.call(Us.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Us.formatters[r],s=vt.filter;(typeof t.filter=="function"||vn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in Lw?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=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:i,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:s,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}},MV=function(e,t){var n=e,r=_V(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):vn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=Lw[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=jw(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||Fw(i,OV(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},Qo=Nw,nd=Object.prototype.hasOwnProperty,DV=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Qo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},NV=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Vw=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},jV="utf8=%26%2310003%3B",LV="utf8=%E2%9C%93",FV=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===LV?c="utf-8":i[l]===jV&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,ft.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ft.decoder,c,"key"),p=Qo.maybeMap(Vw(u.slice(f+1),n),function(v){return n.decoder(v,ft.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=NV(p)),u.indexOf("[]=")>-1&&(p=DV(p)?[p]:p);var m=nd.call(r,h);m&&n.duplicates==="combine"?r[h]=Qo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},VV=function(e,t,n,r){for(var o=r?t:Vw(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},$V=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&nd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&nd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),VV(u,n,r,o)}},BV=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"||Qo.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}},WV=function(e,t){var n=BV(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?FV(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=$V(a,r[a],n,typeof e=="string");o=Qo.merge(o,l,n)}return n.allowSparse===!0?o:Qo.compact(o)},zV=MV,HV=WV,UV=lh,GV={formats:UV,parse:HV,stringify:zV},Oe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Oe||(Oe={}));var gy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(gy||(gy={}));const le=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ar=e=>{switch(typeof e){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(e)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(e)?le.array:e===null?le.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?le.promise:typeof Map<"u"&&e instanceof Map?le.map:typeof Set<"u"&&e instanceof Set?le.set:typeof Date<"u"&&e instanceof Date?le.date:le.object;default:return le.unknown}},X=Oe.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 rn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof rn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.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()}}rn.create=e=>new rn(e);const fi=(e,t)=>{let n;switch(e.code){case X.invalid_type:e.received===le.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Oe.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oe.joinValues(e.keys,", ")}`;break;case X.invalid_union:n="Invalid input";break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oe.joinValues(e.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${Oe.joinValues(e.options)}, received '${e.received}'`;break;case X.invalid_arguments:n="Invalid function arguments";break;case X.invalid_return_type:n="Invalid function return type";break;case X.invalid_date:n="Invalid date";break;case X.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}"`:Oe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case X.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 X.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 X.custom:n="Invalid input";break;case X.invalid_intersection_types:n="Intersection results could not be merged";break;case X.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case X.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oe.assertNever(e)}return{message:n}};let YV=fi;function rd(){return YV}const od=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function oe(e,t){const n=rd(),r=od({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===fi?void 0:fi].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 ve;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return $t.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const ve=Object.freeze({status:"aborted"}),As=e=>({status:"dirty",value:e}),Ut=e=>({status:"valid",value:e}),yy=e=>e.status==="aborted",vy=e=>e.status==="dirty",el=e=>e.status==="valid",tl=e=>typeof Promise<"u"&&e instanceof Promise;function nl(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 $w(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}var fe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(fe||(fe={}));var Os,_s;class Dn{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 by=(e,t)=>{if(el(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 rn(e.common.issues);return this._error=n,this._error}}};function xe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class Ce{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 Ar(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ar(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:Ar(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},s=this._parseSync({data:t,path:o.path,parent:o});return by(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ar(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(tl(o)?o:Promise.resolve(o));return by(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:X.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Gn({schema:this,typeName:ge.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return $n.create(this,this._def)}nullable(){return Yr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return An.create(this,this._def)}promise(){return mi.create(this,this._def)}or(t){return sl.create([this,t],this._def)}and(t){return il.create(this,t,this._def)}transform(t){return new Gn({...xe(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new dl({...xe(this._def),innerType:this,defaultValue:n,typeName:ge.ZodDefault})}brand(){return new Hw({typeName:ge.ZodBranded,type:this,...xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new fl({...xe(this._def),innerType:this,catchValue:n,typeName:ge.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ll.create(this,t)}readonly(){return hl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qV=/^c[^\s-]{8,}$/i,KV=/^[0-9a-z]+$/,ZV=/^[0-9A-HJKMNP-TV-Z]{26}$/,XV=/^[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,QV=/^[a-z0-9_-]{21}$/i,JV=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,e$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,t$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qc;const n$=/^(?:(?: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])$/,r$=/^(([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})))$/,o$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Bw="((\\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])))",s$=new RegExp(`^${Bw}$`);function Ww(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 i$(e){return new RegExp(`^${Ww(e)}$`)}function a$(e){let t=`${Bw}T${Ww(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 l$(e,t){return!!((t==="v4"||!t)&&n$.test(e)||(t==="v6"||!t)&&r$.test(e))}class Vn extends Ce{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==le.string){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.string,received:s.parsedType}),ve}const r=new $t;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?oe(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&oe(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")e$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"email",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Qc||(Qc=new RegExp(t$,"u")),Qc.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"emoji",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")XV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"uuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")QV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"nanoid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")qV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")KV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid2",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")ZV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ulid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),oe(o,{validation:"url",code:X.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"regex",code:X.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?a$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?s$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?i$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?JV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"duration",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?l$(t.data,s.version)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ip",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?o$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"base64",code:X.invalid_string,message:s.message}),r.dirty()):Oe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:X.invalid_string,...fe.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...fe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...fe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...fe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...fe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...fe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...fe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...fe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...fe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...fe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...fe.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,...fe.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,...fe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...fe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...fe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...fe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...fe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...fe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...fe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...fe.errToObj(n)})}nonempty(t){return this.min(1,fe.errToObj(t))}trim(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vn({...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}}Vn.create=e=>{var t;return new Vn({checks:[],typeName:ge.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...xe(e)})};function c$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Ur extends Ce{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)!==le.number){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.number,received:s.parsedType}),ve}let r;const o=new $t;for(const s of this._def.checks)s.kind==="int"?Oe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:X.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?c$(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:X.not_finite,message:s.message}),o.dirty()):Oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,o){return new Ur({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(o)}]})}_addCheck(t){return new Ur({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:fe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:fe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.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"&&Oe.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)}}Ur.create=e=>new Ur({checks:[],typeName:ge.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...xe(e)});class Jo extends Ce{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)!==le.bigint){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.bigint,received:s.parsedType}),ve}let r;const o=new $t;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,fe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,fe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,fe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,fe.toString(n))}setLimit(t,n,r,o){return new Jo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:fe.toString(o)}]})}_addCheck(t){return new Jo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:fe.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}}Jo.create=e=>{var t;return new Jo({checks:[],typeName:ge.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...xe(e)})};class sd extends Ce{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==le.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.boolean,received:r.parsedType}),ve}return Ut(t.data)}}sd.create=e=>new sd({typeName:ge.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...xe(e)});class hi extends Ce{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==le.date){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_type,expected:le.date,received:s.parsedType}),ve}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return oe(s,{code:X.invalid_date}),ve}const r=new $t;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:X.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Oe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:fe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:fe.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}}hi.create=e=>new hi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ge.ZodDate,...xe(e)});class id extends Ce{_parse(t){if(this._getType(t)!==le.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.symbol,received:r.parsedType}),ve}return Ut(t.data)}}id.create=e=>new id({typeName:ge.ZodSymbol,...xe(e)});class rl extends Ce{_parse(t){if(this._getType(t)!==le.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.undefined,received:r.parsedType}),ve}return Ut(t.data)}}rl.create=e=>new rl({typeName:ge.ZodUndefined,...xe(e)});class ol extends Ce{_parse(t){if(this._getType(t)!==le.null){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.null,received:r.parsedType}),ve}return Ut(t.data)}}ol.create=e=>new ol({typeName:ge.ZodNull,...xe(e)});class ad extends Ce{constructor(){super(...arguments),this._any=!0}_parse(t){return Ut(t.data)}}ad.create=e=>new ad({typeName:ge.ZodAny,...xe(e)});class Mo extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ut(t.data)}}Mo.create=e=>new Mo({typeName:ge.ZodUnknown,...xe(e)});class ur extends Ce{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:X.invalid_type,expected:le.never,received:n.parsedType}),ve}}ur.create=e=>new ur({typeName:ge.ZodNever,...xe(e)});class ld extends Ce{_parse(t){if(this._getType(t)!==le.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.void,received:r.parsedType}),ve}return Ut(t.data)}}ld.create=e=>new ld({typeName:ge.ZodVoid,...xe(e)});class An extends Ce{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==le.array)return oe(n,{code:X.invalid_type,expected:le.array,received:n.parsedType}),ve;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(oe(n,{code:i?X.too_big:X.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(oe(n,{code:X.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(oe(n,{code:X.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Dn(n,i,n.path,a)))).then(i=>$t.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Dn(n,i,n.path,a)));return $t.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new An({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new An({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new An({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}}An.create=(e,t)=>new An({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...xe(t)});function go(e){if(e instanceof lt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$n.create(go(r))}return new lt({...e._def,shape:()=>t})}else return e instanceof An?new An({...e._def,type:go(e.element)}):e instanceof $n?$n.create(go(e.unwrap())):e instanceof Yr?Yr.create(go(e.unwrap())):e instanceof Un?Un.create(e.items.map(t=>go(t))):e}class lt extends Ce{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=Oe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==le.object){const c=this._getOrReturnCtx(t);return oe(c,{code:X.invalid_type,expected:le.object,received:c.parsedType}),ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof ur&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Dn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof ur){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(oe(o,{code:X.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 Dn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>$t.mergeObjectSync(r,c)):$t.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return fe.errToObj,new lt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=fe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new lt({...this._def,unknownKeys:"strip"})}passthrough(){return new lt({...this._def,unknownKeys:"passthrough"})}extend(t){return new lt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new lt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ge.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new lt({...this._def,catchall:t})}pick(t){const n={};return Oe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new lt({...this._def,shape:()=>n})}omit(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new lt({...this._def,shape:()=>n})}deepPartial(){return go(this)}partial(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new lt({...this._def,shape:()=>n})}required(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof $n;)s=s._def.innerType;n[r]=s}}),new lt({...this._def,shape:()=>n})}keyof(){return zw(Oe.objectKeys(this.shape))}}lt.create=(e,t)=>new lt({shape:()=>e,unknownKeys:"strip",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});lt.strictCreate=(e,t)=>new lt({shape:()=>e,unknownKeys:"strict",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});lt.lazycreate=(e,t)=>new lt({shape:e,unknownKeys:"strip",catchall:ur.create(),typeName:ge.ZodObject,...xe(t)});class sl extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new rn(a.ctx.common.issues));return oe(n,{code:X.invalid_union,unionErrors:i}),ve}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new rn(l));return oe(n,{code:X.invalid_union,unionErrors:a}),ve}}get options(){return this._def.options}}sl.create=(e,t)=>new sl({options:e,typeName:ge.ZodUnion,...xe(t)});const Fn=e=>e instanceof ll?Fn(e.schema):e instanceof Gn?Fn(e.innerType()):e instanceof cl?[e.value]:e instanceof Gr?e.options:e instanceof ul?Oe.objectValues(e.enum):e instanceof dl?Fn(e._def.innerType):e instanceof rl?[void 0]:e instanceof ol?[null]:e instanceof $n?[void 0,...Fn(e.unwrap())]:e instanceof Yr?[null,...Fn(e.unwrap())]:e instanceof Hw||e instanceof hl?Fn(e.unwrap()):e instanceof fl?Fn(e._def.innerType):[];class ch extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.object)return oe(n,{code:X.invalid_type,expected:le.object,received:n.parsedType}),ve;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Fn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new ch({typeName:ge.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...xe(r)})}}function cd(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===le.object&&r===le.object){const o=Oe.objectKeys(t),s=Oe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=cd(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===le.array&&r===le.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=cd(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===le.date&&r===le.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class il extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(yy(s)||yy(i))return ve;const a=cd(s.value,i.value);return a.valid?((vy(s)||vy(i))&&n.dirty(),{status:n.value,value:a.data}):(oe(r,{code:X.invalid_intersection_types}),ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}il.create=(e,t,n)=>new il({left:e,right:t,typeName:ge.ZodIntersection,...xe(n)});class Un extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==le.array)return oe(r,{code:X.invalid_type,expected:le.array,received:r.parsedType}),ve;if(r.data.length<this._def.items.length)return oe(r,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Dn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>$t.mergeArray(n,i)):$t.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Un({...this._def,rest:t})}}Un.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Un({items:e,typeName:ge.ZodTuple,rest:null,...xe(t)})};class al extends Ce{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!==le.object)return oe(r,{code:X.invalid_type,expected:le.object,received:r.parsedType}),ve;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Dn(r,a,r.path,a)),value:i._parse(new Dn(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 Ce?new al({keyType:t,valueType:n,typeName:ge.ZodRecord,...xe(r)}):new al({keyType:Vn.create(),valueType:t,typeName:ge.ZodRecord,...xe(n)})}}class ud extends Ce{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!==le.map)return oe(r,{code:X.invalid_type,expected:le.map,received:r.parsedType}),ve;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Dn(r,a,r.path,[c,"key"])),value:s._parse(new Dn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return ve;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return ve;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}ud.create=(e,t,n)=>new ud({valueType:t,keyType:e,typeName:ge.ZodMap,...xe(n)});class es extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==le.set)return oe(r,{code:X.invalid_type,expected:le.set,received:r.parsedType}),ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(oe(r,{code:X.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(oe(r,{code:X.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return ve;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Dn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new es({...this._def,minSize:{value:t,message:fe.toString(n)}})}max(t,n){return new es({...this._def,maxSize:{value:t,message:fe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}es.create=(e,t)=>new es({valueType:e,minSize:null,maxSize:null,typeName:ge.ZodSet,...xe(t)});class Gs extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.function)return oe(n,{code:X.invalid_type,expected:le.function,received:n.parsedType}),ve;function r(a,l){return od({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rd(),fi].filter(c=>!!c),issueData:{code:X.invalid_arguments,argumentsError:l}})}function o(a,l){return od({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,rd(),fi].filter(c=>!!c),issueData:{code:X.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof mi){const a=this;return Ut(async function(...l){const c=new rn([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return Ut(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new rn([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new rn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Gs({...this._def,args:Un.create(t).rest(Mo.create())})}returns(t){return new Gs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Gs({args:t||Un.create([]).rest(Mo.create()),returns:n||Mo.create(),typeName:ge.ZodFunction,...xe(r)})}}class ll extends Ce{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})}}ll.create=(e,t)=>new ll({getter:e,typeName:ge.ZodLazy,...xe(t)});class cl extends Ce{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:X.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}cl.create=(e,t)=>new cl({value:e,typeName:ge.ZodLiteral,...xe(t)});function zw(e,t){return new Gr({values:e,typeName:ge.ZodEnum,...xe(t)})}class Gr extends Ce{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 oe(n,{expected:Oe.joinValues(r),received:n.parsedType,code:X.invalid_type}),ve}if(nl(this,Os)||$w(this,Os,new Set(this._def.values)),!nl(this,Os).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:X.invalid_enum_value,options:r}),ve}return Ut(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 Gr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Gr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Os=new WeakMap;Gr.create=zw;class ul extends Ce{constructor(){super(...arguments),_s.set(this,void 0)}_parse(t){const n=Oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==le.string&&r.parsedType!==le.number){const o=Oe.objectValues(n);return oe(r,{expected:Oe.joinValues(o),received:r.parsedType,code:X.invalid_type}),ve}if(nl(this,_s)||$w(this,_s,new Set(Oe.getValidEnumValues(this._def.values))),!nl(this,_s).has(t.data)){const o=Oe.objectValues(n);return oe(r,{received:r.data,code:X.invalid_enum_value,options:o}),ve}return Ut(t.data)}get enum(){return this._def.values}}_s=new WeakMap;ul.create=(e,t)=>new ul({values:e,typeName:ge.ZodNativeEnum,...xe(t)});class mi extends Ce{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==le.promise&&n.common.async===!1)return oe(n,{code:X.invalid_type,expected:le.promise,received:n.parsedType}),ve;const r=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return Ut(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}mi.create=(e,t)=>new mi({type:e,typeName:ge.ZodPromise,...xe(t)});class Gn extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ge.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{oe(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return ve;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ve:l.status==="dirty"||n.value==="dirty"?As(l.value):l});{if(n.value==="aborted")return ve;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ve:a.status==="dirty"||n.value==="dirty"?As(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!el(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>el(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Oe.assertNever(o)}}Gn.create=(e,t,n)=>new Gn({schema:e,typeName:ge.ZodEffects,effect:t,...xe(n)});Gn.createWithPreprocess=(e,t,n)=>new Gn({schema:t,effect:{type:"preprocess",transform:e},typeName:ge.ZodEffects,...xe(n)});class $n extends Ce{_parse(t){return this._getType(t)===le.undefined?Ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$n.create=(e,t)=>new $n({innerType:e,typeName:ge.ZodOptional,...xe(t)});class Yr extends Ce{_parse(t){return this._getType(t)===le.null?Ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yr.create=(e,t)=>new Yr({innerType:e,typeName:ge.ZodNullable,...xe(t)});class dl extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===le.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}dl.create=(e,t)=>new dl({innerType:e,typeName:ge.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...xe(t)});class fl extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tl(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}fl.create=(e,t)=>new fl({innerType:e,typeName:ge.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...xe(t)});class dd extends Ce{_parse(t){if(this._getType(t)!==le.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:X.invalid_type,expected:le.nan,received:r.parsedType}),ve}return{status:"valid",value:t.data}}}dd.create=e=>new dd({typeName:ge.ZodNaN,...xe(e)});class Hw extends Ce{_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 Ll extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ve:s.status==="dirty"?(n.dirty(),As(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ve: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 Ll({in:t,out:n,typeName:ge.ZodPipeline})}}class hl extends Ce{_parse(t){const n=this._def.innerType._parse(t),r=o=>(el(o)&&(o.value=Object.freeze(o.value)),o);return tl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}hl.create=(e,t)=>new hl({innerType:e,typeName:ge.ZodReadonly,...xe(t)});lt.lazycreate;var ge;(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"})(ge||(ge={}));Vn.create;Ur.create;dd.create;Jo.create;sd.create;hi.create;id.create;rl.create;ol.create;ad.create;Mo.create;ur.create;ld.create;An.create;lt.create;lt.strictCreate;sl.create;ch.create;il.create;Un.create;al.create;ud.create;es.create;Gs.create;ll.create;cl.create;Gr.create;ul.create;mi.create;Gn.create;$n.create;Yr.create;Gn.createWithPreprocess;Ll.create;const u$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},d$=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const s=t[o];if(o===r)e[s]=n;else{if(!(s in e)||typeof e[s]!="object"){const i=t[o+1];e[s]=isNaN(Number(i))?{}:[]}e=e[s]}}},Uw=e=>e.replace(/\[(\d+)]/g,".$1").split("."),sn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Uw(t),o=structuredClone(e);return d$(o,r,n),o},f$=(e,t)=>e.localeCompare(t),Rs={},Gw=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return Yw(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=Gw(e._def.innerType);return t==="ZodArray"?n??[]:n}},Yw=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,Gw(n)])),qw=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],s=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof s=="object"&&s!==null&&!Array.isArray(s)?n[r]=qw(s,o):n[r]=o||s)}return n},h$={sort:f$,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},Kw=e=>{const t=new FormData(e),n=new URLSearchParams(t);return GV.parse(n.toString(),h$)},Pr=(e,t)=>Uw(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),er=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Jc=e=>{const t=e.dataset.target;if(!t)return er(e);const n=document.querySelector(`[data-origin="${t}"]`);return er(n||e)},m$={state:{},loading:!1,useOnChange:!1},xy=e=>e.dataset.target||e.name,p$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Oo.LocalStorage.get(t);return u$(n)?n:{}},clear:()=>void Oo.LocalStorage.delete(t),set:n=>Oo.LocalStorage.set(t,n)}},g$=(e,t,n=m$)=>{const[r,o]=x.useState(null),s=x.useRef({}),[i,a]=x.useState(()=>it.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??Yw(e)??{}),l=x.useCallback(y=>{var I;const g=y.target,T=y.currentTarget;if(g.dataset.optional==="true")return;const E=xy(g),C=Jc(g)||(T?er(T):""),k=Pr(E,e);if(g.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),N=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(M=>sn(M??{},E,N))}},[]),c=x.useCallback(y=>g=>{const T=g.currentTarget,S=Object.values(s.current).reduce((C,k)=>{var L;const I=k.element,A=k.schema.safeParse(er(I));if(I.dataset.ignore==="ignore"||A.success)return C;const N=(L=A.error.issues[0])==null?void 0:L.message;I.setAttribute("data-initialized","true");const M=I.dataset.name||I.name||"";return sn(C,M,N)},{}),E=it.empty(S)?null:S;o(E),console.error(E),y==null||y({form:T,errors:E||{}})},[]),u=(y,g=Rs)=>{const T=Pr(y,e),S=E=>{var k;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(I=>sn(I,y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)};return{...g,loading:n.loading,name:y,id:y,onChange:S,form:t,date:it.string(i[y])?new Date(i[y]):i[y],required:g.required??!T.isOptional(),error:r==null?void 0:r[y],ref:E=>{E!==null&&(s.current[y]={element:E,schema:T})}}},d=(y,g=Rs)=>{const T=Pr(y,e);return{...g,name:y,id:y,onChange:E=>{var k;const C=E.target.value;a(I=>sn(I,y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),value:wr(i,y,void 0)||"",required:g.required??!T.isOptional(),ref:E=>E!==null?s.current[y]={element:E,schema:T}:void 0}},f=(y,g=Rs)=>{const T=Pr(y,e);return{...g,name:y,id:y,onChange:E=>{var k;const C=E.target.checked;a(I=>sn(I??{},y,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),ref:E=>E!==null?void(s.current[y]={element:E,schema:T}):void 0}},h=(y,g=Rs)=>{const T=Pr(y,e),S=E=>{var k,I;(k=E.persist)==null||k.call(E);const C=E.target.value;(I=g==null?void 0:g.onChange)==null||I.call(g,E),a(A=>sn(A,y,C))};return{...g,loading:n.loading,name:y,id:y,onChange:S,form:t,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),value:wr(i,y,void 0)||(g==null?void 0:g.value)||"",type:it.instance(T,Ur)?"number":(g==null?void 0:g.type)??"text",ref:E=>E===null?void 0:s.current[y]={element:E,schema:T}}},p=(y,g=Rs)=>{const T=Pr(y,e),S=T._def.typeName==="ZodNumber";return{...g,name:y,id:y,onChange:C=>{var I,A;(I=C.persist)==null||I.call(C);const k=S?C.target.valueAsNumber:C.target.value;(A=g==null?void 0:g.onChange)==null||A.call(g,C),a(N=>sn(N,y,k))},form:t,loading:n.loading,onInvalid:l,error:wr(r,y,void 0),required:g.required??!T.isOptional(),type:S?"number":(g==null?void 0:g.type)??"text",value:wr(i,y,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[y]={element:C,schema:T})}};x.useEffect(()=>{const y=Object.values(s.current).map(T=>{const S=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,E=T.schema.safeParse(er(S)),C=N=>{var j;const M=xy(N.target);if(!M)return!1;const L=N.target,P=Jc(N.target)||(N.relatedTarget?er(N.relatedTarget):""),O=T.schema.safeParse(P);if(L.setAttribute("value",P),O.success)return S.setCustomValidity(""),o(D=>{if(it.null(D))return null;const V=sn(D,M,void 0);return it.empty(D)||it.nil(D)||it.empty(V)?null:V}),!1;if(S.required){const D=((j=O.error.issues[0])==null?void 0:j.message)||"";S.setCustomValidity(D),o(V=>{if(it.null(V))return null;const H=sn(V,M,D||void 0);return it.empty(H)?null:H})}return!1},k=new AbortController,I=S.getAttribute("data-trigger")||"blur";S.addEventListener(I,C,{signal:k.signal});const A=S.dataset.shadow?!1:S.required?!E.success:!1;return{input:T,hasInitialError:A,unsubscribe:()=>k.abort()}});return y.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>y.forEach(T=>T.unsubscribe())});const m=y=>g=>{var A;g.preventDefault();const T=g.currentTarget;let S=Kw(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(N=>{if(N.tagName==="SELECT"){const M=N;S=sn(S,M.name,M.value)}if(N.tagName==="INPUT"){const M=N,L=Jc(M)||(M?er(M):"");S=sn(S,M.dataset.target||M.name,L)}});const C=qw(S,i),k=e.safeParse(C),I=()=>{var N;Cw(T),(N=n.interceptor)==null||N.clear()};if(k.success){const N=JSON.stringify(k.data);return T.setAttribute("data-json",N),(A=n.interceptor)==null||A.clear(),y==null?void 0:y(g,{form:T,event:g,reset:I,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),T.reportValidity(),y==null?void 0:y(g,{form:T,json:S,event:g,reset:I,data:S,success:!1,errors:k.error.issues.map(N=>({message:N.message,path:N.path.map(M=>String(M))}))})},v=y=>wd(i,y)||"",b=y=>({...y,id:t,name:t});return x.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(i))},[i]),{get:v,input:p,state:i,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,disabled:r!==null}},y$=e=>e?JSON.parse(e.getAttribute("data-json")):{},v$=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=oI;exports.Autocomplete=NL;exports.Button=jo;exports.Calendar=y0;exports.Card=v0;exports.Checkbox=eh;exports.ColType=_o;exports.Collapse=Vb;exports.ComponentsProvider=qO;exports.DatePicker=UL;exports.Dropdown=ps;exports.Empty=b0;exports.Expand=QD;exports.FileUpload=r2;exports.Form=s2;exports.Input=Ni;exports.InputFeedback=uw;exports.InputField=Di;exports.Menu=tN;exports.MenuItem=eN;exports.Modal=UN;exports.MultiCombobox=zL;exports.Notifications=eM;exports.Polymorph=ss;exports.Radiobox=i2;exports.RenderOnView=OT;exports.Select=Hr;exports.Stats=tM;exports.Switch=a2;exports.Tab=oM;exports.Table=hV;exports.Tabs=nM;exports.Tag=Td;exports.TaskList=l2;exports.Textarea=c2;exports.Toolbar=GN;exports.Tooltip=jx;exports.TransferList=f2;exports.createColumns=j2;exports.createCssProperties=WO;exports.createDesignTokens=f0;exports.createFormStorage=p$;exports.createOptionCols=sh;exports.createStyles=$O;exports.createTheme=BO;exports.createTokenStyles=zO;exports.css=Me;exports.defaultDarkTheme=GO;exports.defaultLightTheme=YO;exports.dispatchInput=xd;exports.formReset=Cw;exports.formToJson=Kw;exports.getJsonForm=y$;exports.getSchemaShape=Pr;exports.initializeInputDataset=bi;exports.isReactComponent=ET;exports.isReactFC=CT;exports.isSsr=Ta;exports.mergeRefs=bd;exports.negate=RT;exports.noop=Sd;exports.parsers=El;exports.path=wd;exports.reduceTokens=To;exports.safeRegex=au;exports.splitInto=zy;exports.useColorParser=KO;exports.useForm=g$;exports.useLocale=yf;exports.useNotification=Q_;exports.usePrevious=v$;exports.useReactive=W0;exports.useTablePreferences=V2;exports.useTranslations=Ct;exports.uuid=xi;
|
|
237
237
|
//# sourceMappingURL=index.js.map
|