@g4rcez/components 0.0.34 → 0.0.36

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 (77) hide show
  1. package/dist/components/core/button.d.ts.map +1 -1
  2. package/dist/components/core/resizable.d.ts.map +1 -1
  3. package/dist/components/core/resizable.js +21 -18
  4. package/dist/components/core/tag.d.ts +5 -1
  5. package/dist/components/core/tag.d.ts.map +1 -1
  6. package/dist/components/core/tag.js +20 -7
  7. package/dist/components/display/calendar.d.ts +39 -8
  8. package/dist/components/display/calendar.d.ts.map +1 -1
  9. package/dist/components/display/calendar.js +111 -53
  10. package/dist/components/display/list.d.ts.map +1 -1
  11. package/dist/components/display/list.js +1 -3
  12. package/dist/components/display/tabs.d.ts +1 -1
  13. package/dist/components/display/tabs.d.ts.map +1 -1
  14. package/dist/components/display/tabs.js +9 -7
  15. package/dist/components/display/timeline.d.ts +32 -0
  16. package/dist/components/display/timeline.d.ts.map +1 -0
  17. package/dist/components/display/timeline.js +21 -0
  18. package/dist/components/floating/dropdown.d.ts.map +1 -1
  19. package/dist/components/floating/dropdown.js +1 -2
  20. package/dist/components/floating/expand.d.ts +9 -0
  21. package/dist/components/floating/expand.d.ts.map +1 -0
  22. package/dist/components/floating/expand.js +25 -0
  23. package/dist/components/floating/menu.d.ts +5 -2
  24. package/dist/components/floating/menu.d.ts.map +1 -1
  25. package/dist/components/floating/menu.js +5 -4
  26. package/dist/components/floating/modal.d.ts +1 -0
  27. package/dist/components/floating/modal.d.ts.map +1 -1
  28. package/dist/components/floating/modal.js +3 -1
  29. package/dist/components/floating/tooltip.d.ts +3 -1
  30. package/dist/components/floating/tooltip.d.ts.map +1 -1
  31. package/dist/components/floating/tooltip.js +9 -16
  32. package/dist/components/form/autocomplete.d.ts.map +1 -1
  33. package/dist/components/form/autocomplete.js +14 -23
  34. package/dist/components/form/checkbox.d.ts +3 -1
  35. package/dist/components/form/checkbox.d.ts.map +1 -1
  36. package/dist/components/form/checkbox.js +2 -2
  37. package/dist/components/form/date-picker.d.ts +56 -2
  38. package/dist/components/form/date-picker.d.ts.map +1 -1
  39. package/dist/components/form/date-picker.js +16 -11
  40. package/dist/components/form/input.d.ts.map +1 -1
  41. package/dist/components/form/input.js +1 -1
  42. package/dist/components/form/switch.d.ts +1 -1
  43. package/dist/components/form/switch.d.ts.map +1 -1
  44. package/dist/components/form/switch.js +1 -1
  45. package/dist/components/form/task-list.d.ts +3 -0
  46. package/dist/components/form/task-list.d.ts.map +1 -0
  47. package/dist/components/form/task-list.js +26 -0
  48. package/dist/components/index.d.ts +2 -0
  49. package/dist/components/index.d.ts.map +1 -1
  50. package/dist/components/index.js +2 -0
  51. package/dist/components/table/group.d.ts.map +1 -1
  52. package/dist/components/table/group.js +3 -1
  53. package/dist/components/table/thead.d.ts.map +1 -1
  54. package/dist/components/table/thead.js +1 -1
  55. package/dist/hooks/use-form.d.ts.map +1 -1
  56. package/dist/hooks/use-form.js +1 -3
  57. package/dist/hooks/use-stable-ref.d.ts +2 -0
  58. package/dist/hooks/use-stable-ref.d.ts.map +1 -0
  59. package/dist/hooks/use-stable-ref.js +8 -0
  60. package/dist/hooks/use-translate-context.d.ts +9 -1
  61. package/dist/hooks/use-translate-context.d.ts.map +1 -1
  62. package/dist/hooks/use-translate-context.js +5 -1
  63. package/dist/index.css +1 -1
  64. package/dist/index.js.map +1 -1
  65. package/dist/index.mjs +8022 -7685
  66. package/dist/index.mjs.map +1 -1
  67. package/dist/index.umd.js +47 -42
  68. package/dist/index.umd.js.map +1 -1
  69. package/dist/lib/fns.d.ts +1 -0
  70. package/dist/lib/fns.d.ts.map +1 -1
  71. package/dist/lib/fns.js +10 -0
  72. package/dist/preset/preset.tailwind.d.ts +3 -0
  73. package/dist/preset/preset.tailwind.d.ts.map +1 -1
  74. package/dist/preset/preset.tailwind.js +9 -5
  75. package/dist/preset/src/styles/theme.js +2 -2
  76. package/dist/styles/theme.js +2 -2
  77. package/package.json +278 -200
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(ee,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(ee=typeof globalThis<"u"?globalThis:ee||self,b(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,b,x,Qd){"use strict";var BL=Object.defineProperty;var zL=(ee,b,x)=>b in ee?BL(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:x}):ee[b]=x;var ie=(ee,b,x)=>zL(ee,typeof b!="symbol"?b+"":b,x);function Jd(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 A=Jd(b),ef=Jd(Qd);function tf(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=tf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function $0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=tf(e))&&(r&&(r+=" "),r+=t);return r}const nf=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,rf=$0,as=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=nf(u)||nf(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,g]=p;return Array.isArray(g)?g.includes({...i,...a}[m]):{...i,...a}[m]===g})?[...c,d,f]:c},[]);return rf(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function of(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=of(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function R0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=of(e))&&(r&&(r+=" "),r+=t);return r}var sf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function B0(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 z0=Error,W0=EvalError,H0=RangeError,U0=ReferenceError,af=SyntaxError,Zo=TypeError,G0=URIError,Y0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},lf=typeof Symbol<"u"&&Symbol,q0=Y0,K0=function(){return typeof lf!="function"||typeof Symbol!="function"||typeof lf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:q0()},tl={__proto__:null,foo:{}},Z0=Object,X0=function(){return{__proto__:tl}.foo===tl.foo&&!(tl instanceof Z0)},Q0="Function.prototype.bind called on incompatible ",J0=Object.prototype.toString,ew=Math.max,tw="[object Function]",cf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},nw=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},rw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},ow=function(t){var n=this;if(typeof n!="function"||J0.apply(n)!==tw)throw new TypeError(Q0+n);for(var r=nw(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,cf(r,arguments));return Object(u)===u?u:this}return n.apply(t,cf(r,arguments))},s=ew(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+rw(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},iw=ow,nl=Function.prototype.bind||iw,sw=Function.prototype.call,aw=Object.prototype.hasOwnProperty,lw=nl,cw=lw.call(sw,aw),Te,uw=z0,dw=W0,fw=H0,hw=U0,Yr=af,qr=Zo,pw=G0,uf=Function,rl=function(e){try{return uf('"use strict"; return ('+e+").constructor;")()}catch{}},yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch{yr=null}var ol=function(){throw new qr},mw=yr?function(){try{return arguments.callee,ol}catch{try{return yr(arguments,"callee").get}catch{return ol}}}():ol,Kr=K0(),gw=X0(),yt=Object.getPrototypeOf||(gw?function(e){return e.__proto__}:null),Zr={},yw=typeof Uint8Array>"u"||!yt?Te:yt(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Te:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Te:ArrayBuffer,"%ArrayIteratorPrototype%":Kr&&yt?yt([][Symbol.iterator]()):Te,"%AsyncFromSyncIteratorPrototype%":Te,"%AsyncFunction%":Zr,"%AsyncGenerator%":Zr,"%AsyncGeneratorFunction%":Zr,"%AsyncIteratorPrototype%":Zr,"%Atomics%":typeof Atomics>"u"?Te:Atomics,"%BigInt%":typeof BigInt>"u"?Te:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Te:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Te:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Te:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":uw,"%eval%":eval,"%EvalError%":dw,"%Float32Array%":typeof Float32Array>"u"?Te:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Te:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Te:FinalizationRegistry,"%Function%":uf,"%GeneratorFunction%":Zr,"%Int8Array%":typeof Int8Array>"u"?Te:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Te:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Te:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Kr&&yt?yt(yt([][Symbol.iterator]())):Te,"%JSON%":typeof JSON=="object"?JSON:Te,"%Map%":typeof Map>"u"?Te:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Kr||!yt?Te:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Te:Promise,"%Proxy%":typeof Proxy>"u"?Te:Proxy,"%RangeError%":fw,"%ReferenceError%":hw,"%Reflect%":typeof Reflect>"u"?Te:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Te:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Kr||!yt?Te:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Te:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Kr&&yt?yt(""[Symbol.iterator]()):Te,"%Symbol%":Kr?Symbol:Te,"%SyntaxError%":Yr,"%ThrowTypeError%":mw,"%TypedArray%":yw,"%TypeError%":qr,"%Uint8Array%":typeof Uint8Array>"u"?Te:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Te:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Te:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Te:Uint32Array,"%URIError%":pw,"%WeakMap%":typeof WeakMap>"u"?Te:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Te:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Te:WeakSet};if(yt)try{null.error}catch(e){var vw=yt(yt(e));vr["%Error.prototype%"]=vw}var bw=function e(t){var n;if(t==="%AsyncFunction%")n=rl("async function () {}");else if(t==="%GeneratorFunction%")n=rl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=rl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&yt&&(n=yt(o.prototype))}return vr[t]=n,n},df={__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"]},Xo=nl,ls=cw,ww=Xo.call(Function.call,Array.prototype.concat),xw=Xo.call(Function.apply,Array.prototype.splice),ff=Xo.call(Function.call,String.prototype.replace),cs=Xo.call(Function.call,String.prototype.slice),Tw=Xo.call(Function.call,RegExp.prototype.exec),Sw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ew=/\\(\\)?/g,Cw=function(t){var n=cs(t,0,1),r=cs(t,-1);if(n==="%"&&r!=="%")throw new Yr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Yr("invalid intrinsic syntax, expected opening `%`");var o=[];return ff(t,Sw,function(i,s,a,l){o[o.length]=a?ff(l,Ew,"$1"):s||i}),o},Pw=function(t,n){var r=t,o;if(ls(df,r)&&(o=df[r],r="%"+o[0]+"%"),ls(vr,r)){var i=vr[r];if(i===Zr&&(i=bw(r)),typeof i>"u"&&!n)throw new qr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Yr("intrinsic "+t+" does not exist!")},Xr=function(t,n){if(typeof t!="string"||t.length===0)throw new qr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new qr('"allowMissing" argument must be a boolean');if(Tw(/^%?[^%]*%?$/,t)===null)throw new Yr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Cw(t),o=r.length>0?r[0]:"",i=Pw("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],xw(r,ww([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=cs(f,0,1),p=cs(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Yr("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,s="%"+o+"%",ls(vr,s))a=vr[s];else if(a!=null){if(!(f in a)){if(!n)throw new qr("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&u+1>=r.length){var m=yr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=ls(a,f),a=a[f];d&&!l&&(vr[s]=a)}}return a},hf={exports:{}},il,pf;function sl(){if(pf)return il;pf=1;var e=Xr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return il=t,il}var kw=Xr,us=kw("%Object.getOwnPropertyDescriptor%",!0);if(us)try{us([],"length")}catch{us=null}var mf=us,gf=sl(),Ow=af,Qr=Zo,yf=mf,Iw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Qr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Qr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!yf&&yf(t,n);if(gf)gf(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new Ow("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},al=sl(),vf=function(){return!!al};vf.hasArrayLengthDefineBug=function(){if(!al)return null;try{return al([],"length",{value:1}).length!==1}catch{return!0}};var Aw=vf,_w=Xr,bf=Iw,Dw=Aw(),wf=mf,xf=Zo,Mw=_w("%Math.floor%"),Nw=function(t,n){if(typeof t!="function")throw new xf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Mw(n)!==n)throw new xf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&wf){var s=wf(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Dw?bf(t,"length",n,!0,!0):bf(t,"length",n)),t};(function(e){var t=nl,n=Xr,r=Nw,o=Zo,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=sl(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,s,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(hf);var Fw=hf.exports,Tf=Xr,Sf=Fw,Lw=Sf(Tf("String.prototype.indexOf")),Vw=function(t,n){var r=Tf(t,!!n);return typeof r=="function"&&Lw(t,".prototype.")>-1?Sf(r):r};const $w=B0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ll=typeof Map=="function"&&Map.prototype,cl=Object.getOwnPropertyDescriptor&&ll?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ds=ll&&cl&&typeof cl.get=="function"?cl.get:null,Ef=ll&&Map.prototype.forEach,ul=typeof Set=="function"&&Set.prototype,dl=Object.getOwnPropertyDescriptor&&ul?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,fs=ul&&dl&&typeof dl.get=="function"?dl.get:null,Cf=ul&&Set.prototype.forEach,Rw=typeof WeakMap=="function"&&WeakMap.prototype,Qo=Rw?WeakMap.prototype.has:null,jw=typeof WeakSet=="function"&&WeakSet.prototype,Jo=jw?WeakSet.prototype.has:null,Bw=typeof WeakRef=="function"&&WeakRef.prototype,Pf=Bw?WeakRef.prototype.deref:null,zw=Boolean.prototype.valueOf,Ww=Object.prototype.toString,Hw=Function.prototype.toString,Uw=String.prototype.match,fl=String.prototype.slice,zn=String.prototype.replace,Gw=String.prototype.toUpperCase,kf=String.prototype.toLowerCase,Of=RegExp.prototype.test,If=Array.prototype.concat,un=Array.prototype.join,Yw=Array.prototype.slice,Af=Math.floor,hl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pl=Object.getOwnPropertySymbols,ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Jr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Jr||!0)?Symbol.toStringTag:null,_f=Object.prototype.propertyIsEnumerable,Df=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Mf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Of.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Af(-e):Af(e);if(r!==e){var o=String(r),i=fl.call(t,o.length+1);return zn.call(o,n,"$&_")+"."+zn.call(zn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return zn.call(t,n,"$&_")}var gl=$w,Nf=gl.custom,Ff=$f(Nf)?Nf:null,qw=function e(t,n,r,o){var i=n||{};if(Wn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Wn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Wn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Wn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return jf(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Mf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Mf(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return yl(t)?"[Array]":"[Object]";var d=fx(i,r);if(typeof o>"u")o=[];else if(Rf(o,t)>=0)return"[Circular]";function f($,C,O){if(C&&(o=Yw.call(o),o.push(C)),O){var M={depth:i.depth};return Wn(i,"quoteStyle")&&(M.quoteStyle=i.quoteStyle),e($,M,r+1,o)}return e($,i,r+1,o)}if(typeof t=="function"&&!Vf(t)){var h=rx(t),p=hs(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if($f(t)){var m=Jr?zn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ml.call(t);return typeof t=="object"&&!Jr?ei(m):m}if(cx(t)){for(var g="<"+kf.call(String(t.nodeName)),v=t.attributes||[],w=0;w<v.length;w++)g+=" "+v[w].name+"="+Lf(Kw(v[w].value),"double",i);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+kf.call(String(t.nodeName))+">",g}if(yl(t)){if(t.length===0)return"[]";var y=hs(t,f);return d&&!dx(y)?"["+bl(y,d)+"]":"[ "+un.call(y,", ")+" ]"}if(Xw(t)){var S=hs(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!_f.call(t,"cause")?"{ ["+String(t)+"] "+un.call(If.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(S,", ")+" }"}if(typeof t=="object"&&s){if(Ff&&typeof t[Ff]=="function"&&gl)return gl(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ox(t)){var T=[];return Ef&&Ef.call(t,function($,C){T.push(f(C,t,!0)+" => "+f($,t))}),Bf("Map",ds.call(t),T,d)}if(ax(t)){var E=[];return Cf&&Cf.call(t,function($){E.push(f($,t))}),Bf("Set",fs.call(t),E,d)}if(ix(t))return vl("WeakMap");if(lx(t))return vl("WeakSet");if(sx(t))return vl("WeakRef");if(Jw(t))return ei(f(Number(t)));if(tx(t))return ei(f(hl.call(t)));if(ex(t))return ei(zw.call(t));if(Qw(t))return ei(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof sf<"u"&&t===sf)return"{ [object globalThis] }";if(!Zw(t)&&!Vf(t)){var P=hs(t,f),D=Df?Df(t)===Object.prototype:t instanceof Object||t.constructor===Object,_=t instanceof Object?"":"null prototype",I=!D&&Ot&&Object(t)===t&&Ot in t?fl.call(Hn(t),8,-1):_?"Object":"",V=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",F=V+(I||_?"["+un.call(If.call([],I||[],_||[]),": ")+"] ":"");return P.length===0?F+"{}":d?F+"{"+bl(P,d)+"}":F+"{ "+un.call(P,", ")+" }"}return String(t)};function Lf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Kw(e){return zn.call(String(e),/"/g,"&quot;")}function yl(e){return Hn(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Zw(e){return Hn(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Vf(e){return Hn(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Xw(e){return Hn(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Qw(e){return Hn(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Jw(e){return Hn(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function ex(e){return Hn(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function $f(e){if(Jr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!ml)return!1;try{return ml.call(e),!0}catch{}return!1}function tx(e){if(!e||typeof e!="object"||!hl)return!1;try{return hl.call(e),!0}catch{}return!1}var nx=Object.prototype.hasOwnProperty||function(e){return e in this};function Wn(e,t){return nx.call(e,t)}function Hn(e){return Ww.call(e)}function rx(e){if(e.name)return e.name;var t=Uw.call(Hw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Rf(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 ox(e){if(!ds||!e||typeof e!="object")return!1;try{ds.call(e);try{fs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ix(e){if(!Qo||!e||typeof e!="object")return!1;try{Qo.call(e,Qo);try{Jo.call(e,Jo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function sx(e){if(!Pf||!e||typeof e!="object")return!1;try{return Pf.call(e),!0}catch{}return!1}function ax(e){if(!fs||!e||typeof e!="object")return!1;try{fs.call(e);try{ds.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function lx(e){if(!Jo||!e||typeof e!="object")return!1;try{Jo.call(e,Jo);try{Qo.call(e,Qo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function cx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function jf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return jf(fl.call(e,0,t.maxStringLength),t)+r}var o=zn.call(zn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ux);return Lf(o,"single",t)}function ux(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":"")+Gw.call(t.toString(16))}function ei(e){return"Object("+e+")"}function vl(e){return e+" { ? }"}function Bf(e,t,n,r){var o=r?bl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function dx(e){for(var t=0;t<e.length;t++)if(Rf(e[t],`
2
- `)>=0)return!1;return!0}function fx(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=un.call(Array(e.indent+1)," ");else return null;return{base:n,prev:un.call(Array(t+1),n)}}function bl(e,t){if(e.length===0)return"";var n=`
1
+ (function(ee,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(ee=typeof globalThis<"u"?globalThis:ee||self,b(ee.components={},ee.React,ee["react/jsx-runtime"],ee.ReactDOM))})(this,function(ee,b,w,af){"use strict";var bV=Object.defineProperty;var wV=(ee,b,w)=>b in ee?bV(ee,b,{enumerable:!0,configurable:!0,writable:!0,value:w}):ee[b]=w;var oe=(ee,b,w)=>wV(ee,typeof b!="symbol"?b+"":b,w);function lf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=lf(b),cf=lf(af);function uf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=uf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tw(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=uf(e))&&(r&&(r+=" "),r+=t);return r}const df=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,ff=tw,ni=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ff(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=df(u)||df(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...i,...a}[m]):{...i,...a}[m]===v})?[...c,d,f]:c},[]);return ff(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function hf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=hf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=hf(e))&&(r&&(r+=" "),r+=t);return r}var pf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ow(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 iw=Error,sw=EvalError,aw=RangeError,lw=ReferenceError,mf=SyntaxError,ri=TypeError,cw=URIError,uw=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},gf=typeof Symbol<"u"&&Symbol,dw=uw,fw=function(){return typeof gf!="function"||typeof Symbol!="function"||typeof gf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:dw()},rl={__proto__:null,foo:{}},hw=Object,pw=function(){return{__proto__:rl}.foo===rl.foo&&!(rl instanceof hw)},mw="Function.prototype.bind called on incompatible ",gw=Object.prototype.toString,yw=Math.max,vw="[object Function]",yf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},bw=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},ww=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},xw=function(t){var n=this;if(typeof n!="function"||gw.apply(n)!==vw)throw new TypeError(mw+n);for(var r=bw(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,yf(r,arguments));return Object(u)===u?u:this}return n.apply(t,yf(r,arguments))},s=yw(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+ww(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},Sw=xw,ol=Function.prototype.bind||Sw,Tw=Function.prototype.call,Ew=Object.prototype.hasOwnProperty,Cw=ol,Pw=Cw.call(Tw,Ew),Se,kw=iw,Iw=sw,Ow=aw,Aw=lw,Gr=mf,Yr=ri,_w=cw,vf=Function,il=function(e){try{return vf('"use strict"; return ('+e+").constructor;")()}catch{}},vr=Object.getOwnPropertyDescriptor;if(vr)try{vr({},"")}catch{vr=null}var sl=function(){throw new Yr},Mw=vr?function(){try{return arguments.callee,sl}catch{try{return vr(arguments,"callee").get}catch{return sl}}}():sl,qr=fw(),Dw=pw(),vt=Object.getPrototypeOf||(Dw?function(e){return e.__proto__}:null),Kr={},Nw=typeof Uint8Array>"u"||!vt?Se:vt(Uint8Array),br={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":qr&&vt?vt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":Kr,"%AsyncGenerator%":Kr,"%AsyncGeneratorFunction%":Kr,"%AsyncIteratorPrototype%":Kr,"%Atomics%":typeof Atomics>"u"?Se:Atomics,"%BigInt%":typeof BigInt>"u"?Se:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":kw,"%eval%":eval,"%EvalError%":Iw,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":vf,"%GeneratorFunction%":Kr,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qr&&vt?vt(vt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qr||!vt?Se:vt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Se:Promise,"%Proxy%":typeof Proxy>"u"?Se:Proxy,"%RangeError%":Ow,"%ReferenceError%":Aw,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qr||!vt?Se:vt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qr&&vt?vt(""[Symbol.iterator]()):Se,"%Symbol%":qr?Symbol:Se,"%SyntaxError%":Gr,"%ThrowTypeError%":Mw,"%TypedArray%":Nw,"%TypeError%":Yr,"%Uint8Array%":typeof Uint8Array>"u"?Se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Se:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Se:Uint32Array,"%URIError%":_w,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(vt)try{null.error}catch(e){var Fw=vt(vt(e));br["%Error.prototype%"]=Fw}var Lw=function e(t){var n;if(t==="%AsyncFunction%")n=il("async function () {}");else if(t==="%GeneratorFunction%")n=il("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=il("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&vt&&(n=vt(o.prototype))}return br[t]=n,n},bf={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},oi=ol,fs=Pw,Vw=oi.call(Function.call,Array.prototype.concat),$w=oi.call(Function.apply,Array.prototype.splice),wf=oi.call(Function.call,String.prototype.replace),hs=oi.call(Function.call,String.prototype.slice),jw=oi.call(Function.call,RegExp.prototype.exec),Rw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Bw=/\\(\\)?/g,zw=function(t){var n=hs(t,0,1),r=hs(t,-1);if(n==="%"&&r!=="%")throw new Gr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Gr("invalid intrinsic syntax, expected opening `%`");var o=[];return wf(t,Rw,function(i,s,a,l){o[o.length]=a?wf(l,Bw,"$1"):s||i}),o},Ww=function(t,n){var r=t,o;if(fs(bf,r)&&(o=bf[r],r="%"+o[0]+"%"),fs(br,r)){var i=br[r];if(i===Kr&&(i=Lw(r)),typeof i>"u"&&!n)throw new Yr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Gr("intrinsic "+t+" does not exist!")},Zr=function(t,n){if(typeof t!="string"||t.length===0)throw new Yr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Yr('"allowMissing" argument must be a boolean');if(jw(/^%?[^%]*%?$/,t)===null)throw new Gr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=zw(t),o=r.length>0?r[0]:"",i=Ww("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],$w(r,Vw([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=hs(f,0,1),p=hs(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Gr("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,s="%"+o+"%",fs(br,s))a=br[s];else if(a!=null){if(!(f in a)){if(!n)throw new Yr("base intrinsic for "+t+" exists, but the property is not available.");return}if(vr&&u+1>=r.length){var m=vr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=fs(a,f),a=a[f];d&&!l&&(br[s]=a)}}return a},xf={exports:{}},al,Sf;function ll(){if(Sf)return al;Sf=1;var e=Zr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return al=t,al}var Hw=Zr,ps=Hw("%Object.getOwnPropertyDescriptor%",!0);if(ps)try{ps([],"length")}catch{ps=null}var Tf=ps,Ef=ll(),Uw=mf,Xr=ri,Cf=Tf,Gw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Xr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Xr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Cf&&Cf(t,n);if(Ef)Ef(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new Uw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},cl=ll(),Pf=function(){return!!cl};Pf.hasArrayLengthDefineBug=function(){if(!cl)return null;try{return cl([],"length",{value:1}).length!==1}catch{return!0}};var Yw=Pf,qw=Zr,kf=Gw,Kw=Yw(),If=Tf,Of=ri,Zw=qw("%Math.floor%"),Xw=function(t,n){if(typeof t!="function")throw new Of("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Zw(n)!==n)throw new Of("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&If){var s=If(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Kw?kf(t,"length",n,!0,!0):kf(t,"length",n)),t};(function(e){var t=ol,n=Zr,r=Xw,o=ri,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=ll(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,s,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(xf);var Qw=xf.exports,Af=Zr,_f=Qw,Jw=_f(Af("String.prototype.indexOf")),ex=function(t,n){var r=Af(t,!!n);return typeof r=="function"&&Jw(t,".prototype.")>-1?_f(r):r};const tx=ow(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ul=typeof Map=="function"&&Map.prototype,dl=Object.getOwnPropertyDescriptor&&ul?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ms=ul&&dl&&typeof dl.get=="function"?dl.get:null,Mf=ul&&Map.prototype.forEach,fl=typeof Set=="function"&&Set.prototype,hl=Object.getOwnPropertyDescriptor&&fl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,gs=fl&&hl&&typeof hl.get=="function"?hl.get:null,Df=fl&&Set.prototype.forEach,nx=typeof WeakMap=="function"&&WeakMap.prototype,ii=nx?WeakMap.prototype.has:null,rx=typeof WeakSet=="function"&&WeakSet.prototype,si=rx?WeakSet.prototype.has:null,ox=typeof WeakRef=="function"&&WeakRef.prototype,Nf=ox?WeakRef.prototype.deref:null,ix=Boolean.prototype.valueOf,sx=Object.prototype.toString,ax=Function.prototype.toString,lx=String.prototype.match,pl=String.prototype.slice,Wn=String.prototype.replace,cx=String.prototype.toUpperCase,Ff=String.prototype.toLowerCase,Lf=RegExp.prototype.test,Vf=Array.prototype.concat,un=Array.prototype.join,ux=Array.prototype.slice,$f=Math.floor,ml=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gl=Object.getOwnPropertySymbols,yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Qr||!0)?Symbol.toStringTag:null,jf=Object.prototype.propertyIsEnumerable,Rf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Bf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Lf.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-$f(-e):$f(e);if(r!==e){var o=String(r),i=pl.call(t,o.length+1);return Wn.call(o,n,"$&_")+"."+Wn.call(Wn.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Wn.call(t,n,"$&_")}var vl=tx,zf=vl.custom,Wf=Gf(zf)?zf:null,dx=function e(t,n,r,o){var i=n||{};if(Hn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Hn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Hn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Hn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Hn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return qf(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Bf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Bf(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return bl(t)?"[Array]":"[Object]";var d=Ox(i,r);if(typeof o>"u")o=[];else if(Yf(o,t)>=0)return"[Circular]";function f(L,P,_){if(P&&(o=ux.call(o),o.push(P)),_){var N={depth:i.depth};return Hn(i,"quoteStyle")&&(N.quoteStyle=i.quoteStyle),e(L,N,r+1,o)}return e(L,i,r+1,o)}if(typeof t=="function"&&!Uf(t)){var h=wx(t),p=ys(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(Gf(t)){var m=Qr?Wn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):yl.call(t);return typeof t=="object"&&!Qr?ai(m):m}if(Px(t)){for(var v="<"+Ff.call(String(t.nodeName)),y=t.attributes||[],x=0;x<y.length;x++)v+=" "+y[x].name+"="+Hf(fx(y[x].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Ff.call(String(t.nodeName))+">",v}if(bl(t)){if(t.length===0)return"[]";var g=ys(t,f);return d&&!Ix(g)?"["+xl(g,d)+"]":"[ "+un.call(g,", ")+" ]"}if(px(t)){var T=ys(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!jf.call(t,"cause")?"{ ["+String(t)+"] "+un.call(Vf.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(T,", ")+" }"}if(typeof t=="object"&&s){if(Wf&&typeof t[Wf]=="function"&&vl)return vl(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(xx(t)){var S=[];return Mf&&Mf.call(t,function(L,P){S.push(f(P,t,!0)+" => "+f(L,t))}),Kf("Map",ms.call(t),S,d)}if(Ex(t)){var E=[];return Df&&Df.call(t,function(L){E.push(f(L,t))}),Kf("Set",gs.call(t),E,d)}if(Sx(t))return wl("WeakMap");if(Cx(t))return wl("WeakSet");if(Tx(t))return wl("WeakRef");if(gx(t))return ai(f(Number(t)));if(vx(t))return ai(f(ml.call(t)));if(yx(t))return ai(ix.call(t));if(mx(t))return ai(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof pf<"u"&&t===pf)return"{ [object globalThis] }";if(!hx(t)&&!Uf(t)){var O=ys(t,f),k=Rf?Rf(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",C=!k&&Ot&&Object(t)===t&&Ot in t?pl.call(Un(t),8,-1):I?"Object":"",V=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",D=V+(C||I?"["+un.call(Vf.call([],C||[],I||[]),": ")+"] ":"");return O.length===0?D+"{}":d?D+"{"+xl(O,d)+"}":D+"{ "+un.call(O,", ")+" }"}return String(t)};function Hf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function fx(e){return Wn.call(String(e),/"/g,"&quot;")}function bl(e){return Un(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function hx(e){return Un(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Uf(e){return Un(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function px(e){return Un(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function mx(e){return Un(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function gx(e){return Un(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function yx(e){return Un(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function Gf(e){if(Qr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!yl)return!1;try{return yl.call(e),!0}catch{}return!1}function vx(e){if(!e||typeof e!="object"||!ml)return!1;try{return ml.call(e),!0}catch{}return!1}var bx=Object.prototype.hasOwnProperty||function(e){return e in this};function Hn(e,t){return bx.call(e,t)}function Un(e){return sx.call(e)}function wx(e){if(e.name)return e.name;var t=lx.call(ax.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Yf(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function xx(e){if(!ms||!e||typeof e!="object")return!1;try{ms.call(e);try{gs.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Sx(e){if(!ii||!e||typeof e!="object")return!1;try{ii.call(e,ii);try{si.call(e,si)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Tx(e){if(!Nf||!e||typeof e!="object")return!1;try{return Nf.call(e),!0}catch{}return!1}function Ex(e){if(!gs||!e||typeof e!="object")return!1;try{gs.call(e);try{ms.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Cx(e){if(!si||!e||typeof e!="object")return!1;try{si.call(e,si);try{ii.call(e,ii)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Px(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function qf(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return qf(pl.call(e,0,t.maxStringLength),t)+r}var o=Wn.call(Wn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,kx);return Hf(o,"single",t)}function kx(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":"")+cx.call(t.toString(16))}function ai(e){return"Object("+e+")"}function wl(e){return e+" { ? }"}function Kf(e,t,n,r){var o=r?xl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function Ix(e){for(var t=0;t<e.length;t++)if(Yf(e[t],`
2
+ `)>=0)return!1;return!0}function Ox(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=un.call(Array(e.indent+1)," ");else return null;return{base:n,prev:un.call(Array(t+1),n)}}function xl(e,t){if(e.length===0)return"";var n=`
3
3
  `+t.prev+t.base;return n+un.call(e,","+n)+`
4
- `+t.prev}function hs(e,t){var n=yl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Wn(e,o)?t(e[o],e):""}var i=typeof pl=="function"?pl(e):[],s;if(Jr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Wn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Jr&&s["$"+l]instanceof Symbol||(Of.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof pl=="function")for(var c=0;c<i.length;c++)_f.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var zf=Xr,eo=Vw,hx=qw,px=Zo,ps=zf("%WeakMap%",!0),ms=zf("%Map%",!0),mx=eo("WeakMap.prototype.get",!0),gx=eo("WeakMap.prototype.set",!0),yx=eo("WeakMap.prototype.has",!0),vx=eo("Map.prototype.get",!0),bx=eo("Map.prototype.set",!0),wx=eo("Map.prototype.has",!0),wl=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},xx=function(e,t){var n=wl(e,t);return n&&n.value},Tx=function(e,t,n){var r=wl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Sx=function(e,t){return!!wl(e,t)},Ex=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new px("Side channel does not contain "+hx(i))},get:function(i){if(ps&&i&&(typeof i=="object"||typeof i=="function")){if(t)return mx(t,i)}else if(ms){if(n)return vx(n,i)}else if(r)return xx(r,i)},has:function(i){if(ps&&i&&(typeof i=="object"||typeof i=="function")){if(t)return yx(t,i)}else if(ms){if(n)return wx(n,i)}else if(r)return Sx(r,i);return!1},set:function(i,s){ps&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new ps),gx(t,i,s)):ms?(n||(n=new ms),bx(n,i,s)):(r||(r={key:{},next:null}),Tx(r,i,s))}};return o},Cx=String.prototype.replace,Px=/%20/g,xl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Wf={default:xl.RFC3986,formatters:{RFC1738:function(e){return Cx.call(e,Px,"+")},RFC3986:function(e){return String(e)}},RFC1738:xl.RFC1738,RFC3986:xl.RFC3986},kx=Wf,Tl=Object.prototype.hasOwnProperty,br=Array.isArray,dn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ox=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(br(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Hf=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},Ix=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Tl.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return br(t)&&!br(n)&&(o=Hf(t,r)),br(t)&&br(n)?(n.forEach(function(i,s){if(Tl.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Tl.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},Ax=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},_x=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Dx=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===kx.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+dn[c];continue}if(c<2048){a=a+(dn[192|c>>6]+dn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(dn[224|c>>12]+dn[128|c>>6&63]+dn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=dn[240|c>>18]+dn[128|c>>12&63]+dn[128|c>>6&63]+dn[128|c&63]}return a},Mx=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return Ox(n),t},Nx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Fx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Lx=function(t,n){return[].concat(t,n)},Vx=function(t,n){if(br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Uf={arrayToObject:Hf,assign:Ax,combine:Lx,compact:Mx,decode:_x,encode:Dx,isBuffer:Fx,isRegExp:Nx,maybeMap:Vx,merge:Ix},$x=Uf,Gf=Wf,Rx=Date.prototype.toISOString,Yf=Gf.default;$x.encode,Gf.formatters[Yf];var jx=Uf;jx.decode;var qf=e=>Array.isArray(e),Sl=e=>e===void 0,El=e=>e===null,Bx=Function.bind.call(Function.call,Object.prototype.toString),zx=e=>!!e&&Bx(e)==="[object Error]"||e instanceof Error,Kf=(e,t)=>e instanceof t,Wx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Hx=e=>Object.prototype.toString.call(e)==="[object Date]"&&Kf(e,Date),kn={array:qf,date:Hx,empty:e=>El(e)||Sl(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:Kf,isError:zx,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>El(e)||Sl(e),null:El,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!qf(e)&&typeof e=="object",primitive:Wx,string:e=>typeof e=="string",undefined:Sl},Cl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const i=`${+o[0]}`===o[0];e[r]=i?[]:{}}if(typeof e[r]!="object"){const i=`${+o[0]}`===o[0];e[r]=Cl(i?[]:{},o,n)}else e[r]=Cl(e[r],o,n)}else e[r]=n;return e},Ux=e=>Object.keys(e),Gx=e=>e.replace("[",".").replace("]","").split("."),Zf=(e,t,n)=>{const r=Array.isArray(t)?t:Gx(t),o=structuredClone(e);return Cl(o,r,n),o};const Pl="-";function Yx(e){const t=Kx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Pl);return a[0]===""&&a.length!==1&&a.shift(),Xf(a,t)||qx(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function Xf(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Xf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Pl);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Qf=/^\[(.+)\]$/;function qx(e){if(Qf.test(e)){const t=Qf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Kx(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Xx(Object.entries(e.classGroups),n).forEach(([i,s])=>{kl(s,r,i,t)}),r}function kl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Jf(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Zx(o)){kl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{kl(s,Jf(t,i),n,r)})})}function Jf(e,t){let n=e;return t.split(Pl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Zx(e){return e.isThemeGetter}function Xx(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function Qx(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const eh="!";function Jx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const l=[];let c=0,u=0,d;for(let g=0;g<a.length;g++){let v=a[g];if(c===0){if(v===o&&(r||a.slice(g,g+i)===t)){l.push(a.slice(u,g)),u=g+i;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(eh),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:s})}:s}function e1(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 t1(e){return{cache:Qx(e.cacheSize),parseClassName:Jx(e),...Yx(e)}}const n1=/\s+/;function r1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(n1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:s};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:s};d=!1}const h=e1(a).join(":");return{isTailwindClass:!0,modifierId:l?h+eh:h,classGroupId:f,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function o1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=th(t))&&(r&&(r+=" "),r+=n);return r}function th(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=th(e[r]))&&(n&&(n+=" "),n+=t);return n}function i1(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=t1(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=r1(l,n);return o(l,u),u}return function(){return i(o1.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const nh=/^\[(?:([a-z-]+):)?(.+)\]$/i,s1=/^\d+\/\d+$/,a1=new Set(["px","full","screen"]),l1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c1=/\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$/,u1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,d1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function On(e){return wr(e)||a1.has(e)||s1.test(e)}function Un(e){return to(e,"length",w1)}function wr(e){return!!e&&!Number.isNaN(Number(e))}function gs(e){return to(e,"number",wr)}function ti(e){return!!e&&Number.isInteger(Number(e))}function h1(e){return e.endsWith("%")&&wr(e.slice(0,-1))}function ve(e){return nh.test(e)}function Gn(e){return l1.test(e)}const p1=new Set(["length","size","percentage"]);function m1(e){return to(e,p1,rh)}function g1(e){return to(e,"position",rh)}const y1=new Set(["image","url"]);function v1(e){return to(e,y1,T1)}function b1(e){return to(e,"",x1)}function ni(){return!0}function to(e,t,n){const r=nh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function w1(e){return c1.test(e)&&!u1.test(e)}function rh(){return!1}function x1(e){return d1.test(e)}function T1(e){return f1.test(e)}function S1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),i=Ue("borderRadius"),s=Ue("borderSpacing"),a=Ue("borderWidth"),l=Ue("contrast"),c=Ue("grayscale"),u=Ue("hueRotate"),d=Ue("invert"),f=Ue("gap"),h=Ue("gradientColorStops"),p=Ue("gradientColorStopPositions"),m=Ue("inset"),g=Ue("margin"),v=Ue("opacity"),w=Ue("padding"),y=Ue("saturate"),S=Ue("scale"),T=Ue("sepia"),E=Ue("skew"),P=Ue("space"),D=Ue("translate"),_=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ve,t],F=()=>[ve,t],$=()=>["",On,Un],C=()=>["auto",wr,ve],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],Y=()=>["","0",ve],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[wr,gs],Z=()=>[wr,ve];return{cacheSize:500,separator:":",theme:{colors:[ni],spacing:[On,Un],blur:["none","",Gn,ve],brightness:R(),borderColor:[e],borderRadius:["none","","full",Gn,ve],borderSpacing:F(),borderWidth:$(),contrast:R(),grayscale:Y(),hueRotate:Z(),invert:Y(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[h1,Un],inset:V(),margin:V(),opacity:R(),padding:F(),saturate:R(),scale:R(),sepia:Y(),skew:Z(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Gn]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...O(),ve]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],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",ti,ve]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:Y()}],shrink:[{shrink:Y()}],order:[{order:["first","last","none",ti,ve]}],"grid-cols":[{"grid-cols":[ni]}],"col-start-end":[{col:["auto",{span:["full",ti,ve]},ve]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ni]}],"row-start-end":[{row:["auto",{span:[ti,ve]},ve]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Gn]},Gn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gn,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gs]}],"font-family":[{font:[ni]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",wr,gs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",On,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",On,Un]}],"underline-offset":[{"underline-offset":["auto",On,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...O(),g1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",m1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},v1]}],"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:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:M()}],"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:["",...M()]}],"outline-offset":[{"outline-offset":[On,ve]}],"outline-w":[{outline:[On,Un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[On,Un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gn,b1]}],"shadow-color":[{shadow:[ni]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ti,ve]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[On,Un,gs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const E1=i1(S1),Ol=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},C1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),P1=e=>kn.function(e),Xe=(...e)=>E1(R0(e)),ys=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},vs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},no=b.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),k1=as("inline-flex duration-700 enabled:hover:bg-opacity-80 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",primary:"bg-primary text-primary-foreground",main:"bg-primary text-primary-foreground",warn:"bg-warn text-warn-foreground",danger:"bg-danger text-danger-foreground",secondary:"bg-secondary-background text-secondary-foreground disabled:text-secondary-subtle",success:"bg-success text-success-foreground",info:"bg-info text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),xr=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(no,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:Xe(k1({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),O1=e=>x.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>x.jsx("li",{className:"flex flex-1",children:x.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:Xe("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),I1=as("inline-flex rounded-pill gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-background text-secondary-foreground",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),A1=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:i,...s},a){return x.jsxs(no,{...s,ref:a,"data-theme":o,as:s.as??"span",className:Xe(I1({size:i,theme:o}),t),children:[s.children,n]})}),ro=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),bs=b.createContext({}),ws=b.createContext(null),Il=typeof document<"u",xs=Il?b.useLayoutEffect:b.useEffect,oh=b.createContext({strict:!1}),Ts=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ih="data-"+Ts("framerAppearId"),_1={skipAnimations:!1,useManualTiming:!1};function D1(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&i.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const Ss=["read","resolveKeyframes","update","preRender","render","postRender"],M1=40;function sh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ss.reduce((v,w)=>(v[w]=D1(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=s,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,M1),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Ss.reduce((v,w)=>{const y=s[w];return v[w]=(S,T=!1,E=!1)=>(n||p(),y.schedule(S,T,E)),v},{}),cancel:v=>{for(let w=0;w<Ss.length;w++)s[Ss[w]].cancel(v)},state:o,steps:s}}const{schedule:Al,cancel:GL}=sh(queueMicrotask,!1);function oo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const ah=b.createContext({});let lh=!1;function N1(e,t,n,r,o){const{visualElement:i}=b.useContext(bs),s=b.useContext(oh),a=b.useContext(ws),l=b.useContext(ro).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(ah);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&L1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const f=b.useRef(!!(n[ih]&&!window.HandoffComplete));return xs(()=>{u&&(u.updateFeatures(),Al.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,lh||(lh=!0,queueMicrotask(F1))))}),u}function F1(){window.HandoffComplete=!0}function L1(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ch(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&oo(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ch(e){if(e)return e.options.allowProjection!==!1?e.projection:ch(e.parent)}function V1(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):oo(n)&&(n.current=r))},[t])}function ri(e){return typeof e=="string"||Array.isArray(e)}function oi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const _l=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dl=["initial",..._l];function Es(e){return oi(e.animate)||Dl.some(t=>ri(e[t]))}function uh(e){return!!(Es(e)||e.variants)}function $1(e,t){if(Es(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ri(n)?n:void 0,animate:ri(r)?r:void 0}}return e.inherit!==!1?t:{}}function R1(e){const{initial:t,animate:n}=$1(e,b.useContext(bs));return b.useMemo(()=>({initial:t,animate:n}),[dh(t),dh(n)])}function dh(e){return Array.isArray(e)?e.join(" "):e}const fh={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"]},io={};for(const e in fh)io[e]={isEnabled:t=>fh[e].some(n=>!!t[n])};function j1(e){for(const t in e)io[t]={...io[t],...e[t]}}const ii=b.createContext({}),B1=Symbol.for("motionComponentSymbol"),wt=e=>e;let so=wt,tn=wt;process.env.NODE_ENV!=="production"&&(so=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});function z1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&j1(e);function i(a,l){let c;const u={...b.useContext(ro),...a,layoutId:W1(a)},{isStatic:d}=u,f=R1(a),h=r(a,d);if(!d&&Il){H1(u,e);const p=U1(u);c=p.MeasureLayout,f.visualElement=N1(o,h,u,t,p.ProjectionNode)}return x.jsxs(bs.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,V1(h,f.visualElement,l),h,d,f.visualElement)]})}const s=b.forwardRef(i);return s[B1]=o,s}function W1({layoutId:e}){const t=b.useContext(ii).id;return t&&e!==void 0?t+"-"+e:e}function H1(e,t){const n=b.useContext(oh).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?so(!1,r):tn(!1,r)}}function U1(e){const{drag:t,layout:n}=io;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function G1(e){function t(r,o={}){return z1(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const Y1=["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 Ml(e){return typeof e!="string"||e.includes("-")?!1:!!(Y1.indexOf(e)>-1||/[A-Z]/u.test(e))}const Cs={};function q1(e){Object.assign(Cs,e)}const si=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=new Set(si);function hh(e,{layout:t,layoutId:n}){return Yn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Cs[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),K1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Z1=si.length;function X1(e,t,n){let r="";for(let o=0;o<Z1;o++){const i=si[o];if(e[i]!==void 0){const s=K1[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const ph=e=>t=>typeof t=="string"&&t.startsWith(e),mh=ph("--"),Q1=ph("var(--"),Nl=e=>Q1(e)?J1.test(e.split("/*")[0].trim()):!1,J1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,eT=(e,t)=>t&&typeof e=="number"?t.transform(e):e,qn=(e,t,n)=>n>t?t:n<e?e:n,ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ai={...ao,transform:e=>qn(0,1,e)},Ps={...ao,default:1},li=e=>Math.round(e*1e5)/1e5,Fl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,tT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,nT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ci(e){return typeof e=="string"}function rT(e){return e==null}const ui=e=>({test:t=>ci(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=ui("deg"),fn=ui("%"),fe=ui("px"),oT=ui("vh"),iT=ui("vw"),gh={...fn,parse:e=>fn.parse(e)/100,transform:e=>fn.transform(e*100)},yh={...ao,transform:Math.round},vh={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scale:Ps,scaleX:Ps,scaleY:Ps,scaleZ:Ps,skew:Kn,skewX:Kn,skewY:Kn,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:ai,originX:gh,originY:gh,originZ:fe,zIndex:yh,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:ai,strokeOpacity:ai,numOctaves:yh};function Ll(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(mh(u)){o[u]=d;continue}const f=vh[u],h=eT(d,f);if(Yn.has(u)){if(a=!0,i[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=X1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=s;r.transformOrigin=`${u} ${d} ${f}`}}const Vl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bh(e,t,n){for(const r in t)!xt(t[r])&&!hh(r,n)&&(e[r]=t[r])}function sT({transformTemplate:e},t){return b.useMemo(()=>{const n=Vl();return Ll(n,t,e),Object.assign({},n.vars,n.style)},[t])}function aT(e,t){const n=e.style||{},r={};return bh(r,n,e),Object.assign(r,sT(e,t)),r}function lT(e,t){const n={},r=aT(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 cT=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 ks(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cT.has(e)}let wh=e=>!ks(e);function xh(e){e&&(wh=t=>t.startsWith("on")?!ks(t):e(t))}try{xh(require("@emotion/is-prop-valid").default)}catch{}function uT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(wh(o)||n===!0&&ks(o)||!t&&!ks(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Th(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function dT(e,t,n){const r=Th(t,e.x,e.width),o=Th(n,e.y,e.height);return`${r} ${o}`}const fT={offset:"stroke-dashoffset",array:"stroke-dasharray"},hT={offset:"strokeDashoffset",array:"strokeDasharray"};function pT(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?fT:hT;e[i.offset]=fe.transform(-r);const s=fe.transform(t),a=fe.transform(n);e[i.array]=`${s} ${a}`}function $l(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ll(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||i!==void 0||h.transform)&&(h.transformOrigin=dT(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&pT(f,s,a,l,!1)}const Sh=()=>({...Vl(),attrs:{}}),Rl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function mT(e,t,n,r){const o=b.useMemo(()=>{const i=Sh();return $l(i,t,Rl(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};bh(i,e.style,e),o.style={...i,...o.style}}return o}function gT(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Ml(n)?mT:lT)(r,i,s,n),c=uT(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=b.useMemo(()=>xt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:f})}}function Eh(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Ch=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 Ph(e,t,n,r){Eh(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ch.has(o)?o:Ts(o),t.attrs[o])}function jl(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(xt(o[s])||t.style&&xt(t.style[s])||hh(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function kh(e,t,n){const r=jl(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const i=si.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Oh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Bl(e,t,n,r){if(typeof t=="function"){const[o,i]=Oh(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Oh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function Zn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const zl=e=>Array.isArray(e),yT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),vT=e=>zl(e)?e[e.length-1]||0:e;function Os(e){const t=xt(e)?e.get():e;return yT(t)?t.toValue():t}const Ih=new Set(["opacity","clipPath","filter","transform"]);function Ah(e){if(Yn.has(e))return"transform";if(Ih.has(e))return Ts(e)}function Is(e,t){e.indexOf(t)===-1&&e.push(t)}function As(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function bT([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}function wT({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:TT(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const _h=e=>(t,n)=>{const r=b.useContext(bs),o=b.useContext(ws),i=()=>wT(e,t,r,o,n);return n?i():Zn(i)};function xT(e,t){const n=Ah(t);n&&Is(e,n)}function Dh(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=Bl(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function TT(e,t,n,r,o){var i;const s={},a=[],l=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(e,{});for(const g in c)s[g]=Os(c[g]);let{initial:u,animate:d}=e;const f=Es(e),h=uh(e);t&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!oi(m)&&Dh(e,m,(g,v)=>{for(const w in g){let y=g[w];if(Array.isArray(y)){const S=p?y.length-1:0;y=y[S]}y!==null&&(s[w]=y)}for(const w in v)s[w]=v[w]}),l&&(d&&u!==!1&&!oi(d)&&Dh(e,d,g=>{for(const v in g)xT(a,v)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:De,cancel:hn,state:Tt,steps:Wl}=sh(typeof requestAnimationFrame<"u"?requestAnimationFrame:wt,!0),ST={useVisualState:_h({scrapeMotionValuesFromProps:kh,createRenderState:Sh,onMount:(e,t,{renderState:n,latestValues:r})=>{De.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),De.render(()=>{$l(n,r,Rl(t.tagName),e.transformTemplate),Ph(t,n)})}})},ET={useVisualState:_h({applyWillChange:!0,scrapeMotionValuesFromProps:jl,createRenderState:Vl})};function CT(e,{forwardMotionProps:t=!1},n,r){return{...Ml(e)?ST:ET,preloadedFeatures:n,useRender:gT(t),createVisualElement:r,Component:e}}function In(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Mh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function _s(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const PT=e=>t=>Mh(t)&&e(t,_s(t));function An(e,t,n,r){return In(e,t,PT(n),r)}const kT=(e,t)=>n=>t(e(n)),_n=(...e)=>e.reduce(kT);function Nh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Fh=Nh("dragHorizontal"),Lh=Nh("dragVertical");function Vh(e){let t=!1;if(e==="y")t=Lh();else if(e==="x")t=Fh();else{const n=Fh(),r=Lh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function $h(){const e=Vh(!0);return e?(e(),!1):!0}class Xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Rh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||$h())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&De.postRender(()=>l(i,s))};return An(e.current,n,o,{passive:!e.getProps()[r]})}class OT extends Xn{mount(){this.unmount=_n(Rh(this.node,!0),Rh(this.node,!1))}unmount(){}}class IT extends Xn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_n(In(this.node.current,"focus",()=>this.onFocus()),In(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const jh=(e,t)=>t?e===t?!0:jh(e,t.parentElement):!1;function Hl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,_s(n))}class AT extends Xn{constructor(){super(...arguments),this.removeStartListeners=wt,this.removeEndListeners=wt,this.removeAccessibleListeners=wt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=An(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!jh(this.node.current,a.target)?u:c;f&&De.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=An(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=_n(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Hl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&De.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=In(this.node.current,"keyup",s),Hl("down",(a,l)=>{this.startPress(a,l)})},n=In(this.node.current,"keydown",t),r=()=>{this.isPressing&&Hl("cancel",(i,s)=>this.cancelPress(i,s))},o=In(this.node.current,"blur",r);this.removeAccessibleListeners=_n(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&De.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$h()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=An(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=In(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_n(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ul=new WeakMap,Gl=new WeakMap,_T=e=>{const t=Ul.get(e.target);t&&t(e)},DT=e=>{e.forEach(_T)};function MT({root:e,...t}){const n=e||document;Gl.has(n)||Gl.set(n,{});const r=Gl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(DT,{root:e,...t})),r[o]}function NT(e,t,n){const r=MT(t);return Ul.set(e,n),r.observe(e),()=>{Ul.delete(e),r.unobserve(e)}}const FT={some:0,all:1};class LT extends Xn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:FT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return NT(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(VT(t,n))&&this.startObserver()}unmount(){}}function VT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $T={inView:{Feature:LT},tap:{Feature:AT},focus:{Feature:IT},hover:{Feature:OT}};function Bh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Ds(e,t,n){const r=e.getProps();return Bl(r,t,n!==void 0?n:r.custom,e)}const Dn=e=>e*1e3,Mn=e=>e/1e3,RT={type:"spring",stiffness:500,damping:25,restSpeed:10},jT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BT={type:"keyframes",duration:.8},zT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WT=(e,{keyframes:t})=>t.length>2?BT:Yn.has(e)?e.startsWith("scale")?jT(t[1]):RT:zT;function HT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Yl(e,t){return e[t]||e.default||e}const UT=e=>e!==null;function Ms(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(UT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Ns;function GT(){Ns=void 0}const Qn={now:()=>(Ns===void 0&&Qn.set(Tt.isProcessing||_1.useManualTiming?Tt.timestamp:performance.now()),Ns),set:e=>{Ns=e,queueMicrotask(GT)}},zh=e=>/^0[^.\s]+$/u.test(e);function YT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||zh(e):!0}const Wh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),qT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function KT(e){const t=qT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const ZT=4;function Hh(e,t,n=1){tn(n<=ZT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=KT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Wh(s)?parseFloat(s):s}return Nl(o)?Hh(o,t,n+1):o}const XT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Uh=e=>e===ao||e===fe,Gh=(e,t)=>parseFloat(e.split(", ")[t]),Yh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Gh(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Gh(i[1],e):0}},QT=new Set(["x","y","z"]),JT=si.filter(e=>!QT.has(e));function eS(e){const t=[];return JT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const lo={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:Yh(4,13),y:Yh(5,14)};lo.translateX=lo.x,lo.translateY=lo.y;const qh=e=>t=>t.test(e),Kh=[ao,fe,fn,Kn,iT,oT,{test:e=>e==="auto",parse:e=>e}],Zh=e=>Kh.find(qh(e)),Tr=new Set;let ql=!1,Kl=!1;function Xh(){if(Kl){const e=Array.from(Tr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=eS(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Kl=!1,ql=!1,Tr.forEach(e=>e.complete()),Tr.clear()}function Qh(){Tr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Kl=!0)})}function tS(){Qh(),Xh()}class Zl{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Tr.add(this),ql||(ql=!0,De.read(Qh),De.resolveKeyframes(Xh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Tr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Tr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xl=(e,t)=>n=>!!(ci(n)&&nT.test(n)&&n.startsWith(e)||t&&!rT(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jh=(e,t,n)=>r=>{if(!ci(r))return r;const[o,i,s,a]=r.match(Fl);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},nS=e=>qn(0,255,e),Ql={...ao,transform:e=>Math.round(nS(e))},Sr={test:Xl("rgb","red"),parse:Jh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ql.transform(e)+", "+Ql.transform(t)+", "+Ql.transform(n)+", "+li(ai.transform(r))+")"};function rS(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 Jl={test:Xl("#"),parse:rS,transform:Sr.transform},co={test:Xl("hsl","hue"),parse:Jh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fn.transform(li(t))+", "+fn.transform(li(n))+", "+li(ai.transform(r))+")"},It={test:e=>Sr.test(e)||Jl.test(e)||co.test(e),parse:e=>Sr.test(e)?Sr.parse(e):co.test(e)?co.parse(e):Jl.parse(e),transform:e=>ci(e)?e:e.hasOwnProperty("red")?Sr.transform(e):co.transform(e)};function oS(e){var t,n;return isNaN(e)&&ci(e)&&(((t=e.match(Fl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(tT))===null||n===void 0?void 0:n.length)||0)>0}const ep="number",tp="color",iS="var",sS="var(",np="${}",aS=/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 di(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(aS,l=>(It.test(l)?(r.color.push(i),o.push(tp),n.push(It.parse(l))):l.startsWith(sS)?(r.var.push(i),o.push(iS),n.push(l)):(r.number.push(i),o.push(ep),n.push(parseFloat(l))),++i,np)).split(np);return{values:n,split:a,indexes:r,types:o}}function rp(e){return di(e).values}function op(e){const{split:t,types:n}=di(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===ep?i+=li(o[s]):a===tp?i+=It.transform(o[s]):i+=o[s]}return i}}const lS=e=>typeof e=="number"?0:e;function cS(e){const t=rp(e);return op(e)(t.map(lS))}const Jn={test:oS,parse:rp,createTransformer:op,getAnimatableNone:cS},uS=new Set(["brightness","contrast","saturate","opacity"]);function dS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Fl)||[];if(!r)return e;const o=n.replace(r,"");let i=uS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const fS=/\b([a-z-]*)\(.*?\)/gu,ec={...Jn,getAnimatableNone:e=>{const t=e.match(fS);return t?t.map(dS).join(" "):e}},hS={...vh,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:ec,WebkitFilter:ec},tc=e=>hS[e];function ip(e,t){let n=tc(e);return n!==ec&&(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pS=new Set(["auto","none","0"]);function mS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!pS.has(i)&&di(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=ip(n,o)}class sp extends Zl{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Nl(c))){const u=Hh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!XT.has(r)||t.length!==2)return;const[o,i]=t,s=Zh(o),a=Zh(i);if(s!==a)if(Uh(s)&&Uh(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++)YT(t[o])&&r.push(o);r.length&&mS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=lo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=lo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function ap(e){let t;return()=>(t===void 0&&(t=e()),t)}const lp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jn.test(e)||e==="0")&&!e.startsWith("url("));function gS(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 yS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=lp(o,t),a=lp(i,t);return so(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:gS(e)||n==="spring"&&r}class cp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&tS(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!yS(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ms(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function up(e,t){return t?e*(1e3/t):0}const vS=5;function dp(e,t,n){const r=Math.max(t-vS,0);return up(n-e(r),t-r)}const nc=.001,bS=.01,fp=10,wS=.05,xS=1;function TS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;so(e<=Dn(fp),"Spring duration must be 10 seconds or less");let s=1-t;s=qn(wS,xS,s),e=qn(bS,fp,Mn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,h=rc(c,s),p=Math.exp(-d);return nc-f/h*p},i=c=>{const d=c*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=rc(Math.pow(c,2),s);return(-o(c)+nc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-nc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ES(o,i,a);if(e=Dn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const SS=12;function ES(e,t,n){let r=n;for(let o=1;o<SS;o++)r=r-e(r)/t(r);return r}function rc(e,t){return e*Math.sqrt(1-t*t)}const CS=["duration","bounce"],PS=["stiffness","damping","mass"];function hp(e,t){return t.some(n=>e[n]!==void 0)}function kS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!hp(e,PS)&&hp(e,CS)){const n=TS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function pp({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=kS({...r,velocity:-Mn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=i-o,g=Mn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let w;if(p<1){const y=rc(g,p);w=S=>{const T=Math.exp(-p*g*S);return i-T*((h+p*g*m)/y*Math.sin(y*S)+m*Math.cos(y*S))}}else if(p===1)w=y=>i-Math.exp(-g*y)*(m+(h+g*m)*y);else{const y=g*Math.sqrt(p*p-1);w=S=>{const T=Math.exp(-p*g*S),E=Math.min(y*S,300);return i-T*((h+p*g*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:f&&u||null,next:y=>{const S=w(y);if(f)s.done=y>=u;else{let T=h;y!==0&&(p<1?T=dp(w,y,S):T=0);const E=Math.abs(T)<=n,P=Math.abs(i-S)<=t;s.done=E&&P}return s.value=s.done?i:S,s}}}function mp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=D=>a!==void 0&&D<a||l!==void 0&&D>l,p=D=>a===void 0?l:l===void 0||Math.abs(a-D)<Math.abs(l-D)?a:l;let m=n*t;const g=d+m,v=s===void 0?g:s(g);v!==g&&(m=v-d);const w=D=>-m*Math.exp(-D/r),y=D=>v+w(D),S=D=>{const _=w(D),I=y(D);f.done=Math.abs(_)<=c,f.value=f.done?v:I};let T,E;const P=D=>{h(f.value)&&(T=D,E=pp({keyframes:[f.value,p(f.value)],velocity:dp(y,D,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:D=>{let _=!1;return!E&&T===void 0&&(_=!0,S(D),P(D)),T!==void 0&&D>=T?E.next(D-T):(!_&&S(D),f)}}}const gp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,OS=1e-7,IS=12;function AS(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=gp(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>OS&&++a<IS);return s}function fi(e,t,n,r){if(e===t&&n===r)return wt;const o=i=>AS(i,0,1,e,n);return i=>i===0||i===1?i:gp(o(i),t,r)}const _S=fi(.42,0,1,1),DS=fi(0,0,.58,1),yp=fi(.42,0,.58,1),MS=e=>Array.isArray(e)&&typeof e[0]!="number",vp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,bp=e=>t=>1-e(1-t),oc=e=>1-Math.sin(Math.acos(e)),wp=bp(oc),NS=vp(oc),xp=fi(.33,1.53,.69,.99),ic=bp(xp),FS=vp(ic),Tp={linear:wt,easeIn:_S,easeInOut:yp,easeOut:DS,circIn:oc,circInOut:NS,circOut:wp,backIn:ic,backInOut:FS,backOut:xp,anticipate:e=>(e*=2)<1?.5*ic(e):.5*(2-Math.pow(2,-10*(e-1)))},Sp=e=>{if(Array.isArray(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return fi(t,n,r,o)}else if(typeof e=="string")return tn(Tp[e]!==void 0,`Invalid easing type '${e}'`),Tp[e];return e},hi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function sc(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 LS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=sc(l,a,e+1/3),i=sc(l,a,e),s=sc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Fs(e,t){return n=>n>0?t:e}const ac=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},VS=[Jl,Sr,co],$S=e=>VS.find(t=>t.test(e));function Ep(e){const t=$S(e);if(so(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===co&&(n=LS(n)),n}const Cp=(e,t)=>{const n=Ep(e),r=Ep(t);if(!n||!r)return Fs(e,t);const o={...n};return i=>(o.red=ac(n.red,r.red,i),o.green=ac(n.green,r.green,i),o.blue=ac(n.blue,r.blue,i),o.alpha=Ze(n.alpha,r.alpha,i),Sr.transform(o))},lc=new Set(["none","hidden"]);function RS(e,t){return lc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jS(e,t){return n=>Ze(e,t,n)}function cc(e){return typeof e=="number"?jS:typeof e=="string"?Nl(e)?Fs:It.test(e)?Cp:WS:Array.isArray(e)?Pp:typeof e=="object"?It.test(e)?Cp:BS:Fs}function Pp(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>cc(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function BS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=cc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function zS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const WS=(e,t)=>{const n=Jn.createTransformer(t),r=di(e),o=di(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?lc.has(e)&&!o.values.length||lc.has(t)&&!r.values.length?RS(e,t):_n(Pp(zS(r,o),o.values),n):(so(!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.`),Fs(e,t))};function kp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):cc(e)(e,t)}function HS(e,t,n){const r=[],o=n||kp,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||wt:t;a=_n(l,a)}r.push(a)}return r}function Op(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(tn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=HS(t,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=hi(e[u],e[u+1],c);return s[u](d)};return n?c=>l(qn(e[0],e[i-1],c)):l}function US(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=hi(0,t,r);e.push(Ze(n,1,o))}}function GS(e){const t=[0];return US(t,e.length-1),t}function YS(e,t){return e.map(n=>n*t)}function qS(e,t){return e.map(()=>t||yp).splice(0,e.length-1)}function Ls({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=MS(r)?r.map(Sp):Sp(r),i={done:!1,value:t[0]},s=YS(n&&n.length===t.length?n:GS(t),e),a=Op(s,t,{ease:Array.isArray(o)?o:qS(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Ip=2e4;function KS(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ip;)t+=n,r=e.next(t);return t>=Ip?1/0:t}const ZS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>hn(t),now:()=>Tt.isProcessing?Tt.timestamp:Qn.now()}},XS={decay:mp,inertia:mp,tween:Ls,keyframes:Ls,spring:pp},QS=e=>e/100;class uc extends cp{constructor({KeyframeResolver:t=Zl,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new t(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=XS[n]||Ls;let l,c;a!==Ls&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&tn(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=_n(QS,kp(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=KS(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:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,S=i;if(h){const D=Math.min(this.currentTime,u)/d;let _=Math.floor(D),I=D%1;!I&&D>=1&&(I=1),I===1&&_--,_=Math.min(_,h+1),!!(_%2)&&(p==="reverse"?(I=1-I,m&&(I-=m/d)):p==="mirror"&&(S=s)),y=qn(0,1,I)*d}const T=w?{done:!1,value:l[0]}:S.next(y);a&&(T.value=a(T.value));let{done:E}=T;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return P&&o!==void 0&&(T.value=Ms(l,this.options,o)),g&&g(T.value),P&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Mn(t.calculatedDuration):0}get time(){return Mn(this.currentTime)}set time(t){t=Dn(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=Mn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=ZS,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ap=e=>Array.isArray(e)&&typeof e[0]=="number";function _p(e){return!!(!e||typeof e=="string"&&e in dc||Ap(e)||Array.isArray(e)&&e.every(_p))}const pi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pi([0,.65,.55,1]),circOut:pi([.55,0,1,.45]),backIn:pi([.31,.01,.66,-.59]),backOut:pi([.33,1.53,.69,.99])};function JS(e){return Dp(e)||dc.easeOut}function Dp(e){if(e)return Ap(e)?pi(e):Array.isArray(e)?e.map(JS):dc[e]}function eE(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Dp(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const tE=ap(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vs=10,nE=2e4;function rE(e){return e.type==="spring"||!_p(e.ease)}function oE(e,t){const n=new uc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<nE;)r=n.sample(i),o.push(r.value),i+=Vs;return{times:void 0,keyframes:o,duration:i-Vs,ease:"linear"}}class Mp extends cp{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new sp(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(rE(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=oE(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=eE(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=Qn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ms(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Mn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Mn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Dn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return wt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return wt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...f}=this.options,h=new uc({...f,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=Dn(this.time);c.setWithVelocity(h.sample(p-Vs).value,h.sample(p).value,Vs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return tE()&&r&&Ih.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function iE(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return De.update(r,!0),()=>hn(r)}const sE=ap(()=>window.ScrollTimeline!==void 0);class aE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(sE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),iE(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const fc=(e,t,n,r={},o,i,s)=>a=>{const l=Yl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Dn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};HT(l)||(d={...d,...WT(e,d)}),d.duration&&(d.duration=Dn(d.duration)),d.repeatDelay&&(d.repeatDelay=Dn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=Ms(d.keyframes,l);if(h!==void 0)return De.update(()=>{d.onUpdate(h),d.onComplete()}),new aE([])}return!i&&Mp.supports(d)?new Mp(d):new uc(d)};class hc{constructor(){this.subscriptions=[]}add(t){return Is(this.subscriptions,t),()=>As(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Np=new Set;function pc(e,t,n){e||Np.has(t)||(console.warn(t),Np.add(t))}const Fp=30,lE=e=>!isNaN(parseFloat(e)),mi={current:void 0};class Lp{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Qn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pc(!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 hc);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.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 mi.current&&mi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fp);return up(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function uo(e,t){return new Lp(e,t)}function cE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function uE(e,t){const n=Ds(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=vT(i[s]);cE(e,s,a)}}function Vp(e){return e.getProps()[ih]}class dE extends Lp{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Ah(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(As(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function fE(e){return!!(xt(e)&&e.add)}function mc(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new dE("auto"),e.addValue("willChange",r)),fE(r))return r.add(t)}function hE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function $p(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),h=l[d];if(h===void 0||u&&hE(u,d))continue;const p={delay:n,elapsed:0,...Yl(s||{},d)};let m=!1;if(window.HandoffAppearAnimations){const v=Vp(e);if(v){const w=window.HandoffAppearAnimations(v,d,f,De);w!==null&&(p.elapsed=w,m=!0)}}f.start(fc(d,f,h,e.shouldReduceMotion&&Yn.has(d)?{type:!1}:p,e,m,mc(e,d)));const g=f.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{De.update(()=>{a&&uE(e,a)})}),c}function gc(e,t,n={}){var r;const o=Ds(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all($p(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return pE(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function pE(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(mE).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(gc(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function mE(e,t){return e.sortNodePosition(t)}function gE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>gc(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=gc(e,t,n);else{const o=typeof t=="function"?Ds(e,t,n.custom):t;r=Promise.all($p(e,o,n))}return r.then(()=>{De.postRender(()=>{e.notify("AnimationComplete",t)})})}const yE=[..._l].reverse(),vE=_l.length;function bE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gE(e,n,r)))}function wE(e){let t=bE(e),n=Rp(),r=!0;const o=l=>(c,u)=>{var d;const f=Ds(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 i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let g=0;g<vE;g++){const v=yE[g],w=n[v],y=c[v]!==void 0?c[v]:u[v],S=ri(y),T=v===l?w.isActive:null;T===!1&&(p=g);let E=y===u[v]&&y!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&T===null||!y&&!w.prevProp||oi(y)||typeof y=="boolean")continue;let D=xE(w.prevProp,y)||v===l&&w.isActive&&!E&&S||g>p&&S,_=!1;const I=Array.isArray(y)?y:[y];let V=I.reduce(o(v),{});T===!1&&(V={});const{prevResolvedValues:F={}}=w,$={...F,...V},C=O=>{D=!0,f.has(O)&&(_=!0,f.delete(O)),w.needsAnimating[O]=!0;const M=e.getValue(O);M&&(M.liveStyle=!1)};for(const O in $){const M=V[O],L=F[O];if(h.hasOwnProperty(O))continue;let H=!1;zl(M)&&zl(L)?H=!Bh(M,L):H=M!==L,H?M!=null?C(O):f.add(O):M!==void 0&&f.has(O)?C(O):w.protectedKeys[O]=!0}w.prevProp=y,w.prevResolvedValues=V,w.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(D=!1),D&&(!E||_)&&d.push(...I.map(O=>({animation:O,options:{type:v}})))}if(f.size){const g={};f.forEach(v=>{const w=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),g[v]=w??null}),d.push({animation:g})}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=s(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Rp(),r=!0}}}function xE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Bh(t,e):!1}function Er(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rp(){return{animate:Er(!0),whileInView:Er(),whileHover:Er(),whileTap:Er(),whileDrag:Er(),whileFocus:Er(),exit:Er()}}class TE extends Xn{constructor(t){super(t),t.animationState||(t.animationState=wE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();oi(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 SE=0;class EE extends Xn{constructor(){super(...arguments),this.id=SE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const CE={animation:{Feature:TE},exit:{Feature:EE}},jp=(e,t)=>Math.abs(e-t);function PE(e,t){const n=jp(e.x,t.x),r=jp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Bp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=vc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=PE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Tt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=yc(f,this.transformPagePoint),De.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=vc(d.type==="pointercancel"?this.lastMoveEventInfo:yc(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,g),p&&p(d,g)},!Mh(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=_s(t),a=yc(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=Tt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,vc(a,this.history)),this.removeListeners=_n(An(this.contextWindow,"pointermove",this.handlePointerMove),An(this.contextWindow,"pointerup",this.handlePointerUp),An(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hn(this.updatePoint)}}function yc(e,t){return t?{point:t(e.point)}:e}function zp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vc({point:e},t){return{point:e,delta:zp(e,Wp(t)),offset:zp(e,kE(t)),velocity:OE(t,.1)}}function kE(e){return e[0]}function Wp(e){return e[e.length-1]}function OE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Wp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Dn(t)));)n--;if(!r)return{x:0,y:0};const i=Mn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Hp=1e-4,IE=1-Hp,AE=1+Hp,Up=.01,_E=0-Up,DE=0+Up;function Wt(e){return e.max-e.min}function ME(e,t,n){return Math.abs(e-t)<=n}function Gp(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=Wt(n)/Wt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=IE&&e.scale<=AE||isNaN(e.scale))&&(e.scale=1),(e.translate>=_E&&e.translate<=DE||isNaN(e.translate))&&(e.translate=0)}function gi(e,t,n,r){Gp(e.x,t.x,n.x,r?r.originX:void 0),Gp(e.y,t.y,n.y,r?r.originY:void 0)}function Yp(e,t,n){e.min=n.min+t.min,e.max=e.min+Wt(t)}function NE(e,t,n){Yp(e.x,t.x,n.x),Yp(e.y,t.y,n.y)}function qp(e,t,n){e.min=t.min-n.min,e.max=e.min+Wt(t)}function yi(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function FE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function Kp(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 LE(e,{top:t,left:n,bottom:r,right:o}){return{x:Kp(e.x,n,o),y:Kp(e.y,t,r)}}function Zp(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 VE(e,t){return{x:Zp(e.x,t.x),y:Zp(e.y,t.y)}}function $E(e,t){let n=.5;const r=Wt(e),o=Wt(t);return o>r?n=hi(t.min,t.max-r,e.min):r>o&&(n=hi(e.min,e.max-o,t.min)),qn(0,1,n)}function RE(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 bc=.35;function jE(e=bc){return e===!1?e=0:e===!0&&(e=bc),{x:Xp(e,"left","right"),y:Xp(e,"top","bottom")}}function Xp(e,t,n){return{min:Qp(e,t),max:Qp(e,n)}}function Qp(e,t){return typeof e=="number"?e:e[t]||0}const Jp=()=>({translate:0,scale:1,origin:0,originPoint:0}),fo=()=>({x:Jp(),y:Jp()}),em=()=>({min:0,max:0}),st=()=>({x:em(),y:em()});function Zt(e){return[e("x"),e("y")]}function tm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function wc(e){return e===void 0||e===1}function xc({scale:e,scaleX:t,scaleY:n}){return!wc(e)||!wc(t)||!wc(n)}function Cr(e){return xc(e)||nm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nm(e){return rm(e.x)||rm(e.y)}function rm(e){return e&&e!=="0%"}function $s(e,t,n){const r=e-n,o=t*r;return n+o}function om(e,t,n,r,o){return o!==void 0&&(e=$s(e,o,r)),$s(e,n,r)+t}function Tc(e,t=0,n=1,r,o){e.min=om(e.min,t,n,r,o),e.max=om(e.max,t,n,r,o)}function im(e,{x:t,y:n}){Tc(e.x,t.translate,t.scale,t.originPoint),Tc(e.y,n.translate,n.scale,n.originPoint)}const sm=.999999999999,am=1.0000000000001;function WE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ho(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,im(e,s)),r&&Cr(i.latestValues)&&ho(e,i.latestValues))}t.x<am&&t.x>sm&&(t.x=1),t.y<am&&t.y>sm&&(t.y=1)}function er(e,t){e.min=e.min+t,e.max=e.max+t}function lm(e,t,n,r,o=.5){const i=Ze(e.min,e.max,o);Tc(e,t,n,i,r)}function ho(e,t){lm(e.x,t.x,t.scaleX,t.scale,t.originX),lm(e.y,t.y,t.scaleY,t.scale,t.originY)}function cm(e,t){return tm(zE(e.getBoundingClientRect(),t))}function HE(e,t,n){const r=cm(e,n),{scroll:o}=t;return o&&(er(r.x,o.offset.x),er(r.y,o.offset.y)),r}const um=({current:e})=>e?e.ownerDocument.defaultView:null,UE=new WeakMap;class GE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=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(_s(u,"page").point)},i=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Vh(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zt(v=>{let w=this.getAxisMotionValue(v).get()||0;if(fn.test(w)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[v];S&&(w=Wt(S)*(parseFloat(w)/100))}}this.originPoint[v]=w}),m&&De.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=mc(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:g}=d;if(h&&this.currentDirection===null){this.currentDirection=YE(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Zt(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 Bp(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:um(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&De.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Rs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=FE(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&oo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=LE(o.layoutBox,n):this.constraints=!1,this.elastic=jE(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Zt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=RE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!oo(t))return!1;const r=t.current;tn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=HE(r,o.root,this.visualElement.getTransformPagePoint());let s=VE(o.layout.layoutBox,i);if(n){const a=n(BE(s));this.hasMutatedConstraints=!!a,a&&(s=tm(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Zt(u=>{if(!Rs(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(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,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(fc(t,r,0,n,this.visualElement,!1,mc(this.visualElement,t)))}stopAnimation(){Zt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Zt(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){Zt(n=>{const{drag:r}=this.getProps();if(!Rs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ze(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!oo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Zt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=$E({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zt(s=>{if(!Rs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ze(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;UE.set(this.visualElement,this);const t=this.visualElement.current,n=An(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();oo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),De.read(r);const s=In(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Zt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=bc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Rs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function YE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class qE extends Xn{constructor(t){super(t),this.removeGroupControls=wt,this.removeListeners=wt,this.controls=new GE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wt}unmount(){this.removeGroupControls(),this.removeListeners()}}const dm=e=>(t,n)=>{e&&De.postRender(()=>e(t,n))};class KE extends Xn{constructor(){super(...arguments),this.removePointerDownListener=wt}onPointerDown(t){this.session=new Bp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:um(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:dm(t),onStart:dm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&De.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=An(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ZE(){const e=b.useContext(ws);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const js={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=fm(e,t.target.x),r=fm(e,t.target.y);return`${n}% ${r}%`}},XE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Jn.parse(e);if(o.length>5)return r;const i=Jn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ze(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class QE extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;q1(JE),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),js.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||De.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Al.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 hm(e){const[t,n]=ZE(),r=b.useContext(ii);return x.jsx(QE,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(ah),isPresent:t,safeToRemove:n})}const JE={borderRadius:{...vi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vi,borderTopRightRadius:vi,borderBottomLeftRadius:vi,borderBottomRightRadius:vi,boxShadow:XE},pm=["TopLeft","TopRight","BottomLeft","BottomRight"],eC=pm.length,mm=e=>typeof e=="string"?parseFloat(e):e,gm=e=>typeof e=="number"||fe.test(e);function tC(e,t,n,r,o,i){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,nC(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,rC(r))):i&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<eC;s++){const a=`border${pm[s]}Radius`;let l=ym(t,a),c=ym(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gm(l)===gm(c)?(e[a]=Math.max(Ze(mm(l),mm(c),r),0),(fn.test(c)||fn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function ym(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nC=vm(0,.5,wp),rC=vm(.5,.95,wt);function vm(e,t,n){return r=>r<e?0:r>t?1:n(hi(e,t,r))}function bm(e,t){e.min=t.min,e.max=t.max}function Xt(e,t){bm(e.x,t.x),bm(e.y,t.y)}function wm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function xm(e,t,n,r,o){return e-=t,e=$s(e,1/n,r),o!==void 0&&(e=$s(e,1/o,r)),e}function oC(e,t=0,n=1,r=.5,o,i=e,s=e){if(fn.test(t)&&(t=parseFloat(t),t=Ze(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ze(i.min,i.max,r);e===i&&(a-=t),e.min=xm(e.min,t,n,a,o),e.max=xm(e.max,t,n,a,o)}function Tm(e,t,[n,r,o],i,s){oC(e,t[n],t[r],t[o],t.scale,i,s)}const iC=["x","scaleX","originX"],sC=["y","scaleY","originY"];function Sm(e,t,n,r){Tm(e.x,t,iC,n?n.x:void 0,r?r.x:void 0),Tm(e.y,t,sC,n?n.y:void 0,r?r.y:void 0)}function Em(e){return e.translate===0&&e.scale===1}function Cm(e){return Em(e.x)&&Em(e.y)}function aC(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Pm(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function km(e){return Wt(e.x)/Wt(e.y)}function Om(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lC{constructor(){this.members=[]}add(t){Is(this.members,t),t.scheduleRender()}remove(t){if(As(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cC(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY: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 uC=(e,t)=>e.depth-t.depth;class dC{constructor(){this.children=[],this.isDirty=!1}add(t){Is(this.children,t),this.isDirty=!0}remove(t){As(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uC),this.isDirty=!1,this.children.forEach(t)}}function fC(e,t){const n=Qn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(hn(r),e(i-t))};return De.read(r,!0),()=>hn(r)}function hC(e){return e instanceof SVGElement&&e.tagName!=="svg"}function pC(e,t,n){const r=xt(e)?e:uo(e);return r.start(fc("",r,t,n)),r.animation}const Pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Sc=["","X","Y","Z"],mC={visibility:"hidden"},Im=1e3;let gC=0;function Ec(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Am(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Vp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Am(e.parent):!1:!1}function _m({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=gC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Pr.totalNodes=Pr.resolvedTargetDeltas=Pr.recalculatedProjection=0),this.nodes.forEach(bC),this.nodes.forEach(EC),this.nodes.forEach(CC),this.nodes.forEach(wC),window.MotionDebug&&window.MotionDebug.record(Pr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new dC)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new hc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hC(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=fC(f,250),js.hasAnimatedSinceResize&&(js.hasAnimatedSinceResize=!1,this.nodes.forEach(Mm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||AC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),w=!this.targetLayout||!Pm(this.targetLayout,p)||h,y=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const S={...Yl(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||Mm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,hn(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(PC),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Am(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Dm);return}this.isUpdating||this.nodes.forEach(TC),this.isUpdating=!1,this.nodes.forEach(SC),this.nodes.forEach(yC),this.nodes.forEach(vC),this.clearAllSnapshots();const a=Qn.now();Tt.delta=qn(0,1e3/60,a-Tt.timestamp),Tt.timestamp=a,Tt.isProcessing=!0,Wl.update.process(Tt),Wl.preRender.process(Tt),Wl.render.process(Tt),Tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Al.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xC),this.sharedNodes.forEach(kC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,De.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Cm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||Cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),_C(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return st();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(er(a.x,l.offset.x),er(a.y,l.offset.y)),a}removeElementScroll(s){const a=st();Xt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Xt(a,s);const{scroll:f}=this.root;f&&(er(a.x,-f.offset.x),er(a.y,-f.offset.y))}er(a.x,u.offset.x),er(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=st();Xt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ho(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Cr(u.latestValues)&&ho(l,u.latestValues)}return Cr(this.latestValues)&&ho(l,this.latestValues),l}removeTransform(s){const a=st();Xt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Cr(c.latestValues))continue;xc(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();Xt(u,d),Sm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Cr(this.latestValues)&&Sm(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Tt.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(),yi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),im(this.target,this.targetDelta)):Xt(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(),yi(this.relativeTargetOrigin,this.target,h.target),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Pr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||xc(this.parent.latestValues)||nm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Tt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Xt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;WE(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():(wm(this.prevProjectionDelta.x,this.projectionDelta.x),wm(this.prevProjectionDelta.y,this.projectionDelta.y)),gi(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Om(this.projectionDelta.x,this.prevProjectionDelta.x)||!Om(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Pr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fo(),this.projectionDelta=fo(),this.projectionDeltaWithTransform=fo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,g=this.getStack(),v=!g||g.members.length<=1,w=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(IC));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const T=S/1e3;Nm(d.x,s.x,T),Nm(d.y,s.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),OC(this.relativeTarget,this.relativeTargetOrigin,f,T),y&&aC(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=st()),Xt(y,this.relativeTarget)),m&&(this.animationValues=u,tC(u,c,this.latestValues,T,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(hn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{js.hasAnimatedSinceResize=!0,this.currentAnimation=pC(0,Im,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Im),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Rm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=Wt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Wt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Xt(a,l),ho(a,u),gi(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new lC),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ec("z",s,c,this.animationValues);for(let u=0;u<Sc.length;u++)Ec(`rotate${Sc[u]}`,s,c,this.animationValues),Ec(`skew${Sc[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return mC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Os(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Os(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Cr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=cC(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 Cs){if(f[m]===void 0)continue;const{correct:g,applyTo:v}=Cs[m],w=c.transform==="none"?f[m]:g(f[m],d);if(v){const y=v.length;for(let S=0;S<y;S++)c[v[S]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=d===this?Os(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Dm),this.root.sharedNodes.clear()}}}function yC(e){e.updateLayout()}function vC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?Zt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Wt(f);f.min=r[d].min,f.max=f.min+h}):Rm(i,n.layoutBox,r)&&Zt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Wt(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=fo();gi(a,r,n.layoutBox);const l=fo();s?gi(l,e.applyTransform(o,!0),n.measuredBox):gi(l,r,n.layoutBox);const c=!Cm(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();yi(p,n.layoutBox,f.layoutBox);const m=st();yi(m,r,h.layoutBox),Pm(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function bC(e){window.MotionDebug&&Pr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function wC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xC(e){e.clearSnapshot()}function Dm(e){e.clearMeasurements()}function TC(e){e.isLayoutDirty=!1}function SC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EC(e){e.resolveTargetDelta()}function CC(e){e.calcProjection()}function PC(e){e.resetSkewAndRotation()}function kC(e){e.removeLeadSnapshot()}function Nm(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fm(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function OC(e,t,n,r){Fm(e.x,t.x,n.x,r),Fm(e.y,t.y,n.y,r)}function IC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const AC={duration:.45,ease:[.4,0,.1,1]},Lm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vm=Lm("applewebkit/")&&!Lm("chrome/")?Math.round:wt;function $m(e){e.min=Vm(e.min),e.max=Vm(e.max)}function _C(e){$m(e.x),$m(e.y)}function Rm(e,t,n){return e==="position"||e==="preserve-aspect"&&!ME(km(t),km(n),.2)}const DC=_m({attachResizeListener:(e,t)=>In(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cc={current:void 0},jm=_m({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cc.current){const e=new DC({});e.mount(window),e.setOptions({layoutScroll:!0}),Cc.current=e}return Cc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MC={pan:{Feature:KE},drag:{Feature:qE,ProjectionNode:jm,MeasureLayout:hm}},Pc={current:null},Bm={current:!1};function NC(){if(Bm.current=!0,!!Il)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pc.current=e.matches;e.addListener(t),t()}else Pc.current=!1}function FC(e,t,n){for(const r in t){const o=t[r],i=n[r];if(xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&pc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(xt(i))e.addValue(r,uo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,uo(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zm=new WeakMap,LC=[...Kh,It,Jn],VC=e=>LC.find(qh(e)),Wm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],$C=Dl.length;class RC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,De.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Es(n),this.isVariantNode=uh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&xt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,zm.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)),Bm.current||NC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pc.current,process.env.NODE_ENV!=="production"&&pc(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(){zm.delete(this.current),this.projection&&this.projection.unmount(),hn(this.notifyUpdate),hn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Yn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&De.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in io){const n=io[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):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<Wm.length;r++){const o=Wm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=FC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<$C;r++){const o=Dl[r],i=this.props[o];(ri(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Wh(o)||zh(o))?o=parseFloat(o):!VC(o)&&Jn.test(n)&&(o=ip(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 s=Bl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!xt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new hc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Hm extends RC{constructor(){super(...arguments),this.KeyframeResolver=sp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function jC(e){return window.getComputedStyle(e)}class BC extends Hm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Eh}readValueFromInstance(t,n){if(Yn.has(n)){const r=tc(n);return r&&r.default||0}else{const r=jC(t),o=(mh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return cm(t,n)}build(t,n,r){Ll(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return jl(t,n,r)}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}`)}))}}class zC extends Hm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yn.has(n)){const r=tc(n);return r&&r.default||0}return n=Ch.has(n)?n:Ts(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return kh(t,n,r)}build(t,n,r){$l(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Ph(t,n,r,o)}mount(t){this.isSVGTag=Rl(t.tagName),super.mount(t)}}const WC=(e,t)=>Ml(e)?new zC(t):new BC(t,{allowProjection:e!==b.Fragment}),HC={...CE,...$T,...MC,...{layout:{ProjectionNode:jm,MeasureLayout:hm}}},Ht=G1((e,t)=>CT(e,t,HC,WC));function Um(){const e=b.useRef(!1);return xs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Gm(){const e=Um(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>De.postRender(r),[r]),t]}class UC extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function GC({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(ro);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
4
+ `+t.prev}function ys(e,t){var n=bl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Hn(e,o)?t(e[o],e):""}var i=typeof gl=="function"?gl(e):[],s;if(Qr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Hn(e,l)&&(n&&String(Number(l))===l&&l<e.length||Qr&&s["$"+l]instanceof Symbol||(Lf.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof gl=="function")for(var c=0;c<i.length;c++)jf.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var Zf=Zr,Jr=ex,Ax=dx,_x=ri,vs=Zf("%WeakMap%",!0),bs=Zf("%Map%",!0),Mx=Jr("WeakMap.prototype.get",!0),Dx=Jr("WeakMap.prototype.set",!0),Nx=Jr("WeakMap.prototype.has",!0),Fx=Jr("Map.prototype.get",!0),Lx=Jr("Map.prototype.set",!0),Vx=Jr("Map.prototype.has",!0),Sl=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},$x=function(e,t){var n=Sl(e,t);return n&&n.value},jx=function(e,t,n){var r=Sl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Rx=function(e,t){return!!Sl(e,t)},Bx=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new _x("Side channel does not contain "+Ax(i))},get:function(i){if(vs&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Mx(t,i)}else if(bs){if(n)return Fx(n,i)}else if(r)return $x(r,i)},has:function(i){if(vs&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Nx(t,i)}else if(bs){if(n)return Vx(n,i)}else if(r)return Rx(r,i);return!1},set:function(i,s){vs&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new vs),Dx(t,i,s)):bs?(n||(n=new bs),Lx(n,i,s)):(r||(r={key:{},next:null}),jx(r,i,s))}};return o},zx=String.prototype.replace,Wx=/%20/g,Tl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Xf={default:Tl.RFC3986,formatters:{RFC1738:function(e){return zx.call(e,Wx,"+")},RFC3986:function(e){return String(e)}},RFC1738:Tl.RFC1738,RFC3986:Tl.RFC3986},Hx=Xf,El=Object.prototype.hasOwnProperty,wr=Array.isArray,dn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Ux=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(wr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Qf=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},Gx=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(wr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!El.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return wr(t)&&!wr(n)&&(o=Qf(t,r)),wr(t)&&wr(n)?(n.forEach(function(i,s){if(El.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return El.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},Yx=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},qx=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Kx=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===Hx.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+dn[c];continue}if(c<2048){a=a+(dn[192|c>>6]+dn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(dn[224|c>>12]+dn[128|c>>6&63]+dn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=dn[240|c>>18]+dn[128|c>>12&63]+dn[128|c>>6&63]+dn[128|c&63]}return a},Zx=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return Ux(n),t},Xx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Qx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Jx=function(t,n){return[].concat(t,n)},e1=function(t,n){if(wr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Jf={arrayToObject:Qf,assign:Yx,combine:Jx,compact:Zx,decode:qx,encode:Kx,isBuffer:Qx,isRegExp:Xx,maybeMap:e1,merge:Gx},t1=Jf,eh=Xf,n1=Date.prototype.toISOString,th=eh.default;t1.encode,eh.formatters[th];var r1=Jf;r1.decode;var nh=e=>Array.isArray(e),Cl=e=>e===void 0,Pl=e=>e===null,o1=Function.bind.call(Function.call,Object.prototype.toString),i1=e=>!!e&&o1(e)==="[object Error]"||e instanceof Error,rh=(e,t)=>e instanceof t,s1=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},a1=e=>Object.prototype.toString.call(e)==="[object Date]"&&rh(e,Date),An={array:nh,date:a1,empty:e=>Pl(e)||Cl(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:rh,isError:i1,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Pl(e)||Cl(e),null:Pl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!nh(e)&&typeof e=="object",primitive:s1,string:e=>typeof e=="string",undefined:Cl},kl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const i=`${+o[0]}`===o[0];e[r]=i?[]:{}}if(typeof e[r]!="object"){const i=`${+o[0]}`===o[0];e[r]=kl(i?[]:{},o,n)}else e[r]=kl(e[r],o,n)}else e[r]=n;return e},l1=e=>Object.keys(e),c1=e=>e.replace("[",".").replace("]","").split("."),oh=(e,t,n)=>{const r=Array.isArray(t)?t:c1(t),o=structuredClone(e);return kl(o,r,n),o};const Il="-";function u1(e){const t=f1(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Il);return a[0]===""&&a.length!==1&&a.shift(),ih(a,t)||d1(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function ih(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ih(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Il);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const sh=/^\[(.+)\]$/;function d1(e){if(sh.test(e)){const t=sh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function f1(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return p1(Object.entries(e.classGroups),n).forEach(([i,s])=>{Ol(s,r,i,t)}),r}function Ol(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:ah(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(h1(o)){Ol(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Ol(s,ah(t,i),n,r)})})}function ah(e,t){let n=e;return t.split(Il).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function h1(e){return e.isThemeGetter}function p1(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function m1(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const lh="!";function g1(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let y=a[v];if(c===0){if(y===o&&(r||a.slice(v,v+i)===t)){l.push(a.slice(u,v)),u=v+i;continue}if(y==="/"){d=v;continue}}y==="["?c++:y==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(lh),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:s})}:s}function y1(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 v1(e){return{cache:m1(e.cacheSize),parseClassName:g1(e),...u1(e)}}const b1=/\s+/;function w1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(b1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:s};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:s};d=!1}const h=y1(a).join(":");return{isTailwindClass:!0,modifierId:l?h+lh:h,classGroupId:f,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(d=>i.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function x1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ch(t))&&(r&&(r+=" "),r+=n);return r}function ch(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ch(e[r]))&&(n&&(n+=" "),n+=t);return n}function S1(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=v1(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=w1(l,n);return o(l,u),u}return function(){return i(x1.apply(null,arguments))}}function Ge(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const uh=/^\[(?:([a-z-]+):)?(.+)\]$/i,T1=/^\d+\/\d+$/,E1=new Set(["px","full","screen"]),C1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,P1=/\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$/,k1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,I1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,O1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function _n(e){return xr(e)||E1.has(e)||T1.test(e)}function Gn(e){return eo(e,"length",V1)}function xr(e){return!!e&&!Number.isNaN(Number(e))}function ws(e){return eo(e,"number",xr)}function li(e){return!!e&&Number.isInteger(Number(e))}function A1(e){return e.endsWith("%")&&xr(e.slice(0,-1))}function ve(e){return uh.test(e)}function Yn(e){return C1.test(e)}const _1=new Set(["length","size","percentage"]);function M1(e){return eo(e,_1,dh)}function D1(e){return eo(e,"position",dh)}const N1=new Set(["image","url"]);function F1(e){return eo(e,N1,j1)}function L1(e){return eo(e,"",$1)}function ci(){return!0}function eo(e,t,n){const r=uh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function V1(e){return P1.test(e)&&!k1.test(e)}function dh(){return!1}function $1(e){return I1.test(e)}function j1(e){return O1.test(e)}function R1(){const e=Ge("colors"),t=Ge("spacing"),n=Ge("blur"),r=Ge("brightness"),o=Ge("borderColor"),i=Ge("borderRadius"),s=Ge("borderSpacing"),a=Ge("borderWidth"),l=Ge("contrast"),c=Ge("grayscale"),u=Ge("hueRotate"),d=Ge("invert"),f=Ge("gap"),h=Ge("gradientColorStops"),p=Ge("gradientColorStopPositions"),m=Ge("inset"),v=Ge("margin"),y=Ge("opacity"),x=Ge("padding"),g=Ge("saturate"),T=Ge("scale"),S=Ge("sepia"),E=Ge("skew"),O=Ge("space"),k=Ge("translate"),I=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",ve,t],D=()=>[ve,t],L=()=>["",_n,Gn],P=()=>["auto",xr,ve],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ve],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[xr,ws],Z=()=>[xr,ve];return{cacheSize:500,separator:":",theme:{colors:[ci],spacing:[_n,Gn],blur:["none","",Yn,ve],brightness:R(),borderColor:[e],borderRadius:["none","","full",Yn,ve],borderSpacing:D(),borderWidth:L(),contrast:R(),grayscale:U(),hueRotate:Z(),invert:U(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[A1,Gn],inset:V(),margin:V(),opacity:R(),padding:D(),saturate:R(),scale:R(),sepia:U(),skew:Z(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Yn]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),ve]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll: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",li,ve]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",li,ve]}],"grid-cols":[{"grid-cols":[ci]}],"col-start-end":[{col:["auto",{span:["full",li,ve]},ve]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[ci]}],"row-start-end":[{row:["auto",{span:[li,ve]},ve]}],"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",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Yn]},Yn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Yn,Gn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ws]}],"font-family":[{font:[ci]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",xr,ws]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_n,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_n,Gn]}],"underline-offset":[{"underline-offset":["auto",_n,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),D1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",M1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},F1]}],"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:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...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":[y]}],"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":[_n,ve]}],"outline-w":[{outline:[_n,Gn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[_n,Gn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Yn,L1]}],"shadow-color":[{shadow:[ci]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Yn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[li,ve]}],"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",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_n,Gn,ws]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const B1=S1(R1),Al=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},z1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),W1=e=>An.function(e),Be=(...e)=>B1(nw(e)),xs=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},Ss=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},to=b.forwardRef(function({as:t,...n},r){const o=t||"span";return w.jsx(o,{...n,ref:r})}),H1=ni("inline-flex duration-700 enabled:hover:bg-opacity-80 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",primary:"bg-primary text-primary-foreground",main:"bg-primary text-primary-foreground",warn:"bg-warn text-warn-foreground",danger:"bg-danger text-danger-foreground",secondary:"bg-secondary-background text-secondary-foreground disabled:text-secondary-subtle",success:"bg-success text-success-foreground",info:"bg-info text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),qn=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return w.jsxs(to,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:Be(H1({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),U1=e=>w.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>w.jsx("li",{className:"flex flex-1",children:w.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:Be("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),G1=ni("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"}}}),Y1=ni("inline-flex rounded-pill gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{raw:"",warn:"bg-warn-subtle text-warn-hover",info:"bg-info-subtle text-info-hover",main:"bg-primary-subtle text-primary-hover",danger:"bg-danger-subtle text-danger-hover",success:"bg-success-subtle text-success-hover",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70",secondary:"bg-secondary-background text-secondary-foreground",neutral:"bg-transparent border-card-border border text-foreground"}},defaultVariants:{theme:"main",size:"default"}}),q1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return w.jsxs(to,{...a,ref:l,"data-theme":i,as:a.as??"span",className:Be(Y1({size:s,theme:i}),t),children:[n?w.jsx("span",{className:G1({theme:n})}):null,r,a.children]})}),no=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Ts=b.createContext({}),Es=b.createContext(null),_l=typeof document<"u",Cs=_l?b.useLayoutEffect:b.useEffect,fh=b.createContext({strict:!1}),Ps=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hh="data-"+Ps("framerAppearId"),K1={skipAnimations:!1,useManualTiming:!1};function Z1(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&i.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const ks=["read","resolveKeyframes","update","preRender","render","postRender"],X1=40;function ph(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=ks.reduce((y,x)=>(y[x]=Z1(i),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=s,h=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,X1),1),o.timestamp=y,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:ks.reduce((y,x)=>{const g=s[x];return y[x]=(T,S=!1,E=!1)=>(n||p(),g.schedule(T,S,E)),y},{}),cancel:y=>{for(let x=0;x<ks.length;x++)s[ks[x]].cancel(y)},state:o,steps:s}}const{schedule:Ml,cancel:EV}=ph(queueMicrotask,!1);function ro(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const mh=b.createContext({});let gh=!1;function Q1(e,t,n,r,o){const{visualElement:i}=b.useContext(Ts),s=b.useContext(fh),a=b.useContext(Es),l=b.useContext(no).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(mh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&eS(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const f=b.useRef(!!(n[hh]&&!window.HandoffComplete));return Cs(()=>{u&&(u.updateFeatures(),Ml.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,gh||(gh=!0,queueMicrotask(J1))))}),u}function J1(){window.HandoffComplete=!0}function eS(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yh(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&ro(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function yh(e){if(e)return e.options.allowProjection!==!1?e.projection:yh(e.parent)}function tS(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ro(n)&&(n.current=r))},[t])}function ui(e){return typeof e=="string"||Array.isArray(e)}function di(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Dl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Nl=["initial",...Dl];function Is(e){return di(e.animate)||Nl.some(t=>ui(e[t]))}function vh(e){return!!(Is(e)||e.variants)}function nS(e,t){if(Is(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ui(n)?n:void 0,animate:ui(r)?r:void 0}}return e.inherit!==!1?t:{}}function rS(e){const{initial:t,animate:n}=nS(e,b.useContext(Ts));return b.useMemo(()=>({initial:t,animate:n}),[bh(t),bh(n)])}function bh(e){return Array.isArray(e)?e.join(" "):e}const wh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},oo={};for(const e in wh)oo[e]={isEnabled:t=>wh[e].some(n=>!!t[n])};function oS(e){for(const t in e)oo[t]={...oo[t],...e[t]}}const fi=b.createContext({}),iS=Symbol.for("motionComponentSymbol"),xt=e=>e;let io=xt,Ut=xt;process.env.NODE_ENV!=="production"&&(io=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ut=(e,t)=>{if(!e)throw new Error(t)});function sS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&oS(e);function i(a,l){let c;const u={...b.useContext(no),...a,layoutId:aS(a)},{isStatic:d}=u,f=rS(a),h=r(a,d);if(!d&&_l){lS(u,e);const p=cS(u);c=p.MeasureLayout,f.visualElement=Q1(o,h,u,t,p.ProjectionNode)}return w.jsxs(Ts.Provider,{value:f,children:[c&&f.visualElement?w.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,tS(h,f.visualElement,l),h,d,f.visualElement)]})}const s=b.forwardRef(i);return s[iS]=o,s}function aS({layoutId:e}){const t=b.useContext(fi).id;return t&&e!==void 0?t+"-"+e:e}function lS(e,t){const n=b.useContext(fh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?io(!1,r):Ut(!1,r)}}function cS(e){const{drag:t,layout:n}=oo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function uS(e){function t(r,o={}){return sS(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const dS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Fl(e){return typeof e!="string"||e.includes("-")?!1:!!(dS.indexOf(e)>-1||/[A-Z]/u.test(e))}const Os={};function fS(e){Object.assign(Os,e)}const hi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Kn=new Set(hi);function xh(e,{layout:t,layoutId:n}){return Kn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Os[e]||e==="opacity")}const mt=e=>!!(e&&e.getVelocity),hS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pS=hi.length;function mS(e,t,n){let r="";for(let o=0;o<pS;o++){const i=hi[o];if(e[i]!==void 0){const s=hS[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Sh=e=>t=>typeof t=="string"&&t.startsWith(e),Th=Sh("--"),gS=Sh("var(--"),Ll=e=>gS(e)?yS.test(e.split("/*")[0].trim()):!1,yS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Zn=(e,t,n)=>n>t?t:n<e?e:n,so={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pi={...so,transform:e=>Zn(0,1,e)},As={...so,default:1},mi=e=>Math.round(e*1e5)/1e5,Vl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,bS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,wS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function gi(e){return typeof e=="string"}function xS(e){return e==null}const yi=e=>({test:t=>gi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xn=yi("deg"),fn=yi("%"),fe=yi("px"),SS=yi("vh"),TS=yi("vw"),Eh={...fn,parse:e=>fn.parse(e)/100,transform:e=>fn.transform(e*100)},Ch={...so,transform:Math.round},Ph={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:Xn,rotateX:Xn,rotateY:Xn,rotateZ:Xn,scale:As,scaleX:As,scaleY:As,scaleZ:As,skew:Xn,skewX:Xn,skewY:Xn,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:pi,originX:Eh,originY:Eh,originZ:fe,zIndex:Ch,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:pi,strokeOpacity:pi,numOctaves:Ch};function $l(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(Th(u)){o[u]=d;continue}const f=Ph[u],h=vS(d,f);if(Kn.has(u)){if(a=!0,i[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=mS(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=s;r.transformOrigin=`${u} ${d} ${f}`}}const jl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function kh(e,t,n){for(const r in t)!mt(t[r])&&!xh(r,n)&&(e[r]=t[r])}function ES({transformTemplate:e},t){return b.useMemo(()=>{const n=jl();return $l(n,t,e),Object.assign({},n.vars,n.style)},[t])}function CS(e,t){const n=e.style||{},r={};return kh(r,n,e),Object.assign(r,ES(e,t)),r}function PS(e,t){const n={},r=CS(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 kS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function _s(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||kS.has(e)}let Ih=e=>!_s(e);function Oh(e){e&&(Ih=t=>t.startsWith("on")?!_s(t):e(t))}try{Oh(require("@emotion/is-prop-valid").default)}catch{}function IS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ih(o)||n===!0&&_s(o)||!t&&!_s(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Ah(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function OS(e,t,n){const r=Ah(t,e.x,e.width),o=Ah(n,e.y,e.height);return`${r} ${o}`}const AS={offset:"stroke-dashoffset",array:"stroke-dasharray"},_S={offset:"strokeDashoffset",array:"strokeDasharray"};function MS(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?AS:_S;e[i.offset]=fe.transform(-r);const s=fe.transform(t),a=fe.transform(n);e[i.array]=`${s} ${a}`}function Rl(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if($l(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=OS(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&MS(f,s,a,l,!1)}const _h=()=>({...jl(),attrs:{}}),Bl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function DS(e,t,n,r){const o=b.useMemo(()=>{const i=_h();return Rl(i,t,Bl(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};kh(i,e.style,e),o.style={...i,...o.style}}return o}function NS(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Fl(n)?DS:PS)(r,i,s,n),c=IS(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=b.useMemo(()=>mt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:f})}}function Mh(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Dh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Nh(e,t,n,r){Mh(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Dh.has(o)?o:Ps(o),t.attrs[o])}function zl(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(mt(o[s])||t.style&&mt(t.style[s])||xh(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Fh(e,t,n){const r=zl(e,t,n);for(const o in e)if(mt(e[o])||mt(t[o])){const i=hi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Lh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Wl(e,t,n,r){if(typeof t=="function"){const[o,i]=Lh(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Lh(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function hn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Hl=e=>Array.isArray(e),FS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),LS=e=>Hl(e)?e[e.length-1]||0:e;function Ms(e){const t=mt(e)?e.get():e;return FS(t)?t.toValue():t}const Vh=new Set(["opacity","clipPath","filter","transform"]);function $h(e){if(Kn.has(e))return"transform";if(Vh.has(e))return Ps(e)}function Ds(e,t){e.indexOf(t)===-1&&e.push(t)}function vi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function VS([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}function $S({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:RS(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const jh=e=>(t,n)=>{const r=b.useContext(Ts),o=b.useContext(Es),i=()=>$S(e,t,r,o,n);return n?i():hn(i)};function jS(e,t){const n=$h(t);n&&Ds(e,n)}function Rh(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=Wl(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function RS(e,t,n,r,o){var i;const s={},a=[],l=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(e,{});for(const v in c)s[v]=Ms(c[v]);let{initial:u,animate:d}=e;const f=Is(e),h=vh(e);t&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!di(m)&&Rh(e,m,(v,y)=>{for(const x in v){let g=v[x];if(Array.isArray(g)){const T=p?g.length-1:0;g=g[T]}g!==null&&(s[x]=g)}for(const x in y)s[x]=y[x]}),l&&(d&&u!==!1&&!di(d)&&Rh(e,d,v=>{for(const y in v)jS(a,y)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Me,cancel:pn,state:St,steps:Ul}=ph(typeof requestAnimationFrame<"u"?requestAnimationFrame:xt,!0),BS={useVisualState:jh({scrapeMotionValuesFromProps:Fh,createRenderState:_h,onMount:(e,t,{renderState:n,latestValues:r})=>{Me.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Me.render(()=>{Rl(n,r,Bl(t.tagName),e.transformTemplate),Nh(t,n)})}})},zS={useVisualState:jh({applyWillChange:!0,scrapeMotionValuesFromProps:zl,createRenderState:jl})};function WS(e,{forwardMotionProps:t=!1},n,r){return{...Fl(e)?BS:zS,preloadedFeatures:n,useRender:NS(t),createVisualElement:r,Component:e}}function Mn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Bh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ns(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const HS=e=>t=>Bh(t)&&e(t,Ns(t));function Dn(e,t,n,r){return Mn(e,t,HS(n),r)}const US=(e,t)=>n=>t(e(n)),Nn=(...e)=>e.reduce(US);function zh(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Wh=zh("dragHorizontal"),Hh=zh("dragVertical");function Uh(e){let t=!1;if(e==="y")t=Hh();else if(e==="x")t=Wh();else{const n=Wh(),r=Hh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Gh(){const e=Uh(!0);return e?(e(),!1):!0}class Qn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Yh(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Gh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Me.postRender(()=>l(i,s))};return Dn(e.current,n,o,{passive:!e.getProps()[r]})}class GS extends Qn{mount(){this.unmount=Nn(Yh(this.node,!0),Yh(this.node,!1))}unmount(){}}class YS extends Qn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Nn(Mn(this.node.current,"focus",()=>this.onFocus()),Mn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const qh=(e,t)=>t?e===t?!0:qh(e,t.parentElement):!1;function Gl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ns(n))}class qS extends Qn{constructor(){super(...arguments),this.removeStartListeners=xt,this.removeEndListeners=xt,this.removeAccessibleListeners=xt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=Dn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!qh(this.node.current,a.target)?u:c;f&&Me.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=Dn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Nn(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Gl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Me.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Mn(this.node.current,"keyup",s),Gl("down",(a,l)=>{this.startPress(a,l)})},n=Mn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Gl("cancel",(i,s)=>this.cancelPress(i,s))},o=Mn(this.node.current,"blur",r);this.removeAccessibleListeners=Nn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Me.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Gh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Me.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Dn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Mn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Nn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Yl=new WeakMap,ql=new WeakMap,KS=e=>{const t=Yl.get(e.target);t&&t(e)},ZS=e=>{e.forEach(KS)};function XS({root:e,...t}){const n=e||document;ql.has(n)||ql.set(n,{});const r=ql.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(ZS,{root:e,...t})),r[o]}function QS(e,t,n){const r=XS(t);return Yl.set(e,n),r.observe(e),()=>{Yl.delete(e),r.unobserve(e)}}const JS={some:0,all:1};class eT extends Qn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:JS[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return QS(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tT(t,n))&&this.startObserver()}unmount(){}}function tT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const nT={inView:{Feature:eT},tap:{Feature:qS},focus:{Feature:YS},hover:{Feature:GS}};function Kh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Fs(e,t,n){const r=e.getProps();return Wl(r,t,n!==void 0?n:r.custom,e)}const mn=e=>e*1e3,gn=e=>e/1e3,rT={type:"spring",stiffness:500,damping:25,restSpeed:10},oT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),iT={type:"keyframes",duration:.8},sT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aT=(e,{keyframes:t})=>t.length>2?iT:Kn.has(e)?e.startsWith("scale")?oT(t[1]):rT:sT;function lT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Kl(e,t){return e[t]||e.default||e}const cT=e=>e!==null;function Ls(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(cT),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Vs;function uT(){Vs=void 0}const Jn={now:()=>(Vs===void 0&&Jn.set(St.isProcessing||K1.useManualTiming?St.timestamp:performance.now()),Vs),set:e=>{Vs=e,queueMicrotask(uT)}},Zh=e=>/^0[^.\s]+$/u.test(e);function dT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zh(e):!0}const Xh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),fT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hT(e){const t=fT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const pT=4;function Qh(e,t,n=1){Ut(n<=pT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=hT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Xh(s)?parseFloat(s):s}return Ll(o)?Qh(o,t,n+1):o}const mT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Jh=e=>e===so||e===fe,ep=(e,t)=>parseFloat(e.split(", ")[t]),tp=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ep(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?ep(i[1],e):0}},gT=new Set(["x","y","z"]),yT=hi.filter(e=>!gT.has(e));function vT(e){const t=[];return yT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ao={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:tp(4,13),y:tp(5,14)};ao.translateX=ao.x,ao.translateY=ao.y;const np=e=>t=>t.test(e),rp=[so,fe,fn,Xn,TS,SS,{test:e=>e==="auto",parse:e=>e}],op=e=>rp.find(np(e)),Sr=new Set;let Zl=!1,Xl=!1;function ip(){if(Xl){const e=Array.from(Sr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=vT(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xl=!1,Zl=!1,Sr.forEach(e=>e.complete()),Sr.clear()}function sp(){Sr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xl=!0)})}function bT(){sp(),ip()}class Ql{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Sr.add(this),Zl||(Zl=!0,Me.read(sp),Me.resolveKeyframes(ip))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Sr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Sr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Jl=(e,t)=>n=>!!(gi(n)&&wS.test(n)&&n.startsWith(e)||t&&!xS(n)&&Object.prototype.hasOwnProperty.call(n,t)),ap=(e,t,n)=>r=>{if(!gi(r))return r;const[o,i,s,a]=r.match(Vl);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},wT=e=>Zn(0,255,e),ec={...so,transform:e=>Math.round(wT(e))},Tr={test:Jl("rgb","red"),parse:ap("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ec.transform(e)+", "+ec.transform(t)+", "+ec.transform(n)+", "+mi(pi.transform(r))+")"};function xT(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const tc={test:Jl("#"),parse:xT,transform:Tr.transform},lo={test:Jl("hsl","hue"),parse:ap("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fn.transform(mi(t))+", "+fn.transform(mi(n))+", "+mi(pi.transform(r))+")"},At={test:e=>Tr.test(e)||tc.test(e)||lo.test(e),parse:e=>Tr.test(e)?Tr.parse(e):lo.test(e)?lo.parse(e):tc.parse(e),transform:e=>gi(e)?e:e.hasOwnProperty("red")?Tr.transform(e):lo.transform(e)};function ST(e){var t,n;return isNaN(e)&&gi(e)&&(((t=e.match(Vl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(bS))===null||n===void 0?void 0:n.length)||0)>0}const lp="number",cp="color",TT="var",ET="var(",up="${}",CT=/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 bi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(CT,l=>(At.test(l)?(r.color.push(i),o.push(cp),n.push(At.parse(l))):l.startsWith(ET)?(r.var.push(i),o.push(TT),n.push(l)):(r.number.push(i),o.push(lp),n.push(parseFloat(l))),++i,up)).split(up);return{values:n,split:a,indexes:r,types:o}}function dp(e){return bi(e).values}function fp(e){const{split:t,types:n}=bi(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===lp?i+=mi(o[s]):a===cp?i+=At.transform(o[s]):i+=o[s]}return i}}const PT=e=>typeof e=="number"?0:e;function kT(e){const t=dp(e);return fp(e)(t.map(PT))}const er={test:ST,parse:dp,createTransformer:fp,getAnimatableNone:kT},IT=new Set(["brightness","contrast","saturate","opacity"]);function OT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vl)||[];if(!r)return e;const o=n.replace(r,"");let i=IT.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const AT=/\b([a-z-]*)\(.*?\)/gu,nc={...er,getAnimatableNone:e=>{const t=e.match(AT);return t?t.map(OT).join(" "):e}},_T={...Ph,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:nc,WebkitFilter:nc},rc=e=>_T[e];function hp(e,t){let n=rc(e);return n!==nc&&(n=er),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const MT=new Set(["auto","none","0"]);function DT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!MT.has(i)&&bi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=hp(n,o)}class pp extends Ql{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Ll(c))){const u=Qh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!mT.has(r)||t.length!==2)return;const[o,i]=t,s=op(o),a=op(i);if(s!==a)if(Jh(s)&&Jh(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)dT(t[o])&&r.push(o);r.length&&DT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ao[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=ao[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function mp(e){let t;return()=>(t===void 0&&(t=e()),t)}const gp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(er.test(e)||e==="0")&&!e.startsWith("url("));function NT(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 FT(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=gp(o,t),a=gp(i,t);return io(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:NT(e)||n==="spring"&&r}class yp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&bT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!FT(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ls(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function vp(e,t){return t?e*(1e3/t):0}const LT=5;function bp(e,t,n){const r=Math.max(t-LT,0);return vp(n-e(r),t-r)}const oc=.001,VT=.01,wp=10,$T=.05,jT=1;function RT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;io(e<=mn(wp),"Spring duration must be 10 seconds or less");let s=1-t;s=Zn($T,jT,s),e=Zn(VT,wp,gn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,h=ic(c,s),p=Math.exp(-d);return oc-f/h*p},i=c=>{const d=c*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=ic(Math.pow(c,2),s);return(-o(c)+oc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-oc+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=zT(o,i,a);if(e=mn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const BT=12;function zT(e,t,n){let r=n;for(let o=1;o<BT;o++)r=r-e(r)/t(r);return r}function ic(e,t){return e*Math.sqrt(1-t*t)}const WT=["duration","bounce"],HT=["stiffness","damping","mass"];function xp(e,t){return t.some(n=>e[n]!==void 0)}function UT(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!xp(e,HT)&&xp(e,WT)){const n=RT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function sc({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=UT({...r,velocity:-gn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=i-o,v=gn(Math.sqrt(a/c)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let x;if(p<1){const g=ic(v,p);x=T=>{const S=Math.exp(-p*v*T);return i-S*((h+p*v*m)/g*Math.sin(g*T)+m*Math.cos(g*T))}}else if(p===1)x=g=>i-Math.exp(-v*g)*(m+(h+v*m)*g);else{const g=v*Math.sqrt(p*p-1);x=T=>{const S=Math.exp(-p*v*T),E=Math.min(g*T,300);return i-S*((h+p*v*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:f&&u||null,next:g=>{const T=x(g);if(f)s.done=g>=u;else{let S=h;g!==0&&(p<1?S=bp(x,g,T):S=0);const E=Math.abs(S)<=n,O=Math.abs(i-T)<=t;s.done=E&&O}return s.value=s.done?i:T,s}}}function Sp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=k=>a!==void 0&&k<a||l!==void 0&&k>l,p=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let m=n*t;const v=d+m,y=s===void 0?v:s(v);y!==v&&(m=y-d);const x=k=>-m*Math.exp(-k/r),g=k=>y+x(k),T=k=>{const I=x(k),C=g(k);f.done=Math.abs(I)<=c,f.value=f.done?y:C};let S,E;const O=k=>{h(f.value)&&(S=k,E=sc({keyframes:[f.value,p(f.value)],velocity:bp(g,k,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return O(0),{calculatedDuration:null,next:k=>{let I=!1;return!E&&S===void 0&&(I=!0,T(k),O(k)),S!==void 0&&k>=S?E.next(k-S):(!I&&T(k),f)}}}const Tp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,GT=1e-7,YT=12;function qT(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Tp(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>GT&&++a<YT);return s}function wi(e,t,n,r){if(e===t&&n===r)return xt;const o=i=>qT(i,0,1,e,n);return i=>i===0||i===1?i:Tp(o(i),t,r)}const KT=wi(.42,0,1,1),ZT=wi(0,0,.58,1),Ep=wi(.42,0,.58,1),Cp=e=>Array.isArray(e)&&typeof e[0]!="number",Pp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kp=e=>t=>1-e(1-t),ac=e=>1-Math.sin(Math.acos(e)),Ip=kp(ac),XT=Pp(ac),Op=wi(.33,1.53,.69,.99),lc=kp(Op),QT=Pp(lc),Ap={linear:xt,easeIn:KT,easeInOut:Ep,easeOut:ZT,circIn:ac,circInOut:XT,circOut:Ip,backIn:lc,backInOut:QT,backOut:Op,anticipate:e=>(e*=2)<1?.5*lc(e):.5*(2-Math.pow(2,-10*(e-1)))},cc=e=>{if(Array.isArray(e)){Ut(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return wi(t,n,r,o)}else if(typeof e=="string")return Ut(Ap[e]!==void 0,`Invalid easing type '${e}'`),Ap[e];return e},co=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ye=(e,t,n)=>e+(t-e)*n;function uc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function JT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=uc(l,a,e+1/3),i=uc(l,a,e),s=uc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function $s(e,t){return n=>n>0?t:e}const dc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},eE=[tc,Tr,lo],tE=e=>eE.find(t=>t.test(e));function _p(e){const t=tE(e);if(io(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===lo&&(n=JT(n)),n}const Mp=(e,t)=>{const n=_p(e),r=_p(t);if(!n||!r)return $s(e,t);const o={...n};return i=>(o.red=dc(n.red,r.red,i),o.green=dc(n.green,r.green,i),o.blue=dc(n.blue,r.blue,i),o.alpha=Ye(n.alpha,r.alpha,i),Tr.transform(o))},fc=new Set(["none","hidden"]);function nE(e,t){return fc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rE(e,t){return n=>Ye(e,t,n)}function hc(e){return typeof e=="number"?rE:typeof e=="string"?Ll(e)?$s:At.test(e)?Mp:sE:Array.isArray(e)?Dp:typeof e=="object"?At.test(e)?Mp:oE:$s}function Dp(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>hc(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function oE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=hc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function iE(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const sE=(e,t)=>{const n=er.createTransformer(t),r=bi(e),o=bi(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?fc.has(e)&&!o.values.length||fc.has(t)&&!r.values.length?nE(e,t):Nn(Dp(iE(r,o),o.values),n):(io(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),$s(e,t))};function Np(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ye(e,t,n):hc(e)(e,t)}function aE(e,t,n){const r=[],o=n||Np,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||xt:t;a=Nn(l,a)}r.push(a)}return r}function Fp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Ut(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=aE(t,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=co(e[u],e[u+1],c);return s[u](d)};return n?c=>l(Zn(e[0],e[i-1],c)):l}function Lp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=co(0,t,r);e.push(Ye(n,1,o))}}function Vp(e){const t=[0];return Lp(t,e.length-1),t}function lE(e,t){return e.map(n=>n*t)}function cE(e,t){return e.map(()=>t||Ep).splice(0,e.length-1)}function js({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Cp(r)?r.map(cc):cc(r),i={done:!1,value:t[0]},s=lE(n&&n.length===t.length?n:Vp(t),e),a=Fp(s,t,{ease:Array.isArray(o)?o:cE(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const pc=2e4;function $p(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<pc;)t+=n,r=e.next(t);return t>=pc?1/0:t}const uE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Me.update(t,!0),stop:()=>pn(t),now:()=>St.isProcessing?St.timestamp:Jn.now()}},dE={decay:Sp,inertia:Sp,tween:js,keyframes:js,spring:sc},fE=e=>e/100;class mc extends yp{constructor({KeyframeResolver:t=Ql,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new t(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=dE[n]||js;let l,c;a!==js&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ut(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Nn(fE,Np(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=$p(u));const{calculatedDuration:d}=u,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:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=i;if(h){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),C=k%1;!C&&k>=1&&(C=1),C===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(C=1-C,m&&(C-=m/d)):p==="mirror"&&(T=s)),g=Zn(0,1,C)*d}const S=x?{done:!1,value:l[0]}:T.next(g);a&&(S.value=a(S.value));let{done:E}=S;!x&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&o!==void 0&&(S.value=Ls(l,this.options,o)),v&&v(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?gn(t.calculatedDuration):0}get time(){return gn(this.currentTime)}set time(t){t=mn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=gn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=uE,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const jp=e=>Array.isArray(e)&&typeof e[0]=="number";function Rp(e){return!!(!e||typeof e=="string"&&e in gc||jp(e)||Array.isArray(e)&&e.every(Rp))}const xi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xi([0,.65,.55,1]),circOut:xi([.55,0,1,.45]),backIn:xi([.31,.01,.66,-.59]),backOut:xi([.33,1.53,.69,.99])};function hE(e){return Bp(e)||gc.easeOut}function Bp(e){if(e)return jp(e)?xi(e):Array.isArray(e)?e.map(hE):gc[e]}function pE(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Bp(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const mE=mp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Rs=10,gE=2e4;function yE(e){return e.type==="spring"||!Rp(e.ease)}function vE(e,t){const n=new mc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<gE;)r=n.sample(i),o.push(r.value),i+=Rs;return{times:void 0,keyframes:o,duration:i-Rs,ease:"linear"}}class zp extends yp{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new pp(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(yE(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=vE(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=pE(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=Jn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ls(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return gn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return gn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=mn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return xt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return xt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...f}=this.options,h=new mc({...f,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=mn(this.time);c.setWithVelocity(h.sample(p-Rs).value,h.sample(p).value,Rs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return mE()&&r&&Vh.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function bE(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Me.update(r,!0),()=>pn(r)}const wE=mp(()=>window.ScrollTimeline!==void 0);class yc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(wE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),bE(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const vc=(e,t,n,r={},o,i,s)=>a=>{const l=Kl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-mn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};lT(l)||(d={...d,...aT(e,d)}),d.duration&&(d.duration=mn(d.duration)),d.repeatDelay&&(d.repeatDelay=mn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=Ls(d.keyframes,l);if(h!==void 0)return Me.update(()=>{d.onUpdate(h),d.onComplete()}),new yc([])}return!i&&zp.supports(d)?new zp(d):new mc(d)};class bc{constructor(){this.subscriptions=[]}add(t){return Ds(this.subscriptions,t),()=>vi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wp=new Set;function wc(e,t,n){e||Wp.has(t)||(console.warn(t),Wp.add(t))}const Hp=30,xE=e=>!isNaN(parseFloat(e)),Si={current:void 0};class Up{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Jn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&wc(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new bc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Si.current&&Si.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hp);return vp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function uo(e,t){return new Up(e,t)}function SE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function TE(e,t){const n=Fs(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=LS(i[s]);SE(e,s,a)}}function Gp(e){return e.getProps()[hh]}class EE extends Up{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=$h(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(vi(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function CE(e){return!!(mt(e)&&e.add)}function xc(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new EE("auto"),e.addValue("willChange",r)),CE(r))return r.add(t)}function PE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Sc(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),h=l[d];if(h===void 0||u&&PE(u,d))continue;const p={delay:n,elapsed:0,...Kl(s||{},d)};let m=!1;if(window.HandoffAppearAnimations){const y=Gp(e);if(y){const x=window.HandoffAppearAnimations(y,d,f,Me);x!==null&&(p.elapsed=x,m=!0)}}f.start(vc(d,f,h,e.shouldReduceMotion&&Kn.has(d)?{type:!1}:p,e,m,xc(e,d)));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Me.update(()=>{a&&TE(e,a)})}),c}function Tc(e,t,n={}){var r;const o=Fs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Sc(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return kE(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function kE(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(IE).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(Tc(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function IE(e,t){return e.sortNodePosition(t)}function OE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Tc(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Tc(e,t,n);else{const o=typeof t=="function"?Fs(e,t,n.custom):t;r=Promise.all(Sc(e,o,n))}return r.then(()=>{Me.postRender(()=>{e.notify("AnimationComplete",t)})})}const AE=[...Dl].reverse(),_E=Dl.length;function ME(e){return t=>Promise.all(t.map(({animation:n,options:r})=>OE(e,n,r)))}function DE(e){let t=ME(e),n=Yp(),r=!0;const o=l=>(c,u)=>{var d;const f=Fs(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 i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<_E;v++){const y=AE[v],x=n[y],g=c[y]!==void 0?c[y]:u[y],T=ui(g),S=y===l?x.isActive:null;S===!1&&(p=v);let E=g===u[y]&&g!==c[y]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...h},!x.isActive&&S===null||!g&&!x.prevProp||di(g)||typeof g=="boolean")continue;let k=NE(x.prevProp,g)||y===l&&x.isActive&&!E&&T||v>p&&T,I=!1;const C=Array.isArray(g)?g:[g];let V=C.reduce(o(y),{});S===!1&&(V={});const{prevResolvedValues:D={}}=x,L={...D,...V},P=_=>{k=!0,f.has(_)&&(I=!0,f.delete(_)),x.needsAnimating[_]=!0;const N=e.getValue(_);N&&(N.liveStyle=!1)};for(const _ in L){const N=V[_],$=D[_];if(h.hasOwnProperty(_))continue;let z=!1;Hl(N)&&Hl($)?z=!Kh(N,$):z=N!==$,z?N!=null?P(_):f.add(_):N!==void 0&&f.has(_)?P(_):x.protectedKeys[_]=!0}x.prevProp=g,x.prevResolvedValues=V,x.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(k=!1),k&&(!E||I)&&d.push(...C.map(_=>({animation:_,options:{type:y}})))}if(f.size){const v={};f.forEach(y=>{const x=e.getBaseTarget(y),g=e.getValue(y);g&&(g.liveStyle=!0),v[y]=x??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Yp(),r=!0}}}function NE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Kh(t,e):!1}function Er(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yp(){return{animate:Er(!0),whileInView:Er(),whileHover:Er(),whileTap:Er(),whileDrag:Er(),whileFocus:Er(),exit:Er()}}class FE extends Qn{constructor(t){super(t),t.animationState||(t.animationState=DE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();di(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 LE=0;class VE extends Qn{constructor(){super(...arguments),this.id=LE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const $E={animation:{Feature:FE},exit:{Feature:VE}},qp=(e,t)=>Math.abs(e-t);function jE(e,t){const n=qp(e.x,t.x),r=qp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Kp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Cc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=jE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=St;this.history.push({...p,timestamp:m});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Ec(f,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Cc(d.type==="pointercancel"?this.lastMoveEventInfo:Ec(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,v),p&&p(d,v)},!Bh(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Ns(t),a=Ec(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=St;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Cc(a,this.history)),this.removeListeners=Nn(Dn(this.contextWindow,"pointermove",this.handlePointerMove),Dn(this.contextWindow,"pointerup",this.handlePointerUp),Dn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),pn(this.updatePoint)}}function Ec(e,t){return t?{point:t(e.point)}:e}function Zp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Cc({point:e},t){return{point:e,delta:Zp(e,Xp(t)),offset:Zp(e,RE(t)),velocity:BE(t,.1)}}function RE(e){return e[0]}function Xp(e){return e[e.length-1]}function BE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Xp(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};const i=gn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Qp=1e-4,zE=1-Qp,WE=1+Qp,Jp=.01,HE=0-Jp,UE=0+Jp;function Gt(e){return e.max-e.min}function GE(e,t,n){return Math.abs(e-t)<=n}function em(e,t,n,r=.5){e.origin=r,e.originPoint=Ye(t.min,t.max,e.origin),e.scale=Gt(n)/Gt(t),e.translate=Ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zE&&e.scale<=WE||isNaN(e.scale))&&(e.scale=1),(e.translate>=HE&&e.translate<=UE||isNaN(e.translate))&&(e.translate=0)}function Ti(e,t,n,r){em(e.x,t.x,n.x,r?r.originX:void 0),em(e.y,t.y,n.y,r?r.originY:void 0)}function tm(e,t,n){e.min=n.min+t.min,e.max=e.min+Gt(t)}function YE(e,t,n){tm(e.x,t.x,n.x),tm(e.y,t.y,n.y)}function nm(e,t,n){e.min=t.min-n.min,e.max=e.min+Gt(t)}function Ei(e,t,n){nm(e.x,t.x,n.x),nm(e.y,t.y,n.y)}function qE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ye(n,e,r.max):Math.min(e,n)),e}function rm(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function KE(e,{top:t,left:n,bottom:r,right:o}){return{x:rm(e.x,n,o),y:rm(e.y,t,r)}}function om(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZE(e,t){return{x:om(e.x,t.x),y:om(e.y,t.y)}}function XE(e,t){let n=.5;const r=Gt(e),o=Gt(t);return o>r?n=co(t.min,t.max-r,e.min):r>o&&(n=co(e.min,e.max-o,t.min)),Zn(0,1,n)}function QE(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Pc=.35;function JE(e=Pc){return e===!1?e=0:e===!0&&(e=Pc),{x:im(e,"left","right"),y:im(e,"top","bottom")}}function im(e,t,n){return{min:sm(e,t),max:sm(e,n)}}function sm(e,t){return typeof e=="number"?e:e[t]||0}const am=()=>({translate:0,scale:1,origin:0,originPoint:0}),fo=()=>({x:am(),y:am()}),lm=()=>({min:0,max:0}),at=()=>({x:lm(),y:lm()});function Qt(e){return[e("x"),e("y")]}function cm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function eC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function kc(e){return e===void 0||e===1}function Ic({scale:e,scaleX:t,scaleY:n}){return!kc(e)||!kc(t)||!kc(n)}function Cr(e){return Ic(e)||um(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function um(e){return dm(e.x)||dm(e.y)}function dm(e){return e&&e!=="0%"}function Bs(e,t,n){const r=e-n,o=t*r;return n+o}function fm(e,t,n,r,o){return o!==void 0&&(e=Bs(e,o,r)),Bs(e,n,r)+t}function Oc(e,t=0,n=1,r,o){e.min=fm(e.min,t,n,r,o),e.max=fm(e.max,t,n,r,o)}function hm(e,{x:t,y:n}){Oc(e.x,t.translate,t.scale,t.originPoint),Oc(e.y,n.translate,n.scale,n.originPoint)}const pm=.999999999999,mm=1.0000000000001;function nC(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ho(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,hm(e,s)),r&&Cr(i.latestValues)&&ho(e,i.latestValues))}t.x<mm&&t.x>pm&&(t.x=1),t.y<mm&&t.y>pm&&(t.y=1)}function tr(e,t){e.min=e.min+t,e.max=e.max+t}function gm(e,t,n,r,o=.5){const i=Ye(e.min,e.max,o);Oc(e,t,n,i,r)}function ho(e,t){gm(e.x,t.x,t.scaleX,t.scale,t.originX),gm(e.y,t.y,t.scaleY,t.scale,t.originY)}function ym(e,t){return cm(tC(e.getBoundingClientRect(),t))}function rC(e,t,n){const r=ym(e,n),{scroll:o}=t;return o&&(tr(r.x,o.offset.x),tr(r.y,o.offset.y)),r}const vm=({current:e})=>e?e.ownerDocument.defaultView:null,oC=new WeakMap;class iC{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=at(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ns(u,"page").point)},i=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Uh(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qt(y=>{let x=this.getAxisMotionValue(y).get()||0;if(fn.test(x)){const{projection:g}=this.visualElement;if(g&&g.layout){const T=g.layout.layoutBox[y];T&&(x=Gt(T)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&Me.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=xc(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=sC(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Qt(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Kp(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:vm(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Me.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!zs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=qE(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&ro(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=KE(o.layoutBox,n):this.constraints=!1,this.elastic=JE(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Qt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=QE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ro(t))return!1;const r=t.current;Ut(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=rC(r,o.root,this.visualElement.getTransformPagePoint());let s=ZE(o.layout.layoutBox,i);if(n){const a=n(eC(s));this.hasMutatedConstraints=!!a,a&&(s=cm(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Qt(u=>{if(!zs(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const 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,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(vc(t,r,0,n,this.visualElement,!1,xc(this.visualElement,t)))}stopAnimation(){Qt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Qt(n=>{const{drag:r}=this.getProps();if(!zs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ye(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ro(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=XE({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Qt(s=>{if(!zs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ye(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;oC.set(this.visualElement,this);const t=this.visualElement.current,n=Dn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ro(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Me.read(r);const s=Mn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Qt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Pc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function zs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class aC extends Qn{constructor(t){super(t),this.removeGroupControls=xt,this.removeListeners=xt,this.controls=new iC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xt}unmount(){this.removeGroupControls(),this.removeListeners()}}const bm=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class lC extends Qn{constructor(){super(...arguments),this.removePointerDownListener=xt}onPointerDown(t){this.session=new Kp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:bm(t),onStart:bm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Me.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Dn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function cC(){const e=b.useContext(Es);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ci={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=wm(e,t.target.x),r=wm(e,t.target.y);return`${n}% ${r}%`}},uC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=er.parse(e);if(o.length>5)return r;const i=er.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ye(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class dC extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;fS(fC),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Me.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ml.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xm(e){const[t,n]=cC(),r=b.useContext(fi);return w.jsx(dC,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(mh),isPresent:t,safeToRemove:n})}const fC={borderRadius:{...Ci,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ci,borderTopRightRadius:Ci,borderBottomLeftRadius:Ci,borderBottomRightRadius:Ci,boxShadow:uC},Sm=["TopLeft","TopRight","BottomLeft","BottomRight"],hC=Sm.length,Tm=e=>typeof e=="string"?parseFloat(e):e,Em=e=>typeof e=="number"||fe.test(e);function pC(e,t,n,r,o,i){o?(e.opacity=Ye(0,n.opacity!==void 0?n.opacity:1,mC(r)),e.opacityExit=Ye(t.opacity!==void 0?t.opacity:1,0,gC(r))):i&&(e.opacity=Ye(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<hC;s++){const a=`border${Sm[s]}Radius`;let l=Cm(t,a),c=Cm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Em(l)===Em(c)?(e[a]=Math.max(Ye(Tm(l),Tm(c),r),0),(fn.test(c)||fn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ye(t.rotate||0,n.rotate||0,r))}function Cm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const mC=Pm(0,.5,Ip),gC=Pm(.5,.95,xt);function Pm(e,t,n){return r=>r<e?0:r>t?1:n(co(e,t,r))}function km(e,t){e.min=t.min,e.max=t.max}function Jt(e,t){km(e.x,t.x),km(e.y,t.y)}function Im(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Om(e,t,n,r,o){return e-=t,e=Bs(e,1/n,r),o!==void 0&&(e=Bs(e,1/o,r)),e}function yC(e,t=0,n=1,r=.5,o,i=e,s=e){if(fn.test(t)&&(t=parseFloat(t),t=Ye(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ye(i.min,i.max,r);e===i&&(a-=t),e.min=Om(e.min,t,n,a,o),e.max=Om(e.max,t,n,a,o)}function Am(e,t,[n,r,o],i,s){yC(e,t[n],t[r],t[o],t.scale,i,s)}const vC=["x","scaleX","originX"],bC=["y","scaleY","originY"];function _m(e,t,n,r){Am(e.x,t,vC,n?n.x:void 0,r?r.x:void 0),Am(e.y,t,bC,n?n.y:void 0,r?r.y:void 0)}function Mm(e){return e.translate===0&&e.scale===1}function Dm(e){return Mm(e.x)&&Mm(e.y)}function wC(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Nm(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Fm(e){return Gt(e.x)/Gt(e.y)}function Lm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class xC{constructor(){this.members=[]}add(t){Ds(this.members,t),t.scheduleRender()}remove(t){if(vi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function SC(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY: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 TC=(e,t)=>e.depth-t.depth;class EC{constructor(){this.children=[],this.isDirty=!1}add(t){Ds(this.children,t),this.isDirty=!0}remove(t){vi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(TC),this.isDirty=!1,this.children.forEach(t)}}function CC(e,t){const n=Jn.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(pn(r),e(i-t))};return Me.read(r,!0),()=>pn(r)}function Vm(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Ac(e,t,n){const r=mt(e)?e:uo(e);return r.start(vc("",r,t,n)),r.animation}const Pr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_c=["","X","Y","Z"],PC={visibility:"hidden"},$m=1e3;let kC=0;function Mc(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function jm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Gp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?jm(e.parent):!1:!1}function Rm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=kC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Pr.totalNodes=Pr.resolvedTargetDeltas=Pr.recalculatedProjection=0),this.nodes.forEach(AC),this.nodes.forEach(FC),this.nodes.forEach(LC),this.nodes.forEach(_C),window.MotionDebug&&window.MotionDebug.record(Pr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new EC)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new bc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Vm(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=CC(f,250),Ws.hasAnimatedSinceResize&&(Ws.hasAnimatedSinceResize=!1,this.nodes.forEach(zm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||BC,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=u.getProps(),x=!this.targetLayout||!Nm(this.targetLayout,p)||h,g=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...Kl(m,"layout"),onPlay:v,onComplete:y};(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 s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,pn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(VC),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&jm(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Bm);return}this.isUpdating||this.nodes.forEach(DC),this.isUpdating=!1,this.nodes.forEach(NC),this.nodes.forEach(IC),this.nodes.forEach(OC),this.clearAllSnapshots();const a=Jn.now();St.delta=Zn(0,1e3/60,a-St.timestamp),St.timestamp=a,St.isProcessing=!0,Ul.update.process(St),Ul.preRender.process(St),Ul.render.process(St),St.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ml.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(MC),this.sharedNodes.forEach($C)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=at(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Dm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||Cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),zC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return at();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(tr(a.x,l.offset.x),tr(a.y,l.offset.y)),a}removeElementScroll(s){const a=at();Jt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Jt(a,s);const{scroll:f}=this.root;f&&(tr(a.x,-f.offset.x),tr(a.y,-f.offset.y))}tr(a.x,u.offset.x),tr(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=at();Jt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ho(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Cr(u.latestValues)&&ho(l,u.latestValues)}return Cr(this.latestValues)&&ho(l,this.latestValues),l}removeTransform(s){const a=at();Jt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Cr(c.latestValues))continue;Ic(c.latestValues)&&c.updateSnapshot();const u=at(),d=c.measurePageBox();Jt(u,d),_m(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Cr(this.latestValues)&&_m(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==St.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=St.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),Ei(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=at(),this.targetWithTransforms=at()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),YE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Jt(this.target,this.layout.layoutBox),hm(this.target,this.targetDelta)):Jt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),Ei(this.relativeTargetOrigin,this.target,h.target),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Pr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ic(this.parent.latestValues)||um(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===St.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Jt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;nC(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=at());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Im(this.prevProjectionDelta.x,this.projectionDelta.x),Im(this.prevProjectionDelta.y,this.projectionDelta.y)),Ti(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Lm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Lm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Pr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fo(),this.projectionDelta=fo(),this.projectionDeltaWithTransform=fo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=at(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),y=!v||v.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(RC));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const S=T/1e3;Wm(d.x,s.x,S),Wm(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ei(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jC(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&wC(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=at()),Jt(g,this.relativeTarget)),m&&(this.animationValues=u,pC(u,c,this.latestValues,S,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(pn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{Ws.hasAnimatedSinceResize=!0,this.currentAnimation=Ac(0,$m,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($m),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&qm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||at();const d=Gt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Gt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Jt(a,l),ho(a,u),Ti(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new xC),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Mc("z",s,c,this.animationValues);for(let u=0;u<_c.length;u++)Mc(`rotate${_c[u]}`,s,c,this.animationValues),Mc(`skew${_c[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return PC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ms(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Ms(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Cr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=SC(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 Os){if(f[m]===void 0)continue;const{correct:v,applyTo:y}=Os[m],x=c.transform==="none"?f[m]:v(f[m],d);if(y){const g=y.length;for(let T=0;T<g;T++)c[y[T]]=x}else c[m]=x}return this.options.layoutId&&(c.pointerEvents=d===this?Ms(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Bm),this.root.sharedNodes.clear()}}}function IC(e){e.updateLayout()}function OC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?Qt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Gt(f);f.min=r[d].min,f.max=f.min+h}):qm(i,n.layoutBox,r)&&Qt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Gt(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=fo();Ti(a,r,n.layoutBox);const l=fo();s?Ti(l,e.applyTransform(o,!0),n.measuredBox):Ti(l,r,n.layoutBox);const c=!Dm(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=at();Ei(p,n.layoutBox,f.layoutBox);const m=at();Ei(m,r,h.layoutBox),Nm(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AC(e){window.MotionDebug&&Pr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _C(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function MC(e){e.clearSnapshot()}function Bm(e){e.clearMeasurements()}function DC(e){e.isLayoutDirty=!1}function NC(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 FC(e){e.resolveTargetDelta()}function LC(e){e.calcProjection()}function VC(e){e.resetSkewAndRotation()}function $C(e){e.removeLeadSnapshot()}function Wm(e,t,n){e.translate=Ye(t.translate,0,n),e.scale=Ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hm(e,t,n,r){e.min=Ye(t.min,n.min,r),e.max=Ye(t.max,n.max,r)}function jC(e,t,n,r){Hm(e.x,t.x,n.x,r),Hm(e.y,t.y,n.y,r)}function RC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const BC={duration:.45,ease:[.4,0,.1,1]},Um=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gm=Um("applewebkit/")&&!Um("chrome/")?Math.round:xt;function Ym(e){e.min=Gm(e.min),e.max=Gm(e.max)}function zC(e){Ym(e.x),Ym(e.y)}function qm(e,t,n){return e==="position"||e==="preserve-aspect"&&!GE(Fm(t),Fm(n),.2)}const WC=Rm({attachResizeListener:(e,t)=>Mn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dc={current:void 0},Km=Rm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dc.current){const e=new WC({});e.mount(window),e.setOptions({layoutScroll:!0}),Dc.current=e}return Dc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),HC={pan:{Feature:lC},drag:{Feature:aC,ProjectionNode:Km,MeasureLayout:xm}},Nc={current:null},Zm={current:!1};function UC(){if(Zm.current=!0,!!_l)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Nc.current=e.matches;e.addListener(t),t()}else Nc.current=!1}function GC(e,t,n){for(const r in t){const o=t[r],i=n[r];if(mt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&wc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(mt(i))e.addValue(r,uo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,uo(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pi=new WeakMap,YC=[...rp,At,er],qC=e=>YC.find(np(e)),Xm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],KC=Nl.length;class ZC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ql,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Me.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Is(n),this.isVariantNode=vh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&mt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Pi.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Zm.current||UC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Nc.current,process.env.NODE_ENV!=="production"&&wc(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Pi.delete(this.current),this.projection&&this.projection.unmount(),pn(this.notifyUpdate),pn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=Kn.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Me.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in oo){const n=oo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):at()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Xm.length;r++){const o=Xm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=GC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<KC;r++){const o=Nl[r],i=this.props[o];(ui(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Xh(o)||Zh(o))?o=parseFloat(o):!qC(o)&&er.test(n)&&(o=hp(t,n)),this.setBaseTarget(t,mt(o)?o.get():o)),mt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Wl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!mt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new bc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Qm extends ZC{constructor(){super(...arguments),this.KeyframeResolver=pp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function XC(e){return window.getComputedStyle(e)}class Jm extends Qm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Mh}readValueFromInstance(t,n){if(Kn.has(n)){const r=rc(n);return r&&r.default||0}else{const r=XC(t),o=(Th(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ym(t,n)}build(t,n,r){$l(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;mt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class eg extends Qm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=at}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Kn.has(n)){const r=rc(n);return r&&r.default||0}return n=Dh.has(n)?n:Ps(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fh(t,n,r)}build(t,n,r){Rl(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Nh(t,n,r,o)}mount(t){this.isSVGTag=Bl(t.tagName),super.mount(t)}}const QC=(e,t)=>Fl(e)?new eg(t):new Jm(t,{allowProjection:e!==b.Fragment}),JC={...$E,...nT,...HC,...{layout:{ProjectionNode:Km,MeasureLayout:xm}}},Tt=uS((e,t)=>WS(e,t,JC,QC));function tg(){const e=b.useRef(!1);return Cs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function ng(){const e=tg(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Me.postRender(r),[r]),t]}class eP extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function tP({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(no);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
5
5
  [data-motion-pop-id="${n}"] {
6
6
  position: absolute !important;
7
7
  width: ${s}px !important;
@@ -9,132 +9,137 @@
9
9
  top: ${l}px !important;
10
10
  left: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(u)}},[t]),x.jsx(UC,{isPresent:t,childRef:r,sizeRef:o,children:A.cloneElement(e,{ref:r})})}const kc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=Zn(YC),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),A.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=x.jsx(GC,{isPresent:n,children:e})),x.jsx(ws.Provider,{value:c,children:e})};function YC(){return new Map}function qC(e){return b.useEffect(()=>()=>e(),[])}const kr=e=>e.key||"";function KC(e,t){e.forEach(n=>{const r=kr(n);t.set(r,n)})}function ZC(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Bs=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{tn(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(ii).forceRender||Gm()[0],l=Um(),c=ZC(e);let u=c;const d=b.useRef(new Map).current,f=b.useRef(u),h=b.useRef(new Map).current,p=b.useRef(!0);if(xs(()=>{p.current=!1,KC(c,h),f.current=u}),qC(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(w=>x.jsx(kc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:w},kr(w)))});u=[...u];const m=f.current.map(kr),g=c.map(kr),v=m.length;for(let w=0;w<v;w++){const y=m[w];g.indexOf(y)===-1&&!d.has(y)&&d.set(y,void 0)}return s==="wait"&&d.size&&(u=[]),d.forEach((w,y)=>{if(g.indexOf(y)!==-1)return;const S=h.get(y);if(!S)return;const T=m.indexOf(y);let E=w;if(!E){const P=()=>{d.delete(y);const D=Array.from(h.keys()).filter(_=>!g.includes(_));if(D.forEach(_=>h.delete(_)),f.current=c.filter(_=>{const I=kr(_);return I===y||D.includes(I)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(kc,{isPresent:!1,onExitComplete:P,custom:t,presenceAffectsLayout:i,mode:s,children:S},kr(S)),d.set(y,E)}u.splice(T,0,E)}),u=u.map(w=>{const y=w.key;return d.has(y)?w:x.jsx(kc,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:w},kr(w))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:d.size?u:u.map(w=>b.cloneElement(w))})};function XC({children:e,isValidProp:t,...n}){t&&xh(t),n={...b.useContext(ro),...n},n.isStatic=Zn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(ro.Provider,{value:r,children:e})}const QC=b.createContext(null),JC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Ym(){const e=new Set,t=new WeakMap,n=()=>e.forEach(JC);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 qm=e=>e===!0,eP=e=>qm(e===!0)||e==="id",tP=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(ii),o=b.useContext(QC),[i,s]=Gm(),a=b.useRef(null),l=r.id||o;a.current===null&&(eP(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:qm(n)&&r.group||Ym()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return x.jsx(ii.Provider,{value:c,children:e})},Km=b.createContext(null);function nP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=Ze(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?bT(e,o,o+i):e}function rP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Zn(()=>Ht(t)),l=[],c=b.useRef(!1);tn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(sP)},updateOrder:(d,f,h)=>{if(c.current)return;const p=nP(l,d,f,h);l!==p&&(c.current=!0,r(p.map(iP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),x.jsx(a,{...i,ref:s,ignoreStrict:!0,children:x.jsx(Km.Provider,{value:u,children:e})})}const oP=b.forwardRef(rP);function iP(e){return e.value}function sP(e,t){return e.layout.min-t.layout.min}function Or(e){const t=Zn(()=>uo(e)),{isStatic:n}=b.useContext(ro);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const aP=e=>e&&typeof e=="object"&&e.mix,lP=e=>aP(e)?e.mix:void 0;function cP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=Op(o,i,{mixer:lP(i[0]),...s});return t?a(r):a}function Zm(e,t){const n=Or(t()),r=()=>n.set(t());return r(),xs(()=>{const o=()=>De.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),hn(r)}}),n}function uP(e){mi.current=[],e();const t=Zm(mi.current,e);return mi.current=void 0,t}function dP(e,t,n,r){if(typeof e=="function")return uP(e);const o=typeof t=="function"?t:cP(t,n,r);return Array.isArray(e)?Xm(e,o):Xm([e],([i])=>o(i))}function Xm(e,t){const n=Zn(()=>[]);return Zm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Qm(e,t=0){return xt(e)?e:Or(t)}function fP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=Zn(()=>Ht(r)),c=b.useContext(Km),u={x:Qm(t.x),y:Qm(t.y)},d=dP([u.x,u.y],([m,g])=>m||g?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(m,g)=>{const{velocity:v}=g;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,g)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const hP=b.forwardRef(fP),zs={Group:oP,Item:hP};class pP{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 mP=()=>new pP;function gP(){return Zn(mP)}/**
12
+ `),()=>{document.head.removeChild(u)}},[t]),w.jsx(eP,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const Fc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=hn(nP),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=w.jsx(tP,{isPresent:n,children:e})),w.jsx(Es.Provider,{value:c,children:e})};function nP(){return new Map}function rg(e){return b.useEffect(()=>()=>e(),[])}const kr=e=>e.key||"";function rP(e,t){e.forEach(n=>{const r=kr(n);t.set(r,n)})}function oP(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const ki=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Ut(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(fi).forceRender||ng()[0],l=tg(),c=oP(e);let u=c;const d=b.useRef(new Map).current,f=b.useRef(u),h=b.useRef(new Map).current,p=b.useRef(!0);if(Cs(()=>{p.current=!1,rP(c,h),f.current=u}),rg(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return w.jsx(w.Fragment,{children:u.map(x=>w.jsx(Fc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:x},kr(x)))});u=[...u];const m=f.current.map(kr),v=c.map(kr),y=m.length;for(let x=0;x<y;x++){const g=m[x];v.indexOf(g)===-1&&!d.has(g)&&d.set(g,void 0)}return s==="wait"&&d.size&&(u=[]),d.forEach((x,g)=>{if(v.indexOf(g)!==-1)return;const T=h.get(g);if(!T)return;const S=m.indexOf(g);let E=x;if(!E){const O=()=>{d.delete(g);const k=Array.from(h.keys()).filter(I=>!v.includes(I));if(k.forEach(I=>h.delete(I)),f.current=c.filter(I=>{const C=kr(I);return C===g||k.includes(C)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=w.jsx(Fc,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:i,mode:s,children:T},kr(T)),d.set(g,E)}u.splice(S,0,E)}),u=u.map(x=>{const g=x.key;return d.has(g)?x:w.jsx(Fc,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:x},kr(x))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),w.jsx(w.Fragment,{children:d.size?u:u.map(x=>b.cloneElement(x))})};function iP({children:e,isValidProp:t,...n}){t&&Oh(t),n={...b.useContext(no),...n},n.isStatic=hn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(no.Provider,{value:r,children:e})}const sP=b.createContext(null),aP=e=>!e.isLayoutDirty&&e.willUpdate(!1);function og(){const e=new Set,t=new WeakMap,n=()=>e.forEach(aP);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const ig=e=>e===!0,lP=e=>ig(e===!0)||e==="id",cP=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(fi),o=b.useContext(sP),[i,s]=ng(),a=b.useRef(null),l=r.id||o;a.current===null&&(lP(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:ig(n)&&r.group||og()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return w.jsx(fi.Provider,{value:c,children:e})},sg=b.createContext(null);function uP(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=Ye(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?VS(e,o,o+i):e}function dP({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=hn(()=>Tt(t)),l=[],c=b.useRef(!1);Ut(!!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(pP)},updateOrder:(d,f,h)=>{if(c.current)return;const p=uP(l,d,f,h);l!==p&&(c.current=!0,r(p.map(hP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),w.jsx(a,{...i,ref:s,ignoreStrict:!0,children:w.jsx(sg.Provider,{value:u,children:e})})}const fP=b.forwardRef(dP);function hP(e){return e.value}function pP(e,t){return e.layout.min-t.layout.min}function po(e){const t=hn(()=>uo(e)),{isStatic:n}=b.useContext(no);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const mP=e=>e&&typeof e=="object"&&e.mix,gP=e=>mP(e)?e.mix:void 0;function yP(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=Fp(o,i,{mixer:gP(i[0]),...s});return t?a(r):a}function ag(e,t){const n=po(t()),r=()=>n.set(t());return r(),Cs(()=>{const o=()=>Me.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),pn(r)}}),n}function vP(e){Si.current=[],e();const t=ag(Si.current,e);return Si.current=void 0,t}function bP(e,t,n,r){if(typeof e=="function")return vP(e);const o=typeof t=="function"?t:yP(t,n,r);return Array.isArray(e)?lg(e,o):lg([e],([i])=>o(i))}function lg(e,t){const n=hn(()=>[]);return ag(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function cg(e,t=0){return mt(e)?e:po(t)}function wP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=hn(()=>Tt(r)),c=b.useContext(sg),u={x:cg(t.x),y:cg(t.y)},d=bP([u.x,u.y],([m,v])=>m||v?1:"unset");Ut(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return w.jsx(l,{drag:f,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:i,onDrag:(m,v)=>{const{velocity:y}=v;y[f]&&p(n,u[f].get(),y[f]),o&&o(m,v)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const xP=b.forwardRef(wP),Hs={Group:fP,Item:xP};function ug(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Ut(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function SP(e){return typeof e=="object"&&!Array.isArray(e)}function TP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Vm(e)?new eg(t):new Jm(t);n.mount(e),Pi.set(e,n)}function EP(e,t=100){const n=sc({keyframes:[0,t],...e}),r=Math.min($p(n),pc);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:gn(r)}}function dg(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const CP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function PP(e,t){return Cp(e)?e[CP(0,e.length,t)]:e}function kP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(vi(e,o),r--)}}function IP(e,t,n,r,o,i){kP(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Ye(o,i,r[s]),easing:PP(n,s)})}function OP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const AP="easeInOut";function _P(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,i=new Map,s=new Map,a={},l=new Map;let c=0,u=0,d=0;for(let f=0;f<e.length;f++){const h=e[f];if(typeof h=="string"){l.set(h,u);continue}else if(!Array.isArray(h)){l.set(h.name,dg(u,h.at,c,l));continue}let[p,m,v={}]=h;v.at!==void 0&&(u=dg(u,v.at,c,l));let y=0;const x=(g,T,S,E=0,O=0)=>{const k=MP(g),{delay:I=0,times:C=Vp(k),type:V="keyframes",...D}=T;let{ease:L=t.ease||"easeOut",duration:P}=T;const _=typeof I=="function"?I(E,O):I,N=k.length;if(N<=2&&V==="spring"){let A=100;if(N===2&&FP(k)){const ne=k[1]-k[0];A=Math.abs(ne)}const R={...D};P!==void 0&&(R.duration=mn(P));const Z=EP(R,A);L=Z.ease,P=Z.duration}P??(P=o);const $=u+_,z=$+P;C.length===1&&C[0]===0&&(C[1]=1);const U=C.length-k.length;U>0&&Lp(C,U),k.length===1&&k.unshift(null),IP(S,k,L,C,$,z),y=Math.max(_+P,y),d=Math.max(z,d)};if(mt(p)){const g=fg(p,s);x(m,v,hg("default",g))}else{const g=ug(p,r,a),T=g.length;for(let S=0;S<T;S++){m=m,v=v;const E=g[S],O=fg(E,s);for(const k in m)x(m[k],DP(v,k),hg(k,O),S,T)}}c=u,u+=y}return s.forEach((f,h)=>{for(const p in f){const m=f[p];m.sort(OP);const v=[],y=[],x=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:O}=m[T];v.push(E),y.push(co(0,d,S)),x.push(O||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(AP)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(h)||i.set(h,{keyframes:{},transition:{}});const g=i.get(h);g.keyframes[p]=v,g.transition[p]={...t,duration:d,ease:x,times:y,...n}}}),i}function fg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function hg(e,t){return t[e]||(t[e]=[]),t[e]}function MP(e){return Array.isArray(e)?e:[e]}function DP(e,t){return e[t]?{...e,...e[t]}:{...e}}const NP=e=>typeof e=="number",FP=e=>e.every(NP);function pg(e,t,n,r){const o=ug(e,r),i=o.length;Ut(!!i,"No valid element provided.");const s=[];for(let a=0;a<i;a++){const l=o[a];Pi.has(l)||TP(l);const c=Pi.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,i)),s.push(...Sc(c,{...t,transition:u},{}))}return new yc(s)}const LP=e=>Array.isArray(e)&&Array.isArray(e[0]);function VP(e,t,n){const r=[];return _P(e,t,n).forEach(({keyframes:i,transition:s},a)=>{let l;mt(a)?l=Ac(a,i.default,s.default):l=pg(a,i,s),r.push(l)}),new yc(r)}const $P=e=>{function t(n,r,o){let i;return LP(n)?i=VP(n,r,e):SP(r)?i=pg(n,r,o,e):i=Ac(n,r,o),e&&e.animations.push(i),i}return t};function jP(){const e=hn(()=>({current:null,animations:[]})),t=hn(()=>$P(e));return rg(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class RP{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 BP=()=>new RP;function zP(){return hn(BP)}function WP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function HP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:WP(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=cc(r)(l/c)*c}return t+l}}/**
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 yP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jm=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
17
+ */const UP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mg=(...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 vP={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 GP={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 bP=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>b.createElement("svg",{ref:l,...vP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jm("lucide",o),...a},[...s.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
27
+ */const YP=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>b.createElement("svg",{ref:l,...GP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mg("lucide",o),...a},[...s.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
28
28
  * @license lucide-react v0.414.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const at=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(bP,{ref:i,iconNode:t,className:Jm(`lucide-${yP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
32
+ */const tt=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(YP,{ref:i,iconNode:t,className:mg(`lucide-${UP(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 wP=at("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 qP=tt("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
38
38
  * @license lucide-react v0.414.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const xP=at("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 KP=tt("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
43
43
  * @license lucide-react v0.414.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const eg=at("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 gg=tt("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
48
48
  * @license lucide-react v0.414.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const TP=at("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 ZP=tt("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
53
53
  * @license lucide-react v0.414.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const tg=at("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
57
+ */const XP=tt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
58
58
  * @license lucide-react v0.414.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const SP=at("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
62
+ */const yg=tt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
63
63
  * @license lucide-react v0.414.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const Oc=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
67
+ */const QP=tt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.414.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const EP=at("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
72
+ */const Lc=tt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.414.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const ng=at("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"}]]);/**
77
+ */const JP=tt("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
78
78
  * @license lucide-react v0.414.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const CP=at("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"}]]);/**
82
+ */const vg=tt("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
83
83
  * @license lucide-react v0.414.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const PP=at("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"}]]);/**
87
+ */const ek=tt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
88
88
  * @license lucide-react v0.414.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const kP=at("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"}]]);/**
92
+ */const tk=tt("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
93
93
  * @license lucide-react v0.414.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const rg=at("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
97
+ */const nk=tt("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
98
98
  * @license lucide-react v0.414.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const OP=at("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
102
+ */const bg=tt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
103
103
  * @license lucide-react v0.414.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const Ic=at("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
107
+ */const rk=tt("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
108
108
  * @license lucide-react v0.414.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const IP=at("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
112
+ */const Vc=tt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
113
113
  * @license lucide-react v0.414.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const po=at("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 ok=tt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
118
118
  * @license lucide-react v0.414.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const AP=at("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"}]]);/**
122
+ */const mo=tt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
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 _P=at("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"}]]);/**
127
+ */const ik=tt("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
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 og=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
132
+ */const sk=tt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
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 DP=at("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),ig={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},MP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},sg=e=>x.jsx(Ht.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:ig.false,transition:MP,variants:ig,children:e.children}),NP=as("px-4 py-4 border relative rounded-lg text-sm",{variants:{theme:{neutral:"border-border bg-background",danger:"text-danger-contrast bg-danger/10 border-danger/50",success:"text-success-foreground bg-success/10 border-success/50",info:"text-info bg-info/10 border-info/50"}},defaultVariants:{theme:"neutral"}}),FP=b.forwardRef(function({className:t,theme:n,onClose:r,open:o=!0,...i},s){return x.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"pointer-events-none isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:x.jsx(sg,{"data-open":!!o,open:!!o,children:x.jsxs(no,{...i,className:Xe(NP({theme:n}),t),ref:s,"data-theme":n,role:"alert",as:i.as??"div",children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?x.jsx(ng,{size:20}):null,n==="info"?x.jsx(rg,{size:20}):null,n==="danger"?x.jsx(EP,{size:20}):null,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,r!==void 0?x.jsx("button",{type:"button",onClick:()=>r(!1),className:"duration-300 ease-in-out absolute right-3 top-3 text-foreground transition-colors hover:text-danger",children:x.jsx(og,{size:20})}):null]})})})});function Be(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 Ge(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function mo(e,t){const n=Be(e);return isNaN(t)?Ge(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ws(e,t){const n=Be(e);if(isNaN(t))return Ge(e,NaN);if(!t)return n;const r=n.getDate(),o=Ge(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const ag=6048e5,LP=864e5,VP=6e4,$P=36e5,RP=1e3;let jP={};function Ir(){return jP}function pn(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Be(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function go(e){return pn(e,{weekStartsOn:1})}function lg(e){const t=Be(e),n=t.getFullYear(),r=Ge(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=go(r),i=Ge(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=go(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function yo(e){const t=Be(e);return t.setHours(0,0,0,0),t}function Hs(e){const t=Be(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 BP(e,t){const n=yo(e),r=yo(t),o=+n-Hs(n),i=+r-Hs(r);return Math.round((o-i)/LP)}function zP(e){const t=lg(e),n=Ge(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),go(n)}function cg(e,t){const n=t*7;return mo(e,n)}function ug(e,t){return Ws(e,t*12)}function WP(e){return Ge(e,Date.now())}function HP(e,t){const n=yo(e),r=yo(t);return+n==+r}function UP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function GP(e){if(!UP(e)&&typeof e!="number")return!1;const t=Be(e);return!isNaN(Number(t))}function dg(e,t){const n=Be(e.start),r=Be(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(Be(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function fg(e){const t=Be(e);return t.setDate(1),t.setHours(0,0,0,0),t}function YP(e){const t=Be(e),n=Ge(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function qP(e,t){var a,l;const n=Ir(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Be(e),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const KP={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"}},ZP=(e,t,n)=>{let r;const o=KP[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 Ac(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const XP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},QP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},JP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ek={date:Ac({formats:XP,defaultWidth:"full"}),time:Ac({formats:QP,defaultWidth:"full"}),dateTime:Ac({formats:JP,defaultWidth:"full"})},tk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nk=(e,t,n,r)=>tk[e];function bi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const rk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ok={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ik={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"]},sk={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"]},ak={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"}},lk={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"}},ck={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:bi({values:rk,defaultWidth:"wide"}),quarter:bi({values:ok,defaultWidth:"wide",argumentCallback:e=>e-1}),month:bi({values:ik,defaultWidth:"wide"}),day:bi({values:sk,defaultWidth:"wide"}),dayPeriod:bi({values:ak,defaultWidth:"wide",formattingValues:lk,defaultFormattingWidth:"wide"})};function wi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?dk(a,d=>d.test(s)):uk(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function uk(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fk(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const hk=/^(\d+)(th|st|nd|rd)?/i,pk=/\d+/i,mk={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},gk={any:[/^b/i,/^(a|c)/i]},yk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vk={any:[/1/i,/2/i,/3/i,/4/i]},bk={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},wk={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]},xk={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},Tk={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]},Sk={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},Ek={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}},Ck={ordinalNumber:fk({matchPattern:hk,parsePattern:pk,valueCallback:e=>parseInt(e,10)}),era:wi({matchPatterns:mk,defaultMatchWidth:"wide",parsePatterns:gk,defaultParseWidth:"any"}),quarter:wi({matchPatterns:yk,defaultMatchWidth:"wide",parsePatterns:vk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:wi({matchPatterns:bk,defaultMatchWidth:"wide",parsePatterns:wk,defaultParseWidth:"any"}),day:wi({matchPatterns:xk,defaultMatchWidth:"wide",parsePatterns:Tk,defaultParseWidth:"any"}),dayPeriod:wi({matchPatterns:Sk,defaultMatchWidth:"any",parsePatterns:Ek,defaultParseWidth:"any"})},hg={code:"en-US",formatDistance:ZP,formatLong:ek,formatRelative:nk,localize:ck,match:Ck,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pk(e){const t=Be(e);return BP(t,YP(t))+1}function pg(e){const t=Be(e),n=+go(t)-+zP(t);return Math.round(n/ag)+1}function _c(e,t){var u,d,f,h;const n=Be(e),r=n.getFullYear(),o=Ir(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=Ge(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=pn(s,t),l=Ge(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=pn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function kk(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=_c(e,t),i=Ge(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),pn(i,t)}function mg(e,t){const n=Be(e),r=+pn(n,t)-+kk(n,t);return Math.round(r/ag)+1}function Ve(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const tr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ve(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ve(n+1,2)},d(e,t){return Ve(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 Ve(e.getHours()%12||12,t.length)},H(e,t){return Ve(e.getHours(),t.length)},m(e,t){return Ve(e.getMinutes(),t.length)},s(e,t){return Ve(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ve(o,t.length)}},vo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return tr.y(e,t)},Y:function(e,t,n,r){const o=_c(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Ve(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ve(i,t.length)},R:function(e,t){const n=lg(e);return Ve(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ve(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 Ve(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 Ve(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return tr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ve(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=mg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ve(o,t.length)},I:function(e,t,n){const r=pg(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ve(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):tr.d(e,t)},D:function(e,t,n){const r=Pk(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ve(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ve(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ve(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ve(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=vo.noon:r===0?o=vo.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=vo.evening:r>=12?o=vo.afternoon:r>=4?o=vo.morning:o=vo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return tr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):tr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ve(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ve(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):tr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):tr.s(e,t)},S:function(e,t){return tr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vg(r);case"XXXX":case"XX":return Ar(r);case"XXXXX":case"XXX":default:return Ar(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vg(r);case"xxxx":case"xx":return Ar(r);case"xxxxx":case"xxx":default:return Ar(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yg(r,":");case"OOOO":default:return"GMT"+Ar(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yg(r,":");case"zzzz":default:return"GMT"+Ar(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ve(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ve(r,t.length)}};function yg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Ve(i,2)}function vg(e,t){return e%60===0?(e>0?"-":"+")+Ve(Math.abs(e)/60,2):Ar(e,t)}function Ar(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ve(Math.trunc(r/60),2),i=Ve(r%60,2);return n+o+t+i}const bg=(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"})}},wg=(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"})}},Dc={p:wg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return bg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",bg(r,t)).replace("{{time}}",wg(o,t))}},Ok=/^D+$/,Ik=/^Y+$/,Ak=["D","DD","YY","YYYY"];function xg(e){return Ok.test(e)}function Tg(e){return Ik.test(e)}function Mc(e,t,n){const r=_k(e,t,n);if(console.warn(r),Ak.includes(e))throw new RangeError(r)}function _k(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 Dk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nk=/^'([^]*?)'?$/,Fk=/''/g,Lk=/[a-zA-Z]/;function Vk(e,t,n){var u,d,f,h;const r=Ir(),o=r.locale??hg,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Be(e);if(!GP(a))throw new RangeError("Invalid time value");let l=t.match(Mk).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=Dc[m];return g(p,o.formatLong)}return p}).join("").match(Dk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:$k(p)};if(gg[m])return{isToken:!0,value:p};if(m.match(Lk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Tg(m)||xg(m))&&Mc(m,t,String(e));const g=gg[m[0]];return g(a,m,o.localize,c)}).join("")}function $k(e){const t=e.match(Nk);return t?t[1].replace(Fk,"'"):e}function Rk(){return Object.assign({},Ir())}function jk(e){let n=Be(e).getDay();return n===0&&(n=7),n}function Bk(e,t){const n=t instanceof Date?Ge(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 zk=10;class Sg{constructor(){ie(this,"subPriority",0)}validate(t,n){return!0}}class Wk extends Sg{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Hk extends Sg{constructor(){super(...arguments);ie(this,"priority",zk);ie(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ge(n,Bk(n,Date))}}class Me{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Wk(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Uk extends Me{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 lt={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}/},mn={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 ct(e,t){return e&&{value:t(e.value),rest:e.rest}}function Qe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function gn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*$P+i*VP+s*RP),rest:t.slice(n[0].length)}}function Eg(e){return Qe(lt.anyDigitsSigned,e)}function tt(e,t){switch(e){case 1:return Qe(lt.singleDigit,t);case 2:return Qe(lt.twoDigits,t);case 3:return Qe(lt.threeDigits,t);case 4:return Qe(lt.fourDigits,t);default:return Qe(new RegExp("^\\d{1,"+e+"}"),t)}}function Us(e,t){switch(e){case 1:return Qe(lt.singleDigitSigned,t);case 2:return Qe(lt.twoDigitsSigned,t);case 3:return Qe(lt.threeDigitsSigned,t);case 4:return Qe(lt.fourDigitsSigned,t);default:return Qe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Nc(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 Cg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function Pg(e){return e%400===0||e%4===0&&e%100!==0}class Gk extends Me{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 i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return ct(tt(4,n),i);case"yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(tt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const a=Cg(o.year,i);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class Yk extends Me{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 i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ct(tt(4,n),i);case"Yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(tt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=_c(n,i);if(o.isTwoDigitYear){const l=Cg(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),pn(n,i)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),pn(n,i)}}class qk extends Me{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 Us(r==="R"?4:r.length,n)}set(n,r,o){const i=Ge(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),go(i)}}class Kk extends Me{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 Us(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Zk extends Me{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 tt(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 Xk extends Me{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 tt(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 Qk extends Me{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 i=s=>s-1;switch(r){case"M":return ct(Qe(lt.month,n),i);case"MM":return ct(tt(2,n),i);case"Mo":return ct(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Jk extends Me{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 i=s=>s-1;switch(r){case"L":return ct(Qe(lt.month,n),i);case"LL":return ct(tt(2,n),i);case"Lo":return ct(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function eO(e,t,n){const r=Be(e),o=mg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class tO extends Me{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 Qe(lt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return pn(eO(n,o,i),i)}}function nO(e,t){const n=Be(e),r=pg(n)-t;return n.setDate(n.getDate()-r*7),n}class rO extends Me{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 Qe(lt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return go(nO(n,o))}}const oO=[31,28,31,30,31,30,31,31,30,31,30,31],iO=[31,29,31,30,31,30,31,31,30,31,30,31];class sO extends Me{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 Qe(lt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Pg(o),s=n.getMonth();return i?r>=1&&r<=iO[s]:r>=1&&r<=oO[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class aO extends Me{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 Qe(lt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Pg(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 Fc(e,t,n){var d,f,h,p;const r=Ir(),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,i=Be(e),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return mo(i,u)}class lO extends Me{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,i){return n=Fc(n,o,i),n.setHours(0,0,0,0),n}}class cO extends Me{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,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ct(tt(r.length,n),s);case"eo":return ct(o.ordinalNumber(n,{unit:"day"}),s);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Fc(n,o,i),n.setHours(0,0,0,0),n}}class uO extends Me{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,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ct(tt(r.length,n),s);case"co":return ct(o.ordinalNumber(n,{unit:"day"}),s);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Fc(n,o,i),n.setHours(0,0,0,0),n}}function dO(e,t){const n=Be(e),r=jk(n),o=t-r;return mo(n,o)}class fO extends Me{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 i=s=>s===0?7:s;switch(r){case"i":case"ii":return tt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ct(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return ct(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return ct(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return ct(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=dO(n,o),n.setHours(0,0,0,0),n}}class hO extends Me{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(Nc(o),0,0,0),n}}class pO extends Me{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(Nc(o),0,0,0),n}}class mO extends Me{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(Nc(o),0,0,0),n}}class gO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Qe(lt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class yO extends Me{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 Qe(lt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class vO extends Me{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Qe(lt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(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 bO extends Me{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 Qe(lt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class wO extends Me{constructor(){super(...arguments);ie(this,"priority",60);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Qe(lt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class xO extends Me{constructor(){super(...arguments);ie(this,"priority",50);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Qe(lt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class TO extends Me{constructor(){super(...arguments);ie(this,"priority",30);ie(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return ct(tt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class SO extends Me{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return gn(mn.basicOptionalMinutes,n);case"XX":return gn(mn.basic,n);case"XXXX":return gn(mn.basicOptionalSeconds,n);case"XXXXX":return gn(mn.extendedOptionalSeconds,n);case"XXX":default:return gn(mn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-Hs(n)-o)}}class EO extends Me{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return gn(mn.basicOptionalMinutes,n);case"xx":return gn(mn.basic,n);case"xxxx":return gn(mn.basicOptionalSeconds,n);case"xxxxx":return gn(mn.extendedOptionalSeconds,n);case"xxx":default:return gn(mn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ge(n,n.getTime()-Hs(n)-o)}}class CO extends Me{constructor(){super(...arguments);ie(this,"priority",40);ie(this,"incompatibleTokens","*")}parse(n){return Eg(n)}set(n,r,o){return[Ge(n,o*1e3),{timestampIsSet:!0}]}}class PO extends Me{constructor(){super(...arguments);ie(this,"priority",20);ie(this,"incompatibleTokens","*")}parse(n){return Eg(n)}set(n,r,o){return[Ge(n,o),{timestampIsSet:!0}]}}const kO={G:new Uk,y:new Gk,Y:new Yk,R:new qk,u:new Kk,Q:new Zk,q:new Xk,M:new Qk,L:new Jk,w:new tO,I:new rO,d:new sO,D:new aO,E:new lO,e:new cO,c:new uO,i:new fO,a:new hO,b:new pO,B:new mO,h:new gO,H:new yO,K:new vO,k:new bO,m:new wO,s:new xO,S:new TO,X:new SO,x:new EO,t:new CO,T:new PO},OO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,AO=/^'([^]*?)'?$/,_O=/''/g,DO=/\S/,MO=/[a-zA-Z]/;function NO(e,t,n,r){var m,g,v,w;const o=Rk(),i=o.locale??hg,s=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(v=o.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?Be(n):Ge(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new Hk],u=t.match(IO).map(y=>{const S=y[0];if(S in Dc){const T=Dc[S];return T(y,i.formatLong)}return y}).join("").match(OO),d=[];for(let y of u){Tg(y)&&Mc(y,t,e),xg(y)&&Mc(y,t,e);const S=y[0],T=kO[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const D=d.find(_=>E.includes(_.token)||_.token===S);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${y}\` at the same time`)}else if(T.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);d.push({token:S,fullToken:y});const P=T.run(e,y,i.match,l);if(!P)return Ge(n,NaN);c.push(P.setter),e=P.rest}else{if(S.match(MO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(y==="''"?y="'":S==="'"&&(y=FO(y)),e.indexOf(y)===0)e=e.slice(y.length);else return Ge(n,NaN)}}if(e.length>0&&DO.test(e))return Ge(n,NaN);const f=c.map(y=>y.priority).sort((y,S)=>S-y).filter((y,S,T)=>T.indexOf(y)===S).map(y=>c.filter(S=>S.priority===y).sort((S,T)=>T.subPriority-S.subPriority)).map(y=>y[0]);let h=Be(n);if(isNaN(h.getTime()))return Ge(n,NaN);const p={};for(const y of f){if(!y.validate(h,l))return Ge(n,NaN);const S=y.set(h,p,l);Array.isArray(S)?(h=S[0],Object.assign(p,S[1])):h=S}return Ge(n,h)}function FO(e){return e.match(AO)[1].replace(_O,"'")}function LO(e,t){const n=Be(e),r=Be(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function VO(e){return HP(e,WP(e))}function $O(e,t){return mo(e,-t)}function kg(e,t){return Ws(e,-t)}function RO(e,t){return cg(e,-t)}function jO(e,t){return ug(e,-t)}var St=function(){return St=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},St.apply(this,arguments)};function Lc(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 Vc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var xi=function(e){return e.replace(new RegExp(" ","g")," ")},Og=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)},BO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Ig=function(e,t,n){var r=e.length-2,o=BO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Ag=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},_g=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},zO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},$c=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},WO=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 i;return St(St({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Rc=function(e,t){var n=Og(Ag(e),t.fraction.length),r="".concat(t.currency).concat(Ig(n,t.group,t.decimal));return xi(r)},UO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Lc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=HO(r,i,a);return p.currency=xi("".concat(p.currency.trim()," ")),p.literal=xi(p.literal.trim()),p},[r,i]),f=function(p){var m=Rc(p.target.value,d),g=_g(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Rc(c.defaultValue,d):void 0;return b.createElement("input",St({},c,{value:typeof c.value=="string"?Rc(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"},qO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return St(St({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},jc=function(e,t){var n=Og(Ag(e),t.fraction.length),r="".concat(Ig(n,t.group,t.decimal)," ").concat(t.percentSign);return xi(r)},KO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Lc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Vc(b.useState(function(){var v,w;return(w=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var v,w=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(jc(w,d))},[s.value]);var d=b.useMemo(function(){var v=qO(r);return v.percentSign=xi("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-GO,h=function(v){var w,y=a.current;y&&(y.setSelectionRange(f,f),v&&((w=s.onFocus)===null||w===void 0||w.call(s,v)))},p=function(v){var w=v.currentTarget;if(w.selectionStart!==null){var y=w.selectionStart,S=w.selectionEnd,T=y!==S,E=f<y;!T&&E&&h()}i==null||i(v)},m=function(v){var w=jc(v.target.value,d),y=_g(w);u(w),v.target.value=w,v.target.setAttribute("data-number",y.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var g=s.defaultValue?jc(s.defaultValue,d):void 0;return b.createElement("input",St({},s,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Ti={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},ZO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=Gs[i];s===void 0?r.push(i.replace(Ti.dots,"\\.").replace(Ti.openParenthesis,"\\(").replace(Ti.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ti.leadingBars,"\\")},Si=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Bc(o,n);var i=ZO(o);return n?"^".concat(i,"$"):i},XO=function(e){return e.replace(Ti.escape,"\\$&")},Bc=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},Gs={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]/}},QO=/\d/,Dg="(dd) 9dddd-dddd",Mg="(dd) dddd-dddd",Ng="ddd.ddd.ddd-dd",Fg="dd.ddd.ddd/dddd-dd",Ys=function(e){return e.replace(/\D/g,"")},JO=["2",/[0-3]/,":",/[0-5]/,/\d/],eI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],$t={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ng,isoDate:"dddd-dd-dd",cnpj:Fg,telephone:Mg,cellphone:Dg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ys(e).length<=11?Ng:Fg},int:function(e){return e===void 0&&(e=""),QO.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=Ys(e);return t.length<11?Mg:Dg},time:function(e){var t=Ys(e),n=t[0];return n==="2"?JO:eI}},Rt=function(e,t,n){var r;return n===void 0&&(n={}),St({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Si(e,"",!0),infinity:n.infinity},n)},At={cellTelephone:Rt($t.cellTelephone,"tel"),cellphone:Rt($t.cellphone,"tel"),cep:Rt($t.cep,"decimal"),cnpj:Rt($t.cnpj,"decimal"),color:Rt($t.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Rt($t.cpf,"decimal"),cpfCnpj:Rt($t.cpfCnpj,"decimal",{transform:Ys}),creditCard:Rt($t.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Rt($t.date,"decimal"),int:Rt($t.int,"decimal",{pattern:"[0-9]+"}),isoDate:Rt($t.isoDate,"decimal"),telephone:Rt($t.telephone,"tel"),time:Rt($t.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Rt($t.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Lg(e,t,n,r){var o,i;r===void 0&&(r=Gs);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[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+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Vg=function(e){return e},tI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Si(e,n,t));return r.test(n)};function nI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var rI=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Lc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=$c(a),g=$c(d),v=$c(u),w=b.useRef(tI(u,i,h.value||h.defaultValue)),y=f??"input",S=Vc(b.useState(""),2),T=S[0],E=S[1],P=nI(T),D=b.useCallback(function(O,M){var L,H,Y=(L=O??M)!==null&&L!==void 0?L:"";if(u===void 0)return Y;var k=(H=Y==null?void 0:Y.toString())!==null&&H!==void 0?H:"";return Lg(k,typeof u=="function"?u(k):u,s??Vg,c??Gs)},[s,u,c]),_=Vc(b.useState(function(){return D(h.value,h.defaultValue)}),2),I=_[0],V=_[1],F=D(h.defaultValue,h.defaultValue),$=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var O=u(I);return Array.isArray(O)?Bc(O,i):Si(u,I,i)}return typeof u=="string"?Si(u,I,i):Bc(u,i)},[l,I,i,u]);b.useEffect(function(){if(h.value!==void 0){var O=D(h.value,h.defaultValue);V(O),p.current!==null&&(p.current.value=O)}},[h.value,u,s,h.defaultValue]);var C=function(O){var M,L,H,Y,k,R=O.currentTarget,Z=O.target.value;if(v.current===void 0)return V(Z),(M=g.current)===null||M===void 0||M.call(g,Z),(L=m.current)===null||L===void 0||L.call(m,O),d==null?void 0:d(Z);var oe=new RegExp(Si(v.current,Z,i)),J=(H=R.selectionEnd)!==null&&H!==void 0?H:0,G=function(z,te,B){if(z.type!=="number")return z.setSelectionRange(te,B)};if(r&&w.current&&Z.length>=I.length)return R.value=I,G(R,J-1,J-1);var N=!1;Z.length<P.length&&(w.current=!1,N=!0),oe.test(Z)&&(w.current=!0);var j=J,W=Z[j-1],U=Lg(Z,typeof v.current=="function"?v.current(Z):v.current,s??Vg,c??Gs);for(R.value=U,V(U);j<U.length&&U.charAt(j-1)!==W;)j+=1;N?G(R,J,J):G(R,j,j),O.target.value=U,E(U),(Y=g.current)===null||Y===void 0||Y.call(g,U),(k=m.current)===null||k===void 0||k.call(m,O)};return b.createElement(y,St({},h,{ref:p,pattern:$,onChange:C,defaultValue:$g(h.defaultValue)?F:void 0,value:$g(h.value)?D(h.value,h.value):h.value}))}),$g=function(e){return typeof e=="string"},Rg=b.forwardRef(function(e,t){return WO(e.mask)?b.createElement(UO,St({},e,{mask:void 0,ref:t})):YO(e.mask)?b.createElement(KO,St({},e,{mask:void 0,ref:t})):b.createElement(rI,St({},e,{ref:t}))}),jt=function(e){return function(t){return b.createElement(Rg,St({},e,t))}};jt(At.cellTelephone),jt(At.cellphone),jt(At.cep),jt(At.cnpj),jt(At.color),jt(At.cpf),jt(At.cpfCnpj),jt(At.creditCard),jt(At.date),jt(At.int),jt(At.isoDate),jt(At.telephone),jt(At.time),jt(At.uuid);var jg=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&zO(At,t.mask)?At[t.mask]:{mask:t.mask}},[t.mask]),o=St(St({},t),r);return b.createElement(Rg,St({},o,{ref:n}))}),zc={},Wc={exports:{}},Hc={};/**
137
+ */const wg=tt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
138
+ * @license lucide-react v0.414.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const ak=tt("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),xg={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},lk={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Sg=e=>w.jsx(Tt.section,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:xg.false,transition:lk,variants:xg,children:e.children}),ck=ni("px-4 py-4 border relative rounded-lg text-sm",{variants:{theme:{neutral:"border-border bg-background",danger:"text-danger-contrast bg-danger/10 border-danger/50",success:"text-success-foreground bg-success/10 border-success/50",info:"text-info bg-info/10 border-info/50"}},defaultVariants:{theme:"neutral"}}),uk=b.forwardRef(function({className:t,theme:n,onClose:r,open:o=!0,...i},s){return w.jsx("div",{"data-open":!!o,"aria-hidden":!o,className:"pointer-events-none isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:w.jsx(Sg,{"data-open":!!o,open:!!o,children:w.jsxs(to,{...i,className:Be(ck({theme:n}),t),ref:s,"data-theme":n,role:"alert",as:i.as??"div",children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[n==="success"?w.jsx(vg,{size:20}):null,n==="info"?w.jsx(bg,{size:20}):null,n==="danger"?w.jsx(JP,{size:20}):null,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,r!==void 0?w.jsx("button",{type:"button",onClick:()=>r(!1),className:"duration-300 ease-in-out absolute right-3 top-3 text-foreground transition-colors hover:text-danger",children:w.jsx(wg,{size:20})}):null]})})})});function De(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function go(e,t){const n=De(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Us(e,t){const n=De(e);if(isNaN(t))return qe(e,NaN);if(!t)return n;const r=n.getDate(),o=qe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Tg=6048e5,dk=864e5,fk=6e4,hk=36e5,pk=1e3;let mk={};function Ir(){return mk}function yn(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=De(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function yo(e){return yn(e,{weekStartsOn:1})}function Eg(e){const t=De(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=yo(r),i=qe(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=yo(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function vo(e){const t=De(e);return t.setHours(0,0,0,0),t}function Gs(e){const t=De(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function gk(e,t){const n=vo(e),r=vo(t),o=+n-Gs(n),i=+r-Gs(r);return Math.round((o-i)/dk)}function yk(e){const t=Eg(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),yo(n)}function Cg(e,t){const n=t*7;return go(e,n)}function Pg(e,t){return Us(e,t*12)}function vk(e){return qe(e,Date.now())}function bk(e,t){const n=vo(e),r=vo(t);return+n==+r}function wk(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function kg(e){if(!wk(e)&&typeof e!="number")return!1;const t=De(e);return!isNaN(Number(t))}function Ig(e,t){const n=De(e.start),r=De(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(De(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function Og(e){const t=De(e);return t.setDate(1),t.setHours(0,0,0,0),t}function xk(e){const t=De(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Sk(e,t){var a,l;const n=Ir(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=De(e),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const Tk={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"}},Ek=(e,t,n)=>{let r;const o=Tk[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $c(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ck={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Pk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ik={date:$c({formats:Ck,defaultWidth:"full"}),time:$c({formats:Pk,defaultWidth:"full"}),dateTime:$c({formats:kk,defaultWidth:"full"})},Ok={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ak=(e,t,n,r)=>Ok[e];function Ii(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const _k={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Mk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Dk={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"]},Nk={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"]},Fk={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"}},Lk={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"}},Vk={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ii({values:_k,defaultWidth:"wide"}),quarter:Ii({values:Mk,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ii({values:Dk,defaultWidth:"wide"}),day:Ii({values:Nk,defaultWidth:"wide"}),dayPeriod:Ii({values:Fk,defaultWidth:"wide",formattingValues:Lk,defaultFormattingWidth:"wide"})};function Oi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?jk(a,d=>d.test(s)):$k(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function $k(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function jk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Rk(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const Bk=/^(\d+)(th|st|nd|rd)?/i,zk=/\d+/i,Wk={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},Hk={any:[/^b/i,/^(a|c)/i]},Uk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gk={any:[/1/i,/2/i,/3/i,/4/i]},Yk={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},qk={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]},Kk={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},Zk={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]},Xk={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},Qk={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}},Jk={ordinalNumber:Rk({matchPattern:Bk,parsePattern:zk,valueCallback:e=>parseInt(e,10)}),era:Oi({matchPatterns:Wk,defaultMatchWidth:"wide",parsePatterns:Hk,defaultParseWidth:"any"}),quarter:Oi({matchPatterns:Uk,defaultMatchWidth:"wide",parsePatterns:Gk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Oi({matchPatterns:Yk,defaultMatchWidth:"wide",parsePatterns:qk,defaultParseWidth:"any"}),day:Oi({matchPatterns:Kk,defaultMatchWidth:"wide",parsePatterns:Zk,defaultParseWidth:"any"}),dayPeriod:Oi({matchPatterns:Xk,defaultMatchWidth:"any",parsePatterns:Qk,defaultParseWidth:"any"})},Ag={code:"en-US",formatDistance:Ek,formatLong:Ik,formatRelative:Ak,localize:Vk,match:Jk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function eI(e){const t=De(e);return gk(t,xk(t))+1}function _g(e){const t=De(e),n=+yo(t)-+yk(t);return Math.round(n/Tg)+1}function jc(e,t){var u,d,f,h;const n=De(e),r=n.getFullYear(),o=Ir(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=qe(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=yn(s,t),l=qe(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=yn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function tI(e,t){var a,l,c,u;const n=Ir(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=jc(e,t),i=qe(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),yn(i,t)}function Mg(e,t){const n=De(e),r=+yn(n,t)-+tI(n,t);return Math.round(r/Tg)+1}function $e(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const nr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return $e(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):$e(n+1,2)},d(e,t){return $e(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return $e(o,t.length)}},bo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return nr.y(e,t)},Y:function(e,t,n,r){const o=jc(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return $e(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):$e(i,t.length)},R:function(e,t){const n=Eg(e);return $e(n,t.length)},u:function(e,t){const n=e.getFullYear();return $e(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return $e(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return $e(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return nr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return $e(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Mg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):$e(o,t.length)},I:function(e,t,n){const r=_g(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):nr.d(e,t)},D:function(e,t,n){const r=eI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):$e(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return $e(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return $e(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return $e(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=bo.noon:r===0?o=bo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=bo.evening:r>=12?o=bo.afternoon:r>=4?o=bo.morning:o=bo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return nr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):nr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):nr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):nr.s(e,t)},S:function(e,t){return nr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Fg(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Fg(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ng(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ng(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return $e(r,t.length)},T:function(e,t,n){const r=e.getTime();return $e(r,t.length)}};function Ng(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+$e(i,2)}function Fg(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=$e(Math.trunc(r/60),2),i=$e(r%60,2);return n+o+t+i}const Lg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Vg=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Rc={p:Vg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Lg(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Lg(r,t)).replace("{{time}}",Vg(o,t))}},nI=/^D+$/,rI=/^Y+$/,oI=["D","DD","YY","YYYY"];function $g(e){return nI.test(e)}function jg(e){return rI.test(e)}function Bc(e,t,n){const r=iI(e,t,n);if(console.warn(r),oI.includes(e))throw new RangeError(r)}function iI(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 sI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lI=/^'([^]*?)'?$/,cI=/''/g,uI=/[a-zA-Z]/;function dI(e,t,n){var u,d,f,h;const r=Ir(),o=r.locale??Ag,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=De(e);if(!kg(a))throw new RangeError("Invalid time value");let l=t.match(aI).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Rc[m];return v(p,o.formatLong)}return p}).join("").match(sI).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:fI(p)};if(Dg[m])return{isToken:!0,value:p};if(m.match(uI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(jg(m)||$g(m))&&Bc(m,t,String(e));const v=Dg[m[0]];return v(a,m,o.localize,c)}).join("")}function fI(e){const t=e.match(lI);return t?t[1].replace(cI,"'"):e}function hI(){return Object.assign({},Ir())}function pI(e){let n=De(e).getDay();return n===0&&(n=7),n}function mI(e,t){const n=De(e),r=De(t);return n.getTime()>r.getTime()}function gI(e,t){const n=De(e),r=De(t);return+n<+r}function yI(e,t){const n=t instanceof Date?qe(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const vI=10;class Rg{constructor(){oe(this,"subPriority",0)}validate(t,n){return!0}}class bI extends Rg{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class wI extends Rg{constructor(){super(...arguments);oe(this,"priority",vI);oe(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,yI(n,Date))}}class Ne{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new bI(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class xI extends Ne{constructor(){super(...arguments);oe(this,"priority",140);oe(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const lt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},vn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ct(e,t){return e&&{value:t(e.value),rest:e.rest}}function Qe(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function bn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*hk+i*fk+s*pk),rest:t.slice(n[0].length)}}function Bg(e){return Qe(lt.anyDigitsSigned,e)}function nt(e,t){switch(e){case 1:return Qe(lt.singleDigit,t);case 2:return Qe(lt.twoDigits,t);case 3:return Qe(lt.threeDigits,t);case 4:return Qe(lt.fourDigits,t);default:return Qe(new RegExp("^\\d{1,"+e+"}"),t)}}function Ys(e,t){switch(e){case 1:return Qe(lt.singleDigitSigned,t);case 2:return Qe(lt.twoDigitsSigned,t);case 3:return Qe(lt.threeDigitsSigned,t);case 4:return Qe(lt.fourDigitsSigned,t);default:return Qe(new RegExp("^-?\\d{1,"+e+"}"),t)}}function zc(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function zg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function Wg(e){return e%400===0||e%4===0&&e%100!==0}class SI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return ct(nt(4,n),i);case"yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(nt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const a=zg(o.year,i);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class TI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ct(nt(4,n),i);case"Yo":return ct(o.ordinalNumber(n,{unit:"year"}),i);default:return ct(nt(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=jc(n,i);if(o.isTwoDigitYear){const l=zg(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),yn(n,i)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),yn(n,i)}}class EI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Ys(r==="R"?4:r.length,n)}set(n,r,o){const i=qe(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),yo(i)}}class CI extends Ne{constructor(){super(...arguments);oe(this,"priority",130);oe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Ys(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class PI extends Ne{constructor(){super(...arguments);oe(this,"priority",120);oe(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return nt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class kI extends Ne{constructor(){super(...arguments);oe(this,"priority",120);oe(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return nt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"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 II extends Ne{constructor(){super(...arguments);oe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);oe(this,"priority",110)}parse(n,r,o){const i=s=>s-1;switch(r){case"M":return ct(Qe(lt.month,n),i);case"MM":return ct(nt(2,n),i);case"Mo":return ct(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class OI extends Ne{constructor(){super(...arguments);oe(this,"priority",110);oe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=s=>s-1;switch(r){case"L":return ct(Qe(lt.month,n),i);case"LL":return ct(nt(2,n),i);case"Lo":return ct(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function AI(e,t,n){const r=De(e),o=Mg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class _I extends Ne{constructor(){super(...arguments);oe(this,"priority",100);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Qe(lt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return yn(AI(n,o,i),i)}}function MI(e,t){const n=De(e),r=_g(n)-t;return n.setDate(n.getDate()-r*7),n}class DI extends Ne{constructor(){super(...arguments);oe(this,"priority",100);oe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return Qe(lt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return yo(MI(n,o))}}const NI=[31,28,31,30,31,30,31,31,30,31,30,31],FI=[31,29,31,30,31,30,31,31,30,31,30,31];class LI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"subPriority",1);oe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Qe(lt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return nt(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Wg(o),s=n.getMonth();return i?r>=1&&r<=FI[s]:r>=1&&r<=NI[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class VI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"subpriority",1);oe(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return Qe(lt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return nt(r.length,n)}}validate(n,r){const o=n.getFullYear();return Wg(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Wc(e,t,n){var d,f,h,p;const r=Ir(),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,i=De(e),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return go(i,u)}class $I extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Wc(n,o,i),n.setHours(0,0,0,0),n}}class jI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ct(nt(r.length,n),s);case"eo":return ct(o.ordinalNumber(n,{unit:"day"}),s);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Wc(n,o,i),n.setHours(0,0,0,0),n}}class RI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ct(nt(r.length,n),s);case"co":return ct(o.ordinalNumber(n,{unit:"day"}),s);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=Wc(n,o,i),n.setHours(0,0,0,0),n}}function BI(e,t){const n=De(e),r=pI(n),o=t-r;return go(n,o)}class zI extends Ne{constructor(){super(...arguments);oe(this,"priority",90);oe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=s=>s===0?7:s;switch(r){case"i":case"ii":return nt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ct(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return ct(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return ct(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return ct(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=BI(n,o),n.setHours(0,0,0,0),n}}class WI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(zc(o),0,0,0),n}}class HI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(zc(o),0,0,0),n}}class UI extends Ne{constructor(){super(...arguments);oe(this,"priority",80);oe(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(zc(o),0,0,0),n}}class GI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Qe(lt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class YI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Qe(lt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class qI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Qe(lt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class KI extends Ne{constructor(){super(...arguments);oe(this,"priority",70);oe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Qe(lt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return nt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class ZI extends Ne{constructor(){super(...arguments);oe(this,"priority",60);oe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Qe(lt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class XI extends Ne{constructor(){super(...arguments);oe(this,"priority",50);oe(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Qe(lt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return nt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class QI extends Ne{constructor(){super(...arguments);oe(this,"priority",30);oe(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return ct(nt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class JI extends Ne{constructor(){super(...arguments);oe(this,"priority",10);oe(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return bn(vn.basicOptionalMinutes,n);case"XX":return bn(vn.basic,n);case"XXXX":return bn(vn.basicOptionalSeconds,n);case"XXXXX":return bn(vn.extendedOptionalSeconds,n);case"XXX":default:return bn(vn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-Gs(n)-o)}}class eO extends Ne{constructor(){super(...arguments);oe(this,"priority",10);oe(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return bn(vn.basicOptionalMinutes,n);case"xx":return bn(vn.basic,n);case"xxxx":return bn(vn.basicOptionalSeconds,n);case"xxxxx":return bn(vn.extendedOptionalSeconds,n);case"xxx":default:return bn(vn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-Gs(n)-o)}}class tO extends Ne{constructor(){super(...arguments);oe(this,"priority",40);oe(this,"incompatibleTokens","*")}parse(n){return Bg(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class nO extends Ne{constructor(){super(...arguments);oe(this,"priority",20);oe(this,"incompatibleTokens","*")}parse(n){return Bg(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const rO={G:new xI,y:new SI,Y:new TI,R:new EI,u:new CI,Q:new PI,q:new kI,M:new II,L:new OI,w:new _I,I:new DI,d:new LI,D:new VI,E:new $I,e:new jI,c:new RI,i:new zI,a:new WI,b:new HI,B:new UI,h:new GI,H:new YI,K:new qI,k:new KI,m:new ZI,s:new XI,S:new QI,X:new JI,x:new eO,t:new tO,T:new nO},oO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,iO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sO=/^'([^]*?)'?$/,aO=/''/g,lO=/\S/,cO=/[a-zA-Z]/;function uO(e,t,n,r){var m,v,y,x;const o=hI(),i=o.locale??Ag,s=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((x=(y=o.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(t==="")return e===""?De(n):qe(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new wI],u=t.match(iO).map(g=>{const T=g[0];if(T in Rc){const S=Rc[T];return S(g,i.formatLong)}return g}).join("").match(oO),d=[];for(let g of u){jg(g)&&Bc(g,t,e),$g(g)&&Bc(g,t,e);const T=g[0],S=rO[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 O=S.run(e,g,i.match,l);if(!O)return qe(n,NaN);c.push(O.setter),e=O.rest}else{if(T.match(cO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=dO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return qe(n,NaN)}}if(e.length>0&&lO.test(e))return qe(n,NaN);const f=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,S)=>S.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,S)=>S.subPriority-T.subPriority)).map(g=>g[0]);let h=De(n);if(isNaN(h.getTime()))return qe(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return qe(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return qe(n,h)}function dO(e){return e.match(sO)[1].replace(aO,"'")}function fO(e,t){const n=De(e),r=De(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function hO(e){return bk(e,vk(e))}function pO(e,t){return go(e,-t)}function Hg(e,t){return Us(e,-t)}function mO(e,t){return Cg(e,-t)}function gO(e,t){return Pg(e,-t)}var Et=function(){return Et=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Et.apply(this,arguments)};function Hc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Uc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Ai=function(e){return e.replace(new RegExp(" ","g")," ")},Ug=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},yO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Gg=function(e,t,n){var r=e.length-2,o=yO(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Yg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},qg=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},vO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Gc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},bO=function(e){return e==="money"||e==="currency"},wO=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Et(Et({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Yc=function(e,t){var n=Ug(Yg(e),t.fraction.length),r="".concat(t.currency).concat(Gg(n,t.group,t.decimal));return Ai(r)},xO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Hc(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=wO(r,i,a);return p.currency=Ai("".concat(p.currency.trim()," ")),p.literal=Ai(p.literal.trim()),p},[r,i]),f=function(p){var m=Yc(p.target.value,d),v=qg(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?Yc(c.defaultValue,d):void 0;return b.createElement("input",Et({},c,{value:typeof c.value=="string"?Yc(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),SO=1,TO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},EO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Et(Et({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},qc=function(e,t){var n=Ug(Yg(e),t.fraction.length),r="".concat(Gg(n,t.group,t.decimal)," ").concat(t.percentSign);return Ai(r)},CO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Hc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Uc(b.useState(function(){var y,x;return(x=(y=s.value)===null||y===void 0?void 0:y.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var y,x=Number.parseFloat("".concat((y=s.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(qc(x,d))},[s.value]);var d=b.useMemo(function(){var y=EO(r);return y.percentSign=Ai("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-SO,h=function(y){var x,g=a.current;g&&(g.setSelectionRange(f,f),y&&((x=s.onFocus)===null||x===void 0||x.call(s,y)))},p=function(y){var x=y.currentTarget;if(x.selectionStart!==null){var g=x.selectionStart,T=x.selectionEnd,S=g!==T,E=f<g;!S&&E&&h()}i==null||i(y)},m=function(y){var x=qc(y.target.value,d),g=qg(x);u(x),y.target.value=x,y.target.setAttribute("data-number",g.toString()),o==null||o(y)};b.useEffect(function(){return h()},[c]);var v=s.defaultValue?qc(s.defaultValue,d):void 0;return b.createElement("input",Et({},s,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),_i={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},PO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=qs[i];s===void 0?r.push(i.replace(_i.dots,"\\.").replace(_i.openParenthesis,"\\(").replace(_i.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(_i.leadingBars,"\\")},Mi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Kc(o,n);var i=PO(o);return n?"^".concat(i,"$"):i},kO=function(e){return e.replace(_i.escape,"\\$&")},Kc=function(e,t){var n=e.map(function(r){return typeof r=="string"?kO(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},qs={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},IO=/\d/,Kg="(dd) 9dddd-dddd",Zg="(dd) dddd-dddd",Xg="ddd.ddd.ddd-dd",Qg="dd.ddd.ddd/dddd-dd",Ks=function(e){return e.replace(/\D/g,"")},OO=["2",/[0-3]/,":",/[0-5]/,/\d/],AO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],jt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Xg,isoDate:"dddd-dd-dd",cnpj:Qg,telephone:Zg,cellphone:Kg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ks(e).length<=11?Xg:Qg},int:function(e){return e===void 0&&(e=""),IO.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Ks(e);return t.length<11?Zg:Kg},time:function(e){var t=Ks(e),n=t[0];return n==="2"?OO:AO}},Rt=function(e,t,n){var r;return n===void 0&&(n={}),Et({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Mi(e,"",!0),infinity:n.infinity},n)},_t={cellTelephone:Rt(jt.cellTelephone,"tel"),cellphone:Rt(jt.cellphone,"tel"),cep:Rt(jt.cep,"decimal"),cnpj:Rt(jt.cnpj,"decimal"),color:Rt(jt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Rt(jt.cpf,"decimal"),cpfCnpj:Rt(jt.cpfCnpj,"decimal",{transform:Ks}),creditCard:Rt(jt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Rt(jt.date,"decimal"),int:Rt(jt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Rt(jt.isoDate,"decimal"),telephone:Rt(jt.telephone,"tel"),time:Rt(jt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Rt(jt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Jg(e,t,n,r){var o,i;r===void 0&&(r=qs);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[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+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var ey=function(e){return e},_O=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Mi(e,n,t));return r.test(n)};function MO(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var DO=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Hc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Gc(a),v=Gc(d),y=Gc(u),x=b.useRef(_O(u,i,h.value||h.defaultValue)),g=f??"input",T=Uc(b.useState(""),2),S=T[0],E=T[1],O=MO(S),k=b.useCallback(function(_,N){var $,z,U=($=_??N)!==null&&$!==void 0?$:"";if(u===void 0)return U;var A=(z=U==null?void 0:U.toString())!==null&&z!==void 0?z:"";return Jg(A,typeof u=="function"?u(A):u,s??ey,c??qs)},[s,u,c]),I=Uc(b.useState(function(){return k(h.value,h.defaultValue)}),2),C=I[0],V=I[1],D=k(h.defaultValue,h.defaultValue),L=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(C);return Array.isArray(_)?Kc(_,i):Mi(u,C,i)}return typeof u=="string"?Mi(u,C,i):Kc(u,i)},[l,C,i,u]);b.useEffect(function(){if(h.value!==void 0){var _=k(h.value,h.defaultValue);V(_),p.current!==null&&(p.current.value=_)}},[h.value,u,s,h.defaultValue]);var P=function(_){var N,$,z,U,A,R=_.currentTarget,Z=_.target.value;if(y.current===void 0)return V(Z),(N=v.current)===null||N===void 0||N.call(v,Z),($=m.current)===null||$===void 0||$.call(m,_),d==null?void 0:d(Z);var ne=new RegExp(Mi(y.current,Z,i)),Q=(z=R.selectionEnd)!==null&&z!==void 0?z:0,G=function(Y,se,H){if(Y.type!=="number")return Y.setSelectionRange(se,H)};if(r&&x.current&&Z.length>=C.length)return R.value=C,G(R,Q-1,Q-1);var F=!1;Z.length<O.length&&(x.current=!1,F=!0),ne.test(Z)&&(x.current=!0);var B=Q,W=Z[B-1],j=Jg(Z,typeof y.current=="function"?y.current(Z):y.current,s??ey,c??qs);for(R.value=j,V(j);B<j.length&&j.charAt(B-1)!==W;)B+=1;F?G(R,Q,Q):G(R,B,B),_.target.value=j,E(j),(U=v.current)===null||U===void 0||U.call(v,j),(A=m.current)===null||A===void 0||A.call(m,_)};return b.createElement(g,Et({},h,{ref:p,pattern:L,onChange:P,defaultValue:ty(h.defaultValue)?D:void 0,value:ty(h.value)?k(h.value,h.value):h.value}))}),ty=function(e){return typeof e=="string"},ny=b.forwardRef(function(e,t){return bO(e.mask)?b.createElement(xO,Et({},e,{mask:void 0,ref:t})):TO(e.mask)?b.createElement(CO,Et({},e,{mask:void 0,ref:t})):b.createElement(DO,Et({},e,{ref:t}))}),Bt=function(e){return function(t){return b.createElement(ny,Et({},e,t))}};Bt(_t.cellTelephone),Bt(_t.cellphone),Bt(_t.cep),Bt(_t.cnpj),Bt(_t.color),Bt(_t.cpf),Bt(_t.cpfCnpj),Bt(_t.creditCard),Bt(_t.date),Bt(_t.int),Bt(_t.isoDate),Bt(_t.telephone),Bt(_t.time),Bt(_t.uuid);var ry=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&vO(_t,t.mask)?_t[t.mask]:{mask:t.mask}},[t.mask]),o=Et(Et({},t),r);return b.createElement(ny,Et({},o,{ref:n}))}),Zc={},Xc={exports:{}},Qc={};/**
138
143
  * @license React
139
144
  * use-sync-external-store-shim.production.min.js
140
145
  *
@@ -142,7 +147,7 @@
142
147
  *
143
148
  * This source code is licensed under the MIT license found in the
144
149
  * LICENSE file in the root directory of this source tree.
145
- */var Bg;function oI(){if(Bg)return Hc;Bg=1;var e=b;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,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,g=p[1];return i(function(){m.value=h,m.getSnapshot=f,l(m)&&g({inst:m})},[d,h,f]),o(function(){return l(m)&&g({inst:m}),d(function(){l(m)&&g({inst:m})})},[d]),s(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 zg={};/**
150
+ */var oy;function NO(){if(oy)return Qc;oy=1;var e=b;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,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,v=p[1];return i(function(){m.value=h,m.getSnapshot=f,l(m)&&v({inst:m})},[d,h,f]),o(function(){return l(m)&&v({inst:m}),d(function(){l(m)&&v({inst:m})})},[d]),s(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 Qc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Qc}var iy={};/**
146
151
  * @license React
147
152
  * use-sync-external-store-shim.development.js
148
153
  *
@@ -150,7 +155,7 @@
150
155
  *
151
156
  * This source code is licensed under the MIT license found in the
152
157
  * LICENSE file in the root directory of this source tree.
153
- */var Wg;function iI(){return Wg||(Wg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(y){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",y,T)}}function r(y,S,T){{var E=t.ReactDebugCurrentFrame,P=E.getStackAddendum();P!==""&&(S+="%s",T=T.concat([P]));var D=T.map(function(_){return String(_)});D.unshift("Warning: "+S),Function.prototype.apply.call(console[y],console,D)}}function o(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var i=typeof Object.is=="function"?Object.is:o,s=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(y,S,T){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=S();if(!d){var P=S();i(E,P)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var D=s({inst:{value:E,getSnapshot:S}}),_=D[0].inst,I=D[1];return l(function(){_.value=E,_.getSnapshot=S,h(_)&&I({inst:_})},[y,E,S]),a(function(){h(_)&&I({inst:_});var V=function(){h(_)&&I({inst:_})};return y(V)},[y]),c(E),E}function h(y){var S=y.getSnapshot,T=y.value;try{var E=S();return!i(T,E)}catch{return!0}}function p(y,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,v=g?p:f,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;zg.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),zg}var Hg;function Ug(){return Hg||(Hg=1,process.env.NODE_ENV==="production"?Wc.exports=oI():Wc.exports=iI()),Wc.exports}/**
158
+ */var sy;function FO(){return sy||(sy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var T=arguments.length,S=new Array(T>1?T-1:0),E=1;E<T;E++)S[E-1]=arguments[E];r("error",g,S)}}function r(g,T,S){{var E=t.ReactDebugCurrentFrame,O=E.getStackAddendum();O!==""&&(T+="%s",S=S.concat([O]));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 i=typeof Object.is=="function"?Object.is:o,s=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function 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 O=T();i(E,O)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var k=s({inst:{value:E,getSnapshot:T}}),I=k[0].inst,C=k[1];return l(function(){I.value=E,I.getSnapshot=T,h(I)&&C({inst:I})},[g,E,T]),a(function(){h(I)&&C({inst:I});var V=function(){h(I)&&C({inst:I})};return g(V)},[g]),c(E),E}function h(g){var T=g.getSnapshot,S=g.value;try{var E=T();return!i(S,E)}catch{return!0}}function p(g,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,y=v?p:f,x=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;iy.useSyncExternalStore=x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),iy}var ay;function ly(){return ay||(ay=1,process.env.NODE_ENV==="production"?Xc.exports=NO():Xc.exports=FO()),Xc.exports}/**
154
159
  * @license React
155
160
  * use-sync-external-store-shim/with-selector.production.min.js
156
161
  *
@@ -158,7 +163,7 @@
158
163
  *
159
164
  * This source code is licensed under the MIT license found in the
160
165
  * LICENSE file in the root directory of this source tree.
161
- */var Gg;function sI(){if(Gg)return zc;Gg=1;var e=b,t=Ug();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return zc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!w){if(w=!0,y=E,E=f(E),h!==void 0&&m.hasValue){var P=m.value;if(h(P,E))return S=P}return S=E}if(P=S,r(y,E))return P;var D=f(E);return h!==void 0&&h(P,D)?P:(y=E,S=D)}var w=!1,y,S,T=d===void 0?null:d;return[function(){return v(u())},T===null?void 0:function(){return v(T())}]},[u,d,f,h]);var g=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},zc}var Yg={};/**
166
+ */var cy;function LO(){if(cy)return Zc;cy=1;var e=b,t=ly();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Zc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(E){if(!x){if(x=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var O=m.value;if(h(O,E))return T=O}return T=E}if(O=T,r(g,E))return O;var k=f(E);return h!==void 0&&h(O,k)?O:(g=E,T=k)}var x=!1,g,T,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,f,h]);var v=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},Zc}var uy={};/**
162
167
  * @license React
163
168
  * use-sync-external-store-shim/with-selector.development.js
164
169
  *
@@ -166,31 +171,31 @@
166
171
  *
167
172
  * This source code is licensed under the MIT license found in the
168
173
  * LICENSE file in the root directory of this source tree.
169
- */var qg;function aI(){return qg||(qg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=Ug();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=i(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var v=a(function(){var T=!1,E,P,D=function(F){if(!T){T=!0,E=F;var $=h(F);if(p!==void 0&&g.hasValue){var C=g.value;if(p(C,$))return P=C,C}return P=$,$}var O=E,M=P;if(r(O,F))return M;var L=h(F);return p!==void 0&&p(M,L)?M:(E=F,P=L,L)},_=f===void 0?null:f,I=function(){return D(d())},V=_===null?void 0:function(){return D(_())};return[I,V]},[d,f,h,p]),w=v[0],y=v[1],S=o(u,w,y);return s(function(){g.hasValue=!0,g.value=S},[S]),l(S),S}Yg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yg}process.env.NODE_ENV==="production"?sI():aI();const bo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},lI=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},cI=e=>Object.entries(e),Kg=e=>e instanceof Promise,Zg=(e,t,n,r)=>t===e?n.reduce((o,i)=>i(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,i)=>i(o,t,r),{...t,...e}):n.reduce((o,i)=>i(o,t,r),e),uI=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,d)=>n(f=>Zg(u,f,i,d));return Kg(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))},dI=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>Zg(c,u,i,o.current));return Kg(a)?a.then(c=>l(c)):l(a)},Uc=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=bo(r),s=bo((n==null?void 0:n.props)??{}),a=bo(t),l=bo((n==null?void 0:n.postMiddleware)??[]),c=bo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=lI(r),f=bo(d),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(g=>{g(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>s.current,g=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>f.current});return cI(g).reduce((v,[w,y])=>({...v,[w]:n!=null&&n.debug?uI(w,y,o,m,h,c.current):dI(w,y,o,m,h,c.current)}),{})});return[r,p,s.current]},fI=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function hI(e,t){return b.useRef(fI(e,t)).current}const pI={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0},mI=()=>{const[e,t]=b.useState(null),n=Or(pI),r=b.useMemo(()=>new window.ResizeObserver(o=>{if(o[0]){const i=o[0].contentRect;n.set({x:i.x,y:i.y,width:i.width,height:i.height,top:i.top,left:i.left,bottom:i.bottom,right:i.right})}}),[]);return b.useEffect(()=>{if(e)return r.observe(e),()=>{r.disconnect()}},[e]),[t,n]},gI=({children:e})=>{const[t,n]=mI(),r=n.get().height;return x.jsx(Ht.div,{animate:{height:r>0?r:"auto"},children:x.jsx("div",{ref:t,children:e})})},yI={type:"spring",bounce:.1,duration:.3},Xg=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),Qg={middle:{x:"0%",opacity:1},enter:Xg(1),exit:Xg(-1)},Jg={exit:{visibility:"hidden"}},vI=e=>{const t=pn(fg(e));return dg({start:t,end:mo(t,41)})},ey=(e,t)=>e.toLocaleDateString(t,{month:"long"}),bI=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=fg(new Date(e).setMonth(r)),i=ey(o,t);return x.jsx("option",{value:i,"data-index":r,children:i},i)}),Gc={ArrowLeft:(e,t)=>t==="days"?$O(e,1):kg(e,1),ArrowRight:(e,t)=>t==="days"?mo(e,1):Ws(e,1),ArrowUp:(e,t)=>t==="days"?RO(e,1):jO(e,1),ArrowDown:(e,t)=>t==="days"?cg(e,1):ug(e,1)},ty=(e,t=0)=>{const n=e.toISOString(),r=()=>{const o=document.querySelector(`button[data-date="${n}"]`);if(o)return o.focus({preventScroll:!1})};t===0&&r(),setTimeout(r,t)},_r=e=>e.getFullYear().toString().padStart(4,"0"),ny=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:i})=>{const s=o||new Date,[a,l]=Uc({date:s,isAnimating:!1,year:_r(s),direction:void 0,months:bI(s,e),week:dg({start:pn(s),end:qP(s)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:yo(new Date)}),onExitComplete:()=>(ty(p.state().date,200),{isAnimating:!1}),date:m=>{const g=m(p.state().date);return{date:g,year:_r(g)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const g=Ws(m.date,1);return{date:g,isAnimating:!0,direction:1,year:_r(g)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const g=kg(m.date,1);return{date:g,isAnimating:!0,direction:-1,year:_r(g)}},onSelectDate:m=>{const g=m.currentTarget.dataset.date||"",v=new Date(g);return{date:v,year:_r(v)}},onChangeMonth:m=>{const g=m.target.value,w=Array.from(m.target.options).find(y=>y.value===g);if(w){const y=w.dataset.index||"",S=new Date(p.state().date);return S.setMonth(+y),{date:S,year:_r(S)}}return p.state()},onKeyDown:m=>{const g=m.key;if(g in Gc){(g==="ArrowUp"||g==="ArrowDown")&&m.preventDefault();const v=p.state().date,w=kn.keyof(Gc,g)?Gc[g](v,m.shiftKey?"month":"days"):null;if(w!==null)return ty(w),{date:w,year:_r(w)}}return p.state()}})),c=vI(a.date),u=a.date.toISOString(),d=ey(a.date,e);b.useEffect(()=>i==null?void 0:i(a.date),[u]);const f=hI(p=>{l.date(m=>{const g=new Date(m);return g.setFullYear(+p),g})},1200),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),f(m)};return x.jsx(XC,{transition:yI,children:x.jsxs("div",{className:"relative overflow-hidden",children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(gI,{children:x.jsx(Bs,{initial:!1,mode:"popLayout",presenceAffectsLayout:!0,custom:a.direction,onExitComplete:l.onExitComplete,children:x.jsxs(Ht.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(Ht.button,{onClick:l.previousMonth,variants:Jg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(SP,{className:"h-4 w-4"})}),x.jsx(Ht.span,{variants:Qg,custom:a.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${d.length}ch`},value:d,onChange:l.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:a.months}),x.jsx(jg,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(Ht.button,{variants:Jg,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:l.nextMonth,children:x.jsx(Oc,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsx("div",{className:"mt-4 grid grid-cols-7 gap-y-4",children:a.week.map(p=>x.jsx("span",{className:"text-sm font-medium capitalize",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),x.jsx(Ht.ul,{onKeyDown:l.onKeyDown,variants:Qg,custom:a.direction,className:"mt-4 grid grid-cols-7 gap-y-4 pb-2",children:c.map(p=>{const m=p.toISOString(),g=m===u,v=VO(p)&&n,w=(t==null?void 0:t(p))||!1,y=!LO(p,a.date)||w;return x.jsx("li",{className:"flex w-full items-center justify-center",children:x.jsx("button",{type:"button","data-date":m,disabled:w,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:Xe(`flex size-8 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${v?"text-primary":""} ${y?"text-disabled":""} ${g?"bg-primary text-primary-foreground":""}`),children:p.getDate()})},m)})})]},d)})})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:l.setToday,children:"Today"})})]})})},ry=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>x.jsxs(no,{...s,as:n,className:Xe("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?x.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,x.jsx("div",{className:Xe("min-w-full px-8",i),children:e})]}),wI=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:Xe("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),oy=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]};function nr(e){return iy(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nn(e){var t;return(t=(iy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function iy(e){return e instanceof Node||e instanceof Bt(e).Node}function je(e){return e instanceof Element||e instanceof Bt(e).Element}function ut(e){return e instanceof HTMLElement||e instanceof Bt(e).HTMLElement}function Yc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function Ei(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function xI(e){return["table","td","th"].includes(nr(e))}function qs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qc(e){const t=Kc(),n=je(e)?Ut(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 TI(e){let t=Fn(e);for(;ut(t)&&!rr(t);){if(qc(t))return t;if(qs(t))return null;t=Fn(t)}return null}function Kc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rr(e){return["html","body","#document"].includes(nr(e))}function Ut(e){return Bt(e).getComputedStyle(e)}function Ks(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fn(e){if(nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yc(e)&&e.host||Nn(e);return Yc(t)?t.host:t}function sy(e){const t=Fn(e);return rr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&Ei(t)?t:sy(t)}function or(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Bt(o);if(i){const a=Zc(s);return t.concat(s,s.visualViewport||[],Ei(o)?o:[],a&&n?or(a):[])}return t.concat(o,or(o,[],n))}function Zc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function dt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Xc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ay(){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 ly(e){return e.mozInputSource===0&&e.isTrusted?!0:eu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Qc(e){return SI()?!1:!eu()&&e.width===0&&e.height===0||eu()&&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 Jc(){return/apple/i.test(navigator.vendor)}function eu(){const e=/android/i;return e.test(Xc())||e.test(ay())}function cy(){return Xc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function SI(){return ay().includes("jsdom/")}function Ci(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function EI(e){return"nativeEvent"in e}function CI(e){return e.matches("html,body")}function vt(e){return(e==null?void 0:e.ownerDocument)||document}function tu(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 Ln(e){return"composedPath"in e?e.composedPath()[0]:e.target}const PI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function nu(e){return ut(e)&&e.matches(PI)}function Et(e){e.preventDefault(),e.stopPropagation()}function uy(e){return e?e.getAttribute("role")==="combobox"&&nu(e):!1}const yn=Math.min,Gt=Math.max,Zs=Math.round,wo=Math.floor,ir=e=>({x:e,y:e}),kI={left:"right",right:"left",bottom:"top",top:"bottom"},OI={start:"end",end:"start"};function ru(e,t,n){return Gt(e,yn(t,n))}function xo(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function dy(e){return e==="x"?"y":"x"}function ou(e){return e==="y"?"height":"width"}function Dr(e){return["top","bottom"].includes(sr(e))?"y":"x"}function iu(e){return dy(Dr(e))}function II(e,t,n){n===void 0&&(n=!1);const r=To(e),o=iu(e),i=ou(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Xs(s)),[s,Xs(s)]}function AI(e){const t=Xs(e);return[su(e),t,su(t)]}function su(e){return e.replace(/start|end/g,t=>OI[t])}function _I(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function DI(e,t,n,r){const o=To(e);let i=_I(sr(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(su)))),i}function Xs(e){return e.replace(/left|right|bottom|top/g,t=>kI[t])}function MI(e){return{top:0,right:0,bottom:0,left:0,...e}}function fy(e){return typeof e!="number"?MI(e):{top:e,right:e,bottom:e,left:e}}function Qs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
174
+ */var dy;function VO(){return dy||(dy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=ly();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var y=a(function(){var S=!1,E,O,k=function(D){if(!S){S=!0,E=D;var L=h(D);if(p!==void 0&&v.hasValue){var P=v.value;if(p(P,L))return O=P,P}return O=L,L}var _=E,N=O;if(r(_,D))return N;var $=h(D);return p!==void 0&&p(N,$)?N:(E=D,O=$,$)},I=f===void 0?null:f,C=function(){return k(d())},V=I===null?void 0:function(){return k(I())};return[C,V]},[d,f,h,p]),x=y[0],g=y[1],T=o(u,x,g);return s(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}uy.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),uy}process.env.NODE_ENV==="production"?LO():VO();const wo=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},$O=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},jO=e=>Object.entries(e),fy=e=>e instanceof Promise,hy=(e,t,n,r)=>t===e?n.reduce((o,i)=>i(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,i)=>i(o,t,r),{...t,...e}):n.reduce((o,i)=>i(o,t,r),e),RO=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,d)=>n(f=>hy(u,f,i,d));return fy(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},BO=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>hy(c,u,i,o.current));return fy(a)?a.then(c=>l(c)):l(a)},Jc=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=wo(r),s=wo((n==null?void 0:n.props)??{}),a=wo(t),l=wo((n==null?void 0:n.postMiddleware)??[]),c=wo((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=$O(r),f=wo(d),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>s.current,v=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>f.current});return jO(v).reduce((y,[x,g])=>({...y,[x]:n!=null&&n.debug?RO(x,g,o,m,h,c.current):BO(x,g,o,m,h,c.current)}),{})});return[r,p,s.current]},zO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function WO(e,t){return b.useRef(zO(e,t)).current}const eu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>w.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To"},py=b.createContext({translations:eu}),HO=e=>{const t=b.useMemo(()=>({translations:{...eu,...e.map}}),[e.map]);return w.jsx(py.Provider,{value:t,children:e.children})},zt=()=>{const e=b.useContext(py);return e?e.translations:eu},Zs=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),my=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),gy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},yy=(e,t)=>{const n=my(t,gy.basic,e)||my(t,gy.extend,e);return n===void 0||n===e?void 0:n},Xs=()=>typeof window>"u",tu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),vy=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},UO={type:"spring",bounce:.3,duration:.6},by=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),wy={middle:{x:"0%",opacity:1},enter:by(1),exit:by(-1)},xy={exit:{visibility:"hidden"}},GO=e=>{const t=yn(Og(e));return Ig({start:t,end:go(t,41)})},Sy=(e,t)=>e.toLocaleDateString(t,{month:"long"}),YO=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Og(new Date(e).setMonth(r)),i=Sy(o,t);return w.jsx("option",{value:i,"data-index":r,children:i},i)}),nu={ArrowLeft:(e,t)=>t==="days"?pO(e,1):Hg(e,1),ArrowRight:(e,t)=>t==="days"?go(e,1):Us(e,1),ArrowUp:(e,t)=>t==="days"?mO(e,1):gO(e,1),ArrowDown:(e,t)=>t==="days"?Cg(e,1):Pg(e,1)},Ty=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var s;if(e!=null&&e.dataset.focustrap){const a=(s=t.current)==null?void 0:s.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Ar=e=>e.getFullYear().toString().padStart(4,"0"),qO=(e,t,n)=>e===void 0||n===void 0?!1:mI(t,e)&&gI(t,n),Ey=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:i,onChangeYear:s,rangeMode:a=!1,onChange:l,styles:c,...u})=>{const d=zt(),f=b.useRef(null),{date:h,range:p}=u,m=h||new Date,v=b.useRef(null),[y,x]=Jc({date:m,isAnimating:!1,year:Ar(m),months:YO(m,r),direction:void 0,range:{from:p==null?void 0:p.from,to:p==null?void 0:p.to},selectMode:a?"from":void 0,week:Ig({start:yn(m),end:Sk(m)})},k=>({onChangeYear:I=>({year:I}),setToday:()=>({date:vo(new Date)}),onExitComplete:()=>(Ty(v.current||null,f,k.state().date,200),v.current=null,{isAnimating:!1}),date:I=>{const C=I(k.state().date);return{date:C,year:Ar(C)}},nextMonth:I=>{v.current=I.currentTarget;const C=k.state();if(C.isAnimating)return C;const V=Us(C.date,1);return{date:V,isAnimating:!0,direction:1,year:Ar(V)}},previousMonth:I=>{v.current=I.currentTarget;const C=k.state();if(C.isAnimating)return C;const V=Hg(C.date,1);return{date:V,isAnimating:!0,direction:-1,year:Ar(V)}},onSelectDate:I=>{const C=k.state(),V=I.currentTarget.dataset.range==="true",D=I.currentTarget.dataset.date||"",L=new Date(D);return{date:L,year:Ar(L),selectMode:C.selectMode===void 0?void 0:C.selectMode==="from"?"to":"from",range:V?{from:C.selectMode==="from"?L:C.range.from,to:C.selectMode==="to"?L:C.range.to}:C.range}},onChangeMonth:I=>{const C=I.target.value,D=Array.from(I.target.options).find(P=>P.value===C),L=k.state();if(D){const P=D.dataset.index||"",_=new Date(k.state().date);return _.setMonth(+P),{...L,date:_,year:Ar(_)}}return L},onKeyDown:I=>{const C=I.key,V=k.state();if(C in nu){(C==="ArrowUp"||C==="ArrowDown")&&I.preventDefault();const D=k.state().date,L=An.keyof(nu,C)?nu[C](D,I.shiftKey?"month":"days"):null;if(L!==null)return Ty(I.target,f,L),{...V,date:L,year:Ar(L)}}return k.state()}}),{props:{onChangeMonth:i,onChangeYear:s},postMiddleware:[(k,I,C)=>{var D,L;return(C.method==="onChangeMonth"||C.method==="previousMonth"||C.method==="nextMonth")&&((L=(D=C.props).onChangeMonth)==null||L.call(D,k.date)),k},(k,I,C)=>{var D,L;return C.method==="onChangeYear"&&((L=(D=C.props).onChangeYear)==null||L.call(D,k.date)),k},(k,I,C)=>{const V=C.method==="onSelectDate"||C.method==="setToday"||C.method==="onKeyDown";return a&&V&&t?(l==null||l(k.range),k):(V&&t&&(l==null||l(k.date)),k)}]}),g=vy(GO(y.date),7),T=y.date.toISOString(),S=Sy(y.date,r);b.useEffect(()=>{t||l==null||l(y.date)},[T]);const E=WO(k=>{x.date(I=>{const C=new Date(I);return C.setFullYear(+k),C})},1200),O=k=>{const I=k.currentTarget.value;x.onChangeYear(I),s==null||s(new Date(I)),E(I)};return w.jsx(iP,{transition:UO,children:w.jsxs("div",{ref:f,className:Be("relative overflow-hidden",c==null?void 0:c.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(ki,{initial:!1,mode:"popLayout",custom:y.direction,onExitComplete:x.onExitComplete,children:w.jsxs(Tt.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(Tt.button,{layout:!0,"data-focustrap":"prev",variants:xy,onClick:x.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(QP,{className:"h-4 w-4"})}),w.jsx(Tt.span,{layout:!0,variants:wy,custom:y.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:w.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[w.jsx("select",{style:{width:`${S.length}ch`},value:S,onChange:x.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:y.months}),w.jsx(ry,{mask:"int",value:y.year,maxLength:4,placeholder:"YYYY",onChange:O,style:{width:`${y.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(Tt.button,{layout:!0,"data-focustrap":"next",variants:xy,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:x.nextMonth,children:w.jsx(Lc,{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(Tt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:y.week.map(k=>w.jsx("th",{className:Be("py-2 text-sm font-medium capitalize",c==null?void 0:c.weekDay),children:k.toLocaleDateString(r,{weekday:"short"})},k.toString()))})}),w.jsx(Tt.tbody,{layout:!0,variants:wy,custom:y.direction,onKeyDown:x.onKeyDown,className:Be(c==null?void 0:c.week),children:g.map((k,I)=>w.jsx("tr",{className:c==null?void 0:c.week,children:k.map(C=>{var $,z,U,A;const V=C.toISOString(),D=a?V===(($=p==null?void 0:p.to)==null?void 0:$.toISOString())||V===((z=p==null?void 0:p.from)==null?void 0:z.toISOString()):V===(h==null?void 0:h.toISOString()),L=hO(C)&&o,P=(n==null?void 0:n(C))||!1,_=!fO(C,y.date)||P,N=a?qO(p==null?void 0:p.from,C,p==null?void 0:p.to):!1;return w.jsxs("td",{align:"center",className:Be("relative",c==null?void 0:c.dayFrame),children:[w.jsxs("button",{type:"button","data-date":V,disabled:P,"data-range":a,onClick:x.onSelectDate,"data-view":y.date.getMonth().toString(),className:Be(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${L?"text-primary":""} ${_?"text-disabled":""} ${D?"bg-primary text-primary-foreground":""}`,c==null?void 0:c.day,N?"size-10 border border-dashed border-card-border":""),children:[C.getDate(),D&&((U=y.range.from)==null?void 0:U.toISOString())===V?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:d.calendarFromDate})}):null,D&&((A=y.range.to)==null?void 0:A.toISOString())===V?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:d.calendarToDate})}):null]}),e?w.jsx(e,{date:C}):null]},V)})},`week-${k.length}-${I}`))})]})]},S)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:x.setToday,children:"Today"})})]})})},Cy=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>w.jsxs(to,{...s,as:n,className:Be("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?w.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,w.jsx("div",{className:Be("min-w-full px-8",i),children:e})]}),KO=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:Be("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]}),Py=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},ZO=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t};function rr(e){return ky(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fn(e){var t;return(t=(ky(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ky(e){return e instanceof Node||e instanceof Wt(e).Node}function ze(e){return e instanceof Element||e instanceof Wt(e).Element}function ut(e){return e instanceof HTMLElement||e instanceof Wt(e).HTMLElement}function ru(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}function Di(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function XO(e){return["table","td","th"].includes(rr(e))}function Qs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ou(e){const t=iu(),n=ze(e)?Yt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function QO(e){let t=Ln(e);for(;ut(t)&&!or(t);){if(ou(t))return t;if(Qs(t))return null;t=Ln(t)}return null}function iu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function or(e){return["html","body","#document"].includes(rr(e))}function Yt(e){return Wt(e).getComputedStyle(e)}function Js(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(rr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ru(e)&&e.host||Fn(e);return ru(t)?t.host:t}function Iy(e){const t=Ln(e);return or(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&Di(t)?t:Iy(t)}function ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Iy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){const a=su(s);return t.concat(s,s.visualViewport||[],Di(o)?o:[],a&&n?ir(a):[])}return t.concat(o,ir(o,[],n))}function su(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function dt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ru(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function au(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Oy(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Ay(e){return e.mozInputSource===0&&e.isTrusted?!0:uu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function lu(e){return JO()?!1:!uu()&&e.width===0&&e.height===0||uu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function cu(){return/apple/i.test(navigator.vendor)}function uu(){const e=/android/i;return e.test(au())||e.test(Oy())}function _y(){return au().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function JO(){return Oy().includes("jsdom/")}function Ni(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function eA(e){return"nativeEvent"in e}function tA(e){return e.matches("html,body")}function bt(e){return(e==null?void 0:e.ownerDocument)||document}function du(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Vn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const nA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function fu(e){return ut(e)&&e.matches(nA)}function Ct(e){e.preventDefault(),e.stopPropagation()}function My(e){return e?e.getAttribute("role")==="combobox"&&fu(e):!1}const wn=Math.min,qt=Math.max,ea=Math.round,xo=Math.floor,sr=e=>({x:e,y:e}),rA={left:"right",right:"left",bottom:"top",top:"bottom"},oA={start:"end",end:"start"};function hu(e,t,n){return qt(e,wn(t,n))}function So(e,t){return typeof e=="function"?e(t):e}function ar(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function Dy(e){return e==="x"?"y":"x"}function pu(e){return e==="y"?"height":"width"}function _r(e){return["top","bottom"].includes(ar(e))?"y":"x"}function mu(e){return Dy(_r(e))}function iA(e,t,n){n===void 0&&(n=!1);const r=To(e),o=mu(e),i=pu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ta(s)),[s,ta(s)]}function sA(e){const t=ta(e);return[gu(e),t,gu(t)]}function gu(e){return e.replace(/start|end/g,t=>oA[t])}function aA(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function lA(e,t,n,r){const o=To(e);let i=aA(ar(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(gu)))),i}function ta(e){return e.replace(/left|right|bottom|top/g,t=>rA[t])}function cA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ny(e){return typeof e!="number"?cA(e):{top:e,right:e,bottom:e,left:e}}function na(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
170
175
  * tabbable 6.2.0
171
176
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
172
- */var NI=["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])"],Js=NI.join(","),hy=typeof Element>"u",So=hy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ea=!hy&&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},ta=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},FI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},LI=function(t,n,r){if(ta(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Js));return n&&So.call(t,Js)&&o.unshift(t),o=o.filter(r),o},VI=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!ta(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=So.call(s,Js);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!ta(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var h=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},py=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},my=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||FI(t))&&!py(t)?0:t.tabIndex},$I=function(t,n){var r=my(t);return r<0&&n&&!py(t)?0:r},RI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},gy=function(t){return t.tagName==="INPUT"},jI=function(t){return gy(t)&&t.type==="hidden"},BI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},zI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},WI=function(t){if(!t.name)return!0;var n=t.form||ea(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=zI(o,t.form);return!i||i===t},HI=function(t){return gy(t)&&t.type==="radio"},UI=function(t){return HI(t)&&!WI(t)},GI=function(t){var n,r=t&&ea(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=ea(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},yy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},YI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=So.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(So.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=ea(t);if(l&&!l.shadowRoot&&o(l)===!0)return yy(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(GI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yy(t);return!1},qI=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 So.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},KI=function(t,n){return!(n.disabled||ta(n)||jI(n)||YI(n,t)||BI(n)||qI(n))},au=function(t,n){return!(UI(n)||my(n)<0||!KI(t,n))},ZI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},XI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=$I(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(RI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Pi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=VI([t],n.includeContainer,{filter:au.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ZI}):r=LI(t,n.includeContainer,au.bind(null,n)),XI(r)},QI=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return So.call(t,Js)===!1?!1:au(n,t)};function vy(e,t,n){let{reference:r,floating:o}=e;const i=Dr(t),s=iu(t),a=ou(s),l=sr(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,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(To(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const JI=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=vy(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:v}=a[m],{x:w,y,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=w??u,d=y??d,h={...h,[g]:{...h[g],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=vy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function lu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=xo(t,e),p=fy(h),g=a[f?d==="floating"?"reference":"floating":d],v=Qs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},T=Qs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:l}):w);return{top:(v.top-T.top+p.top)/S.y,bottom:(T.bottom-v.bottom+p.bottom)/S.y,left:(v.left-T.left+p.left)/S.x,right:(T.right-v.right+p.right)/S.x}}const eA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=xo(e,t)||{};if(c==null)return{};const d=fy(u),f={x:n,y:r},h=iu(o),p=ou(h),m=await s.getDimensions(c),g=h==="y",v=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-f[h]-i.floating[p],T=f[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let P=E?E[y]:0;(!P||!await(s.isElement==null?void 0:s.isElement(E)))&&(P=a.floating[y]||i.floating[p]);const D=S/2-T/2,_=P/2-m[p]/2-1,I=yn(d[v],_),V=yn(d[w],_),F=I,$=P-m[p]-V,C=P/2-m[p]/2+D,O=ru(F,C,$),M=!l.arrow&&To(o)!=null&&C!==O&&i.reference[p]/2-(C<F?I:V)-m[p]/2<0,L=M?C<F?C-F:C-$:0;return{[h]:f[h]+L,data:{[h]:O,centerOffset:C-O-L,...M&&{alignmentOffset:L}},reset:M}}}),tA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=xo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=sr(o),w=Dr(a),y=sr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(y||!m?[Xs(a)]:AI(a)),E=p!=="none";!f&&E&&T.push(...DI(a,m,p,S));const P=[a,...T],D=await lu(t,g),_=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&_.push(D[v]),d){const C=II(o,s,S);_.push(D[C[0]],D[C[1]])}if(I=[...I,{placement:o,overflows:_}],!_.every(C=>C<=0)){var V,F;const C=(((V=i.flip)==null?void 0:V.index)||0)+1,O=P[C];if(O)return{data:{index:C,overflows:I},reset:{placement:O}};let M=(F=I.filter(L=>L.overflows[0]<=0).sort((L,H)=>L.overflows[1]-H.overflows[1])[0])==null?void 0:F.placement;if(!M)switch(h){case"bestFit":{var $;const L=($=I.filter(H=>{if(E){const Y=Dr(H.placement);return Y===w||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,k)=>Y+k,0)]).sort((H,Y)=>H[1]-Y[1])[0])==null?void 0:$[0];L&&(M=L);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function nA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=sr(n),a=To(n),l=Dr(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=xo(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 rA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await nA(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},oA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:v,y:w}=g;return{x:v,y:w}}},...l}=xo(e,t),c={x:n,y:r},u=await lu(t,l),d=Dr(sr(o)),f=dy(d);let h=c[f],p=c[d];if(i){const g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=h+u[g],y=h-u[v];h=ru(w,h,y)}if(s){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=p+u[g],y=p-u[v];p=ru(w,p,y)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},iA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=xo(e,t),l=await lu(t,a),c=sr(n),u=To(n),d=Dr(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(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=h-l.top-l.bottom,v=f-l.left-l.right,w=yn(h-l[p],g),y=yn(f-l[m],v),S=!t.middlewareData.shift;let T=w,E=y;if(d?E=u||S?yn(y,v):v:T=u||S?yn(w,g):g,S&&!u){const D=Gt(l.left,0),_=Gt(l.right,0),I=Gt(l.top,0),V=Gt(l.bottom,0);d?E=f-2*(D!==0||_!==0?D+_:Gt(l.left,l.right)):T=h-2*(I!==0||V!==0?I+V:Gt(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:T});const P=await o.getDimensions(i.floating);return f!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function by(e){const t=Ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ut(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Zs(n)!==i||Zs(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function cu(e){return je(e)?e:e.contextElement}function Eo(e){const t=cu(e);if(!ut(t))return ir(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=by(t);let s=(i?Zs(n.width):n.width)/r,a=(i?Zs(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const sA=ir(0);function wy(e){const t=Bt(e);return!Kc()||!t.visualViewport?sA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=cu(e);let s=ir(1);t&&(r?je(r)&&(s=Eo(r)):s=Eo(e));const a=aA(i,n,r)?wy(i):ir(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Bt(i),h=r&&je(r)?Bt(r):r;let p=f,m=Zc(p);for(;m&&r&&h!==p;){const g=Eo(m),v=m.getBoundingClientRect(),w=Ut(m),y=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,S=v.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=y,c+=S,p=Bt(m),m=Zc(p)}}return Qs({width:u,height:d,x:l,y:c})}function lA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Nn(r),a=t?qs(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ir(1);const u=ir(0),d=ut(r);if((d||!d&&!i)&&((nr(r)!=="body"||Ei(s))&&(l=Ks(r)),ut(r))){const f=Mr(r);c=Eo(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 cA(e){return Array.from(e.getClientRects())}function xy(e){return Mr(Nn(e)).left+Ks(e).scrollLeft}function uA(e){const t=Nn(e),n=Ks(e),r=e.ownerDocument.body,o=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+xy(e);const a=-n.scrollTop;return Ut(r).direction==="rtl"&&(s+=Gt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function dA(e,t){const n=Bt(e),r=Nn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Kc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function fA(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ut(e)?Eo(e):ir(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Ty(e,t,n){let r;if(t==="viewport")r=dA(e,n);else if(t==="document")r=uA(Nn(e));else if(je(t))r=fA(t,n);else{const o=wy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Qs(r)}function Sy(e,t){const n=Fn(e);return n===t||!je(n)||rr(n)?!1:Ut(n).position==="fixed"||Sy(n,t)}function hA(e,t){const n=t.get(e);if(n)return n;let r=or(e,[],!1).filter(a=>je(a)&&nr(a)!=="body"),o=null;const i=Ut(e).position==="fixed";let s=i?Fn(e):e;for(;je(s)&&!rr(s);){const a=Ut(s),l=qc(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ei(s)&&!l&&Sy(e,s))?r=r.filter(u=>u!==s):o=a,s=Fn(s)}return t.set(e,r),r}function pA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?qs(t)?[]:hA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Ty(t,u,o);return c.top=Gt(d.top,c.top),c.right=yn(d.right,c.right),c.bottom=yn(d.bottom,c.bottom),c.left=Gt(d.left,c.left),c},Ty(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mA(e){const{width:t,height:n}=by(e);return{width:t,height:n}}function gA(e,t,n){const r=ut(t),o=Nn(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ir(0);if(r||!r&&!i)if((nr(t)!=="body"||Ei(o))&&(a=Ks(t)),r){const d=Mr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=xy(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function uu(e){return Ut(e).position==="static"}function Ey(e,t){return!ut(e)||Ut(e).position==="fixed"?null:t?t(e):e.offsetParent}function Cy(e,t){const n=Bt(e);if(qs(e))return n;if(!ut(e)){let o=Fn(e);for(;o&&!rr(o);){if(je(o)&&!uu(o))return o;o=Fn(o)}return n}let r=Ey(e,t);for(;r&&xI(r)&&uu(r);)r=Ey(r,t);return r&&rr(r)&&uu(r)&&!qc(r)?n:r||TI(e)||n}const yA=async function(e){const t=this.getOffsetParent||Cy,n=this.getDimensions,r=await n(e.floating);return{reference:gA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vA(e){return Ut(e).direction==="rtl"}const bA={convertOffsetParentRelativeRectToViewportRelativeRect:lA,getDocumentElement:Nn,getClippingRect:pA,getOffsetParent:Cy,getElementRects:yA,getClientRects:cA,getDimensions:mA,getScale:Eo,isElement:je,isRTL:vA};function wA(e,t){let n=null,r;const o=Nn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=wo(u),p=wo(o.clientWidth-(c+d)),m=wo(o.clientHeight-(u+f)),g=wo(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Gt(0,yn(1,l))||1};let y=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!y)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return s(!0),i}function na(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=cu(e),u=o||i?[...c?or(c):[],...or(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?wA(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Mr(e):null;l&&g();function g(){const v=Mr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const xA=rA,TA=oA,SA=tA,EA=iA,Py=eA,CA=(e,t,n)=>{const r=new Map,o={platform:bA,...n},i={...o.platform,_c:r};return JI(e,t,{...o,platform:i})};var ra=typeof document<"u"?b.useLayoutEffect:b.useEffect;function oa(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(!oa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oy(e,t){const n=ky(e);return Math.round(t*n)/n}function Iy(e){const t=A.useRef(e);return ra(()=>{t.current=e}),t}function PA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=A.useState(r);oa(f,r)||h(r);const[p,m]=A.useState(null),[g,v]=A.useState(null),w=A.useCallback(L=>{L!==E.current&&(E.current=L,m(L))},[]),y=A.useCallback(L=>{L!==P.current&&(P.current=L,v(L))},[]),S=i||p,T=s||g,E=A.useRef(null),P=A.useRef(null),D=A.useRef(u),_=l!=null,I=Iy(l),V=Iy(o),F=A.useCallback(()=>{if(!E.current||!P.current)return;const L={placement:t,strategy:n,middleware:f};V.current&&(L.platform=V.current),CA(E.current,P.current,L).then(H=>{const Y={...H,isPositioned:!0};$.current&&!oa(D.current,Y)&&(D.current=Y,ef.flushSync(()=>{d(Y)}))})},[f,t,n,V]);ra(()=>{c===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const $=A.useRef(!1);ra(()=>($.current=!0,()=>{$.current=!1}),[]),ra(()=>{if(S&&(E.current=S),T&&(P.current=T),S&&T){if(I.current)return I.current(S,T,F);F()}},[S,T,F,I,_]);const C=A.useMemo(()=>({reference:E,floating:P,setReference:w,setFloating:y}),[w,y]),O=A.useMemo(()=>({reference:S,floating:T}),[S,T]),M=A.useMemo(()=>{const L={position:n,left:0,top:0};if(!O.floating)return L;const H=Oy(O.floating,u.x),Y=Oy(O.floating,u.y);return a?{...L,transform:"translate("+H+"px, "+Y+"px)",...ky(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:Y}},[n,a,O.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:F,refs:C,elements:O,floatingStyles:M}),[u,F,C,O,M])}const kA=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?Py({element:r.current,padding:o}).fn(n):{}:r?Py({element:r,padding:o}).fn(n):{}}}},ia=(e,t)=>({...xA(e),options:[e,t]}),du=(e,t)=>({...TA(e),options:[e,t]}),fu=(e,t)=>({...SA(e),options:[e,t]}),OA=(e,t)=>({...EA(e),options:[e,t]}),Ay=(e,t)=>({...kA(e),options:[e,t]});function hu(e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const _y={...A},IA=_y.useInsertionEffect||(e=>e());function Ct(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return IA(()=>{t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const pu="ArrowUp",ki="ArrowDown",Co="ArrowLeft",Po="ArrowRight";function sa(e,t,n){return Math.floor(e/t)!==n}function Oi(e,t){return t<0||t>=e.current.length}function mu(e,t){return _t(e,{disabledIndices:t})}function Dy(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:i=1}=t===void 0?{}:t;const s=e.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&aa(s,a,o));return a}function AA(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===pu){if(u&&Et(n),c===-1)d=l;else if(d=_t(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||d<0)){const f=c%i,h=l%i,p=l-(h-f);h===f?d=l:d=h>f?p:p-i}Oi(e,d)&&(d=c)}if(n.key===ki&&(u&&Et(n),c===-1?d=a:(d=_t(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(d=_t(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Oi(e,d)&&(d=c)),r==="both"){const f=wo(c/i);n.key===Po&&(u&&Et(n),c%i!==i-1?(d=_t(e,{startingIndex:c,disabledIndices:s}),o&&sa(d,i,f)&&(d=_t(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(d=_t(e,{startingIndex:c-c%i-1,disabledIndices:s})),sa(d,i,f)&&(d=c)),n.key===Co&&(u&&Et(n),c%i!==0?(d=_t(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&sa(d,i,f)&&(d=_t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(d=_t(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),sa(d,i,f)&&(d=c));const h=wo(l/i)===f;Oi(e,d)&&(o&&h?d=n.key===Co?l:_t(e,{startingIndex:c-c%i-1,disabledIndices:s}):d=c)}return d}function _A(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let 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]=s}),c=!0):o++}}),[...r]}function DA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function MA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function aa(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 My=0;function ar(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(My);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():My=requestAnimationFrame(i)}var Ae=typeof document<"u"?b.useLayoutEffect:b.useEffect;function NA(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 FA(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 Ny=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function LA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Map),s=A.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=A.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ae(()=>{const l=new Map(o);Array.from(l.keys()).sort(NA).forEach((u,d)=>{l.set(u,d)}),FA(o,l)||i(l)},[o]),A.createElement(Ny.Provider,{value:A.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function Fy(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=A.useContext(Ny),[a,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const h=t!==void 0;s.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,i,s,t]);return Ae(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ae(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function ko(){return ko=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},ko.apply(this,arguments)}let Ly=!1,VA=0;const Vy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+VA++;function $A(){const[e,t]=A.useState(()=>Ly?Vy():void 0);return Ae(()=>{e==null&&t(Vy())},[]),A.useEffect(()=>{Ly=!0},[]),e}const Oo=_y.useId||$A;let Ii;process.env.NODE_ENV!=="production"&&(Ii=new Set);function la(){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=Ii)!=null&&e.has(o))){var i;(i=Ii)==null||i.add(o),console.warn(o)}}function RA(){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=Ii)!=null&&e.has(o))){var i;(i=Ii)==null||i.add(o),console.error(o)}}const $y=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||la("The `ref` prop is required for `FloatingArrow`."));const g=Oo(),[v,w]=A.useState(!1);if(Ae(()=>{if(!o)return;Ut(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const y=c*2,S=y/2,T=s/2*(l/-8+1),E=a/2*l/4,[P,D]=r.split("-"),_=!!f,I=P==="top"||P==="bottom",V=u&&D==="end"?"bottom":"top";let F=u&&D==="end"?"right":"left";u&&v&&(F=D==="end"?"left":"right");const $=(i==null?void 0:i.x)!=null?u||i.x:"",C=(i==null?void 0:i.y)!=null?u||i.y:"",O=f||"M0,0"+(" H"+s)+(" L"+(s-T)+","+(a-E))+(" Q"+s/2+","+a+" "+T+","+(a-E))+" Z",M={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[P];return A.createElement("svg",ko({},m,{"aria-hidden":!0,ref:n,width:_?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[F]:$,[V]:C,[P]:I||_?"100%":"calc(100% - "+y/2+"px)",transform:""+M+(h??""),...p}}),y>0&&A.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:y+(f?0:1),d:O}),A.createElement("path",{stroke:y&&!f?m.fill:"none",d:O}),A.createElement("clipPath",{id:g},A.createElement("rect",{x:-S,y:S*(_?-1:1),width:s+y,height:s})))});function Ry(){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 jy=A.createContext(null),By=A.createContext(null),lr=()=>{var e;return((e=A.useContext(jy))==null?void 0:e.id)||null},cr=()=>A.useContext(By);function jA(e){const t=Oo(),n=cr(),o=lr();return Ae(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function BA(e){const{children:t,id:n}=e,r=lr();return A.createElement(jy.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function zA(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(s=>{n.current=[...n.current,s]},[]),o=A.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=A.useState(()=>Ry())[0];return A.createElement(By.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function ur(e){return"data-floating-ui-"+e}function Pt(e){const t=b.useRef(e);return Ae(()=>{t.current=e}),t}const zy=ur("safe-polygon");function gu(e,t,n){return n&&!Ci(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Wy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=cr(),p=lr(),m=Pt(c),g=Pt(l),v=Pt(n),w=A.useRef(),y=A.useRef(-1),S=A.useRef(),T=A.useRef(-1),E=A.useRef(!0),P=A.useRef(!1),D=A.useRef(()=>{}),_=A.useCallback(()=>{var O;const M=(O=o.current.openEvent)==null?void 0:O.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);A.useEffect(()=>{if(!a)return;function O(M){let{open:L}=M;L||(clearTimeout(y.current),clearTimeout(T.current),E.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[a,i]),A.useEffect(()=>{if(!a||!m.current||!n)return;function O(L){_()&&r(!1,L,"hover")}const M=vt(s.floating).documentElement;return M.addEventListener("mouseleave",O),()=>{M.removeEventListener("mouseleave",O)}},[s.floating,n,r,a,m,_]);const I=A.useCallback(function(O,M,L){M===void 0&&(M=!0),L===void 0&&(L="hover");const H=gu(g.current,"close",w.current);H&&!S.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,O,L),H)):M&&(clearTimeout(y.current),r(!1,O,L))},[g,r]),V=Ct(()=>{D.current(),S.current=void 0}),F=Ct(()=>{if(P.current){const O=vt(s.floating).body;O.style.pointerEvents="",O.removeAttribute(zy),P.current=!1}});A.useEffect(()=>{if(!a)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(k){if(clearTimeout(y.current),E.current=!1,u&&!Ci(w.current)||d>0&&!gu(g.current,"open"))return;const R=gu(g.current,"open",w.current);R?y.current=window.setTimeout(()=>{v.current||r(!0,k,"hover")},R):r(!0,k,"hover")}function L(k){if(O())return;D.current();const R=vt(s.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),S.current=m.current({...o.current.floatingContext,tree:h,x:k.clientX,y:k.clientY,onClose(){F(),V(),I(k,!0,"safe-polygon")}});const oe=S.current;R.addEventListener("mousemove",oe),D.current=()=>{R.removeEventListener("mousemove",oe)};return}(w.current==="touch"?!dt(s.floating,k.relatedTarget):!0)&&I(k)}function H(k){O()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:k.clientX,y:k.clientY,onClose(){F(),V(),I(k)}})(k))}if(je(s.domReference)){var Y;const k=s.domReference;return n&&k.addEventListener("mouseleave",H),(Y=s.floating)==null||Y.addEventListener("mouseleave",H),f&&k.addEventListener("mousemove",M,{once:!0}),k.addEventListener("mouseenter",M),k.addEventListener("mouseleave",L),()=>{var R;n&&k.removeEventListener("mouseleave",H),(R=s.floating)==null||R.removeEventListener("mouseleave",H),f&&k.removeEventListener("mousemove",M),k.removeEventListener("mouseenter",M),k.removeEventListener("mouseleave",L)}}},[s,a,e,u,d,f,I,V,F,r,n,v,h,g,m,o]),Ae(()=>{var O;if(a&&n&&(O=m.current)!=null&&O.__options.blockPointerEvents&&_()){const L=vt(s.floating).body;L.setAttribute(zy,""),L.style.pointerEvents="none",P.current=!0;const H=s.floating;if(je(s.domReference)&&H){var M;const Y=s.domReference,k=h==null||(M=h.nodesRef.current.find(R=>R.id===p))==null||(M=M.context)==null?void 0:M.elements.floating;return k&&(k.style.pointerEvents=""),Y.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{Y.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,s,h,m,_]),Ae(()=>{n||(w.current=void 0,V(),F())},[n,V,F]),A.useEffect(()=>()=>{V(),clearTimeout(y.current),clearTimeout(T.current),F()},[a,s.domReference,V,F]);const $=A.useMemo(()=>{function O(M){w.current=M.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(M){const{nativeEvent:L}=M;function H(){!E.current&&!v.current&&r(!0,L,"hover")}u&&!Ci(w.current)||n||d===0||(clearTimeout(T.current),w.current==="touch"?H():T.current=window.setTimeout(H,d))}}},[u,r,n,v,d]),C=A.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(O){I(O.nativeEvent,!1)}}),[I]);return A.useMemo(()=>a?{reference:$,floating:C}:{},[a,$,C])}function WA(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Nr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function HA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),Nr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let Io=new WeakMap,ca=new WeakSet,ua={},yu=0;const UA=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Hy=e=>e&&(e.host||Hy(e.parentNode)),GA=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Hy(n);return e.contains(r)?r:null}).filter(n=>n!=null);function YA(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=GA(t,e),a=new Set,l=new Set(s),c=[];ua[o]||(ua[o]=new WeakMap);const u=ua[o];s.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(nr(p)!=="script")if(a.has(p))f(p);else{const m=i?p.getAttribute(i):null,g=m!==null&&m!=="false",v=(Io.get(p)||0)+1,w=(u.get(p)||0)+1;Io.set(p,v),u.set(p,w),c.push(p),v===1&&g&&ca.add(p),w===1&&p.setAttribute(o,""),!g&&i&&p.setAttribute(i,"true")}})}return yu++,()=>{c.forEach(h=>{const p=(Io.get(h)||0)-1,m=(u.get(h)||0)-1;Io.set(h,p),u.set(h,m),p||(!ca.has(h)&&i&&h.removeAttribute(i),ca.delete(h)),m||h.removeAttribute(o)}),yu--,yu||(Io=new WeakMap,Io=new WeakMap,ca=new WeakSet,ua={})}}function Uy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=vt(e[0]).body;return YA(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ao=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Gy(e,t){const n=Pi(e,Ao());t==="prev"&&n.reverse();const r=n.indexOf(nn(vt(e)));return n.slice(r+1)[0]}function Yy(){return Gy(document.body,"next")}function qy(){return Gy(document.body,"prev")}function Ai(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!dt(n,r)}function qA(e){Pi(e,Ao()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function KA(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 ZA(e,t,n){const r=e.indexOf(t);function o(s){const a=ur("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||dt(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const vu={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 XA;function Ky(e){e.key==="Tab"&&(e.target,clearTimeout(XA))}const da=A.forwardRef(function(t,n){const[r,o]=A.useState();Ae(()=>(Jc()&&o("button"),document.addEventListener("keydown",Ky),()=>{document.removeEventListener("keydown",Ky)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ur("focus-guard")]:"",style:vu};return A.createElement("span",ko({},t,i))}),Zy=A.createContext(null),Xy=ur("portal");function QA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Oo(),o=Qy(),[i,s]=A.useState(null),a=A.useRef(null);return Ae(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),Ae(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Xy,""),l.appendChild(c),a.current=c,s(c)},[t,r]),Ae(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!je(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(Xy,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function _i(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=QA({id:n,root:r}),[s,a]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=!!s&&!s.modal&&s.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&Ai(p)&&(p.type==="focusin"?KA:qA)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),A.createElement(Zy.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&A.createElement(da,{"data-type":"outside",ref:l,onFocus:h=>{if(Ai(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=qy()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),f&&i&&A.createElement("span",{"aria-owns":i.id,style:vu}),i&&ef.createPortal(t,i),f&&i&&A.createElement(da,{"data-type":"outside",ref:c,onFocus:h=>{if(Ai(h,i)){var p;(p=d.current)==null||p.focus()}else{const m=Yy()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const Qy=()=>A.useContext(Zy),Jy=20;let Fr=[];function bu(e){Fr=Fr.filter(n=>n.isConnected);let t=e;if(!(!t||nr(t)==="body")){if(!QI(t,Ao())){const n=Pi(t,Ao())[0];n&&(t=n)}Fr.push(t),Fr.length>Jy&&(Fr=Fr.slice(-Jy))}}function ev(){return Fr.slice().reverse().find(e=>e.isConnected)}const JA=A.forwardRef(function(t,n){return A.createElement("button",ko({},t,{type:"button",ref:n,tabIndex:-1,style:vu}))});function fa(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:g,dataRef:v,floatingId:w,elements:{domReference:y,floating:S}}=t,T=typeof s=="number"&&s<0,E=uy(y)&&T,P=UA()?i:!0,D=Pt(o),_=Pt(s),I=Pt(a),V=cr(),F=Qy(),$=A.useRef(null),C=A.useRef(null),O=A.useRef(!1),M=A.useRef(!1),L=A.useRef(-1),H=F!=null,Y=S==null?void 0:S.firstElementChild,k=(Y==null?void 0:Y.id)===w?Y:S,R=Ct(function(G){return G===void 0&&(G=k),G?Pi(G,Ao()):[]}),Z=Ct(G=>{const N=R(G);return D.current.map(j=>y&&j==="reference"?y:k&&j==="floating"?k:N).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function G(j){if(j.key==="Tab"){dt(k,nn(vt(k)))&&R().length===0&&!E&&Et(j);const W=Z(),U=Ln(j);D.current[0]==="reference"&&U===y&&(Et(j),j.shiftKey?ar(W[W.length-1]):ar(W[1])),D.current[1]==="floating"&&U===k&&j.shiftKey&&(Et(j),ar(W[0]))}}const N=vt(k);return N.addEventListener("keydown",G),()=>{N.removeEventListener("keydown",G)}},[r,y,k,c,D,E,R,Z]),A.useEffect(()=>{if(r||!S)return;function G(N){const j=Ln(N),U=R().indexOf(j);U!==-1&&(L.current=U)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,R]),A.useEffect(()=>{if(r||!d)return;function G(){M.current=!0,setTimeout(()=>{M.current=!1})}function N(j){const W=j.relatedTarget;queueMicrotask(()=>{const U=!(dt(y,W)||dt(S,W)||dt(W,S)||dt(F==null?void 0:F.portalNode,W)||W!=null&&W.hasAttribute(ur("focus-guard"))||V&&(Nr(V.nodesRef.current,p).find(z=>{var te,B;return dt((te=z.context)==null?void 0:te.elements.floating,W)||dt((B=z.context)==null?void 0:B.elements.domReference,W)})||WA(V.nodesRef.current,p).find(z=>{var te,B;return((te=z.context)==null?void 0:te.elements.floating)===W||((B=z.context)==null?void 0:B.elements.domReference)===W})));if(l&&U&&nn(vt(k))===vt(k).body){ut(k)&&(k==null||k.focus());const z=L.current,te=R(),B=te[z]||te[te.length-1]||k;ut(B)&&B.focus()}(E||!c)&&W&&U&&!M.current&&W!==ev()&&(O.current=!0,m(!1,j))})}if(S&&ut(y))return y.addEventListener("focusout",N),y.addEventListener("pointerdown",G),S.addEventListener("focusout",N),()=>{y.removeEventListener("focusout",N),y.removeEventListener("pointerdown",G),S.removeEventListener("focusout",N)}},[r,y,S,k,c,p,V,F,m,d,l,R,E]),A.useEffect(()=>{var G;if(r)return;const N=Array.from((F==null||(G=F.portalNode)==null?void 0:G.querySelectorAll("["+ur("portal")+"]"))||[]);if(S){const j=[S,...N,$.current,C.current,D.current.includes("reference")||E?y:null].filter(U=>U!=null),W=c||E?Uy(j,P,!P):Uy(j);return()=>{W()}}},[r,y,S,c,D,F,E,P]),Ae(()=>{if(r||!ut(k))return;const G=vt(k),N=nn(G);queueMicrotask(()=>{const j=Z(k),W=_.current,U=(typeof W=="number"?j[W]:W.current)||k,z=dt(k,N);!T&&!z&&f&&ar(U,{preventScroll:U===k})})},[r,f,k,T,Z,_]),Ae(()=>{if(r||!k)return;let G=!1;const N=vt(k),j=nn(N);let U=v.current.openEvent;const z=h.domReference.current;bu(j);function te(B){let{open:Pe,reason:ot,event:He,nested:it}=B;Pe&&(U=He),ot==="escape-key"&&h.domReference.current&&bu(h.domReference.current),ot==="hover"&&He.type==="mouseleave"&&(O.current=!0),ot==="outside-press"&&(it?(O.current=!1,G=!0):O.current=!(ly(He)||Qc(He)))}return g.on("openchange",te),()=>{g.off("openchange",te);const B=nn(N),Pe=dt(S,B)||V&&Nr(V.nodesRef.current,p).some(de=>{var Ee;return dt((Ee=de.context)==null?void 0:Ee.elements.floating,B)});(Pe||U&&["click","mousedown"].includes(U.type))&&h.domReference.current&&bu(h.domReference.current);const He=z||j,it=Pi(vt(He).body,Ao());queueMicrotask(()=>{let de=ev();!de&&ut(He)&&S&&(de=ZA(it,He,S)),I.current&&!O.current&&ut(de)&&(!(de!==B&&B!==N.body)||Pe)&&de.focus({preventScroll:G})})}},[r,S,k,I,v,h,g,V,p]),Ae(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{F.setFocusManagerState(null)}},[r,F,c,f,m,h,d]),Ae(()=>{if(r||!k||typeof MutationObserver!="function"||T)return;const G=()=>{const j=k.getAttribute("tabindex"),W=R(),U=nn(vt(S)),z=W.indexOf(U);z!==-1&&(L.current=z),D.current.includes("floating")||U!==h.domReference.current&&W.length===0?j!=="0"&&k.setAttribute("tabindex","0"):j!=="-1"&&k.setAttribute("tabindex","-1")};G();const N=new MutationObserver(G);return N.observe(k,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}},[r,S,k,h,D,R,T]);function oe(G){return r||!u||!c?null:A.createElement(JA,{ref:G==="start"?$:C,onClick:N=>m(!1,N.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&P&&(c?!E:!0)&&(H||c);return A.createElement(A.Fragment,null,J&&A.createElement(da,{"data-type":"inside",ref:F==null?void 0:F.beforeInsideRef,onFocus:G=>{if(c){const j=Z();ar(o[0]==="reference"?j[0]:j[j.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(O.current=!1,Ai(G,F.portalNode)){const j=Yy()||y;j==null||j.focus()}else{var N;(N=F.beforeOutsideRef.current)==null||N.focus()}}}),!E&&oe("start"),n,oe("end"),J&&A.createElement(da,{"data-type":"inside",ref:F==null?void 0:F.afterInsideRef,onFocus:G=>{if(c)ar(Z()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(O.current=!0),Ai(G,F.portalNode)){const j=qy()||y;j==null||j.focus()}else{var N;(N=F.afterOutsideRef.current)==null||N.focus()}}}))}const wu=new Set,e_=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Oo();return Ae(()=>{if(!r)return;wu.add(i);const s=/iP(hone|ad|od)|iOS/.test(Xc()),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"),s){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,g=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(g))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{wu.delete(i),wu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[i,r]),A.createElement("div",ko({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function tv(e){return ut(e.target)&&e.target.tagName==="BUTTON"}function nv(e){return nu(e)}function xu(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=A.useRef(),f=A.useRef(!1),h=A.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Ci(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}Ci(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||tv(p))&&(p.key===" "&&!nv(i)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||tv(p)||nv(i)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return A.useMemo(()=>s?{reference:h}:{},[s,h])}const t_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},n_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},rv=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 Di(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=cr(),g=Ct(typeof l=="function"?l:()=>!1),v=typeof l=="function"?g:l,w=A.useRef(!1),y=A.useRef(!1),{escapeKey:S,outsidePress:T}=rv(h),{escapeKey:E,outsidePress:P}=rv(p),D=Ct(C=>{var O;if(!n||!s||!a||C.key!=="Escape")return;const M=(O=i.current.floatingContext)==null?void 0:O.nodeId,L=m?Nr(m.nodesRef.current,M):[];if(!S&&(C.stopPropagation(),L.length>0)){let H=!0;if(L.forEach(Y=>{var k;if((k=Y.context)!=null&&k.open&&!Y.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,EI(C)?C.nativeEvent:C,"escape-key")}),_=Ct(C=>{var O;const M=()=>{var L;D(C),(L=Ln(C))==null||L.removeEventListener("keydown",M)};(O=Ln(C))==null||O.addEventListener("keydown",M)}),I=Ct(C=>{var O;const M=w.current;w.current=!1;const L=y.current;if(y.current=!1,c==="click"&&L||M||typeof v=="function"&&!v(C))return;const H=Ln(C),Y="["+ur("inert")+"]",k=vt(o.floating).querySelectorAll(Y);let R=je(H)?H:null;for(;R&&!rr(R);){const G=Fn(R);if(rr(G)||!je(G))break;R=G}if(k.length&&je(H)&&!CI(H)&&!dt(H,o.floating)&&Array.from(k).every(G=>!dt(R,G)))return;if(ut(H)&&$){const G=H.clientWidth>0&&H.scrollWidth>H.clientWidth,N=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let j=N&&C.offsetX>H.clientWidth;if(N&&Ut(H).direction==="rtl"&&(j=C.offsetX<=H.offsetWidth-H.clientWidth),j||G&&C.offsetY>H.clientHeight)return}const Z=(O=i.current.floatingContext)==null?void 0:O.nodeId,oe=m&&Nr(m.nodesRef.current,Z).some(G=>{var N;return tu(C,(N=G.context)==null?void 0:N.elements.floating)});if(tu(C,o.floating)||tu(C,o.domReference)||oe)return;const J=m?Nr(m.nodesRef.current,Z):[];if(J.length>0){let G=!0;if(J.forEach(N=>{var j;if((j=N.context)!=null&&j.open&&!N.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,C,"outside-press")}),V=Ct(C=>{var O;const M=()=>{var L;I(C),(L=Ln(C))==null||L.removeEventListener(c,M)};(O=Ln(C))==null||O.addEventListener(c,M)});A.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=T;function C(L){r(!1,L,"ancestor-scroll")}const O=vt(o.floating);a&&O.addEventListener("keydown",E?_:D,E),v&&O.addEventListener(c,P?V:I,P);let M=[];return f&&(je(o.domReference)&&(M=or(o.domReference)),je(o.floating)&&(M=M.concat(or(o.floating))),!je(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(or(o.reference.contextElement)))),M=M.filter(L=>{var H;return L!==((H=O.defaultView)==null?void 0:H.visualViewport)}),M.forEach(L=>{L.addEventListener("scroll",C,{passive:!0})}),()=>{a&&O.removeEventListener("keydown",E?_:D,E),v&&O.removeEventListener(c,P?V:I,P),M.forEach(L=>{L.removeEventListener("scroll",C)})}},[i,o,a,v,c,n,r,f,s,S,T,D,E,_,I,P,V]),A.useEffect(()=>{w.current=!1},[v,c]);const F=A.useMemo(()=>({onKeyDown:D,[t_[d]]:C=>{u&&r(!1,C.nativeEvent,"reference-press")}}),[D,r,u,d]),$=A.useMemo(()=>({onKeyDown:D,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[n_[c]]:()=>{w.current=!0}}),[D,c]);return A.useMemo(()=>s?{reference:F,floating:$}:{},[s,F,$])}function r_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Oo(),i=A.useRef({}),[s]=A.useState(()=>Ry()),a=lr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!je(h)&&RA("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]=A.useState(r.reference),u=Ct((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Mi(e){e===void 0&&(e={});const{nodeId:t}=e,n=r_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=A.useState(null),[a,l]=A.useState(null),u=(o==null?void 0:o.reference)||i,d=A.useRef(null),f=cr();Ae(()=>{u&&(d.current=u)},[u]);const h=PA({...e,elements:{...o,...a&&{reference:a}}}),p=A.useCallback(y=>{const S=je(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(S),h.refs.setReference(S)},[h.refs]),m=A.useCallback(y=>{(je(y)||y===null)&&(d.current=y,s(y)),(je(h.refs.reference.current)||h.refs.reference.current===null||y!==null&&!je(y))&&h.refs.setReference(y)},[h.refs]),g=A.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=A.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=A.useMemo(()=>({...h,...r,refs:g,elements:v,nodeId:t}),[h,g,v,t,r]);return Ae(()=>{r.dataRef.current.floatingContext=w;const y=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);y&&(y.context=w)}),A.useMemo(()=>({...h,context:w,refs:g,elements:v}),[h,g,v,w])}function o_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(),d=A.useRef(!0);A.useEffect(()=>{if(!a)return;const h=Bt(s.domReference);function p(){!n&&ut(s.domReference)&&s.domReference===nn(vt(s.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)}},[s.domReference,n,a]),A.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]),A.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=A.useMemo(()=>({onPointerDown(h){Qc(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Ln(h.nativeEvent);if(l&&je(p))try{if(Jc()&&cy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!nu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,g=je(p)&&p.hasAttribute(ur("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const w=nn(s.domReference?s.domReference.ownerDocument:document);!p&&w===s.domReference||dt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,w)||dt(s.domReference,w)||g||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return A.useMemo(()=>a?{reference:f}:{},[a,f])}const ov="active",iv="selected";function Tu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ov]:s,[iv]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[ov,iv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var 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(g=>g(...p)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function Ni(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=A.useCallback(a=>Tu(a,e,"reference"),t),i=A.useCallback(a=>Tu(a,e,"floating"),n),s=A.useCallback(a=>Tu(a,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let sv=!1;function ha(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function av(e,t){return ha(t,e===pu||e===ki,e===Co||e===Po)}function Su(e,t,n){return ha(t,e===ki,n?e===Co:e===Po)||e==="Enter"||e===" "||e===""}function i_(e,t,n){return ha(t,n?e===Co:e===Po,e===ki)}function lv(e,t,n){return ha(t,n?e===Po:e===Co,e===pu)}function cv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:P,dense:D=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||la("`useListNavigation` looping must be enabled to allow escaping."),p||la("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&S>1&&la("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=lr(),I=cr(),V=Ct(a),F=A.useRef(m),$=A.useRef(c??-1),C=A.useRef(null),O=A.useRef(!0),M=A.useRef(V),L=A.useRef(!!o.floating),H=A.useRef(n),Y=A.useRef(!1),k=A.useRef(!1),R=Pt(w),Z=Pt(n),oe=Pt(T),J=Pt(o.floating),G=Pt(c),[N,j]=A.useState(),[W,U]=A.useState(),z=Ct(function(de,Ee,ce){ce===void 0&&(ce=!1);function Oe(Ie){p?(j(Ie.id),I==null||I.events.emit("virtualfocus",Ie),E&&(E.current=Ie)):ar(Ie,{preventScroll:!0,sync:cy()&&Jc()?sv||Y.current:!1})}const ht=de.current[Ee.current];ht&&Oe(ht),requestAnimationFrame(()=>{const Ie=de.current[Ee.current]||ht;if(!Ie)return;ht||Oe(Ie);const pt=oe.current;pt&&B&&(ce||!O.current)&&(Ie.scrollIntoView==null||Ie.scrollIntoView(typeof pt=="boolean"?{block:"nearest",inline:"nearest"}:pt))})});Ae(()=>{document.createElement("div").focus({get preventScroll(){return sv=!0,!1}})},[]),Ae(()=>{l&&(n&&o.floating?F.current&&c!=null&&(k.current=!0,$.current=c,V(c)):L.current&&($.current=-1,M.current(null)))},[l,n,o.floating,c,V]),Ae(()=>{if(l&&n&&o.floating)if(s==null){if(Y.current=!1,G.current!=null)return;if(L.current&&($.current=-1,z(i,$)),(!H.current||!L.current)&&F.current&&(C.current!=null||F.current===!0&&C.current==null)){let de=0;const Ee=()=>{i.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):($.current=C.current==null||Su(C.current,y,h)||f?mu(i,R.current):Dy(i,R.current),C.current=null,V($.current))};Ee()}}else Oi(i,s)||($.current=s,z(i,$,k.current),k.current=!1)},[l,n,o.floating,s,G,f,i,y,h,V,z,R]),Ae(()=>{var de;if(!l||o.floating||!I||p||!L.current)return;const Ee=I.nodesRef.current,ce=(de=Ee.find(Ie=>Ie.id===_))==null||(de=de.context)==null?void 0:de.elements.floating,Oe=nn(vt(o.floating)),ht=Ee.some(Ie=>Ie.context&&dt(Ie.context.elements.floating,Oe));ce&&!ht&&O.current&&ce.focus({preventScroll:!0})},[l,o.floating,I,_,p]),Ae(()=>{if(!l||!I||!p||_)return;function de(Ee){U(Ee.id),E&&(E.current=Ee)}return I.events.on("virtualfocus",de),()=>{I.events.off("virtualfocus",de)}},[l,I,p,_,E]),Ae(()=>{M.current=V,L.current=!!o.floating}),Ae(()=>{n||(C.current=null)},[n]),Ae(()=>{H.current=n},[n]);const te=s!=null,B=A.useMemo(()=>{function de(ce){if(!n)return;const Oe=i.current.indexOf(ce);Oe!==-1&&V(Oe)}return{onFocus(ce){let{currentTarget:Oe}=ce;de(Oe)},onClick:ce=>{let{currentTarget:Oe}=ce;return Oe.focus({preventScroll:!0})},...g&&{onMouseMove(ce){let{currentTarget:Oe}=ce;de(Oe)},onPointerLeave(ce){let{pointerType:Oe}=ce;!O.current||Oe==="touch"||($.current=-1,z(i,$),V(null),p||ar(J.current,{preventScroll:!0}))}}}},[n,J,z,g,i,V,p]),Pe=Ct(de=>{if(O.current=!1,Y.current=!0,!Z.current&&de.currentTarget===J.current)return;if(f&&lv(de.key,y,h)){Et(de),r(!1,de.nativeEvent,"list-navigation"),ut(o.domReference)&&!p&&o.domReference.focus();return}const Ee=$.current,ce=mu(i,w),Oe=Dy(i,w);if(de.key==="Home"&&(Et(de),$.current=ce,V($.current)),de.key==="End"&&(Et(de),$.current=Oe,V($.current)),S>1){const ht=P||Array.from({length:i.current.length},()=>({width:1,height:1})),Ie=_A(ht,S,D),pt=Ie.findIndex(ae=>ae!=null&&!aa(i.current,ae,w)),Q=Ie.reduce((ae,_e,Ke)=>_e!=null&&!aa(i.current,_e,w)?Ke:ae,-1);if($.current=Ie[AA({current:Ie.map(ae=>ae!=null?i.current[ae]:null)},{event:de,orientation:y,loop:d,cols:S,disabledIndices:MA([...w||i.current.map((ae,_e)=>aa(i.current,_e)?_e:void 0),void 0],Ie),minIndex:pt,maxIndex:Q,prevIndex:DA($.current>Oe?ce:$.current,ht,Ie,S,de.key===ki?"bl":de.key===Po?"tr":"tl"),stopEvent:!0})],V($.current),y==="both")return}if(av(de.key,y)){if(Et(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){$.current=Su(de.key,y,h)?ce:Oe,V($.current);return}Su(de.key,y,h)?d?$.current=Ee>=Oe?u&&Ee!==i.current.length?-1:ce:_t(i,{startingIndex:Ee,disabledIndices:w}):$.current=Math.min(Oe,_t(i,{startingIndex:Ee,disabledIndices:w})):d?$.current=Ee<=ce?u&&Ee!==-1?i.current.length:Oe:_t(i,{startingIndex:Ee,decrement:!0,disabledIndices:w}):$.current=Math.max(ce,_t(i,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Oi(i,$.current)?V(null):V($.current)}}),ot=A.useMemo(()=>p&&n&&te&&{"aria-activedescendant":W||N},[p,n,te,W,N]),He=A.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!uy(o.domReference)&&ot,onKeyDown:Pe,onPointerMove(){O.current=!0}}),[ot,Pe,o.domReference,y]),it=A.useMemo(()=>{function de(ce){m==="auto"&&ly(ce.nativeEvent)&&(F.current=!0)}function Ee(ce){F.current=m,m==="auto"&&Qc(ce.nativeEvent)&&(F.current=!0)}return{...ot,onKeyDown(ce){O.current=!1;const Oe=ce.key.indexOf("Arrow")===0,ht=i_(ce.key,y,h),Ie=lv(ce.key,y,h),pt=av(ce.key,y),Q=(f?ht:pt)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const kt=I==null?void 0:I.nodesRef.current.find(Vt=>Vt.parentId==null),Nt=I&&kt?HA(I.nodesRef.current,kt.id):null;if(Oe&&Nt&&E){const Vt=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ht||Ie){var ae,_e;const Gr=((ae=Nt.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,qo=Ie&&!Gr?(_e=Nt.context)==null?void 0:_e.elements.domReference:ht?i.current.find(Ko=>(Ko==null?void 0:Ko.id)===N):null;qo&&(Et(ce),qo.dispatchEvent(Vt),U(void 0))}if(pt&&Nt.context&&Nt.context.open&&Nt.parentId&&ce.currentTarget!==Nt.context.elements.domReference){var Ke;Et(ce),(Ke=Nt.context.elements.domReference)==null||Ke.dispatchEvent(Vt);return}}return Pe(ce)}if(!(!n&&!v&&Oe)){if(Q&&(C.current=f&&pt?null:ce.key),f){ht&&(Et(ce),n?($.current=mu(i,R.current),V($.current)):r(!0,ce.nativeEvent,"list-navigation"));return}pt&&(c!=null&&($.current=c),Et(ce),!n&&v?r(!0,ce.nativeEvent,"list-navigation"):Pe(ce),n&&V($.current))}},onFocus(){n&&!p&&V(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[N,ot,Pe,R,m,i,f,V,r,n,v,y,h,c,I,p,E]);return A.useMemo(()=>l?{reference:it,floating:He,item:B}:{},[l,it,He,B])}const s_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Fi(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=s_.get(s))!=null?n:s,l=Oo(),u=lr()!=null,d=A.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),f=A.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=A.useCallback(p=>{let{active:m,selected:g}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...v,"aria-selected":m&&g};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,s]);return A.useMemo(()=>i?{reference:d,floating:f,item:h}:{},[i,d,f,h])}const uv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function _o(e,t){return typeof e=="function"?e(t):e}function a_(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function l_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=A.useState("unmounted"),c=a_(n,s);return!c&&a==="close"&&l("unmounted"),Ae(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function c_(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=A.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[h,p]=A.useState(()=>({..._o(i,c),..._o(n,c)})),{isMounted:m,status:g}=l_(e,{duration:s}),v=Pt(n),w=Pt(r),y=Pt(o),S=Pt(i);return Ae(()=>{const T=_o(v.current,c),E=_o(y.current,c),P=_o(S.current,c),D=_o(w.current,c)||Object.keys(T).reduce((_,I)=>(_[I]="",_),{});if(g==="initial"&&p(_=>({transitionProperty:_.transitionProperty,...P,...T})),g==="open"&&p({transitionProperty:Object.keys(D).map(uv).join(","),transitionDuration:d+"ms",...P,...D}),g==="close"){const _=E||T;p({transitionProperty:Object.keys(_).map(uv).join(","),transitionDuration:f+"ms",...P,..._})}},[f,y,v,w,S,d,g,c]),{isMounted:m,styles:h}}function u_(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=A.useRef(),m=A.useRef(""),g=A.useRef((n=h??s)!=null?n:-1),v=A.useRef(null),w=Ct(a),y=Ct(l),S=Pt(u),T=Pt(f);Ae(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),Ae(()=>{if(r&&m.current===""){var I;g.current=(I=h??s)!=null?I:-1}},[r,h,s]);const E=Ct(I=>{I?o.current.typing||(o.current.typing=I,y(I)):o.current.typing&&(o.current.typing=I,y(I))}),P=Ct(I=>{function V(M,L,H){const Y=S.current?S.current(L,H):L.find(k=>(k==null?void 0:k.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return Y?M.indexOf(Y):-1}const F=i.current;if(m.current.length>0&&m.current[0]!==" "&&(V(F,F,m.current)===-1?E(!1):I.key===" "&&Et(I)),F==null||T.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(Et(I),E(!0)),F.every(M=>{var L,H;return M?((L=M[0])==null?void 0:L.toLocaleLowerCase())!==((H=M[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===I.key&&(m.current="",g.current=v.current),m.current+=I.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=v.current,E(!1)},d);const C=g.current,O=V(F,[...F.slice((C||0)+1),...F.slice(0,(C||0)+1)],m.current);O!==-1?(w(O),v.current=O):I.key!==" "&&(m.current="",E(!1))}),D=A.useMemo(()=>({onKeyDown:P}),[P]),_=A.useMemo(()=>({onKeyDown:P,onKeyUp(I){I.key===" "&&E(!1)}}),[P,E]);return A.useMemo(()=>c?{reference:D,floating:_}:{},[c,D,_])}function dv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function d_(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function f_(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(s===null||a===null||p===0)return s=d,a=f,l=h,null;const m=d-s,g=f-a,w=Math.sqrt(m*m+g*g)/p;return s=d,a=f,l=h,w}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:g,nodeId:v,tree:w}=d;return function(S){function T(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:P}=S,D=[E,P],_=Ln(S),I=S.type==="mouseleave",V=dt(m.floating,_),F=dt(m.domReference,_),$=m.domReference.getBoundingClientRect(),C=m.floating.getBoundingClientRect(),O=p.split("-")[0],M=f>C.right-C.width/2,L=h>C.bottom-C.height/2,H=d_(D,$),Y=C.width>$.width,k=C.height>$.height,R=(Y?$:C).left,Z=(Y?$:C).right,oe=(k?$:C).top,J=(k?$:C).bottom;if(V&&(i=!0,!I))return;if(F&&(i=!1),F&&!I){i=!0;return}if(I&&je(S.relatedTarget)&&dt(m.floating,S.relatedTarget)||w&&Nr(w.nodesRef.current,v).some(j=>{let{context:W}=j;return W==null?void 0:W.open}))return;if(O==="top"&&h>=$.bottom-1||O==="bottom"&&h<=$.top+1||O==="left"&&f>=$.right-1||O==="right"&&f<=$.left+1)return T();let G=[];switch(O){case"top":G=[[R,$.top+1],[R,C.bottom-1],[Z,C.bottom-1],[Z,$.top+1]];break;case"bottom":G=[[R,C.top+1],[R,$.bottom-1],[Z,$.bottom-1],[Z,C.top+1]];break;case"left":G=[[C.right-1,J],[C.right-1,oe],[$.left+1,oe],[$.left+1,J]];break;case"right":G=[[$.right-1,J],[$.right-1,oe],[C.left+1,oe],[C.left+1,J]];break}function N(j){let[W,U]=j;switch(O){case"top":{const z=[Y?W+t/2:M?W+t*4:W-t*4,U+t+1],te=[Y?W-t/2:M?W+t*4:W-t*4,U+t+1],B=[[C.left,M||Y?C.bottom-t:C.top],[C.right,M?Y?C.bottom-t:C.top:C.bottom-t]];return[z,te,...B]}case"bottom":{const z=[Y?W+t/2:M?W+t*4:W-t*4,U-t],te=[Y?W-t/2:M?W+t*4:W-t*4,U-t],B=[[C.left,M||Y?C.top+t:C.bottom],[C.right,M?Y?C.top+t:C.bottom:C.top+t]];return[z,te,...B]}case"left":{const z=[W+t+1,k?U+t/2:L?U+t*4:U-t*4],te=[W+t+1,k?U-t/2:L?U+t*4:U-t*4];return[...[[L||k?C.right-t:C.left,C.top],[L?k?C.right-t:C.left:C.right-t,C.bottom]],z,te]}case"right":{const z=[W-t,k?U+t/2:L?U+t*4:U-t*4],te=[W-t,k?U-t/2:L?U+t*4:U-t*4],B=[[L||k?C.left+t:C.right,C.top],[L?k?C.left+t:C.right:C.left+t,C.bottom]];return[z,te,...B]}}}if(!dv([E,P],G)){if(i&&!H)return T();if(!I&&r){const j=c(S.clientX,S.clientY);if(j!==null&&j<.1)return T()}dv([E,P],N([f,h]))?!i&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}function h_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function p_(...e){return t=>e.forEach(n=>h_(n,t))}var Eu=A.forwardRef((e,t)=>{const{children:n,...r}=e,o=A.Children.toArray(n),i=o.find(g_);if(i){const s=i.props.children,a=o.map(l=>l===i?A.Children.count(s)>1?A.Children.only(null):A.isValidElement(s)?s.props.children:null:l);return x.jsx(Cu,{...r,ref:t,children:A.isValidElement(s)?A.cloneElement(s,void 0,a):null})}return x.jsx(Cu,{...r,ref:t,children:n})});Eu.displayName="Slot";var Cu=A.forwardRef((e,t)=>{const{children:n,...r}=e;if(A.isValidElement(n)){const o=v_(n);return A.cloneElement(n,{...y_(r,n.props),ref:t?p_(t,o):o})}return A.Children.count(n)>1?A.Children.only(null):null});Cu.displayName="SlotClone";var m_=({children:e})=>x.jsx(x.Fragment,{children:e});function g_(e){return A.isValidElement(e)&&e.type===m_}function y_(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function v_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const pa=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),fv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),hv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},pv=(e,t)=>{const n=fv(t,hv.basic,e)||fv(t,hv.extend,e);return n===void 0||n===e?void 0:n},ma=()=>typeof window>"u",Pu=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),b_=(e,t)=>ma()?t:window.matchMedia(e).matches,w_=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(b_(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},rn="600ms",x_={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:rn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:rn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:rn}},T_={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:rn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:rn}},ku={drawer:e=>e==="left"?x_:T_,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:rn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:rn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:rn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:rn},enter:{opacity:1,scale:[1.05,1],animationDuration:rn},exit:{opacity:0,scale:.97,animationDuration:rn}}},S_=as("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"}}),E_={top:0,left:0,right:0,bottom:-1},C_=e=>e*.62,P_=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=C_(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(Ht.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:E_,whileDrag:{cursor:"grabbing"},className:Xe("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Ou={drawer:"right",sheet:"none",dialog:"none"},mv=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),l=w_("(min-width: 48rem)"),c=e!=="dialog",u=l?e==="drawer"?i.position:Ou[e]:r?Ou[e]:Ou.sheet,d=l||r?ku[e]:ku.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=Mi({open:i.open,onOpenChange:i.onChange}),g=xu(m),v=Fi(m),w=Di(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:S}=Ni([g,v,w]),T=i.trigger,E=Or(void 0),P=()=>i.onChange(!1);return x.jsxs(b.Fragment,{children:[i.trigger?x.jsx(b.Fragment,{children:i.asChild?x.jsx(Eu,{ref:p.setReference,...y(),children:T}):x.jsx("button",{ref:p.setReference,...y(),type:"button",children:T})}):null,x.jsx(_i,{children:x.jsx(Bs,{presenceAffectsLayout:!0,children:i.open?x.jsx(e_,{lockScroll:!0,className:`z-overlay inset-0 isolate h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:x.jsx(fa,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(Ht.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:S_({position:u,type:h}),exit:"exit",initial:"initial",ref:p.setFloating,style:h==="drawer"?{width:E}:{height:E},variants:f,...S(),children:[i.title?x.jsx("header",{className:"relative w-full",children:i.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,x.jsx("section",{className:"py-1 flex-1 overflow-y-auto px-8",children:i.children}),i.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1",children:x.jsx("button",{type:"button",onClick:P,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(og,{})})}):null,c&&t?x.jsx(P_,{onChange:i.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})}):null})})]})},gv=b.createContext(""),k_=e=>{var o;const[t,n]=b.useState(!1),r=e.items.find(i=>i.props.id===e.active);return x.jsxs("div",{className:"my-4 px-8 flex min-w-full text-center lg:hidden",children:[x.jsx(xr,{className:"min-w-full",onClick:()=>n(!0),children:(o=r==null?void 0:r.props)==null?void 0:o.title}),x.jsx(mv,{closable:!0,forceType:!0,onChange:n,open:t,type:"dialog",children:x.jsx("ul",{className:"mt-4 space-y-4",children:e.items.map(i=>{const s=i.props,a=()=>{e.setActive(s.id),n(!1)};return x.jsx("li",{className:"min-w-full",children:x.jsx(xr,{className:"w-full",onClick:a,theme:s.id===e.active?"primary":"secondary",children:s.title})},s.id)})})})]})},O_=e=>{const[t,n]=oy(e.active),r=Or(0),o=Or(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useEffect(()=>{const c=i.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},d=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",d);let f=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(f=c.querySelector(`li[data-id=${h}]`),n(h)),f===null){f=c.querySelector("li[data-id]");const p=f.getAttribute("data-id")||"";n(p)}return u(f),()=>window.removeEventListener("resize",d)},[]),b.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=b.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx(gv.Provider,{value:t,children:x.jsx(ry,{container:"pt-0",className:e.className,header:x.jsxs("header",{ref:i,className:"relative mb-2 border-b border-card-border",children:[x.jsx(Ht.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"duration-300 absolute bottom-0 hidden h-0.5 w-28 bg-primary transition-all lg:block"}),x.jsxs("nav",{children:[x.jsx(k_,{setActive:n,items:a,active:t}),x.jsx("ul",{className:"hidden justify-between divide-x divide-card-border overflow-x-auto md:justify-start lg:flex",children:a.map(c=>{const u=c.props;return x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"w-full data-[active=true]:text-primary md:w-auto",children:x.jsx(s,{"data-id":u.id,onClick:l,"aria-current":"page",className:"block w-full whitespace-nowrap px-10 py-4 font-medium",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})]})]}),children:e.children})})},I_=()=>b.useContext(gv),A_=e=>{const t=I_();return x.jsx(b.Fragment,{children:e.id===t?e.children:null})},Do=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[ia(10),fu({fallbackAxisSideDirection:"end"}),du(),Ay({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Mi({open:n,middleware:i,transform:!0,whileElementsMounted:na,onOpenChange:(p,m)=>{var v;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=xu(l),u=Di(l),d=Fi(l),{getReferenceProps:f,getFloatingProps:h}=Ni([c,u,d]);return x.jsxs(b.Fragment,{children:[x.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx(_i,{id:`${t}-portal`,children:x.jsx(fa,{restoreFocus:e.restoreFocus??!0,returnFocus:e.restoreFocus??!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:s.setFloating,style:a,"aria-labelledby":t,...h(),children:[x.jsx($y,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-wide text-left",children:e.title})}),e.children]})})})]})},yv=300,vv=({children:e,enabled:t,as:n,title:r,...o})=>{const[i,s]=b.useState(!1),a=b.useRef(null),l=n||"span",{refs:c,floatingStyles:u,context:d}=Mi({open:i,onOpenChange:s,whileElementsMounted:na,transform:!0,middleware:[ia(5),fu({fallbackAxisSideDirection:"start"}),du(),Ay({element:a,padding:5})]}),f=Wy(d,{move:!0,delay:{open:yv}}),h=o_(d,{enabled:t}),p=Di(d,{enabled:t}),m=Fi(d,{role:"tooltip",enabled:t}),{getReferenceProps:g,getFloatingProps:v}=Ni([f,h,p,m]);return x.jsxs(b.Fragment,{children:[x.jsx(l,{ref:c.setReference,...g(o),children:r}),x.jsx(_i,{children:i&&x.jsxs(no,{...v(),ref:c.setFloating,style:u,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground",children:[x.jsx($y,{ref:a,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class ga{static getDescendantProperty(t,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=t[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)ga.getDescendantProperty(a[l],i,r);else i&&ga.getDescendantProperty(a,i,r)}else r.push(t);return r}}class Mo{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Mo.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=ga.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=Mo.isMatch(s[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Mo.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 Mo.indexesOfFirstLetter(t,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const bv=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},Iu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]})},wv=b.createContext({translations:Iu}),__=e=>{const t=b.useMemo(()=>({translations:{...Iu,...e.map}}),[e.map]);return x.jsx(wv.Provider,{value:t,children:e.children})},Qt=()=>{const e=b.useContext(wv);return e?e.translations:Iu},xv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>x.jsxs("div",{className:Xe("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[i,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(vv,{title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(rg,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?x.jsxs(b.Fragment,{children:[x.jsx(ng,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(CP,{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]}),ya=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,placeholder:m,hideLeft:g,required:v})=>{const w=d??h,y=Qt(),S=e??y.inputOptionalLabel;return x.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:Xe("group inline-flex w-full gap-1.5",r),children:[x.jsxs("label",{form:u,htmlFor:w,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-hover:border-primary group-error:text-danger",children:[!g&&!n?x.jsx(xv,{info:a,hideLeft:g,reportStatus:!0,title:p,placeholder:m,children:S||n?x.jsxs(b.Fragment,{children:[v?null:x.jsx("span",{className:"text-opacity-70",children:S}),n?x.jsx(b.Fragment,{children:n}):null]}):null}):null,x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger ${f} focus:ring-2 focus:ring-inset focus:ring-primary`,children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:s}):null]})]}),x.jsx("p",{className:"hidden text-xs empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:block group-error:block group-error:text-danger",children:c}),x.jsx("p",{className:"text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},Tv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>x.jsx("li",{...o,ref:i,role:"option","aria-selected":e,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":e,className:`w-full cursor-pointer p-2 text-left ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),D_={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},M_={caseSensitive:!1,sort:!1},N_=[],F_=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:f=!1,...h},p)=>{const m=Qt(),g=b.useRef(null),[v,w]=b.useState(!1),[y,S]=b.useState(""),[T,E]=b.useState(h.value??h.defaultValue??""),[P,D]=b.useState(h.value??h.defaultValue??""),[_,I]=b.useState(null),V=b.useRef(N_),F=bv(_),$=t&&y!==""?[{value:y,label:y,"data-dynamic":"true"},...e]:e,C=new Mo($,["value","label"],M_).search(y),O=t?void 0:`^(${e.map(z=>`${Pu(z.value)}${z.label?"|"+Pu(z.label):""}`).join("|")})$`;b.useEffect(()=>{const z=Y.reference.current;if(z)return vs(z)},[]),b.useEffect(()=>{if(h.value){const z=e.find(te=>te.value===h.value);E((z==null?void 0:z.label)??h.value)}},[h.value]);const{x:M,y:L,strategy:H,refs:Y,context:k}=Mi({open:v,transform:!0,onOpenChange:w,whileElementsMounted:na,middleware:[ia(4),OA({padding:10,apply(z){Object.assign(z.elements.floating.style,{width:`${z.rects.reference.width}px`,maxHeight:`${Math.min(480,z.availableHeight)}px`})}})]}),R=c_(k,D_),{getReferenceProps:Z,getFloatingProps:oe,getItemProps:J}=Ni([Fi(k,{role:"listbox"}),Di(k),cv(k,{listRef:V,loop:!0,activeIndex:_,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:_,virtual:!0,onNavigate:z=>{const te=C.length-1;if(z===null&&F===0)return I(te);if(z===null&&F===te)return I(0);const B=z??F??null;return B===null?void 0:I(B)}})]),G=z=>{var B,Pe;E(z.value),(B=Y.reference.current)==null||B.setAttribute("data-value",z.value),D(z.label??"");const te=ys(g.current,z.value);te&&((Pe=h.onChange)==null||Pe.call(h,te)),w(!1),S("")},N=z=>{var B;const te=z.target.value;return S(te),!v&&te===""?w(!0):(z.target.name=h.name||"",te?w(!0):(B=h.onChange)==null?void 0:B.call(h,z))},j=()=>{w(!0),S("")},W=()=>{var z;S(""),E(""),(z=Y.reference.current)==null||z.setAttribute("data-value",""),D(""),ys(Y.reference.current),w(!1)},U=h.id||h.name;return x.jsxs(ya,{...h,container:Xe("group inline-block w-full",a),error:d,feedback:n,form:h.form,hideLeft:l,id:h.name||h.id,interactive:o,labelClassName:r,left:u,name:h.name,optionalText:s,placeholder:h.placeholder,required:!0,rightLabel:i,title:h.title,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[x.jsx(tg,{size:20}),x.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),T?x.jsx("button",{type:"button",onClick:W,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{...Z({...h,onChange:N,onFocus:j,pattern:O,ref:Y.setReference,name:`${U}-shadow`,id:`${U}-shadow`,onClick:z=>z.currentTarget.focus(),onKeyDown(z){if(z.key==="Escape")return z.currentTarget.blur(),w(!1);if(z.key==="Enter"){if(_!==null&&C[_])return z.preventDefault(),G(C[_]);if(C.length===1)return z.preventDefault(),G(C[0])}}}),"data-value":T,"data-error":!!d,"data-name":U,"data-target":U,required:f,value:v?y:P||T,"aria-autocomplete":"list",autoComplete:"off",className:Xe("input placeholder-input-mask group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-base text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||y?"pe-12":"",u?"ps-8":"",h.className)}),x.jsx("input",{id:U,name:U,type:"hidden","data-origin":U,ref:p,required:f,defaultValue:h.value||T||void 0}),x.jsx(_i,{preserveTabOrder:!0,children:v?x.jsx(fa,{guards:!0,returnFocus:!1,context:k,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...oe({ref:Y.setFloating,style:{position:H,left:M??0,top:L??0,...R.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg bg-floating-background p-0 text-foreground shadow-floating",children:C.map((z,te)=>b.createElement(Tv,{...J({onClick:()=>G(z),ref:B=>void(V.current[te]=B),selected:_===te,active:T===z.value}),key:`${z.value}-option`,option:z,selected:_===te,active:T===z.value}))})}):null})]})}),Sv=b.forwardRef(({children:e,error:t,className:n="",size:r,container:o,...i},s)=>x.jsxs("label",{"data-disabled":i.disabled,"aria-disabled":i.disabled,className:Xe("group flex flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed w-fit",o),children:[x.jsx("input",{...i,ref:s,type:"checkbox",className:Xe("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",n)}),e,x.jsx("span",{className:"min-w-full flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:t})]})),Li=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,...h},p)=>{const m=h.id??h.name,g=b.useRef(null);return b.useEffect(()=>{if(g.current===null)return;const v=g.current,w=vs(g.current),y=S=>{const T=S;if(T.key==="Enter"&&v.enterKeyHint==="next"){const E=v.getAttribute("data-next");if(E){const P=document.getElementById(E);if(P)return P.focus(),void T.preventDefault()}}};return v.addEventListener("keydown",y),()=>{w(),v.removeEventListener("keydown",y)}},[]),x.jsx(ya,{info:n,container:Xe("group inline-block w-full",l),error:f,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:s,interactive:i,form:h.form,id:h.name||h.id,name:h.name,labelClassName:r,title:h.title,placeholder:h.placeholder,required:h.required,children:x.jsx(jg,{...h,type:e,"data-next":o,ref:Ol(p,g),id:m,name:m,className:Xe("input placeholder-input-mask group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-4":"",d?"ps-4":"",h.className)})})}),Ev=new Date(1970,11,31),Au={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Cv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},L_={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")},V_=b.forwardRef(({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:i,...s},a)=>{const l=b.useId(),c=Qt(),u=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[d,f]=b.useState(e||void 0),[h,p]=b.useState(!1),m=u.formatToParts(Ev).flatMap(E=>kn.keyof(Au,E.type)?Au[E.type](E.value):[]),g=u.formatToParts(Ev).reduce((E,P)=>E+(kn.keyof(Cv,P.type)?Cv[P.type](P.value):""),""),[v,w]=b.useState(d?u.formatToParts(d).reduce((E,P)=>E+(kn.keyof(Au,P.type)?L_[P.type](d,P.value):""),""):""),y=E=>{const P=E.target.value;if(w(P),m.length===P.length&&m.every((_,I)=>{const V=P.charAt(I);return typeof _=="string"?V===_:_.test(V)})){const _=yo(NO(P,g,new Date));return f(_),o==null?void 0:o(_)}return f(void 0),o==null?void 0:o(void 0)},S=E=>(f(E),o==null||o(E),w(E?Vk(E,g):"")),T=d==null?void 0:d.toISOString();return x.jsx(Li,{...s,mask:m,value:v,"data-value":T,"data-target":s.name,className:"uppercase",formNoValidate:!h,placeholder:g,onChange:y,required:s.required??!0,error:h?void 0:s.error,name:void 0,id:void 0,right:x.jsxs(b.Fragment,{children:[x.jsx("input",{"data-origin":s.name,hidden:!0,type:"date",id:s.name,ref:a,name:s.name,defaultValue:T}),x.jsx(Do,{open:h,restoreFocus:!0,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(TP,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(ny,{...s,locale:t,date:d,onChange:S,markToday:i,disabledDate:n,autoFocusToday:r})})]})})}),$_=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],R_=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],j_=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],B_=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Pv=(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 kv(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?B_:j_:t.binary?R_:$_,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=Pv(e,t.locale,s);return i+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,s||(e=e.toPrecision(3));const l=Pv(Number(e),t.locale,s),c=n[a];return i+l+r+c}var _u={exports:{}},va={exports:{}},Fe={};/** @license React v16.13.1
177
+ */var uA=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ra=uA.join(","),Fy=typeof Element>"u",Eo=Fy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,oa=!Fy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ia=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},dA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},fA=function(t,n,r){if(ia(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ra));return n&&Eo.call(t,ra)&&o.unshift(t),o=o.filter(r),o},hA=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!ia(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Eo.call(s,ra);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!ia(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var h=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},Ly=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Vy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||dA(t))&&!Ly(t)?0:t.tabIndex},pA=function(t,n){var r=Vy(t);return r<0&&n&&!Ly(t)?0:r},mA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},$y=function(t){return t.tagName==="INPUT"},gA=function(t){return $y(t)&&t.type==="hidden"},yA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},vA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},bA=function(t){if(!t.name)return!0;var n=t.form||oa(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=vA(o,t.form);return!i||i===t},wA=function(t){return $y(t)&&t.type==="radio"},xA=function(t){return wA(t)&&!bA(t)},SA=function(t){var n,r=t&&oa(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=oa(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},jy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},TA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Eo.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(Eo.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=oa(t);if(l&&!l.shadowRoot&&o(l)===!0)return jy(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(SA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return jy(t);return!1},EA=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 Eo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},CA=function(t,n){return!(n.disabled||ia(n)||gA(n)||TA(n,t)||yA(n)||EA(n))},yu=function(t,n){return!(xA(n)||Vy(n)<0||!CA(t,n))},PA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},kA=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=pA(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(mA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Fi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=hA([t],n.includeContainer,{filter:yu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:PA}):r=fA(t,n.includeContainer,yu.bind(null,n)),kA(r)},IA=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Eo.call(t,ra)===!1?!1:yu(n,t)};function Ry(e,t,n){let{reference:r,floating:o}=e;const i=_r(t),s=mu(t),a=pu(s),l=ar(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,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(To(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const OA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ry(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:y}=a[m],{x,y:g,data:T,reset:S}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=x??u,d=g??d,h={...h,[v]:{...h[v],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=Ry(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function vu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=So(t,e),p=Ny(h),v=a[f?d==="floating"?"reference":"floating":d],y=na(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},S=na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:g,strategy:l}):x);return{top:(y.top-S.top+p.top)/T.y,bottom:(S.bottom-y.bottom+p.bottom)/T.y,left:(y.left-S.left+p.left)/T.x,right:(S.right-y.right+p.right)/T.x}}const AA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=So(e,t)||{};if(c==null)return{};const d=Ny(u),f={x:n,y:r},h=mu(o),p=pu(h),m=await s.getDimensions(c),v=h==="y",y=v?"top":"left",x=v?"bottom":"right",g=v?"clientHeight":"clientWidth",T=i.reference[p]+i.reference[h]-f[h]-i.floating[p],S=f[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let O=E?E[g]:0;(!O||!await(s.isElement==null?void 0:s.isElement(E)))&&(O=a.floating[g]||i.floating[p]);const k=T/2-S/2,I=O/2-m[p]/2-1,C=wn(d[y],I),V=wn(d[x],I),D=C,L=O-m[p]-V,P=O/2-m[p]/2+k,_=hu(D,P,L),N=!l.arrow&&To(o)!=null&&P!==_&&i.reference[p]/2-(P<D?C:V)-m[p]/2<0,$=N?P<D?P-D:P-L:0;return{[h]:f[h]+$,data:{[h]:_,centerOffset:P-_-$,...N&&{alignmentOffset:$}},reset:N}}}),_A=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=So(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=ar(o),x=_r(a),g=ar(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(g||!m?[ta(a)]:sA(a)),E=p!=="none";!f&&E&&S.push(...lA(a,m,p,T));const O=[a,...S],k=await vu(t,v),I=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),d){const P=iA(o,s,T);I.push(k[P[0]],k[P[1]])}if(C=[...C,{placement:o,overflows:I}],!I.every(P=>P<=0)){var V,D;const P=(((V=i.flip)==null?void 0:V.index)||0)+1,_=O[P];if(_)return{data:{index:P,overflows:C},reset:{placement:_}};let N=(D=C.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:D.placement;if(!N)switch(h){case"bestFit":{var L;const $=(L=C.filter(z=>{if(E){const U=_r(z.placement);return U===x||U==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(U=>U>0).reduce((U,A)=>U+A,0)]).sort((z,U)=>z[1]-U[1])[0])==null?void 0:L[0];$&&(N=$);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function MA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ar(n),a=To(n),l=_r(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=So(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 DA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await MA(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},NA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...l}=So(e,t),c={x:n,y:r},u=await vu(t,l),d=_r(ar(o)),f=Dy(d);let h=c[f],p=c[d];if(i){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=h+u[v],g=h-u[y];h=hu(x,h,g)}if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=p+u[v],g=p-u[y];p=hu(x,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},FA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=So(e,t),l=await vu(t,a),c=ar(n),u=To(n),d=_r(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(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=h-l.top-l.bottom,y=f-l.left-l.right,x=wn(h-l[p],v),g=wn(f-l[m],y),T=!t.middlewareData.shift;let S=x,E=g;if(d?E=u||T?wn(g,y):y:S=u||T?wn(x,v):v,T&&!u){const k=qt(l.left,0),I=qt(l.right,0),C=qt(l.top,0),V=qt(l.bottom,0);d?E=f-2*(k!==0||I!==0?k+I:qt(l.left,l.right)):S=h-2*(C!==0||V!==0?C+V:qt(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:S});const O=await o.getDimensions(i.floating);return f!==O.width||h!==O.height?{reset:{rects:!0}}:{}}}};function By(e){const t=Yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ut(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ea(n)!==i||ea(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function bu(e){return ze(e)?e:e.contextElement}function Co(e){const t=bu(e);if(!ut(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=By(t);let s=(i?ea(n.width):n.width)/r,a=(i?ea(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const LA=sr(0);function zy(e){const t=Wt(e);return!iu()||!t.visualViewport?LA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=bu(e);let s=sr(1);t&&(r?ze(r)&&(s=Co(r)):s=Co(e));const a=VA(i,n,r)?zy(i):sr(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Wt(i),h=r&&ze(r)?Wt(r):r;let p=f,m=su(p);for(;m&&r&&h!==p;){const v=Co(m),y=m.getBoundingClientRect(),x=Yt(m),g=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,T=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=g,c+=T,p=Wt(m),m=su(p)}}return na({width:u,height:d,x:l,y:c})}function $A(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Fn(r),a=t?Qs(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),d=ut(r);if((d||!d&&!i)&&((rr(r)!=="body"||Di(s))&&(l=Js(r)),ut(r))){const f=Mr(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 jA(e){return Array.from(e.getClientRects())}function Wy(e){return Mr(Fn(e)).left+Js(e).scrollLeft}function RA(e){const t=Fn(e),n=Js(e),r=e.ownerDocument.body,o=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Wy(e);const a=-n.scrollTop;return Yt(r).direction==="rtl"&&(s+=qt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function BA(e,t){const n=Wt(e),r=Fn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=iu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function zA(e,t){const n=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ut(e)?Co(e):sr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Hy(e,t,n){let r;if(t==="viewport")r=BA(e,n);else if(t==="document")r=RA(Fn(e));else if(ze(t))r=zA(t,n);else{const o=zy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return na(r)}function Uy(e,t){const n=Ln(e);return n===t||!ze(n)||or(n)?!1:Yt(n).position==="fixed"||Uy(n,t)}function WA(e,t){const n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(a=>ze(a)&&rr(a)!=="body"),o=null;const i=Yt(e).position==="fixed";let s=i?Ln(e):e;for(;ze(s)&&!or(s);){const a=Yt(s),l=ou(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Di(s)&&!l&&Uy(e,s))?r=r.filter(u=>u!==s):o=a,s=Ln(s)}return t.set(e,r),r}function HA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Qs(t)?[]:WA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Hy(t,u,o);return c.top=qt(d.top,c.top),c.right=wn(d.right,c.right),c.bottom=wn(d.bottom,c.bottom),c.left=qt(d.left,c.left),c},Hy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function UA(e){const{width:t,height:n}=By(e);return{width:t,height:n}}function GA(e,t,n){const r=ut(t),o=Fn(t),i=n==="fixed",s=Mr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=sr(0);if(r||!r&&!i)if((rr(t)!=="body"||Di(o))&&(a=Js(t)),r){const d=Mr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=Wy(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function wu(e){return Yt(e).position==="static"}function Gy(e,t){return!ut(e)||Yt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Yy(e,t){const n=Wt(e);if(Qs(e))return n;if(!ut(e)){let o=Ln(e);for(;o&&!or(o);){if(ze(o)&&!wu(o))return o;o=Ln(o)}return n}let r=Gy(e,t);for(;r&&XO(r)&&wu(r);)r=Gy(r,t);return r&&or(r)&&wu(r)&&!ou(r)?n:r||QO(e)||n}const YA=async function(e){const t=this.getOffsetParent||Yy,n=this.getDimensions,r=await n(e.floating);return{reference:GA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qA(e){return Yt(e).direction==="rtl"}const KA={convertOffsetParentRelativeRectToViewportRelativeRect:$A,getDocumentElement:Fn,getClippingRect:HA,getOffsetParent:Yy,getElementRects:YA,getClientRects:jA,getDimensions:UA,getScale:Co,isElement:ze,isRTL:qA};function ZA(e,t){let n=null,r;const o=Fn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=xo(u),p=xo(o.clientWidth-(c+d)),m=xo(o.clientHeight-(u+f)),v=xo(c),x={rootMargin:-h+"px "+-p+"px "+-m+"px "+-v+"px",threshold:qt(0,wn(1,l))||1};let g=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!g)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return s(!0),i}function sa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=bu(e),u=o||i?[...c?ir(c):[],...ir(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?ZA(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.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?Mr(e):null;l&&v();function v(){const y=Mr(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const XA=DA,QA=NA,JA=_A,e_=FA,qy=AA,t_=(e,t,n)=>{const r=new Map,o={platform:KA,...n},i={...o.platform,_c:r};return OA(e,t,{...o,platform:i})};var aa=typeof document<"u"?b.useLayoutEffect:b.useEffect;function la(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!la(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!la(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zy(e,t){const n=Ky(e);return Math.round(t*n)/n}function Xy(e){const t=M.useRef(e);return aa(()=>{t.current=e}),t}function n_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=M.useState(r);la(f,r)||h(r);const[p,m]=M.useState(null),[v,y]=M.useState(null),x=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=M.useCallback($=>{$!==O.current&&(O.current=$,y($))},[]),T=i||p,S=s||v,E=M.useRef(null),O=M.useRef(null),k=M.useRef(u),I=l!=null,C=Xy(l),V=Xy(o),D=M.useCallback(()=>{if(!E.current||!O.current)return;const $={placement:t,strategy:n,middleware:f};V.current&&($.platform=V.current),t_(E.current,O.current,$).then(z=>{const U={...z,isPositioned:!0};L.current&&!la(k.current,U)&&(k.current=U,cf.flushSync(()=>{d(U)}))})},[f,t,n,V]);aa(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const L=M.useRef(!1);aa(()=>(L.current=!0,()=>{L.current=!1}),[]),aa(()=>{if(T&&(E.current=T),S&&(O.current=S),T&&S){if(C.current)return C.current(T,S,D);D()}},[T,S,D,C,I]);const P=M.useMemo(()=>({reference:E,floating:O,setReference:x,setFloating:g}),[x,g]),_=M.useMemo(()=>({reference:T,floating:S}),[T,S]),N=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!_.floating)return $;const z=Zy(_.floating,u.x),U=Zy(_.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+U+"px)",...Ky(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:U}},[n,a,_.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:D,refs:P,elements:_,floatingStyles:N}),[u,D,P,_,N])}const r_=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qy({element:r.current,padding:o}).fn(n):{}:r?qy({element:r,padding:o}).fn(n):{}}}},ca=(e,t)=>({...XA(e),options:[e,t]}),xu=(e,t)=>({...QA(e),options:[e,t]}),Su=(e,t)=>({...JA(e),options:[e,t]}),o_=(e,t)=>({...e_(e),options:[e,t]}),Qy=(e,t)=>({...r_(e),options:[e,t]});function Tu(e){return M.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Jy={...M},i_=Jy.useInsertionEffect||(e=>e());function Pt(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return i_(()=>{t.current=e}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Eu="ArrowUp",Li="ArrowDown",Po="ArrowLeft",ko="ArrowRight";function ua(e,t,n){return Math.floor(e/t)!==n}function Vi(e,t){return t<0||t>=e.current.length}function Cu(e,t){return Mt(e,{disabledIndices:t})}function ev(e,t){return Mt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Mt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const s=e.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&da(s,a,o));return a}function s_(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Eu){if(u&&Ct(n),c===-1)d=l;else if(d=Mt(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||d<0)){const f=c%i,h=l%i,p=l-(h-f);h===f?d=l:d=h>f?p:p-i}Vi(e,d)&&(d=c)}if(n.key===Li&&(u&&Ct(n),c===-1?d=a:(d=Mt(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(d=Mt(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Vi(e,d)&&(d=c)),r==="both"){const f=xo(c/i);n.key===ko&&(u&&Ct(n),c%i!==i-1?(d=Mt(e,{startingIndex:c,disabledIndices:s}),o&&ua(d,i,f)&&(d=Mt(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(d=Mt(e,{startingIndex:c-c%i-1,disabledIndices:s})),ua(d,i,f)&&(d=c)),n.key===Po&&(u&&Ct(n),c%i!==0?(d=Mt(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&ua(d,i,f)&&(d=Mt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(d=Mt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),ua(d,i,f)&&(d=c));const h=xo(l/i)===f;Vi(e,d)&&(o&&h?d=n.key===Po?l:Mt(e,{startingIndex:c-c%i-1,disabledIndices:s}):d=c)}return d}function a_(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let 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]=s}),c=!0):o++}}),[...r]}function l_(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function c_(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function da(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let tv=0;function lr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(tv);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():tv=requestAnimationFrame(i)}var Ae=typeof document<"u"?b.useLayoutEffect:b.useEffect;function u_(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 d_(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const nv=M.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function f_(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=M.useState(()=>new Map),s=M.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=M.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ae(()=>{const l=new Map(o);Array.from(l.keys()).sort(u_).forEach((u,d)=>{l.set(u,d)}),d_(o,l)||i(l)},[o]),M.createElement(nv.Provider,{value:M.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function rv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=M.useContext(nv),[a,l]=M.useState(null),c=M.useRef(null),u=M.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const h=t!==void 0;s.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,i,s,t]);return Ae(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ae(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),M.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Io(){return Io=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},Io.apply(this,arguments)}let ov=!1,h_=0;const iv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+h_++;function p_(){const[e,t]=M.useState(()=>ov?iv():void 0);return Ae(()=>{e==null&&t(iv())},[]),M.useEffect(()=>{ov=!0},[]),e}const Oo=Jy.useId||p_;let $i;process.env.NODE_ENV!=="production"&&($i=new Set);function fa(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=$i)!=null&&e.has(o))){var i;(i=$i)==null||i.add(o),console.warn(o)}}function m_(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=$i)!=null&&e.has(o))){var i;(i=$i)==null||i.add(o),console.error(o)}}const sv=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||fa("The `ref` prop is required for `FloatingArrow`."));const v=Oo(),[y,x]=M.useState(!1);if(Ae(()=>{if(!o)return;Yt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const g=c*2,T=g/2,S=s/2*(l/-8+1),E=a/2*l/4,[O,k]=r.split("-"),I=!!f,C=O==="top"||O==="bottom",V=u&&k==="end"?"bottom":"top";let D=u&&k==="end"?"right":"left";u&&y&&(D=k==="end"?"left":"right");const L=(i==null?void 0:i.x)!=null?u||i.x:"",P=(i==null?void 0:i.y)!=null?u||i.y:"",_=f||"M0,0"+(" H"+s)+(" L"+(s-S)+","+(a-E))+(" Q"+s/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)"}[O];return M.createElement("svg",Io({},m,{"aria-hidden":!0,ref:n,width:I?s:s+g,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[D]:L,[V]:P,[O]:C||I?"100%":"calc(100% - "+g/2+"px)",transform:""+N+(h??""),...p}}),g>0&&M.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:_}),M.createElement("path",{stroke:g&&!f?m.fill:"none",d:_}),M.createElement("clipPath",{id:v},M.createElement("rect",{x:-T,y:T*(I?-1:1),width:s+g,height:s})))});function av(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const lv=M.createContext(null),cv=M.createContext(null),cr=()=>{var e;return((e=M.useContext(lv))==null?void 0:e.id)||null},ur=()=>M.useContext(cv);function g_(e){const t=Oo(),n=ur(),o=cr();return Ae(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function y_(e){const{children:t,id:n}=e,r=cr();return M.createElement(lv.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function v_(e){const{children:t}=e,n=M.useRef([]),r=M.useCallback(s=>{n.current=[...n.current,s]},[]),o=M.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=M.useState(()=>av())[0];return M.createElement(cv.Provider,{value:M.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function dr(e){return"data-floating-ui-"+e}function kt(e){const t=b.useRef(e);return Ae(()=>{t.current=e}),t}const uv=dr("safe-polygon");function Pu(e,t,n){return n&&!Ni(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function dv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=ur(),p=cr(),m=kt(c),v=kt(l),y=kt(n),x=M.useRef(),g=M.useRef(-1),T=M.useRef(),S=M.useRef(-1),E=M.useRef(!0),O=M.useRef(!1),k=M.useRef(()=>{}),I=M.useCallback(()=>{var _;const N=(_=o.current.openEvent)==null?void 0:_.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function _(N){let{open:$}=N;$||(clearTimeout(g.current),clearTimeout(S.current),E.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[a,i]),M.useEffect(()=>{if(!a||!m.current||!n)return;function _($){I()&&r(!1,$,"hover")}const N=bt(s.floating).documentElement;return N.addEventListener("mouseleave",_),()=>{N.removeEventListener("mouseleave",_)}},[s.floating,n,r,a,m,I]);const C=M.useCallback(function(_,N,$){N===void 0&&(N=!0),$===void 0&&($="hover");const z=Pu(v.current,"close",x.current);z&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,_,$),z)):N&&(clearTimeout(g.current),r(!1,_,$))},[v,r]),V=Pt(()=>{k.current(),T.current=void 0}),D=Pt(()=>{if(O.current){const _=bt(s.floating).body;_.style.pointerEvents="",_.removeAttribute(uv),O.current=!1}});M.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(A){if(clearTimeout(g.current),E.current=!1,u&&!Ni(x.current)||d>0&&!Pu(v.current,"open"))return;const R=Pu(v.current,"open",x.current);R?g.current=window.setTimeout(()=>{y.current||r(!0,A,"hover")},R):r(!0,A,"hover")}function $(A){if(_())return;k.current();const R=bt(s.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:h,x:A.clientX,y:A.clientY,onClose(){D(),V(),C(A,!0,"safe-polygon")}});const ne=T.current;R.addEventListener("mousemove",ne),k.current=()=>{R.removeEventListener("mousemove",ne)};return}(x.current==="touch"?!dt(s.floating,A.relatedTarget):!0)&&C(A)}function z(A){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:A.clientX,y:A.clientY,onClose(){D(),V(),C(A)}})(A))}if(ze(s.domReference)){var U;const A=s.domReference;return n&&A.addEventListener("mouseleave",z),(U=s.floating)==null||U.addEventListener("mouseleave",z),f&&A.addEventListener("mousemove",N,{once:!0}),A.addEventListener("mouseenter",N),A.addEventListener("mouseleave",$),()=>{var R;n&&A.removeEventListener("mouseleave",z),(R=s.floating)==null||R.removeEventListener("mouseleave",z),f&&A.removeEventListener("mousemove",N),A.removeEventListener("mouseenter",N),A.removeEventListener("mouseleave",$)}}},[s,a,e,u,d,f,C,V,D,r,n,y,h,v,m,o]),Ae(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&I()){const $=bt(s.floating).body;$.setAttribute(uv,""),$.style.pointerEvents="none",O.current=!0;const z=s.floating;if(ze(s.domReference)&&z){var N;const U=s.domReference,A=h==null||(N=h.nodesRef.current.find(R=>R.id===p))==null||(N=N.context)==null?void 0:N.elements.floating;return A&&(A.style.pointerEvents=""),U.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{U.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,h,m,I]),Ae(()=>{n||(x.current=void 0,V(),D())},[n,V,D]),M.useEffect(()=>()=>{V(),clearTimeout(g.current),clearTimeout(S.current),D()},[a,s.domReference,V,D]);const L=M.useMemo(()=>{function _(N){x.current=N.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(N){const{nativeEvent:$}=N;function z(){!E.current&&!y.current&&r(!0,$,"hover")}u&&!Ni(x.current)||n||d===0||(clearTimeout(S.current),x.current==="touch"?z():S.current=window.setTimeout(z,d))}}},[u,r,n,y,d]),P=M.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(_){C(_.nativeEvent,!1)}}),[C]);return M.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function b_(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Dr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function w_(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),Dr(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let Ao=new WeakMap,ha=new WeakSet,pa={},ku=0;const x_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,fv=e=>e&&(e.host||fv(e.parentNode)),S_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function T_(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=S_(t,e),a=new Set,l=new Set(s),c=[];pa[o]||(pa[o]=new WeakMap);const u=pa[o];s.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(rr(p)!=="script")if(a.has(p))f(p);else{const m=i?p.getAttribute(i):null,v=m!==null&&m!=="false",y=(Ao.get(p)||0)+1,x=(u.get(p)||0)+1;Ao.set(p,y),u.set(p,x),c.push(p),y===1&&v&&ha.add(p),x===1&&p.setAttribute(o,""),!v&&i&&p.setAttribute(i,"true")}})}return ku++,()=>{c.forEach(h=>{const p=(Ao.get(h)||0)-1,m=(u.get(h)||0)-1;Ao.set(h,p),u.set(h,m),p||(!ha.has(h)&&i&&h.removeAttribute(i),ha.delete(h)),m||h.removeAttribute(o)}),ku--,ku||(Ao=new WeakMap,Ao=new WeakMap,ha=new WeakSet,pa={})}}function hv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=bt(e[0]).body;return T_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const _o=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pv(e,t){const n=Fi(e,_o());t==="prev"&&n.reverse();const r=n.indexOf(nn(bt(e)));return n.slice(r+1)[0]}function mv(){return pv(document.body,"next")}function gv(){return pv(document.body,"prev")}function ji(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!dt(n,r)}function E_(e){Fi(e,_o()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function C_(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 P_(e,t,n){const r=e.indexOf(t);function o(s){const a=dr("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||dt(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Iu={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let k_;function yv(e){e.key==="Tab"&&(e.target,clearTimeout(k_))}const ma=M.forwardRef(function(t,n){const[r,o]=M.useState();Ae(()=>(cu()&&o("button"),document.addEventListener("keydown",yv),()=>{document.removeEventListener("keydown",yv)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[dr("focus-guard")]:"",style:Iu};return M.createElement("span",Io({},t,i))}),vv=M.createContext(null),bv=dr("portal");function I_(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Oo(),o=wv(),[i,s]=M.useState(null),a=M.useRef(null);return Ae(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),Ae(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(bv,""),l.appendChild(c),a.current=c,s(c)},[t,r]),Ae(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!ze(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(bv,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function Mo(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=I_({id:n,root:r}),[s,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),f=!!s&&!s.modal&&s.open&&o&&!!(r||i);return M.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&ji(p)&&(p.type==="focusin"?C_:E_)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),M.createElement(vv.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&M.createElement(ma,{"data-type":"outside",ref:l,onFocus:h=>{if(ji(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=gv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),f&&i&&M.createElement("span",{"aria-owns":i.id,style:Iu}),i&&cf.createPortal(t,i),f&&i&&M.createElement(ma,{"data-type":"outside",ref:c,onFocus:h=>{if(ji(h,i)){var p;(p=d.current)==null||p.focus()}else{const m=mv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const wv=()=>M.useContext(vv),xv=20;let Nr=[];function Ou(e){Nr=Nr.filter(n=>n.isConnected);let t=e;if(!(!t||rr(t)==="body")){if(!IA(t,_o())){const n=Fi(t,_o())[0];n&&(t=n)}Nr.push(t),Nr.length>xv&&(Nr=Nr.slice(-xv))}}function Sv(){return Nr.slice().reverse().find(e=>e.isConnected)}const O_=M.forwardRef(function(t,n){return M.createElement("button",Io({},t,{type:"button",ref:n,tabIndex:-1,style:Iu}))});function Ri(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:v,dataRef:y,floatingId:x,elements:{domReference:g,floating:T}}=t,S=typeof s=="number"&&s<0,E=My(g)&&S,O=x_()?i:!0,k=kt(o),I=kt(s),C=kt(a),V=ur(),D=wv(),L=M.useRef(null),P=M.useRef(null),_=M.useRef(!1),N=M.useRef(!1),$=M.useRef(-1),z=D!=null,U=T==null?void 0:T.firstElementChild,A=(U==null?void 0:U.id)===x?U:T,R=Pt(function(G){return G===void 0&&(G=A),G?Fi(G,_o()):[]}),Z=Pt(G=>{const F=R(G);return k.current.map(B=>g&&B==="reference"?g:A&&B==="floating"?A:F).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function G(B){if(B.key==="Tab"){dt(A,nn(bt(A)))&&R().length===0&&!E&&Ct(B);const W=Z(),j=Vn(B);k.current[0]==="reference"&&j===g&&(Ct(B),B.shiftKey?lr(W[W.length-1]):lr(W[1])),k.current[1]==="floating"&&j===A&&B.shiftKey&&(Ct(B),lr(W[0]))}}const F=bt(A);return F.addEventListener("keydown",G),()=>{F.removeEventListener("keydown",G)}},[r,g,A,c,k,E,R,Z]),M.useEffect(()=>{if(r||!T)return;function G(F){const B=Vn(F),j=R().indexOf(B);j!==-1&&($.current=j)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,R]),M.useEffect(()=>{if(r||!d)return;function G(){N.current=!0,setTimeout(()=>{N.current=!1})}function F(B){const W=B.relatedTarget;queueMicrotask(()=>{const j=!(dt(g,W)||dt(T,W)||dt(W,T)||dt(D==null?void 0:D.portalNode,W)||W!=null&&W.hasAttribute(dr("focus-guard"))||V&&(Dr(V.nodesRef.current,p).find(Y=>{var se,H;return dt((se=Y.context)==null?void 0:se.elements.floating,W)||dt((H=Y.context)==null?void 0:H.elements.domReference,W)})||b_(V.nodesRef.current,p).find(Y=>{var se,H;return((se=Y.context)==null?void 0:se.elements.floating)===W||((H=Y.context)==null?void 0:H.elements.domReference)===W})));if(l&&j&&nn(bt(A))===bt(A).body){ut(A)&&(A==null||A.focus());const Y=$.current,se=R(),H=se[Y]||se[se.length-1]||A;ut(H)&&H.focus()}(E||!c)&&W&&j&&!N.current&&W!==Sv()&&(_.current=!0,m(!1,B))})}if(T&&ut(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,A,c,p,V,D,m,d,l,R,E]),M.useEffect(()=>{var G;if(r)return;const F=Array.from((D==null||(G=D.portalNode)==null?void 0:G.querySelectorAll("["+dr("portal")+"]"))||[]);if(T){const B=[T,...F,L.current,P.current,k.current.includes("reference")||E?g:null].filter(j=>j!=null),W=c||E?hv(B,O,!O):hv(B);return()=>{W()}}},[r,g,T,c,k,D,E,O]),Ae(()=>{if(r||!ut(A))return;const G=bt(A),F=nn(G);queueMicrotask(()=>{const B=Z(A),W=I.current,j=(typeof W=="number"?B[W]:W.current)||A,Y=dt(A,F);!S&&!Y&&f&&lr(j,{preventScroll:j===A})})},[r,f,A,S,Z,I]),Ae(()=>{if(r||!A)return;let G=!1;const F=bt(A),B=nn(F);let j=y.current.openEvent;const Y=h.domReference.current;Ou(B);function se(H){let{open:Pe,reason:it,event:Ue,nested:st}=H;Pe&&(j=Ue),it==="escape-key"&&h.domReference.current&&Ou(h.domReference.current),it==="hover"&&Ue.type==="mouseleave"&&(_.current=!0),it==="outside-press"&&(st?(_.current=!1,G=!0):_.current=!(Ay(Ue)||lu(Ue)))}return v.on("openchange",se),()=>{v.off("openchange",se);const H=nn(F),Pe=dt(T,H)||V&&Dr(V.nodesRef.current,p).some(de=>{var Ee;return dt((Ee=de.context)==null?void 0:Ee.elements.floating,H)});(Pe||j&&["click","mousedown"].includes(j.type))&&h.domReference.current&&Ou(h.domReference.current);const Ue=Y||B,st=Fi(bt(Ue).body,_o());queueMicrotask(()=>{let de=Sv();!de&&ut(Ue)&&T&&(de=P_(st,Ue,T)),C.current&&!_.current&&ut(de)&&(!(de!==H&&H!==F.body)||Pe)&&de.focus({preventScroll:G})})}},[r,T,A,C,y,h,v,V,p]),Ae(()=>{if(!r&&D)return D.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{D.setFocusManagerState(null)}},[r,D,c,f,m,h,d]),Ae(()=>{if(r||!A||typeof MutationObserver!="function"||S)return;const G=()=>{const B=A.getAttribute("tabindex"),W=R(),j=nn(bt(T)),Y=W.indexOf(j);Y!==-1&&($.current=Y),k.current.includes("floating")||j!==h.domReference.current&&W.length===0?B!=="0"&&A.setAttribute("tabindex","0"):B!=="-1"&&A.setAttribute("tabindex","-1")};G();const F=new MutationObserver(G);return F.observe(A,{childList:!0,subtree:!0,attributes:!0}),()=>{F.disconnect()}},[r,T,A,h,k,R,S]);function ne(G){return r||!u||!c?null:M.createElement(O_,{ref:G==="start"?L:P,onClick:F=>m(!1,F.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&O&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,Q&&M.createElement(ma,{"data-type":"inside",ref:D==null?void 0:D.beforeInsideRef,onFocus:G=>{if(c){const B=Z();lr(o[0]==="reference"?B[0]:B[B.length-1])}else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(_.current=!1,ji(G,D.portalNode)){const B=mv()||g;B==null||B.focus()}else{var F;(F=D.beforeOutsideRef.current)==null||F.focus()}}}),!E&&ne("start"),n,ne("end"),Q&&M.createElement(ma,{"data-type":"inside",ref:D==null?void 0:D.afterInsideRef,onFocus:G=>{if(c)lr(Z()[0]);else if(D!=null&&D.preserveTabOrder&&D.portalNode)if(d&&(_.current=!0),ji(G,D.portalNode)){const B=gv()||g;B==null||B.focus()}else{var F;(F=D.afterOutsideRef.current)==null||F.focus()}}}))}const Au=new Set,A_=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=Oo();return Ae(()=>{if(!r)return;Au.add(i);const s=/iP(hone|ad|od)|iOS/.test(au()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Au.delete(i),Au.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[i,r]),M.createElement("div",Io({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Tv(e){return ut(e.target)&&e.target.tagName==="BUTTON"}function Ev(e){return fu(e)}function ga(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=M.useRef(),f=M.useRef(!1),h=M.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Ni(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}Ni(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||Tv(p))&&(p.key===" "&&!Ev(i)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Tv(p)||Ev(i)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return M.useMemo(()=>s?{reference:h}:{},[s,h])}const __={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},M_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Cv=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 Do(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=ur(),v=Pt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?v:l,x=M.useRef(!1),g=M.useRef(!1),{escapeKey:T,outsidePress:S}=Cv(h),{escapeKey:E,outsidePress:O}=Cv(p),k=Pt(P=>{var _;if(!n||!s||!a||P.key!=="Escape")return;const N=(_=i.current.floatingContext)==null?void 0:_.nodeId,$=m?Dr(m.nodesRef.current,N):[];if(!T&&(P.stopPropagation(),$.length>0)){let z=!0;if($.forEach(U=>{var A;if((A=U.context)!=null&&A.open&&!U.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,eA(P)?P.nativeEvent:P,"escape-key")}),I=Pt(P=>{var _;const N=()=>{var $;k(P),($=Vn(P))==null||$.removeEventListener("keydown",N)};(_=Vn(P))==null||_.addEventListener("keydown",N)}),C=Pt(P=>{var _;const N=x.current;x.current=!1;const $=g.current;if(g.current=!1,c==="click"&&$||N||typeof y=="function"&&!y(P))return;const z=Vn(P),U="["+dr("inert")+"]",A=bt(o.floating).querySelectorAll(U);let R=ze(z)?z:null;for(;R&&!or(R);){const G=Ln(R);if(or(G)||!ze(G))break;R=G}if(A.length&&ze(z)&&!tA(z)&&!dt(z,o.floating)&&Array.from(A).every(G=>!dt(R,G)))return;if(ut(z)&&L){const G=z.clientWidth>0&&z.scrollWidth>z.clientWidth,F=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let B=F&&P.offsetX>z.clientWidth;if(F&&Yt(z).direction==="rtl"&&(B=P.offsetX<=z.offsetWidth-z.clientWidth),B||G&&P.offsetY>z.clientHeight)return}const Z=(_=i.current.floatingContext)==null?void 0:_.nodeId,ne=m&&Dr(m.nodesRef.current,Z).some(G=>{var F;return du(P,(F=G.context)==null?void 0:F.elements.floating)});if(du(P,o.floating)||du(P,o.domReference)||ne)return;const Q=m?Dr(m.nodesRef.current,Z):[];if(Q.length>0){let G=!0;if(Q.forEach(F=>{var B;if((B=F.context)!=null&&B.open&&!F.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),V=Pt(P=>{var _;const N=()=>{var $;C(P),($=Vn(P))==null||$.removeEventListener(c,N)};(_=Vn(P))==null||_.addEventListener(c,N)});M.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=S;function P($){r(!1,$,"ancestor-scroll")}const _=bt(o.floating);a&&_.addEventListener("keydown",E?I:k,E),y&&_.addEventListener(c,O?V:C,O);let N=[];return f&&(ze(o.domReference)&&(N=ir(o.domReference)),ze(o.floating)&&(N=N.concat(ir(o.floating))),!ze(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(ir(o.reference.contextElement)))),N=N.filter($=>{var z;return $!==((z=_.defaultView)==null?void 0:z.visualViewport)}),N.forEach($=>{$.addEventListener("scroll",P,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",E?I:k,E),y&&_.removeEventListener(c,O?V:C,O),N.forEach($=>{$.removeEventListener("scroll",P)})}},[i,o,a,y,c,n,r,f,s,T,S,k,E,I,C,O,V]),M.useEffect(()=>{x.current=!1},[y,c]);const D=M.useMemo(()=>({onKeyDown:k,[__[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[k,r,u,d]),L=M.useMemo(()=>({onKeyDown:k,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[M_[c]]:()=>{x.current=!0}}),[k,c]);return M.useMemo(()=>s?{reference:D,floating:L}:{},[s,D,L])}function D_(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Oo(),i=M.useRef({}),[s]=M.useState(()=>av()),a=cr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!ze(h)&&m_("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=M.useState(r.reference),u=Pt((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=M.useMemo(()=>({setPositionReference:c}),[]),f=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function No(e){e===void 0&&(e={});const{nodeId:t}=e,n=D_({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||i,d=M.useRef(null),f=ur();Ae(()=>{u&&(d.current=u)},[u]);const h=n_({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(g=>{const T=ze(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=M.useCallback(g=>{(ze(g)||g===null)&&(d.current=g,s(g)),(ze(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!ze(g))&&h.refs.setReference(g)},[h.refs]),v=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),y=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=M.useMemo(()=>({...h,...r,refs:v,elements:y,nodeId:t}),[h,v,y,t,r]);return Ae(()=>{r.dataRef.current.floatingContext=x;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=x)}),M.useMemo(()=>({...h,context:x,refs:v,elements:y}),[h,v,y,x])}function N_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),d=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=Wt(s.domReference);function p(){!n&&ut(s.domReference)&&s.domReference===nn(bt(s.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)}},[s.domReference,n,a]),M.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]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=M.useMemo(()=>({onPointerDown(h){lu(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Vn(h.nativeEvent);if(l&&ze(p))try{if(cu()&&_y())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!fu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,v=ze(p)&&p.hasAttribute(dr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=nn(s.domReference?s.domReference.ownerDocument:document);!p&&x===s.domReference||dt((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,x)||dt(s.domReference,x)||v||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return M.useMemo(()=>a?{reference:f}:{},[a,f])}const Pv="active",kv="selected";function _u(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Pv]:s,[kv]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Pv,kv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(v=>v(...p)).find(v=>v!==void 0)}}}else s[c]=u}),s),{})}}function Fo(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>_u(a,e,"reference"),t),i=M.useCallback(a=>_u(a,e,"floating"),n),s=M.useCallback(a=>_u(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let Iv=!1;function ya(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ov(e,t){return ya(t,e===Eu||e===Li,e===Po||e===ko)}function Mu(e,t,n){return ya(t,e===Li,n?e===Po:e===ko)||e==="Enter"||e===" "||e===""}function F_(e,t,n){return ya(t,n?e===Po:e===ko,e===Li)}function Av(e,t,n){return ya(t,n?e===ko:e===Po,e===Eu)}function _v(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:O,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 I=cr(),C=ur(),V=Pt(a),D=M.useRef(m),L=M.useRef(c??-1),P=M.useRef(null),_=M.useRef(!0),N=M.useRef(V),$=M.useRef(!!o.floating),z=M.useRef(n),U=M.useRef(!1),A=M.useRef(!1),R=kt(x),Z=kt(n),ne=kt(S),Q=kt(o.floating),G=kt(c),[F,B]=M.useState(),[W,j]=M.useState(),Y=Pt(function(de,Ee,ce){ce===void 0&&(ce=!1);function Ie(Oe){p?(B(Oe.id),C==null||C.events.emit("virtualfocus",Oe),E&&(E.current=Oe)):lr(Oe,{preventScroll:!0,sync:_y()&&cu()?Iv||U.current:!1})}const ht=de.current[Ee.current];ht&&Ie(ht),requestAnimationFrame(()=>{const Oe=de.current[Ee.current]||ht;if(!Oe)return;ht||Ie(Oe);const pt=ne.current;pt&&H&&(ce||!_.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof pt=="boolean"?{block:"nearest",inline:"nearest"}:pt))})});Ae(()=>{document.createElement("div").focus({get preventScroll(){return Iv=!0,!1}})},[]),Ae(()=>{l&&(n&&o.floating?D.current&&c!=null&&(A.current=!0,L.current=c,V(c)):$.current&&(L.current=-1,N.current(null)))},[l,n,o.floating,c,V]),Ae(()=>{if(l&&n&&o.floating)if(s==null){if(U.current=!1,G.current!=null)return;if($.current&&(L.current=-1,Y(i,L)),(!z.current||!$.current)&&D.current&&(P.current!=null||D.current===!0&&P.current==null)){let de=0;const Ee=()=>{i.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(Ee),de++):(L.current=P.current==null||Mu(P.current,g,h)||f?Cu(i,R.current):ev(i,R.current),P.current=null,V(L.current))};Ee()}}else Vi(i,s)||(L.current=s,Y(i,L,A.current),A.current=!1)},[l,n,o.floating,s,G,f,i,g,h,V,Y,R]),Ae(()=>{var de;if(!l||o.floating||!C||p||!$.current)return;const Ee=C.nodesRef.current,ce=(de=Ee.find(Oe=>Oe.id===I))==null||(de=de.context)==null?void 0:de.elements.floating,Ie=nn(bt(o.floating)),ht=Ee.some(Oe=>Oe.context&&dt(Oe.context.elements.floating,Ie));ce&&!ht&&_.current&&ce.focus({preventScroll:!0})},[l,o.floating,C,I,p]),Ae(()=>{if(!l||!C||!p||I)return;function de(Ee){j(Ee.id),E&&(E.current=Ee)}return C.events.on("virtualfocus",de),()=>{C.events.off("virtualfocus",de)}},[l,C,p,I,E]),Ae(()=>{N.current=V,$.current=!!o.floating}),Ae(()=>{n||(P.current=null)},[n]),Ae(()=>{z.current=n},[n]);const se=s!=null,H=M.useMemo(()=>{function de(ce){if(!n)return;const Ie=i.current.indexOf(ce);Ie!==-1&&V(Ie)}return{onFocus(ce){let{currentTarget:Ie}=ce;de(Ie)},onClick:ce=>{let{currentTarget:Ie}=ce;return Ie.focus({preventScroll:!0})},...v&&{onMouseMove(ce){let{currentTarget:Ie}=ce;de(Ie)},onPointerLeave(ce){let{pointerType:Ie}=ce;!_.current||Ie==="touch"||(L.current=-1,Y(i,L),V(null),p||lr(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,v,i,V,p]),Pe=Pt(de=>{if(_.current=!1,U.current=!0,!Z.current&&de.currentTarget===Q.current)return;if(f&&Av(de.key,g,h)){Ct(de),r(!1,de.nativeEvent,"list-navigation"),ut(o.domReference)&&!p&&o.domReference.focus();return}const Ee=L.current,ce=Cu(i,x),Ie=ev(i,x);if(de.key==="Home"&&(Ct(de),L.current=ce,V(L.current)),de.key==="End"&&(Ct(de),L.current=Ie,V(L.current)),T>1){const ht=O||Array.from({length:i.current.length},()=>({width:1,height:1})),Oe=a_(ht,T,k),pt=Oe.findIndex(ae=>ae!=null&&!da(i.current,ae,x)),J=Oe.reduce((ae,_e,Xe)=>_e!=null&&!da(i.current,_e,x)?Xe:ae,-1);if(L.current=Oe[s_({current:Oe.map(ae=>ae!=null?i.current[ae]:null)},{event:de,orientation:g,loop:d,cols:T,disabledIndices:c_([...x||i.current.map((ae,_e)=>da(i.current,_e)?_e:void 0),void 0],Oe),minIndex:pt,maxIndex:J,prevIndex:l_(L.current>Ie?ce:L.current,ht,Oe,T,de.key===Li?"bl":de.key===ko?"tr":"tl"),stopEvent:!0})],V(L.current),g==="both")return}if(Ov(de.key,g)){if(Ct(de),n&&!p&&nn(de.currentTarget.ownerDocument)===de.currentTarget){L.current=Mu(de.key,g,h)?ce:Ie,V(L.current);return}Mu(de.key,g,h)?d?L.current=Ee>=Ie?u&&Ee!==i.current.length?-1:ce:Mt(i,{startingIndex:Ee,disabledIndices:x}):L.current=Math.min(Ie,Mt(i,{startingIndex:Ee,disabledIndices:x})):d?L.current=Ee<=ce?u&&Ee!==-1?i.current.length:Ie:Mt(i,{startingIndex:Ee,decrement:!0,disabledIndices:x}):L.current=Math.max(ce,Mt(i,{startingIndex:Ee,decrement:!0,disabledIndices:x})),Vi(i,L.current)?V(null):V(L.current)}}),it=M.useMemo(()=>p&&n&&se&&{"aria-activedescendant":W||F},[p,n,se,W,F]),Ue=M.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!My(o.domReference)&&it,onKeyDown:Pe,onPointerMove(){_.current=!0}}),[it,Pe,o.domReference,g]),st=M.useMemo(()=>{function de(ce){m==="auto"&&Ay(ce.nativeEvent)&&(D.current=!0)}function Ee(ce){D.current=m,m==="auto"&&lu(ce.nativeEvent)&&(D.current=!0)}return{...it,onKeyDown(ce){_.current=!1;const Ie=ce.key.indexOf("Arrow")===0,ht=F_(ce.key,g,h),Oe=Av(ce.key,g,h),pt=Ov(ce.key,g),J=(f?ht:pt)||ce.key==="Enter"||ce.key.trim()==="";if(p&&n){const It=C==null?void 0:C.nodesRef.current.find($t=>$t.parentId==null),Ft=C&&It?w_(C.nodesRef.current,It.id):null;if(Ie&&Ft&&E){const $t=new KeyboardEvent("keydown",{key:ce.key,bubbles:!0});if(ht||Oe){var ae,_e;const Ur=((ae=Ft.context)==null?void 0:ae.elements.domReference)===ce.currentTarget,ei=Oe&&!Ur?(_e=Ft.context)==null?void 0:_e.elements.domReference:ht?i.current.find(ti=>(ti==null?void 0:ti.id)===F):null;ei&&(Ct(ce),ei.dispatchEvent($t),j(void 0))}if(pt&&Ft.context&&Ft.context.open&&Ft.parentId&&ce.currentTarget!==Ft.context.elements.domReference){var Xe;Ct(ce),(Xe=Ft.context.elements.domReference)==null||Xe.dispatchEvent($t);return}}return Pe(ce)}if(!(!n&&!y&&Ie)){if(J&&(P.current=f&&pt?null:ce.key),f){ht&&(Ct(ce),n?(L.current=Cu(i,R.current),V(L.current)):r(!0,ce.nativeEvent,"list-navigation"));return}pt&&(c!=null&&(L.current=c),Ct(ce),!n&&y?r(!0,ce.nativeEvent,"list-navigation"):Pe(ce),n&&V(L.current))}},onFocus(){n&&!p&&V(null)},onPointerDown:Ee,onMouseDown:de,onClick:de}},[F,it,Pe,R,m,i,f,V,r,n,y,g,h,c,C,p,E]);return M.useMemo(()=>l?{reference:st,floating:Ue,item:H}:{},[l,st,Ue,H])}const L_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Lo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=L_.get(s))!=null?n:s,l=Oo(),u=cr()!=null,d=M.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),f=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=M.useCallback(p=>{let{active:m,selected:v}=p;const y={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...y,"aria-selected":m&&v};case"combobox":return{...y,...m&&{"aria-selected":!0}}}return{}},[o,s]);return M.useMemo(()=>i?{reference:d,floating:f,item:h}:{},[i,d,f,h])}const Mv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Vo(e,t){return typeof e=="function"?e(t):e}function V_(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function $_(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=V_(n,s);return!c&&a==="close"&&l("unmounted"),Ae(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function j_(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[h,p]=M.useState(()=>({...Vo(i,c),...Vo(n,c)})),{isMounted:m,status:v}=$_(e,{duration:s}),y=kt(n),x=kt(r),g=kt(o),T=kt(i);return Ae(()=>{const S=Vo(y.current,c),E=Vo(g.current,c),O=Vo(T.current,c),k=Vo(x.current,c)||Object.keys(S).reduce((I,C)=>(I[C]="",I),{});if(v==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...O,...S})),v==="open"&&p({transitionProperty:Object.keys(k).map(Mv).join(","),transitionDuration:d+"ms",...O,...k}),v==="close"){const I=E||S;p({transitionProperty:Object.keys(I).map(Mv).join(","),transitionDuration:f+"ms",...O,...I})}},[f,g,y,x,T,d,v,c]),{isMounted:m,styles:h}}function R_(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=M.useRef(),m=M.useRef(""),v=M.useRef((n=h??s)!=null?n:-1),y=M.useRef(null),x=Pt(a),g=Pt(l),T=kt(u),S=kt(f);Ae(()=>{r&&(clearTimeout(p.current),y.current=null,m.current="")},[r]),Ae(()=>{if(r&&m.current===""){var C;v.current=(C=h??s)!=null?C:-1}},[r,h,s]);const E=Pt(C=>{C?o.current.typing||(o.current.typing=C,g(C)):o.current.typing&&(o.current.typing=C,g(C))}),O=Pt(C=>{function V(N,$,z){const U=T.current?T.current($,z):$.find(A=>(A==null?void 0:A.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return U?N.indexOf(U):-1}const D=i.current;if(m.current.length>0&&m.current[0]!==" "&&(V(D,D,m.current)===-1?E(!1):C.key===" "&&Ct(C)),D==null||S.current.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&(Ct(C),E(!0)),D.every(N=>{var $,z;return N?(($=N[0])==null?void 0:$.toLocaleLowerCase())!==((z=N[1])==null?void 0:z.toLocaleLowerCase()):!0})&&m.current===C.key&&(m.current="",v.current=y.current),m.current+=C.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=y.current,E(!1)},d);const P=v.current,_=V(D,[...D.slice((P||0)+1),...D.slice(0,(P||0)+1)],m.current);_!==-1?(x(_),y.current=_):C.key!==" "&&(m.current="",E(!1))}),k=M.useMemo(()=>({onKeyDown:O}),[O]),I=M.useMemo(()=>({onKeyDown:O,onKeyUp(C){C.key===" "&&E(!1)}}),[O,E]);return M.useMemo(()=>c?{reference:k,floating:I}:{},[c,k,I])}function Dv(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function B_(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function z_(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(s===null||a===null||p===0)return s=d,a=f,l=h,null;const m=d-s,v=f-a,x=Math.sqrt(m*m+v*v)/p;return s=d,a=f,l=h,x}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:v,nodeId:y,tree:x}=d;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:O}=T,k=[E,O],I=Vn(T),C=T.type==="mouseleave",V=dt(m.floating,I),D=dt(m.domReference,I),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),_=p.split("-")[0],N=f>P.right-P.width/2,$=h>P.bottom-P.height/2,z=B_(k,L),U=P.width>L.width,A=P.height>L.height,R=(U?L:P).left,Z=(U?L:P).right,ne=(A?L:P).top,Q=(A?L:P).bottom;if(V&&(i=!0,!C))return;if(D&&(i=!1),D&&!C){i=!0;return}if(C&&ze(T.relatedTarget)&&dt(m.floating,T.relatedTarget)||x&&Dr(x.nodesRef.current,y).some(B=>{let{context:W}=B;return W==null?void 0:W.open}))return;if(_==="top"&&h>=L.bottom-1||_==="bottom"&&h<=L.top+1||_==="left"&&f>=L.right-1||_==="right"&&f<=L.left+1)return S();let G=[];switch(_){case"top":G=[[R,L.top+1],[R,P.bottom-1],[Z,P.bottom-1],[Z,L.top+1]];break;case"bottom":G=[[R,P.top+1],[R,L.bottom-1],[Z,L.bottom-1],[Z,P.top+1]];break;case"left":G=[[P.right-1,Q],[P.right-1,ne],[L.left+1,ne],[L.left+1,Q]];break;case"right":G=[[L.right-1,Q],[L.right-1,ne],[P.left+1,ne],[P.left+1,Q]];break}function F(B){let[W,j]=B;switch(_){case"top":{const Y=[U?W+t/2:N?W+t*4:W-t*4,j+t+1],se=[U?W-t/2:N?W+t*4:W-t*4,j+t+1],H=[[P.left,N||U?P.bottom-t:P.top],[P.right,N?U?P.bottom-t:P.top:P.bottom-t]];return[Y,se,...H]}case"bottom":{const Y=[U?W+t/2:N?W+t*4:W-t*4,j-t],se=[U?W-t/2:N?W+t*4:W-t*4,j-t],H=[[P.left,N||U?P.top+t:P.bottom],[P.right,N?U?P.top+t:P.bottom:P.top+t]];return[Y,se,...H]}case"left":{const Y=[W+t+1,A?j+t/2:$?j+t*4:j-t*4],se=[W+t+1,A?j-t/2:$?j+t*4:j-t*4];return[...[[$||A?P.right-t:P.left,P.top],[$?A?P.right-t:P.left:P.right-t,P.bottom]],Y,se]}case"right":{const Y=[W-t,A?j+t/2:$?j+t*4:j-t*4],se=[W-t,A?j-t/2:$?j+t*4:j-t*4],H=[[$||A?P.left+t:P.right,P.top],[$?A?P.left+t:P.right:P.left+t,P.bottom]];return[Y,se,...H]}}}if(!Dv([E,O],G)){if(i&&!z)return S();if(!C&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}Dv([E,O],F([f,h]))?!i&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}function W_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function H_(...e){return t=>e.forEach(n=>W_(n,t))}var Du=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),i=o.find(G_);if(i){const s=i.props.children,a=o.map(l=>l===i?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return w.jsx(Nu,{...r,ref:t,children:M.isValidElement(s)?M.cloneElement(s,void 0,a):null})}return w.jsx(Nu,{...r,ref:t,children:n})});Du.displayName="Slot";var Nu=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=q_(n);return M.cloneElement(n,{...Y_(r,n.props),ref:t?H_(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});Nu.displayName="SlotClone";var U_=({children:e})=>w.jsx(w.Fragment,{children:e});function G_(e){return M.isValidElement(e)&&e.type===U_}function Y_(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function q_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const K_=(e,t)=>Xs()?t:window.matchMedia(e).matches,Z_=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(K_(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},rn="600ms",X_={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:rn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:rn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:rn}},Q_={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:rn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:rn}},Fu={drawer:e=>e==="left"?X_:Q_,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:rn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:rn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:rn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:rn},enter:{opacity:1,scale:[1.05,1],animationDuration:rn},exit:{opacity:0,scale:.97,animationDuration:rn}}},J_=ni("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"}}),eM={top:0,left:0,right:0,bottom:-1},tM=e=>e*.62,nM=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=tM(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.jsx(Tt.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:eM,whileDrag:{cursor:"grabbing"},className:Be("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Lu={drawer:"right",sheet:"none",dialog:"none"},Nv=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),l=Z_("(min-width: 48rem)"),c=e!=="dialog",u=l?e==="drawer"?i.position:Lu[e]:r?Lu[e]:Lu.sheet,d=l||r?Fu[e]:Fu.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=No({open:i.open,onOpenChange:i.onChange}),v=ga(m),y=Lo(m),x=Do(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:g,getFloatingProps:T}=Fo([v,y,x]),S=i.trigger,E=po(void 0),O=()=>i.onChange(!1);return w.jsxs(b.Fragment,{children:[i.trigger?w.jsx(b.Fragment,{children:i.asChild?w.jsx(Du,{ref:p.setReference,...g({layoutId:i.layoutId}),children:S}):w.jsx(Tt.button,{ref:p.setReference,...g(),layoutId:i.layoutId,type:"button",children:S})}):null,w.jsx(Mo,{children:w.jsx(ki,{presenceAffectsLayout:!0,children:i.open?w.jsx(A_,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:w.jsx(Ri,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(Tt.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:J_({position:u,type:h}),exit:"exit",layoutId:i.layoutId,initial:"initial",ref:p.setFloating,style:h==="drawer"?{width:E}:{height:E},variants:f,...T(),children:[i.title?w.jsx("header",{className:"relative w-full",children:i.title?w.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i.children}),i.footer?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:O,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(wg,{})})}):null,c&&t?w.jsx(nM,{onChange:i.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})}):null})})]})},Fv=b.createContext(""),rM=e=>{var o;const[t,n]=b.useState(!1),r=e.items.find(i=>i.props.id===e.active);return w.jsxs("div",{className:"my-4 flex min-w-full px-8 text-center lg:hidden",children:[w.jsx(qn,{className:"min-w-full",onClick:()=>n(!0),children:(o=r==null?void 0:r.props)==null?void 0:o.title}),w.jsx(Nv,{closable:!0,onChange:n,open:t,type:"dialog",children:w.jsx("ul",{className:"mt-4 space-y-4",children:e.items.map(i=>{const s=i.props,a=()=>{e.setActive(s.id),n(!1)};return w.jsx("li",{className:"min-w-full",children:w.jsx(qn,{className:"w-full",onClick:a,theme:s.id===e.active?"primary":"secondary",children:s.title})},s.id)})})})]})},oM=e=>{const[t,n]=Py(e.active),r=po(0),o=po(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=i.current;if(u===null)return;const d=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},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=ZO(e.onChange);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=b.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(Fv.Provider,{value:t,children:w.jsx(Cy,{container:"pt-0",className:e.className,header:w.jsxs("header",{ref:i,className:"relative mb-2 border-b border-card-border",children:[w.jsx(Tt.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"absolute bottom-0 hidden h-0.5 w-28 bg-primary transition-all duration-300 lg:block"}),w.jsxs("nav",{children:[w.jsx(rM,{setActive:n,items:l,active:t}),w.jsx("ul",{className:"hidden justify-between divide-x divide-card-border overflow-x-auto md:justify-start lg:flex",children:l.map(u=>{const d=u.props;return w.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full data-[active=true]:text-primary md:w-auto",children:w.jsx(s,{"data-id":d.id,onClick:c,"aria-current":"page",className:"block w-full whitespace-nowrap px-10 py-4 font-medium",href:e.useHash?`#${d.id}`:void 0,children:d.title})},`tab-header-${d.id}`)})})]})]}),children:e.children})})},iM=()=>b.useContext(Fv),sM=e=>{const t=iM();return w.jsx(b.Fragment,{children:e.id===t?e.children:null})},$o=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[ca(10),Su({fallbackAxisSideDirection:"end"}),xu(),Qy({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=No({open:n,middleware:i,transform:!0,whileElementsMounted:sa,onOpenChange:(p,m)=>{var y;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(y=e.onChange)==null||y.call(e,p))}}),c=ga(l),u=Do(l),d=Lo(l),{getReferenceProps:f,getFloatingProps:h}=Fo([c,u,d]);return w.jsxs(b.Fragment,{children:[w.jsx("button",{ref:s.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(Mo,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(Ri,{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:s.setFloating,style:a,"aria-labelledby":t,...h(),children:[w.jsx(sv,{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]})})})]})},Lv=300,Vv=({children:e,placement:t,enabled:n,as:r,title:o,...i})=>{const[s,a]=b.useState(!1),l=b.useRef(null),c=r||"span",{refs:u,floatingStyles:d,context:f}=No({open:s,placement:t,transform:!0,onOpenChange:a,whileElementsMounted:sa,middleware:[ca(5),Su({fallbackAxisSideDirection:"start"}),xu(),Qy({element:l,padding:5})]}),h=dv(f,{move:!0,enabled:n,delay:{open:Lv}}),p=N_(f,{enabled:n}),m=Do(f,{enabled:n}),v=Lo(f,{role:"tooltip",enabled:n}),{getReferenceProps:y,getFloatingProps:x}=Fo([h,p,m,v]);return w.jsxs(b.Fragment,{children:[w.jsx(c,{ref:u.setReference,...y(i),children:o}),w.jsx(Mo,{children:s&&w.jsxs(to,{...x(),ref:u.setFloating,style:d,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(sv,{ref:l,context:f,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class va{static getDescendantProperty(t,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=t[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)va.getDescendantProperty(a[l],i,r);else i&&va.getDescendantProperty(a,i,r)}else r.push(t);return r}}class jo{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=jo.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=va.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=jo.isMatch(s[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=jo.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return jo.indexesOfFirstLetter(t,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const $v=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>w.jsxs("div",{className:Be("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[i,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx(Vv,{title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(bg,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?w.jsxs(b.Fragment,{children:[w.jsx(vg,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),w.jsx(ek,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ba=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,placeholder:m,hideLeft:v,required:y})=>{const x=d??h,g=zt(),T=e??g.inputOptionalLabel;return w.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:Be("group inline-flex w-full gap-1.5",r),children:[w.jsxs("label",{form:u,htmlFor:x,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-hover:border-primary group-error:text-danger",children:[!v&&!n?w.jsx($v,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:m,children:T||n?w.jsxs(b.Fragment,{children:[y?null:w.jsx("span",{className:"text-opacity-70",children:T}),n?w.jsx(b.Fragment,{children:n}):null]}):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-focus-within:border-primary group-hover:border-primary group-error:border-danger ${f} focus:ring-2 focus:ring-inset focus:ring-primary`,children:[t?w.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?w.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:s}):null]})]}),w.jsx("p",{className:"hidden text-xs empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:block group-error:block group-error:text-danger",children:c}),w.jsx("p",{className:"text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},jv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>w.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[r.label??r.value,t?w.jsx("span",{children:w.jsx(XP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})),aM={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},lM={caseSensitive:!1,sort:!1},cM=[],uM=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:f=!1,...h},p)=>{const m=zt(),v=b.useRef(null),[y,x]=b.useState(!1),[g,T]=b.useState(""),[S,E]=b.useState(h.value??h.defaultValue??""),[O,k]=b.useState(h.value??h.defaultValue??""),[I,C]=b.useState(null),V=b.useRef(cM),D=t&&g!==""?[{value:g,label:g,"data-dynamic":"true"},...e]:e,L=new jo(D,["value","label"],lM).search(g),P=t?void 0:`^(${e.map(j=>`${tu(j.value)}${j.label?"|"+tu(j.label):""}`).join("|")})$`;b.useEffect(()=>{const j=z.reference.current;if(j)return Ss(j)},[]),b.useEffect(()=>{if(h.value){const j=e.find(Y=>Y.value===h.value);E((j==null?void 0:j.label)??h.value)}},[h.value]);const{x:_,y:N,strategy:$,refs:z,context:U}=No({open:y,transform:!0,onOpenChange:x,whileElementsMounted:sa,middleware:[ca(4),o_({padding:10,apply(j){Object.assign(j.elements.floating.style,{width:`${j.rects.reference.width}px`,maxHeight:`${Math.min(480,j.availableHeight)}px`})}})]}),A=j_(U,aM),{getReferenceProps:R,getFloatingProps:Z,getItemProps:ne}=Fo([Lo(U,{role:"listbox"}),Do(U),_v(U,{activeIndex:I,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:V,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:I,virtual:!0,onNavigate:j=>C(Y=>j??Y)})]),Q=(j,Y)=>{var H,Pe;E(j.value),(H=z.reference.current)==null||H.setAttribute("data-value",j.value),k(j.label??"");const se=xs(v.current,j.value);se&&((Pe=h.onChange)==null||Pe.call(h,se)),x(!1),T(""),C(Y)},G=j=>{var se;const Y=j.target.value;return T(Y),!y&&Y===""?x(!0):(j.target.name=h.name||"",Y?x(!0):(se=h.onChange)==null?void 0:se.call(h,j))},F=()=>{x(!0),T("")},B=()=>{var j;T(""),E(""),(j=z.reference.current)==null||j.setAttribute("data-value",""),k(""),xs(z.reference.current),x(!1)},W=h.id||h.name;return w.jsxs(ba,{...h,container:Be("group inline-block w-full",a),error:d,feedback:n,form:h.form,hideLeft:l,id:h.name||h.id,interactive:o,labelClassName:r,left:u,name:h.name,optionalText:s,placeholder:h.placeholder,required:f,rightLabel:i,title:h.title,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[w.jsx(yg,{size:20}),w.jsx("span",{className:"sr-only",children:m.inputCaretDown})]}),S?w.jsx("button",{type:"button",onClick:B,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[w.jsx("input",{...R({...h,onChange:G,onFocus:F,pattern:P,ref:z.setReference,name:`${W}-shadow`,id:`${W}-shadow`,onClick:j=>j.currentTarget.focus(),onKeyDown(j){if(j.key==="Escape")return j.currentTarget.blur(),x(!1);if(j.key==="Enter"){if(I!==null&&L[I])return j.preventDefault(),Q(L[I],I);if(L.length===1)return j.preventDefault(),Q(L[0],0)}}}),"data-value":S,"data-error":!!d,"data-name":W,"data-target":W,required:f,value:y?g:O||S,"aria-autocomplete":"list",autoComplete:"off",className:Be("input placeholder-input-mask group h-10 w-full flex-1 rounded-md bg-transparent px-2 py-1 text-base text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",c||g?"pe-12":"",u?"ps-8":"",h.className)}),w.jsx("input",{id:W,name:W,type:"hidden","data-origin":W,ref:p,required:f,defaultValue:h.value||S||void 0}),w.jsx(Mo,{preserveTabOrder:!0,children:y?w.jsx(Ri,{guards:!0,returnFocus:!1,context:U,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsx("ul",{...Z({ref:z.setFloating,style:{position:$,left:_??0,top:N??0,...A.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:L.map((j,Y)=>b.createElement(jv,{...ne({onClick:()=>Q(j,Y),ref:se=>void(V.current[Y]=se),selected:I===Y,active:S===j.value}),key:`${j.value}-option`,option:j,selected:I===Y,active:S===j.value}))})}):null})]})}),Rv=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:s,...a},l)=>w.jsxs("label",{"data-task":t,"data-disabled":a.disabled,"aria-disabled":a.disabled,className:Be("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[w.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Be("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,w.jsx("span",{"data-name":"checkbox-label",className:Be("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),dM=e=>{const[t,n]=jP();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:HP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,ref:t})},Bi=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,...h},p)=>{const m=h.id??h.name,v=b.useRef(null);return b.useEffect(()=>{if(v.current===null)return;const y=v.current,x=Ss(v.current),g=T=>{const S=T;if(S.key==="Enter"&&y.enterKeyHint==="next"){const E=y.getAttribute("data-next");if(E){const O=document.getElementById(E);if(O)return O.focus(),void S.preventDefault()}}};return y.addEventListener("keydown",g),()=>{x(),y.removeEventListener("keydown",g)}},[]),w.jsx(ba,{info:n,container:Be("group inline-block w-full",l),error:f,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:s,interactive:i,form:h.form,id:h.name||h.id,name:h.name,labelClassName:r,title:h.title,placeholder:h.placeholder,required:h.required,children:w.jsx(ry,{...h,type:e,"data-next":o,ref:Al(p,v),id:m,name:m,className:Be("input placeholder-input-mask group h-10 w-full flex-1 rounded-md bg-transparent px-2 py-1 text-foreground outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",u?"pe-4":"",d?"ps-4":"",h.className)})})}),Bv=new Date(1970,11,31),Vu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},zv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},fM={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},$u=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},hM=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},s)=>{const a=b.useId(),l=zt(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,d]=b.useState(e||void 0),[f,h]=b.useState(!1),p=$u(c,Bv).flatMap(E=>An.keyof(Vu,E.type)?Vu[E.type](E.value):[]),m=$u(c,Bv).reduce((E,O)=>E+(An.keyof(zv,O.type)?zv[O.type](O.value):""),""),[v,y]=b.useState(u?$u(c,u).reduce((E,O)=>E+(An.keyof(Vu,O.type)?fM[O.type](u,O.value):""),""):""),x=E=>{const O=E.target.value;if(y(O),p.length===O.length&&p.every((I,C)=>{const V=O.charAt(C);return typeof I=="string"?V===I:I.test(V)})){const I=vo(uO(O,m,new Date));return d(I),r==null?void 0:r(I)}return d(void 0),r==null?void 0:r(void 0)},g=E=>(d(E),r==null||r(E),y(E?dI(E,m):"")),T=kg(u),S=T?u.toISOString():void 0;return w.jsx(Bi,{...i,mask:p,value:v,"data-value":S,"data-target":i.name,className:"uppercase",formNoValidate:!f,placeholder:m,onChange:x,required:i.required??!0,error:f?void 0:i.error,name:void 0,id:void 0,right:w.jsxs(b.Fragment,{children:[w.jsx("input",{"data-origin":i.name,hidden:!0,type:"date",id:i.name,ref:s,name:i.name,defaultValue:S}),w.jsx($o,{open:f,onChange:h,trigger:w.jsxs("span",{"aria-labelledby":a,children:[w.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),w.jsx(ZP,{})]}),buttonProps:{"aria-describedby":a},children:w.jsx(Ey,{...i,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:g,disabledDate:n,date:T?u:void 0})})]})})}),pM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],mM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],gM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],yM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Wv=(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 Hv(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?yM:gM:t.binary?mM:pM,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=Wv(e,t.locale,s);return i+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,s||(e=e.toPrecision(3));const l=Wv(Number(e),t.locale,s),c=n[a];return i+l+r+c}var ju={exports:{}},wa={exports:{}},Le={};/** @license React v16.13.1
173
178
  * react-is.production.min.js
174
179
  *
175
180
  * Copyright (c) Facebook, Inc. and its affiliates.
176
181
  *
177
182
  * This source code is licensed under the MIT license found in the
178
183
  * LICENSE file in the root directory of this source tree.
179
- */var Ov;function z_(){if(Ov)return Fe;Ov=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,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,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function y(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case h:case s:return T;default:return E}}case n:return E}}}function S(T){return y(T)===c}return Fe.AsyncMode=l,Fe.ConcurrentMode=c,Fe.ContextConsumer=a,Fe.ContextProvider=s,Fe.Element=t,Fe.ForwardRef=u,Fe.Fragment=r,Fe.Lazy=p,Fe.Memo=h,Fe.Portal=n,Fe.Profiler=i,Fe.StrictMode=o,Fe.Suspense=d,Fe.isAsyncMode=function(T){return S(T)||y(T)===l},Fe.isConcurrentMode=S,Fe.isContextConsumer=function(T){return y(T)===a},Fe.isContextProvider=function(T){return y(T)===s},Fe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Fe.isForwardRef=function(T){return y(T)===u},Fe.isFragment=function(T){return y(T)===r},Fe.isLazy=function(T){return y(T)===p},Fe.isMemo=function(T){return y(T)===h},Fe.isPortal=function(T){return y(T)===n},Fe.isProfiler=function(T){return y(T)===i},Fe.isStrictMode=function(T){return y(T)===o},Fe.isSuspense=function(T){return y(T)===d},Fe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===h||T.$$typeof===s||T.$$typeof===a||T.$$typeof===u||T.$$typeof===g||T.$$typeof===v||T.$$typeof===w||T.$$typeof===m)},Fe.typeOf=y,Fe}var Le={};/** @license React v16.13.1
184
+ */var Uv;function vM(){if(Uv)return Le;Uv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function g(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case i:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case h:case s:return S;default:return E}}case n:return E}}}function T(S){return g(S)===c}return Le.AsyncMode=l,Le.ConcurrentMode=c,Le.ContextConsumer=a,Le.ContextProvider=s,Le.Element=t,Le.ForwardRef=u,Le.Fragment=r,Le.Lazy=p,Le.Memo=h,Le.Portal=n,Le.Profiler=i,Le.StrictMode=o,Le.Suspense=d,Le.isAsyncMode=function(S){return T(S)||g(S)===l},Le.isConcurrentMode=T,Le.isContextConsumer=function(S){return g(S)===a},Le.isContextProvider=function(S){return g(S)===s},Le.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Le.isForwardRef=function(S){return g(S)===u},Le.isFragment=function(S){return g(S)===r},Le.isLazy=function(S){return g(S)===p},Le.isMemo=function(S){return g(S)===h},Le.isPortal=function(S){return g(S)===n},Le.isProfiler=function(S){return g(S)===i},Le.isStrictMode=function(S){return g(S)===o},Le.isSuspense=function(S){return g(S)===d},Le.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===i||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===h||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===v||S.$$typeof===y||S.$$typeof===x||S.$$typeof===m)},Le.typeOf=g,Le}var Ve={};/** @license React v16.13.1
180
185
  * react-is.development.js
181
186
  *
182
187
  * Copyright (c) Facebook, Inc. and its affiliates.
183
188
  *
184
189
  * This source code is licensed under the MIT license found in the
185
190
  * LICENSE file in the root directory of this source tree.
186
- */var Iv;function W_(){return Iv||(Iv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,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,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function y(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===h||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===g||B.$$typeof===v||B.$$typeof===w||B.$$typeof===m)}function S(B){if(typeof B=="object"&&B!==null){var Pe=B.$$typeof;switch(Pe){case t:var ot=B.type;switch(ot){case l:case c:case r:case i:case o:case d:return ot;default:var He=ot&&ot.$$typeof;switch(He){case a:case u:case p:case h:case s:return He;default:return Pe}}case n:return Pe}}}var T=l,E=c,P=a,D=s,_=t,I=u,V=r,F=p,$=h,C=n,O=i,M=o,L=d,H=!1;function Y(B){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(B)||S(B)===l}function k(B){return S(B)===c}function R(B){return S(B)===a}function Z(B){return S(B)===s}function oe(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return S(B)===u}function G(B){return S(B)===r}function N(B){return S(B)===p}function j(B){return S(B)===h}function W(B){return S(B)===n}function U(B){return S(B)===i}function z(B){return S(B)===o}function te(B){return S(B)===d}Le.AsyncMode=T,Le.ConcurrentMode=E,Le.ContextConsumer=P,Le.ContextProvider=D,Le.Element=_,Le.ForwardRef=I,Le.Fragment=V,Le.Lazy=F,Le.Memo=$,Le.Portal=C,Le.Profiler=O,Le.StrictMode=M,Le.Suspense=L,Le.isAsyncMode=Y,Le.isConcurrentMode=k,Le.isContextConsumer=R,Le.isContextProvider=Z,Le.isElement=oe,Le.isForwardRef=J,Le.isFragment=G,Le.isLazy=N,Le.isMemo=j,Le.isPortal=W,Le.isProfiler=U,Le.isStrictMode=z,Le.isSuspense=te,Le.isValidElementType=y,Le.typeOf=S}()),Le}var Av;function _v(){return Av||(Av=1,process.env.NODE_ENV==="production"?va.exports=z_():va.exports=W_()),va.exports}/*
191
+ */var Gv;function bM(){return Gv||(Gv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function g(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===h||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===v||H.$$typeof===y||H.$$typeof===x||H.$$typeof===m)}function T(H){if(typeof H=="object"&&H!==null){var Pe=H.$$typeof;switch(Pe){case t:var it=H.type;switch(it){case l:case c:case r:case i:case o:case d:return it;default:var Ue=it&&it.$$typeof;switch(Ue){case a:case u:case p:case h:case s:return Ue;default:return Pe}}case n:return Pe}}}var S=l,E=c,O=a,k=s,I=t,C=u,V=r,D=p,L=h,P=n,_=i,N=o,$=d,z=!1;function U(H){return z||(z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(H)||T(H)===l}function A(H){return T(H)===c}function R(H){return T(H)===a}function Z(H){return T(H)===s}function ne(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function Q(H){return T(H)===u}function G(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 j(H){return T(H)===i}function Y(H){return T(H)===o}function se(H){return T(H)===d}Ve.AsyncMode=S,Ve.ConcurrentMode=E,Ve.ContextConsumer=O,Ve.ContextProvider=k,Ve.Element=I,Ve.ForwardRef=C,Ve.Fragment=V,Ve.Lazy=D,Ve.Memo=L,Ve.Portal=P,Ve.Profiler=_,Ve.StrictMode=N,Ve.Suspense=$,Ve.isAsyncMode=U,Ve.isConcurrentMode=A,Ve.isContextConsumer=R,Ve.isContextProvider=Z,Ve.isElement=ne,Ve.isForwardRef=Q,Ve.isFragment=G,Ve.isLazy=F,Ve.isMemo=B,Ve.isPortal=W,Ve.isProfiler=j,Ve.isStrictMode=Y,Ve.isSuspense=se,Ve.isValidElementType=g,Ve.typeOf=T}()),Ve}var Yv;function qv(){return Yv||(Yv=1,process.env.NODE_ENV==="production"?wa.exports=vM():wa.exports=bM()),wa.exports}/*
187
192
  object-assign
188
193
  (c) Sindre Sorhus
189
194
  @license MIT
190
- */var Du,Dv;function H_(){if(Dv)return Du;Dv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Du=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Du}var Mu,Mv;function Nu(){if(Mv)return Mu;Mv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Mu=e,Mu}var Fu,Nv;function Fv(){return Nv||(Nv=1,Fu=Function.call.bind(Object.prototype.hasOwnProperty)),Fu}var Lu,Lv;function U_(){if(Lv)return Lu;Lv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Nu(),n={},r=Fv();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Lu=o,Lu}var Vu,Vv;function G_(){if(Vv)return Vu;Vv=1;var e=_v(),t=H_(),n=Nu(),r=Fv(),o=U_(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Vu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(k){var R=k&&(c&&k[c]||k[u]);if(typeof R=="function")return R}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:w(),arrayOf:y,element:S(),elementType:T(),instanceOf:E,node:I(),objectOf:D,oneOf:P,oneOfType:_,shape:F,exact:$};function p(k,R){return k===R?k!==0||1/k===1/R:k!==k&&R!==R}function m(k,R){this.message=k,this.data=R&&typeof R=="object"?R:{},this.stack=""}m.prototype=Error.prototype;function g(k){if(process.env.NODE_ENV!=="production")var R={},Z=0;function oe(G,N,j,W,U,z,te){if(W=W||f,z=z||j,te!==n){if(l){var B=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 B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=W+":"+j;!R[Pe]&&Z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+z+"` 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."),R[Pe]=!0,Z++)}}return N[j]==null?G?N[j]===null?new m("The "+U+" `"+z+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+U+" `"+z+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(N,j,W,U,z)}var J=oe.bind(null,!1);return J.isRequired=oe.bind(null,!0),J}function v(k){function R(Z,oe,J,G,N,j){var W=Z[oe],U=M(W);if(U!==k){var z=L(W);return new m("Invalid "+G+" `"+N+"` of type "+("`"+z+"` supplied to `"+J+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return g(R)}function w(){return g(s)}function y(k){function R(Z,oe,J,G,N){if(typeof k!="function")return new m("Property `"+N+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var j=Z[oe];if(!Array.isArray(j)){var W=M(j);return new m("Invalid "+G+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an array."))}for(var U=0;U<j.length;U++){var z=k(j,U,J,G,N+"["+U+"]",n);if(z instanceof Error)return z}return null}return g(R)}function S(){function k(R,Z,oe,J,G){var N=R[Z];if(!a(N)){var j=M(N);return new m("Invalid "+J+" `"+G+"` of type "+("`"+j+"` supplied to `"+oe+"`, expected a single ReactElement."))}return null}return g(k)}function T(){function k(R,Z,oe,J,G){var N=R[Z];if(!e.isValidElementType(N)){var j=M(N);return new m("Invalid "+J+" `"+G+"` of type "+("`"+j+"` supplied to `"+oe+"`, expected a single ReactElement type."))}return null}return g(k)}function E(k){function R(Z,oe,J,G,N){if(!(Z[oe]instanceof k)){var j=k.name||f,W=Y(Z[oe]);return new m("Invalid "+G+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected ")+("instance of `"+j+"`."))}return null}return g(R)}function P(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function R(Z,oe,J,G,N){for(var j=Z[oe],W=0;W<k.length;W++)if(p(j,k[W]))return null;var U=JSON.stringify(k,function(te,B){var Pe=L(B);return Pe==="symbol"?String(B):B});return new m("Invalid "+G+" `"+N+"` of value `"+String(j)+"` "+("supplied to `"+J+"`, expected one of "+U+"."))}return g(R)}function D(k){function R(Z,oe,J,G,N){if(typeof k!="function")return new m("Property `"+N+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var j=Z[oe],W=M(j);if(W!=="object")return new m("Invalid "+G+" `"+N+"` of type "+("`"+W+"` supplied to `"+J+"`, expected an object."));for(var U in j)if(r(j,U)){var z=k(j,U,J,G,N+"."+U,n);if(z instanceof Error)return z}return null}return g(R)}function _(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var R=0;R<k.length;R++){var Z=k[R];if(typeof Z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(Z)+" at index "+R+"."),s}function oe(J,G,N,j,W){for(var U=[],z=0;z<k.length;z++){var te=k[z],B=te(J,G,N,j,W,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&U.push(B.data.expectedType)}var Pe=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new m("Invalid "+j+" `"+W+"` supplied to "+("`"+N+"`"+Pe+"."))}return g(oe)}function I(){function k(R,Z,oe,J,G){return C(R[Z])?null:new m("Invalid "+J+" `"+G+"` supplied to "+("`"+oe+"`, expected a ReactNode."))}return g(k)}function V(k,R,Z,oe,J){return new m((k||"React class")+": "+R+" type `"+Z+"."+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function F(k){function R(Z,oe,J,G,N){var j=Z[oe],W=M(j);if(W!=="object")return new m("Invalid "+G+" `"+N+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));for(var U in k){var z=k[U];if(typeof z!="function")return V(J,G,N,U,L(z));var te=z(j,U,J,G,N+"."+U,n);if(te)return te}return null}return g(R)}function $(k){function R(Z,oe,J,G,N){var j=Z[oe],W=M(j);if(W!=="object")return new m("Invalid "+G+" `"+N+"` of type `"+W+"` "+("supplied to `"+J+"`, expected `object`."));var U=t({},Z[oe],k);for(var z in U){var te=k[z];if(r(k,z)&&typeof te!="function")return V(J,G,N,z,L(te));if(!te)return new m("Invalid "+G+" `"+N+"` key `"+z+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Z[oe],null," ")+`
191
- Valid keys: `+JSON.stringify(Object.keys(k),null," "));var B=te(j,z,J,G,N+"."+z,n);if(B)return B}return null}return g(R)}function C(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(C);if(k===null||a(k))return!0;var R=d(k);if(R){var Z=R.call(k),oe;if(R!==k.entries){for(;!(oe=Z.next()).done;)if(!C(oe.value))return!1}else for(;!(oe=Z.next()).done;){var J=oe.value;if(J&&!C(J[1]))return!1}}else return!1;return!0;default:return!1}}function O(k,R){return k==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function M(k){var R=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":O(R,k)?"symbol":R}function L(k){if(typeof k>"u"||k===null)return""+k;var R=M(k);if(R==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return R}function H(k){var R=L(k);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function Y(k){return!k.constructor||!k.constructor.name?f:k.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Vu}var $u,$v;function Y_(){if($v)return $u;$v=1;var e=Nu();function t(){}function n(){}return n.resetWarningCache=t,$u=function(){function r(s,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 i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},$u}if(process.env.NODE_ENV!=="production"){var q_=_v(),K_=!0;_u.exports=G_()(q_.isElement,K_)}else _u.exports=Y_()();var Z_=_u.exports;const ze=j0(Z_);function No(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Fo(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Rv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function jv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var X_=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 Vi(e,t){var n=Q_(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 Q_(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=X_.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var J_=[".DS_Store","Thumbs.db"];function eD(e){return No(this,void 0,void 0,function(){return Fo(this,function(t){return ba(e)&&tD(e.dataTransfer)?[2,iD(e.dataTransfer,e.type)]:nD(e)?[2,rD(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,oD(e)]:[2,[]]})})}function tD(e){return ba(e)}function nD(e){return ba(e)&&ba(e.target)}function ba(e){return typeof e=="object"&&e!==null}function rD(e){return Ru(e.target.files).map(function(t){return Vi(t)})}function oD(e){return No(this,void 0,void 0,function(){var t;return Fo(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 Vi(r)})]}})})}function iD(e,t){return No(this,void 0,void 0,function(){var n,r;return Fo(this,function(o){switch(o.label){case 0:return e.items?(n=Ru(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(sD))]):[3,2];case 1:return r=o.sent(),[2,Bv(zv(r))];case 2:return[2,Bv(Ru(e.files).map(function(i){return Vi(i)}))]}})})}function Bv(e){return e.filter(function(t){return J_.indexOf(t.name)===-1})}function Ru(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function sD(e){if(typeof e.webkitGetAsEntry!="function")return Wv(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Hv(t):Wv(e)}function zv(e){return e.reduce(function(t,n){return jv(jv([],Rv(t),!1),Rv(Array.isArray(n)?zv(n):[n]),!1)},[])}function Wv(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Vi(t);return Promise.resolve(n)}function aD(e){return No(this,void 0,void 0,function(){return Fo(this,function(t){return[2,e.isDirectory?Hv(e):lD(e)]})})}function Hv(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return No(s,void 0,void 0,function(){var l,c,u;return Fo(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(aD)),o.push(u),i(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function lD(e){return No(this,void 0,void 0,function(){return Fo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=Vi(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var cD=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function Uv(e){return fD(e)||dD(e)||Kv(e)||uD()}function uD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
192
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fD(e){if(Array.isArray(e))return ju(e)}function Gv(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 Yv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(n),!0).forEach(function(r){qv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $i(e,t){return mD(e)||pD(e,t)||Kv(e,t)||hD()}function hD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
193
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kv(e,t){if(e){if(typeof e=="string")return ju(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ju(e,t)}}function ju(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function mD(e){if(Array.isArray(e))return e}var gD="file-invalid-type",yD="file-too-large",vD="file-too-small",bD="too-many-files",wD=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:gD,message:"File type must be ".concat(n)}},Zv=function(t){return{code:yD,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Xv=function(t){return{code:vD,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},xD={code:bD,message:"Too many files"};function Qv(e,t){var n=e.type==="application/x-moz-file"||cD(e,t);return[n,n?null:wD(t)]}function Jv(e,t,n){if(Lr(e.size))if(Lr(t)&&Lr(n)){if(e.size>n)return[!1,Zv(n)];if(e.size<t)return[!1,Xv(t)]}else{if(Lr(t)&&e.size<t)return[!1,Xv(t)];if(Lr(n)&&e.size>n)return[!1,Zv(n)]}return[!0,null]}function Lr(e){return e!=null}function TD(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=Qv(l,n),u=$i(c,1),d=u[0],f=Jv(l,r,o),h=$i(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function wa(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function xa(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 eb(e){e.preventDefault()}function SD(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function ED(e){return e.indexOf("Edge/")!==-1}function CD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return SD(e)||ED(e)}function vn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!wa(r)&&a&&a.apply(void 0,[r].concat(i)),wa(r)})}}function PD(){return"showOpenFilePicker"in window}function kD(e){if(Lr(e)){var t=Object.entries(e).filter(function(n){var r=$i(n,2),o=r[0],i=r[1],s=!0;return tb(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(nb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=$i(r,2),i=o[0],s=o[1];return Yv(Yv({},n),{},qv({},i,s))},{});return[{description:"Files",accept:t}]}return e}function OD(e){if(Lr(e))return Object.entries(e).reduce(function(t,n){var r=$i(n,2),o=r[0],i=r[1];return[].concat(Uv(t),[o],Uv(i))},[]).filter(function(t){return tb(t)||nb(t)}).join(",")}function ID(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function AD(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function tb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function nb(e){return/^.*\.[\w]+$/.test(e)}var _D=["children"],DD=["open"],MD=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ND=["refKey","onChange","onClick"];function FD(e){return $D(e)||VD(e)||rb(e)||LD()}function LD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
194
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $D(e){if(Array.isArray(e))return zu(e)}function Bu(e,t){return BD(e)||jD(e,t)||rb(e,t)||RD()}function RD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rb(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 jD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function BD(e){if(Array.isArray(e))return e}function ob(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(n),!0).forEach(function(r){Wu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ob(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ta(e,t){if(e==null)return{};var n=zD(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Hu=b.forwardRef(function(e,t){var n=e.children,r=Ta(e,_D),o=sb(r),i=o.open,s=Ta(o,DD);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Je(Je({},s),{},{open:i})))});Hu.displayName="Dropzone";var ib={disabled:!1,getFilesFromEvent:eD,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};Hu.defaultProps=ib,Hu.propTypes={children:ze.func,accept:ze.objectOf(ze.arrayOf(ze.string)),multiple:ze.bool,preventDropOnDocument:ze.bool,noClick:ze.bool,noKeyboard:ze.bool,noDrag:ze.bool,noDragEventsBubbling:ze.bool,minSize:ze.number,maxSize:ze.number,maxFiles:ze.number,disabled:ze.bool,getFilesFromEvent:ze.func,onFileDialogCancel:ze.func,onFileDialogOpen:ze.func,useFsAccessApi:ze.bool,autoFocus:ze.bool,onDragEnter:ze.func,onDragLeave:ze.func,onDragOver:ze.func,onDrop:ze.func,onDropAccepted:ze.func,onDropRejected:ze.func,onError:ze.func,validator:ze.func};var Uu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function sb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Je(Je({},ib),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,y=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,P=t.noDragEventsBubbling,D=t.onError,_=t.validator,I=b.useMemo(function(){return OD(n)},[n]),V=b.useMemo(function(){return kD(n)},[n]),F=b.useMemo(function(){return typeof g=="function"?g:ab},[g]),$=b.useMemo(function(){return typeof m=="function"?m:ab},[m]),C=b.useRef(null),O=b.useRef(null),M=b.useReducer(WD,Uu),L=Bu(M,2),H=L[0],Y=L[1],k=H.isFocused,R=H.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&PD()),oe=function(){!Z.current&&R&&setTimeout(function(){if(O.current){var ae=O.current.files;ae.length||(Y({type:"closeDialog"}),$())}},300)};b.useEffect(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[O,R,$,Z]);var J=b.useRef([]),G=function(ae){C.current&&C.current.contains(ae.target)||(ae.preventDefault(),J.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",eb,!1),document.addEventListener("drop",G,!1)),function(){y&&(document.removeEventListener("dragover",eb),document.removeEventListener("drop",G))}},[C,y]),b.useEffect(function(){return!r&&w&&C.current&&C.current.focus(),function(){}},[C,w,r]);var N=b.useCallback(function(Q){D?D(Q):console.error(Q)},[D]),j=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q),J.current=[].concat(FD(J.current),[Q.target]),xa(Q)&&Promise.resolve(o(Q)).then(function(ae){if(!(wa(Q)&&!P)){var _e=ae.length,Ke=_e>0&&TD({files:ae,accept:I,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:_}),kt=_e>0&&!Ke;Y({isDragAccept:Ke,isDragReject:kt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Q)}}).catch(function(ae){return N(ae)})},[o,c,N,P,I,s,i,a,l,_]),W=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q);var ae=xa(Q);if(ae&&Q.dataTransfer)try{Q.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(Q),!1},[d,P]),U=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q);var ae=J.current.filter(function(Ke){return C.current&&C.current.contains(Ke)}),_e=ae.indexOf(Q.target);_e!==-1&&ae.splice(_e,1),J.current=ae,!(ae.length>0)&&(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),xa(Q)&&u&&u(Q))},[C,u,P]),z=b.useCallback(function(Q,ae){var _e=[],Ke=[];Q.forEach(function(kt){var Nt=Qv(kt,I),Vt=Bu(Nt,2),Gr=Vt[0],qo=Vt[1],Ko=Jv(kt,s,i),el=Bu(Ko,2),Yd=el[0],qd=el[1],Kd=_?_(kt):null;if(Gr&&Yd&&!Kd)_e.push(kt);else{var Zd=[qo,qd];Kd&&(Zd=Zd.concat(Kd)),Ke.push({file:kt,errors:Zd.filter(function(jL){return jL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(kt){Ke.push({file:kt,errors:[xD]})}),_e.splice(0)),Y({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,ae),Ke.length>0&&p&&p(Ke,ae),_e.length>0&&h&&h(_e,ae)},[Y,a,I,s,i,l,f,h,p,_]),te=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Oe(Q),J.current=[],xa(Q)&&Promise.resolve(o(Q)).then(function(ae){wa(Q)&&!P||z(ae,Q)}).catch(function(ae){return N(ae)}),Y({type:"reset"})},[o,z,N,P]),B=b.useCallback(function(){if(Z.current){Y({type:"openDialog"}),F();var Q={multiple:a,types:V};window.showOpenFilePicker(Q).then(function(ae){return o(ae)}).then(function(ae){z(ae,null),Y({type:"closeDialog"})}).catch(function(ae){ID(ae)?($(ae),Y({type:"closeDialog"})):AD(ae)?(Z.current=!1,O.current?(O.current.value=null,O.current.click()):N(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):N(ae)});return}O.current&&(Y({type:"openDialog"}),F(),O.current.value=null,O.current.click())},[Y,F,$,v,z,N,V,a]),Pe=b.useCallback(function(Q){!C.current||!C.current.isEqualNode(Q.target)||(Q.key===" "||Q.key==="Enter"||Q.keyCode===32||Q.keyCode===13)&&(Q.preventDefault(),B())},[C,B]),ot=b.useCallback(function(){Y({type:"focus"})},[]),He=b.useCallback(function(){Y({type:"blur"})},[]),it=b.useCallback(function(){S||(CD()?setTimeout(B,0):B())},[S,B]),de=function(ae){return r?null:ae},Ee=function(ae){return T?null:de(ae)},ce=function(ae){return E?null:de(ae)},Oe=function(ae){P&&ae.stopPropagation()},ht=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=Q.refKey,_e=ae===void 0?"ref":ae,Ke=Q.role,kt=Q.onKeyDown,Nt=Q.onFocus,Vt=Q.onBlur,Gr=Q.onClick,qo=Q.onDragEnter,Ko=Q.onDragOver,el=Q.onDragLeave,Yd=Q.onDrop,qd=Ta(Q,MD);return Je(Je(Wu({onKeyDown:Ee(vn(kt,Pe)),onFocus:Ee(vn(Nt,ot)),onBlur:Ee(vn(Vt,He)),onClick:de(vn(Gr,it)),onDragEnter:ce(vn(qo,j)),onDragOver:ce(vn(Ko,W)),onDragLeave:ce(vn(el,U)),onDrop:ce(vn(Yd,te)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,C),!r&&!T?{tabIndex:0}:{}),qd)}},[C,Pe,ot,He,it,j,W,U,te,T,E,r]),Ie=b.useCallback(function(Q){Q.stopPropagation()},[]),pt=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=Q.refKey,_e=ae===void 0?"ref":ae,Ke=Q.onChange,kt=Q.onClick,Nt=Ta(Q,ND),Vt=Wu({accept:I,multiple:a,type:"file",style:{display:"none"},onChange:de(vn(Ke,te)),onClick:de(vn(kt,Ie)),tabIndex:-1},_e,O);return Je(Je({},Vt),Nt)}},[O,n,a,te,r]);return Je(Je({},H),{},{isFocused:k&&!r,getRootProps:ht,getInputProps:pt,rootRef:C,inputRef:O,open:de(B)})}function WD(e,t){switch(t.type){case"focus":return Je(Je({},e),{},{isFocused:!0});case"blur":return Je(Je({},e),{},{isFocused:!1});case"openDialog":return Je(Je({},Uu),{},{isFileDialogActive:!0});case"closeDialog":return Je(Je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Je(Je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Je(Je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Je({},Uu);default:return e}}function ab(){}const HD={isImage:e=>e.type.includes("image")},UD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(HD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:kv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:kv(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(xr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(po,{})})]}):x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[x.jsx(PP,{size:48}),x.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(xr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(po,{className:"text-danger"})})]})},GD=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(UD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),YD=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(GD,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(b.Fragment,{children:e.idle}),qD=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(_P,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),KD=({idle:e=qD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=d=>{n==null||n(d),i(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=sb({onDrop:s});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(YD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},ZD=["INPUT","SELECT"],Gu=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{ZD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},XD=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},QD=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:Xe("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),Vr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const g=Qt(),v=b.useRef(null),w=p.id??p.name;b.useImperativeHandle(m,()=>v.current),b.useEffect(()=>{if(v.current===null)return;const S=v.current,T=vs(v.current),E=()=>S.setAttribute("data-selected","true");return S.addEventListener("change",E),()=>{T(),S.removeEventListener("change",E)}},[]);const y=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return x.jsx(ya,{container:Xe("group inline-block w-full",c),error:h,feedback:o,hideLeft:u,left:f,info:n,optionalText:l,rightLabel:a,interactive:s,form:p.form,id:p.name||p.id,name:p.name,labelClassName:i,title:p.title,placeholder:p.placeholder,required:e,right:x.jsx("label",{htmlFor:w,children:x.jsxs("button",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(tg,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:w,name:w,value:p.value,required:e,ref:Ol(m,v),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Xe("input appearance-none select group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-foreground placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>x.jsx("option",{...S,children:S.label??S.value},`${w}-select-option-${S.value}`))]})})}),Yu=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},JD=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),l=s,c=b.useRef(null),u=Yu(r.onChange);b.useImperativeHandle(o,()=>c.current),b.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=f=>{var m;const p=f.target.dataset.checked!=="true";a(p),(m=r==null?void 0:r.onCheck)==null||m.call(r,p),c.current!==null&&(ys(c.current,p.toString()),c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:Xe("flex flex-wrap items-center",t),children:[x.jsx("input",{...r,ref:c,hidden:!0,type:"checkbox",checked:l,onChange:f=>a(f.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"duration-300 ease-in-out relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"duration-300 duration-300 ease-in-out inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("span",{className:"ml-3 text-sm",id:`${i}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),Sa=0,dr=1,Lo=2,lb=4;function Ri(e,t){return n=>e(t(n))}function eM(e,t){return t(e)}function cb(e,t){return n=>e(t,n)}function ub(e,t){return()=>e(t)}function Ea(e,t){return t(e),e}function Ye(...e){return e}function tM(e){e()}function db(e){return()=>e}function nM(...e){return()=>{e.map(tM)}}function qu(e){return e!==void 0}function $r(){}function $e(e,t){return e(dr,t)}function be(e,t){e(Sa,t)}function Ku(e){e(Lo)}function Dt(e){return e(lb)}function ue(e,t){return $e(e,cb(t,Sa))}function bn(e,t){const n=e(dr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Lo:e.splice(0,e.length);return;case dr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Sa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case dr:o(t);break;case Sa:t=o;break;case lb:return t}return n(r,o)}}function rM(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case dr:return i?n===i?void 0:(r(),n=i,t=$e(e,i),t):(r(),$r);case Lo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Yt(e){return Ea(Ce(),t=>ue(e,t))}function Mt(e,t){return Ea(X(t),n=>ue(e,n))}function oM(...e){return t=>e.reduceRight(eM,t)}function q(e,...t){const n=oM(...t);return(r,o)=>{switch(r){case dr:return $e(e,n(o));case Lo:Ku(e);return}}}function fb(e,t){return e===t}function qe(e=fb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function se(e){return t=>Ri(t,e)}function wn(e){return t=>()=>t(e)}function xn(e,t){return n=>r=>n(t=e(t,r))}function Vo(e){return t=>n=>{e>0?e--:t(n)}}function fr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function hb(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);$e(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function pb(...e){return function(t,n){switch(t){case dr:return nM(...e.map(r=>$e(r,n)));case Lo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=fb){return q(e,qe(t))}function bt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);$e(i,l=>{n[s]=l,r=r|a,r===o&&be(t,n)})}),function(i,s){switch(i){case dr:return r===o&&s(n),$e(t,s);case Lo:return Ku(t);default:throw new Error(`unrecognized action ${i}`)}}}function Ne(e,t=[],{singleton:n}={singleton:!0}){return{id:iM(),constructor:e,dependencies:t,singleton:n}}const iM=()=>Symbol();function sM(e){const t=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=o(i.map(l=>n(l)));return s&&t.set(r,a),a};return n(e)}function aM(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n}const Ca=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Zu(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=b.createContext({});function l(v,w){v.propsReady&&be(v.propsReady,!1);for(const y of r){const S=v[t.required[y]];be(S,w[y])}for(const y of o)if(y in w){const S=v[t.optional[y]];be(S,w[y])}v.propsReady&&be(v.propsReady,!0)}function c(v){return i.reduce((w,y)=>(w[y]=S=>{const T=v[t.methods[y]];be(T,S)},w),{})}function u(v){return s.reduce((w,y)=>(w[y]=rM(v[t.events[y]]),w),{})}const d=b.forwardRef((v,w)=>{const{children:y,...S}=v,[T]=b.useState(()=>Ea(sM(e),P=>l(P,S))),[E]=b.useState(ub(u,T));return Ca(()=>{for(const P of s)P in S&&$e(E[P],S[P]);return()=>{Object.values(E).map(Ku)}},[S,E,T]),Ca(()=>{l(T,S)}),b.useImperativeHandle(w,db(c(T))),b.createElement(a.Provider,{value:T},n?b.createElement(n,aM([...r,...o,...s],S),y):y)}),f=v=>b.useCallback(cb(be,b.useContext(a)[v]),[v]),h=v=>{const y=b.useContext(a)[v],S=b.useCallback(T=>$e(y,T),[y]);return b.useSyncExternalStore(S,()=>Dt(y),()=>Dt(y))},p=v=>{const y=b.useContext(a)[v],[S,T]=b.useState(ub(Dt,y));return Ca(()=>$e(y,E=>{E!==S&&T(db(E))}),[y,S]),S},m=b.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,w)=>{const S=b.useContext(a)[v];Ca(()=>$e(S,w),[w,S])}}}const lM=typeof document<"u"?b.useLayoutEffect:b.useEffect;var qt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(qt||{});const cM={0:"debug",1:"log",2:"warn",3:"error"},uM=()=>typeof globalThis>"u"?window:globalThis,hr=Ne(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=uM().VIRTUOSO_LOG_LEVEL)!=null?i:Dt(e);o>=s&&console[cM[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Xu(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&e(s)})}),[e]);r=i=>{i&&t?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Tn(e,t=!0){return Xu(e,t).callbackRef}function mb(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=dM(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),i==null||i(fM("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return Xu(a,n)}function dM(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},qt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function fM(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,qt.WARN),t==="normal"?0:parseInt(t??"0",10)}function on(e,t){return Math.round(e.getBoundingClientRect()[t])}function gb(e,t){return Math.abs(e-t)<1.01}function yb(e,t,n,r=$r,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.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,g=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};d.suppressFlushSync?v():Qd.flushSync(v),s.current!==null&&(p===s.current||p<=0||p===m-g)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||i.current;return r(o||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(d){const f=i.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,g;f===window?(m=Math.max(on(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=f.scrollHeight,p=on(f,"height"),g=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),gb(p,m)||d.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,f.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const Ft=Ne(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),i=Ce(),s=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),f=Ce(),h=X(!1);return ue(q(e,se(({scrollTop:p})=>p)),t),ue(q(e,se(({scrollHeight:p})=>p)),s),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),ji={lvl:0};function vb(e,t,n,r=ji,o=ji){return{k:e,v:t,lvl:n,l:r,r:o}}function We(e){return e===ji}function $o(){return ji}function Qu(e,t){if(We(e))return ji;const{k:n,l:r,r:o}=e;if(t===n){if(We(r))return o;if(We(o))return r;{const[i,s]=bb(r);return Pa(mt(e,{k:i,v:s,l:wb(r)}))}}else return t<n?Pa(mt(e,{l:Qu(r,t)})):Pa(mt(e,{r:Qu(o,t)}))}function Bi(e,t){if(!We(e))return t===e.k?e.v:t<e.k?Bi(e.l,t):Bi(e.r,t)}function sn(e,t,n="k"){if(We(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return sn(e.l,t,n)}function Kt(e,t,n){return We(e)?vb(t,n,1):t===e.k?mt(e,{k:t,v:n}):t<e.k?xb(mt(e,{l:Kt(e.l,t,n)})):xb(mt(e,{r:Kt(e.r,t,n)}))}function Ju(e,t,n){if(We(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(Ju(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Ju(s,t,n))),a}function Rr(e){return We(e)?[]:[...Rr(e.l),{k:e.k,v:e.v},...Rr(e.r)]}function bb(e){return We(e.r)?[e.k,e.v]:bb(e.r)}function wb(e){return We(e.r)?e.l:Pa(mt(e,{r:wb(e.r)}))}function mt(e,t){return vb(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 ed(e){return We(e)||e.lvl>e.r.lvl}function xb(e){return td(Sb(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(ed(t))return Sb(mt(e,{lvl:r-1}));if(!We(t)&&!We(t.r))return mt(t.r,{l:mt(t,{r:t.r.l}),r:mt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(ed(e))return td(mt(e,{lvl:r-1}));if(!We(n)&&!We(n.l)){const o=n.l,i=ed(o)?n.lvl-1:n.lvl;return mt(o,{l:mt(e,{r:o.l,lvl:r-1}),r:td(mt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ka(e,t,n){if(We(e))return[];const r=sn(e,t)[0];return hM(Ju(e,r,n))}function Tb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function hM(e){return Tb(e,({k:t,v:n})=>({index:t,value:n}))}function td(e){const{r:t,lvl:n}=e;return!We(t)&&!We(t.r)&&t.lvl===n&&t.r.lvl===n?mt(t,{l:mt(e,{r:t.l}),lvl:n+1}):e}function Sb(e){const{l:t}=e;return!We(t)&&t.lvl===e.lvl?mt(t,{r:mt(e,{l:t.r})}):e}function Oa(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Eb(e,t,n){return e[Oa(e,t,n)]}function pM(e,t,n,r){const o=Oa(e,t,r),i=Oa(e,n,r,o);return e.slice(o,i+1)}const nd=Ne(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function mM(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 Cb(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 gM(e,t){let n=We(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),We(e)){e=Kt(e,0,o);continue}const a=ka(e,i-1,s+1);if(a.some(mM(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(s>=u||o===f)&&(e=Qu(e,u)):(c=f!==o,l=!0),d>s&&s>=u&&f!==o&&(e=Kt(e,s+1,f));c&&(e=Kt(e,i,o))}return[e,n]}function yM(){return{offsetTree:[],sizeTree:$o(),groupOffsetTree:$o(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function rd({index:e},t){return t===e?0:t<e?-1:1}function vM({offset:e},t){return t===e?0:t<e?-1:1}function bM(e){return{index:e.index,value:e}}function wM(e,t,n,r=0){return r>0&&(t=Math.max(t,Eb(e,r,rd).offset)),Tb(pM(e,t,n,vM),bM)}function od(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Oa(o,t-1,rd),a=o[l].offset;const u=sn(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ka(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({offset:f,size:u,index:c}),i=c,a=f,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function xM(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,qt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&We(i)&&t.length===2){const f=t[0].size,h=t[1].size;s=n.reduce((p,m)=>Kt(Kt(p,m,f),m+1,h),s)}else[s,a]=gM(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=od(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Kt(f,h,zi(h,l,o)),$o()),groupIndices:n}}function zi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Eb(t,e,rd),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function TM(e){return typeof e.groupIndex<"u"}function Pb(e,t,n){if(TM(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=kb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function kb(e,t){if(!Ia(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ia(e){return!We(e.groupOffsetTree)}function SM(e){return Rr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const EM={offsetHeight:"height",offsetWidth:"width"},Sn=Ne(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Mt(r,0),i=Ce(),s=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((T,E)=>on(T,EM[E])),f=X(void 0),h=X(0),p=yM(),m=Mt(q(n,we(l,e,h),xn(xM,p),qe()),p),g=Mt(q(l,qe(),xn((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),se(({prev:T})=>T)),[]);ue(q(l,pe(T=>T.length>0),we(m,h),se(([T,E,P])=>{const D=T.reduce((_,I,V)=>Kt(_,I,zi(I,E.offsetTree,P)||V),$o());return{...E,groupIndices:T,groupOffsetTree:D}})),m),ue(q(r,we(m),pe(([T,{lastIndex:E}])=>T<E),se(([T,{lastIndex:E,lastSize:P}])=>[{startIndex:T,endIndex:E,size:P}])),n),ue(c,u);const v=Mt(q(c,se(T=>T===void 0)),!0);ue(q(u,pe(T=>T!==void 0&&We(Dt(m).sizeTree)),se(T=>[{startIndex:0,endIndex:0,size:T}])),n);const w=Yt(q(n,we(m),xn(({sizes:T},[E,P])=>({changed:P!==T,sizes:P}),{changed:!1,sizes:p}),se(T=>T.changed)));$e(q(a,xn((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),se(T=>T.diff)),T=>{const{groupIndices:E}=Dt(m);if(T>0)be(t,!0),be(i,T+Cb(T,E));else if(T<0){const P=Dt(g);P.length>0&&(T-=Cb(-T,P)),be(s,T)}}),$e(q(a,we(e)),([T,E])=>{T<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},qt.ERROR)});const y=Yt(i);ue(q(i,we(m),se(([T,E])=>{const P=E.groupIndices.length>0,D=[],_=E.lastSize;if(P){const I=Bi(E.sizeTree,0);let V=0,F=0;for(;V<T;){const O=E.groupIndices[F],M=E.groupIndices.length===F+1?1/0:E.groupIndices[F+1]-O-1;D.push({startIndex:O,endIndex:O,size:I}),D.push({startIndex:O+1,endIndex:O+1+M-1,size:_}),F++,V+=M+1}const $=Rr(E.sizeTree);return V!==T&&$.shift(),$.reduce((O,{k:M,v:L})=>{let H=O.ranges;return O.prevSize!==0&&(H=[...O.ranges,{startIndex:O.prevIndex,endIndex:M+T-1,size:O.prevSize}]),{ranges:H,prevIndex:M+T,prevSize:L}},{ranges:D,prevIndex:T,prevSize:0}).ranges}return Rr(E.sizeTree).reduce((I,{k:V,v:F})=>({ranges:[...I.ranges,{startIndex:I.prevIndex,endIndex:V+T-1,size:I.prevSize}],prevIndex:V+T,prevSize:F}),{ranges:[],prevIndex:0,prevSize:_}).ranges})),n);const S=Yt(q(s,we(m,h),se(([T,{offsetTree:E},P])=>{const D=-T;return zi(D,E,P)})));return ue(q(s,we(m,h),se(([T,E,P])=>{if(E.groupIndices.length>0){if(We(E.sizeTree))return E;let _=$o();const I=Dt(g);let V=0,F=0,$=0;for(;V<-T;){$=I[F];const O=I[F+1]-$-1;F++,V+=O+1}if(_=Rr(E.sizeTree).reduce((O,{k:M,v:L})=>Kt(O,Math.max(0,M+T),L),_),V!==-T){const O=Bi(E.sizeTree,$);_=Kt(_,0,O);const M=sn(E.sizeTree,-T+1)[1];_=Kt(_,1,M)}return{...E,sizeTree:_,...od(E.offsetTree,0,_,P)}}else{const _=Rr(E.sizeTree).reduce((I,{k:V,v:F})=>Kt(I,Math.max(0,V+T),F),$o());return{...E,sizeTree:_,...od(E.offsetTree,0,_,P)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:y,firstItemIndex:a,gap:h,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Ye(hr,nd),{singleton:!0}),CM=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Ob(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!CM)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Wi=Ne(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=X(0);let g=null,v=null,w=null;function y(){g&&(g(),g=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ue(q(h,we(e,i,t,m,l,c,f),we(r,u,d),se(([[S,T,E,P,D,_,I,V],F,$,C])=>{const O=Ob(S),{align:M,behavior:L,offset:H}=O,Y=P-1,k=Pb(O,T,Y);let R=zi(k,T.offsetTree,F)+_;M==="end"?(R+=$+sn(T.sizeTree,k)[1]-E+C,k===Y&&(R+=I)):M==="center"?R+=($+sn(T.sizeTree,k)[1]-E+C)/2:R-=D,H&&(R+=H);const Z=oe=>{y(),oe?(V("retrying to scroll to",{location:S},qt.DEBUG),be(h,S)):(be(p,!0),V("list did not change, scroll successful",{},qt.DEBUG))};if(y(),L==="smooth"){let oe=!1;w=$e(n,J=>{oe=oe||J}),g=bn(a,()=>{Z(oe)})}else g=bn(q(n,PM(150)),Z);return v=setTimeout(()=>{y()},1200),be(o,!0),V("scrolling from index to",{index:k,top:R,behavior:L},qt.DEBUG),{top:R,behavior:L}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ye(Sn,Ft,hr),{singleton:!0});function PM(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Hi="up",Ui="down",kM="none",OM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},IM=0,Gi=Ne(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(IM),f=Mt(q(pb(q(ge(t),Vo(1),wn(!0)),q(ge(t),Vo(1),wn(!1),hb(100))),qe()),!1),h=Mt(q(pb(q(i,wn(!0)),q(i,wn(!1),hb(200))),qe()),!1);ue(q(bt(ge(t),ge(d)),se(([w,y])=>w<=y),qe()),a),ue(q(a,fr(50)),c);const p=Yt(q(bt(e,ge(n),ge(r),ge(o),ge(u)),xn((w,[{scrollTop:y,scrollHeight:S},T,E,P,D])=>{const _=y+T-S>-D,I={viewportHeight:T,scrollTop:y,scrollHeight:S};if(_){let F,$;return y>w.state.scrollTop?(F="SCROLLED_DOWN",$=w.state.scrollTop-y):(F="SIZE_DECREASED",$=w.state.scrollTop-y||w.scrollTopDelta),{atBottom:!0,state:I,atBottomBecause:F,scrollTopDelta:$}}let V;return I.scrollHeight>w.state.scrollHeight?V="SIZE_INCREASED":T<w.state.viewportHeight?V="VIEWPORT_HEIGHT_DECREASING":y<w.state.scrollTop?V="SCROLLING_UPWARDS":V="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:V,state:I}},OM),qe((w,y)=>w&&w.atBottom===y.atBottom))),m=Mt(q(e,xn((w,{scrollTop:y,scrollHeight:S,viewportHeight:T})=>{if(gb(w.scrollHeight,S))return{scrollTop:y,scrollHeight:S,jump:0,changed:!1};{const E=S-(y+T)<1;return w.scrollTop!==y&&E?{scrollHeight:S,scrollTop:y,jump:w.scrollTop-y,changed:!0}:{scrollHeight:S,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),se(w=>w.jump)),0);ue(q(p,se(w=>w.atBottom)),s),ue(q(s,fr(50)),l);const g=X(Ui);ue(q(e,se(({scrollTop:w})=>w),qe(),xn((w,y)=>Dt(h)?{direction:w.direction,prevScrollTop:y}:{direction:y<w.prevScrollTop?Hi:Ui,prevScrollTop:y},{direction:Ui,prevScrollTop:0}),se(w=>w.direction)),g),ue(q(e,fr(50),wn(kM)),g);const v=X(0);return ue(q(f,pe(w=>!w),wn(0)),v),ue(q(t,fr(100),we(f),pe(([w,y])=>!!y),xn(([w,y],[S])=>[y,S],[0,0]),se(([w,y])=>y-w)),v),{isScrolling:f,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Ye(Ft)),pr=Ne(([{log:e}])=>{const t=X(!1),n=Yt(q(t,pe(r=>r),qe()));return $e(t,r=>{r&&Dt(e)("props updated",{},qt.DEBUG)}),{propsReady:t,didMount:n}},Ye(hr),{singleton:!0});function id(e,t){e==0?t():requestAnimationFrame(()=>id(e-1,t))}function sd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Yi=Ne(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(s,we(l),pe(([u,d])=>!!d),wn(!1)),a),ue(q(s,we(l),pe(([u,d])=>!!d),wn(!1)),c),$e(q(bt(t,s),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!We(f)||qu(h))&&!d&&!p),we(l)),([,u])=>{bn(i,()=>{be(c,!0)}),id(4,()=>{bn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ye(Sn,Ft,Wi,pr),{singleton:!0});function Ib(e){return e?e==="smooth"?"smooth":"auto":!1}const AM=(e,t)=>typeof e=="function"?Ib(e(t)):t&&Ib(e),_M=Ne(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let f=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}$e(q(bt(q(ge(e),Vo(1)),a),we(ge(u),n,i,c),se(([[m,g],v,w,y,S])=>{let T=g&&y,E="auto";return T&&(E=AM(v,w||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{f&&(f(),f=null),f=bn(t,()=>{Dt(l)("following output to ",{totalCount:m},qt.DEBUG),h(g),f=null})});function p(m){const g=bn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Dt(l)("scrolling to bottom due to increased size",{},qt.DEBUG),h("auto"))});setTimeout(g,100)}return $e(q(bt(ge(u),e,s),pe(([m,,g])=>m&&g),xn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(i)&&p(m!==!1)}),$e(d,()=>{p(Dt(u)!==!1)}),$e(bt(ge(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ye(Sn,Gi,Wi,Yi,pr,hr,Ft));function DM(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Ab=Ne(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ce(),s=Ce(),a=Yt(q(i,se(DM)));return ue(q(a,se(l=>l.totalCount)),e),ue(q(a,se(l=>l.groupIndices)),t),ue(q(bt(r,n,o),pe(([l,c])=>Ia(c)),se(([l,c,u])=>sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),qe(),se(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Ye(Sn,Ft));function qi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function _b(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Aa="top",_a="bottom",Db="none";function Mb(e,t,n){return typeof e=="number"?n===Hi&&t===Aa||n===Ui&&t===_a?e:0:n===Hi?t===Aa?e.main:e.reverse:t===_a?e.main:e.reverse}function Nb(e,t){return typeof e=="number"?e:e[t]||0}const ad=Ne(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ce(),s=X(0),a=X(0),l=X(0),c=Mt(q(bt(ge(e),ge(t),ge(r),ge(i,qi),ge(l),ge(s),ge(o),ge(n),ge(a)),se(([u,d,f,[h,p],m,g,v,w,y])=>{const S=u-w,T=g+v,E=Math.max(f-S,0);let P=Db;const D=Nb(y,Aa),_=Nb(y,_a);return h-=w,h+=f+v,p+=f+v,p-=w,h>u+T-D&&(P=Hi),p<u-E+d+_&&(P=Ui),P!==Db?[Math.max(S-f-Mb(m,Aa,P)-D,0),S-E-v+d+Mb(m,_a,P)+_]:null}),pe(u=>u!=null),qe(qi)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Ye(Ft),{singleton:!0});function MM(e,t,n){if(Ia(t)){const r=kb(e,t);return[{index:sn(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const ld={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Fb(e,t,n){if(e.length===0)return[];if(!Ia(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=ka(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Da(e,t,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*s+(d-1)*r,h=c,p=f-u;return{items:Fb(e,o,i),topItems:Fb(t,o,i),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function Lb(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=sd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return Da(c,[],a,o,n,r)}const jr=Ne(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=X([]),g=X(0),v=Ce();ue(i.topItemsIndexes,m);const w=Mt(q(bt(h,p,ge(s,qi),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,P,,D,,,,,,,_])=>{const I=_&&_.length!==D;return E&&!P&&!I}),se(([,,[E,P],D,_,I,V,F,$,C,O])=>{const M=_,{sizeTree:L,offsetTree:H}=M,Y=Dt(g);if(D===0)return{...ld,totalCount:D};if(E===0&&P===0)return Y===0?{...ld,totalCount:D}:Lb(Y,I,_,$,C,O||[]);if(We(L))return Y>0?null:Da(MM(sd(I,D),M,O),[],D,C,M,$);const k=[];if(F.length>0){const G=F[0],N=F[F.length-1];let j=0;for(const W of ka(L,G,N)){const U=W.value,z=Math.max(W.start,G),te=Math.min(W.end,N);for(let B=z;B<=te;B++)k.push({index:B,size:U,offset:j,data:O&&O[B]}),j+=U}}if(!V)return Da([],k,D,C,M,$);const R=F.length>0?F[F.length-1]+1:0,Z=wM(H,E,P,R);if(Z.length===0)return null;const oe=D-1,J=Ea([],G=>{for(const N of Z){const j=N.value;let W=j.offset,U=N.start;const z=j.size;if(j.offset<E){U+=Math.floor((E-j.offset+C)/(z+C));const B=U-N.start;W+=B*z+B*C}U<R&&(W+=(R-U)*z,U=R);const te=Math.min(N.end,oe);for(let B=U;B<=te&&!(W>=P);B++)G.push({index:B,size:z,offset:W,data:O&&O[B]}),W+=z+C}});return Da(J,k,D,C,M,$)}),pe(E=>E!==null),qe()),ld);ue(q(n,pe(qu),se(E=>E==null?void 0:E.length)),t),ue(q(w,se(E=>E.topListHeight)),d),ue(d,l),ue(q(w,se(E=>[E.top,E.bottom])),a),ue(q(w,se(E=>E.items)),v);const y=Yt(q(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},P])=>E[E.length-1].originalIndex===P-1),se(([,E,P])=>[E-1,P]),qe(qi),se(([E])=>E))),S=Yt(q(w,fr(200),pe(({items:E,topItems:P})=>E.length>0&&E[0].originalIndex===P.length),se(({items:E})=>E[0].index),qe())),T=Yt(q(w,pe(({items:E})=>E.length>0),se(({items:E})=>{let P=0,D=E.length-1;for(;E[P].type==="group"&&P<D;)P++;for(;E[D].type==="group"&&D>P;)D--;return{startIndex:E[P].index,endIndex:E[D].index}}),qe(_b)));return{listState:w,topItemsIndexes:m,endReached:y,startReached:S,rangeChanged:T,itemsRendered:v,initialItemCount:g,...f}},Ye(Sn,Ab,ad,Yi,Wi,Gi,pr,nd),{singleton:!0}),NM=Ne(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ue(q(a,we(i),pe(([,l])=>l!==0),we(o,e,t,r,n),se(([[,l],c,u,d,f,h=[]])=>Lb(l,c,u,d,f,h))),s),{}),Ye(Sn,Yi,jr,pr),{singleton:!0}),Vb=Ne(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,i])=>!!i),se(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),qe()),t),$e(q(bt(t,e,n),we(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ye(Gi),{singleton:!0}),FM=Ne(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,pe(n=>n>0),se(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ye(jr)),$b=Ne(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ce(),s=Mt(q(bt(e,r,t,n,o),se(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(ge(s),i),{totalListHeight:s,totalListHeightChanged:i}},Ye(Ft,jr),{singleton:!0});function Rb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const LM=Rb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),VM=Ne(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Yt(q(l,we(a),xn(([,v,w,y],[{items:S,totalCount:T,bottom:E,offsetBottom:P},D])=>{const _=E+P;let I=0;return w===T&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(I=_-y,I!==0&&(I+=D))),[I,S,T,_]},[0,[],0,0]),pe(([v])=>v!==0),we(t,s,r,i,h,p),pe(([,v,w,y,,,S])=>!S&&!y&&v!==0&&w===Hi),se(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},qt.DEBUG),v))));function g(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return $e(q(m,we(n,o)),([v,w,y])=>{y&&LM()?be(n,w-v):g(-v)}),$e(q(bt(Mt(o,!1),n,p),pe(([v,w,y])=>!v&&!y&&w!==0),se(([v,w])=>w),fr(1)),g),ue(q(u,se(v=>({top:-v}))),e),$e(q(c,we(d,f),se(([v,{lastSize:w,groupIndices:y,sizeTree:S},T])=>{function E(P){return P*(w+T)}if(y.length===0)return E(v);{let P=0;const D=Bi(S,0);let _=0,I=0;for(;_<v;){_++,P+=D;let V=y.length===I+1?1/0:y[I+1]-y[I]-1;_+V>v&&(P-=D,V=v-_+1),_+=V,P+=E(V),I++}return P}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ye(Ft,Gi,jr,Sn,hr,nd)),$M=Ne(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return $e(q(e,we(r),pe(([,o])=>o!==0),se(([,o])=>({top:o}))),o=>{bn(q(n,Vo(1),pe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ye(pr,Ft,jr),{singleton:!0}),RM=Ne(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Mt(q(bt(n,e,t),pe(([o])=>o),se(([,o,i])=>Math.max(0,o-i)),fr(0),qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Ye(Ft,$b),{singleton:!0}),cd=Ne(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),i=X(!1),s=X(void 0);return ue(q(bt(n,r),se(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,we(r),se(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ye(Ft)),jM=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>e<n?{...s,behavior:o,align:i??"start"}:t>r?{...s,behavior:o,align:i??"end"}:null,BM=Ne(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,i,s,a,r),we(n),se(([[d,f,h,p,m,g,v,w],y])=>{const{done:S,behavior:T,align:E,calculateViewLocation:P=jM,...D}=d,_=Pb(d,f,p-1),I=zi(_,f.offsetTree,y)+m+g,V=I+sn(f.sizeTree,_)[1],F=w+g,$=w+h-v,C=P({itemTop:I,itemBottom:V,viewportTop:F,viewportBottom:$,locationParams:{behavior:T,align:E,...D}});return C?S&&bn(q(l,pe(O=>O===!1),Vo(Dt(l)?1:2)),S):S&&S(),C}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ye(Sn,Ft,Wi,jr,hr),{singleton:!0}),zM=Ne(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),f=X(null);return ue(a,d),ue(l,f),$e(q(c,we(e,n,s,d,f,r)),([h,p,m,g,v,w,y])=>{const S=SM(p.sizeTree);g&&v!==null&&w!==null&&(m=v.scrollTop-w.offsetTop),m-=y,h({ranges:S,scrollTop:m})}),ue(q(u,pe(qu),se(WM)),o),ue(q(i,we(u),pe(([,h])=>h!==void 0),qe(),se(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ye(Sn,Ft,Yi,pr,cd));function WM(e){return{offset:e.scrollTop,index:0,align:"start"}}const HM=Ne(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),Ye(ad,NM,pr,Vb,$b,$M,RM,cd,BM,hr)),jb=Ne(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,g,v,{listState:w,topItemsIndexes:y,...S},{scrollToIndex:T},E,{topItemCount:P},{groupCounts:D},_])=>(ue(S.rangeChanged,_.scrollSeekRangeChanged),ue(q(_.windowViewportRect,se(I=>I.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:P,groupCounts:D,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:w,scrollToIndex:T,trackItemSizes:o,itemSize:i,groupIndices:l,...S,..._,...m,sizes:d,...g}),Ye(Sn,Yi,Ft,zM,_M,jr,Wi,VM,FM,Ab,HM)),ud="-webkit-sticky",Bb="sticky",zb=Rb(()=>{if(typeof document>"u")return Bb;const e=document.createElement("div");return e.style.position=ud,e.style.position===ud?ud:Bb});function dd(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const 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:i}=Xu(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),o}const Ma=b.createContext(void 0),Wb=b.createContext(void 0);function fd(e){return e}const UM=Ne(([e,t])=>({...e,...t}),Ye(jb,Ne(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(fd),i=X("div"),s=X($r),a=(l,c=null)=>Mt(q(r,se(u=>u[l]),qe()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),GM=({height:e})=>b.createElement("div",{style:{height:e}}),YM={position:zb(),zIndex:1,overflowAnchor:"none"},qM={overflowAnchor:"none"},Hb=b.memo(function({showTopList:t=!1}){const n=Se("listState"),r=Jt("sizeRanges"),o=Se("useWindowScroll"),i=Se("customScrollParent"),s=Jt("windowScrollContainerState"),a=Jt("scrollContainerState"),l=i||o?s:a,c=Se("itemContent"),u=Se("context"),d=Se("groupContent"),f=Se("trackItemSizes"),h=Se("itemSize"),p=Se("log"),m=Jt("gap"),{callbackRef:g}=mb(r,h,f,t?$r:l,p,m,i),[v,w]=b.useState(0);md("deviation",C=>{v!==C&&w(C)});const y=Se("EmptyPlaceholder"),S=Se("ScrollSeekPlaceholder")||GM,T=Se("ListComponent"),E=Se("ItemComponent"),P=Se("GroupComponent"),D=Se("computeItemKey"),_=Se("isSeeking"),I=Se("groupIndices").length>0,V=Se("alignToBottom"),F=Se("initialItemFinalLocationReached"),$=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:V?"auto":0,...F?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,nt(y,u)):b.createElement(T,{...nt(T,u),ref:g,style:$,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(C=>{const O=C.originalIndex,M=D(O+n.firstItemIndex,C.data,u);return _?b.createElement(S,{...nt(S,u),key:M,index:C.index,height:C.size,type:C.type||"item",...C.type==="group"?{}:{groupIndex:C.groupIndex}}):C.type==="group"?b.createElement(P,{...nt(P,u),key:M,"data-index":O,"data-known-size":C.size,"data-item-index":C.index,style:YM},d(C.index,u)):b.createElement(E,{...nt(E,u),...Ub(E,C.data),key:M,"data-index":O,"data-known-size":C.size,"data-item-index":C.index,"data-item-group-index":C.groupIndex,style:qM},I?c(C.index,C.groupIndex,C.data,u):c(C.index,C.data,u))}))}),KM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ro=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),ZM={width:"100%",position:zb(),top:0,zIndex:1};function nt(e,t){if(typeof e!="string")return{context:t}}function Ub(e,t){return{item:typeof e=="string"?void 0:t}}const XM=b.memo(function(){const t=Se("HeaderComponent"),n=Jt("headerHeight"),r=Se("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),QM=b.memo(function(){const t=Se("FooterComponent"),n=Jt("footerHeight"),r=Se("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Se("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null});function hd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=yb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...KM,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...nt(c,f)},s)})}function pd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:v}=yb(l,u,c,$r,h);return lM(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",g),b.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...nt(c,p)},s)})}const JM=({children:e})=>{const t=b.useContext(Ma),n=Jt("viewportHeight"),r=Jt("fixedItemHeight"),o=Se("alignToBottom"),i=Tn(b.useMemo(()=>Ri(n,s=>on(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ro(o),ref:i,"data-viewport-type":"element"},e)},eN=({children:e})=>{const t=b.useContext(Ma),n=Jt("windowViewportRect"),r=Jt("fixedItemHeight"),o=Se("customScrollParent"),i=dd(n,o),s=Se("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Ro(s),"data-viewport-type":"window"},e)},tN=({children:e})=>{const t=Se("TopItemListComponent")||"div",n=Se("headerHeight"),r={...ZM,marginTop:`${n}px`},o=Se("context");return b.createElement(t,{style:r,...nt(t,o)},e)},nN=b.memo(function(t){const n=Se("useWindowScroll"),r=Se("topItemsIndexes").length>0,o=Se("customScrollParent"),i=o||n?iN:oN,s=o||n?eN:JM;return b.createElement(i,{...t},r&&b.createElement(tN,null,b.createElement(Hb,{showTopList:!0})),b.createElement(s,null,b.createElement(XM,null),b.createElement(Hb,null),b.createElement(QM,null)))}),{Component:rN,usePublisher:Jt,useEmitterValue:Se,useEmitter:md}=Zu(UM,{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"}},nN),oN=hd({usePublisher:Jt,useEmitterValue:Se,useEmitter:md}),iN=pd({usePublisher:Jt,useEmitterValue:Se,useEmitter:md}),sN=rN,Gb={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},aN={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Yb,ceil:qb,floor:Na,min:gd,max:Ki}=Math;function lN(e){return{...aN,items:e}}function Kb(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const i=n===null?null:n[o+e];return{index:o+e,data:i}})}function cN(e,t){return e&&e.column===t.column&&e.row===t.row}function Fa(e,t){return e&&e.width===t.width&&e.height===t.height}const uN=Ne(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:w,windowScrollTo:y},S])=>{const T=X(0),E=X(0),P=X(Gb),D=X({height:0,width:0}),_=X({height:0,width:0}),I=Ce(),V=Ce(),F=X(0),$=X(null),C=X({row:0,column:0}),O=Ce(),M=Ce(),L=X(!1),H=X(0),Y=X(!0),k=X(!1);$e(q(p,we(H),pe(([N,j])=>!!j)),()=>{be(Y,!1),be(E,0)}),$e(q(bt(p,Y,_,D,H,k),pe(([N,j,W,U,,z])=>N&&!j&&W.height!==0&&U.height!==0&&!z)),([,,,,N])=>{be(k,!0),id(1,()=>{be(I,N)}),bn(q(r),()=>{be(n,[0,0]),be(Y,!0)})}),ue(q(M,pe(N=>N!=null&&N.scrollTop>0),wn(0)),E),$e(q(p,we(M),pe(([,N])=>N!=null)),([,N])=>{N&&(be(D,N.viewport),be(_,N==null?void 0:N.item),be(C,N.gap),N.scrollTop>0&&(be(L,!0),bn(q(r,Vo(1)),j=>{be(L,!1)}),be(s,{top:N.scrollTop})))}),ue(q(D,se(({height:N})=>N)),o),ue(q(bt(ge(D,Fa),ge(_,Fa),ge(C,(N,j)=>N&&N.column===j.column&&N.row===j.row),ge(r)),se(([N,j,W,U])=>({viewport:N,item:j,gap:W,scrollTop:U}))),O),ue(q(bt(ge(T),t,ge(C,cN),ge(_,Fa),ge(D,Fa),ge($),ge(E),ge(L),ge(Y),ge(H)),pe(([,,,,,,,N])=>!N),se(([N,[j,W],U,z,te,B,Pe,,ot,He])=>{const{row:it,column:de}=U,{height:Ee,width:ce}=z,{width:Oe}=te;if(Pe===0&&(N===0||Oe===0))return Gb;if(ce===0){const Vt=sd(He,N),Gr=Vt===0?Math.max(Pe-1,0):Vt;return lN(Kb(Vt,Gr,B))}const ht=Xb(Oe,ce,de);let Ie,pt;ot?j===0&&W===0&&Pe>0?(Ie=0,pt=Pe-1):(Ie=ht*Na((j+it)/(Ee+it)),pt=ht*qb((W+it)/(Ee+it))-1,pt=gd(N-1,Ki(pt,ht-1)),Ie=gd(pt,Ki(0,Ie))):(Ie=0,pt=-1);const Q=Kb(Ie,pt,B),{top:ae,bottom:_e}=Zb(te,U,z,Q),Ke=qb(N/ht),Nt=Ke*Ee+(Ke-1)*it-_e;return{items:Q,offsetTop:ae,offsetBottom:Nt,top:ae,bottom:_e,itemHeight:Ee,itemWidth:ce}})),P),ue(q($,pe(N=>N!==null),se(N=>N.length)),T),ue(q(bt(D,_,P,C),pe(([N,j,{items:W}])=>W.length>0&&j.height!==0&&N.height!==0),se(([N,j,{items:W},U])=>{const{top:z,bottom:te}=Zb(N,U,j,W);return[z,te]}),qe(qi)),n);const R=X(!1);ue(q(r,we(R),se(([N,j])=>j||N!==0)),R);const Z=Yt(q(ge(P),pe(({items:N})=>N.length>0),we(T,R),pe(([{items:N},j,W])=>W&&N[N.length-1].index===j-1),se(([,N])=>N-1),qe())),oe=Yt(q(ge(P),pe(({items:N})=>N.length>0&&N[0].index===0),wn(0),qe())),J=Yt(q(ge(P),we(L),pe(([{items:N},j])=>N.length>0&&!j),se(([{items:N}])=>({startIndex:N[0].index,endIndex:N[N.length-1].index})),qe(_b),fr(0)));ue(J,f.scrollSeekRangeChanged),ue(q(I,we(D,_,T,C),se(([N,j,W,U,z])=>{const te=Ob(N),{align:B,behavior:Pe,offset:ot}=te;let He=te.index;He==="LAST"&&(He=U-1),He=Ki(0,He,gd(U-1,He));let it=yd(j,z,W,He);return B==="end"?it=Yb(it-j.height+W.height):B==="center"&&(it=Yb(it-j.height/2+W.height/2)),ot&&(it+=ot),{top:it,behavior:Pe}})),s);const G=Mt(q(P,se(N=>N.offsetBottom+N.bottom)),0);return ue(q(m,se(N=>({width:N.visibleWidth,height:N.visibleHeight}))),D),{data:$,totalCount:T,viewportDimensions:D,itemDimensions:_,scrollTop:r,scrollHeight:V,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:I,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:g,customScrollParent:v,windowScrollContainerState:w,deviation:F,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:C,restoreStateFrom:M,...f,initialTopMostItemIndex:H,gridState:P,totalListHeight:G,...d,startReached:oe,endReached:Z,rangeChanged:J,stateChanged:O,propsReady:h,stateRestoreInProgress:L,...S}},Ye(ad,Ft,Gi,Vb,pr,cd,hr));function Zb(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=yd(e,t,n,r[0].index),s=yd(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function yd(e,t,n,r){const o=Xb(e.width,n.width,t.column),i=Na(r/o),s=i*n.height+Ki(0,i-1)*t.row;return s>0?s+t.row:s}function Xb(e,t,n){return Ki(1,Na((e+n)/(Na(t)+n)))}const dN=Ne(([e,t])=>({...e,...t}),Ye(uN,Ne(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X(fd),s=X("div"),a=X($r),l=(c,u=null)=>Mt(q(t,se(d=>d[c]),qe()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),fN=b.memo(function(){const t=et("gridState"),n=et("listClassName"),r=et("itemClassName"),o=et("itemContent"),i=et("computeItemKey"),s=et("isSeeking"),a=an("scrollHeight"),l=et("ItemComponent"),c=et("ListComponent"),u=et("ScrollSeekPlaceholder"),d=et("context"),f=an("itemDimensions"),h=an("gap"),p=et("log"),m=et("stateRestoreInProgress"),g=Tn(b.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;a(w);const y=v.firstChild;if(y){const{width:S,height:T}=y.getBoundingClientRect();f({width:S,height:T})}h({row:Jb("row-gap",getComputedStyle(v).rowGap,p),column:Jb("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:b.createElement(c,{ref:g,className:n,...nt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const w=i(v.index,v.data,d);return s?b.createElement(u,{key:w,...nt(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...nt(l,d),className:r,"data-index":v.index,key:w},o(v.index,v.data,d))}))}),hN=b.memo(function(){const t=et("HeaderComponent"),n=an("headerHeight"),r=et("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),pN=b.memo(function(){const t=et("FooterComponent"),n=an("footerHeight"),r=et("headerFooterTag"),o=Tn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,nt(t,i))):null}),mN=({children:e})=>{const t=b.useContext(Wb),n=an("itemDimensions"),r=an("viewportDimensions"),o=Tn(b.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:Ro(!1),ref:o},e)},gN=({children:e})=>{const t=b.useContext(Wb),n=an("windowViewportRect"),r=an("itemDimensions"),o=et("customScrollParent"),i=dd(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:i,style:Ro(!1)},e)},yN=b.memo(function({...t}){const n=et("useWindowScroll"),r=et("customScrollParent"),o=r||n?bN:vN,i=r||n?gN:mN;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(hN,null),b.createElement(fN,null),b.createElement(pN,null)))}),{Component:rV,usePublisher:an,useEmitterValue:et,useEmitter:Qb}=Zu(dN,{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"}},yN),vN=hd({usePublisher:an,useEmitterValue:et,useEmitter:Qb}),bN=pd({usePublisher:an,useEmitterValue:et,useEmitter:Qb});function Jb(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,qt.WARN),t==="normal"?0:parseInt(t??"0",10)}const wN=Ne(([e,t])=>({...e,...t}),Ye(jb,Ne(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X(fd),s=X($r),a=(l,c=null)=>Mt(q(o,se(u=>u[l]),qe()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),xN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),TN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),SN={overflowAnchor:"none"},EN=b.memo(function(){const t=Re("listState"),n=ln("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),i=ln("windowScrollContainerState"),s=ln("scrollContainerState"),a=o||r?i:s,l=Re("itemContent"),c=Re("trackItemSizes"),u=Re("itemSize"),d=Re("log"),{callbackRef:f,ref:h}=mb(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);vd("deviation",M=>{p!==M&&(h.current.style.marginTop=`${M}px`,m(M))});const g=Re("EmptyPlaceholder"),v=Re("ScrollSeekPlaceholder")||xN,w=Re("FillerRow")||TN,y=Re("TableBodyComponent"),S=Re("TableRowComponent"),T=Re("computeItemKey"),E=Re("isSeeking"),P=Re("paddingTopAddition"),D=Re("firstItemIndex"),_=Re("statefulTotalCount"),I=Re("context");if(_===0&&g)return b.createElement(g,nt(g,I));const V=t.offsetTop+P+p,F=t.offsetBottom,$=V>0?b.createElement(w,{height:V,key:"padding-top",context:I}):null,C=F>0?b.createElement(w,{height:F,key:"padding-bottom",context:I}):null,O=t.items.map(M=>{const L=M.originalIndex,H=T(L+D,M.data,I);return E?b.createElement(v,{...nt(v,I),key:H,index:M.index,height:M.size,type:M.type||"item"}):b.createElement(S,{...nt(S,I),...Ub(S,M.data),key:H,"data-index":L,"data-known-size":M.size,"data-item-index":M.index,style:SN},l(M.index,M.data,I))});return b.createElement(y,{ref:f,"data-testid":"virtuoso-item-list",...nt(y,I)},[$,...O,C])}),CN=({children:e})=>{const t=b.useContext(Ma),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=Tn(b.useMemo(()=>Ri(n,i=>on(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Ro(!1),ref:o,"data-viewport-type":"element"},e)},PN=({children:e})=>{const t=b.useContext(Ma),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=Re("customScrollParent"),i=dd(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Ro(!1),"data-viewport-type":"window"},e)},kN=b.memo(function(t){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=ln("fixedHeaderHeight"),i=ln("fixedFooterHeight"),s=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=Tn(b.useMemo(()=>Ri(o,w=>on(w,"height")),[o])),u=Tn(b.useMemo(()=>Ri(i,w=>on(w,"height")),[i])),d=r||n?AN:IN,f=r||n?PN:CN,h=Re("TableComponent"),p=Re("TableHeadComponent"),m=Re("TableFooterComponent"),g=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...nt(p,l)},s()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...nt(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(f,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...nt(h,l)},[g,b.createElement(EN,{key:"TableBody"}),v])))}),{Component:ON,usePublisher:ln,useEmitterValue:Re,useEmitter:vd}=Zu(wN,{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"}},kN),IN=hd({usePublisher:ln,useEmitterValue:Re,useEmitter:vd}),AN=pd({usePublisher:ln,useEmitterValue:Re,useEmitter:vd}),_N=ON,DN=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},MN={Item:b.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},NN=e=>{const t=b.useRef(null),n=DN(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(Li,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(sN,{height:n,useWindowScroll:!0,data:e.source,components:MN,itemContent:(r,o)=>x.jsx(b.Fragment,{children:x.jsx(Sv,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(xr,{children:x.jsx(Oc,{})})}),x.jsx("div",{})]})};var FN=Object.defineProperty,e0=Object.getOwnPropertySymbols,LN=Object.prototype.hasOwnProperty,VN=Object.prototype.propertyIsEnumerable,t0=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$N=(e,t)=>{for(var n in t||(t={}))LN.call(t,n)&&t0(e,n,t[n]);if(e0)for(var n of e0(t))VN.call(t,n)&&t0(e,n,t[n]);return e},bd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},RN=(e,t,n,r)=>Va(bd,e,t,n,r),jo=e=>typeof e=="object",mr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!jo(e)&&!jo(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>mr(e[r],t[r]))},jN=(e,t)=>(jo(e)||Array.isArray(e))&&t?e[t]:e,BN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,La=e=>/[0-9.]+/.test(e),n0=e=>["string","number"].includes(typeof e),r0=e=>e==null||(e==null?void 0:e.length)===0||e==="",o0={eq:mr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:r0,notEmpty:e=>!r0(e),in:(e,t)=>bd(t,n=>mr(e,n)),notIn:(e,t)=>i0(t,n=>!mr(e,n))},zN=e=>{if(e in o0)return o0[e];throw new Error("Linq - Symbol not found")},Bo=(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},Va=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=zN(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},WN=(e,t,n,r)=>Va(Bo,e,t,n,r),i0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},HN=(e,t,n,r)=>Va(i0,e,t,n,r),s0=e=>{if(e===null)return null;const t=$N({},e);return Object.keys(t).forEach(n=>t[n]=jo(e[n])?s0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},a0=(e,t)=>{if(jo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(mr(t,r))return!0}return!1},UN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},GN=e=>Bo(e,(t,n,r)=>jo(t)?n===r.findIndex(o=>mr(o,t)):n===r.indexOf(t)),YN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},l0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},qN=(e,t)=>l0(e,n=>n[t]),c0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},KN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},ZN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return La(e)&&La(t)?r.map(s=>Number.parseInt(s)):r},wd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&La(e)&&La(t)){const o=[],[i,s]=KN(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return ZN(e,t,r)},XN=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?wd(r,o,1):wd(r,i,Number.parseInt(o,10))}return n0(e)&&n0(t)?wd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},xd=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},u0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},QN=(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)},JN=(e,t,n,r)=>Va(QN,e,t,n,r),d0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(BN(t))},f0=(e=>(e.Asc="asc",e.Desc="desc",e))(f0||{}),eF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),tF=(e,t)=>e.sort(eF(t)),nF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Bo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},rF=class Xd{constructor(t=[]){this.array=t}static Range(...t){return XN(...t)}static New(t){return new Xd(t)}Where(t,n,r){return this.array=WN(this.array,t,n,r),this}Some(t,n,r){return RN(this.array,t,n,r)}All(t,n,r){return HN(this.array,t,n,r)}Reverse(){return this.array=u0(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=JN(this.array,t,n,r),this}Distinct(){return this.array=GN(this.array),this}First(t){return t===void 0?this.array[0]:YN(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?xd((n,r)=>n+r,0,this.array):xd((n,r)=>n+jN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return qN(this.array,t)}GroupWith(t){return l0(this.array,t)}Except(t){return Bo(this.array,n=>!a0(t,n))}Intersect(t){return Bo(this.array,n=>a0(t,n))}OrderBy(t,n){let r;return r=t?d0(this.array,t):this.array.toSorted(),this.array=n==="desc"?u0(r):r,this}Includes(t){return bd(this.array,n=>mr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return xd(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(c0(this.array,n=>[t,n]))}Zip(t,n){return c0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Bo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Xd(s0(this.array))}ToObject(t){return UN(this.array,t)}Sort(t){return Array.isArray(t)?tF(this.array,t):d0(this.array,t)}Unique(t){return nF(this.array,t)}},h0=rF,Td={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,v)=>{try{Object.keys(g).forEach(v)}catch(w){window.console.log(w)}},n=g=>g==null,r=g=>{const v=typeof g;return v==="string"||v==="number"||v==="boolean"||n(g)},o=(g,v)=>{const w=v.getItem(g);try{return JSON.parse(w)}catch{return w??null}},i=g=>Object.keys(g).reduce((v,w)=>({...v,[w]:o(w,g)}),{}),s=g=>g instanceof Date?g:typeof g=="number"?new Date(new Date*1+g*864e5):g,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(g=>g.split("=")).reduce((g,v)=>(g[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(v=>v(g))},d=[{name:"expires",parse:g=>`expires=${s(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${s(g.expires??a)}`:""},{name:"path",parse:g=>`path=${g.path??"/"}`},{name:"sameSite",parse:g=>`samesite=${g.sameSite??"strict"}`},{name:"useSecure",parse:g=>`${g.useSecure??!0?"secure":""}`},{name:"domain",parse:g=>{const v=g.domain??"";return v===""?"":`domain=${g.multiDomain?".":""}${v}`}},{name:"partitioned",parse:g=>g.partitioned?"Partitioned":""}],f={json:l,listener:g=>(c.add(g),()=>c.delete(g)),clearListeners:()=>c.clear(),has:g=>document.cookie.split(";").some(v=>v.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const v=f.json()[g];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,v,w={})=>{const y=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,E)=>{const P=E.parse(w);return P===""?T:T.concat(P)},[`${encodeURIComponent(g)}=${y}`]).join(";");document.cookie=S,u()}},h=g=>{const v=new Set,w=y=>{g().removeItem(y);const S=i(g());v.forEach(T=>T(S))};return{delete:w,listener:y=>(v.add(y),()=>v.delete(y)),clearListeners:()=>v.clear(),json:(y=!1)=>y?i(g()):g(),has:y=>{const S=g().getItem(y);return!n(S)},deleteAll:()=>{t(g(),w),v.forEach(y=>y(g()))},get:y=>o(y,g()),set:(y,S)=>{g().setItem(y,JSON.stringify(S)),v.forEach(T=>T(g()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Td);const Sd=e=>e.headerLabel??e.thead??e.id,Ed=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var zo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(zo||{});const Cd=e=>e.type==="number"?e.valueAsNumber:e.value,oF=e=>{let t=[];return e({add:(o,i,s)=>t.push({...s,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},iF={},sF=(e,t=iF)=>{const n=ma()?null:Td.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Uc({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const l=i.state(),c={...l,...a};return ma()||Td.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},Pd=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??zo.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:pa(),operation:a,label:Sd(e),name:o,type:i,value:"",...r}},kd=()=>{const e=Qt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{operationOptions:b.useMemo(()=>({[zo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[zo.Boolean]:[t.is,t.isNot],[zo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},aF=e=>{const t=Qt(),{operationOptions:n,operations:r}=kd(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,Pd(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>{if(u!==h.id)return h;const p=e.cols.find(m=>d===m.id);return Pd(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>h.id===u?{...h,operation:r[d]}:h))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(f=>f.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=Cd(c.target);e.set(f=>f.map(h=>h.id===u?{...h,value:d}:h))};return x.jsx(b.Fragment,{children:x.jsx(Do,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(OP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const u=n[c.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Vr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:i}),x.jsx(Vr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(Li,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),x.jsx("div",{className:"flex items-center justify-center mt-5",children:x.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:x.jsx(po,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableFilterNewFilter]})})]})})})},lF=({filter:e,onDelete:t,set:n})=>{const r=Qt(),{operationOptions:o,operations:i}=kd(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(f=>f.id===u?{...f,operation:i[c]}:f))},a=l=>{const c=l.target.dataset.id||"",u=Cd(l.target);n(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Vr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),x.jsx(Li,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(po,{className:"text-danger",size:14})})]})},cF=({item:e,onPointerDown:t})=>{const n=Or(0);return x.jsxs(zs.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(kP,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},uF=e=>{var a;const t=Ed(e.cols),n=gP(),[r,o]=b.useState(((a=e.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,d=c.options.selectedIndex,f=((m=c.options.item(d))==null?void 0:m.label)||"";o(f);const h=new h0(e.rows).GroupBy(u),p=e.cols.find(g=>g.id===u);e.setGroups(Ux(h).map((g,v)=>{const w=h[g];return{...p,groupId:pa(),groupKey:u,index:v,rows:w,groupName:g}}))},s=()=>e.setGroups([]);return x.jsx(b.Fragment,{children:x.jsxs(Do,{arrow:!1,title:"Groups",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(AP,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Vr,{value:r,title:"Tipo de agrupamento",onChange:i,options:t,placeholder:"Agrupar por..."}),x.jsx(xr,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:x.jsx(po,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(tP,{children:x.jsx(zs.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>x.jsx(cF,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},dF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),fF=(e,t)=>e.toSorted(dF(t)),p0=(e,t,n)=>({id:pa(),type:n,value:e.id,label:t}),hF=e=>{const t=Qt(),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,p0(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(b.Fragment,{children:x.jsx(Do,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(eg,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Vr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Vr,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(po,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableSortAddButton]})})]})})})},pF=e=>{const t=Qt(),[n,r]=b.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=p0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Sd(e.col);return x.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?x.jsx(xP,{size:14}):null,n==="desc"?x.jsx(wP,{size:14}):null,n==="undefined"?x.jsx(eg,{size:14}):null]})},mF=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(aF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(hF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(uF,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Cd(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function gF(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const yF=e=>{const t=b.useId(),n=Qt(),r=e.asLink||"button",o=b.useMemo(()=>gF(e.current,e.pages),[e.current,e.pages]),i=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(b.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:s=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(s.target.value))},children:e.sizes.map(s=>x.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(s=>s===null?null:x.jsx(b.Fragment,{children:typeof s=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:s,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${s===e.current?"text-primary border-primary":"border-transparent"}`,children:s})})},`pagination-${s}`)),i?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},vF={opacity:1},bF={opacity:.75,backgroundColor:"var(--table-border)"},wF={opacity:0,transition:{duration:.4,type:"spring"}},xF=e=>{var d;const t=Qt(),n=e.filters.filter(f=>f.name===e.header.id),o=n.length>0?DP:IP,{operationOptions:i,operations:s}=kd(),a=f=>{const h=f.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==h))},l=e.sorters.find(f=>e.header.id===f.value),c=l!=null&&l.type?l.type===f0.Asc?"ascending":"descending":"none",u=Sd(e.header);return x.jsx(zs.Item,{...e.header.thProps,as:"th",exit:wF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:bF,"aria-sort":c,"aria-busy":e.loading,animate:vF,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(Do,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),x.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(f=>x.jsx("li",{className:"my-1",children:x.jsx(lF,{onDelete:a,filter:f,set:e.setFilters})},`thead-filter-${f.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(f=>f.concat(Pd(e.header,i,s))),type:"button",className:"text-primary flex items-center gap-1",children:[x.jsx(Ic,{size:14})," ",t.tableFilterNewFilter]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),x.jsx(pF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},TF=e=>x.jsx(zs.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:x.jsx(Bs,{children:e.headers.map(t=>x.jsx(xF,{loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),SF=e=>Math.min(Math.max(e+e*(e%2===0?2:4)+10,50),90),EF=b.forwardRef((e,t)=>x.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Bs,{children:e.children})})),CF=b.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),PF=b.forwardRef(({context:e,...t},n)=>x.jsx("thead",{...t,role:"rowgroup",className:"bg-card-background shadow-xs group:sticky top-0",ref:n})),kF=b.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${n.className??""}`})),OF=b.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:x.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),IF={TableHead:PF,Table:CF,TableBody:EF,TableRow:kF,TableFoot:OF},AF=[0,0,0,0,0,0,0,0,0,0],_F=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(b.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=pv(t,i.id),c=i.Element;return b.createElement("td",{...i.cellProps,"data-matrix":a,role:"cell",key:`accessor-${e}-${s}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?x.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded",style:{width:`${SF(e)}%`}}):c?x.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):x.jsx(b.Fragment,{children:kn.nil(l)?"":l}))})})},DF=()=>x.jsx(b.Fragment,{}),m0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[f,h]=b.useState(!1),p=Yu(n),m=Yu(u.loadingMore),g=b.useMemo(()=>{if(u.loading)return AF;if(r)return u.rows;const v=new h0(u.rows);return e.length>0&&e.forEach(w=>w.value===""||Number.isNaN(w.value)?void 0:v.Where(w.name,w.operation.symbol,w.value)),s.length===0?v.Select():fF(v.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,w=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return w.observe(v),()=>w.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[x.jsx(_N,{data:g,useWindowScroll:!0,components:IF,totalCount:g.length,itemContent:_F,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?DF:null,fixedHeaderContent:()=>x.jsx(TF,{headers:a,sorters:s,filters:e,setCols:o,setSorters:c,setFilters:i,loading:!!u.loading})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(yF,{...t}):null]})},MF=(e,t)=>typeof t=="function"?t(e):t,NF=e=>{const t=e.operations??!0,n=b.useMemo(()=>Ed(e.cols),[e.cols]),[r,o]=Uc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const s=a=>l=>{const c=i.state();return{...c,[a]:MF(c[a],l)}};return{cols:s("cols"),filters:s("filters"),groups:s("groups"),sorters:s("sorters")}},{postMiddleware:[i=>{var s;return(s=e.set)==null||s.call(e,i),i}]});return x.jsxs("div",{className:"relative min-w-full",children:[t?x.jsx(mF,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?x.jsx(m0,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((i,s)=>x.jsx(Ht.div,{className:"min-w-full",children:x.jsx(m0,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:i,groups:r.groups,index:s,optionCols:n,options:n,rows:i.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${i.groupId}`))})]})},g0=(e="")=>Xe("w-full min-w-36 outline-none px-2 py-1 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Od=b.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),y0=b.forwardRef(({children:e,isParent:t,label:n,...r},o)=>{const i=lr(),s=i!==null,[a,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),h=b.useRef([]),p=b.useRef([]),m=b.useContext(Od),g=cr(),v=jA(),w=Fy(),{floatingStyles:y,refs:S,context:T}=Mi({nodeId:v,open:a,transform:!0,onOpenChange:l,whileElementsMounted:na,placement:s?"right-start":"bottom-start",middleware:[ia({mainAxis:s?0:4,alignmentAxis:s?-4:0}),fu(),du()]}),E=Fi(T,{role:"menu",enabled:!0}),P=Di(T,{bubbles:!0}),D=Wy(T,{enabled:!0,delay:{open:yv},handleClose:f_({blockPointerEvents:!0})}),_=xu(T,{event:"mousedown",toggle:!s,ignoreMouse:s,keyboardHandlers:!0}),I=cv(T,{loop:!0,activeIndex:d,virtual:!0,nested:s,allowEscape:!0,listRef:h,scrollItemIntoView:!0,onNavigate:f}),V=u_(T,{activeIndex:d,listRef:p,onMatch:a?f:void 0}),{getReferenceProps:F,getFloatingProps:$,getItemProps:C}=Ni([D,_,E,P,I,V]);b.useEffect(()=>{if(!g)return;const M=()=>l(!1),L=H=>{H.nodeId!==v&&H.parentId===i&&l(!1)};return g.events.on("click",M),g.events.on("menuopen",L),()=>{g.events.off("click",M),g.events.off("menuopen",L)}},[g,v,i]),b.useEffect(()=>{a&&g&&g.events.emit("menuopen",{parentId:i,nodeId:v})},[g,a,v,i]);const O=t?r.className:g0(r.className);return x.jsxs(BA,{id:v,children:[x.jsx(b.Fragment,{children:r.asChild?x.jsx(Eu,{children:n,ref:hu([S.setReference,w.ref,o]),tabIndex:s?m.activeIndex===w.index?0:-1:void 0,"data-open":a?"":void 0,"data-nested":s?"":void 0,role:s?"menuitem":void 0,"data-focus-inside":c?"":void 0,className:O,...F(m.getItemProps({...r,onFocus(M){var L;(L=r.onFocus)==null||L.call(r,M),u(!1),m.setHasFocusInside(!0)}}))}):x.jsxs("button",{ref:hu([S.setReference,w.ref,o]),tabIndex:s?m.activeIndex===w.index?0:-1:void 0,"data-open":a?"":void 0,"data-nested":s?"":void 0,role:s?"menuitem":void 0,"data-focus-inside":c?"":void 0,className:O,...F(m.getItemProps({...r,onFocus(M){var L;(L=r.onFocus)==null||L.call(r,M),u(!1),m.setHasFocusInside(!0)}})),children:[n,s&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(Oc,{size:14})]})]})}),x.jsx(Od.Provider,{value:{activeIndex:d,setActiveIndex:f,getItemProps:C,setHasFocusInside:u,isOpen:a},children:x.jsx(LA,{elementsRef:h,labelsRef:p,children:a&&x.jsx(_i,{preserveTabOrder:!0,children:x.jsx(fa,{context:T,modal:!1,initialFocus:s?-1:0,returnFocus:!s,children:x.jsx("div",{ref:S.setFloating,style:y,className:"isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",...$(),children:e})})})})})]})}),FF=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(Od),a=Fy({label:r?null:typeof e=="string"?e:t}),l=cr(),c=a.index===s.activeIndex;return x.jsxs("button",{...o,ref:hu([a.ref,i]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:g0(o.className),...s.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),s.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),LF=b.forwardRef((e,t)=>lr()!==null?x.jsx(y0,{...e,isParent:!1,ref:t}):x.jsx(zA,{children:x.jsx(y0,{...e,isParent:!0,ref:t})}));var VF=String.prototype.replace,$F=/%20/g,Id={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ad={default:Id.RFC3986,formatters:{RFC1738:function(e){return VF.call(e,$F,"+")},RFC3986:function(e){return String(e)}},RFC1738:Id.RFC1738,RFC3986:Id.RFC3986},RF=Ad,_d=Object.prototype.hasOwnProperty,Br=Array.isArray,En=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),jF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Br(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},v0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},BF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!_d.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Br(t)&&!Br(n)&&(o=v0(t,r)),Br(t)&&Br(n)?(n.forEach(function(i,s){if(_d.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return _d.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},zF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},WF=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}},Dd=1024,HF=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=Dd){for(var c=s.length>=Dd?s.slice(l,l+Dd):s,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||i===RF.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=En[f];continue}if(f<2048){u[u.length]=En[192|f>>6]+En[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=En[224|f>>12]+En[128|f>>6&63]+En[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=En[240|f>>18]+En[128|f>>12&63]+En[128|f>>6&63]+En[128|f&63]}a+=u.join("")}return a},UF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return jF(n),t},GF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},YF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},qF=function(t,n){return[].concat(t,n)},KF=function(t,n){if(Br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},b0={arrayToObject:v0,assign:zF,combine:qF,compact:UF,decode:WF,encode:HF,isBuffer:YF,isRegExp:GF,maybeMap:KF,merge:BF},w0=Ex,$a=b0,Zi=Ad,ZF=Object.prototype.hasOwnProperty,x0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Cn=Array.isArray,XF=Array.prototype.push,T0=function(e,t){XF.apply(e,Cn(t)?t:[t])},QF=Date.prototype.toISOString,S0=Zi.default,gt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:$a.encode,encodeValuesOnly:!1,format:S0,formatter:Zi.formatters[S0],indices:!1,serializeDate:function(t){return QF.call(t)},skipNulls:!1,strictNullHandling:!1},JF=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Md={},eL=function e(t,n,r,o,i,s,a,l,c,u,d,f,h,p,m,g,v,w){for(var y=t,S=w,T=0,E=!1;(S=S.get(Md))!==void 0&&!E;){var P=S.get(t);if(T+=1,typeof P<"u"){if(P===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Md)>"u"&&(T=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=h(y):r==="comma"&&Cn(y)&&(y=$a.maybeMap(y,function(k){return k instanceof Date?h(k):k})),y===null){if(s)return c&&!g?c(n,gt.encoder,v,"key",p):n;y=""}if(JF(y)||$a.isBuffer(y)){if(c){var D=g?n:c(n,gt.encoder,v,"key",p);return[m(D)+"="+m(c(y,gt.encoder,v,"value",p))]}return[m(n)+"="+m(String(y))]}var _=[];if(typeof y>"u")return _;var I;if(r==="comma"&&Cn(y))g&&c&&(y=$a.maybeMap(y,c)),I=[{value:y.length>0?y.join(",")||null:void 0}];else if(Cn(u))I=u;else{var V=Object.keys(y);I=d?V.sort(d):V}var F=l?n.replace(/\./g,"%2E"):n,$=o&&Cn(y)&&y.length===1?F+"[]":F;if(i&&Cn(y)&&y.length===0)return $+"[]";for(var C=0;C<I.length;++C){var O=I[C],M=typeof O=="object"&&typeof O.value<"u"?O.value:y[O];if(!(a&&M===null)){var L=f&&l?O.replace(/\./g,"%2E"):O,H=Cn(y)?typeof r=="function"?r($,L):$:$+(f?"."+L:"["+L+"]");w.set(t,T);var Y=w0();Y.set(Md,w),T0(_,e(M,H,r,o,i,s,a,l,r==="comma"&&g&&Cn(y)?null:c,u,d,f,h,p,m,g,v,Y))}}return _},tL=function(t){if(!t)return gt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.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||gt.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=Zi.default;if(typeof t.format<"u"){if(!ZF.call(Zi.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Zi.formatters[r],i=gt.filter;(typeof t.filter=="function"||Cn(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in x0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=gt.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:gt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:gt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:gt.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?gt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:gt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:gt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:gt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:gt.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:gt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:gt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gt.strictNullHandling}},nL=function(e,t){var n=e,r=tL(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Cn(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=x0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=w0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||T0(s,eL(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=s.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:""},Wo=b0,Nd=Object.prototype.hasOwnProperty,rL=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Wo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},oL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},E0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},iL="utf8=%26%2310003%3B",sL="utf8=%E2%9C%93",aL=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===sL?c="utf-8":s[l]===iL&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,ft.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ft.decoder,c,"key"),p=Wo.maybeMap(E0(u.slice(f+1),n),function(g){return n.decoder(g,ft.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=oL(p)),u.indexOf("[]=")>-1&&(p=rL(p)?[p]:p);var m=Nd.call(r,h);m&&n.duplicates==="combine"?r[h]=Wo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},lL=function(e,t,n,r){for(var o=r?t:E0(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},cL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&Nd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(i))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&Nd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),lL(u,n,r,o)}},uL=function(t){if(!t)return ft;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ft.charset:t.charset,r=typeof t.duplicates>"u"?ft.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ft.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ft.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ft.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ft.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ft.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ft.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ft.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ft.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ft.decoder,delimiter:typeof t.delimiter=="string"||Wo.isRegExp(t.delimiter)?t.delimiter:ft.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ft.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ft.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ft.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ft.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ft.strictNullHandling}},dL=function(e,t){var n=uL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?aL(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=cL(a,r[a],n,typeof e=="string");o=Wo.merge(o,l,n)}return n.allowSparse===!0?o:Wo.compact(o)},fL=nL,hL=dL,pL=Ad,mL={formats:pL,parse:hL,stringify:fL},ke;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(ke||(ke={}));var C0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(C0||(C0={}));const re=ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zr=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}},K=ke.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 en extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ke.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()}}en.create=e=>new en(e);const Xi=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ke.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${ke.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ke.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${ke.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ke.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,ke.assertNever(e)}return{message:n}};let gL=Xi;function Fd(){return gL}const Ld=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function ne(e,t){const n=Fd(),r=Ld({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Xi?void 0:Xi].filter(o=>!!o)});e.common.issues.push(r)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return Lt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Qi=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),P0=e=>e.status==="aborted",k0=e=>e.status==="dirty",Ra=e=>e.status==="valid",ja=e=>typeof Promise<"u"&&e instanceof Promise;function Ba(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 O0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var Ji,es;class Pn{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 I0=(e,t)=>{if(Ra(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 en(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=e;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return zr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:zr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Lt,ctx:{common:t.parent.common,data:t.data,parsedType:zr(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:zr(t)},i=this._parseSync({data:t,path:o.path,parent:o});return I0(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(ja(o)?o:Promise.resolve(o));return I0(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new jn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Bn.create(this,this._def)}nullable(){return Ur.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cn.create(this,this._def)}promise(){return rs.create(this,this._def)}or(t){return Ha.create([this,t],this._def)}and(t){return Ua.create(this,t,this._def)}transform(t){return new jn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Za({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new M0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Xa({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Qa.create(this,t)}readonly(){return Ja.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const yL=/^c[^\s-]{8,}$/i,vL=/^[0-9a-z]+$/,bL=/^[0-9A-HJKMNP-TV-Z]{26}$/,wL=/^[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,xL=/^[a-z0-9_-]{21}$/i,TL=/^[-+]?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)?)??$/,SL=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,EL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Vd;const CL=/^(?:(?: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])$/,PL=/^(([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})))$/,kL=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,A0="((\\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])))",OL=new RegExp(`^${A0}$`);function _0(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 IL(e){return new RegExp(`^${_0(e)}$`)}function AL(e){let t=`${A0}T${_0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _L(e,t){return!!((t==="v4"||!t)&&CL.test(e)||(t==="v6"||!t)&&PL.test(e))}class Vn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.string,received:i.parsedType}),me}const r=new Lt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?ne(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ne(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")SL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"email",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Vd||(Vd=new RegExp(EL,"u")),Vd.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"emoji",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")wL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"uuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")xL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"nanoid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")yL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"cuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")vL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"cuid2",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")bL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"ulid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ne(o,{validation:"url",code:K.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"regex",code:K.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?AL(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?OL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?IL(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{code:K.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?TL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"duration",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?_L(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"ip",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?kL.test(t.data)||(o=this._getOrReturnCtx(t,o),ne(o,{validation:"base64",code:K.invalid_string,message:i.message}),r.dirty()):ke.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new 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:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function DL(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class Wr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==re.number){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.number,received:i.parsedType}),me}let r;const o=new Lt;for(const i of this._def.checks)i.kind==="int"?ke.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?DL(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_finite,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Wr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Wr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ke.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)}}Wr.create=e=>new Wr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ho extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==re.bigint){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.bigint,received:i.parsedType}),me}let r;const o=new Lt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ne(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Ho({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Ho({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ho.create=e=>{var t;return new Ho({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class $d extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.boolean,received:r.parsedType}),me}return zt(t.data)}}$d.create=e=>new $d({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class ts extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_type,expected:re.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ne(i,{code:K.invalid_date}),me}const r=new Lt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ne(o,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ke.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ts({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ts.create=e=>new ts({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Rd extends xe{_parse(t){if(this._getType(t)!==re.symbol){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.symbol,received:r.parsedType}),me}return zt(t.data)}}Rd.create=e=>new Rd({typeName:he.ZodSymbol,...ye(e)});class za extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.undefined,received:r.parsedType}),me}return zt(t.data)}}za.create=e=>new za({typeName:he.ZodUndefined,...ye(e)});class Wa extends xe{_parse(t){if(this._getType(t)!==re.null){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.null,received:r.parsedType}),me}return zt(t.data)}}Wa.create=e=>new Wa({typeName:he.ZodNull,...ye(e)});class jd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}jd.create=e=>new jd({typeName:he.ZodAny,...ye(e)});class Uo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}Uo.create=e=>new Uo({typeName:he.ZodUnknown,...ye(e)});class gr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return ne(n,{code:K.invalid_type,expected:re.never,received:n.parsedType}),me}}gr.create=e=>new gr({typeName:he.ZodNever,...ye(e)});class Bd extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.void,received:r.parsedType}),me}return zt(t.data)}}Bd.create=e=>new Bd({typeName:he.ZodVoid,...ye(e)});class cn extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==re.array)return ne(n,{code:K.invalid_type,expected:re.array,received:n.parsedType}),me;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(ne(n,{code:s?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ne(n,{code:K.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ne(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Pn(n,s,n.path,a)))).then(s=>Lt.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Pn(n,s,n.path,a)));return Lt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cn({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new cn({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new cn({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}cn.create=(e,t)=>new cn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Go(e){if(e instanceof rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Bn.create(Go(r))}return new rt({...e._def,shape:()=>t})}else return e instanceof cn?new cn({...e._def,type:Go(e.element)}):e instanceof Bn?Bn.create(Go(e.unwrap())):e instanceof Ur?Ur.create(Go(e.unwrap())):e instanceof Rn?Rn.create(e.items.map(t=>Go(t))):e}class rt extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ke.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==re.object){const c=this._getOrReturnCtx(t);return ne(c,{code:K.invalid_type,expected:re.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof gr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Pn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof gr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(ne(o,{code:K.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Pn(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=>Lt.mergeObjectSync(r,c)):Lt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new rt({...this._def,catchall:t})}pick(t){const n={};return ke.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}omit(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}deepPartial(){return Go(this)}partial(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new rt({...this._def,shape:()=>n})}required(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Bn;)i=i._def.innerType;n[r]=i}}),new rt({...this._def,shape:()=>n})}keyof(){return D0(ke.objectKeys(this.shape))}}rt.create=(e,t)=>new rt({shape:()=>e,unknownKeys:"strip",catchall:gr.create(),typeName:he.ZodObject,...ye(t)}),rt.strictCreate=(e,t)=>new rt({shape:()=>e,unknownKeys:"strict",catchall:gr.create(),typeName:he.ZodObject,...ye(t)}),rt.lazycreate=(e,t)=>new rt({shape:e,unknownKeys:"strip",catchall:gr.create(),typeName:he.ZodObject,...ye(t)});class Ha extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new en(a.ctx.common.issues));return ne(n,{code:K.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new en(l));return ne(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Ha.create=(e,t)=>new Ha({options:e,typeName:he.ZodUnion,...ye(t)});const $n=e=>e instanceof Ya?$n(e.schema):e instanceof jn?$n(e.innerType()):e instanceof qa?[e.value]:e instanceof Hr?e.options:e instanceof Ka?ke.objectValues(e.enum):e instanceof Za?$n(e._def.innerType):e instanceof za?[void 0]:e instanceof Wa?[null]:e instanceof Bn?[void 0,...$n(e.unwrap())]:e instanceof Ur?[null,...$n(e.unwrap())]:e instanceof M0||e instanceof Ja?$n(e.unwrap()):e instanceof Xa?$n(e._def.innerType):[];class zd extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.object)return ne(n,{code:K.invalid_type,expected:re.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const s=$n(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new zd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Wd(e,t){const n=zr(e),r=zr(t);if(e===t)return{valid:!0,data:e};if(n===re.object&&r===re.object){const o=ke.objectKeys(t),i=ke.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Wd(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===re.array&&r===re.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=Wd(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===re.date&&r===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ua extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(P0(i)||P0(s))return me;const a=Wd(i.value,s.value);return a.valid?((k0(i)||k0(s))&&n.dirty(),{status:n.value,value:a.data}):(ne(r,{code:K.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ua.create=(e,t,n)=>new Ua({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Rn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.array)return ne(r,{code:K.invalid_type,expected:re.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return ne(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(ne(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Pn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Lt.mergeArray(n,s)):Lt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Rn({...this._def,rest:t})}}Rn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Ga extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.object)return ne(r,{code:K.invalid_type,expected:re.object,received:r.parsedType}),me;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new Pn(r,a,r.path,a)),value:s._parse(new Pn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Lt.mergeObjectAsync(n,o):Lt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Ga({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Ga({keyType:Vn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Hd extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.map)return ne(r,{code:K.invalid_type,expected:re.map,received:r.parsedType}),me;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Pn(r,a,r.path,[c,"key"])),value:i._parse(new Pn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Hd.create=(e,t,n)=>new Hd({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Yo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.set)return ne(r,{code:K.invalid_type,expected:re.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ne(r,{code:K.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ne(r,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Pn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new Yo({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new Yo({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Yo.create=(e,t)=>new Yo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class ns extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.function)return ne(n,{code:K.invalid_type,expected:re.function,received:n.parsedType}),me;function r(a,l){return Ld({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),Xi].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Ld({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),Xi].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof rs){const a=this;return zt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new en([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ns({...this._def,args:Rn.create(t).rest(Uo.create())})}returns(t){return new ns({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ns({args:t||Rn.create([]).rest(Uo.create()),returns:n||Uo.create(),typeName:he.ZodFunction,...ye(r)})}}class Ya extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ya.create=(e,t)=>new Ya({getter:e,typeName:he.ZodLazy,...ye(t)});class qa extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ne(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}qa.create=(e,t)=>new qa({value:e,typeName:he.ZodLiteral,...ye(t)});function D0(e,t){return new Hr({values:e,typeName:he.ZodEnum,...ye(t)})}class Hr extends xe{constructor(){super(...arguments),Ji.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{expected:ke.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Ba(this,Ji)||O0(this,Ji,new Set(this._def.values)),!Ba(this,Ji).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ne(n,{received:n.data,code:K.invalid_enum_value,options:r}),me}return zt(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 Hr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Hr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ji=new WeakMap,Hr.create=D0;class Ka extends xe{constructor(){super(...arguments),es.set(this,void 0)}_parse(t){const n=ke.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==re.string&&r.parsedType!==re.number){const o=ke.objectValues(n);return ne(r,{expected:ke.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Ba(this,es)||O0(this,es,new Set(ke.getValidEnumValues(this._def.values))),!Ba(this,es).has(t.data)){const o=ke.objectValues(n);return ne(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}es=new WeakMap,Ka.create=(e,t)=>new Ka({values:e,typeName:he.ZodNativeEnum,...ye(t)});class rs extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.promise&&n.common.async===!1)return ne(n,{code:K.invalid_type,expected:re.promise,received:n.parsedType}),me;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}rs.create=(e,t)=>new rs({type:e,typeName:he.ZodPromise,...ye(t)});class jn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{ne(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?Qi(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Qi(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ra(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ra(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);ke.assertNever(o)}}jn.create=(e,t,n)=>new jn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),jn.createWithPreprocess=(e,t,n)=>new jn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Bn extends xe{_parse(t){return this._getType(t)===re.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bn.create=(e,t)=>new Bn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Ur extends xe{_parse(t){return this._getType(t)===re.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ur.create=(e,t)=>new Ur({innerType:e,typeName:he.ZodNullable,...ye(t)});class Za extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Za.create=(e,t)=>new Za({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Xa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ja(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Xa.create=(e,t)=>new Xa({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Ud extends xe{_parse(t){if(this._getType(t)!==re.nan){const r=this._getOrReturnCtx(t);return ne(r,{code:K.invalid_type,expected:re.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Ud.create=e=>new Ud({typeName:he.ZodNaN,...ye(e)});class M0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Qa extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),Qi(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Qa({in:t,out:n,typeName:he.ZodPipeline})}}class Ja extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ra(o)&&(o.value=Object.freeze(o.value)),o);return ja(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ja.create=(e,t)=>new Ja({innerType:e,typeName:he.ZodReadonly,...ye(t)}),rt.lazycreate;var he;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(he||(he={})),Vn.create,Wr.create,Ud.create,Ho.create,$d.create,ts.create,Rd.create,za.create,Wa.create,jd.create,Uo.create,gr.create,Bd.create,cn.create,rt.create,rt.strictCreate,Ha.create,zd.create,Ua.create,Rn.create,Ga.create,Hd.create,Yo.create,ns.create,Ya.create,qa.create,Hr.create,Ka.create,rs.create,jn.create,Bn.create,Ur.create,jn.createWithPreprocess,Qa.create;const ML={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},N0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return mL.parse(n.toString(),ML)},F0=e=>e.replace("[",".").replace("]","").split("."),os=(e,t)=>F0(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof cn?o.element:o},t),is=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,NL=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},i=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},s=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},a=(u,d)=>{const f=os(u,e);return{...d,name:u,id:u,required:!f.isOptional(),type:kn.instance(f,Wr)?"number":(d==null?void 0:d.type)??"text",error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}};b.useEffect(()=>{const u=Object.values(r.current).map(f=>{const h=f.element.dataset.origin?document.querySelector(`[data-target=${f.element.name}]`):f.element,p=f.schema.safeParse(is(h)),m=g=>{const v=h.dataset.target||h.name;if(!v)return;console.log(g);const w=is(g.target)||(g.relatedTarget?is(g.relatedTarget):""),y=f.schema.safeParse(w);if(console.log({name:v,value:w,validation:y}),y.success)return h.setCustomValidity(""),n(S=>{const{[v]:T,...E}=S||{};return E===null||kn.empty(E)?null:E});if(h.required){const S=y.error.issues[0].message;h.setCustomValidity(S),n(T=>({...T,[v]:S}))}};return h.addEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m),{input:f,hasInitialError:h.required?!p.success:!1,unsubscribe:()=>{h.removeEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m)}}});return u.some(f=>f.hasInitialError)&&n(f=>f===null?{}:f),()=>u.forEach(f=>f.unsubscribe())});const l=b.useCallback(u=>d=>{const f=d.currentTarget,h=Object.values(r.current).reduce((m,g)=>{const v=g.element,w=g.schema.safeParse(is(v));if(v.dataset.ignore==="ignore"||w.success)return m;const y=w.error.issues[0].message;v.setAttribute("data-initialized","true");const S=v.dataset.name||v.name||"";return{...m,[S]:y}},{}),p=kn.empty(h)?null:h;n(p),u==null||u({form:f,errors:p||{}})},[]),c=b.useCallback(u=>d=>{d.preventDefault();const f=d.currentTarget;let h=N0(f);Array.from(f.elements).forEach(m=>{if(m.tagName==="SELECT"){const g=m;h=Zf(h,g.name,g.value)}if(m.tagName==="INPUT"){const g=m;h=Zf(h,g.name,is(g))}});const p=e.safeParse(h);return p.success?u({form:f,json:h,data:p.data,event:d,reset:()=>Gu(f),success:!0,errors:[]}):u({form:f,json:h,event:d,data:h,success:!1,reset:()=>Gu(f),errors:p.error.issues.map(m=>({message:m.message,path:m.path.map(g=>String(g))}))})},[]);return{input:a,datepicker:o,checkbox:s,select:i,onSubmit:c,errors:t,onInvalid:l,disabled:t!==null}},FL={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},LL={name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 75%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 85%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},VL={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>)`},ss=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(ss(s,t,n,a))},[]),L0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:L0(s,t,n,a)}},{}),V0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Gd=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},$L={default:e=>Gd(e,{result:V0.default}),dark:e=>Gd(e,{result:V0.dark})},RL=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=ss(e.colors,n),o=ss(e.spacing,n),i=ss(e.rounded,n);return Gd(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=FP,ee.Autocomplete=F_,ee.Button=xr,ee.ButtonGroup=O1,ee.Calendar=ny,ee.Card=ry,ee.Checkbox=Sv,ee.ColType=zo,ee.Collapse=sg,ee.ComponentsProvider=__,ee.DatePicker=V_,ee.Dropdown=Do,ee.FileUpload=KD,ee.Form=XD,ee.Input=Li,ee.InputFeedback=xv,ee.InputField=ya,ee.Menu=LF,ee.MenuItem=FF,ee.Modal=mv,ee.Option=Tv,ee.Polymorph=no,ee.Radiobox=QD,ee.Select=Vr,ee.Stats=wI,ee.Switch=JD,ee.Tab=A_,ee.Table=NF,ee.Tabs=O_,ee.Tag=A1,ee.Tooltip=vv,ee.TransferList=NN,ee.convertPath=F0,ee.createColumns=oF,ee.createDesignTokens=L0,ee.createOptionCols=Ed,ee.createStyles=$L,ee.createTheme=RL,ee.css=Xe,ee.defaultDarkTheme=FL,ee.defaultLightTheme=LL,ee.dispatchInput=ys,ee.formReset=Gu,ee.formToJson=N0,ee.getSchemaShape=os,ee.initializeInputDataset=vs,ee.isReactComponent=C1,ee.isReactFC=P1,ee.isSsr=ma,ee.mergeRefs=Ol,ee.parsers=VL,ee.path=pv,ee.reduceTokens=ss,ee.safeRegex=Pu,ee.useForm=NL,ee.usePrevious=bv,ee.useReactive=oy,ee.useTablePreferences=sF,ee.useTranslations=Qt,ee.uuid=pa,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
195
+ */var Ru,Kv;function wM(){if(Kv)return Ru;Kv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ru=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Ru}var Bu,Zv;function zu(){if(Zv)return Bu;Zv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bu=e,Bu}var Wu,Xv;function Qv(){return Xv||(Xv=1,Wu=Function.call.bind(Object.prototype.hasOwnProperty)),Wu}var Hu,Jv;function xM(){if(Jv)return Hu;Jv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=zu(),n={},r=Qv();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Hu=o,Hu}var Uu,eb;function SM(){if(eb)return Uu;eb=1;var e=qv(),t=wM(),n=zu(),r=Qv(),o=xM(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Uu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(A){var R=A&&(c&&A[c]||A[u]);if(typeof R=="function")return R}var f="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:g,element:T(),elementType:S(),instanceOf:E,node:C(),objectOf:k,oneOf:O,oneOfType:I,shape:D,exact:L};function p(A,R){return A===R?A!==0||1/A===1/R:A!==A&&R!==R}function m(A,R){this.message=A,this.data=R&&typeof R=="object"?R:{},this.stack=""}m.prototype=Error.prototype;function v(A){if(process.env.NODE_ENV!=="production")var R={},Z=0;function ne(G,F,B,W,j,Y,se){if(W=W||f,Y=Y||B,se!==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 Pe=W+":"+B;!R[Pe]&&Z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` 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."),R[Pe]=!0,Z++)}}return F[B]==null?G?F[B]===null?new m("The "+j+" `"+Y+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+j+" `"+Y+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:A(F,B,W,j,Y)}var Q=ne.bind(null,!1);return Q.isRequired=ne.bind(null,!0),Q}function y(A){function R(Z,ne,Q,G,F,B){var W=Z[ne],j=N(W);if(j!==A){var Y=$(W);return new m("Invalid "+G+" `"+F+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return v(R)}function x(){return v(s)}function g(A){function R(Z,ne,Q,G,F){if(typeof A!="function")return new m("Property `"+F+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var B=Z[ne];if(!Array.isArray(B)){var W=N(B);return new m("Invalid "+G+" `"+F+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var j=0;j<B.length;j++){var Y=A(B,j,Q,G,F+"["+j+"]",n);if(Y instanceof Error)return Y}return null}return v(R)}function T(){function A(R,Z,ne,Q,G){var F=R[Z];if(!a(F)){var B=N(F);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+B+"` supplied to `"+ne+"`, expected a single ReactElement."))}return null}return v(A)}function S(){function A(R,Z,ne,Q,G){var F=R[Z];if(!e.isValidElementType(F)){var B=N(F);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+B+"` supplied to `"+ne+"`, expected a single ReactElement type."))}return null}return v(A)}function E(A){function R(Z,ne,Q,G,F){if(!(Z[ne]instanceof A)){var B=A.name||f,W=U(Z[ne]);return new m("Invalid "+G+" `"+F+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+B+"`."))}return null}return v(R)}function O(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function R(Z,ne,Q,G,F){for(var B=Z[ne],W=0;W<A.length;W++)if(p(B,A[W]))return null;var j=JSON.stringify(A,function(se,H){var Pe=$(H);return Pe==="symbol"?String(H):H});return new m("Invalid "+G+" `"+F+"` of value `"+String(B)+"` "+("supplied to `"+Q+"`, expected one of "+j+"."))}return v(R)}function k(A){function R(Z,ne,Q,G,F){if(typeof A!="function")return new m("Property `"+F+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var B=Z[ne],W=N(B);if(W!=="object")return new m("Invalid "+G+" `"+F+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var j in B)if(r(B,j)){var Y=A(B,j,Q,G,F+"."+j,n);if(Y instanceof Error)return Y}return null}return v(R)}function I(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var R=0;R<A.length;R++){var Z=A[R];if(typeof Z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(Z)+" at index "+R+"."),s}function ne(Q,G,F,B,W){for(var j=[],Y=0;Y<A.length;Y++){var se=A[Y],H=se(Q,G,F,B,W,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&j.push(H.data.expectedType)}var Pe=j.length>0?", expected one of type ["+j.join(", ")+"]":"";return new m("Invalid "+B+" `"+W+"` supplied to "+("`"+F+"`"+Pe+"."))}return v(ne)}function C(){function A(R,Z,ne,Q,G){return P(R[Z])?null:new m("Invalid "+Q+" `"+G+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return v(A)}function V(A,R,Z,ne,Q){return new m((A||"React class")+": "+R+" type `"+Z+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function D(A){function R(Z,ne,Q,G,F){var B=Z[ne],W=N(B);if(W!=="object")return new m("Invalid "+G+" `"+F+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var j in A){var Y=A[j];if(typeof Y!="function")return V(Q,G,F,j,$(Y));var se=Y(B,j,Q,G,F+"."+j,n);if(se)return se}return null}return v(R)}function L(A){function R(Z,ne,Q,G,F){var B=Z[ne],W=N(B);if(W!=="object")return new m("Invalid "+G+" `"+F+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var j=t({},Z[ne],A);for(var Y in j){var se=A[Y];if(r(A,Y)&&typeof se!="function")return V(Q,G,F,Y,$(se));if(!se)return new m("Invalid "+G+" `"+F+"` key `"+Y+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(Z[ne],null," ")+`
196
+ Valid keys: `+JSON.stringify(Object.keys(A),null," "));var H=se(B,Y,Q,G,F+"."+Y,n);if(H)return H}return null}return v(R)}function P(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(P);if(A===null||a(A))return!0;var R=d(A);if(R){var Z=R.call(A),ne;if(R!==A.entries){for(;!(ne=Z.next()).done;)if(!P(ne.value))return!1}else for(;!(ne=Z.next()).done;){var Q=ne.value;if(Q&&!P(Q[1]))return!1}}else return!1;return!0;default:return!1}}function _(A,R){return A==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function N(A){var R=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":_(R,A)?"symbol":R}function $(A){if(typeof A>"u"||A===null)return""+A;var R=N(A);if(R==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return R}function z(A){var R=$(A);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function U(A){return!A.constructor||!A.constructor.name?f:A.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Uu}var Gu,tb;function TM(){if(tb)return Gu;tb=1;var e=zu();function t(){}function n(){}return n.resetWarningCache=t,Gu=function(){function r(s,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 i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Gu}if(process.env.NODE_ENV!=="production"){var EM=qv(),CM=!0;ju.exports=SM()(EM.isElement,CM)}else ju.exports=TM()();var PM=ju.exports;const We=rw(PM);function Ro(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Bo(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function nb(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function rb(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var kM=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function zi(e,t){var n=IM(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 IM(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=kM.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var OM=[".DS_Store","Thumbs.db"];function AM(e){return Ro(this,void 0,void 0,function(){return Bo(this,function(t){return xa(e)&&_M(e.dataTransfer)?[2,FM(e.dataTransfer,e.type)]:MM(e)?[2,DM(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,NM(e)]:[2,[]]})})}function _M(e){return xa(e)}function MM(e){return xa(e)&&xa(e.target)}function xa(e){return typeof e=="object"&&e!==null}function DM(e){return Yu(e.target.files).map(function(t){return zi(t)})}function NM(e){return Ro(this,void 0,void 0,function(){var t;return Bo(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return zi(r)})]}})})}function FM(e,t){return Ro(this,void 0,void 0,function(){var n,r;return Bo(this,function(o){switch(o.label){case 0:return e.items?(n=Yu(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(LM))]):[3,2];case 1:return r=o.sent(),[2,ob(ib(r))];case 2:return[2,ob(Yu(e.files).map(function(i){return zi(i)}))]}})})}function ob(e){return e.filter(function(t){return OM.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 LM(e){if(typeof e.webkitGetAsEntry!="function")return sb(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ab(t):sb(e)}function ib(e){return e.reduce(function(t,n){return rb(rb([],nb(t),!1),nb(Array.isArray(n)?ib(n):[n]),!1)},[])}function sb(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=zi(t);return Promise.resolve(n)}function VM(e){return Ro(this,void 0,void 0,function(){return Bo(this,function(t){return[2,e.isDirectory?ab(e):$M(e)]})})}function ab(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return Ro(s,void 0,void 0,function(){var l,c,u;return Bo(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(VM)),o.push(u),i(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function $M(e){return Ro(this,void 0,void 0,function(){return Bo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=zi(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var jM=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function lb(e){return zM(e)||BM(e)||fb(e)||RM()}function RM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zM(e){if(Array.isArray(e))return qu(e)}function cb(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 ub(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cb(Object(n),!0).forEach(function(r){db(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function db(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wi(e,t){return UM(e)||HM(e,t)||fb(e,t)||WM()}function WM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
198
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fb(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 HM(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function UM(e){if(Array.isArray(e))return e}var GM="file-invalid-type",YM="file-too-large",qM="file-too-small",KM="too-many-files",ZM=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:GM,message:"File type must be ".concat(n)}},hb=function(t){return{code:YM,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},pb=function(t){return{code:qM,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},XM={code:KM,message:"Too many files"};function mb(e,t){var n=e.type==="application/x-moz-file"||jM(e,t);return[n,n?null:ZM(t)]}function gb(e,t,n){if(Fr(e.size))if(Fr(t)&&Fr(n)){if(e.size>n)return[!1,hb(n)];if(e.size<t)return[!1,pb(t)]}else{if(Fr(t)&&e.size<t)return[!1,pb(t)];if(Fr(n)&&e.size>n)return[!1,hb(n)]}return[!0,null]}function Fr(e){return e!=null}function QM(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=mb(l,n),u=Wi(c,1),d=u[0],f=gb(l,r,o),h=Wi(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function Sa(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ta(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 yb(e){e.preventDefault()}function JM(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function eD(e){return e.indexOf("Edge/")!==-1}function tD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return JM(e)||eD(e)}function xn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!Sa(r)&&a&&a.apply(void 0,[r].concat(i)),Sa(r)})}}function nD(){return"showOpenFilePicker"in window}function rD(e){if(Fr(e)){var t=Object.entries(e).filter(function(n){var r=Wi(n,2),o=r[0],i=r[1],s=!0;return vb(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(bb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Wi(r,2),i=o[0],s=o[1];return ub(ub({},n),{},db({},i,s))},{});return[{description:"Files",accept:t}]}return e}function oD(e){if(Fr(e))return Object.entries(e).reduce(function(t,n){var r=Wi(n,2),o=r[0],i=r[1];return[].concat(lb(t),[o],lb(i))},[]).filter(function(t){return vb(t)||bb(t)}).join(",")}function iD(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function sD(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function vb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function bb(e){return/^.*\.[\w]+$/.test(e)}var aD=["children"],lD=["open"],cD=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],uD=["refKey","onChange","onClick"];function dD(e){return pD(e)||hD(e)||wb(e)||fD()}function fD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pD(e){if(Array.isArray(e))return Zu(e)}function Ku(e,t){return yD(e)||gD(e,t)||wb(e,t)||mD()}function mD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wb(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 gD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function yD(e){if(Array.isArray(e))return e}function xb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xb(Object(n),!0).forEach(function(r){Xu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ea(e,t){if(e==null)return{};var n=vD(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Qu=b.forwardRef(function(e,t){var n=e.children,r=Ea(e,aD),o=Tb(r),i=o.open,s=Ea(o,lD);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(Je(Je({},s),{},{open:i})))});Qu.displayName="Dropzone";var Sb={disabled:!1,getFilesFromEvent:AM,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Qu.defaultProps=Sb,Qu.propTypes={children:We.func,accept:We.objectOf(We.arrayOf(We.string)),multiple:We.bool,preventDropOnDocument:We.bool,noClick:We.bool,noKeyboard:We.bool,noDrag:We.bool,noDragEventsBubbling:We.bool,minSize:We.number,maxSize:We.number,maxFiles:We.number,disabled:We.bool,getFilesFromEvent:We.func,onFileDialogCancel:We.func,onFileDialogOpen:We.func,useFsAccessApi:We.bool,autoFocus:We.bool,onDragEnter:We.func,onDragLeave:We.func,onDragOver:We.func,onDrop:We.func,onDropAccepted:We.func,onDropRejected:We.func,onError:We.func,validator:We.func};var Ju={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Tb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Je(Je({},Sb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,O=t.noDragEventsBubbling,k=t.onError,I=t.validator,C=b.useMemo(function(){return oD(n)},[n]),V=b.useMemo(function(){return rD(n)},[n]),D=b.useMemo(function(){return typeof v=="function"?v:Eb},[v]),L=b.useMemo(function(){return typeof m=="function"?m:Eb},[m]),P=b.useRef(null),_=b.useRef(null),N=b.useReducer(bD,Ju),$=Ku(N,2),z=$[0],U=$[1],A=z.isFocused,R=z.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&y&&nD()),ne=function(){!Z.current&&R&&setTimeout(function(){if(_.current){var ae=_.current.files;ae.length||(U({type:"closeDialog"}),L())}},300)};b.useEffect(function(){return window.addEventListener("focus",ne,!1),function(){window.removeEventListener("focus",ne,!1)}},[_,R,L,Z]);var Q=b.useRef([]),G=function(ae){P.current&&P.current.contains(ae.target)||(ae.preventDefault(),Q.current=[])};b.useEffect(function(){return g&&(document.addEventListener("dragover",yb,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",yb),document.removeEventListener("drop",G))}},[P,g]),b.useEffect(function(){return!r&&x&&P.current&&P.current.focus(),function(){}},[P,x,r]);var F=b.useCallback(function(J){k?k(J):console.error(J)},[k]),B=b.useCallback(function(J){J.preventDefault(),J.persist(),Ie(J),Q.current=[].concat(dD(Q.current),[J.target]),Ta(J)&&Promise.resolve(o(J)).then(function(ae){if(!(Sa(J)&&!O)){var _e=ae.length,Xe=_e>0&&QM({files:ae,accept:C,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:I}),It=_e>0&&!Xe;U({isDragAccept:Xe,isDragReject:It,isDragActive:!0,type:"setDraggedFiles"}),c&&c(J)}}).catch(function(ae){return F(ae)})},[o,c,F,O,C,s,i,a,l,I]),W=b.useCallback(function(J){J.preventDefault(),J.persist(),Ie(J);var ae=Ta(J);if(ae&&J.dataTransfer)try{J.dataTransfer.dropEffect="copy"}catch{}return ae&&d&&d(J),!1},[d,O]),j=b.useCallback(function(J){J.preventDefault(),J.persist(),Ie(J);var ae=Q.current.filter(function(Xe){return P.current&&P.current.contains(Xe)}),_e=ae.indexOf(J.target);_e!==-1&&ae.splice(_e,1),Q.current=ae,!(ae.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ta(J)&&u&&u(J))},[P,u,O]),Y=b.useCallback(function(J,ae){var _e=[],Xe=[];J.forEach(function(It){var Ft=mb(It,C),$t=Ku(Ft,2),Ur=$t[0],ei=$t[1],ti=gb(It,s,i),nl=Ku(ti,2),tf=nl[0],nf=nl[1],rf=I?I(It):null;if(Ur&&tf&&!rf)_e.push(It);else{var of=[ei,nf];rf&&(of=of.concat(rf)),Xe.push({file:It,errors:of.filter(function(vV){return vV})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(It){Xe.push({file:It,errors:[XM]})}),_e.splice(0)),U({acceptedFiles:_e,fileRejections:Xe,type:"setFiles"}),f&&f(_e,Xe,ae),Xe.length>0&&p&&p(Xe,ae),_e.length>0&&h&&h(_e,ae)},[U,a,C,s,i,l,f,h,p,I]),se=b.useCallback(function(J){J.preventDefault(),J.persist(),Ie(J),Q.current=[],Ta(J)&&Promise.resolve(o(J)).then(function(ae){Sa(J)&&!O||Y(ae,J)}).catch(function(ae){return F(ae)}),U({type:"reset"})},[o,Y,F,O]),H=b.useCallback(function(){if(Z.current){U({type:"openDialog"}),D();var J={multiple:a,types:V};window.showOpenFilePicker(J).then(function(ae){return o(ae)}).then(function(ae){Y(ae,null),U({type:"closeDialog"})}).catch(function(ae){iD(ae)?(L(ae),U({type:"closeDialog"})):sD(ae)?(Z.current=!1,_.current?(_.current.value=null,_.current.click()):F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):F(ae)});return}_.current&&(U({type:"openDialog"}),D(),_.current.value=null,_.current.click())},[U,D,L,y,Y,F,V,a]),Pe=b.useCallback(function(J){!P.current||!P.current.isEqualNode(J.target)||(J.key===" "||J.key==="Enter"||J.keyCode===32||J.keyCode===13)&&(J.preventDefault(),H())},[P,H]),it=b.useCallback(function(){U({type:"focus"})},[]),Ue=b.useCallback(function(){U({type:"blur"})},[]),st=b.useCallback(function(){T||(tD()?setTimeout(H,0):H())},[T,H]),de=function(ae){return r?null:ae},Ee=function(ae){return S?null:de(ae)},ce=function(ae){return E?null:de(ae)},Ie=function(ae){O&&ae.stopPropagation()},ht=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=J.refKey,_e=ae===void 0?"ref":ae,Xe=J.role,It=J.onKeyDown,Ft=J.onFocus,$t=J.onBlur,Ur=J.onClick,ei=J.onDragEnter,ti=J.onDragOver,nl=J.onDragLeave,tf=J.onDrop,nf=Ea(J,cD);return Je(Je(Xu({onKeyDown:Ee(xn(It,Pe)),onFocus:Ee(xn(Ft,it)),onBlur:Ee(xn($t,Ue)),onClick:de(xn(Ur,st)),onDragEnter:ce(xn(ei,B)),onDragOver:ce(xn(ti,W)),onDragLeave:ce(xn(nl,j)),onDrop:ce(xn(tf,se)),role:typeof Xe=="string"&&Xe!==""?Xe:"presentation"},_e,P),!r&&!S?{tabIndex:0}:{}),nf)}},[P,Pe,it,Ue,st,B,W,j,se,S,E,r]),Oe=b.useCallback(function(J){J.stopPropagation()},[]),pt=b.useMemo(function(){return function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=J.refKey,_e=ae===void 0?"ref":ae,Xe=J.onChange,It=J.onClick,Ft=Ea(J,uD),$t=Xu({accept:C,multiple:a,type:"file",style:{display:"none"},onChange:de(xn(Xe,se)),onClick:de(xn(It,Oe)),tabIndex:-1},_e,_);return Je(Je({},$t),Ft)}},[_,n,a,se,r]);return Je(Je({},z),{},{isFocused:A&&!r,getRootProps:ht,getInputProps:pt,rootRef:P,inputRef:_,open:de(H)})}function bD(e,t){switch(t.type){case"focus":return Je(Je({},e),{},{isFocused:!0});case"blur":return Je(Je({},e),{},{isFocused:!1});case"openDialog":return Je(Je({},Ju),{},{isFileDialogActive:!0});case"closeDialog":return Je(Je({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Je(Je({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Je(Je({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Je({},Ju);default:return e}}function Eb(){}const wD={isImage:e=>e.type.includes("image")},xD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(wD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Hv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Hv(e.file.size)})},[e.file]),t.type==="img"?w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-jade-200 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(qn,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(mo,{})})]}):w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[w.jsx(tk,{size:48}),w.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(qn,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(mo,{className:"text-danger"})})]})},SD=e=>w.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>w.jsx(xD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),TD=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(SD,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(b.Fragment,{children:e.idle}),ED=w.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[w.jsx(sk,{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"})]})]}),CD=({idle:e=ED,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=d=>{n==null||n(d),i(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Tb({onDrop:s});return w.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[w.jsx("input",{...l(r),name:r.name,id:r.name}),w.jsx(TD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},PD=["INPUT","SELECT"],ed=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{PD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},kD=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})},ID=({children:e,className:t="",size:n,...r})=>w.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[w.jsx("input",{...r,type:"radio",className:Be("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),Lr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const v=zt(),y=b.useRef(null),x=p.id??p.name;b.useImperativeHandle(m,()=>y.current),b.useEffect(()=>{if(y.current===null)return;const T=y.current,S=Ss(y.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const g=()=>{var T;return(T=y.current)==null?void 0:T.focus()};return w.jsx(ba,{container:Be("group inline-block w-full",c),error:h,feedback:o,hideLeft:u,left:f,info:n,optionalText:l,rightLabel:a,interactive:s,form:p.form,id:p.name||p.id,name:p.name,labelClassName:i,title:p.title,placeholder:p.placeholder,required:e,right:w.jsx("label",{htmlFor:x,children:w.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(yg,{size:20}),w.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:x,name:x,value:p.value,required:e,ref:Al(m,y),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Be("input appearance-none select group h-10 py-1 px-2 w-full flex-1 rounded-md bg-transparent text-foreground placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>w.jsx("option",{...T,children:T.label??T.value},`${x}-select-option-${T.value}`))]})})}),td=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},OD=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),l=s,c=b.useRef(null),u=td(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const 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=f=>{var m;const p=f.target.dataset.checked!=="true";a(p),(m=r==null?void 0:r.onCheck)==null||m.call(r,p),c.current!==null&&(xs(c.current,p.toString()),c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:Be("flex flex-wrap items-center",t),children:[w.jsx("input",{...r,id:r.id||i,ref:c,hidden:!0,type:"checkbox",checked:l,onChange:f=>a(f.target.checked)}),w.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"duration-300 ease-in-out relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:w.jsx("span",{"aria-hidden":"true","data-checked":l,className:"duration-300 duration-300 ease-in-out inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),w.jsx("label",{htmlFor:r.id||i,className:"inline-block ml-3 text-sm",id:`${i}-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})]})}),Ca=0,fr=1,zo=2,Cb=4;function Hi(e,t){return n=>e(t(n))}function AD(e,t){return t(e)}function Pb(e,t){return n=>e(t,n)}function kb(e,t){return()=>e(t)}function Pa(e,t){return t(e),e}function Ke(...e){return e}function _D(e){e()}function Ib(e){return()=>e}function MD(...e){return()=>{e.map(_D)}}function nd(e){return e!==void 0}function Vr(){}function je(e,t){return e(fr,t)}function be(e,t){e(Ca,t)}function rd(e){e(zo)}function Dt(e){return e(Cb)}function ue(e,t){return je(e,Pb(t,Ca))}function Sn(e,t){const n=e(fr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case zo:e.splice(0,e.length);return;case fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Ca:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case fr:o(t);break;case Ca:t=o;break;case Cb:return t}return n(r,o)}}function DD(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case fr:return i?n===i?void 0:(r(),n=i,t=je(e,i),t):(r(),Vr);case zo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Kt(e){return Pa(Ce(),t=>ue(e,t))}function Nt(e,t){return Pa(X(t),n=>ue(e,n))}function ND(...e){return t=>e.reduceRight(AD,t)}function q(e,...t){const n=ND(...t);return(r,o)=>{switch(r){case fr:return je(e,n(o));case zo:rd(e);return}}}function Ob(e,t){return e===t}function Ze(e=Ob){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function ie(e){return t=>Hi(t,e)}function Tn(e){return t=>()=>t(e)}function En(e,t){return n=>r=>n(t=e(t,r))}function Wo(e){return t=>n=>{e>0?e--:t(n)}}function hr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ab(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);je(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function _b(...e){return function(t,n){switch(t){case fr:return MD(...e.map(r=>je(r,n)));case zo:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=Ob){return q(e,Ze(t))}function wt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);je(i,l=>{n[s]=l,r=r|a,r===o&&be(t,n)})}),function(i,s){switch(i){case fr:return r===o&&s(n),je(t,s);case zo:return rd(t);default:throw new Error(`unrecognized action ${i}`)}}}function Fe(e,t=[],{singleton:n}={singleton:!0}){return{id:FD(),constructor:e,dependencies:t,singleton:n}}const FD=()=>Symbol();function LD(e){const t=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=o(i.map(l=>n(l)));return s&&t.set(r,a),a};return n(e)}function VD(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n}const ka=typeof document<"u"?b.useLayoutEffect:b.useEffect;function od(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=b.createContext({});function l(y,x){y.propsReady&&be(y.propsReady,!1);for(const g of r){const T=y[t.required[g]];be(T,x[g])}for(const g of o)if(g in x){const T=y[t.optional[g]];be(T,x[g])}y.propsReady&&be(y.propsReady,!0)}function c(y){return i.reduce((x,g)=>(x[g]=T=>{const S=y[t.methods[g]];be(S,T)},x),{})}function u(y){return s.reduce((x,g)=>(x[g]=DD(y[t.events[g]]),x),{})}const d=b.forwardRef((y,x)=>{const{children:g,...T}=y,[S]=b.useState(()=>Pa(LD(e),O=>l(O,T))),[E]=b.useState(kb(u,S));return ka(()=>{for(const O of s)O in T&&je(E[O],T[O]);return()=>{Object.values(E).map(rd)}},[T,E,S]),ka(()=>{l(S,T)}),b.useImperativeHandle(x,Ib(c(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,VD([...r,...o,...s],T),g):g)}),f=y=>b.useCallback(Pb(be,b.useContext(a)[y]),[y]),h=y=>{const g=b.useContext(a)[y],T=b.useCallback(S=>je(g,S),[g]);return b.useSyncExternalStore(T,()=>Dt(g),()=>Dt(g))},p=y=>{const g=b.useContext(a)[y],[T,S]=b.useState(kb(Dt,g));return ka(()=>je(g,E=>{E!==T&&S(Ib(E))}),[g,T]),T},m=b.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(y,x)=>{const T=b.useContext(a)[y];ka(()=>je(T,x),[x,T])}}}const $D=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Zt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Zt||{});const jD={0:"debug",1:"log",2:"warn",3:"error"},RD=()=>typeof globalThis>"u"?window:globalThis,pr=Fe(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=RD().VIRTUOSO_LOG_LEVEL)!=null?i:Dt(e);o>=s&&console[jD[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function id(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&e(s)})}),[e]);r=i=>{i&&t?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function Cn(e,t=!0){return id(e,t).callbackRef}function Mb(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=BD(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=s?s.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),i==null||i(zD("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return id(a,n)}function BD(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Zt.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function zD(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zt.WARN),t==="normal"?0:parseInt(t??"0",10)}function on(e,t){return Math.round(e.getBoundingClientRect()[t])}function Db(e,t){return Math.abs(e-t)<1.01}function Nb(e,t,n,r=Vr,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,v=h?window.innerHeight:f.offsetHeight,y=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?y():af.flushSync(y),s.current!==null&&(p===s.current||p<=0||p===m-v)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||i.current;return r(o||i.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(d){const f=i.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,v;f===window?(m=Math.max(on(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=f.scrollHeight,p=on(f,"height"),v=f.scrollTop);const y=m-p;if(d.top=Math.ceil(Math.max(Math.min(y,d.top),0)),Db(p,m)||d.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(s.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,f.scrollTo(d)}function u(d){i.current.scrollBy(d)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const Lt=Fe(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),i=Ce(),s=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),f=Ce(),h=X(!1);return ue(q(e,ie(({scrollTop:p})=>p)),t),ue(q(e,ie(({scrollHeight:p})=>p)),s),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Ui={lvl:0};function Fb(e,t,n,r=Ui,o=Ui){return{k:e,v:t,lvl:n,l:r,r:o}}function He(e){return e===Ui}function Ho(){return Ui}function sd(e,t){if(He(e))return Ui;const{k:n,l:r,r:o}=e;if(t===n){if(He(r))return o;if(He(o))return r;{const[i,s]=Lb(r);return Ia(gt(e,{k:i,v:s,l:Vb(r)}))}}else return t<n?Ia(gt(e,{l:sd(r,t)})):Ia(gt(e,{r:sd(o,t)}))}function Gi(e,t){if(!He(e))return t===e.k?e.v:t<e.k?Gi(e.l,t):Gi(e.r,t)}function sn(e,t,n="k"){if(He(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=sn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return sn(e.l,t,n)}function Xt(e,t,n){return He(e)?Fb(t,n,1):t===e.k?gt(e,{k:t,v:n}):t<e.k?$b(gt(e,{l:Xt(e.l,t,n)})):$b(gt(e,{r:Xt(e.r,t,n)}))}function ad(e,t,n){if(He(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(ad(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(ad(s,t,n))),a}function $r(e){return He(e)?[]:[...$r(e.l),{k:e.k,v:e.v},...$r(e.r)]}function Lb(e){return He(e.r)?[e.k,e.v]:Lb(e.r)}function Vb(e){return He(e.r)?e.l:Ia(gt(e,{r:Vb(e.r)}))}function gt(e,t){return Fb(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function ld(e){return He(e)||e.lvl>e.r.lvl}function $b(e){return cd(Rb(e))}function Ia(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(ld(t))return Rb(gt(e,{lvl:r-1}));if(!He(t)&&!He(t.r))return gt(t.r,{l:gt(t,{r:t.r.l}),r:gt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(ld(e))return cd(gt(e,{lvl:r-1}));if(!He(n)&&!He(n.l)){const o=n.l,i=ld(o)?n.lvl-1:n.lvl;return gt(o,{l:gt(e,{r:o.l,lvl:r-1}),r:cd(gt(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Oa(e,t,n){if(He(e))return[];const r=sn(e,t)[0];return WD(ad(e,r,n))}function jb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function WD(e){return jb(e,({k:t,v:n})=>({index:t,value:n}))}function cd(e){const{r:t,lvl:n}=e;return!He(t)&&!He(t.r)&&t.lvl===n&&t.r.lvl===n?gt(t,{l:gt(e,{r:t.l}),lvl:n+1}):e}function Rb(e){const{l:t}=e;return!He(t)&&t.lvl===e.lvl?gt(t,{r:gt(e,{l:t.r})}):e}function Aa(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Bb(e,t,n){return e[Aa(e,t,n)]}function HD(e,t,n,r){const o=Aa(e,t,r),i=Aa(e,n,r,o);return e.slice(o,i+1)}const ud=Fe(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function UD(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 zb(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 GD(e,t){let n=He(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),He(e)){e=Xt(e,0,o);continue}const a=Oa(e,i-1,s+1);if(a.some(UD(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(s>=u||o===f)&&(e=sd(e,u)):(c=f!==o,l=!0),d>s&&s>=u&&f!==o&&(e=Xt(e,s+1,f));c&&(e=Xt(e,i,o))}return[e,n]}function YD(){return{offsetTree:[],sizeTree:Ho(),groupOffsetTree:Ho(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function dd({index:e},t){return t===e?0:t<e?-1:1}function qD({offset:e},t){return t===e?0:t<e?-1:1}function KD(e){return{index:e.index,value:e}}function ZD(e,t,n,r=0){return r>0&&(t=Math.max(t,Bb(e,r,dd).offset)),jb(HD(e,t,n,qD),KD)}function fd(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Aa(o,t-1,dd),a=o[l].offset;const u=sn(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===sn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Oa(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({offset:f,size:u,index:c}),i=c,a=f,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function XD(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Zt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&He(i)&&t.length===2){const f=t[0].size,h=t[1].size;s=n.reduce((p,m)=>Xt(Xt(p,m,f),m+1,h),s)}else[s,a]=GD(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=fd(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Xt(f,h,Yi(h,l,o)),Ho()),groupIndices:n}}function Yi(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=Bb(t,e,dd),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function QD(e){return typeof e.groupIndex<"u"}function Wb(e,t,n){if(QD(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=Hb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function Hb(e,t){if(!_a(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _a(e){return!He(e.groupOffsetTree)}function JD(e){return $r(e).map(({k:t,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const eN={offsetHeight:"height",offsetWidth:"width"},Pn=Fe(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Nt(r,0),i=Ce(),s=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((S,E)=>on(S,eN[E])),f=X(void 0),h=X(0),p=YD(),m=Nt(q(n,we(l,e,h),En(XD,p),Ze()),p),v=Nt(q(l,Ze(),En((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),ie(({prev:S})=>S)),[]);ue(q(l,pe(S=>S.length>0),we(m,h),ie(([S,E,O])=>{const k=S.reduce((I,C,V)=>Xt(I,C,Yi(C,E.offsetTree,O)||V),Ho());return{...E,groupIndices:S,groupOffsetTree:k}})),m),ue(q(r,we(m),pe(([S,{lastIndex:E}])=>S<E),ie(([S,{lastIndex:E,lastSize:O}])=>[{startIndex:S,endIndex:E,size:O}])),n),ue(c,u);const y=Nt(q(c,ie(S=>S===void 0)),!0);ue(q(u,pe(S=>S!==void 0&&He(Dt(m).sizeTree)),ie(S=>[{startIndex:0,endIndex:0,size:S}])),n);const x=Kt(q(n,we(m),En(({sizes:S},[E,O])=>({changed:O!==S,sizes:O}),{changed:!1,sizes:p}),ie(S=>S.changed)));je(q(a,En((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),ie(S=>S.diff)),S=>{const{groupIndices:E}=Dt(m);if(S>0)be(t,!0),be(i,S+zb(S,E));else if(S<0){const O=Dt(v);O.length>0&&(S-=zb(-S,O)),be(s,S)}}),je(q(a,we(e)),([S,E])=>{S<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Zt.ERROR)});const g=Kt(i);ue(q(i,we(m),ie(([S,E])=>{const O=E.groupIndices.length>0,k=[],I=E.lastSize;if(O){const C=Gi(E.sizeTree,0);let V=0,D=0;for(;V<S;){const _=E.groupIndices[D],N=E.groupIndices.length===D+1?1/0:E.groupIndices[D+1]-_-1;k.push({startIndex:_,endIndex:_,size:C}),k.push({startIndex:_+1,endIndex:_+1+N-1,size:I}),D++,V+=N+1}const L=$r(E.sizeTree);return V!==S&&L.shift(),L.reduce((_,{k:N,v:$})=>{let z=_.ranges;return _.prevSize!==0&&(z=[..._.ranges,{startIndex:_.prevIndex,endIndex:N+S-1,size:_.prevSize}]),{ranges:z,prevIndex:N+S,prevSize:$}},{ranges:k,prevIndex:S,prevSize:0}).ranges}return $r(E.sizeTree).reduce((C,{k:V,v:D})=>({ranges:[...C.ranges,{startIndex:C.prevIndex,endIndex:V+S-1,size:C.prevSize}],prevIndex:V+S,prevSize:D}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Kt(q(s,we(m,h),ie(([S,{offsetTree:E},O])=>{const k=-S;return Yi(k,E,O)})));return ue(q(s,we(m,h),ie(([S,E,O])=>{if(E.groupIndices.length>0){if(He(E.sizeTree))return E;let I=Ho();const C=Dt(v);let V=0,D=0,L=0;for(;V<-S;){L=C[D];const _=C[D+1]-L-1;D++,V+=_+1}if(I=$r(E.sizeTree).reduce((_,{k:N,v:$})=>Xt(_,Math.max(0,N+S),$),I),V!==-S){const _=Gi(E.sizeTree,L);I=Xt(I,0,_);const N=sn(E.sizeTree,-S+1)[1];I=Xt(I,1,N)}return{...E,sizeTree:I,...fd(E.offsetTree,0,I,O)}}else{const I=$r(E.sizeTree).reduce((C,{k:V,v:D})=>Xt(C,Math.max(0,V+S),D),Ho());return{...E,sizeTree:I,...fd(E.offsetTree,0,I,O)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:y,itemSize:d}},Ke(pr,ud),{singleton:!0}),tN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Ub(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!tN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const qi=Fe(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=X(0);let v=null,y=null,x=null;function g(){v&&(v(),v=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),be(o,!1)}return ue(q(h,we(e,i,t,m,l,c,f),we(r,u,d),ie(([[T,S,E,O,k,I,C,V],D,L,P])=>{const _=Ub(T),{align:N,behavior:$,offset:z}=_,U=O-1,A=Wb(_,S,U);let R=Yi(A,S.offsetTree,D)+I;N==="end"?(R+=L+sn(S.sizeTree,A)[1]-E+P,A===U&&(R+=C)):N==="center"?R+=(L+sn(S.sizeTree,A)[1]-E+P)/2:R-=k,z&&(R+=z);const Z=ne=>{g(),ne?(V("retrying to scroll to",{location:T},Zt.DEBUG),be(h,T)):(be(p,!0),V("list did not change, scroll successful",{},Zt.DEBUG))};if(g(),$==="smooth"){let ne=!1;x=je(n,Q=>{ne=ne||Q}),v=Sn(a,()=>{Z(ne)})}else v=Sn(q(n,nN(150)),Z);return y=setTimeout(()=>{g()},1200),be(o,!0),V("scrolling from index to",{index:A,top:R,behavior:$},Zt.DEBUG),{top:R,behavior:$}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ke(Pn,Lt,pr),{singleton:!0});function nN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Ki="up",Zi="down",rN="none",oN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},iN=0,Xi=Fe(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(iN),f=Nt(q(_b(q(ge(t),Wo(1),Tn(!0)),q(ge(t),Wo(1),Tn(!1),Ab(100))),Ze()),!1),h=Nt(q(_b(q(i,Tn(!0)),q(i,Tn(!1),Ab(200))),Ze()),!1);ue(q(wt(ge(t),ge(d)),ie(([x,g])=>x<=g),Ze()),a),ue(q(a,hr(50)),c);const p=Kt(q(wt(e,ge(n),ge(r),ge(o),ge(u)),En((x,[{scrollTop:g,scrollHeight:T},S,E,O,k])=>{const I=g+S-T>-k,C={viewportHeight:S,scrollTop:g,scrollHeight:T};if(I){let D,L;return g>x.state.scrollTop?(D="SCROLLED_DOWN",L=x.state.scrollTop-g):(D="SIZE_DECREASED",L=x.state.scrollTop-g||x.scrollTopDelta),{atBottom:!0,state:C,atBottomBecause:D,scrollTopDelta:L}}let V;return C.scrollHeight>x.state.scrollHeight?V="SIZE_INCREASED":S<x.state.viewportHeight?V="VIEWPORT_HEIGHT_DECREASING":g<x.state.scrollTop?V="SCROLLING_UPWARDS":V="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:V,state:C}},oN),Ze((x,g)=>x&&x.atBottom===g.atBottom))),m=Nt(q(e,En((x,{scrollTop:g,scrollHeight:T,viewportHeight:S})=>{if(Db(x.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+S)<1;return x.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:x.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(x=>x.changed),ie(x=>x.jump)),0);ue(q(p,ie(x=>x.atBottom)),s),ue(q(s,hr(50)),l);const v=X(Zi);ue(q(e,ie(({scrollTop:x})=>x),Ze(),En((x,g)=>Dt(h)?{direction:x.direction,prevScrollTop:g}:{direction:g<x.prevScrollTop?Ki:Zi,prevScrollTop:g},{direction:Zi,prevScrollTop:0}),ie(x=>x.direction)),v),ue(q(e,hr(50),Tn(rN)),v);const y=X(0);return ue(q(f,pe(x=>!x),Tn(0)),y),ue(q(t,hr(100),we(f),pe(([x,g])=>!!g),En(([x,g],[T])=>[g,T],[0,0]),ie(([x,g])=>g-x)),y),{isScrolling:f,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:y,lastJumpDueToItemResize:m}},Ke(Lt)),mr=Fe(([{log:e}])=>{const t=X(!1),n=Kt(q(t,pe(r=>r),Ze()));return je(t,r=>{r&&Dt(e)("props updated",{},Zt.DEBUG)}),{propsReady:t,didMount:n}},Ke(pr),{singleton:!0});function hd(e,t){e==0?t():requestAnimationFrame(()=>hd(e-1,t))}function pd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Qi=Fe(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(s,we(l),pe(([u,d])=>!!d),Tn(!1)),a),ue(q(s,we(l),pe(([u,d])=>!!d),Tn(!1)),c),je(q(wt(t,s),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!He(f)||nd(h))&&!d&&!p),we(l)),([,u])=>{Sn(i,()=>{be(c,!0)}),hd(4,()=>{Sn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ke(Pn,Lt,qi,mr),{singleton:!0});function Gb(e){return e?e==="smooth"?"smooth":"auto":!1}const sN=(e,t)=>typeof e=="function"?Gb(e(t)):t&&Gb(e),aN=Fe(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let f=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}je(q(wt(q(ge(e),Wo(1)),a),we(ge(u),n,i,c),ie(([[m,v],y,x,g,T])=>{let S=v&&g,E="auto";return S&&(E=sN(y,x||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{f&&(f(),f=null),f=Sn(t,()=>{Dt(l)("following output to ",{totalCount:m},Zt.DEBUG),h(v),f=null})});function p(m){const v=Sn(r,y=>{m&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Dt(l)("scrolling to bottom due to increased size",{},Zt.DEBUG),h("auto"))});setTimeout(v,100)}return je(q(wt(ge(u),e,s),pe(([m,,v])=>m&&v),En(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Dt(i)&&p(m!==!1)}),je(d,()=>{p(Dt(u)!==!1)}),je(wt(ge(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ke(Pn,Xi,qi,Qi,mr,pr,Lt));function lN(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Yb=Fe(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Ce(),s=Ce(),a=Kt(q(i,ie(lN)));return ue(q(a,ie(l=>l.totalCount)),e),ue(q(a,ie(l=>l.groupIndices)),t),ue(q(wt(r,n,o),pe(([l,c])=>_a(c)),ie(([l,c,u])=>sn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ze(),ie(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Ke(Pn,Lt));function Ji(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function qb(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Ma="top",Da="bottom",Kb="none";function Zb(e,t,n){return typeof e=="number"?n===Ki&&t===Ma||n===Zi&&t===Da?e:0:n===Ki?t===Ma?e.main:e.reverse:t===Da?e.main:e.reverse}function Xb(e,t){return typeof e=="number"?e:e[t]||0}const md=Fe(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Ce(),s=X(0),a=X(0),l=X(0),c=Nt(q(wt(ge(e),ge(t),ge(r),ge(i,Ji),ge(l),ge(s),ge(o),ge(n),ge(a)),ie(([u,d,f,[h,p],m,v,y,x,g])=>{const T=u-x,S=v+y,E=Math.max(f-T,0);let O=Kb;const k=Xb(g,Ma),I=Xb(g,Da);return h-=x,h+=f+y,p+=f+y,p-=x,h>u+S-k&&(O=Ki),p<u-E+d+I&&(O=Zi),O!==Kb?[Math.max(T-f-Zb(m,Ma,O)-k,0),T-E-y+d+Zb(m,Da,O)+I]:null}),pe(u=>u!=null),Ze(Ji)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Ke(Lt),{singleton:!0});function cN(e,t,n){if(_a(t)){const r=Hb(e,t);return[{index:sn(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const gd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Qb(e,t,n){if(e.length===0)return[];if(!_a(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=Oa(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Na(e,t,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*s+(d-1)*r,h=c,p=f-u;return{items:Qb(e,o,i),topItems:Qb(t,o,i),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function Jb(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=pd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:i[d+l]}));return Na(c,[],a,o,n,r)}const jr=Fe(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=X([]),v=X(0),y=Ce();ue(i.topItemsIndexes,m);const x=Nt(q(wt(h,p,ge(s,Ji),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,O,,k,,,,,,,I])=>{const C=I&&I.length!==k;return E&&!O&&!C}),ie(([,,[E,O],k,I,C,V,D,L,P,_])=>{const N=I,{sizeTree:$,offsetTree:z}=N,U=Dt(v);if(k===0)return{...gd,totalCount:k};if(E===0&&O===0)return U===0?{...gd,totalCount:k}:Jb(U,C,I,L,P,_||[]);if(He($))return U>0?null:Na(cN(pd(C,k),N,_),[],k,P,N,L);const A=[];if(D.length>0){const G=D[0],F=D[D.length-1];let B=0;for(const W of Oa($,G,F)){const j=W.value,Y=Math.max(W.start,G),se=Math.min(W.end,F);for(let H=Y;H<=se;H++)A.push({index:H,size:j,offset:B,data:_&&_[H]}),B+=j}}if(!V)return Na([],A,k,P,N,L);const R=D.length>0?D[D.length-1]+1:0,Z=ZD(z,E,O,R);if(Z.length===0)return null;const ne=k-1,Q=Pa([],G=>{for(const F of Z){const B=F.value;let W=B.offset,j=F.start;const Y=B.size;if(B.offset<E){j+=Math.floor((E-B.offset+P)/(Y+P));const H=j-F.start;W+=H*Y+H*P}j<R&&(W+=(R-j)*Y,j=R);const se=Math.min(F.end,ne);for(let H=j;H<=se&&!(W>=O);H++)G.push({index:H,size:Y,offset:W,data:_&&_[H]}),W+=Y+P}});return Na(Q,A,k,P,N,L)}),pe(E=>E!==null),Ze()),gd);ue(q(n,pe(nd),ie(E=>E==null?void 0:E.length)),t),ue(q(x,ie(E=>E.topListHeight)),d),ue(d,l),ue(q(x,ie(E=>[E.top,E.bottom])),a),ue(q(x,ie(E=>E.items)),y);const g=Kt(q(x,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},O])=>E[E.length-1].originalIndex===O-1),ie(([,E,O])=>[E-1,O]),Ze(Ji),ie(([E])=>E))),T=Kt(q(x,hr(200),pe(({items:E,topItems:O})=>E.length>0&&E[0].originalIndex===O.length),ie(({items:E})=>E[0].index),Ze())),S=Kt(q(x,pe(({items:E})=>E.length>0),ie(({items:E})=>{let O=0,k=E.length-1;for(;E[O].type==="group"&&O<k;)O++;for(;E[k].type==="group"&&k>O;)k--;return{startIndex:E[O].index,endIndex:E[k].index}}),Ze(qb)));return{listState:x,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:S,itemsRendered:y,initialItemCount:v,...f}},Ke(Pn,Yb,md,Qi,qi,Xi,mr,ud),{singleton:!0}),uN=Fe(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ue(q(a,we(i),pe(([,l])=>l!==0),we(o,e,t,r,n),ie(([[,l],c,u,d,f,h=[]])=>Jb(l,c,u,d,f,h))),s),{}),Ke(Pn,Qi,jr,mr),{singleton:!0}),e0=Fe(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,we(r,t,n),pe(([o,i])=>!!i),ie(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),Ze()),t),je(q(wt(t,e,n),we(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ke(Xi),{singleton:!0}),dN=Fe(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,pe(n=>n>0),ie(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ke(jr)),t0=Fe(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Ce(),s=Nt(q(wt(e,r,t,n,o),ie(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(ge(s),i),{totalListHeight:s,totalListHeightChanged:i}},Ke(Lt,jr),{singleton:!0});function n0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const fN=n0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),hN=Fe(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Kt(q(l,we(a),En(([,y,x,g],[{items:T,totalCount:S,bottom:E,offsetBottom:O},k])=>{const I=E+O;let C=0;return x===S&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(C=I-g,C!==0&&(C+=k))),[C,T,S,I]},[0,[],0,0]),pe(([y])=>y!==0),we(t,s,r,i,h,p),pe(([,y,x,g,,,T])=>!T&&!g&&y!==0&&x===Ki),ie(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},Zt.DEBUG),y))));function v(y){y>0?(be(e,{top:-y,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-y,behavior:"auto"}))}return je(q(m,we(n,o)),([y,x,g])=>{g&&fN()?be(n,x-y):v(-y)}),je(q(wt(Nt(o,!1),n,p),pe(([y,x,g])=>!y&&!g&&x!==0),ie(([y,x])=>x),hr(1)),v),ue(q(u,ie(y=>({top:-y}))),e),je(q(c,we(d,f),ie(([y,{lastSize:x,groupIndices:g,sizeTree:T},S])=>{function E(O){return O*(x+S)}if(g.length===0)return E(y);{let O=0;const k=Gi(T,0);let I=0,C=0;for(;I<y;){I++,O+=k;let V=g.length===C+1?1/0:g[C+1]-g[C]-1;I+V>y&&(O-=k,V=y-I+1),I+=V,O+=E(V),C++}return O}})),y=>{be(n,y),requestAnimationFrame(()=>{be(e,{top:y}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ke(Lt,Xi,jr,Pn,pr,ud)),pN=Fe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return je(q(e,we(r),pe(([,o])=>o!==0),ie(([,o])=>({top:o}))),o=>{Sn(q(n,Wo(1),pe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ke(mr,Lt,jr),{singleton:!0}),mN=Fe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=Nt(q(wt(n,e,t),pe(([o])=>o),ie(([,o,i])=>Math.max(0,o-i)),hr(0),Ze()),0);return{alignToBottom:n,paddingTopAddition:r}},Ke(Lt,t0),{singleton:!0}),yd=Fe(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),i=X(!1),s=X(void 0);return ue(q(wt(n,r),ie(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,we(r),ie(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ke(Lt)),gN=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>e<n?{...s,behavior:o,align:i??"start"}:t>r?{...s,behavior:o,align:i??"end"}:null,yN=Fe(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,we(e,o,t,i,s,a,r),we(n),ie(([[d,f,h,p,m,v,y,x],g])=>{const{done:T,behavior:S,align:E,calculateViewLocation:O=gN,...k}=d,I=Wb(d,f,p-1),C=Yi(I,f.offsetTree,g)+m+v,V=C+sn(f.sizeTree,I)[1],D=x+v,L=x+h-y,P=O({itemTop:C,itemBottom:V,viewportTop:D,viewportBottom:L,locationParams:{behavior:S,align:E,...k}});return P?T&&Sn(q(l,pe(_=>_===!1),Wo(Dt(l)?1:2)),T):T&&T(),P}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ke(Pn,Lt,qi,jr,pr),{singleton:!0}),vN=Fe(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),f=X(null);return ue(a,d),ue(l,f),je(q(c,we(e,n,s,d,f,r)),([h,p,m,v,y,x,g])=>{const T=JD(p.sizeTree);v&&y!==null&&x!==null&&(m=y.scrollTop-x.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),ue(q(u,pe(nd),ie(bN)),o),ue(q(i,we(u),pe(([,h])=>h!==void 0),Ze(),ie(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ke(Pn,Lt,Qi,mr,yd));function bN(e){return{offset:e.scrollTop,index:0,align:"start"}}const wN=Fe(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),Ke(md,uN,mr,e0,t0,pN,mN,yd,yN,pr)),r0=Fe(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,v,y,{listState:x,topItemsIndexes:g,...T},{scrollToIndex:S},E,{topItemCount:O},{groupCounts:k},I])=>(ue(T.rangeChanged,I.scrollSeekRangeChanged),ue(q(I.windowViewportRect,ie(C=>C.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:O,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:u,...y,statefulTotalCount:c,listState:x,scrollToIndex:S,trackItemSizes:o,itemSize:i,groupIndices:l,...T,...I,...m,sizes:d,...v}),Ke(Pn,Qi,Lt,vN,aN,jr,qi,hN,dN,Yb,wN)),vd="-webkit-sticky",o0="sticky",i0=n0(()=>{if(typeof document>"u")return o0;const e=document.createElement("div");return e.style.position=vd,e.style.position===vd?vd:o0});function bd(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const 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:i}=id(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),o}const Fa=b.createContext(void 0),s0=b.createContext(void 0);function wd(e){return e}const xN=Fe(([e,t])=>({...e,...t}),Ke(r0,Fe(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(wd),i=X("div"),s=X(Vr),a=(l,c=null)=>Nt(q(r,ie(u=>u[l]),Ze()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),SN=({height:e})=>b.createElement("div",{style:{height:e}}),TN={position:i0(),zIndex:1,overflowAnchor:"none"},EN={overflowAnchor:"none"},a0=b.memo(function({showTopList:t=!1}){const n=Te("listState"),r=en("sizeRanges"),o=Te("useWindowScroll"),i=Te("customScrollParent"),s=en("windowScrollContainerState"),a=en("scrollContainerState"),l=i||o?s:a,c=Te("itemContent"),u=Te("context"),d=Te("groupContent"),f=Te("trackItemSizes"),h=Te("itemSize"),p=Te("log"),m=en("gap"),{callbackRef:v}=Mb(r,h,f,t?Vr:l,p,m,i),[y,x]=b.useState(0);Td("deviation",P=>{y!==P&&x(P)});const g=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||SN,S=Te("ListComponent"),E=Te("ItemComponent"),O=Te("GroupComponent"),k=Te("computeItemKey"),I=Te("isSeeking"),C=Te("groupIndices").length>0,V=Te("alignToBottom"),D=Te("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:y!==0?y:V?"auto":0,...D?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?b.createElement(g,rt(g,u)):b.createElement(S,{...rt(S,u),ref:v,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const _=P.originalIndex,N=k(_+n.firstItemIndex,P.data,u);return I?b.createElement(T,{...rt(T,u),key:N,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?b.createElement(O,{...rt(O,u),key:N,"data-index":_,"data-known-size":P.size,"data-item-index":P.index,style:TN},d(P.index,u)):b.createElement(E,{...rt(E,u),...l0(E,P.data),key:N,"data-index":_,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:EN},C?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),CN={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Uo=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),PN={width:"100%",position:i0(),top:0,zIndex:1};function rt(e,t){if(typeof e!="string")return{context:t}}function l0(e,t){return{item:typeof e=="string"?void 0:t}}const kN=b.memo(function(){const t=Te("HeaderComponent"),n=en("headerHeight"),r=Te("headerFooterTag"),o=Cn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,rt(t,i))):null}),IN=b.memo(function(){const t=Te("FooterComponent"),n=en("footerHeight"),r=Te("headerFooterTag"),o=Cn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,rt(t,i))):null});function xd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=Nb(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...CN,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...rt(c,f)},s)})}function Sd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:y}=Nb(l,u,c,Vr,h);return $D(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",y),t("scrollBy",v),b.createElement(c,{style:{position:"relative",...i,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...rt(c,p)},s)})}const ON=({children:e})=>{const t=b.useContext(Fa),n=en("viewportHeight"),r=en("fixedItemHeight"),o=Te("alignToBottom"),i=Cn(b.useMemo(()=>Hi(n,s=>on(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Uo(o),ref:i,"data-viewport-type":"element"},e)},AN=({children:e})=>{const t=b.useContext(Fa),n=en("windowViewportRect"),r=en("fixedItemHeight"),o=Te("customScrollParent"),i=bd(n,o),s=Te("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Uo(s),"data-viewport-type":"window"},e)},_N=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={...PN,marginTop:`${n}px`},o=Te("context");return b.createElement(t,{style:r,...rt(t,o)},e)},MN=b.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),i=o||n?FN:NN,s=o||n?AN:ON;return b.createElement(i,{...t},r&&b.createElement(_N,null,b.createElement(a0,{showTopList:!0})),b.createElement(s,null,b.createElement(kN,null),b.createElement(a0,null),b.createElement(IN,null)))}),{Component:DN,usePublisher:en,useEmitterValue:Te,useEmitter:Td}=od(xN,{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"}},MN),NN=xd({usePublisher:en,useEmitterValue:Te,useEmitter:Td}),FN=Sd({usePublisher:en,useEmitterValue:Te,useEmitter:Td}),LN=DN,c0={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},VN={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:u0,ceil:d0,floor:La,min:Ed,max:es}=Math;function $N(e){return{...VN,items:e}}function f0(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const i=n===null?null:n[o+e];return{index:o+e,data:i}})}function jN(e,t){return e&&e.column===t.column&&e.row===t.row}function Va(e,t){return e&&e.width===t.width&&e.height===t.height}const RN=Fe(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:y,windowScrollContainerState:x,windowScrollTo:g},T])=>{const S=X(0),E=X(0),O=X(c0),k=X({height:0,width:0}),I=X({height:0,width:0}),C=Ce(),V=Ce(),D=X(0),L=X(null),P=X({row:0,column:0}),_=Ce(),N=Ce(),$=X(!1),z=X(0),U=X(!0),A=X(!1);je(q(p,we(z),pe(([F,B])=>!!B)),()=>{be(U,!1),be(E,0)}),je(q(wt(p,U,I,k,z,A),pe(([F,B,W,j,,Y])=>F&&!B&&W.height!==0&&j.height!==0&&!Y)),([,,,,F])=>{be(A,!0),hd(1,()=>{be(C,F)}),Sn(q(r),()=>{be(n,[0,0]),be(U,!0)})}),ue(q(N,pe(F=>F!=null&&F.scrollTop>0),Tn(0)),E),je(q(p,we(N),pe(([,F])=>F!=null)),([,F])=>{F&&(be(k,F.viewport),be(I,F==null?void 0:F.item),be(P,F.gap),F.scrollTop>0&&(be($,!0),Sn(q(r,Wo(1)),B=>{be($,!1)}),be(s,{top:F.scrollTop})))}),ue(q(k,ie(({height:F})=>F)),o),ue(q(wt(ge(k,Va),ge(I,Va),ge(P,(F,B)=>F&&F.column===B.column&&F.row===B.row),ge(r)),ie(([F,B,W,j])=>({viewport:F,item:B,gap:W,scrollTop:j}))),_),ue(q(wt(ge(S),t,ge(P,jN),ge(I,Va),ge(k,Va),ge(L),ge(E),ge($),ge(U),ge(z)),pe(([,,,,,,,F])=>!F),ie(([F,[B,W],j,Y,se,H,Pe,,it,Ue])=>{const{row:st,column:de}=j,{height:Ee,width:ce}=Y,{width:Ie}=se;if(Pe===0&&(F===0||Ie===0))return c0;if(ce===0){const $t=pd(Ue,F),Ur=$t===0?Math.max(Pe-1,0):$t;return $N(f0($t,Ur,H))}const ht=p0(Ie,ce,de);let Oe,pt;it?B===0&&W===0&&Pe>0?(Oe=0,pt=Pe-1):(Oe=ht*La((B+st)/(Ee+st)),pt=ht*d0((W+st)/(Ee+st))-1,pt=Ed(F-1,es(pt,ht-1)),Oe=Ed(pt,es(0,Oe))):(Oe=0,pt=-1);const J=f0(Oe,pt,H),{top:ae,bottom:_e}=h0(se,j,Y,J),Xe=d0(F/ht),Ft=Xe*Ee+(Xe-1)*st-_e;return{items:J,offsetTop:ae,offsetBottom:Ft,top:ae,bottom:_e,itemHeight:Ee,itemWidth:ce}})),O),ue(q(L,pe(F=>F!==null),ie(F=>F.length)),S),ue(q(wt(k,I,O,P),pe(([F,B,{items:W}])=>W.length>0&&B.height!==0&&F.height!==0),ie(([F,B,{items:W},j])=>{const{top:Y,bottom:se}=h0(F,j,B,W);return[Y,se]}),Ze(Ji)),n);const R=X(!1);ue(q(r,we(R),ie(([F,B])=>B||F!==0)),R);const Z=Kt(q(ge(O),pe(({items:F})=>F.length>0),we(S,R),pe(([{items:F},B,W])=>W&&F[F.length-1].index===B-1),ie(([,F])=>F-1),Ze())),ne=Kt(q(ge(O),pe(({items:F})=>F.length>0&&F[0].index===0),Tn(0),Ze())),Q=Kt(q(ge(O),we($),pe(([{items:F},B])=>F.length>0&&!B),ie(([{items:F}])=>({startIndex:F[0].index,endIndex:F[F.length-1].index})),Ze(qb),hr(0)));ue(Q,f.scrollSeekRangeChanged),ue(q(C,we(k,I,S,P),ie(([F,B,W,j,Y])=>{const se=Ub(F),{align:H,behavior:Pe,offset:it}=se;let Ue=se.index;Ue==="LAST"&&(Ue=j-1),Ue=es(0,Ue,Ed(j-1,Ue));let st=Cd(B,Y,W,Ue);return H==="end"?st=u0(st-B.height+W.height):H==="center"&&(st=u0(st-B.height/2+W.height/2)),it&&(st+=it),{top:st,behavior:Pe}})),s);const G=Nt(q(O,ie(F=>F.offsetBottom+F.bottom)),0);return ue(q(m,ie(F=>({width:F.visibleWidth,height:F.visibleHeight}))),k),{data:L,totalCount:S,viewportDimensions:k,itemDimensions:I,scrollTop:r,scrollHeight:V,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:C,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:v,customScrollParent:y,windowScrollContainerState:x,deviation:D,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:N,...f,initialTopMostItemIndex:z,gridState:O,totalListHeight:G,...d,startReached:ne,endReached:Z,rangeChanged:Q,stateChanged:_,propsReady:h,stateRestoreInProgress:$,...T}},Ke(md,Lt,Xi,e0,mr,yd,pr));function h0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=Cd(e,t,n,r[0].index),s=Cd(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function Cd(e,t,n,r){const o=p0(e.width,n.width,t.column),i=La(r/o),s=i*n.height+es(0,i-1)*t.row;return s>0?s+t.row:s}function p0(e,t,n){return es(1,La((e+n)/(La(t)+n)))}const BN=Fe(([e,t])=>({...e,...t}),Ke(RN,Fe(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X(wd),s=X("div"),a=X(Vr),l=(c,u=null)=>Nt(q(t,ie(d=>d[c]),Ze()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),zN=b.memo(function(){const t=et("gridState"),n=et("listClassName"),r=et("itemClassName"),o=et("itemContent"),i=et("computeItemKey"),s=et("isSeeking"),a=an("scrollHeight"),l=et("ItemComponent"),c=et("ListComponent"),u=et("ScrollSeekPlaceholder"),d=et("context"),f=an("itemDimensions"),h=an("gap"),p=et("log"),m=et("stateRestoreInProgress"),v=Cn(b.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const g=y.firstChild;if(g){const{width:T,height:S}=g.getBoundingClientRect();f({width:T,height:S})}h({row:g0("row-gap",getComputedStyle(y).rowGap,p),column:g0("column-gap",getComputedStyle(y).columnGap,p)})},[a,f,h,p]));return m?null:b.createElement(c,{ref:v,className:n,...rt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(y=>{const x=i(y.index,y.data,d);return s?b.createElement(u,{key:x,...rt(u,d),index:y.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...rt(l,d),className:r,"data-index":y.index,key:x},o(y.index,y.data,d))}))}),WN=b.memo(function(){const t=et("HeaderComponent"),n=an("headerHeight"),r=et("headerFooterTag"),o=Cn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,rt(t,i))):null}),HN=b.memo(function(){const t=et("FooterComponent"),n=an("footerHeight"),r=et("headerFooterTag"),o=Cn(b.useMemo(()=>s=>n(on(s,"height")),[n])),i=et("context");return t?b.createElement(r,{ref:o},b.createElement(t,rt(t,i))):null}),UN=({children:e})=>{const t=b.useContext(s0),n=an("itemDimensions"),r=an("viewportDimensions"),o=Cn(b.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:Uo(!1),ref:o},e)},GN=({children:e})=>{const t=b.useContext(s0),n=an("windowViewportRect"),r=an("itemDimensions"),o=et("customScrollParent"),i=bd(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:i,style:Uo(!1)},e)},YN=b.memo(function({...t}){const n=et("useWindowScroll"),r=et("customScrollParent"),o=r||n?KN:qN,i=r||n?GN:UN;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(WN,null),b.createElement(zN,null),b.createElement(HN,null)))}),{Component:FV,usePublisher:an,useEmitterValue:et,useEmitter:m0}=od(BN,{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"}},YN),qN=xd({usePublisher:an,useEmitterValue:et,useEmitter:m0}),KN=Sd({usePublisher:an,useEmitterValue:et,useEmitter:m0});function g0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zt.WARN),t==="normal"?0:parseInt(t??"0",10)}const ZN=Fe(([e,t])=>({...e,...t}),Ke(r0,Fe(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X(wd),s=X(Vr),a=(l,c=null)=>Nt(q(o,ie(u=>u[l]),Ze()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),XN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),QN=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),JN={overflowAnchor:"none"},eF=b.memo(function(){const t=Re("listState"),n=ln("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),i=ln("windowScrollContainerState"),s=ln("scrollContainerState"),a=o||r?i:s,l=Re("itemContent"),c=Re("trackItemSizes"),u=Re("itemSize"),d=Re("log"),{callbackRef:f,ref:h}=Mb(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);Pd("deviation",N=>{p!==N&&(h.current.style.marginTop=`${N}px`,m(N))});const v=Re("EmptyPlaceholder"),y=Re("ScrollSeekPlaceholder")||XN,x=Re("FillerRow")||QN,g=Re("TableBodyComponent"),T=Re("TableRowComponent"),S=Re("computeItemKey"),E=Re("isSeeking"),O=Re("paddingTopAddition"),k=Re("firstItemIndex"),I=Re("statefulTotalCount"),C=Re("context");if(I===0&&v)return b.createElement(v,rt(v,C));const V=t.offsetTop+O+p,D=t.offsetBottom,L=V>0?b.createElement(x,{height:V,key:"padding-top",context:C}):null,P=D>0?b.createElement(x,{height:D,key:"padding-bottom",context:C}):null,_=t.items.map(N=>{const $=N.originalIndex,z=S($+k,N.data,C);return E?b.createElement(y,{...rt(y,C),key:z,index:N.index,height:N.size,type:N.type||"item"}):b.createElement(T,{...rt(T,C),...l0(T,N.data),key:z,"data-index":$,"data-known-size":N.size,"data-item-index":N.index,style:JN},l(N.index,N.data,C))});return b.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...rt(g,C)},[L,..._,P])}),tF=({children:e})=>{const t=b.useContext(Fa),n=ln("viewportHeight"),r=ln("fixedItemHeight"),o=Cn(b.useMemo(()=>Hi(n,i=>on(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Uo(!1),ref:o,"data-viewport-type":"element"},e)},nF=({children:e})=>{const t=b.useContext(Fa),n=ln("windowViewportRect"),r=ln("fixedItemHeight"),o=Re("customScrollParent"),i=bd(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Uo(!1),"data-viewport-type":"window"},e)},rF=b.memo(function(t){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=ln("fixedHeaderHeight"),i=ln("fixedFooterHeight"),s=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=Cn(b.useMemo(()=>Hi(o,x=>on(x,"height")),[o])),u=Cn(b.useMemo(()=>Hi(i,x=>on(x,"height")),[i])),d=r||n?sF:iF,f=r||n?nF:tF,h=Re("TableComponent"),p=Re("TableHeadComponent"),m=Re("TableFooterComponent"),v=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...rt(p,l)},s()):null,y=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...rt(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(f,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...rt(h,l)},[v,b.createElement(eF,{key:"TableBody"}),y])))}),{Component:oF,usePublisher:ln,useEmitterValue:Re,useEmitter:Pd}=od(ZN,{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"}},rF),iF=xd({usePublisher:ln,useEmitterValue:Re,useEmitter:Pd}),sF=Sd({usePublisher:ln,useEmitterValue:Re,useEmitter:Pd}),aF=oF,lF=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},cF={Item:b.forwardRef(function(t,n){return w.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return w.jsx("ul",{...t,ref:n,className:"space-y-3"})})},uF=e=>{const t=b.useRef(null),n=lF(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(Bi,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(LN,{height:n,useWindowScroll:!0,data:e.source,components:cF,itemContent:(r,o)=>w.jsx(b.Fragment,{children:w.jsx(Rv,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(qn,{children:w.jsx(Lc,{})})}),w.jsx("div",{})]})};var dF=Object.defineProperty,y0=Object.getOwnPropertySymbols,fF=Object.prototype.hasOwnProperty,hF=Object.prototype.propertyIsEnumerable,v0=(e,t,n)=>t in e?dF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pF=(e,t)=>{for(var n in t||(t={}))fF.call(t,n)&&v0(e,n,t[n]);if(y0)for(var n of y0(t))hF.call(t,n)&&v0(e,n,t[n]);return e},kd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},mF=(e,t,n,r)=>ja(kd,e,t,n,r),Go=e=>typeof e=="object",gr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Go(e)&&!Go(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>gr(e[r],t[r]))},gF=(e,t)=>(Go(e)||Array.isArray(e))&&t?e[t]:e,yF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,$a=e=>/[0-9.]+/.test(e),b0=e=>["string","number"].includes(typeof e),w0=e=>e==null||(e==null?void 0:e.length)===0||e==="",x0={eq:gr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:w0,notEmpty:e=>!w0(e),in:(e,t)=>kd(t,n=>gr(e,n)),notIn:(e,t)=>S0(t,n=>!gr(e,n))},vF=e=>{if(e in x0)return x0[e];throw new Error("Linq - Symbol not found")},Yo=(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},ja=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=vF(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},bF=(e,t,n,r)=>ja(Yo,e,t,n,r),S0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},wF=(e,t,n,r)=>ja(S0,e,t,n,r),T0=e=>{if(e===null)return null;const t=pF({},e);return Object.keys(t).forEach(n=>t[n]=Go(e[n])?T0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},E0=(e,t)=>{if(Go(t)){for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(gr(t,r))return!0}return!1},xF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},SF=e=>Yo(e,(t,n,r)=>Go(t)?n===r.findIndex(o=>gr(o,t)):n===r.indexOf(t)),TF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},C0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},EF=(e,t)=>C0(e,n=>n[t]),P0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},CF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},PF=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return $a(e)&&$a(t)?r.map(s=>Number.parseInt(s)):r},Id=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&$a(e)&&$a(t)){const o=[],[i,s]=CF(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return PF(e,t,r)},kF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Id(r,o,1):Id(r,i,Number.parseInt(o,10))}return b0(e)&&b0(t)?Id(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Od=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},k0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},IF=(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)},OF=(e,t,n,r)=>ja(IF,e,t,n,r),I0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(yF(t))},O0=(e=>(e.Asc="asc",e.Desc="desc",e))(O0||{}),AF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),_F=(e,t)=>e.sort(AF(t)),MF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Yo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},DF=class sf{constructor(t=[]){this.array=t}static Range(...t){return kF(...t)}static New(t){return new sf(t)}Where(t,n,r){return this.array=bF(this.array,t,n,r),this}Some(t,n,r){return mF(this.array,t,n,r)}All(t,n,r){return wF(this.array,t,n,r)}Reverse(){return this.array=k0(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=OF(this.array,t,n,r),this}Distinct(){return this.array=SF(this.array),this}First(t){return t===void 0?this.array[0]:TF(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?Od((n,r)=>n+r,0,this.array):Od((n,r)=>n+gF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return EF(this.array,t)}GroupWith(t){return C0(this.array,t)}Except(t){return Yo(this.array,n=>!E0(t,n))}Intersect(t){return Yo(this.array,n=>E0(t,n))}OrderBy(t,n){let r;return r=t?I0(this.array,t):this.array.toSorted(),this.array=n==="desc"?k0(r):r,this}Includes(t){return kd(this.array,n=>gr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return Od(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(P0(this.array,n=>[t,n]))}Zip(t,n){return P0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Yo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new sf(T0(this.array))}ToObject(t){return xF(this.array,t)}Sort(t){return Array.isArray(t)?_F(this.array,t):I0(this.array,t)}Unique(t){return MF(this.array,t)}},A0=DF,Ad={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,y)=>{try{Object.keys(v).forEach(y)}catch(x){window.console.log(x)}},n=v=>v==null,r=v=>{const y=typeof v;return y==="string"||y==="number"||y==="boolean"||n(v)},o=(v,y)=>{const x=y.getItem(v);try{return JSON.parse(x)}catch{return x??null}},i=v=>Object.keys(v).reduce((y,x)=>({...y,[x]:o(x,v)}),{}),s=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,y)=>(v[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(y=>y(v))},d=[{name:"expires",parse:v=>`expires=${s(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${s(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const y=v.domain??"";return y===""?"":`domain=${v.multiDomain?".":""}${y}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],f={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(y=>y.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const y=f.json()[v];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,y,x={})=>{const g=r(y)?y:encodeURIComponent(JSON.stringify(y)),T=d.reduce((S,E)=>{const O=E.parse(x);return O===""?S:S.concat(O)},[`${encodeURIComponent(v)}=${g}`]).join(";");document.cookie=T,u()}},h=v=>{const y=new Set,x=g=>{v().removeItem(g);const T=i(v());y.forEach(S=>S(T))};return{delete:x,listener:g=>(y.add(g),()=>y.delete(g)),clearListeners:()=>y.clear(),json:(g=!1)=>g?i(v()):v(),has:g=>{const T=v().getItem(g);return!n(T)},deleteAll:()=>{t(v(),x),y.forEach(g=>g(v()))},get:g=>o(g,v()),set:(g,T)=>{v().setItem(g,JSON.stringify(T)),y.forEach(S=>S(v()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(Ad);const _d=e=>e.headerLabel??e.thead??e.id,Md=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var qo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(qo||{});const Dd=e=>e.type==="number"?e.valueAsNumber:e.value,NF=e=>{let t=[];return e({add:(o,i,s)=>t.push({...s,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},FF={},LF=(e,t=FF)=>{const n=Xs()?null:Ad.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Jc({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},i=>{const s=a=>{const l=i.state(),c={...l,...a};return Xs()||Ad.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},Nd=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??qo.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:Zs(),operation:a,label:_d(e),name:o,type:i,value:"",...r}},Fd=()=>{const e=zt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{operationOptions:b.useMemo(()=>({[qo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[qo.Boolean]:[t.is,t.isNot],[qo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},VF=e=>{const t=zt(),{operationOptions:n,operations:r}=Fd(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,Nd(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>{if(u!==h.id)return h;const p=e.cols.find(m=>d===m.id);return Nd(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(f=>f.map(h=>h.id===u?{...h,operation:r[d]}:h))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(f=>f.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=Dd(c.target);e.set(f=>f.map(h=>h.id===u?{...h,value:d}:h))};return w.jsx(b.Fragment,{children:w.jsx($o,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(rk,{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(c=>{const u=n[c.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(Lr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:i}),w.jsx(Lr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(Bi,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),w.jsx("div",{className:"flex items-center justify-center mt-5",children:w.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:w.jsx(mo,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(Vc,{size:14})," ",t.tableFilterNewFilter]})})]})})})},$F=({filter:e,onDelete:t,set:n})=>{const r=zt(),{operationOptions:o,operations:i}=Fd(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(f=>f.id===u?{...f,operation:i[c]}:f))},a=l=>{const c=l.target.dataset.id||"",u=Dd(l.target);n(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(Lr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),w.jsx(Bi,{"data-id":e.id,onChange:a,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(mo,{className:"text-danger",size:14})})]})},jF=({item:e,onPointerDown:t})=>{const n=po(0);return w.jsxs(Hs.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[w.jsx("button",{type:"button",className:"cursor-grab",children:w.jsx(nk,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},RF=e=>{var l;const t=zt(),n=Md(e.cols),r=zP(),[o,i]=b.useState(((l=e.groups[0])==null?void 0:l.thead)||""),s=c=>{var v;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((v=u.options.item(f))==null?void 0:v.label)||"";i(h);const p=new A0(e.rows).GroupBy(d),m=e.cols.find(y=>y.id===d);e.setGroups(l1(p).map((y,x)=>{const g=p[y];return{...m,groupId:Zs(),groupKey:d,index:x,rows:g,groupName:y}}))},a=()=>e.setGroups([]);return w.jsx(b.Fragment,{children:w.jsxs($o,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(ik,{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(Lr,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),w.jsx(qn,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(mo,{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(cP,{children:w.jsx(Hs.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>w.jsx(jF,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},BF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),zF=(e,t)=>e.toSorted(BF(t)),_0=(e,t,n)=>({id:Zs(),type:n,value:e.id,label:t}),WF=e=>{const t=zt(),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,_0(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=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(b.Fragment,{children:w.jsx($o,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(gg,{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(Lr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(Lr,{onChange:s(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(mo,{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(Vc,{size:14})," ",t.tableSortAddButton]})})]})})})},HF=e=>{const t=zt(),[n,r]=b.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=_0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=_d(e.col);return w.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?w.jsx(KP,{size:14}):null,n==="desc"?w.jsx(qP,{size:14}):null,n==="undefined"?w.jsx(gg,{size:14}):null]})},UF=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(VF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(WF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(RF,{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=Dd(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function GF(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const YF=e=>{const t=b.useId(),n=zt(),r=e.asLink||"button",o=b.useMemo(()=>GF(e.current,e.pages),[e.current,e.pages]),i=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(b.Fragment,{children:[w.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),w.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:s=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(s.target.value))},children:e.sizes.map(s=>w.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):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(s=>s===null?null:w.jsx(b.Fragment,{children:typeof s=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.jsx(r,{href:s,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${s===e.current?"text-primary border-primary":"border-transparent"}`,children:s})})},`pagination-${s}`)),i?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},qF={opacity:1},KF={opacity:.75,backgroundColor:"var(--table-border)"},ZF={opacity:0,transition:{duration:.4,type:"spring"}},XF=e=>{var d;const t=zt(),n=e.filters.filter(f=>f.name===e.header.id),o=n.length>0?ak:ok,{operationOptions:i,operations:s}=Fd(),a=f=>{const h=f.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==h))},l=e.sorters.find(f=>e.header.id===f.value),c=l!=null&&l.type?l.type===O0.Asc?"ascending":"descending":"none",u=_d(e.header);return w.jsx(Hs.Item,{...e.header.thProps,as:"th",layout:!0,exit:ZF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:KF,"aria-sort":c,"aria-busy":e.loading,animate:qF,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:w.jsx("span",{className:"flex items-center justify-between",children:w.jsxs("span",{className:"flex items-center gap-1",children:[w.jsx($o,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),w.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:w.jsxs("span",{children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(f=>w.jsx("li",{className:"my-1",children:w.jsx($F,{onDelete:a,filter:f,set:e.setFilters})},`thead-filter-${f.id}`)),w.jsx("li",{children:w.jsxs("button",{onClick:()=>e.setFilters(f=>f.concat(Nd(e.header,i,s))),type:"button",className:"text-primary flex items-center gap-1",children:[w.jsx(Vc,{size:14})," ",t.tableFilterNewFilter]})})]})}),w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),w.jsx(HF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},QF=e=>w.jsx(Hs.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:w.jsx(ki,{children:e.headers.map(t=>w.jsx(XF,{loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),JF=e=>Math.min(Math.max(e+e*(e%2===0?2:4)+10,50),90),eL=b.forwardRef((e,t)=>w.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:w.jsx(ki,{children:e.children})})),tL=b.forwardRef((e,t)=>w.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),nL=b.forwardRef(({context:e,...t},n)=>w.jsx("thead",{...t,role:"rowgroup",className:"bg-card-background shadow-xs group:sticky top-0",ref:n})),rL=b.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${n.className??""}`})),oL=b.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:"px-2 h-14 bg-card-background",children:w.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),iL={TableHead:nL,Table:tL,TableBody:eL,TableRow:rL,TableFoot:oL},sL=[0,0,0,0,0,0,0,0,0,0],aL=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(b.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=yy(t,i.id),c=i.Element;return b.createElement("td",{...i.cellProps,"data-matrix":a,role:"cell",key:`accessor-${e}-${s}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?w.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded",style:{width:`${JF(e)}%`}}):c?w.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):w.jsx(b.Fragment,{children:An.nil(l)?"":l}))})})},lL=()=>w.jsx(b.Fragment,{}),M0=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[f,h]=b.useState(!1),p=td(n),m=td(u.loadingMore),v=b.useMemo(()=>{if(u.loading)return sL;if(r)return u.rows;const y=new A0(u.rows);return e.length>0&&e.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:y.Where(x.name,x.operation.symbol,x.value)),s.length===0?y.Select():zF(y.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,x=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 x.observe(y),()=>x.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[w.jsx(aF,{data:v,useWindowScroll:!0,components:iL,totalCount:v.length,itemContent:aL,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?lL:null,fixedHeaderContent:()=>w.jsx(QF,{headers:a,sorters:s,filters:e,setCols:o,setSorters:c,setFilters:i,loading:!!u.loading})}),w.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?w.jsx(YF,{...t}):null]})},cL=(e,t)=>typeof t=="function"?t(e):t,uL=e=>{const t=e.operations??!0,n=b.useMemo(()=>Md(e.cols),[e.cols]),[r,o]=Jc({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const s=a=>l=>{const c=i.state();return{...c,[a]:cL(c[a],l)}};return{cols:s("cols"),filters:s("filters"),groups:s("groups"),sorters:s("sorters")}},{postMiddleware:[i=>{var s;return(s=e.set)==null||s.call(e,i),i}]});return w.jsxs("div",{className:"relative min-w-full",children:[t?w.jsx(UF,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?w.jsx(M0,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):w.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((i,s)=>w.jsx(Tt.div,{className:"min-w-full",children:w.jsx(M0,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:i,groups:r.groups,index:s,optionCols:n,options:n,rows:i.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${i.groupId}`))})]})},D0=(e="")=>Be("w-full min-w-36 outline-none px-2 py-1 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Ld=b.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),N0=b.forwardRef(({children:e,hover:t=!0,isParent:n,label:r,...o},i)=>{const s=cr(),a=s!==null,[l,c]=b.useState(!1),[u,d]=b.useState(!1),[f,h]=b.useState(null),p=b.useRef([]),m=b.useRef([]),v=b.useContext(Ld),y=ur(),x=g_(),g=rv(),{floatingStyles:T,refs:S,context:E}=No({nodeId:x,open:l,transform:!0,onOpenChange:c,whileElementsMounted:sa,placement:a?"right-start":"bottom-start",middleware:[ca({mainAxis:a?0:4,alignmentAxis:a?-4:0}),Su(),xu()]}),O=Lo(E,{role:"menu",enabled:!0}),k=Do(E,{bubbles:!0}),I=dv(E,{enabled:t,delay:{open:Lv},handleClose:z_({blockPointerEvents:!0})}),C=ga(E,{event:"mousedown",toggle:!a,ignoreMouse:a,keyboardHandlers:!0}),V=_v(E,{loop:!0,activeIndex:f,virtual:!0,nested:a,allowEscape:!0,listRef:p,scrollItemIntoView:!0,onNavigate:h}),D=R_(E,{activeIndex:f,listRef:m,onMatch:l?h:void 0}),{getReferenceProps:L,getFloatingProps:P,getItemProps:_}=Fo([I,C,O,k,V,D]);b.useEffect(()=>{if(!y)return;const $=()=>c(!1),z=U=>{U.nodeId!==x&&U.parentId===s&&c(!1)};return y.events.on("click",$),y.events.on("menuopen",z),()=>{y.events.off("click",$),y.events.off("menuopen",z)}},[y,x,s]),b.useEffect(()=>{l&&y&&y.events.emit("menuopen",{parentId:s,nodeId:x})},[y,l,x,s]);const N=n?o.className:D0(o.className);return w.jsxs(y_,{id:x,children:[w.jsx(b.Fragment,{children:o.asChild?w.jsx(Du,{children:r,ref:Tu([S.setReference,g.ref,i]),tabIndex:a?v.activeIndex===g.index?0:-1:void 0,"data-open":l?"":void 0,"data-nested":a?"":void 0,role:a?"menuitem":void 0,"data-focus-inside":u?"":void 0,className:N,...L(v.getItemProps({...o,onFocus($){var z;(z=o.onFocus)==null||z.call(o,$),d(!1),v.setHasFocusInside(!0)}}))}):w.jsxs("button",{ref:Tu([S.setReference,g.ref,i]),tabIndex:a?v.activeIndex===g.index?0:-1:void 0,"data-open":l?"":void 0,"data-nested":a?"":void 0,role:a?"menuitem":void 0,"data-focus-inside":u?"":void 0,className:N,...L(v.getItemProps({...o,onFocus($){var z;(z=o.onFocus)==null||z.call(o,$),d(!1),v.setHasFocusInside(!0)}})),children:[r,a&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(Lc,{size:14})]})]})}),w.jsx(Ld.Provider,{value:{activeIndex:f,setActiveIndex:h,getItemProps:_,setHasFocusInside:d,isOpen:l},children:w.jsx(f_,{elementsRef:p,labelsRef:m,children:l&&w.jsx(Mo,{preserveTabOrder:!0,children:w.jsx(Ri,{context:E,modal:!1,initialFocus:a?-1:0,returnFocus:!a,children:w.jsx("div",{ref:S.setFloating,style:T,className:"isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",...P(),children:e})})})})})]})}),dL=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(Ld),a=rv({label:r?null:typeof e=="string"?e:t}),l=ur(),c=a.index===s.activeIndex;return w.jsxs("button",{...o,ref:Tu([a.ref,i]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:D0(o.className),...s.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),s.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),fL=b.forwardRef((e,t)=>cr()!==null?w.jsx(N0,{...e,isParent:!1,ref:t}):w.jsx(v_,{children:w.jsx(N0,{...e,isParent:!0,ref:t})})),hL=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=b.useState(!1),{context:a,refs:l}=No({transform:!0,open:i!==null,onOpenChange:s,nodeId:n,strategy:"absolute"}),c=ga(a),u=Lo(a),d=Do(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Fo([c,u,d]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(qn,{...h(e),as:Tt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:w.jsx(Tt.span,{layoutId:o,children:e.trigger})}),w.jsx(ki,{children:i?w.jsx(Mo,{root:t,children:w.jsx(Ri,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(Tt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})};var pL=String.prototype.replace,mL=/%20/g,Vd={RFC1738:"RFC1738",RFC3986:"RFC3986"},$d={default:Vd.RFC3986,formatters:{RFC1738:function(e){return pL.call(e,mL,"+")},RFC3986:function(e){return String(e)}},RFC1738:Vd.RFC1738,RFC3986:Vd.RFC3986},gL=$d,jd=Object.prototype.hasOwnProperty,Rr=Array.isArray,kn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),yL=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Rr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},F0=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},vL=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Rr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!jd.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Rr(t)&&!Rr(n)&&(o=F0(t,r)),Rr(t)&&Rr(n)?(n.forEach(function(i,s){if(jd.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return jd.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},bL=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},wL=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}},Rd=1024,xL=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=Rd){for(var c=s.length>=Rd?s.slice(l,l+Rd):s,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||i===gL.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=kn[f];continue}if(f<2048){u[u.length]=kn[192|f>>6]+kn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=kn[224|f>>12]+kn[128|f>>6&63]+kn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=kn[240|f>>18]+kn[128|f>>12&63]+kn[128|f>>6&63]+kn[128|f&63]}a+=u.join("")}return a},SL=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return yL(n),t},TL=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},EL=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},CL=function(t,n){return[].concat(t,n)},PL=function(t,n){if(Rr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},L0={arrayToObject:F0,assign:bL,combine:CL,compact:SL,decode:wL,encode:xL,isBuffer:EL,isRegExp:TL,maybeMap:PL,merge:vL},V0=Bx,Ra=L0,ts=$d,kL=Object.prototype.hasOwnProperty,$0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},In=Array.isArray,IL=Array.prototype.push,j0=function(e,t){IL.apply(e,In(t)?t:[t])},OL=Date.prototype.toISOString,R0=ts.default,yt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Ra.encode,encodeValuesOnly:!1,format:R0,formatter:ts.formatters[R0],indices:!1,serializeDate:function(t){return OL.call(t)},skipNulls:!1,strictNullHandling:!1},AL=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Bd={},_L=function e(t,n,r,o,i,s,a,l,c,u,d,f,h,p,m,v,y,x){for(var g=t,T=x,S=0,E=!1;(T=T.get(Bd))!==void 0&&!E;){var O=T.get(t);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Bd)>"u"&&(S=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&In(g)&&(g=Ra.maybeMap(g,function(A){return A instanceof Date?h(A):A})),g===null){if(s)return c&&!v?c(n,yt.encoder,y,"key",p):n;g=""}if(AL(g)||Ra.isBuffer(g)){if(c){var k=v?n:c(n,yt.encoder,y,"key",p);return[m(k)+"="+m(c(g,yt.encoder,y,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var C;if(r==="comma"&&In(g))v&&c&&(g=Ra.maybeMap(g,c)),C=[{value:g.length>0?g.join(",")||null:void 0}];else if(In(u))C=u;else{var V=Object.keys(g);C=d?V.sort(d):V}var D=l?n.replace(/\./g,"%2E"):n,L=o&&In(g)&&g.length===1?D+"[]":D;if(i&&In(g)&&g.length===0)return L+"[]";for(var P=0;P<C.length;++P){var _=C[P],N=typeof _=="object"&&typeof _.value<"u"?_.value:g[_];if(!(a&&N===null)){var $=f&&l?_.replace(/\./g,"%2E"):_,z=In(g)?typeof r=="function"?r(L,$):L:L+(f?"."+$:"["+$+"]");x.set(t,S);var U=V0();U.set(Bd,x),j0(I,e(N,z,r,o,i,s,a,l,r==="comma"&&v&&In(g)?null:c,u,d,f,h,p,m,v,y,U))}}return I},ML=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=ts.default;if(typeof t.format<"u"){if(!kL.call(ts.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=ts.formatters[r],i=yt.filter;(typeof t.filter=="function"||In(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in $0?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=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:s,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:i,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}},DL=function(e,t){var n=e,r=ML(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):In(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=$0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=V0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||j0(s,_L(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=s.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:""},Ko=L0,zd=Object.prototype.hasOwnProperty,NL=Array.isArray,ft={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Ko.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},FL=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},B0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},LL="utf8=%26%2310003%3B",VL="utf8=%E2%9C%93",$L=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===VL?c="utf-8":s[l]===LL&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,ft.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ft.decoder,c,"key"),p=Ko.maybeMap(B0(u.slice(f+1),n),function(v){return n.decoder(v,ft.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=FL(p)),u.indexOf("[]=")>-1&&(p=NL(p)?[p]:p);var m=zd.call(r,h);m&&n.duplicates==="combine"?r[h]=Ko.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},jL=function(e,t,n,r){for(var o=r?t:B0(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},RL=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&zd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(i))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&zd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),jL(u,n,r,o)}},BL=function(t){if(!t)return ft;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ft.charset:t.charset,r=typeof t.duplicates>"u"?ft.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ft.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ft.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ft.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ft.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ft.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ft.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ft.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ft.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ft.decoder,delimiter:typeof t.delimiter=="string"||Ko.isRegExp(t.delimiter)?t.delimiter:ft.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ft.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ft.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ft.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ft.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ft.strictNullHandling}},zL=function(e,t){var n=BL(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?$L(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=RL(a,r[a],n,typeof e=="string");o=Ko.merge(o,l,n)}return n.allowSparse===!0?o:Ko.compact(o)},WL=DL,HL=zL,UL=$d,GL={formats:UL,parse:HL,stringify:WL},ke;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(ke||(ke={}));var z0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(z0||(z0={}));const re=ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Br=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}},K=ke.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class tn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof tn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ke.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}tn.create=e=>new tn(e);const ns=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ke.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${ke.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ke.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${ke.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ke.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,ke.assertNever(e)}return{message:n}};let YL=ns;function Wd(){return YL}const Hd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function te(e,t){const n=Wd(),r=Hd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ns?void 0:ns].filter(o=>!!o)});e.common.issues.push(r)}class Vt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return Vt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return me;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),rs=e=>({status:"dirty",value:e}),Ht=e=>({status:"valid",value:e}),W0=e=>e.status==="aborted",H0=e=>e.status==="dirty",Ba=e=>e.status==="valid",za=e=>typeof Promise<"u"&&e instanceof Promise;function Wa(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function U0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var os,is;class On{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 G0=(e,t)=>{if(Ba(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new tn(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=e;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Br(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Vt,ctx:{common:t.parent.common,data:t.data,parsedType:Br(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(za(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Br(t)},i=this._parseSync({data:t,path:o.path,parent:o});return G0(o,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Br(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(za(o)?o:Promise.resolve(o));return G0(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:K.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Bn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return zn.create(this,this._def)}nullable(){return Hr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cn.create(this,this._def)}promise(){return ls.create(this,this._def)}or(t){return Ga.create([this,t],this._def)}and(t){return Ya.create(this,t,this._def)}transform(t){return new Bn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Qa({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new Z0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ja({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return el.create(this,t)}readonly(){return tl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const qL=/^c[^\s-]{8,}$/i,KL=/^[0-9a-z]+$/,ZL=/^[0-9A-HJKMNP-TV-Z]{26}$/,XL=/^[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,QL=/^[a-z0-9_-]{21}$/i,JL=/^[-+]?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)?)??$/,eV=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ud;const nV=/^(?:(?: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])$/,rV=/^(([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})))$/,oV=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Y0="((\\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])))",iV=new RegExp(`^${Y0}$`);function q0(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 sV(e){return new RegExp(`^${q0(e)}$`)}function aV(e){let t=`${Y0}T${q0(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 lV(e,t){return!!((t==="v4"||!t)&&nV.test(e)||(t==="v6"||!t)&&rV.test(e))}class $n extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.string,received:i.parsedType}),me}const r=new Vt;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?te(o,{code:K.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&te(o,{code:K.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")eV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ud||(Ud=new RegExp(tV,"u")),Ud.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")XL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")QL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")qL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")KL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")ZL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:K.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:K.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:K.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?aV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?iV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?sV(i).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?JL.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?lV(t.data,i.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:K.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?oV.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:K.invalid_string,message:i.message}),r.dirty()):ke.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new $n({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new $n({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $n({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $n({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}$n.create=e=>{var t;return new $n({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function cV(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class zr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==re.number){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.number,received:i.parsedType}),me}let r;const o=new Vt;for(const i of this._def.checks)i.kind==="int"?ke.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?cV(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_finite,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new zr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new zr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ke.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}zr.create=e=>new zr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Zo extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==re.bigint){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.bigint,received:i.parsedType}),me}let r;const o=new Vt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):ke.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,o){return new Zo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(o)}]})}_addCheck(t){return new Zo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Zo.create=e=>{var t;return new Zo({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Gd extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.boolean,received:r.parsedType}),me}return Ht(t.data)}}Gd.create=e=>new Gd({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class ss extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_type,expected:re.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return te(i,{code:K.invalid_date}),me}const r=new Vt;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:K.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ke.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ss({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ss.create=e=>new ss({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Yd extends xe{_parse(t){if(this._getType(t)!==re.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.symbol,received:r.parsedType}),me}return Ht(t.data)}}Yd.create=e=>new Yd({typeName:he.ZodSymbol,...ye(e)});class Ha extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.undefined,received:r.parsedType}),me}return Ht(t.data)}}Ha.create=e=>new Ha({typeName:he.ZodUndefined,...ye(e)});class Ua extends xe{_parse(t){if(this._getType(t)!==re.null){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.null,received:r.parsedType}),me}return Ht(t.data)}}Ua.create=e=>new Ua({typeName:he.ZodNull,...ye(e)});class qd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return Ht(t.data)}}qd.create=e=>new qd({typeName:he.ZodAny,...ye(e)});class Xo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ht(t.data)}}Xo.create=e=>new Xo({typeName:he.ZodUnknown,...ye(e)});class yr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:K.invalid_type,expected:re.never,received:n.parsedType}),me}}yr.create=e=>new yr({typeName:he.ZodNever,...ye(e)});class Kd extends xe{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.void,received:r.parsedType}),me}return Ht(t.data)}}Kd.create=e=>new Kd({typeName:he.ZodVoid,...ye(e)});class cn extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==re.array)return te(n,{code:K.invalid_type,expected:re.array,received:n.parsedType}),me;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(te(n,{code:s?K.too_big:K.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(te(n,{code:K.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(te(n,{code:K.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new On(n,s,n.path,a)))).then(s=>Vt.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new On(n,s,n.path,a)));return Vt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cn({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new cn({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new cn({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}cn.create=(e,t)=>new cn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Qo(e){if(e instanceof ot){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=zn.create(Qo(r))}return new ot({...e._def,shape:()=>t})}else return e instanceof cn?new cn({...e._def,type:Qo(e.element)}):e instanceof zn?zn.create(Qo(e.unwrap())):e instanceof Hr?Hr.create(Qo(e.unwrap())):e instanceof Rn?Rn.create(e.items.map(t=>Qo(t))):e}class ot extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ke.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==re.object){const c=this._getOrReturnCtx(t);return te(c,{code:K.invalid_type,expected:re.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof yr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new On(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof yr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(te(o,{code:K.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new On(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=>Vt.mergeObjectSync(r,c)):Vt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new ot({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ot({...this._def,unknownKeys:"strip"})}passthrough(){return new ot({...this._def,unknownKeys:"passthrough"})}extend(t){return new ot({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ot({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ot({...this._def,catchall:t})}pick(t){const n={};return ke.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ot({...this._def,shape:()=>n})}omit(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ot({...this._def,shape:()=>n})}deepPartial(){return Qo(this)}partial(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ot({...this._def,shape:()=>n})}required(t){const n={};return ke.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof zn;)i=i._def.innerType;n[r]=i}}),new ot({...this._def,shape:()=>n})}keyof(){return K0(ke.objectKeys(this.shape))}}ot.create=(e,t)=>new ot({shape:()=>e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),ot.strictCreate=(e,t)=>new ot({shape:()=>e,unknownKeys:"strict",catchall:yr.create(),typeName:he.ZodObject,...ye(t)}),ot.lazycreate=(e,t)=>new ot({shape:e,unknownKeys:"strip",catchall:yr.create(),typeName:he.ZodObject,...ye(t)});class Ga extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new tn(a.ctx.common.issues));return te(n,{code:K.invalid_union,unionErrors:s}),me}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new tn(l));return te(n,{code:K.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Ga.create=(e,t)=>new Ga({options:e,typeName:he.ZodUnion,...ye(t)});const jn=e=>e instanceof Ka?jn(e.schema):e instanceof Bn?jn(e.innerType()):e instanceof Za?[e.value]:e instanceof Wr?e.options:e instanceof Xa?ke.objectValues(e.enum):e instanceof Qa?jn(e._def.innerType):e instanceof Ha?[void 0]:e instanceof Ua?[null]:e instanceof zn?[void 0,...jn(e.unwrap())]:e instanceof Hr?[null,...jn(e.unwrap())]:e instanceof Z0||e instanceof tl?jn(e.unwrap()):e instanceof Ja?jn(e._def.innerType):[];class Zd extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.object)return te(n,{code:K.invalid_type,expected:re.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const i of n){const s=jn(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new Zd({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Xd(e,t){const n=Br(e),r=Br(t);if(e===t)return{valid:!0,data:e};if(n===re.object&&r===re.object){const o=ke.objectKeys(t),i=ke.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=Xd(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===re.array&&r===re.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=Xd(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===re.date&&r===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ya extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(W0(i)||W0(s))return me;const a=Xd(i.value,s.value);return a.valid?((H0(i)||H0(s))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:K.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ya.create=(e,t,n)=>new Ya({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Rn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.array)return te(r,{code:K.invalid_type,expected:re.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return te(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new On(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Vt.mergeArray(n,s)):Vt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Rn({...this._def,rest:t})}}Rn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class qa extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.object)return te(r,{code:K.invalid_type,expected:re.object,received:r.parsedType}),me;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new On(r,a,r.path,a)),value:s._parse(new On(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Vt.mergeObjectAsync(n,o):Vt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new qa({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new qa({keyType:$n.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Qd extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.map)return te(r,{code:K.invalid_type,expected:re.map,received:r.parsedType}),me;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new On(r,a,r.path,[c,"key"])),value:i._parse(new On(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Qd.create=(e,t,n)=>new Qd({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Jo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.set)return te(r,{code:K.invalid_type,expected:re.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:K.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(te(r,{code:K.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new On(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new Jo({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new Jo({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Jo.create=(e,t)=>new Jo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class as extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.function)return te(n,{code:K.invalid_type,expected:re.function,received:n.parsedType}),me;function r(a,l){return Hd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wd(),ns].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return Hd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wd(),ns].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ls){const a=this;return Ht(async function(...l){const c=new tn([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return Ht(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new tn([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new tn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new as({...this._def,args:Rn.create(t).rest(Xo.create())})}returns(t){return new as({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new as({args:t||Rn.create([]).rest(Xo.create()),returns:n||Xo.create(),typeName:he.ZodFunction,...ye(r)})}}class Ka extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ka.create=(e,t)=>new Ka({getter:e,typeName:he.ZodLazy,...ye(t)});class Za extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Za.create=(e,t)=>new Za({value:e,typeName:he.ZodLiteral,...ye(t)});function K0(e,t){return new Wr({values:e,typeName:he.ZodEnum,...ye(t)})}class Wr extends xe{constructor(){super(...arguments),os.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:ke.joinValues(r),received:n.parsedType,code:K.invalid_type}),me}if(Wa(this,os)||U0(this,os,new Set(this._def.values)),!Wa(this,os).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:K.invalid_enum_value,options:r}),me}return Ht(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Wr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Wr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}os=new WeakMap,Wr.create=K0;class Xa extends xe{constructor(){super(...arguments),is.set(this,void 0)}_parse(t){const n=ke.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==re.string&&r.parsedType!==re.number){const o=ke.objectValues(n);return te(r,{expected:ke.joinValues(o),received:r.parsedType,code:K.invalid_type}),me}if(Wa(this,is)||U0(this,is,new Set(ke.getValidEnumValues(this._def.values))),!Wa(this,is).has(t.data)){const o=ke.objectValues(n);return te(r,{received:r.data,code:K.invalid_enum_value,options:o}),me}return Ht(t.data)}get enum(){return this._def.values}}is=new WeakMap,Xa.create=(e,t)=>new Xa({values:e,typeName:he.ZodNativeEnum,...ye(t)});class ls extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.promise&&n.common.async===!1)return te(n,{code:K.invalid_type,expected:re.promise,received:n.parsedType}),me;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return Ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ls.create=(e,t)=>new ls({type:e,typeName:he.ZodPromise,...ye(t)});class Bn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{te(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?rs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?rs(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ba(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ba(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);ke.assertNever(o)}}Bn.create=(e,t,n)=>new Bn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),Bn.createWithPreprocess=(e,t,n)=>new Bn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class zn extends xe{_parse(t){return this._getType(t)===re.undefined?Ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}zn.create=(e,t)=>new zn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Hr extends xe{_parse(t){return this._getType(t)===re.null?Ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hr.create=(e,t)=>new Hr({innerType:e,typeName:he.ZodNullable,...ye(t)});class Qa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Qa.create=(e,t)=>new Qa({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Ja extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return za(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new tn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new tn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ja.create=(e,t)=>new Ja({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Jd extends xe{_parse(t){if(this._getType(t)!==re.nan){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:re.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Jd.create=e=>new Jd({typeName:he.ZodNaN,...ye(e)});class Z0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class el extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?me:i.status==="dirty"?(n.dirty(),rs(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new el({in:t,out:n,typeName:he.ZodPipeline})}}class tl extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ba(o)&&(o.value=Object.freeze(o.value)),o);return za(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}tl.create=(e,t)=>new tl({innerType:e,typeName:he.ZodReadonly,...ye(t)}),ot.lazycreate;var he;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(he||(he={})),$n.create,zr.create,Jd.create,Zo.create,Gd.create,ss.create,Yd.create,Ha.create,Ua.create,qd.create,Xo.create,yr.create,Kd.create,cn.create,ot.create,ot.strictCreate,Ga.create,Zd.create,Ya.create,Rn.create,qa.create,Qd.create,Jo.create,as.create,Ka.create,Za.create,Wr.create,Xa.create,ls.create,Bn.create,zn.create,Hr.create,Bn.createWithPreprocess,el.create;const uV={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},X0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return GL.parse(n.toString(),uV)},Q0=e=>e.replace("[",".").replace("]","").split("."),cs=(e,t)=>Q0(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof cn?o.element:o},t),us=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),dV=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(u,d)=>{const f=cs(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},i=(u,d)=>{const f=cs(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},s=(u,d)=>{const f=cs(u,e);return{...d,name:u,id:u,required:!f.isOptional(),error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}},a=(u,d)=>{const f=cs(u,e);return{...d,name:u,id:u,required:!f.isOptional(),type:An.instance(f,zr)?"number":(d==null?void 0:d.type)??"text",error:t==null?void 0:t[u],ref:h=>{h!==null&&(r.current[u]={element:h,schema:f})}}};b.useEffect(()=>{const u=Object.values(r.current).map(f=>{const h=f.element.dataset.origin?document.querySelector(`[data-target=${f.element.name}]`):f.element,p=f.schema.safeParse(us(h)),m=v=>{const y=h.dataset.target||h.name;if(!y)return;const x=us(v.target)||(v.relatedTarget?us(v.relatedTarget):""),g=f.schema.safeParse(x);if(g.success)return h.setCustomValidity(""),n(T=>{const{[y]:S,...E}=T||{};return E===null||An.empty(E)?null:E});if(h.required){const T=g.error.issues[0].message;h.setCustomValidity(T),n(S=>({...S,[y]:T}))}};return h.addEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m),{input:f,hasInitialError:h.required?!p.success:!1,unsubscribe:()=>{h.removeEventListener("blur",m),h.tagName==="SELECT"&&h.addEventListener("change",m)}}});return u.some(f=>f.hasInitialError)&&n(f=>f===null?{}:f),()=>u.forEach(f=>f.unsubscribe())});const l=b.useCallback(u=>d=>{const f=d.currentTarget,h=Object.values(r.current).reduce((m,v)=>{const y=v.element,x=v.schema.safeParse(us(y));if(y.dataset.ignore==="ignore"||x.success)return m;const g=x.error.issues[0].message;y.setAttribute("data-initialized","true");const T=y.dataset.name||y.name||"";return{...m,[T]:g}},{}),p=An.empty(h)?null:h;n(p),u==null||u({form:f,errors:p||{}})},[]),c=b.useCallback(u=>d=>{d.preventDefault();const f=d.currentTarget;let h=X0(f);Array.from(f.elements).forEach(m=>{if(m.tagName==="SELECT"){const v=m;h=oh(h,v.name,v.value)}if(m.tagName==="INPUT"){const v=m;h=oh(h,v.name,us(v))}});const p=e.safeParse(h);return p.success?u({form:f,json:h,data:p.data,event:d,reset:()=>ed(f),success:!0,errors:[]}):u({form:f,json:h,event:d,data:h,success:!1,reset:()=>ed(f),errors:p.error.issues.map(m=>({message:m.message,path:m.path.map(v=>String(v))}))})},[]);return{input:a,datepicker:o,checkbox:s,select:i,onSubmit:c,errors:t,onInvalid:l,disabled:t!==null}},fV=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},hV={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},pV={name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 75%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(0, 0%, 85%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},mV={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},ds=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(ds(s,t,n,a))},[]),J0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:J0(s,t,n,a)}},{}),ew={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ef=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},gV={default:e=>ef(e,{result:ew.default}),dark:e=>ef(e,{result:ew.dark})},yV=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=ds(e.colors,n),o=ds(e.spacing,n),i=ds(e.rounded,n);return ef(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};ee.Alert=uk,ee.Autocomplete=uM,ee.Button=qn,ee.ButtonGroup=U1,ee.Calendar=Ey,ee.Card=Cy,ee.Checkbox=Rv,ee.ColType=qo,ee.Collapse=Sg,ee.ComponentsProvider=HO,ee.DatePicker=hM,ee.Dropdown=$o,ee.Expand=hL,ee.FileUpload=CD,ee.Form=kD,ee.Input=Bi,ee.InputFeedback=$v,ee.InputField=ba,ee.Menu=fL,ee.MenuItem=dL,ee.Modal=Nv,ee.Option=jv,ee.Polymorph=to,ee.Radiobox=ID,ee.Select=Lr,ee.Stats=KO,ee.Switch=OD,ee.Tab=sM,ee.Table=uL,ee.Tabs=oM,ee.Tag=q1,ee.TaskList=dM,ee.Tooltip=Vv,ee.TransferList=uF,ee.convertPath=Q0,ee.createColumns=NF,ee.createDesignTokens=J0,ee.createOptionCols=Md,ee.createStyles=gV,ee.createTheme=yV,ee.css=Be,ee.defaultDarkTheme=hV,ee.defaultLightTheme=pV,ee.dispatchInput=xs,ee.formReset=ed,ee.formToJson=X0,ee.getSchemaShape=cs,ee.initializeInputDataset=Ss,ee.isReactComponent=z1,ee.isReactFC=W1,ee.isSsr=Xs,ee.mergeRefs=Al,ee.parsers=mV,ee.path=yy,ee.reduceTokens=ds,ee.safeRegex=tu,ee.splitInto=vy,ee.useForm=dV,ee.usePrevious=fV,ee.useReactive=Py,ee.useTablePreferences=LF,ee.useTranslations=zt,ee.uuid=Zs,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
196
201
  //# sourceMappingURL=index.umd.js.map