@g4rcez/components 0.0.71 → 0.0.72

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.
Files changed (55) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +53 -53
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +6201 -6131
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/index.umd.js +50 -50
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/preset/preset.tailwind.js +3 -3
  9. package/dist/preset/src/styles/dark.d.ts.map +1 -1
  10. package/dist/preset/src/styles/dark.js +16 -1
  11. package/dist/preset/src/styles/light.d.ts.map +1 -1
  12. package/dist/preset/src/styles/light.js +16 -1
  13. package/dist/preset/src/styles/theme.types.d.ts +3 -1
  14. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  15. package/dist/preset.tailwind.js +3 -3
  16. package/dist/src/components/core/button.d.ts +1 -1
  17. package/dist/src/components/core/button.d.ts.map +1 -1
  18. package/dist/src/components/core/button.js +4 -3
  19. package/dist/src/components/core/polymorph.d.ts +1 -1
  20. package/dist/src/components/core/polymorph.d.ts.map +1 -1
  21. package/dist/src/components/core/tag.d.ts +2 -2
  22. package/dist/src/components/core/tag.d.ts.map +1 -1
  23. package/dist/src/components/core/tag.js +3 -1
  24. package/dist/src/components/display/calendar.d.ts.map +1 -1
  25. package/dist/src/components/display/calendar.js +1 -1
  26. package/dist/src/components/display/step.d.ts +2 -2
  27. package/dist/src/components/display/step.d.ts.map +1 -1
  28. package/dist/src/components/display/step.js +7 -7
  29. package/dist/src/components/display/tabs.d.ts.map +1 -1
  30. package/dist/src/components/display/tabs.js +3 -3
  31. package/dist/src/components/floating/menu.d.ts.map +1 -1
  32. package/dist/src/components/floating/menu.js +19 -16
  33. package/dist/src/components/floating/modal.d.ts +11 -8
  34. package/dist/src/components/floating/modal.d.ts.map +1 -1
  35. package/dist/src/components/floating/modal.js +8 -8
  36. package/dist/src/components/floating/tooltip.d.ts +2 -2
  37. package/dist/src/components/floating/tooltip.d.ts.map +1 -1
  38. package/dist/src/components/form/autocomplete.d.ts.map +1 -1
  39. package/dist/src/components/form/autocomplete.js +23 -12
  40. package/dist/src/components/form/input-field.js +1 -1
  41. package/dist/src/components/form/multi-combobox.d.ts.map +1 -1
  42. package/dist/src/components/form/multi-combobox.js +2 -1
  43. package/dist/src/components/form/task-list.js +3 -3
  44. package/dist/src/components/table/table-lib.d.ts.map +1 -1
  45. package/dist/src/components/table/table-lib.js +9 -2
  46. package/dist/src/hooks/use-components-provider.d.ts +8 -2
  47. package/dist/src/hooks/use-components-provider.d.ts.map +1 -1
  48. package/dist/src/hooks/use-components-provider.js +6 -2
  49. package/dist/src/styles/dark.d.ts.map +1 -1
  50. package/dist/src/styles/dark.js +16 -1
  51. package/dist/src/styles/light.d.ts.map +1 -1
  52. package/dist/src/styles/light.js +16 -1
  53. package/dist/src/styles/theme.types.d.ts +3 -1
  54. package/dist/src/styles/theme.types.d.ts.map +1 -1
  55. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var Zw=Object.defineProperty;var Xw=(e,t,n)=>t in e?Zw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ie=(e,t,n)=>Xw(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),w=require("react/jsx-runtime"),hi=require("react-dom");function by(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const R=by(x),mi=by(hi);function xy(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=xy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=xy(e))&&(r&&(r+=" "),r+=t);return r}var lh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function e1(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 t1=Error,n1=EvalError,r1=RangeError,o1=ReferenceError,wy=SyntaxError,pi=TypeError,s1=URIError,i1=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},ch=typeof Symbol<"u"&&Symbol,a1=i1,l1=function(){return typeof ch!="function"||typeof Symbol!="function"||typeof ch("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:a1()},$l={__proto__:null,foo:{}},c1=Object,u1=function(){return{__proto__:$l}.foo===$l.foo&&!($l instanceof c1)},d1="Function.prototype.bind called on incompatible ",f1=Object.prototype.toString,h1=Math.max,m1="[object Function]",uh=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},p1=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},g1=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},y1=function(t){var n=this;if(typeof n!="function"||f1.apply(n)!==m1)throw new TypeError(d1+n);for(var r=p1(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,uh(r,arguments));return Object(u)===u?u:this}return n.apply(t,uh(r,arguments))},i=h1(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+g1(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},v1=y1,dd=Function.prototype.bind||v1,b1=Function.prototype.call,x1=Object.prototype.hasOwnProperty,w1=dd,S1=w1.call(b1,x1),Pe,T1=t1,E1=n1,C1=r1,R1=o1,Do=wy,Eo=pi,P1=s1,Sy=Function,Bl=function(e){try{return Sy('"use strict"; return ('+e+").constructor;")()}catch{}},Nr=Object.getOwnPropertyDescriptor;if(Nr)try{Nr({},"")}catch{Nr=null}var Wl=function(){throw new Eo},k1=Nr?function(){try{return arguments.callee,Wl}catch{try{return Nr(arguments,"callee").get}catch{return Wl}}}():Wl,so=l1(),I1=u1(),wt=Object.getPrototypeOf||(I1?function(e){return e.__proto__}:null),mo={},A1=typeof Uint8Array>"u"||!wt?Pe:wt(Uint8Array),jr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Pe:ArrayBuffer,"%ArrayIteratorPrototype%":so&&wt?wt([][Symbol.iterator]()):Pe,"%AsyncFromSyncIteratorPrototype%":Pe,"%AsyncFunction%":mo,"%AsyncGenerator%":mo,"%AsyncGeneratorFunction%":mo,"%AsyncIteratorPrototype%":mo,"%Atomics%":typeof Atomics>"u"?Pe:Atomics,"%BigInt%":typeof BigInt>"u"?Pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":T1,"%eval%":eval,"%EvalError%":E1,"%Float32Array%":typeof Float32Array>"u"?Pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Pe:FinalizationRegistry,"%Function%":Sy,"%GeneratorFunction%":mo,"%Int8Array%":typeof Int8Array>"u"?Pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":so&&wt?wt(wt([][Symbol.iterator]())):Pe,"%JSON%":typeof JSON=="object"?JSON:Pe,"%Map%":typeof Map>"u"?Pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!so||!wt?Pe:wt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Pe:Promise,"%Proxy%":typeof Proxy>"u"?Pe:Proxy,"%RangeError%":C1,"%ReferenceError%":R1,"%Reflect%":typeof Reflect>"u"?Pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!so||!wt?Pe:wt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":so&&wt?wt(""[Symbol.iterator]()):Pe,"%Symbol%":so?Symbol:Pe,"%SyntaxError%":Do,"%ThrowTypeError%":k1,"%TypedArray%":A1,"%TypeError%":Eo,"%Uint8Array%":typeof Uint8Array>"u"?Pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Pe:Uint32Array,"%URIError%":P1,"%WeakMap%":typeof WeakMap>"u"?Pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Pe:WeakSet};if(wt)try{null.error}catch(e){var O1=wt(wt(e));jr["%Error.prototype%"]=O1}var _1=function e(t){var n;if(t==="%AsyncFunction%")n=Bl("async function () {}");else if(t==="%GeneratorFunction%")n=Bl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Bl("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},dh={__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"]},gi=dd,ya=S1,D1=gi.call(Function.call,Array.prototype.concat),M1=gi.call(Function.apply,Array.prototype.splice),fh=gi.call(Function.call,String.prototype.replace),va=gi.call(Function.call,String.prototype.slice),N1=gi.call(Function.call,RegExp.prototype.exec),j1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L1=/\\(\\)?/g,F1=function(t){var n=va(t,0,1),r=va(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 fh(t,j1,function(s,i,a,l){o[o.length]=a?fh(l,L1,"$1"):i||s}),o},V1=function(t,n){var r=t,o;if(ya(dh,r)&&(o=dh[r],r="%"+o[0]+"%"),ya(jr,r)){var s=jr[r];if(s===mo&&(s=_1(r)),typeof s>"u"&&!n)throw new Eo("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!")},es=function(t,n){if(typeof t!="string"||t.length===0)throw new Eo("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Eo('"allowMissing" argument must be a boolean');if(N1(/^%?[^%]*%?$/,t)===null)throw new Do("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=F1(t),o=r.length>0?r[0]:"",s=V1("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],M1(r,D1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=va(f,0,1),p=va(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+"%",ya(jr,i))a=jr[i];else if(a!=null){if(!(f in a)){if(!n)throw new Eo("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=ya(a,f),a=a[f];d&&!l&&(jr[i]=a)}}return a},Ty={exports:{}},zl,hh;function fd(){if(hh)return zl;hh=1;var e=es,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return zl=t,zl}var $1=es,oa=$1("%Object.getOwnPropertyDescriptor%",!0);if(oa)try{oa([],"length")}catch{oa=null}var Ey=oa,mh=fd(),B1=wy,io=pi,ph=Ey,W1=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=!!ph&&ph(t,n);if(mh)mh(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new B1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Qc=fd(),Cy=function(){return!!Qc};Cy.hasArrayLengthDefineBug=function(){if(!Qc)return null;try{return Qc([],"length",{value:1}).length!==1}catch{return!0}};var z1=Cy,H1=es,gh=W1,U1=z1(),yh=Ey,vh=pi,G1=H1("%Math.floor%"),Y1=function(t,n){if(typeof t!="function")throw new vh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||G1(n)!==n)throw new vh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&yh){var i=yh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(U1?gh(t,"length",n,!0,!0):gh(t,"length",n)),t};(function(e){var t=dd,n=es,r=Y1,o=pi,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=fd(),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})(Ty);var q1=Ty.exports,Ry=es,Py=q1,K1=Py(Ry("String.prototype.indexOf")),Z1=function(t,n){var r=Ry(t,!!n);return typeof r=="function"&&K1(t,".prototype.")>-1?Py(r):r};const X1={},Q1=Object.freeze(Object.defineProperty({__proto__:null,default:X1},Symbol.toStringTag,{value:"Module"})),J1=e1(Q1);var hd=typeof Map=="function"&&Map.prototype,Hl=Object.getOwnPropertyDescriptor&&hd?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ba=hd&&Hl&&typeof Hl.get=="function"?Hl.get:null,bh=hd&&Map.prototype.forEach,md=typeof Set=="function"&&Set.prototype,Ul=Object.getOwnPropertyDescriptor&&md?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,xa=md&&Ul&&typeof Ul.get=="function"?Ul.get:null,xh=md&&Set.prototype.forEach,eS=typeof WeakMap=="function"&&WeakMap.prototype,_s=eS?WeakMap.prototype.has:null,tS=typeof WeakSet=="function"&&WeakSet.prototype,Ds=tS?WeakSet.prototype.has:null,nS=typeof WeakRef=="function"&&WeakRef.prototype,wh=nS?WeakRef.prototype.deref:null,rS=Boolean.prototype.valueOf,oS=Object.prototype.toString,sS=Function.prototype.toString,iS=String.prototype.match,pd=String.prototype.slice,tr=String.prototype.replace,aS=String.prototype.toUpperCase,Sh=String.prototype.toLowerCase,ky=RegExp.prototype.test,Th=Array.prototype.concat,bn=Array.prototype.join,lS=Array.prototype.slice,Eh=Math.floor,Jc=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Gl=Object.getOwnPropertySymbols,eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Mo=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Nt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Mo||!0)?Symbol.toStringTag:null,Iy=Object.prototype.propertyIsEnumerable,Ch=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Rh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||ky.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Eh(-e):Eh(e);if(r!==e){var o=String(r),s=pd.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 tu=J1,Ph=tu.custom,kh=Oy(Ph)?Ph:null,cS=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 Dy(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Rh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Rh(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 nu(t)?"[Array]":"[Object]";var d=PS(s,r);if(typeof o>"u")o=[];else if(_y(o,t)>=0)return"[Circular]";function f(L,P,D){if(P&&(o=lS.call(o),o.push(P)),D){var N={depth:s.depth};return Qn(s,"quoteStyle")&&(N.quoteStyle=s.quoteStyle),e(L,N,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!Ih(t)){var h=vS(t),p=ji(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+bn.call(p,", ")+" }":"")}if(Oy(t)){var m=Mo?tr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):eu.call(t);return typeof t=="object"&&!Mo?bs(m):m}if(ES(t)){for(var y="<"+Sh.call(String(t.nodeName)),b=t.attributes||[],v=0;v<b.length;v++)y+=" "+b[v].name+"="+Ay(uS(b[v].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+Sh.call(String(t.nodeName))+">",y}if(nu(t)){if(t.length===0)return"[]";var g=ji(t,f);return d&&!RS(g)?"["+ru(g,d)+"]":"[ "+bn.call(g,", ")+" ]"}if(fS(t)){var T=ji(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Iy.call(t,"cause")?"{ ["+String(t)+"] "+bn.call(Th.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+bn.call(T,", ")+" }"}if(typeof t=="object"&&i){if(kh&&typeof t[kh]=="function"&&tu)return tu(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(bS(t)){var S=[];return bh&&bh.call(t,function(L,P){S.push(f(P,t,!0)+" => "+f(L,t))}),Ah("Map",ba.call(t),S,d)}if(SS(t)){var E=[];return xh&&xh.call(t,function(L){E.push(f(L,t))}),Ah("Set",xa.call(t),E,d)}if(xS(t))return Yl("WeakMap");if(TS(t))return Yl("WeakSet");if(wS(t))return Yl("WeakRef");if(mS(t))return bs(f(Number(t)));if(gS(t))return bs(f(Jc.call(t)));if(pS(t))return bs(rS.call(t));if(hS(t))return bs(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof lh<"u"&&t===lh)return"{ [object globalThis] }";if(!dS(t)&&!Ih(t)){var C=ji(t,f),k=Ch?Ch(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",A=!k&&Nt&&Object(t)===t&&Nt in t?pd.call(dr(t),8,-1):I?"Object":"",j=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",O=j+(A||I?"["+bn.call(Th.call([],A||[],I||[]),": ")+"] ":"");return C.length===0?O+"{}":d?O+"{"+ru(C,d)+"}":O+"{ "+bn.call(C,", ")+" }"}return String(t)};function Ay(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function uS(e){return tr.call(String(e),/"/g,"&quot;")}function nu(e){return dr(e)==="[object Array]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function dS(e){return dr(e)==="[object Date]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function Ih(e){return dr(e)==="[object RegExp]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function fS(e){return dr(e)==="[object Error]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function hS(e){return dr(e)==="[object String]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function mS(e){return dr(e)==="[object Number]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function pS(e){return dr(e)==="[object Boolean]"&&(!Nt||!(typeof e=="object"&&Nt in e))}function Oy(e){if(Mo)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!eu)return!1;try{return eu.call(e),!0}catch{}return!1}function gS(e){if(!e||typeof e!="object"||!Jc)return!1;try{return Jc.call(e),!0}catch{}return!1}var yS=Object.prototype.hasOwnProperty||function(e){return e in this};function Qn(e,t){return yS.call(e,t)}function dr(e){return oS.call(e)}function vS(e){if(e.name)return e.name;var t=iS.call(sS.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function _y(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 bS(e){if(!ba||!e||typeof e!="object")return!1;try{ba.call(e);try{xa.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function xS(e){if(!_s||!e||typeof e!="object")return!1;try{_s.call(e,_s);try{Ds.call(e,Ds)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function wS(e){if(!wh||!e||typeof e!="object")return!1;try{return wh.call(e),!0}catch{}return!1}function SS(e){if(!xa||!e||typeof e!="object")return!1;try{xa.call(e);try{ba.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function TS(e){if(!Ds||!e||typeof e!="object")return!1;try{Ds.call(e,Ds);try{_s.call(e,_s)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ES(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Dy(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Dy(pd.call(e,0,t.maxStringLength),t)+r}var o=tr.call(tr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,CS);return Ay(o,"single",t)}function CS(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":"")+aS.call(t.toString(16))}function bs(e){return"Object("+e+")"}function Yl(e){return e+" { ? }"}function Ah(e,t,n,r){var o=r?ru(n,r):bn.call(n,", ");return e+" ("+t+") {"+o+"}"}function RS(e){for(var t=0;t<e.length;t++)if(_y(e[t],`
2
- `)>=0)return!1;return!0}function PS(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 ru(e,t){if(e.length===0)return"";var n=`
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"),S=require("react/jsx-runtime"),mi=require("react-dom");function xy(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=xy(x),pi=xy(mi);function wy(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=wy(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=wy(e))&&(r&&(r+=" "),r+=t);return r}var ch=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,Sy=SyntaxError,gi=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},uh=typeof Symbol<"u"&&Symbol,l1=a1,c1=function(){return typeof uh!="function"||typeof Symbol!="function"||typeof uh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:l1()},Bl={__proto__:null,foo:{}},u1=Object,d1=function(){return{__proto__:Bl}.foo===Bl.foo&&!(Bl instanceof u1)},f1="Function.prototype.bind called on incompatible ",h1=Object.prototype.toString,m1=Math.max,p1="[object Function]",dh=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,dh(r,arguments));return Object(u)===u?u:this}return n.apply(t,dh(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=Sy,Co=gi,k1=i1,Ty=Function,Wl=function(e){try{return Ty('"use strict"; return ('+e+").constructor;")()}catch{}},Nr=Object.getOwnPropertyDescriptor;if(Nr)try{Nr({},"")}catch{Nr=null}var zl=function(){throw new Co},A1=Nr?function(){try{return arguments.callee,zl}catch{try{return Nr(arguments,"callee").get}catch{return zl}}}():zl,so=c1(),I1=d1(),wt=Object.getPrototypeOf||(I1?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%":Ty,"%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%":A1,"%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=Wl("async function () {}");else if(t==="%GeneratorFunction%")n=Wl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Wl("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},fh={__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"]},yi=fd,va=T1,D1=yi.call(Function.call,Array.prototype.concat),N1=yi.call(Function.apply,Array.prototype.splice),hh=yi.call(Function.call,String.prototype.replace),ba=yi.call(Function.call,String.prototype.slice),j1=yi.call(Function.call,RegExp.prototype.exec),L1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F1=/\\(\\)?/g,V1=function(t){var n=ba(t,0,1),r=ba(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 hh(t,L1,function(s,i,a,l){o[o.length]=a?hh(l,F1,"$1"):i||s}),o},$1=function(t,n){var r=t,o;if(va(fh,r)&&(o=fh[r],r="%"+o[0]+"%"),va(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=ba(f,0,1),p=ba(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+"%",va(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=va(a,f),a=a[f];d&&!l&&(jr[i]=a)}}return a},Ey={exports:{}},Hl,mh;function hd(){if(mh)return Hl;mh=1;var e=ts,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Hl=t,Hl}var B1=ts,sa=B1("%Object.getOwnPropertyDescriptor%",!0);if(sa)try{sa([],"length")}catch{sa=null}var Cy=sa,ph=hd(),W1=Sy,io=gi,gh=Cy,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=!!gh&&gh(t,n);if(ph)ph(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.")},Jc=hd(),Ry=function(){return!!Jc};Ry.hasArrayLengthDefineBug=function(){if(!Jc)return null;try{return Jc([],"length",{value:1}).length!==1}catch{return!0}};var H1=Ry,U1=ts,yh=z1,G1=H1(),vh=Cy,bh=gi,Y1=U1("%Math.floor%"),q1=function(t,n){if(typeof t!="function")throw new bh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Y1(n)!==n)throw new bh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&vh){var i=vh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(G1?yh(t,"length",n,!0,!0):yh(t,"length",n)),t};(function(e){var t=fd,n=ts,r=q1,o=gi,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})(Ey);var K1=Ey.exports,Py=ts,ky=K1,Z1=ky(Py("String.prototype.indexOf")),X1=function(t,n){var r=Py(t,!!n);return typeof r=="function"&&Z1(t,".prototype.")>-1?ky(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,Ul=Object.getOwnPropertyDescriptor&&md?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xa=md&&Ul&&typeof Ul.get=="function"?Ul.get:null,xh=md&&Map.prototype.forEach,pd=typeof Set=="function"&&Set.prototype,Gl=Object.getOwnPropertyDescriptor&&pd?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,wa=pd&&Gl&&typeof Gl.get=="function"?Gl.get:null,wh=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,Sh=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,Th=String.prototype.toLowerCase,Ay=RegExp.prototype.test,Eh=Array.prototype.concat,bn=Array.prototype.join,cS=Array.prototype.slice,Ch=Math.floor,eu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Yl=Object.getOwnPropertySymbols,tu=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,Iy=Object.prototype.propertyIsEnumerable,Rh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ph(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?-Ch(-e):Ch(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 nu=eS,kh=nu.custom,Ah=_y(kh)?kh: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 Dy(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Ph(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Ph(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 ru(t)?"[Array]":"[Object]";var d=kS(s,r);if(typeof o>"u")o=[];else if(My(o,t)>=0)return"[Circular]";function f(L,P,M){if(P&&(o=cS.call(o),o.push(P)),M){var N={depth:s.depth};return Qn(s,"quoteStyle")&&(N.quoteStyle=s.quoteStyle),e(L,N,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!Ih(t)){var h=bS(t),p=Li(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+bn.call(p,", ")+" }":"")}if(_y(t)){var m=No?tr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):tu.call(t);return typeof t=="object"&&!No?xs(m):m}if(CS(t)){for(var y="<"+Th.call(String(t.nodeName)),b=t.attributes||[],v=0;v<b.length;v++)y+=" "+b[v].name+"="+Oy(dS(b[v].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+Th.call(String(t.nodeName))+">",y}if(ru(t)){if(t.length===0)return"[]";var g=Li(t,f);return d&&!PS(g)?"["+ou(g,d)+"]":"[ "+bn.call(g,", ")+" ]"}if(hS(t)){var T=Li(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Iy.call(t,"cause")?"{ ["+String(t)+"] "+bn.call(Eh.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"&&nu)return nu(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(xS(t)){var w=[];return xh&&xh.call(t,function(L,P){w.push(f(P,t,!0)+" => "+f(L,t))}),Oh("Map",xa.call(t),w,d)}if(TS(t)){var E=[];return wh&&wh.call(t,function(L){E.push(f(L,t))}),Oh("Set",wa.call(t),E,d)}if(wS(t))return ql("WeakMap");if(ES(t))return ql("WeakSet");if(SS(t))return ql("WeakRef");if(pS(t))return xs(f(Number(t)));if(yS(t))return xs(f(eu.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 ch<"u"&&t===ch)return"{ [object globalThis] }";if(!fS(t)&&!Ih(t)){var C=Li(t,f),k=Rh?Rh(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",I=!k&&Nt&&Object(t)===t&&Nt in t?gd.call(dr(t),8,-1):A?"Object":"",j=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",O=j+(I||A?"["+bn.call(Eh.call([],I||[],A||[]),": ")+"] ":"");return C.length===0?O+"{}":d?O+"{"+ou(C,d)+"}":O+"{ "+bn.call(C,", ")+" }"}return String(t)};function Oy(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function dS(e){return tr.call(String(e),/"/g,"&quot;")}function ru(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 Ih(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 _y(e){if(No)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!tu)return!1;try{return tu.call(e),!0}catch{}return!1}function yS(e){if(!e||typeof e!="object"||!eu)return!1;try{return eu.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 My(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(!xa||!e||typeof e!="object")return!1;try{xa.call(e);try{wa.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(!Sh||!e||typeof e!="object")return!1;try{return Sh.call(e),!0}catch{}return!1}function TS(e){if(!wa||!e||typeof e!="object")return!1;try{wa.call(e);try{xa.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 Dy(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Dy(gd.call(e,0,t.maxStringLength),t)+r}var o=tr.call(tr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,RS);return Oy(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 ql(e){return e+" { ? }"}function Oh(e,t,n,r){var o=r?ou(n,r):bn.call(n,", ");return e+" ("+t+") {"+o+"}"}function PS(e){for(var t=0;t<e.length;t++)if(My(e[t],`
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 ou(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 ji(e,t){var n=nu(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 Gl=="function"?Gl(e):[],i;if(Mo){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||Mo&&i["$"+l]instanceof Symbol||(ky.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Gl=="function")for(var c=0;c<s.length;c++)Iy.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var My=es,ts=Z1,kS=cS,IS=pi,Li=My("%WeakMap%",!0),Fi=My("%Map%",!0),AS=ts("WeakMap.prototype.get",!0),OS=ts("WeakMap.prototype.set",!0),_S=ts("WeakMap.prototype.has",!0),DS=ts("Map.prototype.get",!0),MS=ts("Map.prototype.set",!0),NS=ts("Map.prototype.has",!0),gd=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},jS=function(e,t){var n=gd(e,t);return n&&n.value},LS=function(e,t,n){var r=gd(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},FS=function(e,t){return!!gd(e,t)},VS=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new IS("Side channel does not contain "+kS(s))},get:function(s){if(Li&&s&&(typeof s=="object"||typeof s=="function")){if(t)return AS(t,s)}else if(Fi){if(n)return DS(n,s)}else if(r)return jS(r,s)},has:function(s){if(Li&&s&&(typeof s=="object"||typeof s=="function")){if(t)return _S(t,s)}else if(Fi){if(n)return NS(n,s)}else if(r)return FS(r,s);return!1},set:function(s,i){Li&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Li),OS(t,s,i)):Fi?(n||(n=new Fi),MS(n,s,i)):(r||(r={key:{},next:null}),LS(r,s,i))}};return o},Oh=e=>Array.isArray(e),ql=e=>e===void 0,Kl=e=>e===null,$S=Function.bind.call(Function.call,Object.prototype.toString),BS=e=>!!e&&$S(e)==="[object Error]"||e instanceof Error,Ny=(e,t)=>e instanceof t,WS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},zS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Ny(e,Date),Pt={array:Oh,date:zS,empty:e=>Kl(e)||ql(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Ny,isError:BS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Kl(e)||ql(e),null:Kl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Oh(e)&&typeof e=="object",primitive:WS,string:e=>typeof e=="string",undefined:ql},HS=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 yd="-";function US(e){const t=YS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(yd);return a[0]===""&&a.length!==1&&a.shift(),jy(a,t)||GS(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function jy(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?jy(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(yd);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const _h=/^\[(.+)\]$/;function GS(e){if(_h.test(e)){const t=_h.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function YS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return KS(Object.entries(e.classGroups),n).forEach(([s,i])=>{ou(i,r,s,t)}),r}function ou(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Dh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(qS(o)){ou(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{ou(i,Dh(t,s),n,r)})})}function Dh(e,t){let n=e;return t.split(yd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function qS(e){return e.isThemeGetter}function KS(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 ZS(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 Ly="!";function XS(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let b=a[y];if(c===0){if(b===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(b==="/"){d=y;continue}}b==="["?c++:b==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Ly),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 QS(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 JS(e){return{cache:ZS(e.cacheSize),parseClassName:XS(e),...US(e)}}const eT=/\s+/;function tT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(eT).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=QS(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Ly: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 nT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Fy(t))&&(r&&(r+=" "),r+=n);return r}function Fy(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Fy(e[r]))&&(n&&(n+=" "),n+=t);return n}function rT(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=JS(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=tT(l,n);return o(l,u),u}return function(){return s(nT.apply(null,arguments))}}function Ke(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Vy=/^\[(?:([a-z-]+):)?(.+)\]$/i,oT=/^\d+\/\d+$/,sT=new Set(["px","full","screen"]),iT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Ln(e){return Or(e)||sT.has(e)||oT.test(e)}function qn(e){return ns(e,"length",vT)}function Or(e){return!!e&&!Number.isNaN(Number(e))}function Vi(e){return ns(e,"number",Or)}function xs(e){return!!e&&Number.isInteger(Number(e))}function dT(e){return e.endsWith("%")&&Or(e.slice(0,-1))}function Se(e){return Vy.test(e)}function Kn(e){return iT.test(e)}const fT=new Set(["length","size","percentage"]);function hT(e){return ns(e,fT,$y)}function mT(e){return ns(e,"position",$y)}const pT=new Set(["image","url"]);function gT(e){return ns(e,pT,xT)}function yT(e){return ns(e,"",bT)}function ws(){return!0}function ns(e,t,n){const r=Vy.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function vT(e){return aT.test(e)&&!lT.test(e)}function $y(){return!1}function bT(e){return cT.test(e)}function xT(e){return uT.test(e)}function wT(){const e=Ke("colors"),t=Ke("spacing"),n=Ke("blur"),r=Ke("brightness"),o=Ke("borderColor"),s=Ke("borderRadius"),i=Ke("borderSpacing"),a=Ke("borderWidth"),l=Ke("contrast"),c=Ke("grayscale"),u=Ke("hueRotate"),d=Ke("invert"),f=Ke("gap"),h=Ke("gradientColorStops"),p=Ke("gradientColorStopPositions"),m=Ke("inset"),y=Ke("margin"),b=Ke("opacity"),v=Ke("padding"),g=Ke("saturate"),T=Ke("scale"),S=Ke("sepia"),E=Ke("skew"),C=Ke("space"),k=Ke("translate"),I=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",Se,t],O=()=>[Se,t],L=()=>["",Ln,qn],P=()=>["auto",Or,Se],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],M=()=>["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",Se],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Or,Vi],Z=()=>[Or,Se];return{cacheSize:500,separator:":",theme:{colors:[ws],spacing:[Ln,qn],blur:["none","",Kn,Se],brightness:$(),borderColor:[e],borderRadius:["none","","full",Kn,Se],borderSpacing:O(),borderWidth:L(),contrast:$(),grayscale:z(),hueRotate:Z(),invert:z(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[dT,qn],inset:j(),margin:j(),opacity:$(),padding:O(),saturate:$(),scale:$(),sepia:z(),skew:Z(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],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:[...D(),Se]}],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",xs,Se]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",xs,Se]}],"grid-cols":[{"grid-cols":[ws]}],"col-start-end":[{col:["auto",{span:["full",xs,Se]},Se]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[ws]}],"row-start-end":[{row:["auto",{span:[xs,Se]},Se]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...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:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,t]}],"min-w":[{"min-w":[Se,t,"min","max","fit"]}],"max-w":[{"max-w":[Se,t,"none","full","min","max","fit","prose",{screen:[Kn]},Kn]}],h:[{h:[Se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kn,qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vi]}],"font-family":[{font:[ws]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Se]}],"line-clamp":[{"line-clamp":["none",Or,Vi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ln,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ln,qn]}],"underline-offset":[{"underline-offset":["auto",Ln,Se]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),mT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gT]}],"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:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:N()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[Ln,Se]}],"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,yT]}],"shadow-color":[{shadow:[ws]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...M(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kn,Se]}],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",Se]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[xs,Se]}],"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",Se]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",Se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ln,qn,Vi]}],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 ST=rT(wT),vd=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},TT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),ET=e=>Pt.function(e),$e=(...e)=>ST(Qw(e)),bd=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},yi=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"),vi=()=>{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])}`},Mh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Nh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},xd=(e,t)=>{const n=Mh(t,Nh.basic,e)||Mh(t,Nh.extend,e);return n===void 0||n===e?void 0:n},wa=()=>typeof window>"u",su=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),By=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n};function Wy(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=Wy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function CT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Wy(e))&&(r&&(r+=" "),r+=t);return r}const jh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Lh=CT,rs=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Lh(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=jh(u)||jh(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,d,f]:c},[]);return Lh(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},os=x.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return w.jsx(s,{ref:o,...r,children:n})}),RT=rs("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary text-primary-foreground",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),No=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(os,{...l,ref:c,type:s,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:$e(RT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),zy=e=>{const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t};function PT(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 kT=({children:e,...t})=>{const n=zy(t.onIntersection),r=x.useRef(null),[o,s]=x.useState(()=>r.current===null?!1:PT(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})},IT=rs("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),AT=rs("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),wd=x.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return w.jsxs(os,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:$e(AT({size:i,theme:s}),t),children:[n?w.jsx("span",{className:IT({theme:n})}):null,r,a.children]})}),Gs=x.createContext({});function hn(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const fl=x.createContext(null),jo=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class OT 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 _T({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(jo);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(`
4
+ `+t.prev}function Li(e,t){var n=ru(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 Yl=="function"?Yl(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 Yl=="function")for(var c=0;c<s.length;c++)Iy.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Ny=ts,ns=X1,AS=uS,IS=gi,Fi=Ny("%WeakMap%",!0),Vi=Ny("%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 IS("Side channel does not contain "+AS(s))},get:function(s){if(Fi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return OS(t,s)}else if(Vi){if(n)return DS(n,s)}else if(r)return LS(r,s)},has:function(s){if(Fi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return MS(t,s)}else if(Vi){if(n)return jS(n,s)}else if(r)return VS(r,s);return!1},set:function(s,i){Fi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Fi),_S(t,s,i)):Vi?(n||(n=new Vi),NS(n,s,i)):(r||(r={key:{},next:null}),FS(r,s,i))}};return o},_h=e=>Array.isArray(e),Kl=e=>e===void 0,Zl=e=>e===null,BS=Function.bind.call(Function.call,Object.prototype.toString),WS=e=>!!e&&BS(e)==="[object Error]"||e instanceof Error,jy=(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]"&&jy(e,Date),Pt={array:_h,date:HS,empty:e=>Zl(e)||Kl(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:jy,isError:WS,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Zl(e)||Kl(e),null:Zl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!_h(e)&&typeof e=="object",primitive:zS,string:e=>typeof e=="string",undefined:Kl},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(),Ly(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 Ly(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ly(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 Mh=/^\[(.+)\]$/;function YS(e){if(Mh.test(e)){const t=Mh.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])=>{su(i,r,s,t)}),r}function su(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Dh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(KS(o)){su(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{su(i,Dh(t,s),n,r)})})}function Dh(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 Fy="!";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 y=0;y<a.length;y++){let b=a[y];if(c===0){if(b===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(b==="/"){d=y;continue}}b==="["?c++:b==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Fy),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+Fy: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=Vy(t))&&(r&&(r+=" "),r+=n);return r}function Vy(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Vy(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 $y=/^\[(?:([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 $i(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 $y.test(e)}function Kn(e){return aT.test(e)}const hT=new Set(["length","size","percentage"]);function mT(e){return rs(e,hT,By)}function pT(e){return rs(e,"position",By)}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=$y.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 By(){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"),y=Ze("margin"),b=Ze("opacity"),v=Ze("padding"),g=Ze("saturate"),T=Ze("scale"),w=Ze("sepia"),E=Ze("skew"),C=Ze("space"),k=Ze("translate"),A=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],j=()=>["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"],N=()=>["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,$i],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:j(),margin:j(),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:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ws,we]}],basis:[{basis:j()}],"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:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",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",$i]}],"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,$i]}],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:[...N(),"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:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:N()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[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:[w]}],"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":[w]}],"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,$i]}],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})},vi=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"),bi=()=>{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])}`},Nh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),jh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},wd=(e,t)=>{const n=Nh(t,jh.basic,e)||Nh(t,jh.extend,e);return n===void 0||n===e?void 0:n},Sa=()=>typeof window>"u",iu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Wy=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n};function zy(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=zy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function RT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=zy(e))&&(r&&(r+=" "),r+=t);return r}const Lh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Fh=RT,os=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Fh(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=Lh(u)||Lh(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,d,f]:c},[]);return Fh(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},ss=x.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return S.jsx(s,{ref:o,...r,children:n})}),PT=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 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(PT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),Hy=e=>{const t=x.useRef(e);return x.useEffect(()=>{t.current=e},[e]),t};function kT(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 AT=({children:e,...t})=>{const n=Hy(t.onIntersection),r=x.useRef(null),[o,s]=x.useState(()=>r.current===null?!1:kT(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()},[]),S.jsx("div",{...t,ref:r,children:o?e:null})},IT=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"}}}),OT=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"}}),Sd=x.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(OT({size:i,theme:s}),t),children:[n?S.jsx("span",{className:IT({theme:n})}):null,r,a.children]})}),Ys=x.createContext({});function hn(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const hl=x.createContext(null),Lo=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class _T 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 MT({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,132 +9,132 @@
9
9
  ${f}px !important;
10
10
  top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(h)}},[t]),w.jsx(OT,{isPresent:t,childRef:o,sizeRef:s,children:R.cloneElement(e,{ref:o})})}const DT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=hn(MT),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(_T,{isPresent:n,anchorX:a,children:e})),w.jsx(fl.Provider,{value:d,children:e})};function MT(){return new Map}function Hy(e=!0){const t=x.useContext(fl);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 $i=e=>e.key||"";function Fh(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const Sd=typeof window<"u",hl=Sd?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]=Hy(i),u=x.useMemo(()=>Fh(e),[e]),d=i&&!l?[]:u.map($i),f=x.useRef(!0),h=x.useRef(u),p=hn(()=>new Map),[m,y]=x.useState(u),[b,v]=x.useState(u);hl(()=>{f.current=!1,h.current=u;for(let S=0;S<b.length;S++){const E=$i(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=$i(C);d.includes(k)||(S.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(S=g),v(Fh(S)),y(u),null}process.env.NODE_ENV!=="production"&&s==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=x.useContext(Gs);return w.jsx(w.Fragment,{children:b.map(S=>{const E=$i(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(),v(h.current),i&&(c==null||c()),r&&r())};return w.jsx(DT,{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)})})},NT=x.createContext(null);function jT(){const e=x.useRef(!1);return hl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Ht=e=>e;let ss=Ht,on=Ht;process.env.NODE_ENV!=="production"&&(ss=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},on=(e,t)=>{if(!e)throw new Error(t)});const LT={skipAnimations:!1,useManualTiming:!1},Bi=["read","resolveKeyframes","update","preRender","render","postRender"],Vh={value:null,addProjectionMetrics:null};function FT(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&&Vh.value&&Vh.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const VT=40;function Uy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Bi.reduce((b,v)=>(b[v]=FT(s,t?v:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,VT),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:Bi.reduce((b,v)=>{const g=i[v];return b[v]=(T,S=!1,E=!1)=>(n||p(),g.schedule(T,S,E)),b},{}),cancel:b=>{for(let v=0;v<Bi.length;v++)i[Bi[v]].cancel(b)},state:o,steps:i}}const{schedule:Ue,cancel:Bn,state:Rt,steps:Zl}=Uy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ht,!0);function $T(){const e=jT(),[t,n]=x.useState(0),r=x.useCallback(()=>{e.current&&n(t+1)},[t]);return[x.useCallback(()=>Ue.postRender(r),[r]),t]}const BT=e=>!e.isLayoutDirty&&e.willUpdate(!1);function $h(){const e=new Set,t=new WeakMap,n=()=>e.forEach(BT);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 Gy=e=>e===!0,WT=e=>Gy(e===!0)||e==="id",zT=({children:e,id:t,inherit:n=!0})=>{const r=x.useContext(Gs),o=x.useContext(NT),[s,i]=$T(),a=x.useRef(null),l=r.id||o;a.current===null&&(WT(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Gy(n)&&r.group||$h()});const c=x.useMemo(()=>({...a.current,forceRender:s}),[i]);return w.jsx(Gs.Provider,{value:c,children:e})},Yy=x.createContext({strict:!1}),Bh={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"]},Lo={};for(const e in Bh)Lo[e]={isEnabled:t=>Bh[e].some(n=>!!t[n])};function HT(e){for(const t in e)Lo[t]={...Lo[t],...e[t]}}const UT=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 Sa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||UT.has(e)}let qy=e=>!Sa(e);function Ky(e){e&&(qy=t=>t.startsWith("on")?!Sa(t):e(t))}try{Ky(require("@emotion/is-prop-valid").default)}catch{}function GT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(qy(o)||n===!0&&Sa(o)||!t&&!Sa(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function YT({children:e,isValidProp:t,...n}){t&&Ky(t),n={...x.useContext(jo),...n},n.isStatic=hn(()=>n.isStatic);const r=x.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(jo.Provider,{value:r,children:e})}const Wh=new Set;function ml(e,t,n){e||Wh.has(t)||(console.warn(t),Wh.add(t))}function qT(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&ml(!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 pl=x.createContext({});function gl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ys(e){return typeof e=="string"||Array.isArray(e)}const Td=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ed=["initial",...Td];function yl(e){return gl(e.animate)||Ed.some(t=>Ys(e[t]))}function Zy(e){return!!(yl(e)||e.variants)}function KT(e,t){if(yl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ys(n)?n:void 0,animate:Ys(r)?r:void 0}}return e.inherit!==!1?t:{}}function ZT(e){const{initial:t,animate:n}=KT(e,x.useContext(pl));return x.useMemo(()=>({initial:t,animate:n}),[zh(t),zh(n)])}function zh(e){return Array.isArray(e)?e.join(" "):e}const XT=Symbol.for("motionComponentSymbol");function go(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function QT(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):go(n)&&(n.current=r))},[t])}const Cd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),JT="framerAppearId",Xy="data-"+Cd(JT),{schedule:Rd,cancel:v$}=Uy(queueMicrotask,!1),Qy=x.createContext({});function eE(e,t,n,r,o){var s,i;const{visualElement:a}=x.useContext(pl),l=x.useContext(Yy),c=x.useContext(fl),u=x.useContext(jo).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(Qy);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&tE(d.current,n,o,h);const p=x.useRef(!1);x.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[Xy],y=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 hl(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Rd.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function tE(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:Jy(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&go(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Jy(e){if(e)return e.options.allowProjection!==!1?e.projection:Jy(e.parent)}function nE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&HT(e);function a(c,u){let d;const f={...x.useContext(jo),...c,layoutId:rE(c)},{isStatic:h}=f,p=ZT(c),m=r(c,h);if(!h&&Sd){oE(f,e);const y=sE(f);d=y.MeasureLayout,p.visualElement=eE(o,m,f,t,y.ProjectionNode)}return w.jsxs(pl.Provider,{value:p,children:[d&&p.visualElement?w.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,QT(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[XT]=o,l}function rE({layoutId:e}){const t=x.useContext(Gs).id;return t&&e!==void 0?t+"-"+e:e}function oE(e,t){const n=x.useContext(Yy).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?ss(!1,r):on(!1,r)}}function sE(e){const{drag:t,layout:n}=Lo;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 ev=e=>t=>typeof t=="string"&&t.startsWith(e),Pd=ev("--"),iE=ev("var(--"),kd=e=>iE(e)?aE.test(e.split("/*")[0].trim()):!1,aE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,qs={};function lE(e){for(const t in e)qs[t]=e[t],Pd(t)&&(qs[t].isCSSVariable=!0)}const is=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qr=new Set(is);function tv(e,{layout:t,layoutId:n}){return qr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qs[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),nv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wn=(e,t,n)=>n>t?t:n<e?e:n,as={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ks={...as,transform:e=>Wn(0,1,e)},Wi={...as,default:1},bi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xn=bi("deg"),Pn=bi("%"),ge=bi("px"),cE=bi("vh"),uE=bi("vw"),Hh={...Pn,parse:e=>Pn.parse(e)/100,transform:e=>Pn.transform(e*100)},dE={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,backgroundPositionX:ge,backgroundPositionY:ge},fE={rotate:Xn,rotateX:Xn,rotateY:Xn,rotateZ:Xn,scale:Wi,scaleX:Wi,scaleY:Wi,scaleZ:Wi,skew:Xn,skewX:Xn,skewY:Xn,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:Ks,originX:Hh,originY:Hh,originZ:ge},Uh={...as,transform:Math.round},Id={...dE,...fE,zIndex:Uh,size:ge,fillOpacity:Ks,strokeOpacity:Ks,numOctaves:Uh},hE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mE=is.length;function pE(e,t,n){let r="",o=!0;for(let s=0;s<mE;s++){const i=is[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=nv(a,Id[i]);if(!l){o=!1;const u=hE[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Ad(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(Pd(l)){o[l]=c;continue}else{const u=nv(c,Id[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=pE(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 Od=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rv(e,t,n){for(const r in t)!xt(t[r])&&!tv(r,n)&&(e[r]=t[r])}function gE({transformTemplate:e},t){return x.useMemo(()=>{const n=Od();return Ad(n,t,e),Object.assign({},n.vars,n.style)},[t])}function yE(e,t){const n=e.style||{},r={};return rv(r,n,e),Object.assign(r,gE(e,t)),r}function vE(e,t){const n={},r=yE(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 bE=["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 _d(e){return typeof e!="string"||e.includes("-")?!1:!!(bE.indexOf(e)>-1||/[A-Z]/u.test(e))}const xE={offset:"stroke-dashoffset",array:"stroke-dasharray"},wE={offset:"strokeDashoffset",array:"strokeDasharray"};function SE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?xE:wE;e[s.offset]=ge.transform(-r);const i=ge.transform(t),a=ge.transform(n);e[s.array]=`${i} ${a}`}function Gh(e,t,n){return typeof e=="string"?e:ge.transform(t+n*e)}function TE(e,t,n){const r=Gh(t,e.x,e.width),o=Gh(n,e.y,e.height);return`${r} ${o}`}function Dd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ad(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=TE(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&&SE(f,i,a,l,!1)}const ov=()=>({...Od(),attrs:{}}),Md=e=>typeof e=="string"&&e.toLowerCase()==="svg";function EE(e,t,n,r){const o=x.useMemo(()=>{const s=ov();return Dd(s,t,Md(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};rv(s,e.style,e),o.style={...s,...o.style}}return o}function CE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(_d(n)?EE:vE)(r,s,i,n),c=GT(r,typeof n=="string",e),u=n!==x.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=x.useMemo(()=>xt(d)?d.get():d,[d]);return x.createElement(n,{...u,children:f})}}function Yh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nd(e,t,n,r){if(typeof t=="function"){const[o,s]=Yh(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]=Yh(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const iu=e=>Array.isArray(e),RE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),PE=e=>iu(e)?e[e.length-1]||0:e;function sa(e){const t=xt(e)?e.get():e;return RE(t)?t.toValue():t}function kE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:IE(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const sv=e=>(t,n)=>{const r=x.useContext(pl),o=x.useContext(fl),s=()=>kE(e,t,r,o);return n?s():hn(s)};function IE(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=sa(s[f]);let{initial:i,animate:a}=e;const l=yl(e),c=Zy(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"&&!gl(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Nd(e,f[h]);if(p){const{transitionEnd:m,transition:y,...b}=p;for(const v in b){let g=b[v];if(Array.isArray(g)){const T=u?g.length-1:0;g=g[T]}g!==null&&(o[v]=g)}for(const v in m)o[v]=m[v]}}}return o}function jd(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(xt(o[i])||t.style&&xt(t.style[i])||tv(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 AE={useVisualState:sv({scrapeMotionValuesFromProps:jd,createRenderState:Od})};function iv(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 av(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 lv=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 cv(e,t,n,r){av(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(lv.has(o)?o:Cd(o),t.attrs[o])}function uv(e,t,n){const r=jd(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const s=is.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const qh=["x","y","width","height","cx","cy","r"],OE={useVisualState:sv({scrapeMotionValuesFromProps:uv,createRenderState:ov,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<qh.length;a++){const l=qh[a];e[l]!==t[l]&&(i=!0)}i&&Ue.read(()=>{iv(n,r),Ue.render(()=>{Dd(r,o,Md(n.tagName),e.transformTemplate),cv(n,r)})})}})};function _E(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={..._d(r)?OE:AE,preloadedFeatures:e,useRender:CE(o),createVisualElement:t,Component:r};return nE(i)}}function Zs(e,t,n){const r=e.getProps();return Nd(r,t,n!==void 0?n:r.custom,e)}function Ld(e,t){return e?e[t]||e.default||e:void 0}const dv=new Set(["width","height","top","left","right","bottom",...is]);let ia;function DE(){ia=void 0}const kn={now:()=>(ia===void 0&&kn.set(Rt.isProcessing||LT.useManualTiming?Rt.timestamp:performance.now()),ia),set:e=>{ia=e,queueMicrotask(DE)}};function Fd(e,t){e.indexOf(t)===-1&&e.push(t)}function vl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function ME([...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 Vd{constructor(){this.subscriptions=[]}add(t){return Fd(this.subscriptions,t),()=>vl(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 fv(e,t){return t?e*(1e3/t):0}const Kh=30,NE=e=>!isNaN(parseFloat(e)),Ms={current:void 0};class jE{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=NE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ml(!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 Vd);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 Ms.current&&Ms.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Kh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kh);return fv(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 Fo(e,t){return new jE(e,t)}function LE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fo(n))}function FE(e,t){const n=Zs(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=PE(s[i]);LE(e,i,a)}}function VE(e){return!!(xt(e)&&e.add)}function au(e,t){const n=e.getValue("willChange");if(VE(n))return n.add(t)}function hv(e){return e.props[Xy]}function $d(e){let t;return()=>(t===void 0&&(t=e()),t)}const $E=$d(()=>window.ScrollTimeline!==void 0);class BE{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($E()&&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 mv extends BE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const un=e=>e*1e3,In=e=>e/1e3;function bl(e){return typeof e=="function"}function Zh(e,t){e.timeline=t,e.onfinish=null}const Bd=e=>Array.isArray(e)&&typeof e[0]=="number",WE={linearEasing:void 0};function zE(e,t){const n=$d(e);return()=>{var r;return(r=WE[t])!==null&&r!==void 0?r:n()}}const Ta=zE(()=>{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},pv=(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 gv(e){return!!(typeof e=="function"&&Ta()||!e||typeof e=="string"&&(e in lu||Ta())||Bd(e)||Array.isArray(e)&&e.every(gv))}const Rs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rs([0,.65,.55,1]),circOut:Rs([.55,0,1,.45]),backIn:Rs([.31,.01,.66,-.59]),backOut:Rs([.33,1.53,.69,.99])};function yv(e,t){if(e)return typeof e=="function"&&Ta()?pv(e,t):Bd(e)?Rs(e):Array.isArray(e)?e.map(n=>yv(n,t)||lu.easeOut):lu[e]}const vv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,HE=1e-7,UE=12;function GE(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=vv(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>HE&&++a<UE);return i}function xi(e,t,n,r){if(e===t&&n===r)return Ht;const o=s=>GE(s,0,1,e,n);return s=>s===0||s===1?s:vv(o(s),t,r)}const bv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xv=e=>t=>1-e(1-t),wv=xi(.33,1.53,.69,.99),Wd=xv(wv),Sv=bv(Wd),Tv=e=>(e*=2)<1?.5*Wd(e):.5*(2-Math.pow(2,-10*(e-1))),zd=e=>1-Math.sin(Math.acos(e)),Ev=xv(zd),Cv=bv(zd),Rv=e=>/^0[^.\s]+$/u.test(e);function YE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Rv(e):!0}const Ns=e=>Math.round(e*1e5)/1e5,Hd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qE(e){return e==null}const KE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ud=(e,t)=>n=>!!(typeof n=="string"&&KE.test(n)&&n.startsWith(e)||t&&!qE(n)&&Object.prototype.hasOwnProperty.call(n,t)),Pv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(Hd);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},ZE=e=>Wn(0,255,e),Xl={...as,transform:e=>Math.round(ZE(e))},_r={test:Ud("rgb","red"),parse:Pv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Xl.transform(e)+", "+Xl.transform(t)+", "+Xl.transform(n)+", "+Ns(Ks.transform(r))+")"};function XE(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 cu={test:Ud("#"),parse:XE,transform:_r.transform},yo={test:Ud("hsl","hue"),parse:Pv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pn.transform(Ns(t))+", "+Pn.transform(Ns(n))+", "+Ns(Ks.transform(r))+")"},Ot={test:e=>_r.test(e)||cu.test(e)||yo.test(e),parse:e=>_r.test(e)?_r.parse(e):yo.test(e)?yo.parse(e):cu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_r.transform(e):yo.transform(e)},QE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function JE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Hd))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(QE))===null||n===void 0?void 0:n.length)||0)>0}const kv="number",Iv="color",eC="var",tC="var(",Xh="${}",nC=/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 Xs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(nC,l=>(Ot.test(l)?(r.color.push(s),o.push(Iv),n.push(Ot.parse(l))):l.startsWith(tC)?(r.var.push(s),o.push(eC),n.push(l)):(r.number.push(s),o.push(kv),n.push(parseFloat(l))),++s,Xh)).split(Xh);return{values:n,split:a,indexes:r,types:o}}function Av(e){return Xs(e).values}function Ov(e){const{split:t,types:n}=Xs(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===kv?s+=Ns(o[i]):a===Iv?s+=Ot.transform(o[i]):s+=o[i]}return s}}const rC=e=>typeof e=="number"?0:e;function oC(e){const t=Av(e);return Ov(e)(t.map(rC))}const sr={test:JE,parse:Av,createTransformer:Ov,getAnimatableNone:oC},sC=new Set(["brightness","contrast","saturate","opacity"]);function iC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Hd)||[];if(!r)return e;const o=n.replace(r,"");let s=sC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const aC=/\b([a-z-]*)\(.*?\)/gu,uu={...sr,getAnimatableNone:e=>{const t=e.match(aC);return t?t.map(iC).join(" "):e}},lC={...Id,color:Ot,backgroundColor:Ot,outlineColor:Ot,fill:Ot,stroke:Ot,borderColor:Ot,borderTopColor:Ot,borderRightColor:Ot,borderBottomColor:Ot,borderLeftColor:Ot,filter:uu,WebkitFilter:uu},Gd=e=>lC[e];function _v(e,t){let n=Gd(e);return n!==uu&&(n=sr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const cC=new Set(["auto","none","0"]);function uC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!cC.has(s)&&Xs(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=_v(n,o)}const Qh=e=>e===as||e===ge,Jh=(e,t)=>parseFloat(e.split(", ")[t]),em=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Jh(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Jh(s[1],e):0}},dC=new Set(["x","y","z"]),fC=is.filter(e=>!dC.has(e));function hC(e){const t=[];return fC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Vo={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:em(4,13),y:em(5,14)};Vo.translateX=Vo.x;Vo.translateY=Vo.y;const Lr=new Set;let du=!1,fu=!1;function Dv(){if(fu){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=hC(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)})}fu=!1,du=!1,Lr.forEach(e=>e.complete()),Lr.clear()}function Mv(){Lr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(fu=!0)})}function mC(){Mv(),Dv()}class Yd{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),du||(du=!0,Ue.read(Mv),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 Nv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),pC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gC(e){const t=pC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const yC=4;function jv(e,t,n=1){on(n<=yC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=gC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Nv(i)?parseFloat(i):i}return kd(o)?jv(o,t,n+1):o}const Lv=e=>t=>t.test(e),vC={test:e=>e==="auto",parse:e=>e},Fv=[as,ge,Pn,Xn,uE,cE,vC],tm=e=>Fv.find(Lv(e));class Vv extends Yd{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(),kd(c))){const u=jv(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!dv.has(r)||t.length!==2)return;const[o,s]=t,i=tm(o),a=tm(s);if(i!==a)if(Qh(i)&&Qh(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++)YE(t[o])&&r.push(o);r.length&&uC(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=Vo[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]=Vo[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 nm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sr.test(e)||e==="0")&&!e.startsWith("url("));function bC(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 xC(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=nm(o,t),a=nm(s,t);return ss(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:bC(e)||(n==="spring"||bl(n))&&r}const wC=e=>e!==null;function xl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(wC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const SC=40;class $v{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>SC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&mC(),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&&!xC(t,r,o,s))if(i)this.options.duration=0;else{l&&l(xl(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 Ea=2e4;function qd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ea;)t+=n,r=e.next(t);return t>=Ea?1/0:t}const Xe=(e,t,n)=>e+(t-e)*n;function Ql(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 TC({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=Ql(l,a,e+1/3),s=Ql(l,a,e),i=Ql(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Ca(e,t){return n=>n>0?t:e}const Jl=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},EC=[cu,_r,yo],CC=e=>EC.find(t=>t.test(e));function rm(e){const t=CC(e);if(ss(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===yo&&(n=TC(n)),n}const om=(e,t)=>{const n=rm(e),r=rm(t);if(!n||!r)return Ca(e,t);const o={...n};return s=>(o.red=Jl(n.red,r.red,s),o.green=Jl(n.green,r.green,s),o.blue=Jl(n.blue,r.blue,s),o.alpha=Xe(n.alpha,r.alpha,s),_r.transform(o))},RC=(e,t)=>n=>t(e(n)),wi=(...e)=>e.reduce(RC),hu=new Set(["none","hidden"]);function PC(e,t){return hu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kC(e,t){return n=>Xe(e,t,n)}function Kd(e){return typeof e=="number"?kC:typeof e=="string"?kd(e)?Ca:Ot.test(e)?om:OC:Array.isArray(e)?Bv:typeof e=="object"?Ot.test(e)?om:IC:Ca}function Bv(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Kd(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function IC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Kd(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function AC(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 OC=(e,t)=>{const n=sr.createTransformer(t),r=Xs(e),o=Xs(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?hu.has(e)&&!o.values.length||hu.has(t)&&!r.values.length?PC(e,t):wi(Bv(AC(r,o),o.values),n):(ss(!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.`),Ca(e,t))};function Wv(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Xe(e,t,n):Kd(e)(e,t)}const _C=5;function zv(e,t,n){const r=Math.max(t-_C,0);return fv(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},ec=.001;function DC({duration:e=rt.duration,bounce:t=rt.bounce,velocity:n=rt.velocity,mass:r=rt.mass}){let o,s;ss(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=mu(c,i),p=Math.exp(-d);return ec-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=mu(Math.pow(c,2),i);return(-o(c)+ec>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-ec+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=NC(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 MC=12;function NC(e,t,n){let r=n;for(let o=1;o<MC;o++)r=r-e(r)/t(r);return r}function mu(e,t){return e*Math.sqrt(1-t*t)}const jC=["duration","bounce"],LC=["stiffness","damping","mass"];function sm(e,t){return t.some(n=>e[n]!==void 0)}function FC(e){let t={velocity:rt.velocity,stiffness:rt.stiffness,damping:rt.damping,mass:rt.mass,isResolvedFromDuration:!1,...e};if(!sm(e,LC)&&sm(e,jC))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=DC(e);t={...t,...n,mass:rt.mass},t.isResolvedFromDuration=!0}return t}function Zd(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}=FC({...n,velocity:-In(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),y=i-s,b=In(Math.sqrt(l/u)),v=Math.abs(y)<5;r||(r=v?rt.restSpeed.granular:rt.restSpeed.default),o||(o=v?rt.restDelta.granular:rt.restDelta.default);let g;if(m<1){const S=mu(b,m);g=E=>{const C=Math.exp(-m*b*E);return i-C*((p+m*b*y)/S*Math.sin(S*E)+y*Math.cos(S*E))}}else if(m===1)g=S=>i-Math.exp(-b*S)*(y+(p+b*y)*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*y)*Math.sinh(k)+S*y*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):zv(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(qd(T),Ea),E=pv(C=>T.next(S*C).value,S,30);return S+"ms "+E}};return T}function im({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 y=d+m,b=i===void 0?y:i(y);b!==y&&(m=b-d);const v=k=>-m*Math.exp(-k/r),g=k=>b+v(k),T=k=>{const I=v(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=Zd({keyframes:[f.value,p(f.value)],velocity:zv(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 VC=xi(.42,0,1,1),$C=xi(0,0,.58,1),Hv=xi(.42,0,.58,1),Uv=e=>Array.isArray(e)&&typeof e[0]!="number",am={linear:Ht,easeIn:VC,easeInOut:Hv,easeOut:$C,circIn:zd,circInOut:Cv,circOut:Ev,backIn:Wd,backInOut:Sv,backOut:wv,anticipate:Tv},pu=e=>{if(Bd(e)){on(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return xi(t,n,r,o)}else if(typeof e=="string")return on(am[e]!==void 0,`Invalid easing type '${e}'`),am[e];return e};function BC(e,t,n){const r=[],o=n||Wv,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=wi(l,a)}r.push(a)}return r}function Gv(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=BC(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 Yv(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Vr(0,t,r);e.push(Xe(n,1,o))}}function qv(e){const t=[0];return Yv(t,e.length-1),t}function WC(e,t){return e.map(n=>n*t)}function zC(e,t){return e.map(()=>t||Hv).splice(0,e.length-1)}function js({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Uv(r)?r.map(pu):pu(r),s={done:!1,value:t[0]},i=WC(n&&n.length===t.length?n:qv(t),e),a=Gv(i,t,{ease:Array.isArray(o)?o:zC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const HC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ue.update(t,!0),stop:()=>Bn(t),now:()=>Rt.isProcessing?Rt.timestamp:kn.now()}},UC={decay:im,inertia:im,tween:js,keyframes:js,spring:Zd},GC=e=>e/100;class Xd extends $v{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)||Yd,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=bl(n)?n:UC[n]||js;let l,c;process.env.NODE_ENV!=="production"&&a!==js&&on(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==js&&typeof t[0]!="number"&&(l=wi(GC,Wv(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=qd(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:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,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=v?{done:!1,value:l[0]}:T.next(g);a&&(S.value=a(S.value));let{done:E}=S;!v&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(S.value=xl(l,this.options,o)),y&&y(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=HC,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 YC=new Set(["opacity","clipPath","filter","transform"]);function qC(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=yv(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 KC=$d(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ra=10,ZC=2e4;function XC(e){return bl(e.type)||e.type==="spring"||!gv(e.ease)}function QC(e,t){const n=new Xd({...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<ZC;)r=n.sample(s),o.push(r.value),s+=Ra;return{times:void 0,keyframes:o,duration:s-Ra,ease:"linear"}}const Kv={anticipate:Tv,backInOut:Sv,circInOut:Cv};function JC(e){return e in Kv}class lm extends $v{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new Vv(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Ta()&&JC(s)&&(s=Kv[s]),XC(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,y=QC(t,m);t=y.keyframes,t.length===1&&(t[1]=t[0]),r=y.duration,o=y.times,s=y.ease,i="keyframes"}const u=qC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Zh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(xl(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;Zh(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 Xd({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=un(this.time);c.setWithVelocity(p.sample(m-Ra).value,p.sample(m).value,Ra)}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 KC()&&r&&YC.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const eR={type:"spring",stiffness:500,damping:25,restSpeed:10},tR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nR={type:"keyframes",duration:.8},rR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oR=(e,{keyframes:t})=>t.length>2?nR:qr.has(e)?e.startsWith("scale")?tR(t[1]):eR:rR;function sR({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 Qd=(e,t,n,r={},o,s)=>i=>{const a=Ld(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};sR(a)||(u={...u,...oR(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=xl(u.keyframes,a);if(f!==void 0)return Ue.update(()=>{u.onUpdate(f),u.onComplete()}),new mv([])}return!s&&lm.supports(u)?new lm(u):new Xd(u)};function iR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Jd(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&&iR(u,d))continue;const p={delay:n,...Ld(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=hv(e);if(b){const v=window.MotionHandoffAnimation(b,d,Ue);v!==null&&(p.startTime=v,m=!0)}}au(e,d),f.start(Qd(d,f,h,e.shouldReduceMotion&&dv.has(d)?{type:!1}:p,e,m));const y=f.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{Ue.update(()=>{a&&FE(e,a)})}),c}function gu(e,t,n={}){var r;const o=Zs(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(Jd(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return aR(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 aR(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(lR).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(gu(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function lR(e,t){return e.sortNodePosition(t)}function cR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>gu(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=gu(e,t,n);else{const o=typeof t=="function"?Zs(e,t,n.custom):t;r=Promise.all(Jd(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Zv(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 uR=Ed.length;function Xv(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Xv(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uR;n++){const r=Ed[n],o=e.props[r];(Ys(o)||o===!1)&&(t[r]=o)}return t}const dR=[...Td].reverse(),fR=Td.length;function hR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>cR(e,n,r)))}function mR(e){let t=hR(e),n=cm(),r=!0;const o=l=>(c,u)=>{var d;const f=Zs(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=Xv(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<fR;y++){const b=dR[y],v=n[b],g=c[b]!==void 0?c[b]:u[b],T=Ys(g),S=b===l?v.isActive:null;S===!1&&(p=y);let E=g===u[b]&&g!==c[b]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...h},!v.isActive&&S===null||!g&&!v.prevProp||gl(g)||typeof g=="boolean")continue;const C=pR(v.prevProp,g);let k=C||b===l&&v.isActive&&!E&&T||y>p&&T,I=!1;const A=Array.isArray(g)?g:[g];let j=A.reduce(o(b),{});S===!1&&(j={});const{prevResolvedValues:O={}}=v,L={...O,...j},P=M=>{k=!0,f.has(M)&&(I=!0,f.delete(M)),v.needsAnimating[M]=!0;const V=e.getValue(M);V&&(V.liveStyle=!1)};for(const M in L){const V=j[M],z=O[M];if(h.hasOwnProperty(M))continue;let _=!1;iu(V)&&iu(z)?_=!Zv(V,z):_=V!==z,_?V!=null?P(M):f.add(M):V!==void 0&&f.has(M)?P(M):v.protectedKeys[M]=!0}v.prevProp=g,v.prevResolvedValues=j,v.isActive&&(h={...h,...j}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(E&&C)||I)&&d.push(...A.map(M=>({animation:M,options:{type:b}})))}if(f.size){const y={};if(typeof c.initial!="boolean"){const b=Zs(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(y.transition=b.transition)}f.forEach(b=>{const v=e.getBaseTarget(b),g=e.getValue(b);g&&(g.liveStyle=!0),y[b]=v??null}),d.push({animation:y})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=cm(),r=!0}}}function pR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Zv(t,e):!1}function Sr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cm(){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 gR extends hr{constructor(t){super(t),t.animationState||(t.animationState=mR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gl(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 yR=0;class vR extends hr{constructor(){super(...arguments),this.id=yR++}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 bR={animation:{Feature:gR},exit:{Feature:vR}},an={x:!1,y:!1};function Qv(){return an.x||an.y}function xR(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 Qs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ef=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Si(e){return{point:{x:e.pageX,y:e.pageY}}}const wR=e=>t=>ef(t)&&e(t,Si(t));function vo(e,t,n,r){return Qs(e,t,wR(n),r)}function Jv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function SR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function TR(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 eb=1e-4,ER=1-eb,CR=1+eb,tb=.01,RR=0-tb,PR=0+tb;function Ft(e){return e.max-e.min}function kR(e,t,n){return Math.abs(e-t)<=n}function um(e,t,n,r=.5){e.origin=r,e.originPoint=Xe(t.min,t.max,e.origin),e.scale=Ft(n)/Ft(t),e.translate=Xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ER&&e.scale<=CR||isNaN(e.scale))&&(e.scale=1),(e.translate>=RR&&e.translate<=PR||isNaN(e.translate))&&(e.translate=0)}function Ls(e,t,n,r){um(e.x,t.x,n.x,r?r.originX:void 0),um(e.y,t.y,n.y,r?r.originY:void 0)}function dm(e,t,n){e.min=n.min+t.min,e.max=e.min+Ft(t)}function IR(e,t,n){dm(e.x,t.x,n.x),dm(e.y,t.y,n.y)}function fm(e,t,n){e.min=t.min-n.min,e.max=e.min+Ft(t)}function Fs(e,t,n){fm(e.x,t.x,n.x),fm(e.y,t.y,n.y)}const hm=()=>({translate:0,scale:1,origin:0,originPoint:0}),bo=()=>({x:hm(),y:hm()}),mm=()=>({min:0,max:0}),st=()=>({x:mm(),y:mm()});function tn(e){return[e("x"),e("y")]}function tc(e){return e===void 0||e===1}function yu({scale:e,scaleX:t,scaleY:n}){return!tc(e)||!tc(t)||!tc(n)}function Er(e){return yu(e)||nb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nb(e){return pm(e.x)||pm(e.y)}function pm(e){return e&&e!=="0%"}function Pa(e,t,n){const r=e-n,o=t*r;return n+o}function gm(e,t,n,r,o){return o!==void 0&&(e=Pa(e,o,r)),Pa(e,n,r)+t}function vu(e,t=0,n=1,r,o){e.min=gm(e.min,t,n,r,o),e.max=gm(e.max,t,n,r,o)}function rb(e,{x:t,y:n}){vu(e.x,t.translate,t.scale,t.originPoint),vu(e.y,n.translate,n.scale,n.originPoint)}const ym=.999999999999,vm=1.0000000000001;function AR(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&&wo(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,rb(e,i)),r&&Er(s.latestValues)&&wo(e,s.latestValues))}t.x<vm&&t.x>ym&&(t.x=1),t.y<vm&&t.y>ym&&(t.y=1)}function xo(e,t){e.min=e.min+t,e.max=e.max+t}function bm(e,t,n,r,o=.5){const s=Xe(e.min,e.max,o);vu(e,t,n,s,r)}function wo(e,t){bm(e.x,t.x,t.scaleX,t.scale,t.originX),bm(e.y,t.y,t.scaleY,t.scale,t.originY)}function ob(e,t){return Jv(TR(e.getBoundingClientRect(),t))}function OR(e,t,n){const r=ob(e,n),{scroll:o}=t;return o&&(xo(r.x,o.offset.x),xo(r.y,o.offset.y)),r}function ka(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 xm=(e,t)=>Math.abs(e-t);function _R(e,t){const n=xm(e.x,t.x),r=xm(e.y,t.y);return Math.sqrt(n**2+r**2)}class sb{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=rc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=_R(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:y}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=nc(d,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{ka(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=rc(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:nc(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!ef(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=Si(t),i=nc(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=Rt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,rc(i,this.history)),ka(t,"set"),this.removeListeners=wi(vo(t.currentTarget,"pointermove",this.handlePointerMove),vo(t.currentTarget,"pointerup",this.handlePointerUp),vo(t.currentTarget,"pointercancel",this.handlePointerUp),vo(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bn(this.updatePoint)}}function nc(e,t){return t?{point:t(e.point)}:e}function wm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rc({point:e},t){return{point:e,delta:wm(e,ib(t)),offset:wm(e,DR(t)),velocity:MR(t,.1)}}function DR(e){return e[0]}function ib(e){return e[e.length-1]}function MR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ib(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 NR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Xe(n,e,r.max):Math.min(e,n)),e}function Sm(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 jR(e,{top:t,left:n,bottom:r,right:o}){return{x:Sm(e.x,n,o),y:Sm(e.y,t,r)}}function Tm(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 LR(e,t){return{x:Tm(e.x,t.x),y:Tm(e.y,t.y)}}function FR(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 VR(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 bu=.35;function $R(e=bu){return e===!1?e=0:e===!0&&(e=bu),{x:Em(e,"left","right"),y:Em(e,"top","bottom")}}function Em(e,t,n){return{min:Cm(e,t),max:Cm(e,n)}}function Cm(e,t){return typeof e=="number"?e:e[t]||0}const BR=new WeakMap;class WR{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(Si(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=xR(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(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Pn.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[y];g&&(b=Ft(g)*(parseFloat(b)/100))}}this.originPoint[y]=b}),p&&Ue.postRender(()=>p(u,d)),au(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=d;if(h&&this.currentDirection===null){this.currentDirection=zR(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>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 sb(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||!zi(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=NR(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&&go(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=jR(o.layoutBox,n):this.constraints=!1,this.elastic=$R(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&tn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=VR(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!go(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=OR(r,o.root,this.visualElement.getTransformPagePoint());let i=LR(o.layout.layoutBox,s);if(n){const a=n(SR(i));this.hasMutatedConstraints=!!a,a&&(i=Jv(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(!zi(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 au(this.visualElement,t),r.start(Qd(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(!zi(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]-Xe(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!go(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]=FR({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(!zi(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Xe(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;BR.set(this.visualElement,this);const t=this.visualElement.current,n=vo(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();go(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=Qs(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=bu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function zi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function zR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class HR extends hr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new WR(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 Rm=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class UR extends hr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new sb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Rm(t),onStart:Rm(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ue.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=vo(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 aa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ss={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const n=Pm(e,t.target.x),r=Pm(e,t.target.y);return`${n}% ${r}%`}},GR={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=Xe(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 YR extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;lE(qR),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()})),aa.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(),Rd.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 ab(e){const[t,n]=Hy(),r=x.useContext(Gs);return w.jsx(YR,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Qy),isPresent:t,safeToRemove:n})}const qR={borderRadius:{...Ss,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ss,borderTopRightRadius:Ss,borderBottomLeftRadius:Ss,borderBottomRightRadius:Ss,boxShadow:GR};function lb(e,t,n){const r=xt(e)?e:Fo(e);return r.start(Qd("",r,t,n)),r.animation}function cb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const KR=(e,t)=>e.depth-t.depth;class ZR{constructor(){this.children=[],this.isDirty=!1}add(t){Fd(this.children,t),this.isDirty=!0}remove(t){vl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(KR),this.isDirty=!1,this.children.forEach(t)}}function XR(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 ub=["TopLeft","TopRight","BottomLeft","BottomRight"],QR=ub.length,km=e=>typeof e=="string"?parseFloat(e):e,Im=e=>typeof e=="number"||ge.test(e);function JR(e,t,n,r,o,s){o?(e.opacity=Xe(0,n.opacity!==void 0?n.opacity:1,eP(r)),e.opacityExit=Xe(t.opacity!==void 0?t.opacity:1,0,tP(r))):s&&(e.opacity=Xe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<QR;i++){const a=`border${ub[i]}Radius`;let l=Am(t,a),c=Am(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Im(l)===Im(c)?(e[a]=Math.max(Xe(km(l),km(c),r),0),(Pn.test(c)||Pn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Xe(t.rotate||0,n.rotate||0,r))}function Am(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const eP=db(0,.5,Ev),tP=db(.5,.95,Ht);function db(e,t,n){return r=>r<e?0:r>t?1:n(Vr(e,t,r))}function Om(e,t){e.min=t.min,e.max=t.max}function en(e,t){Om(e.x,t.x),Om(e.y,t.y)}function _m(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Dm(e,t,n,r,o){return e-=t,e=Pa(e,1/n,r),o!==void 0&&(e=Pa(e,1/o,r)),e}function nP(e,t=0,n=1,r=.5,o,s=e,i=e){if(Pn.test(t)&&(t=parseFloat(t),t=Xe(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Xe(s.min,s.max,r);e===s&&(a-=t),e.min=Dm(e.min,t,n,a,o),e.max=Dm(e.max,t,n,a,o)}function Mm(e,t,[n,r,o],s,i){nP(e,t[n],t[r],t[o],t.scale,s,i)}const rP=["x","scaleX","originX"],oP=["y","scaleY","originY"];function Nm(e,t,n,r){Mm(e.x,t,rP,n?n.x:void 0,r?r.x:void 0),Mm(e.y,t,oP,n?n.y:void 0,r?r.y:void 0)}function jm(e){return e.translate===0&&e.scale===1}function fb(e){return jm(e.x)&&jm(e.y)}function Lm(e,t){return e.min===t.min&&e.max===t.max}function sP(e,t){return Lm(e.x,t.x)&&Lm(e.y,t.y)}function Fm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hb(e,t){return Fm(e.x,t.x)&&Fm(e.y,t.y)}function Vm(e){return Ft(e.x)/Ft(e.y)}function $m(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iP{constructor(){this.members=[]}add(t){Fd(this.members,t),t.scheduleRender()}remove(t){if(vl(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 aP(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 oc=["","X","Y","Z"],lP={visibility:"hidden"},Bm=1e3;let cP=0;function sc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function mb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=hv(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&&mb(r)}function pb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=cP++,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(fP),this.nodes.forEach(yP),this.nodes.forEach(vP),this.nodes.forEach(hP)},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 ZR)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Vd),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=cb(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=XR(f,250),aa.hasAnimatedSinceResize&&(aa.hasAnimatedSinceResize=!1,this.nodes.forEach(zm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||TP,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=u.getProps(),v=!this.targetLayout||!hb(this.targetLayout,p),g=!f&&h;if(this.options.layoutRoot||this.resumeFrom||g||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...Ld(m,"layout"),onPlay:y,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||zm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const 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(bP),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&&mb(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(Wm);return}this.isUpdating||this.nodes.forEach(pP),this.isUpdating=!1,this.nodes.forEach(gP),this.nodes.forEach(uP),this.nodes.forEach(dP),this.clearAllSnapshots();const a=kn.now();Rt.delta=Wn(0,1e3/60,a-Rt.timestamp),Rt.timestamp=a,Rt.isProcessing=!0,Zl.update.process(Rt),Zl.preRender.process(Rt),Zl.render.process(Rt),Rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mP),this.sharedNodes.forEach(xP)}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&&!fb(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)),EP(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(CP))){const{scroll:u}=this.root;u&&(xo(l.x,u.offset.x),xo(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),xo(l.x,d.offset.x),xo(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&&wo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Er(u.latestValues)&&wo(l,u.latestValues)}return Er(this.latestValues)&&wo(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;yu(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();en(u,d),Nm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Er(this.latestValues)&&Nm(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(),Fs(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(),IR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):en(this.target,this.layout.layoutBox),rb(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(),Fs(this.relativeTargetOrigin,this.target,h.target),en(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||yu(this.parent.latestValues)||nb(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;AR(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():(_m(this.prevProjectionDelta.x,this.projectionDelta.x),_m(this.prevProjectionDelta.y,this.projectionDelta.y)),Ls(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!$m(this.projectionDelta.x,this.prevProjectionDelta.x)||!$m(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=bo(),this.projectionDelta=bo(),this.projectionDeltaWithTransform=bo()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=bo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),b=!y||y.members.length<=1,v=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(SP));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const S=T/1e3;Hm(d.x,i.x,S),Hm(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wP(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&sP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),en(g,this.relativeTarget)),m&&(this.animationValues=u,JR(u,c,this.latestValues,S,v,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(()=>{aa.hasAnimatedSinceResize=!0,this.currentAnimation=lb(0,Bm,{...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(Bm),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&&gb(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),wo(a,u),Ls(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new iP),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&&sc("z",i,c,this.animationValues);for(let u=0;u<oc.length;u++)sc(`rotate${oc[u]}`,i,c,this.animationValues),sc(`skew${oc[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 lP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=sa(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=sa(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=aP(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 qs){if(f[m]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:v}=qs[m],g=c.transform==="none"?f[m]:y(f[m],d);if(b){const T=b.length;for(let S=0;S<T;S++)c[b[S]]=g}else v?this.options.visualElement.renderState.vars[m]=g:c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?sa(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(Wm),this.root.sharedNodes.clear()}}}function uP(e){e.updateLayout()}function dP(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}):gb(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=bo();Ls(a,r,n.layoutBox);const l=bo();i?Ls(l,e.applyTransform(o,!0),n.measuredBox):Ls(l,r,n.layoutBox);const c=!fb(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();Fs(p,n.layoutBox,f.layoutBox);const m=st();Fs(m,r,h.layoutBox),hb(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 fP(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 hP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mP(e){e.clearSnapshot()}function Wm(e){e.clearMeasurements()}function pP(e){e.isLayoutDirty=!1}function gP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yP(e){e.resolveTargetDelta()}function vP(e){e.calcProjection()}function bP(e){e.resetSkewAndRotation()}function xP(e){e.removeLeadSnapshot()}function Hm(e,t,n){e.translate=Xe(t.translate,0,n),e.scale=Xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Um(e,t,n,r){e.min=Xe(t.min,n.min,r),e.max=Xe(t.max,n.max,r)}function wP(e,t,n,r){Um(e.x,t.x,n.x,r),Um(e.y,t.y,n.y,r)}function SP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TP={duration:.45,ease:[.4,0,.1,1]},Gm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ym=Gm("applewebkit/")&&!Gm("chrome/")?Math.round:Ht;function qm(e){e.min=Ym(e.min),e.max=Ym(e.max)}function EP(e){qm(e.x),qm(e.y)}function gb(e,t,n){return e==="position"||e==="preserve-aspect"&&!kR(Vm(t),Vm(n),.2)}function CP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const RP=pb({attachResizeListener:(e,t)=>Qs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ic={current:void 0},yb=pb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ic.current){const e=new RP({});e.mount(window),e.setOptions({layoutScroll:!0}),ic.current=e}return ic.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),PP={pan:{Feature:UR},drag:{Feature:HR,ProjectionNode:yb,MeasureLayout:ab}};function vb(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 bb(e,t){const n=vb(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Km(e){return!(e.pointerType==="touch"||Qv())}function kP(e,t,n={}){const[r,o,s]=bb(e,n),i=a=>{if(!Km(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Km(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Zm(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,Si(t)))}class IP extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=kP(t,(n,r)=>(Zm(this.node,r,"Start"),o=>Zm(this.node,o,"End"))))}unmount(){}}class AP 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=wi(Qs(this.node.current,"focus",()=>this.onFocus()),Qs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const xb=(e,t)=>t?e===t?!0:xb(e,t.parentElement):!1,OP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _P(e){return OP.has(e.tagName)||e.tabIndex!==-1}const Ps=new WeakSet;function Xm(e){return t=>{t.key==="Enter"&&e(t)}}function ac(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const DP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Xm(()=>{if(Ps.has(n))return;ac(n,"down");const o=Xm(()=>{ac(n,"up")}),s=()=>ac(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 Qm(e){return ef(e)&&!Qv()}function MP(e,t,n={}){const[r,o,s]=bb(e,n),i=a=>{const l=a.currentTarget;if(!l||!Qm(a)||Ps.has(l))return;Ps.add(l),ka(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),ka(h,"release"),!(!Qm(h)||!Ps.has(l))&&(Ps.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?NP(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)||xb(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,!_P(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>DP(c,o),o)}),s}function NP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function Jm(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,Si(t)))}class jP extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=MP(t,(n,r)=>(Jm(this.node,r,"Start"),(o,{success:s})=>Jm(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const xu=new WeakMap,lc=new WeakMap,LP=e=>{const t=xu.get(e.target);t&&t(e)},FP=e=>{e.forEach(LP)};function VP({root:e,...t}){const n=e||document;lc.has(n)||lc.set(n,{});const r=lc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(FP,{root:e,...t})),r[o]}function $P(e,t,n){const r=VP(t);return xu.set(e,n),r.observe(e),()=>{xu.delete(e),r.unobserve(e)}}const BP={some:0,all:1};class WP 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:BP[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 $P(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(zP(t,n))&&this.startObserver()}unmount(){}}function zP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const HP={inView:{Feature:WP},tap:{Feature:jP},focus:{Feature:AP},hover:{Feature:IP}},UP={layout:{ProjectionNode:yb,MeasureLayout:ab}},wu={current:null},wb={current:!1};function GP(){if(wb.current=!0,!!Sd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>wu.current=e.matches;e.addListener(t),t()}else wu.current=!1}const YP=[...Fv,Ot,sr],qP=e=>YP.find(Lv(e)),Js=new WeakMap;function KP(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"&&ml(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,Fo(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,Fo(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ep=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Sb{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=Yd,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=yl(n),this.isVariantNode=Zy(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,Js.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),wb.current||GP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:wu.current,process.env.NODE_ENV!=="production"&&ml(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 Lo){const n=Lo[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<ep.length;r++){const o=ep[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=KP(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=Fo(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"&&(Nv(o)||Rv(o))?o=parseFloat(o):!qP(o)&&sr.test(n)&&(o=_v(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=Nd(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 Vd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Tb extends Sb{constructor(){super(...arguments),this.KeyframeResolver=Vv}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 ZP(e){return window.getComputedStyle(e)}class Eb extends Tb{constructor(){super(...arguments),this.type="html",this.renderInstance=av}readValueFromInstance(t,n){if(qr.has(n)){const r=Gd(n);return r&&r.default||0}else{const r=ZP(t),o=(Pd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ob(t,n)}build(t,n,r){Ad(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jd(t,n,r)}}class Cb extends Tb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&iv(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qr.has(n)){const r=Gd(n);return r&&r.default||0}return n=lv.has(n)?n:Cd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return uv(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ue.postRender(this.updateDimensions)}build(t,n,r){Dd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){cv(t,n,r,o)}mount(t){this.isSVGTag=Md(t.tagName),super.mount(t)}}const XP=(e,t)=>_d(e)?new Cb(t):new Eb(t,{allowProjection:e!==x.Fragment}),QP=_E({...bR,...HP,...PP,...UP},XP),lt=qT(QP);function $r(e){const t=hn(()=>Fo(e)),{isStatic:n}=x.useContext(jo);if(n){const[,r]=x.useState(e);x.useEffect(()=>t.on("change",r),[])}return t}function Rb(e,t){const n=$r(t()),r=()=>n.set(t());return r(),hl(()=>{const o=()=>Ue.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Bn(r)}}),n}const JP=e=>e&&typeof e=="object"&&e.mix,ek=e=>JP(e)?e.mix:void 0;function tk(...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=Gv(o,s,{mixer:ek(s[0]),...i});return t?a(r):a}function nk(e){Ms.current=[],e();const t=Rb(Ms.current,e);return Ms.current=void 0,t}function rk(e,t,n,r){if(typeof e=="function")return nk(e);const o=typeof t=="function"?t:tk(t,n,r);return Array.isArray(e)?tp(e,o):tp([e],([s])=>o(s))}function tp(e,t){const n=hn(()=>[]);return Rb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ok(e){return x.useEffect(()=>()=>e(),[])}function sk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(qd(r),Ea);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:In(o)}}const ik=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Pb(e,t){return Uv(e)?e[ik(0,e.length,t)]:e}function tf(e){return typeof e=="object"&&!Array.isArray(e)}function kb(e,t,n,r){return typeof e=="string"&&tf(t)?vb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function ak(e,t,n){return e*(t+1)}function np(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 lk(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(vl(e,o),r--)}}function ck(e,t,n,r,o,s){lk(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Xe(o,s,r[i]),easing:Pb(n,i)})}function uk(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function dk(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const fk="easeInOut",hk=20;function mk(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const p=e[h];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,np(d,p.at,u,c));continue}let[m,y,b={}]=p;b.at!==void 0&&(d=np(d,b.at,u,c));let v=0;const g=(T,S,E,C=0,k=0)=>{const I=pk(T),{delay:A=0,times:j=qv(I),type:O="keyframes",repeat:L,repeatType:P,repeatDelay:D=0,...N}=S;let{ease:M=t.ease||"easeOut",duration:V}=S;const z=typeof A=="function"?A(C,k):A,_=I.length,$=bl(O)?O:o==null?void 0:o[O];if(_<=2&&$){let U=100;if(_===2&&vk(I)){const W=I[1]-I[0];U=Math.abs(W)}const F={...N};V!==void 0&&(F.duration=un(V));const B=sk(F,U,$);M=B.ease,V=B.duration}V??(V=s);const Z=d+z;j.length===1&&j[0]===0&&(j[1]=1);const ee=j.length-I.length;if(ee>0&&Yv(j,ee),I.length===1&&I.unshift(null),L){on(L<hk,"Repeat count too high, must be less than 20"),V=ak(V,L);const U=[...I],F=[...j];M=Array.isArray(M)?[...M]:[M];const B=[...M];for(let W=0;W<L;W++){I.push(...U);for(let G=0;G<U.length;G++)j.push(F[G]+(W+1)),M.push(G===0?"linear":Pb(B,G-1))}uk(j,L)}const J=Z+V;ck(E,I,M,j,Z,J),v=Math.max(z+V,v),f=Math.max(J,f)};if(xt(m)){const T=rp(m,a);g(y,b,op("default",T))}else{const T=kb(m,y,r,l),S=T.length;for(let E=0;E<S;E++){y=y,b=b;const C=T[E],k=rp(C,a);for(const I in y)g(y[I],gk(b,I),op(I,k),E,S)}}u=d,d+=v}return a.forEach((h,p)=>{for(const m in h){const y=h[m];y.sort(dk);const b=[],v=[],g=[];for(let S=0;S<y.length;S++){const{at:E,value:C,easing:k}=y[S];b.push(C),v.push(Vr(0,f,E)),g.push(k||"easeOut")}v[0]!==0&&(v.unshift(0),b.unshift(b[0]),g.unshift(fk)),v[v.length-1]!==1&&(v.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:v,...n}}}),i}function rp(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function op(e,t){return t[e]||(t[e]=[]),t[e]}function pk(e){return Array.isArray(e)?e:[e]}function gk(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const yk=e=>typeof e=="number",vk=e=>e.every(yk);function bk(e,t){return e in t}class xk extends Sb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(bk(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 wk(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=cb(e)?new Cb(t):new Eb(t);n.mount(e),Js.set(e,n)}function Sk(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new xk(t);n.mount(e),Js.set(e,n)}function Tk(e,t){return xt(e)||typeof e=="number"||typeof e=="string"&&!tf(t)}function Ib(e,t,n,r){const o=[];if(Tk(e,t))o.push(lb(e,tf(t)&&t.default||t,n&&(n.default||n)));else{const s=kb(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?wk:Sk;Js.has(l)||c(l);const u=Js.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...Jd(u,{...t,transition:d},{}))}}return o}function Ek(e,t,n){const r=[];return mk(e,t,n,{spring:Zd}).forEach(({keyframes:s,transition:i},a)=>{r.push(...Ib(a,s,i))}),r}function Ck(e){return Array.isArray(e)&&e.some(Array.isArray)}function Rk(e){function t(n,r,o){let s=[];Ck(n)?s=Ek(n,r,e):s=Ib(n,r,o,e);const i=new mv(s);return e&&e.animations.push(i),i}return t}function Pk(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>Rk(e));return ok(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class kk{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 Ik=()=>new kk;function Ak(){return hn(Ik)}function Ok(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function _k(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:Ok(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=pu(r)(l/c)*c}return t+l}}const Ab=x.createContext(null);function Dk(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=Xe(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?ME(e,o,o+s):e}function Mk({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=hn(()=>lt[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(jk)},updateOrder:(d,f,h)=>{if(c.current)return;const p=Dk(l,d,f,h);l!==p&&(c.current=!0,r(p.map(Nk).filter(m=>o.indexOf(m)!==-1)))}};return x.useEffect(()=>{c.current=!1}),w.jsx(a,{...s,ref:i,ignoreStrict:!0,children:w.jsx(Ab.Provider,{value:u,children:e})})}const Ob=x.forwardRef(Mk);function Nk(e){return e.value}function jk(e,t){return e.layout.min-t.layout.min}function sp(e,t=0){return xt(e)?e:$r(t)}function Lk({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=hn(()=>lt[r]),c=x.useContext(Ab),u={x:sp(t.x),y:sp(t.y)},d=rk([u.x,u.y],([m,y])=>m||y?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,y)=>{const{velocity:b}=y;b[f]&&p(n,u[f].get(),b[f]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const _b=x.forwardRef(Lk);/**
12
+ `),()=>{document.head.removeChild(h)}},[t]),S.jsx(_T,{isPresent:t,childRef:o,sizeRef:s,children:R.cloneElement(e,{ref:o})})}const DT=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=hn(NT),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=S.jsx(MT,{isPresent:n,anchorX:a,children:e})),S.jsx(hl.Provider,{value:d,children:e})};function NT(){return new Map}function Uy(e=!0){const t=x.useContext(hl);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 Bi=e=>e.key||"";function Vh(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const Td=typeof window<"u",ml=Td?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(()=>Vh(e),[e]),d=i&&!l?[]:u.map(Bi),f=x.useRef(!0),h=x.useRef(u),p=hn(()=>new Map),[m,y]=x.useState(u),[b,v]=x.useState(u);ml(()=>{f.current=!1,h.current=u;for(let w=0;w<b.length;w++){const E=Bi(b[w]);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 w=[...u];for(let E=0;E<b.length;E++){const C=b[E],k=Bi(C);d.includes(k)||(w.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(w=g),v(Vh(w)),y(u),null}process.env.NODE_ENV!=="production"&&s==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=x.useContext(Ys);return S.jsx(S.Fragment,{children:b.map(w=>{const E=Bi(w),C=i&&!l?!1:u===b||d.includes(E),k=()=>{if(p.has(E))p.set(E,!0);else return;let A=!0;p.forEach(I=>{I||(A=!1)}),A&&(T==null||T(),v(h.current),i&&(c==null||c()),r&&r())};return S.jsx(DT,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:k,anchorX:a,children:w},E)})})},jT=x.createContext(null);function LT(){const e=x.useRef(!1);return ml(()=>(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 FT={skipAnimations:!1,useManualTiming:!1},Wi=["read","resolveKeyframes","update","preRender","render","postRender"],$h={value:null,addProjectionMetrics:null};function VT(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&&$h.value&&$h.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const $T=40;function Gy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Wi.reduce((b,v)=>(b[v]=VT(s,t?v:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,$T),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:Wi.reduce((b,v)=>{const g=i[v];return b[v]=(T,w=!1,E=!1)=>(n||p(),g.schedule(T,w,E)),b},{}),cancel:b=>{for(let v=0;v<Wi.length;v++)i[Wi[v]].cancel(b)},state:o,steps:i}}const{schedule:Ue,cancel:Bn,state:Rt,steps:Xl}=Gy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ht,!0);function BT(){const e=LT(),[t,n]=x.useState(0),r=x.useCallback(()=>{e.current&&n(t+1)},[t]);return[x.useCallback(()=>Ue.postRender(r),[r]),t]}const WT=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Bh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(WT);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,zT=e=>Yy(e===!0)||e==="id",HT=({children:e,id:t,inherit:n=!0})=>{const r=x.useContext(Ys),o=x.useContext(jT),[s,i]=BT(),a=x.useRef(null),l=r.id||o;a.current===null&&(zT(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Yy(n)&&r.group||Bh()});const c=x.useMemo(()=>({...a.current,forceRender:s}),[i]);return S.jsx(Ys.Provider,{value:c,children:e})},qy=x.createContext({strict:!1}),Wh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fo={};for(const e in Wh)Fo[e]={isEnabled:t=>Wh[e].some(n=>!!t[n])};function UT(e){for(const t in e)Fo[t]={...Fo[t],...e[t]}}const GT=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 Ta(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||GT.has(e)}let Ky=e=>!Ta(e);function Zy(e){e&&(Ky=t=>t.startsWith("on")?!Ta(t):e(t))}try{Zy(require("@emotion/is-prop-valid").default)}catch{}function YT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ky(o)||n===!0&&Ta(o)||!t&&!Ta(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function qT({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 S.jsx(Lo.Provider,{value:r,children:e})}const zh=new Set;function pl(e,t,n){e||zh.has(t)||(console.warn(t),zh.add(t))}function KT(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&pl(!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 gl=x.createContext({});function yl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function qs(e){return typeof e=="string"||Array.isArray(e)}const Ed=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cd=["initial",...Ed];function vl(e){return yl(e.animate)||Cd.some(t=>qs(e[t]))}function Xy(e){return!!(vl(e)||e.variants)}function ZT(e,t){if(vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qs(n)?n:void 0,animate:qs(r)?r:void 0}}return e.inherit!==!1?t:{}}function XT(e){const{initial:t,animate:n}=ZT(e,x.useContext(gl));return x.useMemo(()=>({initial:t,animate:n}),[Hh(t),Hh(n)])}function Hh(e){return Array.isArray(e)?e.join(" "):e}const QT=Symbol.for("motionComponentSymbol");function yo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function JT(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 Rd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),eE="framerAppearId",Qy="data-"+Rd(eE),{schedule:Pd,cancel:b$}=Gy(queueMicrotask,!1),Jy=x.createContext({});function tE(e,t,n,r,o){var s,i;const{visualElement:a}=x.useContext(gl),l=x.useContext(qy),c=x.useContext(hl),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")&&nE(d.current,n,o,h);const p=x.useRef(!1);x.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[Qy],y=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 ml(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Pd.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function nE(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 rE({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&UT(e);function a(c,u){let d;const f={...x.useContext(Lo),...c,layoutId:oE(c)},{isStatic:h}=f,p=XT(c),m=r(c,h);if(!h&&Td){sE(f,e);const y=iE(f);d=y.MeasureLayout,p.visualElement=tE(o,m,f,t,y.ProjectionNode)}return S.jsxs(gl.Provider,{value:p,children:[d&&p.visualElement?S.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,JT(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[QT]=o,l}function oE({layoutId:e}){const t=x.useContext(Ys).id;return t&&e!==void 0?t+"-"+e:e}function sE(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 iE(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),kd=tv("--"),aE=tv("var(--"),Ad=e=>aE(e)?lE.test(e.split("/*")[0].trim()):!1,lE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ks={};function cE(e){for(const t in e)Ks[t]=e[t],kd(t)&&(Ks[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)&&(!!Ks[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},Zs={...ls,transform:e=>Wn(0,1,e)},zi={...ls,default:1},xi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xn=xi("deg"),Pn=xi("%"),me=xi("px"),uE=xi("vh"),dE=xi("vw"),Uh={...Pn,parse:e=>Pn.parse(e)/100,transform:e=>Pn.transform(e*100)},fE={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},hE={rotate:Xn,rotateX:Xn,rotateY:Xn,rotateZ:Xn,scale:zi,scaleX:zi,scaleY:zi,scaleZ:zi,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:Zs,originX:Uh,originY:Uh,originZ:me},Gh={...ls,transform:Math.round},Id={...fE,...hE,zIndex:Gh,size:me,fillOpacity:Zs,strokeOpacity:Zs,numOctaves:Gh},mE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pE=as.length;function gE(e,t,n){let r="",o=!0;for(let s=0;s<pE;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,Id[i]);if(!l){o=!1;const u=mE[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Od(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(kd(l)){o[l]=c;continue}else{const u=rv(c,Id[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=gE(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 _d=()=>({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 yE({transformTemplate:e},t){return x.useMemo(()=>{const n=_d();return Od(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vE(e,t){const n=e.style||{},r={};return ov(r,n,e),Object.assign(r,yE(e,t)),r}function bE(e,t){const n={},r=vE(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 xE=["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 Md(e){return typeof e!="string"||e.includes("-")?!1:!!(xE.indexOf(e)>-1||/[A-Z]/u.test(e))}const wE={offset:"stroke-dashoffset",array:"stroke-dasharray"},SE={offset:"strokeDashoffset",array:"strokeDasharray"};function TE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?wE:SE;e[s.offset]=me.transform(-r);const i=me.transform(t),a=me.transform(n);e[s.array]=`${i} ${a}`}function Yh(e,t,n){return typeof e=="string"?e:me.transform(t+n*e)}function EE(e,t,n){const r=Yh(t,e.x,e.width),o=Yh(n,e.y,e.height);return`${r} ${o}`}function Dd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Od(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=EE(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&&TE(f,i,a,l,!1)}const sv=()=>({..._d(),attrs:{}}),Nd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function CE(e,t,n,r){const o=x.useMemo(()=>{const s=sv();return Dd(s,t,Nd(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 RE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Md(n)?CE:bE)(r,s,i,n),c=YT(r,typeof n=="string",e),u=n!==x.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=x.useMemo(()=>xt(d)?d.get():d,[d]);return x.createElement(n,{...u,children:f})}}function qh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function jd(e,t,n,r){if(typeof t=="function"){const[o,s]=qh(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]=qh(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const au=e=>Array.isArray(e),PE=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),kE=e=>au(e)?e[e.length-1]||0:e;function ia(e){const t=xt(e)?e.get():e;return PE(t)?t.toValue():t}function AE({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:IE(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(gl),o=x.useContext(hl),s=()=>AE(e,t,r,o);return n?s():hn(s)};function IE(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=ia(s[f]);let{initial:i,animate:a}=e;const l=vl(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"&&!yl(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=jd(e,f[h]);if(p){const{transitionEnd:m,transition:y,...b}=p;for(const v in b){let g=b[v];if(Array.isArray(g)){const T=u?g.length-1:0;g=g[T]}g!==null&&(o[v]=g)}for(const v in m)o[v]=m[v]}}}return o}function Ld(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 OE={useVisualState:iv({scrapeMotionValuesFromProps:Ld,createRenderState:_d})};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:Rd(o),t.attrs[o])}function dv(e,t,n){const r=Ld(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 Kh=["x","y","width","height","cx","cy","r"],_E={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<Kh.length;a++){const l=Kh[a];e[l]!==t[l]&&(i=!0)}i&&Ue.read(()=>{av(n,r),Ue.render(()=>{Dd(r,o,Nd(n.tagName),e.transformTemplate),uv(n,r)})})}})};function ME(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...Md(r)?_E:OE,preloadedFeatures:e,useRender:RE(o),createVisualElement:t,Component:r};return rE(i)}}function Xs(e,t,n){const r=e.getProps();return jd(r,t,n!==void 0?n:r.custom,e)}function Fd(e,t){return e?e[t]||e.default||e:void 0}const fv=new Set(["width","height","top","left","right","bottom",...as]);let aa;function DE(){aa=void 0}const kn={now:()=>(aa===void 0&&kn.set(Rt.isProcessing||FT.useManualTiming?Rt.timestamp:performance.now()),aa),set:e=>{aa=e,queueMicrotask(DE)}};function Vd(e,t){e.indexOf(t)===-1&&e.push(t)}function bl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function NE([...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 $d{constructor(){this.subscriptions=[]}add(t){return Vd(this.subscriptions,t),()=>bl(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 Zh=30,jE=e=>!isNaN(parseFloat(e)),Ns={current:void 0};class LE{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=jE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pl(!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 $d);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>Zh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Zh);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 LE(e,t)}function FE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vo(n))}function VE(e,t){const n=Xs(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=kE(s[i]);FE(e,i,a)}}function $E(e){return!!(xt(e)&&e.add)}function lu(e,t){const n=e.getValue("willChange");if($E(n))return n.add(t)}function mv(e){return e.props[Qy]}function Bd(e){let t;return()=>(t===void 0&&(t=e()),t)}const BE=Bd(()=>window.ScrollTimeline!==void 0);class WE{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(BE()&&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 WE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const un=e=>e*1e3,An=e=>e/1e3;function xl(e){return typeof e=="function"}function Xh(e,t){e.timeline=t,e.onfinish=null}const Wd=e=>Array.isArray(e)&&typeof e[0]=="number",zE={linearEasing:void 0};function HE(e,t){const n=Bd(e);return()=>{var r;return(r=zE[t])!==null&&r!==void 0?r:n()}}const Ea=HE(()=>{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"&&Ea()||!e||typeof e=="string"&&(e in cu||Ea())||Wd(e)||Array.isArray(e)&&e.every(yv))}const Ps=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cu={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"&&Ea()?gv(e,t):Wd(e)?Ps(e):Array.isArray(e)?e.map(n=>vv(n,t)||cu.easeOut):cu[e]}const bv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,UE=1e-7,GE=12;function YE(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)>UE&&++a<GE);return i}function wi(e,t,n,r){if(e===t&&n===r)return Ht;const o=s=>YE(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=wi(.33,1.53,.69,.99),zd=wv(Sv),Tv=xv(zd),Ev=e=>(e*=2)<1?.5*zd(e):.5*(2-Math.pow(2,-10*(e-1))),Hd=e=>1-Math.sin(Math.acos(e)),Cv=wv(Hd),Rv=xv(Hd),Pv=e=>/^0[^.\s]+$/u.test(e);function qE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Pv(e):!0}const js=e=>Math.round(e*1e5)/1e5,Ud=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function KE(e){return e==null}const ZE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gd=(e,t)=>n=>!!(typeof n=="string"&&ZE.test(n)&&n.startsWith(e)||t&&!KE(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(Ud);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},XE=e=>Wn(0,255,e),Ql={...ls,transform:e=>Math.round(XE(e))},_r={test:Gd("rgb","red"),parse:kv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ql.transform(e)+", "+Ql.transform(t)+", "+Ql.transform(n)+", "+js(Zs.transform(r))+")"};function QE(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 uu={test:Gd("#"),parse:QE,transform:_r.transform},vo={test:Gd("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(Zs.transform(r))+")"},Ot={test:e=>_r.test(e)||uu.test(e)||vo.test(e),parse:e=>_r.test(e)?_r.parse(e):vo.test(e)?vo.parse(e):uu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_r.transform(e):vo.transform(e)},JE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function eC(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ud))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(JE))===null||n===void 0?void 0:n.length)||0)>0}const Av="number",Iv="color",tC="var",nC="var(",Qh="${}",rC=/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 Qs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(rC,l=>(Ot.test(l)?(r.color.push(s),o.push(Iv),n.push(Ot.parse(l))):l.startsWith(nC)?(r.var.push(s),o.push(tC),n.push(l)):(r.number.push(s),o.push(Av),n.push(parseFloat(l))),++s,Qh)).split(Qh);return{values:n,split:a,indexes:r,types:o}}function Ov(e){return Qs(e).values}function _v(e){const{split:t,types:n}=Qs(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===Av?s+=js(o[i]):a===Iv?s+=Ot.transform(o[i]):s+=o[i]}return s}}const oC=e=>typeof e=="number"?0:e;function sC(e){const t=Ov(e);return _v(e)(t.map(oC))}const sr={test:eC,parse:Ov,createTransformer:_v,getAnimatableNone:sC},iC=new Set(["brightness","contrast","saturate","opacity"]);function aC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ud)||[];if(!r)return e;const o=n.replace(r,"");let s=iC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const lC=/\b([a-z-]*)\(.*?\)/gu,du={...sr,getAnimatableNone:e=>{const t=e.match(lC);return t?t.map(aC).join(" "):e}},cC={...Id,color:Ot,backgroundColor:Ot,outlineColor:Ot,fill:Ot,stroke:Ot,borderColor:Ot,borderTopColor:Ot,borderRightColor:Ot,borderBottomColor:Ot,borderLeftColor:Ot,filter:du,WebkitFilter:du},Yd=e=>cC[e];function Mv(e,t){let n=Yd(e);return n!==du&&(n=sr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const uC=new Set(["auto","none","0"]);function dC(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!uC.has(s)&&Qs(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Mv(n,o)}const Jh=e=>e===ls||e===me,em=(e,t)=>parseFloat(e.split(", ")[t]),tm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return em(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?em(s[1],e):0}},fC=new Set(["x","y","z"]),hC=as.filter(e=>!fC.has(e));function mC(e){const t=[];return hC.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:tm(4,13),y:tm(5,14)};$o.translateX=$o.x;$o.translateY=$o.y;const Lr=new Set;let fu=!1,hu=!1;function Dv(){if(hu){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=mC(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)})}hu=!1,fu=!1,Lr.forEach(e=>e.complete()),Lr.clear()}function Nv(){Lr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hu=!0)})}function pC(){Nv(),Dv()}class qd{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),fu||(fu=!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),gC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yC(e){const t=gC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const vC=4;function Lv(e,t,n=1){on(n<=vC,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=yC(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),bC={test:e=>e==="auto",parse:e=>e},Vv=[ls,me,Pn,Xn,dE,uE,bC],nm=e=>Vv.find(Fv(e));class $v extends qd{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=nm(o),a=nm(s);if(i!==a)if(Jh(i)&&Jh(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)qE(t[o])&&r.push(o);r.length&&dC(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 rm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(sr.test(e)||e==="0")&&!e.startsWith("url("));function xC(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 wC(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=rm(o,t),a=rm(s,t);return 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:xC(e)||(n==="spring"||xl(n))&&r}const SC=e=>e!==null;function wl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(SC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const TC=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>TC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&pC(),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&&!wC(t,r,o,s))if(i)this.options.duration=0;else{l&&l(wl(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 Ca=2e4;function Kd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ca;)t+=n,r=e.next(t);return t>=Ca?1/0:t}const Qe=(e,t,n)=>e+(t-e)*n;function Jl(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 EC({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=Jl(l,a,e+1/3),s=Jl(l,a,e),i=Jl(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Ra(e,t){return n=>n>0?t:e}const ec=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},CC=[uu,_r,vo],RC=e=>CC.find(t=>t.test(e));function om(e){const t=RC(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=EC(n)),n}const sm=(e,t)=>{const n=om(e),r=om(t);if(!n||!r)return Ra(e,t);const o={...n};return s=>(o.red=ec(n.red,r.red,s),o.green=ec(n.green,r.green,s),o.blue=ec(n.blue,r.blue,s),o.alpha=Qe(n.alpha,r.alpha,s),_r.transform(o))},PC=(e,t)=>n=>t(e(n)),Si=(...e)=>e.reduce(PC),mu=new Set(["none","hidden"]);function kC(e,t){return mu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function AC(e,t){return n=>Qe(e,t,n)}function Zd(e){return typeof e=="number"?AC:typeof e=="string"?Ad(e)?Ra:Ot.test(e)?sm:_C:Array.isArray(e)?Wv:typeof e=="object"?Ot.test(e)?sm:IC:Ra}function Wv(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Zd(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function IC(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Zd(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function OC(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 _C=(e,t)=>{const n=sr.createTransformer(t),r=Qs(e),o=Qs(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?mu.has(e)&&!o.values.length||mu.has(t)&&!r.values.length?kC(e,t):Si(Wv(OC(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.`),Ra(e,t))};function zv(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qe(e,t,n):Zd(e)(e,t)}const MC=5;function Hv(e,t,n){const r=Math.max(t-MC,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},tc=.001;function DC({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,An(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=pu(c,i),p=Math.exp(-d);return tc-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=pu(Math.pow(c,2),i);return(-o(c)+tc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-tc+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=jC(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 NC=12;function jC(e,t,n){let r=n;for(let o=1;o<NC;o++)r=r-e(r)/t(r);return r}function pu(e,t){return e*Math.sqrt(1-t*t)}const LC=["duration","bounce"],FC=["stiffness","damping","mass"];function im(e,t){return t.some(n=>e[n]!==void 0)}function VC(e){let t={velocity:rt.velocity,stiffness:rt.stiffness,damping:rt.damping,mass:rt.mass,isResolvedFromDuration:!1,...e};if(!im(e,FC)&&im(e,LC))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=DC(e);t={...t,...n,mass:rt.mass},t.isResolvedFromDuration=!0}return t}function Xd(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}=VC({...n,velocity:-An(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),y=i-s,b=An(Math.sqrt(l/u)),v=Math.abs(y)<5;r||(r=v?rt.restSpeed.granular:rt.restSpeed.default),o||(o=v?rt.restDelta.granular:rt.restDelta.default);let g;if(m<1){const w=pu(b,m);g=E=>{const C=Math.exp(-m*b*E);return i-C*((p+m*b*y)/w*Math.sin(w*E)+y*Math.cos(w*E))}}else if(m===1)g=w=>i-Math.exp(-b*w)*(y+(p+b*y)*w);else{const w=b*Math.sqrt(m*m-1);g=E=>{const C=Math.exp(-m*b*E),k=Math.min(w*E,300);return i-C*((p+m*b*y)*Math.sinh(k)+w*y*Math.cosh(k))/w}}const T={calculatedDuration:h&&d||null,next:w=>{const E=g(w);if(h)a.done=w>=d;else{let C=0;m<1&&(C=w===0?un(p):Hv(g,w,E));const k=Math.abs(C)<=r,A=Math.abs(i-E)<=o;a.done=k&&A}return a.value=a.done?i:E,a},toString:()=>{const w=Math.min(Kd(T),Ca),E=gv(C=>T.next(w*C).value,w,30);return w+"ms "+E}};return T}function am({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 y=d+m,b=i===void 0?y:i(y);b!==y&&(m=b-d);const v=k=>-m*Math.exp(-k/r),g=k=>b+v(k),T=k=>{const A=v(k),I=g(k);f.done=Math.abs(A)<=c,f.value=f.done?b:I};let w,E;const C=k=>{h(f.value)&&(w=k,E=Xd({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 A=!1;return!E&&w===void 0&&(A=!0,T(k),C(k)),w!==void 0&&k>=w?E.next(k-w):(!A&&T(k),f)}}}const $C=wi(.42,0,1,1),BC=wi(0,0,.58,1),Uv=wi(.42,0,.58,1),Gv=e=>Array.isArray(e)&&typeof e[0]!="number",lm={linear:Ht,easeIn:$C,easeInOut:Uv,easeOut:BC,circIn:Hd,circInOut:Rv,circOut:Cv,backIn:zd,backInOut:Tv,backOut:Sv,anticipate:Ev},gu=e=>{if(Wd(e)){on(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return wi(t,n,r,o)}else if(typeof e=="string")return on(lm[e]!==void 0,`Invalid easing type '${e}'`),lm[e];return e};function WC(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=Si(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=WC(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 zC(e,t){return e.map(n=>n*t)}function HC(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(gu):gu(r),s={done:!1,value:t[0]},i=zC(n&&n.length===t.length?n:Kv(t),e),a=Yv(i,t,{ease:Array.isArray(o)?o:HC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const UC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ue.update(t,!0),stop:()=>Bn(t),now:()=>Rt.isProcessing?Rt.timestamp:kn.now()}},GC={decay:am,inertia:am,tween:Ls,keyframes:Ls,spring:Xd},YC=e=>e/100;class Qd 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)||qd,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=xl(n)?n:GC[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=Si(YC,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=Kd(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:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const k=Math.min(this.currentTime,u)/d;let A=Math.floor(k),I=k%1;!I&&k>=1&&(I=1),I===1&&A--,A=Math.min(A,h+1),!!(A%2)&&(p==="reverse"?(I=1-I,m&&(I-=m/d)):p==="mirror"&&(T=i)),g=Wn(0,1,I)*d}const w=v?{done:!1,value:l[0]}:T.next(g);a&&(w.value=a(w.value));let{done:E}=w;!v&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(w.value=wl(l,this.options,o)),y&&y(w.value),C&&this.finish(),w}get duration(){const{resolved:t}=this;return t?An(t.calculatedDuration):0}get time(){return An(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=An(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=UC,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 qC=new Set(["opacity","clipPath","filter","transform"]);function KC(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 ZC=Bd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Pa=10,XC=2e4;function QC(e){return xl(e.type)||e.type==="spring"||!yv(e.ease)}function JC(e,t){const n=new Qd({...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<XC;)r=n.sample(s),o.push(r.value),s+=Pa;return{times:void 0,keyframes:o,duration:s-Pa,ease:"linear"}}const Zv={anticipate:Ev,backInOut:Tv,circInOut:Rv};function eR(e){return e in Zv}class cm 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"&&Ea()&&eR(s)&&(s=Zv[s]),QC(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,y=JC(t,m);t=y.keyframes,t.length===1&&(t[1]=t[0]),r=y.duration,o=y.times,s=y.ease,i="keyframes"}const u=KC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Xh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(wl(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 An(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return An(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;Xh(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 Qd({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=un(this.time);c.setWithVelocity(p.sample(m-Pa).value,p.sample(m).value,Pa)}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 ZC()&&r&&qC.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const tR={type:"spring",stiffness:500,damping:25,restSpeed:10},nR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),rR={type:"keyframes",duration:.8},oR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sR=(e,{keyframes:t})=>t.length>2?rR:qr.has(e)?e.startsWith("scale")?nR(t[1]):tR:oR;function iR({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 Jd=(e,t,n,r={},o,s)=>i=>{const a=Fd(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};iR(a)||(u={...u,...sR(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=wl(u.keyframes,a);if(f!==void 0)return Ue.update(()=>{u.onUpdate(f),u.onComplete()}),new pv([])}return!s&&cm.supports(u)?new cm(u):new Qd(u)};function aR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ef(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&&aR(u,d))continue;const p={delay:n,...Fd(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=mv(e);if(b){const v=window.MotionHandoffAnimation(b,d,Ue);v!==null&&(p.startTime=v,m=!0)}}lu(e,d),f.start(Jd(d,f,h,e.shouldReduceMotion&&fv.has(d)?{type:!1}:p,e,m));const y=f.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{Ue.update(()=>{a&&VE(e,a)})}),c}function yu(e,t,n={}){var r;const o=Xs(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(ef(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return lR(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 lR(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(cR).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(yu(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function cR(e,t){return e.sortNodePosition(t)}function uR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>yu(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=yu(e,t,n);else{const o=typeof t=="function"?Xs(e,t,n.custom):t;r=Promise.all(ef(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 dR=Cd.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<dR;n++){const r=Cd[n],o=e.props[r];(qs(o)||o===!1)&&(t[r]=o)}return t}const fR=[...Ed].reverse(),hR=Ed.length;function mR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>uR(e,n,r)))}function pR(e){let t=mR(e),n=um(),r=!0;const o=l=>(c,u)=>{var d;const f=Xs(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 y=0;y<hR;y++){const b=fR[y],v=n[b],g=c[b]!==void 0?c[b]:u[b],T=qs(g),w=b===l?v.isActive:null;w===!1&&(p=y);let E=g===u[b]&&g!==c[b]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...h},!v.isActive&&w===null||!g&&!v.prevProp||yl(g)||typeof g=="boolean")continue;const C=gR(v.prevProp,g);let k=C||b===l&&v.isActive&&!E&&T||y>p&&T,A=!1;const I=Array.isArray(g)?g:[g];let j=I.reduce(o(b),{});w===!1&&(j={});const{prevResolvedValues:O={}}=v,L={...O,...j},P=D=>{k=!0,f.has(D)&&(A=!0,f.delete(D)),v.needsAnimating[D]=!0;const V=e.getValue(D);V&&(V.liveStyle=!1)};for(const D in L){const V=j[D],z=O[D];if(h.hasOwnProperty(D))continue;let _=!1;au(V)&&au(z)?_=!Xv(V,z):_=V!==z,_?V!=null?P(D):f.add(D):V!==void 0&&f.has(D)?P(D):v.protectedKeys[D]=!0}v.prevProp=g,v.prevResolvedValues=j,v.isActive&&(h={...h,...j}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(E&&C)||A)&&d.push(...I.map(D=>({animation:D,options:{type:b}})))}if(f.size){const y={};if(typeof c.initial!="boolean"){const b=Xs(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(y.transition=b.transition)}f.forEach(b=>{const v=e.getBaseTarget(b),g=e.getValue(b);g&&(g.liveStyle=!0),y[b]=v??null}),d.push({animation:y})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=um(),r=!0}}}function gR(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 um(){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 yR extends hr{constructor(t){super(t),t.animationState||(t.animationState=pR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();yl(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 vR=0;class bR extends hr{constructor(){super(...arguments),this.id=vR++}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 xR={animation:{Feature:yR},exit:{Feature:bR}},an={x:!1,y:!1};function Jv(){return an.x||an.y}function wR(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 Js(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const tf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ti(e){return{point:{x:e.pageX,y:e.pageY}}}const SR=e=>t=>tf(t)&&e(t,Ti(t));function bo(e,t,n,r){return Js(e,t,SR(n),r)}function eb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function TR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ER(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,CR=1-tb,RR=1+tb,nb=.01,PR=0-nb,kR=0+nb;function Ft(e){return e.max-e.min}function AR(e,t,n){return Math.abs(e-t)<=n}function dm(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>=CR&&e.scale<=RR||isNaN(e.scale))&&(e.scale=1),(e.translate>=PR&&e.translate<=kR||isNaN(e.translate))&&(e.translate=0)}function Fs(e,t,n,r){dm(e.x,t.x,n.x,r?r.originX:void 0),dm(e.y,t.y,n.y,r?r.originY:void 0)}function fm(e,t,n){e.min=n.min+t.min,e.max=e.min+Ft(t)}function IR(e,t,n){fm(e.x,t.x,n.x),fm(e.y,t.y,n.y)}function hm(e,t,n){e.min=t.min-n.min,e.max=e.min+Ft(t)}function Vs(e,t,n){hm(e.x,t.x,n.x),hm(e.y,t.y,n.y)}const mm=()=>({translate:0,scale:1,origin:0,originPoint:0}),xo=()=>({x:mm(),y:mm()}),pm=()=>({min:0,max:0}),st=()=>({x:pm(),y:pm()});function tn(e){return[e("x"),e("y")]}function nc(e){return e===void 0||e===1}function vu({scale:e,scaleX:t,scaleY:n}){return!nc(e)||!nc(t)||!nc(n)}function Er(e){return vu(e)||rb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rb(e){return gm(e.x)||gm(e.y)}function gm(e){return e&&e!=="0%"}function ka(e,t,n){const r=e-n,o=t*r;return n+o}function ym(e,t,n,r,o){return o!==void 0&&(e=ka(e,o,r)),ka(e,n,r)+t}function bu(e,t=0,n=1,r,o){e.min=ym(e.min,t,n,r,o),e.max=ym(e.max,t,n,r,o)}function ob(e,{x:t,y:n}){bu(e.x,t.translate,t.scale,t.originPoint),bu(e.y,n.translate,n.scale,n.originPoint)}const vm=.999999999999,bm=1.0000000000001;function OR(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<bm&&t.x>vm&&(t.x=1),t.y<bm&&t.y>vm&&(t.y=1)}function wo(e,t){e.min=e.min+t,e.max=e.max+t}function xm(e,t,n,r,o=.5){const s=Qe(e.min,e.max,o);bu(e,t,n,s,r)}function So(e,t){xm(e.x,t.x,t.scaleX,t.scale,t.originX),xm(e.y,t.y,t.scaleY,t.scale,t.originY)}function sb(e,t){return eb(ER(e.getBoundingClientRect(),t))}function _R(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 wm=(e,t)=>Math.abs(e-t);function MR(e,t){const n=wm(e.x,t.x),r=wm(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=oc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=MR(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:y}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=rc(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=oc(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:rc(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!tf(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=Ti(t),i=rc(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=Rt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,oc(i,this.history)),Aa(t,"set"),this.removeListeners=Si(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 rc(e,t){return t?{point:t(e.point)}:e}function Sm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oc({point:e},t){return{point:e,delta:Sm(e,ab(t)),offset:Sm(e,DR(t)),velocity:NR(t,.1)}}function DR(e){return e[0]}function ab(e){return e[e.length-1]}function NR(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=An(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 jR(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 Tm(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 LR(e,{top:t,left:n,bottom:r,right:o}){return{x:Tm(e.x,n,o),y:Tm(e.y,t,r)}}function Em(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 FR(e,t){return{x:Em(e.x,t.x),y:Em(e.y,t.y)}}function VR(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 $R(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const xu=.35;function BR(e=xu){return e===!1?e=0:e===!0&&(e=xu),{x:Cm(e,"left","right"),y:Cm(e,"top","bottom")}}function Cm(e,t,n){return{min:Rm(e,t),max:Rm(e,n)}}function Rm(e,t){return typeof e=="number"?e:e[t]||0}const WR=new WeakMap;class zR{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(Ti(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wR(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(y=>{let b=this.getAxisMotionValue(y).get()||0;if(Pn.test(b)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[y];g&&(b=Ft(g)*(parseFloat(b)/100))}}this.originPoint[y]=b}),p&&Ue.postRender(()=>p(u,d)),lu(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=d;if(h&&this.currentDirection===null){this.currentDirection=HR(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>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||!Hi(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=jR(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=LR(o.layoutBox,n):this.constraints=!1,this.elastic=BR(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&tn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=$R(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=_R(r,o.root,this.visualElement.getTransformPagePoint());let i=FR(o.layout.layoutBox,s);if(n){const a=n(TR(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(!Hi(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 lu(this.visualElement,t),r.start(Jd(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(!Hi(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]=VR({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(!Hi(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;WR.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=Js(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=xu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Hi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function HR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class UR extends hr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new zR(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 Pm=e=>(t,n)=>{e&&Ue.postRender(()=>e(t,n))};class GR 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:Pm(t),onStart:Pm(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 la={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function km(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=km(e,t.target.x),r=km(e,t.target.y);return`${n}% ${r}%`}},YR={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 qR extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;cE(KR),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()})),la.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(),Pd.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(Ys);return S.jsx(qR,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Jy),isPresent:t,safeToRemove:n})}const KR={borderRadius:{...Ts,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ts,borderTopRightRadius:Ts,borderBottomLeftRadius:Ts,borderBottomRightRadius:Ts,boxShadow:YR};function cb(e,t,n){const r=xt(e)?e:Vo(e);return r.start(Jd("",r,t,n)),r.animation}function ub(e){return e instanceof SVGElement&&e.tagName!=="svg"}const ZR=(e,t)=>e.depth-t.depth;class XR{constructor(){this.children=[],this.isDirty=!1}add(t){Vd(this.children,t),this.isDirty=!0}remove(t){bl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ZR),this.isDirty=!1,this.children.forEach(t)}}function QR(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"],JR=db.length,Am=e=>typeof e=="string"?parseFloat(e):e,Im=e=>typeof e=="number"||me.test(e);function eP(e,t,n,r,o,s){o?(e.opacity=Qe(0,n.opacity!==void 0?n.opacity:1,tP(r)),e.opacityExit=Qe(t.opacity!==void 0?t.opacity:1,0,nP(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<JR;i++){const a=`border${db[i]}Radius`;let l=Om(t,a),c=Om(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Im(l)===Im(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 Om(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const tP=fb(0,.5,Cv),nP=fb(.5,.95,Ht);function fb(e,t,n){return r=>r<e?0:r>t?1:n(Vr(e,t,r))}function _m(e,t){e.min=t.min,e.max=t.max}function en(e,t){_m(e.x,t.x),_m(e.y,t.y)}function Mm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Dm(e,t,n,r,o){return e-=t,e=ka(e,1/n,r),o!==void 0&&(e=ka(e,1/o,r)),e}function rP(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=Dm(e.min,t,n,a,o),e.max=Dm(e.max,t,n,a,o)}function Nm(e,t,[n,r,o],s,i){rP(e,t[n],t[r],t[o],t.scale,s,i)}const oP=["x","scaleX","originX"],sP=["y","scaleY","originY"];function jm(e,t,n,r){Nm(e.x,t,oP,n?n.x:void 0,r?r.x:void 0),Nm(e.y,t,sP,n?n.y:void 0,r?r.y:void 0)}function Lm(e){return e.translate===0&&e.scale===1}function hb(e){return Lm(e.x)&&Lm(e.y)}function Fm(e,t){return e.min===t.min&&e.max===t.max}function iP(e,t){return Fm(e.x,t.x)&&Fm(e.y,t.y)}function Vm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mb(e,t){return Vm(e.x,t.x)&&Vm(e.y,t.y)}function $m(e){return Ft(e.x)/Ft(e.y)}function Bm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class aP{constructor(){this.members=[]}add(t){Vd(this.members,t),t.scheduleRender()}remove(t){if(bl(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 lP(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 sc=["","X","Y","Z"],cP={visibility:"hidden"},Wm=1e3;let uP=0;function ic(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=uP++,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(hP),this.nodes.forEach(vP),this.nodes.forEach(bP),this.nodes.forEach(mP)},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 XR)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new $d),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=QR(f,250),la.hasAnimatedSinceResize&&(la.hasAnimatedSinceResize=!1,this.nodes.forEach(Hm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||EP,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=u.getProps(),v=!this.targetLayout||!mb(this.targetLayout,p),g=!f&&h;if(this.options.layoutRoot||this.resumeFrom||g||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...Fd(m,"layout"),onPlay:y,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||Hm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const 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(xP),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(zm);return}this.isUpdating||this.nodes.forEach(gP),this.isUpdating=!1,this.nodes.forEach(yP),this.nodes.forEach(dP),this.nodes.forEach(fP),this.clearAllSnapshots();const a=kn.now();Rt.delta=Wn(0,1e3/60,a-Rt.timestamp),Rt.timestamp=a,Rt.isProcessing=!0,Xl.update.process(Rt),Xl.preRender.process(Rt),Xl.render.process(Rt),Rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pP),this.sharedNodes.forEach(wP)}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)),CP(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(RP))){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;vu(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();en(u,d),jm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Er(this.latestValues)&&jm(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(),IR(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||vu(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;OR(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():(Mm(this.prevProjectionDelta.x,this.projectionDelta.x),Mm(this.prevProjectionDelta.y,this.projectionDelta.y)),Fs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Bm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bm(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,y=this.getStack(),b=!y||y.members.length<=1,v=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(TP));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const w=T/1e3;Um(d.x,i.x,w),Um(d.y,i.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),SP(this.relativeTarget,this.relativeTargetOrigin,f,w),g&&iP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),en(g,this.relativeTarget)),m&&(this.animationValues=u,eP(u,c,this.latestValues,w,v,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},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(()=>{la.hasAnimatedSinceResize=!0,this.currentAnimation=cb(0,Wm,{...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(Wm),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 aP),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&&ic("z",i,c,this.animationValues);for(let u=0;u<sc.length;u++)ic(`rotate${sc[u]}`,i,c,this.animationValues),ic(`skew${sc[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 cP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ia(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=ia(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=lP(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 Ks){if(f[m]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:v}=Ks[m],g=c.transform==="none"?f[m]:y(f[m],d);if(b){const T=b.length;for(let w=0;w<T;w++)c[b[w]]=g}else v?this.options.visualElement.renderState.vars[m]=g:c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?ia(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(zm),this.root.sharedNodes.clear()}}}function dP(e){e.updateLayout()}function fP(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 hP(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 mP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pP(e){e.clearSnapshot()}function zm(e){e.clearMeasurements()}function gP(e){e.isLayoutDirty=!1}function yP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Hm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vP(e){e.resolveTargetDelta()}function bP(e){e.calcProjection()}function xP(e){e.resetSkewAndRotation()}function wP(e){e.removeLeadSnapshot()}function Um(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 Gm(e,t,n,r){e.min=Qe(t.min,n.min,r),e.max=Qe(t.max,n.max,r)}function SP(e,t,n,r){Gm(e.x,t.x,n.x,r),Gm(e.y,t.y,n.y,r)}function TP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const EP={duration:.45,ease:[.4,0,.1,1]},Ym=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),qm=Ym("applewebkit/")&&!Ym("chrome/")?Math.round:Ht;function Km(e){e.min=qm(e.min),e.max=qm(e.max)}function CP(e){Km(e.x),Km(e.y)}function yb(e,t,n){return e==="position"||e==="preserve-aspect"&&!AR($m(t),$m(n),.2)}function RP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const PP=gb({attachResizeListener:(e,t)=>Js(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ac={current:void 0},vb=gb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ac.current){const e=new PP({});e.mount(window),e.setOptions({layoutScroll:!0}),ac.current=e}return ac.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kP={pan:{Feature:GR},drag:{Feature:UR,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 Zm(e){return!(e.pointerType==="touch"||Jv())}function AP(e,t,n={}){const[r,o,s]=xb(e,n),i=a=>{if(!Zm(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Zm(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Xm(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,Ti(t)))}class IP extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=AP(t,(n,r)=>(Xm(this.node,r,"Start"),o=>Xm(this.node,o,"End"))))}unmount(){}}class OP 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=Si(Js(this.node.current,"focus",()=>this.onFocus()),Js(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const wb=(e,t)=>t?e===t?!0:wb(e,t.parentElement):!1,_P=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function MP(e){return _P.has(e.tagName)||e.tabIndex!==-1}const ks=new WeakSet;function Qm(e){return t=>{t.key==="Enter"&&e(t)}}function lc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const DP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Qm(()=>{if(ks.has(n))return;lc(n,"down");const o=Qm(()=>{lc(n,"up")}),s=()=>lc(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 Jm(e){return tf(e)&&!Jv()}function NP(e,t,n={}){const[r,o,s]=xb(e,n),i=a=>{const l=a.currentTarget;if(!l||!Jm(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"),!(!Jm(h)||!ks.has(l))&&(ks.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?jP(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,!MP(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>DP(c,o),o)}),s}function jP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function ep(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,Ti(t)))}class LP extends hr{mount(){const{current:t}=this.node;t&&(this.unmount=NP(t,(n,r)=>(ep(this.node,r,"Start"),(o,{success:s})=>ep(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const wu=new WeakMap,cc=new WeakMap,FP=e=>{const t=wu.get(e.target);t&&t(e)},VP=e=>{e.forEach(FP)};function $P({root:e,...t}){const n=e||document;cc.has(n)||cc.set(n,{});const r=cc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(VP,{root:e,...t})),r[o]}function BP(e,t,n){const r=$P(t);return wu.set(e,n),r.observe(e),()=>{wu.delete(e),r.unobserve(e)}}const WP={some:0,all:1};class zP 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:WP[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 BP(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(HP(t,n))&&this.startObserver()}unmount(){}}function HP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const UP={inView:{Feature:zP},tap:{Feature:LP},focus:{Feature:OP},hover:{Feature:IP}},GP={layout:{ProjectionNode:vb,MeasureLayout:lb}},Su={current:null},Sb={current:!1};function YP(){if(Sb.current=!0,!!Td)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Su.current=e.matches;e.addListener(t),t()}else Su.current=!1}const qP=[...Vv,Ot,sr],KP=e=>qP.find(Fv(e)),ei=new WeakMap;function ZP(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"&&pl(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 tp=["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=qd,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=vl(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,ei.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||YP(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Su.current,process.env.NODE_ENV!=="production"&&pl(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<tp.length;r++){const o=tp[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=ZP(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):!KP(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=jd(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 $d),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 XP(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=Yd(n);return r&&r.default||0}else{const r=XP(t),o=(kd(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){Od(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ld(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=Yd(n);return r&&r.default||0}return n=cv.has(n)?n:Rd(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){Dd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){uv(t,n,r,o)}mount(t){this.isSVGTag=Nd(t.tagName),super.mount(t)}}const QP=(e,t)=>Md(e)?new Rb(t):new Cb(t,{allowProjection:e!==x.Fragment}),JP=ME({...xR,...UP,...kP,...GP},QP),lt=KT(JP);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(),ml(()=>{const o=()=>Ue.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Bn(r)}}),n}const ek=e=>e&&typeof e=="object"&&e.mix,tk=e=>ek(e)?e.mix:void 0;function nk(...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:tk(s[0]),...i});return t?a(r):a}function rk(e){Ns.current=[],e();const t=Pb(Ns.current,e);return Ns.current=void 0,t}function ok(e,t,n,r){if(typeof e=="function")return rk(e);const o=typeof t=="function"?t:nk(t,n,r);return Array.isArray(e)?np(e,o):np([e],([s])=>o(s))}function np(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 sk(e){return x.useEffect(()=>()=>e(),[])}function ik(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Kd(r),Ca);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:An(o)}}const ak=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function kb(e,t){return Gv(e)?e[ak(0,e.length,t)]:e}function nf(e){return typeof e=="object"&&!Array.isArray(e)}function Ab(e,t,n,r){return typeof e=="string"&&nf(t)?bb(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function lk(e,t,n){return e*(t+1)}function rp(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 ck(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(bl(e,o),r--)}}function uk(e,t,n,r,o,s){ck(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 dk(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function fk(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const hk="easeInOut",mk=20;function pk(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,rp(d,p.at,u,c));continue}let[m,y,b={}]=p;b.at!==void 0&&(d=rp(d,b.at,u,c));let v=0;const g=(T,w,E,C=0,k=0)=>{const A=gk(T),{delay:I=0,times:j=Kv(A),type:O="keyframes",repeat:L,repeatType:P,repeatDelay:M=0,...N}=w;let{ease:D=t.ease||"easeOut",duration:V}=w;const z=typeof I=="function"?I(C,k):I,_=A.length,$=xl(O)?O:o==null?void 0:o[O];if(_<=2&&$){let G=100;if(_===2&&bk(A)){const H=A[1]-A[0];G=Math.abs(H)}const F={...N};V!==void 0&&(F.duration=un(V));const B=ik(F,G,$);D=B.ease,V=B.duration}V??(V=s);const Z=d+z;j.length===1&&j[0]===0&&(j[1]=1);const re=j.length-A.length;if(re>0&&qv(j,re),A.length===1&&A.unshift(null),L){on(L<mk,"Repeat count too high, must be less than 20"),V=lk(V,L);const G=[...A],F=[...j];D=Array.isArray(D)?[...D]:[D];const B=[...D];for(let H=0;H<L;H++){A.push(...G);for(let Y=0;Y<G.length;Y++)j.push(F[Y]+(H+1)),D.push(Y===0?"linear":kb(B,Y-1))}dk(j,L)}const ee=Z+V;uk(E,A,D,j,Z,ee),v=Math.max(z+V,v),f=Math.max(ee,f)};if(xt(m)){const T=op(m,a);g(y,b,sp("default",T))}else{const T=Ab(m,y,r,l),w=T.length;for(let E=0;E<w;E++){y=y,b=b;const C=T[E],k=op(C,a);for(const A in y)g(y[A],yk(b,A),sp(A,k),E,w)}}u=d,d+=v}return a.forEach((h,p)=>{for(const m in h){const y=h[m];y.sort(fk);const b=[],v=[],g=[];for(let w=0;w<y.length;w++){const{at:E,value:C,easing:k}=y[w];b.push(C),v.push(Vr(0,f,E)),g.push(k||"easeOut")}v[0]!==0&&(v.unshift(0),b.unshift(b[0]),g.unshift(hk)),v[v.length-1]!==1&&(v.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:v,...n}}}),i}function op(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function sp(e,t){return t[e]||(t[e]=[]),t[e]}function gk(e){return Array.isArray(e)?e:[e]}function yk(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const vk=e=>typeof e=="number",bk=e=>e.every(vk);function xk(e,t){return e in t}class wk extends Tb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(xk(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 Sk(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),ei.set(e,n)}function Tk(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new wk(t);n.mount(e),ei.set(e,n)}function Ek(e,t){return xt(e)||typeof e=="number"||typeof e=="string"&&!nf(t)}function Ib(e,t,n,r){const o=[];if(Ek(e,t))o.push(cb(e,nf(t)&&t.default||t,n&&(n.default||n)));else{const s=Ab(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?Sk:Tk;ei.has(l)||c(l);const u=ei.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...ef(u,{...t,transition:d},{}))}}return o}function Ck(e,t,n){const r=[];return pk(e,t,n,{spring:Xd}).forEach(({keyframes:s,transition:i},a)=>{r.push(...Ib(a,s,i))}),r}function Rk(e){return Array.isArray(e)&&e.some(Array.isArray)}function Pk(e){function t(n,r,o){let s=[];Rk(n)?s=Ck(n,r,e):s=Ib(n,r,o,e);const i=new pv(s);return e&&e.animations.push(i),i}return t}function kk(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>Pk(e));return sk(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class Ak{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 Ik=()=>new Ak;function Ok(){return hn(Ik)}function _k(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function Mk(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:_k(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=gu(r)(l/c)*c}return t+l}}const Ob=x.createContext(null);function Dk(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?NE(e,o,o+s):e}function Nk({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=hn(()=>lt[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(Lk)},updateOrder:(d,f,h)=>{if(c.current)return;const p=Dk(l,d,f,h);l!==p&&(c.current=!0,r(p.map(jk).filter(m=>o.indexOf(m)!==-1)))}};return x.useEffect(()=>{c.current=!1}),S.jsx(a,{...s,ref:i,ignoreStrict:!0,children:S.jsx(Ob.Provider,{value:u,children:e})})}const _b=x.forwardRef(Nk);function jk(e){return e.value}function Lk(e,t){return e.layout.min-t.layout.min}function ip(e,t=0){return xt(e)?e:$r(t)}function Fk({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=hn(()=>lt[r]),c=x.useContext(Ob),u={x:ip(t.x),y:ip(t.y)},d=ok([u.x,u.y],([m,y])=>m||y?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,y)=>{const{velocity:b}=y;b[f]&&p(n,u[f].get(),b[f]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const Mb=x.forwardRef(Fk);/**
13
13
  * @license lucide-react v0.414.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const Fk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Db=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
17
+ */const Vk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Db=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
18
18
  * @license lucide-react v0.414.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */var Vk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
22
+ */var $k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
23
23
  * @license lucide-react v0.414.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const $k=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,...Vk,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]]));/**
27
+ */const Bk=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,...$k,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 gt=(e,t)=>{const n=x.forwardRef(({className:r,...o},s)=>x.createElement($k,{ref:s,iconNode:t,className:Db(`lucide-${Fk(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
32
+ */const gt=(e,t)=>{const n=x.forwardRef(({className:r,...o},s)=>x.createElement(Bk,{ref:s,iconNode:t,className:Db(`lucide-${Vk(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 Bk=gt("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"}]]);/**
37
+ */const Wk=gt("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 Wk=gt("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"}]]);/**
42
+ */const zk=gt("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 Mb=gt("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"}]]);/**
47
+ */const Nb=gt("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 zk=gt("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"}]]);/**
52
+ */const Hk=gt("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 nf=gt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
57
+ */const rf=gt("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 Hk=gt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
62
+ */const Uk=gt("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 rf=gt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
67
+ */const of=gt("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 Nb=gt("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"}]]);/**
72
+ */const jb=gt("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 Uk=gt("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"}]]);/**
77
+ */const Gk=gt("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 jb=gt("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"}]]);/**
82
+ */const Lb=gt("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 Gk=gt("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"}]]);/**
87
+ */const Yk=gt("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 Lb=gt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
92
+ */const Fb=gt("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 Yk=gt("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
97
+ */const qk=gt("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 of=gt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
102
+ */const sf=gt("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 qk=gt("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"}]]);/**
107
+ */const Kk=gt("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 Kk=gt("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"}]]);/**
112
+ */const Zk=gt("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 $o=gt("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"}]]);/**
117
+ */const Bo=gt("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 Zk=gt("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"}]]);/**
122
+ */const Xk=gt("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 Xk=gt("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"}]]);/**
127
+ */const Qk=gt("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 Qk=gt("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"}]]);/**
132
+ */const Jk=gt("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 sf=gt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ip={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},Jk={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Fb=e=>w.jsx(lt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:ip,exit:ip.false,transition:Jk,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:$e("aria-hidden:pointer-events-none",e.className),children:e.children}),eI=rs("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"}}),tI=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:$e("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:w.jsx(Fb,{"data-open":!!s,open:!!s,children:w.jsxs(os,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:$e(eI({theme:n}),t),children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(Nb,{size:20}):null,!r&&n==="info"?w.jsx(Lb,{size:20}):null,!r&&n==="danger"?w.jsx(Zk,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?w.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:w.jsx(sf,{size:20})}):null]})})})});function Ne(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ze(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function ls(e,t){const n=Ne(e);return isNaN(t)?Ze(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function wl(e,t){const n=Ne(e);if(isNaN(t))return Ze(e,NaN);if(!t)return n;const r=n.getDate(),o=Ze(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Vb=6048e5,nI=864e5,rI=6e4,oI=36e5,sI=1e3;let iI={};function Kr(){return iI}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=Ne(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 Bo(e){return On(e,{weekStartsOn:1})}function $b(e){const t=Ne(e),n=t.getFullYear(),r=Ze(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Bo(r),s=Ze(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Bo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Wo(e){const t=Ne(e);return t.setHours(0,0,0,0),t}function Ia(e){const t=Ne(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 aI(e,t){const n=Wo(e),r=Wo(t),o=+n-Ia(n),s=+r-Ia(r);return Math.round((o-s)/nI)}function lI(e){const t=$b(e),n=Ze(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Bo(n)}function Bb(e,t){const n=t*7;return ls(e,n)}function Wb(e,t){return wl(e,t*12)}function cI(e){return Ze(e,Date.now())}function uI(e,t){const n=Wo(e),r=Wo(t);return+n==+r}function dI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zb(e){if(!dI(e)&&typeof e!="number")return!1;const t=Ne(e);return!isNaN(Number(t))}function Hb(e,t){const n=Ne(e.start),r=Ne(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(Ne(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Ub(e){const t=Ne(e);return t.setDate(1),t.setHours(0,0,0,0),t}function fI(e){const t=Ne(e),n=Ze(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function hI(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=Ne(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 mI={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"}},pI=(e,t,n)=>{let r;const o=mI[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 cc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const gI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bI={date:cc({formats:gI,defaultWidth:"full"}),time:cc({formats:yI,defaultWidth:"full"}),dateTime:cc({formats:vI,defaultWidth:"full"})},xI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wI=(e,t,n,r)=>xI[e];function Ts(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 SI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},TI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},EI={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"]},CI={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"]},RI={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"}},PI={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"}},kI=(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"},II={ordinalNumber:kI,era:Ts({values:SI,defaultWidth:"wide"}),quarter:Ts({values:TI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ts({values:EI,defaultWidth:"wide"}),day:Ts({values:CI,defaultWidth:"wide"}),dayPeriod:Ts({values:RI,defaultWidth:"wide",formattingValues:PI,defaultFormattingWidth:"wide"})};function Es(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)?OI(a,d=>d.test(i)):AI(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 AI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function OI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function _I(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 DI=/^(\d+)(th|st|nd|rd)?/i,MI=/\d+/i,NI={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},jI={any:[/^b/i,/^(a|c)/i]},LI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},FI={any:[/1/i,/2/i,/3/i,/4/i]},VI={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},$I={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]},BI={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},WI={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]},zI={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},HI={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}},UI={ordinalNumber:_I({matchPattern:DI,parsePattern:MI,valueCallback:e=>parseInt(e,10)}),era:Es({matchPatterns:NI,defaultMatchWidth:"wide",parsePatterns:jI,defaultParseWidth:"any"}),quarter:Es({matchPatterns:LI,defaultMatchWidth:"wide",parsePatterns:FI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Es({matchPatterns:VI,defaultMatchWidth:"wide",parsePatterns:$I,defaultParseWidth:"any"}),day:Es({matchPatterns:BI,defaultMatchWidth:"wide",parsePatterns:WI,defaultParseWidth:"any"}),dayPeriod:Es({matchPatterns:zI,defaultMatchWidth:"any",parsePatterns:HI,defaultParseWidth:"any"})},Gb={code:"en-US",formatDistance:pI,formatLong:bI,formatRelative:wI,localize:II,match:UI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function GI(e){const t=Ne(e);return aI(t,fI(t))+1}function Yb(e){const t=Ne(e),n=+Bo(t)-+lI(t);return Math.round(n/Vb)+1}function af(e,t){var u,d,f,h;const n=Ne(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=Ze(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=On(i,t),l=Ze(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 YI(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=af(e,t),s=Ze(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),On(s,t)}function qb(e,t){const n=Ne(e),r=+On(n,t)-+YI(n,t);return Math.round(r/Vb)+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"},ap={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=af(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=$b(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=qb(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):We(o,t.length)},I:function(e,t,n){const r=Yb(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=GI(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 cp(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 cp(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"+lp(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"+lp(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 lp(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 cp(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 up=(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"})}},Kb=(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"})}},qI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return up(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}}",up(r,t)).replace("{{time}}",Kb(o,t))},Su={p:Kb,P:qI},KI=/^D+$/,ZI=/^Y+$/,XI=["D","DD","YY","YYYY"];function Zb(e){return KI.test(e)}function Xb(e){return ZI.test(e)}function Tu(e,t,n){const r=QI(e,t,n);if(console.warn(r),XI.includes(e))throw new RangeError(r)}function QI(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 JI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tA=/^'([^]*?)'?$/,nA=/''/g,rA=/[a-zA-Z]/;function oA(e,t,n){var u,d,f,h;const r=Kr(),o=r.locale??Gb,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=Ne(e);if(!zb(a))throw new RangeError("Invalid time value");let l=t.match(eA).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=Su[m];return y(p,o.formatLong)}return p}).join("").match(JI).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:sA(p)};if(ap[m])return{isToken:!0,value:p};if(m.match(rA))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;(Xb(m)||Zb(m))&&Tu(m,t,String(e));const y=ap[m[0]];return y(a,m,o.localize,c)}).join("")}function sA(e){const t=e.match(tA);return t?t[1].replace(nA,"'"):e}function iA(){return Object.assign({},Kr())}function aA(e){let n=Ne(e).getDay();return n===0&&(n=7),n}function lA(e,t){const n=Ne(e),r=Ne(t);return n.getTime()>r.getTime()}function cA(e,t){const n=Ne(e),r=Ne(t);return+n<+r}function uA(e,t){const n=t instanceof Date?Ze(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const dA=10;class Qb{constructor(){ie(this,"subPriority",0)}validate(t,n){return!0}}class fA extends Qb{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 hA extends Qb{constructor(){super(...arguments);ie(this,"priority",dA);ie(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ze(n,uA(n,Date))}}class je{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new fA(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class mA extends je{constructor(){super(...arguments);ie(this,"priority",140);ie(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const 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*oI+s*rI+i*sI),rest:t.slice(n[0].length)}}function Jb(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 Aa(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 lf(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 e0(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 t0(e){return e%400===0||e%4===0&&e%100!==0}class pA extends je{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return 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=e0(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 gA extends je{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return 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=af(n,s);if(o.isTwoDigitYear){const l=e0(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 yA extends je{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Aa(r==="R"?4:r.length,n)}set(n,r,o){const s=Ze(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),Bo(s)}}class vA extends je{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Aa(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class bA extends je{constructor(){super(...arguments);ie(this,"priority",120);ie(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return 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 xA extends je{constructor(){super(...arguments);ie(this,"priority",120);ie(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return 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 wA extends je{constructor(){super(...arguments);ie(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ie(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return 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 SA extends je{constructor(){super(...arguments);ie(this,"priority",110);ie(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return 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 TA(e,t,n){const r=Ne(e),o=qb(r,n)-t;return r.setDate(r.getDate()-o*7),r}class EA extends je{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return 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(TA(n,o,s),s)}}function CA(e,t){const n=Ne(e),r=Yb(n)-t;return n.setDate(n.getDate()-r*7),n}class RA extends je{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return 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 Bo(CA(n,o))}}const PA=[31,28,31,30,31,30,31,31,30,31,30,31],kA=[31,29,31,30,31,30,31,31,30,31,30,31];class IA extends je{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subPriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return 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=t0(o),i=n.getMonth();return s?r>=1&&r<=kA[i]:r>=1&&r<=PA[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class AA extends je{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subpriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return 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 t0(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function cf(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=Ne(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 ls(s,u)}class OA extends je{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=cf(n,o,s),n.setHours(0,0,0,0),n}}class _A extends je{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return 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=cf(n,o,s),n.setHours(0,0,0,0),n}}class DA extends je{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return 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=cf(n,o,s),n.setHours(0,0,0,0),n}}function MA(e,t){const n=Ne(e),r=aA(n),o=t-r;return ls(n,o)}class NA extends je{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return 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=MA(n,o),n.setHours(0,0,0,0),n}}class jA extends je{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(lf(o),0,0,0),n}}class LA extends je{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(lf(o),0,0,0),n}}class FA extends je{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(lf(o),0,0,0),n}}class VA extends je{constructor(){super(...arguments);ie(this,"priority",70);ie(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 $A extends je{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return 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 BA extends je{constructor(){super(...arguments);ie(this,"priority",70);ie(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 WA extends je{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return 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 zA extends je{constructor(){super(...arguments);ie(this,"priority",60);ie(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 HA extends je{constructor(){super(...arguments);ie(this,"priority",50);ie(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 UA extends je{constructor(){super(...arguments);ie(this,"priority",30);ie(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return mt(ut(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class GA extends je{constructor(){super(...arguments);ie(this,"priority",10);ie(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:Ze(n,n.getTime()-Ia(n)-o)}}class YA extends je{constructor(){super(...arguments);ie(this,"priority",10);ie(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:Ze(n,n.getTime()-Ia(n)-o)}}class qA extends je{constructor(){super(...arguments);ie(this,"priority",40);ie(this,"incompatibleTokens","*")}parse(n){return Jb(n)}set(n,r,o){return[Ze(n,o*1e3),{timestampIsSet:!0}]}}class KA extends je{constructor(){super(...arguments);ie(this,"priority",20);ie(this,"incompatibleTokens","*")}parse(n){return Jb(n)}set(n,r,o){return[Ze(n,o),{timestampIsSet:!0}]}}const ZA={G:new mA,y:new pA,Y:new gA,R:new yA,u:new vA,Q:new bA,q:new xA,M:new wA,L:new SA,w:new EA,I:new RA,d:new IA,D:new AA,E:new OA,e:new _A,c:new DA,i:new NA,a:new jA,b:new LA,B:new FA,h:new VA,H:new $A,K:new BA,k:new WA,m:new zA,s:new HA,S:new UA,X:new GA,x:new YA,t:new qA,T:new KA},XA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JA=/^'([^]*?)'?$/,eO=/''/g,tO=/\S/,nO=/[a-zA-Z]/;function rO(e,t,n,r){var m,y,b,v;const o=iA(),s=o.locale??Gb,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((v=(b=o.locale)==null?void 0:b.options)==null?void 0:v.weekStartsOn)??0;if(t==="")return e===""?Ne(n):Ze(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new hA],u=t.match(QA).map(g=>{const T=g[0];if(T in Su){const S=Su[T];return S(g,s.formatLong)}return g}).join("").match(XA),d=[];for(let g of u){Xb(g)&&Tu(g,t,e),Zb(g)&&Tu(g,t,e);const T=g[0],S=ZA[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 Ze(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(nO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=oO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Ze(n,NaN)}}if(e.length>0&&tO.test(e))return Ze(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=Ne(n);if(isNaN(h.getTime()))return Ze(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Ze(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return Ze(n,h)}function oO(e){return e.match(JA)[1].replace(eO,"'")}function sO(e,t){const n=Ne(e),r=Ne(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function iO(e){return uI(e,cI(e))}function aO(e,t){return ls(e,-t)}function n0(e,t){return wl(e,-t)}function lO(e,t){return Bb(e,-t)}function cO(e,t){return Wb(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 uf(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 Eu(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 ei=function(e){return e.replace(new RegExp(" ","g")," ")},r0=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)},uO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},o0=function(e,t,n){var r=e.length-2,o=uO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},s0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Oa=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},dO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},uc=function(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t},fO=function(e){return e==="money"||e==="currency"},hO=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:""})},Hi=function(e,t){var n=r0(s0(e),t.fraction.length),r="".concat(t.currency).concat(o0(n,t.group,t.decimal));return ei(r)},mO=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=uf(e,["locale","currency","currencyDisplay","mask","onChange"]),u=x.useRef(null);x.useImperativeHandle(t,function(){return u.current});var d=x.useMemo(function(){var p=hO(r,s,a);return p.currency=ei("".concat(p.currency.trim()," ")),p.literal=ei(p.literal.trim()),p},[r,s]),f=function(p){var m=Hi(p.target.value,d),y=Oa(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)};x.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Hi(p,d),y=Oa(m);u.current.value=m,u.current.setAttribute("data-number",y.toString());var b=new InputEvent("change",{});l==null||l(pt(pt({},b),{target:u.current,currentTarget:u.current})),y!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?Hi(c.defaultValue,d):void 0;return x.createElement("input",pt({},c,{value:typeof c.value=="string"?Hi(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),pO=1,gO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},yO=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:""})},Ui=function(e,t){var n=r0(s0(e),t.fraction.length),r="".concat(o0(n,t.group,t.decimal)," ").concat(t.percentSign);return ei(r)},vO=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=uf(e,["locale","mask","onChange","onKeyUp"]),a=x.useRef(null),l=Eu(x.useState(function(){var b,v;return(v=(b=i.value)===null||b===void 0?void 0:b.toString())!==null&&v!==void 0?v:""}),2),c=l[0],u=l[1];x.useImperativeHandle(t,function(){return a.current}),x.useEffect(function(){var b,v=Number.parseFloat("".concat((b=i.value)!==null&&b!==void 0?b:"0")).toFixed(d.fraction.length);u(Ui(v,d))},[i.value]);var d=x.useMemo(function(){var b=yO(r);return b.percentSign=ei("".concat(b.percentSign)),b},[r]),f=c.length-d.percentSign.length-pO,h=function(b){var v,g=a.current;g&&(g.setSelectionRange(f,f),b&&((v=i.onFocus)===null||v===void 0||v.call(i,b)))},p=function(b){var v=b.currentTarget;if(v.selectionStart!==null){var g=v.selectionStart,T=v.selectionEnd,S=g!==T,E=f<g;!S&&E&&h()}s==null||s(b)},m=function(b){var v=Ui(b.target.value,d),g=Oa(v);u(v),b.target.value=v,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 v=Ui(b,d),g=Oa(v);u(v),a.current.value=v,a.current.setAttribute("data-number",g.toString());var T=new InputEvent("change",{});o==null||o(pt(pt({},T),{target:a.current,currentTarget:a.current}))}}},[]),x.useEffect(function(){return h()},[c]);var y=i.defaultValue?Ui(i.defaultValue,d):void 0;return x.createElement("input",pt({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),ks={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},bO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=_a[s];i===void 0?r.push(s.replace(ks.dots,"\\.").replace(ks.openParenthesis,"\\(").replace(ks.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ks.leadingBars,"\\")},Vs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Cu(o,n);var s=bO(o);return n?"^".concat(s,"$"):s},xO=function(e){return e.replace(ks.escape,"\\$&")},Cu=function(e,t){var n=e.map(function(r){return typeof r=="string"?xO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},_a={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]/}},wO=/\d/,dp="(dd) 9dddd-dddd",fp="(dd) dddd-dddd",hp="ddd.ddd.ddd-dd",mp="dd.ddd.ddd/dddd-dd",la=function(e){return e.replace(/\D/g,"")},SO=["2",/[0-3]/,":",/[0-5]/,/\d/],TO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Wt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:hp,isoDate:"dddd-dd-dd",cnpj:mp,telephone:fp,cellphone:dp,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return la(e).length<=11?hp:mp},int:function(e){return e===void 0&&(e=""),wO.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=la(e);return t.length<11?fp:dp},time:function(e){var t=la(e),n=t[0];return n==="2"?SO:TO}},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:Vs(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:la}),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 pp(e,t,n,r){var o,s;r===void 0&&(r=_a);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 gp=function(e){return e},EO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Vs(e,n,t));return r.test(n)};function CO(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t.current}var RO=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=uf(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=x.useRef(null);x.useImperativeHandle(t,function(){return p.current});var m=uc(a),y=uc(d),b=uc(u),v=x.useRef(EO(u,s,h.value||h.defaultValue)),g=f??"input",T=Eu(x.useState(""),2),S=T[0],E=T[1],C=CO(S),k=x.useCallback(function(D,N){var M,V,z=(M=D??N)!==null&&M!==void 0?M:"";if(u===void 0)return z;var _=(V=z==null?void 0:z.toString())!==null&&V!==void 0?V:"";return pp(_,typeof u=="function"?u(_):u,i??gp,c??_a)},[i,u,c]),I=Eu(x.useState(function(){return k(h.value,h.defaultValue)}),2),A=I[0],j=I[1],O=k(h.defaultValue,h.defaultValue),L=x.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var D=u(A);return Array.isArray(D)?Cu(D,s):Vs(u,A,s)}return typeof u=="string"?Vs(u,A,s):Cu(u,s)},[l,A,s,u]);x.useEffect(function(){if(h.value!==void 0){var D=k(h.value,h.defaultValue);j(D),p.current!==null&&(p.current.value=D)}},[h.value,u,i,h.defaultValue]);var P=function(D){var N,M,V,z,_,$=D.currentTarget,Z=D.target.value;if(b.current===void 0)return j(Z),(N=y.current)===null||N===void 0||N.call(y,Z),(M=m.current)===null||M===void 0||M.call(m,D),d==null?void 0:d(Z);var ee=new RegExp(Vs(b.current,Z,s)),J=(V=$.selectionEnd)!==null&&V!==void 0?V:0,U=function(Q,ce,H){if(Q.type!=="number")return Q.setSelectionRange(ce,H)};if(r&&v.current&&Z.length>=A.length)return $.value=A,U($,J-1,J-1);var F=!1;Z.length<C.length&&(v.current=!1,F=!0),ee.test(Z)&&(v.current=!0);var B=J,W=Z[B-1],G=pp(Z,typeof b.current=="function"?b.current(Z):b.current,i??gp,c??_a);for($.value=G,j(G);B<G.length&&G.charAt(B-1)!==W;)B+=1;F?U($,J,J):U($,B,B),D.target.value=G,E(G),(z=y.current)===null||z===void 0||z.call(y,G),(_=m.current)===null||_===void 0||_.call(m,D)};return x.createElement(g,pt({},h,{ref:p,pattern:L,onChange:P,defaultValue:yp(h.defaultValue)?O:void 0,value:yp(h.value)?k(h.value,h.value):h.value}))}),yp=function(e){return typeof e=="string"},i0=x.forwardRef(function(e,t){return fO(e.mask)?x.createElement(mO,pt({},e,{mask:void 0,ref:t})):gO(e.mask)?x.createElement(vO,pt({},e,{mask:void 0,ref:t})):x.createElement(RO,pt({},e,{ref:t}))}),Gt=function(e){return function(t){return x.createElement(i0,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 a0=x.forwardRef(function(t,n){var r=x.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&dO(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=pt(pt({},t),r);return x.createElement(i0,pt({},o,{ref:n}))}),dc={},fc={exports:{}},hc={};/**
137
+ */const af=gt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ap={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},eA={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:ap,exit:ap.false,transition:eA,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Me("aria-hidden:pointer-events-none",e.className),children:e.children}),tA=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"}}),nA=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 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(tA({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(Xk,{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(af,{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 Sl(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,rA=864e5,oA=6e4,sA=36e5,iA=1e3;let aA={};function Kr(){return aA}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 Ia(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 lA(e,t){const n=zo(e),r=zo(t),o=+n-Ia(n),s=+r-Ia(r);return Math.round((o-s)/rA)}function cA(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 Sl(e,t*12)}function uA(e){return Xe(e,Date.now())}function dA(e,t){const n=zo(e),r=zo(t);return+n==+r}function fA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Hb(e){if(!fA(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 hA(e){const t=De(e),n=Xe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function mA(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 pA={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"}},gA=(e,t,n)=>{let r;const o=pA[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 uc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const yA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},bA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xA={date:uc({formats:yA,defaultWidth:"full"}),time:uc({formats:vA,defaultWidth:"full"}),dateTime:uc({formats:bA,defaultWidth:"full"})},wA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},SA=(e,t,n,r)=>wA[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 TA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},EA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CA={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"]},RA={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"]},PA={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"}},kA={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"}},AA=(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"},IA={ordinalNumber:AA,era:Es({values:TA,defaultWidth:"wide"}),quarter:Es({values:EA,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Es({values:CA,defaultWidth:"wide"}),day:Es({values:RA,defaultWidth:"wide"}),dayPeriod:Es({values:PA,defaultWidth:"wide",formattingValues:kA,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)?_A(a,d=>d.test(i)):OA(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 OA(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function _A(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function MA(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 DA=/^(\d+)(th|st|nd|rd)?/i,NA=/\d+/i,jA={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},LA={any:[/^b/i,/^(a|c)/i]},FA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},VA={any:[/1/i,/2/i,/3/i,/4/i]},$A={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},BA={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]},WA={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},zA={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]},HA={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},UA={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}},GA={ordinalNumber:MA({matchPattern:DA,parsePattern:NA,valueCallback:e=>parseInt(e,10)}),era:Cs({matchPatterns:jA,defaultMatchWidth:"wide",parsePatterns:LA,defaultParseWidth:"any"}),quarter:Cs({matchPatterns:FA,defaultMatchWidth:"wide",parsePatterns:VA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cs({matchPatterns:$A,defaultMatchWidth:"wide",parsePatterns:BA,defaultParseWidth:"any"}),day:Cs({matchPatterns:WA,defaultMatchWidth:"wide",parsePatterns:zA,defaultParseWidth:"any"}),dayPeriod:Cs({matchPatterns:HA,defaultMatchWidth:"any",parsePatterns:UA,defaultParseWidth:"any"})},Yb={code:"en-US",formatDistance:gA,formatLong:xA,formatRelative:SA,localize:IA,match:GA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function YA(e){const t=De(e);return lA(t,hA(t))+1}function qb(e){const t=De(e),n=+Wo(t)-+cA(t);return Math.round(n/$b)+1}function lf(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 qA(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=lf(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)-+qA(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"},lp={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=lf(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=YA(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 up(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 up(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"+cp(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"+cp(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 cp(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 up(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 dp=(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"})}},KA=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return dp(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}}",dp(r,t)).replace("{{time}}",Zb(o,t))},Tu={p:Zb,P:KA},ZA=/^D+$/,XA=/^Y+$/,QA=["D","DD","YY","YYYY"];function Xb(e){return ZA.test(e)}function Qb(e){return XA.test(e)}function Eu(e,t,n){const r=JA(e,t,n);if(console.warn(r),QA.includes(e))throw new RangeError(r)}function JA(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 eI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nI=/^'([^]*?)'?$/,rI=/''/g,oI=/[a-zA-Z]/;function sI(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(tI).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=Tu[m];return y(p,o.formatLong)}return p}).join("").match(eI).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:iI(p)};if(lp[m])return{isToken:!0,value:p};if(m.match(oI))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))&&Eu(m,t,String(e));const y=lp[m[0]];return y(a,m,o.localize,c)}).join("")}function iI(e){const t=e.match(nI);return t?t[1].replace(rI,"'"):e}function aI(){return Object.assign({},Kr())}function lI(e){let n=De(e).getDay();return n===0&&(n=7),n}function cI(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function uI(e,t){const n=De(e),r=De(t);return+n<+r}function dI(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 fI=10;class Jb{constructor(){ae(this,"subPriority",0)}validate(t,n){return!0}}class hI 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 mI extends Jb{constructor(){super(...arguments);ae(this,"priority",fI);ae(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Xe(n,dI(n,Date))}}class Ne{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new hI(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class pI 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*sA+s*oA+i*iA),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 Oa(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 cf(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 gI 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 yI 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=lf(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 vI 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 Oa(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 bI 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 Oa(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class xI 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 wI 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 SI 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 TI 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 EI(e,t,n){const r=De(e),o=Kb(r,n)-t;return r.setDate(r.getDate()-o*7),r}class CI 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(EI(n,o,s),s)}}function RI(e,t){const n=De(e),r=qb(n)-t;return n.setDate(n.getDate()-r*7),n}class PI 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(RI(n,o))}}const kI=[31,28,31,30,31,30,31,31,30,31,30,31],AI=[31,29,31,30,31,30,31,31,30,31,30,31];class II 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<=AI[i]:r>=1&&r<=kI[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class OI 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 uf(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 _I 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=uf(n,o,s),n.setHours(0,0,0,0),n}}class MI 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=uf(n,o,s),n.setHours(0,0,0,0),n}}class DI 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=uf(n,o,s),n.setHours(0,0,0,0),n}}function NI(e,t){const n=De(e),r=lI(n),o=t-r;return cs(n,o)}class jI 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=NI(n,o),n.setHours(0,0,0,0),n}}class LI 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(cf(o),0,0,0),n}}class FI 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(cf(o),0,0,0),n}}class VI 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(cf(o),0,0,0),n}}class $I 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 BI 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 WI 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 zI 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 HI 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 UI 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 GI 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 YI 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()-Ia(n)-o)}}class qI 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()-Ia(n)-o)}}class KI 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 ZI 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 XI={G:new pI,y:new gI,Y:new yI,R:new vI,u:new bI,Q:new xI,q:new wI,M:new SI,L:new TI,w:new CI,I:new PI,d:new II,D:new OI,E:new _I,e:new MI,c:new DI,i:new jI,a:new LI,b:new FI,B:new VI,h:new $I,H:new BI,K:new WI,k:new zI,m:new HI,s:new UI,S:new GI,X:new YI,x:new qI,t:new KI,T:new ZI},QI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eO=/^'([^]*?)'?$/,tO=/''/g,nO=/\S/,rO=/[a-zA-Z]/;function oO(e,t,n,r){var m,y,b,v;const o=aI(),s=o.locale??Yb,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((v=(b=o.locale)==null?void 0:b.options)==null?void 0:v.weekStartsOn)??0;if(t==="")return e===""?De(n):Xe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new mI],u=t.match(JI).map(g=>{const T=g[0];if(T in Tu){const w=Tu[T];return w(g,s.formatLong)}return g}).join("").match(QI),d=[];for(let g of u){Qb(g)&&Eu(g,t,e),Xb(g)&&Eu(g,t,e);const T=g[0],w=XI[T];if(w){const{incompatibleTokens:E}=w;if(Array.isArray(E)){const k=d.find(A=>E.includes(A.token)||A.token===T);if(k)throw new RangeError(`The format string mustn't contain \`${k.fullToken}\` and \`${g}\` at the same time`)}else if(w.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=w.run(e,g,s.match,l);if(!C)return Xe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(rO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=sO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Xe(n,NaN)}}if(e.length>0&&nO.test(e))return Xe(n,NaN);const f=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,w)=>w.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,w)=>w.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 sO(e){return e.match(eO)[1].replace(tO,"'")}function iO(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function aO(e){return dA(e,uA(e))}function lO(e,t){return cs(e,-t)}function r0(e,t){return Sl(e,-t)}function cO(e,t){return Wb(e,-t)}function uO(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 df(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 Cu(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 ti=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)},dO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},s0=function(e,t,n){var r=e.length-2,o=dO(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,"")||""},_a=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},fO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},dc=function(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t},hO=function(e){return e==="money"||e==="currency"},mO=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:""})},Ui=function(e,t){var n=o0(i0(e),t.fraction.length),r="".concat(t.currency).concat(s0(n,t.group,t.decimal));return ti(r)},pO=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=df(e,["locale","currency","currencyDisplay","mask","onChange"]),u=x.useRef(null);x.useImperativeHandle(t,function(){return u.current});var d=x.useMemo(function(){var p=mO(r,s,a);return p.currency=ti("".concat(p.currency.trim()," ")),p.literal=ti(p.literal.trim()),p},[r,s]),f=function(p){var m=Ui(p.target.value,d),y=_a(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)};x.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Ui(p,d),y=_a(m);u.current.value=m,u.current.setAttribute("data-number",y.toString());var b=new InputEvent("change",{});l==null||l(pt(pt({},b),{target:u.current,currentTarget:u.current})),y!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?Ui(c.defaultValue,d):void 0;return x.createElement("input",pt({},c,{value:typeof c.value=="string"?Ui(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),gO=1,yO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},vO=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:""})},Gi=function(e,t){var n=o0(i0(e),t.fraction.length),r="".concat(s0(n,t.group,t.decimal)," ").concat(t.percentSign);return ti(r)},bO=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=df(e,["locale","mask","onChange","onKeyUp"]),a=x.useRef(null),l=Cu(x.useState(function(){var b,v;return(v=(b=i.value)===null||b===void 0?void 0:b.toString())!==null&&v!==void 0?v:""}),2),c=l[0],u=l[1];x.useImperativeHandle(t,function(){return a.current}),x.useEffect(function(){var b,v=Number.parseFloat("".concat((b=i.value)!==null&&b!==void 0?b:"0")).toFixed(d.fraction.length);u(Gi(v,d))},[i.value]);var d=x.useMemo(function(){var b=vO(r);return b.percentSign=ti("".concat(b.percentSign)),b},[r]),f=c.length-d.percentSign.length-gO,h=function(b){var v,g=a.current;g&&(g.setSelectionRange(f,f),b&&((v=i.onFocus)===null||v===void 0||v.call(i,b)))},p=function(b){var v=b.currentTarget;if(v.selectionStart!==null){var g=v.selectionStart,T=v.selectionEnd,w=g!==T,E=f<g;!w&&E&&h()}s==null||s(b)},m=function(b){var v=Gi(b.target.value,d),g=_a(v);u(v),b.target.value=v,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 v=Gi(b,d),g=_a(v);u(v),a.current.value=v,a.current.setAttribute("data-number",g.toString());var T=new InputEvent("change",{});o==null||o(pt(pt({},T),{target:a.current,currentTarget:a.current}))}}},[]),x.useEffect(function(){return h()},[c]);var y=i.defaultValue?Gi(i.defaultValue,d):void 0;return x.createElement("input",pt({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),As={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},xO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Ma[s];i===void 0?r.push(s.replace(As.dots,"\\.").replace(As.openParenthesis,"\\(").replace(As.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(As.leadingBars,"\\")},$s=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Ru(o,n);var s=xO(o);return n?"^".concat(s,"$"):s},wO=function(e){return e.replace(As.escape,"\\$&")},Ru=function(e,t){var n=e.map(function(r){return typeof r=="string"?wO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ma={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]/}},SO=/\d/,fp="(dd) 9dddd-dddd",hp="(dd) dddd-dddd",mp="ddd.ddd.ddd-dd",pp="dd.ddd.ddd/dddd-dd",ca=function(e){return e.replace(/\D/g,"")},TO=["2",/[0-3]/,":",/[0-5]/,/\d/],EO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Wt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:mp,isoDate:"dddd-dd-dd",cnpj:pp,telephone:hp,cellphone:fp,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ca(e).length<=11?mp:pp},int:function(e){return e===void 0&&(e=""),SO.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=ca(e);return t.length<11?hp:fp},time:function(e){var t=ca(e),n=t[0];return n==="2"?TO:EO}},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:ca}),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 gp(e,t,n,r){var o,s;r===void 0&&(r=Ma);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 yp=function(e){return e},CO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp($s(e,n,t));return r.test(n)};function RO(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e},[e]),t.current}var PO=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=df(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=x.useRef(null);x.useImperativeHandle(t,function(){return p.current});var m=dc(a),y=dc(d),b=dc(u),v=x.useRef(CO(u,s,h.value||h.defaultValue)),g=f??"input",T=Cu(x.useState(""),2),w=T[0],E=T[1],C=RO(w),k=x.useCallback(function(M,N){var D,V,z=(D=M??N)!==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 gp(_,typeof u=="function"?u(_):u,i??yp,c??Ma)},[i,u,c]),A=Cu(x.useState(function(){return k(h.value,h.defaultValue)}),2),I=A[0],j=A[1],O=k(h.defaultValue,h.defaultValue),L=x.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var M=u(I);return Array.isArray(M)?Ru(M,s):$s(u,I,s)}return typeof u=="string"?$s(u,I,s):Ru(u,s)},[l,I,s,u]);x.useEffect(function(){if(h.value!==void 0){var M=k(h.value,h.defaultValue);j(M),p.current!==null&&(p.current.value=M)}},[h.value,u,i,h.defaultValue]);var P=function(M){var N,D,V,z,_,$=M.currentTarget,Z=M.target.value;if(b.current===void 0)return j(Z),(N=y.current)===null||N===void 0||N.call(y,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&&v.current&&Z.length>=I.length)return $.value=I,G($,ee-1,ee-1);var F=!1;Z.length<C.length&&(v.current=!1,F=!0),re.test(Z)&&(v.current=!0);var B=ee,H=Z[B-1],Y=gp(Z,typeof b.current=="function"?b.current(Z):b.current,i??yp,c??Ma);for($.value=Y,j(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=y.current)===null||z===void 0||z.call(y,Y),(_=m.current)===null||_===void 0||_.call(m,M)};return x.createElement(g,pt({},h,{ref:p,pattern:L,onChange:P,defaultValue:vp(h.defaultValue)?O:void 0,value:vp(h.value)?k(h.value,h.value):h.value}))}),vp=function(e){return typeof e=="string"},a0=x.forwardRef(function(e,t){return hO(e.mask)?x.createElement(pO,pt({},e,{mask:void 0,ref:t})):yO(e.mask)?x.createElement(bO,pt({},e,{mask:void 0,ref:t})):x.createElement(PO,pt({},e,{ref:t}))}),Gt=function(e){return function(t){return x.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=x.forwardRef(function(t,n){var r=x.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&fO(jt,t.mask)?jt[t.mask]:{mask:t.mask}},[t.mask]),o=pt(pt({},t),r);return x.createElement(a0,pt({},o,{ref:n}))}),fc={},hc={exports:{}},mc={};/**
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 vp;function PO(){if(vp)return hc;vp=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,y=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&y({inst:m})},[d,h,f]),o(function(){return l(m)&&y({inst:m}),d(function(){l(m)&&y({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return hc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,hc}var bp={};/**
145
+ */var bp;function kO(){if(bp)return mc;bp=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,y=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&y({inst:m})},[d,h,f]),o(function(){return l(m)&&y({inst:m}),d(function(){l(m)&&y({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return mc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,mc}var xp={};/**
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 xp;function kO(){return xp||(xp=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 j=function(){h(I)&&A({inst:I})};return g(j)},[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",y=!m,b=y?p:f,v=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b;bp.useSyncExternalStore=v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),bp}var wp;function l0(){return wp||(wp=1,process.env.NODE_ENV==="production"?fc.exports=PO():fc.exports=kO()),fc.exports}/**
153
+ */var wp;function AO(){return wp||(wp=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,w=new Array(T>1?T-1:0),E=1;E<T;E++)w[E-1]=arguments[E];r("error",g,w)}}function r(g,T,w){{var E=t.ReactDebugCurrentFrame,C=E.getStackAddendum();C!==""&&(T+="%s",w=w.concat([C]));var k=w.map(function(A){return String(A)});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,w){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}}),A=k[0].inst,I=k[1];return l(function(){A.value=E,A.getSnapshot=T,h(A)&&I({inst:A})},[g,E,T]),a(function(){h(A)&&I({inst:A});var j=function(){h(A)&&I({inst:A})};return g(j)},[g]),c(E),E}function h(g){var T=g.getSnapshot,w=g.value;try{var E=T();return!s(w,E)}catch{return!0}}function p(g,T,w){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,b=y?p:f,v=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b;xp.useSyncExternalStore=v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),xp}var Sp;function c0(){return Sp||(Sp=1,process.env.NODE_ENV==="production"?hc.exports=kO():hc.exports=AO()),hc.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 Sp;function IO(){if(Sp)return dc;Sp=1;var e=x,t=l0();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 dc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function b(E){if(!v){if(v=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var C=m.value;if(h(C,E))return 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 v=!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 y=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},dc}var Tp={};/**
161
+ */var Tp;function IO(){if(Tp)return fc;Tp=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 fc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function b(E){if(!v){if(v=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var C=m.value;if(h(C,E))return 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 v=!1,g,T,w=d===void 0?null:d;return[function(){return b(u())},w===null?void 0:function(){return b(w())}]},[u,d,f,h]);var y=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},fc}var Ep={};/**
162
162
  * @license React
163
163
  * use-sync-external-store-shim/with-selector.development.js
164
164
  *
@@ -166,15 +166,15 @@
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 Ep;function AO(){return Ep||(Ep=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=l0();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var b=a(function(){var S=!1,E,C,k=function(O){if(!S){S=!0,E=O;var L=h(O);if(p!==void 0&&y.hasValue){var P=y.value;if(p(P,L))return C=P,P}return C=L,L}var D=E,N=C;if(r(D,O))return N;var M=h(O);return p!==void 0&&p(N,M)?N:(E=O,C=M,M)},I=f===void 0?null:f,A=function(){return k(d())},j=I===null?void 0:function(){return k(I())};return[A,j]},[d,f,h,p]),v=b[0],g=b[1],T=o(u,v,g);return i(function(){y.hasValue=!0,y.value=T},[T]),l(T),T}Tp.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Tp}process.env.NODE_ENV==="production"?IO():AO();const lo=e=>{const t=x.useRef(e??{});return x.useEffect(()=>void(t.current=e),[e]),t},OO=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current},_O=e=>Object.entries(e),c0=e=>e instanceof Promise,u0=(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),DO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>u0(u,f,s,d));return c0(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))},MO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>u0(c,u,s,o.current));return c0(a)?a.then(c=>l(c)):l(a)},df=(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=OO(r),f=lo(d),h=x.useRef(null);x.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,d,m)})},[r,l,d]);const[p]=x.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return _O(y).reduce((b,[v,g])=>({...b,[v]:n!=null&&n.debug?DO(v,g,o,m,h,c.current):MO(v,g,o,m,h,c.current)}),{})});return[r,p,i.current]},NO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function jO(e,t){return x.useRef(NO(e,t)).current}const Sl={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>)`},So=(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(So(i,t,n,a))},[]),d0=(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]:d0(i,t,n,a)}},{}),Cp={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Da=(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)},LO={default:e=>Da(e,{result:Cp.default}),dark:e=>Da(e,{result:Cp.dark})},ff=(e,t)=>{const n=a=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return a?a(d):d},r=So(e.colors,n(t==null?void 0:t.colors)),o=So(e.spacing,n(t==null?void 0:t.spacing)),s=So(e.rounded,n(t==null?void 0:t.rounded)),i=e.custom?So(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,s,i)},FO=(e,t)=>Da(ff(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),VO=(e,t)=>ff(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),$O=(e,t)=>Da(ff(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),f0={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},h0={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"},BO={name:"dark",rounded:f0,spacing:h0,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",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%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},WO={rounded:f0,spacing:h0,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",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:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},zO=BO,HO=WO,hf={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",multiComboboxSelectedLabel:"Selected",multiComboboxInnerPlaceholder:"Search..."},mf={inputIconFeedback:!0},Ti=x.createContext({tweaks:mf,parser:Sl.hsla,map:hf,locale:void 0}),UO=e=>{const t=x.useMemo(()=>({locale:e.locale,tweaks:{...mf,...e.tweaks},colorTokenParser:e.parser||Sl.hsla,map:{...hf,...e.map}}),[e]);return w.jsx(Ti.Provider,{value:t,children:e.children})},pf=e=>{if(e)return e;const t=x.useContext(Ti);if(t)return t.locale||e},Et=()=>{const e=x.useContext(Ti);return e?e.map:hf},GO=()=>{const e=x.useContext(Ti);return e?e.parser:Sl.hsla},YO=()=>{const e=x.useContext(Ti);return e?e.tweaks:mf},qO={type:"spring",bounce:.3,duration:.6},Rp=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),m0={middle:{x:"0%",opacity:1},enter:Rp(1),exit:Rp(-1)},Pp={exit:{visibility:"hidden"}},KO=e=>{const t=On(Ub(e));return Hb({start:t,end:ls(t,41)})},p0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),ZO=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=Ub(new Date(1970,o,1).setMonth(o)),i=p0(s,n);return w.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),mc={ArrowLeft:(e,t)=>t==="days"?aO(e,1):n0(e,1),ArrowRight:(e,t)=>t==="days"?ls(e,1):wl(e,1),ArrowUp:(e,t)=>t==="days"?lO(e,1):cO(e,1),ArrowDown:(e,t)=>t==="days"?Bb(e,1):Wb(e,1)},kp=(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"),XO=(e,t,n)=>e===void 0||n===void 0?!1:lA(t,e)&&cA(t,n),QO=e=>{var n;const t=Et();return w.jsx(lt.tbody,{layout:!0,variants:m0,custom:e.direction,onKeyDown:e.onKeyDown,className:$e((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var s;return w.jsx("tr",{className:(s=e.styles)==null?void 0:s.week,children:r.map(i=>{var h,p,m,y,b,v,g,T,S,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===((y=(m=e.range)==null?void 0:m.from)==null?void 0:y.toISOString()):a===((b=e.date)==null?void 0:b.toISOString()),c=iO(i)&&e.markToday,u=((v=e.disabledDate)==null?void 0:v.call(e,i))||!1,d=!sO(i,e.stateDate)||u,f=e.rangeMode?XO((g=e.range)==null?void 0:g.from,i,(T=e.range)==null?void 0:T.to):!1;return w.jsxs("td",{align:"center",className:$e("relative",(S=e.styles)==null?void 0:S.dayFrame),children:[w.jsxs("button",{type:"button","data-date":a,disabled:u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:$e(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${d?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,f&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((C=e.stateRange.from)==null?void 0:C.toISOString())===a?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.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?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((A=e.labelRange)==null?void 0:A.to)??t.calendarToDate})}):null]}),e.RenderOnDay?w.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},g0=({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(vi()),p=Et(),m=pf(o),y=x.useRef(null),{date:b,range:v}=f,g=b||new Date,T=x.useRef(null),[S,E]=df({date:g,isAnimating:!1,year:Tr(g),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:ZO(h.current,g,m),selectMode:l?"from":void 0,week:Hb({start:On(g),end:hI(g)})},O=>({onChangeYear:L=>({year:L}),setToday:()=>({date:Wo(new Date)}),onExitComplete:()=>(kp(T.current||null,y,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 D=wl(P.date,1);return{date:D,isAnimating:!0,direction:1,year:Tr(D)}},previousMonth:L=>{T.current=L.currentTarget;const P=O.state();if(P.isAnimating)return P;const D=n0(P.date,1);return{date:D,isAnimating:!0,direction:-1,year:Tr(D)}},onSelectDate:L=>{const P=O.state(),D=L.currentTarget.dataset.range==="true",N=L.currentTarget.dataset.date||"",M=new Date(N);return{date:M,year:Tr(M),selectMode:P.selectMode===void 0?void 0:P.selectMode==="from"?"to":"from",range:D?{from:P.selectMode==="from"?M:P.range.from,to:P.selectMode==="to"?M:P.range.to}:P.range}},onChangeMonth:L=>{const P=L.target.value,N=Array.from(L.target.options).find(V=>V.value===P),M=O.state();if(N){const V=N.dataset.index||"",z=new Date(O.state().date);return z.setMonth(+V),{...M,date:z,year:Tr(z)}}return M},onKeyDown:L=>{const P=L.key,D=O.state();if(P in mc){(P==="ArrowUp"||P==="ArrowDown")&&L.preventDefault();const N=O.state().date,M=Pt.keyof(mc,P)?mc[P](N,L.shiftKey?"month":"days"):null;if(M!==null)return kp(L.target,y,M),{...D,date:M,year:Tr(M)}}return O.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(O,L,P)=>{var N,M;return(P.method==="onChangeMonth"||P.method==="previousMonth"||P.method==="nextMonth")&&((M=(N=P.props).onChangeMonth)==null||M.call(N,O.date)),O},(O,L,P)=>{var N,M;return P.method==="onChangeYear"&&((M=(N=P.props).onChangeYear)==null||M.call(N,O.date)),O},(O,L,P)=>{const D=P.method==="onSelectDate"||P.method==="setToday"||P.method==="onKeyDown";return l&&D&&t?(c==null||c(O.range),O):(D&&t&&(c==null||c(O.date)),O)}]}),C=By(KO(S.date),7),k=S.date.toISOString(),I=p0(S.date,m);x.useEffect(()=>{t||c==null||c(S.date)},[k]);const A=jO(O=>{E.date(L=>{const P=new Date(L);return P.setFullYear(+O),P})},1200),j=O=>{const L=O.currentTarget.value;E.onChangeYear(L),a==null||a(new Date(L)),A(L)};return w.jsx(YT,{transition:qO,children:w.jsxs("div",{"data-component":"calendar",ref:y,className:$e("relative overflow-hidden",u==null?void 0:u.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(fr,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:E.onExitComplete,children:w.jsxs(lt.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(lt.button,{type:"button",layout:!0,"data-focustrap":"prev",variants:Pp,onClick:E.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(Hk,{className:"h-4 w-4"})}),w.jsx(lt.span,{layout:!0,variants:m0,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",{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:S.months}),w.jsx(a0,{mask:"int",maxLength:4,placeholder:"YYYY",value:S.year,onChange:j,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(lt.button,{layout:!0,type:"button","data-focustrap":"next",variants:Pp,onClick:E.nextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(rf,{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(lt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:S.week.map(O=>w.jsx("th",{className:$e("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:O.toLocaleDateString(m,{weekday:"short"})},O.toString()))})}),w.jsx(QO,{zip:C,range:v,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})]})]},I)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:E.setToday,children:p.calendarToday})})]})})},y0=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>w.jsxs(os,{...a,as:r,"data-componen":"card",className:$e("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?w.jsx("header",{className:$e("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,w.jsx("div",{className:$e("min-w-full px-8",i),children:e})]}),v0=e=>{const t=e.Icon??jb,n=Et();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 JO(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function b0(...e){return t=>e.forEach(n=>JO(n,t))}function Br(...e){return R.useCallback(b0(...e),e)}function x0(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,y=R.useMemo(()=>p,Object.values(p));return w.jsx(m.Provider,{value:y,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,e_(o,...t)]}function e_(...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 zo=R.forwardRef((e,t)=>{const{children:n,...r}=e,o=R.Children.toArray(n),s=o.find(n_);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(Ru,{...r,ref:t,children:R.isValidElement(i)?R.cloneElement(i,void 0,a):null})}return w.jsx(Ru,{...r,ref:t,children:n})});zo.displayName="Slot";var Ru=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=o_(n);return R.cloneElement(n,{...r_(r,n.props),ref:t?b0(t,o):o})}return R.Children.count(n)>1?R.Children.only(null):null});Ru.displayName="SlotClone";var t_=({children:e})=>w.jsx(w.Fragment,{children:e});function n_(e){return R.isValidElement(e)&&e.type===t_}function r_(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 o_(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 s_(e){const t=e+"CollectionProvider",[n,r]=x0(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,y=x.useRef(null),b=x.useRef(new Map).current;return w.jsx(o,{scope:p,itemMap:b,collectionRef:y,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=x.forwardRef((h,p)=>{const{scope:m,children:y}=h,b=s(a,m),v=Br(p,b.collectionRef);return w.jsx(zo,{ref:v,children:y})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=x.forwardRef((h,p)=>{const{scope:m,children:y,...b}=h,v=x.useRef(null),g=Br(p,v),T=s(c,m);return x.useEffect(()=>(T.itemMap.set(v,{ref:v,...b}),()=>void T.itemMap.delete(v))),w.jsx(zo,{[u]:"",ref:g,children:y})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return x.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const b=Array.from(y.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 i_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Nn=i_.reduce((e,t)=>{const n=R.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?zo: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 w0(e,t){e&&mi.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 a_(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 l_="DismissableLayer",Pu="dismissableLayer.update",c_="dismissableLayer.pointerDownOutside",u_="dismissableLayer.focusOutside",Ip,S0=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),T0=R.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=R.useContext(S0),[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),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(y),v=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,T=v>=b,S=f_(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=h_(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 a_(C=>{v===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&&(Ip=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ap(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ip)}},[u,f,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ap())},[u,c]),R.useEffect(()=>{const C=()=>h({});return document.addEventListener(Pu,C),()=>document.removeEventListener(Pu,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)})});T0.displayName=l_;var d_="DismissableLayerBranch",E0=R.forwardRef((e,t)=>{const n=R.useContext(S0),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})});E0.displayName=d_;function f_(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(){C0(c_,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 h_(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&&C0(u_,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 Ap(){const e=new CustomEvent(Pu);document.dispatchEvent(e)}function C0(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?w0(o,s):o.dispatchEvent(s)}var m_=T0,p_=E0,Ma=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},g_="Portal",R0=R.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=R.useState(!1);Ma(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?hi.createPortal(w.jsx(Nn.div,{...r,ref:t}),i):null});R0.displayName=g_;function y_(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var P0=e=>{const{present:t,children:n}=e,r=v_(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),s=Br(r.ref,b_(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:s}):null};P0.displayName="Presence";function v_(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),s=R.useRef("none"),i=e?"mounted":"unmounted",[a,l]=y_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=Gi(r.current);s.current=a==="mounted"?c:"none"},[a]),Ma(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=Gi(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]),Ma(()=>{if(t){const c=d=>{const h=Gi(r.current).includes(d.animationName);d.target===t&&h&&mi.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=Gi(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 Gi(e){return(e==null?void 0:e.animationName)||"none"}function b_(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 x_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=w_({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 w_({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 S_="VisuallyHidden",gf=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}}));gf.displayName=S_;var yf="ToastProvider",[vf,T_,E_]=s_("Toast"),[k0,x$]=x0("Toast",[E_]),[C_,Tl]=k0(yf),I0=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 \`${yf}\`. Expected non-empty \`string\`.`),w.jsx(vf.Provider,{scope:t,children:w.jsx(C_,{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})})};I0.displayName=yf;var A0="ToastViewport",R_=["F8"],ku="toast.viewportPause",Iu="toast.viewportResume",O0=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=R_,label:o="Notifications ({hotkey})",...s}=e,i=Tl(A0,n),a=T_(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 y=b=>{var g;r.every(T=>b[T]||b.code===T)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),R.useEffect(()=>{const y=l.current,b=d.current;if(p&&y&&b){const v=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(ku);b.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Iu);b.dispatchEvent(E),i.isClosePausedRef.current=!1}},T=E=>{!y.contains(E.relatedTarget)&&g()},S=()=>{y.contains(document.activeElement)||g()};return y.addEventListener("focusin",v),y.addEventListener("focusout",T),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",S),window.addEventListener("blur",v),window.addEventListener("focus",g),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",T),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",S),window.removeEventListener("blur",v),window.removeEventListener("focus",g)}}},[p,i.isClosePausedRef]);const m=R.useCallback(({tabbingDirection:y})=>{const v=a().map(g=>{const T=g.ref.current,S=[T,...$_(T)];return y==="forwards"?S:S.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return R.useEffect(()=>{const y=d.current;if(y){const b=v=>{var S,E,C;const g=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!g){const k=document.activeElement,I=v.shiftKey;if(v.target===y&&I){(S=c.current)==null||S.focus();return}const O=m({tabbingDirection:I?"backwards":"forwards"}),L=O.findIndex(P=>P===k);pc(O.slice(L+1))?v.preventDefault():I?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[a,m]),w.jsxs(p_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&w.jsx(Au,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});pc(y)}}),w.jsx(vf.Slot,{scope:n,children:w.jsx(Nn.ol,{tabIndex:-1,...s,ref:f})}),p&&w.jsx(Au,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});pc(y)}})]})});O0.displayName=A0;var _0="ToastFocusProxy",Au=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Tl(_0,n);return w.jsx(gf,{"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()}})});Au.displayName=_0;var El="Toast",P_="toast.swipeStart",k_="toast.swipeMove",I_="toast.swipeCancel",A_="toast.swipeEnd",D0=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=x_({prop:r,defaultProp:o,onChange:s});return w.jsx(P0,{present:n||a,children:w.jsx(D_,{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=El;var[O_,__]=k0(El,{onClose(){}}),D_=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=Tl(El,n),[y,b]=R.useState(null),v=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,j=zn(()=>{var D;(y==null?void 0:y.contains(document.activeElement))&&((D=m.viewport)==null||D.focus()),i()}),O=R.useCallback(P=>{!P||P===1/0||(window.clearTimeout(k.current),E.current=new Date().getTime(),k.current=window.setTimeout(j,P))},[j]);R.useEffect(()=>{const P=m.viewport;if(P){const D=()=>{O(C.current),c==null||c()},N=()=>{const M=new Date().getTime()-E.current;C.current=C.current-M,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(ku,N),P.addEventListener(Iu,D),()=>{P.removeEventListener(ku,N),P.removeEventListener(Iu,D)}}},[m.viewport,S,l,c,O]),R.useEffect(()=>{s&&!m.isClosePausedRef.current&&O(S)},[s,S,m.isClosePausedRef,O]),R.useEffect(()=>(I(),()=>A()),[I,A]);const L=R.useMemo(()=>y?V0(y):null,[y]);return m.viewport?w.jsxs(w.Fragment,{children:[L&&w.jsx(M_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),w.jsx(O_,{scope:n,onClose:j,children:mi.createPortal(w.jsx(vf.ItemSlot,{scope:n,children:w.jsx(m_,{asChild:!0,onEscapeKeyDown:qt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||j(),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:v,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,j()))}),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 D=P.clientX-g.current.x,N=P.clientY-g.current.y,M=!!T.current,V=["left","right"].includes(m.swipeDirection),z=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,_=V?z(0,D):0,$=V?0:z(0,N),Z=P.pointerType==="touch"?10:2,ee={x:_,y:$},J={originalEvent:P,delta:ee};M?(T.current=ee,Yi(k_,d,J,{discrete:!1})):Op(ee,m.swipeDirection,Z)?(T.current=ee,Yi(P_,u,J,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(D)>Z||Math.abs(N)>Z)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,P=>{const D=T.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),T.current=null,g.current=null,D){const M=P.currentTarget,V={originalEvent:P,delta:D};Op(D,m.swipeDirection,m.swipeThreshold)?Yi(A_,h,V,{discrete:!0}):Yi(I_,f,V,{discrete:!0}),M.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),M_=e=>{const{__scopeToast:t,children:n,...r}=e,o=Tl(El,t),[s,i]=R.useState(!1),[a,l]=R.useState(!1);return F_(()=>i(!0)),R.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:w.jsx(R0,{asChild:!0,children:w.jsx(gf,{...r,children:s&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},N_="ToastTitle",M0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(Nn.div,{...r,ref:t})});M0.displayName=N_;var j_="ToastDescription",N0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(Nn.div,{...r,ref:t})});N0.displayName=j_;var j0="ToastAction",L_=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(F0,{altText:n,asChild:!0,children:w.jsx(bf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${j0}\`. Expected non-empty \`string\`.`),null)});L_.displayName=j0;var L0="ToastClose",bf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=__(L0,n);return w.jsx(F0,{asChild:!0,children:w.jsx(Nn.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});bf.displayName=L0;var F0=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 V0(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),V_(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(...V0(r))}}),t}function Yi(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?w0(o,s):o.dispatchEvent(s)}var Op=(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 F_(e=()=>{}){const t=zn(e);Ma(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function V_(e){return e.nodeType===e.ELEMENT_NODE}function $_(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 pc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var B_=I0,W_=O0,z_=D0,H_=M0,U_=N0,G_=bf;const Y_=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},q_=rs("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"}}),$0=x.createContext(()=>{throw new Error("Not implemented")}),K_=()=>x.useContext($0),_p={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]}},Z_=x.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=q_({theme:t.theme||"default"});return w.jsx(z_,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:w.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:_p[t.reversedIndex]||_p.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(H_,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,w.jsx(U_,{className:"select-text truncate",children:t.text})]}),r?w.jsx(G_,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:w.jsx(sf,{className:"h-5 w-5"})}):null]})})})});function X_({children:e,max:t=5,duration:n=5e3}){const r=x.useRef(null),o=Y_(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(B_,{duration:n,swipeThreshold:150,children:[w.jsx($0.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(Z_,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),w.jsx(W_,{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 Q_=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:$e("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]}),B0=(e,t)=>{const[n,r]=x.useState(()=>t||e);return x.useEffect(()=>{r(e)},[e]),[n,r]},W0=x.createContext(""),J_=e=>{const[t,n]=B0(e.active),r=$r(0),o=$r(0),s=x.useRef(null),i=e.useHash?"a":"button";x.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const y=m.getBoundingClientRect();o.set(y.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=zy(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(W0.Provider,{value:t,children:w.jsx(y0,{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 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold 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})})},eD=()=>x.useContext(W0),tD=e=>{const t=eD();return w.jsx(x.Fragment,{children:e.id===t?e.children:null})};function mr(e){return z0(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=(z0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function z0(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 Ou(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}function Ei(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 nD(e){return["table","td","th"].includes(mr(e))}function Cl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function xf(e){const t=wf(),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 rD(e){let t=Hn(e);for(;ft(t)&&!ir(t);){if(xf(t))return t;if(Cl(t))return null;t=Hn(t)}return null}function wf(){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 Rl(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||Ou(e)&&e.host||Yn(e);return Ou(t)?t.host:t}function H0(e){const t=Hn(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:ft(t)&&Ei(t)?t:H0(t)}function rr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=H0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Vt(o);if(s){const a=_u(i);return t.concat(i,i.visualViewport||[],Ei(o)?o:[],a&&n?rr(a):[])}return t.concat(o,rr(o,[],n))}function _u(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&&Ou(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Sf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function U0(){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 G0(e){return e.mozInputSource===0&&e.isTrusted?!0:Du()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Tf(e){return oD()?!1:!Du()&&e.width===0&&e.height===0||Du()&&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 Ef(){return/apple/i.test(navigator.vendor)}function Du(){const e=/android/i;return e.test(Sf())||e.test(U0())}function Y0(){return Sf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function oD(){return U0().includes("jsdom/")}function Ho(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function sD(e){return"nativeEvent"in e}function iD(e){return e.matches("html,body")}function St(e){return(e==null?void 0:e.ownerDocument)||document}function gc(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 aD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Cf(e){return ft(e)&&e.matches(aD)}function kt(e){e.preventDefault(),e.stopPropagation()}function q0(e){return e?e.getAttribute("role")==="combobox"&&Cf(e):!1}const Cn=Math.min,Yt=Math.max,Na=Math.round,To=Math.floor,ar=e=>({x:e,y:e}),lD={left:"right",right:"left",bottom:"top",top:"bottom"},cD={start:"end",end:"start"};function Mu(e,t,n){return Yt(e,Cn(t,n))}function cs(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function us(e){return e.split("-")[1]}function K0(e){return e==="x"?"y":"x"}function Rf(e){return e==="y"?"height":"width"}function Wr(e){return["top","bottom"].includes(lr(e))?"y":"x"}function Pf(e){return K0(Wr(e))}function uD(e,t,n){n===void 0&&(n=!1);const r=us(e),o=Pf(e),s=Rf(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ja(i)),[i,ja(i)]}function dD(e){const t=ja(e);return[Nu(e),t,Nu(t)]}function Nu(e){return e.replace(/start|end/g,t=>cD[t])}function fD(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 hD(e,t,n,r){const o=us(e);let s=fD(lr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Nu)))),s}function ja(e){return e.replace(/left|right|bottom|top/g,t=>lD[t])}function mD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Z0(e){return typeof e!="number"?mD(e):{top:e,right:e,bottom:e,left:e}}function La(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 Cp;function OO(){return Cp||(Cp=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),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var b=a(function(){var w=!1,E,C,k=function(O){if(!w){w=!0,E=O;var L=h(O);if(p!==void 0&&y.hasValue){var P=y.value;if(p(P,L))return C=P,P}return C=L,L}var M=E,N=C;if(r(M,O))return N;var D=h(O);return p!==void 0&&p(N,D)?N:(E=O,C=D,D)},A=f===void 0?null:f,I=function(){return k(d())},j=A===null?void 0:function(){return k(A())};return[I,j]},[d,f,h,p]),v=b[0],g=b[1],T=o(u,v,g);return i(function(){y.hasValue=!0,y.value=T},[T]),l(T),T}Ep.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ep}process.env.NODE_ENV==="production"?IO():OO();const lo=e=>{const t=x.useRef(e??{});return x.useEffect(()=>void(t.current=e),[e]),t},_O=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current},MO=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),DO=(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))},NO=(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)},ff=(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=_O(r),f=lo(d),h=x.useRef(null);x.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,d,m)})},[r,l,d]);const[p]=x.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return MO(y).reduce((b,[v,g])=>({...b,[v]:n!=null&&n.debug?DO(v,g,o,m,h,c.current):NO(v,g,o,m,h,c.current)}),{})});return[r,p,i.current]},jO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function LO(e,t){return x.useRef(jO(e,t)).current}const Tl={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)}},{}),Rp={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Da=(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)},FO={default:e=>Da(e,{result:Rp.default}),dark:e=>Da(e,{result:Rp.dark})},hf=(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)},VO=(e,t)=>Da(hf(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),$O=(e,t)=>hf(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),BO=(e,t)=>Da(hf(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"},WO={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%)"}}}},zO={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%)"}}}},HO=WO,UO=zO,mf={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(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",multiComboboxSelectedLabel:"Selected",multiComboboxInnerPlaceholder:"Search..."},pf={input:{iconFeedback:!0}},Ei=x.createContext({tweaks:pf,parser:Tl.hsla,map:mf,locale:void 0}),GO=e=>{const t=x.useMemo(()=>({locale:e.locale,tweaks:{...pf,...e.tweaks},parser:e.parser||Tl.hsla,map:{...mf,...e.map}}),[e]);return S.jsx(Ei.Provider,{value:t,children:e.children})},gf=e=>{if(e)return e;const t=x.useContext(Ei);if(t)return t.locale||e},Et=()=>{const e=x.useContext(Ei);return e?e.map:mf},YO=()=>{const e=x.useContext(Ei);return e?e.parser:Tl.hsla},qO=()=>{const e=x.useContext(Ei);return e?e.tweaks:pf},KO={type:"spring",bounce:.3,duration:.6},Pp=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),p0={middle:{x:"0%",opacity:1},enter:Pp(1),exit:Pp(-1)},kp={exit:{visibility:"hidden"}},ZO=e=>{const t=On(Gb(e));return Ub({start:t,end:cs(t,41)})},g0=(e,t)=>e.toLocaleDateString(t,{month:"long"}),XO=(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}`)}),pc={ArrowLeft:(e,t)=>t==="days"?lO(e,1):r0(e,1),ArrowRight:(e,t)=>t==="days"?cs(e,1):Sl(e,1),ArrowUp:(e,t)=>t==="days"?cO(e,1):uO(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"),QO=(e,t,n)=>e===void 0||n===void 0?!1:cI(t,e)&&uI(t,n),JO=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,y,b,v,g,T,w,E,C,k,A,I;const a=i.toISOString(),l=e.rangeMode?a===((p=(h=e.range)==null?void 0:h.to)==null?void 0:p.toISOString())||a===((y=(m=e.range)==null?void 0:m.from)==null?void 0:y.toISOString()):a===((b=e.date)==null?void 0:b.toISOString()),c=aO(i)&&e.markToday,u=((v=e.disabledDate)==null?void 0:v.call(e,i))||!1,d=!iO(i,e.stateDate)||u,f=e.rangeMode?QO((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",(w=e.styles)==null?void 0:w.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&&((A=e.stateRange.to)==null?void 0:A.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:((I=e.labelRange)==null?void 0:I.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=x.useRef(bi()),p=Et(),m=gf(o),y=x.useRef(null),{date:b,range:v}=f,g=b||new Date,T=x.useRef(null),[w,E]=ff({date:g,isAnimating:!1,year:Tr(g),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:XO(h.current,g,m),selectMode:l?"from":void 0,week:Ub({start:On(g),end:mA(g)})},O=>({onChangeYear:L=>({year:L}),setToday:()=>({date:zo(new Date)}),onExitComplete:()=>(Ap(T.current||null,y,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=Sl(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",N=L.currentTarget.dataset.date||"",D=new Date(N);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,N=Array.from(L.target.options).find(V=>V.value===P),D=O.state();if(N){const V=N.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 pc){(P==="ArrowUp"||P==="ArrowDown")&&L.preventDefault();const N=O.state().date,D=Pt.keyof(pc,P)?pc[P](N,L.shiftKey?"month":"days"):null;if(D!==null)return Ap(L.target,y,D),{...M,date:D,year:Tr(D)}}return O.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(O,L,P)=>{var N,D;return(P.method==="onChangeMonth"||P.method==="previousMonth"||P.method==="nextMonth")&&((D=(N=P.props).onChangeMonth)==null||D.call(N,O.date)),O},(O,L,P)=>{var N,D;return P.method==="onChangeYear"&&((D=(N=P.props).onChangeYear)==null||D.call(N,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=Wy(ZO(w.date),7),k=w.date.toISOString(),A=g0(w.date,m);x.useEffect(()=>{t||c==null||c(w.date)},[k]);const I=LO(O=>{E.date(L=>{const P=new Date(L);return P.setFullYear(+O),P})},1200),j=O=>{const L=O.currentTarget.value;E.onChangeYear(L),a==null||a(new Date(L)),I(L)};return S.jsx(qT,{transition:KO,children:S.jsxs("div",{"data-component":"calendar",ref:y,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:w.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:kp,onClick:E.previousMonth,title:p.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:S.jsx(Uk,{className:"h-4 w-4"})}),S.jsx(lt.span,{layout:!0,variants:p0,custom:w.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:A,onChange:E.onChangeMonth,style:{width:`${A.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),S.jsx(l0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:j,style:{width:`${w.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:kp,onClick:E.nextMonth,title:p.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:S.jsx(of,{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:w.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(JO,{zip:C,range:v,styles:u,date:b||null,dispatch:E,markRange:d,markToday:s,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:E.onKeyDown})]})]},A)})}),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 e_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function x0(...e){return t=>e.forEach(n=>e_(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,y=R.useMemo(()=>p,Object.values(p));return S.jsx(m.Provider,{value:y,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,t_(o,...t)]}function t_(...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(r_);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(Pu,{...r,ref:t,children:R.isValidElement(i)?R.cloneElement(i,void 0,a):null})}return S.jsx(Pu,{...r,ref:t,children:n})});Ho.displayName="Slot";var Pu=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const o=s_(n);return R.cloneElement(n,{...o_(r,n.props),ref:t?x0(t,o):o})}return R.Children.count(n)>1?R.Children.only(null):null});Pu.displayName="SlotClone";var n_=({children:e})=>S.jsx(S.Fragment,{children:e});function r_(e){return R.isValidElement(e)&&e.type===n_}function o_(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 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 i_(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,y=x.useRef(null),b=x.useRef(new Map).current;return S.jsx(o,{scope:p,itemMap:b,collectionRef:y,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=x.forwardRef((h,p)=>{const{scope:m,children:y}=h,b=s(a,m),v=Br(p,b.collectionRef);return S.jsx(Ho,{ref:v,children:y})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=x.forwardRef((h,p)=>{const{scope:m,children:y,...b}=h,v=x.useRef(null),g=Br(p,v),T=s(c,m);return x.useEffect(()=>(T.itemMap.set(v,{ref:v,...b}),()=>void T.itemMap.delete(v))),S.jsx(Ho,{[u]:"",ref:g,children:y})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return x.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((T,w)=>b.indexOf(T.ref.current)-b.indexOf(w.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var a_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Nn=a_.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&&pi.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 l_(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 c_="DismissableLayer",ku="dismissableLayer.update",u_="dismissableLayer.pointerDownOutside",d_="dismissableLayer.focusOutside",Ip,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),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(y),v=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,T=v>=b,w=h_(C=>{const k=C.target,A=[...c.branches].some(I=>I.contains(k));!T||A||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),E=m_(C=>{const k=C.target;[...c.branches].some(I=>I.contains(k))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return l_(C=>{v===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&&(Ip=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Op(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ip)}},[u,f,n,c]),R.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Op())},[u,c]),R.useEffect(()=>{const C=()=>h({});return document.addEventListener(ku,C),()=>document.removeEventListener(ku,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,w.onPointerDownCapture)})});E0.displayName=c_;var f_="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=f_;function h_(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(u_,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 m_(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(d_,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 Op(){const e=new CustomEvent(ku);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 p_=E0,g_=C0,Na=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},y_="Portal",P0=R.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=R.useState(!1);Na(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?mi.createPortal(S.jsx(Nn.div,{...r,ref:t}),i):null});P0.displayName=y_;function v_(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var k0=e=>{const{present:t,children:n}=e,r=b_(t),o=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),s=Br(r.ref,x_(o));return typeof n=="function"||r.isPresent?R.cloneElement(o,{ref:s}):null};k0.displayName="Presence";function b_(e){const[t,n]=R.useState(),r=R.useRef({}),o=R.useRef(e),s=R.useRef("none"),i=e?"mounted":"unmounted",[a,l]=v_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=Yi(r.current);s.current=a==="mounted"?c:"none"},[a]),Na(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=Yi(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]),Na(()=>{if(t){const c=d=>{const h=Yi(r.current).includes(d.animationName);d.target===t&&h&&pi.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=Yi(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 Yi(e){return(e==null?void 0:e.animationName)||"none"}function x_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function w_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=S_({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 S_({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 T_="VisuallyHidden",yf=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}}));yf.displayName=T_;var vf="ToastProvider",[bf,E_,C_]=i_("Toast"),[A0,w$]=w0("Toast",[C_]),[R_,El]=A0(vf),I0=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 \`${vf}\`. Expected non-empty \`string\`.`),S.jsx(bf.Provider,{scope:t,children:S.jsx(R_,{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})})};I0.displayName=vf;var O0="ToastViewport",P_=["F8"],Au="toast.viewportPause",Iu="toast.viewportResume",_0=R.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=P_,label:o="Notifications ({hotkey})",...s}=e,i=El(O0,n),a=E_(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 y=b=>{var g;r.every(T=>b[T]||b.code===T)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),R.useEffect(()=>{const y=l.current,b=d.current;if(p&&y&&b){const v=()=>{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(Iu);b.dispatchEvent(E),i.isClosePausedRef.current=!1}},T=E=>{!y.contains(E.relatedTarget)&&g()},w=()=>{y.contains(document.activeElement)||g()};return y.addEventListener("focusin",v),y.addEventListener("focusout",T),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",w),window.addEventListener("blur",v),window.addEventListener("focus",g),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",T),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",w),window.removeEventListener("blur",v),window.removeEventListener("focus",g)}}},[p,i.isClosePausedRef]);const m=R.useCallback(({tabbingDirection:y})=>{const v=a().map(g=>{const T=g.ref.current,w=[T,...B_(T)];return y==="forwards"?w:w.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return R.useEffect(()=>{const y=d.current;if(y){const b=v=>{var w,E,C;const g=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!g){const k=document.activeElement,A=v.shiftKey;if(v.target===y&&A){(w=c.current)==null||w.focus();return}const O=m({tabbingDirection:A?"backwards":"forwards"}),L=O.findIndex(P=>P===k);gc(O.slice(L+1))?v.preventDefault():A?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[a,m]),S.jsxs(g_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&S.jsx(Ou,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});gc(y)}}),S.jsx(bf.Slot,{scope:n,children:S.jsx(Nn.ol,{tabIndex:-1,...s,ref:f})}),p&&S.jsx(Ou,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});gc(y)}})]})});_0.displayName=O0;var M0="ToastFocusProxy",Ou=R.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=El(M0,n);return S.jsx(yf,{"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()}})});Ou.displayName=M0;var Cl="Toast",k_="toast.swipeStart",A_="toast.swipeMove",I_="toast.swipeCancel",O_="toast.swipeEnd",D0=R.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=w_({prop:r,defaultProp:o,onChange:s});return S.jsx(k0,{present:n||a,children:S.jsx(D_,{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=Cl;var[__,M_]=A0(Cl,{onClose(){}}),D_=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=El(Cl,n),[y,b]=R.useState(null),v=Br(t,P=>b(P)),g=R.useRef(null),T=R.useRef(null),w=o||m.duration,E=R.useRef(0),C=R.useRef(w),k=R.useRef(0),{onToastAdd:A,onToastRemove:I}=m,j=zn(()=>{var M;(y==null?void 0:y.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(j,P))},[j]);R.useEffect(()=>{const P=m.viewport;if(P){const M=()=>{O(C.current),c==null||c()},N=()=>{const D=new Date().getTime()-E.current;C.current=C.current-D,window.clearTimeout(k.current),l==null||l()};return P.addEventListener(Au,N),P.addEventListener(Iu,M),()=>{P.removeEventListener(Au,N),P.removeEventListener(Iu,M)}}},[m.viewport,w,l,c,O]),R.useEffect(()=>{s&&!m.isClosePausedRef.current&&O(w)},[s,w,m.isClosePausedRef,O]),R.useEffect(()=>(A(),()=>I()),[A,I]);const L=R.useMemo(()=>y?$0(y):null,[y]);return m.viewport?S.jsxs(S.Fragment,{children:[L&&S.jsx(N_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),S.jsx(__,{scope:n,onClose:j,children:pi.createPortal(S.jsx(bf.ItemSlot,{scope:n,children:S.jsx(p_,{asChild:!0,onEscapeKeyDown:qt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||j(),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:v,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,j()))}),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,N=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,N),Z=P.pointerType==="touch"?10:2,re={x:_,y:$},ee={originalEvent:P,delta:re};D?(T.current=re,qi(A_,d,ee,{discrete:!1})):_p(re,m.swipeDirection,Z)?(T.current=re,qi(k_,u,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(M)>Z||Math.abs(N)>Z)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,P=>{const M=T.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),T.current=null,g.current=null,M){const D=P.currentTarget,V={originalEvent:P,delta:M};_p(M,m.swipeDirection,m.swipeThreshold)?qi(O_,h,V,{discrete:!0}):qi(I_,f,V,{discrete:!0}),D.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),N_=e=>{const{__scopeToast:t,children:n,...r}=e,o=El(Cl,t),[s,i]=R.useState(!1),[a,l]=R.useState(!1);return V_(()=>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(yf,{...r,children:s&&S.jsxs(S.Fragment,{children:[o.label," ",n]})})})},j_="ToastTitle",N0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return S.jsx(Nn.div,{...r,ref:t})});N0.displayName=j_;var L_="ToastDescription",j0=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return S.jsx(Nn.div,{...r,ref:t})});j0.displayName=L_;var L0="ToastAction",F_=R.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?S.jsx(V0,{altText:n,asChild:!0,children:S.jsx(xf,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${L0}\`. Expected non-empty \`string\`.`),null)});F_.displayName=L0;var F0="ToastClose",xf=R.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=M_(F0,n);return S.jsx(V0,{asChild:!0,children:S.jsx(Nn.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});xf.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),$_(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 qi(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 _p=(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 V_(e=()=>{}){const t=zn(e);Na(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function $_(e){return e.nodeType===e.ELEMENT_NODE}function B_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var W_=I0,z_=_0,H_=D0,U_=N0,G_=j0,Y_=xf;const q_=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},K_=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")}),Z_=()=>x.useContext(B0),Mp={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]}},X_=x.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=K_({theme:t.theme||"default"});return S.jsx(H_,{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:Mp[t.reversedIndex]||Mp.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(U_,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,S.jsx(G_,{className:"select-text truncate",children:t.text})]}),r?S.jsx(Y_,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:S.jsx(af,{className:"h-5 w-5"})}):null]})})})});function Q_({children:e,max:t=5,duration:n=5e3}){const r=x.useRef(null),o=q_(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 S.jsxs(W_,{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 x.createElement(X_,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),S.jsx(z_,{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 J_=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]=x.useState(()=>t||e);return x.useEffect(()=>{r(e)},[e]),[n,r]},z0=x.createContext(""),eM=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 y=m.getBoundingClientRect();o.set(y.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=Hy(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 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})})},tM=()=>x.useContext(z0),nM=e=>{const t=tM();return S.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 ft(e){return e instanceof HTMLElement||e instanceof Vt(e).HTMLElement}function _u(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}function Ci(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 rM(e){return["table","td","th"].includes(mr(e))}function Rl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function wf(e){const t=Sf(),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 oM(e){let t=Hn(e);for(;ft(t)&&!ir(t);){if(wf(t))return t;if(Rl(t))return null;t=Hn(t)}return null}function Sf(){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 Pl(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||_u(e)&&e.host||Yn(e);return _u(t)?t.host:t}function U0(e){const t=Hn(e);return ir(t)?e.ownerDocument?e.ownerDocument.body:e.body:ft(t)&&Ci(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=Mu(i);return t.concat(i,i.visualViewport||[],Ci(o)?o:[],a&&n?rr(a):[])}return t.concat(o,rr(o,[],n))}function Mu(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&&_u(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Tf(){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:Du()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ef(e){return sM()?!1:!Du()&&e.width===0&&e.height===0||Du()&&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 Cf(){return/apple/i.test(navigator.vendor)}function Du(){const e=/android/i;return e.test(Tf())||e.test(G0())}function q0(){return Tf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function sM(){return G0().includes("jsdom/")}function Uo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function iM(e){return"nativeEvent"in e}function aM(e){return e.matches("html,body")}function St(e){return(e==null?void 0:e.ownerDocument)||document}function yc(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 lM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Rf(e){return ft(e)&&e.matches(lM)}function kt(e){e.preventDefault(),e.stopPropagation()}function K0(e){return e?e.getAttribute("role")==="combobox"&&Rf(e):!1}const Cn=Math.min,Yt=Math.max,ja=Math.round,Eo=Math.floor,ar=e=>({x:e,y:e}),cM={left:"right",right:"left",bottom:"top",top:"bottom"},uM={start:"end",end:"start"};function Nu(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 Pf(e){return e==="y"?"height":"width"}function Wr(e){return["top","bottom"].includes(lr(e))?"y":"x"}function kf(e){return Z0(Wr(e))}function dM(e,t,n){n===void 0&&(n=!1);const r=ds(e),o=kf(e),s=Pf(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=La(i)),[i,La(i)]}function fM(e){const t=La(e);return[ju(e),t,ju(t)]}function ju(e){return e.replace(/start|end/g,t=>uM[t])}function hM(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 mM(e,t,n,r){const o=ds(e);let s=hM(lr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ju)))),s}function La(e){return e.replace(/left|right|bottom|top/g,t=>cM[t])}function pM(e){return{top:0,right:0,bottom:0,left:0,...e}}function X0(e){return typeof e!="number"?pM(e):{top:e,right:e,bottom:e,left:e}}function Fa(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 pD=["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])"],Fa=pD.join(","),X0=typeof Element>"u",Uo=X0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Va=!X0&&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},$a=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},gD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},yD=function(t,n,r){if($a(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Fa));return n&&Uo.call(t,Fa)&&o.unshift(t),o=o.filter(r),o},vD=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!$a(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=Uo.call(i,Fa);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!$a(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},Q0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},J0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||gD(t))&&!Q0(t)?0:t.tabIndex},bD=function(t,n){var r=J0(t);return r<0&&n&&!Q0(t)?0:r},xD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ex=function(t){return t.tagName==="INPUT"},wD=function(t){return ex(t)&&t.type==="hidden"},SD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},TD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},ED=function(t){if(!t.name)return!0;var n=t.form||Va(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=TD(o,t.form);return!s||s===t},CD=function(t){return ex(t)&&t.type==="radio"},RD=function(t){return CD(t)&&!ED(t)},PD=function(t){var n,r=t&&Va(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=Va(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},Dp=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},kD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Uo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Uo.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=Va(t);if(l&&!l.shadowRoot&&o(l)===!0)return Dp(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(PD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Dp(t);return!1},ID=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 Uo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},AD=function(t,n){return!(n.disabled||$a(n)||wD(n)||kD(n,t)||SD(n)||ID(n))},ju=function(t,n){return!(RD(n)||J0(n)<0||!AD(t,n))},OD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},_D=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=bD(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(xD).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ti=function(t,n){n=n||{};var r;return n.getShadowRoot?r=vD([t],n.includeContainer,{filter:ju.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:OD}):r=yD(t,n.includeContainer,ju.bind(null,n)),_D(r)},DD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Uo.call(t,Fa)===!1?!1:ju(n,t)};function Mp(e,t,n){let{reference:r,floating:o}=e;const s=Wr(t),i=Pf(t),a=Rf(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(us(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const MD=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}=Mp(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:b}=a[m],{x:v,y:g,data: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=v??u,d=g??d,h={...h,[y]:{...h[y],...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}=Mp(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function kf(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}=cs(t,e),p=Z0(h),y=a[f?d==="floating"?"reference":"floating":d],b=La(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),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=La(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:g,strategy:l}):v);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 ND=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}=cs(e,t)||{};if(c==null)return{};const d=Z0(u),f={x:n,y:r},h=Pf(o),p=Rf(h),m=await i.getDimensions(c),y=h==="y",b=y?"top":"left",v=y?"bottom":"right",g=y?"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),j=Cn(d[v],I),O=A,L=C-m[p]-j,P=C/2-m[p]/2+k,D=Mu(O,P,L),N=!l.arrow&&us(o)!=null&&P!==D&&s.reference[p]/2-(P<O?A:j)-m[p]/2<0,M=N?P<O?P-O:P-L:0;return{[h]:f[h]+M,data:{[h]:D,centerOffset:P-D-M,...N&&{alignmentOffset:M}},reset:N}}}),jD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=cs(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=lr(o),v=Wr(a),g=lr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(g||!m?[ja(a)]:dD(a)),E=p!=="none";!f&&E&&S.push(...hD(a,m,p,T));const C=[a,...S],k=await kf(t,y),I=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[b]),d){const P=uD(o,i,T);I.push(k[P[0]],k[P[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every(P=>P<=0)){var j,O;const P=(((j=s.flip)==null?void 0:j.index)||0)+1,D=C[P];if(D)return{data:{index:P,overflows:A},reset:{placement:D}};let N=(O=A.filter(M=>M.overflows[0]<=0).sort((M,V)=>M.overflows[1]-V.overflows[1])[0])==null?void 0:O.placement;if(!N)switch(h){case"bestFit":{var L;const M=(L=A.filter(V=>{if(E){const z=Wr(V.placement);return z===v||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];M&&(N=M);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function LD(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=us(n),l=Wr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=cs(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 FD=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 LD(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}}}}},VD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:b,y:v}=y;return{x:b,y:v}}},...l}=cs(e,t),c={x:n,y:r},u=await kf(t,l),d=Wr(lr(o)),f=K0(d);let h=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",v=h+u[y],g=h-u[b];h=Mu(v,h,g)}if(i){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",v=p+u[y],g=p-u[b];p=Mu(v,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},$D=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}=cs(e,t),l=await kf(t,a),c=lr(n),u=us(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 y=h-l.top-l.bottom,b=f-l.left-l.right,v=Cn(h-l[p],y),g=Cn(f-l[m],b),T=!t.middlewareData.shift;let S=v,E=g;if(d?E=u||T?Cn(g,b):b:S=u||T?Cn(v,y):y,T&&!u){const k=Yt(l.left,0),I=Yt(l.right,0),A=Yt(l.top,0),j=Yt(l.bottom,0);d?E=f-2*(k!==0||I!==0?k+I:Yt(l.left,l.right)):S=h-2*(A!==0||j!==0?A+j: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 tx(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=Na(n)!==s||Na(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function If(e){return He(e)?e:e.contextElement}function Co(e){const t=If(e);if(!ft(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=tx(t);let i=(s?Na(n.width):n.width)/r,a=(s?Na(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const BD=ar(0);function nx(e){const t=Vt(e);return!wf()||!t.visualViewport?BD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WD(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=If(e);let i=ar(1);t&&(r?He(r)&&(i=Co(r)):i=Co(e));const a=WD(s,n,r)?nx(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=_u(p);for(;m&&r&&h!==p;){const y=Co(m),b=m.getBoundingClientRect(),v=Qt(m),g=b.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,T=b.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=g,c+=T,p=Vt(m),m=_u(p)}}return La({width:u,height:d,x:l,y:c})}function zD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Yn(r),a=t?Cl(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"||Ei(i))&&(l=Rl(r)),ft(r))){const f=zr(r);c=Co(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 HD(e){return Array.from(e.getClientRects())}function rx(e){return zr(Yn(e)).left+Rl(e).scrollLeft}function UD(e){const t=Yn(e),n=Rl(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+rx(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 GD(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=wf();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function YD(e,t){const n=zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ft(e)?Co(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 Np(e,t,n){let r;if(t==="viewport")r=GD(e,n);else if(t==="document")r=UD(Yn(e));else if(He(t))r=YD(t,n);else{const o=nx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return La(r)}function ox(e,t){const n=Hn(e);return n===t||!He(n)||ir(n)?!1:Qt(n).position==="fixed"||ox(n,t)}function qD(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=xf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ei(i)&&!l&&ox(e,i))?r=r.filter(u=>u!==i):o=a,i=Hn(i)}return t.set(e,r),r}function KD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Cl(t)?[]:qD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Np(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},Np(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ZD(e){const{width:t,height:n}=tx(e);return{width:t,height:n}}function XD(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"||Ei(o))&&(a=Rl(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=rx(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 yc(e){return Qt(e).position==="static"}function jp(e,t){return!ft(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function sx(e,t){const n=Vt(e);if(Cl(e))return n;if(!ft(e)){let o=Hn(e);for(;o&&!ir(o);){if(He(o)&&!yc(o))return o;o=Hn(o)}return n}let r=jp(e,t);for(;r&&nD(r)&&yc(r);)r=jp(r,t);return r&&ir(r)&&yc(r)&&!xf(r)?n:r||rD(e)||n}const QD=async function(e){const t=this.getOffsetParent||sx,n=this.getDimensions,r=await n(e.floating);return{reference:XD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function JD(e){return Qt(e).direction==="rtl"}const eM={convertOffsetParentRelativeRectToViewportRelativeRect:zD,getDocumentElement:Yn,getClippingRect:KD,getOffsetParent:sx,getElementRects:QD,getClientRects:HD,getDimensions:ZD,getScale:Co,isElement:He,isRTL:JD};function tM(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=To(u),p=To(o.clientWidth-(c+d)),m=To(o.clientHeight-(u+f)),y=To(c),v={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"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,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,v)}n.observe(e)}return i(!0),s}function Ci(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=If(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?tM(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(b=>{let[v]=b;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?zr(e):null;l&&y();function y(){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(y)}return n(),()=>{var b;u.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const nM=FD,rM=VD,oM=jD,sM=$D,Lp=ND,iM=(e,t,n)=>{const r=new Map,o={platform:eM,...n},s={...o.platform,_c:r};return MD(e,t,{...o,platform:s})};var ca=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Ba(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(!Ba(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)&&!Ba(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ix(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fp(e,t){const n=ix(e);return Math.round(t*n)/n}function Vp(e){const t=R.useRef(e);return ca(()=>{t.current=e}),t}function aM(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);Ba(f,r)||h(r);const[p,m]=R.useState(null),[y,b]=R.useState(null),v=R.useCallback(M=>{M!==E.current&&(E.current=M,m(M))},[]),g=R.useCallback(M=>{M!==C.current&&(C.current=M,b(M))},[]),T=s||p,S=i||y,E=R.useRef(null),C=R.useRef(null),k=R.useRef(u),I=l!=null,A=Vp(l),j=Vp(o),O=R.useCallback(()=>{if(!E.current||!C.current)return;const M={placement:t,strategy:n,middleware:f};j.current&&(M.platform=j.current),iM(E.current,C.current,M).then(V=>{const z={...V,isPositioned:!0};L.current&&!Ba(k.current,z)&&(k.current=z,mi.flushSync(()=>{d(z)}))})},[f,t,n,j]);ca(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(M=>({...M,isPositioned:!1})))},[c]);const L=R.useRef(!1);ca(()=>(L.current=!0,()=>{L.current=!1}),[]),ca(()=>{if(T&&(E.current=T),S&&(C.current=S),T&&S){if(A.current)return A.current(T,S,O);O()}},[T,S,O,A,I]);const P=R.useMemo(()=>({reference:E,floating:C,setReference:v,setFloating:g}),[v,g]),D=R.useMemo(()=>({reference:T,floating:S}),[T,S]),N=R.useMemo(()=>{const M={position:n,left:0,top:0};if(!D.floating)return M;const V=Fp(D.floating,u.x),z=Fp(D.floating,u.y);return a?{...M,transform:"translate("+V+"px, "+z+"px)",...ix(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:z}},[n,a,D.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:O,refs:P,elements:D,floatingStyles:N}),[u,O,P,D,N])}const lM=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?Lp({element:r.current,padding:o}).fn(n):{}:r?Lp({element:r,padding:o}).fn(n):{}}}},Ri=(e,t)=>({...nM(e),options:[e,t]}),Af=(e,t)=>({...rM(e),options:[e,t]}),Of=(e,t)=>({...oM(e),options:[e,t]}),ax=(e,t)=>({...sM(e),options:[e,t]}),lx=(e,t)=>({...lM(e),options:[e,t]});function Lu(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 cx={...R},cM=cx.useInsertionEffect,uM=cM||(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 uM(()=>{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 _f="ArrowUp",Pi="ArrowDown",Go="ArrowLeft",ds="ArrowRight";function qi(e,t,n){return Math.floor(e/t)!==n}function $s(e,t){return t<0||t>=e.current.length}function vc(e,t){return _t(e,{disabledIndices:t})}function $p(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&&ua(i,a,o));return a}function dM(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===_f){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}$s(e,d)&&(d=c)}if(n.key===Pi&&(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}))),$s(e,d)&&(d=c)),r==="both"){const f=To(c/s);n.key===ds&&(u&&kt(n),c%s!==s-1?(d=_t(e,{startingIndex:c,disabledIndices:i}),o&&qi(d,s,f)&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i})),qi(d,s,f)&&(d=c)),n.key===Go&&(u&&kt(n),c%s!==0?(d=_t(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&qi(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})),qi(d,s,f)&&(d=c));const h=To(l/s)===f;$s(e,d)&&(o&&h?d=n.key===Go?l:_t(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function fM(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 hM(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 mM(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ua(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 Bp=0;function Jn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Bp);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Bp=requestAnimationFrame(s)}var Oe=typeof document<"u"?x.useLayoutEffect:x.useEffect;function pM(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 gM(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 ux=R.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function yM(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 Oe(()=>{const l=new Map(o);Array.from(l.keys()).sort(pM).forEach((u,d)=>{l.set(u,d)}),gM(o,l)||s(l)},[o]),R.createElement(ux.Provider,{value:R.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function dx(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=R.useContext(ux),[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 Oe(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Oe(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),R.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Yo(){return Yo=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},Yo.apply(this,arguments)}let Wp=!1,vM=0;const zp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+vM++;function bM(){const[e,t]=R.useState(()=>Wp?zp():void 0);return Oe(()=>{e==null&&t(zp())},[]),R.useEffect(()=>{Wp=!0},[]),e}const xM=cx.useId,fs=xM||bM;let ni;process.env.NODE_ENV!=="production"&&(ni=new Set);function da(){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=ni)!=null&&e.has(o))){var s;(s=ni)==null||s.add(o),console.warn(o)}}function wM(){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=ni)!=null&&e.has(o))){var s;(s=ni)==null||s.add(o),console.error(o)}}const fx=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||da("The `ref` prop is required for `FloatingArrow`."));const y=fs(),[b,v]=R.useState(!1);if(Oe(()=>{if(!o)return;Qt(o).direction==="rtl"&&v(!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",j=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:"",D=f||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",N={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",Yo({},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,[j]:P,[C]:A||I?"100%":"calc(100% - "+g/2+"px)",transform:""+N+(h??""),...p}}),g>0&&R.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:D}),R.createElement("path",{stroke:g&&!f?m.fill:"none",d:D}),R.createElement("clipPath",{id:y},R.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function hx(){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 mx=R.createContext(null),px=R.createContext(null),pr=()=>{var e;return((e=R.useContext(mx))==null?void 0:e.id)||null},gr=()=>R.useContext(px);function SM(e){const t=fs(),n=gr(),o=pr();return Oe(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function TM(e){const{children:t,id:n}=e,r=pr();return R.createElement(mx.Provider,{value:R.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function EM(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(()=>hx())[0];return R.createElement(px.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 Oe(()=>{t.current=e}),t}const Hp=cr("safe-polygon");function bc(e,t,n){return n&&!Ho(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function gx(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),y=It(l),b=It(n),v=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 D;const N=(D=o.current.openEvent)==null?void 0:D.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);R.useEffect(()=>{if(!a)return;function D(N){let{open:M}=N;M||(clearTimeout(g.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",D),()=>{s.off("openchange",D)}},[a,s]),R.useEffect(()=>{if(!a||!m.current||!n)return;function D(M){I()&&r(!1,M,"hover")}const N=St(i.floating).documentElement;return N.addEventListener("mouseleave",D),()=>{N.removeEventListener("mouseleave",D)}},[i.floating,n,r,a,m,I]);const A=R.useCallback(function(D,N,M){N===void 0&&(N=!0),M===void 0&&(M="hover");const V=bc(y.current,"close",v.current);V&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,D,M),V)):N&&(clearTimeout(g.current),r(!1,D,M))},[y,r]),j=bt(()=>{k.current(),T.current=void 0}),O=bt(()=>{if(C.current){const D=St(i.floating).body;D.style.pointerEvents="",D.removeAttribute(Hp),C.current=!1}});R.useEffect(()=>{if(!a)return;function D(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(_){if(clearTimeout(g.current),E.current=!1,u&&!Ho(v.current)||d>0&&!bc(y.current,"open"))return;const $=bc(y.current,"open",v.current);$?g.current=window.setTimeout(()=>{b.current||r(!0,_,"hover")},$):r(!0,_,"hover")}function M(_){if(D())return;k.current();const $=St(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(){O(),j(),A(_,!0,"safe-polygon")}});const ee=T.current;$.addEventListener("mousemove",ee),k.current=()=>{$.removeEventListener("mousemove",ee)};return}(v.current==="touch"?!it(i.floating,_.relatedTarget):!0)&&A(_)}function V(_){D()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){O(),j(),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",N,{once:!0}),_.addEventListener("mouseenter",N),_.addEventListener("mouseleave",M),()=>{var $;n&&_.removeEventListener("mouseleave",V),($=i.floating)==null||$.removeEventListener("mouseleave",V),f&&_.removeEventListener("mousemove",N),_.removeEventListener("mouseenter",N),_.removeEventListener("mouseleave",M)}}},[i,a,e,u,d,f,A,j,O,r,n,b,h,y,m,o]),Oe(()=>{var D;if(a&&n&&(D=m.current)!=null&&D.__options.blockPointerEvents&&I()){const M=St(i.floating).body;M.setAttribute(Hp,""),M.style.pointerEvents="none",C.current=!0;const V=i.floating;if(He(i.domReference)&&V){var N;const z=i.domReference,_=h==null||(N=h.nodesRef.current.find($=>$.id===p))==null||(N=N.context)==null?void 0:N.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]),Oe(()=>{n||(v.current=void 0,j(),O())},[n,j,O]),R.useEffect(()=>()=>{j(),clearTimeout(g.current),clearTimeout(S.current),O()},[a,i.domReference,j,O]);const L=R.useMemo(()=>{function D(N){v.current=N.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(N){const{nativeEvent:M}=N;function V(){!E.current&&!b.current&&r(!0,M,"hover")}u&&!Ho(v.current)||n||d===0||(clearTimeout(S.current),v.current==="touch"?V():S.current=window.setTimeout(V,d))}}},[u,r,n,b,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(D){A(D.nativeEvent,!1)}}),[A]);return R.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function CM(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 RM(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,Ki=new WeakSet,Zi={},xc=0;const PM=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,yx=e=>e&&(e.host||yx(e.parentNode)),kM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=yx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function IM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=kM(t,e),a=new Set,l=new Set(i),c=[];Zi[o]||(Zi[o]=new WeakMap);const u=Zi[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,y=m!==null&&m!=="false",b=(co.get(p)||0)+1,v=(u.get(p)||0)+1;co.set(p,b),u.set(p,v),c.push(p),b===1&&y&&Ki.add(p),v===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return xc++,()=>{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||(!Ki.has(h)&&s&&h.removeAttribute(s),Ki.delete(h)),m||h.removeAttribute(o)}),xc--,xc||(co=new WeakMap,co=new WeakMap,Ki=new WeakSet,Zi={})}}function Up(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=St(e[0]).body;return IM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const qo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function vx(e,t){const n=ti(e,qo());t==="prev"&&n.reverse();const r=n.indexOf(ln(St(e)));return n.slice(r+1)[0]}function bx(){return vx(document.body,"next")}function xx(){return vx(document.body,"prev")}function Bs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!it(n,r)}function AM(e){ti(e,qo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function OM(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function _M(e,t,n){const r=e.indexOf(t);function o(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 Df={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 DM;function Gp(e){e.key==="Tab"&&(e.target,clearTimeout(DM))}const Wa=R.forwardRef(function(t,n){const[r,o]=R.useState();Oe(()=>(Ef()&&o("button"),document.addEventListener("keydown",Gp),()=>{document.removeEventListener("keydown",Gp)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[cr("focus-guard")]:"",style:Df};return R.createElement("span",Yo({},t,s))}),wx=R.createContext(null),Yp=cr("portal");function MM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=fs(),o=Sx(),[s,i]=R.useState(null),a=R.useRef(null);return Oe(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Oe(()=>{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(Yp,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Oe(()=>{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(Yp,""),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=MM({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&&Bs(p)&&(p.type==="focusin"?OM:AM)(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(wx.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&R.createElement(Wa,{"data-type":"outside",ref:l,onFocus:h=>{if(Bs(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=xx()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&R.createElement("span",{"aria-owns":s.id,style:Df}),s&&mi.createPortal(t,s),f&&s&&R.createElement(Wa,{"data-type":"outside",ref:c,onFocus:h=>{if(Bs(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=bx()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Sx=()=>R.useContext(wx),qp=20;let Rr=[];function wc(e){Rr=Rr.filter(n=>n.isConnected);let t=e;if(!(!t||mr(t)==="body")){if(!DD(t,qo())){const n=ti(t,qo())[0];n&&(t=n)}Rr.push(t),Rr.length>qp&&(Rr=Rr.slice(-qp))}}function Kp(){return Rr.slice().reverse().find(e=>e.isConnected)}const NM=R.forwardRef(function(t,n){return R.createElement("button",Yo({},t,{type:"button",ref:n,tabIndex:-1,style:Df}))});function hs(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:b,floatingId:v,elements:{domReference:g,floating:T}}=t,S=typeof i=="number"&&i<0,E=q0(g)&&S,C=PM()?s:!0,k=It(o),I=It(i),A=It(a),j=gr(),O=Sx(),L=R.useRef(null),P=R.useRef(null),D=R.useRef(!1),N=R.useRef(!1),M=R.useRef(-1),V=O!=null,z=T==null?void 0:T.firstElementChild,_=(z==null?void 0:z.id)===v?z:T,$=bt(function(U){return U===void 0&&(U=_),U?ti(U,qo()):[]}),Z=bt(U=>{const F=$(U);return k.current.map(B=>g&&B==="reference"?g:_&&B==="floating"?_:F).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function U(B){if(B.key==="Tab"){it(_,ln(St(_)))&&$().length===0&&!E&&kt(B);const W=Z(),G=Tn(B);k.current[0]==="reference"&&G===g&&(kt(B),B.shiftKey?Jn(W[W.length-1]):Jn(W[1])),k.current[1]==="floating"&&G===_&&B.shiftKey&&(kt(B),Jn(W[0]))}}const F=St(_);return F.addEventListener("keydown",U),()=>{F.removeEventListener("keydown",U)}},[r,g,_,c,k,E,$,Z]),R.useEffect(()=>{if(r||!T)return;function U(F){const B=Tn(F),G=$().indexOf(B);G!==-1&&(M.current=G)}return T.addEventListener("focusin",U),()=>{T.removeEventListener("focusin",U)}},[r,T,$]),R.useEffect(()=>{if(r||!d)return;function U(){N.current=!0,setTimeout(()=>{N.current=!1})}function F(B){const W=B.relatedTarget;queueMicrotask(()=>{const G=!(it(g,W)||it(T,W)||it(W,T)||it(O==null?void 0:O.portalNode,W)||W!=null&&W.hasAttribute(cr("focus-guard"))||j&&(Fr(j.nodesRef.current,p).find(Q=>{var ce,H;return it((ce=Q.context)==null?void 0:ce.elements.floating,W)||it((H=Q.context)==null?void 0:H.elements.domReference,W)})||CM(j.nodesRef.current,p).find(Q=>{var ce,H;return((ce=Q.context)==null?void 0:ce.elements.floating)===W||((H=Q.context)==null?void 0:H.elements.domReference)===W})));if(l&&G&&ln(St(_))===St(_).body){ft(_)&&(_==null||_.focus());const Q=M.current,ce=$(),H=ce[Q]||ce[ce.length-1]||_;ft(H)&&H.focus()}(E||!c)&&W&&G&&!N.current&&W!==Kp()&&(D.current=!0,m(!1,B))})}if(T&&ft(g))return g.addEventListener("focusout",F),g.addEventListener("pointerdown",U),T.addEventListener("focusout",F),()=>{g.removeEventListener("focusout",F),g.removeEventListener("pointerdown",U),T.removeEventListener("focusout",F)}},[r,g,T,_,c,p,j,O,m,d,l,$,E]),R.useEffect(()=>{var U;if(r)return;const F=Array.from((O==null||(U=O.portalNode)==null?void 0:U.querySelectorAll("["+cr("portal")+"]"))||[]);if(T){const B=[T,...F,L.current,P.current,k.current.includes("reference")||E?g:null].filter(G=>G!=null),W=c||E?Up(B,C,!C):Up(B);return()=>{W()}}},[r,g,T,c,k,O,E,C]),Oe(()=>{if(r||!ft(_))return;const U=St(_),F=ln(U);queueMicrotask(()=>{const B=Z(_),W=I.current,G=(typeof W=="number"?B[W]:W.current)||_,Q=it(_,F);!S&&!Q&&f&&Jn(G,{preventScroll:G===_})})},[r,f,_,S,Z,I]),Oe(()=>{if(r||!_)return;let U=!1;const F=St(_),B=ln(F);let G=b.current.openEvent;const Q=h.domReference.current;wc(B);function ce(H){let{open:Ie,reason:De,event:re,nested:de}=H;Ie&&(G=re),De==="escape-key"&&h.domReference.current&&wc(h.domReference.current),De==="hover"&&re.type==="mouseleave"&&(D.current=!0),De==="outside-press"&&(de?(D.current=!1,U=!0):D.current=!(G0(re)||Tf(re)))}return y.on("openchange",ce),()=>{y.off("openchange",ce);const H=ln(F),Ie=it(T,H)||j&&Fr(j.nodesRef.current,p).some(oe=>{var Y;return it((Y=oe.context)==null?void 0:Y.elements.floating,H)});(Ie||G&&["click","mousedown"].includes(G.type))&&h.domReference.current&&wc(h.domReference.current);const re=Q||B,de=ti(St(re).body,qo());queueMicrotask(()=>{let oe=Kp();!oe&&ft(re)&&T&&(oe=_M(de,re,T)),A.current&&!D.current&&ft(oe)&&(!(oe!==H&&H!==F.body)||Ie)&&oe.focus({preventScroll:U})})}},[r,T,_,A,b,h,y,j,p]),Oe(()=>{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]),Oe(()=>{if(r||!_||typeof MutationObserver!="function"||S)return;const U=()=>{const B=_.getAttribute("tabindex"),W=$(),G=ln(St(T)),Q=W.indexOf(G);Q!==-1&&(M.current=Q),k.current.includes("floating")||G!==h.domReference.current&&W.length===0?B!=="0"&&_.setAttribute("tabindex","0"):B!=="-1"&&_.setAttribute("tabindex","-1")};U();const F=new MutationObserver(U);return F.observe(_,{childList:!0,subtree:!0,attributes:!0}),()=>{F.disconnect()}},[r,T,_,h,k,$,S]);function ee(U){return r||!u||!c?null:R.createElement(NM,{ref:U==="start"?L:P,onClick:F=>m(!1,F.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&C&&(c?!E:!0)&&(V||c);return R.createElement(R.Fragment,null,J&&R.createElement(Wa,{"data-type":"inside",ref:O==null?void 0:O.beforeInsideRef,onFocus:U=>{if(c){const B=Z();Jn(o[0]==="reference"?B[0]:B[B.length-1])}else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(D.current=!1,Bs(U,O.portalNode)){const B=bx()||g;B==null||B.focus()}else{var F;(F=O.beforeOutsideRef.current)==null||F.focus()}}}),!E&&ee("start"),n,ee("end"),J&&R.createElement(Wa,{"data-type":"inside",ref:O==null?void 0:O.afterInsideRef,onFocus:U=>{if(c)Jn(Z()[0]);else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(d&&(D.current=!0),Bs(U,O.portalNode)){const B=xx()||g;B==null||B.focus()}else{var F;(F=O.afterOutsideRef.current)==null||F.focus()}}}))}const Sc=new Set,jM=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=fs();return Oe(()=>{if(!r)return;Sc.add(s);const i=/iP(hone|ad|od)|iOS/.test(Sf()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(y))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Sc.delete(s),Sc.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),R.createElement("div",Yo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Zp(e){return ft(e.target)&&e.target.tagName==="BUTTON"}function Xp(e){return Cf(e)}function ki(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"&&(Ho(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}Ho(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||Zp(p))&&(p.key===" "&&!Xp(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Zp(p)||Xp(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 LM(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,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 Qp(e){return e!=null&&e.clientX!=null}function FM(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,y]=R.useState([]),b=bt((E,C)=>{d.current||r.current.openEvent&&!Qp(r.current.openEvent)||i.setPositionReference(LM(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),v=bt(E=>{c!=null||u!=null||(n?f.current||y([]):b(E.clientX,E.clientY))}),g=Ho(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||Qp(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]),Oe(()=>{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:v,onMouseEnter:v}},[v]);return R.useMemo(()=>a?{reference:S}:{},[a,S])}const VM={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},$M={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Jp=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(),y=bt(typeof l=="function"?l:()=>!1),b=typeof l=="function"?y:l,v=R.useRef(!1),g=R.useRef(!1),{escapeKey:T,outsidePress:S}=Jp(h),{escapeKey:E,outsidePress:C}=Jp(p),k=bt(P=>{var D;if(!n||!i||!a||P.key!=="Escape")return;const N=(D=s.current.floatingContext)==null?void 0:D.nodeId,M=m?Fr(m.nodesRef.current,N):[];if(!T&&(P.stopPropagation(),M.length>0)){let V=!0;if(M.forEach(z=>{var _;if((_=z.context)!=null&&_.open&&!z.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,sD(P)?P.nativeEvent:P,"escape-key")}),I=bt(P=>{var D;const N=()=>{var M;k(P),(M=Tn(P))==null||M.removeEventListener("keydown",N)};(D=Tn(P))==null||D.addEventListener("keydown",N)}),A=bt(P=>{var D;const N=v.current;v.current=!1;const M=g.current;if(g.current=!1,c==="click"&&M||N||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 U=Hn($);if(ir(U)||!He(U))break;$=U}if(_.length&&He(V)&&!iD(V)&&!it(V,o.floating)&&Array.from(_).every(U=>!it($,U)))return;if(ft(V)&&L){const U=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||U&&P.offsetY>V.clientHeight)return}const Z=(D=s.current.floatingContext)==null?void 0:D.nodeId,ee=m&&Fr(m.nodesRef.current,Z).some(U=>{var F;return gc(P,(F=U.context)==null?void 0:F.elements.floating)});if(gc(P,o.floating)||gc(P,o.domReference)||ee)return;const J=m?Fr(m.nodesRef.current,Z):[];if(J.length>0){let U=!0;if(J.forEach(F=>{var B;if((B=F.context)!=null&&B.open&&!F.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}r(!1,P,"outside-press")}),j=bt(P=>{var D;const N=()=>{var M;A(P),(M=Tn(P))==null||M.removeEventListener(c,N)};(D=Tn(P))==null||D.addEventListener(c,N)});R.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function P(M){r(!1,M,"ancestor-scroll")}const D=St(o.floating);a&&D.addEventListener("keydown",E?I:k,E),b&&D.addEventListener(c,C?j:A,C);let N=[];return f&&(He(o.domReference)&&(N=rr(o.domReference)),He(o.floating)&&(N=N.concat(rr(o.floating))),!He(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(rr(o.reference.contextElement)))),N=N.filter(M=>{var V;return M!==((V=D.defaultView)==null?void 0:V.visualViewport)}),N.forEach(M=>{M.addEventListener("scroll",P,{passive:!0})}),()=>{a&&D.removeEventListener("keydown",E?I:k,E),b&&D.removeEventListener(c,C?j:A,C),N.forEach(M=>{M.removeEventListener("scroll",P)})}},[s,o,a,b,c,n,r,f,i,T,S,k,E,I,A,C,j]),R.useEffect(()=>{v.current=!1},[b,c]);const O=R.useMemo(()=>({onKeyDown:k,[VM[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},[$M[c]]:()=>{v.current=!0}}),[k,c]);return R.useMemo(()=>i?{reference:O,floating:L}:{},[i,O,L])}function BM(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=fs(),s=R.useRef({}),[i]=R.useState(()=>hx()),a=pr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!He(h)&&wM("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=BM({...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();Oe(()=>{u&&(d.current=u)},[u]);const h=aM({...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]),y=R.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),b=R.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),v=R.useMemo(()=>({...h,...r,refs:y,elements:b,nodeId:t}),[h,y,b,t,r]);return Oe(()=>{r.dataRef.current.floatingContext=v;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=v)}),R.useMemo(()=>({...h,context:v,refs:y,elements:b}),[h,y,b,v])}function WM(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){Tf(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(Ef()&&Y0())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Cf(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=He(p)&&p.hasAttribute(cr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var b;const v=ln(i.domReference?i.domReference.ownerDocument:document);!p&&v===i.domReference||it((b=s.current.floatingContext)==null?void 0:b.refs.floating.current,v)||it(i.domReference,v)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}const eg="active",tg="selected";function Tc(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[eg]:i,[tg]: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&&[eg,tg].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function 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=>Tc(a,e,"reference"),t),s=R.useCallback(a=>Tc(a,e,"floating"),n),i=R.useCallback(a=>Tc(a,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let ng=!1;function Pl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function rg(e,t){return Pl(t,e===_f||e===Pi,e===Go||e===ds)}function Ec(e,t,n){return Pl(t,e===Pi,n?e===Go:e===ds)||e==="Enter"||e===" "||e===""}function zM(e,t,n){return Pl(t,n?e===Go:e===ds,e===Pi)}function og(e,t,n){return Pl(t,n?e===ds:e===Go,e===_f)}function Mf(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:v=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||da("`useListNavigation` looping must be enabled to allow escaping."),p||da("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&da("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=pr(),A=gr(),j=bt(a),O=R.useRef(m),L=R.useRef(c??-1),P=R.useRef(null),D=R.useRef(!0),N=R.useRef(j),M=R.useRef(!!o.floating),V=R.useRef(n),z=R.useRef(!1),_=R.useRef(!1),$=It(v),Z=It(n),ee=It(S),J=It(o.floating),U=It(c),[F,B]=R.useState(),[W,G]=R.useState(),Q=bt(function(oe,Y,K){K===void 0&&(K=!1);function fe(Ee){p?(B(Ee.id),A==null||A.events.emit("virtualfocus",Ee),E&&(E.current=Ee)):Jn(Ee,{preventScroll:!0,sync:Y0()&&Ef()?ng||z.current:!1})}const pe=oe.current[Y.current];pe&&fe(pe),requestAnimationFrame(()=>{const Ee=oe.current[Y.current]||pe;if(!Ee)return;pe||fe(Ee);const et=ee.current;et&&H&&(K||!D.current)&&(Ee.scrollIntoView==null||Ee.scrollIntoView(typeof et=="boolean"?{block:"nearest",inline:"nearest"}:et))})});Oe(()=>{document.createElement("div").focus({get preventScroll(){return ng=!0,!1}})},[]),Oe(()=>{l&&(n&&o.floating?O.current&&c!=null&&(_.current=!0,L.current=c,j(c)):M.current&&(L.current=-1,N.current(null)))},[l,n,o.floating,c,j]),Oe(()=>{if(l&&n&&o.floating)if(i==null){if(z.current=!1,U.current!=null)return;if(M.current&&(L.current=-1,Q(s,L)),(!V.current||!M.current)&&O.current&&(P.current!=null||O.current===!0&&P.current==null)){let oe=0;const Y=()=>{s.current[0]==null?(oe<2&&(oe?requestAnimationFrame:queueMicrotask)(Y),oe++):(L.current=P.current==null||Ec(P.current,g,h)||f?vc(s,$.current):$p(s,$.current),P.current=null,j(L.current))};Y()}}else $s(s,i)||(L.current=i,Q(s,L,_.current),_.current=!1)},[l,n,o.floating,i,U,f,s,g,h,j,Q,$]),Oe(()=>{var oe;if(!l||o.floating||!A||p||!M.current)return;const Y=A.nodesRef.current,K=(oe=Y.find(Ee=>Ee.id===I))==null||(oe=oe.context)==null?void 0:oe.elements.floating,fe=ln(St(o.floating)),pe=Y.some(Ee=>Ee.context&&it(Ee.context.elements.floating,fe));K&&!pe&&D.current&&K.focus({preventScroll:!0})},[l,o.floating,A,I,p]),Oe(()=>{if(!l||!A||!p||I)return;function oe(Y){G(Y.id),E&&(E.current=Y)}return A.events.on("virtualfocus",oe),()=>{A.events.off("virtualfocus",oe)}},[l,A,p,I,E]),Oe(()=>{N.current=j,M.current=!!o.floating}),Oe(()=>{n||(P.current=null)},[n]),Oe(()=>{V.current=n},[n]);const ce=i!=null,H=R.useMemo(()=>{function oe(K){if(!n)return;const fe=s.current.indexOf(K);fe!==-1&&j(fe)}return{onFocus(K){let{currentTarget:fe}=K;oe(fe)},onClick:K=>{let{currentTarget:fe}=K;return fe.focus({preventScroll:!0})},...y&&{onMouseMove(K){let{currentTarget:fe}=K;oe(fe)},onPointerLeave(K){let{pointerType:fe}=K;!D.current||fe==="touch"||(L.current=-1,Q(s,L),j(null),p||Jn(J.current,{preventScroll:!0}))}}}},[n,J,Q,y,s,j,p]),Ie=bt(oe=>{if(D.current=!1,z.current=!0,!Z.current&&oe.currentTarget===J.current)return;if(f&&og(oe.key,g,h)){kt(oe),r(!1,oe.nativeEvent,"list-navigation"),ft(o.domReference)&&!p&&o.domReference.focus();return}const Y=L.current,K=vc(s,v),fe=$p(s,v);if(oe.key==="Home"&&(kt(oe),L.current=K,j(L.current)),oe.key==="End"&&(kt(oe),L.current=fe,j(L.current)),T>1){const pe=C||Array.from({length:s.current.length},()=>({width:1,height:1})),Ee=fM(pe,T,k),et=Ee.findIndex(ue=>ue!=null&&!ua(s.current,ue,v)),te=Ee.reduce((ue,Me,qe)=>Me!=null&&!ua(s.current,Me,v)?qe:ue,-1);if(L.current=Ee[dM({current:Ee.map(ue=>ue!=null?s.current[ue]:null)},{event:oe,orientation:g,loop:d,cols:T,disabledIndices:mM([...v||s.current.map((ue,Me)=>ua(s.current,Me)?Me:void 0),void 0],Ee),minIndex:et,maxIndex:te,prevIndex:hM(L.current>fe?K:L.current,pe,Ee,T,oe.key===Pi?"bl":oe.key===ds?"tr":"tl"),stopEvent:!0})],j(L.current),g==="both")return}if(rg(oe.key,g)){if(kt(oe),n&&!p&&ln(oe.currentTarget.ownerDocument)===oe.currentTarget){L.current=Ec(oe.key,g,h)?K:fe,j(L.current);return}Ec(oe.key,g,h)?d?L.current=Y>=fe?u&&Y!==s.current.length?-1:K:_t(s,{startingIndex:Y,disabledIndices:v}):L.current=Math.min(fe,_t(s,{startingIndex:Y,disabledIndices:v})):d?L.current=Y<=K?u&&Y!==-1?s.current.length:fe:_t(s,{startingIndex:Y,decrement:!0,disabledIndices:v}):L.current=Math.max(K,_t(s,{startingIndex:Y,decrement:!0,disabledIndices:v})),$s(s,L.current)?j(null):j(L.current)}}),De=R.useMemo(()=>p&&n&&ce&&{"aria-activedescendant":W||F},[p,n,ce,W,F]),re=R.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!q0(o.domReference)&&De,onKeyDown:Ie,onPointerMove(){D.current=!0}}),[De,Ie,o.domReference,g]),de=R.useMemo(()=>{function oe(K){m==="auto"&&G0(K.nativeEvent)&&(O.current=!0)}function Y(K){O.current=m,m==="auto"&&Tf(K.nativeEvent)&&(O.current=!0)}return{...De,onKeyDown(K){D.current=!1;const fe=K.key.indexOf("Arrow")===0,pe=zM(K.key,g,h),Ee=og(K.key,g,h),et=rg(K.key,g),te=(f?pe:et)||K.key==="Enter"||K.key.trim()==="";if(p&&n){const Ct=A==null?void 0:A.nodesRef.current.find(Lt=>Lt.parentId==null),At=A&&Ct?RM(A.nodesRef.current,Ct.id):null;if(fe&&At&&E){const Lt=new KeyboardEvent("keydown",{key:K.key,bubbles:!0});if(pe||Ee){var ue,Me;const xr=((ue=At.context)==null?void 0:ue.elements.domReference)===K.currentTarget,ro=Ee&&!xr?(Me=At.context)==null?void 0:Me.elements.domReference:pe?s.current.find(oo=>(oo==null?void 0:oo.id)===F):null;ro&&(kt(K),ro.dispatchEvent(Lt),G(void 0))}if(et&&At.context&&At.context.open&&At.parentId&&K.currentTarget!==At.context.elements.domReference){var qe;kt(K),(qe=At.context.elements.domReference)==null||qe.dispatchEvent(Lt);return}}return Ie(K)}if(!(!n&&!b&&fe)){if(te&&(P.current=f&&et?null:K.key),f){pe&&(kt(K),n?(L.current=vc(s,$.current),j(L.current)):r(!0,K.nativeEvent,"list-navigation"));return}et&&(c!=null&&(L.current=c),kt(K),!n&&b?r(!0,K.nativeEvent,"list-navigation"):Ie(K),n&&j(L.current))}},onFocus(){n&&!p&&j(null)},onPointerDown:Y,onMouseDown:oe,onClick:oe}},[F,De,Ie,$,m,s,f,j,r,n,b,g,h,c,A,p,E]);return R.useMemo(()=>l?{reference:de,floating:re,item:H}:{},[l,de,re,H])}const HM=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=HM.get(i))!=null?n:i,l=fs(),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:y}=p;const b={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...b,"aria-selected":m&&y};case"combobox":return{...b,...m&&{"aria-selected":!0}}}return{}},[o,i]);return R.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const sg=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 UM(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 GM(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=UM(n,i);return!c&&a==="close"&&l("unmounted"),Oe(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Tx(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:y}=GM(e,{duration:i}),b=It(n),v=It(r),g=It(o),T=It(s);return Oe(()=>{const S=uo(b.current,c),E=uo(g.current,c),C=uo(T.current,c),k=uo(v.current,c)||Object.keys(S).reduce((I,A)=>(I[A]="",I),{});if(y==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...S})),y==="open"&&p({transitionProperty:Object.keys(k).map(sg).join(","),transitionDuration:d+"ms",...C,...k}),y==="close"){const I=E||S;p({transitionProperty:Object.keys(I).map(sg).join(","),transitionDuration:f+"ms",...C,...I})}},[f,g,b,v,T,d,y,c]),{isMounted:m,styles:h}}function YM(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(""),y=R.useRef((n=h??i)!=null?n:-1),b=R.useRef(null),v=bt(a),g=bt(l),T=It(u),S=It(f);Oe(()=>{r&&(clearTimeout(p.current),b.current=null,m.current="")},[r]),Oe(()=>{if(r&&m.current===""){var A;y.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 j(N,M,V){const z=T.current?T.current(M,V):M.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))===0);return z?N.indexOf(z):-1}const O=s.current;if(m.current.length>0&&m.current[0]!==" "&&(j(O,O,m.current)===-1?E(!1):A.key===" "&&kt(A)),O==null||S.current.includes(A.key)||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;r&&A.key!==" "&&(kt(A),E(!0)),O.every(N=>{var M,V;return N?((M=N[0])==null?void 0:M.toLocaleLowerCase())!==((V=N[1])==null?void 0:V.toLocaleLowerCase()):!0})&&m.current===A.key&&(m.current="",y.current=b.current),m.current+=A.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",y.current=b.current,E(!1)},d);const P=y.current,D=j(O,[...O.slice((P||0)+1),...O.slice(0,(P||0)+1)],m.current);D!==-1?(v(D),b.current=D):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 ig(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 qM(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Ex(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,y=f-a,v=Math.sqrt(m*m+y*y)/p;return i=d,a=f,l=h,v}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:y,nodeId:b,tree:v}=d;return function(T){function S(){clearTimeout(o),y()}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",j=it(m.floating,I),O=it(m.domReference,I),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),D=p.split("-")[0],N=f>P.right-P.width/2,M=h>P.bottom-P.height/2,V=qM(k,L),z=P.width>L.width,_=P.height>L.height,$=(z?L:P).left,Z=(z?L:P).right,ee=(_?L:P).top,J=(_?L:P).bottom;if(j&&(s=!0,!A))return;if(O&&(s=!1),O&&!A){s=!0;return}if(A&&He(T.relatedTarget)&&it(m.floating,T.relatedTarget)||v&&Fr(v.nodesRef.current,b).some(B=>{let{context:W}=B;return W==null?void 0:W.open}))return;if(D==="top"&&h>=L.bottom-1||D==="bottom"&&h<=L.top+1||D==="left"&&f>=L.right-1||D==="right"&&f<=L.left+1)return S();let U=[];switch(D){case"top":U=[[$,L.top+1],[$,P.bottom-1],[Z,P.bottom-1],[Z,L.top+1]];break;case"bottom":U=[[$,P.top+1],[$,L.bottom-1],[Z,L.bottom-1],[Z,P.top+1]];break;case"left":U=[[P.right-1,J],[P.right-1,ee],[L.left+1,ee],[L.left+1,J]];break;case"right":U=[[L.right-1,J],[L.right-1,ee],[P.left+1,ee],[P.left+1,J]];break}function F(B){let[W,G]=B;switch(D){case"top":{const Q=[z?W+t/2:N?W+t*4:W-t*4,G+t+1],ce=[z?W-t/2:N?W+t*4:W-t*4,G+t+1],H=[[P.left,N||z?P.bottom-t:P.top],[P.right,N?z?P.bottom-t:P.top:P.bottom-t]];return[Q,ce,...H]}case"bottom":{const Q=[z?W+t/2:N?W+t*4:W-t*4,G-t],ce=[z?W-t/2:N?W+t*4:W-t*4,G-t],H=[[P.left,N||z?P.top+t:P.bottom],[P.right,N?z?P.top+t:P.bottom:P.top+t]];return[Q,ce,...H]}case"left":{const Q=[W+t+1,_?G+t/2:M?G+t*4:G-t*4],ce=[W+t+1,_?G-t/2:M?G+t*4:G-t*4];return[...[[M||_?P.right-t:P.left,P.top],[M?_?P.right-t:P.left:P.right-t,P.bottom]],Q,ce]}case"right":{const Q=[W-t,_?G+t/2:M?G+t*4:G-t*4],ce=[W-t,_?G-t/2:M?G+t*4:G-t*4],H=[[M||_?P.left+t:P.right,P.top],[M?_?P.left+t:P.right:P.left+t,P.bottom]];return[Q,ce,...H]}}}if(!ig([E,C],U)){if(s&&!V)return S();if(!A&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}ig([E,C],F([f,h]))?!s&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const ms=e=>{const t=x.useId(),[n,r]=x.useState(e.open),o=x.useRef(null),s=x.useMemo(()=>[Ri(10),Of({fallbackAxisSideDirection:"end"}),Af(),lx({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Qr({open:n,middleware:s,transform:!0,whileElementsMounted:Ci,onOpenChange:(p,m)=>{var b;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(b=e.onChange)==null||b.call(e,p))}}),c=ki(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(hs,{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(fx,{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]})})})]})},KM=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=ki(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(No,{...h(e),as:lt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:w.jsx(lt.span,{layoutId:o,children:e.trigger})}),w.jsx(fr,{children:s?w.jsx(Zr,{root:t,children:w.jsx(hs,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(lt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Cx=300,ZM=500,Rx=(e="")=>$e("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Fu=x.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),ag=x.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=pr(),c=l!==null,[u,d]=x.useState(!1),[f,h]=x.useState(!1),[p,m]=x.useState(null),y=x.useRef([]),b=x.useRef([]),v=x.useContext(Fu),g=gr(),T=SM(),S=dx(),{floatingStyles:E,refs:C,context:k}=Qr({nodeId:T,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Ci,placement:c?"right":"bottom-start",middleware:[Ri({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Of(),Af()]}),I=eo(k,{role:"menu",enabled:!0}),A=Xr(k,{bubbles:!0}),j=gx(k,{enabled:n,delay:{open:Cx},handleClose:Ex({blockPointerEvents:!0,buffer:1})}),O=ki(k,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),L=Mf(k,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:y,scrollItemIntoView:!0,onNavigate:m}),P=YM(k,{activeIndex:p,listRef:b,resetMs:ZM,onMatch:u?m:void 0}),{getReferenceProps:D,getFloatingProps:N,getItemProps:M}=Jr([j,O,I,A,L,P]);x.useEffect(()=>{if(!g)return;const z=()=>d(!1),_=$=>{$.nodeId!==T&&$.parentId===l&&d(!1)};return g.events.on("click",z),g.events.on("menuopen",_),()=>{g.events.off("click",z),g.events.off("menuopen",_)}},[g,T,l]),x.useEffect(()=>{u&&g&&g.events.emit("menuopen",{parentId:l,nodeId:T})},[g,u,T,l]);const V=r?i.className:$e(Rx(i.className));return w.jsxs(TM,{id:T,children:[w.jsx(x.Fragment,{children:i.asChild?w.jsx(zo,{children:s,ref:Lu([C.setReference,S.ref,a]),tabIndex:c?v.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":f?"":void 0,className:V,...D(v.getItemProps({...i,onFocus(z){var _;(_=i.onFocus)==null||_.call(i,z),h(!1),v.setHasFocusInside(!0)}}))}):w.jsxs("button",{type:"button",ref:Lu([C.setReference,S.ref,a]),tabIndex:c?v.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":f?"":void 0,className:V,...D(v.getItemProps({...i,onFocus(z){var _;(_=i.onFocus)==null||_.call(i,z),h(!1),v.setHasFocusInside(!0)}})),children:[s,c&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(rf,{size:14})]})]})}),w.jsx(Fu.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:M,setHasFocusInside:h,isOpen:u},children:w.jsx(yM,{elementsRef:y,labelsRef:b,children:u&&w.jsx(Zr,{preserveTabOrder:!0,children:w.jsx(hs,{context:k,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:w.jsx(t,{...N(),ref:C.setFloating,style:{...i.style,...E},className:$e("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),XM=x.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=x.useContext(Fu),a=dx({label:r?null:typeof e=="string"?e:t}),l=gr(),c=a.index===i.activeIndex;return w.jsxs("button",{...o,ref:Lu([a.ref,s]),"data-active":c,"data-open":i.isOpen,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Rx(o.className),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),QM=x.forwardRef((e,t)=>pr()!==null?w.jsx(ag,{...e,isParent:!1,ref:t}):w.jsx(EM,{children:w.jsx(ag,{...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 Px(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 ps(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 gs(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 lg(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 Vu(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 fa="right-scroll-bar-position",ha="width-before-scroll-bar",JM="with-scroll-bars-hidden",eN="--removed-body-scroll-bar-size";function Cc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function tN(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 nN=typeof window<"u"?R.useLayoutEffect:R.useEffect,cg=new WeakMap;function rN(e,t){var n=tN(null,function(r){return e.forEach(function(o){return Cc(o,r)})});return nN(function(){var r=cg.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Cc(a,null)}),s.forEach(function(a){o.has(a)||Cc(a,i)})}cg.set(n,e)},[e]),n}function oN(e){return e}function sN(e,t){t===void 0&&(t=oN);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 iN(e){e===void 0&&(e={});var t=sN(null);return t.options=En({async:!0,ssr:!1},e),t}var kx=function(e){var t=e.sideCar,n=Px(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))};kx.isSideCarExport=!0;function aN(e,t){return e.useMedium(t),kx}var Ix=iN(),Rc=function(){},kl=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:Rc,onWheelCapture:Rc,onTouchMoveCapture:Rc}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,v=e.gapMode,g=Px(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,S=rN([n,t]),E=En(En({},g),o);return R.createElement(R.Fragment,null,u&&R.createElement(T,{sideCar:Ix,removeScrollBar:c,shards:d,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:v}),i?R.cloneElement(R.Children.only(a),En(En({},E),{ref:S})):R.createElement(b,En({},E,{className:l,ref:S}),a))});kl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kl.classNames={fullWidth:ha,zeroRight:fa};var lN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=lN();return t&&e.setAttribute("nonce",t),e}function uN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var fN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=cN())&&(uN(t,n),dN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hN=function(){var e=fN();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ax=function(){var e=hN(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},mN={left:0,top:0,right:0,gap:0},Pc=function(e){return parseInt(e||"",10)||0},pN=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[Pc(n),Pc(r),Pc(o)]},gN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mN;var t=pN(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])}},yN=Ax(),Ro="data-scroll-locked",vN=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
- .`.concat(JM,` {
172
+ */var gM=["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])"],Va=gM.join(","),Q0=typeof Element>"u",Go=Q0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,$a=!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},Ba=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},yM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},vM=function(t,n,r){if(Ba(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Va));return n&&Go.call(t,Va)&&o.unshift(t),o=o.filter(r),o},bM=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ba(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,Va);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Ba(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)||yM(t))&&!J0(t)?0:t.tabIndex},xM=function(t,n){var r=ex(t);return r<0&&n&&!J0(t)?0:r},wM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},tx=function(t){return t.tagName==="INPUT"},SM=function(t){return tx(t)&&t.type==="hidden"},TM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},EM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},CM=function(t){if(!t.name)return!0;var n=t.form||$a(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=EM(o,t.form);return!s||s===t},RM=function(t){return tx(t)&&t.type==="radio"},PM=function(t){return RM(t)&&!CM(t)},kM=function(t){var n,r=t&&$a(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=$a(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},Dp=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},AM=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=$a(t);if(l&&!l.shadowRoot&&o(l)===!0)return Dp(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(kM(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Dp(t);return!1},IM=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},OM=function(t,n){return!(n.disabled||Ba(n)||SM(n)||AM(n,t)||TM(n)||IM(n))},Lu=function(t,n){return!(PM(n)||ex(n)<0||!OM(t,n))},_M=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},MM=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=xM(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(wM).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},ni=function(t,n){n=n||{};var r;return n.getShadowRoot?r=bM([t],n.includeContainer,{filter:Lu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:_M}):r=vM(t,n.includeContainer,Lu.bind(null,n)),MM(r)},DM=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Go.call(t,Va)===!1?!1:Lu(n,t)};function Np(e,t,n){let{reference:r,floating:o}=e;const s=Wr(t),i=kf(t),a=Pf(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 NM=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}=Np(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:b}=a[m],{x:v,y:g,data:T,reset:w}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=v??u,d=g??d,h={...h,[y]:{...h[y],...T}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=Np(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),y=a[f?d==="floating"?"reference":"floating":d],b=Fa(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),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},w=Fa(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:g,strategy:l}):v);return{top:(b.top-w.top+p.top)/T.y,bottom:(w.bottom-b.bottom+p.bottom)/T.y,left:(b.left-w.left+p.left)/T.x,right:(w.right-b.right+p.right)/T.x}}const jM=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=kf(o),p=Pf(h),m=await i.getDimensions(c),y=h==="y",b=y?"top":"left",v=y?"bottom":"right",g=y?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-f[h]-s.floating[p],w=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-w/2,A=C/2-m[p]/2-1,I=Cn(d[b],A),j=Cn(d[v],A),O=I,L=C-m[p]-j,P=C/2-m[p]/2+k,M=Nu(O,P,L),N=!l.arrow&&ds(o)!=null&&P!==M&&s.reference[p]/2-(P<O?I:j)-m[p]/2<0,D=N?P<O?P-O:P-L:0;return{[h]:f[h]+D,data:{[h]:M,centerOffset:P-M-D,...N&&{alignmentOffset:D}},reset:N}}}),LM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=us(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=lr(o),v=Wr(a),g=lr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=f||(g||!m?[La(a)]:fM(a)),E=p!=="none";!f&&E&&w.push(...mM(a,m,p,T));const C=[a,...w],k=await Af(t,y),A=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&A.push(k[b]),d){const P=dM(o,i,T);A.push(k[P[0]],k[P[1]])}if(I=[...I,{placement:o,overflows:A}],!A.every(P=>P<=0)){var j,O;const P=(((j=s.flip)==null?void 0:j.index)||0)+1,M=C[P];if(M)return{data:{index:P,overflows:I},reset:{placement:M}};let N=(O=I.filter(D=>D.overflows[0]<=0).sort((D,V)=>D.overflows[1]-V.overflows[1])[0])==null?void 0:O.placement;if(!N)switch(h){case"bestFit":{var L;const D=(L=I.filter(V=>{if(E){const z=Wr(V.placement);return z===v||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&&(N=D);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function FM(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 VM=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 FM(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}}}}},$M=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:b,y:v}=y;return{x:b,y:v}}},...l}=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 y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",v=h+u[y],g=h-u[b];h=Nu(v,h,g)}if(i){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",v=p+u[y],g=p-u[b];p=Nu(v,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},BM=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 y=h-l.top-l.bottom,b=f-l.left-l.right,v=Cn(h-l[p],y),g=Cn(f-l[m],b),T=!t.middlewareData.shift;let w=v,E=g;if(d?E=u||T?Cn(g,b):b:w=u||T?Cn(v,y):y,T&&!u){const k=Yt(l.left,0),A=Yt(l.right,0),I=Yt(l.top,0),j=Yt(l.bottom,0);d?E=f-2*(k!==0||A!==0?k+A:Yt(l.left,l.right)):w=h-2*(I!==0||j!==0?I+j:Yt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:w});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=ja(n)!==s||ja(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function If(e){return He(e)?e:e.contextElement}function Ro(e){const t=If(e);if(!ft(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=nx(t);let i=(s?ja(n.width):n.width)/r,a=(s?ja(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const WM=ar(0);function rx(e){const t=Vt(e);return!Sf()||!t.visualViewport?WM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zM(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=If(e);let i=ar(1);t&&(r?He(r)&&(i=Ro(r)):i=Ro(e));const a=zM(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=Mu(p);for(;m&&r&&h!==p;){const y=Ro(m),b=m.getBoundingClientRect(),v=Qt(m),g=b.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,T=b.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=g,c+=T,p=Vt(m),m=Mu(p)}}return Fa({width:u,height:d,x:l,y:c})}function HM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Yn(r),a=t?Rl(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"||Ci(i))&&(l=Pl(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 UM(e){return Array.from(e.getClientRects())}function ox(e){return zr(Yn(e)).left+Pl(e).scrollLeft}function GM(e){const t=Yn(e),n=Pl(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 YM(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=Sf();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function qM(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 jp(e,t,n){let r;if(t==="viewport")r=YM(e,n);else if(t==="document")r=GM(Yn(e));else if(He(t))r=qM(t,n);else{const o=rx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Fa(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 KM(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=wf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ci(i)&&!l&&sx(e,i))?r=r.filter(u=>u!==i):o=a,i=Hn(i)}return t.set(e,r),r}function ZM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Rl(t)?[]:KM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=jp(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},jp(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XM(e){const{width:t,height:n}=nx(e);return{width:t,height:n}}function QM(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"||Ci(o))&&(a=Pl(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 vc(e){return Qt(e).position==="static"}function Lp(e,t){return!ft(e)||Qt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ix(e,t){const n=Vt(e);if(Rl(e))return n;if(!ft(e)){let o=Hn(e);for(;o&&!ir(o);){if(He(o)&&!vc(o))return o;o=Hn(o)}return n}let r=Lp(e,t);for(;r&&rM(r)&&vc(r);)r=Lp(r,t);return r&&ir(r)&&vc(r)&&!wf(r)?n:r||oM(e)||n}const JM=async function(e){const t=this.getOffsetParent||ix,n=this.getDimensions,r=await n(e.floating);return{reference:QM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eD(e){return Qt(e).direction==="rtl"}const tD={convertOffsetParentRelativeRectToViewportRelativeRect:HM,getDocumentElement:Yn,getClippingRect:ZM,getOffsetParent:ix,getElementRects:JM,getClientRects:UM,getDimensions:XM,getScale:Ro,isElement:He,isRTL:eD};function nD(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)),y=Eo(c),v={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Yt(0,Cn(1,l))||1};let g=!0;function T(w){const E=w[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,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,v)}n.observe(e)}return i(!0),s}function Ri(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=If(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?nD(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(b=>{let[v]=b;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?zr(e):null;l&&y();function y(){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(y)}return n(),()=>{var b;u.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const rD=VM,oD=$M,sD=LM,iD=BM,Fp=jM,aD=(e,t,n)=>{const r=new Map,o={platform:tD,...n},s={...o.platform,_c:r};return NM(e,t,{...o,platform:s})};var ua=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Wa(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(!Wa(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)&&!Wa(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 Vp(e,t){const n=ax(e);return Math.round(t*n)/n}function $p(e){const t=R.useRef(e);return ua(()=>{t.current=e}),t}function lD(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);Wa(f,r)||h(r);const[p,m]=R.useState(null),[y,b]=R.useState(null),v=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,w=i||y,E=R.useRef(null),C=R.useRef(null),k=R.useRef(u),A=l!=null,I=$p(l),j=$p(o),O=R.useCallback(()=>{if(!E.current||!C.current)return;const D={placement:t,strategy:n,middleware:f};j.current&&(D.platform=j.current),aD(E.current,C.current,D).then(V=>{const z={...V,isPositioned:!0};L.current&&!Wa(k.current,z)&&(k.current=z,pi.flushSync(()=>{d(z)}))})},[f,t,n,j]);ua(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[c]);const L=R.useRef(!1);ua(()=>(L.current=!0,()=>{L.current=!1}),[]),ua(()=>{if(T&&(E.current=T),w&&(C.current=w),T&&w){if(I.current)return I.current(T,w,O);O()}},[T,w,O,I,A]);const P=R.useMemo(()=>({reference:E,floating:C,setReference:v,setFloating:g}),[v,g]),M=R.useMemo(()=>({reference:T,floating:w}),[T,w]),N=R.useMemo(()=>{const D={position:n,left:0,top:0};if(!M.floating)return D;const V=Vp(M.floating,u.x),z=Vp(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:N}),[u,O,P,M,N])}const cD=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?Fp({element:r.current,padding:o}).fn(n):{}:r?Fp({element:r,padding:o}).fn(n):{}}}},Pi=(e,t)=>({...rD(e),options:[e,t]}),Of=(e,t)=>({...oD(e),options:[e,t]}),_f=(e,t)=>({...sD(e),options:[e,t]}),lx=(e,t)=>({...iD(e),options:[e,t]}),cx=(e,t)=>({...cD(e),options:[e,t]});function Fu(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},uD=ux.useInsertionEffect,dD=uD||(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 dD(()=>{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 Mf="ArrowUp",ki="ArrowDown",Yo="ArrowLeft",fs="ArrowRight";function Ki(e,t,n){return Math.floor(e/t)!==n}function Bs(e,t){return t<0||t>=e.current.length}function bc(e,t){return _t(e,{disabledIndices:t})}function Bp(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&&da(i,a,o));return a}function fD(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===Mf){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===ki&&(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&&Ki(d,s,f)&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=_t(e,{startingIndex:c-c%s-1,disabledIndices:i})),Ki(d,s,f)&&(d=c)),n.key===Yo&&(u&&kt(n),c%s!==0?(d=_t(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Ki(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})),Ki(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 hD(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 mD(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 pD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function da(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let Wp=0;function Jn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Wp);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Wp=requestAnimationFrame(s)}var Ie=typeof document<"u"?x.useLayoutEffect:x.useEffect;function gD(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 yD(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 vD(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 Ie(()=>{const l=new Map(o);Array.from(l.keys()).sort(gD).forEach((u,d)=>{l.set(u,d)}),yD(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 Ie(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ie(()=>{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 zp=!1,bD=0;const Hp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bD++;function xD(){const[e,t]=R.useState(()=>zp?Hp():void 0);return Ie(()=>{e==null&&t(Hp())},[]),R.useEffect(()=>{zp=!0},[]),e}const wD=ux.useId,hs=wD||xD;let ri;process.env.NODE_ENV!=="production"&&(ri=new Set);function fa(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ri)!=null&&e.has(o))){var s;(s=ri)==null||s.add(o),console.warn(o)}}function SD(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ri)!=null&&e.has(o))){var s;(s=ri)==null||s.add(o),console.error(o)}}const 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||fa("The `ref` prop is required for `FloatingArrow`."));const y=hs(),[b,v]=R.useState(!1);if(Ie(()=>{if(!o)return;Qt(o).direction==="rtl"&&v(!0)},[o]),!o)return null;const g=c*2,T=g/2,w=i/2*(l/-8+1),E=a/2*l/4,[C,k]=r.split("-"),A=!!f,I=C==="top"||C==="bottom",j=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-w)+","+(a-E))+(" Q"+i/2+","+a+" "+w+","+(a-E))+" Z",N={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[C];return R.createElement("svg",qo({},m,{"aria-hidden":!0,ref:n,width:A?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[O]:L,[j]:P,[C]:I||A?"100%":"calc(100% - "+g/2+"px)",transform:""+N+(h??""),...p}}),g>0&&R.createElement("path",{clipPath:"url(#"+y+")",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:y},R.createElement("rect",{x:-T,y:T*(A?-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 TD(e){const t=hs(),n=gr(),o=pr();return Ie(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function ED(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 CD(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 At(e){const t=x.useRef(e);return Ie(()=>{t.current=e}),t}const Up=cr("safe-polygon");function xc(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=At(c),y=At(l),b=At(n),v=R.useRef(),g=R.useRef(-1),T=R.useRef(),w=R.useRef(-1),E=R.useRef(!0),C=R.useRef(!1),k=R.useRef(()=>{}),A=R.useCallback(()=>{var M;const N=(M=o.current.openEvent)==null?void 0:M.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);R.useEffect(()=>{if(!a)return;function M(N){let{open:D}=N;D||(clearTimeout(g.current),clearTimeout(w.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){A()&&r(!1,D,"hover")}const N=St(i.floating).documentElement;return N.addEventListener("mouseleave",M),()=>{N.removeEventListener("mouseleave",M)}},[i.floating,n,r,a,m,A]);const I=R.useCallback(function(M,N,D){N===void 0&&(N=!0),D===void 0&&(D="hover");const V=xc(y.current,"close",v.current);V&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,M,D),V)):N&&(clearTimeout(g.current),r(!1,M,D))},[y,r]),j=bt(()=>{k.current(),T.current=void 0}),O=bt(()=>{if(C.current){const M=St(i.floating).body;M.style.pointerEvents="",M.removeAttribute(Up),C.current=!1}});R.useEffect(()=>{if(!a)return;function M(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(_){if(clearTimeout(g.current),E.current=!1,u&&!Uo(v.current)||d>0&&!xc(y.current,"open"))return;const $=xc(y.current,"open",v.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(w.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(),j(),I(_,!0,"safe-polygon")}});const re=T.current;$.addEventListener("mousemove",re),k.current=()=>{$.removeEventListener("mousemove",re)};return}(v.current==="touch"?!it(i.floating,_.relatedTarget):!0)&&I(_)}function V(_){M()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:_.clientX,y:_.clientY,onClose(){O(),j(),I(_)}})(_))}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",N,{once:!0}),_.addEventListener("mouseenter",N),_.addEventListener("mouseleave",D),()=>{var $;n&&_.removeEventListener("mouseleave",V),($=i.floating)==null||$.removeEventListener("mouseleave",V),f&&_.removeEventListener("mousemove",N),_.removeEventListener("mouseenter",N),_.removeEventListener("mouseleave",D)}}},[i,a,e,u,d,f,I,j,O,r,n,b,h,y,m,o]),Ie(()=>{var M;if(a&&n&&(M=m.current)!=null&&M.__options.blockPointerEvents&&A()){const D=St(i.floating).body;D.setAttribute(Up,""),D.style.pointerEvents="none",C.current=!0;const V=i.floating;if(He(i.domReference)&&V){var N;const z=i.domReference,_=h==null||(N=h.nodesRef.current.find($=>$.id===p))==null||(N=N.context)==null?void 0:N.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,A]),Ie(()=>{n||(v.current=void 0,j(),O())},[n,j,O]),R.useEffect(()=>()=>{j(),clearTimeout(g.current),clearTimeout(w.current),O()},[a,i.domReference,j,O]);const L=R.useMemo(()=>{function M(N){v.current=N.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(N){const{nativeEvent:D}=N;function V(){!E.current&&!b.current&&r(!0,D,"hover")}u&&!Uo(v.current)||n||d===0||(clearTimeout(w.current),v.current==="touch"?V():w.current=window.setTimeout(V,d))}}},[u,r,n,b,d]),P=R.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(M){I(M.nativeEvent,!1)}}),[I]);return R.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function RD(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 PD(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,Zi=new WeakSet,Xi={},wc=0;const kD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,vx=e=>e&&(e.host||vx(e.parentNode)),AD=(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 ID(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=AD(t,e),a=new Set,l=new Set(i),c=[];Xi[o]||(Xi[o]=new WeakMap);const u=Xi[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,y=m!==null&&m!=="false",b=(co.get(p)||0)+1,v=(u.get(p)||0)+1;co.set(p,b),u.set(p,v),c.push(p),b===1&&y&&Zi.add(p),v===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return wc++,()=>{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||(!Zi.has(h)&&s&&h.removeAttribute(s),Zi.delete(h)),m||h.removeAttribute(o)}),wc--,wc||(co=new WeakMap,co=new WeakMap,Zi=new WeakSet,Xi={})}}function Gp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=St(e[0]).body;return ID(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=ni(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 OD(e){ni(e,Ko()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function _D(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 MD(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 Df={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 DD;function Yp(e){e.key==="Tab"&&(e.target,clearTimeout(DD))}const za=R.forwardRef(function(t,n){const[r,o]=R.useState();Ie(()=>(Cf()&&o("button"),document.addEventListener("keydown",Yp),()=>{document.removeEventListener("keydown",Yp)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[cr("focus-guard")]:"",style:Df};return R.createElement("span",qo({},t,s))}),Sx=R.createContext(null),qp=cr("portal");function ND(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 Ie(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ie(()=>{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(qp,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Ie(()=>{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(qp,""),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=ND({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"?_D:OD)(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(za,{"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:Df}),s&&pi.createPortal(t,s),f&&s&&R.createElement(za,{"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),Kp=20;let Rr=[];function Sc(e){Rr=Rr.filter(n=>n.isConnected);let t=e;if(!(!t||mr(t)==="body")){if(!DM(t,Ko())){const n=ni(t,Ko())[0];n&&(t=n)}Rr.push(t),Rr.length>Kp&&(Rr=Rr.slice(-Kp))}}function Zp(){return Rr.slice().reverse().find(e=>e.isConnected)}const jD=R.forwardRef(function(t,n){return R.createElement("button",qo({},t,{type:"button",ref:n,tabIndex:-1,style:Df}))});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:y,dataRef:b,floatingId:v,elements:{domReference:g,floating:T}}=t,w=typeof i=="number"&&i<0,E=K0(g)&&w,C=kD()?s:!0,k=At(o),A=At(i),I=At(a),j=gr(),O=Tx(),L=R.useRef(null),P=R.useRef(null),M=R.useRef(!1),N=R.useRef(!1),D=R.useRef(-1),V=O!=null,z=T==null?void 0:T.firstElementChild,_=(z==null?void 0:z.id)===v?z:T,$=bt(function(G){return G===void 0&&(G=_),G?ni(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(){N.current=!0,setTimeout(()=>{N.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"))||j&&(Fr(j.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)})||RD(j.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&&!N.current&&H!==Zp()&&(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,j,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?Gp(B,C,!C):Gp(B);return()=>{H()}}},[r,g,T,c,k,O,E,C]),Ie(()=>{if(r||!ft(_))return;const G=St(_),F=ln(G);queueMicrotask(()=>{const B=Z(_),H=A.current,Y=(typeof H=="number"?B[H]:H.current)||_,Q=it(_,F);!w&&!Q&&f&&Jn(Y,{preventScroll:Y===_})})},[r,f,_,w,Z,A]),Ie(()=>{if(r||!_)return;let G=!1;const F=St(_),B=ln(F);let Y=b.current.openEvent;const Q=h.domReference.current;Sc(B);function ue(U){let{open:ke,reason:qe,event:Le,nested:Te}=U;ke&&(Y=Le),qe==="escape-key"&&h.domReference.current&&Sc(h.domReference.current),qe==="hover"&&Le.type==="mouseleave"&&(M.current=!0),qe==="outside-press"&&(Te?(M.current=!1,G=!0):M.current=!(Y0(Le)||Ef(Le)))}return y.on("openchange",ue),()=>{y.off("openchange",ue);const U=ln(F),ke=it(T,U)||j&&Fr(j.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&&Sc(h.domReference.current);const Le=Q||B,Te=ni(St(Le).body,Ko());queueMicrotask(()=>{let q=Zp();!q&&ft(Le)&&T&&(q=MD(Te,Le,T)),I.current&&!M.current&&ft(q)&&(!(q!==U&&U!==F.body)||ke)&&q.focus({preventScroll:G})})}},[r,T,_,I,b,h,y,j,p]),Ie(()=>{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]),Ie(()=>{if(r||!_||typeof MutationObserver!="function"||w)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,$,w]);function re(G){return r||!u||!c?null:R.createElement(jD,{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(za,{"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(za,{"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 Tc=new Set,LD=R.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=hs();return Ie(()=>{if(!r)return;Tc.add(s);const i=/iP(hone|ad|od)|iOS/.test(Tf()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(y))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Tc.delete(s),Tc.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 Xp(e){return ft(e.target)&&e.target.tagName==="BUTTON"}function Qp(e){return Rf(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||Xp(p))&&(p.key===" "&&!Qp(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Xp(p)||Qp(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 FD(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 Jp(e){return e!=null&&e.clientX!=null}function VD(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,y]=R.useState([]),b=bt((E,C)=>{d.current||r.current.openEvent&&!Jp(r.current.openEvent)||i.setPositionReference(FD(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),v=bt(E=>{c!=null||u!=null||(n?f.current||y([]):b(E.clientX,E.clientY))}),g=Uo(h)?o:n,T=R.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Vt(o);function C(k){const A=Tn(k);it(o,A)?(E.removeEventListener("mousemove",C),f.current=null):b(k.clientX,k.clientY)}if(!r.current.openEvent||Jp(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]),Ie(()=>{a&&(c!=null||u!=null)&&(d.current=!1,b(c,u))},[a,c,u,b]);const w=R.useMemo(()=>{function E(C){let{pointerType:k}=C;p(k)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:v,onMouseEnter:v}},[v]);return R.useMemo(()=>a?{reference:w}:{},[a,w])}const $D={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},BD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},eg=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(),y=bt(typeof l=="function"?l:()=>!1),b=typeof l=="function"?y:l,v=R.useRef(!1),g=R.useRef(!1),{escapeKey:T,outsidePress:w}=eg(h),{escapeKey:E,outsidePress:C}=eg(p),k=bt(P=>{var M;if(!n||!i||!a||P.key!=="Escape")return;const N=(M=s.current.floatingContext)==null?void 0:M.nodeId,D=m?Fr(m.nodesRef.current,N):[];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,iM(P)?P.nativeEvent:P,"escape-key")}),A=bt(P=>{var M;const N=()=>{var D;k(P),(D=Tn(P))==null||D.removeEventListener("keydown",N)};(M=Tn(P))==null||M.addEventListener("keydown",N)}),I=bt(P=>{var M;const N=v.current;v.current=!1;const D=g.current;if(g.current=!1,c==="click"&&D||N||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)&&!aM(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 yc(P,(F=G.context)==null?void 0:F.elements.floating)});if(yc(P,o.floating)||yc(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")}),j=bt(P=>{var M;const N=()=>{var D;I(P),(D=Tn(P))==null||D.removeEventListener(c,N)};(M=Tn(P))==null||M.addEventListener(c,N)});R.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=w;function P(D){r(!1,D,"ancestor-scroll")}const M=St(o.floating);a&&M.addEventListener("keydown",E?A:k,E),b&&M.addEventListener(c,C?j:I,C);let N=[];return f&&(He(o.domReference)&&(N=rr(o.domReference)),He(o.floating)&&(N=N.concat(rr(o.floating))),!He(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(rr(o.reference.contextElement)))),N=N.filter(D=>{var V;return D!==((V=M.defaultView)==null?void 0:V.visualViewport)}),N.forEach(D=>{D.addEventListener("scroll",P,{passive:!0})}),()=>{a&&M.removeEventListener("keydown",E?A:k,E),b&&M.removeEventListener(c,C?j:I,C),N.forEach(D=>{D.removeEventListener("scroll",P)})}},[s,o,a,b,c,n,r,f,i,T,w,k,E,A,I,C,j]),R.useEffect(()=>{v.current=!1},[b,c]);const O=R.useMemo(()=>({onKeyDown:k,[$D[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},[BD[c]]:()=>{v.current=!0}}),[k,c]);return R.useMemo(()=>i?{reference:O,floating:L}:{},[i,O,L])}function WD(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)&&SD("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=WD({...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();Ie(()=>{u&&(d.current=u)},[u]);const h=lD({...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]),y=R.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),b=R.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),v=R.useMemo(()=>({...h,...r,refs:y,elements:b,nodeId:t}),[h,y,b,t,r]);return Ie(()=>{r.dataRef.current.floatingContext=v;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=v)}),R.useMemo(()=>({...h,context:v,refs:y,elements:b}),[h,y,b,v])}function zD(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){Ef(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(Cf()&&q0())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Rf(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=He(p)&&p.hasAttribute(cr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var b;const v=ln(i.domReference?i.domReference.ownerDocument:document);!p&&v===i.domReference||it((b=s.current.floatingContext)==null?void 0:b.refs.floating.current,v)||it(i.domReference,v)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return R.useMemo(()=>a?{reference:f}:{},[a,f])}const tg="active",ng="selected";function Ec(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[tg]:i,[ng]: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&&[tg,ng].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function 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=>Ec(a,e,"reference"),t),s=R.useCallback(a=>Ec(a,e,"floating"),n),i=R.useCallback(a=>Ec(a,e,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let rg=!1;function kl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function og(e,t){return kl(t,e===Mf||e===ki,e===Yo||e===fs)}function Cc(e,t,n){return kl(t,e===ki,n?e===Yo:e===fs)||e==="Enter"||e===" "||e===""}function HD(e,t,n){return kl(t,n?e===Yo:e===fs,e===ki)}function sg(e,t,n){return kl(t,n?e===fs:e===Yo,e===Mf)}function Nf(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:v=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:w=!0,virtualItemRef:E,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||fa("`useListNavigation` looping must be enabled to allow escaping."),p||fa("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&fa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const A=pr(),I=gr(),j=bt(a),O=R.useRef(m),L=R.useRef(c??-1),P=R.useRef(null),M=R.useRef(!0),N=R.useRef(j),D=R.useRef(!!o.floating),V=R.useRef(n),z=R.useRef(!1),_=R.useRef(!1),$=At(v),Z=At(n),re=At(w),ee=At(o.floating),G=At(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),I==null||I.events.emit("virtualfocus",ce),E&&(E.current=ce)):Jn(ce,{preventScroll:!0,sync:q0()&&Cf()?rg||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))})});Ie(()=>{document.createElement("div").focus({get preventScroll(){return rg=!0,!1}})},[]),Ie(()=>{l&&(n&&o.floating?O.current&&c!=null&&(_.current=!0,L.current=c,j(c)):D.current&&(L.current=-1,N.current(null)))},[l,n,o.floating,c,j]),Ie(()=>{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||Cc(P.current,g,h)||f?bc(s,$.current):Bp(s,$.current),P.current=null,j(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,j,Q,$]),Ie(()=>{var q;if(!l||o.floating||!I||p||!D.current)return;const se=I.nodesRef.current,W=(q=se.find(ce=>ce.id===A))==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,I,A,p]),Ie(()=>{if(!l||!I||!p||A)return;function q(se){Y(se.id),E&&(E.current=se)}return I.events.on("virtualfocus",q),()=>{I.events.off("virtualfocus",q)}},[l,I,p,A,E]),Ie(()=>{N.current=j,D.current=!!o.floating}),Ie(()=>{n||(P.current=null)},[n]),Ie(()=>{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&&j(J)}return{onFocus(W){let{currentTarget:J}=W;q(J)},onClick:W=>{let{currentTarget:J}=W;return J.focus({preventScroll:!0})},...y&&{onMouseMove(W){let{currentTarget:J}=W;q(J)},onPointerLeave(W){let{pointerType:J}=W;!M.current||J==="touch"||(L.current=-1,Q(s,L),j(null),p||Jn(ee.current,{preventScroll:!0}))}}}},[n,ee,Q,y,s,j,p]),ke=bt(q=>{if(M.current=!1,z.current=!0,!Z.current&&q.currentTarget===ee.current)return;if(f&&sg(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=bc(s,v),J=Bp(s,v);if(q.key==="Home"&&(kt(q),L.current=W,j(L.current)),q.key==="End"&&(kt(q),L.current=J,j(L.current)),T>1){const pe=C||Array.from({length:s.current.length},()=>({width:1,height:1})),ce=hD(pe,T,k),Fe=ce.findIndex(ie=>ie!=null&&!da(s.current,ie,v)),te=ce.reduce((ie,_e,Ke)=>_e!=null&&!da(s.current,_e,v)?Ke:ie,-1);if(L.current=ce[fD({current:ce.map(ie=>ie!=null?s.current[ie]:null)},{event:q,orientation:g,loop:d,cols:T,disabledIndices:pD([...v||s.current.map((ie,_e)=>da(s.current,_e)?_e:void 0),void 0],ce),minIndex:Fe,maxIndex:te,prevIndex:mD(L.current>J?W:L.current,pe,ce,T,q.key===ki?"bl":q.key===fs?"tr":"tl"),stopEvent:!0})],j(L.current),g==="both")return}if(og(q.key,g)){if(kt(q),n&&!p&&ln(q.currentTarget.ownerDocument)===q.currentTarget){L.current=Cc(q.key,g,h)?W:J,j(L.current);return}Cc(q.key,g,h)?d?L.current=se>=J?u&&se!==s.current.length?-1:W:_t(s,{startingIndex:se,disabledIndices:v}):L.current=Math.min(J,_t(s,{startingIndex:se,disabledIndices:v})):d?L.current=se<=W?u&&se!==-1?s.current.length:J:_t(s,{startingIndex:se,decrement:!0,disabledIndices:v}):L.current=Math.max(W,_t(s,{startingIndex:se,decrement:!0,disabledIndices:v})),Bs(s,L.current)?j(null):j(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"&&Ef(W.nativeEvent)&&(O.current=!0)}return{...qe,onKeyDown(W){M.current=!1;const J=W.key.indexOf("Arrow")===0,pe=HD(W.key,g,h),ce=sg(W.key,g,h),Fe=og(W.key,g),te=(f?pe:Fe)||W.key==="Enter"||W.key.trim()==="";if(p&&n){const Ct=I==null?void 0:I.nodesRef.current.find(Lt=>Lt.parentId==null),It=I&&Ct?PD(I.nodesRef.current,Ct.id):null;if(J&&It&&E){const Lt=new KeyboardEvent("keydown",{key:W.key,bubbles:!0});if(pe||ce){var ie,_e;const xr=((ie=It.context)==null?void 0:ie.elements.domReference)===W.currentTarget,ro=ce&&!xr?(_e=It.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&&It.context&&It.context.open&&It.parentId&&W.currentTarget!==It.context.elements.domReference){var Ke;kt(W),(Ke=It.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=bc(s,$.current),j(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&&j(L.current))}},onFocus(){n&&!p&&j(null)},onPointerDown:se,onMouseDown:q,onClick:q}},[F,qe,ke,$,m,s,f,j,r,n,b,g,h,c,I,p,E]);return R.useMemo(()=>l?{reference:Te,floating:Le,item:U}:{},[l,Te,Le,U])}const UD=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=UD.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:y}=p;const b={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...b,"aria-selected":m&&y};case"combobox":return{...b,...m&&{"aria-selected":!0}}}return{}},[o,i]);return R.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const ig=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 GD(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 YD(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=GD(n,i);return!c&&a==="close"&&l("unmounted"),Ie(()=>{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:y}=YD(e,{duration:i}),b=At(n),v=At(r),g=At(o),T=At(s);return Ie(()=>{const w=uo(b.current,c),E=uo(g.current,c),C=uo(T.current,c),k=uo(v.current,c)||Object.keys(w).reduce((A,I)=>(A[I]="",A),{});if(y==="initial"&&p(A=>({transitionProperty:A.transitionProperty,...C,...w})),y==="open"&&p({transitionProperty:Object.keys(k).map(ig).join(","),transitionDuration:d+"ms",...C,...k}),y==="close"){const A=E||w;p({transitionProperty:Object.keys(A).map(ig).join(","),transitionDuration:f+"ms",...C,...A})}},[f,g,b,v,T,d,y,c]),{isMounted:m,styles:h}}function qD(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(""),y=R.useRef((n=h??i)!=null?n:-1),b=R.useRef(null),v=bt(a),g=bt(l),T=At(u),w=At(f);Ie(()=>{r&&(clearTimeout(p.current),b.current=null,m.current="")},[r]),Ie(()=>{if(r&&m.current===""){var I;y.current=(I=h??i)!=null?I:-1}},[r,h,i]);const E=bt(I=>{I?o.current.typing||(o.current.typing=I,g(I)):o.current.typing&&(o.current.typing=I,g(I))}),C=bt(I=>{function j(N,D,V){const z=T.current?T.current(D,V):D.find(_=>(_==null?void 0:_.toLocaleLowerCase().indexOf(V.toLocaleLowerCase()))===0);return z?N.indexOf(z):-1}const O=s.current;if(m.current.length>0&&m.current[0]!==" "&&(j(O,O,m.current)===-1?E(!1):I.key===" "&&kt(I)),O==null||w.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(kt(I),E(!0)),O.every(N=>{var D,V;return N?((D=N[0])==null?void 0:D.toLocaleLowerCase())!==((V=N[1])==null?void 0:V.toLocaleLowerCase()):!0})&&m.current===I.key&&(m.current="",y.current=b.current),m.current+=I.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",y.current=b.current,E(!1)},d);const P=y.current,M=j(O,[...O.slice((P||0)+1),...O.slice(0,(P||0)+1)],m.current);M!==-1?(v(M),b.current=M):I.key!==" "&&(m.current="",E(!1))}),k=R.useMemo(()=>({onKeyDown:C}),[C]),A=R.useMemo(()=>({onKeyDown:C,onKeyUp(I){I.key===" "&&E(!1)}}),[C,E]);return R.useMemo(()=>c?{reference:k,floating:A}:{},[c,k,A])}function ag(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 KD(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,y=f-a,v=Math.sqrt(m*m+y*y)/p;return i=d,a=f,l=h,v}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:y,nodeId:b,tree:v}=d;return function(T){function w(){clearTimeout(o),y()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:C}=T,k=[E,C],A=Tn(T),I=T.type==="mouseleave",j=it(m.floating,A),O=it(m.domReference,A),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),M=p.split("-")[0],N=f>P.right-P.width/2,D=h>P.bottom-P.height/2,V=KD(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(j&&(s=!0,!I))return;if(O&&(s=!1),O&&!I){s=!0;return}if(I&&He(T.relatedTarget)&&it(m.floating,T.relatedTarget)||v&&Fr(v.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 w();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:N?H+t*4:H-t*4,Y+t+1],ue=[z?H-t/2:N?H+t*4:H-t*4,Y+t+1],U=[[P.left,N||z?P.bottom-t:P.top],[P.right,N?z?P.bottom-t:P.top:P.bottom-t]];return[Q,ue,...U]}case"bottom":{const Q=[z?H+t/2:N?H+t*4:H-t*4,Y-t],ue=[z?H-t/2:N?H+t*4:H-t*4,Y-t],U=[[P.left,N||z?P.top+t:P.bottom],[P.right,N?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(!ag([E,C],G)){if(s&&!V)return w();if(!I&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return w()}ag([E,C],F([f,h]))?!s&&r&&(o=window.setTimeout(w,40)):w()}}};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(()=>[Pi(10),_f({fallbackAxisSideDirection:"end"}),Of(),cx({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Qr({open:n,middleware:s,transform:!0,whileElementsMounted:Ri,onOpenChange:(p,m)=>{var b;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(b=e.onChange)==null||b.call(e,p))}}),c=Ai(l),u=Xr(l),d=eo(l),{getReferenceProps:f,getFloatingProps:h}=Jr([c,u,d]);return S.jsxs(x.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]})})})]})},ZD=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 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,XD=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),Vu=x.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),lg=x.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const[l,c]=x.useState(!1),[u,d]=x.useState(!1),[f,h]=x.useState(null),p=x.useRef([]),m=x.useRef([]),y=x.useContext(Vu),b=pr(),v=gr(),g=TD(),T=fx(),w=b!==null,{floatingStyles:E,refs:C,context:k}=Qr({nodeId:g,open:l,transform:!0,strategy:"absolute",onOpenChange:c,whileElementsMounted:Ri,placement:w?"right":"bottom-start",middleware:[Pi({mainAxis:w?0:4,alignmentAxis:w?-4:0}),_f(),Of()]}),A=eo(k,{role:"menu",enabled:!0}),I=Xr(k,{bubbles:!0}),j=yx(k,{move:!1,enabled:n,delay:{open:Rx},handleClose:Cx({blockPointerEvents:!0})}),O=Ai(k,{event:"mousedown",toggle:!w,ignoreMouse:w,keyboardHandlers:!0}),L=Nf(k,{loop:!0,listRef:p,activeIndex:f,nested:w,onNavigate:h}),P=qD(k,{activeIndex:f,listRef:m,resetMs:XD,onMatch:l?h:void 0}),{getReferenceProps:M,getFloatingProps:N,getItemProps:D}=Jr([j,O,A,I,L,P]);x.useEffect(()=>{if(!v)return;function z(){c(!1)}function _($){$.nodeId!==g&&$.parentId===b&&c(!1)}return v.events.on("click",z),v.events.on("menuopen",_),()=>{v.events.off("click",z),v.events.off("menuopen",_)}},[v,g,b]),x.useEffect(()=>{l&&v&&v.events.emit("menuopen",{parentId:b,nodeId:g})},[v,l,g,b]);const V=r?i.className:Me(Px(i.className));return S.jsxs(ED,{id:g,children:[S.jsx(x.Fragment,{children:i.asChild?S.jsx(Ho,{children:s,ref:Fu([C.setReference,T.ref,a]),tabIndex:w?y.activeIndex===T.index?0:-1:void 0,"data-open":l?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":u?"":void 0,className:V,...M(y.getItemProps({...i,onFocus(z){var _;(_=i.onFocus)==null||_.call(i,z),d(!1),y.setHasFocusInside(!0)}}))}):S.jsxs("button",{type:"button",className:V,"data-open":l?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":u?"":void 0,ref:Fu([C.setReference,T.ref,a]),tabIndex:w?y.activeIndex===T.index?0:-1:void 0,...M(y.getItemProps({...i,onFocus(z){var _;(_=i.onFocus)==null||_.call(i,z),d(!1),y.setHasFocusInside(!0)}})),children:[s,w&&S.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[S.jsx("span",{className:"sr-only",children:"Next menu"}),S.jsx(of,{size:14})]})]})}),S.jsx(Vu.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:D,setHasFocusInside:d,isOpen:l},children:S.jsx(vD,{elementsRef:p,labelsRef:m,children:l&&S.jsx(Zr,{preserveTabOrder:!0,children:S.jsx(ms,{context:k,modal:!1,initialFocus:w?-1:0,returnFocus:!w,children:S.jsx(t,{...N(),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})})})})})]})}),QD=x.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=x.useContext(Vu),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:Fu([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]})}),JD=x.forwardRef((e,t)=>pr()!==null?S.jsx(lg,{...e,isParent:!1,ref:t}):S.jsx(CD,{children:S.jsx(lg,{...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 cg(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 $u(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 ha="right-scroll-bar-position",ma="width-before-scroll-bar",eN="with-scroll-bars-hidden",tN="--removed-body-scroll-bar-size";function Rc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nN(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 rN=typeof window<"u"?R.useLayoutEffect:R.useEffect,ug=new WeakMap;function oN(e,t){var n=nN(null,function(r){return e.forEach(function(o){return Rc(o,r)})});return rN(function(){var r=ug.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Rc(a,null)}),s.forEach(function(a){o.has(a)||Rc(a,i)})}ug.set(n,e)},[e]),n}function sN(e){return e}function iN(e,t){t===void 0&&(t=sN);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 aN(e){e===void 0&&(e={});var t=iN(null);return t.options=En({async:!0,ssr:!1},e),t}var Ax=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))};Ax.isSideCarExport=!0;function lN(e,t){return e.useMedium(t),Ax}var Ix=aN(),Pc=function(){},Al=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:Pc,onWheelCapture:Pc,onTouchMoveCapture:Pc}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,v=e.gapMode,g=kx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=f,w=oN([n,t]),E=En(En({},g),o);return R.createElement(R.Fragment,null,u&&R.createElement(T,{sideCar:Ix,removeScrollBar:c,shards:d,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:v}),i?R.cloneElement(R.Children.only(a),En(En({},E),{ref:w})):R.createElement(b,En({},E,{className:l,ref:w}),a))});Al.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Al.classNames={fullWidth:ma,zeroRight:ha};var cN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cN();return t&&e.setAttribute("nonce",t),e}function dN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uN())&&(dN(t,n),fN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mN=function(){var e=hN();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ox=function(){var e=mN(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},pN={left:0,top:0,right:0,gap:0},kc=function(e){return parseInt(e||"",10)||0},gN=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[kc(n),kc(r),kc(o)]},yN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pN;var t=gN(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])}},vN=Ox(),Po="data-scroll-locked",bN=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
+ .`.concat(eN,` {
174
174
  overflow: hidden `).concat(r,`;
175
175
  padding-right: `).concat(a,"px ").concat(r,`;
176
176
  }
177
- body[`).concat(Ro,`] {
177
+ body[`).concat(Po,`] {
178
178
  overflow: hidden `).concat(r,`;
179
179
  overscroll-behavior: contain;
180
180
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -187,51 +187,51 @@
187
187
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
188
188
  }
189
189
 
190
- .`).concat(fa,` {
190
+ .`).concat(ha,` {
191
191
  right: `).concat(a,"px ").concat(r,`;
192
192
  }
193
193
 
194
- .`).concat(ha,` {
194
+ .`).concat(ma,` {
195
195
  margin-right: `).concat(a,"px ").concat(r,`;
196
196
  }
197
197
 
198
- .`).concat(fa," .").concat(fa,` {
198
+ .`).concat(ha," .").concat(ha,` {
199
199
  right: 0 `).concat(r,`;
200
200
  }
201
201
 
202
- .`).concat(ha," .").concat(ha,` {
202
+ .`).concat(ma," .").concat(ma,` {
203
203
  margin-right: 0 `).concat(r,`;
204
204
  }
205
205
 
206
- body[`).concat(Ro,`] {
207
- `).concat(eN,": ").concat(a,`px;
206
+ body[`).concat(Po,`] {
207
+ `).concat(tN,": ").concat(a,`px;
208
208
  }
209
- `)},ug=function(){var e=parseInt(document.body.getAttribute(Ro)||"0",10);return isFinite(e)?e:0},bN=function(){R.useEffect(function(){return document.body.setAttribute(Ro,(ug()+1).toString()),function(){var e=ug()-1;e<=0?document.body.removeAttribute(Ro):document.body.setAttribute(Ro,e.toString())}},[])},xN=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;bN();var s=R.useMemo(function(){return gN(o)},[o]);return R.createElement(yN,{styles:vN(s,!t,o,n?"":"!important")})},$u=!1;if(typeof window<"u")try{var Xi=Object.defineProperty({},"passive",{get:function(){return $u=!0,!0}});window.addEventListener("test",Xi,Xi),window.removeEventListener("test",Xi,Xi)}catch{$u=!1}var fo=$u?{passive:!1}:!1,wN=function(e){return e.tagName==="TEXTAREA"},Ox=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!wN(e)&&n[t]==="visible")},SN=function(e){return Ox(e,"overflowY")},TN=function(e){return Ox(e,"overflowX")},dg=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=_x(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},EN=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},CN=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_x=function(e,t){return e==="v"?SN(t):TN(t)},Dx=function(e,t){return e==="v"?EN(t):CN(t)},RN=function(e,t){return e==="h"&&t==="rtl"?-1:1},PN=function(e,t,n,r,o){var s=RN(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],y=h[2],b=m-y-s*p;(p||b)&&_x(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},Qi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fg=function(e){return[e.deltaX,e.deltaY]},hg=function(e){return e&&"current"in e?e.current:e},kN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IN=function(e){return`
209
+ `)},dg=function(){var e=parseInt(document.body.getAttribute(Po)||"0",10);return isFinite(e)?e:0},xN=function(){R.useEffect(function(){return document.body.setAttribute(Po,(dg()+1).toString()),function(){var e=dg()-1;e<=0?document.body.removeAttribute(Po):document.body.setAttribute(Po,e.toString())}},[])},wN=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;xN();var s=R.useMemo(function(){return yN(o)},[o]);return R.createElement(vN,{styles:bN(s,!t,o,n?"":"!important")})},Bu=!1;if(typeof window<"u")try{var Qi=Object.defineProperty({},"passive",{get:function(){return Bu=!0,!0}});window.addEventListener("test",Qi,Qi),window.removeEventListener("test",Qi,Qi)}catch{Bu=!1}var fo=Bu?{passive:!1}:!1,SN=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&&!SN(e)&&n[t]==="visible")},TN=function(e){return _x(e,"overflowY")},EN=function(e){return _x(e,"overflowX")},fg=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},CN=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},RN=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Mx=function(e,t){return e==="v"?TN(t):EN(t)},Dx=function(e,t){return e==="v"?CN(t):RN(t)},PN=function(e,t){return e==="h"&&t==="rtl"?-1:1},kN=function(e,t,n,r,o){var s=PN(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],y=h[2],b=m-y-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},Ji=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hg=function(e){return[e.deltaX,e.deltaY]},mg=function(e){return e&&"current"in e?e.current:e},AN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},IN=function(e){return`
210
210
  .block-interactivity-`.concat(e,` {pointer-events: none;}
211
211
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
212
- `)},AN=0,ho=[];function ON(e){var t=R.useRef([]),n=R.useRef([0,0]),r=R.useRef(),o=R.useState(AN++)[0],s=R.useState(Ax)[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=Vu([e.lockRef.current],(e.shards||[]).map(hg),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=R.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var b=Qi(m),v=n.current,g="deltaX"in m?m.deltaX:v[0]-b[0],T="deltaY"in m?m.deltaY:v[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=dg(C,E);if(!k)return!0;if(k?S=C:(S=C==="v"?"h":"v",k=dg(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 PN(I,y,m,I==="h"?g:T,!0)},[]),l=R.useCallback(function(m){var y=m;if(!(!ho.length||ho[ho.length-1]!==s)){var b="deltaY"in y?fg(y):Qi(y),v=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&kN(S.delta,b)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var g=(i.current.shards||[]).map(hg).filter(Boolean).filter(function(S){return S.contains(y.target)}),T=g.length>0?a(y,g[0]):!i.current.noIsolation;T&&y.cancelable&&y.preventDefault()}}},[]),c=R.useCallback(function(m,y,b,v){var g={name:m,delta:y,target:b,should:v,shadowParent:_N(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=Qi(m),r.current=void 0},[]),d=R.useCallback(function(m){c(m.type,fg(m),m.target,a(m,e.lockRef.current))},[]),f=R.useCallback(function(m){c(m.type,Qi(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:IN(o)}):null,h?R.createElement(xN,{gapMode:e.gapMode}):null)}function _N(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const DN=aN(Ix,ON);var Mx=R.forwardRef(function(e,t){return R.createElement(kl,En({},e,{ref:t,sideCar:DN}))});Mx.classNames=kl.classNames;const MN=(e,t)=>wa()?t:window.matchMedia(e).matches,NN=(e,t=!0)=>{const[n,r]=x.useState(t);return x.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(MN(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",jN={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:cn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:cn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:cn}},LN={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:cn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:cn}},kc={drawer:e=>e==="left"?jN:LN,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}}},FN=rs("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"}}),VN={top:0,left:0,right:0,bottom:-1},$N=e=>e*.62,BN=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;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=$N(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.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:VN,whileDrag:{cursor:"grabbing"},className:$e("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ic={drawer:"right",sheet:"none",dialog:"none"},WN=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=x.useId(),a=x.useId(),l=NN("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:Ic[e]:r?Ic[e]:Ic.sheet,d=l||r?kc[e]:kc.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=Qr({open:s.open,onOpenChange:s.onChange}),y=ki(m),b=eo(m),v=Xr(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:g,getFloatingProps:T}=Jr([y,b,v]),S=s.trigger,E=$r(void 0),C=()=>s.onChange(!1);return w.jsxs(x.Fragment,{children:[s.trigger?w.jsx(x.Fragment,{children:s.asChild?w.jsx(zo,{ref:p.setReference,...g({layoutId:s.layoutId}),children:S}):w.jsx(lt.button,{ref:p.setReference,...g(),layoutId:s.layoutId,type:"button",children:S})}):null,w.jsx(Zr,{children:w.jsx(fr,{mode:"wait",presenceAffectsLayout:!0,children:s.open?w.jsx(Mx,{enabled:!0,forwardProps:!0,removeScrollBar:!0,inert:!0,noIsolation:!0,children:w.jsx(jM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"flex items-start justify-center p-10"}`,children:w.jsx(hs,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(lt.div,{exit:"exit",animate:"enter",initial:"initial",variants:f,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:FN({position:u,type:h}),style:h==="drawer"?{width:E}:{height:E},...T(),children:[s.title?w.jsx("header",{className:"relative w-full",children:s.title?w.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:C,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(sf,{})})}):null,c&&t?w.jsx(BN,{onChange:s.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})})}):null})})]})},zN=e=>w.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}),Nx=({as:e,title:t,children:n,placement:r,focus:o=!0,hover:s=!0,enabled:i=!0,popover:a=!0,followCursor:l=!1,...c})=>{const[u,d]=x.useState(!1),f=x.useRef(null),h=e||"span",{refs:p,floatingStyles:m,context:y}=Qr({open:u,placement:r,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Ci,middleware:[Af(),Ri(5),Of({fallbackAxisSideDirection:"start"}),lx({padding:5,element:f})]}),b=gx(y,{move:!0,delay:{open:Cx},enabled:i?s:!1,handleClose:a?Ex():null}),v=WM(y,{enabled:i?o:!1}),g=ki(y,{enabled:i?a:!1}),T=Xr(y,{enabled:i}),S=eo(y,{role:"tooltip",enabled:i}),E=FM(y,{enabled:!!i&&!!l}),{getReferenceProps:C,getFloatingProps:k}=Jr([S,T,E,o?v:void 0,s?b:void 0,a?g:void 0]);return w.jsxs(x.Fragment,{children:[w.jsx(h,{ref:p.setReference,...C(c),children:t}),w.jsx(Zr,{preserveTabOrder:!0,children:u&&w.jsxs(os,{...k(),ref:p.setFloating,style:m,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(fx,{ref:f,context:y,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class za{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++)za.getDescendantProperty(a[l],s,r);else s&&za.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Dr{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=Dr.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=za.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Dr.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=Dr.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 Dr.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 Il=0,yr=1,ys=2,jx=4;function ri(e,t){return n=>e(t(n))}function HN(e,t){return t(e)}function Lx(e,t){return n=>e(t,n)}function mg(e,t){return()=>e(t)}function Al(e,t){return t(e),e}function Je(...e){return e}function UN(e){e()}function pg(e){return()=>e}function GN(...e){return()=>{e.map(UN)}}function Nf(e){return e!==void 0}function to(){}function ze(e,t){return e(yr,t)}function Te(e,t){e(Il,t)}function jf(e){e(ys)}function Dt(e){return e(jx)}function me(e,t){return ze(e,Lx(t,Il))}function _n(e,t){const n=e(yr,r=>{n(),t(r)});return n}function Ae(){const e=[];return(t,n)=>{switch(t){case ys:e.splice(0,e.length);return;case yr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Il:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ne(e){let t=e;const n=Ae();return(r,o)=>{switch(r){case yr:o(t);break;case Il:t=o;break;case jx:return t}return n(r,o)}}function YN(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 ys:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Zt(e){return Al(Ae(),t=>me(e,t))}function Mt(e,t){return Al(ne(t),n=>me(e,n))}function qN(...e){return t=>e.reduceRight(HN,t)}function q(e,...t){const n=qN(...t);return(r,o)=>{switch(r){case yr:return ze(e,n(o));case ys:jf(e);return}}}function Fx(e,t){return e===t}function Qe(e=Fx){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ve(e){return t=>n=>{e(n)&&t(n)}}function le(e){return t=>ri(t,e)}function xn(e){return t=>()=>t(e)}function Rn(e,t){return n=>r=>n(t=e(t,r))}function Ko(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 gg(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ce(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);ze(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function yg(...e){return function(t,n){switch(t){case yr:return GN(...e.map(r=>ze(r,n)));case ys:return;default:throw new Error(`unrecognized action ${t}`)}}}function xe(e,t=Fx){return q(e,Qe(t))}function Tt(...e){const t=Ae(),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&&Te(t,n)})}),function(s,i){switch(s){case yr:return r===o&&i(n),ze(t,i);case ys:return jf(t);default:throw new Error(`unrecognized action ${s}`)}}}function Le(e,t=[],{singleton:n}={singleton:!0}){return{id:KN(),constructor:e,dependencies:t,singleton:n}}const KN=()=>Symbol();function ZN(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 XN(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 Ji=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Lf(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,v){b.propsReady&&Te(b.propsReady,!1);for(const g of r){const T=b[t.required[g]];Te(T,v[g])}for(const g of o)if(g in v){const T=b[t.optional[g]];Te(T,v[g])}b.propsReady&&Te(b.propsReady,!0)}function c(b){return s.reduce((v,g)=>(v[g]=T=>{const S=b[t.methods[g]];Te(S,T)},v),{})}function u(b){return i.reduce((v,g)=>(v[g]=YN(b[t.events[g]]),v),{})}const d=x.forwardRef((b,v)=>{const{children:g,...T}=b,[S]=x.useState(()=>Al(ZN(e),C=>l(C,T))),[E]=x.useState(mg(u,S));return Ji(()=>{for(const C of i)C in T&&ze(E[C],T[C]);return()=>{Object.values(E).map(jf)}},[T,E,S]),Ji(()=>{l(S,T)}),x.useImperativeHandle(v,pg(c(S))),x.createElement(a.Provider,{value:S},n?x.createElement(n,XN([...r,...o,...i],T),g):g)}),f=b=>x.useCallback(Lx(Te,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,()=>Dt(g),()=>Dt(g))},p=b=>{const g=x.useContext(a)[b],[T,S]=x.useState(mg(Dt,g));return Ji(()=>ze(g,E=>{E!==T&&S(pg(E))}),[g,T]),T},m=x.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(b,v)=>{const T=x.useContext(a)[b];Ji(()=>ze(T,v),[v,T])}}}const QN=typeof document<"u"?x.useLayoutEffect:x.useEffect,JN=QN;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 ej={0:"debug",1:"log",2:"warn",3:"error"},tj=()=>typeof globalThis>"u"?window:globalThis,vr=Le(()=>{const e=ne(3);return{log:ne((n,r,o=1)=>{var s;const i=(s=tj().VIRTUOSO_LOG_LEVEL)!=null?s:Dt(e);o>=i&&console[ej[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Ff(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 Dn(e,t=!0){return Ff(e,t).callbackRef}function Vx(e,t,n,r,o,s,i){const a=x.useCallback(l=>{const c=nj(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(rj("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Ff(a,n)}function nj(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 rj(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 $x(e,t){return Math.abs(e-t)<1.01}function Bx(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,y=h?window.innerHeight:f.offsetHeight,b=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};d.suppressFlushSync?b():hi.flushSync(b),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);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,y;f===window?(m=Math.max(mn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=f.scrollHeight,p=mn(f,"height"),y=f.scrollTop);const b=m-p;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),$x(p,m)||d.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Bt=Le(()=>{const e=Ae(),t=Ae(),n=ne(0),r=Ae(),o=ne(0),s=Ae(),i=Ae(),a=ne(0),l=ne(0),c=ne(0),u=ne(0),d=Ae(),f=Ae(),h=ne(!1);return me(q(e,le(({scrollTop:p})=>p)),t),me(q(e,le(({scrollHeight:p})=>p)),i),me(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}),oi={lvl:0};function Wx(e,t,n,r=oi,o=oi){return{k:e,v:t,lvl:n,l:r,r:o}}function Ye(e){return e===oi}function Po(){return oi}function Bu(e,t){if(Ye(e))return oi;const{k:n,l:r,r:o}=e;if(t===n){if(Ye(r))return o;if(Ye(o))return r;{const[s,i]=zx(r);return ma(vt(e,{k:s,v:i,l:Hx(r)}))}}else return t<n?ma(vt(e,{l:Bu(r,t)})):ma(vt(e,{r:Bu(o,t)}))}function si(e,t){if(!Ye(e))return t===e.k?e.v:t<e.k?si(e.l,t):si(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)?Wx(t,n,1):t===e.k?vt(e,{k:t,v:n}):t<e.k?vg(vt(e,{l:Kt(e.l,t,n)})):vg(vt(e,{r:Kt(e.r,t,n)}))}function Wu(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(Wu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Wu(i,t,n))),a}function Mr(e){return Ye(e)?[]:[...Mr(e.l),{k:e.k,v:e.v},...Mr(e.r)]}function zx(e){return Ye(e.r)?[e.k,e.v]:zx(e.r)}function Hx(e){return Ye(e.r)?e.l:ma(vt(e,{r:Hx(e.r)}))}function vt(e,t){return Wx(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 Ac(e){return Ye(e)||e.lvl>e.r.lvl}function vg(e){return zu(Gx(e))}function ma(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(Ac(t))return Gx(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(Ac(e))return zu(vt(e,{lvl:r-1}));if(!Ye(n)&&!Ye(n.l)){const o=n.l,s=Ac(o)?n.lvl-1:n.lvl;return vt(o,{l:vt(e,{r:o.l,lvl:r-1}),r:zu(vt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Ol(e,t,n){if(Ye(e))return[];const r=pn(e,t)[0];return oj(Wu(e,r,n))}function Ux(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 oj(e){return Ux(e,({k:t,v:n})=>({index:t,value:n}))}function zu(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 Gx(e){const{l:t}=e;return!Ye(t)&&t.lvl===e.lvl?vt(t,{r:vt(e,{l:t.r})}):e}function Ha(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 Yx(e,t,n){return e[Ha(e,t,n)]}function sj(e,t,n,r){const o=Ha(e,t,r),s=Ha(e,n,r,o);return e.slice(o,s+1)}const Vf=Le(()=>({recalcInProgress:ne(!1)}),[],{singleton:!0});function ij(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 bg(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 aj(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=Ol(e,s-1,i+1);if(a.some(ij(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Bu(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 lj(){return{offsetTree:[],sizeTree:Po(),groupOffsetTree:Po(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function $f({index:e},t){return t===e?0:t<e?-1:1}function cj({offset:e},t){return t===e?0:t<e?-1:1}function uj(e){return{index:e.index,value:e}}function dj(e,t,n,r=0){return r>0&&(t=Math.max(t,Yx(e,r,$f).offset)),Ux(sj(e,t,n,cj),uj)}function Hu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ha(o,t-1,$f),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 Ol(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 fj(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]=aj(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Hu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,ii(h,l,o)),Po()),groupIndices:n}}function ii(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=Yx(t,e,$f),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function hj(e){return typeof e.groupIndex<"u"}function qx(e,t,n){if(hj(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Kx(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Kx(e,t){if(!_l(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _l(e){return!Ye(e.groupOffsetTree)}function mj(e){return Mr(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 pj={offsetHeight:"height",offsetWidth:"width"},jn=Le(([{log:e},{recalcInProgress:t}])=>{const n=Ae(),r=Ae(),o=Mt(r,0),s=Ae(),i=Ae(),a=ne(0),l=ne([]),c=ne(void 0),u=ne(void 0),d=ne((S,E)=>mn(S,pj[E])),f=ne(void 0),h=ne(0),p=lj(),m=Mt(q(n,Ce(l,e,h),Rn(fj,p),Qe()),p),y=Mt(q(l,Qe(),Rn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),le(({prev:S})=>S)),[]);me(q(l,ve(S=>S.length>0),Ce(m,h),le(([S,E,C])=>{const k=S.reduce((I,A,j)=>Kt(I,A,ii(A,E.offsetTree,C)||j),Po());return{...E,groupIndices:S,groupOffsetTree:k}})),m),me(q(r,Ce(m),ve(([S,{lastIndex:E}])=>S<E),le(([S,{lastIndex:E,lastSize:C}])=>[{startIndex:S,endIndex:E,size:C}])),n),me(c,u);const b=Mt(q(c,le(S=>S===void 0)),!0);me(q(u,ve(S=>S!==void 0&&Ye(Dt(m).sizeTree)),le(S=>[{startIndex:0,endIndex:0,size:S}])),n);const v=Zt(q(n,Ce(m),Rn(({sizes:S},[E,C])=>({changed:C!==S,sizes:C}),{changed:!1,sizes:p}),le(S=>S.changed)));ze(q(a,Rn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),le(S=>S.diff)),S=>{const{groupIndices:E}=Dt(m);if(S>0)Te(t,!0),Te(s,S+bg(S,E));else if(S<0){const C=Dt(y);C.length>0&&(S-=bg(-S,C)),Te(i,S)}}),ze(q(a,Ce(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);me(q(s,Ce(m),le(([S,E])=>{const C=E.groupIndices.length>0,k=[],I=E.lastSize;if(C){const A=si(E.sizeTree,0);let j=0,O=0;for(;j<S;){const D=E.groupIndices[O],N=E.groupIndices.length===O+1?1/0:E.groupIndices[O+1]-D-1;k.push({startIndex:D,endIndex:D,size:A}),k.push({startIndex:D+1,endIndex:D+1+N-1,size:I}),O++,j+=N+1}const L=Mr(E.sizeTree);return j!==S&&L.shift(),L.reduce((D,{k:N,v:M})=>{let V=D.ranges;return D.prevSize!==0&&(V=[...D.ranges,{startIndex:D.prevIndex,endIndex:N+S-1,size:D.prevSize}]),{ranges:V,prevIndex:N+S,prevSize:M}},{ranges:k,prevIndex:S,prevSize:0}).ranges}return Mr(E.sizeTree).reduce((A,{k:j,v:O})=>({ranges:[...A.ranges,{startIndex:A.prevIndex,endIndex:j+S-1,size:A.prevSize}],prevIndex:j+S,prevSize:O}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Zt(q(i,Ce(m,h),le(([S,{offsetTree:E},C])=>{const k=-S;return ii(k,E,C)})));return me(q(i,Ce(m,h),le(([S,E,C])=>{if(E.groupIndices.length>0){if(Ye(E.sizeTree))return E;let I=Po();const A=Dt(y);let j=0,O=0,L=0;for(;j<-S;){L=A[O];const D=A[O+1]-L-1;O++,j+=D+1}if(I=Mr(E.sizeTree).reduce((D,{k:N,v:M})=>Kt(D,Math.max(0,N+S),M),I),j!==-S){const D=si(E.sizeTree,L);I=Kt(I,0,D);const N=pn(E.sizeTree,-S+1)[1];I=Kt(I,1,N)}return{...E,sizeTree:I,...Hu(E.offsetTree,0,I,C)}}else{const I=Mr(E.sizeTree).reduce((A,{k:j,v:O})=>Kt(A,Math.max(0,j+S),O),Po());return{...E,sizeTree:I,...Hu(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:v,statefulTotalCount:o,trackItemSizes:b,itemSize:d}},Je(vr,Vf),{singleton:!0}),gj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Zx(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!gj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ii=Le(([{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=Ae(),p=Ae(),m=ne(0);let y=null,b=null,v=null;function g(){y&&(y(),y=null),v&&(v(),v=null),b&&(clearTimeout(b),b=null),Te(o,!1)}return me(q(h,Ce(e,s,t,m,l,c,f),Ce(r,u,d),le(([[T,S,E,C,k,I,A,j],O,L,P])=>{const D=Zx(T),{align:N,behavior:M,offset:V}=D,z=C-1,_=qx(D,S,z);let $=ii(_,S.offsetTree,O)+I;N==="end"?($+=L+pn(S.sizeTree,_)[1]-E+P,_===z&&($+=A)):N==="center"?$+=(L+pn(S.sizeTree,_)[1]-E+P)/2:$-=k,V&&($+=V);const Z=ee=>{g(),ee?(j("retrying to scroll to",{location:T},Xt.DEBUG),Te(h,T)):(Te(p,!0),j("list did not change, scroll successful",{},Xt.DEBUG))};if(g(),M==="smooth"){let ee=!1;v=ze(n,J=>{ee=ee||J}),y=_n(a,()=>{Z(ee)})}else y=_n(q(n,yj(150)),Z);return b=setTimeout(()=>{g()},1200),Te(o,!0),j("scrolling from index to",{index:_,top:$,behavior:M},Xt.DEBUG),{top:$,behavior:M}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Je(jn,Bt,vr),{singleton:!0});function yj(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ai="up",Ws="down",vj="none",bj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},xj=0,Ai=Le(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ne(!1),a=ne(!0),l=Ae(),c=Ae(),u=ne(4),d=ne(xj),f=Mt(q(yg(q(xe(t),Ko(1),xn(!0)),q(xe(t),Ko(1),xn(!1),gg(100))),Qe()),!1),h=Mt(q(yg(q(s,xn(!0)),q(s,xn(!1),gg(200))),Qe()),!1);me(q(Tt(xe(t),xe(d)),le(([v,g])=>v<=g),Qe()),a),me(q(a,nr(50)),c);const p=Zt(q(Tt(e,xe(n),xe(r),xe(o),xe(u)),Rn((v,[{scrollTop:g,scrollHeight:T},S,E,C,k])=>{const I=g+S-T>-k,A={viewportHeight:S,scrollTop:g,scrollHeight:T};if(I){let O,L;return g>v.state.scrollTop?(O="SCROLLED_DOWN",L=v.state.scrollTop-g):(O="SIZE_DECREASED",L=v.state.scrollTop-g||v.scrollTopDelta),{atBottom:!0,state:A,atBottomBecause:O,scrollTopDelta:L}}let j;return A.scrollHeight>v.state.scrollHeight?j="SIZE_INCREASED":S<v.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":g<v.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:A}},bj),Qe((v,g)=>v&&v.atBottom===g.atBottom))),m=Mt(q(e,Rn((v,{scrollTop:g,scrollHeight:T,viewportHeight:S})=>{if($x(v.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+S)<1;return v.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:v.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ve(v=>v.changed),le(v=>v.jump)),0);me(q(p,le(v=>v.atBottom)),i),me(q(i,nr(50)),l);const y=ne(Ws);me(q(e,le(({scrollTop:v})=>v),Qe(),Rn((v,g)=>Dt(h)?{direction:v.direction,prevScrollTop:g}:{direction:g<v.prevScrollTop?ai:Ws,prevScrollTop:g},{direction:Ws,prevScrollTop:0}),le(v=>v.direction)),y),me(q(e,nr(50),xn(vj)),y);const b=ne(0);return me(q(f,ve(v=>!v),xn(0)),b),me(q(t,nr(100),Ce(f),ve(([v,g])=>!!g),Rn(([v,g],[T])=>[g,T],[0,0]),le(([v,g])=>g-v)),b),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:m}},Je(Bt)),br=Le(([{log:e}])=>{const t=ne(!1),n=Zt(q(t,ve(r=>r),Qe()));return ze(t,r=>{r&&Dt(e)("props updated",{},Xt.DEBUG)}),{propsReady:t,didMount:n}},Je(vr),{singleton:!0});function Bf(e,t){e==0?t():requestAnimationFrame(()=>Bf(e-1,t))}function Wf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Oi=Le(([{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 me(q(i,Ce(l),ve(([u,d])=>!!d),xn(!1)),a),me(q(i,Ce(l),ve(([u,d])=>!!d),xn(!1)),c),ze(q(Tt(t,i),Ce(a,e,n,c),ve(([[,u],d,{sizeTree:f},h,p])=>u&&(!Ye(f)||Nf(h))&&!d&&!p),Ce(l)),([,u])=>{_n(s,()=>{Te(c,!0)}),Bf(4,()=>{_n(r,()=>{Te(a,!0)}),Te(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Je(jn,Bt,Ii,br),{singleton:!0});function xg(e){return e?e==="smooth"?"smooth":"auto":!1}const wj=(e,t)=>typeof e=="function"?xg(e(t)):t&&xg(e),Sj=Le(([{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=Ae();let f=null;function h(m){Te(o,{index:"LAST",align:"end",behavior:m})}ze(q(Tt(q(xe(e),Ko(1)),a),Ce(xe(u),n,s,c),le(([[m,y],b,v,g,T])=>{let S=y&&g,E="auto";return S&&(E=wj(b,v||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),ve(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{f&&(f(),f=null),f=_n(t,()=>{Dt(l)("following output to ",{totalCount:m},Xt.DEBUG),h(y),f=null})});function p(m){const y=_n(r,b=>{m&&!b.atBottom&&b.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Dt(l)("scrolling to bottom due to increased size",{},Xt.DEBUG),h("auto"))});setTimeout(y,100)}return ze(q(Tt(xe(u),e,i),ve(([m,,y])=>m&&y),Rn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),ve(({refreshed:m})=>m),Ce(u,e)),([,m])=>{Dt(s)&&p(m!==!1)}),ze(d,()=>{p(Dt(u)!==!1)}),ze(Tt(xe(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Je(jn,Ai,Ii,Oi,br,vr,Bt));function Tj(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Xx=Le(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ae(),i=Ae(),a=Zt(q(s,le(Tj)));return me(q(a,le(l=>l.totalCount)),e),me(q(a,le(l=>l.groupIndices)),t),me(q(Tt(r,n,o),ve(([l,c])=>_l(c)),le(([l,c,u])=>pn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Qe(),le(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Je(jn,Bt));function li(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Qx(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Ua="top",Ga="bottom",wg="none";function Sg(e,t,n){return typeof e=="number"?n===ai&&t===Ua||n===Ws&&t===Ga?e:0:n===ai?t===Ua?e.main:e.reverse:t===Ga?e.main:e.reverse}function Tg(e,t){return typeof e=="number"?e:e[t]||0}const zf=Le(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ae(),i=ne(0),a=ne(0),l=ne(0),c=Mt(q(Tt(xe(e),xe(t),xe(r),xe(s,li),xe(l),xe(i),xe(o),xe(n),xe(a)),le(([u,d,f,[h,p],m,y,b,v,g])=>{const T=u-v,S=y+b,E=Math.max(f-T,0);let C=wg;const k=Tg(g,Ua),I=Tg(g,Ga);return h-=v,h+=f+b,p+=f+b,p-=v,h>u+S-k&&(C=ai),p<u-E+d+I&&(C=Ws),C!==wg?[Math.max(T-f-Sg(m,Ua,C)-k,0),T-E-b+d+Sg(m,Ga,C)+I]:null}),ve(u=>u!=null),Qe(li)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Je(Bt),{singleton:!0});function Ej(e,t,n){if(_l(t)){const r=Kx(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 Oc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Eg(e,t,n){if(e.length===0)return[];if(!_l(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=Ol(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 pa(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:Eg(e,o,s),topItems:Eg(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function Jx(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=Wf(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return pa(c,[],a,o,n,r)}const no=Le(([{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([]),y=ne(0),b=Ae();me(s.topItemsIndexes,m);const v=Mt(q(Tt(h,p,xe(i,li),xe(t),xe(e),xe(u),c,xe(m),xe(r),xe(o),n),ve(([E,C,,k,,,,,,,I])=>{const A=I&&I.length!==k;return E&&!C&&!A}),le(([,,[E,C],k,I,A,j,O,L,P,D])=>{const N=I,{sizeTree:M,offsetTree:V}=N,z=Dt(y);if(k===0)return{...Oc,totalCount:k};if(E===0&&C===0)return z===0?{...Oc,totalCount:k}:Jx(z,A,I,L,P,D||[]);if(Ye(M))return z>0?null:pa(Ej(Wf(A,k),N,D),[],k,P,N,L);const _=[];if(O.length>0){const U=O[0],F=O[O.length-1];let B=0;for(const W of Ol(M,U,F)){const G=W.value,Q=Math.max(W.start,U),ce=Math.min(W.end,F);for(let H=Q;H<=ce;H++)_.push({index:H,size:G,offset:B,data:D&&D[H]}),B+=G}}if(!j)return pa([],_,k,P,N,L);const $=O.length>0?O[O.length-1]+1:0,Z=dj(V,E,C,$);if(Z.length===0)return null;const ee=k-1,J=Al([],U=>{for(const F of Z){const B=F.value;let W=B.offset,G=F.start;const Q=B.size;if(B.offset<E){G+=Math.floor((E-B.offset+P)/(Q+P));const H=G-F.start;W+=H*Q+H*P}G<$&&(W+=($-G)*Q,G=$);const ce=Math.min(F.end,ee);for(let H=G;H<=ce&&!(W>=C);H++)U.push({index:H,size:Q,offset:W,data:D&&D[H]}),W+=Q+P}});return pa(J,_,k,P,N,L)}),ve(E=>E!==null),Qe()),Oc);me(q(n,ve(Nf),le(E=>E==null?void 0:E.length)),t),me(q(v,le(E=>E.topListHeight)),d),me(d,l),me(q(v,le(E=>[E.top,E.bottom])),a),me(q(v,le(E=>E.items)),b);const g=Zt(q(v,ve(({items:E})=>E.length>0),Ce(t,n),ve(([{items:E},C])=>E[E.length-1].originalIndex===C-1),le(([,E,C])=>[E-1,C]),Qe(li),le(([E])=>E))),T=Zt(q(v,nr(200),ve(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),le(({items:E})=>E[0].index),Qe())),S=Zt(q(v,ve(({items:E})=>E.length>0),le(({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}}),Qe(Qx)));return{listState:v,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:S,itemsRendered:b,initialItemCount:y,...f}},Je(jn,Xx,zf,Oi,Ii,Ai,br,Vf),{singleton:!0}),Cj=Le(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(me(q(a,Ce(s),ve(([,l])=>l!==0),Ce(o,e,t,r,n),le(([[,l],c,u,d,f,h=[]])=>Jx(l,c,u,d,f,h))),i),{}),Je(jn,Oi,no,br),{singleton:!0}),ew=Le(([{scrollVelocity:e}])=>{const t=ne(!1),n=Ae(),r=ne(!1);return me(q(e,Ce(r,t,n),ve(([o,s])=>!!s),le(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Qe()),t),ze(q(Tt(t,e,n),Ce(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Je(Ai),{singleton:!0}),Rj=Le(([{topItemsIndexes:e}])=>{const t=ne(0);return me(q(t,ve(n=>n>0),le(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Je(no)),tw=Le(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ae(),i=Mt(q(Tt(e,r,t,n,o),le(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return me(xe(i),s),{totalListHeight:i,totalListHeightChanged:s}},Je(Bt,no),{singleton:!0});function nw(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const Pj=nw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),kj=Le(([{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(q(l,Ce(a),Rn(([,b,v,g],[{items:T,totalCount:S,bottom:E,offsetBottom:C},k])=>{const I=E+C;let A=0;return v===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]),ve(([b])=>b!==0),Ce(t,i,r,s,h,p),ve(([,b,v,g,,,T])=>!T&&!g&&b!==0&&v===ai),le(([[b],,,,,v])=>(v("Upward scrolling compensation",{amount:b},Xt.DEBUG),b))));function y(b){b>0?(Te(e,{top:-b,behavior:"auto"}),Te(n,0)):(Te(n,0),Te(e,{top:-b,behavior:"auto"}))}return ze(q(m,Ce(n,o)),([b,v,g])=>{g&&Pj()?Te(n,v-b):y(-b)}),ze(q(Tt(Mt(o,!1),n,p),ve(([b,v,g])=>!b&&!g&&v!==0),le(([b,v])=>v),nr(1)),y),me(q(u,le(b=>({top:-b}))),e),ze(q(c,Ce(d,f),le(([b,{lastSize:v,groupIndices:g,sizeTree:T},S])=>{function E(C){return C*(v+S)}if(g.length===0)return E(b);{let C=0;const k=si(T,0);let I=0,A=0;for(;I<b;){I++,C+=k;let j=g.length===A+1?1/0:g[A+1]-g[A]-1;I+j>b&&(C-=k,j=b-I+1),I+=j,C+=E(j),A++}return C}})),b=>{Te(n,b),requestAnimationFrame(()=>{Te(e,{top:b}),requestAnimationFrame(()=>{Te(n,0),Te(p,!1)})})}),{deviation:n}},Je(Bt,Ai,no,jn,vr,Vf)),Ij=Le(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ne(0);return ze(q(e,Ce(r),ve(([,o])=>o!==0),le(([,o])=>({top:o}))),o=>{_n(q(n,Ko(1),ve(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Te(t,o)})})}),{initialScrollTop:r}},Je(br,Bt,no),{singleton:!0}),Aj=Le(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ne(!1),r=Mt(q(Tt(n,e,t),ve(([o])=>o),le(([,o,s])=>Math.max(0,o-s)),nr(0),Qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Je(Bt,tw),{singleton:!0}),Hf=Le(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ae(),r=Ae(),o=Ae(),s=ne(!1),i=ne(void 0);return me(q(Tt(n,r),le(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),me(q(e,Ce(r),le(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Je(Bt)),Oj=({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,_j=Le(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ae();return me(q(u,Ce(e,o,t,s,i,a,r),Ce(n),le(([[d,f,h,p,m,y,b,v],g])=>{const{done:T,behavior:S,align:E,calculateViewLocation:C=Oj,...k}=d,I=qx(d,f,p-1),A=ii(I,f.offsetTree,g)+m+y,j=A+pn(f.sizeTree,I)[1],O=v+y,L=v+h-b,P=C({itemTop:A,itemBottom:j,viewportTop:O,viewportBottom:L,locationParams:{behavior:S,align:E,...k}});return P?T&&_n(q(l,ve(D=>D===!1),Ko(Dt(l)?1:2)),T):T&&T(),P}),ve(d=>d!==null)),c),{scrollIntoView:u}},Je(jn,Bt,Ii,no,vr),{singleton:!0}),Dj=Le(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ae(),u=ne(void 0),d=ne(null),f=ne(null);return me(a,d),me(l,f),ze(q(c,Ce(e,n,i,d,f,r)),([h,p,m,y,b,v,g])=>{const T=mj(p.sizeTree);y&&b!==null&&v!==null&&(m=b.scrollTop-v.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),me(q(u,ve(Nf),le(Mj)),o),me(q(s,Ce(u),ve(([,h])=>h!==void 0),Qe(),le(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Je(jn,Bt,Oi,br,Hf));function Mj(e){return{offset:e.scrollTop,index:0,align:"start"}}const Nj=Le(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Je(zf,Cj,br,ew,tw,Ij,Aj,Hf,_j,vr)),rw=Le(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,b,{listState:v,topItemsIndexes:g,...T},{scrollToIndex:S},E,{topItemCount:C},{groupCounts:k},I])=>(me(T.rangeChanged,I.scrollSeekRangeChanged),me(q(I.windowViewportRect,le(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:v,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:d,...y}),Je(jn,Oi,Bt,Dj,Sj,no,Ii,kj,Rj,Xx,Nj)),_c="-webkit-sticky",Cg="sticky",ow=nw(()=>{if(typeof document>"u")return Cg;const e=document.createElement("div");return e.style.position=_c,e.style.position===_c?_c:Cg});function Uf(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}=Ff(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 Dl=x.createContext(void 0),sw=x.createContext(void 0);function Gf(e){return e}const jj=Le(()=>{const e=ne(l=>`Item ${l}`),t=ne(null),n=ne(l=>`Group ${l}`),r=ne({}),o=ne(Gf),s=ne("div"),i=ne(to),a=(l,c=null)=>Mt(q(r,le(u=>u[l]),Qe()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}),Lj=Le(([e,t])=>({...e,...t}),Je(rw,jj)),Fj=({height:e})=>x.createElement("div",{style:{height:e}}),Vj={position:ow(),zIndex:1,overflowAnchor:"none"},$j={overflowAnchor:"none"},Rg=x.memo(function({showTopList:t=!1}){const n=ke("listState"),r=nn("sizeRanges"),o=ke("useWindowScroll"),s=ke("customScrollParent"),i=nn("windowScrollContainerState"),a=nn("scrollContainerState"),l=s||o?i:a,c=ke("itemContent"),u=ke("context"),d=ke("groupContent"),f=ke("trackItemSizes"),h=ke("itemSize"),p=ke("log"),m=nn("gap"),{callbackRef:y}=Vx(r,h,f,t?to:l,p,m,s),[b,v]=x.useState(0);Kf("deviation",P=>{b!==P&&v(P)});const g=ke("EmptyPlaceholder"),T=ke("ScrollSeekPlaceholder")||Fj,S=ke("ListComponent"),E=ke("ItemComponent"),C=ke("GroupComponent"),k=ke("computeItemKey"),I=ke("isSeeking"),A=ke("groupIndices").length>0,j=ke("alignToBottom"),O=ke("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:j?"auto":0,...O?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?x.createElement(g,ct(g,u)):x.createElement(S,{...ct(S,u),ref:y,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const D=P.originalIndex,N=k(D+n.firstItemIndex,P.data,u);return I?x.createElement(T,{...ct(T,u),key:N,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?x.createElement(C,{...ct(C,u),key:N,"data-index":D,"data-known-size":P.size,"data-item-index":P.index,style:Vj},d(P.index,u)):x.createElement(E,{...ct(E,u),...iw(E,P.data),key:N,"data-index":D,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:$j},A?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),Bj={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},vs=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),Wj={width:"100%",position:ow(),top:0,zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function iw(e,t){return{item:typeof e=="string"?void 0:t}}const zj=x.memo(function(){const t=ke("HeaderComponent"),n=nn("headerHeight"),r=ke("headerFooterTag"),o=Dn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=ke("context");return t?x.createElement(r,{ref:o},x.createElement(t,ct(t,s))):null}),Hj=x.memo(function(){const t=ke("FooterComponent"),n=nn("footerHeight"),r=ke("headerFooterTag"),o=Dn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=ke("context");return t?x.createElement(r,{ref:o},x.createElement(t,ct(t,s))):null});function Yf({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}=Bx(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),x.createElement(c,{ref:h,style:{...Bj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ct(c,f)},i)})}function qf({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:y,scrollToCallback:b}=Bx(l,u,c,to,h);return JN(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",b),t("scrollBy",y),x.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...ct(c,p)},i)})}const Uj=({children:e})=>{const t=x.useContext(Dl),n=nn("viewportHeight"),r=nn("fixedItemHeight"),o=ke("alignToBottom"),s=Dn(x.useMemo(()=>ri(n,i=>mn(i,"height")),[n]));return x.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.createElement("div",{style:vs(o),ref:s,"data-viewport-type":"element"},e)},Gj=({children:e})=>{const t=x.useContext(Dl),n=nn("windowViewportRect"),r=nn("fixedItemHeight"),o=ke("customScrollParent"),s=Uf(n,o),i=ke("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:vs(i),"data-viewport-type":"window"},e)},Yj=({children:e})=>{const t=ke("TopItemListComponent")||"div",n=ke("headerHeight"),r={...Wj,marginTop:`${n}px`},o=ke("context");return x.createElement(t,{style:r,...ct(t,o)},e)},qj=x.memo(function(t){const n=ke("useWindowScroll"),r=ke("topItemsIndexes").length>0,o=ke("customScrollParent"),s=o||n?Xj:Zj,i=o||n?Gj:Uj;return x.createElement(s,{...t},r&&x.createElement(Yj,null,x.createElement(Rg,{showTopList:!0})),x.createElement(i,null,x.createElement(zj,null),x.createElement(Rg,null),x.createElement(Hj,null)))}),{Component:Kj,usePublisher:nn,useEmitterValue:ke,useEmitter:Kf}=Lf(Lj,{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"}},qj),Zj=Yf({usePublisher:nn,useEmitterValue:ke,useEmitter:Kf}),Xj=qf({usePublisher:nn,useEmitterValue:ke,useEmitter:Kf}),Zf=Kj,Pg={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Qj={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:kg,ceil:Ig,floor:Ya,min:Dc,max:zs}=Math;function Jj(e){return{...Qj,items:e}}function Ag(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 eL(e,t){return e&&e.column===t.column&&e.row===t.row}function ea(e,t){return e&&e.width===t.width&&e.height===t.height}const tL=Le(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:b,windowScrollContainerState:v,windowScrollTo:g},T])=>{const S=ne(0),E=ne(0),C=ne(Pg),k=ne({height:0,width:0}),I=ne({height:0,width:0}),A=Ae(),j=Ae(),O=ne(0),L=ne(null),P=ne({row:0,column:0}),D=Ae(),N=Ae(),M=ne(!1),V=ne(0),z=ne(!0),_=ne(!1);ze(q(p,Ce(V),ve(([F,B])=>!!B)),()=>{Te(z,!1),Te(E,0)}),ze(q(Tt(p,z,I,k,V,_),ve(([F,B,W,G,,Q])=>F&&!B&&W.height!==0&&G.height!==0&&!Q)),([,,,,F])=>{Te(_,!0),Bf(1,()=>{Te(A,F)}),_n(q(r),()=>{Te(n,[0,0]),Te(z,!0)})}),me(q(N,ve(F=>F!=null&&F.scrollTop>0),xn(0)),E),ze(q(p,Ce(N),ve(([,F])=>F!=null)),([,F])=>{F&&(Te(k,F.viewport),Te(I,F==null?void 0:F.item),Te(P,F.gap),F.scrollTop>0&&(Te(M,!0),_n(q(r,Ko(1)),B=>{Te(M,!1)}),Te(i,{top:F.scrollTop})))}),me(q(k,le(({height:F})=>F)),o),me(q(Tt(xe(k,ea),xe(I,ea),xe(P,(F,B)=>F&&F.column===B.column&&F.row===B.row),xe(r)),le(([F,B,W,G])=>({viewport:F,item:B,gap:W,scrollTop:G}))),D),me(q(Tt(xe(S),t,xe(P,eL),xe(I,ea),xe(k,ea),xe(L),xe(E),xe(M),xe(z),xe(V)),ve(([,,,,,,,F])=>!F),le(([F,[B,W],G,Q,ce,H,Ie,,De,re])=>{const{row:de,column:oe}=G,{height:Y,width:K}=Q,{width:fe}=ce;if(Ie===0&&(F===0||fe===0))return Pg;if(K===0){const Lt=Wf(re,F),xr=Lt===0?Math.max(Ie-1,0):Lt;return Jj(Ag(Lt,xr,H))}const pe=aw(fe,K,oe);let Ee,et;De?B===0&&W===0&&Ie>0?(Ee=0,et=Ie-1):(Ee=pe*Ya((B+de)/(Y+de)),et=pe*Ig((W+de)/(Y+de))-1,et=Dc(F-1,zs(et,pe-1)),Ee=Dc(et,zs(0,Ee))):(Ee=0,et=-1);const te=Ag(Ee,et,H),{top:ue,bottom:Me}=Og(ce,G,Q,te),qe=Ig(F/pe),At=qe*Y+(qe-1)*de-Me;return{items:te,offsetTop:ue,offsetBottom:At,top:ue,bottom:Me,itemHeight:Y,itemWidth:K}})),C),me(q(L,ve(F=>F!==null),le(F=>F.length)),S),me(q(Tt(k,I,C,P),ve(([F,B,{items:W}])=>W.length>0&&B.height!==0&&F.height!==0),le(([F,B,{items:W},G])=>{const{top:Q,bottom:ce}=Og(F,G,B,W);return[Q,ce]}),Qe(li)),n);const $=ne(!1);me(q(r,Ce($),le(([F,B])=>B||F!==0)),$);const Z=Zt(q(xe(C),ve(({items:F})=>F.length>0),Ce(S,$),ve(([{items:F},B,W])=>W&&F[F.length-1].index===B-1),le(([,F])=>F-1),Qe())),ee=Zt(q(xe(C),ve(({items:F})=>F.length>0&&F[0].index===0),xn(0),Qe())),J=Zt(q(xe(C),Ce(M),ve(([{items:F},B])=>F.length>0&&!B),le(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),Qe(Qx),nr(0)));me(J,f.scrollSeekRangeChanged),me(q(A,Ce(k,I,S,P),le(([F,B,W,G,Q])=>{const ce=Zx(F),{align:H,behavior:Ie,offset:De}=ce;let re=ce.index;re==="LAST"&&(re=G-1),re=zs(0,re,Dc(G-1,re));let de=Uu(B,Q,W,re);return H==="end"?de=kg(de-B.height+W.height):H==="center"&&(de=kg(de-B.height/2+W.height/2)),De&&(de+=De),{top:de,behavior:Ie}})),i);const U=Mt(q(C,le(F=>F.offsetBottom+F.bottom)),0);return me(q(m,le(F=>({width:F.visibleWidth,height:F.visibleHeight}))),k),{data:L,totalCount:S,viewportDimensions:k,itemDimensions:I,scrollTop:r,scrollHeight:j,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:A,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:b,windowScrollContainerState:v,deviation:O,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:N,...f,initialTopMostItemIndex:V,gridState:C,totalListHeight:U,...d,startReached:ee,endReached:Z,rangeChanged:J,stateChanged:D,propsReady:h,stateRestoreInProgress:M,...T}},Je(zf,Bt,Ai,ew,br,Hf,vr));function Og(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Uu(e,t,n,r[0].index),i=Uu(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Uu(e,t,n,r){const o=aw(e.width,n.width,t.column),s=Ya(r/o),i=s*n.height+zs(0,s-1)*t.row;return i>0?i+t.row:i}function aw(e,t,n){return zs(1,Ya((e+n)/(Ya(t)+n)))}const nL=Le(()=>{const e=ne(c=>`Item ${c}`),t=ne({}),n=ne(null),r=ne("virtuoso-grid-item"),o=ne("virtuoso-grid-list"),s=ne(Gf),i=ne("div"),a=ne(to),l=(c,u=null)=>Mt(q(t,le(d=>d[c]),Qe()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),rL=Le(([e,t])=>({...e,...t}),Je(tL,nL)),oL=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"),y=Dn(x.useMemo(()=>b=>{const v=b.parentElement.parentElement.scrollHeight;a(v);const g=b.firstChild;if(g){const{width:T,height:S}=g.getBoundingClientRect();f({width:T,height:S})}h({row:_g("row-gap",getComputedStyle(b).rowGap,p),column:_g("column-gap",getComputedStyle(b).columnGap,p)})},[a,f,h,p]));return m?null:x.createElement(c,{ref:y,className:n,...ct(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(b=>{const v=s(b.index,b.data,d);return i?x.createElement(u,{key:v,...ct(u,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):x.createElement(l,{...ct(l,d),className:r,"data-index":b.index,key:v},o(b.index,b.data,d))}))}),sL=x.memo(function(){const t=nt("HeaderComponent"),n=dn("headerHeight"),r=nt("headerFooterTag"),o=Dn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=nt("context");return t?x.createElement(r,{ref:o},x.createElement(t,ct(t,s))):null}),iL=x.memo(function(){const t=nt("FooterComponent"),n=dn("footerHeight"),r=nt("headerFooterTag"),o=Dn(x.useMemo(()=>i=>n(mn(i,"height")),[n])),s=nt("context");return t?x.createElement(r,{ref:o},x.createElement(t,ct(t,s))):null}),aL=({children:e})=>{const t=x.useContext(sw),n=dn("itemDimensions"),r=dn("viewportDimensions"),o=Dn(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:vs(!1),ref:o},e)},lL=({children:e})=>{const t=x.useContext(sw),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=nt("customScrollParent"),s=Uf(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:vs(!1)},e)},cL=x.memo(function({...t}){const n=nt("useWindowScroll"),r=nt("customScrollParent"),o=r||n?dL:uL,s=r||n?lL:aL;return x.createElement(o,{...t},x.createElement(s,null,x.createElement(sL,null),x.createElement(oL,null),x.createElement(iL,null)))}),{Component:w$,usePublisher:dn,useEmitterValue:nt,useEmitter:lw}=Lf(rL,{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"}},cL),uL=Yf({usePublisher:dn,useEmitterValue:nt,useEmitter:lw}),dL=qf({usePublisher:dn,useEmitterValue:nt,useEmitter:lw});function _g(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 fL=Le(()=>{const e=ne(l=>x.createElement("td",null,"Item $",l)),t=ne(null),n=ne(null),r=ne(null),o=ne({}),s=ne(Gf),i=ne(to),a=(l,c=null)=>Mt(q(o,le(u=>u[l]),Qe()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}),hL=Le(([e,t])=>({...e,...t}),Je(rw,fL)),mL=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e}})),pL=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e,padding:0,border:0}})),gL={overflowAnchor:"none"},yL=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}=Vx(n,u,c,a,d,void 0,o),[p,m]=x.useState(0);Xf("deviation",N=>{p!==N&&(h.current.style.marginTop=`${N}px`,m(N))});const y=Be("EmptyPlaceholder"),b=Be("ScrollSeekPlaceholder")||mL,v=Be("FillerRow")||pL,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&&y)return x.createElement(y,ct(y,A));const j=t.offsetTop+C+p,O=t.offsetBottom,L=j>0?x.createElement(v,{height:j,key:"padding-top",context:A}):null,P=O>0?x.createElement(v,{height:O,key:"padding-bottom",context:A}):null,D=t.items.map(N=>{const M=N.originalIndex,V=S(M+k,N.data,A);return E?x.createElement(b,{...ct(b,A),key:V,index:N.index,height:N.size,type:N.type||"item"}):x.createElement(T,{...ct(T,A),...iw(T,N.data),key:V,"data-index":M,"data-known-size":N.size,"data-item-index":N.index,style:gL},l(N.index,N.data,A))});return x.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...ct(g,A)},[L,...D,P])}),vL=({children:e})=>{const t=x.useContext(Dl),n=fn("viewportHeight"),r=fn("fixedItemHeight"),o=Dn(x.useMemo(()=>ri(n,s=>mn(s,"height")),[n]));return x.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),x.createElement("div",{style:vs(!1),ref:o,"data-viewport-type":"element"},e)},bL=({children:e})=>{const t=x.useContext(Dl),n=fn("windowViewportRect"),r=fn("fixedItemHeight"),o=Be("customScrollParent"),s=Uf(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:vs(!1),"data-viewport-type":"window"},e)},xL=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=Dn(x.useMemo(()=>ri(o,v=>mn(v,"height")),[o])),u=Dn(x.useMemo(()=>ri(s,v=>mn(v,"height")),[s])),d=r||n?TL:SL,f=r||n?bL:vL,h=Be("TableComponent"),p=Be("TableHeadComponent"),m=Be("TableFooterComponent"),y=i?x.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ct(p,l)},i()):null,b=a?x.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ct(m,l)},a()):null;return x.createElement(d,{...t},x.createElement(f,null,x.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(h,l)},[y,x.createElement(yL,{key:"TableBody"}),b])))}),{Component:wL,usePublisher:fn,useEmitterValue:Be,useEmitter:Xf}=Lf(hL,{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"}},xL),SL=Yf({usePublisher:fn,useEmitterValue:Be,useEmitter:Xf}),TL=qf({usePublisher:fn,useEmitterValue:Be,useEmitter:Xf}),EL=wL,cw=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>w.jsxs("div",{className:$e("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(Nx,{as:"button",type:"button",title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(Lb,{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(Nb,{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(Uk,{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]}),_i=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:y,hideLeft:b=!1,required:v,disabled:g,reportStatus:T},S)=>{const E=YO(),C=T!==void 0?T:E.inputIconFeedback,k=d??h,I=Et(),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:$e("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(cw,{info:a,hideLeft:b,reportStatus:C,title:p,placeholder:y,children:A||n?w.jsxs(x.Fragment,{children:[v?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})]})}),CL=e=>w.jsx(x.Fragment,{children:e.children}),RL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},PL={caseSensitive:!1,sort:!1},kL=[],IL=x.forwardRef(function(t,n){return w.jsx(lt.ul,{...t,ref:n,className:"w-full rounded-lg border-b border-tooltip-border last:border-transparent",children:w.jsx(fr,{children:t.children})})}),AL=x.forwardRef(function({item:t,context:n,...r},o){return w.jsx(lt.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),OL={List:IL,Item:AL},Mc=300,_L=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 y=x.useRef(null),b=x.useRef(null),v=p.value??p.defaultValue??"",g=Et(),[T,S]=x.useState(0),[E,C]=x.useState(!1),[k,I]=x.useState(""),[A,j]=x.useState(v),[O,L]=x.useState(()=>{var re;return((re=e.find(de=>de.value===v))==null?void 0:re.label)??v}),[P,D]=x.useState(null),N=x.useRef(kL),M=t&&k!==""?[{value:k,label:k,"data-dynamic":"true"},...e]:e,V=new Dr(M,["value","label"],PL).search(k),z=t?void 0:`^(${e.map(re=>`${su(re.value)}${re.label?"|"+su(re.label):""}`).join("|")})$`;x.useEffect(()=>{E||S(0)},[E]),x.useEffect(()=>{if(p.value){const re=e.find(de=>de.value===p.value);j((re==null?void 0:re.label)??p.value)}},[p.value]),x.useEffect(()=>{if(!E)return;const re=ee.floating;if(re.current===null)return;let de=0;Array.from(re.current.querySelectorAll("li")).slice(0,Math.min(V.length,10)).forEach(K=>{const fe=K.getBoundingClientRect();de+=fe.height});const Y=Math.min(de,Mc);S(Y)},[k,E]);const{x:_,y:$,strategy:Z,refs:ee,context:J}=Qr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Ci,middleware:[Ri(4),ax({padding:10,elementContext:"reference",apply(re){var fe;const de=(fe=y.current)==null?void 0:fe.getBoundingClientRect().width,oe=re.elements.floating.querySelector("ul"),Y=(oe==null?void 0:oe.getBoundingClientRect().height)||0,K=Math.min(Y<40?Mc:Y,Mc);hi.flushSync(()=>setTimeout(()=>S(K),200)),Object.assign(re.elements.floating.style,{width:`${de}px`,maxWidth:`${de}px`,maxHeight:`${K}px`})}})]}),U=Tx(J,RL),{getReferenceProps:F,getFloatingProps:B,getItemProps:W}=Jr([eo(J,{role:"listbox"}),Xr(J),Mf(J,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:re=>D(de=>re??de)})]);x.useEffect(()=>{const re=ee.reference.current;if(re)return yi(re)},[]);const G=(re,de)=>{j(re.value);const oe=ee.reference.current;if(!oe)return;oe==null||oe.setAttribute("data-value",re.value),oe.value=re.value;const Y=new Event("change",{bubbles:!1,cancelable:!0});oe.dispatchEvent(Y),p.onChange&&p.onChange(Y),L(re.label??""),C(!1),I(""),D(de)},Q=re=>{var oe;const de=re.target.value;return I(de),!E&&de===""?C(!0):(re.target.name=p.name||"",de?C(!0):(oe=p.onChange)==null?void 0:oe.call(p,re))},ce=()=>{var re;C(!0),I(""),(re=ee.reference.current)==null||re.focus()},H=()=>{C(!0),I("")},Ie=()=>{var re;(re=ee.reference.current)==null||re.setAttribute("data-value",""),I(""),j(""),L(""),bd(ee.reference.current),C(!1)},De=p.id||p.name;return w.jsxs(_i,{...p,left:d,error:f,ref:y,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ce,children:[w.jsx(nf,{size:20}),w.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),A?w.jsx("button",{type:"button",onClick:Ie,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[w.jsx("input",{"data-shadow":"true",...F({...p,onChange:Q,onFocus:H,pattern:z,ref:ee.setReference,name:`${De}-shadow`,id:`${De}-shadow`,onClick:re=>re.currentTarget.focus(),onKeyDown(re){var de,oe;if(re.key==="ArrowDown"){let Y=P+1;return Y>V.length-1&&(Y=0),(de=b.current)==null||de.scrollIntoView({index:Y}),D(Y)}if(re.key==="ArrowUp"){let Y=P-1;return Y<0&&(Y=V.length-1),(oe=b.current)==null||oe.scrollIntoView({index:Y}),D(Y)}if(re.key==="Escape")return re.currentTarget.blur(),C(!1);if(re.key==="Enter"){if(P!==null&&V[P])return re.preventDefault(),G(V[P],P);if(V.length===1)return re.preventDefault(),G(V[0],0)}}}),"data-value":A,"data-error":!!f,"data-name":De,"data-target":De,required:h,value:E?k:O||A,"aria-autocomplete":"list",autoComplete:"off",className:$e("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",p.className)}),w.jsx("input",{id:De,name:De,type:"hidden","data-origin":De,ref:m,required:h,defaultValue:p.value||A||void 0}),w.jsx(Zr,{preserveTabOrder:!0,children:E?w.jsx(hs,{guards:!0,returnFocus:!1,context:J,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsxs("ul",{...B({ref:ee.setFloating,style:{...U.styles,position:Z,left:(_??0)+(A?26:18),top:$??0}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[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(Zf,{data:V,ref:b,hidden:V.length===0,components:OL,className:"rounded-lg border-floating-border bg-floating-background p-0 text-foreground",style:{height:T},itemContent:(re,de)=>{const oe=de.Render??CL,Y=A===de.value||A===de.label,K=P===re,fe=de.label??de.value;return w.jsx("button",{"data-value":de.value,...W({ref:pe=>void(N.current[re]=pe),role:"option",type:"button","aria-checked":Y,"aria-current":Y,"aria-selected":Y,"aria-busy":de.disabled,onClick:()=>G(de,re),className:`cursor-pointer w-full p-2 text-left ${Y?"bg-primary-hover text-primary-foreground":""} ${K?"bg-floating-hover text-floating-foreground":""}`}),children:w.jsx(oe,{...p,label:de.label,value:de.value,children:fe})})}})]})}):null})]})});class ko extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof ko&&(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 ko(this)}}const Qf=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:$e("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[w.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:$e("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,w.jsx("span",{"data-name":"checkbox-label",className:$e("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),DL=e=>w.jsx(x.Fragment,{children:e.children}),ML={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},NL={caseSensitive:!1,sort:!1},Dg=[],jL=x.forwardRef(function(t,n){return w.jsx(lt.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})})}),LL=x.forwardRef(function({item:t,context:n,...r},o){return w.jsx(lt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),FL={List:jL,Item:LL},VL=e=>{const t=Et(),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(wd,{size:"small","data-multicounter":"true",children:[r," ",t.multiComboboxSelectedLabel]}):e.children})},$L=()=>{},BL=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},y)=>{const b=x.useMemo(()=>new ko(r.map(Y=>[Y.value,Y])),[r]),v=x.useRef(null),g=x.useRef(null),T=m.value??m.defaultValue??Dg,S=Et(),[E,C]=x.useState(0),[k,I]=x.useState(!1),[A,j]=x.useState(""),[O,L]=x.useState(()=>{const Y=new ko;return T.forEach(K=>{const fe=b.get(K);return fe?Y.set(K,fe):void 0}),Y}),P=x.useMemo(()=>Array.from(O.keys()),[O]),[D,N]=x.useState(()=>{const Y=new Set(T);return r.reduce((K,fe)=>Y.has(fe.value)?[...K,fe.label??fe.value]:K,[])??T}),[M,V]=x.useState(null),z=x.useRef(Dg),_=p&&A!==""?[{value:A,label:A,"data-dynamic":"true"},...r]:r,$=new Dr(_,["value","label"],NL).search(A);x.useEffect(()=>{k||C(0)},[k]),x.useEffect(()=>{m.value&&L(new ko(m.value.map(Y=>[Y,b.get(Y)])))},[m.value,b]);const{x:Z,y:ee,strategy:J,refs:U,context:F}=Qr({open:k,transform:!0,strategy:"absolute",onOpenChange:I,whileElementsMounted:Ci,middleware:[Ri(4),ax({padding:10,elementContext:"reference",apply(Y){var pe;const K=(pe=v.current)==null?void 0:pe.getBoundingClientRect().width,fe=360;hi.flushSync(()=>setTimeout(()=>C(fe),200)),Object.assign(Y.elements.floating.style,{width:`${K}px`,maxWidth:`${K}px`,maxHeight:`${fe}px`,height:`${fe}px`})}})]}),B=Tx(F,ML),{getReferenceProps:W,getFloatingProps:G,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),Mf(F,{cols:0,listRef:z,loop:!0,virtual:!0,allowEscape:!0,activeIndex:M,selectedIndex:M,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:Y=>V(K=>Y??K)})]);x.useEffect(()=>{const Y=U.reference.current;if(Y)return yi(Y)},[]);const ce=(Y,K)=>{const fe=O.clone();O.has(Y.value)?fe.delete(Y.value):fe.set(Y.value,Y),L(fe);const pe=U.reference.current;if(!pe)return;pe==null||pe.setAttribute("data-value",Y.value),pe.value=Array.from(fe.values());const Ee=new Event("change",{bubbles:!1,cancelable:!0});pe.dispatchEvent(Ee),m.onChange&&m.onChange(Ee),N(et=>et.concat(Y.label??"")),j(""),V(K)},H=Y=>{const K=Y.target.value;return j(K),!k&&K===""?I(!0):(Y.target.name=m.name||"",K?I(!0):void 0)},Ie=()=>{var Y;I(!0),j(""),(Y=U.reference.current)==null||Y.focus()},De=()=>{I(!0),j("")},re=()=>{var Y;(Y=U.reference.current)==null||Y.setAttribute("data-value",""),j(""),bd(U.reference.current),I(!1)},de=m.id||m.name,oe=O.map(Y=>w.jsx(wd,{size:"small",children:Y.label??Y.value},`multicombobox-${Y.value}-x`));return w.jsxs(_i,{...m,left:e,error:t,ref:v,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:Ie,children:[w.jsx(nf,{size:20}),w.jsx("span",{className:"sr-only",children:S.inputCaretDown})]}),O?w.jsx("button",{type:"button",onClick:re,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",{...W({...m,onFocus:De,id:`${de}-shadow`,name:`${de}-shadow`,ref:U.setReference}),type:"button","data-name":de,"data-target":de,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":P.join(","),value:k?A:D||O,className:$e("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(VL,{label:c,children:oe})}),w.jsx("input",{id:de,name:de,type:"hidden","data-origin":de,ref:y,required:h,defaultValue:m.value||P||void 0}),w.jsx(Zr,{preserveTabOrder:!0,children:k?w.jsx(hs,{guards:!0,returnFocus:!1,context:F,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsxs("div",{...G({ref:U.setFloating,style:{...B.styles,position:J,left:(Z??0)+(O?26:18),top:ee??0}}),"data-floating":"true",className:"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:H,title:m.title,placeholder:S.multiComboboxInnerPlaceholder,onKeyDown:Y=>{var K,fe;if(Y.key==="ArrowDown"){let pe=M+1;return pe>$.length-1&&(pe=0),(K=g.current)==null||K.scrollIntoView({index:pe}),V(pe)}if(Y.key==="ArrowUp"){let pe=M-1;return pe<0&&(pe=$.length-1),(fe=g.current)==null||fe.scrollIntoView({index:pe}),V(pe)}if(Y.key==="Escape")return Y.currentTarget.blur(),I(!1);if(Y.key==="Enter"){if(M!==null&&$[M])return Y.preventDefault(),ce($[M],M);if($.length===1)return Y.preventDefault(),ce($[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(Zf,{data:$,ref:g,hidden:$.length===0,style:{height:O.size===0?E-49:E-86},components:FL,className:"border-floating-border bg-floating-background p-0 text-foreground",itemContent:(Y,K)=>{const fe=K.Render??DL,pe=O.has(K.value)||O.has(K.label??""),Ee=M===Y,et=K.label??K.value;return w.jsx("button",{"data-value":K.value,...Q({ref:te=>void(z.current[Y]=te),role:"option",type:"button","aria-checked":pe,"aria-current":pe,"aria-selected":pe,"aria-busy":K.disabled,onClick:()=>ce(K,Y)}),className:`focus:bg-floating-hover hover:bg-floating-hover w-full cursor-pointer p-2 text-left ${pe||Ee?"bg-floating-hover text-floating-foreground":""}`,children:w.jsx(Qf,{onChange:$L,checked:pe,"aria-checked":pe,onClick:te=>(te.stopPropagation(),void te.preventDefault()),children:w.jsx(fe,{...m,label:K.label,value:K.value,children:et})})})}}),O.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:oe})]})}):null})]})}),uw=(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:y=null,hideLeft:b=!1,...v},g)=>{const T=e,S=v.id??v.name,E=x.useRef(null);return x.useEffect(()=>{if(E.current===null)return;const C=E.current,k=yi(E.current),I=r==null?void 0:r(C),A=j=>{const O=j;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)}},[]),w.jsx(_i,{...n,info:s,left:i,error:l,right:c,form:v.form,name:v.name,feedback:y,hideLeft:b,title:v.title,container:u,rightLabel:d,disabled:v.disabled,interactive:f,required:v.required,componentName:t,id:v.name||v.id,optionalText:h,labelClassName:m,placeholder:v.placeholder,children:w.jsx(T,{...n,...v,id:S,name:S,type:p,"data-next":a,"aria-busy":v.disabled,"aria-disabled":v.disabled,"aria-readonly":v.readOnly,ref:vd(g,E),className:$e("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",v.className)})})}),Di=uw(a0,"input",{type:"text"}),Mg=new Date(1970,11,31),Nc={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Ng={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},WL={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")},jc=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},zL=x.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||pf(),l=x.useId(),c=Et(),u=x.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=x.useState(e||void 0),[h,p]=x.useState(!1),m=jc(u,Mg).flatMap(C=>Pt.keyof(Nc,C.type)?Nc[C.type](C.value):[]),y=jc(u,Mg).reduce((C,k)=>C+(Pt.keyof(Ng,k.type)?Ng[k.type](k.value):""),""),[b,v]=x.useState(d?jc(u,d).reduce((C,k)=>C+(Pt.keyof(Nc,k.type)?WL[k.type](d,k.value):""),""):""),g=C=>{const k=C.target.value;if(v(k),m.length===k.length&&m.every((A,j)=>{const O=k.charAt(j);return typeof A=="string"?O===A:A.test(O)})){const A=Wo(rO(k,y,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),v(C?oA(C,y):"")),S=zb(d),E=S?d.toISOString():void 0;return w.jsx(Di,{...s,mask:m,value:b,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:g,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??y,right: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(ms,{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(zk,{})]}),buttonProps:{"aria-describedby":l},children:w.jsx(g0,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:S?d:void 0})})]})})}),HL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],UL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],GL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],YL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],jg=(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 Lg(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?YL:GL:t.binary?UL:HL,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=jg(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=jg(Number(e),t.locale,i),c=n[a];return s+l+r+c}var Gu={exports:{}},ta={exports:{}},Fe={};/** @license React v16.13.1
212
+ `)},ON=0,ho=[];function _N(e){var t=R.useRef([]),n=R.useRef([0,0]),r=R.useRef(),o=R.useState(ON++)[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=$u([e.lockRef.current],(e.shards||[]).map(mg),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=R.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var b=Ji(m),v=n.current,g="deltaX"in m?m.deltaX:v[0]-b[0],T="deltaY"in m?m.deltaY:v[1]-b[1],w,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=fg(C,E);if(!k)return!0;if(k?w=C:(w=C==="v"?"h":"v",k=fg(C,E)),!k)return!1;if(!r.current&&"changedTouches"in m&&(g||T)&&(r.current=w),!w)return!0;var A=r.current||w;return kN(A,y,m,A==="h"?g:T,!0)},[]),l=R.useCallback(function(m){var y=m;if(!(!ho.length||ho[ho.length-1]!==s)){var b="deltaY"in y?hg(y):Ji(y),v=t.current.filter(function(w){return w.name===y.type&&(w.target===y.target||y.target===w.shadowParent)&&AN(w.delta,b)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var g=(i.current.shards||[]).map(mg).filter(Boolean).filter(function(w){return w.contains(y.target)}),T=g.length>0?a(y,g[0]):!i.current.noIsolation;T&&y.cancelable&&y.preventDefault()}}},[]),c=R.useCallback(function(m,y,b,v){var g={name:m,delta:y,target:b,should:v,shadowParent:MN(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=Ji(m),r.current=void 0},[]),d=R.useCallback(function(m){c(m.type,hg(m),m.target,a(m,e.lockRef.current))},[]),f=R.useCallback(function(m){c(m.type,Ji(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:IN(o)}):null,h?R.createElement(wN,{gapMode:e.gapMode}):null)}function MN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const DN=lN(Ix,_N);var Nx=R.forwardRef(function(e,t){return R.createElement(Al,En({},e,{ref:t,sideCar:DN}))});Nx.classNames=Al.classNames;const NN=(e,t)=>Sa()?t:window.matchMedia(e).matches,jN=(e,t=!0)=>{const[n,r]=x.useState(t);return x.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(NN(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",LN={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:cn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:cn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:cn}},FN={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"?LN:FN,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}}},VN=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"}}),$N={top:0,left:0,right:0,bottom:-1},BN=e=>e*.62,WN=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=BN(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:$N,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})},Ic={drawer:"right",sheet:"none",dialog:"none"},zN=({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,...y})=>{const b=x.useId(),v=x.useId(),g=jN("(min-width: 64rem)"),T=h!=="dialog",w=g?h==="drawer"?p:Ic[h]:d?Ic[h]:Ic.sheet,E=g||d?Ac[h]:Ac.sheet,C=typeof E=="function"?E(w):E,k=g||d?h:"sheet",{refs:A,context:I}=Qr({open:e,onOpenChange:a}),j=Ai(I),O=eo(I),L=Xr(I,{escapeKey:!0,referencePress:!0,outsidePress:m}),{getReferenceProps:P,getFloatingProps:M}=Jr([j,O,L]),N=o,D=$r(void 0),V=()=>a(!1);return S.jsxs(x.Fragment,{children:[o?S.jsx(x.Fragment,{children:r?S.jsx(Ho,{ref:A.setReference,...P({layoutId:i}),children:N}):S.jsx(lt.button,{ref:A.setReference,...P(),layoutId:i,type:"button",children:N})}):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(LD,{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:I,children:S.jsxs(lt.div,{...y,exit:"exit",animate:"enter",initial:"initial",variants:C,"data-component":"modal",ref:A.setFloating,"aria-modal":e,layoutId:i,"aria-labelledby":b,"aria-describedby":v,className:Me(VN({position:w,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(af,{})})}):null,T&&c?S.jsx(WN,{onChange:a,parent:A.floating,position:w,sheet:k==="sheet",value:D}):null]})})})}):null})})]})},HN=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,focus:o=!0,hover:s=!0,enabled:i=!0,popover:a=!0,followCursor:l=!1,...c})=>{const[u,d]=x.useState(!1),f=x.useRef(null),h=e||"span",{refs:p,floatingStyles:m,context:y}=Qr({open:u,placement:r,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Ri,middleware:[Of(),Pi(5),_f({fallbackAxisSideDirection:"start"}),cx({padding:5,element:f})]}),b=yx(y,{move:!0,delay:{open:Rx},enabled:i?s:!1,handleClose:a?Cx():null}),v=zD(y,{enabled:i?o:!1}),g=Ai(y,{enabled:i?a:!1}),T=Xr(y,{enabled:i}),w=eo(y,{role:"tooltip",enabled:i}),E=VD(y,{enabled:!!i&&!!l}),{getReferenceProps:C,getFloatingProps:k}=Jr([w,T,E,o?v:void 0,s?b:void 0,a?g:void 0]);return S.jsxs(x.Fragment,{children:[S.jsx(h,{ref:p.setReference,...C(c),children:t}),S.jsx(Zr,{preserveTabOrder:!0,children:u&&S.jsxs(ss,{...k(),ref:p.setFloating,style:m,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[S.jsx(hx,{ref:f,context:y,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Ha{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Ha.getDescendantProperty(a[l],s,r);else s&&Ha.getDescendantProperty(a,s,r)}else r.push(t);return r}}class 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=Ha.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 Il=0,yr=1,vs=2,Lx=4;function oi(e,t){return n=>e(t(n))}function UN(e,t){return t(e)}function Fx(e,t){return n=>e(t,n)}function pg(e,t){return()=>e(t)}function Ol(e,t){return t(e),e}function et(...e){return e}function GN(e){e()}function gg(e){return()=>e}function YN(...e){return()=>{e.map(GN)}}function jf(e){return e!==void 0}function to(){}function ze(e,t){return e(yr,t)}function Se(e,t){e(Il,t)}function Lf(e){e(vs)}function Mt(e){return e(Lx)}function he(e,t){return ze(e,Fx(t,Il))}function _n(e,t){const n=e(yr,r=>{n(),t(r)});return n}function Ae(){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 Il:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ne(e){let t=e;const n=Ae();return(r,o)=>{switch(r){case yr:o(t);break;case Il:t=o;break;case Lx:return t}return n(r,o)}}function qN(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 Ol(Ae(),t=>he(e,t))}function Dt(e,t){return Ol(ne(t),n=>he(e,n))}function KN(...e){return t=>e.reduceRight(UN,t)}function K(e,...t){const n=KN(...t);return(r,o)=>{switch(r){case yr:return ze(e,n(o));case vs:Lf(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=>oi(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 yg(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 vg(...e){return function(t,n){switch(t){case yr:return YN(...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=Ae(),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 Lf(t);default:throw new Error(`unrecognized action ${s}`)}}}function je(e,t=[],{singleton:n}={singleton:!0}){return{id:ZN(),constructor:e,dependencies:t,singleton:n}}const ZN=()=>Symbol();function XN(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 QN(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 ea=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Ff(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,v){b.propsReady&&Se(b.propsReady,!1);for(const g of r){const T=b[t.required[g]];Se(T,v[g])}for(const g of o)if(g in v){const T=b[t.optional[g]];Se(T,v[g])}b.propsReady&&Se(b.propsReady,!0)}function c(b){return s.reduce((v,g)=>(v[g]=T=>{const w=b[t.methods[g]];Se(w,T)},v),{})}function u(b){return i.reduce((v,g)=>(v[g]=qN(b[t.events[g]]),v),{})}const d=x.forwardRef((b,v)=>{const{children:g,...T}=b,[w]=x.useState(()=>Ol(XN(e),C=>l(C,T))),[E]=x.useState(pg(u,w));return ea(()=>{for(const C of i)C in T&&ze(E[C],T[C]);return()=>{Object.values(E).map(Lf)}},[T,E,w]),ea(()=>{l(w,T)}),x.useImperativeHandle(v,gg(c(w))),x.createElement(a.Provider,{value:w},n?x.createElement(n,QN([...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(w=>ze(g,w),[g]);return x.useSyncExternalStore(T,()=>Mt(g),()=>Mt(g))},p=b=>{const g=x.useContext(a)[b],[T,w]=x.useState(pg(Mt,g));return ea(()=>ze(g,E=>{E!==T&&w(gg(E))}),[g,T]),T},m=x.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(b,v)=>{const T=x.useContext(a)[b];ea(()=>ze(T,v),[v,T])}}}const JN=typeof document<"u"?x.useLayoutEffect:x.useEffect,ej=JN;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 tj={0:"debug",1:"log",2:"warn",3:"error"},nj=()=>typeof globalThis>"u"?window:globalThis,vr=je(()=>{const e=ne(3);return{log:ne((n,r,o=1)=>{var s;const i=(s=nj().VIRTUOSO_LOG_LEVEL)!=null?s:Mt(e);o>=i&&console[tj[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Vf(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 Vf(e,t).callbackRef}function $x(e,t,n,r,o,s,i){const a=x.useCallback(l=>{const c=rj(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(oj("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Vf(a,n)}function rj(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 oj(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,y=h?window.innerHeight:f.offsetHeight,b=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};d.suppressFlushSync?b():mi.flushSync(b),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);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,y;f===window?(m=Math.max(mn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=f.scrollHeight,p=mn(f,"height"),y=f.scrollTop);const b=m-p;if(d.top=Math.ceil(Math.max(Math.min(b,d.top),0)),Bx(p,m)||d.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Bt=je(()=>{const e=Ae(),t=Ae(),n=ne(0),r=Ae(),o=ne(0),s=Ae(),i=Ae(),a=ne(0),l=ne(0),c=ne(0),u=ne(0),d=Ae(),f=Ae(),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}),si={lvl:0};function zx(e,t,n,r=si,o=si){return{k:e,v:t,lvl:n,l:r,r:o}}function Ye(e){return e===si}function ko(){return si}function Wu(e,t){if(Ye(e))return si;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 pa(vt(e,{k:s,v:i,l:Ux(r)}))}}else return t<n?pa(vt(e,{l:Wu(r,t)})):pa(vt(e,{r:Wu(o,t)}))}function ii(e,t){if(!Ye(e))return t===e.k?e.v:t<e.k?ii(e.l,t):ii(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?bg(vt(e,{l:Kt(e.l,t,n)})):bg(vt(e,{r:Kt(e.r,t,n)}))}function zu(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(zu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(zu(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:pa(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 Oc(e){return Ye(e)||e.lvl>e.r.lvl}function bg(e){return Hu(Yx(e))}function pa(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(Oc(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(Oc(e))return Hu(vt(e,{lvl:r-1}));if(!Ye(n)&&!Ye(n.l)){const o=n.l,s=Oc(o)?n.lvl-1:n.lvl;return vt(o,{l:vt(e,{r:o.l,lvl:r-1}),r:Hu(vt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function _l(e,t,n){if(Ye(e))return[];const r=pn(e,t)[0];return sj(zu(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 sj(e){return Gx(e,({k:t,v:n})=>({index:t,value:n}))}function Hu(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 Ua(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[Ua(e,t,n)]}function ij(e,t,n,r){const o=Ua(e,t,r),s=Ua(e,n,r,o);return e.slice(o,s+1)}const $f=je(()=>({recalcInProgress:ne(!1)}),[],{singleton:!0});function aj(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 xg(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 lj(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=_l(e,s-1,i+1);if(a.some(aj(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Wu(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 cj(){return{offsetTree:[],sizeTree:ko(),groupOffsetTree:ko(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Bf({index:e},t){return t===e?0:t<e?-1:1}function uj({offset:e},t){return t===e?0:t<e?-1:1}function dj(e){return{index:e.index,value:e}}function fj(e,t,n,r=0){return r>0&&(t=Math.max(t,qx(e,r,Bf).offset)),Gx(ij(e,t,n,uj),dj)}function Uu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ua(o,t-1,Bf),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 _l(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 hj(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]=lj(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Uu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,ai(h,l,o)),ko()),groupIndices:n}}function ai(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=qx(t,e,Bf),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function mj(e){return typeof e.groupIndex<"u"}function Kx(e,t,n){if(mj(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(!Ml(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ml(e){return!Ye(e.groupOffsetTree)}function pj(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 gj={offsetHeight:"height",offsetWidth:"width"},jn=je(([{log:e},{recalcInProgress:t}])=>{const n=Ae(),r=Ae(),o=Dt(r,0),s=Ae(),i=Ae(),a=ne(0),l=ne([]),c=ne(void 0),u=ne(void 0),d=ne((w,E)=>mn(w,gj[E])),f=ne(void 0),h=ne(0),p=cj(),m=Dt(K(n,Ee(l,e,h),Rn(hj,p),Je()),p),y=Dt(K(l,Je(),Rn((w,E)=>({prev:w.current,current:E}),{prev:[],current:[]}),de(({prev:w})=>w)),[]);he(K(l,ye(w=>w.length>0),Ee(m,h),de(([w,E,C])=>{const k=w.reduce((A,I,j)=>Kt(A,I,ai(I,E.offsetTree,C)||j),ko());return{...E,groupIndices:w,groupOffsetTree:k}})),m),he(K(r,Ee(m),ye(([w,{lastIndex:E}])=>w<E),de(([w,{lastIndex:E,lastSize:C}])=>[{startIndex:w,endIndex:E,size:C}])),n),he(c,u);const b=Dt(K(c,de(w=>w===void 0)),!0);he(K(u,ye(w=>w!==void 0&&Ye(Mt(m).sizeTree)),de(w=>[{startIndex:0,endIndex:0,size:w}])),n);const v=Zt(K(n,Ee(m),Rn(({sizes:w},[E,C])=>({changed:C!==w,sizes:C}),{changed:!1,sizes:p}),de(w=>w.changed)));ze(K(a,Rn((w,E)=>({diff:w.prev-E,prev:E}),{diff:0,prev:0}),de(w=>w.diff)),w=>{const{groupIndices:E}=Mt(m);if(w>0)Se(t,!0),Se(s,w+xg(w,E));else if(w<0){const C=Mt(y);C.length>0&&(w-=xg(-w,C)),Se(i,w)}}),ze(K(a,Ee(e)),([w,E])=>{w<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(([w,E])=>{const C=E.groupIndices.length>0,k=[],A=E.lastSize;if(C){const I=ii(E.sizeTree,0);let j=0,O=0;for(;j<w;){const M=E.groupIndices[O],N=E.groupIndices.length===O+1?1/0:E.groupIndices[O+1]-M-1;k.push({startIndex:M,endIndex:M,size:I}),k.push({startIndex:M+1,endIndex:M+1+N-1,size:A}),O++,j+=N+1}const L=Dr(E.sizeTree);return j!==w&&L.shift(),L.reduce((M,{k:N,v:D})=>{let V=M.ranges;return M.prevSize!==0&&(V=[...M.ranges,{startIndex:M.prevIndex,endIndex:N+w-1,size:M.prevSize}]),{ranges:V,prevIndex:N+w,prevSize:D}},{ranges:k,prevIndex:w,prevSize:0}).ranges}return Dr(E.sizeTree).reduce((I,{k:j,v:O})=>({ranges:[...I.ranges,{startIndex:I.prevIndex,endIndex:j+w-1,size:I.prevSize}],prevIndex:j+w,prevSize:O}),{ranges:[],prevIndex:0,prevSize:A}).ranges})),n);const T=Zt(K(i,Ee(m,h),de(([w,{offsetTree:E},C])=>{const k=-w;return ai(k,E,C)})));return he(K(i,Ee(m,h),de(([w,E,C])=>{if(E.groupIndices.length>0){if(Ye(E.sizeTree))return E;let A=ko();const I=Mt(y);let j=0,O=0,L=0;for(;j<-w;){L=I[O];const M=I[O+1]-L-1;O++,j+=M+1}if(A=Dr(E.sizeTree).reduce((M,{k:N,v:D})=>Kt(M,Math.max(0,N+w),D),A),j!==-w){const M=ii(E.sizeTree,L);A=Kt(A,0,M);const N=pn(E.sizeTree,-w+1)[1];A=Kt(A,1,N)}return{...E,sizeTree:A,...Uu(E.offsetTree,0,A,C)}}else{const A=Dr(E.sizeTree).reduce((I,{k:j,v:O})=>Kt(I,Math.max(0,j+w),O),ko());return{...E,sizeTree:A,...Uu(E.offsetTree,0,A,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:v,statefulTotalCount:o,trackItemSizes:b,itemSize:d}},et(vr,$f),{singleton:!0}),yj=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||!yj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ii=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=Ae(),p=Ae(),m=ne(0);let y=null,b=null,v=null;function g(){y&&(y(),y=null),v&&(v(),v=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,w,E,C,k,A,I,j],O,L,P])=>{const M=Xx(T),{align:N,behavior:D,offset:V}=M,z=C-1,_=Kx(M,w,z);let $=ai(_,w.offsetTree,O)+A;N==="end"?($+=L+pn(w.sizeTree,_)[1]-E+P,_===z&&($+=I)):N==="center"?$+=(L+pn(w.sizeTree,_)[1]-E+P)/2:$-=k,V&&($+=V);const Z=re=>{g(),re?(j("retrying to scroll to",{location:T},Xt.DEBUG),Se(h,T)):(Se(p,!0),j("list did not change, scroll successful",{},Xt.DEBUG))};if(g(),D==="smooth"){let re=!1;v=ze(n,ee=>{re=re||ee}),y=_n(a,()=>{Z(re)})}else y=_n(K(n,vj(150)),Z);return b=setTimeout(()=>{g()},1200),Se(o,!0),j("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 vj(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const li="up",zs="down",bj="none",xj={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},wj=0,Oi=je(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ne(!1),a=ne(!0),l=Ae(),c=Ae(),u=ne(4),d=ne(wj),f=Dt(K(vg(K(be(t),Zo(1),xn(!0)),K(be(t),Zo(1),xn(!1),yg(100))),Je()),!1),h=Dt(K(vg(K(s,xn(!0)),K(s,xn(!1),yg(200))),Je()),!1);he(K(Tt(be(t),be(d)),de(([v,g])=>v<=g),Je()),a),he(K(a,nr(50)),c);const p=Zt(K(Tt(e,be(n),be(r),be(o),be(u)),Rn((v,[{scrollTop:g,scrollHeight:T},w,E,C,k])=>{const A=g+w-T>-k,I={viewportHeight:w,scrollTop:g,scrollHeight:T};if(A){let O,L;return g>v.state.scrollTop?(O="SCROLLED_DOWN",L=v.state.scrollTop-g):(O="SIZE_DECREASED",L=v.state.scrollTop-g||v.scrollTopDelta),{atBottom:!0,state:I,atBottomBecause:O,scrollTopDelta:L}}let j;return I.scrollHeight>v.state.scrollHeight?j="SIZE_INCREASED":w<v.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":g<v.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:I}},xj),Je((v,g)=>v&&v.atBottom===g.atBottom))),m=Dt(K(e,Rn((v,{scrollTop:g,scrollHeight:T,viewportHeight:w})=>{if(Bx(v.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+w)<1;return v.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:v.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ye(v=>v.changed),de(v=>v.jump)),0);he(K(p,de(v=>v.atBottom)),i),he(K(i,nr(50)),l);const y=ne(zs);he(K(e,de(({scrollTop:v})=>v),Je(),Rn((v,g)=>Mt(h)?{direction:v.direction,prevScrollTop:g}:{direction:g<v.prevScrollTop?li:zs,prevScrollTop:g},{direction:zs,prevScrollTop:0}),de(v=>v.direction)),y),he(K(e,nr(50),xn(bj)),y);const b=ne(0);return he(K(f,ye(v=>!v),xn(0)),b),he(K(t,nr(100),Ee(f),ye(([v,g])=>!!g),Rn(([v,g],[T])=>[g,T],[0,0]),de(([v,g])=>g-v)),b),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:b,lastJumpDueToItemResize:m}},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 Wf(e,t){e==0?t():requestAnimationFrame(()=>Wf(e-1,t))}function zf(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const _i=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)||jf(h))&&!d&&!p),Ee(l)),([,u])=>{_n(s,()=>{Se(c,!0)}),Wf(4,()=>{_n(r,()=>{Se(a,!0)}),Se(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},et(jn,Bt,Ii,br),{singleton:!0});function wg(e){return e?e==="smooth"?"smooth":"auto":!1}const Sj=(e,t)=>typeof e=="function"?wg(e(t)):t&&wg(e),Tj=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=Ae();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,y],b,v,g,T])=>{let w=y&&g,E="auto";return w&&(E=Sj(b,v||T),w=w&&!!E),{totalCount:m,shouldFollow:w,followOutputBehavior:E}}),ye(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{f&&(f(),f=null),f=_n(t,()=>{Mt(l)("following output to ",{totalCount:m},Xt.DEBUG),h(y),f=null})});function p(m){const y=_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(y,100)}return ze(K(Tt(be(u),e,i),ye(([m,,y])=>m&&y),Rn(({value:m},[,y])=>({refreshed:m===y,value:y}),{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,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},et(jn,Oi,Ii,_i,br,vr,Bt));function Ej(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=Ae(),i=Ae(),a=Zt(K(s,de(Ej)));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])=>Ml(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 ci(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 Ga="top",Ya="bottom",Sg="none";function Tg(e,t,n){return typeof e=="number"?n===li&&t===Ga||n===zs&&t===Ya?e:0:n===li?t===Ga?e.main:e.reverse:t===Ya?e.main:e.reverse}function Eg(e,t){return typeof e=="number"?e:e[t]||0}const Hf=je(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ae(),i=ne(0),a=ne(0),l=ne(0),c=Dt(K(Tt(be(e),be(t),be(r),be(s,ci),be(l),be(i),be(o),be(n),be(a)),de(([u,d,f,[h,p],m,y,b,v,g])=>{const T=u-v,w=y+b,E=Math.max(f-T,0);let C=Sg;const k=Eg(g,Ga),A=Eg(g,Ya);return h-=v,h+=f+b,p+=f+b,p-=v,h>u+w-k&&(C=li),p<u-E+d+A&&(C=zs),C!==Sg?[Math.max(T-f-Tg(m,Ga,C)-k,0),T-E-b+d+Tg(m,Ya,C)+A]:null}),ye(u=>u!=null),Je(ci)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},et(Bt),{singleton:!0});function Cj(e,t,n){if(Ml(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 _c={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Cg(e,t,n){if(e.length===0)return[];if(!Ml(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=_l(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 ga(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:Cg(e,o,s),topItems:Cg(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function 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=zf(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return ga(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([]),y=ne(0),b=Ae();he(s.topItemsIndexes,m);const v=Dt(K(Tt(h,p,be(i,ci),be(t),be(e),be(u),c,be(m),be(r),be(o),n),ye(([E,C,,k,,,,,,,A])=>{const I=A&&A.length!==k;return E&&!C&&!I}),de(([,,[E,C],k,A,I,j,O,L,P,M])=>{const N=A,{sizeTree:D,offsetTree:V}=N,z=Mt(y);if(k===0)return{..._c,totalCount:k};if(E===0&&C===0)return z===0?{..._c,totalCount:k}:ew(z,I,A,L,P,M||[]);if(Ye(D))return z>0?null:ga(Cj(zf(I,k),N,M),[],k,P,N,L);const _=[];if(O.length>0){const G=O[0],F=O[O.length-1];let B=0;for(const H of _l(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(!j)return ga([],_,k,P,N,L);const $=O.length>0?O[O.length-1]+1:0,Z=fj(V,E,C,$);if(Z.length===0)return null;const re=k-1,ee=Ol([],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 ga(ee,_,k,P,N,L)}),ye(E=>E!==null),Je()),_c);he(K(n,ye(jf),de(E=>E==null?void 0:E.length)),t),he(K(v,de(E=>E.topListHeight)),d),he(d,l),he(K(v,de(E=>[E.top,E.bottom])),a),he(K(v,de(E=>E.items)),b);const g=Zt(K(v,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(ci),de(([E])=>E))),T=Zt(K(v,nr(200),ye(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),de(({items:E})=>E[0].index),Je())),w=Zt(K(v,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:v,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:w,itemsRendered:b,initialItemCount:y,...f}},et(jn,Qx,Hf,_i,Ii,Oi,br,$f),{singleton:!0}),Rj=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,_i,no,br),{singleton:!0}),tw=je(([{scrollVelocity:e}])=>{const t=ne(!1),n=Ae(),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(Oi),{singleton:!0}),Pj=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=Ae(),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 kj=rw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Aj=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,v,g],[{items:T,totalCount:w,bottom:E,offsetBottom:C},k])=>{const A=E+C;let I=0;return v===w&&b.length>0&&T.length>0&&(T[0].originalIndex===0&&b[0].originalIndex===0||(I=A-g,I!==0&&(I+=k))),[I,T,w,A]},[0,[],0,0]),ye(([b])=>b!==0),Ee(t,i,r,s,h,p),ye(([,b,v,g,,,T])=>!T&&!g&&b!==0&&v===li),de(([[b],,,,,v])=>(v("Upward scrolling compensation",{amount:b},Xt.DEBUG),b))));function y(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,v,g])=>{g&&kj()?Se(n,v-b):y(-b)}),ze(K(Tt(Dt(o,!1),n,p),ye(([b,v,g])=>!b&&!g&&v!==0),de(([b,v])=>v),nr(1)),y),he(K(u,de(b=>({top:-b}))),e),ze(K(c,Ee(d,f),de(([b,{lastSize:v,groupIndices:g,sizeTree:T},w])=>{function E(C){return C*(v+w)}if(g.length===0)return E(b);{let C=0;const k=ii(T,0);let A=0,I=0;for(;A<b;){A++,C+=k;let j=g.length===I+1?1/0:g[I+1]-g[I]-1;A+j>b&&(C-=k,j=b-A+1),A+=j,C+=E(j),I++}return C}})),b=>{Se(n,b),requestAnimationFrame(()=>{Se(e,{top:b}),requestAnimationFrame(()=>{Se(n,0),Se(p,!1)})})}),{deviation:n}},et(Bt,Oi,no,jn,vr,$f)),Ij=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}),Oj=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}),Uf=je(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ae(),r=Ae(),o=Ae(),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)),_j=({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,Mj=je(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ae();return he(K(u,Ee(e,o,t,s,i,a,r),Ee(n),de(([[d,f,h,p,m,y,b,v],g])=>{const{done:T,behavior:w,align:E,calculateViewLocation:C=_j,...k}=d,A=Kx(d,f,p-1),I=ai(A,f.offsetTree,g)+m+y,j=I+pn(f.sizeTree,A)[1],O=v+y,L=v+h-b,P=C({itemTop:I,itemBottom:j,viewportTop:O,viewportBottom:L,locationParams:{behavior:w,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,Ii,no,vr),{singleton:!0}),Dj=je(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ae(),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,y,b,v,g])=>{const T=pj(p.sizeTree);y&&b!==null&&v!==null&&(m=b.scrollTop-v.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),he(K(u,ye(jf),de(Nj)),o),he(K(s,Ee(u),ye(([,h])=>h!==void 0),Je(),de(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},et(jn,Bt,_i,br,Uf));function Nj(e){return{offset:e.scrollTop,index:0,align:"start"}}const jj=je(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),et(Hf,Rj,br,tw,nw,Ij,Oj,Uf,Mj,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,y,b,{listState:v,topItemsIndexes:g,...T},{scrollToIndex:w},E,{topItemCount:C},{groupCounts:k},A])=>(he(T.rangeChanged,A.scrollSeekRangeChanged),he(K(A.windowViewportRect,de(I=>I.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:v,scrollToIndex:w,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...A,...m,sizes:d,...y}),et(jn,_i,Bt,Dj,Tj,no,Ii,Aj,Pj,Qx,jj)),Mc="-webkit-sticky",Rg="sticky",sw=rw(()=>{if(typeof document>"u")return Rg;const e=document.createElement("div");return e.style.position=Mc,e.style.position===Mc?Mc:Rg});function Gf(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}=Vf(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 Dl=x.createContext(void 0),iw=x.createContext(void 0);function Yf(e){return e}const Lj=je(()=>{const e=ne(l=>`Item ${l}`),t=ne(null),n=ne(l=>`Group ${l}`),r=ne({}),o=ne(Yf),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")}}),Fj=je(([e,t])=>({...e,...t}),et(ow,Lj)),Vj=({height:e})=>x.createElement("div",{style:{height:e}}),$j={position:sw(),zIndex:1,overflowAnchor:"none"},Bj={overflowAnchor:"none"},Pg=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:y}=$x(r,h,f,t?to:l,p,m,s),[b,v]=x.useState(0);Zf("deviation",P=>{b!==P&&v(P)});const g=Pe("EmptyPlaceholder"),T=Pe("ScrollSeekPlaceholder")||Vj,w=Pe("ListComponent"),E=Pe("ItemComponent"),C=Pe("GroupComponent"),k=Pe("computeItemKey"),A=Pe("isSeeking"),I=Pe("groupIndices").length>0,j=Pe("alignToBottom"),O=Pe("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:b!==0?b:j?"auto":0,...O?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?x.createElement(g,ct(g,u)):x.createElement(w,{...ct(w,u),ref:y,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const M=P.originalIndex,N=k(M+n.firstItemIndex,P.data,u);return A?x.createElement(T,{...ct(T,u),key:N,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?x.createElement(C,{...ct(C,u),key:N,"data-index":M,"data-known-size":P.size,"data-item-index":P.index,style:$j},d(P.index,u)):x.createElement(E,{...ct(E,u),...aw(E,P.data),key:N,"data-index":M,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:Bj},I?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),Wj={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"}:{}}),zj={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 Hj=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,ct(t,s))):null}),Uj=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,ct(t,s))):null});function qf({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:{...Wj,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ct(c,f)},i)})}function Kf({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:y,scrollToCallback:b}=Wx(l,u,c,to,h);return ej(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",b),t("scrollBy",y),x.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...ct(c,p)},i)})}const Gj=({children:e})=>{const t=x.useContext(Dl),n=nn("viewportHeight"),r=nn("fixedItemHeight"),o=Pe("alignToBottom"),s=Mn(x.useMemo(()=>oi(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)},Yj=({children:e})=>{const t=x.useContext(Dl),n=nn("windowViewportRect"),r=nn("fixedItemHeight"),o=Pe("customScrollParent"),s=Gf(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)},qj=({children:e})=>{const t=Pe("TopItemListComponent")||"div",n=Pe("headerHeight"),r={...zj,marginTop:`${n}px`},o=Pe("context");return x.createElement(t,{style:r,...ct(t,o)},e)},Kj=x.memo(function(t){const n=Pe("useWindowScroll"),r=Pe("topItemsIndexes").length>0,o=Pe("customScrollParent"),s=o||n?Qj:Xj,i=o||n?Yj:Gj;return x.createElement(s,{...t},r&&x.createElement(qj,null,x.createElement(Pg,{showTopList:!0})),x.createElement(i,null,x.createElement(Hj,null),x.createElement(Pg,null),x.createElement(Uj,null)))}),{Component:Zj,usePublisher:nn,useEmitterValue:Pe,useEmitter:Zf}=Ff(Fj,{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"}},Kj),Xj=qf({usePublisher:nn,useEmitterValue:Pe,useEmitter:Zf}),Qj=Kf({usePublisher:nn,useEmitterValue:Pe,useEmitter:Zf}),Xf=Zj,kg={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Jj={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Ag,ceil:Ig,floor:qa,min:Dc,max:Hs}=Math;function eL(e){return{...Jj,items:e}}function Og(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 tL(e,t){return e&&e.column===t.column&&e.row===t.row}function ta(e,t){return e&&e.width===t.width&&e.height===t.height}const nL=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:y,customScrollParent:b,windowScrollContainerState:v,windowScrollTo:g},T])=>{const w=ne(0),E=ne(0),C=ne(kg),k=ne({height:0,width:0}),A=ne({height:0,width:0}),I=Ae(),j=Ae(),O=ne(0),L=ne(null),P=ne({row:0,column:0}),M=Ae(),N=Ae(),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,A,k,V,_),ye(([F,B,H,Y,,Q])=>F&&!B&&H.height!==0&&Y.height!==0&&!Q)),([,,,,F])=>{Se(_,!0),Wf(1,()=>{Se(I,F)}),_n(K(r),()=>{Se(n,[0,0]),Se(z,!0)})}),he(K(N,ye(F=>F!=null&&F.scrollTop>0),xn(0)),E),ze(K(p,Ee(N),ye(([,F])=>F!=null)),([,F])=>{F&&(Se(k,F.viewport),Se(A,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,ta),be(A,ta),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(w),t,be(P,tL),be(A,ta),be(k,ta),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 kg;if(W===0){const Lt=zf(Le,F),xr=Lt===0?Math.max(ke-1,0):Lt;return eL(Og(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*qa((B+Te)/(se+Te)),Fe=pe*Ig((H+Te)/(se+Te))-1,Fe=Dc(F-1,Hs(Fe,pe-1)),ce=Dc(Fe,Hs(0,ce))):(ce=0,Fe=-1);const te=Og(ce,Fe,U),{top:ie,bottom:_e}=_g(ue,Y,Q,te),Ke=Ig(F/pe),It=Ke*se+(Ke-1)*Te-_e;return{items:te,offsetTop:ie,offsetBottom:It,top:ie,bottom:_e,itemHeight:se,itemWidth:W}})),C),he(K(L,ye(F=>F!==null),de(F=>F.length)),w),he(K(Tt(k,A,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}=_g(F,Y,B,H);return[Q,ue]}),Je(ci)),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(w,$),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(I,Ee(k,A,w,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,Dc(Y-1,Le));let Te=Gu(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:w,viewportDimensions:k,itemDimensions:A,scrollTop:r,scrollHeight:j,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:I,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:b,windowScrollContainerState:v,deviation:O,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:N,...f,initialTopMostItemIndex:V,gridState:C,totalListHeight:G,...d,startReached:re,endReached:Z,rangeChanged:ee,stateChanged:M,propsReady:h,stateRestoreInProgress:D,...T}},et(Hf,Bt,Oi,tw,br,Uf,vr));function _g(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Gu(e,t,n,r[0].index),i=Gu(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Gu(e,t,n,r){const o=lw(e.width,n.width,t.column),s=qa(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,qa((e+n)/(qa(t)+n)))}const rL=je(()=>{const e=ne(c=>`Item ${c}`),t=ne({}),n=ne(null),r=ne("virtuoso-grid-item"),o=ne("virtuoso-grid-list"),s=ne(Yf),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")}}),oL=je(([e,t])=>({...e,...t}),et(nL,rL)),sL=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"),y=Mn(x.useMemo(()=>b=>{const v=b.parentElement.parentElement.scrollHeight;a(v);const g=b.firstChild;if(g){const{width:T,height:w}=g.getBoundingClientRect();f({width:T,height:w})}h({row:Mg("row-gap",getComputedStyle(b).rowGap,p),column:Mg("column-gap",getComputedStyle(b).columnGap,p)})},[a,f,h,p]));return m?null:x.createElement(c,{ref:y,className:n,...ct(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(b=>{const v=s(b.index,b.data,d);return i?x.createElement(u,{key:v,...ct(u,d),index:b.index,height:t.itemHeight,width:t.itemWidth}):x.createElement(l,{...ct(l,d),className:r,"data-index":b.index,key:v},o(b.index,b.data,d))}))}),iL=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,ct(t,s))):null}),aL=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,ct(t,s))):null}),lL=({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)},cL=({children:e})=>{const t=x.useContext(iw),n=dn("windowViewportRect"),r=dn("itemDimensions"),o=nt("customScrollParent"),s=Gf(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)},uL=x.memo(function({...t}){const n=nt("useWindowScroll"),r=nt("customScrollParent"),o=r||n?fL:dL,s=r||n?cL:lL;return x.createElement(o,{...t},x.createElement(s,null,x.createElement(iL,null),x.createElement(sL,null),x.createElement(aL,null)))}),{Component:S$,usePublisher:dn,useEmitterValue:nt,useEmitter:cw}=Ff(oL,{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"}},uL),dL=qf({usePublisher:dn,useEmitterValue:nt,useEmitter:cw}),fL=Kf({usePublisher:dn,useEmitterValue:nt,useEmitter:cw});function Mg(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 hL=je(()=>{const e=ne(l=>x.createElement("td",null,"Item $",l)),t=ne(null),n=ne(null),r=ne(null),o=ne({}),s=ne(Yf),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")}}),mL=je(([e,t])=>({...e,...t}),et(ow,hL)),pL=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e}})),gL=({height:e})=>x.createElement("tr",null,x.createElement("td",{style:{height:e,padding:0,border:0}})),yL={overflowAnchor:"none"},vL=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);Qf("deviation",N=>{p!==N&&(h.current.style.marginTop=`${N}px`,m(N))});const y=Be("EmptyPlaceholder"),b=Be("ScrollSeekPlaceholder")||pL,v=Be("FillerRow")||gL,g=Be("TableBodyComponent"),T=Be("TableRowComponent"),w=Be("computeItemKey"),E=Be("isSeeking"),C=Be("paddingTopAddition"),k=Be("firstItemIndex"),A=Be("statefulTotalCount"),I=Be("context");if(A===0&&y)return x.createElement(y,ct(y,I));const j=t.offsetTop+C+p,O=t.offsetBottom,L=j>0?x.createElement(v,{height:j,key:"padding-top",context:I}):null,P=O>0?x.createElement(v,{height:O,key:"padding-bottom",context:I}):null,M=t.items.map(N=>{const D=N.originalIndex,V=w(D+k,N.data,I);return E?x.createElement(b,{...ct(b,I),key:V,index:N.index,height:N.size,type:N.type||"item"}):x.createElement(T,{...ct(T,I),...aw(T,N.data),key:V,"data-index":D,"data-known-size":N.size,"data-item-index":N.index,style:yL},l(N.index,N.data,I))});return x.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...ct(g,I)},[L,...M,P])}),bL=({children:e})=>{const t=x.useContext(Dl),n=fn("viewportHeight"),r=fn("fixedItemHeight"),o=Mn(x.useMemo(()=>oi(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)},xL=({children:e})=>{const t=x.useContext(Dl),n=fn("windowViewportRect"),r=fn("fixedItemHeight"),o=Be("customScrollParent"),s=Gf(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)},wL=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(()=>oi(o,v=>mn(v,"height")),[o])),u=Mn(x.useMemo(()=>oi(s,v=>mn(v,"height")),[s])),d=r||n?EL:TL,f=r||n?xL:bL,h=Be("TableComponent"),p=Be("TableHeadComponent"),m=Be("TableFooterComponent"),y=i?x.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ct(p,l)},i()):null,b=a?x.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ct(m,l)},a()):null;return x.createElement(d,{...t},x.createElement(f,null,x.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(h,l)},[y,x.createElement(vL,{key:"TableBody"}),b])))}),{Component:SL,usePublisher:fn,useEmitterValue:Be,useEmitter:Qf}=Ff(mL,{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"}},wL),TL=qf({usePublisher:fn,useEmitterValue:Be,useEmitter:Qf}),EL=Kf({usePublisher:fn,useEmitterValue:Be,useEmitter:Qf}),CL=SL,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(x.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(Gk,{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]}),Mi=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:y,hideLeft:b=!1,required:v,disabled:g,reportStatus:T},w)=>{const E=qO(),C=T!==void 0?T:E.input.iconFeedback,k=d??h,A=Et(),I=e??A.inputOptionalLabel;return S.jsxs("fieldset",{ref:w,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:y,children:I||n?S.jsxs(x.Fragment,{children:[v?null:S.jsx("span",{"aria-disabled":g,className:"text-opacity-70 aria-disabled:text-disabled",children:I}),n?S.jsx(x.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})]})}),RL=e=>S.jsx(x.Fragment,{children:e.children}),PL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},kL={caseSensitive:!1,sort:!1},AL=[],IL=x.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})})}),OL=x.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"})}),_L={List:IL,Item:OL},mo=300,Nc=40,ML=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 y=x.useRef(null),b=x.useRef(null),v=p.value??p.defaultValue??"",g=Et(),[T,w]=x.useState(()=>Math.min(mo,Nc*e.length)),[E,C]=x.useState(!1),[k,A]=x.useState(""),[I,j]=x.useState(v),[O,L]=x.useState(()=>{var q;return((q=e.find(se=>se.value===v))==null?void 0:q.label)??v}),[P,M]=x.useState(null),N=x.useRef(AL),D=t&&k!==""?[{value:k,label:k,"data-dynamic":"true"},...e]:e,V=new Mr(D,["value","label"],kL).search(k),z=()=>{C(!1),w(0)},_=V.filter(q=>q.hidden!==!0),$=t?void 0:`^(${e.map(q=>`${iu(q.value)}${q.label?"|"+iu(q.label):""}`).join("|")})$`;x.useEffect(()=>{if(p.value){const q=e.find(se=>se.value===p.value);j((q==null?void 0:q.label)??p.value)}},[p.value]),x.useEffect(()=>{E||w(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);w(J)},[k,E]);const{x:Z,y:re,strategy:ee,refs:G,context:F}=Qr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Ri,middleware:[Pi(4),lx({padding:10,elementContext:"reference",apply(q){var ce;const se=(ce=y.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<Nc?mo:J,mo);mi.flushSync(()=>setTimeout(()=>{const Fe=(W==null?void 0:W.getBoundingClientRect().height)??0;return Fe<Nc?void w(pe):void w(Math.min(Fe,mo))},50)),Object.assign(q.elements.floating.style,{width:`${se}px`,maxWidth:`${se}px`,maxHeight:`${mo}`})}})]}),B=Ex(F,PL),{getReferenceProps:H,getFloatingProps:Y,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),Nf(F,{cols:0,listRef:N,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:q=>M(se=>q??se)})]);x.useEffect(()=>{const q=G.reference.current;if(q)return vi(q)},[]);const ue=(q,se)=>{j(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(),A(""),M(se)},U=q=>{var W;const se=q.target.value;return A(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),A(""),(q=G.reference.current)==null||q.focus()},qe=()=>{C(!0),A("")},Le=()=>{var q;(q=G.reference.current)==null||q.setAttribute("data-value",""),A(""),j(""),L(""),xd(G.reference.current),z()},Te=p.id||p.name;return S.jsxs(Mi,{...p,left:d,error:f,ref:y,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right: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(rf,{size:20}),S.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),I?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("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":I,"data-error":!!f,"data-name":Te,"data-target":Te,required:h,value:E?k:O||I,"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||I||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)+(I?26:18),top:re??0}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[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(Xf,{ref:b,data:_,components:_L,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??RL,J=I===se.value||I===se.label,pe=P===q,ce=se.label??se.value;return S.jsx("button",{"data-value":se.value,...Q({ref:Fe=>void(N.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 Ao extends Map{constructor(t){super(t),this.list=[],this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Ao&&(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 Ao(this)}}const Jf=x.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})]})),DL=e=>S.jsx(x.Fragment,{children:e.children}),NL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},jL={caseSensitive:!1,sort:!1},Dg=[],LL=x.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})})}),FL=x.forwardRef(function({item:t,context:n,...r},o){return S.jsx(lt.li,{...r,ref:o,className:"last:rounded-t-lg"})}),VL={List:LL,Item:FL},$L=e=>{const t=Et(),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]),S.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?S.jsxs(Sd,{size:"small","data-multicounter":"true",children:[r," ",t.multiComboboxSelectedLabel]}):e.children})},BL=()=>{},WL=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},y)=>{const b=x.useMemo(()=>new Ao(r.map(W=>[W.value,W])),[r]),v=x.useRef(null),g=x.useRef(null),T=m.value??m.defaultValue??Dg,w=Et(),[E,C]=x.useState(0),[k,A]=x.useState(!1),[I,j]=x.useState(""),[O,L]=x.useState(()=>{const W=new Ao;return T.forEach(J=>{const pe=b.get(J);return pe?W.set(J,pe):void 0}),W}),P=x.useMemo(()=>Array.from(O.keys()),[O]),[M,N]=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),z=x.useRef(Dg),_=p&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...r]:r,$=new Mr(_,["value","label"],jL).search(I);x.useEffect(()=>{k||C(0)},[k]),x.useEffect(()=>{m.value&&L(new Ao(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:A,whileElementsMounted:Ri,middleware:[Pi(4),lx({padding:10,elementContext:"reference",apply(W){var ce;const J=(ce=v.current)==null?void 0:ce.getBoundingClientRect().width,pe=360;mi.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,NL),{getReferenceProps:H,getFloatingProps:Y,getItemProps:Q}=Jr([eo(F,{role:"listbox"}),Xr(F),Nf(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)})]);x.useEffect(()=>{const W=G.reference.current;if(W)return vi(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),N(te=>te.concat(W.label??"")),j(""),V(J)},U=W=>{const J=W.target.value;return j(J),!k&&J===""?A(!0):(W.target.name=m.name||"",J?A(!0):void 0)},ke=()=>{var W;A(!0),j(""),(W=G.reference.current)==null||W.focus()},qe=()=>{A(!0),j("")},Le=()=>{var W;(W=G.reference.current)==null||W.setAttribute("data-value",""),j(""),xd(G.reference.current),A(!1)},Te=m.id||m.name,q=O.map(W=>S.jsx(Sd,{size:"small",children:W.label??W.value},`multicombobox-${W.value}-x`)),se=$.filter(W=>W.hidden!==!0);return S.jsxs(Mi,{...m,left:e,error:t,ref:v,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(rf,{size:20}),S.jsx("span",{className:"sr-only",children:w.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?I: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($L,{label:c,children:q})}),S.jsx("input",{id:Te,name:Te,type:"hidden","data-origin":Te,ref:y,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:"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:I,onChange:U,title:m.title,placeholder:w.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(),A(!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||w.autocompleteEmpty})}):null,S.jsx(Xf,{ref:g,data:se,components:VL,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??DL,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:`focus:bg-floating-hover hover:bg-floating-hover w-full cursor-pointer p-2 text-left ${ce||Fe?"bg-floating-hover text-floating-foreground":""}`,children:S.jsx(Jf,{onChange:BL,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)=>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:y=null,hideLeft:b=!1,...v},g)=>{const T=e,w=v.id??v.name,E=x.useRef(null);return x.useEffect(()=>{if(E.current===null)return;const C=E.current,k=vi(E.current),A=r==null?void 0:r(C),I=j=>{const O=j;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",I),()=>{A==null||A(),k(),C.removeEventListener("keydown",I)}},[]),S.jsx(Mi,{...n,info:s,left:i,error:l,right:c,form:v.form,name:v.name,feedback:y,hideLeft:b,title:v.title,container:u,rightLabel:d,disabled:v.disabled,interactive:f,required:v.required,componentName:t,id:v.name||v.id,optionalText:h,labelClassName:m,placeholder:v.placeholder,children:S.jsx(T,{...n,...v,id:w,name:w,type:p,"data-next":a,"aria-busy":v.disabled,"aria-disabled":v.disabled,"aria-readonly":v.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",v.className)})})}),Di=dw(l0,"input",{type:"text"}),Ng=new Date(1970,11,31),jc={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},jg={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},zL={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")},Lc=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},HL=x.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||gf(),l=x.useId(),c=Et(),u=x.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=x.useState(e||void 0),[h,p]=x.useState(!1),m=Lc(u,Ng).flatMap(C=>Pt.keyof(jc,C.type)?jc[C.type](C.value):[]),y=Lc(u,Ng).reduce((C,k)=>C+(Pt.keyof(jg,k.type)?jg[k.type](k.value):""),""),[b,v]=x.useState(d?Lc(u,d).reduce((C,k)=>C+(Pt.keyof(jc,k.type)?zL[k.type](d,k.value):""),""):""),g=C=>{const k=C.target.value;if(v(k),m.length===k.length&&m.every((I,j)=>{const O=k.charAt(j);return typeof I=="string"?O===I:I.test(O)})){const I=zo(oO(k,y,new Date));return f(I),r==null?void 0:r(I)}return f(void 0),r==null?void 0:r(void 0)},T=C=>(f(C),r==null||r(C),v(C?sI(C,y):"")),w=Hb(d),E=w?d.toISOString():void 0;return S.jsx(Di,{...s,mask:m,value:b,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:g,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??y,right:S.jsxs(x.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(Hk,{})]}),buttonProps:{"aria-describedby":l},children:S.jsx(y0,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:w?d:void 0})})]})})}),UL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],GL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],YL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],qL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Lg=(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 Fg(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?qL:YL:t.binary?GL:UL,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=Lg(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=Lg(Number(e),t.locale,i),c=n[a];return s+l+r+c}var Yu={exports:{}},na={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 Fg;function qL(){if(Fg)return Fe;Fg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function g(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 Fe.AsyncMode=l,Fe.ConcurrentMode=c,Fe.ContextConsumer=a,Fe.ContextProvider=i,Fe.Element=t,Fe.ForwardRef=u,Fe.Fragment=r,Fe.Lazy=p,Fe.Memo=h,Fe.Portal=n,Fe.Profiler=s,Fe.StrictMode=o,Fe.Suspense=d,Fe.isAsyncMode=function(S){return T(S)||g(S)===l},Fe.isConcurrentMode=T,Fe.isContextConsumer=function(S){return g(S)===a},Fe.isContextProvider=function(S){return g(S)===i},Fe.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Fe.isForwardRef=function(S){return g(S)===u},Fe.isFragment=function(S){return g(S)===r},Fe.isLazy=function(S){return g(S)===p},Fe.isMemo=function(S){return g(S)===h},Fe.isPortal=function(S){return g(S)===n},Fe.isProfiler=function(S){return g(S)===s},Fe.isStrictMode=function(S){return g(S)===o},Fe.isSuspense=function(S){return g(S)===d},Fe.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===y||S.$$typeof===b||S.$$typeof===v||S.$$typeof===m)},Fe.typeOf=g,Fe}var Ve={};/** @license React v16.13.1
219
+ */var Vg;function KL(){if(Vg)return Ve;Vg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function g(w){if(typeof w=="object"&&w!==null){var E=w.$$typeof;switch(E){case t:switch(w=w.type,w){case l:case c:case r:case s:case o:case d:return w;default:switch(w=w&&w.$$typeof,w){case a:case u:case p:case h:case i:return w;default:return E}}case n:return E}}}function T(w){return g(w)===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(w){return T(w)||g(w)===l},Ve.isConcurrentMode=T,Ve.isContextConsumer=function(w){return g(w)===a},Ve.isContextProvider=function(w){return g(w)===i},Ve.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ve.isForwardRef=function(w){return g(w)===u},Ve.isFragment=function(w){return g(w)===r},Ve.isLazy=function(w){return g(w)===p},Ve.isMemo=function(w){return g(w)===h},Ve.isPortal=function(w){return g(w)===n},Ve.isProfiler=function(w){return g(w)===s},Ve.isStrictMode=function(w){return g(w)===o},Ve.isSuspense=function(w){return g(w)===d},Ve.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===s||w===o||w===d||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===h||w.$$typeof===i||w.$$typeof===a||w.$$typeof===u||w.$$typeof===y||w.$$typeof===b||w.$$typeof===v||w.$$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 Vg;function KL(){return Vg||(Vg=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function g(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===s||H===o||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===h||H.$$typeof===i||H.$$typeof===a||H.$$typeof===u||H.$$typeof===y||H.$$typeof===b||H.$$typeof===v||H.$$typeof===m)}function T(H){if(typeof H=="object"&&H!==null){var Ie=H.$$typeof;switch(Ie){case t:var De=H.type;switch(De){case l:case c:case r:case s:case o:case d:return De;default:var re=De&&De.$$typeof;switch(re){case a:case u:case p:case h:case i:return re;default:return Ie}}case n:return Ie}}}var S=l,E=c,C=a,k=i,I=t,A=u,j=r,O=p,L=h,P=n,D=s,N=o,M=d,V=!1;function z(H){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.")),_(H)||T(H)===l}function _(H){return T(H)===c}function $(H){return T(H)===a}function Z(H){return T(H)===i}function ee(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function J(H){return T(H)===u}function U(H){return T(H)===r}function F(H){return T(H)===p}function B(H){return T(H)===h}function W(H){return T(H)===n}function G(H){return T(H)===s}function Q(H){return T(H)===o}function ce(H){return T(H)===d}Ve.AsyncMode=S,Ve.ConcurrentMode=E,Ve.ContextConsumer=C,Ve.ContextProvider=k,Ve.Element=I,Ve.ForwardRef=A,Ve.Fragment=j,Ve.Lazy=O,Ve.Memo=L,Ve.Portal=P,Ve.Profiler=D,Ve.StrictMode=N,Ve.Suspense=M,Ve.isAsyncMode=z,Ve.isConcurrentMode=_,Ve.isContextConsumer=$,Ve.isContextProvider=Z,Ve.isElement=ee,Ve.isForwardRef=J,Ve.isFragment=U,Ve.isLazy=F,Ve.isMemo=B,Ve.isPortal=W,Ve.isProfiler=G,Ve.isStrictMode=Q,Ve.isSuspense=ce,Ve.isValidElementType=g,Ve.typeOf=T}()),Ve}var $g;function dw(){return $g||($g=1,process.env.NODE_ENV==="production"?ta.exports=qL():ta.exports=KL()),ta.exports}/*
226
+ */var $g;function ZL(){return $g||($g=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function g(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===y||U.$$typeof===b||U.$$typeof===v||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 w=l,E=c,C=a,k=i,A=t,I=u,j=r,O=p,L=h,P=n,M=s,N=o,D=d,V=!1;function z(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 Z(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 H(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=w,$e.ConcurrentMode=E,$e.ContextConsumer=C,$e.ContextProvider=k,$e.Element=A,$e.ForwardRef=I,$e.Fragment=j,$e.Lazy=O,$e.Memo=L,$e.Portal=P,$e.Profiler=M,$e.StrictMode=N,$e.Suspense=D,$e.isAsyncMode=z,$e.isConcurrentMode=_,$e.isContextConsumer=$,$e.isContextProvider=Z,$e.isElement=re,$e.isForwardRef=ee,$e.isFragment=G,$e.isLazy=F,$e.isMemo=B,$e.isPortal=H,$e.isProfiler=Y,$e.isStrictMode=Q,$e.isSuspense=ue,$e.isValidElementType=g,$e.typeOf=T}()),$e}var Bg;function fw(){return Bg||(Bg=1,process.env.NODE_ENV==="production"?na.exports=KL():na.exports=ZL()),na.exports}/*
227
227
  object-assign
228
228
  (c) Sindre Sorhus
229
229
  @license MIT
230
- */var Lc,Bg;function ZL(){if(Bg)return Lc;Bg=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 Lc=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},Lc}var Fc,Wg;function Jf(){if(Wg)return Fc;Wg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fc=e,Fc}var Vc,zg;function fw(){return zg||(zg=1,Vc=Function.call.bind(Object.prototype.hasOwnProperty)),Vc}var $c,Hg;function XL(){if(Hg)return $c;Hg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Jf(),n={},r=fw();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={})},$c=o,$c}var Bc,Ug;function QL(){if(Ug)return Bc;Ug=1;var e=dw(),t=ZL(),n=Jf(),r=fw(),o=XL(),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 Bc=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:v(),arrayOf:g,element:T(),elementType:S(),instanceOf:E,node:A(),objectOf:k,oneOf:C,oneOfType:I,shape:O,exact:L};function p(_,$){return _===$?_!==0||1/_===1/$:_!==_&&$!==$}function m(_,$){this.message=_,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function y(_){if(process.env.NODE_ENV!=="production")var $={},Z=0;function ee(U,F,B,W,G,Q,ce){if(W=W||f,Q=Q||B,ce!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ie=W+":"+B;!$[Ie]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+W+"`. 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."),$[Ie]=!0,Z++)}}return F[B]==null?U?F[B]===null?new m("The "+G+" `"+Q+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+G+" `"+Q+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:_(F,B,W,G,Q)}var J=ee.bind(null,!1);return J.isRequired=ee.bind(null,!0),J}function b(_){function $(Z,ee,J,U,F,B){var W=Z[ee],G=N(W);if(G!==_){var Q=M(W);return new m("Invalid "+U+" `"+F+"` of type "+("`"+Q+"` supplied to `"+J+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return y($)}function v(){return y(i)}function g(_){function $(Z,ee,J,U,F){if(typeof _!="function")return new m("Property `"+F+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var B=Z[ee];if(!Array.isArray(B)){var W=N(B);return new m("Invalid "+U+" `"+F+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an array."))}for(var G=0;G<B.length;G++){var Q=_(B,G,J,U,F+"["+G+"]",n);if(Q instanceof Error)return Q}return null}return y($)}function T(){function _($,Z,ee,J,U){var F=$[Z];if(!a(F)){var B=N(F);return new m("Invalid "+J+" `"+U+"` of type "+("`"+B+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return y(_)}function S(){function _($,Z,ee,J,U){var F=$[Z];if(!e.isValidElementType(F)){var B=N(F);return new m("Invalid "+J+" `"+U+"` of type "+("`"+B+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return y(_)}function E(_){function $(Z,ee,J,U,F){if(!(Z[ee]instanceof _)){var B=_.name||f,W=z(Z[ee]);return new m("Invalid "+U+" `"+F+"` of type "+("`"+W+"` supplied to `"+J+"`, expected ")+("instance of `"+B+"`."))}return null}return y($)}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 $(Z,ee,J,U,F){for(var B=Z[ee],W=0;W<_.length;W++)if(p(B,_[W]))return null;var G=JSON.stringify(_,function(ce,H){var Ie=M(H);return Ie==="symbol"?String(H):H});return new m("Invalid "+U+" `"+F+"` of value `"+String(B)+"` "+("supplied to `"+J+"`, expected one of "+G+"."))}return y($)}function k(_){function $(Z,ee,J,U,F){if(typeof _!="function")return new m("Property `"+F+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var B=Z[ee],W=N(B);if(W!=="object")return new m("Invalid "+U+" `"+F+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an object."));for(var G in B)if(r(B,G)){var Q=_(B,G,J,U,F+"."+G,n);if(Q instanceof Error)return Q}return null}return y($)}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 Z=_[$];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(Z)+" at index "+$+"."),i}function ee(J,U,F,B,W){for(var G=[],Q=0;Q<_.length;Q++){var ce=_[Q],H=ce(J,U,F,B,W,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&G.push(H.data.expectedType)}var Ie=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new m("Invalid "+B+" `"+W+"` supplied to "+("`"+F+"`"+Ie+"."))}return y(ee)}function A(){function _($,Z,ee,J,U){return P($[Z])?null:new m("Invalid "+J+" `"+U+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return y(_)}function j(_,$,Z,ee,J){return new m((_||"React class")+": "+$+" type `"+Z+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function O(_){function $(Z,ee,J,U,F){var B=Z[ee],W=N(B);if(W!=="object")return new m("Invalid "+U+" `"+F+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));for(var G in _){var Q=_[G];if(typeof Q!="function")return j(J,U,F,G,M(Q));var ce=Q(B,G,J,U,F+"."+G,n);if(ce)return ce}return null}return y($)}function L(_){function $(Z,ee,J,U,F){var B=Z[ee],W=N(B);if(W!=="object")return new m("Invalid "+U+" `"+F+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));var G=t({},Z[ee],_);for(var Q in G){var ce=_[Q];if(r(_,Q)&&typeof ce!="function")return j(J,U,F,Q,M(ce));if(!ce)return new m("Invalid "+U+" `"+F+"` key `"+Q+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Z[ee],null," ")+`
231
- Valid keys: `+JSON.stringify(Object.keys(_),null," "));var H=ce(B,Q,J,U,F+"."+Q,n);if(H)return H}return null}return y($)}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 Z=$.call(_),ee;if($!==_.entries){for(;!(ee=Z.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=Z.next()).done;){var J=ee.value;if(J&&!P(J[1]))return!1}}else return!1;return!0;default:return!1}}function D(_,$){return _==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function N(_){var $=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":D($,_)?"symbol":$}function M(_){if(typeof _>"u"||_===null)return""+_;var $=N(_);if($==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return $}function V(_){var $=M(_);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function z(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Bc}var Wc,Gg;function JL(){if(Gg)return Wc;Gg=1;var e=Jf();function t(){}function n(){}return n.resetWarningCache=t,Wc=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},Wc}if(process.env.NODE_ENV!=="production"){var eF=dw(),tF=!0;Gu.exports=QL()(eF.isElement,tF)}else Gu.exports=JL()();var nF=Gu.exports;const Ge=Jw(nF);var rF=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 Mi(e,t){var n=oF(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 oF(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=rF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var sF=[".DS_Store","Thumbs.db"];function iF(e){return ps(this,void 0,void 0,function(){return gs(this,function(t){return qa(e)&&aF(e.dataTransfer)?[2,dF(e.dataTransfer,e.type)]:lF(e)?[2,cF(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,uF(e)]:[2,[]]})})}function aF(e){return qa(e)}function lF(e){return qa(e)&&qa(e.target)}function qa(e){return typeof e=="object"&&e!==null}function cF(e){return Yu(e.target.files).map(function(t){return Mi(t)})}function uF(e){return ps(this,void 0,void 0,function(){var t;return gs(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 Mi(r)})]}})})}function dF(e,t){return ps(this,void 0,void 0,function(){var n,r;return gs(this,function(o){switch(o.label){case 0:return e.items?(n=Yu(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(fF))]):[3,2];case 1:return r=o.sent(),[2,Yg(hw(r))];case 2:return[2,Yg(Yu(e.files).map(function(s){return Mi(s)}))]}})})}function Yg(e){return e.filter(function(t){return sF.indexOf(t.name)===-1})}function Yu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function fF(e){if(typeof e.webkitGetAsEntry!="function")return qg(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?mw(t):qg(e)}function hw(e){return e.reduce(function(t,n){return Vu(Vu([],lg(t),!1),lg(Array.isArray(n)?hw(n):[n]),!1)},[])}function qg(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Mi(t);return Promise.resolve(n)}function hF(e){return ps(this,void 0,void 0,function(){return gs(this,function(t){return[2,e.isDirectory?mw(e):mF(e)]})})}function mw(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return ps(i,void 0,void 0,function(){var l,c,u;return gs(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(hF)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function mF(e){return ps(this,void 0,void 0,function(){return gs(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=Mi(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var pF=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 Kg(e){return vF(e)||yF(e)||gw(e)||gF()}function gF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
232
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vF(e){if(Array.isArray(e))return qu(e)}function Zg(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 Xg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zg(Object(n),!0).forEach(function(r){pw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ci(e,t){return wF(e)||xF(e,t)||gw(e,t)||bF()}function bF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
233
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gw(e,t){if(e){if(typeof e=="string")return qu(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 qu(e,t)}}function qu(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 xF(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 wF(e){if(Array.isArray(e))return e}var SF="file-invalid-type",TF="file-too-large",EF="file-too-small",CF="too-many-files",RF=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:SF,message:"File type must be ".concat(n)}},Qg=function(t){return{code:TF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Jg=function(t){return{code:EF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},PF={code:CF,message:"Too many files"};function yw(e,t){var n=e.type==="application/x-moz-file"||pF(e,t);return[n,n?null:RF(t)]}function vw(e,t,n){if(kr(e.size))if(kr(t)&&kr(n)){if(e.size>n)return[!1,Qg(n)];if(e.size<t)return[!1,Jg(t)]}else{if(kr(t)&&e.size<t)return[!1,Jg(t)];if(kr(n)&&e.size>n)return[!1,Qg(n)]}return[!0,null]}function kr(e){return e!=null}function kF(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=yw(l,n),u=ci(c,1),d=u[0],f=vw(l,r,o),h=ci(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function Ka(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function na(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 ey(e){e.preventDefault()}function IF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function AF(e){return e.indexOf("Edge/")!==-1}function OF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return IF(e)||AF(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!Ka(r)&&a&&a.apply(void 0,[r].concat(s)),Ka(r)})}}function _F(){return"showOpenFilePicker"in window}function DF(e){if(kr(e)){var t=Object.entries(e).filter(function(n){var r=ci(n,2),o=r[0],s=r[1],i=!0;return bw(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(xw))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=ci(r,2),s=o[0],i=o[1];return Xg(Xg({},n),{},pw({},s,i))},{});return[{description:"Files",accept:t}]}return e}function MF(e){if(kr(e))return Object.entries(e).reduce(function(t,n){var r=ci(n,2),o=r[0],s=r[1];return[].concat(Kg(t),[o],Kg(s))},[]).filter(function(t){return bw(t)||xw(t)}).join(",")}function NF(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function jF(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function bw(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function xw(e){return/^.*\.[\w]+$/.test(e)}var LF=["children"],FF=["open"],VF=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],$F=["refKey","onChange","onClick"];function BF(e){return HF(e)||zF(e)||ww(e)||WF()}function WF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
234
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function HF(e){if(Array.isArray(e))return Ku(e)}function zc(e,t){return YF(e)||GF(e,t)||ww(e,t)||UF()}function UF(){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 ww(e,t){if(e){if(typeof e=="string")return Ku(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 Ku(e,t)}}function Ku(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 GF(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 YF(e){if(Array.isArray(e))return e}function ty(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?ty(Object(n),!0).forEach(function(r){Zu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ty(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Za(e,t){if(e==null)return{};var n=qF(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 qF(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 eh=x.forwardRef(function(e,t){var n=e.children,r=Za(e,LF),o=Tw(r),s=o.open,i=Za(o,FF);return x.useImperativeHandle(t,function(){return{open:s}},[s]),x.createElement(x.Fragment,null,n(tt(tt({},i),{},{open:s})))});eh.displayName="Dropzone";var Sw={disabled:!1,getFilesFromEvent:iF,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};eh.defaultProps=Sw;eh.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 Xu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Tw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=tt(tt({},Sw),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,v=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,A=x.useMemo(function(){return MF(n)},[n]),j=x.useMemo(function(){return DF(n)},[n]),O=x.useMemo(function(){return typeof y=="function"?y:ny},[y]),L=x.useMemo(function(){return typeof m=="function"?m:ny},[m]),P=x.useRef(null),D=x.useRef(null),N=x.useReducer(KF,Xu),M=zc(N,2),V=M[0],z=M[1],_=V.isFocused,$=V.isFileDialogActive,Z=x.useRef(typeof window<"u"&&window.isSecureContext&&b&&_F()),ee=function(){!Z.current&&$&&setTimeout(function(){if(D.current){var ue=D.current.files;ue.length||(z({type:"closeDialog"}),L())}},300)};x.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[D,$,L,Z]);var J=x.useRef([]),U=function(ue){P.current&&P.current.contains(ue.target)||(ue.preventDefault(),J.current=[])};x.useEffect(function(){return g&&(document.addEventListener("dragover",ey,!1),document.addEventListener("drop",U,!1)),function(){g&&(document.removeEventListener("dragover",ey),document.removeEventListener("drop",U))}},[P,g]),x.useEffect(function(){return!r&&v&&P.current&&P.current.focus(),function(){}},[P,v,r]);var F=x.useCallback(function(te){k?k(te):console.error(te)},[k]),B=x.useCallback(function(te){te.preventDefault(),te.persist(),fe(te),J.current=[].concat(BF(J.current),[te.target]),na(te)&&Promise.resolve(o(te)).then(function(ue){if(!(Ka(te)&&!C)){var Me=ue.length,qe=Me>0&&kF({files:ue,accept:A,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),Ct=Me>0&&!qe;z({isDragAccept:qe,isDragReject:Ct,isDragActive:!0,type:"setDraggedFiles"}),c&&c(te)}}).catch(function(ue){return F(ue)})},[o,c,F,C,A,i,s,a,l,I]),W=x.useCallback(function(te){te.preventDefault(),te.persist(),fe(te);var ue=na(te);if(ue&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return ue&&d&&d(te),!1},[d,C]),G=x.useCallback(function(te){te.preventDefault(),te.persist(),fe(te);var ue=J.current.filter(function(qe){return P.current&&P.current.contains(qe)}),Me=ue.indexOf(te.target);Me!==-1&&ue.splice(Me,1),J.current=ue,!(ue.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),na(te)&&u&&u(te))},[P,u,C]),Q=x.useCallback(function(te,ue){var Me=[],qe=[];te.forEach(function(Ct){var At=yw(Ct,A),Lt=zc(At,2),xr=Lt[0],ro=Lt[1],oo=vw(Ct,i,s),Ni=zc(oo,2),jl=Ni[0],Ll=Ni[1],Fl=I?I(Ct):null;if(xr&&jl&&!Fl)Me.push(Ct);else{var Vl=[ro,Ll];Fl&&(Vl=Vl.concat(Fl)),qe.push({file:Ct,errors:Vl.filter(function(Kw){return Kw})})}}),(!a&&Me.length>1||a&&l>=1&&Me.length>l)&&(Me.forEach(function(Ct){qe.push({file:Ct,errors:[PF]})}),Me.splice(0)),z({acceptedFiles:Me,fileRejections:qe,type:"setFiles"}),f&&f(Me,qe,ue),qe.length>0&&p&&p(qe,ue),Me.length>0&&h&&h(Me,ue)},[z,a,A,i,s,l,f,h,p,I]),ce=x.useCallback(function(te){te.preventDefault(),te.persist(),fe(te),J.current=[],na(te)&&Promise.resolve(o(te)).then(function(ue){Ka(te)&&!C||Q(ue,te)}).catch(function(ue){return F(ue)}),z({type:"reset"})},[o,Q,F,C]),H=x.useCallback(function(){if(Z.current){z({type:"openDialog"}),O();var te={multiple:a,types:j};window.showOpenFilePicker(te).then(function(ue){return o(ue)}).then(function(ue){Q(ue,null),z({type:"closeDialog"})}).catch(function(ue){NF(ue)?(L(ue),z({type:"closeDialog"})):jF(ue)?(Z.current=!1,D.current?(D.current.value=null,D.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(ue)});return}D.current&&(z({type:"openDialog"}),O(),D.current.value=null,D.current.click())},[z,O,L,b,Q,F,j,a]),Ie=x.useCallback(function(te){!P.current||!P.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),H())},[P,H]),De=x.useCallback(function(){z({type:"focus"})},[]),re=x.useCallback(function(){z({type:"blur"})},[]),de=x.useCallback(function(){T||(OF()?setTimeout(H,0):H())},[T,H]),oe=function(ue){return r?null:ue},Y=function(ue){return S?null:oe(ue)},K=function(ue){return E?null:oe(ue)},fe=function(ue){C&&ue.stopPropagation()},pe=x.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=te.refKey,Me=ue===void 0?"ref":ue,qe=te.role,Ct=te.onKeyDown,At=te.onFocus,Lt=te.onBlur,xr=te.onClick,ro=te.onDragEnter,oo=te.onDragOver,Ni=te.onDragLeave,jl=te.onDrop,Ll=Za(te,VF);return tt(tt(Zu({onKeyDown:Y(gn(Ct,Ie)),onFocus:Y(gn(At,De)),onBlur:Y(gn(Lt,re)),onClick:oe(gn(xr,de)),onDragEnter:K(gn(ro,B)),onDragOver:K(gn(oo,W)),onDragLeave:K(gn(Ni,G)),onDrop:K(gn(jl,ce)),role:typeof qe=="string"&&qe!==""?qe:"presentation"},Me,P),!r&&!S?{tabIndex:0}:{}),Ll)}},[P,Ie,De,re,de,B,W,G,ce,S,E,r]),Ee=x.useCallback(function(te){te.stopPropagation()},[]),et=x.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=te.refKey,Me=ue===void 0?"ref":ue,qe=te.onChange,Ct=te.onClick,At=Za(te,$F),Lt=Zu({accept:A,multiple:a,type:"file",style:{display:"none"},onChange:oe(gn(qe,ce)),onClick:oe(gn(Ct,Ee)),tabIndex:-1},Me,D);return tt(tt({},Lt),At)}},[D,n,a,ce,r]);return tt(tt({},V),{},{isFocused:_&&!r,getRootProps:pe,getInputProps:et,rootRef:P,inputRef:D,open:oe(H)})}function KF(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({},Xu),{},{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({},Xu);default:return e}}function ny(){}const ZF={isImage:e=>e.type.includes("image")},XF=e=>{const[t,n]=x.useState({url:"",type:"",size:""});return x.useEffect(()=>{if(ZF.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Lg(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Lg(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(No,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx($o,{})})]}):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(jb,{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(No,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx($o,{className:"text-danger"})})]})},QF=e=>w.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>w.jsx(XF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),JF=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(QF,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(x.Fragment,{children:e.idle}),e2=w.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[w.jsx(Qk,{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"})]})]}),t2=({idle:e=e2,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}=Tw({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(JF,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},n2=["INPUT","SELECT"],Ew=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{n2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},r2=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})},o2=({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:$e("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),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 y=Et(),b=x.useRef(null),v=p.id??p.name;x.useImperativeHandle(m,()=>b.current),x.useEffect(()=>{if(b.current===null)return;const T=new AbortController,S=b.current,E=yi(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(_i,{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:v,children:w.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(nf,{size:20}),w.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:v,name:v,value:p.value,required:e,ref:vd(m,b),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",title:typeof p.title=="string"?p.title:void 0,className:$e("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[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:`${v}-select-option-${T.value}`}))]})})}),Qu=e=>{const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),t},s2=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=Qu(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:$e("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})]})}),i2=e=>{const[t,n]=Pk();return x.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:_k(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},a2=uw("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)}),l2=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},c2={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"})})},u2=e=>{const t=x.useRef(null),n=l2(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(Di,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(Zf,{height:n,useWindowScroll:!0,data:e.source,components:c2,itemContent:(r,o)=>w.jsx(x.Fragment,{children:w.jsx(Qf,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(No,{children:w.jsx(rf,{})})}),w.jsx("div",{})]})};var d2=Object.defineProperty,ry=Object.getOwnPropertySymbols,f2=Object.prototype.hasOwnProperty,h2=Object.prototype.propertyIsEnumerable,oy=(e,t,n)=>t in e?d2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m2=(e,t)=>{for(var n in t||(t={}))f2.call(t,n)&&oy(e,n,t[n]);if(ry)for(var n of ry(t))h2.call(t,n)&&oy(e,n,t[n]);return e},th=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},p2=(e,t,n,r)=>Ml(th,e,t,n,r),Zo=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||!Zo(e)&&!Zo(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>or(e[r],t[r]))},g2=(e,t)=>(Zo(e)||Array.isArray(e))&&t?e[t]:e,y2=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Xa=e=>/[0-9.]+/.test(e),sy=e=>["string","number"].includes(typeof e),iy=e=>e==null||(e==null?void 0:e.length)===0||e==="",ay={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:iy,notEmpty:e=>!iy(e),in:(e,t)=>th(t,n=>or(e,n)),notIn:(e,t)=>Cw(t,n=>!or(e,n))},v2=e=>{if(e in ay)return ay[e];throw new Error("Linq - Symbol not found")},Io=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},Ml=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=v2(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},b2=(e,t,n,r)=>Ml(Io,e,t,n,r),Cw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},x2=(e,t,n,r)=>Ml(Cw,e,t,n,r),Rw=e=>{if(e===null)return null;const t=m2({},e);return Object.keys(t).forEach(n=>t[n]=Zo(e[n])?Rw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},ly=(e,t)=>{if(Zo(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},w2=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},S2=e=>Io(e,(t,n,r)=>Zo(t)?n===r.findIndex(o=>or(o,t)):n===r.indexOf(t)),T2=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Pw=(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())},E2=(e,t)=>Pw(e,n=>n[t]),cy=(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},C2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},R2=(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 Xa(e)&&Xa(t)?r.map(i=>Number.parseInt(i)):r},Hc=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Xa(e)&&Xa(t)){const o=[],[s,i]=C2(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return R2(e,t,r)},P2=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Hc(r,o,1):Hc(r,s,Number.parseInt(o,10))}return sy(e)&&sy(t)?Hc(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Uc=(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},uy=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},k2=(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)},I2=(e,t,n,r)=>Ml(k2,e,t,n,r),dy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(y2(t))},kw=(e=>(e.Asc="asc",e.Desc="desc",e))(kw||{}),A2=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),O2=(e,t)=>e.sort(A2(t)),_2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Io(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},D2=class Ju{constructor(t=[]){this.array=t}static Range(...t){return P2(...t)}static New(t){return new Ju(t)}Where(t,n,r){return this.array=b2(this.array,t,n,r),this}Some(t,n,r){return p2(this.array,t,n,r)}All(t,n,r){return x2(this.array,t,n,r)}Reverse(){return this.array=uy(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=I2(this.array,t,n,r),this}Distinct(){return this.array=S2(this.array),this}First(t){return t===void 0?this.array[0]:T2(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?Uc((n,r)=>n+r,0,this.array):Uc((n,r)=>n+g2(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return E2(this.array,t)}GroupWith(t){return Pw(this.array,t)}Except(t){return Io(this.array,n=>!ly(t,n))}Intersect(t){return Io(this.array,n=>ly(t,n))}OrderBy(t,n){let r;return r=t?dy(this.array,t):this.array.toSorted(),this.array=n==="desc"?uy(r):r,this}Includes(t){return th(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 Uc(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(cy(this.array,n=>[t,n]))}Zip(t,n){return cy(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Io(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Ju(Rw(this.array))}ToObject(t){return w2(this.array,t)}Sort(t){return Array.isArray(t)?O2(this.array,t):dy(this.array,t)}Unique(t){return _2(this.array,t)}},Iw=D2,Ao={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,b)=>{try{Object.keys(y).forEach(b)}catch(v){window.console.log(v)}},n=y=>y==null,r=y=>{const b=typeof y;return b==="string"||b==="number"||b==="boolean"||n(y)},o=(y,b)=>{const v=b.getItem(y);try{return JSON.parse(v)}catch{return v??null}},s=y=>Object.keys(y).reduce((b,v)=>({...b,[v]:o(v,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,b)=>(y[decodeURIComponent(b[0].trim())]=decodeURIComponent(b[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(b=>b(y))},d=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const b=y.domain??"";return b===""?"":`domain=${y.multiDomain?".":""}${b}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],f={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(b=>b.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const b=f.json()[y];if(n(b))return null;try{return JSON.parse(decodeURIComponent(b))}catch{return b}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,b,v={})=>{const g=r(b)?b:encodeURIComponent(JSON.stringify(b)),T=d.reduce((S,E)=>{const C=E.parse(v);return C===""?S:S.concat(C)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=T,u()}},h=y=>{const b=new Set,v=g=>{y().removeItem(g);const T=s(y());b.forEach(S=>S(T))};return{delete:v,listener:g=>(b.add(g),()=>b.delete(g)),clearListeners:()=>b.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const T=y().getItem(g);return!n(T)},deleteAll:()=>{t(y(),v),b.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,T)=>{y().setItem(g,JSON.stringify(T)),b.forEach(S=>S(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Ao);const nh=e=>e.headerLabel??e.thead??e.id,rh=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Oo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Oo||{});const oh=e=>e.type==="number"?e.valueAsNumber:e.value,M2=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},N2={},j2=(e,t)=>{if(!Array.isArray(t))return e;const n=new Map(e.map(r=>[r.id,r]));return t.map(r=>{const o=n.get(r.id);return{...r,...o}})},L2=(e,t,n=N2)=>{const r=wa()?null:Ao.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=df({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:j2(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return wa()||Ao.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},ed=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??Oo.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:vi(),operation:l,label:nh(e),name:o,type:s,value:"",...r}},sh=()=>{const e=Et(),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(()=>({[Oo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Oo.Boolean]:[t.is,t.isNot],[Oo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},F2=e=>{const t=Et(),n=sh(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,ed(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 ed(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=oh(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return w.jsx(x.Fragment,{children:w.jsx(ms,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Yk,{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(Di,{"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($o,{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(of,{size:14})," ",t.tableFilterNewFilter]})})]})})})},V2=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=sh(),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=oh(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(Di,{"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($o,{className:"text-danger",size:14})})]})},$2=({item:e,onPointerDown:t})=>{const n=$r(0);return w.jsxs(_b,{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(Gk,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},B2=e=>{var l;const t=Et(),n=rh(e.cols),r=Ak(),[o,s]=x.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var y;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((y=u.options.item(f))==null?void 0:y.label)||"";s(h);const p=new Iw(e.rows).GroupBy(d),m=e.cols.find(b=>b.id===d);e.setGroups(HS(p).map((b,v)=>{const g=p[b];return{...m,groupId:vi(),groupKey:d,index:v,rows:g,groupName:b}}))},a=()=>e.setGroups([]);return w.jsx(x.Fragment,{children:w.jsxs(ms,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Xk,{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(No,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx($o,{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(zT,{children:w.jsx(Ob,{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($2,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},W2=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),z2=(e,t)=>e.toSorted(W2(t)),Aw=(e,t,n)=>({id:vi(),type:n,value:e.id,label:t}),H2=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,Aw(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(ms,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Mb,{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($o,{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(of,{size:14})," ",t.tableSortAddButton]})})]})})})},U2=e=>{const t=Et(),[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=Aw(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=nh(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(Wk,{size:14}):null,n==="desc"?w.jsx(Bk,{size:14}):null,n==="undefined"?w.jsx(Mb,{size:14}):null]})},G2=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(F2,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(H2,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(B2,{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=oh(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function Y2(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 q2=e=>{const t=x.useId(),n=Et(),r=e.asLink||"button",o=x.useMemo(()=>Y2(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]})})]})},K2={top:0,left:0,right:0,bottom:-1},Z2=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=sh(),a=r?qk:Kk,l=m=>{const y=m.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(v=>v.id!==y))},c=x.useCallback(m=>{if(m===null)return;const y=new AbortController;return m.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===kw.Asc?"ascending":"descending":"none",f=nh(e.header),h=$r(void 0);return w.jsxs(_b,{...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(ms,{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(V2,{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(ed(e.header,i.options,i.operations))),children:[w.jsx(of,{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(U2,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),w.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:K2,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,y)=>{const b=m.target,v=h.get()||b.getBoundingClientRect().width,g=y.delta.x;return h.set(Math.abs(v+g))}})]})},X2=e=>w.jsx(Ob,{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(Z2,{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}`))})}),Ow=x.createContext({}),Q2=()=>x.useContext(Ow),J2=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})})),eV=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??""}`})),tV=x.forwardRef(({context:e,...t},n)=>{const r=Q2(),o={...t==null?void 0:t.style,top:Pt.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})}),nV=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)??""}`})),rV=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),oV={TableHead:tV,Table:eV,TableBody:J2,TableRow:nV,TableFoot:rV},sV=[0,0,0,0,0,0,0,0,0,0],_w=w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),iV=(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?_w:w.jsx(v0,{})}),aV=(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=xd(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?_w:c?w.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):w.jsx(x.Fragment,{children:Pt.nil(l)?"":l}))})})},lV=()=>w.jsx(x.Fragment,{}),cV=[{}],fy=({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=Qu(i),m=Qu(u.loadingMore),y=x.useMemo(()=>{if(u.loading)return sV;if(c)return u.rows;const b=new Iw(u.rows);return t.length>0&&t.forEach(v=>v.value===""||Number.isNaN(v.value)?void 0:b.Where(v.name,v.operation.symbol,v.value)),r.length===0?b.Select():z2(b.Select(),r)},[u.rows,t,r,u.loading]);return x.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,v=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return v.observe(b),()=>v.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[w.jsx(EL,{useWindowScroll:!0,followOutput:"smooth",components:oV,totalCount:y.length,data:y.length===0?cV:y,fixedFooterContent:f?lV:null,itemContent:y.length===0?iV:aV,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>w.jsx(X2,{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(q2,{...l}):null]})},uV=(e,t)=>typeof t=="function"?t(e):t,ra=(e,t,n)=>e===t||n==null?void 0:n(t),dV=e=>{const t=x.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=x.useMemo(()=>rh(e.cols),[e.cols]),[o,s]=df({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:uV(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),ra((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),ra((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),ra((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),ra((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return w.jsx(Ow.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?w.jsx(G2,{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(fy,{...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(fy,{...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 fV=String.prototype.replace,hV=/%20/g,Gc={RFC1738:"RFC1738",RFC3986:"RFC3986"},ih={default:Gc.RFC3986,formatters:{RFC1738:function(e){return fV.call(e,hV,"+")},RFC3986:function(e){return String(e)}},RFC1738:Gc.RFC1738,RFC3986:Gc.RFC3986},mV=ih,Yc=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}(),pV=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},gV=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)||!Yc.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(Yc.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 Yc.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},yV=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},vV=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}},qc=1024,bV=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+=qc){for(var c=i.length>=qc?i.slice(l,l+qc):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===mV.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},xV=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 pV(n),t},wV=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},SV=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},TV=function(t,n){return[].concat(t,n)},EV=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)},Mw={arrayToObject:Dw,assign:yV,combine:TV,compact:xV,decode:vV,encode:bV,isBuffer:SV,isRegExp:wV,maybeMap:EV,merge:gV},Nw=VS,ga=Mw,Hs=ih,CV=Object.prototype.hasOwnProperty,jw={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},vn=Array.isArray,RV=Array.prototype.push,Lw=function(e,t){RV.apply(e,vn(t)?t:[t])},PV=Date.prototype.toISOString,hy=Hs.default,yt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ga.encode,encodeValuesOnly:!1,format:hy,formatter:Hs.formatters[hy],indices:!1,serializeDate:function(t){return PV.call(t)},skipNulls:!1,strictNullHandling:!1},kV=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Kc={},IV=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,y,b,v){for(var g=t,T=v,S=0,E=!1;(T=T.get(Kc))!==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(Kc)>"u"&&(S=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&vn(g)&&(g=ga.maybeMap(g,function(_){return _ instanceof Date?h(_):_})),g===null){if(i)return c&&!y?c(n,yt.encoder,b,"key",p):n;g=""}if(kV(g)||ga.isBuffer(g)){if(c){var k=y?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))y&&c&&(g=ga.maybeMap(g,c)),A=[{value:g.length>0?g.join(",")||null:void 0}];else if(vn(u))A=u;else{var j=Object.keys(g);A=d?j.sort(d):j}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 D=A[P],N=typeof D=="object"&&typeof D.value<"u"?D.value:g[D];if(!(a&&N===null)){var M=f&&l?D.replace(/\./g,"%2E"):D,V=vn(g)?typeof r=="function"?r(L,M):L:L+(f?"."+M:"["+M+"]");v.set(t,S);var z=Nw();z.set(Kc,v),Lw(I,e(N,V,r,o,s,i,a,l,r==="comma"&&y&&vn(g)?null:c,u,d,f,h,p,m,y,b,z))}}return I},AV=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=Hs.default;if(typeof t.format<"u"){if(!CV.call(Hs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Hs.formatters[r],s=yt.filter;(typeof t.filter=="function"||vn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in jw?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}},OV=function(e,t){var n=e,r=AV(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=jw[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=Nw(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||Lw(i,IV(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:""},Xo=Mw,td=Object.prototype.hasOwnProperty,_V=Array.isArray,dt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Xo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},DV=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Fw=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},MV="utf8=%26%2310003%3B",NV="utf8=%E2%9C%93",jV=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]===NV?c="utf-8":i[l]===MV&&(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=Xo.maybeMap(Fw(u.slice(f+1),n),function(y){return n.decoder(y,dt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=DV(p)),u.indexOf("[]=")>-1&&(p=_V(p)?[p]:p);var m=td.call(r,h);m&&n.duplicates==="combine"?r[h]=Xo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},LV=function(e,t,n,r){for(var o=r?t:Fw(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},FV=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&&td.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&&td.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),LV(u,n,r,o)}},VV=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"||Xo.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}},$V=function(e,t){var n=VV(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?jV(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=FV(a,r[a],n,typeof e=="string");o=Xo.merge(o,l,n)}return n.allowSparse===!0?o:Xo.compact(o)},BV=OV,WV=$V,zV=ih,HV={formats:zV,parse:WV,stringify:BV},_e;(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})(_e||(_e={}));var my;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(my||(my={}));const ae=_e.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 ae.undefined;case"string":return ae.string;case"number":return isNaN(e)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(e)?ae.array:e===null?ae.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ae.promise:typeof Map<"u"&&e instanceof Map?ae.map:typeof Set<"u"&&e instanceof Set?ae.set:typeof Date<"u"&&e instanceof Date?ae.date:ae.object;default:return ae.unknown}},X=_e.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,_e.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 ui=(e,t)=>{let n;switch(e.code){case X.invalid_type:e.received===ae.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_e.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${_e.joinValues(e.keys,", ")}`;break;case X.invalid_union:n="Invalid input";break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_e.joinValues(e.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${_e.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}"`:_e.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,_e.assertNever(e)}return{message:n}};let UV=ui;function nd(){return UV}const rd=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 se(e,t){const n=nd(),r=rd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ui?void 0:ui].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 be;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return $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 be;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const be=Object.freeze({status:"aborted"}),Is=e=>({status:"dirty",value:e}),Ut=e=>({status:"valid",value:e}),py=e=>e.status==="aborted",gy=e=>e.status==="dirty",Qa=e=>e.status==="valid",Ja=e=>typeof Promise<"u"&&e instanceof Promise;function el(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 Vw(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 he;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(he||(he={}));var As,Os;class Mn{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 yy=(e,t)=>{if(Qa(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 we(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 Re{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(Ja(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 yy(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(Ja(o)?o:Promise.resolve(o));return yy(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:ye.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 fi.create(this,this._def)}or(t){return rl.create([this,t],this._def)}and(t){return ol.create(this,t,this._def)}transform(t){return new Gn({...we(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new cl({...we(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new zw({typeName:ye.ZodBranded,type:this,...we(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ul({...we(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Nl.create(this,t)}readonly(){return dl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const GV=/^c[^\s-]{8,}$/i,YV=/^[0-9a-z]+$/,qV=/^[0-9A-HJKMNP-TV-Z]{26}$/,KV=/^[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,ZV=/^[a-z0-9_-]{21}$/i,XV=/^[-+]?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)?)??$/,QV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zc;const e$=/^(?:(?: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])$/,t$=/^(([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})))$/,n$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$w="((\\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])))",r$=new RegExp(`^${$w}$`);function Bw(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function o$(e){return new RegExp(`^${Bw(e)}$`)}function s$(e){let t=`${$w}T${Bw(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 i$(e,t){return!!((t==="v4"||!t)&&e$.test(e)||(t==="v6"||!t)&&t$.test(e))}class Vn extends Re{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ae.string){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_type,expected:ae.string,received:s.parsedType}),be}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),se(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),se(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?se(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&se(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")QV.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"email",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Zc||(Zc=new RegExp(JV,"u")),Zc.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"emoji",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")KV.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"uuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")ZV.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"nanoid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")GV.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"cuid",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")YV.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"cuid2",code:X.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")qV.test(t.data)||(o=this._getOrReturnCtx(t,o),se(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),se(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),se(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),se(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),se(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),se(o,{code:X.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?s$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:X.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?r$.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:X.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?o$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:X.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?XV.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"duration",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?i$(t.data,s.version)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"ip",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?n$.test(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{validation:"base64",code:X.invalid_string,message:s.message}),r.dirty()):_e.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,...he.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...he.errToObj(t)})}url(t){return this._addCheck({kind:"url",...he.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...he.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...he.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...he.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...he.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...he.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...he.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...he.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...he.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,...he.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,...he.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...he.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...he.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...he.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...he.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...he.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...he.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...he.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...he.errToObj(n)})}nonempty(t){return this.min(1,he.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:ye.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...we(e)})};function a$(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 Re{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)!==ae.number){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_type,expected:ae.number,received:s.parsedType}),be}let r;const o=new $t;for(const s of this._def.checks)s.kind==="int"?_e.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),se(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),se(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),se(r,{code:X.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?a$(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),se(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),se(r,{code:X.not_finite,message:s.message}),o.dirty()):_e.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,he.toString(n))}gt(t,n){return this.setLimit("min",t,!1,he.toString(n))}lte(t,n){return this.setLimit("max",t,!0,he.toString(n))}lt(t,n){return this.setLimit("max",t,!1,he.toString(n))}setLimit(t,n,r,o){return new Ur({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:he.toString(o)}]})}_addCheck(t){return new Ur({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:he.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:he.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:he.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.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"&&_e.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:ye.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...we(e)});class Qo extends Re{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)!==ae.bigint){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_type,expected:ae.bigint,received:s.parsedType}),be}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),se(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),se(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),se(r,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):_e.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,he.toString(n))}gt(t,n){return this.setLimit("min",t,!1,he.toString(n))}lte(t,n){return this.setLimit("max",t,!0,he.toString(n))}lt(t,n){return this.setLimit("max",t,!1,he.toString(n))}setLimit(t,n,r,o){return new Qo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:he.toString(o)}]})}_addCheck(t){return new Qo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:he.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Qo.create=e=>{var t;return new Qo({checks:[],typeName:ye.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...we(e)})};class od extends Re{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ae.boolean){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.boolean,received:r.parsedType}),be}return Ut(t.data)}}od.create=e=>new od({typeName:ye.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...we(e)});class di extends Re{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ae.date){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_type,expected:ae.date,received:s.parsedType}),be}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return se(s,{code:X.invalid_date}),be}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),se(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),se(o,{code:X.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):_e.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new di({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:he.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:he.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}}di.create=e=>new di({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ye.ZodDate,...we(e)});class sd extends Re{_parse(t){if(this._getType(t)!==ae.symbol){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.symbol,received:r.parsedType}),be}return Ut(t.data)}}sd.create=e=>new sd({typeName:ye.ZodSymbol,...we(e)});class tl extends Re{_parse(t){if(this._getType(t)!==ae.undefined){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.undefined,received:r.parsedType}),be}return Ut(t.data)}}tl.create=e=>new tl({typeName:ye.ZodUndefined,...we(e)});class nl extends Re{_parse(t){if(this._getType(t)!==ae.null){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.null,received:r.parsedType}),be}return Ut(t.data)}}nl.create=e=>new nl({typeName:ye.ZodNull,...we(e)});class id extends Re{constructor(){super(...arguments),this._any=!0}_parse(t){return Ut(t.data)}}id.create=e=>new id({typeName:ye.ZodAny,...we(e)});class _o extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ut(t.data)}}_o.create=e=>new _o({typeName:ye.ZodUnknown,...we(e)});class ur extends Re{_parse(t){const n=this._getOrReturnCtx(t);return se(n,{code:X.invalid_type,expected:ae.never,received:n.parsedType}),be}}ur.create=e=>new ur({typeName:ye.ZodNever,...we(e)});class ad extends Re{_parse(t){if(this._getType(t)!==ae.undefined){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.void,received:r.parsedType}),be}return Ut(t.data)}}ad.create=e=>new ad({typeName:ye.ZodVoid,...we(e)});class An extends Re{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ae.array)return se(n,{code:X.invalid_type,expected:ae.array,received:n.parsedType}),be;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(se(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&&(se(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&&(se(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 Mn(n,i,n.path,a)))).then(i=>$t.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Mn(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:he.toString(n)}})}max(t,n){return new An({...this._def,maxLength:{value:t,message:he.toString(n)}})}length(t,n){return new An({...this._def,exactLength:{value:t,message:he.toString(n)}})}nonempty(t){return this.min(1,t)}}An.create=(e,t)=>new An({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...we(t)});function po(e){if(e instanceof at){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$n.create(po(r))}return new at({...e._def,shape:()=>t})}else return e instanceof An?new An({...e._def,type:po(e.element)}):e instanceof $n?$n.create(po(e.unwrap())):e instanceof Yr?Yr.create(po(e.unwrap())):e instanceof Un?Un.create(e.items.map(t=>po(t))):e}class at extends Re{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=_e.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ae.object){const c=this._getOrReturnCtx(t);return se(c,{code:X.invalid_type,expected:ae.object,received:c.parsedType}),be}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof 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 Mn(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&&(se(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 Mn(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 he.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=he.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:ye.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new at({...this._def,catchall:t})}pick(t){const n={};return _e.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 _e.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new at({...this._def,shape:()=>n})}deepPartial(){return po(this)}partial(t){const n={};return _e.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 _e.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 Ww(_e.objectKeys(this.shape))}}at.create=(e,t)=>new at({shape:()=>e,unknownKeys:"strip",catchall:ur.create(),typeName:ye.ZodObject,...we(t)});at.strictCreate=(e,t)=>new at({shape:()=>e,unknownKeys:"strict",catchall:ur.create(),typeName:ye.ZodObject,...we(t)});at.lazycreate=(e,t)=>new at({shape:e,unknownKeys:"strip",catchall:ur.create(),typeName:ye.ZodObject,...we(t)});class rl extends Re{_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 se(n,{code:X.invalid_union,unionErrors:i}),be}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new rn(l));return se(n,{code:X.invalid_union,unionErrors:a}),be}}get options(){return this._def.options}}rl.create=(e,t)=>new rl({options:e,typeName:ye.ZodUnion,...we(t)});const Fn=e=>e instanceof il?Fn(e.schema):e instanceof Gn?Fn(e.innerType()):e instanceof al?[e.value]:e instanceof Gr?e.options:e instanceof ll?_e.objectValues(e.enum):e instanceof cl?Fn(e._def.innerType):e instanceof tl?[void 0]:e instanceof nl?[null]:e instanceof $n?[void 0,...Fn(e.unwrap())]:e instanceof Yr?[null,...Fn(e.unwrap())]:e instanceof zw||e instanceof dl?Fn(e.unwrap()):e instanceof ul?Fn(e._def.innerType):[];class ah extends Re{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ae.object)return se(n,{code:X.invalid_type,expected:ae.object,received:n.parsedType}),be;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(se(n,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=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 ah({typeName:ye.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...we(r)})}}function ld(e,t){const n=Ar(e),r=Ar(t);if(e===t)return{valid:!0,data:e};if(n===ae.object&&r===ae.object){const o=_e.objectKeys(t),s=_e.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=ld(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ae.array&&r===ae.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=ld(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ae.date&&r===ae.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ol extends Re{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(py(s)||py(i))return be;const a=ld(s.value,i.value);return a.valid?((gy(s)||gy(i))&&n.dirty(),{status:n.value,value:a.data}):(se(r,{code:X.invalid_intersection_types}),be)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ol.create=(e,t,n)=>new ol({left:e,right:t,typeName:ye.ZodIntersection,...we(n)});class Un extends Re{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ae.array)return se(r,{code:X.invalid_type,expected:ae.array,received:r.parsedType}),be;if(r.data.length<this._def.items.length)return se(r,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&r.data.length>this._def.items.length&&(se(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 Mn(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:ye.ZodTuple,rest:null,...we(t)})};class sl extends Re{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!==ae.object)return se(r,{code:X.invalid_type,expected:ae.object,received:r.parsedType}),be;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Mn(r,a,r.path,a)),value:i._parse(new Mn(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 Re?new sl({keyType:t,valueType:n,typeName:ye.ZodRecord,...we(r)}):new sl({keyType:Vn.create(),valueType:t,typeName:ye.ZodRecord,...we(n)})}}class cd extends Re{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!==ae.map)return se(r,{code:X.invalid_type,expected:ae.map,received:r.parsedType}),be;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Mn(r,a,r.path,[c,"key"])),value:s._parse(new Mn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}cd.create=(e,t,n)=>new cd({valueType:t,keyType:e,typeName:ye.ZodMap,...we(n)});class Jo extends Re{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ae.set)return se(r,{code:X.invalid_type,expected:ae.set,received:r.parsedType}),be;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(se(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&&(se(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 be;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Mn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Jo({...this._def,minSize:{value:t,message:he.toString(n)}})}max(t,n){return new Jo({...this._def,maxSize:{value:t,message:he.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Jo.create=(e,t)=>new Jo({valueType:e,minSize:null,maxSize:null,typeName:ye.ZodSet,...we(t)});class Us extends Re{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ae.function)return se(n,{code:X.invalid_type,expected:ae.function,received:n.parsedType}),be;function r(a,l){return rd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nd(),ui].filter(c=>!!c),issueData:{code:X.invalid_arguments,argumentsError:l}})}function o(a,l){return rd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nd(),ui].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 fi){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 Us({...this._def,args:Un.create(t).rest(_o.create())})}returns(t){return new Us({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Us({args:t||Un.create([]).rest(_o.create()),returns:n||_o.create(),typeName:ye.ZodFunction,...we(r)})}}class il extends Re{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})}}il.create=(e,t)=>new il({getter:e,typeName:ye.ZodLazy,...we(t)});class al extends Re{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return se(n,{received:n.data,code:X.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:t.data}}get value(){return this._def.value}}al.create=(e,t)=>new al({value:e,typeName:ye.ZodLiteral,...we(t)});function Ww(e,t){return new Gr({values:e,typeName:ye.ZodEnum,...we(t)})}class Gr extends Re{constructor(){super(...arguments),As.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return se(n,{expected:_e.joinValues(r),received:n.parsedType,code:X.invalid_type}),be}if(el(this,As)||Vw(this,As,new Set(this._def.values)),!el(this,As).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return se(n,{received:n.data,code:X.invalid_enum_value,options:r}),be}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})}}As=new WeakMap;Gr.create=Ww;class ll extends Re{constructor(){super(...arguments),Os.set(this,void 0)}_parse(t){const n=_e.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ae.string&&r.parsedType!==ae.number){const o=_e.objectValues(n);return se(r,{expected:_e.joinValues(o),received:r.parsedType,code:X.invalid_type}),be}if(el(this,Os)||Vw(this,Os,new Set(_e.getValidEnumValues(this._def.values))),!el(this,Os).has(t.data)){const o=_e.objectValues(n);return se(r,{received:r.data,code:X.invalid_enum_value,options:o}),be}return Ut(t.data)}get enum(){return this._def.values}}Os=new WeakMap;ll.create=(e,t)=>new ll({values:e,typeName:ye.ZodNativeEnum,...we(t)});class fi extends Re{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ae.promise&&n.common.async===!1)return se(n,{code:X.invalid_type,expected:ae.promise,received:n.parsedType}),be;const r=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return Ut(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fi.create=(e,t)=>new fi({type:e,typeName:ye.ZodPromise,...we(t)});class Gn extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{se(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return be;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?be:l.status==="dirty"||n.value==="dirty"?Is(l.value):l});{if(n.value==="aborted")return be;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?be:a.status==="dirty"||n.value==="dirty"?Is(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?be:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?be:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Qa(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=>Qa(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);_e.assertNever(o)}}Gn.create=(e,t,n)=>new Gn({schema:e,typeName:ye.ZodEffects,effect:t,...we(n)});Gn.createWithPreprocess=(e,t,n)=>new Gn({schema:t,effect:{type:"preprocess",transform:e},typeName:ye.ZodEffects,...we(n)});class $n extends Re{_parse(t){return this._getType(t)===ae.undefined?Ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$n.create=(e,t)=>new $n({innerType:e,typeName:ye.ZodOptional,...we(t)});class Yr extends Re{_parse(t){return this._getType(t)===ae.null?Ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yr.create=(e,t)=>new Yr({innerType:e,typeName:ye.ZodNullable,...we(t)});class cl extends Re{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ae.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}cl.create=(e,t)=>new cl({innerType:e,typeName:ye.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...we(t)});class ul extends Re{_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 Ja(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}}ul.create=(e,t)=>new ul({innerType:e,typeName:ye.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...we(t)});class ud extends Re{_parse(t){if(this._getType(t)!==ae.nan){const r=this._getOrReturnCtx(t);return se(r,{code:X.invalid_type,expected:ae.nan,received:r.parsedType}),be}return{status:"valid",value:t.data}}}ud.create=e=>new ud({typeName:ye.ZodNaN,...we(e)});class zw extends Re{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Nl extends Re{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?be:s.status==="dirty"?(n.dirty(),Is(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?be:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Nl({in:t,out:n,typeName:ye.ZodPipeline})}}class dl extends Re{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Qa(o)&&(o.value=Object.freeze(o.value)),o);return Ja(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}dl.create=(e,t)=>new dl({innerType:e,typeName:ye.ZodReadonly,...we(t)});at.lazycreate;var ye;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ye||(ye={}));Vn.create;Ur.create;ud.create;Qo.create;od.create;di.create;sd.create;tl.create;nl.create;id.create;_o.create;ur.create;ad.create;An.create;at.create;at.strictCreate;rl.create;ah.create;ol.create;Un.create;sl.create;cd.create;Jo.create;Us.create;il.create;al.create;Gr.create;ll.create;fi.create;Gn.create;$n.create;Yr.create;Gn.createWithPreprocess;Nl.create;const l$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},c$=(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]}}},Hw=e=>e.replace(/\[(\d+)]/g,".$1").split("."),sn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):Hw(t),o=structuredClone(e);return c$(o,r,n),o},u$=(e,t)=>e.localeCompare(t),Cs={},Uw=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return Gw(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=Uw(e._def.innerType);return t==="ZodArray"?n??[]:n}},Gw=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,Uw(n)])),Yw=(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]=Yw(s,o):n[r]=o||s)}return n},d$={sort:u$,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},qw=e=>{const t=new FormData(e),n=new URLSearchParams(t);return HV.parse(n.toString(),d$)},Pr=(e,t)=>Hw(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"),Xc=e=>{const t=e.dataset.target;if(!t)return er(e);const n=document.querySelector(`[data-origin="${t}"]`);return er(n||e)},f$={state:{},loading:!1,useOnChange:!1},vy=e=>e.dataset.target||e.name,h$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Ao.LocalStorage.get(t);return l$(n)?n:{}},clear:()=>void Ao.LocalStorage.delete(t),set:n=>Ao.LocalStorage.set(t,n)}},m$=(e,t,n=f$)=>{const[r,o]=x.useState(null),s=x.useRef({}),[i,a]=x.useState(()=>Pt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??Gw(e)??{}),l=x.useCallback(v=>{var I;const g=v.target,T=v.currentTarget;if(g.dataset.optional==="true")return;const E=vy(g),C=Xc(g)||(T?er(T):""),k=Pr(E,e);if(g.setAttribute("data-initialized","true"),k){const A=k.safeParse(C),j=A.success?void 0:((I=A.error.issues[0])==null?void 0:I.message)??"";o(O=>sn(O??{},E,j))}},[]),c=x.useCallback(v=>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 j=(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,j)},{}),E=Pt.empty(S)?null:S;o(E),console.error(E),v==null||v({form:T,errors:E||{}})},[]),u=(v,g=Cs)=>{const T=Pr(v,e),S=E=>{var k;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(I=>sn(I,v,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)};return{...g,loading:n.loading,name:v,id:v,onChange:S,form:t,date:Pt.string(i[v])?new Date(i[v]):i[v],required:g.required??!T.isOptional(),error:r==null?void 0:r[v],ref:E=>{E!==null&&(s.current[v]={element:E,schema:T})}}},d=(v,g=Cs)=>{const T=Pr(v,e);return{...g,name:v,id:v,onChange:E=>{var k;const C=E.target.value;a(I=>sn(I,v,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,v,void 0),value:wr(i,v,void 0)||"",required:g.required??!T.isOptional(),ref:E=>E!==null?s.current[v]={element:E,schema:T}:void 0}},f=(v,g=Cs)=>{const T=Pr(v,e);return{...g,name:v,id:v,onChange:E=>{var k;const C=E.target.checked;a(I=>sn(I??{},v,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,v,void 0),required:g.required??!T.isOptional(),ref:E=>E!==null?void(s.current[v]={element:E,schema:T}):void 0}},h=(v,g=Cs)=>{const T=Pr(v,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,v,C))};return{...g,loading:n.loading,name:v,id:v,onChange:S,form:t,onInvalid:l,error:wr(r,v,void 0),required:g.required??!T.isOptional(),value:wr(i,v,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[v]={element:E,schema:T}}},p=(v,g=Cs)=>{const T=Pr(v,e),S=T._def.typeName==="ZodNumber";return{...g,name:v,id:v,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(j=>sn(j,v,k))},form:t,loading:n.loading,onInvalid:l,error:wr(r,v,void 0),required:g.required??!T.isOptional(),type:S?"number":(g==null?void 0:g.type)??"text",value:wr(i,v,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[v]={element:C,schema:T})}};x.useEffect(()=>{const v=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=j=>{var N;const O=vy(j.target);if(!O)return!1;const L=j.target,P=Xc(j.target)||(j.relatedTarget?er(j.relatedTarget):""),D=T.schema.safeParse(P);if(L.setAttribute("value",P),D.success)return S.setCustomValidity(""),o(M=>{if(Pt.null(M))return null;const V=sn(M,O,void 0);return Pt.empty(M)||Pt.nil(M)||Pt.empty(V)?null:V}),!1;if(S.required){const M=((N=D.error.issues[0])==null?void 0:N.message)||"";S.setCustomValidity(M),o(V=>{if(Pt.null(V))return null;const z=sn(V,O,M||void 0);return Pt.empty(z)?null:z})}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 v.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>v.forEach(T=>T.unsubscribe())});const m=v=>g=>{var A;g.preventDefault();const T=g.currentTarget;let S=qw(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(j=>{if(j.tagName==="SELECT"){const O=j;S=sn(S,O.name,O.value)}if(j.tagName==="INPUT"){const O=j,L=Xc(O)||(O?er(O):"");S=sn(S,O.dataset.target||O.name,L)}});const C=Yw(S,i),k=e.safeParse(C),I=()=>{var j;Ew(T),(j=n.interceptor)==null||j.clear()};if(k.success){const j=JSON.stringify(k.data);return T.setAttribute("data-json",j),(A=n.interceptor)==null||A.clear(),v==null?void 0:v(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(),v==null?void 0:v(g,{form:T,json:S,event:g,reset:I,data:S,success:!1,errors:k.error.issues.map(j=>({message:j.message,path:j.path.map(O=>String(O))}))})},y=v=>xd(i,v)||"",b=v=>({...v,id:t,name:t});return x.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(i))},[i]),{get:y,input:p,state:i,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,disabled:r!==null}},p$=e=>e?JSON.parse(e.getAttribute("data-json")):{},g$=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=tI;exports.Autocomplete=_L;exports.Button=No;exports.Calendar=g0;exports.Card=y0;exports.Checkbox=Qf;exports.ColType=Oo;exports.Collapse=Fb;exports.ComponentsProvider=UO;exports.DatePicker=zL;exports.Dropdown=ms;exports.Empty=v0;exports.Expand=KM;exports.FileUpload=t2;exports.Form=r2;exports.Input=Di;exports.InputFeedback=cw;exports.InputField=_i;exports.Menu=QM;exports.MenuItem=XM;exports.Modal=WN;exports.MultiCombobox=BL;exports.Notifications=X_;exports.Polymorph=os;exports.Radiobox=o2;exports.RenderOnView=kT;exports.Select=Hr;exports.Stats=Q_;exports.Switch=s2;exports.Tab=tD;exports.Table=dV;exports.Tabs=J_;exports.Tag=wd;exports.TaskList=i2;exports.Textarea=a2;exports.Toolbar=zN;exports.Tooltip=Nx;exports.TransferList=u2;exports.createColumns=M2;exports.createCssProperties=VO;exports.createDesignTokens=d0;exports.createFormStorage=h$;exports.createOptionCols=rh;exports.createStyles=LO;exports.createTheme=FO;exports.createTokenStyles=$O;exports.css=$e;exports.defaultDarkTheme=zO;exports.defaultLightTheme=HO;exports.dispatchInput=bd;exports.formReset=Ew;exports.formToJson=qw;exports.getJsonForm=p$;exports.getSchemaShape=Pr;exports.initializeInputDataset=yi;exports.isReactComponent=TT;exports.isReactFC=ET;exports.isSsr=wa;exports.mergeRefs=vd;exports.parsers=Sl;exports.path=xd;exports.reduceTokens=So;exports.safeRegex=su;exports.splitInto=By;exports.useColorParser=GO;exports.useForm=m$;exports.useLocale=pf;exports.useNotification=K_;exports.usePrevious=g$;exports.useReactive=B0;exports.useTablePreferences=L2;exports.useTranslations=Et;exports.uuid=vi;
230
+ */var Fc,Wg;function XL(){if(Wg)return Fc;Wg=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 Fc=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},Fc}var Vc,zg;function eh(){if(zg)return Vc;zg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vc=e,Vc}var $c,Hg;function hw(){return Hg||(Hg=1,$c=Function.call.bind(Object.prototype.hasOwnProperty)),$c}var Bc,Ug;function QL(){if(Ug)return Bc;Ug=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=eh(),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={})},Bc=o,Bc}var Wc,Gg;function JL(){if(Gg)return Wc;Gg=1;var e=fw(),t=XL(),n=eh(),r=hw(),o=QL(),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 Wc=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:v(),arrayOf:g,element:T(),elementType:w(),instanceOf:E,node:I(),objectOf:k,oneOf:C,oneOfType:A,shape:O,exact:L};function p(_,$){return _===$?_!==0||1/_===1/$:_!==_&&$!==$}function m(_,$){this.message=_,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function y(_){if(process.env.NODE_ENV!=="production")var $={},Z=0;function re(G,F,B,H,Y,Q,ue){if(H=H||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=H+":"+B;!$[ke]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+H+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),$[ke]=!0,Z++)}}return F[B]==null?G?F[B]===null?new m("The "+Y+" `"+Q+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new m("The "+Y+" `"+Q+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:_(F,B,H,Y,Q)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function b(_){function $(Z,re,ee,G,F,B){var H=Z[re],Y=N(H);if(Y!==_){var Q=D(H);return new m("Invalid "+G+" `"+F+"` of type "+("`"+Q+"` supplied to `"+ee+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return y($)}function v(){return y(i)}function g(_){function $(Z,re,ee,G,F){if(typeof _!="function")return new m("Property `"+F+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var B=Z[re];if(!Array.isArray(B)){var H=N(B);return new m("Invalid "+G+" `"+F+"` of type "+("`"+H+"` 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 y($)}function T(){function _($,Z,re,ee,G){var F=$[Z];if(!a(F)){var B=N(F);return new m("Invalid "+ee+" `"+G+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(_)}function w(){function _($,Z,re,ee,G){var F=$[Z];if(!e.isValidElementType(F)){var B=N(F);return new m("Invalid "+ee+" `"+G+"` of type "+("`"+B+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(_)}function E(_){function $(Z,re,ee,G,F){if(!(Z[re]instanceof _)){var B=_.name||f,H=z(Z[re]);return new m("Invalid "+G+" `"+F+"` of type "+("`"+H+"` supplied to `"+ee+"`, expected ")+("instance of `"+B+"`."))}return null}return y($)}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 $(Z,re,ee,G,F){for(var B=Z[re],H=0;H<_.length;H++)if(p(B,_[H]))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 y($)}function k(_){function $(Z,re,ee,G,F){if(typeof _!="function")return new m("Property `"+F+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var B=Z[re],H=N(B);if(H!=="object")return new m("Invalid "+G+" `"+F+"` of type "+("`"+H+"` 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 y($)}function A(_){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 Z=_[$];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(Z)+" at index "+$+"."),i}function re(ee,G,F,B,H){for(var Y=[],Q=0;Q<_.length;Q++){var ue=_[Q],U=ue(ee,G,F,B,H,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+" `"+H+"` supplied to "+("`"+F+"`"+ke+"."))}return y(re)}function I(){function _($,Z,re,ee,G){return P($[Z])?null:new m("Invalid "+ee+" `"+G+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(_)}function j(_,$,Z,re,ee){return new m((_||"React class")+": "+$+" type `"+Z+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function O(_){function $(Z,re,ee,G,F){var B=Z[re],H=N(B);if(H!=="object")return new m("Invalid "+G+" `"+F+"` of type `"+H+"` "+("supplied to `"+ee+"`, expected `object`."));for(var Y in _){var Q=_[Y];if(typeof Q!="function")return j(ee,G,F,Y,D(Q));var ue=Q(B,Y,ee,G,F+"."+Y,n);if(ue)return ue}return null}return y($)}function L(_){function $(Z,re,ee,G,F){var B=Z[re],H=N(B);if(H!=="object")return new m("Invalid "+G+" `"+F+"` of type `"+H+"` "+("supplied to `"+ee+"`, expected `object`."));var Y=t({},Z[re],_);for(var Q in Y){var ue=_[Q];if(r(_,Q)&&typeof ue!="function")return j(ee,G,F,Q,D(ue));if(!ue)return new m("Invalid "+G+" `"+F+"` key `"+Q+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Z[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 y($)}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 Z=$.call(_),re;if($!==_.entries){for(;!(re=Z.next()).done;)if(!P(re.value))return!1}else for(;!(re=Z.next()).done;){var ee=re.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function M(_,$){return _==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function N(_){var $=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":M($,_)?"symbol":$}function D(_){if(typeof _>"u"||_===null)return""+_;var $=N(_);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 z(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Wc}var zc,Yg;function eF(){if(Yg)return zc;Yg=1;var e=eh();function t(){}function n(){}return n.resetWarningCache=t,zc=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},zc}if(process.env.NODE_ENV!=="production"){var tF=fw(),nF=!0;Yu.exports=JL()(tF.isElement,nF)}else Yu.exports=eF()();var rF=Yu.exports;const Ge=e1(rF);var oF=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 Ni(e,t){var n=sF(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 sF(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=oF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var iF=[".DS_Store","Thumbs.db"];function aF(e){return gs(this,void 0,void 0,function(){return ys(this,function(t){return Ka(e)&&lF(e.dataTransfer)?[2,fF(e.dataTransfer,e.type)]:cF(e)?[2,uF(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,dF(e)]:[2,[]]})})}function lF(e){return Ka(e)}function cF(e){return Ka(e)&&Ka(e.target)}function Ka(e){return typeof e=="object"&&e!==null}function uF(e){return qu(e.target.files).map(function(t){return Ni(t)})}function dF(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 Ni(r)})]}})})}function fF(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=qu(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(hF))]):[3,2];case 1:return r=o.sent(),[2,qg(mw(r))];case 2:return[2,qg(qu(e.files).map(function(s){return Ni(s)}))]}})})}function qg(e){return e.filter(function(t){return iF.indexOf(t.name)===-1})}function qu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function hF(e){if(typeof e.webkitGetAsEntry!="function")return Kg(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?pw(t):Kg(e)}function mw(e){return e.reduce(function(t,n){return $u($u([],cg(t),!1),cg(Array.isArray(n)?mw(n):[n]),!1)},[])}function Kg(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Ni(t);return Promise.resolve(n)}function mF(e){return gs(this,void 0,void 0,function(){return ys(this,function(t){return[2,e.isDirectory?pw(e):pF(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(mF)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function pF(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=Ni(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var gF=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 Zg(e){return bF(e)||vF(e)||yw(e)||yF()}function yF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
232
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bF(e){if(Array.isArray(e))return Ku(e)}function Xg(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 Qg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xg(Object(n),!0).forEach(function(r){gw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xg(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 ui(e,t){return SF(e)||wF(e,t)||yw(e,t)||xF()}function xF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
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 Ku(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 Ku(e,t)}}function Ku(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 wF(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 SF(e){if(Array.isArray(e))return e}var TF="file-invalid-type",EF="file-too-large",CF="file-too-small",RF="too-many-files",PF=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:TF,message:"File type must be ".concat(n)}},Jg=function(t){return{code:EF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ey=function(t){return{code:CF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},kF={code:RF,message:"Too many files"};function vw(e,t){var n=e.type==="application/x-moz-file"||gF(e,t);return[n,n?null:PF(t)]}function bw(e,t,n){if(kr(e.size))if(kr(t)&&kr(n)){if(e.size>n)return[!1,Jg(n)];if(e.size<t)return[!1,ey(t)]}else{if(kr(t)&&e.size<t)return[!1,ey(t)];if(kr(n)&&e.size>n)return[!1,Jg(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=ui(c,1),d=u[0],f=bw(l,r,o),h=ui(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function Za(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ra(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 ty(e){e.preventDefault()}function IF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function OF(e){return e.indexOf("Edge/")!==-1}function _F(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return IF(e)||OF(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!Za(r)&&a&&a.apply(void 0,[r].concat(s)),Za(r)})}}function MF(){return"showOpenFilePicker"in window}function DF(e){if(kr(e)){var t=Object.entries(e).filter(function(n){var r=ui(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=ui(r,2),s=o[0],i=o[1];return Qg(Qg({},n),{},gw({},s,i))},{});return[{description:"Files",accept:t}]}return e}function NF(e){if(kr(e))return Object.entries(e).reduce(function(t,n){var r=ui(n,2),o=r[0],s=r[1];return[].concat(Zg(t),[o],Zg(s))},[]).filter(function(t){return xw(t)||ww(t)}).join(",")}function jF(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function LF(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 FF=["children"],VF=["open"],$F=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],BF=["refKey","onChange","onClick"];function WF(e){return UF(e)||HF(e)||Sw(e)||zF()}function zF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
234
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UF(e){if(Array.isArray(e))return Zu(e)}function Hc(e,t){return qF(e)||YF(e,t)||Sw(e,t)||GF()}function GF(){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 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 YF(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 qF(e){if(Array.isArray(e))return e}function ny(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?ny(Object(n),!0).forEach(function(r){Xu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ny(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xa(e,t){if(e==null)return{};var n=KF(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 KF(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 th=x.forwardRef(function(e,t){var n=e.children,r=Xa(e,FF),o=Ew(r),s=o.open,i=Xa(o,VF);return x.useImperativeHandle(t,function(){return{open:s}},[s]),x.createElement(x.Fragment,null,n(tt(tt({},i),{},{open:s})))});th.displayName="Dropzone";var Tw={disabled:!1,getFilesFromEvent:aF,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};th.defaultProps=Tw;th.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 Qu={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,y=t.onFileDialogOpen,b=t.useFsAccessApi,v=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,w=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,A=t.validator,I=x.useMemo(function(){return NF(n)},[n]),j=x.useMemo(function(){return DF(n)},[n]),O=x.useMemo(function(){return typeof y=="function"?y:ry},[y]),L=x.useMemo(function(){return typeof m=="function"?m:ry},[m]),P=x.useRef(null),M=x.useRef(null),N=x.useReducer(ZF,Qu),D=Hc(N,2),V=D[0],z=D[1],_=V.isFocused,$=V.isFileDialogActive,Z=x.useRef(typeof window<"u"&&window.isSecureContext&&b&&MF()),re=function(){!Z.current&&$&&setTimeout(function(){if(M.current){var ie=M.current.files;ie.length||(z({type:"closeDialog"}),L())}},300)};x.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[M,$,L,Z]);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",ty,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",ty),document.removeEventListener("drop",G))}},[P,g]),x.useEffect(function(){return!r&&v&&P.current&&P.current.focus(),function(){}},[P,v,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(WF(ee.current),[te.target]),ra(te)&&Promise.resolve(o(te)).then(function(ie){if(!(Za(te)&&!C)){var _e=ie.length,Ke=_e>0&&AF({files:ie,accept:I,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:A}),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,I,i,s,a,l,A]),H=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te);var ie=ra(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)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ra(te)&&u&&u(te))},[P,u,C]),Q=x.useCallback(function(te,ie){var _e=[],Ke=[];te.forEach(function(Ct){var It=vw(Ct,I),Lt=Hc(It,2),xr=Lt[0],ro=Lt[1],oo=bw(Ct,i,s),ji=Hc(oo,2),Ll=ji[0],Fl=ji[1],Vl=A?A(Ct):null;if(xr&&Ll&&!Vl)_e.push(Ct);else{var $l=[ro,Fl];Vl&&($l=$l.concat(Vl)),Ke.push({file:Ct,errors:$l.filter(function(Zw){return Zw})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(Ct){Ke.push({file:Ct,errors:[kF]})}),_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,I,i,s,l,f,h,p,A]),ue=x.useCallback(function(te){te.preventDefault(),te.persist(),J(te),ee.current=[],ra(te)&&Promise.resolve(o(te)).then(function(ie){Za(te)&&!C||Q(ie,te)}).catch(function(ie){return F(ie)}),z({type:"reset"})},[o,Q,F,C]),U=x.useCallback(function(){if(Z.current){z({type:"openDialog"}),O();var te={multiple:a,types:j};window.showOpenFilePicker(te).then(function(ie){return o(ie)}).then(function(ie){Q(ie,null),z({type:"closeDialog"})}).catch(function(ie){jF(ie)?(L(ie),z({type:"closeDialog"})):LF(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,j,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(){z({type:"focus"})},[]),Le=x.useCallback(function(){z({type:"blur"})},[]),Te=x.useCallback(function(){T||(_F()?setTimeout(U,0):U())},[T,U]),q=function(ie){return r?null:ie},se=function(ie){return w?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,Ct=te.onKeyDown,It=te.onFocus,Lt=te.onBlur,xr=te.onClick,ro=te.onDragEnter,oo=te.onDragOver,ji=te.onDragLeave,Ll=te.onDrop,Fl=Xa(te,$F);return tt(tt(Xu({onKeyDown:se(gn(Ct,ke)),onFocus:se(gn(It,qe)),onBlur:se(gn(Lt,Le)),onClick:q(gn(xr,Te)),onDragEnter:W(gn(ro,B)),onDragOver:W(gn(oo,H)),onDragLeave:W(gn(ji,Y)),onDrop:W(gn(Ll,ue)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,P),!r&&!w?{tabIndex:0}:{}),Fl)}},[P,ke,qe,Le,Te,B,H,Y,ue,w,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,Ct=te.onClick,It=Xa(te,BF),Lt=Xu({accept:I,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),It)}},[M,n,a,ue,r]);return tt(tt({},V),{},{isFocused:_&&!r,getRootProps:pe,getInputProps:Fe,rootRef:P,inputRef:M,open:q(U)})}function ZF(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({},Qu),{},{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({},Qu);default:return e}}function ry(){}const XF={isImage:e=>e.type.includes("image")},QF=e=>{const[t,n]=x.useState({url:"",type:"",size:""});return x.useEffect(()=>{if(XF.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Fg(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Fg(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"})})]})},JF=e=>S.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>S.jsx(QF,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),e2=e=>e.isDragActive?S.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?S.jsx(JF,{onDeleteFile:e.onDeleteFile,files:e.files}):S.jsx(x.Fragment,{children:e.idle}),t2=S.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[S.jsx(Jk,{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"})]})]}),n2=({idle:e=t2,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 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(e2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},r2=["INPUT","SELECT"],Cw=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{r2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},o2=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})},s2=({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=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 y=Et(),b=x.useRef(null),v=p.id??p.name;x.useImperativeHandle(m,()=>b.current),x.useEffect(()=>{if(b.current===null)return;const T=new AbortController,w=b.current,E=vi(b.current);return w.addEventListener("change",()=>w.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(Mi,{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:v,children:S.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[S.jsx(rf,{size:20}),S.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})}),children:S.jsxs("select",{...p,id:v,name:v,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=>x.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${v}-select-option-${T.value}`}))]})})}),Ju=e=>{const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),t},i2=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=Ju(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 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})]})}),a2=e=>{const[t,n]=kk();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:Mk(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),S.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},l2=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)}),c2=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},u2={Item:x.forwardRef(function(t,n){return S.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:x.forwardRef(function(t,n){return S.jsx("ul",{...t,ref:n,className:"space-y-3"})})},d2=e=>{const t=x.useRef(null),n=c2(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(Di,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),S.jsx(Xf,{height:n,useWindowScroll:!0,data:e.source,components:u2,itemContent:(r,o)=>S.jsx(x.Fragment,{children:S.jsx(Jf,{children:S.jsx(e.Item,{data:o})})})})]})]}),S.jsx("div",{children:S.jsx(jo,{children:S.jsx(of,{})})}),S.jsx("div",{})]})};var f2=Object.defineProperty,oy=Object.getOwnPropertySymbols,h2=Object.prototype.hasOwnProperty,m2=Object.prototype.propertyIsEnumerable,sy=(e,t,n)=>t in e?f2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p2=(e,t)=>{for(var n in t||(t={}))h2.call(t,n)&&sy(e,n,t[n]);if(oy)for(var n of oy(t))m2.call(t,n)&&sy(e,n,t[n]);return e},nh=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},g2=(e,t,n,r)=>Nl(nh,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]))},y2=(e,t)=>(Xo(e)||Array.isArray(e))&&t?e[t]:e,v2=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Qa=e=>/[0-9.]+/.test(e),iy=e=>["string","number"].includes(typeof e),ay=e=>e==null||(e==null?void 0:e.length)===0||e==="",ly={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:ay,notEmpty:e=>!ay(e),in:(e,t)=>nh(t,n=>or(e,n)),notIn:(e,t)=>Rw(t,n=>!or(e,n))},b2=e=>{if(e in ly)return ly[e];throw new Error("Linq - Symbol not found")},Io=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},Nl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=b2(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},x2=(e,t,n,r)=>Nl(Io,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},w2=(e,t,n,r)=>Nl(Rw,e,t,n,r),Pw=e=>{if(e===null)return null;const t=p2({},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},cy=(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},S2=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},T2=e=>Io(e,(t,n,r)=>Xo(t)?n===r.findIndex(o=>or(o,t)):n===r.indexOf(t)),E2=(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())},C2=(e,t)=>kw(e,n=>n[t]),uy=(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},R2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},P2=(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 Qa(e)&&Qa(t)?r.map(i=>Number.parseInt(i)):r},Uc=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Qa(e)&&Qa(t)){const o=[],[s,i]=R2(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return P2(e,t,r)},k2=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?Uc(r,o,1):Uc(r,s,Number.parseInt(o,10))}return iy(e)&&iy(t)?Uc(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Gc=(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},dy=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)},I2=(e,t,n,r)=>Nl(A2,e,t,n,r),fy=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(v2(t))},Aw=(e=>(e.Asc="asc",e.Desc="desc",e))(Aw||{}),O2=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),_2=(e,t)=>e.sort(O2(t)),M2=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Io(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},D2=class ed{constructor(t=[]){this.array=t}static Range(...t){return k2(...t)}static New(t){return new ed(t)}Where(t,n,r){return this.array=x2(this.array,t,n,r),this}Some(t,n,r){return g2(this.array,t,n,r)}All(t,n,r){return w2(this.array,t,n,r)}Reverse(){return this.array=dy(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=I2(this.array,t,n,r),this}Distinct(){return this.array=T2(this.array),this}First(t){return t===void 0?this.array[0]:E2(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?Gc((n,r)=>n+r,0,this.array):Gc((n,r)=>n+y2(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return C2(this.array,t)}GroupWith(t){return kw(this.array,t)}Except(t){return Io(this.array,n=>!cy(t,n))}Intersect(t){return Io(this.array,n=>cy(t,n))}OrderBy(t,n){let r;return r=t?fy(this.array,t):this.array.toSorted(),this.array=n==="desc"?dy(r):r,this}Includes(t){return nh(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 Gc(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(uy(this.array,n=>[t,n]))}Zip(t,n){return uy(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Io(this.array,t).length}Get(t){return this.array[t]}Clone(){return new ed(Pw(this.array))}ToObject(t){return S2(this.array,t)}Sort(t){return Array.isArray(t)?_2(this.array,t):fy(this.array,t)}Unique(t){return M2(this.array,t)}},Iw=D2,Oo={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,b)=>{try{Object.keys(y).forEach(b)}catch(v){window.console.log(v)}},n=y=>y==null,r=y=>{const b=typeof y;return b==="string"||b==="number"||b==="boolean"||n(y)},o=(y,b)=>{const v=b.getItem(y);try{return JSON.parse(v)}catch{return v??null}},s=y=>Object.keys(y).reduce((b,v)=>({...b,[v]:o(v,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,b)=>(y[decodeURIComponent(b[0].trim())]=decodeURIComponent(b[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(b=>b(y))},d=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const b=y.domain??"";return b===""?"":`domain=${y.multiDomain?".":""}${b}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],f={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(b=>b.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const b=f.json()[y];if(n(b))return null;try{return JSON.parse(decodeURIComponent(b))}catch{return b}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,b,v={})=>{const g=r(b)?b:encodeURIComponent(JSON.stringify(b)),T=d.reduce((w,E)=>{const C=E.parse(v);return C===""?w:w.concat(C)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=T,u()}},h=y=>{const b=new Set,v=g=>{y().removeItem(g);const T=s(y());b.forEach(w=>w(T))};return{delete:v,listener:g=>(b.add(g),()=>b.delete(g)),clearListeners:()=>b.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const T=y().getItem(g);return!n(T)},deleteAll:()=>{t(y(),v),b.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,T)=>{y().setItem(g,JSON.stringify(T)),b.forEach(w=>w(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Oo);const rh=e=>e.headerLabel??e.thead??e.id,oh=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 sh=e=>e.type==="number"?e.valueAsNumber:e.value,N2=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},j2={},L2=(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})},F2=(e,t,n=j2)=>{const r=Sa()?null:Oo.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=ff({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:L2(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Sa()||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:bi(),operation:l,label:rh(e),name:o,type:s,value:"",...r}},ih=()=>{const e=Et(),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}},V2=e=>{const t=Et(),n=ih(),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=sh(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return S.jsx(x.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(qk,{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(Di,{"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(sf,{size:14})," ",t.tableFilterNewFilter]})})]})})})},$2=({filter:e,onDelete:t,set:n})=>{const r=Et(),o=ih(),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=sh(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(Di,{"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})})]})},B2=({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(Yk,{size:14})}),S.jsx("span",{children:e.groupName})]},e.groupId)},W2=e=>{var l;const t=Et(),n=oh(e.cols),r=Ok(),[o,s]=x.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var y;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((y=u.options.item(f))==null?void 0:y.label)||"";s(h);const p=new Iw(e.rows).GroupBy(d),m=e.cols.find(b=>b.id===d);e.setGroups(US(p).map((b,v)=>{const g=p[b];return{...m,groupId:bi(),groupKey:d,index:v,rows:g,groupName:b}}))},a=()=>e.setGroups([]);return S.jsx(x.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(Qk,{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(HT,{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(B2,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},z2=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),H2=(e,t)=>e.toSorted(z2(t)),Ow=(e,t,n)=>({id:bi(),type:n,value:e.id,label:t}),U2=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(x.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(sf,{size:14})," ",t.tableSortAddButton]})})]})})})},G2=e=>{const t=Et(),[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=rh(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(zk,{size:14}):null,n==="desc"?S.jsx(Wk,{size:14}):null,n==="undefined"?S.jsx(Nb,{size:14}):null]})},Y2=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(V2,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),S.jsx("span",{children:S.jsx(U2,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),S.jsx("span",{children:S.jsx(W2,{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=sh(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function q2(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 K2=e=>{const t=x.useId(),n=Et(),r=e.asLink||"button",o=x.useMemo(()=>q2(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(x.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(x.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]})})]})},Z2={top:0,left:0,right:0,bottom:-1},X2=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=ih(),a=r?Kk:Zk,l=m=>{const y=m.currentTarget.dataset.id||"";return e.setFilters(b=>b.filter(v=>v.id!==y))},c=x.useCallback(m=>{if(m===null)return;const y=new AbortController;return m.addEventListener("pointerdown",b=>{if(b.target.dataset.type==="resizer")return b.stopPropagation(),b.stopImmediatePropagation()},{signal:y.signal}),()=>y.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===Aw.Asc?"ascending":"descending":"none",f=rh(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($2,{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(sf,{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(G2,{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:Z2,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,y)=>{const b=m.target,v=h.get()||b.getBoundingClientRect().width,g=y.delta.x;return h.set(Math.abs(v+g))}})]})},Q2=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(X2,{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({}),J2=()=>x.useContext(_w),eV=x.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})})),tV=x.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??""}`})),nV=x.forwardRef(({context:e,...t},n)=>{const r=J2(),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})}),rV=x.forwardRef(({context:e,item:t,...n},r)=>S.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),oV=x.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),sV={TableHead:nV,Table:tV,TableBody:eV,TableRow:rV,TableFoot:oV},iV=[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"}),aV=(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,{})}),lV=(e,t,n)=>{const r=n.cols,o=n.loading;return S.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?S.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):S.jsx(x.Fragment,{children:Pt.nil(l)?"":l}))})})},cV=()=>S.jsx(x.Fragment,{}),uV=[{}],hy=({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=Ju(i),m=Ju(u.loadingMore),y=x.useMemo(()=>{if(u.loading)return iV;if(c)return u.rows;const b=new Iw(u.rows);return t.length>0&&t.forEach(v=>v.value===""||Number.isNaN(v.value)?void 0:b.Where(v.name,v.operation.symbol,v.value)),r.length===0?b.Select():H2(b.Select(),r)},[u.rows,t,r,u.loading]);return x.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,v=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return v.observe(b),()=>v.disconnect()},[]),S.jsxs("div",{className:"min-w-full",children:[S.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[S.jsx(CL,{useWindowScroll:!0,followOutput:"smooth",components:sV,totalCount:y.length,data:y.length===0?uV:y,fixedFooterContent:f?cV:null,itemContent:y.length===0?aV:lV,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>S.jsx(Q2,{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(K2,{...l}):null]})},dV=(e,t)=>typeof t=="function"?t(e):t,oa=(e,t,n)=>e===t||n==null?void 0:n(t),fV=e=>{const t=x.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=x.useMemo(()=>oh(e.cols),[e.cols]),[o,s]=ff({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:dV(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),oa((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),oa((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),oa((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),oa((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(Y2,{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(hy,{...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(hy,{...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 hV=String.prototype.replace,mV=/%20/g,Yc={RFC1738:"RFC1738",RFC3986:"RFC3986"},ah={default:Yc.RFC3986,formatters:{RFC1738:function(e){return hV.call(e,mV,"+")},RFC3986:function(e){return String(e)}},RFC1738:Yc.RFC1738,RFC3986:Yc.RFC3986},pV=ah,qc=Object.prototype.hasOwnProperty,Ar=Array.isArray,yn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),gV=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ar(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},yV=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ar(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!qc.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 Ar(t)&&!Ar(n)&&(o=Dw(t,r)),Ar(t)&&Ar(n)?(n.forEach(function(s,i){if(qc.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 qc.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},vV=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},bV=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}},Kc=1024,xV=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+=Kc){for(var c=i.length>=Kc?i.slice(l,l+Kc):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===pV.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},wV=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 gV(n),t},SV=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},TV=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},EV=function(t,n){return[].concat(t,n)},CV=function(t,n){if(Ar(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:vV,combine:EV,compact:wV,decode:bV,encode:xV,isBuffer:TV,isRegExp:SV,maybeMap:CV,merge:yV},jw=$S,ya=Nw,Us=ah,RV=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,PV=Array.prototype.push,Fw=function(e,t){PV.apply(e,vn(t)?t:[t])},kV=Date.prototype.toISOString,my=Us.default,yt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ya.encode,encodeValuesOnly:!1,format:my,formatter:Us.formatters[my],indices:!1,serializeDate:function(t){return kV.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"},Zc={},IV=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,y,b,v){for(var g=t,T=v,w=0,E=!1;(T=T.get(Zc))!==void 0&&!E;){var C=T.get(t);if(w+=1,typeof C<"u"){if(C===w)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Zc)>"u"&&(w=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&vn(g)&&(g=ya.maybeMap(g,function(_){return _ instanceof Date?h(_):_})),g===null){if(i)return c&&!y?c(n,yt.encoder,b,"key",p):n;g=""}if(AV(g)||ya.isBuffer(g)){if(c){var k=y?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 A=[];if(typeof g>"u")return A;var I;if(r==="comma"&&vn(g))y&&c&&(g=ya.maybeMap(g,c)),I=[{value:g.length>0?g.join(",")||null:void 0}];else if(vn(u))I=u;else{var j=Object.keys(g);I=d?j.sort(d):j}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<I.length;++P){var M=I[P],N=typeof M=="object"&&typeof M.value<"u"?M.value:g[M];if(!(a&&N===null)){var D=f&&l?M.replace(/\./g,"%2E"):M,V=vn(g)?typeof r=="function"?r(L,D):L:L+(f?"."+D:"["+D+"]");v.set(t,w);var z=jw();z.set(Zc,v),Fw(A,e(N,V,r,o,s,i,a,l,r==="comma"&&y&&vn(g)?null:c,u,d,f,h,p,m,y,b,z))}}return A},OV=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(!RV.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}},_V=function(e,t){var n=e,r=OV(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,IV(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,MV=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},DV=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},NV="utf8=%26%2310003%3B",jV="utf8=%E2%9C%93",LV=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]===jV?c="utf-8":i[l]===NV&&(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(y){return n.decoder(y,dt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=DV(p)),u.indexOf("[]=")>-1&&(p=MV(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},FV=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},VV=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)+"]"),FV(u,n,r,o)}},$V=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}},BV=function(e,t){var n=$V(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?LV(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=VV(a,r[a],n,typeof e=="string");o=Qo.merge(o,l,n)}return n.allowSparse===!0?o:Qo.compact(o)},WV=_V,zV=BV,HV=ah,UV={formats:HV,parse:zV,stringify:WV},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 py;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(py||(py={}));const le=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ir=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 di=(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 GV=di;function rd(){return GV}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===di?void 0:di].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"}),Is=e=>({status:"dirty",value:e}),Ut=e=>({status:"valid",value:e}),gy=e=>e.status==="aborted",yy=e=>e.status==="dirty",Ja=e=>e.status==="valid",el=e=>typeof Promise<"u"&&e instanceof Promise;function tl(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 vy=(e,t)=>{if(Ja(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 Ir(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ir(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:Ir(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(el(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:Ir(t)},s=this._parseSync({data:t,path:o.path,parent:o});return vy(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:Ir(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(el(o)?o:Promise.resolve(o));return vy(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 In.create(this,this._def)}promise(){return hi.create(this,this._def)}or(t){return ol.create([this,t],this._def)}and(t){return sl.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 ul({...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 dl({...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 jl.create(this,t)}readonly(){return fl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const YV=/^c[^\s-]{8,}$/i,qV=/^[0-9a-z]+$/,KV=/^[0-9A-HJKMNP-TV-Z]{26}$/,ZV=/^[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,XV=/^[a-z0-9_-]{21}$/i,QV=/^[-+]?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)?)??$/,JV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,e$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Xc;const t$=/^(?:(?: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])$/,n$=/^(([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})))$/,r$=/^([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])))",o$=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 s$(e){return new RegExp(`^${Ww(e)}$`)}function i$(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 a$(e,t){return!!((t==="v4"||!t)&&t$.test(e)||(t==="v6"||!t)&&n$.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")JV.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")Xc||(Xc=new RegExp(e$,"u")),Xc.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")ZV.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")XV.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")YV.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")qV.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")KV.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"?i$(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"?o$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:X.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?s$(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"?QV.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"duration",code:X.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?a$(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"?r$.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 l$(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"?l$(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 fi 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 fi({...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}}fi.create=e=>new fi({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 nl 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)}}nl.create=e=>new nl({typeName:ge.ZodUndefined,...xe(e)});class rl 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)}}rl.create=e=>new rl({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 In 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 In({...this._def,minLength:{value:t,message:fe.toString(n)}})}max(t,n){return new In({...this._def,maxLength:{value:t,message:fe.toString(n)}})}length(t,n){return new In({...this._def,exactLength:{value:t,message:fe.toString(n)}})}nonempty(t){return this.min(1,t)}}In.create=(e,t)=>new In({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 In?new In({...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 ol 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}}ol.create=(e,t)=>new ol({options:e,typeName:ge.ZodUnion,...xe(t)});const Fn=e=>e instanceof al?Fn(e.schema):e instanceof Gn?Fn(e.innerType()):e instanceof ll?[e.value]:e instanceof Gr?e.options:e instanceof cl?Oe.objectValues(e.enum):e instanceof ul?Fn(e._def.innerType):e instanceof nl?[void 0]:e instanceof rl?[null]:e instanceof $n?[void 0,...Fn(e.unwrap())]:e instanceof Yr?[null,...Fn(e.unwrap())]:e instanceof Hw||e instanceof fl?Fn(e.unwrap()):e instanceof dl?Fn(e._def.innerType):[];class lh 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 lh({typeName:ge.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...xe(r)})}}function cd(e,t){const n=Ir(e),r=Ir(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 sl extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(gy(s)||gy(i))return ve;const a=cd(s.value,i.value);return a.valid?((yy(s)||yy(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}))}}sl.create=(e,t,n)=>new sl({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 il 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 il({keyType:t,valueType:n,typeName:ge.ZodRecord,...xe(r)}):new il({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(),di].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(),di].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 hi){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 al 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})}}al.create=(e,t)=>new al({getter:e,typeName:ge.ZodLazy,...xe(t)});class ll 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}}ll.create=(e,t)=>new ll({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(tl(this,Os)||$w(this,Os,new Set(this._def.values)),!tl(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 cl 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(tl(this,_s)||$w(this,_s,new Set(Oe.getValidEnumValues(this._def.values))),!tl(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;cl.create=(e,t)=>new cl({values:e,typeName:ge.ZodNativeEnum,...xe(t)});class hi 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})))}}hi.create=(e,t)=>new hi({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"?Is(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"?Is(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(!Ja(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=>Ja(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 ul 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}}ul.create=(e,t)=>new ul({innerType:e,typeName:ge.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...xe(t)});class dl 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 el(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}}dl.create=(e,t)=>new dl({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 jl 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(),Is(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 jl({in:t,out:n,typeName:ge.ZodPipeline})}}class fl extends Ce{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ja(o)&&(o.value=Object.freeze(o.value)),o);return el(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}fl.create=(e,t)=>new fl({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;fi.create;id.create;nl.create;rl.create;ad.create;Mo.create;ur.create;ld.create;In.create;at.create;at.strictCreate;ol.create;lh.create;sl.create;Un.create;il.create;ud.create;es.create;Gs.create;al.create;ll.create;Gr.create;cl.create;hi.create;Gn.create;$n.create;Yr.create;Gn.createWithPreprocess;jl.create;const c$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},u$=(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 u$(o,r,n),o},d$=(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},f$={sort:d$,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 UV.parse(n.toString(),f$)},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"),Qc=e=>{const t=e.dataset.target;if(!t)return er(e);const n=document.querySelector(`[data-origin="${t}"]`);return er(n||e)},h$={state:{},loading:!1,useOnChange:!1},by=e=>e.dataset.target||e.name,m$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Oo.LocalStorage.get(t);return c$(n)?n:{}},clear:()=>void Oo.LocalStorage.delete(t),set:n=>Oo.LocalStorage.set(t,n)}},p$=(e,t,n=h$)=>{const[r,o]=x.useState(null),s=x.useRef({}),[i,a]=x.useState(()=>Pt.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??Yw(e)??{}),l=x.useCallback(v=>{var A;const g=v.target,T=v.currentTarget;if(g.dataset.optional==="true")return;const E=by(g),C=Qc(g)||(T?er(T):""),k=Pr(E,e);if(g.setAttribute("data-initialized","true"),k){const I=k.safeParse(C),j=I.success?void 0:((A=I.error.issues[0])==null?void 0:A.message)??"";o(O=>sn(O??{},E,j))}},[]),c=x.useCallback(v=>g=>{const T=g.currentTarget,w=Object.values(s.current).reduce((C,k)=>{var L;const A=k.element,I=k.schema.safeParse(er(A));if(A.dataset.ignore==="ignore"||I.success)return C;const j=(L=I.error.issues[0])==null?void 0:L.message;A.setAttribute("data-initialized","true");const O=A.dataset.name||A.name||"";return sn(C,O,j)},{}),E=Pt.empty(w)?null:w;o(E),console.error(E),v==null||v({form:T,errors:E||{}})},[]),u=(v,g=Rs)=>{const T=Pr(v,e),w=E=>{var k;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(A=>sn(A,v,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)};return{...g,loading:n.loading,name:v,id:v,onChange:w,form:t,date:Pt.string(i[v])?new Date(i[v]):i[v],required:g.required??!T.isOptional(),error:r==null?void 0:r[v],ref:E=>{E!==null&&(s.current[v]={element:E,schema:T})}}},d=(v,g=Rs)=>{const T=Pr(v,e);return{...g,name:v,id:v,onChange:E=>{var k;const C=E.target.value;a(A=>sn(A,v,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,v,void 0),value:wr(i,v,void 0)||"",required:g.required??!T.isOptional(),ref:E=>E!==null?s.current[v]={element:E,schema:T}:void 0}},f=(v,g=Rs)=>{const T=Pr(v,e);return{...g,name:v,id:v,onChange:E=>{var k;const C=E.target.checked;a(A=>sn(A??{},v,C)),(k=g==null?void 0:g.onChange)==null||k.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:wr(r,v,void 0),required:g.required??!T.isOptional(),ref:E=>E!==null?void(s.current[v]={element:E,schema:T}):void 0}},h=(v,g=Rs)=>{const T=Pr(v,e),w=E=>{var k,A;(k=E.persist)==null||k.call(E);const C=E.target.value;(A=g==null?void 0:g.onChange)==null||A.call(g,E),a(I=>sn(I,v,C))};return{...g,loading:n.loading,name:v,id:v,onChange:w,form:t,onInvalid:l,error:wr(r,v,void 0),required:g.required??!T.isOptional(),value:wr(i,v,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[v]={element:E,schema:T}}},p=(v,g=Rs)=>{const T=Pr(v,e),w=T._def.typeName==="ZodNumber";return{...g,name:v,id:v,onChange:C=>{var A,I;(A=C.persist)==null||A.call(C);const k=w?C.target.valueAsNumber:C.target.value;(I=g==null?void 0:g.onChange)==null||I.call(g,C),a(j=>sn(j,v,k))},form:t,loading:n.loading,onInvalid:l,error:wr(r,v,void 0),required:g.required??!T.isOptional(),type:w?"number":(g==null?void 0:g.type)??"text",value:wr(i,v,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[v]={element:C,schema:T})}};x.useEffect(()=>{const v=Object.values(s.current).map(T=>{const w=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,E=T.schema.safeParse(er(w)),C=j=>{var N;const O=by(j.target);if(!O)return!1;const L=j.target,P=Qc(j.target)||(j.relatedTarget?er(j.relatedTarget):""),M=T.schema.safeParse(P);if(L.setAttribute("value",P),M.success)return w.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(w.required){const D=((N=M.error.issues[0])==null?void 0:N.message)||"";w.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,A=w.getAttribute("data-trigger")||"blur";w.addEventListener(A,C,{signal:k.signal});const I=w.dataset.shadow?!1:w.required?!E.success:!1;return{input:T,hasInitialError:I,unsubscribe:()=>k.abort()}});return v.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>v.forEach(T=>T.unsubscribe())});const m=v=>g=>{var I;g.preventDefault();const T=g.currentTarget;let w=Kw(T);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(T.elements)).forEach(j=>{if(j.tagName==="SELECT"){const O=j;w=sn(w,O.name,O.value)}if(j.tagName==="INPUT"){const O=j,L=Qc(O)||(O?er(O):"");w=sn(w,O.dataset.target||O.name,L)}});const C=qw(w,i),k=e.safeParse(C),A=()=>{var j;Cw(T),(j=n.interceptor)==null||j.clear()};if(k.success){const j=JSON.stringify(k.data);return T.setAttribute("data-json",j),(I=n.interceptor)==null||I.clear(),v==null?void 0:v(g,{form:T,event:g,reset:A,errors:[],success:!0,data:k.data,json:k.data})}return console.group("useForm error"),console.info(k),console.info(k.error.issues),console.error(k.error),console.groupEnd(),T.reportValidity(),v==null?void 0:v(g,{form:T,json:w,event:g,reset:A,data:w,success:!1,errors:k.error.issues.map(j=>({message:j.message,path:j.path.map(O=>String(O))}))})},y=v=>wd(i,v)||"",b=v=>({...v,id:t,name:t});return x.useEffect(()=>{var v;n.interceptor&&((v=n.interceptor)==null||v.set(i))},[i]),{get:y,input:p,state:i,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,disabled:r!==null}},g$=e=>e?JSON.parse(e.getAttribute("data-json")):{},y$=e=>{const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=nA;exports.Autocomplete=ML;exports.Button=jo;exports.Calendar=y0;exports.Card=v0;exports.Checkbox=Jf;exports.ColType=_o;exports.Collapse=Vb;exports.ComponentsProvider=GO;exports.DatePicker=HL;exports.Dropdown=ps;exports.Empty=b0;exports.Expand=ZD;exports.FileUpload=n2;exports.Form=o2;exports.Input=Di;exports.InputFeedback=uw;exports.InputField=Mi;exports.Menu=JD;exports.MenuItem=QD;exports.Modal=zN;exports.MultiCombobox=WL;exports.Notifications=Q_;exports.Polymorph=ss;exports.Radiobox=s2;exports.RenderOnView=AT;exports.Select=Hr;exports.Stats=J_;exports.Switch=i2;exports.Tab=nM;exports.Table=fV;exports.Tabs=eM;exports.Tag=Sd;exports.TaskList=a2;exports.Textarea=l2;exports.Toolbar=HN;exports.Tooltip=jx;exports.TransferList=d2;exports.createColumns=N2;exports.createCssProperties=$O;exports.createDesignTokens=f0;exports.createFormStorage=m$;exports.createOptionCols=oh;exports.createStyles=FO;exports.createTheme=VO;exports.createTokenStyles=BO;exports.css=Me;exports.defaultDarkTheme=HO;exports.defaultLightTheme=UO;exports.dispatchInput=xd;exports.formReset=Cw;exports.formToJson=Kw;exports.getJsonForm=g$;exports.getSchemaShape=Pr;exports.initializeInputDataset=vi;exports.isReactComponent=ET;exports.isReactFC=CT;exports.isSsr=Sa;exports.mergeRefs=bd;exports.parsers=Tl;exports.path=wd;exports.reduceTokens=To;exports.safeRegex=iu;exports.splitInto=Wy;exports.useColorParser=YO;exports.useForm=p$;exports.useLocale=gf;exports.useNotification=Z_;exports.usePrevious=y$;exports.useReactive=W0;exports.useTablePreferences=F2;exports.useTranslations=Et;exports.uuid=bi;
237
237
  //# sourceMappingURL=index.js.map