@g4rcez/components 0.0.68 → 0.0.69

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 (62) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +50 -53
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +17442 -14771
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/index.umd.js +50 -53
  7. package/dist/index.umd.js.map +1 -1
  8. package/dist/preset/src/styles/dark.d.ts.map +1 -1
  9. package/dist/preset/src/styles/dark.js +3 -1
  10. package/dist/preset/src/styles/design-tokens.d.ts +9 -0
  11. package/dist/preset/src/styles/design-tokens.d.ts.map +1 -1
  12. package/dist/preset/src/styles/design-tokens.js +27 -9
  13. package/dist/preset/src/styles/light.d.ts.map +1 -1
  14. package/dist/preset/src/styles/light.js +3 -1
  15. package/dist/preset/src/styles/theme.types.d.ts +44 -70
  16. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  17. package/dist/src/components/core/resizable.js +1 -1
  18. package/dist/src/components/display/alert.d.ts +1 -1
  19. package/dist/src/components/display/alert.d.ts.map +1 -1
  20. package/dist/src/components/display/alert.js +1 -1
  21. package/dist/src/components/display/calendar.js +1 -1
  22. package/dist/src/components/display/list.d.ts.map +1 -1
  23. package/dist/src/components/display/list.js +2 -1
  24. package/dist/src/components/display/notifications.js +1 -1
  25. package/dist/src/components/display/step.js +1 -1
  26. package/dist/src/components/display/tabs.js +1 -1
  27. package/dist/src/components/floating/expand.d.ts +1 -1
  28. package/dist/src/components/floating/expand.d.ts.map +1 -1
  29. package/dist/src/components/floating/expand.js +1 -1
  30. package/dist/src/components/floating/modal.js +1 -1
  31. package/dist/src/components/floating/toolbar.js +1 -1
  32. package/dist/src/components/form/autocomplete.d.ts.map +1 -1
  33. package/dist/src/components/form/autocomplete.js +17 -11
  34. package/dist/src/components/form/select.d.ts.map +1 -1
  35. package/dist/src/components/form/select.js +8 -4
  36. package/dist/src/components/form/switch.d.ts.map +1 -1
  37. package/dist/src/components/form/switch.js +1 -1
  38. package/dist/src/components/form/task-list.d.ts.map +1 -1
  39. package/dist/src/components/form/task-list.js +2 -1
  40. package/dist/src/components/form/virtual-autocomplete.d.ts +5 -5
  41. package/dist/src/components/form/virtual-autocomplete.d.ts.map +1 -1
  42. package/dist/src/components/form/virtual-autocomplete.js +147 -158
  43. package/dist/src/components/table/group.js +1 -1
  44. package/dist/src/components/table/index.js +1 -1
  45. package/dist/src/components/table/thead.d.ts.map +1 -1
  46. package/dist/src/components/table/thead.js +2 -1
  47. package/dist/src/hooks/use-form.d.ts +309 -18
  48. package/dist/src/hooks/use-form.d.ts.map +1 -1
  49. package/dist/src/hooks/use-form.js +327 -90
  50. package/dist/src/index.d.ts +6 -5
  51. package/dist/src/index.d.ts.map +1 -1
  52. package/dist/src/index.js +5 -4
  53. package/dist/src/styles/dark.d.ts.map +1 -1
  54. package/dist/src/styles/dark.js +3 -1
  55. package/dist/src/styles/design-tokens.d.ts +9 -0
  56. package/dist/src/styles/design-tokens.d.ts.map +1 -1
  57. package/dist/src/styles/design-tokens.js +22 -13
  58. package/dist/src/styles/light.d.ts.map +1 -1
  59. package/dist/src/styles/light.js +3 -1
  60. package/dist/src/styles/theme.types.d.ts +44 -70
  61. package/dist/src/styles/theme.types.d.ts.map +1 -1
  62. package/package.json +2 -2
package/dist/index.umd.js CHANGED
@@ -1,145 +1,145 @@
1
- (function(J,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):(J=typeof globalThis<"u"?globalThis:J||self,b(J.components={},J.React,J["react/jsx-runtime"],J.ReactDOM))})(this,function(J,b,w,$o){"use strict";var W2=Object.defineProperty;var H2=(J,b,w)=>b in J?W2(J,b,{enumerable:!0,configurable:!0,writable:!0,value:w}):J[b]=w;var ne=(J,b,w)=>H2(J,typeof b!="symbol"?b+"":b,w);function Pd(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 C=Pd(b),Bo=Pd($o);function Id(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=Id(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function j0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Id(e))&&(r&&(r+=" "),r+=t);return r}const Od=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ad=j0,kr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ad(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=Od(u)||Od(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({...s,...a}[m]):{...s,...a}[m]===g})?[...c,d,f]:c},[]);return Ad(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Md(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=Md(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function z0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Md(e))&&(r&&(r+=" "),r+=t);return r}var Dd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function W0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function H0(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 U0=Error,G0=EvalError,K0=RangeError,Y0=ReferenceError,kd=SyntaxError,Ro=TypeError,q0=URIError,X0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},Fd=typeof Symbol<"u"&&Symbol,Q0=X0,Z0=function(){return typeof Fd!="function"||typeof Symbol!="function"||typeof Fd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Q0()},Ea={__proto__:null,foo:{}},J0=Object,ew=function(){return{__proto__:Ea}.foo===Ea.foo&&!(Ea instanceof J0)},tw="Function.prototype.bind called on incompatible ",nw=Object.prototype.toString,rw=Math.max,ow="[object Function]",Nd=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},sw=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},iw=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},aw=function(t){var n=this;if(typeof n!="function"||nw.apply(n)!==ow)throw new TypeError(tw+n);for(var r=sw(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Nd(r,arguments));return Object(u)===u?u:this}return n.apply(t,Nd(r,arguments))},i=rw(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+iw(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},lw=aw,Ca=Function.prototype.bind||lw,cw=Function.prototype.call,uw=Object.prototype.hasOwnProperty,dw=Ca,fw=dw.call(cw,uw),ye,hw=U0,pw=G0,mw=K0,gw=Y0,Fr=kd,Nr=Ro,yw=q0,Ld=Function,Pa=function(e){try{return Ld('"use strict"; return ('+e+").constructor;")()}catch{}},nr=Object.getOwnPropertyDescriptor;if(nr)try{nr({},"")}catch{nr=null}var Ia=function(){throw new Nr},vw=nr?function(){try{return arguments.callee,Ia}catch{try{return nr(arguments,"callee").get}catch{return Ia}}}():Ia,Lr=Z0(),bw=ew(),ht=Object.getPrototypeOf||(bw?function(e){return e.__proto__}:null),_r={},ww=typeof Uint8Array>"u"||!ht?ye:ht(Uint8Array),rr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ye:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ye:ArrayBuffer,"%ArrayIteratorPrototype%":Lr&&ht?ht([][Symbol.iterator]()):ye,"%AsyncFromSyncIteratorPrototype%":ye,"%AsyncFunction%":_r,"%AsyncGenerator%":_r,"%AsyncGeneratorFunction%":_r,"%AsyncIteratorPrototype%":_r,"%Atomics%":typeof Atomics>"u"?ye:Atomics,"%BigInt%":typeof BigInt>"u"?ye:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ye:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ye:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ye:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":hw,"%eval%":eval,"%EvalError%":pw,"%Float32Array%":typeof Float32Array>"u"?ye:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ye:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ye:FinalizationRegistry,"%Function%":Ld,"%GeneratorFunction%":_r,"%Int8Array%":typeof Int8Array>"u"?ye:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ye:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ye:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Lr&&ht?ht(ht([][Symbol.iterator]())):ye,"%JSON%":typeof JSON=="object"?JSON:ye,"%Map%":typeof Map>"u"?ye:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Lr||!ht?ye:ht(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ye:Promise,"%Proxy%":typeof Proxy>"u"?ye:Proxy,"%RangeError%":mw,"%ReferenceError%":gw,"%Reflect%":typeof Reflect>"u"?ye:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ye:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Lr||!ht?ye:ht(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ye:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Lr&&ht?ht(""[Symbol.iterator]()):ye,"%Symbol%":Lr?Symbol:ye,"%SyntaxError%":Fr,"%ThrowTypeError%":vw,"%TypedArray%":ww,"%TypeError%":Nr,"%Uint8Array%":typeof Uint8Array>"u"?ye:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ye:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ye:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ye:Uint32Array,"%URIError%":yw,"%WeakMap%":typeof WeakMap>"u"?ye:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ye:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ye:WeakSet};if(ht)try{null.error}catch(e){var xw=ht(ht(e));rr["%Error.prototype%"]=xw}var Tw=function e(t){var n;if(t==="%AsyncFunction%")n=Pa("async function () {}");else if(t==="%GeneratorFunction%")n=Pa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Pa("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ht&&(n=ht(o.prototype))}return rr[t]=n,n},_d={__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"]},jo=Ca,Ws=fw,Sw=jo.call(Function.call,Array.prototype.concat),Ew=jo.call(Function.apply,Array.prototype.splice),Vd=jo.call(Function.call,String.prototype.replace),Hs=jo.call(Function.call,String.prototype.slice),Cw=jo.call(Function.call,RegExp.prototype.exec),Pw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Iw=/\\(\\)?/g,Ow=function(t){var n=Hs(t,0,1),r=Hs(t,-1);if(n==="%"&&r!=="%")throw new Fr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Fr("invalid intrinsic syntax, expected opening `%`");var o=[];return Vd(t,Pw,function(s,i,a,l){o[o.length]=a?Vd(l,Iw,"$1"):i||s}),o},Aw=function(t,n){var r=t,o;if(Ws(_d,r)&&(o=_d[r],r="%"+o[0]+"%"),Ws(rr,r)){var s=rr[r];if(s===_r&&(s=Tw(r)),typeof s>"u"&&!n)throw new Nr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new Fr("intrinsic "+t+" does not exist!")},Vr=function(t,n){if(typeof t!="string"||t.length===0)throw new Nr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nr('"allowMissing" argument must be a boolean');if(Cw(/^%?[^%]*%?$/,t)===null)throw new Fr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Ow(t),o=r.length>0?r[0]:"",s=Aw("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],Ew(r,Sw([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 Fr("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",Ws(rr,i))a=rr[i];else if(a!=null){if(!(f in a)){if(!n)throw new Nr("base intrinsic for "+t+" exists, but the property is not available.");return}if(nr&&u+1>=r.length){var m=nr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=Ws(a,f),a=a[f];d&&!l&&(rr[i]=a)}}return a},$d={exports:{}},Oa,Bd;function Aa(){if(Bd)return Oa;Bd=1;var e=Vr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Oa=t,Oa}var Mw=Vr,Us=Mw("%Object.getOwnPropertyDescriptor%",!0);if(Us)try{Us([],"length")}catch{Us=null}var Rd=Us,jd=Aa(),Dw=kd,$r=Ro,zd=Rd,kw=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new $r("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new $r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new $r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new $r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new $r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new $r("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!zd&&zd(t,n);if(jd)jd(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new Dw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ma=Aa(),Wd=function(){return!!Ma};Wd.hasArrayLengthDefineBug=function(){if(!Ma)return null;try{return Ma([],"length",{value:1}).length!==1}catch{return!0}};var Fw=Wd,Nw=Vr,Hd=kw,Lw=Fw(),Ud=Rd,Gd=Ro,_w=Nw("%Math.floor%"),Vw=function(t,n){if(typeof t!="function")throw new Gd("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||_w(n)!==n)throw new Gd("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&Ud){var i=Ud(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Lw?Hd(t,"length",n,!0,!0):Hd(t,"length",n)),t};(function(e){var t=Ca,n=Vr,r=Vw,o=Ro,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Aa(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})($d);var $w=$d.exports,Kd=Vr,Yd=$w,Bw=Yd(Kd("String.prototype.indexOf")),Rw=function(t,n){var r=Kd(t,!!n);return typeof r=="function"&&Bw(t,".prototype.")>-1?Yd(r):r};const jw=H0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Da=typeof Map=="function"&&Map.prototype,ka=Object.getOwnPropertyDescriptor&&Da?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Gs=Da&&ka&&typeof ka.get=="function"?ka.get:null,qd=Da&&Map.prototype.forEach,Fa=typeof Set=="function"&&Set.prototype,Na=Object.getOwnPropertyDescriptor&&Fa?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ks=Fa&&Na&&typeof Na.get=="function"?Na.get:null,Xd=Fa&&Set.prototype.forEach,zw=typeof WeakMap=="function"&&WeakMap.prototype,zo=zw?WeakMap.prototype.has:null,Ww=typeof WeakSet=="function"&&WeakSet.prototype,Wo=Ww?WeakSet.prototype.has:null,Hw=typeof WeakRef=="function"&&WeakRef.prototype,Qd=Hw?WeakRef.prototype.deref:null,Uw=Boolean.prototype.valueOf,Gw=Object.prototype.toString,Kw=Function.prototype.toString,Yw=String.prototype.match,La=String.prototype.slice,On=String.prototype.replace,qw=String.prototype.toUpperCase,Zd=String.prototype.toLowerCase,Jd=RegExp.prototype.test,ef=Array.prototype.concat,Zt=Array.prototype.join,Xw=Array.prototype.slice,tf=Math.floor,_a=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Va=Object.getOwnPropertySymbols,$a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Br=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Tt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Br||!0)?Symbol.toStringTag:null,nf=Object.prototype.propertyIsEnumerable,rf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function of(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Jd.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-tf(-e):tf(e);if(r!==e){var o=String(r),s=La.call(t,o.length+1);return On.call(o,n,"$&_")+"."+On.call(On.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return On.call(t,n,"$&_")}var Ba=jw,sf=Ba.custom,af=uf(sf)?sf:null,Qw=function e(t,n,r,o){var s=n||{};if(An(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(An(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=An(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(An(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(An(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ff(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?of(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?of(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Ra(t)?"[Array]":"[Object]";var d=mx(s,r);if(typeof o>"u")o=[];else if(df(o,t)>=0)return"[Circular]";function f(L,P,A){if(P&&(o=Xw.call(o),o.push(P)),A){var N={depth:s.depth};return An(s,"quoteStyle")&&(N.quoteStyle=s.quoteStyle),e(L,N,r+1,o)}return e(L,s,r+1,o)}if(typeof t=="function"&&!cf(t)){var h=ix(t),p=Ys(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+Zt.call(p,", ")+" }":"")}if(uf(t)){var m=Br?On.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):$a.call(t);return typeof t=="object"&&!Br?Ho(m):m}if(fx(t)){for(var g="<"+Zd.call(String(t.nodeName)),y=t.attributes||[],x=0;x<y.length;x++)g+=" "+y[x].name+"="+lf(Zw(y[x].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Zd.call(String(t.nodeName))+">",g}if(Ra(t)){if(t.length===0)return"[]";var v=Ys(t,f);return d&&!px(v)?"["+za(v,d)+"]":"[ "+Zt.call(v,", ")+" ]"}if(ex(t)){var T=Ys(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!nf.call(t,"cause")?"{ ["+String(t)+"] "+Zt.call(ef.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Zt.call(T,", ")+" }"}if(typeof t=="object"&&i){if(af&&typeof t[af]=="function"&&Ba)return Ba(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ax(t)){var S=[];return qd&&qd.call(t,function(L,P){S.push(f(P,t,!0)+" => "+f(L,t))}),hf("Map",Gs.call(t),S,d)}if(ux(t)){var E=[];return Xd&&Xd.call(t,function(L){E.push(f(L,t))}),hf("Set",Ks.call(t),E,d)}if(lx(t))return ja("WeakMap");if(dx(t))return ja("WeakSet");if(cx(t))return ja("WeakRef");if(nx(t))return Ho(f(Number(t)));if(ox(t))return Ho(f(_a.call(t)));if(rx(t))return Ho(Uw.call(t));if(tx(t))return Ho(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Dd<"u"&&t===Dd)return"{ [object globalThis] }";if(!Jw(t)&&!cf(t)){var I=Ys(t,f),O=rf?rf(t)===Object.prototype:t instanceof Object||t.constructor===Object,F=t instanceof Object?"":"null prototype",M=!O&&Tt&&Object(t)===t&&Tt in t?La.call(Mn(t),8,-1):F?"Object":"",_=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",k=_+(M||F?"["+Zt.call(ef.call([],M||[],F||[]),": ")+"] ":"");return I.length===0?k+"{}":d?k+"{"+za(I,d)+"}":k+"{ "+Zt.call(I,", ")+" }"}return String(t)};function lf(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Zw(e){return On.call(String(e),/"/g,"&quot;")}function Ra(e){return Mn(e)==="[object Array]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function Jw(e){return Mn(e)==="[object Date]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function cf(e){return Mn(e)==="[object RegExp]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function ex(e){return Mn(e)==="[object Error]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function tx(e){return Mn(e)==="[object String]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function nx(e){return Mn(e)==="[object Number]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function rx(e){return Mn(e)==="[object Boolean]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function uf(e){if(Br)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!$a)return!1;try{return $a.call(e),!0}catch{}return!1}function ox(e){if(!e||typeof e!="object"||!_a)return!1;try{return _a.call(e),!0}catch{}return!1}var sx=Object.prototype.hasOwnProperty||function(e){return e in this};function An(e,t){return sx.call(e,t)}function Mn(e){return Gw.call(e)}function ix(e){if(e.name)return e.name;var t=Yw.call(Kw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function df(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 ax(e){if(!Gs||!e||typeof e!="object")return!1;try{Gs.call(e);try{Ks.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function lx(e){if(!zo||!e||typeof e!="object")return!1;try{zo.call(e,zo);try{Wo.call(e,Wo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function cx(e){if(!Qd||!e||typeof e!="object")return!1;try{return Qd.call(e),!0}catch{}return!1}function ux(e){if(!Ks||!e||typeof e!="object")return!1;try{Ks.call(e);try{Gs.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function dx(e){if(!Wo||!e||typeof e!="object")return!1;try{Wo.call(e,Wo);try{zo.call(e,zo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function fx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function ff(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return ff(La.call(e,0,t.maxStringLength),t)+r}var o=On.call(On.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,hx);return lf(o,"single",t)}function hx(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":"")+qw.call(t.toString(16))}function Ho(e){return"Object("+e+")"}function ja(e){return e+" { ? }"}function hf(e,t,n,r){var o=r?za(n,r):Zt.call(n,", ");return e+" ("+t+") {"+o+"}"}function px(e){for(var t=0;t<e.length;t++)if(df(e[t],`
2
- `)>=0)return!1;return!0}function mx(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Zt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Zt.call(Array(t+1),n)}}function za(e,t){if(e.length===0)return"";var n=`
3
- `+t.prev+t.base;return n+Zt.call(e,","+n)+`
4
- `+t.prev}function Ys(e,t){var n=Ra(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=An(e,o)?t(e[o],e):""}var s=typeof Va=="function"?Va(e):[],i;if(Br){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)An(e,l)&&(n&&String(Number(l))===l&&l<e.length||Br&&i["$"+l]instanceof Symbol||(Jd.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Va=="function")for(var c=0;c<s.length;c++)nf.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var pf=Vr,Rr=Rw,gx=Qw,yx=Ro,qs=pf("%WeakMap%",!0),Xs=pf("%Map%",!0),vx=Rr("WeakMap.prototype.get",!0),bx=Rr("WeakMap.prototype.set",!0),wx=Rr("WeakMap.prototype.has",!0),xx=Rr("Map.prototype.get",!0),Tx=Rr("Map.prototype.set",!0),Sx=Rr("Map.prototype.has",!0),Wa=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},Ex=function(e,t){var n=Wa(e,t);return n&&n.value},Cx=function(e,t,n){var r=Wa(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Px=function(e,t){return!!Wa(e,t)},Ix=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new yx("Side channel does not contain "+gx(s))},get:function(s){if(qs&&s&&(typeof s=="object"||typeof s=="function")){if(t)return vx(t,s)}else if(Xs){if(n)return xx(n,s)}else if(r)return Ex(r,s)},has:function(s){if(qs&&s&&(typeof s=="object"||typeof s=="function")){if(t)return wx(t,s)}else if(Xs){if(n)return Sx(n,s)}else if(r)return Px(r,s);return!1},set:function(s,i){qs&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new qs),bx(t,s,i)):Xs?(n||(n=new Xs),Tx(n,s,i)):(r||(r={key:{},next:null}),Cx(r,s,i))}};return o},mf=e=>Array.isArray(e),Ha=e=>e===void 0,Ua=e=>e===null,Ox=Function.bind.call(Function.call,Object.prototype.toString),Ax=e=>!!e&&Ox(e)==="[object Error]"||e instanceof Error,gf=(e,t)=>e instanceof t,Mx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Dx=e=>Object.prototype.toString.call(e)==="[object Date]"&&gf(e,Date),bn={array:mf,date:Dx,empty:e=>Ua(e)||Ha(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:gf,isError:Ax,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Ua(e)||Ha(e),null:Ua,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!mf(e)&&typeof e=="object",primitive:Mx,string:e=>typeof e=="string",undefined:Ha},Ga=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=Ga(s?[]:{},o,n)}else e[r]=Ga(e[r],o,n)}else e[r]=n;return e},kx=e=>Object.keys(e),Fx=e=>e.replace("[",".").replace("]","").split("."),Ka=(e,t,n)=>{const r=Array.isArray(t)?t:Fx(t),o=structuredClone(e);return Ga(o,r,n),o};const Ya="-";function Nx(e){const t=_x(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Ya);return a[0]===""&&a.length!==1&&a.shift(),yf(a,t)||Lx(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function yf(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?yf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ya);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const vf=/^\[(.+)\]$/;function Lx(e){if(vf.test(e)){const t=vf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function _x(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $x(Object.entries(e.classGroups),n).forEach(([s,i])=>{qa(i,r,s,t)}),r}function qa(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:bf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Vx(o)){qa(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{qa(i,bf(t,s),n,r)})})}function bf(e,t){let n=e;return t.split(Ya).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Vx(e){return e.isThemeGetter}function $x(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function Bx(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const wf="!";function Rx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let g=0;g<a.length;g++){let y=a[g];if(c===0){if(y===o&&(r||a.slice(g,g+s)===t)){l.push(a.slice(u,g)),u=g+s;continue}if(y==="/"){d=g;continue}}y==="["?c++:y==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(wf),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function jx(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 zx(e){return{cache:Bx(e.cacheSize),parseClassName:Rx(e),...Nx(e)}}const Wx=/\s+/;function Hx(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(Wx).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=jx(a).join(":");return{isTailwindClass:!0,modifierId:l?h+wf:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Ux(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=xf(t))&&(r&&(r+=" "),r+=n);return r}function xf(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=xf(e[r]))&&(n&&(n+=" "),n+=t);return n}function Gx(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=zx(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=Hx(l,n);return o(l,u),u}return function(){return s(Ux.apply(null,arguments))}}function ze(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Tf=/^\[(?:([a-z-]+):)?(.+)\]$/i,Kx=/^\d+\/\d+$/,Yx=new Set(["px","full","screen"]),qx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xx=/\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$/,Qx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Zx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function wn(e){return or(e)||Yx.has(e)||Kx.test(e)}function Dn(e){return jr(e,"length",a1)}function or(e){return!!e&&!Number.isNaN(Number(e))}function Qs(e){return jr(e,"number",or)}function Uo(e){return!!e&&Number.isInteger(Number(e))}function e1(e){return e.endsWith("%")&&or(e.slice(0,-1))}function he(e){return Tf.test(e)}function kn(e){return qx.test(e)}const t1=new Set(["length","size","percentage"]);function n1(e){return jr(e,t1,Sf)}function r1(e){return jr(e,"position",Sf)}const o1=new Set(["image","url"]);function s1(e){return jr(e,o1,c1)}function i1(e){return jr(e,"",l1)}function Go(){return!0}function jr(e,t,n){const r=Tf.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function a1(e){return Xx.test(e)&&!Qx.test(e)}function Sf(){return!1}function l1(e){return Zx.test(e)}function c1(e){return Jx.test(e)}function u1(){const e=ze("colors"),t=ze("spacing"),n=ze("blur"),r=ze("brightness"),o=ze("borderColor"),s=ze("borderRadius"),i=ze("borderSpacing"),a=ze("borderWidth"),l=ze("contrast"),c=ze("grayscale"),u=ze("hueRotate"),d=ze("invert"),f=ze("gap"),h=ze("gradientColorStops"),p=ze("gradientColorStopPositions"),m=ze("inset"),g=ze("margin"),y=ze("opacity"),x=ze("padding"),v=ze("saturate"),T=ze("scale"),S=ze("sepia"),E=ze("skew"),I=ze("space"),O=ze("translate"),F=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",he,t],k=()=>[he,t],L=()=>["",wn,Dn],P=()=>["auto",or,he],A=()=>["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"],H=()=>["","0",he],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[or,Qs],X=()=>[or,he];return{cacheSize:500,separator:":",theme:{colors:[Go],spacing:[wn,Dn],blur:["none","",kn,he],brightness:B(),borderColor:[e],borderRadius:["none","","full",kn,he],borderSpacing:k(),borderWidth:L(),contrast:B(),grayscale:H(),hueRotate:X(),invert:H(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[e1,Dn],inset:_(),margin:_(),opacity:B(),padding:k(),saturate:B(),scale:B(),sepia:H(),skew:X(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[kn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),he]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],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",Uo,he]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Uo,he]}],"grid-cols":[{"grid-cols":[Go]}],"col-start-end":[{col:["auto",{span:["full",Uo,he]},he]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Go]}],"row-start-end":[{row:["auto",{span:[Uo,he]},he]}],"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",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],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:[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":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[kn]},kn]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",kn,Dn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qs]}],"font-family":[{font:[Go]}],"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",he]}],"line-clamp":[{"line-clamp":["none",or,Qs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wn,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"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",wn,Dn]}],"underline-offset":[{"underline-offset":["auto",wn,he]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],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",he]}],"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:[...A(),r1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",n1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},s1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[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":[wn,he]}],"outline-w":[{outline:[wn,Dn]}],"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":[wn,Dn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",kn,i1]}],"shadow-color":[{shadow:[Go]}],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",kn,he]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],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":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Uo,he]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"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",he]}],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",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[wn,Dn,Qs]}],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 d1=Gx(u1),Xa=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},f1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),h1=e=>bn.function(e),Me=(...e)=>d1(z0(e)),Qa=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Zs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},zr=b.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return w.jsx(s,{ref:o,...r,children:n})}),p1=kr("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Wr=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return w.jsxs(zr,{...l,ref:c,type:s,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Me(p1({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),Ef=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t};function m1(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const g1=({children:e,...t})=>{const n=Ef(t.onIntersection),r=b.useRef(null),[o,s]=b.useState(()=>r.current===null?!1:m1(r.current));return b.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(d=>c.isIntersecting?!0:d)});return a.observe(i),()=>a.disconnect()},[]),w.jsx("div",{...t,ref:r,children:o?e:null})},y1=kr("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"}}}),v1=kr("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),b1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return w.jsxs(zr,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:Me(v1({size:i,theme:s}),t),children:[n?w.jsx("span",{className:y1({theme:n})}):null,r,a.children]})}),Hr=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Js=b.createContext({}),ei=b.createContext(null),Za=typeof document<"u",ti=Za?b.useLayoutEffect:b.useEffect,Cf=b.createContext({strict:!1}),ni=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Pf="data-"+ni("framerAppearId"),w1={skipAnimations:!1,useManualTiming:!1};function x1(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&s.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=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 ri=["read","resolveKeyframes","update","preRender","render","postRender"],T1=40;function If(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=ri.reduce((y,x)=>(y[x]=x1(s),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const y=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(y-o.timestamp,T1),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:ri.reduce((y,x)=>{const v=i[x];return y[x]=(T,S=!1,E=!1)=>(n||p(),v.schedule(T,S,E)),y},{}),cancel:y=>{for(let x=0;x<ri.length;x++)i[ri[x]].cancel(y)},state:o,steps:i}}const{schedule:Ja,cancel:Y2}=If(queueMicrotask,!1);function Ur(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Of=b.createContext({});let Af=!1;function S1(e,t,n,r,o){const{visualElement:s}=b.useContext(Js),i=b.useContext(Cf),a=b.useContext(ei),l=b.useContext(Hr).reducedMotion,c=b.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=b.useContext(Of);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&C1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const f=b.useRef(!!(n[Pf]&&!window.HandoffComplete));return ti(()=>{u&&(u.updateFeatures(),Ja.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,Af||(Af=!0,queueMicrotask(E1))))}),u}function E1(){window.HandoffComplete=!0}function C1(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Mf(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&Ur(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Mf(e){if(e)return e.options.allowProjection!==!1?e.projection:Mf(e.parent)}function P1(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):Ur(n)&&(n.current=r))},[t])}function Ko(e){return typeof e=="string"||Array.isArray(e)}function Yo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const el=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tl=["initial",...el];function oi(e){return Yo(e.animate)||tl.some(t=>Ko(e[t]))}function Df(e){return!!(oi(e)||e.variants)}function I1(e,t){if(oi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ko(n)?n:void 0,animate:Ko(r)?r:void 0}}return e.inherit!==!1?t:{}}function O1(e){const{initial:t,animate:n}=I1(e,b.useContext(Js));return b.useMemo(()=>({initial:t,animate:n}),[kf(t),kf(n)])}function kf(e){return Array.isArray(e)?e.join(" "):e}const Ff={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"]},Gr={};for(const e in Ff)Gr[e]={isEnabled:t=>Ff[e].some(n=>!!t[n])};function A1(e){for(const t in e)Gr[t]={...Gr[t],...e[t]}}const qo=b.createContext({}),M1=Symbol.for("motionComponentSymbol"),yt=e=>e;let Kr=yt,Ft=yt;process.env.NODE_ENV!=="production"&&(Kr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ft=(e,t)=>{if(!e)throw new Error(t)});function D1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&A1(e);function s(a,l){let c;const u={...b.useContext(Hr),...a,layoutId:k1(a)},{isStatic:d}=u,f=O1(a),h=r(a,d);if(!d&&Za){F1(u,e);const p=N1(u);c=p.MeasureLayout,f.visualElement=S1(o,h,u,t,p.ProjectionNode)}return w.jsxs(Js.Provider,{value:f,children:[c&&f.visualElement?w.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,P1(h,f.visualElement,l),h,d,f.visualElement)]})}const i=b.forwardRef(s);return i[M1]=o,i}function k1({layoutId:e}){const t=b.useContext(qo).id;return t&&e!==void 0?t+"-"+e:e}function F1(e,t){const n=b.useContext(Cf).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?Kr(!1,r):Ft(!1,r)}}function N1(e){const{drag:t,layout:n}=Gr;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 L1(e){function t(r,o={}){return D1(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 _1=["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 nl(e){return typeof e!="string"||e.includes("-")?!1:!!(_1.indexOf(e)>-1||/[A-Z]/u.test(e))}const si={};function V1(e){Object.assign(si,e)}const Xo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fn=new Set(Xo);function Nf(e,{layout:t,layoutId:n}){return Fn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!si[e]||e==="opacity")}const ct=e=>!!(e&&e.getVelocity),$1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},B1=Xo.length;function R1(e,t,n){let r="";for(let o=0;o<B1;o++){const s=Xo[o];if(e[s]!==void 0){const i=$1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Lf=e=>t=>typeof t=="string"&&t.startsWith(e),_f=Lf("--"),j1=Lf("var(--"),rl=e=>j1(e)?z1.test(e.split("/*")[0].trim()):!1,z1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,W1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Nn=(e,t,n)=>n>t?t:n<e?e:n,Yr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qo={...Yr,transform:e=>Nn(0,1,e)},ii={...Yr,default:1},Zo=e=>Math.round(e*1e5)/1e5,ol=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,H1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,U1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Jo(e){return typeof e=="string"}function G1(e){return e==null}const es=e=>({test:t=>Jo(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ln=es("deg"),Jt=es("%"),ce=es("px"),K1=es("vh"),Y1=es("vw"),Vf={...Jt,parse:e=>Jt.parse(e)/100,transform:e=>Jt.transform(e*100)},$f={...Yr,transform:Math.round},Bf={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,size:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,rotate:Ln,rotateX:Ln,rotateY:Ln,rotateZ:Ln,scale:ii,scaleX:ii,scaleY:ii,scaleZ:ii,skew:Ln,skewX:Ln,skewY:Ln,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Qo,originX:Vf,originY:Vf,originZ:ce,zIndex:$f,backgroundPositionX:ce,backgroundPositionY:ce,fillOpacity:Qo,strokeOpacity:Qo,numOctaves:$f};function sl(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(_f(u)){o[u]=d;continue}const f=Bf[u],h=W1(d,f);if(Fn.has(u)){if(a=!0,s[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=R1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=i;r.transformOrigin=`${u} ${d} ${f}`}}const il=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Rf(e,t,n){for(const r in t)!ct(t[r])&&!Nf(r,n)&&(e[r]=t[r])}function q1({transformTemplate:e},t){return b.useMemo(()=>{const n=il();return sl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function X1(e,t){const n=e.style||{},r={};return Rf(r,n,e),Object.assign(r,q1(e,t)),r}function Q1(e,t){const n={},r=X1(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 Z1=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 ai(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Z1.has(e)}let jf=e=>!ai(e);function zf(e){e&&(jf=t=>t.startsWith("on")?!ai(t):e(t))}try{zf(require("@emotion/is-prop-valid").default)}catch{}function J1(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(jf(o)||n===!0&&ai(o)||!t&&!ai(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Wf(e,t,n){return typeof e=="string"?e:ce.transform(t+n*e)}function eT(e,t,n){const r=Wf(t,e.x,e.width),o=Wf(n,e.y,e.height);return`${r} ${o}`}const tT={offset:"stroke-dashoffset",array:"stroke-dasharray"},nT={offset:"strokeDashoffset",array:"strokeDasharray"};function rT(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?tT:nT;e[s.offset]=ce.transform(-r);const i=ce.transform(t),a=ce.transform(n);e[s.array]=`${i} ${a}`}function al(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(sl(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=eT(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&rT(f,i,a,l,!1)}const Hf=()=>({...il(),attrs:{}}),ll=e=>typeof e=="string"&&e.toLowerCase()==="svg";function oT(e,t,n,r){const o=b.useMemo(()=>{const s=Hf();return al(s,t,ll(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Rf(s,e.style,e),o.style={...s,...o.style}}return o}function sT(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(nl(n)?oT:Q1)(r,s,i,n),c=J1(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=b.useMemo(()=>ct(d)?d.get():d,[d]);return b.createElement(n,{...u,children:f})}}function Uf(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Gf=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 Kf(e,t,n,r){Uf(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Gf.has(o)?o:ni(o),t.attrs[o])}function cl(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(ct(o[i])||t.style&&ct(t.style[i])||Nf(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function Yf(e,t,n){const r=cl(e,t,n);for(const o in e)if(ct(e[o])||ct(t[o])){const s=Xo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function qf(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ul(e,t,n,r){if(typeof t=="function"){const[o,s]=qf(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=qf(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function en(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const dl=e=>Array.isArray(e),iT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),aT=e=>dl(e)?e[e.length-1]||0:e;function li(e){const t=ct(e)?e.get():e;return iT(t)?t.toValue():t}const Xf=new Set(["opacity","clipPath","filter","transform"]);function Qf(e){if(Fn.has(e))return"transform";if(Xf.has(e))return ni(e)}function ci(e,t){e.indexOf(t)===-1&&e.push(t)}function ts(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function lT([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function cT({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:dT(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Zf=e=>(t,n)=>{const r=b.useContext(Js),o=b.useContext(ei),s=()=>cT(e,t,r,o,n);return n?s():en(s)};function uT(e,t){const n=Qf(t);n&&ci(e,n)}function Jf(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=ul(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function dT(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const g in c)i[g]=li(c[g]);let{initial:u,animate:d}=e;const f=oi(e),h=Df(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"&&!Yo(m)&&Jf(e,m,(g,y)=>{for(const x in g){let v=g[x];if(Array.isArray(v)){const T=p?v.length-1:0;v=v[T]}v!==null&&(i[x]=v)}for(const x in y)i[x]=y[x]}),l&&(d&&u!==!1&&!Yo(d)&&Jf(e,d,g=>{for(const y in g)uT(a,y)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Pe,cancel:tn,state:vt,steps:fl}=If(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),fT={useVisualState:Zf({scrapeMotionValuesFromProps:Yf,createRenderState:Hf,onMount:(e,t,{renderState:n,latestValues:r})=>{Pe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Pe.render(()=>{al(n,r,ll(t.tagName),e.transformTemplate),Kf(t,n)})}})},hT={useVisualState:Zf({applyWillChange:!0,scrapeMotionValuesFromProps:cl,createRenderState:il})};function pT(e,{forwardMotionProps:t=!1},n,r){return{...nl(e)?fT:hT,preloadedFeatures:n,useRender:sT(t),createVisualElement:r,Component:e}}function xn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const eh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ui(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const mT=e=>t=>eh(t)&&e(t,ui(t));function Tn(e,t,n,r){return xn(e,t,mT(n),r)}const gT=(e,t)=>n=>t(e(n)),Sn=(...e)=>e.reduce(gT);function th(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const nh=th("dragHorizontal"),rh=th("dragVertical");function oh(e){let t=!1;if(e==="y")t=rh();else if(e==="x")t=nh();else{const n=nh(),r=rh();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function sh(){const e=oh(!0);return e?(e(),!1):!0}class _n{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ih(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||sh())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Pe.postRender(()=>l(s,i))};return Tn(e.current,n,o,{passive:!e.getProps()[r]})}class yT extends _n{mount(){this.unmount=Sn(ih(this.node,!0),ih(this.node,!1))}unmount(){}}class vT extends _n{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=Sn(xn(this.node.current,"focus",()=>this.onFocus()),xn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ah=(e,t)=>t?e===t?!0:ah(e,t.parentElement):!1;function hl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ui(n))}class bT extends _n{constructor(){super(...arguments),this.removeStartListeners=yt,this.removeEndListeners=yt,this.removeAccessibleListeners=yt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Tn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!ah(this.node.current,a.target)?u:c;f&&Pe.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=Tn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Sn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||hl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Pe.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=xn(this.node.current,"keyup",i),hl("down",(a,l)=>{this.startPress(a,l)})},n=xn(this.node.current,"keydown",t),r=()=>{this.isPressing&&hl("cancel",(s,i)=>this.cancelPress(s,i))},o=xn(this.node.current,"blur",r);this.removeAccessibleListeners=Sn(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&&Pe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!sh()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Pe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Tn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=xn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Sn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const pl=new WeakMap,ml=new WeakMap,wT=e=>{const t=pl.get(e.target);t&&t(e)},xT=e=>{e.forEach(wT)};function TT({root:e,...t}){const n=e||document;ml.has(n)||ml.set(n,{});const r=ml.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(xT,{root:e,...t})),r[o]}function ST(e,t,n){const r=TT(t);return pl.set(e,n),r.observe(e),()=>{pl.delete(e),r.unobserve(e)}}const ET={some:0,all:1};class CT extends _n{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:ET[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return ST(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(PT(t,n))&&this.startObserver()}unmount(){}}function PT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const IT={inView:{Feature:CT},tap:{Feature:bT},focus:{Feature:vT},hover:{Feature:yT}};function lh(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 di(e,t,n){const r=e.getProps();return ul(r,t,n!==void 0?n:r.custom,e)}const nn=e=>e*1e3,rn=e=>e/1e3,OT={type:"spring",stiffness:500,damping:25,restSpeed:10},AT=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),MT={type:"keyframes",duration:.8},DT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kT=(e,{keyframes:t})=>t.length>2?MT:Fn.has(e)?e.startsWith("scale")?AT(t[1]):OT:DT;function FT({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function gl(e,t){return e[t]||e.default||e}const NT=e=>e!==null;function fi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(NT),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let hi;function LT(){hi=void 0}const Vn={now:()=>(hi===void 0&&Vn.set(vt.isProcessing||w1.useManualTiming?vt.timestamp:performance.now()),hi),set:e=>{hi=e,queueMicrotask(LT)}},ch=e=>/^0[^.\s]+$/u.test(e);function _T(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ch(e):!0}const uh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),VT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $T(e){const t=VT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const BT=4;function dh(e,t,n=1){Ft(n<=BT,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=$T(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return uh(i)?parseFloat(i):i}return rl(o)?dh(o,t,n+1):o}const RT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),fh=e=>e===Yr||e===ce,hh=(e,t)=>parseFloat(e.split(", ")[t]),ph=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return hh(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?hh(s[1],e):0}},jT=new Set(["x","y","z"]),zT=Xo.filter(e=>!jT.has(e));function WT(e){const t=[];return zT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const qr={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:ph(4,13),y:ph(5,14)};qr.translateX=qr.x,qr.translateY=qr.y;const mh=e=>t=>t.test(e),gh=[Yr,ce,Jt,Ln,Y1,K1,{test:e=>e==="auto",parse:e=>e}],yh=e=>gh.find(mh(e)),sr=new Set;let yl=!1,vl=!1;function vh(){if(vl){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=WT(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}vl=!1,yl=!1,sr.forEach(e=>e.complete()),sr.clear()}function bh(){sr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vl=!0)})}function HT(){bh(),vh()}class bl{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(sr.add(this),yl||(yl=!0,Pe.read(bh),Pe.resolveKeyframes(vh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),sr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,sr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const wl=(e,t)=>n=>!!(Jo(n)&&U1.test(n)&&n.startsWith(e)||t&&!G1(n)&&Object.prototype.hasOwnProperty.call(n,t)),wh=(e,t,n)=>r=>{if(!Jo(r))return r;const[o,s,i,a]=r.match(ol);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},UT=e=>Nn(0,255,e),xl={...Yr,transform:e=>Math.round(UT(e))},ir={test:wl("rgb","red"),parse:wh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+xl.transform(e)+", "+xl.transform(t)+", "+xl.transform(n)+", "+Zo(Qo.transform(r))+")"};function GT(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 Tl={test:wl("#"),parse:GT,transform:ir.transform},Xr={test:wl("hsl","hue"),parse:wh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Jt.transform(Zo(t))+", "+Jt.transform(Zo(n))+", "+Zo(Qo.transform(r))+")"},St={test:e=>ir.test(e)||Tl.test(e)||Xr.test(e),parse:e=>ir.test(e)?ir.parse(e):Xr.test(e)?Xr.parse(e):Tl.parse(e),transform:e=>Jo(e)?e:e.hasOwnProperty("red")?ir.transform(e):Xr.transform(e)};function KT(e){var t,n;return isNaN(e)&&Jo(e)&&(((t=e.match(ol))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(H1))===null||n===void 0?void 0:n.length)||0)>0}const xh="number",Th="color",YT="var",qT="var(",Sh="${}",XT=/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 ns(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(XT,l=>(St.test(l)?(r.color.push(s),o.push(Th),n.push(St.parse(l))):l.startsWith(qT)?(r.var.push(s),o.push(YT),n.push(l)):(r.number.push(s),o.push(xh),n.push(parseFloat(l))),++s,Sh)).split(Sh);return{values:n,split:a,indexes:r,types:o}}function Eh(e){return ns(e).values}function Ch(e){const{split:t,types:n}=ns(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===xh?s+=Zo(o[i]):a===Th?s+=St.transform(o[i]):s+=o[i]}return s}}const QT=e=>typeof e=="number"?0:e;function ZT(e){const t=Eh(e);return Ch(e)(t.map(QT))}const $n={test:KT,parse:Eh,createTransformer:Ch,getAnimatableNone:ZT},JT=new Set(["brightness","contrast","saturate","opacity"]);function eS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ol)||[];if(!r)return e;const o=n.replace(r,"");let s=JT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const tS=/\b([a-z-]*)\(.*?\)/gu,Sl={...$n,getAnimatableNone:e=>{const t=e.match(tS);return t?t.map(eS).join(" "):e}},nS={...Bf,color:St,backgroundColor:St,outlineColor:St,fill:St,stroke:St,borderColor:St,borderTopColor:St,borderRightColor:St,borderBottomColor:St,borderLeftColor:St,filter:Sl,WebkitFilter:Sl},El=e=>nS[e];function Ph(e,t){let n=El(e);return n!==Sl&&(n=$n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const rS=new Set(["auto","none","0"]);function oS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!rS.has(s)&&ns(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Ph(n,o)}class Ih extends bl{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(),rl(c))){const u=dh(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!RT.has(r)||t.length!==2)return;const[o,s]=t,i=yh(o),a=yh(s);if(i!==a)if(fh(i)&&fh(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++)_T(t[o])&&r.push(o);r.length&&oS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qr[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 s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=qr[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 Oh(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ah=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($n.test(e)||e==="0")&&!e.startsWith("url("));function sS(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 iS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Ah(o,t),a=Ah(s,t);return Kr(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:sS(e)||n==="spring"&&r}class Mh{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&HT(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!iS(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(fi(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 Dh(e,t){return t?e*(1e3/t):0}const aS=5;function kh(e,t,n){const r=Math.max(t-aS,0);return Dh(n-e(r),t-r)}const Cl=.001,lS=.01,Fh=10,cS=.05,uS=1;function dS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Kr(e<=nn(Fh),"Spring duration must be 10 seconds or less");let i=1-t;i=Nn(cS,uS,i),e=Nn(lS,Fh,rn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Pl(c,i),p=Math.exp(-d);return Cl-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Pl(Math.pow(c,2),i);return(-o(c)+Cl>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Cl+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=hS(o,s,a);if(e=nn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const fS=12;function hS(e,t,n){let r=n;for(let o=1;o<fS;o++)r=r-e(r)/t(r);return r}function Pl(e,t){return e*Math.sqrt(1-t*t)}const pS=["duration","bounce"],mS=["stiffness","damping","mass"];function Nh(e,t){return t.some(n=>e[n]!==void 0)}function gS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Nh(e,mS)&&Nh(e,pS)){const n=dS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Il({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=gS({...r,velocity:-rn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=s-o,g=rn(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 v=Pl(g,p);x=T=>{const S=Math.exp(-p*g*T);return s-S*((h+p*g*m)/v*Math.sin(v*T)+m*Math.cos(v*T))}}else if(p===1)x=v=>s-Math.exp(-g*v)*(m+(h+g*m)*v);else{const v=g*Math.sqrt(p*p-1);x=T=>{const S=Math.exp(-p*g*T),E=Math.min(v*T,300);return s-S*((h+p*g*m)*Math.sinh(E)+v*m*Math.cosh(E))/v}}return{calculatedDuration:f&&u||null,next:v=>{const T=x(v);if(f)i.done=v>=u;else{let S=h;v!==0&&(p<1?S=kh(x,v,T):S=0);const E=Math.abs(S)<=n,I=Math.abs(s-T)<=t;i.done=E&&I}return i.value=i.done?s:T,i}}}function Lh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=O=>a!==void 0&&O<a||l!==void 0&&O>l,p=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let m=n*t;const g=d+m,y=i===void 0?g:i(g);y!==g&&(m=y-d);const x=O=>-m*Math.exp(-O/r),v=O=>y+x(O),T=O=>{const F=x(O),M=v(O);f.done=Math.abs(F)<=c,f.value=f.done?y:M};let S,E;const I=O=>{h(f.value)&&(S=O,E=Il({keyframes:[f.value,p(f.value)],velocity:kh(v,O,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return I(0),{calculatedDuration:null,next:O=>{let F=!1;return!E&&S===void 0&&(F=!0,T(O),I(O)),S!==void 0&&O>=S?E.next(O-S):(!F&&T(O),f)}}}const _h=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,yS=1e-7,vS=12;function bS(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=_h(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>yS&&++a<vS);return i}function rs(e,t,n,r){if(e===t&&n===r)return yt;const o=s=>bS(s,0,1,e,n);return s=>s===0||s===1?s:_h(o(s),t,r)}const wS=rs(.42,0,1,1),xS=rs(0,0,.58,1),Vh=rs(.42,0,.58,1),$h=e=>Array.isArray(e)&&typeof e[0]!="number",Bh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rh=e=>t=>1-e(1-t),Ol=e=>1-Math.sin(Math.acos(e)),jh=Rh(Ol),TS=Bh(Ol),zh=rs(.33,1.53,.69,.99),Al=Rh(zh),SS=Bh(Al),Wh={linear:yt,easeIn:wS,easeInOut:Vh,easeOut:xS,circIn:Ol,circInOut:TS,circOut:jh,backIn:Al,backInOut:SS,backOut:zh,anticipate:e=>(e*=2)<1?.5*Al(e):.5*(2-Math.pow(2,-10*(e-1)))},Ml=e=>{if(Array.isArray(e)){Ft(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return rs(t,n,r,o)}else if(typeof e=="string")return Ft(Wh[e]!==void 0,`Invalid easing type '${e}'`),Wh[e];return e},Qr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},We=(e,t,n)=>e+(t-e)*n;function Dl(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 ES({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Dl(l,a,e+1/3),s=Dl(l,a,e),i=Dl(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function pi(e,t){return n=>n>0?t:e}const kl=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},CS=[Tl,ir,Xr],PS=e=>CS.find(t=>t.test(e));function Hh(e){const t=PS(e);if(Kr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Xr&&(n=ES(n)),n}const Uh=(e,t)=>{const n=Hh(e),r=Hh(t);if(!n||!r)return pi(e,t);const o={...n};return s=>(o.red=kl(n.red,r.red,s),o.green=kl(n.green,r.green,s),o.blue=kl(n.blue,r.blue,s),o.alpha=We(n.alpha,r.alpha,s),ir.transform(o))},Fl=new Set(["none","hidden"]);function IS(e,t){return Fl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OS(e,t){return n=>We(e,t,n)}function Nl(e){return typeof e=="number"?OS:typeof e=="string"?rl(e)?pi:St.test(e)?Uh:DS:Array.isArray(e)?Gh:typeof e=="object"?St.test(e)?Uh:AS:pi}function Gh(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Nl(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function AS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Nl(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function MS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const DS=(e,t)=>{const n=$n.createTransformer(t),r=ns(e),o=ns(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?Fl.has(e)&&!o.values.length||Fl.has(t)&&!r.values.length?IS(e,t):Sn(Gh(MS(r,o),o.values),n):(Kr(!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.`),pi(e,t))};function Kh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?We(e,t,n):Nl(e)(e,t)}function kS(e,t,n){const r=[],o=n||Kh,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||yt:t;a=Sn(l,a)}r.push(a)}return r}function Yh(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Ft(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=kS(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=Qr(e[u],e[u+1],c);return i[u](d)};return n?c=>l(Nn(e[0],e[s-1],c)):l}function qh(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Qr(0,t,r);e.push(We(n,1,o))}}function Xh(e){const t=[0];return qh(t,e.length-1),t}function FS(e,t){return e.map(n=>n*t)}function NS(e,t){return e.map(()=>t||Vh).splice(0,e.length-1)}function mi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=$h(r)?r.map(Ml):Ml(r),s={done:!1,value:t[0]},i=FS(n&&n.length===t.length?n:Xh(t),e),a=Yh(i,t,{ease:Array.isArray(o)?o:NS(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ll=2e4;function Qh(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ll;)t+=n,r=e.next(t);return t>=Ll?1/0:t}const LS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Pe.update(t,!0),stop:()=>tn(t),now:()=>vt.isProcessing?vt.timestamp:Vn.now()}},_S={decay:Lh,inertia:Lh,tween:mi,keyframes:mi,spring:Il},VS=e=>e/100;class _l extends Mh{constructor({KeyframeResolver:t=bl,...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:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=_S[n]||mi;let l,c;a!==mi&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ft(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Sn(VS,Kh(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Qh(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:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate: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 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 v=this.currentTime,T=s;if(h){const O=Math.min(this.currentTime,u)/d;let F=Math.floor(O),M=O%1;!M&&O>=1&&(M=1),M===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(p==="reverse"?(M=1-M,m&&(M-=m/d)):p==="mirror"&&(T=i)),v=Nn(0,1,M)*d}const S=x?{done:!1,value:l[0]}:T.next(v);a&&(S.value=a(S.value));let{done:E}=S;!x&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return I&&o!==void 0&&(S.value=fi(l,this.options,o)),g&&g(S.value),I&&this.finish(),S}get duration(){const{resolved:t}=this;return t?rn(t.calculatedDuration):0}get time(){return rn(this.currentTime)}set time(t){t=nn(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=rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=LS,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 Zh=e=>Array.isArray(e)&&typeof e[0]=="number";function Jh(e){return!!(!e||typeof e=="string"&&e in Vl||Zh(e)||Array.isArray(e)&&e.every(Jh))}const os=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Vl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:os([0,.65,.55,1]),circOut:os([.55,0,1,.45]),backIn:os([.31,.01,.66,-.59]),backOut:os([.33,1.53,.69,.99])};function $S(e){return ep(e)||Vl.easeOut}function ep(e){if(e)return Zh(e)?os(e):Array.isArray(e)?e.map($S):Vl[e]}function BS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=ep(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const RS=Oh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),gi=10,jS=2e4;function zS(e){return e.type==="spring"||!Jh(e.ease)}function WS(e,t){const n=new _l({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<jS;)r=n.sample(s),o.push(r.value),s+=gi;return{times:void 0,keyframes:o,duration:s-gi,ease:"linear"}}class tp extends Mh{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new Ih(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(zS(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=WS(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=BS(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Vn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(fi(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=nn(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 yt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return yt}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:s,ease:i,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 _l({...f,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=nn(this.time);c.setWithVelocity(h.sample(p-gi).value,h.sample(p).value,gi)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;return RS()&&r&&Xf.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function HS(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Pe.update(r,!0),()=>tn(r)}const US=Oh(()=>window.ScrollTimeline!==void 0);class $l{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(US()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),HS(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 Bl=(e,t,n,r={},o,s,i)=>a=>{const l=gl(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-nn(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(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};FT(l)||(d={...d,...kT(e,d)}),d.duration&&(d.duration=nn(d.duration)),d.repeatDelay&&(d.repeatDelay=nn(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&&!s&&t.get()!==void 0){const h=fi(d.keyframes,l);if(h!==void 0)return Pe.update(()=>{d.onUpdate(h),d.onComplete()}),new $l([])}return!s&&tp.supports(d)?new tp(d):new _l(d)};class Rl{constructor(){this.subscriptions=[]}add(t){return ci(this.subscriptions,t),()=>ts(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const np=new Set;function jl(e,t,n){e||np.has(t)||(console.warn(t),np.add(t))}const rp=30,GS=e=>!isNaN(parseFloat(e)),ss={current:void 0};class op{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Vn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Vn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=GS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&jl(!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 Rl);const r=this.events[t].add(n);return t==="change"?()=>{r(),Pe.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 ss.current&&ss.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Vn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rp);return Dh(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 Zr(e,t){return new op(e,t)}function KS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zr(n))}function YS(e,t){const n=di(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=aT(s[i]);KS(e,i,a)}}function sp(e){return e.getProps()[Pf]}class qS extends op{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Qf(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 s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(ts(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function XS(e){return!!(ct(e)&&e.add)}function zl(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 qS("auto"),e.addValue("willChange",r)),XS(r))return r.add(t)}function QS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Wl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&QS(u,d))continue;const p={delay:n,elapsed:0,...gl(i||{},d)};let m=!1;if(window.HandoffAppearAnimations){const y=sp(e);if(y){const x=window.HandoffAppearAnimations(y,d,f,Pe);x!==null&&(p.elapsed=x,m=!0)}}f.start(Bl(d,f,h,e.shouldReduceMotion&&Fn.has(d)?{type:!1}:p,e,m,zl(e,d)));const g=f.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{Pe.update(()=>{a&&YS(e,a)})}),c}function Hl(e,t,n={}){var r;const o=di(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Wl(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return ZS(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function ZS(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(JS).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Hl(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function JS(e,t){return e.sortNodePosition(t)}function eE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Hl(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Hl(e,t,n);else{const o=typeof t=="function"?di(e,t,n.custom):t;r=Promise.all(Wl(e,o,n))}return r.then(()=>{Pe.postRender(()=>{e.notify("AnimationComplete",t)})})}const tE=[...el].reverse(),nE=el.length;function rE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>eE(e,n,r)))}function oE(e){let t=rE(e),n=ip(),r=!0;const o=l=>(c,u)=>{var d;const f=di(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let g=0;g<nE;g++){const y=tE[g],x=n[y],v=c[y]!==void 0?c[y]:u[y],T=Ko(v),S=y===l?x.isActive:null;S===!1&&(p=g);let E=v===u[y]&&v!==c[y]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...h},!x.isActive&&S===null||!v&&!x.prevProp||Yo(v)||typeof v=="boolean")continue;let O=sE(x.prevProp,v)||y===l&&x.isActive&&!E&&T||g>p&&T,F=!1;const M=Array.isArray(v)?v:[v];let _=M.reduce(o(y),{});S===!1&&(_={});const{prevResolvedValues:k={}}=x,L={...k,..._},P=A=>{O=!0,f.has(A)&&(F=!0,f.delete(A)),x.needsAnimating[A]=!0;const N=e.getValue(A);N&&(N.liveStyle=!1)};for(const A in L){const N=_[A],$=k[A];if(h.hasOwnProperty(A))continue;let z=!1;dl(N)&&dl($)?z=!lh(N,$):z=N!==$,z?N!=null?P(A):f.add(A):N!==void 0&&f.has(A)?P(A):x.protectedKeys[A]=!0}x.prevProp=v,x.prevResolvedValues=_,x.isActive&&(h={...h,..._}),r&&e.blockInitialAnimation&&(O=!1),O&&(!E||F)&&d.push(...M.map(A=>({animation:A,options:{type:y}})))}if(f.size){const g={};f.forEach(y=>{const x=e.getBaseTarget(y),v=e.getValue(y);v&&(v.liveStyle=!0),g[y]=x??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=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ip(),r=!0}}}function sE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lh(t,e):!1}function ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ip(){return{animate:ar(!0),whileInView:ar(),whileHover:ar(),whileTap:ar(),whileDrag:ar(),whileFocus:ar(),exit:ar()}}class iE extends _n{constructor(t){super(t),t.animationState||(t.animationState=oE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yo(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 aE=0;class lE extends _n{constructor(){super(...arguments),this.id=aE++}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:iE},exit:{Feature:lE}},ap=(e,t)=>Math.abs(e-t);function uE(e,t){const n=ap(e.x,t.x),r=ap(e.y,t.y);return Math.sqrt(n**2+r**2)}class lp{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!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=Gl(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=uE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=vt;this.history.push({...p,timestamp:m});const{onStart:g,onMove:y}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Ul(f,this.transformPagePoint),Pe.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=Gl(d.type==="pointercancel"?this.lastMoveEventInfo:Ul(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,g),p&&p(d,g)},!eh(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=ui(t),a=Ul(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=vt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Gl(a,this.history)),this.removeListeners=Sn(Tn(this.contextWindow,"pointermove",this.handlePointerMove),Tn(this.contextWindow,"pointerup",this.handlePointerUp),Tn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),tn(this.updatePoint)}}function Ul(e,t){return t?{point:t(e.point)}:e}function cp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Gl({point:e},t){return{point:e,delta:cp(e,up(t)),offset:cp(e,dE(t)),velocity:fE(t,.1)}}function dE(e){return e[0]}function up(e){return e[e.length-1]}function fE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=up(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>nn(t)));)n--;if(!r)return{x:0,y:0};const s=rn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const dp=1e-4,hE=1-dp,pE=1+dp,fp=.01,mE=0-fp,gE=0+fp;function Nt(e){return e.max-e.min}function yE(e,t,n){return Math.abs(e-t)<=n}function hp(e,t,n,r=.5){e.origin=r,e.originPoint=We(t.min,t.max,e.origin),e.scale=Nt(n)/Nt(t),e.translate=We(n.min,n.max,e.origin)-e.originPoint,(e.scale>=hE&&e.scale<=pE||isNaN(e.scale))&&(e.scale=1),(e.translate>=mE&&e.translate<=gE||isNaN(e.translate))&&(e.translate=0)}function is(e,t,n,r){hp(e.x,t.x,n.x,r?r.originX:void 0),hp(e.y,t.y,n.y,r?r.originY:void 0)}function pp(e,t,n){e.min=n.min+t.min,e.max=e.min+Nt(t)}function vE(e,t,n){pp(e.x,t.x,n.x),pp(e.y,t.y,n.y)}function mp(e,t,n){e.min=t.min-n.min,e.max=e.min+Nt(t)}function as(e,t,n){mp(e.x,t.x,n.x),mp(e.y,t.y,n.y)}function bE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?We(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?We(n,e,r.max):Math.min(e,n)),e}function gp(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 wE(e,{top:t,left:n,bottom:r,right:o}){return{x:gp(e.x,n,o),y:gp(e.y,t,r)}}function yp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function xE(e,t){return{x:yp(e.x,t.x),y:yp(e.y,t.y)}}function TE(e,t){let n=.5;const r=Nt(e),o=Nt(t);return o>r?n=Qr(t.min,t.max-r,e.min):r>o&&(n=Qr(e.min,e.max-o,t.min)),Nn(0,1,n)}function SE(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 Kl=.35;function EE(e=Kl){return e===!1?e=0:e===!0&&(e=Kl),{x:vp(e,"left","right"),y:vp(e,"top","bottom")}}function vp(e,t,n){return{min:bp(e,t),max:bp(e,n)}}function bp(e,t){return typeof e=="number"?e:e[t]||0}const wp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Jr=()=>({x:wp(),y:wp()}),xp=()=>({min:0,max:0}),rt=()=>({x:xp(),y:xp()});function jt(e){return[e("x"),e("y")]}function Tp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function CE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function PE(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 Yl(e){return e===void 0||e===1}function ql({scale:e,scaleX:t,scaleY:n}){return!Yl(e)||!Yl(t)||!Yl(n)}function lr(e){return ql(e)||Sp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Sp(e){return Ep(e.x)||Ep(e.y)}function Ep(e){return e&&e!=="0%"}function yi(e,t,n){const r=e-n,o=t*r;return n+o}function Cp(e,t,n,r,o){return o!==void 0&&(e=yi(e,o,r)),yi(e,n,r)+t}function Xl(e,t=0,n=1,r,o){e.min=Cp(e.min,t,n,r,o),e.max=Cp(e.max,t,n,r,o)}function Pp(e,{x:t,y:n}){Xl(e.x,t.translate,t.scale,t.originPoint),Xl(e.y,n.translate,n.scale,n.originPoint)}const Ip=.999999999999,Op=1.0000000000001;function IE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&eo(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Pp(e,i)),r&&lr(s.latestValues)&&eo(e,s.latestValues))}t.x<Op&&t.x>Ip&&(t.x=1),t.y<Op&&t.y>Ip&&(t.y=1)}function Bn(e,t){e.min=e.min+t,e.max=e.max+t}function Ap(e,t,n,r,o=.5){const s=We(e.min,e.max,o);Xl(e,t,n,s,r)}function eo(e,t){Ap(e.x,t.x,t.scaleX,t.scale,t.originX),Ap(e.y,t.y,t.scaleY,t.scale,t.originY)}function Mp(e,t){return Tp(PE(e.getBoundingClientRect(),t))}function OE(e,t,n){const r=Mp(e,n),{scroll:o}=t;return o&&(Bn(r.x,o.offset.x),Bn(r.y,o.offset.y)),r}const Dp=({current:e})=>e?e.ownerDocument.defaultView:null,AE=new WeakMap;class ME{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=rt(),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(ui(u,"page").point)},s=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=oh(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),jt(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Jt.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const T=v.layout.layoutBox[y];T&&(x=Nt(T)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&Pe.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=zl(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(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=DE(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=()=>jt(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 lp(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Dp(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:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Pe.postRender(()=>i(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||!vi(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=bE(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Ur(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=wE(o.layoutBox,n):this.constraints=!1,this.elastic=EE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&jt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=SE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ur(t))return!1;const r=t.current;Ft(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=OE(r,o.root,this.visualElement.getTransformPagePoint());let i=xE(o.layout.layoutBox,s);if(n){const a=n(CE(i));this.hasMutatedConstraints=!!a,a&&(i=Tp(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=jt(u=>{if(!vi(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Bl(t,r,0,n,this.visualElement,!1,zl(this.visualElement,t)))}stopAnimation(){jt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){jt(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){jt(n=>{const{drag:r}=this.getProps();if(!vi(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-We(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ur(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};jt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=TE({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),jt(i=>{if(!vi(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(We(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;AE.set(this.visualElement,this);const t=this.visualElement.current,n=Tn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ur(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Pe.read(r);const i=xn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(jt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Kl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function vi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function DE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class kE extends _n{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new ME(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const kp=e=>(t,n)=>{e&&Pe.postRender(()=>e(t,n))};class FE extends _n{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new lp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Dp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:kp(t),onStart:kp(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Pe.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Tn(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 NE(){const e=b.useContext(ei);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 bi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Fp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ls={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ce.test(e))e=parseFloat(e);else return e;const n=Fp(e,t.target.x),r=Fp(e,t.target.y);return`${n}% ${r}%`}},LE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=$n.parse(e);if(o.length>5)return r;const s=$n.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=We(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class _E extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;V1(VE),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),bi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Pe.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ja.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 Np(e){const[t,n]=NE(),r=b.useContext(qo);return w.jsx(_E,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(Of),isPresent:t,safeToRemove:n})}const VE={borderRadius:{...ls,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ls,borderTopRightRadius:ls,borderBottomLeftRadius:ls,borderBottomRightRadius:ls,boxShadow:LE},Lp=["TopLeft","TopRight","BottomLeft","BottomRight"],$E=Lp.length,_p=e=>typeof e=="string"?parseFloat(e):e,Vp=e=>typeof e=="number"||ce.test(e);function BE(e,t,n,r,o,s){o?(e.opacity=We(0,n.opacity!==void 0?n.opacity:1,RE(r)),e.opacityExit=We(t.opacity!==void 0?t.opacity:1,0,jE(r))):s&&(e.opacity=We(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<$E;i++){const a=`border${Lp[i]}Radius`;let l=$p(t,a),c=$p(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Vp(l)===Vp(c)?(e[a]=Math.max(We(_p(l),_p(c),r),0),(Jt.test(c)||Jt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=We(t.rotate||0,n.rotate||0,r))}function $p(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const RE=Bp(0,.5,jh),jE=Bp(.5,.95,yt);function Bp(e,t,n){return r=>r<e?0:r>t?1:n(Qr(e,t,r))}function Rp(e,t){e.min=t.min,e.max=t.max}function zt(e,t){Rp(e.x,t.x),Rp(e.y,t.y)}function jp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zp(e,t,n,r,o){return e-=t,e=yi(e,1/n,r),o!==void 0&&(e=yi(e,1/o,r)),e}function zE(e,t=0,n=1,r=.5,o,s=e,i=e){if(Jt.test(t)&&(t=parseFloat(t),t=We(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=We(s.min,s.max,r);e===s&&(a-=t),e.min=zp(e.min,t,n,a,o),e.max=zp(e.max,t,n,a,o)}function Wp(e,t,[n,r,o],s,i){zE(e,t[n],t[r],t[o],t.scale,s,i)}const WE=["x","scaleX","originX"],HE=["y","scaleY","originY"];function Hp(e,t,n,r){Wp(e.x,t,WE,n?n.x:void 0,r?r.x:void 0),Wp(e.y,t,HE,n?n.y:void 0,r?r.y:void 0)}function Up(e){return e.translate===0&&e.scale===1}function Gp(e){return Up(e.x)&&Up(e.y)}function UE(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 Kp(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 Yp(e){return Nt(e.x)/Nt(e.y)}function qp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class GE{constructor(){this.members=[]}add(t){ci(this.members,t),t.scheduleRender()}remove(t){if(ts(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function KE(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const YE=(e,t)=>e.depth-t.depth;class qE{constructor(){this.children=[],this.isDirty=!1}add(t){ci(this.children,t),this.isDirty=!0}remove(t){ts(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YE),this.isDirty=!1,this.children.forEach(t)}}function XE(e,t){const n=Vn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(tn(r),e(s-t))};return Pe.read(r,!0),()=>tn(r)}function Xp(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Ql(e,t,n){const r=ct(e)?e:Zr(e);return r.start(Bl("",r,t,n)),r.animation}const cr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Zl=["","X","Y","Z"],QE={visibility:"hidden"},Qp=1e3;let ZE=0;function Jl(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Zp(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?sp(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Zp(e.parent):!1:!1}function Jp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=ZE++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(cr.totalNodes=cr.resolvedTargetDeltas=cr.recalculatedProjection=0),this.nodes.forEach(tC),this.nodes.forEach(iC),this.nodes.forEach(aC),this.nodes.forEach(nC),window.MotionDebug&&window.MotionDebug.record(cr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new qE)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Rl),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Xp(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=XE(f,250),bi.hasAnimatedSinceResize&&(bi.hasAnimatedSinceResize=!1,this.nodes.forEach(tm))})}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()||fC,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),x=!this.targetLayout||!Kp(this.targetLayout,p)||h,v=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,v);const T={...gl(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||tm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,tn(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(lC),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Zp(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(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(em);return}this.isUpdating||this.nodes.forEach(oC),this.isUpdating=!1,this.nodes.forEach(sC),this.nodes.forEach(JE),this.nodes.forEach(eC),this.clearAllSnapshots();const a=Vn.now();vt.delta=Nn(0,1e3/60,a-vt.timestamp),vt.timestamp=a,vt.isProcessing=!0,fl.update.process(vt),fl.preRender.process(vt),fl.render.process(vt),vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ja.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rC),this.sharedNodes.forEach(cC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pe.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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=rt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gp(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||lr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),hC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return rt();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(Bn(a.x,l.offset.x),Bn(a.y,l.offset.y)),a}removeElementScroll(i){const a=rt();zt(a,i);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){zt(a,i);const{scroll:f}=this.root;f&&(Bn(a.x,-f.offset.x),Bn(a.y,-f.offset.y))}Bn(a.x,u.offset.x),Bn(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=rt();zt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&eo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),lr(u.latestValues)&&eo(l,u.latestValues)}return lr(this.latestValues)&&eo(l,this.latestValues),l}removeTransform(i){const a=rt();zt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!lr(c.latestValues))continue;ql(c.latestValues)&&c.updateSnapshot();const u=rt(),d=c.measurePageBox();zt(u,d),Hp(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return lr(this.latestValues)&&Hp(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=vt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rt(),this.relativeTargetOrigin=rt(),as(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=rt(),this.targetWithTransforms=rt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):zt(this.target,this.layout.layoutBox),Pp(this.target,this.targetDelta)):zt(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=rt(),this.relativeTargetOrigin=rt(),as(this.relativeTargetOrigin,this.target,h.target),zt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&cr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ql(this.parent.latestValues)||Sp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===vt.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;zt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;IE(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=rt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(jp(this.prevProjectionDelta.x,this.projectionDelta.x),jp(this.prevProjectionDelta.y,this.projectionDelta.y)),is(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!qp(this.projectionDelta.x,this.prevProjectionDelta.x)||!qp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&cr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Jr(),this.projectionDelta=Jr(),this.projectionDeltaWithTransform=Jr()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Jr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=rt(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,g=this.getStack(),y=!g||g.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(dC));this.animationProgress=0;let v;this.mixTargetDelta=T=>{const S=T/1e3;nm(d.x,i.x,S),nm(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(as(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),uC(this.relativeTarget,this.relativeTargetOrigin,f,S),v&&UE(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=rt()),zt(v,this.relativeTarget)),m&&(this.animationValues=u,BE(u,c,this.latestValues,S,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(tn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pe.update(()=>{bi.hasAnimatedSinceResize=!0,this.currentAnimation=Ql(0,Qp,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qp),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&am(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||rt();const d=Nt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Nt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}zt(a,l),eo(a,u),is(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new GE),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Jl("z",i,c,this.animationValues);for(let u=0;u<Zl.length;u++)Jl(`rotate${Zl[u]}`,i,c,this.animationValues),Jl(`skew${Zl[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return QE;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=li(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=li(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!lr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=KE(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 si){if(f[m]===void 0)continue;const{correct:g,applyTo:y}=si[m],x=c.transform==="none"?f[m]:g(f[m],d);if(y){const v=y.length;for(let T=0;T<v;T++)c[y[T]]=x}else c[m]=x}return this.options.layoutId&&(c.pointerEvents=d===this?li(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(em),this.root.sharedNodes.clear()}}}function JE(e){e.updateLayout()}function eC(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?jt(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Nt(f);f.min=r[d].min,f.max=f.min+h}):am(s,n.layoutBox,r)&&jt(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Nt(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=Jr();is(a,r,n.layoutBox);const l=Jr();i?is(l,e.applyTransform(o,!0),n.measuredBox):is(l,r,n.layoutBox);const c=!Gp(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=rt();as(p,n.layoutBox,f.layoutBox);const m=rt();as(m,r,h.layoutBox),Kp(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 tC(e){window.MotionDebug&&cr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function nC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rC(e){e.clearSnapshot()}function em(e){e.clearMeasurements()}function oC(e){e.isLayoutDirty=!1}function sC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iC(e){e.resolveTargetDelta()}function aC(e){e.calcProjection()}function lC(e){e.resetSkewAndRotation()}function cC(e){e.removeLeadSnapshot()}function nm(e,t,n){e.translate=We(t.translate,0,n),e.scale=We(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rm(e,t,n,r){e.min=We(t.min,n.min,r),e.max=We(t.max,n.max,r)}function uC(e,t,n,r){rm(e.x,t.x,n.x,r),rm(e.y,t.y,n.y,r)}function dC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const fC={duration:.45,ease:[.4,0,.1,1]},om=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sm=om("applewebkit/")&&!om("chrome/")?Math.round:yt;function im(e){e.min=sm(e.min),e.max=sm(e.max)}function hC(e){im(e.x),im(e.y)}function am(e,t,n){return e==="position"||e==="preserve-aspect"&&!yE(Yp(t),Yp(n),.2)}const pC=Jp({attachResizeListener:(e,t)=>xn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ec={current:void 0},lm=Jp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ec.current){const e=new pC({});e.mount(window),e.setOptions({layoutScroll:!0}),ec.current=e}return ec.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),mC={pan:{Feature:FE},drag:{Feature:kE,ProjectionNode:lm,MeasureLayout:Np}},tc={current:null},cm={current:!1};function gC(){if(cm.current=!0,!!Za)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tc.current=e.matches;e.addListener(t),t()}else tc.current=!1}function yC(e,t,n){for(const r in t){const o=t[r],s=n[r];if(ct(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&jl(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(ct(s))e.addValue(r,Zr(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Zr(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const cs=new WeakMap,vC=[...gh,St,$n],bC=e=>vC.find(mh(e)),um=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],wC=tl.length;class xC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},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=bl,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,Pe.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=oi(n),this.isVariantNode=Df(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&&ct(h)&&h.set(l[f],!1)}}mount(t){this.current=t,cs.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)),cm.current||gC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:tc.current,process.env.NODE_ENV!=="production"&&jl(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(){cs.delete(this.current),this.projection&&this.projection.unmount(),tn(this.notifyUpdate),tn(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=Fn.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Pe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),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 Gr){const n=Gr[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):rt()}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<um.length;r++){const o=um[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=yC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<wC;r++){const o=tl[r],s=this.props[o];(Ko(s)||s===!1)&&(n[o]=s)}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=Zr(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"&&(uh(o)||ch(o))?o=parseFloat(o):!bC(o)&&$n.test(n)&&(o=Ph(t,n)),this.setBaseTarget(t,ct(o)?o.get():o)),ct(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=ul(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ct(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Rl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class dm extends xC{constructor(){super(...arguments),this.KeyframeResolver=Ih}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 TC(e){return window.getComputedStyle(e)}class fm extends dm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Uf}readValueFromInstance(t,n){if(Fn.has(n)){const r=El(n);return r&&r.default||0}else{const r=TC(t),o=(_f(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Mp(t,n)}build(t,n,r){sl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cl(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ct(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class hm extends dm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fn.has(n)){const r=El(n);return r&&r.default||0}return n=Gf.has(n)?n:ni(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Yf(t,n,r)}build(t,n,r){al(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Kf(t,n,r,o)}mount(t){this.isSVGTag=ll(t.tagName),super.mount(t)}}const SC=(e,t)=>nl(e)?new hm(t):new fm(t,{allowProjection:e!==b.Fragment}),EC={...cE,...IT,...mC,...{layout:{ProjectionNode:lm,MeasureLayout:Np}}},pt=L1((e,t)=>pT(e,t,EC,SC));function pm(){const e=b.useRef(!1);return ti(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function mm(){const e=pm(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Pe.postRender(r),[r]),t]}class CC extends C.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 PC({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=b.useContext(Hr);return b.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
5
- [data-motion-pop-id="${n}"] {
1
+ (function(Q,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],w):(Q=typeof globalThis<"u"?globalThis:Q||self,w(Q.components={},Q.React,Q["react/jsx-runtime"],Q.ReactDOM))})(this,function(Q,w,x,Oi){"use strict";var W$=Object.defineProperty;var U$=(Q,w,x)=>w in Q?W$(Q,w,{enumerable:!0,configurable:!0,writable:!0,value:x}):Q[w]=x;var ie=(Q,w,x)=>U$(Q,typeof w!="symbol"?w+"":w,x);function zf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const k=zf(w),ms=zf(Oi);function Hf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hf(e))&&(r&&(r+=" "),r+=t);return r}var Wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tx(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Sx=Error,Ex=EvalError,Cx=RangeError,Px=ReferenceError,Uf=SyntaxError,gs=TypeError,kx=URIError,Ix=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},Gf=typeof Symbol<"u"&&Symbol,Ax=Ix,Ox=function(){return typeof Gf!="function"||typeof Symbol!="function"||typeof Gf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ax()},Il={__proto__:null,foo:{}},_x=Object,Dx=function(){return{__proto__:Il}.foo===Il.foo&&!(Il instanceof _x)},Mx="Function.prototype.bind called on incompatible ",Nx=Object.prototype.toString,Fx=Math.max,Lx="[object Function]",Yf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},Vx=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},$x=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Rx=function(t){var n=this;if(typeof n!="function"||Nx.apply(n)!==Lx)throw new TypeError(Mx+n);for(var r=Vx(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,Yf(r,arguments));return Object(u)===u?u:this}return n.apply(t,Yf(r,arguments))},i=Fx(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+$x(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},Bx=Rx,Al=Function.prototype.bind||Bx,jx=Function.prototype.call,zx=Object.prototype.hasOwnProperty,Hx=Al,Wx=Hx.call(jx,zx),Ie,Ux=Sx,Gx=Ex,Yx=Cx,qx=Px,ro=Uf,oo=gs,Kx=kx,qf=Function,Ol=function(e){try{return qf('"use strict"; return ('+e+").constructor;")()}catch{}},wr=Object.getOwnPropertyDescriptor;if(wr)try{wr({},"")}catch{wr=null}var _l=function(){throw new oo},Zx=wr?function(){try{return arguments.callee,_l}catch{try{return wr(arguments,"callee").get}catch{return _l}}}():_l,so=Ox(),Xx=Dx(),Tt=Object.getPrototypeOf||(Xx?function(e){return e.__proto__}:null),io={},Qx=typeof Uint8Array>"u"||!Tt?Ie:Tt(Uint8Array),xr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ie:ArrayBuffer,"%ArrayIteratorPrototype%":so&&Tt?Tt([][Symbol.iterator]()):Ie,"%AsyncFromSyncIteratorPrototype%":Ie,"%AsyncFunction%":io,"%AsyncGenerator%":io,"%AsyncGeneratorFunction%":io,"%AsyncIteratorPrototype%":io,"%Atomics%":typeof Atomics>"u"?Ie:Atomics,"%BigInt%":typeof BigInt>"u"?Ie:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ie:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ux,"%eval%":eval,"%EvalError%":Gx,"%Float32Array%":typeof Float32Array>"u"?Ie:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ie:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ie:FinalizationRegistry,"%Function%":qf,"%GeneratorFunction%":io,"%Int8Array%":typeof Int8Array>"u"?Ie:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ie:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":so&&Tt?Tt(Tt([][Symbol.iterator]())):Ie,"%JSON%":typeof JSON=="object"?JSON:Ie,"%Map%":typeof Map>"u"?Ie:Map,"%MapIteratorPrototype%":typeof Map>"u"||!so||!Tt?Ie:Tt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ie:Promise,"%Proxy%":typeof Proxy>"u"?Ie:Proxy,"%RangeError%":Yx,"%ReferenceError%":qx,"%Reflect%":typeof Reflect>"u"?Ie:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ie:Set,"%SetIteratorPrototype%":typeof Set>"u"||!so||!Tt?Ie:Tt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":so&&Tt?Tt(""[Symbol.iterator]()):Ie,"%Symbol%":so?Symbol:Ie,"%SyntaxError%":ro,"%ThrowTypeError%":Zx,"%TypedArray%":Qx,"%TypeError%":oo,"%Uint8Array%":typeof Uint8Array>"u"?Ie:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ie:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ie:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ie:Uint32Array,"%URIError%":Kx,"%WeakMap%":typeof WeakMap>"u"?Ie:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ie:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ie:WeakSet};if(Tt)try{null.error}catch(e){var Jx=Tt(Tt(e));xr["%Error.prototype%"]=Jx}var e1=function e(t){var n;if(t==="%AsyncFunction%")n=Ol("async function () {}");else if(t==="%GeneratorFunction%")n=Ol("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ol("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Tt&&(n=Tt(o.prototype))}return xr[t]=n,n},Kf={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ys=Al,_i=Wx,t1=ys.call(Function.call,Array.prototype.concat),n1=ys.call(Function.apply,Array.prototype.splice),Zf=ys.call(Function.call,String.prototype.replace),Di=ys.call(Function.call,String.prototype.slice),r1=ys.call(Function.call,RegExp.prototype.exec),o1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,s1=/\\(\\)?/g,i1=function(t){var n=Di(t,0,1),r=Di(t,-1);if(n==="%"&&r!=="%")throw new ro("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new ro("invalid intrinsic syntax, expected opening `%`");var o=[];return Zf(t,o1,function(s,i,a,l){o[o.length]=a?Zf(l,s1,"$1"):i||s}),o},a1=function(t,n){var r=t,o;if(_i(Kf,r)&&(o=Kf[r],r="%"+o[0]+"%"),_i(xr,r)){var s=xr[r];if(s===io&&(s=e1(r)),typeof s>"u"&&!n)throw new oo("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new ro("intrinsic "+t+" does not exist!")},ao=function(t,n){if(typeof t!="string"||t.length===0)throw new oo("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new oo('"allowMissing" argument must be a boolean');if(r1(/^%?[^%]*%?$/,t)===null)throw new ro("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=i1(t),o=r.length>0?r[0]:"",s=a1("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],n1(r,t1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=Di(f,0,1),p=Di(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new ro("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",_i(xr,i))a=xr[i];else if(a!=null){if(!(f in a)){if(!n)throw new oo("base intrinsic for "+t+" exists, but the property is not available.");return}if(wr&&u+1>=r.length){var m=wr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=_i(a,f),a=a[f];d&&!l&&(xr[i]=a)}}return a},Xf={exports:{}},Dl,Qf;function Ml(){if(Qf)return Dl;Qf=1;var e=ao,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Dl=t,Dl}var l1=ao,Mi=l1("%Object.getOwnPropertyDescriptor%",!0);if(Mi)try{Mi([],"length")}catch{Mi=null}var Jf=Mi,eh=Ml(),c1=Uf,lo=gs,th=Jf,u1=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new lo("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new lo("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new lo("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new lo("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new lo("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new lo("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!th&&th(t,n);if(eh)eh(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new c1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Nl=Ml(),nh=function(){return!!Nl};nh.hasArrayLengthDefineBug=function(){if(!Nl)return null;try{return Nl([],"length",{value:1}).length!==1}catch{return!0}};var d1=nh,f1=ao,rh=u1,h1=d1(),oh=Jf,sh=gs,p1=f1("%Math.floor%"),m1=function(t,n){if(typeof t!="function")throw new sh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||p1(n)!==n)throw new sh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&oh){var i=oh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(h1?rh(t,"length",n,!0,!0):rh(t,"length",n)),t};(function(e){var t=Al,n=ao,r=m1,o=gs,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Ml(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Xf);var g1=Xf.exports,ih=ao,ah=g1,y1=ah(ih("String.prototype.indexOf")),v1=function(t,n){var r=ih(t,!!n);return typeof r=="function"&&y1(t,".prototype.")>-1?ah(r):r};const b1=Tx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Fl=typeof Map=="function"&&Map.prototype,Ll=Object.getOwnPropertyDescriptor&&Fl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ni=Fl&&Ll&&typeof Ll.get=="function"?Ll.get:null,lh=Fl&&Map.prototype.forEach,Vl=typeof Set=="function"&&Set.prototype,$l=Object.getOwnPropertyDescriptor&&Vl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Fi=Vl&&$l&&typeof $l.get=="function"?$l.get:null,ch=Vl&&Set.prototype.forEach,w1=typeof WeakMap=="function"&&WeakMap.prototype,vs=w1?WeakMap.prototype.has:null,x1=typeof WeakSet=="function"&&WeakSet.prototype,bs=x1?WeakSet.prototype.has:null,T1=typeof WeakRef=="function"&&WeakRef.prototype,uh=T1?WeakRef.prototype.deref:null,S1=Boolean.prototype.valueOf,E1=Object.prototype.toString,C1=Function.prototype.toString,P1=String.prototype.match,Rl=String.prototype.slice,qn=String.prototype.replace,k1=String.prototype.toUpperCase,dh=String.prototype.toLowerCase,fh=RegExp.prototype.test,hh=Array.prototype.concat,yn=Array.prototype.join,I1=Array.prototype.slice,ph=Math.floor,Bl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,jl=Object.getOwnPropertySymbols,zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,co=typeof Symbol=="function"&&typeof Symbol.iterator=="object",_t=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===co||!0)?Symbol.toStringTag:null,mh=Object.prototype.propertyIsEnumerable,gh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function yh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||fh.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-ph(-e):ph(e);if(r!==e){var o=String(r),s=Rl.call(t,o.length+1);return qn.call(o,n,"$&_")+"."+qn.call(qn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qn.call(t,n,"$&_")}var Hl=b1,vh=Hl.custom,bh=Th(vh)?vh:null,A1=function e(t,n,r,o){var s=n||{};if(Kn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Kn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Kn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Kn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Kn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Eh(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?yh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?yh(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Wl(t)?"[Array]":"[Object]";var d=Y1(s,r);if(typeof o>"u")o=[];else if(Sh(o,t)>=0)return"[Circular]";function f(F,P,N){if(P&&(o=I1.call(o),o.push(P)),N){var L={depth:s.depth};return Kn(s,"quoteStyle")&&(L.quoteStyle=s.quoteStyle),e(F,L,r+1,o)}return e(F,s,r+1,o)}if(typeof t=="function"&&!xh(t)){var h=$1(t),p=Li(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+yn.call(p,", ")+" }":"")}if(Th(t)){var m=co?qn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):zl.call(t);return typeof t=="object"&&!co?ws(m):m}if(W1(t)){for(var b="<"+dh.call(String(t.nodeName)),v=t.attributes||[],y=0;y<v.length;y++)b+=" "+v[y].name+"="+wh(O1(v[y].value),"double",s);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+dh.call(String(t.nodeName))+">",b}if(Wl(t)){if(t.length===0)return"[]";var g=Li(t,f);return d&&!G1(g)?"["+Gl(g,d)+"]":"[ "+yn.call(g,", ")+" ]"}if(D1(t)){var S=Li(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!mh.call(t,"cause")?"{ ["+String(t)+"] "+yn.call(hh.call("[cause]: "+f(t.cause),S),", ")+" }":S.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+yn.call(S,", ")+" }"}if(typeof t=="object"&&i){if(bh&&typeof t[bh]=="function"&&Hl)return Hl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(R1(t)){var T=[];return lh&&lh.call(t,function(F,P){T.push(f(P,t,!0)+" => "+f(F,t))}),Ch("Map",Ni.call(t),T,d)}if(z1(t)){var E=[];return ch&&ch.call(t,function(F){E.push(f(F,t))}),Ch("Set",Fi.call(t),E,d)}if(B1(t))return Ul("WeakMap");if(H1(t))return Ul("WeakSet");if(j1(t))return Ul("WeakRef");if(N1(t))return ws(f(Number(t)));if(L1(t))return ws(f(Bl.call(t)));if(F1(t))return ws(S1.call(t));if(M1(t))return ws(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Wf<"u"&&t===Wf)return"{ [object globalThis] }";if(!_1(t)&&!xh(t)){var C=Li(t,f),I=gh?gh(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",O=!I&&_t&&Object(t)===t&&_t in t?Rl.call(Zn(t),8,-1):A?"Object":"",M=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",_=M+(O||A?"["+yn.call(hh.call([],O||[],A||[]),": ")+"] ":"");return C.length===0?_+"{}":d?_+"{"+Gl(C,d)+"}":_+"{ "+yn.call(C,", ")+" }"}return String(t)};function wh(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function O1(e){return qn.call(String(e),/"/g,"&quot;")}function Wl(e){return Zn(e)==="[object Array]"&&(!_t||!(typeof e=="object"&&_t in e))}function _1(e){return Zn(e)==="[object Date]"&&(!_t||!(typeof e=="object"&&_t in e))}function xh(e){return Zn(e)==="[object RegExp]"&&(!_t||!(typeof e=="object"&&_t in e))}function D1(e){return Zn(e)==="[object Error]"&&(!_t||!(typeof e=="object"&&_t in e))}function M1(e){return Zn(e)==="[object String]"&&(!_t||!(typeof e=="object"&&_t in e))}function N1(e){return Zn(e)==="[object Number]"&&(!_t||!(typeof e=="object"&&_t in e))}function F1(e){return Zn(e)==="[object Boolean]"&&(!_t||!(typeof e=="object"&&_t in e))}function Th(e){if(co)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!zl)return!1;try{return zl.call(e),!0}catch{}return!1}function L1(e){if(!e||typeof e!="object"||!Bl)return!1;try{return Bl.call(e),!0}catch{}return!1}var V1=Object.prototype.hasOwnProperty||function(e){return e in this};function Kn(e,t){return V1.call(e,t)}function Zn(e){return E1.call(e)}function $1(e){if(e.name)return e.name;var t=P1.call(C1.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Sh(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function R1(e){if(!Ni||!e||typeof e!="object")return!1;try{Ni.call(e);try{Fi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function B1(e){if(!vs||!e||typeof e!="object")return!1;try{vs.call(e,vs);try{bs.call(e,bs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function j1(e){if(!uh||!e||typeof e!="object")return!1;try{return uh.call(e),!0}catch{}return!1}function z1(e){if(!Fi||!e||typeof e!="object")return!1;try{Fi.call(e);try{Ni.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function H1(e){if(!bs||!e||typeof e!="object")return!1;try{bs.call(e,bs);try{vs.call(e,vs)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function W1(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Eh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Eh(Rl.call(e,0,t.maxStringLength),t)+r}var o=qn.call(qn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,U1);return wh(o,"single",t)}function U1(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+k1.call(t.toString(16))}function ws(e){return"Object("+e+")"}function Ul(e){return e+" { ? }"}function Ch(e,t,n,r){var o=r?Gl(n,r):yn.call(n,", ");return e+" ("+t+") {"+o+"}"}function G1(e){for(var t=0;t<e.length;t++)if(Sh(e[t],`
2
+ `)>=0)return!1;return!0}function Y1(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=yn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:yn.call(Array(t+1),n)}}function Gl(e,t){if(e.length===0)return"";var n=`
3
+ `+t.prev+t.base;return n+yn.call(e,","+n)+`
4
+ `+t.prev}function Li(e,t){var n=Wl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Kn(e,o)?t(e[o],e):""}var s=typeof jl=="function"?jl(e):[],i;if(co){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Kn(e,l)&&(n&&String(Number(l))===l&&l<e.length||co&&i["$"+l]instanceof Symbol||(fh.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof jl=="function")for(var c=0;c<s.length;c++)mh.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Ph=ao,uo=v1,q1=A1,K1=gs,Vi=Ph("%WeakMap%",!0),$i=Ph("%Map%",!0),Z1=uo("WeakMap.prototype.get",!0),X1=uo("WeakMap.prototype.set",!0),Q1=uo("WeakMap.prototype.has",!0),J1=uo("Map.prototype.get",!0),eT=uo("Map.prototype.set",!0),tT=uo("Map.prototype.has",!0),Yl=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},nT=function(e,t){var n=Yl(e,t);return n&&n.value},rT=function(e,t,n){var r=Yl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},oT=function(e,t){return!!Yl(e,t)},sT=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new K1("Side channel does not contain "+q1(s))},get:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Z1(t,s)}else if($i){if(n)return J1(n,s)}else if(r)return nT(r,s)},has:function(s){if(Vi&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Q1(t,s)}else if($i){if(n)return tT(n,s)}else if(r)return oT(r,s);return!1},set:function(s,i){Vi&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new Vi),X1(t,s,i)):$i?(n||(n=new $i),eT(n,s,i)):(r||(r={key:{},next:null}),rT(r,s,i))}};return o},kh=e=>Array.isArray(e),ql=e=>e===void 0,Kl=e=>e===null,iT=Function.bind.call(Function.call,Object.prototype.toString),aT=e=>!!e&&iT(e)==="[object Error]"||e instanceof Error,Ih=(e,t)=>e instanceof t,lT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},cT=e=>Object.prototype.toString.call(e)==="[object Date]"&&Ih(e,Date),Ct={array:kh,date:cT,empty:e=>Kl(e)||ql(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Ih,isError:aT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Kl(e)||ql(e),null:Kl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!kh(e)&&typeof e=="object",primitive:lT,string:e=>typeof e=="string",undefined:ql},uT=e=>Object.keys(e),Tr=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((s,i)=>s&&s[i],e);return o===void 0?n:o};const Zl="-";function dT(e){const t=hT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Zl);return a[0]===""&&a.length!==1&&a.shift(),Ah(a,t)||fT(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Ah(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ah(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Zl);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Oh=/^\[(.+)\]$/;function fT(e){if(Oh.test(e)){const t=Oh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function hT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return mT(Object.entries(e.classGroups),n).forEach(([s,i])=>{Xl(i,r,s,t)}),r}function Xl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:_h(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(pT(o)){Xl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Xl(i,_h(t,s),n,r)})})}function _h(e,t){let n=e;return t.split(Zl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function pT(e){return e.isThemeGetter}function mT(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function gT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const Dh="!";function yT(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let v=a[b];if(c===0){if(v===o&&(r||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(v==="/"){d=b;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Dh),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function vT(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function bT(e){return{cache:gT(e.cacheSize),parseClassName:yT(e),...dT(e)}}const wT=/\s+/;function xT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(wT).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=vT(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Dh:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function TT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Mh(t))&&(r&&(r+=" "),r+=n);return r}function Mh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Mh(e[r]))&&(n&&(n+=" "),n+=t);return n}function ST(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=bT(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=xT(l,n);return o(l,u),u}return function(){return s(TT.apply(null,arguments))}}function qe(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Nh=/^\[(?:([a-z-]+):)?(.+)\]$/i,ET=/^\d+\/\d+$/,CT=new Set(["px","full","screen"]),PT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,IT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,AT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Vn(e){return Sr(e)||CT.has(e)||ET.test(e)}function Xn(e){return fo(e,"length",$T)}function Sr(e){return!!e&&!Number.isNaN(Number(e))}function Ri(e){return fo(e,"number",Sr)}function xs(e){return!!e&&Number.isInteger(Number(e))}function _T(e){return e.endsWith("%")&&Sr(e.slice(0,-1))}function Se(e){return Nh.test(e)}function Qn(e){return PT.test(e)}const DT=new Set(["length","size","percentage"]);function MT(e){return fo(e,DT,Fh)}function NT(e){return fo(e,"position",Fh)}const FT=new Set(["image","url"]);function LT(e){return fo(e,FT,BT)}function VT(e){return fo(e,"",RT)}function Ts(){return!0}function fo(e,t,n){const r=Nh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function $T(e){return kT.test(e)&&!IT.test(e)}function Fh(){return!1}function RT(e){return AT.test(e)}function BT(e){return OT.test(e)}function jT(){const e=qe("colors"),t=qe("spacing"),n=qe("blur"),r=qe("brightness"),o=qe("borderColor"),s=qe("borderRadius"),i=qe("borderSpacing"),a=qe("borderWidth"),l=qe("contrast"),c=qe("grayscale"),u=qe("hueRotate"),d=qe("invert"),f=qe("gap"),h=qe("gradientColorStops"),p=qe("gradientColorStopPositions"),m=qe("inset"),b=qe("margin"),v=qe("opacity"),y=qe("padding"),g=qe("saturate"),S=qe("scale"),T=qe("sepia"),E=qe("skew"),C=qe("space"),I=qe("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",Se,t],_=()=>[Se,t],F=()=>["",Vn,Xn],P=()=>["auto",Sr,Se],N=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",Se],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Sr,Ri],K=()=>[Sr,Se];return{cacheSize:500,separator:":",theme:{colors:[Ts],spacing:[Vn,Xn],blur:["none","",Qn,Se],brightness:j(),borderColor:[e],borderRadius:["none","","full",Qn,Se],borderSpacing:_(),borderWidth:F(),contrast:j(),grayscale:W(),hueRotate:K(),invert:W(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[_T,Xn],inset:M(),margin:M(),opacity:j(),padding:_(),saturate:j(),scale:j(),sepia:W(),skew:K(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...N(),Se]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",xs,Se]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",xs,Se]}],"grid-cols":[{"grid-cols":[Ts]}],"col-start-end":[{col:["auto",{span:["full",xs,Se]},Se]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Ts]}],"row-start-end":[{row:["auto",{span:[xs,Se]},Se]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,t]}],"min-w":[{"min-w":[Se,t,"min","max","fit"]}],"max-w":[{"max-w":[Se,t,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[Se,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ri]}],"font-family":[{font:[Ts]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Se]}],"line-clamp":[{"line-clamp":["none",Sr,Ri]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,Xn]}],"underline-offset":[{"underline-offset":["auto",Vn,Se]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...N(),NT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",MT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},LT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Vn,Se]}],"outline-w":[{outline:[Vn,Xn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Vn,Xn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qn,VT]}],"shadow-color":[{shadow:[Ts]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qn,Se]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Se]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[xs,Se]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Se]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vn,Xn,Ri]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const zT=ST(jT),Ql=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},HT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),WT=e=>Ct.function(e),$e=(...e)=>zT(wx(e)),Jl=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Ss=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},en=(e,t=2)=>e.toString(16).padStart(t,"0"),Es=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${en(t,4)+en(n,3)}-${en(r[0])+en(r[1])}-${en(r[2])+en(r[3])}-${en(r[4])+en(r[5])}-${en(r[6])+en(r[7])+en(r[8])+en(r[9])}`},Lh=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Vh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},ec=(e,t)=>{const n=Lh(t,Vh.basic,e)||Lh(t,Vh.extend,e);return n===void 0||n===e?void 0:n},Bi=()=>typeof window>"u",Cs=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),$h=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n};function Rh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Rh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function UT(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Rh(e))&&(r&&(r+=" "),r+=t);return r}const Bh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,jh=UT,ho=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return jh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=Bh(u)||Bh(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,f]:c},[]);return jh(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},po=w.forwardRef(function({as:t,children:n,...r},o){const s=t||"span";return x.jsx(s,{ref:o,...r,children:n})}),GT=ho("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),mo=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(po,{...l,ref:c,type:s,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:$e(GT({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),zh=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t};function YT(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const qT=({children:e,...t})=>{const n=zh(t.onIntersection),r=w.useRef(null),[o,s]=w.useState(()=>r.current===null?!1:YT(r.current));return w.useLayoutEffect(()=>{const i=r.current;if(i===null)return;const a=new IntersectionObserver(l=>{var u;const c=l[0];return c.isIntersecting&&((u=n.current)==null||u.call(n)),s(d=>c.isIntersecting?!0:d)});return a.observe(i),()=>a.disconnect()},[]),x.jsx("div",{...t,ref:r,children:o?e:null})},KT=ho("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),ZT=ho("inline-flex rounded-pill gap-1.5 border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),XT=w.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return x.jsxs(po,{...a,ref:l,"data-theme":s,"data-component":"tag",as:a.as??"span",className:$e(ZT({size:i,theme:s}),t),children:[n?x.jsx("span",{className:KT({theme:n})}):null,r,a.children]})}),Ps=w.createContext({});function an(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const ji=w.createContext(null),go=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class QT extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function JT({children:e,isPresent:t,anchorX:n}){const r=w.useId(),o=w.useRef(null),s=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=w.useContext(go);return w.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u,right:d}=s.current;if(t||!o.current||!a||!l)return;const f=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const h=document.createElement("style");return i&&(h.nonce=i),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
5
+ [data-motion-pop-id="${r}"] {
6
6
  position: absolute !important;
7
- width: ${i}px !important;
8
- height: ${a}px !important;
9
- top: ${l}px !important;
10
- left: ${c}px !important;
7
+ width: ${a}px !important;
8
+ height: ${l}px !important;
9
+ ${f}px !important;
10
+ top: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(u)}},[t]),w.jsx(CC,{isPresent:t,childRef:r,sizeRef:o,children:C.cloneElement(e,{ref:r})})}const nc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=en(IC),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))}),s?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),C.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=w.jsx(PC,{isPresent:n,children:e})),w.jsx(ei.Provider,{value:c,children:e})};function IC(){return new Map}function gm(e){return b.useEffect(()=>()=>e(),[])}const ur=e=>e.key||"";function OC(e,t){e.forEach(n=>{const r=ur(n);t.set(r,n)})}function AC(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const to=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{Ft(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(qo).forceRender||mm()[0],l=pm(),c=AC(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(ti(()=>{p.current=!1,OC(c,h),f.current=u}),gm(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return w.jsx(w.Fragment,{children:u.map(x=>w.jsx(nc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:x},ur(x)))});u=[...u];const m=f.current.map(ur),g=c.map(ur),y=m.length;for(let x=0;x<y;x++){const v=m[x];g.indexOf(v)===-1&&!d.has(v)&&d.set(v,void 0)}return i==="wait"&&d.size&&(u=[]),d.forEach((x,v)=>{if(g.indexOf(v)!==-1)return;const T=h.get(v);if(!T)return;const S=m.indexOf(v);let E=x;if(!E){const I=()=>{d.delete(v);const O=Array.from(h.keys()).filter(F=>!g.includes(F));if(O.forEach(F=>h.delete(F)),f.current=c.filter(F=>{const M=ur(F);return M===v||O.includes(M)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=w.jsx(nc,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:s,mode:i,children:T},ur(T)),d.set(v,E)}u.splice(S,0,E)}),u=u.map(x=>{const v=x.key;return d.has(v)?x:w.jsx(nc,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:x},ur(x))}),process.env.NODE_ENV!=="production"&&i==="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 MC({children:e,isValidProp:t,...n}){t&&zf(t),n={...b.useContext(Hr),...n},n.isStatic=en(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(Hr.Provider,{value:r,children:e})}const DC=b.createContext(null),kC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ym(){const e=new Set,t=new WeakMap,n=()=>e.forEach(kC);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 vm=e=>e===!0,FC=e=>vm(e===!0)||e==="id",NC=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(qo),o=b.useContext(DC),[s,i]=mm(),a=b.useRef(null),l=r.id||o;a.current===null&&(FC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:vm(n)&&r.group||ym()});const c=b.useMemo(()=>({...a.current,forceRender:s}),[i]);return w.jsx(qo.Provider,{value:c,children:e})},bm=b.createContext(null);function LC(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=We(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?lT(e,o,o+s):e}function _C({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=en(()=>pt(t)),l=[],c=b.useRef(!1);Ft(!!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(BC)},updateOrder:(d,f,h)=>{if(c.current)return;const p=LC(l,d,f,h);l!==p&&(c.current=!0,r(p.map($C).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),w.jsx(a,{...s,ref:i,ignoreStrict:!0,children:w.jsx(bm.Provider,{value:u,children:e})})}const VC=b.forwardRef(_C);function $C(e){return e.value}function BC(e,t){return e.layout.min-t.layout.min}function dr(e){const t=en(()=>Zr(e)),{isStatic:n}=b.useContext(Hr);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const RC=e=>e&&typeof e=="object"&&e.mix,jC=e=>RC(e)?e.mix:void 0;function zC(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Yh(o,s,{mixer:jC(s[0]),...i});return t?a(r):a}function wm(e,t){const n=dr(t()),r=()=>n.set(t());return r(),ti(()=>{const o=()=>Pe.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),tn(r)}}),n}function WC(e){ss.current=[],e();const t=wm(ss.current,e);return ss.current=void 0,t}function HC(e,t,n,r){if(typeof e=="function")return WC(e);const o=typeof t=="function"?t:zC(t,n,r);return Array.isArray(e)?xm(e,o):xm([e],([s])=>o(s))}function xm(e,t){const n=en(()=>[]);return wm(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Tm(e,t=0){return ct(e)?e:dr(t)}function UC({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=en(()=>pt(r)),c=b.useContext(bm),u={x:Tm(t.x),y:Tm(t.y)},d=HC([u.x,u.y],([m,g])=>m||g?1:"unset");Ft(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return w.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,g)=>{const{velocity:y}=g;y[f]&&p(n,u[f].get(),y[f]),o&&o(m,g)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const GC=b.forwardRef(UC),wi={Group:VC,Item:GC};function Sm(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Ft(!!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 KC(e){return typeof e=="object"&&!Array.isArray(e)}function YC(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Xp(e)?new hm(t):new fm(t);n.mount(e),cs.set(e,n)}function qC(e,t=100){const n=Il({keyframes:[0,t],...e}),r=Math.min(Qh(n),Ll);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:rn(r)}}function Em(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 XC=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function QC(e,t){return $h(e)?e[XC(0,e.length,t)]:e}function ZC(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ts(e,o),r--)}}function JC(e,t,n,r,o,s){ZC(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:We(o,s,r[i]),easing:QC(n,i)})}function eP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const tP="easeInOut";function nP(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,s=new Map,i=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,Em(u,h.at,c,l));continue}let[p,m,g={}]=h;g.at!==void 0&&(u=Em(u,g.at,c,l));let y=0;const x=(v,T,S,E=0,I=0)=>{const O=rP(v),{delay:F=0,times:M=Xh(O),type:_="keyframes",...k}=T;let{ease:L=t.ease||"easeOut",duration:P}=T;const A=typeof F=="function"?F(E,I):F,N=O.length;if(N<=2&&_==="spring"){let D=100;if(N===2&&iP(O)){const te=O[1]-O[0];D=Math.abs(te)}const B={...k};P!==void 0&&(B.duration=nn(P));const X=qC(B,D);L=X.ease,P=X.duration}P??(P=o);const $=u+A,z=$+P;M.length===1&&M[0]===0&&(M[1]=1);const H=M.length-O.length;H>0&&qh(M,H),O.length===1&&O.unshift(null),JC(S,O,L,M,$,z),y=Math.max(A+P,y),d=Math.max(z,d)};if(ct(p)){const v=Cm(p,i);x(m,g,Pm("default",v))}else{const v=Sm(p,r,a),T=v.length;for(let S=0;S<T;S++){m=m,g=g;const E=v[S],I=Cm(E,i);for(const O in m)x(m[O],oP(g,O),Pm(O,I),S,T)}}c=u,u+=y}return i.forEach((f,h)=>{for(const p in f){const m=f[p];m.sort(eP);const g=[],y=[],x=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:I}=m[T];g.push(E),y.push(Qr(0,d,S)),x.push(I||"easeOut")}y[0]!==0&&(y.unshift(0),g.unshift(g[0]),x.unshift(tP)),y[y.length-1]!==1&&(y.push(1),g.push(null)),s.has(h)||s.set(h,{keyframes:{},transition:{}});const v=s.get(h);v.keyframes[p]=g,v.transition[p]={...t,duration:d,ease:x,times:y,...n}}}),s}function Cm(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Pm(e,t){return t[e]||(t[e]=[]),t[e]}function rP(e){return Array.isArray(e)?e:[e]}function oP(e,t){return e[t]?{...e,...e[t]}:{...e}}const sP=e=>typeof e=="number",iP=e=>e.every(sP);function Im(e,t,n,r){const o=Sm(e,r),s=o.length;Ft(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];cs.has(l)||YC(l);const c=cs.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...Wl(c,{...t,transition:u},{}))}return new $l(i)}const aP=e=>Array.isArray(e)&&Array.isArray(e[0]);function lP(e,t,n){const r=[];return nP(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;ct(a)?l=Ql(a,s.default,i.default):l=Im(a,s,i),r.push(l)}),new $l(r)}const cP=e=>{function t(n,r,o){let s;return aP(n)?s=lP(n,r,e):KC(r)?s=Im(n,r,o,e):s=Ql(n,r,o),e&&e.animations.push(s),s}return t};function uP(){const e=en(()=>({current:null,animations:[]})),t=en(()=>cP(e));return gm(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class dP{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 fP=()=>new dP;function hP(){return en(fP)}function pP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function mP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:pP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=Ml(r)(l/c)*c}return t+l}}/**
12
+ `),()=>{document.head.removeChild(h)}},[t]),x.jsx(QT,{isPresent:t,childRef:o,sizeRef:s,children:k.cloneElement(e,{ref:o})})}const eS=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i,anchorX:a})=>{const l=an(tS),c=w.useId(),u=w.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=w.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return w.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),k.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(JT,{isPresent:n,anchorX:a,children:e})),x.jsx(ji.Provider,{value:d,children:e})};function tS(){return new Map}function Hh(e=!0){const t=w.useContext(ji);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=w.useId();w.useEffect(()=>{if(e)return o(s)},[e]);const i=w.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const zi=e=>e.key||"";function Wh(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const tc=typeof window<"u",Hi=tc?w.useLayoutEffect:w.useEffect,Jn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1,anchorX:a="left"})=>{const[l,c]=Hh(i),u=w.useMemo(()=>Wh(e),[e]),d=i&&!l?[]:u.map(zi),f=w.useRef(!0),h=w.useRef(u),p=an(()=>new Map),[m,b]=w.useState(u),[v,y]=w.useState(u);Hi(()=>{f.current=!1,h.current=u;for(let T=0;T<v.length;T++){const E=zi(v[T]);d.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[v,d.length,d.join("-")]);const g=[];if(u!==m){let T=[...u];for(let E=0;E<v.length;E++){const C=v[E],I=zi(C);d.includes(I)||(T.splice(E,0,C),g.push(C))}return s==="wait"&&g.length&&(T=g),y(Wh(T)),b(u),null}process.env.NODE_ENV!=="production"&&s==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=w.useContext(Ps);return x.jsx(x.Fragment,{children:v.map(T=>{const E=zi(T),C=i&&!l?!1:u===v||d.includes(E),I=()=>{if(p.has(E))p.set(E,!0);else return;let A=!0;p.forEach(O=>{O||(A=!1)}),A&&(S==null||S(),y(h.current),i&&(c==null||c()),r&&r())};return x.jsx(eS,{isPresent:C,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,onExitComplete:C?void 0:I,anchorX:a,children:T},E)})})},nS=w.createContext(null);function rS(){const e=w.useRef(!1);return Hi(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Ht=e=>e;let yo=Ht,tn=Ht;process.env.NODE_ENV!=="production"&&(yo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},tn=(e,t)=>{if(!e)throw new Error(t)});const oS={skipAnimations:!1,useManualTiming:!1},Wi=["read","resolveKeyframes","update","preRender","render","postRender"],Uh={value:null,addProjectionMetrics:null};function sS(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Uh.value&&Uh.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const iS=40;function Gh(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Wi.reduce((v,y)=>(v[y]=sS(s,t?y:void 0),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,iS),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Wi.reduce((v,y)=>{const g=i[y];return v[y]=(S,T=!1,E=!1)=>(n||p(),g.schedule(S,T,E)),v},{}),cancel:v=>{for(let y=0;y<Wi.length;y++)i[Wi[y]].cancel(v)},state:o,steps:i}}const{schedule:We,cancel:$n,state:Pt,steps:nc}=Gh(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ht,!0);function aS(){const e=rS(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>We.postRender(r),[r]),t]}const lS=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Yh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(lS);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const qh=e=>e===!0,cS=e=>qh(e===!0)||e==="id",uS=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(Ps),o=w.useContext(nS),[s,i]=aS(),a=w.useRef(null),l=r.id||o;a.current===null&&(cS(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:qh(n)&&r.group||Yh()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(Ps.Provider,{value:c,children:e})},Kh=w.createContext({strict:!1}),Zh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vo={};for(const e in Zh)vo[e]={isEnabled:t=>Zh[e].some(n=>!!t[n])};function dS(e){for(const t in e)vo[t]={...vo[t],...e[t]}}const fS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ui(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fS.has(e)}let Xh=e=>!Ui(e);function Qh(e){e&&(Xh=t=>t.startsWith("on")?!Ui(t):e(t))}try{Qh(require("@emotion/is-prop-valid").default)}catch{}function hS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Xh(o)||n===!0&&Ui(o)||!t&&!Ui(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function pS({children:e,isValidProp:t,...n}){t&&Qh(t),n={...w.useContext(go),...n},n.isStatic=an(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(go.Provider,{value:r,children:e})}const Jh=new Set;function Gi(e,t,n){e||Jh.has(t)||(console.warn(t),Jh.add(t))}function mS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Gi(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Yi=w.createContext({});function qi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ks(e){return typeof e=="string"||Array.isArray(e)}const rc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oc=["initial",...rc];function Ki(e){return qi(e.animate)||oc.some(t=>ks(e[t]))}function ep(e){return!!(Ki(e)||e.variants)}function gS(e,t){if(Ki(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ks(n)?n:void 0,animate:ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function yS(e){const{initial:t,animate:n}=gS(e,w.useContext(Yi));return w.useMemo(()=>({initial:t,animate:n}),[tp(t),tp(n)])}function tp(e){return Array.isArray(e)?e.join(" "):e}const vS=Symbol.for("motionComponentSymbol");function bo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bS(e,t,n){return w.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):bo(n)&&(n.current=r))},[t])}const sc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),np="data-"+sc("framerAppearId"),{schedule:ic,cancel:K$}=Gh(queueMicrotask,!1),rp=w.createContext({});function wS(e,t,n,r,o){var s,i;const{visualElement:a}=w.useContext(Yi),l=w.useContext(Kh),c=w.useContext(ji),u=w.useContext(go).reducedMotion,d=w.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=w.useContext(rp);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&xS(d.current,n,o,h);const p=w.useRef(!1);w.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[np],b=w.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return Hi(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),ic.render(f.render),b.current&&f.animationState&&f.animationState.animateChanges())}),w.useEffect(()=>{f&&(!b.current&&f.animationState&&f.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,m)}),b.current=!1))}),f}function xS(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:op(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&bo(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function op(e){if(e)return e.options.allowProjection!==!1?e.projection:op(e.parent)}function TS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&dS(e);function a(c,u){let d;const f={...w.useContext(go),...c,layoutId:SS(c)},{isStatic:h}=f,p=yS(c),m=r(c,h);if(!h&&tc){ES(f,e);const b=CS(f);d=b.MeasureLayout,p.visualElement=wS(o,m,f,t,b.ProjectionNode)}return x.jsxs(Yi.Provider,{value:p,children:[d&&p.visualElement?x.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,bS(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=w.forwardRef(a);return l[vS]=o,l}function SS({layoutId:e}){const t=w.useContext(Ps).id;return t&&e!==void 0?t+"-"+e:e}function ES(e,t){const n=w.useContext(Kh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?yo(!1,r):tn(!1,r)}}function CS(e){const{drag:t,layout:n}=vo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const sp=e=>t=>typeof t=="string"&&t.startsWith(e),ac=sp("--"),PS=sp("var(--"),lc=e=>PS(e)?kS.test(e.split("/*")[0].trim()):!1,kS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Is={};function IS(e){for(const t in e)Is[t]=e[t],ac(t)&&(Is[t].isCSSVariable=!0)}const wo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Er=new Set(wo);function ip(e,{layout:t,layoutId:n}){return Er.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Is[e]||e==="opacity")}const vt=e=>!!(e&&e.getVelocity),ap=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Rn=(e,t,n)=>n>t?t:n<e?e:n,xo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},As={...xo,transform:e=>Rn(0,1,e)},Zi={...xo,default:1},Os=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),er=Os("deg"),vn=Os("%"),ge=Os("px"),AS=Os("vh"),OS=Os("vw"),lp={...vn,parse:e=>vn.parse(e)/100,transform:e=>vn.transform(e*100)},_S={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,backgroundPositionX:ge,backgroundPositionY:ge},DS={rotate:er,rotateX:er,rotateY:er,rotateZ:er,scale:Zi,scaleX:Zi,scaleY:Zi,scaleZ:Zi,skew:er,skewX:er,skewY:er,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:As,originX:lp,originY:lp,originZ:ge},cp={...xo,transform:Math.round},cc={..._S,...DS,zIndex:cp,size:ge,fillOpacity:As,strokeOpacity:As,numOctaves:cp},MS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},NS=wo.length;function FS(e,t,n){let r="",o=!0;for(let s=0;s<NS;s++){const i=wo[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=ap(a,cc[i]);if(!l){o=!1;const u=MS[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function uc(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Er.has(l)){i=!0;continue}else if(ac(l)){o[l]=c;continue}else{const u=ap(c,cc[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=FS(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const dc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function up(e,t,n){for(const r in t)!vt(t[r])&&!ip(r,n)&&(e[r]=t[r])}function LS({transformTemplate:e},t){return w.useMemo(()=>{const n=dc();return uc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function VS(e,t){const n=e.style||{},r={};return up(r,n,e),Object.assign(r,LS(e,t)),r}function $S(e,t){const n={},r=VS(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const RS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fc(e){return typeof e!="string"||e.includes("-")?!1:!!(RS.indexOf(e)>-1||/[A-Z]/u.test(e))}const BS={offset:"stroke-dashoffset",array:"stroke-dasharray"},jS={offset:"strokeDashoffset",array:"strokeDasharray"};function zS(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?BS:jS;e[s.offset]=ge.transform(-r);const i=ge.transform(t),a=ge.transform(n);e[s.array]=`${i} ${a}`}function dp(e,t,n){return typeof e=="string"?e:ge.transform(t+n*e)}function HS(e,t,n){const r=dp(t,e.x,e.width),o=dp(n,e.y,e.height);return`${r} ${o}`}function hc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(uc(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=HS(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&zS(f,i,a,l,!1)}const fp=()=>({...dc(),attrs:{}}),pc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WS(e,t,n,r){const o=w.useMemo(()=>{const s=fp();return hc(s,t,pc(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};up(s,e.style,e),o.style={...s,...o.style}}return o}function US(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(fc(n)?WS:$S)(r,s,i,n),c=hS(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=w.useMemo(()=>vt(d)?d.get():d,[d]);return w.createElement(n,{...u,children:f})}}function hp(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function mc(e,t,n,r){if(typeof t=="function"){const[o,s]=hp(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=hp(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const gc=e=>Array.isArray(e),GS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),YS=e=>gc(e)?e[e.length-1]||0:e;function Xi(e){const t=vt(e)?e.get():e;return GS(t)?t.toValue():t}function qS({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:KS(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const pp=e=>(t,n)=>{const r=w.useContext(Yi),o=w.useContext(ji),s=()=>qS(e,t,r,o);return n?s():an(s)};function KS(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=Xi(s[f]);let{initial:i,animate:a}=e;const l=Ki(e),c=ep(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!qi(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=mc(e,f[h]);if(p){const{transitionEnd:m,transition:b,...v}=p;for(const y in v){let g=v[y];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(o[y]=g)}for(const y in m)o[y]=m[y]}}}return o}function yc(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(vt(o[i])||t.style&&vt(t.style[i])||ip(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const ZS={useVisualState:pp({scrapeMotionValuesFromProps:yc,createRenderState:dc})};function mp(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function gp(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const yp=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function vp(e,t,n,r){gp(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(yp.has(o)?o:sc(o),t.attrs[o])}function bp(e,t,n){const r=yc(e,t,n);for(const o in e)if(vt(e[o])||vt(t[o])){const s=wo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const wp=["x","y","width","height","cx","cy","r"],XS={useVisualState:pp({scrapeMotionValuesFromProps:bp,createRenderState:fp,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Er.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<wp.length;a++){const l=wp[a];e[l]!==t[l]&&(i=!0)}i&&We.read(()=>{mp(n,r),We.render(()=>{hc(r,o,pc(n.tagName),e.transformTemplate),vp(n,r)})})}})};function QS(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...fc(r)?XS:ZS,preloadedFeatures:e,useRender:US(o),createVisualElement:t,Component:r};return TS(i)}}function _s(e,t,n){const r=e.getProps();return mc(r,t,n!==void 0?n:r.custom,e)}function vc(e,t){return e?e[t]||e.default||e:void 0}const xp=new Set(["width","height","top","left","right","bottom",...wo]);let Qi;function JS(){Qi=void 0}const bn={now:()=>(Qi===void 0&&bn.set(Pt.isProcessing||oS.useManualTiming?Pt.timestamp:performance.now()),Qi),set:e=>{Qi=e,queueMicrotask(JS)}};function bc(e,t){e.indexOf(t)===-1&&e.push(t)}function Ji(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function eE([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}class wc{constructor(){this.subscriptions=[]}add(t){return bc(this.subscriptions,t),()=>Ji(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Tp(e,t){return t?e*(1e3/t):0}const Sp=30,tE=e=>!isNaN(parseFloat(e)),Ds={current:void 0};class nE{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=bn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=bn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Gi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new wc);const r=this.events[t].add(n);return t==="change"?()=>{r(),We.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ds.current&&Ds.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Sp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Sp);return Tp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function To(e,t){return new nE(e,t)}function rE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,To(n))}function oE(e,t){const n=_s(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=YS(s[i]);rE(e,i,a)}}function sE(e){return!!(vt(e)&&e.add)}function xc(e,t){const n=e.getValue("willChange");if(sE(n))return n.add(t)}function Ep(e){return e.props[np]}function Tc(e){let t;return()=>(t===void 0&&(t=e()),t)}const iE=Tc(()=>window.ScrollTimeline!==void 0);class aE{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(iE()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Cp extends aE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const ln=e=>e*1e3,wn=e=>e/1e3;function ea(e){return typeof e=="function"}function Pp(e,t){e.timeline=t,e.onfinish=null}const Sc=e=>Array.isArray(e)&&typeof e[0]=="number",lE={linearEasing:void 0};function cE(e,t){const n=Tc(e);return()=>{var r;return(r=lE[t])!==null&&r!==void 0?r:n()}}const ta=cE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},kp=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Cr(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ip(e){return!!(typeof e=="function"&&ta()||!e||typeof e=="string"&&(e in Ec||ta())||Sc(e)||Array.isArray(e)&&e.every(Ip))}const Ms=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ec={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ms([0,.65,.55,1]),circOut:Ms([.55,0,1,.45]),backIn:Ms([.31,.01,.66,-.59]),backOut:Ms([.33,1.53,.69,.99])};function Ap(e,t){if(e)return typeof e=="function"&&ta()?kp(e,t):Sc(e)?Ms(e):Array.isArray(e)?e.map(n=>Ap(n,t)||Ec.easeOut):Ec[e]}const Op=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uE=1e-7,dE=12;function fE(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Op(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>uE&&++a<dE);return i}function Ns(e,t,n,r){if(e===t&&n===r)return Ht;const o=s=>fE(s,0,1,e,n);return s=>s===0||s===1?s:Op(o(s),t,r)}const _p=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Dp=e=>t=>1-e(1-t),Mp=Ns(.33,1.53,.69,.99),Cc=Dp(Mp),Np=_p(Cc),Fp=e=>(e*=2)<1?.5*Cc(e):.5*(2-Math.pow(2,-10*(e-1))),Pc=e=>1-Math.sin(Math.acos(e)),Lp=Dp(Pc),Vp=_p(Pc),$p=e=>/^0[^.\s]+$/u.test(e);function hE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$p(e):!0}const Fs=e=>Math.round(e*1e5)/1e5,kc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pE(e){return e==null}const mE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ic=(e,t)=>n=>!!(typeof n=="string"&&mE.test(n)&&n.startsWith(e)||t&&!pE(n)&&Object.prototype.hasOwnProperty.call(n,t)),Rp=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(kc);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},gE=e=>Rn(0,255,e),Ac={...xo,transform:e=>Math.round(gE(e))},Pr={test:Ic("rgb","red"),parse:Rp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ac.transform(e)+", "+Ac.transform(t)+", "+Ac.transform(n)+", "+Fs(As.transform(r))+")"};function yE(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Oc={test:Ic("#"),parse:yE,transform:Pr.transform},So={test:Ic("hsl","hue"),parse:Rp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vn.transform(Fs(t))+", "+vn.transform(Fs(n))+", "+Fs(As.transform(r))+")"},Dt={test:e=>Pr.test(e)||Oc.test(e)||So.test(e),parse:e=>Pr.test(e)?Pr.parse(e):So.test(e)?So.parse(e):Oc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Pr.transform(e):So.transform(e)},vE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function bE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(kc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(vE))===null||n===void 0?void 0:n.length)||0)>0}const Bp="number",jp="color",wE="var",xE="var(",zp="${}",TE=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(TE,l=>(Dt.test(l)?(r.color.push(s),o.push(jp),n.push(Dt.parse(l))):l.startsWith(xE)?(r.var.push(s),o.push(wE),n.push(l)):(r.number.push(s),o.push(Bp),n.push(parseFloat(l))),++s,zp)).split(zp);return{values:n,split:a,indexes:r,types:o}}function Hp(e){return Ls(e).values}function Wp(e){const{split:t,types:n}=Ls(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Bp?s+=Fs(o[i]):a===jp?s+=Dt.transform(o[i]):s+=o[i]}return s}}const SE=e=>typeof e=="number"?0:e;function EE(e){const t=Hp(e);return Wp(e)(t.map(SE))}const tr={test:bE,parse:Hp,createTransformer:Wp,getAnimatableNone:EE},CE=new Set(["brightness","contrast","saturate","opacity"]);function PE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kc)||[];if(!r)return e;const o=n.replace(r,"");let s=CE.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const kE=/\b([a-z-]*)\(.*?\)/gu,_c={...tr,getAnimatableNone:e=>{const t=e.match(kE);return t?t.map(PE).join(" "):e}},IE={...cc,color:Dt,backgroundColor:Dt,outlineColor:Dt,fill:Dt,stroke:Dt,borderColor:Dt,borderTopColor:Dt,borderRightColor:Dt,borderBottomColor:Dt,borderLeftColor:Dt,filter:_c,WebkitFilter:_c},Dc=e=>IE[e];function Up(e,t){let n=Dc(e);return n!==_c&&(n=tr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const AE=new Set(["auto","none","0"]);function OE(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!AE.has(s)&&Ls(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Up(n,o)}const Gp=e=>e===xo||e===ge,Yp=(e,t)=>parseFloat(e.split(", ")[t]),qp=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Yp(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Yp(s[1],e):0}},_E=new Set(["x","y","z"]),DE=wo.filter(e=>!_E.has(e));function ME(e){const t=[];return DE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Eo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:qp(4,13),y:qp(5,14)};Eo.translateX=Eo.x,Eo.translateY=Eo.y;const kr=new Set;let Mc=!1,Nc=!1;function Kp(){if(Nc){const e=Array.from(kr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=ME(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Nc=!1,Mc=!1,kr.forEach(e=>e.complete()),kr.clear()}function Zp(){kr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Nc=!0)})}function NE(){Zp(),Kp()}class Fc{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(kr.add(this),Mc||(Mc=!0,We.read(Zp),We.resolveKeyframes(Kp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),kr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,kr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xp=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),FE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LE(e){const t=FE.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const VE=4;function Qp(e,t,n=1){tn(n<=VE,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=LE(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Xp(i)?parseFloat(i):i}return lc(o)?Qp(o,t,n+1):o}const Jp=e=>t=>t.test(e),em=[xo,ge,vn,er,OS,AS,{test:e=>e==="auto",parse:e=>e}],tm=e=>em.find(Jp(e));class nm extends Fc{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),lc(c))){const u=Qp(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!xp.has(r)||t.length!==2)return;const[o,s]=t,i=tm(o),a=tm(s);if(i!==a)if(Gp(i)&&Gp(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)hE(t[o])&&r.push(o);r.length&&OE(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Eo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Eo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const rm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tr.test(e)||e==="0")&&!e.startsWith("url("));function $E(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function RE(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=rm(o,t),a=rm(s,t);return yo(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:$E(e)||(n==="spring"||ea(n))&&r}const BE=e=>e!==null;function na(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(BE),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const jE=40;class om{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=bn.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>jE?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&NE(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=bn.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!RE(t,r,o,s))if(i)this.options.duration=0;else{l&&l(na(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ra=2e4;function Lc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ra;)t+=n,r=e.next(t);return t>=ra?1/0:t}const Ke=(e,t,n)=>e+(t-e)*n;function Vc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function zE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Vc(l,a,e+1/3),s=Vc(l,a,e),i=Vc(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function oa(e,t){return n=>n>0?t:e}const $c=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},HE=[Oc,Pr,So],WE=e=>HE.find(t=>t.test(e));function sm(e){const t=WE(e);if(yo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===So&&(n=zE(n)),n}const im=(e,t)=>{const n=sm(e),r=sm(t);if(!n||!r)return oa(e,t);const o={...n};return s=>(o.red=$c(n.red,r.red,s),o.green=$c(n.green,r.green,s),o.blue=$c(n.blue,r.blue,s),o.alpha=Ke(n.alpha,r.alpha,s),Pr.transform(o))},UE=(e,t)=>n=>t(e(n)),Vs=(...e)=>e.reduce(UE),Rc=new Set(["none","hidden"]);function GE(e,t){return Rc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function YE(e,t){return n=>Ke(e,t,n)}function Bc(e){return typeof e=="number"?YE:typeof e=="string"?lc(e)?oa:Dt.test(e)?im:ZE:Array.isArray(e)?am:typeof e=="object"?Dt.test(e)?im:qE:oa}function am(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Bc(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function qE(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Bc(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function KE(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const ZE=(e,t)=>{const n=tr.createTransformer(t),r=Ls(e),o=Ls(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Rc.has(e)&&!o.values.length||Rc.has(t)&&!r.values.length?GE(e,t):Vs(am(KE(r,o),o.values),n):(yo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),oa(e,t))};function lm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ke(e,t,n):Bc(e)(e,t)}const XE=5;function cm(e,t,n){const r=Math.max(t-XE,0);return Tp(n-e(r),t-r)}const et={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},jc=.001;function QE({duration:e=et.duration,bounce:t=et.bounce,velocity:n=et.velocity,mass:r=et.mass}){let o,s;yo(e<=ln(et.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Rn(et.minDamping,et.maxDamping,i),e=Rn(et.minDuration,et.maxDuration,wn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=zc(c,i),p=Math.exp(-d);return jc-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=zc(Math.pow(c,2),i);return(-o(c)+jc>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-jc+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=eC(o,s,a);if(e=ln(e),isNaN(l))return{stiffness:et.stiffness,damping:et.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const JE=12;function eC(e,t,n){let r=n;for(let o=1;o<JE;o++)r=r-e(r)/t(r);return r}function zc(e,t){return e*Math.sqrt(1-t*t)}const tC=["duration","bounce"],nC=["stiffness","damping","mass"];function um(e,t){return t.some(n=>e[n]!==void 0)}function rC(e){let t={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...e};if(!um(e,nC)&&um(e,tC))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Rn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:et.mass,stiffness:o,damping:s}}else{const n=QE(e);t={...t,...n,mass:et.mass},t.isResolvedFromDuration=!0}return t}function Hc(e=et.visualDuration,t=et.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=rC({...n,velocity:-wn(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),b=i-s,v=wn(Math.sqrt(l/u)),y=Math.abs(b)<5;r||(r=y?et.restSpeed.granular:et.restSpeed.default),o||(o=y?et.restDelta.granular:et.restDelta.default);let g;if(m<1){const T=zc(v,m);g=E=>{const C=Math.exp(-m*v*E);return i-C*((p+m*v*b)/T*Math.sin(T*E)+b*Math.cos(T*E))}}else if(m===1)g=T=>i-Math.exp(-v*T)*(b+(p+v*b)*T);else{const T=v*Math.sqrt(m*m-1);g=E=>{const C=Math.exp(-m*v*E),I=Math.min(T*E,300);return i-C*((p+m*v*b)*Math.sinh(I)+T*b*Math.cosh(I))/T}}const S={calculatedDuration:h&&d||null,next:T=>{const E=g(T);if(h)a.done=T>=d;else{let C=0;m<1&&(C=T===0?ln(p):cm(g,T,E));const I=Math.abs(C)<=r,A=Math.abs(i-E)<=o;a.done=I&&A}return a.value=a.done?i:E,a},toString:()=>{const T=Math.min(Lc(S),ra),E=kp(C=>S.next(T*C).value,T,30);return T+"ms "+E}};return S}function dm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=I=>a!==void 0&&I<a||l!==void 0&&I>l,p=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let m=n*t;const b=d+m,v=i===void 0?b:i(b);v!==b&&(m=v-d);const y=I=>-m*Math.exp(-I/r),g=I=>v+y(I),S=I=>{const A=y(I),O=g(I);f.done=Math.abs(A)<=c,f.value=f.done?v:O};let T,E;const C=I=>{h(f.value)&&(T=I,E=Hc({keyframes:[f.value,p(f.value)],velocity:cm(g,I,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:I=>{let A=!1;return!E&&T===void 0&&(A=!0,S(I),C(I)),T!==void 0&&I>=T?E.next(I-T):(!A&&S(I),f)}}}const oC=Ns(.42,0,1,1),sC=Ns(0,0,.58,1),fm=Ns(.42,0,.58,1),hm=e=>Array.isArray(e)&&typeof e[0]!="number",pm={linear:Ht,easeIn:oC,easeInOut:fm,easeOut:sC,circIn:Pc,circInOut:Vp,circOut:Lp,backIn:Cc,backInOut:Np,backOut:Mp,anticipate:Fp},Wc=e=>{if(Sc(e)){tn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Ns(t,n,r,o)}else if(typeof e=="string")return tn(pm[e]!==void 0,`Invalid easing type '${e}'`),pm[e];return e};function iC(e,t,n){const r=[],o=n||lm,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Ht:t;a=Vs(l,a)}r.push(a)}return r}function mm(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(tn(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=iC(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Cr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Rn(e[0],e[s-1],u)):c}function gm(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Cr(0,t,r);e.push(Ke(n,1,o))}}function ym(e){const t=[0];return gm(t,e.length-1),t}function aC(e,t){return e.map(n=>n*t)}function lC(e,t){return e.map(()=>t||fm).splice(0,e.length-1)}function $s({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=hm(r)?r.map(Wc):Wc(r),s={done:!1,value:t[0]},i=aC(n&&n.length===t.length?n:ym(t),e),a=mm(i,t,{ease:Array.isArray(o)?o:lC(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const cC=e=>{const t=({timestamp:n})=>e(n);return{start:()=>We.update(t,!0),stop:()=>$n(t),now:()=>Pt.isProcessing?Pt.timestamp:bn.now()}},uC={decay:dm,inertia:dm,tween:$s,keyframes:$s,spring:Hc},dC=e=>e/100;class Uc extends om{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||Fc,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=ea(n)?n:uC[n]||$s;let l,c;process.env.NODE_ENV!=="production"&&a!==$s&&tn(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==$s&&typeof t[0]!="number"&&(l=Vs(dC,lm(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Lc(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=s;if(h){const I=Math.min(this.currentTime,u)/d;let A=Math.floor(I),O=I%1;!O&&I>=1&&(O=1),O===1&&A--,A=Math.min(A,h+1),!!(A%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/d)):p==="mirror"&&(S=i)),g=Rn(0,1,O)*d}const T=y?{done:!1,value:l[0]}:S.next(g);a&&(T.value=a(T.value));let{done:E}=T;!y&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(T.value=na(l,this.options,o)),b&&b(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?wn(t.calculatedDuration):0}get time(){return wn(this.currentTime)}set time(t){t=ln(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=wn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=cC,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const fC=new Set(["opacity","clipPath","filter","transform"]);function hC(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Ap(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const pC=Tc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sa=10,mC=2e4;function gC(e){return ea(e.type)||e.type==="spring"||!Ip(e.ease)}function yC(e,t){const n=new Uc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<mC;)r=n.sample(s),o.push(r.value),s+=sa;return{times:void 0,keyframes:o,duration:s-sa,ease:"linear"}}const vm={anticipate:Fp,backInOut:Np,circInOut:Vp};function vC(e){return e in vm}class bm extends om{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new nm(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ta()&&vC(s)&&(s=vm[s]),gC(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,b=yC(t,m);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,o=b.times,s=b.ease,i="keyframes"}const u=hC(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Pp(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(na(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return wn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return wn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ln(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ht;const{animation:r}=n;Pp(r,t)}return Ht}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new Uc({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=ln(this.time);c.setWithVelocity(p.sample(m-sa).value,p.sample(m).value,sa)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return pC()&&r&&fC.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const bC={type:"spring",stiffness:500,damping:25,restSpeed:10},wC=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xC={type:"keyframes",duration:.8},TC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},SC=(e,{keyframes:t})=>t.length>2?xC:Er.has(e)?e.startsWith("scale")?wC(t[1]):bC:TC;function EC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Gc=(e,t,n,r={},o,s)=>i=>{const a=vc(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ln(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};EC(a)||(u={...u,...SC(e,u)}),u.duration&&(u.duration=ln(u.duration)),u.repeatDelay&&(u.repeatDelay=ln(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const f=na(u.keyframes,a);if(f!==void 0)return We.update(()=>{u.onUpdate(f),u.onComplete()}),new Cp([])}return!s&&bm.supports(u)?new bm(u):new Uc(u)};function CC({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Yc(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&CC(u,d))continue;const p={delay:n,...vc(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const v=Ep(e);if(v){const y=window.MotionHandoffAnimation(v,d,We);y!==null&&(p.startTime=y,m=!0)}}xc(e,d),f.start(Gc(d,f,h,e.shouldReduceMotion&&xp.has(d)?{type:!1}:p,e,m));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{We.update(()=>{a&&oE(e,a)})}),c}function qc(e,t,n={}){var r;const o=_s(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Yc(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return PC(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function PC(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(kC).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(qc(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function kC(e,t){return e.sortNodePosition(t)}function IC(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>qc(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=qc(e,t,n);else{const o=typeof t=="function"?_s(e,t,n.custom):t;r=Promise.all(Yc(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function wm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const AC=oc.length;function xm(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xm(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<AC;n++){const r=oc[n],o=e.props[r];(ks(o)||o===!1)&&(t[r]=o)}return t}const OC=[...rc].reverse(),_C=rc.length;function DC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>IC(e,n,r)))}function MC(e){let t=DC(e),n=Tm(),r=!0;const o=l=>(c,u)=>{var d;const f=_s(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=xm(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let b=0;b<_C;b++){const v=OC[b],y=n[v],g=c[v]!==void 0?c[v]:u[v],S=ks(g),T=v===l?y.isActive:null;T===!1&&(p=b);let E=g===u[v]&&g!==c[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...h},!y.isActive&&T===null||!g&&!y.prevProp||qi(g)||typeof g=="boolean")continue;const C=NC(y.prevProp,g);let I=C||v===l&&y.isActive&&!E&&S||b>p&&S,A=!1;const O=Array.isArray(g)?g:[g];let M=O.reduce(o(v),{});T===!1&&(M={});const{prevResolvedValues:_={}}=y,F={..._,...M},P=V=>{I=!0,f.has(V)&&(A=!0,f.delete(V)),y.needsAnimating[V]=!0;const B=e.getValue(V);B&&(B.liveStyle=!1)};for(const V in F){const B=M[V],W=_[V];if(h.hasOwnProperty(V))continue;let D=!1;gc(B)&&gc(W)?D=!wm(B,W):D=B!==W,D?B!=null?P(V):f.add(V):B!==void 0&&f.has(V)?P(V):y.protectedKeys[V]=!0}y.prevProp=g,y.prevResolvedValues=M,y.isActive&&(h={...h,...M}),r&&e.blockInitialAnimation&&(I=!1),I&&(!(E&&C)||A)&&d.push(...O.map(V=>({animation:V,options:{type:v}})))}if(f.size){const b={};if(typeof c.initial!="boolean"){const v=_s(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const y=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),b[v]=y??null}),d.push({animation:b})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Tm(),r=!0}}}function NC(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!wm(t,e):!1}function Ir(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tm(){return{animate:Ir(!0),whileInView:Ir(),whileHover:Ir(),whileTap:Ir(),whileDrag:Ir(),whileFocus:Ir(),exit:Ir()}}class nr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class FC extends nr{constructor(t){super(t),t.animationState||(t.animationState=MC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let LC=0;class VC extends nr{constructor(){super(...arguments),this.id=LC++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const $C={animation:{Feature:FC},exit:{Feature:VC}},cn={x:!1,y:!1};function Sm(){return cn.x||cn.y}function RC(e){return e==="x"||e==="y"?cn[e]?null:(cn[e]=!0,()=>{cn[e]=!1}):cn.x||cn.y?null:(cn.x=cn.y=!0,()=>{cn.x=cn.y=!1})}function Rs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Kc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Bs(e){return{point:{x:e.pageX,y:e.pageY}}}const BC=e=>t=>Kc(t)&&e(t,Bs(t));function Co(e,t,n,r){return Rs(e,t,BC(n),r)}function Em({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function jC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Cm=1e-4,HC=1-Cm,WC=1+Cm,Pm=.01,UC=0-Pm,GC=0+Pm;function $t(e){return e.max-e.min}function YC(e,t,n){return Math.abs(e-t)<=n}function km(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(e.scale>=HC&&e.scale<=WC||isNaN(e.scale))&&(e.scale=1),(e.translate>=UC&&e.translate<=GC||isNaN(e.translate))&&(e.translate=0)}function js(e,t,n,r){km(e.x,t.x,n.x,r?r.originX:void 0),km(e.y,t.y,n.y,r?r.originY:void 0)}function Im(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function qC(e,t,n){Im(e.x,t.x,n.x),Im(e.y,t.y,n.y)}function Am(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function zs(e,t,n){Am(e.x,t.x,n.x),Am(e.y,t.y,n.y)}const Om=()=>({translate:0,scale:1,origin:0,originPoint:0}),Po=()=>({x:Om(),y:Om()}),_m=()=>({min:0,max:0}),st=()=>({x:_m(),y:_m()});function nn(e){return[e("x"),e("y")]}function Zc(e){return e===void 0||e===1}function Xc({scale:e,scaleX:t,scaleY:n}){return!Zc(e)||!Zc(t)||!Zc(n)}function Ar(e){return Xc(e)||Dm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dm(e){return Mm(e.x)||Mm(e.y)}function Mm(e){return e&&e!=="0%"}function ia(e,t,n){const r=e-n,o=t*r;return n+o}function Nm(e,t,n,r,o){return o!==void 0&&(e=ia(e,o,r)),ia(e,n,r)+t}function Qc(e,t=0,n=1,r,o){e.min=Nm(e.min,t,n,r,o),e.max=Nm(e.max,t,n,r,o)}function Fm(e,{x:t,y:n}){Qc(e.x,t.translate,t.scale,t.originPoint),Qc(e.y,n.translate,n.scale,n.originPoint)}const Lm=.999999999999,Vm=1.0000000000001;function KC(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Io(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Fm(e,i)),r&&Ar(s.latestValues)&&Io(e,s.latestValues))}t.x<Vm&&t.x>Lm&&(t.x=1),t.y<Vm&&t.y>Lm&&(t.y=1)}function ko(e,t){e.min=e.min+t,e.max=e.max+t}function $m(e,t,n,r,o=.5){const s=Ke(e.min,e.max,o);Qc(e,t,n,s,r)}function Io(e,t){$m(e.x,t.x,t.scaleX,t.scale,t.originX),$m(e.y,t.y,t.scaleY,t.scale,t.originY)}function Rm(e,t){return Em(zC(e.getBoundingClientRect(),t))}function ZC(e,t,n){const r=Rm(e,n),{scroll:o}=t;return o&&(ko(r.x,o.offset.x),ko(r.y,o.offset.y)),r}function aa(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Bm=(e,t)=>Math.abs(e-t);function XC(e,t){const n=Bm(e.x,t.x),r=Bm(e.y,t.y);return Math.sqrt(n**2+r**2)}class jm{constructor(t,n,{transformPagePoint:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=eu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=XC(u.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:h}=u,{timestamp:p}=Pt;this.history.push({...h,timestamp:p});const{onStart:m,onMove:b}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=Jc(d,this.transformPagePoint),We.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{aa(u,"release"),this.end();const{onEnd:f,onSessionEnd:h,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=eu(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:Jc(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,m),h&&h(u,m)},!Kc(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r;const s=Bs(t),i=Jc(s,this.transformPagePoint),{point:a}=i,{timestamp:l}=Pt;this.history=[{...a,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,eu(i,this.history)),aa(t,"set"),this.removeListeners=Vs(Co(t.currentTarget,"pointermove",this.handlePointerMove),Co(t.currentTarget,"pointerup",this.handlePointerUp),Co(t.currentTarget,"pointercancel",this.handlePointerUp),Co(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),$n(this.updatePoint)}}function Jc(e,t){return t?{point:t(e.point)}:e}function zm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eu({point:e},t){return{point:e,delta:zm(e,Hm(t)),offset:zm(e,QC(t)),velocity:JC(t,.1)}}function QC(e){return e[0]}function Hm(e){return e[e.length-1]}function JC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Hm(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ln(t)));)n--;if(!r)return{x:0,y:0};const s=wn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function eP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ke(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function Wm(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function tP(e,{top:t,left:n,bottom:r,right:o}){return{x:Wm(e.x,n,o),y:Wm(e.y,t,r)}}function Um(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nP(e,t){return{x:Um(e.x,t.x),y:Um(e.y,t.y)}}function rP(e,t){let n=.5;const r=$t(e),o=$t(t);return o>r?n=Cr(t.min,t.max-r,e.min):r>o&&(n=Cr(e.min,e.max-o,t.min)),Rn(0,1,n)}function oP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const tu=.35;function sP(e=tu){return e===!1?e=0:e===!0&&(e=tu),{x:Gm(e,"left","right"),y:Gm(e,"top","bottom")}}function Gm(e,t,n){return{min:Ym(e,t),max:Ym(e,n)}}function Ym(e,t){return typeof e=="number"?e:e[t]||0}const iP=new WeakMap;class aP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=st(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bs(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=RC(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nn(b=>{let v=this.getAxisMotionValue(b).get()||0;if(vn.test(v)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[b];g&&(v=$t(g)*(parseFloat(v)/100))}}this.originPoint[b]=v}),p&&We.postRender(()=>p(u,d)),xc(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=d;if(h&&this.currentDirection===null){this.currentDirection=lP(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>nn(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new jm(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&We.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!la(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=eP(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&bo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=tP(o.layoutBox,n):this.constraints=!1,this.elastic=sP(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&nn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=oP(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bo(t))return!1;const r=t.current;tn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=ZC(r,o.root,this.visualElement.getTransformPagePoint());let i=nP(o.layout.layoutBox,s);if(n){const a=n(jC(i));this.hasMutatedConstraints=!!a,a&&(i=Em(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=nn(u=>{if(!la(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return xc(this.visualElement,t),r.start(Gc(t,r,0,n,this.visualElement,!1))}stopAnimation(){nn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){nn(n=>{const{drag:r}=this.getProps();if(!la(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ke(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!bo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};nn(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=rP({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),nn(i=>{if(!la(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ke(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;iP.set(this.visualElement,this);const t=this.visualElement.current,n=Co(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();bo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),We.read(r);const i=Rs(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(nn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=tu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function la(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class cP extends nr{constructor(t){super(t),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new aP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const qm=e=>(t,n)=>{e&&We.postRender(()=>e(t,n))};class uP extends nr{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(t){this.session=new jm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:qm(t),onStart:qm(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&We.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Co(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ca={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Km(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Hs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const n=Km(e,t.target.x),r=Km(e,t.target.y);return`${n}% ${r}%`}},dP={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=tr.parse(e);if(o.length>5)return r;const s=tr.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ke(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class fP extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;IS(hP),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ca.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||We.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ic.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zm(e){const[t,n]=Hh(),r=w.useContext(Ps);return x.jsx(fP,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(rp),isPresent:t,safeToRemove:n})}const hP={borderRadius:{...Hs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hs,borderTopRightRadius:Hs,borderBottomLeftRadius:Hs,borderBottomRightRadius:Hs,boxShadow:dP};function Xm(e,t,n){const r=vt(e)?e:To(e);return r.start(Gc("",r,t,n)),r.animation}function Qm(e){return e instanceof SVGElement&&e.tagName!=="svg"}const pP=(e,t)=>e.depth-t.depth;class mP{constructor(){this.children=[],this.isDirty=!1}add(t){bc(this.children,t),this.isDirty=!0}remove(t){Ji(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pP),this.isDirty=!1,this.children.forEach(t)}}function gP(e,t){const n=bn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&($n(r),e(s-t))};return We.read(r,!0),()=>$n(r)}const Jm=["TopLeft","TopRight","BottomLeft","BottomRight"],yP=Jm.length,eg=e=>typeof e=="string"?parseFloat(e):e,tg=e=>typeof e=="number"||ge.test(e);function vP(e,t,n,r,o,s){o?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,bP(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,wP(r))):s&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<yP;i++){const a=`border${Jm[i]}Radius`;let l=ng(t,a),c=ng(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||tg(l)===tg(c)?(e[a]=Math.max(Ke(eg(l),eg(c),r),0),(vn.test(c)||vn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ke(t.rotate||0,n.rotate||0,r))}function ng(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bP=rg(0,.5,Lp),wP=rg(.5,.95,Ht);function rg(e,t,n){return r=>r<e?0:r>t?1:n(Cr(e,t,r))}function og(e,t){e.min=t.min,e.max=t.max}function rn(e,t){og(e.x,t.x),og(e.y,t.y)}function sg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ig(e,t,n,r,o){return e-=t,e=ia(e,1/n,r),o!==void 0&&(e=ia(e,1/o,r)),e}function xP(e,t=0,n=1,r=.5,o,s=e,i=e){if(vn.test(t)&&(t=parseFloat(t),t=Ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ke(s.min,s.max,r);e===s&&(a-=t),e.min=ig(e.min,t,n,a,o),e.max=ig(e.max,t,n,a,o)}function ag(e,t,[n,r,o],s,i){xP(e,t[n],t[r],t[o],t.scale,s,i)}const TP=["x","scaleX","originX"],SP=["y","scaleY","originY"];function lg(e,t,n,r){ag(e.x,t,TP,n?n.x:void 0,r?r.x:void 0),ag(e.y,t,SP,n?n.y:void 0,r?r.y:void 0)}function cg(e){return e.translate===0&&e.scale===1}function ug(e){return cg(e.x)&&cg(e.y)}function dg(e,t){return e.min===t.min&&e.max===t.max}function EP(e,t){return dg(e.x,t.x)&&dg(e.y,t.y)}function fg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hg(e,t){return fg(e.x,t.x)&&fg(e.y,t.y)}function pg(e){return $t(e.x)/$t(e.y)}function mg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CP{constructor(){this.members=[]}add(t){bc(this.members,t),t.scheduleRender()}remove(t){if(Ji(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function PP(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const nu=["","X","Y","Z"],kP={visibility:"hidden"},gg=1e3;let IP=0;function ru(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function yg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ep(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",We,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&yg(r)}function vg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=IP++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(_P),this.nodes.forEach(LP),this.nodes.forEach(VP),this.nodes.forEach(DP)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new mP)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new wc),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Qm(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=gP(f,250),ca.hasAnimatedSinceResize&&(ca.hasAnimatedSinceResize=!1,this.nodes.forEach(wg))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||zP,{onLayoutAnimationStart:b,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!hg(this.targetLayout,p),g=!f&&h;if(this.options.layoutRoot||this.resumeFrom||g||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const S={...vc(m,"layout"),onPlay:b,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||wg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,$n(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach($P),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bg);return}this.isUpdating||this.nodes.forEach(NP),this.isUpdating=!1,this.nodes.forEach(FP),this.nodes.forEach(AP),this.nodes.forEach(OP),this.clearAllSnapshots();const a=bn.now();Pt.delta=Rn(0,1e3/60,a-Pt.timestamp),Pt.timestamp=a,Pt.isProcessing=!0,nc.update.process(Pt),nc.preRender.process(Pt),nc.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ic.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(MP),this.sharedNodes.forEach(RP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,We.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){We.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$t(this.snapshot.measuredBox.x)&&!$t(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=st(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ug(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ar(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),HP(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return st();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(WP))){const{scroll:u}=this.root;u&&(ko(l.x,u.offset.x),ko(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=st();if(rn(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&rn(l,i),ko(l.x,d.offset.x),ko(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=st();rn(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Io(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ar(u.latestValues)&&Io(l,u.latestValues)}return Ar(this.latestValues)&&Io(l,this.latestValues),l}removeTransform(i){const a=st();rn(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ar(c.latestValues))continue;Xc(c.latestValues)&&c.updateSnapshot();const u=st(),d=c.measurePageBox();rn(u,d),lg(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ar(this.latestValues)&&lg(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),zs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=st(),this.targetWithTransforms=st()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rn(this.target,this.layout.layoutBox),Fm(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=st(),this.relativeTargetOrigin=st(),zs(this.relativeTargetOrigin,this.target,h.target),rn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Xc(this.parent.latestValues)||Dm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Pt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;rn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;KC(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=st());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sg(this.prevProjectionDelta.x,this.projectionDelta.x),sg(this.prevProjectionDelta.y,this.projectionDelta.y)),js(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!mg(this.projectionDelta.x,this.prevProjectionDelta.x)||!mg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Po(),this.projectionDelta=Po(),this.projectionDeltaWithTransform=Po()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=st(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,b=this.getStack(),v=!b||b.members.length<=1,y=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(jP));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const T=S/1e3;xg(d.x,i.x,T),xg(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),BP(this.relativeTarget,this.relativeTargetOrigin,f,T),g&&EP(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=st()),rn(g,this.relativeTarget)),m&&(this.animationValues=u,vP(u,c,this.latestValues,T,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&($n(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=We.update(()=>{ca.hasAnimatedSinceResize=!0,this.currentAnimation=Xm(0,gg,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&Pg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||st();const d=$t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=$t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}rn(a,l),Io(a,u),js(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new CP),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ru("z",i,c,this.animationValues);for(let u=0;u<nu.length;u++)ru(`rotate${nu[u]}`,i,c,this.animationValues),ru(`skew${nu[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return kP;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Xi(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Xi(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ar(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=PP(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Is){if(f[m]===void 0)continue;const{correct:b,applyTo:v,isCSSVariable:y}=Is[m],g=c.transform==="none"?f[m]:b(f[m],d);if(v){const S=v.length;for(let T=0;T<S;T++)c[v[T]]=g}else y?this.options.visualElement.renderState.vars[m]=g:c[m]=g}return this.options.layoutId&&(c.pointerEvents=d===this?Xi(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(bg),this.root.sharedNodes.clear()}}}function AP(e){e.updateLayout()}function OP(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?nn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=$t(f);f.min=r[d].min,f.max=f.min+h}):Pg(s,n.layoutBox,r)&&nn(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=$t(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Po();js(a,r,n.layoutBox);const l=Po();i?js(l,e.applyTransform(o,!0),n.measuredBox):js(l,r,n.layoutBox);const c=!ug(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=st();zs(p,n.layoutBox,f.layoutBox);const m=st();zs(m,r,h.layoutBox),hg(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function _P(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function DP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function MP(e){e.clearSnapshot()}function bg(e){e.clearMeasurements()}function NP(e){e.isLayoutDirty=!1}function FP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LP(e){e.resolveTargetDelta()}function VP(e){e.calcProjection()}function $P(e){e.resetSkewAndRotation()}function RP(e){e.removeLeadSnapshot()}function xg(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tg(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function BP(e,t,n,r){Tg(e.x,t.x,n.x,r),Tg(e.y,t.y,n.y,r)}function jP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zP={duration:.45,ease:[.4,0,.1,1]},Sg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Eg=Sg("applewebkit/")&&!Sg("chrome/")?Math.round:Ht;function Cg(e){e.min=Eg(e.min),e.max=Eg(e.max)}function HP(e){Cg(e.x),Cg(e.y)}function Pg(e,t,n){return e==="position"||e==="preserve-aspect"&&!YC(pg(t),pg(n),.2)}function WP(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const UP=vg({attachResizeListener:(e,t)=>Rs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ou={current:void 0},kg=vg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ou.current){const e=new UP({});e.mount(window),e.setOptions({layoutScroll:!0}),ou.current=e}return ou.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),GP={pan:{Feature:uP},drag:{Feature:cP,ProjectionNode:kg,MeasureLayout:Zm}};function Ig(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const s=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Ag(e,t){const n=Ig(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Og(e){return!(e.pointerType==="touch"||Sm())}function YP(e,t,n={}){const[r,o,s]=Ag(e,n),i=a=>{if(!Og(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Og(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function _g(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&We.postRender(()=>s(t,Bs(t)))}class qP extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=YP(t,(n,r)=>(_g(this.node,r,"Start"),o=>_g(this.node,o,"End"))))}unmount(){}}class KP extends nr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vs(Rs(this.node.current,"focus",()=>this.onFocus()),Rs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Dg=(e,t)=>t?e===t?!0:Dg(e,t.parentElement):!1,ZP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function XP(e){return ZP.has(e.tagName)||e.tabIndex!==-1}const Ws=new WeakSet;function Mg(e){return t=>{t.key==="Enter"&&e(t)}}function su(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const QP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Mg(()=>{if(Ws.has(n))return;su(n,"down");const o=Mg(()=>{su(n,"up")}),s=()=>su(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ng(e){return Kc(e)&&!Sm()}function JP(e,t,n={}){const[r,o,s]=Ag(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ng(a)||Ws.has(l))return;Ws.add(l),aa(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),aa(h,"release"),!(!Ng(h)||!Ws.has(l))&&(Ws.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?ek(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||Dg(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!XP(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>QP(c,o),o)}),s}function ek(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function Fg(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&We.postRender(()=>s(t,Bs(t)))}class tk extends nr{mount(){const{current:t}=this.node;t&&(this.unmount=JP(t,(n,r)=>(Fg(this.node,r,"Start"),(o,{success:s})=>Fg(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const iu=new WeakMap,au=new WeakMap,nk=e=>{const t=iu.get(e.target);t&&t(e)},rk=e=>{e.forEach(nk)};function ok({root:e,...t}){const n=e||document;au.has(n)||au.set(n,{});const r=au.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(rk,{root:e,...t})),r[o]}function sk(e,t,n){const r=ok(t);return iu.set(e,n),r.observe(e),()=>{iu.delete(e),r.unobserve(e)}}const ik={some:0,all:1};class ak extends nr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:ik[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return sk(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(lk(t,n))&&this.startObserver()}unmount(){}}function lk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ck={inView:{Feature:ak},tap:{Feature:tk},focus:{Feature:KP},hover:{Feature:qP}},uk={layout:{ProjectionNode:kg,MeasureLayout:Zm}},lu={current:null},Lg={current:!1};function dk(){if(Lg.current=!0,!!tc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lu.current=e.matches;e.addListener(t),t()}else lu.current=!1}const fk=[...em,Dt,tr],hk=e=>fk.find(Jp(e)),Us=new WeakMap;function pk(e,t,n){for(const r in t){const o=t[r],s=n[r];if(vt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Gi(o.version==="12.4.7",`Attempting to mix Motion versions ${o.version} with 12.4.7 may not work as expected.`);else if(vt(s))e.addValue(r,To(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,To(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $g{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Fc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=bn.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,We.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Ki(n),this.isVariantNode=ep(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&vt(p)&&p.set(l[h],!1)}}mount(t){this.current=t,Us.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Lg.current||dk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lu.current,process.env.NODE_ENV!=="production"&&Gi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),$n(this.notifyUpdate),$n(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Er.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&We.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in vo){const n=vo[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):st()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Vg.length;r++){const o=Vg[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=pk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=To(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Xp(o)||$p(o))?o=parseFloat(o):!hk(o)&&tr.test(n)&&(o=Up(t,n)),this.setBaseTarget(t,vt(o)?o.get():o)),vt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=mc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!vt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new wc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Rg extends $g{constructor(){super(...arguments),this.KeyframeResolver=nm}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;vt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function mk(e){return window.getComputedStyle(e)}class Bg extends Rg{constructor(){super(...arguments),this.type="html",this.renderInstance=gp}readValueFromInstance(t,n){if(Er.has(n)){const r=Dc(n);return r&&r.default||0}else{const r=mk(t),o=(ac(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Rm(t,n)}build(t,n,r){uc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return yc(t,n,r)}}class jg extends Rg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=st,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&mp(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Er.has(n)){const r=Dc(n);return r&&r.default||0}return n=yp.has(n)?n:sc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return bp(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&We.postRender(this.updateDimensions)}build(t,n,r){hc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){vp(t,n,r,o)}mount(t){this.isSVGTag=pc(t.tagName),super.mount(t)}}const gk=(e,t)=>fc(e)?new jg(t):new Bg(t,{allowProjection:e!==w.Fragment}),yk=QS({...$C,...ck,...GP,...uk},gk),dt=mS(yk);function Or(e){const t=an(()=>To(e)),{isStatic:n}=w.useContext(go);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}function zg(e,t){const n=Or(t()),r=()=>n.set(t());return r(),Hi(()=>{const o=()=>We.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),$n(r)}}),n}const vk=e=>e&&typeof e=="object"&&e.mix,bk=e=>vk(e)?e.mix:void 0;function wk(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=mm(o,s,{mixer:bk(s[0]),...i});return t?a(r):a}function xk(e){Ds.current=[],e();const t=zg(Ds.current,e);return Ds.current=void 0,t}function Tk(e,t,n,r){if(typeof e=="function")return xk(e);const o=typeof t=="function"?t:wk(t,n,r);return Array.isArray(e)?Hg(e,o):Hg([e],([s])=>o(s))}function Hg(e,t){const n=an(()=>[]);return zg(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Sk(e){return w.useEffect(()=>()=>e(),[])}function Ek(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Lc(r),ra);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:wn(o)}}const Ck=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Wg(e,t){return hm(e)?e[Ck(0,e.length,t)]:e}function cu(e){return typeof e=="object"&&!Array.isArray(e)}function Ug(e,t,n,r){return typeof e=="string"&&cu(t)?Ig(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Pk(e,t,n){return e*(t+1)}function Gg(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function kk(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ji(e,o),r--)}}function Ik(e,t,n,r,o,s){kk(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ke(o,s,r[i]),easing:Wg(n,i)})}function Ak(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function Ok(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const _k="easeInOut",Dk=20;function Mk(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const p=e[h];if(typeof p=="string"){c.set(p,d);continue}else if(!Array.isArray(p)){c.set(p.name,Gg(d,p.at,u,c));continue}let[m,b,v={}]=p;v.at!==void 0&&(d=Gg(d,v.at,u,c));let y=0;const g=(S,T,E,C=0,I=0)=>{const A=Nk(S),{delay:O=0,times:M=ym(A),type:_="keyframes",repeat:F,repeatType:P,repeatDelay:N=0,...L}=T;let{ease:V=t.ease||"easeOut",duration:B}=T;const W=typeof O=="function"?O(C,I):O,D=A.length,j=ea(_)?_:o==null?void 0:o[_];if(D<=2&&j){let G=100;if(D===2&&Vk(A)){const H=A[1]-A[0];G=Math.abs(H)}const $={...L};B!==void 0&&($.duration=ln(B));const z=Ek($,G,j);V=z.ease,B=z.duration}B??(B=s);const K=d+W;M.length===1&&M[0]===0&&(M[1]=1);const J=M.length-A.length;if(J>0&&gm(M,J),A.length===1&&A.unshift(null),F){tn(F<Dk,"Repeat count too high, must be less than 20"),B=Pk(B,F);const G=[...A],$=[...M];V=Array.isArray(V)?[...V]:[V];const z=[...V];for(let H=0;H<F;H++){A.push(...G);for(let U=0;U<G.length;U++)M.push($[U]+(H+1)),V.push(U===0?"linear":Wg(z,U-1))}Ak(M,F)}const X=K+B;Ik(E,A,V,M,K,X),y=Math.max(W+B,y),f=Math.max(X,f)};if(vt(m)){const S=Yg(m,a);g(b,v,qg("default",S))}else{const S=Ug(m,b,r,l),T=S.length;for(let E=0;E<T;E++){b=b,v=v;const C=S[E],I=Yg(C,a);for(const A in b)g(b[A],Fk(v,A),qg(A,I),E,T)}}u=d,d+=y}return a.forEach((h,p)=>{for(const m in h){const b=h[m];b.sort(Ok);const v=[],y=[],g=[];for(let T=0;T<b.length;T++){const{at:E,value:C,easing:I}=b[T];v.push(C),y.push(Cr(0,f,E)),g.push(I||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),g.unshift(_k)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(p)||i.set(p,{keyframes:{},transition:{}});const S=i.get(p);S.keyframes[m]=v,S.transition[m]={...t,duration:f,ease:g,times:y,...n}}}),i}function Yg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function qg(e,t){return t[e]||(t[e]=[]),t[e]}function Nk(e){return Array.isArray(e)?e:[e]}function Fk(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Lk=e=>typeof e=="number",Vk=e=>e.every(Lk);function $k(e,t){return e in t}class Rk extends $g{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if($k(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return st()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function Bk(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Qm(e)?new jg(t):new Bg(t);n.mount(e),Us.set(e,n)}function jk(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Rk(t);n.mount(e),Us.set(e,n)}function zk(e,t){return vt(e)||typeof e=="number"||typeof e=="string"&&!cu(t)}function Kg(e,t,n,r){const o=[];if(zk(e,t))o.push(Xm(e,cu(t)&&t.default||t,n&&(n.default||n)));else{const s=Ug(e,t,r),i=s.length;tn(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?Bk:jk;Us.has(l)||c(l);const u=Us.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,i)),o.push(...Yc(u,{...t,transition:d},{}))}}return o}function Hk(e,t,n){const r=[];return Mk(e,t,n,{spring:Hc}).forEach(({keyframes:s,transition:i},a)=>{r.push(...Kg(a,s,i))}),r}function Wk(e){return Array.isArray(e)&&e.some(Array.isArray)}function Uk(e){function t(n,r,o){let s=[];Wk(n)?s=Hk(n,r,e):s=Kg(n,r,o,e);const i=new Cp(s);return e&&e.animations.push(i),i}return t}function Gk(){const e=an(()=>({current:null,animations:[]})),t=an(()=>Uk(e));return Sk(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class Yk{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const qk=()=>new Yk;function Kk(){return an(qk)}function Zk(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function Xk(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:Zk(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=Wc(r)(l/c)*c}return t+l}}const Zg=w.createContext(null);function Qk(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Ke(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?eE(e,o,o+s):e}function Jk({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=an(()=>dt[t]),l=[],c=w.useRef(!1);tn(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(tI)},updateOrder:(d,f,h)=>{if(c.current)return;const p=Qk(l,d,f,h);l!==p&&(c.current=!0,r(p.map(eI).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(Zg.Provider,{value:u,children:e})})}const Xg=w.forwardRef(Jk);function eI(e){return e.value}function tI(e,t){return e.layout.min-t.layout.min}function Qg(e,t=0){return vt(e)?e:Or(t)}function nI({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=an(()=>dt[r]),c=w.useContext(Zg),u={x:Qg(t.x),y:Qg(t.y)},d=Tk([u.x,u.y],([m,b])=>m||b?1:"unset");tn(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,b)=>{const{velocity:v}=b;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,b)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const Jg=w.forwardRef(nI);/**
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 gP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Om=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
17
+ */const rI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ey=(...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 yP={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 oI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
23
23
  * @license lucide-react v0.414.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const vP=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>b.createElement("svg",{ref:l,...yP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Om("lucide",o),...a},[...i.map(([c,u])=>b.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
27
+ */const sI=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>w.createElement("svg",{ref:l,...oI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ey("lucide",o),...a},[...i.map(([c,u])=>w.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
28
28
  * @license lucide-react v0.414.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const Ze=(e,t)=>{const n=b.forwardRef(({className:r,...o},s)=>b.createElement(vP,{ref:s,iconNode:t,className:Om(`lucide-${gP(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
32
+ */const it=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(sI,{ref:s,iconNode:t,className:ey(`lucide-${rI(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 bP=Ze("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 iI=it("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
38
38
  * @license lucide-react v0.414.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const wP=Ze("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 aI=it("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
43
43
  * @license lucide-react v0.414.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const Am=Ze("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 ty=it("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
48
48
  * @license lucide-react v0.414.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const xP=Ze("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 lI=it("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
53
53
  * @license lucide-react v0.414.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const Mm=Ze("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
57
+ */const cI=it("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
58
58
  * @license lucide-react v0.414.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const rc=Ze("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
62
+ */const uu=it("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
63
63
  * @license lucide-react v0.414.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const TP=Ze("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ */const uI=it("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.414.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const oc=Ze("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ */const du=it("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.414.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const Dm=Ze("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 ny=it("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
78
78
  * @license lucide-react v0.414.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const SP=Ze("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 dI=it("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
83
83
  * @license lucide-react v0.414.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const km=Ze("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 ry=it("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
88
88
  * @license lucide-react v0.414.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const EP=Ze("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 fI=it("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
93
93
  * @license lucide-react v0.414.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const Fm=Ze("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 oy=it("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
98
98
  * @license lucide-react v0.414.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const CP=Ze("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
102
+ */const hI=it("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
103
103
  * @license lucide-react v0.414.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const sc=Ze("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
107
+ */const fu=it("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
108
108
  * @license lucide-react v0.414.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const PP=Ze("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
112
+ */const pI=it("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
113
113
  * @license lucide-react v0.414.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const IP=Ze("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
117
+ */const mI=it("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
118
118
  * @license lucide-react v0.414.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const no=Ze("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"}]]);/**
122
+ */const Ao=it("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
123
123
  * @license lucide-react v0.414.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const OP=Ze("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
127
+ */const gI=it("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
128
128
  * @license lucide-react v0.414.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const AP=Ze("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"}]]);/**
132
+ */const yI=it("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
133
133
  * @license lucide-react v0.414.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const MP=Ze("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"}]]);/**
137
+ */const vI=it("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
138
138
  * @license lucide-react v0.414.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const ic=Ze("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Nm={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},DP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},Lm=e=>w.jsx(pt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Nm,exit:Nm.false,transition:DP,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Me("aria-hidden:pointer-events-none",e.className),children:e.children}),kP=kr("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),FP=b.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return w.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:Me("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:w.jsx(Lm,{"data-open":!!s,open:!!s,children:w.jsxs(zr,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:Me(kP({theme:n}),t),children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(Dm,{size:20}):null,!r&&n==="info"?w.jsx(Fm,{size:20}):null,!r&&n==="danger"?w.jsx(OP,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?w.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:w.jsx(ic,{size:20})}):null]})})})});function Ie(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 He(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function ro(e,t){const n=Ie(e);return isNaN(t)?He(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function xi(e,t){const n=Ie(e);if(isNaN(t))return He(e,NaN);if(!t)return n;const r=n.getDate(),o=He(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const _m=6048e5,NP=864e5,LP=6e4,_P=36e5,VP=1e3;let $P={};function fr(){return $P}function on(e,t){var a,l,c,u;const n=fr(),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=Ie(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function oo(e){return on(e,{weekStartsOn:1})}function Vm(e){const t=Ie(e),n=t.getFullYear(),r=He(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=oo(r),s=He(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=oo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function so(e){const t=Ie(e);return t.setHours(0,0,0,0),t}function Ti(e){const t=Ie(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=so(e),r=so(t),o=+n-Ti(n),s=+r-Ti(r);return Math.round((o-s)/NP)}function RP(e){const t=Vm(e),n=He(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),oo(n)}function $m(e,t){const n=t*7;return ro(e,n)}function Bm(e,t){return xi(e,t*12)}function jP(e){return He(e,Date.now())}function zP(e,t){const n=so(e),r=so(t);return+n==+r}function WP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Rm(e){if(!WP(e)&&typeof e!="number")return!1;const t=Ie(e);return!isNaN(Number(t))}function jm(e,t){const n=Ie(e.start),r=Ie(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Ie(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function zm(e){const t=Ie(e);return t.setDate(1),t.setHours(0,0,0,0),t}function HP(e){const t=Ie(e),n=He(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function UP(e,t){var a,l;const n=fr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Ie(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const GP={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"}},KP=(e,t,n)=>{let r;const o=GP[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 YP={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"},XP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},QP={date:ac({formats:YP,defaultWidth:"full"}),time:ac({formats:qP,defaultWidth:"full"}),dateTime:ac({formats:XP,defaultWidth:"full"})},ZP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},JP=(e,t,n,r)=>ZP[e];function us(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const eI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nI={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"]},rI={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"]},oI={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"}},sI={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"}},iI={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:us({values:eI,defaultWidth:"wide"}),quarter:us({values:tI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:us({values:nI,defaultWidth:"wide"}),day:us({values:rI,defaultWidth:"wide"}),dayPeriod:us({values:oI,defaultWidth:"wide",formattingValues:sI,defaultFormattingWidth:"wide"})};function ds(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?lI(a,d=>d.test(i)):aI(a,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function aI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function lI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function cI(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const uI=/^(\d+)(th|st|nd|rd)?/i,dI=/\d+/i,fI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hI={any:[/^b/i,/^(a|c)/i]},pI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mI={any:[/1/i,/2/i,/3/i,/4/i]},gI={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},yI={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]},vI={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},bI={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]},wI={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},xI={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}},TI={ordinalNumber:cI({matchPattern:uI,parsePattern:dI,valueCallback:e=>parseInt(e,10)}),era:ds({matchPatterns:fI,defaultMatchWidth:"wide",parsePatterns:hI,defaultParseWidth:"any"}),quarter:ds({matchPatterns:pI,defaultMatchWidth:"wide",parsePatterns:mI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ds({matchPatterns:gI,defaultMatchWidth:"wide",parsePatterns:yI,defaultParseWidth:"any"}),day:ds({matchPatterns:vI,defaultMatchWidth:"wide",parsePatterns:bI,defaultParseWidth:"any"}),dayPeriod:ds({matchPatterns:wI,defaultMatchWidth:"any",parsePatterns:xI,defaultParseWidth:"any"})},Wm={code:"en-US",formatDistance:KP,formatLong:QP,formatRelative:JP,localize:iI,match:TI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function SI(e){const t=Ie(e);return BP(t,HP(t))+1}function Hm(e){const t=Ie(e),n=+oo(t)-+RP(t);return Math.round(n/_m)+1}function lc(e,t){var u,d,f,h;const n=Ie(e),r=n.getFullYear(),o=fr(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=He(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=on(i,t),l=He(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=on(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function EI(e,t){var a,l,c,u;const n=fr(),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=lc(e,t),s=He(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),on(s,t)}function Um(e,t){const n=Ie(e),r=+on(n,t)-+EI(n,t);return Math.round(r/_m)+1}function Fe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Rn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Fe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Fe(n+1,2)},d(e,t){return Fe(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 Fe(e.getHours()%12||12,t.length)},H(e,t){return Fe(e.getHours(),t.length)},m(e,t){return Fe(e.getMinutes(),t.length)},s(e,t){return Fe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Fe(o,t.length)}},io={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gm={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 Rn.y(e,t)},Y:function(e,t,n,r){const o=lc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Fe(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Fe(s,t.length)},R:function(e,t){const n=Vm(e);return Fe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Fe(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 Fe(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 Fe(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 Rn.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 Fe(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=Um(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Fe(o,t.length)},I:function(e,t,n){const r=Hm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Fe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Rn.d(e,t)},D:function(e,t,n){const r=SI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Fe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Fe(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Fe(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Fe(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=io.noon:r===0?o=io.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=io.evening:r>=12?o=io.afternoon:r>=4?o=io.morning:o=io.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 Rn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Rn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Fe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Fe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Rn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Rn.s(e,t)},S:function(e,t){return Rn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ym(r);case"XXXX":case"XX":return hr(r);case"XXXXX":case"XXX":default:return hr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ym(r);case"xxxx":case"xx":return hr(r);case"xxxxx":case"xxx":default:return hr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Km(r,":");case"OOOO":default:return"GMT"+hr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Km(r,":");case"zzzz":default:return"GMT"+hr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Fe(r,t.length)},T:function(e,t,n){const r=e.getTime();return Fe(r,t.length)}};function Km(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Fe(s,2)}function Ym(e,t){return e%60===0?(e>0?"-":"+")+Fe(Math.abs(e)/60,2):hr(e,t)}function hr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Fe(Math.trunc(r/60),2),s=Fe(r%60,2);return n+o+t+s}const qm=(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"})}},Xm=(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"})}},cc={p:Xm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return qm(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",qm(r,t)).replace("{{time}}",Xm(o,t))}},CI=/^D+$/,PI=/^Y+$/,II=["D","DD","YY","YYYY"];function Qm(e){return CI.test(e)}function Zm(e){return PI.test(e)}function uc(e,t,n){const r=OI(e,t,n);if(console.warn(r),II.includes(e))throw new RangeError(r)}function OI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const AI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,DI=/^'([^]*?)'?$/,kI=/''/g,FI=/[a-zA-Z]/;function NI(e,t,n){var u,d,f,h;const r=fr(),o=r.locale??Wm,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Ie(e);if(!Rm(a))throw new RangeError("Invalid time value");let l=t.match(MI).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=cc[m];return g(p,o.formatLong)}return p}).join("").match(AI).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:LI(p)};if(Gm[m])return{isToken:!0,value:p};if(m.match(FI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Zm(m)||Qm(m))&&uc(m,t,String(e));const g=Gm[m[0]];return g(a,m,o.localize,c)}).join("")}function LI(e){const t=e.match(DI);return t?t[1].replace(kI,"'"):e}function _I(){return Object.assign({},fr())}function VI(e){let n=Ie(e).getDay();return n===0&&(n=7),n}function $I(e,t){const n=Ie(e),r=Ie(t);return n.getTime()>r.getTime()}function BI(e,t){const n=Ie(e),r=Ie(t);return+n<+r}function RI(e,t){const n=t instanceof Date?He(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 jI=10;class Jm{constructor(){ne(this,"subPriority",0)}validate(t,n){return!0}}class zI extends Jm{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class WI extends Jm{constructor(){super(...arguments);ne(this,"priority",jI);ne(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:He(n,RI(n,Date))}}class Oe{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new zI(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class HI extends Oe{constructor(){super(...arguments);ne(this,"priority",140);ne(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 ot={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}/},sn={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 st(e,t){return e&&{value:t(e.value),rest:e.rest}}function Ye(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function an(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*_P+s*LP+i*VP),rest:t.slice(n[0].length)}}function eg(e){return Ye(ot.anyDigitsSigned,e)}function Je(e,t){switch(e){case 1:return Ye(ot.singleDigit,t);case 2:return Ye(ot.twoDigits,t);case 3:return Ye(ot.threeDigits,t);case 4:return Ye(ot.fourDigits,t);default:return Ye(new RegExp("^\\d{1,"+e+"}"),t)}}function Si(e,t){switch(e){case 1:return Ye(ot.singleDigitSigned,t);case 2:return Ye(ot.twoDigitsSigned,t);case 3:return Ye(ot.threeDigitsSigned,t);case 4:return Ye(ot.fourDigitsSigned,t);default:return Ye(new RegExp("^-?\\d{1,"+e+"}"),t)}}function dc(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 tg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function ng(e){return e%400===0||e%4===0&&e%100!==0}class UI extends Oe{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return st(Je(4,n),s);case"yo":return st(o.ordinalNumber(n,{unit:"year"}),s);default:return st(Je(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=tg(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class GI extends Oe{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return st(Je(4,n),s);case"Yo":return st(o.ordinalNumber(n,{unit:"year"}),s);default:return st(Je(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=lc(n,s);if(o.isTwoDigitYear){const l=tg(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),on(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),on(n,s)}}class KI extends Oe{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Si(r==="R"?4:r.length,n)}set(n,r,o){const s=He(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),oo(s)}}class YI extends Oe{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Si(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class qI extends Oe{constructor(){super(...arguments);ne(this,"priority",120);ne(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 Je(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 XI extends Oe{constructor(){super(...arguments);ne(this,"priority",120);ne(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 Je(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 QI extends Oe{constructor(){super(...arguments);ne(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ne(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return st(Ye(ot.month,n),s);case"MM":return st(Je(2,n),s);case"Mo":return st(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class ZI extends Oe{constructor(){super(...arguments);ne(this,"priority",110);ne(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return st(Ye(ot.month,n),s);case"LL":return st(Je(2,n),s);case"Lo":return st(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function JI(e,t,n){const r=Ie(e),o=Um(r,n)-t;return r.setDate(r.getDate()-o*7),r}class eO extends Oe{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Ye(ot.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return Je(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return on(JI(n,o,s),s)}}function tO(e,t){const n=Ie(e),r=Hm(n)-t;return n.setDate(n.getDate()-r*7),n}class nO extends Oe{constructor(){super(...arguments);ne(this,"priority",100);ne(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 Ye(ot.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return Je(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return oo(tO(n,o))}}const rO=[31,28,31,30,31,30,31,31,30,31,30,31],oO=[31,29,31,30,31,30,31,31,30,31,30,31];class sO extends Oe{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subPriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Ye(ot.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return Je(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=ng(o),i=n.getMonth();return s?r>=1&&r<=oO[i]:r>=1&&r<=rO[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class iO extends Oe{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subpriority",1);ne(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 Ye(ot.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return Je(r.length,n)}}validate(n,r){const o=n.getFullYear();return ng(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=fr(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=Ie(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return ro(s,u)}class aO extends Oe{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=fc(n,o,s),n.setHours(0,0,0,0),n}}class lO extends Oe{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return st(Je(r.length,n),i);case"eo":return st(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=fc(n,o,s),n.setHours(0,0,0,0),n}}class cO extends Oe{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return st(Je(r.length,n),i);case"co":return st(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=fc(n,o,s),n.setHours(0,0,0,0),n}}function uO(e,t){const n=Ie(e),r=VI(n),o=t-r;return ro(n,o)}class dO extends Oe{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return Je(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return st(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return st(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return st(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return st(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=uO(n,o),n.setHours(0,0,0,0),n}}class fO extends Oe{constructor(){super(...arguments);ne(this,"priority",80);ne(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(dc(o),0,0,0),n}}class hO extends Oe{constructor(){super(...arguments);ne(this,"priority",80);ne(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(dc(o),0,0,0),n}}class pO extends Oe{constructor(){super(...arguments);ne(this,"priority",80);ne(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(dc(o),0,0,0),n}}class mO extends Oe{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Ye(ot.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return Je(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class gO extends Oe{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Ye(ot.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return Je(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class yO extends Oe{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Ye(ot.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return Je(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 vO extends Oe{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Ye(ot.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return Je(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class bO extends Oe{constructor(){super(...arguments);ne(this,"priority",60);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Ye(ot.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return Je(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class wO extends Oe{constructor(){super(...arguments);ne(this,"priority",50);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Ye(ot.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return Je(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class xO extends Oe{constructor(){super(...arguments);ne(this,"priority",30);ne(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return st(Je(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class TO extends Oe{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return an(sn.basicOptionalMinutes,n);case"XX":return an(sn.basic,n);case"XXXX":return an(sn.basicOptionalSeconds,n);case"XXXXX":return an(sn.extendedOptionalSeconds,n);case"XXX":default:return an(sn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:He(n,n.getTime()-Ti(n)-o)}}class SO extends Oe{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return an(sn.basicOptionalMinutes,n);case"xx":return an(sn.basic,n);case"xxxx":return an(sn.basicOptionalSeconds,n);case"xxxxx":return an(sn.extendedOptionalSeconds,n);case"xxx":default:return an(sn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:He(n,n.getTime()-Ti(n)-o)}}class EO extends Oe{constructor(){super(...arguments);ne(this,"priority",40);ne(this,"incompatibleTokens","*")}parse(n){return eg(n)}set(n,r,o){return[He(n,o*1e3),{timestampIsSet:!0}]}}class CO extends Oe{constructor(){super(...arguments);ne(this,"priority",20);ne(this,"incompatibleTokens","*")}parse(n){return eg(n)}set(n,r,o){return[He(n,o),{timestampIsSet:!0}]}}const PO={G:new HI,y:new UI,Y:new GI,R:new KI,u:new YI,Q:new qI,q:new XI,M:new QI,L:new ZI,w:new eO,I:new nO,d:new sO,D:new iO,E:new aO,e:new lO,c:new cO,i:new dO,a:new fO,b:new hO,B:new pO,h:new mO,H:new gO,K:new yO,k:new vO,m:new bO,s:new wO,S:new xO,X:new TO,x:new SO,t:new EO,T:new CO},IO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,OO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,AO=/^'([^]*?)'?$/,MO=/''/g,DO=/\S/,kO=/[a-zA-Z]/;function FO(e,t,n,r){var m,g,y,x;const o=_I(),s=o.locale??Wm,i=o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=o.weekStartsOn??((x=(y=o.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(t==="")return e===""?Ie(n):He(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new WI],u=t.match(OO).map(v=>{const T=v[0];if(T in cc){const S=cc[T];return S(v,s.formatLong)}return v}).join("").match(IO),d=[];for(let v of u){Zm(v)&&uc(v,t,e),Qm(v)&&uc(v,t,e);const T=v[0],S=PO[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const O=d.find(F=>E.includes(F.token)||F.token===T);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${v}\` at the same time`)}else if(S.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${v}\` and any other token at the same time`);d.push({token:T,fullToken:v});const I=S.run(e,v,s.match,l);if(!I)return He(n,NaN);c.push(I.setter),e=I.rest}else{if(T.match(kO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(v==="''"?v="'":T==="'"&&(v=NO(v)),e.indexOf(v)===0)e=e.slice(v.length);else return He(n,NaN)}}if(e.length>0&&DO.test(e))return He(n,NaN);const f=c.map(v=>v.priority).sort((v,T)=>T-v).filter((v,T,S)=>S.indexOf(v)===T).map(v=>c.filter(T=>T.priority===v).sort((T,S)=>S.subPriority-T.subPriority)).map(v=>v[0]);let h=Ie(n);if(isNaN(h.getTime()))return He(n,NaN);const p={};for(const v of f){if(!v.validate(h,l))return He(n,NaN);const T=v.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return He(n,h)}function NO(e){return e.match(AO)[1].replace(MO,"'")}function LO(e,t){const n=Ie(e),r=Ie(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function _O(e){return zP(e,jP(e))}function VO(e,t){return ro(e,-t)}function rg(e,t){return xi(e,-t)}function $O(e,t){return $m(e,-t)}function BO(e,t){return Bm(e,-t)}var it=function(){return it=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},it.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 pc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var fs=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)},RO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},sg=function(e,t,n){var r=e.length-2,o=RO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},ig=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Ei=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},jO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},mc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},zO=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 s;return it(it({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ci=function(e,t){var n=og(ig(e),t.fraction.length),r="".concat(t.currency).concat(sg(n,t.group,t.decimal));return fs(r)},HO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=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,s,a);return p.currency=fs("".concat(p.currency.trim()," ")),p.literal=fs(p.literal.trim()),p},[r,s]),f=function(p){var m=Ci(p.target.value,d),g=Ei(m);p.target.value=m,p.target.setAttribute("data-number",g.toString()),l==null||l(p),g!==0&&(u.current.selectionEnd=m.length)};b.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=Ci(p,d),g=Ei(m);u.current.value=m,u.current.setAttribute("data-number",g.toString());var y=new InputEvent("change",{});l==null||l(it(it({},y),{target:u.current,currentTarget:u.current})),g!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?Ci(c.defaultValue,d):void 0;return b.createElement("input",it({},c,{value:typeof c.value=="string"?Ci(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),UO=1,GO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},KO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return it(it({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Pi=function(e,t){var n=og(ig(e),t.fraction.length),r="".concat(sg(n,t.group,t.decimal)," ").concat(t.percentSign);return fs(r)},YO=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=hc(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=pc(b.useState(function(){var y,x;return(x=(y=i.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=i.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(Pi(x,d))},[i.value]);var d=b.useMemo(function(){var y=KO(r);return y.percentSign=fs("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-UO,h=function(y){var x,v=a.current;v&&(v.setSelectionRange(f,f),y&&((x=i.onFocus)===null||x===void 0||x.call(i,y)))},p=function(y){var x=y.currentTarget;if(x.selectionStart!==null){var v=x.selectionStart,T=x.selectionEnd,S=v!==T,E=f<v;!S&&E&&h()}s==null||s(y)},m=function(y){var x=Pi(y.target.value,d),v=Ei(x);u(x),y.target.value=x,y.target.setAttribute("data-number",v.toString()),o==null||o(y)};b.useEffect(function(){if(a.current!==null){var y=a.current.value;if(y!==""){var x=Pi(y,d),v=Ei(x);u(x),a.current.value=x,a.current.setAttribute("data-number",v.toString());var T=new InputEvent("change",{});o==null||o(it(it({},T),{target:a.current,currentTarget:a.current}))}}},[]),b.useEffect(function(){return h()},[c]);var g=i.defaultValue?Pi(i.defaultValue,d):void 0;return b.createElement("input",it({},i,{defaultValue:g,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),hs={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},qO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Ii[s];i===void 0?r.push(s.replace(hs.dots,"\\.").replace(hs.openParenthesis,"\\(").replace(hs.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(hs.leadingBars,"\\")},ps=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return gc(o,n);var s=qO(o);return n?"^".concat(s,"$"):s},XO=function(e){return e.replace(hs.escape,"\\$&")},gc=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},Ii={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/,ag="(dd) 9dddd-dddd",lg="(dd) dddd-dddd",cg="ddd.ddd.ddd-dd",ug="dd.ddd.ddd/dddd-dd",Oi=function(e){return e.replace(/\D/g,"")},ZO=["2",/[0-3]/,":",/[0-5]/,/\d/],JO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Mt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:cg,isoDate:"dddd-dd-dd",cnpj:ug,telephone:lg,cellphone:ag,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Oi(e).length<=11?cg:ug},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=Oi(e);return t.length<11?lg:ag},time:function(e){var t=Oi(e),n=t[0];return n==="2"?ZO:JO}},Dt=function(e,t,n){var r;return n===void 0&&(n={}),it({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:ps(e,"",!0),infinity:n.infinity},n)},Et={cellTelephone:Dt(Mt.cellTelephone,"tel"),cellphone:Dt(Mt.cellphone,"tel"),cep:Dt(Mt.cep,"decimal"),cnpj:Dt(Mt.cnpj,"decimal"),color:Dt(Mt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Dt(Mt.cpf,"decimal"),cpfCnpj:Dt(Mt.cpfCnpj,"decimal",{transform:Oi}),creditCard:Dt(Mt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Dt(Mt.date,"decimal"),int:Dt(Mt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Dt(Mt.isoDate,"decimal"),telephone:Dt(Mt.telephone,"tel"),time:Dt(Mt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Dt(Mt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function dg(e,t,n,r){var o,s;r===void 0&&(r=Ii);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var fg=function(e){return e},eA=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(ps(e,n,t));return r.test(n)};function tA(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var nA=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=hc(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=mc(a),g=mc(d),y=mc(u),x=b.useRef(eA(u,s,h.value||h.defaultValue)),v=f??"input",T=pc(b.useState(""),2),S=T[0],E=T[1],I=tA(S),O=b.useCallback(function(A,N){var $,z,H=($=A??N)!==null&&$!==void 0?$:"";if(u===void 0)return H;var D=(z=H==null?void 0:H.toString())!==null&&z!==void 0?z:"";return dg(D,typeof u=="function"?u(D):u,i??fg,c??Ii)},[i,u,c]),F=pc(b.useState(function(){return O(h.value,h.defaultValue)}),2),M=F[0],_=F[1],k=O(h.defaultValue,h.defaultValue),L=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var A=u(M);return Array.isArray(A)?gc(A,s):ps(u,M,s)}return typeof u=="string"?ps(u,M,s):gc(u,s)},[l,M,s,u]);b.useEffect(function(){if(h.value!==void 0){var A=O(h.value,h.defaultValue);_(A),p.current!==null&&(p.current.value=A)}},[h.value,u,i,h.defaultValue]);var P=function(A){var N,$,z,H,D,B=A.currentTarget,X=A.target.value;if(y.current===void 0)return _(X),(N=g.current)===null||N===void 0||N.call(g,X),($=m.current)===null||$===void 0||$.call(m,A),d==null?void 0:d(X);var te=new RegExp(ps(y.current,X,s)),Q=(z=B.selectionEnd)!==null&&z!==void 0?z:0,G=function(Y,K,R){if(Y.type!=="number")return Y.setSelectionRange(K,R)};if(r&&x.current&&X.length>=M.length)return B.value=M,G(B,Q-1,Q-1);var V=!1;X.length<I.length&&(x.current=!1,V=!0),te.test(X)&&(x.current=!0);var j=Q,W=X[j-1],U=dg(X,typeof y.current=="function"?y.current(X):y.current,i??fg,c??Ii);for(B.value=U,_(U);j<U.length&&U.charAt(j-1)!==W;)j+=1;V?G(B,Q,Q):G(B,j,j),A.target.value=U,E(U),(H=g.current)===null||H===void 0||H.call(g,U),(D=m.current)===null||D===void 0||D.call(m,A)};return b.createElement(v,it({},h,{ref:p,pattern:L,onChange:P,defaultValue:hg(h.defaultValue)?k:void 0,value:hg(h.value)?O(h.value,h.value):h.value}))}),hg=function(e){return typeof e=="string"},pg=b.forwardRef(function(e,t){return zO(e.mask)?b.createElement(HO,it({},e,{mask:void 0,ref:t})):GO(e.mask)?b.createElement(YO,it({},e,{mask:void 0,ref:t})):b.createElement(nA,it({},e,{ref:t}))}),kt=function(e){return function(t){return b.createElement(pg,it({},e,t))}};kt(Et.cellTelephone),kt(Et.cellphone),kt(Et.cep),kt(Et.cnpj),kt(Et.color),kt(Et.cpf),kt(Et.cpfCnpj),kt(Et.creditCard),kt(Et.date),kt(Et.int),kt(Et.isoDate),kt(Et.telephone),kt(Et.time),kt(Et.uuid);var mg=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&jO(Et,t.mask)?Et[t.mask]:{mask:t.mask}},[t.mask]),o=it(it({},t),r);return b.createElement(pg,it({},o,{ref:n}))}),yc={},vc={exports:{}},bc={};/**
142
+ */const hu=it("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sy={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},bI={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},iy=e=>x.jsx(dt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:sy,exit:sy.false,transition:bI,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:$e("aria-hidden:pointer-events-none",e.className),children:e.children}),wI=ho("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),xI=w.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){const l=()=>o==null?void 0:o(!1);return x.jsx("div",{"data-open":!!s,"aria-hidden":!s,"data-component":"alert",className:$e("isolate w-full",s?"pointer-events-auto":"pointer-events-none"),children:x.jsx(iy,{"data-open":!!s,open:!!s,children:x.jsxs(po,{...i,ref:a,role:"alert","data-theme":n,as:i.as??"div",className:$e(wI({theme:n}),t),children:[x.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?x.jsx(ny,{size:20}):null,!r&&n==="info"?x.jsx(oy,{size:20}):null,!r&&n==="danger"?x.jsx(gI,{size:20}):null,r,x.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?x.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:x.jsx(hu,{size:20})}):null]})})})});function Fe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ze(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Oo(e,t){const n=Fe(e);return isNaN(t)?Ze(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ua(e,t){const n=Fe(e);if(isNaN(t))return Ze(e,NaN);if(!t)return n;const r=n.getDate(),o=Ze(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const ay=6048e5,TI=864e5,SI=6e4,EI=36e5,CI=1e3;let PI={};function _r(){return PI}function xn(e,t){var a,l,c,u;const n=_r(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=Fe(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function _o(e){return xn(e,{weekStartsOn:1})}function ly(e){const t=Fe(e),n=t.getFullYear(),r=Ze(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=_o(r),s=Ze(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=_o(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Do(e){const t=Fe(e);return t.setHours(0,0,0,0),t}function da(e){const t=Fe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function kI(e,t){const n=Do(e),r=Do(t),o=+n-da(n),s=+r-da(r);return Math.round((o-s)/TI)}function II(e){const t=ly(e),n=Ze(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),_o(n)}function cy(e,t){const n=t*7;return Oo(e,n)}function uy(e,t){return ua(e,t*12)}function AI(e){return Ze(e,Date.now())}function OI(e,t){const n=Do(e),r=Do(t);return+n==+r}function _I(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dy(e){if(!_I(e)&&typeof e!="number")return!1;const t=Fe(e);return!isNaN(Number(t))}function fy(e,t){const n=Fe(e.start),r=Fe(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(Fe(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function hy(e){const t=Fe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function DI(e){const t=Fe(e),n=Ze(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function MI(e,t){var a,l;const n=_r(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=Fe(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const NI={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},FI=(e,t,n)=>{let r;const o=NI[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function pu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const LI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$I={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},RI={date:pu({formats:LI,defaultWidth:"full"}),time:pu({formats:VI,defaultWidth:"full"}),dateTime:pu({formats:$I,defaultWidth:"full"})},BI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jI=(e,t,n,r)=>BI[e];function Gs(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const zI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WI={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},UI={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},GI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},YI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},qI={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Gs({values:zI,defaultWidth:"wide"}),quarter:Gs({values:HI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gs({values:WI,defaultWidth:"wide"}),day:Gs({values:UI,defaultWidth:"wide"}),dayPeriod:Gs({values:GI,defaultWidth:"wide",formattingValues:YI,defaultFormattingWidth:"wide"})};function Ys(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?ZI(a,d=>d.test(i)):KI(a,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function KI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ZI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function XI(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const QI=/^(\d+)(th|st|nd|rd)?/i,JI=/\d+/i,eA={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tA={any:[/^b/i,/^(a|c)/i]},nA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rA={any:[/1/i,/2/i,/3/i,/4/i]},oA={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},sA={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},iA={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},aA={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},lA={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},cA={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},uA={ordinalNumber:XI({matchPattern:QI,parsePattern:JI,valueCallback:e=>parseInt(e,10)}),era:Ys({matchPatterns:eA,defaultMatchWidth:"wide",parsePatterns:tA,defaultParseWidth:"any"}),quarter:Ys({matchPatterns:nA,defaultMatchWidth:"wide",parsePatterns:rA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ys({matchPatterns:oA,defaultMatchWidth:"wide",parsePatterns:sA,defaultParseWidth:"any"}),day:Ys({matchPatterns:iA,defaultMatchWidth:"wide",parsePatterns:aA,defaultParseWidth:"any"}),dayPeriod:Ys({matchPatterns:lA,defaultMatchWidth:"any",parsePatterns:cA,defaultParseWidth:"any"})},py={code:"en-US",formatDistance:FI,formatLong:RI,formatRelative:jI,localize:qI,match:uA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dA(e){const t=Fe(e);return kI(t,DI(t))+1}function my(e){const t=Fe(e),n=+_o(t)-+II(t);return Math.round(n/ay)+1}function mu(e,t){var u,d,f,h;const n=Fe(e),r=n.getFullYear(),o=_r(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ze(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=xn(i,t),l=Ze(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=xn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function fA(e,t){var a,l,c,u;const n=_r(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=mu(e,t),s=Ze(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),xn(s,t)}function gy(e,t){const n=Fe(e),r=+xn(n,t)-+fA(n,t);return Math.round(r/ay)+1}function je(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return je(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):je(n+1,2)},d(e,t){return je(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return je(e.getHours()%12||12,t.length)},H(e,t){return je(e.getHours(),t.length)},m(e,t){return je(e.getMinutes(),t.length)},s(e,t){return je(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return je(o,t.length)}},Mo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yy={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return rr.y(e,t)},Y:function(e,t,n,r){const o=mu(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return je(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):je(s,t.length)},R:function(e,t){const n=ly(e);return je(n,t.length)},u:function(e,t){const n=e.getFullYear();return je(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return je(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return je(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return je(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=gy(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):je(o,t.length)},I:function(e,t,n){const r=my(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):je(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=dA(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):je(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return je(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return je(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return je(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Mo.noon:r===0?o=Mo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Mo.evening:r>=12?o=Mo.afternoon:r>=4?o=Mo.morning:o=Mo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):je(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):je(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return by(r);case"XXXX":case"XX":return Dr(r);case"XXXXX":case"XXX":default:return Dr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return by(r);case"xxxx":case"xx":return Dr(r);case"xxxxx":case"xxx":default:return Dr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+vy(r,":");case"OOOO":default:return"GMT"+Dr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+vy(r,":");case"zzzz":default:return"GMT"+Dr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return je(r,t.length)},T:function(e,t,n){const r=e.getTime();return je(r,t.length)}};function vy(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+je(s,2)}function by(e,t){return e%60===0?(e>0?"-":"+")+je(Math.abs(e)/60,2):Dr(e,t)}function Dr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=je(Math.trunc(r/60),2),s=je(r%60,2);return n+o+t+s}const wy=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},xy=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},gu={p:xy,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return wy(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",wy(r,t)).replace("{{time}}",xy(o,t))}},hA=/^D+$/,pA=/^Y+$/,mA=["D","DD","YY","YYYY"];function Ty(e){return hA.test(e)}function Sy(e){return pA.test(e)}function yu(e,t,n){const r=gA(e,t,n);if(console.warn(r),mA.includes(e))throw new RangeError(r)}function gA(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const yA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bA=/^'([^]*?)'?$/,wA=/''/g,xA=/[a-zA-Z]/;function TA(e,t,n){var u,d,f,h;const r=_r(),o=r.locale??py,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Fe(e);if(!dy(a))throw new RangeError("Invalid time value");let l=t.match(vA).map(p=>{const m=p[0];if(m==="p"||m==="P"){const b=gu[m];return b(p,o.formatLong)}return p}).join("").match(yA).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:SA(p)};if(yy[m])return{isToken:!0,value:p};if(m.match(xA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Sy(m)||Ty(m))&&yu(m,t,String(e));const b=yy[m[0]];return b(a,m,o.localize,c)}).join("")}function SA(e){const t=e.match(bA);return t?t[1].replace(wA,"'"):e}function EA(){return Object.assign({},_r())}function CA(e){let n=Fe(e).getDay();return n===0&&(n=7),n}function PA(e,t){const n=Fe(e),r=Fe(t);return n.getTime()>r.getTime()}function kA(e,t){const n=Fe(e),r=Fe(t);return+n<+r}function IA(e,t){const n=t instanceof Date?Ze(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const AA=10;class Ey{constructor(){ie(this,"subPriority",0)}validate(t,n){return!0}}class OA extends Ey{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class _A extends Ey{constructor(){super(...arguments);ie(this,"priority",AA);ie(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:Ze(n,IA(n,Date))}}class Le{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new OA(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class DA extends Le{constructor(){super(...arguments);ie(this,"priority",140);ie(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const ft={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Tn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ht(e,t){return e&&{value:t(e.value),rest:e.rest}}function tt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Sn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*EI+s*SI+i*CI),rest:t.slice(n[0].length)}}function Cy(e){return tt(ft.anyDigitsSigned,e)}function at(e,t){switch(e){case 1:return tt(ft.singleDigit,t);case 2:return tt(ft.twoDigits,t);case 3:return tt(ft.threeDigits,t);case 4:return tt(ft.fourDigits,t);default:return tt(new RegExp("^\\d{1,"+e+"}"),t)}}function fa(e,t){switch(e){case 1:return tt(ft.singleDigitSigned,t);case 2:return tt(ft.twoDigitsSigned,t);case 3:return tt(ft.threeDigitsSigned,t);case 4:return tt(ft.fourDigitsSigned,t);default:return tt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function vu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Py(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function ky(e){return e%400===0||e%4===0&&e%100!==0}class MA extends Le{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return ht(at(4,n),s);case"yo":return ht(o.ordinalNumber(n,{unit:"year"}),s);default:return ht(at(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=Py(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class NA extends Le{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ht(at(4,n),s);case"Yo":return ht(o.ordinalNumber(n,{unit:"year"}),s);default:return ht(at(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=mu(n,s);if(o.isTwoDigitYear){const l=Py(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),xn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),xn(n,s)}}class FA extends Le{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return fa(r==="R"?4:r.length,n)}set(n,r,o){const s=Ze(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),_o(s)}}class LA extends Le{constructor(){super(...arguments);ie(this,"priority",130);ie(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return fa(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class VA extends Le{constructor(){super(...arguments);ie(this,"priority",120);ie(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return at(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class $A extends Le{constructor(){super(...arguments);ie(this,"priority",120);ie(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return at(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class RA extends Le{constructor(){super(...arguments);ie(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ie(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return ht(tt(ft.month,n),s);case"MM":return ht(at(2,n),s);case"Mo":return ht(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class BA extends Le{constructor(){super(...arguments);ie(this,"priority",110);ie(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return ht(tt(ft.month,n),s);case"LL":return ht(at(2,n),s);case"Lo":return ht(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function jA(e,t,n){const r=Fe(e),o=gy(r,n)-t;return r.setDate(r.getDate()-o*7),r}class zA extends Le{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return tt(ft.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return at(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return xn(jA(n,o,s),s)}}function HA(e,t){const n=Fe(e),r=my(n)-t;return n.setDate(n.getDate()-r*7),n}class WA extends Le{constructor(){super(...arguments);ie(this,"priority",100);ie(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return tt(ft.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return at(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return _o(HA(n,o))}}const UA=[31,28,31,30,31,30,31,31,30,31,30,31],GA=[31,29,31,30,31,30,31,31,30,31,30,31];class YA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subPriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return tt(ft.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return at(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=ky(o),i=n.getMonth();return s?r>=1&&r<=GA[i]:r>=1&&r<=UA[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class qA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"subpriority",1);ie(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return tt(ft.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return at(r.length,n)}}validate(n,r){const o=n.getFullYear();return ky(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function bu(e,t,n){var d,f,h,p;const r=_r(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=Fe(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return Oo(s,u)}class KA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=bu(n,o,s),n.setHours(0,0,0,0),n}}class ZA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return ht(at(r.length,n),i);case"eo":return ht(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=bu(n,o,s),n.setHours(0,0,0,0),n}}class XA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return ht(at(r.length,n),i);case"co":return ht(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=bu(n,o,s),n.setHours(0,0,0,0),n}}function QA(e,t){const n=Fe(e),r=CA(n),o=t-r;return Oo(n,o)}class JA extends Le{constructor(){super(...arguments);ie(this,"priority",90);ie(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return at(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ht(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return ht(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ht(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ht(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=QA(n,o),n.setHours(0,0,0,0),n}}class eO extends Le{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(vu(o),0,0,0),n}}class tO extends Le{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(vu(o),0,0,0),n}}class nO extends Le{constructor(){super(...arguments);ie(this,"priority",80);ie(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(vu(o),0,0,0),n}}class rO extends Le{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return tt(ft.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return at(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class oO extends Le{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return tt(ft.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class sO extends Le{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return tt(ft.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class iO extends Le{constructor(){super(...arguments);ie(this,"priority",70);ie(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return tt(ft.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return at(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class aO extends Le{constructor(){super(...arguments);ie(this,"priority",60);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return tt(ft.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class lO extends Le{constructor(){super(...arguments);ie(this,"priority",50);ie(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return tt(ft.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return at(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class cO extends Le{constructor(){super(...arguments);ie(this,"priority",30);ie(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return ht(at(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class uO extends Le{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Sn(Tn.basicOptionalMinutes,n);case"XX":return Sn(Tn.basic,n);case"XXXX":return Sn(Tn.basicOptionalSeconds,n);case"XXXXX":return Sn(Tn.extendedOptionalSeconds,n);case"XXX":default:return Sn(Tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ze(n,n.getTime()-da(n)-o)}}class dO extends Le{constructor(){super(...arguments);ie(this,"priority",10);ie(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Sn(Tn.basicOptionalMinutes,n);case"xx":return Sn(Tn.basic,n);case"xxxx":return Sn(Tn.basicOptionalSeconds,n);case"xxxxx":return Sn(Tn.extendedOptionalSeconds,n);case"xxx":default:return Sn(Tn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:Ze(n,n.getTime()-da(n)-o)}}class fO extends Le{constructor(){super(...arguments);ie(this,"priority",40);ie(this,"incompatibleTokens","*")}parse(n){return Cy(n)}set(n,r,o){return[Ze(n,o*1e3),{timestampIsSet:!0}]}}class hO extends Le{constructor(){super(...arguments);ie(this,"priority",20);ie(this,"incompatibleTokens","*")}parse(n){return Cy(n)}set(n,r,o){return[Ze(n,o),{timestampIsSet:!0}]}}const pO={G:new DA,y:new MA,Y:new NA,R:new FA,u:new LA,Q:new VA,q:new $A,M:new RA,L:new BA,w:new zA,I:new WA,d:new YA,D:new qA,E:new KA,e:new ZA,c:new XA,i:new JA,a:new eO,b:new tO,B:new nO,h:new rO,H:new oO,K:new sO,k:new iO,m:new aO,s:new lO,S:new cO,X:new uO,x:new dO,t:new fO,T:new hO},mO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yO=/^'([^]*?)'?$/,vO=/''/g,bO=/\S/,wO=/[a-zA-Z]/;function xO(e,t,n,r){var m,b,v,y;const o=EA(),s=o.locale??py,i=o.firstWeekContainsDate??((b=(m=o.locale)==null?void 0:m.options)==null?void 0:b.firstWeekContainsDate)??1,a=o.weekStartsOn??((y=(v=o.locale)==null?void 0:v.options)==null?void 0:y.weekStartsOn)??0;if(t==="")return e===""?Fe(n):Ze(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new _A],u=t.match(gO).map(g=>{const S=g[0];if(S in gu){const T=gu[S];return T(g,s.formatLong)}return g}).join("").match(mO),d=[];for(let g of u){Sy(g)&&yu(g,t,e),Ty(g)&&yu(g,t,e);const S=g[0],T=pO[S];if(T){const{incompatibleTokens:E}=T;if(Array.isArray(E)){const I=d.find(A=>E.includes(A.token)||A.token===S);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${g}\` at the same time`)}else if(T.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);d.push({token:S,fullToken:g});const C=T.run(e,g,s.match,l);if(!C)return Ze(n,NaN);c.push(C.setter),e=C.rest}else{if(S.match(wO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(g==="''"?g="'":S==="'"&&(g=TO(g)),e.indexOf(g)===0)e=e.slice(g.length);else return Ze(n,NaN)}}if(e.length>0&&bO.test(e))return Ze(n,NaN);const f=c.map(g=>g.priority).sort((g,S)=>S-g).filter((g,S,T)=>T.indexOf(g)===S).map(g=>c.filter(S=>S.priority===g).sort((S,T)=>T.subPriority-S.subPriority)).map(g=>g[0]);let h=Fe(n);if(isNaN(h.getTime()))return Ze(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return Ze(n,NaN);const S=g.set(h,p,l);Array.isArray(S)?(h=S[0],Object.assign(p,S[1])):h=S}return Ze(n,h)}function TO(e){return e.match(yO)[1].replace(vO,"'")}function SO(e,t){const n=Fe(e),r=Fe(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function EO(e){return OI(e,AI(e))}function CO(e,t){return Oo(e,-t)}function Iy(e,t){return ua(e,-t)}function PO(e,t){return cy(e,-t)}function kO(e,t){return uy(e,-t)}var pt=function(){return pt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pt.apply(this,arguments)};function wu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function xu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var qs=function(e){return e.replace(new RegExp(" ","g")," ")},Ay=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},IO=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Oy=function(e,t,n){var r=e.length-2,o=IO(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},_y=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ha=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},AO=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Tu=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},OO=function(e){return e==="money"||e==="currency"},_O=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return pt(pt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},pa=function(e,t){var n=Ay(_y(e),t.fraction.length),r="".concat(t.currency).concat(Oy(n,t.group,t.decimal));return qs(r)},DO=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=wu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var d=w.useMemo(function(){var p=_O(r,s,a);return p.currency=qs("".concat(p.currency.trim()," ")),p.literal=qs(p.literal.trim()),p},[r,s]),f=function(p){var m=pa(p.target.value,d),b=ha(m);p.target.value=m,p.target.setAttribute("data-number",b.toString()),l==null||l(p),b!==0&&(u.current.selectionEnd=m.length)};w.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=pa(p,d),b=ha(m);u.current.value=m,u.current.setAttribute("data-number",b.toString());var v=new InputEvent("change",{});l==null||l(pt(pt({},v),{target:u.current,currentTarget:u.current})),b!==0&&(u.current.selectionEnd=m.length)}}},[d]);var h=c.defaultValue?pa(c.defaultValue,d):void 0;return w.createElement("input",pt({},c,{value:typeof c.value=="string"?pa(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),MO=1,NO=function(e){return e==="percentage"||e==="percent"||e==="percentual"},FO=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return pt(pt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},ma=function(e,t){var n=Ay(_y(e),t.fraction.length),r="".concat(Oy(n,t.group,t.decimal)," ").concat(t.percentSign);return qs(r)},LO=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=wu(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=xu(w.useState(function(){var v,y;return(y=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&y!==void 0?y:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var v,y=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(ma(y,d))},[i.value]);var d=w.useMemo(function(){var v=FO(r);return v.percentSign=qs("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-MO,h=function(v){var y,g=a.current;g&&(g.setSelectionRange(f,f),v&&((y=i.onFocus)===null||y===void 0||y.call(i,v)))},p=function(v){var y=v.currentTarget;if(y.selectionStart!==null){var g=y.selectionStart,S=y.selectionEnd,T=g!==S,E=f<g;!T&&E&&h()}s==null||s(v)},m=function(v){var y=ma(v.target.value,d),g=ha(y);u(y),v.target.value=y,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};w.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var y=ma(v,d),g=ha(y);u(y),a.current.value=y,a.current.setAttribute("data-number",g.toString());var S=new InputEvent("change",{});o==null||o(pt(pt({},S),{target:a.current,currentTarget:a.current}))}}},[]),w.useEffect(function(){return h()},[c]);var b=i.defaultValue?ma(i.defaultValue,d):void 0;return w.createElement("input",pt({},i,{defaultValue:b,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Ks={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},VO=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=ga[s];i===void 0?r.push(s.replace(Ks.dots,"\\.").replace(Ks.openParenthesis,"\\(").replace(Ks.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Ks.leadingBars,"\\")},Zs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Su(o,n);var s=VO(o);return n?"^".concat(s,"$"):s},$O=function(e){return e.replace(Ks.escape,"\\$&")},Su=function(e,t){var n=e.map(function(r){return typeof r=="string"?$O(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ga={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},RO=/\d/,Dy="(dd) 9dddd-dddd",My="(dd) dddd-dddd",Ny="ddd.ddd.ddd-dd",Fy="dd.ddd.ddd/dddd-dd",ya=function(e){return e.replace(/\D/g,"")},BO=["2",/[0-3]/,":",/[0-5]/,/\d/],jO=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Wt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ny,isoDate:"dddd-dd-dd",cnpj:Fy,telephone:My,cellphone:Dy,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return ya(e).length<=11?Ny:Fy},int:function(e){return e===void 0&&(e=""),RO.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=ya(e);return t.length<11?My:Dy},time:function(e){var t=ya(e),n=t[0];return n==="2"?BO:jO}},Ut=function(e,t,n){var r;return n===void 0&&(n={}),pt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Zs(e,"",!0),infinity:n.infinity},n)},Mt={cellTelephone:Ut(Wt.cellTelephone,"tel"),cellphone:Ut(Wt.cellphone,"tel"),cep:Ut(Wt.cep,"decimal"),cnpj:Ut(Wt.cnpj,"decimal"),color:Ut(Wt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:Ut(Wt.cpf,"decimal"),cpfCnpj:Ut(Wt.cpfCnpj,"decimal",{transform:ya}),creditCard:Ut(Wt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:Ut(Wt.date,"decimal"),int:Ut(Wt.int,"decimal",{pattern:"[0-9]+"}),isoDate:Ut(Wt.isoDate,"decimal"),telephone:Ut(Wt.telephone,"tel"),time:Ut(Wt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:Ut(Wt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Ly(e,t,n,r){var o,s;r===void 0&&(r=ga);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var Vy=function(e){return e},zO=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Zs(e,n,t));return r.test(n)};function HO(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var WO=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=wu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=Tu(a),b=Tu(d),v=Tu(u),y=w.useRef(zO(u,s,h.value||h.defaultValue)),g=f??"input",S=xu(w.useState(""),2),T=S[0],E=S[1],C=HO(T),I=w.useCallback(function(N,L){var V,B,W=(V=N??L)!==null&&V!==void 0?V:"";if(u===void 0)return W;var D=(B=W==null?void 0:W.toString())!==null&&B!==void 0?B:"";return Ly(D,typeof u=="function"?u(D):u,i??Vy,c??ga)},[i,u,c]),A=xu(w.useState(function(){return I(h.value,h.defaultValue)}),2),O=A[0],M=A[1],_=I(h.defaultValue,h.defaultValue),F=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(O);return Array.isArray(N)?Su(N,s):Zs(u,O,s)}return typeof u=="string"?Zs(u,O,s):Su(u,s)},[l,O,s,u]);w.useEffect(function(){if(h.value!==void 0){var N=I(h.value,h.defaultValue);M(N),p.current!==null&&(p.current.value=N)}},[h.value,u,i,h.defaultValue]);var P=function(N){var L,V,B,W,D,j=N.currentTarget,K=N.target.value;if(v.current===void 0)return M(K),(L=b.current)===null||L===void 0||L.call(b,K),(V=m.current)===null||V===void 0||V.call(m,N),d==null?void 0:d(K);var J=new RegExp(Zs(v.current,K,s)),X=(B=j.selectionEnd)!==null&&B!==void 0?B:0,G=function(Y,ce,R){if(Y.type!=="number")return Y.setSelectionRange(ce,R)};if(r&&y.current&&K.length>=O.length)return j.value=O,G(j,X-1,X-1);var $=!1;K.length<C.length&&(y.current=!1,$=!0),J.test(K)&&(y.current=!0);var z=X,H=K[z-1],U=Ly(K,typeof v.current=="function"?v.current(K):v.current,i??Vy,c??ga);for(j.value=U,M(U);z<U.length&&U.charAt(z-1)!==H;)z+=1;$?G(j,X,X):G(j,z,z),N.target.value=U,E(U),(W=b.current)===null||W===void 0||W.call(b,U),(D=m.current)===null||D===void 0||D.call(m,N)};return w.createElement(g,pt({},h,{ref:p,pattern:F,onChange:P,defaultValue:$y(h.defaultValue)?_:void 0,value:$y(h.value)?I(h.value,h.value):h.value}))}),$y=function(e){return typeof e=="string"},Ry=w.forwardRef(function(e,t){return OO(e.mask)?w.createElement(DO,pt({},e,{mask:void 0,ref:t})):NO(e.mask)?w.createElement(LO,pt({},e,{mask:void 0,ref:t})):w.createElement(WO,pt({},e,{ref:t}))}),Gt=function(e){return function(t){return w.createElement(Ry,pt({},e,t))}};Gt(Mt.cellTelephone),Gt(Mt.cellphone),Gt(Mt.cep),Gt(Mt.cnpj),Gt(Mt.color),Gt(Mt.cpf),Gt(Mt.cpfCnpj),Gt(Mt.creditCard),Gt(Mt.date),Gt(Mt.int),Gt(Mt.isoDate),Gt(Mt.telephone),Gt(Mt.time),Gt(Mt.uuid);var By=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&AO(Mt,t.mask)?Mt[t.mask]:{mask:t.mask}},[t.mask]),o=pt(pt({},t),r);return w.createElement(Ry,pt({},o,{ref:n}))}),Eu={},Cu={exports:{}},Pu={};/**
143
143
  * @license React
144
144
  * use-sync-external-store-shim.production.min.js
145
145
  *
@@ -147,7 +147,7 @@
147
147
  *
148
148
  * This source code is licensed under the MIT license found in the
149
149
  * LICENSE file in the root directory of this source tree.
150
- */var gg;function rA(){if(gg)return bc;gg=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,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,g=p[1];return s(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]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return bc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,bc}var yg={};/**
150
+ */var jy;function UO(){if(jy)return Pu;jy=1;var e=w;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,b=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&b({inst:m})},[d,h,f]),o(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Pu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Pu}var zy={};/**
151
151
  * @license React
152
152
  * use-sync-external-store-shim.development.js
153
153
  *
@@ -155,7 +155,7 @@
155
155
  *
156
156
  * This source code is licensed under the MIT license found in the
157
157
  * LICENSE file in the root directory of this source tree.
158
- */var vg;function oA(){return vg||(vg=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(v){{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",v,S)}}function r(v,T,S){{var E=t.ReactDebugCurrentFrame,I=E.getStackAddendum();I!==""&&(T+="%s",S=S.concat([I]));var O=S.map(function(F){return String(F)});O.unshift("Warning: "+T),Function.prototype.apply.call(console[v],console,O)}}function o(v,T){return v===T&&(v!==0||1/v===1/T)||v!==v&&T!==T}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(v,T,S){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=T();if(!d){var I=T();s(E,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var O=i({inst:{value:E,getSnapshot:T}}),F=O[0].inst,M=O[1];return l(function(){F.value=E,F.getSnapshot=T,h(F)&&M({inst:F})},[v,E,T]),a(function(){h(F)&&M({inst:F});var _=function(){h(F)&&M({inst:F})};return v(_)},[v]),c(E),E}function h(v){var T=v.getSnapshot,S=v.value;try{var E=T();return!s(S,E)}catch{return!0}}function p(v,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!m,y=g?p:f,x=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;yg.useSyncExternalStore=x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),yg}var bg;function wg(){return bg||(bg=1,process.env.NODE_ENV==="production"?vc.exports=rA():vc.exports=oA()),vc.exports}/**
158
+ */var Hy;function GO(){return Hy||(Hy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var S=arguments.length,T=new Array(S>1?S-1:0),E=1;E<S;E++)T[E-1]=arguments[E];r("error",g,T)}}function r(g,S,T){{var E=t.ReactDebugCurrentFrame,C=E.getStackAddendum();C!==""&&(S+="%s",T=T.concat([C]));var I=T.map(function(A){return String(A)});I.unshift("Warning: "+S),Function.prototype.apply.call(console[g],console,I)}}function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&S!==S}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(g,S,T){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=S();if(!d){var C=S();s(E,C)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var I=i({inst:{value:E,getSnapshot:S}}),A=I[0].inst,O=I[1];return l(function(){A.value=E,A.getSnapshot=S,h(A)&&O({inst:A})},[g,E,S]),a(function(){h(A)&&O({inst:A});var M=function(){h(A)&&O({inst:A})};return g(M)},[g]),c(E),E}function h(g){var S=g.getSnapshot,T=g.value;try{var E=S();return!s(T,E)}catch{return!0}}function p(g,S,T){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b=!m,v=b?p:f,y=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;zy.useSyncExternalStore=y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),zy}var Wy;function Uy(){return Wy||(Wy=1,process.env.NODE_ENV==="production"?Cu.exports=UO():Cu.exports=GO()),Cu.exports}/**
159
159
  * @license React
160
160
  * use-sync-external-store-shim/with-selector.production.min.js
161
161
  *
@@ -163,7 +163,7 @@
163
163
  *
164
164
  * This source code is licensed under the MIT license found in the
165
165
  * LICENSE file in the root directory of this source tree.
166
- */var xg;function sA(){if(xg)return yc;xg=1;var e=b,t=wg();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return yc.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(E){if(!x){if(x=!0,v=E,E=f(E),h!==void 0&&m.hasValue){var I=m.value;if(h(I,E))return T=I}return T=E}if(I=T,r(v,E))return I;var O=f(E);return h!==void 0&&h(I,O)?I:(v=E,T=O)}var x=!1,v,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 g=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},yc}var Tg={};/**
166
+ */var Gy;function YO(){if(Gy)return Eu;Gy=1;var e=w,t=Uy();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Eu.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!y){if(y=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var C=m.value;if(h(C,E))return S=C}return S=E}if(C=S,r(g,E))return C;var I=f(E);return h!==void 0&&h(C,I)?C:(g=E,S=I)}var y=!1,g,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 b=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},Eu}var Yy={};/**
167
167
  * @license React
168
168
  * use-sync-external-store-shim/with-selector.development.js
169
169
  *
@@ -171,35 +171,32 @@
171
171
  *
172
172
  * This source code is licensed under the MIT license found in the
173
173
  * LICENSE file in the root directory of this source tree.
174
- */var Sg;function iA(){return Sg||(Sg=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=wg();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),g;m.current===null?(g={hasValue:!1,value:null},m.current=g):g=m.current;var y=a(function(){var S=!1,E,I,O=function(k){if(!S){S=!0,E=k;var L=h(k);if(p!==void 0&&g.hasValue){var P=g.value;if(p(P,L))return I=P,P}return I=L,L}var A=E,N=I;if(r(A,k))return N;var $=h(k);return p!==void 0&&p(N,$)?N:(E=k,I=$,$)},F=f===void 0?null:f,M=function(){return O(d())},_=F===null?void 0:function(){return O(F())};return[M,_]},[d,f,h,p]),x=y[0],v=y[1],T=o(u,x,v);return i(function(){g.hasValue=!0,g.value=T},[T]),l(T),T}Tg.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Tg}process.env.NODE_ENV==="production"?sA():iA();const ao=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},aA=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},lA=e=>Object.entries(e),Eg=e=>e instanceof Promise,Cg=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),cA=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>Cg(u,f,s,d));return Eg(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))},uA=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>Cg(c,u,s,o.current));return Eg(a)?a.then(c=>l(c)):l(a)},wc=(e,t,n)=>{const[r,o]=b.useState(()=>e),s=ao(r),i=ao((n==null?void 0:n.props)??{}),a=ao(t),l=ao((n==null?void 0:n.postMiddleware)??[]),c=ao((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=aA(r),f=ao(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=()=>i.current,g=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return lA(g).reduce((y,[x,v])=>({...y,[x]:n!=null&&n.debug?cA(x,v,o,m,h,c.current):uA(x,v,o,m,h,c.current)}),{})});return[r,p,i.current]},dA=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function fA(e,t){return b.useRef(dA(e,t)).current}const Ai={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>)`},lo=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(lo(i,t,n,a))},[]),Pg=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:Pg(i,t,n,a)}},{}),Ig={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},xc=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},hA={default:e=>xc(e,{result:Ig.default}),dark:e=>xc(e,{result:Ig.dark})},pA=(e,t)=>{const n=(a,l,c)=>({key:`--${c}`,value:`${a}`}),r=lo(e.colors,n),o=lo(e.spacing,n),s=lo(e.rounded,n),i=e.custom?lo(e.custom,n):[];return xc(r.concat(o,s,i),{result:a=>`html${t?`.${t}`:""} {${a}}`,value:(a,l)=>l.replace("hsla(","").replace(")","")})},Og={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},Ag={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},mA={name:"dark",rounded:Og,spacing:Ag,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{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:{header:"hsla(0, 0%, 12%)",background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},gA={name:"light",rounded:Og,spacing:Ag,shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},yA=mA,vA=gA,Tc={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>w.jsxs(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",calendarToday:"Today"},Mi=b.createContext({colorTokenParser:Ai.hsla,translations:Tc,locale:void 0}),bA=e=>{const t=b.useMemo(()=>({locale:e.locale,translations:{...Tc,...e.map},colorTokenParser:e.parser||Ai.hsla}),[e]);return w.jsx(Mi.Provider,{value:t,children:e.children})},Mg=()=>{const e=b.useContext(Mi);if(e)return e.locale},bt=()=>{const e=b.useContext(Mi);return e?e.translations:Tc},wA=()=>{const e=b.useContext(Mi);return e?e.colorTokenParser:Ai.hsla},Wt=(e,t=2)=>e.toString(16).padStart(t,"0"),ms=()=>{const e=Date.now(),t=e/1e3&4095|28672,n=e%1e3,r=new Uint8Array(10);for(let o=0;o<r.length;o++)r[o]=Math.floor(Math.random()*256);return r[0]=r[0]&63|128,`${Wt(t,4)+Wt(n,3)}-${Wt(r[0])+Wt(r[1])}-${Wt(r[2])+Wt(r[3])}-${Wt(r[4])+Wt(r[5])}-${Wt(r[6])+Wt(r[7])+Wt(r[8])+Wt(r[9])}`},Dg=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),kg={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Sc=(e,t)=>{const n=Dg(t,kg.basic,e)||Dg(t,kg.extend,e);return n===void 0||n===e?void 0:n},Di=()=>typeof window>"u",gs=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Fg=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},xA={type:"spring",bounce:.3,duration:.6},Ng=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),Lg={middle:{x:"0%",opacity:1},enter:Ng(1),exit:Ng(-1)},_g={exit:{visibility:"hidden"}},TA=e=>{const t=on(zm(e));return jm({start:t,end:ro(t,41)})},Vg=(e,t)=>e.toLocaleDateString(t,{month:"long"}),SA=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=zm(new Date(1970,o,1).setMonth(o)),i=Vg(s,n);return w.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),Ec={ArrowLeft:(e,t)=>t==="days"?VO(e,1):rg(e,1),ArrowRight:(e,t)=>t==="days"?ro(e,1):xi(e,1),ArrowUp:(e,t)=>t==="days"?$O(e,1):BO(e,1),ArrowDown:(e,t)=>t==="days"?$m(e,1):Bm(e,1)},$g=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},pr=e=>e.getFullYear().toString().padStart(4,"0"),EA=(e,t,n)=>e===void 0||n===void 0?!1:$I(t,e)&&BI(t,n),CA=e=>{var n;const t=bt();return w.jsx(pt.tbody,{layout:!0,variants:Lg,custom:e.direction,onKeyDown:e.onKeyDown,className:Me((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var s;return w.jsx("tr",{className:(s=e.styles)==null?void 0:s.week,children:r.map(i=>{var h,p,m,g,y,x,v,T,S,E,I,O,F,M;const a=i.toISOString(),l=e.rangeMode?a===((p=(h=e.range)==null?void 0:h.to)==null?void 0:p.toISOString())||a===((g=(m=e.range)==null?void 0:m.from)==null?void 0:g.toISOString()):a===((y=e.date)==null?void 0:y.toISOString()),c=_O(i)&&e.markToday,u=((x=e.disabledDate)==null?void 0:x.call(e,i))||!1,d=!LO(i,e.stateDate)||u,f=e.rangeMode?EA((v=e.range)==null?void 0:v.from,i,(T=e.range)==null?void 0:T.to):!1;return w.jsxs("td",{align:"center",className:Me("relative",(S=e.styles)==null?void 0:S.dayFrame),children:[w.jsxs("button",{type:"button","data-date":a,disabled:u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Me(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${d?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,f&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((I=e.stateRange.from)==null?void 0:I.toISOString())===a?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((O=e.labelRange)==null?void 0:O.from)??t.calendarFromDate})}):null,l&&((F=e.stateRange.to)==null?void 0:F.toISOString())===a?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs text-foreground",children:((M=e.labelRange)==null?void 0:M.to)??t.calendarToDate})}):null]}),e.RenderOnDay?w.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},Bg=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...f})=>{const h=b.useRef(ms()),p=bt(),m=b.useRef(null),{date:g,range:y}=f,x=g||new Date,v=b.useRef(null),[T,S]=wc({date:x,isAnimating:!1,year:pr(x),direction:void 0,range:{from:y==null?void 0:y.from,to:y==null?void 0:y.to},months:SA(h.current,x,o),selectMode:l?"from":void 0,week:jm({start:on(x),end:UP(x)})},_=>({onChangeYear:k=>({year:k}),setToday:()=>({date:so(new Date)}),onExitComplete:()=>($g(v.current||null,m,_.state().date,200),v.current=null,{isAnimating:!1}),date:k=>{const L=k(_.state().date);return{date:L,year:pr(L)}},nextMonth:k=>{v.current=k.currentTarget;const L=_.state();if(L.isAnimating)return L;const P=xi(L.date,1);return{date:P,isAnimating:!0,direction:1,year:pr(P)}},previousMonth:k=>{v.current=k.currentTarget;const L=_.state();if(L.isAnimating)return L;const P=rg(L.date,1);return{date:P,isAnimating:!0,direction:-1,year:pr(P)}},onSelectDate:k=>{const L=_.state(),P=k.currentTarget.dataset.range==="true",A=k.currentTarget.dataset.date||"",N=new Date(A);return{date:N,year:pr(N),selectMode:L.selectMode===void 0?void 0:L.selectMode==="from"?"to":"from",range:P?{from:L.selectMode==="from"?N:L.range.from,to:L.selectMode==="to"?N:L.range.to}:L.range}},onChangeMonth:k=>{const L=k.target.value,A=Array.from(k.target.options).find($=>$.value===L),N=_.state();if(A){const $=A.dataset.index||"",z=new Date(_.state().date);return z.setMonth(+$),{...N,date:z,year:pr(z)}}return N},onKeyDown:k=>{const L=k.key,P=_.state();if(L in Ec){(L==="ArrowUp"||L==="ArrowDown")&&k.preventDefault();const A=_.state().date,N=bn.keyof(Ec,L)?Ec[L](A,k.shiftKey?"month":"days"):null;if(N!==null)return $g(k.target,m,N),{...P,date:N,year:pr(N)}}return _.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(_,k,L)=>{var A,N;return(L.method==="onChangeMonth"||L.method==="previousMonth"||L.method==="nextMonth")&&((N=(A=L.props).onChangeMonth)==null||N.call(A,_.date)),_},(_,k,L)=>{var A,N;return L.method==="onChangeYear"&&((N=(A=L.props).onChangeYear)==null||N.call(A,_.date)),_},(_,k,L)=>{const P=L.method==="onSelectDate"||L.method==="setToday"||L.method==="onKeyDown";return l&&P&&t?(c==null||c(_.range),_):(P&&t&&(c==null||c(_.date)),_)}]}),E=Fg(TA(T.date),7),I=T.date.toISOString(),O=Vg(T.date,o);b.useEffect(()=>{t||c==null||c(T.date)},[I]);const F=fA(_=>{S.date(k=>{const L=new Date(k);return L.setFullYear(+_),L})},1200),M=_=>{const k=_.currentTarget.value;S.onChangeYear(k),a==null||a(new Date(k)),F(k)};return w.jsx(MC,{transition:xA,children:w.jsxs("div",{"data-component":"calendar",ref:m,className:Me("relative overflow-hidden",u==null?void 0:u.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(to,{initial:!1,mode:"popLayout",custom:T.direction,onExitComplete:S.onExitComplete,children:w.jsxs(pt.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(pt.button,{layout:!0,"data-focustrap":"prev",variants:_g,onClick:S.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(TP,{className:"h-4 w-4"})}),w.jsx(pt.span,{layout:!0,variants:Lg,custom:T.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:`${O.length}ch`},value:O,onChange:S.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:T.months}),w.jsx(mg,{mask:"int",value:T.year,maxLength:4,placeholder:"YYYY",onChange:M,style:{width:`${T.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(pt.button,{layout:!0,"data-focustrap":"next",variants:_g,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:S.nextMonth,children:w.jsx(oc,{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(pt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:T.week.map(_=>w.jsx("th",{className:Me("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:_.toLocaleDateString(o,{weekday:"short"})},_.toString()))})}),w.jsx(CA,{stateRange:T.range,stateDate:T.date,disabledDate:r,markRange:d,zip:E,range:y,styles:u,dispatch:S,date:g||null,markToday:s,rangeMode:l,labelRange:n,RenderOnDay:e,direction:T.direction,onKeyDown:S.onKeyDown})]})]},O)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:S.setToday,children:p.calendarToday})})]})})},Rg=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>w.jsxs(zr,{...a,as:r,"data-componen":"card",className:Me("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?w.jsx("header",{className:Me("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,w.jsx("div",{className:Me("min-w-full px-8",i),children:e})]}),jg=e=>{const t=e.Icon??km,n=bt();return w.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[w.jsx(t,{size:64,className:"text-disabled"}),w.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function Lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function PA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function zg(...e){return t=>e.forEach(n=>PA(n,t))}function mr(...e){return C.useCallback(zg(...e),e)}function Wg(e,t=[]){let n=[];function r(s,i){const a=C.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...p}=d,m=(f==null?void 0:f[e][l])||a,g=C.useMemo(()=>p,Object.values(p));return w.jsx(m.Provider,{value:g,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,p=C.useContext(h);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>C.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return C.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,IA(o,...t)]}function IA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var co=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),s=o.find(AA);if(s){const i=s.props.children,a=o.map(l=>l===s?C.Children.count(i)>1?C.Children.only(null):C.isValidElement(i)?i.props.children:null:l);return w.jsx(Cc,{...r,ref:t,children:C.isValidElement(i)?C.cloneElement(i,void 0,a):null})}return w.jsx(Cc,{...r,ref:t,children:n})});co.displayName="Slot";var Cc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=DA(n);return C.cloneElement(n,{...MA(r,n.props),ref:t?zg(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});Cc.displayName="SlotClone";var OA=({children:e})=>w.jsx(w.Fragment,{children:e});function AA(e){return C.isValidElement(e)&&e.type===OA}function MA(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function DA(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kA(e){const t=e+"CollectionProvider",[n,r]=Wg(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,g=b.useRef(null),y=b.useRef(new Map).current;return w.jsx(o,{scope:p,itemMap:y,collectionRef:g,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=b.forwardRef((h,p)=>{const{scope:m,children:g}=h,y=s(a,m),x=mr(p,y.collectionRef);return w.jsx(co,{ref:x,children:g})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=b.forwardRef((h,p)=>{const{scope:m,children:g,...y}=h,x=b.useRef(null),v=mr(p,x),T=s(c,m);return b.useEffect(()=>(T.itemMap.set(x,{ref:x,...y}),()=>void T.itemMap.delete(x))),w.jsx(co,{[u]:"",ref:v,children:g})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return b.useCallback(()=>{const g=p.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((T,S)=>y.indexOf(T.ref.current)-y.indexOf(S.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var FA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ln=FA.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?co:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Hg(e,t){e&&Bo.flushSync(()=>e.dispatchEvent(t))}function En(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function NA(e,t=globalThis==null?void 0:globalThis.document){const n=En(e);C.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var LA="DismissableLayer",Pc="dismissableLayer.update",_A="dismissableLayer.pointerDownOutside",VA="dismissableLayer.focusOutside",Ug,Gg=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kg=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=C.useContext(Gg),[u,d]=C.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=C.useState({}),p=mr(t,I=>d(I)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),x=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,T=x>=y,S=BA(I=>{const O=I.target,F=[...c.branches].some(M=>M.contains(O));!T||F||(o==null||o(I),i==null||i(I),I.defaultPrevented||a==null||a())},f),E=RA(I=>{const O=I.target;[...c.branches].some(M=>M.contains(O))||(s==null||s(I),i==null||i(I),I.defaultPrevented||a==null||a())},f);return NA(I=>{x===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},f),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ug=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),qg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ug)}},[u,f,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),qg())},[u,c]),C.useEffect(()=>{const I=()=>h({});return document.addEventListener(Pc,I),()=>document.removeEventListener(Pc,I)},[]),w.jsx(ln.div,{...l,ref:p,style:{pointerEvents:v?T?"auto":"none":void 0,...e.style},onFocusCapture:Lt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Lt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Lt(e.onPointerDownCapture,S.onPointerDownCapture)})});Kg.displayName=LA;var $A="DismissableLayerBranch",Yg=C.forwardRef((e,t)=>{const n=C.useContext(Gg),r=C.useRef(null),o=mr(t,r);return C.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(ln.div,{...e,ref:o})});Yg.displayName=$A;function BA(e,t=globalThis==null?void 0:globalThis.document){const n=En(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Xg(_A,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function RA(e,t=globalThis==null?void 0:globalThis.document){const n=En(e),r=C.useRef(!1);return C.useEffect(()=>{const o=s=>{s.target&&!r.current&&Xg(VA,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qg(){const e=new CustomEvent(Pc);document.dispatchEvent(e)}function Xg(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Hg(o,s):o.dispatchEvent(s)}var jA=Kg,zA=Yg,ki=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},WA="Portal",Qg=C.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=C.useState(!1);ki(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?$o.createPortal(w.jsx(ln.div,{...r,ref:t}),i):null});Qg.displayName=WA;function HA(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var Zg=e=>{const{present:t,children:n}=e,r=UA(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),s=mr(r.ref,GA(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:s}):null};Zg.displayName="Presence";function UA(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),s=C.useRef("none"),i=e?"mounted":"unmounted",[a,l]=HA(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=Fi(r.current);s.current=a==="mounted"?c:"none"},[a]),ki(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=Fi(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ki(()=>{if(t){const c=d=>{const h=Fi(r.current).includes(d.animationName);d.target===t&&h&&Bo.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=Fi(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Fi(e){return(e==null?void 0:e.animationName)||"none"}function GA(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function KA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=YA({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=En(n),l=C.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[s,e,o,a]);return[i,l]}function YA({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),s=En(t);return C.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var qA="VisuallyHidden",Ic=C.forwardRef((e,t)=>w.jsx(ln.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ic.displayName=qA;var Oc="ToastProvider",[Ac,XA,QA]=kA("Toast"),[Jg,eV]=Wg("Toast",[QA]),[ZA,Ni]=Jg(Oc),ey=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=C.useState(null),[c,u]=C.useState(0),d=C.useRef(!1),f=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Oc}\`. Expected non-empty \`string\`.`),w.jsx(Ac.Provider,{scope:t,children:w.jsx(ZA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:C.useCallback(()=>u(h=>h+1),[]),onToastRemove:C.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};ey.displayName=Oc;var ty="ToastViewport",JA=["F8"],Mc="toast.viewportPause",Dc="toast.viewportResume",ny=C.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=JA,label:o="Notifications ({hotkey})",...s}=e,i=Ni(ty,n),a=XA(n),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),d=C.useRef(null),f=mr(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;C.useEffect(()=>{const g=y=>{var v;r.every(T=>y[T]||y.code===T)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),C.useEffect(()=>{const g=l.current,y=d.current;if(p&&g&&y){const x=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Mc);y.dispatchEvent(E),i.isClosePausedRef.current=!0}},v=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Dc);y.dispatchEvent(E),i.isClosePausedRef.current=!1}},T=E=>{!g.contains(E.relatedTarget)&&v()},S=()=>{g.contains(document.activeElement)||v()};return g.addEventListener("focusin",x),g.addEventListener("focusout",T),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",S),window.addEventListener("blur",x),window.addEventListener("focus",v),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",T),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",S),window.removeEventListener("blur",x),window.removeEventListener("focus",v)}}},[p,i.isClosePausedRef]);const m=C.useCallback(({tabbingDirection:g})=>{const x=a().map(v=>{const T=v.ref.current,S=[T,...hM(T)];return g==="forwards"?S:S.reverse()});return(g==="forwards"?x.reverse():x).flat()},[a]);return C.useEffect(()=>{const g=d.current;if(g){const y=x=>{var S,E,I;const v=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!v){const O=document.activeElement,F=x.shiftKey;if(x.target===g&&F){(S=c.current)==null||S.focus();return}const k=m({tabbingDirection:F?"backwards":"forwards"}),L=k.findIndex(P=>P===O);Nc(k.slice(L+1))?x.preventDefault():F?(E=c.current)==null||E.focus():(I=u.current)==null||I.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[a,m]),w.jsxs(zA,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&w.jsx(kc,{ref:c,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Nc(g)}}),w.jsx(Ac.Slot,{scope:n,children:w.jsx(ln.ol,{tabIndex:-1,...s,ref:f})}),p&&w.jsx(kc,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Nc(g)}})]})});ny.displayName=ty;var ry="ToastFocusProxy",kc=C.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Ni(ry,n);return w.jsx(Ic,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});kc.displayName=ry;var Li="Toast",eM="toast.swipeStart",tM="toast.swipeMove",nM="toast.swipeCancel",rM="toast.swipeEnd",oy=C.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=KA({prop:r,defaultProp:o,onChange:s});return w.jsx(Zg,{present:n||a,children:w.jsx(iM,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:En(e.onPause),onResume:En(e.onResume),onSwipeStart:Lt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Lt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Lt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Lt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});oy.displayName=Li;var[oM,sM]=Jg(Li,{onClose(){}}),iM=C.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=Ni(Li,n),[g,y]=C.useState(null),x=mr(t,P=>y(P)),v=C.useRef(null),T=C.useRef(null),S=o||m.duration,E=C.useRef(0),I=C.useRef(S),O=C.useRef(0),{onToastAdd:F,onToastRemove:M}=m,_=En(()=>{var A;(g==null?void 0:g.contains(document.activeElement))&&((A=m.viewport)==null||A.focus()),i()}),k=C.useCallback(P=>{!P||P===1/0||(window.clearTimeout(O.current),E.current=new Date().getTime(),O.current=window.setTimeout(_,P))},[_]);C.useEffect(()=>{const P=m.viewport;if(P){const A=()=>{k(I.current),c==null||c()},N=()=>{const $=new Date().getTime()-E.current;I.current=I.current-$,window.clearTimeout(O.current),l==null||l()};return P.addEventListener(Mc,N),P.addEventListener(Dc,A),()=>{P.removeEventListener(Mc,N),P.removeEventListener(Dc,A)}}},[m.viewport,S,l,c,k]),C.useEffect(()=>{s&&!m.isClosePausedRef.current&&k(S)},[s,S,m.isClosePausedRef,k]),C.useEffect(()=>(F(),()=>M()),[F,M]);const L=C.useMemo(()=>g?uy(g):null,[g]);return m.viewport?w.jsxs(w.Fragment,{children:[L&&w.jsx(aM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),w.jsx(oM,{scope:n,onClose:_,children:Bo.createPortal(w.jsx(Ac.ItemSlot,{scope:n,children:w.jsx(jA,{asChild:!0,onEscapeKeyDown:Lt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||_(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ln.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Lt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:Lt(e.onPointerDown,P=>{P.button===0&&(v.current={x:P.clientX,y:P.clientY})}),onPointerMove:Lt(e.onPointerMove,P=>{if(!v.current)return;const A=P.clientX-v.current.x,N=P.clientY-v.current.y,$=!!T.current,z=["left","right"].includes(m.swipeDirection),H=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=z?H(0,A):0,B=z?0:H(0,N),X=P.pointerType==="touch"?10:2,te={x:D,y:B},Q={originalEvent:P,delta:te};$?(T.current=te,_i(tM,d,Q,{discrete:!1})):dy(te,m.swipeDirection,X)?(T.current=te,_i(eM,u,Q,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(A)>X||Math.abs(N)>X)&&(v.current=null)}),onPointerUp:Lt(e.onPointerUp,P=>{const A=T.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),T.current=null,v.current=null,A){const $=P.currentTarget,z={originalEvent:P,delta:A};dy(A,m.swipeDirection,m.swipeThreshold)?_i(rM,h,z,{discrete:!0}):_i(nM,f,z,{discrete:!0}),$.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),aM=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ni(Li,t),[s,i]=C.useState(!1),[a,l]=C.useState(!1);return dM(()=>i(!0)),C.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:w.jsx(Qg,{asChild:!0,children:w.jsx(Ic,{...r,children:s&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},lM="ToastTitle",sy=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ln.div,{...r,ref:t})});sy.displayName=lM;var cM="ToastDescription",iy=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ln.div,{...r,ref:t})});iy.displayName=cM;var ay="ToastAction",uM=C.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(cy,{altText:n,asChild:!0,children:w.jsx(Fc,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ay}\`. Expected non-empty \`string\`.`),null)});uM.displayName=ay;var ly="ToastClose",Fc=C.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=sM(ly,n);return w.jsx(cy,{asChild:!0,children:w.jsx(ln.button,{type:"button",...r,ref:t,onClick:Lt(e.onClick,o.onClose)})})});Fc.displayName=ly;var cy=C.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return w.jsx(ln.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function uy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),fM(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...uy(r))}}),t}function _i(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Hg(o,s):o.dispatchEvent(s)}var dy=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function dM(e=()=>{}){const t=En(e);ki(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function fM(e){return e.nodeType===e.ELEMENT_NODE}function hM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Nc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var pM=ey,mM=ny,gM=oy,yM=sy,vM=iy,bM=Fc;const wM=e=>{const[t,n]=b.useState(!1),r=()=>n(!0),o=()=>n(!1);return b.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},xM=kr("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),fy=b.createContext(()=>{throw new Error("Not implemented")}),TM=()=>b.useContext(fy),hy={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},SM=b.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=xM({theme:t.theme||"default"});return w.jsx(gM,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:w.jsx(pt.li,{layout:!0,layoutScroll:!0,animate:s,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:hy[t.reversedIndex]||hy.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:w.jsxs("div",{className:i,children:[w.jsxs("div",{className:"flex flex-col p-4",children:[t.title?w.jsx(yM,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,w.jsx(vM,{className:"select-text truncate",children:t.text})]}),r?w.jsx(bM,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:w.jsx(ic,{className:"h-5 w-5"})}):null]})})})});function EM({children:e,max:t=5,duration:n=5e3}){const r=b.useRef(null),o=wM(r),[s,i]=b.useState([]),a=b.useCallback(()=>i([]),[]);b.useEffect(()=>()=>a(),[a]);const l=b.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const p=[...h,{...u,id:d,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(h=>h.filter(p=>p.id!==d))}},[t]);return w.jsxs(pM,{duration:n,swipeThreshold:150,children:[w.jsx(fy.Provider,{value:l,children:e}),w.jsx(to,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(p=>p.id!==c.id));return b.createElement(SM,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),w.jsx(mM,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const CM=e=>w.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[w.jsxs("header",{className:"p-6 items-start flex gap-4",children:[w.jsx("div",{className:Me("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:w.jsx("div",{children:w.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx("header",{children:w.jsx("h3",{className:"text-base leading-none",children:e.title})}),w.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?w.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),py=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},my=b.createContext(""),PM=e=>{const[t,n]=py(e.active),r=dr(0),o=dr(0),s=b.useRef(null),i=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const g=m.getBoundingClientRect();o.set(g.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=Ef(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(my.Provider,{value:t,children:w.jsx(Rg,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:w.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:w.jsx("nav",{className:"min-w-0",children:w.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const d=u.props;return w.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:w.jsx(i,{"data-id":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},IM=()=>b.useContext(my),OM=e=>{const t=IM();return w.jsx(b.Fragment,{children:e.id===t?e.children:null})};function jn(e){return gy(e)?(e.nodeName||"").toLowerCase():"#document"}function Ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cn(e){var t;return(t=(gy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gy(e){return e instanceof Node||e instanceof Ot(e).Node}function Ve(e){return e instanceof Element||e instanceof Ot(e).Element}function at(e){return e instanceof HTMLElement||e instanceof Ot(e).HTMLElement}function Lc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ot(e).ShadowRoot}function ys(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_t(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function AM(e){return["table","td","th"].includes(jn(e))}function Vi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function _c(e){const t=Vc(),n=Ve(e)?_t(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 MM(e){let t=Pn(e);for(;at(t)&&!zn(t);){if(_c(t))return t;if(Vi(t))return null;t=Pn(t)}return null}function Vc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zn(e){return["html","body","#document"].includes(jn(e))}function _t(e){return Ot(e).getComputedStyle(e)}function $i(e){return Ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pn(e){if(jn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lc(e)&&e.host||Cn(e);return Lc(t)?t.host:t}function yy(e){const t=Pn(e);return zn(t)?e.ownerDocument?e.ownerDocument.body:e.body:at(t)&&ys(t)?t:yy(t)}function Wn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yy(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ot(o);if(s){const a=$c(i);return t.concat(i,i.visualViewport||[],ys(o)?o:[],a&&n?Wn(a):[])}return t.concat(o,Wn(o,[],n))}function $c(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gt(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 et(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Lc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Bc(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function vy(){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 by(e){return e.mozInputSource===0&&e.isTrusted?!0:zc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Rc(e){return DM()?!1:!zc()&&e.width===0&&e.height===0||zc()&&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 zc(){const e=/android/i;return e.test(Bc())||e.test(vy())}function wy(){return Bc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function DM(){return vy().includes("jsdom/")}function uo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function kM(e){return"nativeEvent"in e}function FM(e){return e.matches("html,body")}function mt(e){return(e==null?void 0:e.ownerDocument)||document}function Wc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function cn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const NM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Hc(e){return at(e)&&e.matches(NM)}function wt(e){e.preventDefault(),e.stopPropagation()}function xy(e){return e?e.getAttribute("role")==="combobox"&&Hc(e):!1}const un=Math.min,Vt=Math.max,Bi=Math.round,fo=Math.floor,Hn=e=>({x:e,y:e}),LM={left:"right",right:"left",bottom:"top",top:"bottom"},_M={start:"end",end:"start"};function Uc(e,t,n){return Vt(e,un(t,n))}function ho(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function po(e){return e.split("-")[1]}function Ty(e){return e==="x"?"y":"x"}function Gc(e){return e==="y"?"height":"width"}function gr(e){return["top","bottom"].includes(Un(e))?"y":"x"}function Kc(e){return Ty(gr(e))}function VM(e,t,n){n===void 0&&(n=!1);const r=po(e),o=Kc(e),s=Gc(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ri(i)),[i,Ri(i)]}function $M(e){const t=Ri(e);return[Yc(e),t,Yc(t)]}function Yc(e){return e.replace(/start|end/g,t=>_M[t])}function BM(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function RM(e,t,n,r){const o=po(e);let s=BM(Un(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Yc)))),s}function Ri(e){return e.replace(/left|right|bottom|top/g,t=>LM[t])}function jM(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sy(e){return typeof e!="number"?jM(e):{top:e,right:e,bottom:e,left:e}}function ji(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 qy;function qO(){return qy||(qy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=Uy();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),b;m.current===null?(b={hasValue:!1,value:null},m.current=b):b=m.current;var v=a(function(){var T=!1,E,C,I=function(_){if(!T){T=!0,E=_;var F=h(_);if(p!==void 0&&b.hasValue){var P=b.value;if(p(P,F))return C=P,P}return C=F,F}var N=E,L=C;if(r(N,_))return L;var V=h(_);return p!==void 0&&p(L,V)?L:(E=_,C=V,V)},A=f===void 0?null:f,O=function(){return I(d())},M=A===null?void 0:function(){return I(A())};return[O,M]},[d,f,h,p]),y=v[0],g=v[1],S=o(u,y,g);return i(function(){b.hasValue=!0,b.value=S},[S]),l(S),S}Yy.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yy}process.env.NODE_ENV==="production"?YO():qO();const No=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},KO=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},ZO=e=>Object.entries(e),Ky=e=>e instanceof Promise,Zy=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),XO=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>Zy(u,f,s,d));return Ky(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},QO=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>Zy(c,u,s,o.current));return Ky(a)?a.then(c=>l(c)):l(a)},ku=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=No(r),i=No((n==null?void 0:n.props)??{}),a=No(t),l=No((n==null?void 0:n.postMiddleware)??[]),c=No((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),d=KO(r),f=No(d),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(b=>{b(r,d,m)})},[r,l,d]);const[p]=w.useState(()=>{const m=()=>i.current,b=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return ZO(b).reduce((v,[y,g])=>({...v,[y]:n!=null&&n.debug?XO(y,g,o,m,h,c.current):QO(y,g,o,m,h,c.current)}),{})});return[r,p,i.current]},JO=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function e_(e,t){return w.useRef(JO(e,t)).current}const va={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Fo=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(Fo(i,t,n,a))},[]),Xy=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:Xy(i,t,n,a)}},{}),Qy={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ba=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},t_={default:e=>ba(e,{result:Qy.default}),dark:e=>ba(e,{result:Qy.dark})},Iu=(e,t)=>{const n=a=>(l,c,u)=>{const d={key:`--${u}`,value:`${l}`};return a?a(d):d},r=Fo(e.colors,n(t==null?void 0:t.colors)),o=Fo(e.spacing,n(t==null?void 0:t.spacing)),s=Fo(e.rounded,n(t==null?void 0:t.rounded)),i=e.custom?Fo(e.custom,n(t==null?void 0:t.customTokens)):[];return r.concat(o,s,i)},n_=(e,t)=>ba(Iu(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),r_=(e,t)=>Iu(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),o_=(e,t)=>ba(Iu(e,t),{result:n=>`html${t!=null&&t.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Jy={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},ev={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},s_={name:"dark",rounded:Jy,spacing:ev,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 33%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},i_={rounded:Jy,spacing:ev,name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(221, 10%, 90%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},a_=s_,l_=i_,Au={emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",autocompleteEmpty:"Nothing here...",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableColumnResizer:"Resize column",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>x.jsxs(w.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To",calendarToday:"Today"},wa=w.createContext({colorTokenParser:va.hsla,translations:Au,locale:void 0}),c_=e=>{const t=w.useMemo(()=>({locale:e.locale,translations:{...Au,...e.map},colorTokenParser:e.parser||va.hsla}),[e]);return x.jsx(wa.Provider,{value:t,children:e.children})},tv=()=>{const e=w.useContext(wa);if(e)return e.locale},kt=()=>{const e=w.useContext(wa);return e?e.translations:Au},u_=()=>{const e=w.useContext(wa);return e?e.colorTokenParser:va.hsla},d_={type:"spring",bounce:.3,duration:.6},nv=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),rv={middle:{x:"0%",opacity:1},enter:nv(1),exit:nv(-1)},ov={exit:{visibility:"hidden"}},f_=e=>{const t=xn(hy(e));return fy({start:t,end:Oo(t,41)})},sv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),h_=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const s=hy(new Date(1970,o,1).setMonth(o)),i=sv(s,n);return x.jsx("option",{value:i,"data-index":o,children:i},`${e}-${i}`)}),Ou={ArrowLeft:(e,t)=>t==="days"?CO(e,1):Iy(e,1),ArrowRight:(e,t)=>t==="days"?Oo(e,1):ua(e,1),ArrowUp:(e,t)=>t==="days"?PO(e,1):kO(e,1),ArrowDown:(e,t)=>t==="days"?cy(e,1):uy(e,1)},iv=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},Mr=e=>e.getFullYear().toString().padStart(4,"0"),p_=(e,t,n)=>e===void 0||n===void 0?!1:PA(t,e)&&kA(t,n),m_=e=>{var n;const t=kt();return x.jsx(dt.tbody,{layout:!0,variants:rv,custom:e.direction,onKeyDown:e.onKeyDown,className:$e((n=e.styles)==null?void 0:n.week),children:e.zip.map((r,o)=>{var s;return x.jsx("tr",{className:(s=e.styles)==null?void 0:s.week,children:r.map(i=>{var h,p,m,b,v,y,g,S,T,E,C,I,A,O;const a=i.toISOString(),l=e.rangeMode?a===((p=(h=e.range)==null?void 0:h.to)==null?void 0:p.toISOString())||a===((b=(m=e.range)==null?void 0:m.from)==null?void 0:b.toISOString()):a===((v=e.date)==null?void 0:v.toISOString()),c=EO(i)&&e.markToday,u=((y=e.disabledDate)==null?void 0:y.call(e,i))||!1,d=!SO(i,e.stateDate)||u,f=e.rangeMode?p_((g=e.range)==null?void 0:g.from,i,(S=e.range)==null?void 0:S.to):!1;return x.jsxs("td",{align:"center",className:$e("relative",(T=e.styles)==null?void 0:T.dayFrame),children:[x.jsxs("button",{type:"button","data-date":a,disabled:u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:$e(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${c?"text-emphasis":""} ${d?"text-disabled":""} ${l?"bg-primary text-primary-foreground":""}`,(E=e.styles)==null?void 0:E.day,f&&e.markRange?"size-10 border border-dashed border-card-border":""),children:[i.getDate(),l&&((C=e.stateRange.from)==null?void 0:C.toISOString())===a?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((I=e.labelRange)==null?void 0:I.from)??t.calendarFromDate})}):null,l&&((A=e.stateRange.to)==null?void 0:A.toISOString())===a?x.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:x.jsx("span",{className:"text-xs text-foreground",children:((O=e.labelRange)==null?void 0:O.to)??t.calendarToDate})}):null]}),e.RenderOnDay?x.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${r.length}-${o}`)})})},av=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:s=!0,onChangeMonth:i,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,...f})=>{const h=w.useRef(Es()),p=kt(),m=w.useRef(null),{date:b,range:v}=f,y=b||new Date,g=w.useRef(null),[S,T]=ku({date:y,isAnimating:!1,year:Mr(y),direction:void 0,range:{from:v==null?void 0:v.from,to:v==null?void 0:v.to},months:h_(h.current,y,o),selectMode:l?"from":void 0,week:fy({start:xn(y),end:MI(y)})},M=>({onChangeYear:_=>({year:_}),setToday:()=>({date:Do(new Date)}),onExitComplete:()=>(iv(g.current||null,m,M.state().date,200),g.current=null,{isAnimating:!1}),date:_=>{const F=_(M.state().date);return{date:F,year:Mr(F)}},nextMonth:_=>{g.current=_.currentTarget;const F=M.state();if(F.isAnimating)return F;const P=ua(F.date,1);return{date:P,isAnimating:!0,direction:1,year:Mr(P)}},previousMonth:_=>{g.current=_.currentTarget;const F=M.state();if(F.isAnimating)return F;const P=Iy(F.date,1);return{date:P,isAnimating:!0,direction:-1,year:Mr(P)}},onSelectDate:_=>{const F=M.state(),P=_.currentTarget.dataset.range==="true",N=_.currentTarget.dataset.date||"",L=new Date(N);return{date:L,year:Mr(L),selectMode:F.selectMode===void 0?void 0:F.selectMode==="from"?"to":"from",range:P?{from:F.selectMode==="from"?L:F.range.from,to:F.selectMode==="to"?L:F.range.to}:F.range}},onChangeMonth:_=>{const F=_.target.value,N=Array.from(_.target.options).find(V=>V.value===F),L=M.state();if(N){const V=N.dataset.index||"",B=new Date(M.state().date);return B.setMonth(+V),{...L,date:B,year:Mr(B)}}return L},onKeyDown:_=>{const F=_.key,P=M.state();if(F in Ou){(F==="ArrowUp"||F==="ArrowDown")&&_.preventDefault();const N=M.state().date,L=Ct.keyof(Ou,F)?Ou[F](N,_.shiftKey?"month":"days"):null;if(L!==null)return iv(_.target,m,L),{...P,date:L,year:Mr(L)}}return M.state()}}),{props:{onChangeMonth:i,onChangeYear:a},postMiddleware:[(M,_,F)=>{var N,L;return(F.method==="onChangeMonth"||F.method==="previousMonth"||F.method==="nextMonth")&&((L=(N=F.props).onChangeMonth)==null||L.call(N,M.date)),M},(M,_,F)=>{var N,L;return F.method==="onChangeYear"&&((L=(N=F.props).onChangeYear)==null||L.call(N,M.date)),M},(M,_,F)=>{const P=F.method==="onSelectDate"||F.method==="setToday"||F.method==="onKeyDown";return l&&P&&t?(c==null||c(M.range),M):(P&&t&&(c==null||c(M.date)),M)}]}),E=$h(f_(S.date),7),C=S.date.toISOString(),I=sv(S.date,o);w.useEffect(()=>{t||c==null||c(S.date)},[C]);const A=e_(M=>{T.date(_=>{const F=new Date(_);return F.setFullYear(+M),F})},1200),O=M=>{const _=M.currentTarget.value;T.onChangeYear(_),a==null||a(new Date(_)),A(_)};return x.jsx(pS,{transition:d_,children:x.jsxs("div",{"data-component":"calendar",ref:m,className:$e("relative overflow-hidden",u==null?void 0:u.calendar),children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(Jn,{initial:!1,mode:"popLayout",custom:S.direction,onExitComplete:T.onExitComplete,children:x.jsxs(dt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(dt.button,{layout:!0,"data-focustrap":"prev",variants:ov,onClick:T.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(uI,{className:"h-4 w-4"})}),x.jsx(dt.span,{layout:!0,variants:rv,custom:S.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${I.length}ch`},value:I,onChange:T.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:S.months}),x.jsx(By,{mask:"int",value:S.year,maxLength:4,placeholder:"YYYY",onChange:O,style:{width:`${S.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),x.jsx(dt.button,{layout:!0,"data-focustrap":"next",variants:ov,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:T.nextMonth,children:x.jsx(du,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsxs(dt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[x.jsx("thead",{children:x.jsx("tr",{children:S.week.map(M=>x.jsx("th",{className:$e("py-2 text-sm font-medium capitalize",u==null?void 0:u.weekDay),children:M.toLocaleDateString(o,{weekday:"short"})},M.toString()))})}),x.jsx(m_,{stateRange:S.range,stateDate:S.date,disabledDate:r,markRange:d,zip:E,range:v,styles:u,dispatch:T,date:b||null,markToday:s,rangeMode:l,labelRange:n,RenderOnDay:e,direction:S.direction,onKeyDown:T.onKeyDown})]})]},I)})}),x.jsx("footer",{className:"mt-2 text-center text-primary",children:x.jsx("button",{className:"transition-transform duration-300 hover:scale-105",type:"button",onClick:T.setToday,children:p.calendarToday})})]})})},lv=({children:e,title:t,titleClassName:n="",as:r="div",container:o="",header:s=null,className:i="",...a})=>x.jsxs(po,{...a,as:r,"data-componen":"card",className:$e("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",o),children:[t?x.jsx("header",{className:$e("mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",n),children:t}):s,x.jsx("div",{className:$e("min-w-full px-8",i),children:e})]}),cv=e=>{const t=e.Icon??ry,n=kt();return x.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[x.jsx(t,{size:64,className:"text-disabled"}),x.jsx("p",{className:"text-disabled",children:n.emptyDataMessage})]})};function qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function g_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function uv(...e){return t=>e.forEach(n=>g_(n,t))}function Nr(...e){return k.useCallback(uv(...e),e)}function dv(e,t=[]){let n=[];function r(s,i){const a=k.createContext(i),l=n.length;n=[...n,i];function c(d){const{scope:f,children:h,...p}=d,m=(f==null?void 0:f[e][l])||a,b=k.useMemo(()=>p,Object.values(p));return x.jsx(m.Provider,{value:b,children:h})}function u(d,f){const h=(f==null?void 0:f[e][l])||a,p=k.useContext(h);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>k.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return k.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,y_(o,...t)]}function y_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Lo=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),s=o.find(b_);if(s){const i=s.props.children,a=o.map(l=>l===s?k.Children.count(i)>1?k.Children.only(null):k.isValidElement(i)?i.props.children:null:l);return x.jsx(_u,{...r,ref:t,children:k.isValidElement(i)?k.cloneElement(i,void 0,a):null})}return x.jsx(_u,{...r,ref:t,children:n})});Lo.displayName="Slot";var _u=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=x_(n);return k.cloneElement(n,{...w_(r,n.props),ref:t?uv(t,o):o})}return k.Children.count(n)>1?k.Children.only(null):null});_u.displayName="SlotClone";var v_=({children:e})=>x.jsx(x.Fragment,{children:e});function b_(e){return k.isValidElement(e)&&e.type===v_}function w_(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function x_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function T_(e){const t=e+"CollectionProvider",[n,r]=dv(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:p,children:m}=h,b=w.useRef(null),v=w.useRef(new Map).current;return x.jsx(o,{scope:p,itemMap:v,collectionRef:b,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=w.forwardRef((h,p)=>{const{scope:m,children:b}=h,v=s(a,m),y=Nr(p,v.collectionRef);return x.jsx(Lo,{ref:y,children:b})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=w.forwardRef((h,p)=>{const{scope:m,children:b,...v}=h,y=w.useRef(null),g=Nr(p,y),S=s(c,m);return w.useEffect(()=>(S.itemMap.set(y,{ref:y,...v}),()=>void S.itemMap.delete(y))),x.jsx(Lo,{[u]:"",ref:g,children:b})});d.displayName=c;function f(h){const p=s(e+"CollectionConsumer",h);return w.useCallback(()=>{const b=p.collectionRef.current;if(!b)return[];const v=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,T)=>v.indexOf(S.ref.current)-v.indexOf(T.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},f,r]}var S_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],En=S_.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?Lo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function fv(e,t){e&&ms.flushSync(()=>e.dispatchEvent(t))}function Bn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function E_(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var C_="DismissableLayer",Du="dismissableLayer.update",P_="dismissableLayer.pointerDownOutside",k_="dismissableLayer.focusOutside",hv,pv=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mv=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=k.useContext(pv),[u,d]=k.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=k.useState({}),p=Nr(t,C=>d(C)),m=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(b),y=u?m.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,T=A_(C=>{const I=C.target,A=[...c.branches].some(O=>O.contains(I));!S||A||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),E=O_(C=>{const I=C.target;[...c.branches].some(O=>O.contains(I))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return E_(C=>{y===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(hv=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),yv(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=hv)}},[u,f,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),yv())},[u,c]),k.useEffect(()=>{const C=()=>h({});return document.addEventListener(Du,C),()=>document.removeEventListener(Du,C)},[]),x.jsx(En.div,{...l,ref:p,style:{pointerEvents:g?S?"auto":"none":void 0,...e.style},onFocusCapture:qt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:qt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:qt(e.onPointerDownCapture,T.onPointerDownCapture)})});mv.displayName=C_;var I_="DismissableLayerBranch",gv=k.forwardRef((e,t)=>{const n=k.useContext(pv),r=k.useRef(null),o=Nr(t,r);return k.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(En.div,{...e,ref:o})});gv.displayName=I_;function A_(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){vv(P_,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function O_(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=s=>{s.target&&!r.current&&vv(k_,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yv(){const e=new CustomEvent(Du);document.dispatchEvent(e)}function vv(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?fv(o,s):o.dispatchEvent(s)}var __=mv,D_=gv,xa=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},M_="Portal",bv=k.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=k.useState(!1);xa(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Oi.createPortal(x.jsx(En.div,{...r,ref:t}),i):null});bv.displayName=M_;function N_(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var wv=e=>{const{present:t,children:n}=e,r=F_(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),s=Nr(r.ref,L_(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:s}):null};wv.displayName="Presence";function F_(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),s=k.useRef("none"),i=e?"mounted":"unmounted",[a,l]=N_(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=Ta(r.current);s.current=a==="mounted"?c:"none"},[a]),xa(()=>{const c=r.current,u=o.current;if(u!==e){const f=s.current,h=Ta(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),xa(()=>{if(t){const c=d=>{const h=Ta(r.current).includes(d.animationName);d.target===t&&h&&ms.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(s.current=Ta(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ta(e){return(e==null?void 0:e.animationName)||"none"}function L_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function V_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=$_({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=Bn(n),l=k.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[s,e,o,a]);return[i,l]}function $_({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),s=Bn(t);return k.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var R_="VisuallyHidden",Mu=k.forwardRef((e,t)=>x.jsx(En.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Mu.displayName=R_;var Nu="ToastProvider",[Fu,B_,j_]=T_("Toast"),[xv,J$]=dv("Toast",[j_]),[z_,Sa]=xv(Nu),Tv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=k.useState(null),[c,u]=k.useState(0),d=k.useRef(!1),f=k.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nu}\`. Expected non-empty \`string\`.`),x.jsx(Fu.Provider,{scope:t,children:x.jsx(z_,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:k.useCallback(()=>u(h=>h+1),[]),onToastRemove:k.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Tv.displayName=Nu;var Sv="ToastViewport",H_=["F8"],Lu="toast.viewportPause",Vu="toast.viewportResume",Ev=k.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=H_,label:o="Notifications ({hotkey})",...s}=e,i=Sa(Sv,n),a=B_(n),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),f=Nr(t,d,i.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=i.toastCount>0;k.useEffect(()=>{const b=v=>{var g;r.every(S=>v[S]||v.code===S)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),k.useEffect(()=>{const b=l.current,v=d.current;if(p&&b&&v){const y=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Lu);v.dispatchEvent(E),i.isClosePausedRef.current=!0}},g=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Vu);v.dispatchEvent(E),i.isClosePausedRef.current=!1}},S=E=>{!b.contains(E.relatedTarget)&&g()},T=()=>{b.contains(document.activeElement)||g()};return b.addEventListener("focusin",y),b.addEventListener("focusout",S),b.addEventListener("pointermove",y),b.addEventListener("pointerleave",T),window.addEventListener("blur",y),window.addEventListener("focus",g),()=>{b.removeEventListener("focusin",y),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",y),b.removeEventListener("pointerleave",T),window.removeEventListener("blur",y),window.removeEventListener("focus",g)}}},[p,i.isClosePausedRef]);const m=k.useCallback(({tabbingDirection:b})=>{const y=a().map(g=>{const S=g.ref.current,T=[S,...rD(S)];return b==="forwards"?T:T.reverse()});return(b==="forwards"?y.reverse():y).flat()},[a]);return k.useEffect(()=>{const b=d.current;if(b){const v=y=>{var T,E,C;const g=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!g){const I=document.activeElement,A=y.shiftKey;if(y.target===b&&A){(T=c.current)==null||T.focus();return}const _=m({tabbingDirection:A?"backwards":"forwards"}),F=_.findIndex(P=>P===I);Bu(_.slice(F+1))?y.preventDefault():A?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return b.addEventListener("keydown",v),()=>b.removeEventListener("keydown",v)}},[a,m]),x.jsxs(D_,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&x.jsx($u,{ref:c,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"forwards"});Bu(b)}}),x.jsx(Fu.Slot,{scope:n,children:x.jsx(En.ol,{tabIndex:-1,...s,ref:f})}),p&&x.jsx($u,{ref:u,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"backwards"});Bu(b)}})]})});Ev.displayName=Sv;var Cv="ToastFocusProxy",$u=k.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Sa(Cv,n);return x.jsx(Mu,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});$u.displayName=Cv;var Ea="Toast",W_="toast.swipeStart",U_="toast.swipeMove",G_="toast.swipeCancel",Y_="toast.swipeEnd",Pv=k.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a=!0,l]=V_({prop:r,defaultProp:o,onChange:s});return x.jsx(wv,{present:n||a,children:x.jsx(Z_,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Bn(e.onPause),onResume:Bn(e.onResume),onSwipeStart:qt(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:qt(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:qt(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:qt(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Pv.displayName=Ea;var[q_,K_]=xv(Ea,{onClose(){}}),Z_=k.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=Sa(Ea,n),[b,v]=k.useState(null),y=Nr(t,P=>v(P)),g=k.useRef(null),S=k.useRef(null),T=o||m.duration,E=k.useRef(0),C=k.useRef(T),I=k.useRef(0),{onToastAdd:A,onToastRemove:O}=m,M=Bn(()=>{var N;(b==null?void 0:b.contains(document.activeElement))&&((N=m.viewport)==null||N.focus()),i()}),_=k.useCallback(P=>{!P||P===1/0||(window.clearTimeout(I.current),E.current=new Date().getTime(),I.current=window.setTimeout(M,P))},[M]);k.useEffect(()=>{const P=m.viewport;if(P){const N=()=>{_(C.current),c==null||c()},L=()=>{const V=new Date().getTime()-E.current;C.current=C.current-V,window.clearTimeout(I.current),l==null||l()};return P.addEventListener(Lu,L),P.addEventListener(Vu,N),()=>{P.removeEventListener(Lu,L),P.removeEventListener(Vu,N)}}},[m.viewport,T,l,c,_]),k.useEffect(()=>{s&&!m.isClosePausedRef.current&&_(T)},[s,T,m.isClosePausedRef,_]),k.useEffect(()=>(A(),()=>O()),[A,O]);const F=k.useMemo(()=>b?Dv(b):null,[b]);return m.viewport?x.jsxs(x.Fragment,{children:[F&&x.jsx(X_,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),x.jsx(q_,{scope:n,onClose:M,children:ms.createPortal(x.jsx(Fu.ItemSlot,{scope:n,children:x.jsx(__,{asChild:!0,onEscapeKeyDown:qt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(En.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:qt(e.onKeyDown,P=>{P.key==="Escape"&&(a==null||a(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:qt(e.onPointerDown,P=>{P.button===0&&(g.current={x:P.clientX,y:P.clientY})}),onPointerMove:qt(e.onPointerMove,P=>{if(!g.current)return;const N=P.clientX-g.current.x,L=P.clientY-g.current.y,V=!!S.current,B=["left","right"].includes(m.swipeDirection),W=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,D=B?W(0,N):0,j=B?0:W(0,L),K=P.pointerType==="touch"?10:2,J={x:D,y:j},X={originalEvent:P,delta:J};V?(S.current=J,Ca(U_,d,X,{discrete:!1})):Mv(J,m.swipeDirection,K)?(S.current=J,Ca(W_,u,X,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(N)>K||Math.abs(L)>K)&&(g.current=null)}),onPointerUp:qt(e.onPointerUp,P=>{const N=S.current,L=P.target;if(L.hasPointerCapture(P.pointerId)&&L.releasePointerCapture(P.pointerId),S.current=null,g.current=null,N){const V=P.currentTarget,B={originalEvent:P,delta:N};Mv(N,m.swipeDirection,m.swipeThreshold)?Ca(Y_,h,B,{discrete:!0}):Ca(G_,f,B,{discrete:!0}),V.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),X_=e=>{const{__scopeToast:t,children:n,...r}=e,o=Sa(Ea,t),[s,i]=k.useState(!1),[a,l]=k.useState(!1);return tD(()=>i(!0)),k.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:x.jsx(bv,{asChild:!0,children:x.jsx(Mu,{...r,children:s&&x.jsxs(x.Fragment,{children:[o.label," ",n]})})})},Q_="ToastTitle",kv=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(En.div,{...r,ref:t})});kv.displayName=Q_;var J_="ToastDescription",Iv=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return x.jsx(En.div,{...r,ref:t})});Iv.displayName=J_;var Av="ToastAction",eD=k.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?x.jsx(_v,{altText:n,asChild:!0,children:x.jsx(Ru,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Av}\`. Expected non-empty \`string\`.`),null)});eD.displayName=Av;var Ov="ToastClose",Ru=k.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=K_(Ov,n);return x.jsx(_v,{asChild:!0,children:x.jsx(En.button,{type:"button",...r,ref:t,onClick:qt(e.onClick,o.onClose)})})});Ru.displayName=Ov;var _v=k.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return x.jsx(En.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Dv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),nD(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Dv(r))}}),t}function Ca(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?fv(o,s):o.dispatchEvent(s)}var Mv=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function tD(e=()=>{}){const t=Bn(e);xa(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function nD(e){return e.nodeType===e.ELEMENT_NODE}function rD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Bu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var oD=Tv,sD=Ev,iD=Pv,aD=kv,lD=Iv,cD=Ru;const uD=e=>{const[t,n]=w.useState(!1),r=()=>n(!0),o=()=>n(!1);return w.useEffect(()=>{const s=e.current;if(s)return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",o),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",o)}},[]),t},dD=ho("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-sm supports-[backdrop-filter]:backdrop-blur-xl",{variants:{theme:{warn:"bg-warn-notification/90 text-warn-hover border-warn/50",info:"bg-info-notification supports-[backdrop-filter]:bg-info-notification/50 supports-[backdrop-filter]:bg-info/20 text-info border-info/50",danger:"bg-danger-notification supports-[backdrop-filter]:bg-danger-notification/60 text-danger border-danger/50",success:"bg-success-notification supports-[backdrop-filter]:bg-success-notification/50 text-success border-success/50",default:"border-card-border bg-card-background text-foreground"}},defaultVariants:{theme:"default"}}),Nv=w.createContext(()=>{throw new Error("Not implemented")}),fD=()=>w.useContext(Nv),Fv={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}},hD=w.forwardRef(function(t,n){const r=t.closable??!0,o=t.duration,s=t.hover?"hover":t.isLast?"isLast":"other",i=dD({theme:t.theme||"default"});return x.jsx(iD,{ref:n,asChild:!0,forceMount:!0,onOpenChange:t.onClose,duration:o,children:x.jsx(dt.li,{layout:!0,layoutScroll:!0,animate:s,"data-index":t.index,initial:{y:-100,zIndex:-1},className:"text-select pointer-events-auto absolute right-0 top-0 w-80",variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:Fv[t.reversedIndex]||Fv.default},transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},children:x.jsxs("div",{className:i,children:[x.jsxs("div",{className:"flex flex-col p-4",children:[t.title?x.jsx(aD,{className:"select-text truncate text-lg font-medium leading-relaxed",children:"Title"}):null,x.jsx(lD,{className:"select-text truncate",children:t.text})]}),r?x.jsx(cD,{className:"absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover",children:x.jsx(hu,{className:"h-5 w-5"})}):null]})})})});function pD({children:e,max:t=5,duration:n=5e3}){const r=w.useRef(null),o=uD(r),[s,i]=w.useState([]),a=w.useCallback(()=>i([]),[]);w.useEffect(()=>()=>a(),[a]);const l=w.useCallback((c,u)=>{const d=window.crypto.randomUUID();return i(h=>{const p=[...h,{...u,id:d,text:c}];return p.length>t?p.slice(p.length-t,p.length+1):p}),{clear:a,close:()=>i(h=>h.filter(p=>p.id!==d))}},[t]);return x.jsxs(oD,{duration:n,swipeThreshold:150,children:[x.jsx(Nv.Provider,{value:l,children:e}),x.jsx(Jn,{presenceAffectsLayout:!0,mode:"popLayout",children:s.map((c,u,d)=>{const f=()=>i(h=>h.filter(p=>p.id!==c.id));return w.createElement(hD,{...c,key:c.id,hover:o,index:u,onClose:f,isLast:d.length-1===u,reversedIndex:d.length-(u+1)})})}),x.jsx(sD,{ref:r,"data-items":s.length,style:{justifyContent:"start",height:`${(o?s.length:Math.min(1,s.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20"})]})}const mD=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:$e("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Lv=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},Vv=w.createContext(""),gD=e=>{const[t,n]=Lv(e.active),r=Or(0),o=Or(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const b=m.getBoundingClientRect();o.set(b.width),r.set(m.offsetLeft)},f=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",f);let h=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(h=u.querySelector(`li[data-id="${p}"]`),n(p)),h===null){h=u.querySelector("li[data-id]");const m=h.getAttribute("data-id")||"";n(m)}return d(h),()=>window.removeEventListener("resize",f)},[]);const a=zh(e.onChange);w.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=w.Children.toArray(e.children),c=u=>{const d=u.currentTarget,f=d.getBoundingClientRect();o.set(f.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return x.jsx(Vv.Provider,{value:t,children:x.jsx(lv,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:x.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:x.jsx("nav",{className:"min-w-0",children:x.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const d=u.props;return x.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:x.jsx(i,{"data-id":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},yD=()=>w.useContext(Vv),vD=e=>{const t=yD();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})};function or(e){return $v(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jn(e){var t;return(t=($v(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $v(e){return e instanceof Node||e instanceof Rt(e).Node}function Ue(e){return e instanceof Element||e instanceof Rt(e).Element}function mt(e){return e instanceof HTMLElement||e instanceof Rt(e).HTMLElement}function ju(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}function Xs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function bD(e){return["table","td","th"].includes(or(e))}function Pa(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function zu(e){const t=Hu(),n=Ue(e)?Kt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function wD(e){let t=zn(e);for(;mt(t)&&!sr(t);){if(zu(t))return t;if(Pa(t))return null;t=zn(t)}return null}function Hu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sr(e){return["html","body","#document"].includes(or(e))}function Kt(e){return Rt(e).getComputedStyle(e)}function ka(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zn(e){if(or(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ju(e)&&e.host||jn(e);return ju(t)?t.host:t}function Rv(e){const t=zn(e);return sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:mt(t)&&Xs(t)?t:Rv(t)}function ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rv(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Rt(o);if(s){const a=Wu(i);return t.concat(i,i.visualViewport||[],Xs(o)?o:[],a&&n?ir(a):[])}return t.concat(o,ir(o,[],n))}function Wu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function un(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function lt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ju(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Uu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Bv(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function jv(e){return e.mozInputSource===0&&e.isTrusted?!0:qu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Gu(e){return xD()?!1:!qu()&&e.width===0&&e.height===0||qu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Yu(){return/apple/i.test(navigator.vendor)}function qu(){const e=/android/i;return e.test(Uu())||e.test(Bv())}function zv(){return Uu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function xD(){return Bv().includes("jsdom/")}function Vo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function TD(e){return"nativeEvent"in e}function SD(e){return e.matches("html,body")}function St(e){return(e==null?void 0:e.ownerDocument)||document}function Ku(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Cn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const ED="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Zu(e){return mt(e)&&e.matches(ED)}function It(e){e.preventDefault(),e.stopPropagation()}function Hv(e){return e?e.getAttribute("role")==="combobox"&&Zu(e):!1}const Pn=Math.min,Zt=Math.max,Ia=Math.round,$o=Math.floor,ar=e=>({x:e,y:e}),CD={left:"right",right:"left",bottom:"top",top:"bottom"},PD={start:"end",end:"start"};function Xu(e,t,n){return Zt(e,Pn(t,n))}function Ro(e,t){return typeof e=="function"?e(t):e}function lr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function Wv(e){return e==="x"?"y":"x"}function Qu(e){return e==="y"?"height":"width"}function Fr(e){return["top","bottom"].includes(lr(e))?"y":"x"}function Ju(e){return Wv(Fr(e))}function kD(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=Ju(e),s=Qu(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Aa(i)),[i,Aa(i)]}function ID(e){const t=Aa(e);return[ed(e),t,ed(t)]}function ed(e){return e.replace(/start|end/g,t=>PD[t])}function AD(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function OD(e,t,n,r){const o=Bo(e);let s=AD(lr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ed)))),s}function Aa(e){return e.replace(/left|right|bottom|top/g,t=>CD[t])}function _D(e){return{top:0,right:0,bottom:0,left:0,...e}}function Uv(e){return typeof e!="number"?_D(e):{top:e,right:e,bottom:e,left:e}}function Oa(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
175
175
  * tabbable 6.2.0
176
176
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
177
- */var zM=["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])"],zi=zM.join(","),Ey=typeof Element>"u",mo=Ey?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wi=!Ey&&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},Hi=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},WM=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},HM=function(t,n,r){if(Hi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(zi));return n&&mo.call(t,zi)&&o.unshift(t),o=o.filter(r),o},UM=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Hi(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=mo.call(i,zi);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Hi(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},Cy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Py=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||WM(t))&&!Cy(t)?0:t.tabIndex},GM=function(t,n){var r=Py(t);return r<0&&n&&!Cy(t)?0:r},KM=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Iy=function(t){return t.tagName==="INPUT"},YM=function(t){return Iy(t)&&t.type==="hidden"},qM=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},XM=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},QM=function(t){if(!t.name)return!0;var n=t.form||Wi(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=XM(o,t.form);return!s||s===t},ZM=function(t){return Iy(t)&&t.type==="radio"},JM=function(t){return ZM(t)&&!QM(t)},eD=function(t){var n,r=t&&Wi(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=Wi(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},Oy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},tD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=mo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(mo.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Wi(t);if(l&&!l.shadowRoot&&o(l)===!0)return Oy(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(eD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Oy(t);return!1},nD=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 mo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},rD=function(t,n){return!(n.disabled||Hi(n)||YM(n)||tD(n,t)||qM(n)||nD(n))},qc=function(t,n){return!(JM(n)||Py(n)<0||!rD(t,n))},oD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},sD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=GM(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(KM).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},vs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=UM([t],n.includeContainer,{filter:qc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:oD}):r=HM(t,n.includeContainer,qc.bind(null,n)),sD(r)},iD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return mo.call(t,zi)===!1?!1:qc(n,t)};function Ay(e,t,n){let{reference:r,floating:o}=e;const s=gr(t),i=Kc(t),a=Gc(i),l=Un(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(po(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const aD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ay(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:g,fn:y}=a[m],{x,y:v,data:T,reset:S}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=x??u,d=v??d,h={...h,[g]:{...h[g],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=Ay(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function Xc(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=ho(t,e),p=Sy(h),g=a[f?d==="floating"?"reference":"floating":d],y=ji(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},S=ji(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:v,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 lD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=ho(e,t)||{};if(c==null)return{};const d=Sy(u),f={x:n,y:r},h=Kc(o),p=Gc(h),m=await i.getDimensions(c),g=h==="y",y=g?"top":"left",x=g?"bottom":"right",v=g?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-f[h]-s.floating[p],S=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let I=E?E[v]:0;(!I||!await(i.isElement==null?void 0:i.isElement(E)))&&(I=a.floating[v]||s.floating[p]);const O=T/2-S/2,F=I/2-m[p]/2-1,M=un(d[y],F),_=un(d[x],F),k=M,L=I-m[p]-_,P=I/2-m[p]/2+O,A=Uc(k,P,L),N=!l.arrow&&po(o)!=null&&P!==A&&s.reference[p]/2-(P<k?M:_)-m[p]/2<0,$=N?P<k?P-k:P-L:0;return{[h]:f[h]+$,data:{[h]:A,centerOffset:P-A-$,...N&&{alignmentOffset:$}},reset:N}}}),cD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=ho(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Un(o),x=gr(a),v=Un(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(v||!m?[Ri(a)]:$M(a)),E=p!=="none";!f&&E&&S.push(...RM(a,m,p,T));const I=[a,...S],O=await Xc(t,g),F=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&F.push(O[y]),d){const P=VM(o,i,T);F.push(O[P[0]],O[P[1]])}if(M=[...M,{placement:o,overflows:F}],!F.every(P=>P<=0)){var _,k;const P=(((_=s.flip)==null?void 0:_.index)||0)+1,A=I[P];if(A)return{data:{index:P,overflows:M},reset:{placement:A}};let N=(k=M.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:k.placement;if(!N)switch(h){case"bestFit":{var L;const $=(L=M.filter(z=>{if(E){const H=gr(z.placement);return H===x||H==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(H=>H>0).reduce((H,D)=>H+D,0)]).sort((z,H)=>z[1]-H[1])[0])==null?void 0:L[0];$&&(N=$);break}case"initialPlacement":N=a;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function uD(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Un(n),a=po(n),l=gr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=ho(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 dD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await uD(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},fD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:g=>{let{x:y,y:x}=g;return{x:y,y:x}}},...l}=ho(e,t),c={x:n,y:r},u=await Xc(t,l),d=gr(Un(o)),f=Ty(d);let h=c[f],p=c[d];if(s){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=h+u[g],v=h-u[y];h=Uc(x,h,v)}if(i){const g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=p+u[g],v=p-u[y];p=Uc(x,p,v)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},hD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=ho(e,t),l=await Xc(t,a),c=Un(n),u=po(n),d=gr(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const g=h-l.top-l.bottom,y=f-l.left-l.right,x=un(h-l[p],g),v=un(f-l[m],y),T=!t.middlewareData.shift;let S=x,E=v;if(d?E=u||T?un(v,y):y:S=u||T?un(x,g):g,T&&!u){const O=Vt(l.left,0),F=Vt(l.right,0),M=Vt(l.top,0),_=Vt(l.bottom,0);d?E=f-2*(O!==0||F!==0?O+F:Vt(l.left,l.right)):S=h-2*(M!==0||_!==0?M+_:Vt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:S});const I=await o.getDimensions(s.floating);return f!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function My(e){const t=_t(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=at(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Bi(n)!==s||Bi(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Qc(e){return Ve(e)?e:e.contextElement}function go(e){const t=Qc(e);if(!at(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=My(t);let i=(s?Bi(n.width):n.width)/r,a=(s?Bi(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const pD=Hn(0);function Dy(e){const t=Ot(e);return!Vc()||!t.visualViewport?pD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ot(e)?!1:t}function yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Qc(e);let i=Hn(1);t&&(r?Ve(r)&&(i=go(r)):i=go(e));const a=mD(s,n,r)?Dy(s):Hn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Ot(s),h=r&&Ve(r)?Ot(r):r;let p=f,m=$c(p);for(;m&&r&&h!==p;){const g=go(m),y=m.getBoundingClientRect(),x=_t(m),v=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,T=y.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=v,c+=T,p=Ot(m),m=$c(p)}}return ji({width:u,height:d,x:l,y:c})}function gD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Cn(r),a=t?Vi(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=at(r);if((d||!d&&!s)&&((jn(r)!=="body"||ys(i))&&(l=$i(r)),at(r))){const f=yr(r);c=go(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 yD(e){return Array.from(e.getClientRects())}function ky(e){return yr(Cn(e)).left+$i(e).scrollLeft}function vD(e){const t=Cn(e),n=$i(e),r=e.ownerDocument.body,o=Vt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Vt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ky(e);const a=-n.scrollTop;return _t(r).direction==="rtl"&&(i+=Vt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function bD(e,t){const n=Ot(e),r=Cn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Vc();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function wD(e,t){const n=yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=at(e)?go(e):Hn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Fy(e,t,n){let r;if(t==="viewport")r=bD(e,n);else if(t==="document")r=vD(Cn(e));else if(Ve(t))r=wD(t,n);else{const o=Dy(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ji(r)}function Ny(e,t){const n=Pn(e);return n===t||!Ve(n)||zn(n)?!1:_t(n).position==="fixed"||Ny(n,t)}function xD(e,t){const n=t.get(e);if(n)return n;let r=Wn(e,[],!1).filter(a=>Ve(a)&&jn(a)!=="body"),o=null;const s=_t(e).position==="fixed";let i=s?Pn(e):e;for(;Ve(i)&&!zn(i);){const a=_t(i),l=_c(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ys(i)&&!l&&Ny(e,i))?r=r.filter(u=>u!==i):o=a,i=Pn(i)}return t.set(e,r),r}function TD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Vi(t)?[]:xD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Fy(t,u,o);return c.top=Vt(d.top,c.top),c.right=un(d.right,c.right),c.bottom=un(d.bottom,c.bottom),c.left=Vt(d.left,c.left),c},Fy(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function SD(e){const{width:t,height:n}=My(e);return{width:t,height:n}}function ED(e,t,n){const r=at(t),o=Cn(t),s=n==="fixed",i=yr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);if(r||!r&&!s)if((jn(t)!=="body"||ys(o))&&(a=$i(t)),r){const d=yr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=ky(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function Zc(e){return _t(e).position==="static"}function Ly(e,t){return!at(e)||_t(e).position==="fixed"?null:t?t(e):e.offsetParent}function _y(e,t){const n=Ot(e);if(Vi(e))return n;if(!at(e)){let o=Pn(e);for(;o&&!zn(o);){if(Ve(o)&&!Zc(o))return o;o=Pn(o)}return n}let r=Ly(e,t);for(;r&&AM(r)&&Zc(r);)r=Ly(r,t);return r&&zn(r)&&Zc(r)&&!_c(r)?n:r||MM(e)||n}const CD=async function(e){const t=this.getOffsetParent||_y,n=this.getDimensions,r=await n(e.floating);return{reference:ED(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PD(e){return _t(e).direction==="rtl"}const ID={convertOffsetParentRelativeRectToViewportRelativeRect:gD,getDocumentElement:Cn,getClippingRect:TD,getOffsetParent:_y,getElementRects:CD,getClientRects:yD,getDimensions:SD,getScale:go,isElement:Ve,isRTL:PD};function OD(e,t){let n=null,r;const o=Cn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=fo(u),p=fo(o.clientWidth-(c+d)),m=fo(o.clientHeight-(u+f)),g=fo(c),x={rootMargin:-h+"px "+-p+"px "+-m+"px "+-g+"px",threshold:Vt(0,un(1,l))||1};let v=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!v)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(T,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return i(!0),s}function bs(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Qc(e),u=o||s?[...c?Wn(c):[],...Wn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=c&&a?OD(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?yr(e):null;l&&g();function g(){const y=yr(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const AD=dD,MD=fD,DD=cD,kD=hD,Vy=lD,FD=(e,t,n)=>{const r=new Map,o={platform:ID,...n},s={...o.platform,_c:r};return aD(e,t,{...o,platform:s})};var Ui=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Gi(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(!Gi(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Gi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function $y(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function By(e,t){const n=$y(e);return Math.round(t*n)/n}function Ry(e){const t=C.useRef(e);return Ui(()=>{t.current=e}),t}function ND(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=C.useState(r);Gi(f,r)||h(r);const[p,m]=C.useState(null),[g,y]=C.useState(null),x=C.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),v=C.useCallback($=>{$!==I.current&&(I.current=$,y($))},[]),T=s||p,S=i||g,E=C.useRef(null),I=C.useRef(null),O=C.useRef(u),F=l!=null,M=Ry(l),_=Ry(o),k=C.useCallback(()=>{if(!E.current||!I.current)return;const $={placement:t,strategy:n,middleware:f};_.current&&($.platform=_.current),FD(E.current,I.current,$).then(z=>{const H={...z,isPositioned:!0};L.current&&!Gi(O.current,H)&&(O.current=H,Bo.flushSync(()=>{d(H)}))})},[f,t,n,_]);Ui(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const L=C.useRef(!1);Ui(()=>(L.current=!0,()=>{L.current=!1}),[]),Ui(()=>{if(T&&(E.current=T),S&&(I.current=S),T&&S){if(M.current)return M.current(T,S,k);k()}},[T,S,k,M,F]);const P=C.useMemo(()=>({reference:E,floating:I,setReference:x,setFloating:v}),[x,v]),A=C.useMemo(()=>({reference:T,floating:S}),[T,S]),N=C.useMemo(()=>{const $={position:n,left:0,top:0};if(!A.floating)return $;const z=By(A.floating,u.x),H=By(A.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+H+"px)",...$y(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:H}},[n,a,A.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:k,refs:P,elements:A,floatingStyles:N}),[u,k,P,A,N])}const LD=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?Vy({element:r.current,padding:o}).fn(n):{}:r?Vy({element:r,padding:o}).fn(n):{}}}},ws=(e,t)=>({...AD(e),options:[e,t]}),Jc=(e,t)=>({...MD(e),options:[e,t]}),eu=(e,t)=>({...DD(e),options:[e,t]}),jy=(e,t)=>({...kD(e),options:[e,t]}),zy=(e,t)=>({...LD(e),options:[e,t]});function tu(e){return C.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Wy={...C},_D=Wy.useInsertionEffect||(e=>e());function ut(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return _D(()=>{t.current=e}),C.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 nu="ArrowUp",xs="ArrowDown",yo="ArrowLeft",vo="ArrowRight";function Ki(e,t,n){return Math.floor(e/t)!==n}function Ts(e,t){return t<0||t>=e.current.length}function ru(e,t){return Ct(e,{disabledIndices:t})}function Hy(e,t){return Ct(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ct(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&Yi(i,a,o));return a}function VD(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===nu){if(u&&wt(n),c===-1)d=l;else if(d=Ct(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}Ts(e,d)&&(d=c)}if(n.key===xs&&(u&&wt(n),c===-1?d=a:(d=Ct(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Ct(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Ts(e,d)&&(d=c)),r==="both"){const f=fo(c/s);n.key===vo&&(u&&wt(n),c%s!==s-1?(d=Ct(e,{startingIndex:c,disabledIndices:i}),o&&Ki(d,s,f)&&(d=Ct(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Ct(e,{startingIndex:c-c%s-1,disabledIndices:i})),Ki(d,s,f)&&(d=c)),n.key===yo&&(u&&wt(n),c%s!==0?(d=Ct(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&Ki(d,s,f)&&(d=Ct(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Ct(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),Ki(d,s,f)&&(d=c));const h=fo(l/s)===f;Ts(e,d)&&(o&&h?d=n.key===yo?l:Ct(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function $D(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function BD(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function RD(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Yi(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 Uy=0;function Gn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Uy);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():Uy=requestAnimationFrame(s)}var Ee=typeof document<"u"?b.useLayoutEffect:b.useEffect;function jD(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 zD(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 Gy=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function WD(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=C.useState(()=>new Map),i=C.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=C.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return Ee(()=>{const l=new Map(o);Array.from(l.keys()).sort(jD).forEach((u,d)=>{l.set(u,d)}),zD(o,l)||s(l)},[o]),C.createElement(Gy.Provider,{value:C.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function Ky(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=C.useContext(Gy),[a,l]=C.useState(null),c=C.useRef(null),u=C.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return Ee(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),Ee(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),C.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function bo(){return bo=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},bo.apply(this,arguments)}let Yy=!1,HD=0;const qy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+HD++;function UD(){const[e,t]=C.useState(()=>Yy?qy():void 0);return Ee(()=>{e==null&&t(qy())},[]),C.useEffect(()=>{Yy=!0},[]),e}const wo=Wy.useId||UD;let Ss;process.env.NODE_ENV!=="production"&&(Ss=new Set);function qi(){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=Ss)!=null&&e.has(o))){var s;(s=Ss)==null||s.add(o),console.warn(o)}}function GD(){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=Ss)!=null&&e.has(o))){var s;(s=Ss)==null||s.add(o),console.error(o)}}const Xy=C.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||qi("The `ref` prop is required for `FloatingArrow`."));const g=wo(),[y,x]=C.useState(!1);if(Ee(()=>{if(!o)return;_t(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const v=c*2,T=v/2,S=i/2*(l/-8+1),E=a/2*l/4,[I,O]=r.split("-"),F=!!f,M=I==="top"||I==="bottom",_=u&&O==="end"?"bottom":"top";let k=u&&O==="end"?"right":"left";u&&y&&(k=O==="end"?"left":"right");const L=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",A=f||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",N={top:F?"rotate(180deg)":"",left:F?"rotate(90deg)":"rotate(-90deg)",bottom:F?"":"rotate(180deg)",right:F?"rotate(-90deg)":"rotate(90deg)"}[I];return C.createElement("svg",bo({},m,{"aria-hidden":!0,ref:n,width:F?i:i+v,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[k]:L,[_]:P,[I]:M||F?"100%":"calc(100% - "+v/2+"px)",transform:""+N+(h??""),...p}}),v>0&&C.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:v+(f?0:1),d:A}),C.createElement("path",{stroke:v&&!f?m.fill:"none",d:A}),C.createElement("clipPath",{id:g},C.createElement("rect",{x:-T,y:T*(F?-1:1),width:i+v,height:i})))});function Qy(){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 Zy=C.createContext(null),Jy=C.createContext(null),Kn=()=>{var e;return((e=C.useContext(Zy))==null?void 0:e.id)||null},Yn=()=>C.useContext(Jy);function KD(e){const t=wo(),n=Yn(),o=Kn();return Ee(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function YD(e){const{children:t,id:n}=e,r=Kn();return C.createElement(Zy.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function qD(e){const{children:t}=e,n=C.useRef([]),r=C.useCallback(i=>{n.current=[...n.current,i]},[]),o=C.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=C.useState(()=>Qy())[0];return C.createElement(Jy.Provider,{value:C.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function qn(e){return"data-floating-ui-"+e}function xt(e){const t=b.useRef(e);return Ee(()=>{t.current=e}),t}const ev=qn("safe-polygon");function ou(e,t,n){return n&&!uo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function tv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=Yn(),p=Kn(),m=xt(c),g=xt(l),y=xt(n),x=C.useRef(),v=C.useRef(-1),T=C.useRef(),S=C.useRef(-1),E=C.useRef(!0),I=C.useRef(!1),O=C.useRef(()=>{}),F=C.useCallback(()=>{var A;const N=(A=o.current.openEvent)==null?void 0:A.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);C.useEffect(()=>{if(!a)return;function A(N){let{open:$}=N;$||(clearTimeout(v.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",A),()=>{s.off("openchange",A)}},[a,s]),C.useEffect(()=>{if(!a||!m.current||!n)return;function A($){F()&&r(!1,$,"hover")}const N=mt(i.floating).documentElement;return N.addEventListener("mouseleave",A),()=>{N.removeEventListener("mouseleave",A)}},[i.floating,n,r,a,m,F]);const M=C.useCallback(function(A,N,$){N===void 0&&(N=!0),$===void 0&&($="hover");const z=ou(g.current,"close",x.current);z&&!T.current?(clearTimeout(v.current),v.current=window.setTimeout(()=>r(!1,A,$),z)):N&&(clearTimeout(v.current),r(!1,A,$))},[g,r]),_=ut(()=>{O.current(),T.current=void 0}),k=ut(()=>{if(I.current){const A=mt(i.floating).body;A.style.pointerEvents="",A.removeAttribute(ev),I.current=!1}});C.useEffect(()=>{if(!a)return;function A(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(D){if(clearTimeout(v.current),E.current=!1,u&&!uo(x.current)||d>0&&!ou(g.current,"open"))return;const B=ou(g.current,"open",x.current);B?v.current=window.setTimeout(()=>{y.current||r(!0,D,"hover")},B):r(!0,D,"hover")}function $(D){if(A())return;O.current();const B=mt(i.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(v.current),T.current=m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){k(),_(),M(D,!0,"safe-polygon")}});const te=T.current;B.addEventListener("mousemove",te),O.current=()=>{B.removeEventListener("mousemove",te)};return}(x.current==="touch"?!et(i.floating,D.relatedTarget):!0)&&M(D)}function z(D){A()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){k(),_(),M(D)}})(D))}if(Ve(i.domReference)){var H;const D=i.domReference;return n&&D.addEventListener("mouseleave",z),(H=i.floating)==null||H.addEventListener("mouseleave",z),f&&D.addEventListener("mousemove",N,{once:!0}),D.addEventListener("mouseenter",N),D.addEventListener("mouseleave",$),()=>{var B;n&&D.removeEventListener("mouseleave",z),(B=i.floating)==null||B.removeEventListener("mouseleave",z),f&&D.removeEventListener("mousemove",N),D.removeEventListener("mouseenter",N),D.removeEventListener("mouseleave",$)}}},[i,a,e,u,d,f,M,_,k,r,n,y,h,g,m,o]),Ee(()=>{var A;if(a&&n&&(A=m.current)!=null&&A.__options.blockPointerEvents&&F()){const $=mt(i.floating).body;$.setAttribute(ev,""),$.style.pointerEvents="none",I.current=!0;const z=i.floating;if(Ve(i.domReference)&&z){var N;const H=i.domReference,D=h==null||(N=h.nodesRef.current.find(B=>B.id===p))==null||(N=N.context)==null?void 0:N.elements.floating;return D&&(D.style.pointerEvents=""),H.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{H.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,i,h,m,F]),Ee(()=>{n||(x.current=void 0,_(),k())},[n,_,k]),C.useEffect(()=>()=>{_(),clearTimeout(v.current),clearTimeout(S.current),k()},[a,i.domReference,_,k]);const L=C.useMemo(()=>{function A(N){x.current=N.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(N){const{nativeEvent:$}=N;function z(){!E.current&&!y.current&&r(!0,$,"hover")}u&&!uo(x.current)||n||d===0||(clearTimeout(S.current),x.current==="touch"?z():S.current=window.setTimeout(z,d))}}},[u,r,n,y,d]),P=C.useMemo(()=>({onMouseEnter(){clearTimeout(v.current)},onMouseLeave(A){M(A.nativeEvent,!1)}}),[M]);return C.useMemo(()=>a?{reference:L,floating:P}:{},[a,L,P])}function XD(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function vr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function QD(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),vr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let xo=new WeakMap,Xi=new WeakSet,Qi={},su=0;const ZD=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,nv=e=>e&&(e.host||nv(e.parentNode)),JD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=nv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ek(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=JD(t,e),a=new Set,l=new Set(i),c=[];Qi[o]||(Qi[o]=new WeakMap);const u=Qi[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(jn(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,g=m!==null&&m!=="false",y=(xo.get(p)||0)+1,x=(u.get(p)||0)+1;xo.set(p,y),u.set(p,x),c.push(p),y===1&&g&&Xi.add(p),x===1&&p.setAttribute(o,""),!g&&s&&p.setAttribute(s,"true")}})}return su++,()=>{c.forEach(h=>{const p=(xo.get(h)||0)-1,m=(u.get(h)||0)-1;xo.set(h,p),u.set(h,m),p||(!Xi.has(h)&&s&&h.removeAttribute(s),Xi.delete(h)),m||h.removeAttribute(o)}),su--,su||(xo=new WeakMap,xo=new WeakMap,Xi=new WeakSet,Qi={})}}function rv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=mt(e[0]).body;return ek(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const To=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ov(e,t){const n=vs(e,To());t==="prev"&&n.reverse();const r=n.indexOf(Gt(mt(e)));return n.slice(r+1)[0]}function sv(){return ov(document.body,"next")}function iv(){return ov(document.body,"prev")}function Es(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!et(n,r)}function tk(e){vs(e,To()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function nk(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 rk(e,t,n){const r=e.indexOf(t);function o(i){const a=qn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||et(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||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 ok;function av(e){e.key==="Tab"&&(e.target,clearTimeout(ok))}const Zi=C.forwardRef(function(t,n){const[r,o]=C.useState();Ee(()=>(jc()&&o("button"),document.addEventListener("keydown",av),()=>{document.removeEventListener("keydown",av)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[qn("focus-guard")]:"",style:iu};return C.createElement("span",bo({},t,s))}),lv=C.createContext(null),cv=qn("portal");function sk(e){e===void 0&&(e={});const{id:t,root:n}=e,r=wo(),o=uv(),[s,i]=C.useState(null),a=C.useRef(null);return Ee(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Ee(()=>{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(cv,""),l.appendChild(c),a.current=c,i(c)},[t,r]),Ee(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ve(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(cv,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function br(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=sk({id:n,root:r}),[i,a]=C.useState(null),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),d=C.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return C.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Es(p)&&(p.type==="focusin"?nk:tk)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),C.createElement(lv.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&C.createElement(Zi,{"data-type":"outside",ref:l,onFocus:h=>{if(Es(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=iv()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&C.createElement("span",{"aria-owns":s.id,style:iu}),s&&Bo.createPortal(t,s),f&&s&&C.createElement(Zi,{"data-type":"outside",ref:c,onFocus:h=>{if(Es(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=sv()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const uv=()=>C.useContext(lv),dv=20;let wr=[];function au(e){wr=wr.filter(n=>n.isConnected);let t=e;if(!(!t||jn(t)==="body")){if(!iD(t,To())){const n=vs(t,To())[0];n&&(t=n)}wr.push(t),wr.length>dv&&(wr=wr.slice(-dv))}}function fv(){return wr.slice().reverse().find(e=>e.isConnected)}const ik=C.forwardRef(function(t,n){return C.createElement("button",bo({},t,{type:"button",ref:n,tabIndex:-1,style:iu}))});function So(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:g,dataRef:y,floatingId:x,elements:{domReference:v,floating:T}}=t,S=typeof i=="number"&&i<0,E=xy(v)&&S,I=ZD()?s:!0,O=xt(o),F=xt(i),M=xt(a),_=Yn(),k=uv(),L=C.useRef(null),P=C.useRef(null),A=C.useRef(!1),N=C.useRef(!1),$=C.useRef(-1),z=k!=null,H=T==null?void 0:T.firstElementChild,D=(H==null?void 0:H.id)===x?H:T,B=ut(function(G){return G===void 0&&(G=D),G?vs(G,To()):[]}),X=ut(G=>{const V=B(G);return O.current.map(j=>v&&j==="reference"?v:D&&j==="floating"?D:V).filter(Boolean).flat()});C.useEffect(()=>{if(r||!c)return;function G(j){if(j.key==="Tab"){et(D,Gt(mt(D)))&&B().length===0&&!E&&wt(j);const W=X(),U=cn(j);O.current[0]==="reference"&&U===v&&(wt(j),j.shiftKey?Gn(W[W.length-1]):Gn(W[1])),O.current[1]==="floating"&&U===D&&j.shiftKey&&(wt(j),Gn(W[0]))}}const V=mt(D);return V.addEventListener("keydown",G),()=>{V.removeEventListener("keydown",G)}},[r,v,D,c,O,E,B,X]),C.useEffect(()=>{if(r||!T)return;function G(V){const j=cn(V),U=B().indexOf(j);U!==-1&&($.current=U)}return T.addEventListener("focusin",G),()=>{T.removeEventListener("focusin",G)}},[r,T,B]),C.useEffect(()=>{if(r||!d)return;function G(){N.current=!0,setTimeout(()=>{N.current=!1})}function V(j){const W=j.relatedTarget;queueMicrotask(()=>{const U=!(et(v,W)||et(T,W)||et(W,T)||et(k==null?void 0:k.portalNode,W)||W!=null&&W.hasAttribute(qn("focus-guard"))||_&&(vr(_.nodesRef.current,p).find(Y=>{var K,R;return et((K=Y.context)==null?void 0:K.elements.floating,W)||et((R=Y.context)==null?void 0:R.elements.domReference,W)})||XD(_.nodesRef.current,p).find(Y=>{var K,R;return((K=Y.context)==null?void 0:K.elements.floating)===W||((R=Y.context)==null?void 0:R.elements.domReference)===W})));if(l&&U&&Gt(mt(D))===mt(D).body){at(D)&&(D==null||D.focus());const Y=$.current,K=B(),R=K[Y]||K[K.length-1]||D;at(R)&&R.focus()}(E||!c)&&W&&U&&!N.current&&W!==fv()&&(A.current=!0,m(!1,j))})}if(T&&at(v))return v.addEventListener("focusout",V),v.addEventListener("pointerdown",G),T.addEventListener("focusout",V),()=>{v.removeEventListener("focusout",V),v.removeEventListener("pointerdown",G),T.removeEventListener("focusout",V)}},[r,v,T,D,c,p,_,k,m,d,l,B,E]),C.useEffect(()=>{var G;if(r)return;const V=Array.from((k==null||(G=k.portalNode)==null?void 0:G.querySelectorAll("["+qn("portal")+"]"))||[]);if(T){const j=[T,...V,L.current,P.current,O.current.includes("reference")||E?v:null].filter(U=>U!=null),W=c||E?rv(j,I,!I):rv(j);return()=>{W()}}},[r,v,T,c,O,k,E,I]),Ee(()=>{if(r||!at(D))return;const G=mt(D),V=Gt(G);queueMicrotask(()=>{const j=X(D),W=F.current,U=(typeof W=="number"?j[W]:W.current)||D,Y=et(D,V);!S&&!Y&&f&&Gn(U,{preventScroll:U===D})})},[r,f,D,S,X,F]),Ee(()=>{if(r||!D)return;let G=!1;const V=mt(D),j=Gt(V);let U=y.current.openEvent;const Y=h.domReference.current;au(j);function K(R){let{open:ue,reason:_e,event:$e,nested:Ke}=R;ue&&(U=$e),_e==="escape-key"&&h.domReference.current&&au(h.domReference.current),_e==="hover"&&$e.type==="mouseleave"&&(A.current=!0),_e==="outside-press"&&(Ke?(A.current=!1,G=!0):A.current=!(by($e)||Rc($e)))}return g.on("openchange",K),()=>{g.off("openchange",K);const R=Gt(V),ue=et(T,R)||_&&vr(_.nodesRef.current,p).some(ae=>{var ge;return et((ge=ae.context)==null?void 0:ge.elements.floating,R)});(ue||U&&["click","mousedown"].includes(U.type))&&h.domReference.current&&au(h.domReference.current);const $e=Y||j,Ke=vs(mt($e).body,To());queueMicrotask(()=>{let ae=fv();!ae&&at($e)&&T&&(ae=rk(Ke,$e,T)),M.current&&!A.current&&at(ae)&&(!(ae!==R&&R!==V.body)||ue)&&ae.focus({preventScroll:G})})}},[r,T,D,M,y,h,g,_,p]),Ee(()=>{if(!r&&k)return k.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{k.setFocusManagerState(null)}},[r,k,c,f,m,h,d]),Ee(()=>{if(r||!D||typeof MutationObserver!="function"||S)return;const G=()=>{const j=D.getAttribute("tabindex"),W=B(),U=Gt(mt(T)),Y=W.indexOf(U);Y!==-1&&($.current=Y),O.current.includes("floating")||U!==h.domReference.current&&W.length===0?j!=="0"&&D.setAttribute("tabindex","0"):j!=="-1"&&D.setAttribute("tabindex","-1")};G();const V=new MutationObserver(G);return V.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}},[r,T,D,h,O,B,S]);function te(G){return r||!u||!c?null:C.createElement(ik,{ref:G==="start"?L:P,onClick:V=>m(!1,V.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&I&&(c?!E:!0)&&(z||c);return C.createElement(C.Fragment,null,Q&&C.createElement(Zi,{"data-type":"inside",ref:k==null?void 0:k.beforeInsideRef,onFocus:G=>{if(c){const j=X();Gn(o[0]==="reference"?j[0]:j[j.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(A.current=!1,Es(G,k.portalNode)){const j=sv()||v;j==null||j.focus()}else{var V;(V=k.beforeOutsideRef.current)==null||V.focus()}}}),!E&&te("start"),n,te("end"),Q&&C.createElement(Zi,{"data-type":"inside",ref:k==null?void 0:k.afterInsideRef,onFocus:G=>{if(c)Gn(X()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(d&&(A.current=!0),Es(G,k.portalNode)){const j=iv()||v;j==null||j.focus()}else{var V;(V=k.afterOutsideRef.current)==null||V.focus()}}}))}const lu=new Set,ak=C.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=wo();return Ee(()=>{if(!r)return;lu.add(s);const i=/iP(hone|ad|od)|iOS/.test(Bc()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,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()=>{lu.delete(s),lu.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),C.createElement("div",bo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function hv(e){return at(e.target)&&e.target.tagName==="BUTTON"}function pv(e){return Hc(e)}function Eo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=C.useRef(),f=C.useRef(!1),h=C.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(uo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}uo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||hv(p))&&(p.key===" "&&!pv(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||hv(p)||pv(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return C.useMemo(()=>i?{reference:h}:{},[i,h])}function lk(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,d=i.height,f=i.x,h=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function mv(e){return e!=null&&e.clientX!=null}function ck(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=C.useRef(!1),f=C.useRef(null),[h,p]=C.useState(),[m,g]=C.useState([]),y=ut((E,I)=>{d.current||r.current.openEvent&&!mv(r.current.openEvent)||i.setPositionReference(lk(s,{x:E,y:I,axis:l,dataRef:r,pointerType:h}))}),x=ut(E=>{c!=null||u!=null||(n?f.current||g([]):y(E.clientX,E.clientY))}),v=uo(h)?o:n,T=C.useCallback(()=>{if(!v||!a||c!=null||u!=null)return;const E=Ot(o);function I(O){const F=cn(O);et(o,F)?(E.removeEventListener("mousemove",I),f.current=null):y(O.clientX,O.clientY)}if(!r.current.openEvent||mv(r.current.openEvent)){E.addEventListener("mousemove",I);const O=()=>{E.removeEventListener("mousemove",I),f.current=null};return f.current=O,O}i.setPositionReference(s)},[v,a,c,u,o,r,i,s,y]);C.useEffect(()=>T(),[T,m]),C.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),C.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),Ee(()=>{a&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[a,c,u,y]);const S=C.useMemo(()=>{function E(I){let{pointerType:O}=I;p(O)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:x,onMouseEnter:x}},[x]);return C.useMemo(()=>a?{reference:S}:{},[a,S])}const uk={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dk={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},gv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function xr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=Yn(),g=ut(typeof l=="function"?l:()=>!1),y=typeof l=="function"?g:l,x=C.useRef(!1),v=C.useRef(!1),{escapeKey:T,outsidePress:S}=gv(h),{escapeKey:E,outsidePress:I}=gv(p),O=ut(P=>{var A;if(!n||!i||!a||P.key!=="Escape")return;const N=(A=s.current.floatingContext)==null?void 0:A.nodeId,$=m?vr(m.nodesRef.current,N):[];if(!T&&(P.stopPropagation(),$.length>0)){let z=!0;if($.forEach(H=>{var D;if((D=H.context)!=null&&D.open&&!H.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,kM(P)?P.nativeEvent:P,"escape-key")}),F=ut(P=>{var A;const N=()=>{var $;O(P),($=cn(P))==null||$.removeEventListener("keydown",N)};(A=cn(P))==null||A.addEventListener("keydown",N)}),M=ut(P=>{var A;const N=x.current;x.current=!1;const $=v.current;if(v.current=!1,c==="click"&&$||N||typeof y=="function"&&!y(P))return;const z=cn(P),H="["+qn("inert")+"]",D=mt(o.floating).querySelectorAll(H);let B=Ve(z)?z:null;for(;B&&!zn(B);){const G=Pn(B);if(zn(G)||!Ve(G))break;B=G}if(D.length&&Ve(z)&&!FM(z)&&!et(z,o.floating)&&Array.from(D).every(G=>!et(B,G)))return;if(at(z)&&L){const G=z.clientWidth>0&&z.scrollWidth>z.clientWidth,V=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let j=V&&P.offsetX>z.clientWidth;if(V&&_t(z).direction==="rtl"&&(j=P.offsetX<=z.offsetWidth-z.clientWidth),j||G&&P.offsetY>z.clientHeight)return}const X=(A=s.current.floatingContext)==null?void 0:A.nodeId,te=m&&vr(m.nodesRef.current,X).some(G=>{var V;return Wc(P,(V=G.context)==null?void 0:V.elements.floating)});if(Wc(P,o.floating)||Wc(P,o.domReference)||te)return;const Q=m?vr(m.nodesRef.current,X):[];if(Q.length>0){let G=!0;if(Q.forEach(V=>{var j;if((j=V.context)!=null&&j.open&&!V.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),_=ut(P=>{var A;const N=()=>{var $;M(P),($=cn(P))==null||$.removeEventListener(c,N)};(A=cn(P))==null||A.addEventListener(c,N)});C.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function P($){r(!1,$,"ancestor-scroll")}const A=mt(o.floating);a&&A.addEventListener("keydown",E?F:O,E),y&&A.addEventListener(c,I?_:M,I);let N=[];return f&&(Ve(o.domReference)&&(N=Wn(o.domReference)),Ve(o.floating)&&(N=N.concat(Wn(o.floating))),!Ve(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(Wn(o.reference.contextElement)))),N=N.filter($=>{var z;return $!==((z=A.defaultView)==null?void 0:z.visualViewport)}),N.forEach($=>{$.addEventListener("scroll",P,{passive:!0})}),()=>{a&&A.removeEventListener("keydown",E?F:O,E),y&&A.removeEventListener(c,I?_:M,I),N.forEach($=>{$.removeEventListener("scroll",P)})}},[s,o,a,y,c,n,r,f,i,T,S,O,E,F,M,I,_]),C.useEffect(()=>{x.current=!1},[y,c]);const k=C.useMemo(()=>({onKeyDown:O,[uk[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[O,r,u,d]),L=C.useMemo(()=>({onKeyDown:O,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[dk[c]]:()=>{x.current=!0}}),[O,c]);return C.useMemo(()=>i?{reference:k,floating:L}:{},[i,k,L])}function fk(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=wo(),s=C.useRef({}),[i]=C.useState(()=>Qy()),a=Kn()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Ve(h)&&GD("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]=C.useState(r.reference),u=ut((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=C.useMemo(()=>({setPositionReference:c}),[]),f=C.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return C.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Tr(e){e===void 0&&(e={});const{nodeId:t}=e,n=fk({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=C.useState(null),[a,l]=C.useState(null),u=(o==null?void 0:o.reference)||s,d=C.useRef(null),f=Yn();Ee(()=>{u&&(d.current=u)},[u]);const h=ND({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(v=>{const T=Ve(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(T),h.refs.setReference(T)},[h.refs]),m=C.useCallback(v=>{(Ve(v)||v===null)&&(d.current=v,i(v)),(Ve(h.refs.reference.current)||h.refs.reference.current===null||v!==null&&!Ve(v))&&h.refs.setReference(v)},[h.refs]),g=C.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),y=C.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=C.useMemo(()=>({...h,...r,refs:g,elements:y,nodeId:t}),[h,g,y,t,r]);return Ee(()=>{r.dataRef.current.floatingContext=x;const v=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);v&&(v.context=x)}),C.useMemo(()=>({...h,context:x,refs:g,elements:y}),[h,g,y,x])}function hk(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=C.useRef(!1),u=C.useRef(),d=C.useRef(!0);C.useEffect(()=>{if(!a)return;const h=Ot(i.domReference);function p(){!n&&at(i.domReference)&&i.domReference===Gt(mt(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),C.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]),C.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=C.useMemo(()=>({onPointerDown(h){Rc(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=cn(h.nativeEvent);if(l&&Ve(p))try{if(jc()&&wy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Hc(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,g=Ve(p)&&p.hasAttribute(qn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=Gt(i.domReference?i.domReference.ownerDocument:document);!p&&x===i.domReference||et((y=s.current.floatingContext)==null?void 0:y.refs.floating.current,x)||et(i.domReference,x)||g||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return C.useMemo(()=>a?{reference:f}:{},[a,f])}const yv="active",vv="selected";function cu(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[yv]:i,[vv]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[yv,vv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(g=>g(...p)).find(g=>g!==void 0)}}}else i[c]=u}),i),{})}}function Sr(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=C.useCallback(a=>cu(a,e,"reference"),t),s=C.useCallback(a=>cu(a,e,"floating"),n),i=C.useCallback(a=>cu(a,e,"item"),r);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let bv=!1;function Ji(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function wv(e,t){return Ji(t,e===nu||e===xs,e===yo||e===vo)}function uu(e,t,n){return Ji(t,e===xs,n?e===yo:e===vo)||e==="Enter"||e===" "||e===""}function pk(e,t,n){return Ji(t,n?e===yo:e===vo,e===xs)}function xv(e,t,n){return Ji(t,n?e===vo:e===yo,e===nu)}function du(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:v="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:I,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||qi("`useListNavigation` looping must be enabled to allow escaping."),p||qi("`useListNavigation` must be virtual to allow escaping.")),v==="vertical"&&T>1&&qi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=Kn(),M=Yn(),_=ut(a),k=C.useRef(m),L=C.useRef(c??-1),P=C.useRef(null),A=C.useRef(!0),N=C.useRef(_),$=C.useRef(!!o.floating),z=C.useRef(n),H=C.useRef(!1),D=C.useRef(!1),B=xt(x),X=xt(n),te=xt(S),Q=xt(o.floating),G=xt(c),[V,j]=C.useState(),[W,U]=C.useState(),Y=ut(function(ae,ge,ie){ie===void 0&&(ie=!1);function be(we){p?(j(we.id),M==null||M.events.emit("virtualfocus",we),E&&(E.current=we)):Gn(we,{preventScroll:!0,sync:wy()&&jc()?bv||H.current:!1})}const Qe=ae.current[ge.current];Qe&&be(Qe),requestAnimationFrame(()=>{const we=ae.current[ge.current]||Qe;if(!we)return;Qe||be(we);const nt=te.current;nt&&R&&(ie||!A.current)&&(we.scrollIntoView==null||we.scrollIntoView(typeof nt=="boolean"?{block:"nearest",inline:"nearest"}:nt))})});Ee(()=>{document.createElement("div").focus({get preventScroll(){return bv=!0,!1}})},[]),Ee(()=>{l&&(n&&o.floating?k.current&&c!=null&&(D.current=!0,L.current=c,_(c)):$.current&&(L.current=-1,N.current(null)))},[l,n,o.floating,c,_]),Ee(()=>{if(l&&n&&o.floating)if(i==null){if(H.current=!1,G.current!=null)return;if($.current&&(L.current=-1,Y(s,L)),(!z.current||!$.current)&&k.current&&(P.current!=null||k.current===!0&&P.current==null)){let ae=0;const ge=()=>{s.current[0]==null?(ae<2&&(ae?requestAnimationFrame:queueMicrotask)(ge),ae++):(L.current=P.current==null||uu(P.current,v,h)||f?ru(s,B.current):Hy(s,B.current),P.current=null,_(L.current))};ge()}}else Ts(s,i)||(L.current=i,Y(s,L,D.current),D.current=!1)},[l,n,o.floating,i,G,f,s,v,h,_,Y,B]),Ee(()=>{var ae;if(!l||o.floating||!M||p||!$.current)return;const ge=M.nodesRef.current,ie=(ae=ge.find(we=>we.id===F))==null||(ae=ae.context)==null?void 0:ae.elements.floating,be=Gt(mt(o.floating)),Qe=ge.some(we=>we.context&&et(we.context.elements.floating,be));ie&&!Qe&&A.current&&ie.focus({preventScroll:!0})},[l,o.floating,M,F,p]),Ee(()=>{if(!l||!M||!p||F)return;function ae(ge){U(ge.id),E&&(E.current=ge)}return M.events.on("virtualfocus",ae),()=>{M.events.off("virtualfocus",ae)}},[l,M,p,F,E]),Ee(()=>{N.current=_,$.current=!!o.floating}),Ee(()=>{n||(P.current=null)},[n]),Ee(()=>{z.current=n},[n]);const K=i!=null,R=C.useMemo(()=>{function ae(ie){if(!n)return;const be=s.current.indexOf(ie);be!==-1&&_(be)}return{onFocus(ie){let{currentTarget:be}=ie;ae(be)},onClick:ie=>{let{currentTarget:be}=ie;return be.focus({preventScroll:!0})},...g&&{onMouseMove(ie){let{currentTarget:be}=ie;ae(be)},onPointerLeave(ie){let{pointerType:be}=ie;!A.current||be==="touch"||(L.current=-1,Y(s,L),_(null),p||Gn(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,g,s,_,p]),ue=ut(ae=>{if(A.current=!1,H.current=!0,!X.current&&ae.currentTarget===Q.current)return;if(f&&xv(ae.key,v,h)){wt(ae),r(!1,ae.nativeEvent,"list-navigation"),at(o.domReference)&&!p&&o.domReference.focus();return}const ge=L.current,ie=ru(s,x),be=Hy(s,x);if(ae.key==="Home"&&(wt(ae),L.current=ie,_(L.current)),ae.key==="End"&&(wt(ae),L.current=be,_(L.current)),T>1){const Qe=I||Array.from({length:s.current.length},()=>({width:1,height:1})),we=$D(Qe,T,O),nt=we.findIndex(oe=>oe!=null&&!Yi(s.current,oe,x)),Z=we.reduce((oe,Te,je)=>Te!=null&&!Yi(s.current,Te,x)?je:oe,-1);if(L.current=we[VD({current:we.map(oe=>oe!=null?s.current[oe]:null)},{event:ae,orientation:v,loop:d,cols:T,disabledIndices:RD([...x||s.current.map((oe,Te)=>Yi(s.current,Te)?Te:void 0),void 0],we),minIndex:nt,maxIndex:Z,prevIndex:BD(L.current>be?ie:L.current,Qe,we,T,ae.key===xs?"bl":ae.key===vo?"tr":"tl"),stopEvent:!0})],_(L.current),v==="both")return}if(wv(ae.key,v)){if(wt(ae),n&&!p&&Gt(ae.currentTarget.ownerDocument)===ae.currentTarget){L.current=uu(ae.key,v,h)?ie:be,_(L.current);return}uu(ae.key,v,h)?d?L.current=ge>=be?u&&ge!==s.current.length?-1:ie:Ct(s,{startingIndex:ge,disabledIndices:x}):L.current=Math.min(be,Ct(s,{startingIndex:ge,disabledIndices:x})):d?L.current=ge<=ie?u&&ge!==-1?s.current.length:be:Ct(s,{startingIndex:ge,decrement:!0,disabledIndices:x}):L.current=Math.max(ie,Ct(s,{startingIndex:ge,decrement:!0,disabledIndices:x})),Ts(s,L.current)?_(null):_(L.current)}}),_e=C.useMemo(()=>p&&n&&K&&{"aria-activedescendant":W||V},[p,n,K,W,V]),$e=C.useMemo(()=>({"aria-orientation":v==="both"?void 0:v,...!xy(o.domReference)&&_e,onKeyDown:ue,onPointerMove(){A.current=!0}}),[_e,ue,o.domReference,v]),Ke=C.useMemo(()=>{function ae(ie){m==="auto"&&by(ie.nativeEvent)&&(k.current=!0)}function ge(ie){k.current=m,m==="auto"&&Rc(ie.nativeEvent)&&(k.current=!0)}return{..._e,onKeyDown(ie){A.current=!1;const be=ie.key.indexOf("Arrow")===0,Qe=pk(ie.key,v,h),we=xv(ie.key,v,h),nt=wv(ie.key,v),Z=(f?Qe:nt)||ie.key==="Enter"||ie.key.trim()==="";if(p&&n){const se=M==null?void 0:M.nodesRef.current.find(Ce=>Ce.parentId==null),Se=M&&se?QD(M.nodesRef.current,se.id):null;if(be&&Se&&E){const Ce=new KeyboardEvent("keydown",{key:ie.key,bubbles:!0});if(Qe||we){var oe,Te;const Ut=((oe=Se.context)==null?void 0:oe.elements.domReference)===ie.currentTarget,tr=we&&!Ut?(Te=Se.context)==null?void 0:Te.elements.domReference:Qe?s.current.find(In=>(In==null?void 0:In.id)===V):null;tr&&(wt(ie),tr.dispatchEvent(Ce),U(void 0))}if(nt&&Se.context&&Se.context.open&&Se.parentId&&ie.currentTarget!==Se.context.elements.domReference){var je;wt(ie),(je=Se.context.elements.domReference)==null||je.dispatchEvent(Ce);return}}return ue(ie)}if(!(!n&&!y&&be)){if(Z&&(P.current=f&&nt?null:ie.key),f){Qe&&(wt(ie),n?(L.current=ru(s,B.current),_(L.current)):r(!0,ie.nativeEvent,"list-navigation"));return}nt&&(c!=null&&(L.current=c),wt(ie),!n&&y?r(!0,ie.nativeEvent,"list-navigation"):ue(ie),n&&_(L.current))}},onFocus(){n&&!p&&_(null)},onPointerDown:ge,onMouseDown:ae,onClick:ae}},[V,_e,ue,B,m,s,f,_,r,n,y,v,h,c,M,p,E]);return C.useMemo(()=>l?{reference:Ke,floating:$e,item:R}:{},[l,Ke,$e,R])}const mk=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Er(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=mk.get(i))!=null?n:i,l=wo(),u=Kn()!=null,d=C.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),f=C.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=C.useCallback(p=>{let{active:m,selected:g}=p;const y={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...y,"aria-selected":m&&g};case"combobox":return{...y,...m&&{"aria-selected":!0}}}return{}},[o,i]);return C.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const Tv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Co(e,t){return typeof e=="function"?e(t):e}function gk(e,t){const[n,r]=C.useState(e);return e&&!n&&r(!0),C.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function yk(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=C.useState("unmounted"),c=gk(n,i);return!c&&a==="close"&&l("unmounted"),Ee(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Sv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=C.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=C.useState(()=>({...Co(s,c),...Co(n,c)})),{isMounted:m,status:g}=yk(e,{duration:i}),y=xt(n),x=xt(r),v=xt(o),T=xt(s);return Ee(()=>{const S=Co(y.current,c),E=Co(v.current,c),I=Co(T.current,c),O=Co(x.current,c)||Object.keys(S).reduce((F,M)=>(F[M]="",F),{});if(g==="initial"&&p(F=>({transitionProperty:F.transitionProperty,...I,...S})),g==="open"&&p({transitionProperty:Object.keys(O).map(Tv).join(","),transitionDuration:d+"ms",...I,...O}),g==="close"){const F=E||S;p({transitionProperty:Object.keys(F).map(Tv).join(","),transitionDuration:f+"ms",...I,...F})}},[f,v,y,x,T,d,g,c]),{isMounted:m,styles:h}}function vk(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=C.useRef(),m=C.useRef(""),g=C.useRef((n=h??i)!=null?n:-1),y=C.useRef(null),x=ut(a),v=ut(l),T=xt(u),S=xt(f);Ee(()=>{r&&(clearTimeout(p.current),y.current=null,m.current="")},[r]),Ee(()=>{if(r&&m.current===""){var M;g.current=(M=h??i)!=null?M:-1}},[r,h,i]);const E=ut(M=>{M?o.current.typing||(o.current.typing=M,v(M)):o.current.typing&&(o.current.typing=M,v(M))}),I=ut(M=>{function _(N,$,z){const H=T.current?T.current($,z):$.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return H?N.indexOf(H):-1}const k=s.current;if(m.current.length>0&&m.current[0]!==" "&&(_(k,k,m.current)===-1?E(!1):M.key===" "&&wt(M)),k==null||S.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;r&&M.key!==" "&&(wt(M),E(!0)),k.every(N=>{var $,z;return N?(($=N[0])==null?void 0:$.toLocaleLowerCase())!==((z=N[1])==null?void 0:z.toLocaleLowerCase()):!0})&&m.current===M.key&&(m.current="",g.current=y.current),m.current+=M.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",g.current=y.current,E(!1)},d);const P=g.current,A=_(k,[...k.slice((P||0)+1),...k.slice(0,(P||0)+1)],m.current);A!==-1?(x(A),y.current=A):M.key!==" "&&(m.current="",E(!1))}),O=C.useMemo(()=>({onKeyDown:I}),[I]),F=C.useMemo(()=>({onKeyDown:I,onKeyUp(M){M.key===" "&&E(!1)}}),[I,E]);return C.useMemo(()=>c?{reference:O,floating:F}:{},[c,O,F])}function Ev(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function bk(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Cv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,g=f-a,x=Math.sqrt(m*m+g*g)/p;return i=d,a=f,l=h,x}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:g,nodeId:y,tree:x}=d;return function(T){function S(){clearTimeout(o),g()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:I}=T,O=[E,I],F=cn(T),M=T.type==="mouseleave",_=et(m.floating,F),k=et(m.domReference,F),L=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),A=p.split("-")[0],N=f>P.right-P.width/2,$=h>P.bottom-P.height/2,z=bk(O,L),H=P.width>L.width,D=P.height>L.height,B=(H?L:P).left,X=(H?L:P).right,te=(D?L:P).top,Q=(D?L:P).bottom;if(_&&(s=!0,!M))return;if(k&&(s=!1),k&&!M){s=!0;return}if(M&&Ve(T.relatedTarget)&&et(m.floating,T.relatedTarget)||x&&vr(x.nodesRef.current,y).some(j=>{let{context:W}=j;return W==null?void 0:W.open}))return;if(A==="top"&&h>=L.bottom-1||A==="bottom"&&h<=L.top+1||A==="left"&&f>=L.right-1||A==="right"&&f<=L.left+1)return S();let G=[];switch(A){case"top":G=[[B,L.top+1],[B,P.bottom-1],[X,P.bottom-1],[X,L.top+1]];break;case"bottom":G=[[B,P.top+1],[B,L.bottom-1],[X,L.bottom-1],[X,P.top+1]];break;case"left":G=[[P.right-1,Q],[P.right-1,te],[L.left+1,te],[L.left+1,Q]];break;case"right":G=[[L.right-1,Q],[L.right-1,te],[P.left+1,te],[P.left+1,Q]];break}function V(j){let[W,U]=j;switch(A){case"top":{const Y=[H?W+t/2:N?W+t*4:W-t*4,U+t+1],K=[H?W-t/2:N?W+t*4:W-t*4,U+t+1],R=[[P.left,N||H?P.bottom-t:P.top],[P.right,N?H?P.bottom-t:P.top:P.bottom-t]];return[Y,K,...R]}case"bottom":{const Y=[H?W+t/2:N?W+t*4:W-t*4,U-t],K=[H?W-t/2:N?W+t*4:W-t*4,U-t],R=[[P.left,N||H?P.top+t:P.bottom],[P.right,N?H?P.top+t:P.bottom:P.top+t]];return[Y,K,...R]}case"left":{const Y=[W+t+1,D?U+t/2:$?U+t*4:U-t*4],K=[W+t+1,D?U-t/2:$?U+t*4:U-t*4];return[...[[$||D?P.right-t:P.left,P.top],[$?D?P.right-t:P.left:P.right-t,P.bottom]],Y,K]}case"right":{const Y=[W-t,D?U+t/2:$?U+t*4:U-t*4],K=[W-t,D?U-t/2:$?U+t*4:U-t*4],R=[[$||D?P.left+t:P.right,P.top],[$?D?P.left+t:P.right:P.left+t,P.bottom]];return[Y,K,...R]}}}if(!Ev([E,I],G)){if(s&&!z)return S();if(!M&&r){const j=c(T.clientX,T.clientY);if(j!==null&&j<.1)return S()}Ev([E,I],V([f,h]))?!s&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Po=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),s=b.useMemo(()=>[ws(10),eu({fallbackAxisSideDirection:"end"}),Jc(),zy({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Tr({open:n,middleware:s,transform:!0,whileElementsMounted:bs,onOpenChange:(p,m)=>{var y;const g=m==null?void 0:m.relatedTarget;g&&g.dataset.floating==="true"&&!p||(r(p),(y=e.onChange)==null||y.call(e,p))}}),c=Eo(l),u=xr(l),d=Er(l),{getReferenceProps:f,getFloatingProps:h}=Sr([c,u,d]);return w.jsxs(b.Fragment,{children:[w.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(br,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(So,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:w.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[w.jsx(Xy,{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]})})})]})},wk=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=b.useState(!1),{context:a,refs:l}=Tr({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=Eo(a),u=Er(a),d=xr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Sr([c,u,d]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(Wr,{...h(e),as:pt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:w.jsx(pt.span,{layoutId:o,children:e.trigger})}),w.jsx(to,{children:s?w.jsx(br,{root:t,children:w.jsx(So,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(pt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Pv=300,xk=500,Iv=(e="")=>Me("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),fu=b.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Ov=b.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=Kn(),c=l!==null,[u,d]=b.useState(!1),[f,h]=b.useState(!1),[p,m]=b.useState(null),g=b.useRef([]),y=b.useRef([]),x=b.useContext(fu),v=Yn(),T=KD(),S=Ky(),{floatingStyles:E,refs:I,context:O}=Tr({nodeId:T,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:bs,placement:c?"right":"bottom-start",middleware:[ws({mainAxis:c?0:4,alignmentAxis:c?-4:0}),eu(),Jc()]}),F=Er(O,{role:"menu",enabled:!0}),M=xr(O,{bubbles:!0}),_=tv(O,{enabled:n,delay:{open:Pv},handleClose:Cv({blockPointerEvents:!0,buffer:1})}),k=Eo(O,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),L=du(O,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:g,scrollItemIntoView:!0,onNavigate:m}),P=vk(O,{activeIndex:p,listRef:y,resetMs:xk,onMatch:u?m:void 0}),{getReferenceProps:A,getFloatingProps:N,getItemProps:$}=Sr([_,k,F,M,L,P]);b.useEffect(()=>{if(!v)return;const H=()=>d(!1),D=B=>{B.nodeId!==T&&B.parentId===l&&d(!1)};return v.events.on("click",H),v.events.on("menuopen",D),()=>{v.events.off("click",H),v.events.off("menuopen",D)}},[v,T,l]),b.useEffect(()=>{u&&v&&v.events.emit("menuopen",{parentId:l,nodeId:T})},[v,u,T,l]);const z=r?i.className:Me(Iv(i.className));return w.jsxs(YD,{id:T,children:[w.jsx(b.Fragment,{children:i.asChild?w.jsx(co,{children:s,ref:tu([I.setReference,S.ref,a]),tabIndex:c?x.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":f?"":void 0,className:z,...A(x.getItemProps({...i,onFocus(H){var D;(D=i.onFocus)==null||D.call(i,H),h(!1),x.setHasFocusInside(!0)}}))}):w.jsxs("button",{type:"button",ref:tu([I.setReference,S.ref,a]),tabIndex:c?x.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":f?"":void 0,className:z,...A(x.getItemProps({...i,onFocus(H){var D;(D=i.onFocus)==null||D.call(i,H),h(!1),x.setHasFocusInside(!0)}})),children:[s,c&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(oc,{size:14})]})]})}),w.jsx(fu.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:$,setHasFocusInside:h,isOpen:u},children:w.jsx(WD,{elementsRef:g,labelsRef:y,children:u&&w.jsx(br,{preserveTabOrder:!0,children:w.jsx(So,{context:O,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:w.jsx(t,{...N(),ref:I.setFloating,style:{...i.style,...E},className:Me("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),Tk=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=b.useContext(fu),a=Ky({label:r?null:typeof e=="string"?e:t}),l=Yn(),c=a.index===i.activeIndex;return w.jsxs("button",{...o,ref:tu([a.ref,s]),"data-active":c,"data-open":i.isOpen,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Iv(o.className),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),Sk=b.forwardRef((e,t)=>Kn()!==null?w.jsx(Ov,{...e,isParent:!1,ref:t}):w.jsx(qD,{children:w.jsx(Ov,{...e,isParent:!0,ref:t})})),Ek=(e,t)=>Di()?t:window.matchMedia(e).matches,Ck=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(Ek(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},Kt="600ms",Pk={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:Kt},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:Kt},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:Kt}},Ik={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:Kt},exit:{translateX:["0%","30%"],opacity:0,animationDuration:Kt}},hu={drawer:e=>e==="left"?Pk:Ik,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:Kt,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:Kt,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:Kt,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:Kt},enter:{opacity:1,scale:[1.05,1],animationDuration:Kt},exit:{opacity:0,scale:.97,animationDuration:Kt}}},Ok=kr("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"}}),Ak={top:0,left:0,right:0,bottom:-1},Mk=e=>e*.62,Dk=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=Mk(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.jsx(pt.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:Ak,whileDrag:{cursor:"grabbing"},className:Me("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},pu={drawer:"right",sheet:"none",dialog:"none"},kk=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=b.useId(),a=b.useId(),l=Ck("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:pu[e]:r?pu[e]:pu.sheet,d=l||r?hu[e]:hu.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=Tr({open:s.open,onOpenChange:s.onChange}),g=Eo(m),y=Er(m),x=xr(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:v,getFloatingProps:T}=Sr([g,y,x]),S=s.trigger,E=dr(void 0),I=()=>s.onChange(!1);return w.jsxs(b.Fragment,{children:[s.trigger?w.jsx(b.Fragment,{children:s.asChild?w.jsx(co,{ref:p.setReference,...v({layoutId:s.layoutId}),children:S}):w.jsx(pt.button,{ref:p.setReference,...v(),layoutId:s.layoutId,type:"button",children:S})}):null,w.jsx(br,{children:w.jsx(to,{presenceAffectsLayout:!0,children:s.open?w.jsx(ak,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"flex items-start justify-center p-10"}`,children:w.jsx(So,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(pt.div,{exit:"exit",animate:"enter",initial:"initial",variants:f,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:Ok({position:u,type:h}),style:h==="drawer"?{width:E}:{height:E},...T(),children:[s.title?w.jsx("header",{className:"relative w-full",children:s.title?w.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:I,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(ic,{})})}):null,c&&t?w.jsx(Dk,{onChange:s.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})}):null})})]})},Fk=e=>w.jsx(pt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Av=({as:e,title:t,children:n,placement:r,focus:o=!0,hover:s=!0,enabled:i=!0,popover:a=!0,followCursor:l=!1,...c})=>{const[u,d]=b.useState(!1),f=b.useRef(null),h=e||"span",{refs:p,floatingStyles:m,context:g}=Tr({open:u,placement:r,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:bs,middleware:[Jc(),ws(5),eu({fallbackAxisSideDirection:"start"}),zy({padding:5,element:f})]}),y=tv(g,{move:!0,delay:{open:Pv},enabled:i?s:!1,handleClose:a?Cv():null}),x=hk(g,{enabled:i?o:!1}),v=Eo(g,{enabled:i?a:!1}),T=xr(g,{enabled:i}),S=Er(g,{role:"tooltip",enabled:i}),E=ck(g,{enabled:!!i&&!!l}),{getReferenceProps:I,getFloatingProps:O}=Sr([S,T,E,o?x:void 0,s?y:void 0,a?v:void 0]);return w.jsxs(b.Fragment,{children:[w.jsx(h,{ref:p.setReference,...I(c),children:t}),w.jsx(br,{preserveTabOrder:!0,children:u&&w.jsxs(zr,{...O(),ref:p.setFloating,style:m,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(Xy,{ref:f,context:g,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class ea{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)ea.getDescendantProperty(a[l],s,r);else s&&ea.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Cr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Cr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=ea.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Cr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Cr.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 Cr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const Mv=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>w.jsxs("div",{className:Me("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx(Av,{as:"button",type:"button",title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(Fm,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:w.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?w.jsxs(b.Fragment,{children:[w.jsx(Dm,{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(SP,{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]}),Cs=b.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,componentName:m,placeholder:g,hideLeft:y=!1,required:x,disabled:v},T)=>{const S=d??h,E=bt(),I=e??E.inputOptionalLabel;return w.jsxs("fieldset",{ref:T,form:u,disabled:v,"data-error":!!c,"aria-disabled":v,"data-component":m,"data-interactive":!!s,className:Me("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[w.jsxs("label",{form:u,htmlFor:S,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[w.jsx(Mv,{info:a,hideLeft:y,reportStatus:!0,title:p,placeholder:g,children:I||n?w.jsxs(b.Fragment,{children:[x?null:w.jsx("span",{"aria-disabled":v,className:"text-opacity-70 aria-disabled:text-disabled",children:I}),n?w.jsx(b.Fragment,{children:n}):null]}):null}),w.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?w.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?w.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),w.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),w.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),Nk=e=>w.jsx(b.Fragment,{children:e.children}),Dv=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??Nk,a=r.label??r.value;return r.hidden?null:w.jsx("li",{...o,ref:s,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsxs("button",{type:"button","aria-busy":r.disabled,"aria-checked":t,"aria-current":t,"aria-selected":t,onClick:n,"data-value":r.value,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary-hover text-primary-foreground":""} ${e?"bg-primary text-primary-foreground":""}`,children:[w.jsx(i,{...o,label:r.label,value:r.value,children:a}),t?w.jsx("span",{children:w.jsx(Mm,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),Lk={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},_k={caseSensitive:!1,sort:!1},Vk=[],$k=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const g=b.useRef(null),y=p.value??p.defaultValue??"",x=bt(),[v,T]=b.useState(!1),[S,E]=b.useState(""),[I,O]=b.useState(y),[F,M]=b.useState(()=>{var K;return((K=e.find(R=>R.value===y))==null?void 0:K.label)??y}),[_,k]=b.useState(null),L=b.useRef(Vk),P=t&&S!==""?[{value:S,label:S,"data-dynamic":"true"},...e]:e,A=new Cr(P,["value","label"],_k).search(S),N=t?void 0:`^(${e.map(K=>`${gs(K.value)}${K.label?"|"+gs(K.label):""}`).join("|")})$`;b.useEffect(()=>{if(p.value){const K=e.find(R=>R.value===p.value);O((K==null?void 0:K.label)??p.value)}},[p.value]);const{x:$,y:z,strategy:H,refs:D,context:B}=Tr({open:v,transform:!0,strategy:"absolute",onOpenChange:T,whileElementsMounted:bs,middleware:[ws(4),jy({elementContext:"reference",padding:10,apply(K){var ue;const R=(ue=g.current)==null?void 0:ue.getBoundingClientRect().width;Object.assign(K.elements.floating.style,{width:`${R}px`,maxWidth:`${R}px`,maxHeight:`${Math.min(250,K.availableHeight)}px`})}})]}),X=Sv(B,Lk),{getReferenceProps:te,getFloatingProps:Q,getItemProps:G}=Sr([Er(B,{role:"listbox"}),xr(B),du(B,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:_,selectedIndex:_,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:K=>k(R=>K??R)})]);b.useEffect(()=>{const K=D.reference.current;if(K)return Zs(K)},[]);const V=(K,R)=>{O(K.value);const ue=D.reference.current;if(!ue)return;ue==null||ue.setAttribute("data-value",K.value),ue.value=K.value;const _e=new Event("change",{bubbles:!1,cancelable:!0});ue.dispatchEvent(_e),p.onChange&&p.onChange(_e),M(K.label??""),T(!1),E(""),k(R)},j=K=>{var ue;const R=K.target.value;return E(R),!v&&R===""?T(!0):(K.target.name=p.name||"",R?T(!0):(ue=p.onChange)==null?void 0:ue.call(p,K))},W=()=>{T(!0),E("")},U=()=>{var K;E(""),O(""),(K=D.reference.current)==null||K.setAttribute("data-value",""),M(""),Qa(D.reference.current),T(!1)},Y=p.id||p.name;return w.jsxs(Cs,{...p,left:d,error:f,ref:g,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[w.jsx(rc,{size:20}),w.jsx("span",{className:"sr-only",children:x.inputCaretDown})]}),I?w.jsx("button",{type:"button",onClick:U,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",{...te({...p,onChange:j,onFocus:W,pattern:N,ref:D.setReference,name:`${Y}-shadow`,id:`${Y}-shadow`,onClick:K=>K.currentTarget.focus(),onKeyDown(K){if(K.key==="Escape")return K.currentTarget.blur(),T(!1);if(K.key==="Enter"){if(_!==null&&A[_])return K.preventDefault(),V(A[_],_);if(A.length===1)return K.preventDefault(),V(A[0],0)}}}),"data-value":I,"data-error":!!f,"data-name":Y,"data-target":Y,required:h,value:v?S:F||I,"aria-autocomplete":"list",autoComplete:"off",className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",p.className)}),w.jsx("input",{id:Y,name:Y,type:"hidden","data-origin":Y,ref:m,required:h,defaultValue:p.value||I||void 0}),w.jsx(br,{preserveTabOrder:!0,children:v?w.jsx(So,{guards:!0,returnFocus:!1,context:B,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsxs("ul",{...Q({ref:D.setFloating,style:{position:H,left:($??0)+(I?26:16),top:z??0,...X.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[A.map((K,R)=>{const ue=I===K.value||I===K.label;return w.jsx(Dv,{...G({onClick:()=>V(K,R),ref:_e=>void(L.current[R]=_e),selected:_===R}),option:K,active:ue,selected:_===R},`${K.value}-option`)}),A.length===0?w.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:o||x.autocompleteEmpty})}):null]})}):null})]})});function Io(e,t,n){let r=n.initialDeps??[],o;return()=>{var s,i,a,l;let c;n.key&&((s=n.debug)!=null&&s.call(n))&&(c=Date.now());const u=e();if(!(u.length!==r.length||u.some((h,p)=>r[p]!==h)))return o;r=u;let f;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(f=Date.now()),o=t(...u),n.key&&((a=n.debug)!=null&&a.call(n))){const h=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-f)*100)/100,m=p/16,g=(y,x)=>{for(y=String(y);y.length<x;)y=" "+y;return y};console.info(`%c⏱ ${g(p,5)} /${g(h,5)} ms`,`
178
- font-size: .6rem;
179
- font-weight: bold;
180
- color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,o),o}}function mu(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Bk=(e,t)=>Math.abs(e-t)<1,Rk=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,o),n)}},jk=e=>e,zk=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},Wk=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=i=>{const{width:a,height:l}=i;t({width:Math.round(a),height:Math.round(l)})};if(o(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const s=new r.ResizeObserver(i=>{const a=i[0];if(a!=null&&a.borderBoxSize){const l=a.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(n.getBoundingClientRect())});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},kv={passive:!0},Hk=typeof window>"u"?!0:"onscrollend"in window,Uk=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const s=e.options.useScrollendEvent&&Hk?()=>{}:Rk(r,()=>{t(o,!1)},e.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:u,isRtl:d}=e.options;o=u?n.scrollLeft*(d&&-1||1):n.scrollTop,s(),t(o,c)},a=i(!0),l=i(!1);return l(),n.addEventListener("scroll",a,kv),n.addEventListener("scrollend",l,kv),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},Gk=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Kk=(e,{adjustments:t=0,behavior:n},r)=>{var o,s;const i=e+t;(s=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||s.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class Yk{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var o;(o=r())==null||o.disconnect(),n=null},observe:o=>{var s;return(s=r())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:o=>{var s;return(s=r())==null?void 0:s.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:jk,rangeExtractor:zk,onChange:()=>{},measureElement:Gk,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...n}},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Io(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const o=new Map,s=new Map;for(let i=r-1;i>=0;i--){const a=n[i];if(o.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((i,a)=>i.end===a.end?i.index-a.index:i.end-a.end)[0]:void 0},this.getMeasurementOptions=Io(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,o,s,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i}),{key:!1}),this.getMeasurements=Io(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:s,enabled:i},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let u=l;u<n;u++){const d=s(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),h=f?f.end+this.options.gap:r+o,p=a.get(d),m=typeof p=="number"?p:this.options.estimateSize(u),g=h+m,y=f?f.lane:u%this.options.lanes;c[u]={index:u,start:h,size:m,end:g,key:d,lane:y}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Io(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(n,r,o)=>this.range=n.length>0&&r>0?qk({measurements:n,outerSize:r,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Io(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,o,s)=>r===null?[]:n({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:s}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const o=this.indexFromElement(n),s=this.measurementsCache[o];if(!s)return;const i=s.key,a=this.elementsCache.get(i);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(i,n)),n.isConnected&&this.resizeItem(o,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const o=this.measurementsCache[n];if(!o)return;const s=this.itemSizeCache.get(o.key)??o.size,i=r-s;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,o)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(o))});return}this._measureElement(n,void 0)},this.getVirtualItems=Io(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let s=0,i=n.length;s<i;s++){const a=n[s],l=r[a];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return mu(r[Fv(0,r.length-1,o=>mu(r[o]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const o=this.getSize(),s=this.getScrollOffset();r==="auto"&&n>=s+o&&(r="end"),r==="end"&&(n-=o);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.measurementsCache[n];if(!o)return;const s=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(o.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const a=o.start-this.options.scrollPaddingStart+(o.size-s)/2;switch(r){case"center":return[this.getOffsetForAlignment(a,r),r];case"end":return[this.getOffsetForAlignment(o.end+this.options.scrollPaddingEnd,r),r];default:return[this.getOffsetForAlignment(o.start-this.options.scrollPaddingStart,r),r]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:r="auto",behavior:o}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(n,r);if(!s)return;const[i,a]=s;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const[c]=mu(this.getOffsetForIndex(n,a));Bk(c,this.getScrollOffset())||this.scrollToIndex(n,{align:a,behavior:o})}else this.scrollToIndex(n,{align:a,behavior:o})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const Fv=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,s=n(o);if(s<r)e=o+1;else if(s>r)t=o-1;else return o}return e>0?e-1:0};function qk({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,s=Fv(0,r,a=>e[a].start,n);let i=s;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:s,endIndex:i}}const Nv=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Xk(e){const t=C.useReducer(()=>({}),{})[1],n={...e,onChange:(o,s)=>{var i;s?$o.flushSync(t):t(),(i=e.onChange)==null||i.call(e,o,s)}},[r]=C.useState(()=>new Yk(n));return r.setOptions(n),Nv(()=>r._didMount(),[]),Nv(()=>r._willUpdate()),r}function Qk(e){return Xk({observeElementRect:Wk,observeElementOffset:Uk,scrollToFn:Kk,...e})}const Zk=e=>w.jsx(b.Fragment,{children:e.children}),Jk={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},Lv=16,eF=10,tF={caseSensitive:!1,sort:!1},nF=e=>{const[t,n]=b.useState(44),r=e.virtualItem.index,o=e.option,s=o.Render??Zk,i=o.label??o.value,a=r===e.selectedIndex,l=e.activeIndex===r;return w.jsx("li",{id:`item-${r}`,"data-index":r,tabIndex:-1,ref:c=>{e.listElementsRef.current[r]=c},role:"option","aria-selected":l,"aria-setsize":e.size,"aria-posinset":r+1,...e.getItemProps({onClick:e.handleSelect,style:{height:`${t}px`,transform:`translateY(${e.virtualItem.start}px)`}}),children:w.jsxs("button",{type:"button","aria-checked":l,"aria-current":l,"aria-selected":l,"data-value":o.value,"aria-busy":o.disabled,className:`flex w-full max-w-full cursor-pointer justify-between overflow-ellipsis p-2 text-left ${l?"bg-primary-hover text-primary-foreground":""} ${a?"bg-primary text-primary-foreground":""}`,children:[w.jsx(s,{...o,label:o.label,value:o.value,children:i}),a?w.jsx("span",{children:w.jsx(Mm,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})},rF=b.forwardRef(function({options:t,emptyMessage:n,dynamicOption:r=!1,feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,required:p=!1,...m},g){const[y,x]=b.useState(m.value),[v,T]=b.useState(""),[S,E]=b.useState(""),I=bt(),O=b.useRef(null),[F,M]=b.useState(!1),[_,k]=b.useState(!1),[L,P]=b.useState(null),[A,N]=b.useState(null),[$,z]=b.useState(400),H=b.useRef(null),D=r&&v!==""?[{value:v,label:v,"data-dynamic":"true"},...t]:t,B=new Cr(D,["value","label"],tF).search(v),X=b.useRef([]);b.useEffect(()=>{X.current=Array.from({length:B.length}).fill(null)},[B]);const te=(se,Se)=>{x(se.value);const Ce=Q.reference.current;if(!Ce)return;Ce==null||Ce.setAttribute("data-value",se.value),Ce.value=se.value;const Ut=new Event("change",{bubbles:!1,cancelable:!0});Ce.dispatchEvent(Ut),m.onChange&&m.onChange(Ut),E(se.label??""),M(!1),T(""),N(Se)};!F&&_&&k(!1);const{refs:Q,floatingStyles:G,context:V,isPositioned:j,x:W,y:U,strategy:Y}=Tr({open:F,onOpenChange:M,whileElementsMounted:bs,middleware:[ws(8),jy({padding:eF,apply(se){var Ce;$o.flushSync(()=>z(se.availableHeight));const Se=(Ce=O.current)==null?void 0:Ce.getBoundingClientRect().width;Object.assign(se.elements.floating.style,{width:`${Se}px`,maxWidth:`${Se}px`})}})]}),K=Sv(V,Jk),R=Qk({overscan:10,count:B.length,estimateSize:se=>{var In;if(O.current===null)return Lv;const Se=B[se],Ce=O.current.getBoundingClientRect().width,Ut=((In=Se.label)==null?void 0:In.length)??1,tr=Math.ceil(Ut*8/Ce);return Math.min(tr,3)*Lv},getScrollElement:()=>Q.floating.current}),ue=Eo(V),_e=Er(V,{role:"listbox"}),$e=xr(V),Ke=du(V,{loop:!0,activeIndex:A,selectedIndex:L,virtual:!0,disabledIndices:[],listRef:X,onNavigate:N}),{getReferenceProps:ae,getFloatingProps:ge,getItemProps:ie}=Sr([ue,_e,$e,Ke]);b.useLayoutEffect(()=>{var se;j&&!_&&(A===null&&L===null&&R.scrollToIndex(0,{behavior:"auto"}),A!==null&&((se=H.current)==null||se.focus({preventScroll:!0}),R.scrollToIndex(A,{behavior:"auto"})))},[R,j,A,L,_,Q]);const be=()=>{if(A!==null){P(A);const se=B[A],Se=Q.reference.current;if(!Se)return;Se==null||Se.setAttribute("data-value",se.value),Se.value=se.value;const Ce=new Event("change",{bubbles:!1,cancelable:!0});Se.dispatchEvent(Ce),m.onChange&&m.onChange(Ce),E(se.label??""),M(!1),T("")}},Qe=()=>{var se;M(!0),(se=Q.reference.current)==null||se.focus()},we=()=>{T(""),x(""),E(""),M(!1),Qa(Q.reference.current)},nt=r?void 0:`^(${t.map(se=>`${gs(se.value)}${se.label?"|"+gs(se.label):""}`).join("|")})$`,Z=m.id||m.name,oe=se=>{var Ce;const Se=se.target.value;return T(Se),!F&&Se===""?M(!0):(se.target.name=m.name||"",Se?M(!0):(Ce=m.onChange)==null?void 0:Ce.call(m,se))},Te=()=>{M(!0),T(""),N(se=>se===null?0:se)},je=R.getVirtualItems();return w.jsxs(Cs,{...m,left:f,error:h,ref:O,form:m.form,name:m.name,feedback:o,hideLeft:u,required:p,title:m.title,container:c,rightLabel:a,interactive:i,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:s,placeholder:m.placeholder,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:Qe,children:[w.jsx(rc,{size:20}),w.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),y?w.jsx("button",{type:"button",onClick:we,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",{...ae({...m,onChange:oe,onFocus:Te,pattern:nt,id:`${Z}-shadow`,name:`${Z}-shadow`,ref:Q.setReference,onClick:se=>se.currentTarget.focus(),onKeyDown(se){if(se.key==="Escape")return se.currentTarget.blur(),M(!1);if(se.key==="Enter"){if(A!==null&&B[A])return se.preventDefault(),te(B[A],A);if(B.length===1)return se.preventDefault(),te(B[0],0)}}}),"data-value":y,"data-error":!!h,"data-name":Z,"data-target":Z,required:p,value:F?v:S||y,"aria-autocomplete":"list",autoComplete:"off",className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",m.className)}),w.jsx("input",{id:Z,name:Z,type:"hidden","data-origin":Z,ref:g,required:p,defaultValue:m.value||y||void 0}),w.jsx(br,{children:F&&w.jsx(So,{guards:!0,returnFocus:!1,context:V,initialFocus:-1,visuallyHiddenDismiss:!0,modal:!1,children:w.jsx("div",{tabIndex:-1,ref:Q.setFloating,className:"isolate z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",style:{...G,...K.styles,maxHeight:$,top:U??0,position:Y,left:(W??0)+(y?26:16)},children:w.jsx("ul",{tabIndex:0,ref:H,style:{height:R.getTotalSize()},className:"relative w-full outline-0",...ge({onPointerMove(){k(!0)},onKeyDown(se){k(!1),se.key==="Enter"&&A!==null&&be()}}),children:je.map(se=>w.jsx(nF,{virtual:R,size:B.length,activeIndex:A,virtualItem:se,getItemProps:ie,handleSelect:be,selectedIndex:L,option:B[se.index],listElementsRef:X},se.key))})})})})]})}),_v=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>w.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:Me("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[w.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:Me("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,w.jsx("span",{"data-name":"checkbox-label",className:Me("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Vv=(e,t,n,r)=>b.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:d,optionalText:f,container:h,hideLeft:p=!1,right:m,left:g,error:y,...x},v)=>{const T=e,S=x.id??x.name,E=b.useRef(null);return b.useEffect(()=>{if(E.current===null)return;const I=E.current,O=Zs(E.current),F=r==null?void 0:r(I),M=_=>{const k=_;if(k.key==="Enter"&&I.enterKeyHint==="next"){const L=I.getAttribute("data-next");if(L){const P=document.getElementById(L);if(P)return P.focus(),void k.preventDefault()}}};return I.addEventListener("keydown",M),()=>{F==null||F(),O(),I.removeEventListener("keydown",M)}},[]),w.jsx(Cs,{...n,componentName:t,info:a,container:h,error:y,feedback:i,hideLeft:p,left:g,optionalText:f,right:m,rightLabel:d,interactive:u,form:x.form,id:x.name||x.id,name:x.name,labelClassName:l,title:x.title,placeholder:x.placeholder,required:x.required,disabled:x.disabled,children:w.jsx(T,{...n,...x,id:S,name:S,type:s,"data-next":c,"aria-busy":x.disabled,"aria-disabled":x.disabled,"aria-readonly":x.readOnly,ref:Xa(v,E),className:Me("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",x.className)})})}),Ps=Vv(mg,"input",{type:"text"}),$v=new Date(1970,11,31),gu={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Bv={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},oF={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")},yu=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},sF=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||Mg(),l=b.useId(),c=bt(),u=b.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=b.useState(e||void 0),[h,p]=b.useState(!1),m=yu(u,$v).flatMap(I=>bn.keyof(gu,I.type)?gu[I.type](I.value):[]),g=yu(u,$v).reduce((I,O)=>I+(bn.keyof(Bv,O.type)?Bv[O.type](O.value):""),""),[y,x]=b.useState(d?yu(u,d).reduce((I,O)=>I+(bn.keyof(gu,O.type)?oF[O.type](d,O.value):""),""):""),v=I=>{const O=I.target.value;if(x(O),m.length===O.length&&m.every((M,_)=>{const k=O.charAt(_);return typeof M=="string"?k===M:M.test(k)})){const M=so(FO(O,g,new Date));return f(M),r==null?void 0:r(M)}return f(void 0),r==null?void 0:r(void 0)},T=I=>(f(I),r==null||r(I),x(I?NI(I,g):"")),S=Rm(d),E=S?d.toISOString():void 0;return w.jsx(Ps,{...s,mask:m,value:y,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:v,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??g,right:w.jsxs(b.Fragment,{children:[w.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),w.jsx(Po,{open:h,onChange:p,trigger:w.jsxs("span",{"aria-labelledby":l,children:[w.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),w.jsx(xP,{})]}),buttonProps:{"aria-describedby":l},children:w.jsx(Bg,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:T,disabledDate:n,date:S?d:void 0})})]})})}),iF=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],aF=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],lF=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],cF=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Rv=(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 jv(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?cF:lF:t.binary?aF:iF,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=Rv(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=Rv(Number(e),t.locale,i),c=n[a];return s+l+r+c}var vu={exports:{}},ta={exports:{}},De={};/** @license React v16.13.1
177
+ */var DD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],_a=DD.join(","),Gv=typeof Element>"u",jo=Gv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Da=!Gv&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ma=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},MD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ND=function(t,n,r){if(Ma(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(_a));return n&&jo.call(t,_a)&&o.unshift(t),o=o.filter(r),o},FD=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!Ma(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=jo.call(i,_a);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!Ma(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},Yv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},qv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||MD(t))&&!Yv(t)?0:t.tabIndex},LD=function(t,n){var r=qv(t);return r<0&&n&&!Yv(t)?0:r},VD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Kv=function(t){return t.tagName==="INPUT"},$D=function(t){return Kv(t)&&t.type==="hidden"},RD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},BD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},jD=function(t){if(!t.name)return!0;var n=t.form||Da(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=BD(o,t.form);return!s||s===t},zD=function(t){return Kv(t)&&t.type==="radio"},HD=function(t){return zD(t)&&!jD(t)},WD=function(t){var n,r=t&&Da(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=Da(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},Zv=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},UD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=jo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(jo.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Da(t);if(l&&!l.shadowRoot&&o(l)===!0)return Zv(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(WD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Zv(t);return!1},GD=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return jo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},YD=function(t,n){return!(n.disabled||Ma(n)||$D(n)||UD(n,t)||RD(n)||GD(n))},td=function(t,n){return!(HD(n)||qv(n)<0||!YD(t,n))},qD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},KD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=LD(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(VD).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Qs=function(t,n){n=n||{};var r;return n.getShadowRoot?r=FD([t],n.includeContainer,{filter:td.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:qD}):r=ND(t,n.includeContainer,td.bind(null,n)),KD(r)},ZD=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return jo.call(t,_a)===!1?!1:td(n,t)};function Xv(e,t,n){let{reference:r,floating:o}=e;const s=Fr(t),i=Ju(t),a=Qu(i),l=lr(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Bo(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const XD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Xv(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:b,fn:v}=a[m],{x:y,y:g,data:S,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=g??d,h={...h,[b]:{...h[b],...S}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=Xv(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function nd(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Ro(t,e),p=Uv(h),b=a[f?d==="floating"?"reference":"floating":d],v=Oa(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},T=Oa(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-T.top+p.top)/S.y,bottom:(T.bottom-v.bottom+p.bottom)/S.y,left:(v.left-T.left+p.left)/S.x,right:(T.right-v.right+p.right)/S.x}}const QD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Ro(e,t)||{};if(c==null)return{};const d=Uv(u),f={x:n,y:r},h=Ju(o),p=Qu(h),m=await i.getDimensions(c),b=h==="y",v=b?"top":"left",y=b?"bottom":"right",g=b?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-f[h]-s.floating[p],T=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const I=S/2-T/2,A=C/2-m[p]/2-1,O=Pn(d[v],A),M=Pn(d[y],A),_=O,F=C-m[p]-M,P=C/2-m[p]/2+I,N=Xu(_,P,F),L=!l.arrow&&Bo(o)!=null&&P!==N&&s.reference[p]/2-(P<_?O:M)-m[p]/2<0,V=L?P<_?P-_:P-F:0;return{[h]:f[h]+V,data:{[h]:N,centerOffset:P-N-V,...L&&{alignmentOffset:V}},reset:L}}}),JD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=Ro(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=lr(o),y=Fr(a),g=lr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(g||!m?[Aa(a)]:ID(a)),E=p!=="none";!f&&E&&T.push(...OD(a,m,p,S));const C=[a,...T],I=await nd(t,b),A=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&A.push(I[v]),d){const P=kD(o,i,S);A.push(I[P[0]],I[P[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(P=>P<=0)){var M,_;const P=(((M=s.flip)==null?void 0:M.index)||0)+1,N=C[P];if(N)return{data:{index:P,overflows:O},reset:{placement:N}};let L=(_=O.filter(V=>V.overflows[0]<=0).sort((V,B)=>V.overflows[1]-B.overflows[1])[0])==null?void 0:_.placement;if(!L)switch(h){case"bestFit":{var F;const V=(F=O.filter(B=>{if(E){const W=Fr(B.placement);return W===y||W==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(W=>W>0).reduce((W,D)=>W+D,0)]).sort((B,W)=>B[1]-W[1])[0])==null?void 0:F[0];V&&(L=V);break}case"initialPlacement":L=a;break}if(o!==L)return{reset:{placement:L}}}return{}}}};async function eM(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=lr(n),a=Bo(n),l=Fr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=Ro(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const tM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await eM(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},nM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x:v,y}=b;return{x:v,y}}},...l}=Ro(e,t),c={x:n,y:r},u=await nd(t,l),d=Fr(lr(o)),f=Wv(d);let h=c[f],p=c[d];if(s){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+u[b],g=h-u[v];h=Xu(y,h,g)}if(i){const b=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=p+u[b],g=p-u[v];p=Xu(y,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},rM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=Ro(e,t),l=await nd(t,a),c=lr(n),u=Bo(n),d=Fr(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const b=h-l.top-l.bottom,v=f-l.left-l.right,y=Pn(h-l[p],b),g=Pn(f-l[m],v),S=!t.middlewareData.shift;let T=y,E=g;if(d?E=u||S?Pn(g,v):v:T=u||S?Pn(y,b):b,S&&!u){const I=Zt(l.left,0),A=Zt(l.right,0),O=Zt(l.top,0),M=Zt(l.bottom,0);d?E=f-2*(I!==0||A!==0?I+A:Zt(l.left,l.right)):T=h-2*(O!==0||M!==0?O+M:Zt(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:T});const C=await o.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function Qv(e){const t=Kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mt(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ia(n)!==s||Ia(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function rd(e){return Ue(e)?e:e.contextElement}function zo(e){const t=rd(e);if(!mt(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Qv(t);let i=(s?Ia(n.width):n.width)/r,a=(s?Ia(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const oM=ar(0);function Jv(e){const t=Rt(e);return!Hu()||!t.visualViewport?oM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function Lr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=rd(e);let i=ar(1);t&&(r?Ue(r)&&(i=zo(r)):i=zo(e));const a=sM(s,n,r)?Jv(s):ar(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Rt(s),h=r&&Ue(r)?Rt(r):r;let p=f,m=Wu(p);for(;m&&r&&h!==p;){const b=zo(m),v=m.getBoundingClientRect(),y=Kt(m),g=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,S=v.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=g,c+=S,p=Rt(m),m=Wu(p)}}return Oa({width:u,height:d,x:l,y:c})}function iM(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=jn(r),a=t?Pa(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1);const u=ar(0),d=mt(r);if((d||!d&&!s)&&((or(r)!=="body"||Xs(i))&&(l=ka(r)),mt(r))){const f=Lr(r);c=zo(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function aM(e){return Array.from(e.getClientRects())}function eb(e){return Lr(jn(e)).left+ka(e).scrollLeft}function lM(e){const t=jn(e),n=ka(e),r=e.ownerDocument.body,o=Zt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Zt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+eb(e);const a=-n.scrollTop;return Kt(r).direction==="rtl"&&(i+=Zt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function cM(e,t){const n=Rt(e),r=jn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Hu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function uM(e,t){const n=Lr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=mt(e)?zo(e):ar(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function tb(e,t,n){let r;if(t==="viewport")r=cM(e,n);else if(t==="document")r=lM(jn(e));else if(Ue(t))r=uM(t,n);else{const o=Jv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Oa(r)}function nb(e,t){const n=zn(e);return n===t||!Ue(n)||sr(n)?!1:Kt(n).position==="fixed"||nb(n,t)}function dM(e,t){const n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(a=>Ue(a)&&or(a)!=="body"),o=null;const s=Kt(e).position==="fixed";let i=s?zn(e):e;for(;Ue(i)&&!sr(i);){const a=Kt(i),l=zu(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Xs(i)&&!l&&nb(e,i))?r=r.filter(u=>u!==i):o=a,i=zn(i)}return t.set(e,r),r}function fM(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Pa(t)?[]:dM(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=tb(t,u,o);return c.top=Zt(d.top,c.top),c.right=Pn(d.right,c.right),c.bottom=Pn(d.bottom,c.bottom),c.left=Zt(d.left,c.left),c},tb(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hM(e){const{width:t,height:n}=Qv(e);return{width:t,height:n}}function pM(e,t,n){const r=mt(t),o=jn(t),s=n==="fixed",i=Lr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ar(0);if(r||!r&&!s)if((or(t)!=="body"||Xs(o))&&(a=ka(t)),r){const d=Lr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=eb(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function od(e){return Kt(e).position==="static"}function rb(e,t){return!mt(e)||Kt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ob(e,t){const n=Rt(e);if(Pa(e))return n;if(!mt(e)){let o=zn(e);for(;o&&!sr(o);){if(Ue(o)&&!od(o))return o;o=zn(o)}return n}let r=rb(e,t);for(;r&&bD(r)&&od(r);)r=rb(r,t);return r&&sr(r)&&od(r)&&!zu(r)?n:r||wD(e)||n}const mM=async function(e){const t=this.getOffsetParent||ob,n=this.getDimensions,r=await n(e.floating);return{reference:pM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gM(e){return Kt(e).direction==="rtl"}const yM={convertOffsetParentRelativeRectToViewportRelativeRect:iM,getDocumentElement:jn,getClippingRect:fM,getOffsetParent:ob,getElementRects:mM,getClientRects:aM,getDimensions:hM,getScale:zo,isElement:Ue,isRTL:gM};function vM(e,t){let n=null,r;const o=jn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=$o(u),p=$o(o.clientWidth-(c+d)),m=$o(o.clientHeight-(u+f)),b=$o(c),y={rootMargin:-h+"px "+-p+"px "+-m+"px "+-b+"px",threshold:Zt(0,Pn(1,l))||1};let g=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return i(!0),s}function Js(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=rd(e),u=o||s?[...c?ir(c):[],...ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?vM(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?Lr(e):null;l&&b();function b(){const v=Lr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(b)}return n(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const bM=tM,wM=nM,xM=JD,TM=rM,sb=QD,SM=(e,t,n)=>{const r=new Map,o={platform:yM,...n},s={...o.platform,_c:r};return XD(e,t,{...o,platform:s})};var Na=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Fa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Fa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Fa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ib(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ab(e,t){const n=ib(e);return Math.round(t*n)/n}function lb(e){const t=k.useRef(e);return Na(()=>{t.current=e}),t}function EM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=k.useState(r);Fa(f,r)||h(r);const[p,m]=k.useState(null),[b,v]=k.useState(null),y=k.useCallback(V=>{V!==E.current&&(E.current=V,m(V))},[]),g=k.useCallback(V=>{V!==C.current&&(C.current=V,v(V))},[]),S=s||p,T=i||b,E=k.useRef(null),C=k.useRef(null),I=k.useRef(u),A=l!=null,O=lb(l),M=lb(o),_=k.useCallback(()=>{if(!E.current||!C.current)return;const V={placement:t,strategy:n,middleware:f};M.current&&(V.platform=M.current),SM(E.current,C.current,V).then(B=>{const W={...B,isPositioned:!0};F.current&&!Fa(I.current,W)&&(I.current=W,ms.flushSync(()=>{d(W)}))})},[f,t,n,M]);Na(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[c]);const F=k.useRef(!1);Na(()=>(F.current=!0,()=>{F.current=!1}),[]),Na(()=>{if(S&&(E.current=S),T&&(C.current=T),S&&T){if(O.current)return O.current(S,T,_);_()}},[S,T,_,O,A]);const P=k.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:g}),[y,g]),N=k.useMemo(()=>({reference:S,floating:T}),[S,T]),L=k.useMemo(()=>{const V={position:n,left:0,top:0};if(!N.floating)return V;const B=ab(N.floating,u.x),W=ab(N.floating,u.y);return a?{...V,transform:"translate("+B+"px, "+W+"px)",...ib(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:W}},[n,a,N.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:_,refs:P,elements:N,floatingStyles:L}),[u,_,P,N,L])}const CM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?sb({element:r.current,padding:o}).fn(n):{}:r?sb({element:r,padding:o}).fn(n):{}}}},ei=(e,t)=>({...bM(e),options:[e,t]}),sd=(e,t)=>({...wM(e),options:[e,t]}),id=(e,t)=>({...xM(e),options:[e,t]}),cb=(e,t)=>({...TM(e),options:[e,t]}),ub=(e,t)=>({...CM(e),options:[e,t]});function ad(e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const db={...k},PM=db.useInsertionEffect||(e=>e());function bt(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return PM(()=>{t.current=e}),k.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const ld="ArrowUp",ti="ArrowDown",Ho="ArrowLeft",Wo="ArrowRight";function La(e,t,n){return Math.floor(e/t)!==n}function ni(e,t){return t<0||t>=e.current.length}function cd(e,t){return Nt(e,{disabledIndices:t})}function fb(e,t){return Nt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Nt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&Va(i,a,o));return a}function kM(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===ld){if(u&&It(n),c===-1)d=l;else if(d=Nt(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}ni(e,d)&&(d=c)}if(n.key===ti&&(u&&It(n),c===-1?d=a:(d=Nt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Nt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),ni(e,d)&&(d=c)),r==="both"){const f=$o(c/s);n.key===Wo&&(u&&It(n),c%s!==s-1?(d=Nt(e,{startingIndex:c,disabledIndices:i}),o&&La(d,s,f)&&(d=Nt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Nt(e,{startingIndex:c-c%s-1,disabledIndices:i})),La(d,s,f)&&(d=c)),n.key===Ho&&(u&&It(n),c%s!==0?(d=Nt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&La(d,s,f)&&(d=Nt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Nt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),La(d,s,f)&&(d=c));const h=$o(l/s)===f;ni(e,d)&&(o&&h?d=n.key===Ho?l:Nt(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function IM(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function AM(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function OM(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Va(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let hb=0;function cr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(hb);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():hb=requestAnimationFrame(s)}var _e=typeof document<"u"?w.useLayoutEffect:w.useEffect;function _M(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function DM(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const pb=k.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function MM(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=k.useState(()=>new Map),i=k.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=k.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return _e(()=>{const l=new Map(o);Array.from(l.keys()).sort(_M).forEach((u,d)=>{l.set(u,d)}),DM(o,l)||s(l)},[o]),k.createElement(pb.Provider,{value:k.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function mb(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=k.useContext(pb),[a,l]=k.useState(null),c=k.useRef(null),u=k.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var f;const h=t!==void 0;i.current[a]=h?t:(f=d==null?void 0:d.textContent)!=null?f:null}},[a,s,i,t]);return _e(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),_e(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),k.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(this,arguments)}let gb=!1,NM=0;const yb=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+NM++;function FM(){const[e,t]=k.useState(()=>gb?yb():void 0);return _e(()=>{e==null&&t(yb())},[]),k.useEffect(()=>{gb=!0},[]),e}const Go=db.useId||FM;let ri;process.env.NODE_ENV!=="production"&&(ri=new Set);function $a(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ri)!=null&&e.has(o))){var s;(s=ri)==null||s.add(o),console.warn(o)}}function LM(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ri)!=null&&e.has(o))){var s;(s=ri)==null||s.add(o),console.error(o)}}const vb=k.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||$a("The `ref` prop is required for `FloatingArrow`."));const b=Go(),[v,y]=k.useState(!1);if(_e(()=>{if(!o)return;Kt(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const g=c*2,S=g/2,T=i/2*(l/-8+1),E=a/2*l/4,[C,I]=r.split("-"),A=!!f,O=C==="top"||C==="bottom",M=u&&I==="end"?"bottom":"top";let _=u&&I==="end"?"right":"left";u&&v&&(_=I==="end"?"left":"right");const F=(s==null?void 0:s.x)!=null?u||s.x:"",P=(s==null?void 0:s.y)!=null?u||s.y:"",N=f||"M0,0"+(" H"+i)+(" L"+(i-T)+","+(a-E))+(" Q"+i/2+","+a+" "+T+","+(a-E))+" Z",L={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[C];return k.createElement("svg",Uo({},m,{"aria-hidden":!0,ref:n,width:A?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[_]:F,[M]:P,[C]:O||A?"100%":"calc(100% - "+g/2+"px)",transform:""+L+(h??""),...p}}),g>0&&k.createElement("path",{clipPath:"url(#"+b+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:N}),k.createElement("path",{stroke:g&&!f?m.fill:"none",d:N}),k.createElement("clipPath",{id:b},k.createElement("rect",{x:-S,y:S*(A?-1:1),width:i+g,height:i})))});function bb(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const wb=k.createContext(null),xb=k.createContext(null),ur=()=>{var e;return((e=k.useContext(wb))==null?void 0:e.id)||null},dr=()=>k.useContext(xb);function VM(e){const t=Go(),n=dr(),o=ur();return _e(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function $M(e){const{children:t,id:n}=e,r=ur();return k.createElement(wb.Provider,{value:k.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function RM(e){const{children:t}=e,n=k.useRef([]),r=k.useCallback(i=>{n.current=[...n.current,i]},[]),o=k.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=k.useState(()=>bb())[0];return k.createElement(xb.Provider,{value:k.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function fr(e){return"data-floating-ui-"+e}function At(e){const t=w.useRef(e);return _e(()=>{t.current=e}),t}const Tb=fr("safe-polygon");function ud(e,t,n){return n&&!Vo(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Sb(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=dr(),p=ur(),m=At(c),b=At(l),v=At(n),y=k.useRef(),g=k.useRef(-1),S=k.useRef(),T=k.useRef(-1),E=k.useRef(!0),C=k.useRef(!1),I=k.useRef(()=>{}),A=k.useCallback(()=>{var N;const L=(N=o.current.openEvent)==null?void 0:N.type;return(L==null?void 0:L.includes("mouse"))&&L!=="mousedown"},[o]);k.useEffect(()=>{if(!a)return;function N(L){let{open:V}=L;V||(clearTimeout(g.current),clearTimeout(T.current),E.current=!0)}return s.on("openchange",N),()=>{s.off("openchange",N)}},[a,s]),k.useEffect(()=>{if(!a||!m.current||!n)return;function N(V){A()&&r(!1,V,"hover")}const L=St(i.floating).documentElement;return L.addEventListener("mouseleave",N),()=>{L.removeEventListener("mouseleave",N)}},[i.floating,n,r,a,m,A]);const O=k.useCallback(function(N,L,V){L===void 0&&(L=!0),V===void 0&&(V="hover");const B=ud(b.current,"close",y.current);B&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,N,V),B)):L&&(clearTimeout(g.current),r(!1,N,V))},[b,r]),M=bt(()=>{I.current(),S.current=void 0}),_=bt(()=>{if(C.current){const N=St(i.floating).body;N.style.pointerEvents="",N.removeAttribute(Tb),C.current=!1}});k.useEffect(()=>{if(!a)return;function N(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function L(D){if(clearTimeout(g.current),E.current=!1,u&&!Vo(y.current)||d>0&&!ud(b.current,"open"))return;const j=ud(b.current,"open",y.current);j?g.current=window.setTimeout(()=>{v.current||r(!0,D,"hover")},j):r(!0,D,"hover")}function V(D){if(N())return;I.current();const j=St(i.floating);if(clearTimeout(T.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){_(),M(),O(D,!0,"safe-polygon")}});const J=S.current;j.addEventListener("mousemove",J),I.current=()=>{j.removeEventListener("mousemove",J)};return}(y.current==="touch"?!lt(i.floating,D.relatedTarget):!0)&&O(D)}function B(D){N()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:D.clientX,y:D.clientY,onClose(){_(),M(),O(D)}})(D))}if(Ue(i.domReference)){var W;const D=i.domReference;return n&&D.addEventListener("mouseleave",B),(W=i.floating)==null||W.addEventListener("mouseleave",B),f&&D.addEventListener("mousemove",L,{once:!0}),D.addEventListener("mouseenter",L),D.addEventListener("mouseleave",V),()=>{var j;n&&D.removeEventListener("mouseleave",B),(j=i.floating)==null||j.removeEventListener("mouseleave",B),f&&D.removeEventListener("mousemove",L),D.removeEventListener("mouseenter",L),D.removeEventListener("mouseleave",V)}}},[i,a,e,u,d,f,O,M,_,r,n,v,h,b,m,o]),_e(()=>{var N;if(a&&n&&(N=m.current)!=null&&N.__options.blockPointerEvents&&A()){const V=St(i.floating).body;V.setAttribute(Tb,""),V.style.pointerEvents="none",C.current=!0;const B=i.floating;if(Ue(i.domReference)&&B){var L;const W=i.domReference,D=h==null||(L=h.nodesRef.current.find(j=>j.id===p))==null||(L=L.context)==null?void 0:L.elements.floating;return D&&(D.style.pointerEvents=""),W.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{W.style.pointerEvents="",B.style.pointerEvents=""}}}},[a,n,p,i,h,m,A]),_e(()=>{n||(y.current=void 0,M(),_())},[n,M,_]),k.useEffect(()=>()=>{M(),clearTimeout(g.current),clearTimeout(T.current),_()},[a,i.domReference,M,_]);const F=k.useMemo(()=>{function N(L){y.current=L.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(L){const{nativeEvent:V}=L;function B(){!E.current&&!v.current&&r(!0,V,"hover")}u&&!Vo(y.current)||n||d===0||(clearTimeout(T.current),y.current==="touch"?B():T.current=window.setTimeout(B,d))}}},[u,r,n,v,d]),P=k.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(N){O(N.nativeEvent,!1)}}),[O]);return k.useMemo(()=>a?{reference:F,floating:P}:{},[a,F,P])}function BM(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Vr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function jM(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Vr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Yo=new WeakMap,Ra=new WeakSet,Ba={},dd=0;const zM=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Eb=e=>e&&(e.host||Eb(e.parentNode)),HM=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Eb(n);return e.contains(r)?r:null}).filter(n=>n!=null);function WM(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=HM(t,e),a=new Set,l=new Set(i),c=[];Ba[o]||(Ba[o]=new WeakMap);const u=Ba[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(or(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,b=m!==null&&m!=="false",v=(Yo.get(p)||0)+1,y=(u.get(p)||0)+1;Yo.set(p,v),u.set(p,y),c.push(p),v===1&&b&&Ra.add(p),y===1&&p.setAttribute(o,""),!b&&s&&p.setAttribute(s,"true")}})}return dd++,()=>{c.forEach(h=>{const p=(Yo.get(h)||0)-1,m=(u.get(h)||0)-1;Yo.set(h,p),u.set(h,m),p||(!Ra.has(h)&&s&&h.removeAttribute(s),Ra.delete(h)),m||h.removeAttribute(o)}),dd--,dd||(Yo=new WeakMap,Yo=new WeakMap,Ra=new WeakSet,Ba={})}}function Cb(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=St(e[0]).body;return WM(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const qo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Pb(e,t){const n=Qs(e,qo());t==="prev"&&n.reverse();const r=n.indexOf(un(St(e)));return n.slice(r+1)[0]}function kb(){return Pb(document.body,"next")}function Ib(){return Pb(document.body,"prev")}function oi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!lt(n,r)}function UM(e){Qs(e,qo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function GM(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function YM(e,t,n){const r=e.indexOf(t);function o(i){const a=fr("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||lt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const fd={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let qM;function Ab(e){e.key==="Tab"&&(e.target,clearTimeout(qM))}const ja=k.forwardRef(function(t,n){const[r,o]=k.useState();_e(()=>(Yu()&&o("button"),document.addEventListener("keydown",Ab),()=>{document.removeEventListener("keydown",Ab)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[fr("focus-guard")]:"",style:fd};return k.createElement("span",Uo({},t,s))}),Ob=k.createContext(null),_b=fr("portal");function KM(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Go(),o=Db(),[s,i]=k.useState(null),a=k.useRef(null);return _e(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),_e(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(_b,""),l.appendChild(c),a.current=c,i(c)},[t,r]),_e(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ue(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(_b,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function $r(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=KM({id:n,root:r}),[i,a]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),d=k.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return k.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&oi(p)&&(p.type==="focusin"?GM:UM)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),k.createElement(Ob.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&k.createElement(ja,{"data-type":"outside",ref:l,onFocus:h=>{if(oi(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=Ib()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&k.createElement("span",{"aria-owns":s.id,style:fd}),s&&ms.createPortal(t,s),f&&s&&k.createElement(ja,{"data-type":"outside",ref:c,onFocus:h=>{if(oi(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=kb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Db=()=>k.useContext(Ob),Mb=20;let Rr=[];function hd(e){Rr=Rr.filter(n=>n.isConnected);let t=e;if(!(!t||or(t)==="body")){if(!ZD(t,qo())){const n=Qs(t,qo())[0];n&&(t=n)}Rr.push(t),Rr.length>Mb&&(Rr=Rr.slice(-Mb))}}function Nb(){return Rr.slice().reverse().find(e=>e.isConnected)}const ZM=k.forwardRef(function(t,n){return k.createElement("button",Uo({},t,{type:"button",ref:n,tabIndex:-1,style:fd}))});function Ko(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:b,dataRef:v,floatingId:y,elements:{domReference:g,floating:S}}=t,T=typeof i=="number"&&i<0,E=Hv(g)&&T,C=zM()?s:!0,I=At(o),A=At(i),O=At(a),M=dr(),_=Db(),F=k.useRef(null),P=k.useRef(null),N=k.useRef(!1),L=k.useRef(!1),V=k.useRef(-1),B=_!=null,W=S==null?void 0:S.firstElementChild,D=(W==null?void 0:W.id)===y?W:S,j=bt(function(G){return G===void 0&&(G=D),G?Qs(G,qo()):[]}),K=bt(G=>{const $=j(G);return I.current.map(z=>g&&z==="reference"?g:D&&z==="floating"?D:$).filter(Boolean).flat()});k.useEffect(()=>{if(r||!c)return;function G(z){if(z.key==="Tab"){lt(D,un(St(D)))&&j().length===0&&!E&&It(z);const H=K(),U=Cn(z);I.current[0]==="reference"&&U===g&&(It(z),z.shiftKey?cr(H[H.length-1]):cr(H[1])),I.current[1]==="floating"&&U===D&&z.shiftKey&&(It(z),cr(H[0]))}}const $=St(D);return $.addEventListener("keydown",G),()=>{$.removeEventListener("keydown",G)}},[r,g,D,c,I,E,j,K]),k.useEffect(()=>{if(r||!S)return;function G($){const z=Cn($),U=j().indexOf(z);U!==-1&&(V.current=U)}return S.addEventListener("focusin",G),()=>{S.removeEventListener("focusin",G)}},[r,S,j]),k.useEffect(()=>{if(r||!d)return;function G(){L.current=!0,setTimeout(()=>{L.current=!1})}function $(z){const H=z.relatedTarget;queueMicrotask(()=>{const U=!(lt(g,H)||lt(S,H)||lt(H,S)||lt(_==null?void 0:_.portalNode,H)||H!=null&&H.hasAttribute(fr("focus-guard"))||M&&(Vr(M.nodesRef.current,p).find(Y=>{var ce,R;return lt((ce=Y.context)==null?void 0:ce.elements.floating,H)||lt((R=Y.context)==null?void 0:R.elements.domReference,H)})||BM(M.nodesRef.current,p).find(Y=>{var ce,R;return((ce=Y.context)==null?void 0:ce.elements.floating)===H||((R=Y.context)==null?void 0:R.elements.domReference)===H})));if(l&&U&&un(St(D))===St(D).body){mt(D)&&(D==null||D.focus());const Y=V.current,ce=j(),R=ce[Y]||ce[ce.length-1]||D;mt(R)&&R.focus()}(E||!c)&&H&&U&&!L.current&&H!==Nb()&&(N.current=!0,m(!1,z))})}if(S&&mt(g))return g.addEventListener("focusout",$),g.addEventListener("pointerdown",G),S.addEventListener("focusout",$),()=>{g.removeEventListener("focusout",$),g.removeEventListener("pointerdown",G),S.removeEventListener("focusout",$)}},[r,g,S,D,c,p,M,_,m,d,l,j,E]),k.useEffect(()=>{var G;if(r)return;const $=Array.from((_==null||(G=_.portalNode)==null?void 0:G.querySelectorAll("["+fr("portal")+"]"))||[]);if(S){const z=[S,...$,F.current,P.current,I.current.includes("reference")||E?g:null].filter(U=>U!=null),H=c||E?Cb(z,C,!C):Cb(z);return()=>{H()}}},[r,g,S,c,I,_,E,C]),_e(()=>{if(r||!mt(D))return;const G=St(D),$=un(G);queueMicrotask(()=>{const z=K(D),H=A.current,U=(typeof H=="number"?z[H]:H.current)||D,Y=lt(D,$);!T&&!Y&&f&&cr(U,{preventScroll:U===D})})},[r,f,D,T,K,A]),_e(()=>{if(r||!D)return;let G=!1;const $=St(D),z=un($);let U=v.current.openEvent;const Y=h.domReference.current;hd(z);function ce(R){let{open:pe,reason:xe,event:te,nested:me}=R;pe&&(U=te),xe==="escape-key"&&h.domReference.current&&hd(h.domReference.current),xe==="hover"&&te.type==="mouseleave"&&(N.current=!0),xe==="outside-press"&&(me?(N.current=!1,G=!0):N.current=!(jv(te)||Gu(te)))}return b.on("openchange",ce),()=>{b.off("openchange",ce);const R=un($),pe=lt(S,R)||M&&Vr(M.nodesRef.current,p).some(re=>{var fe;return lt((fe=re.context)==null?void 0:fe.elements.floating,R)});(pe||U&&["click","mousedown"].includes(U.type))&&h.domReference.current&&hd(h.domReference.current);const te=Y||z,me=Qs(St(te).body,qo());queueMicrotask(()=>{let re=Nb();!re&&mt(te)&&S&&(re=YM(me,te,S)),O.current&&!N.current&&mt(re)&&(!(re!==R&&R!==$.body)||pe)&&re.focus({preventScroll:G})})}},[r,S,D,O,v,h,b,M,p]),_e(()=>{if(!r&&_)return _.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{_.setFocusManagerState(null)}},[r,_,c,f,m,h,d]),_e(()=>{if(r||!D||typeof MutationObserver!="function"||T)return;const G=()=>{const z=D.getAttribute("tabindex"),H=j(),U=un(St(S)),Y=H.indexOf(U);Y!==-1&&(V.current=Y),I.current.includes("floating")||U!==h.domReference.current&&H.length===0?z!=="0"&&D.setAttribute("tabindex","0"):z!=="-1"&&D.setAttribute("tabindex","-1")};G();const $=new MutationObserver(G);return $.observe(D,{childList:!0,subtree:!0,attributes:!0}),()=>{$.disconnect()}},[r,S,D,h,I,j,T]);function J(G){return r||!u||!c?null:k.createElement(ZM,{ref:G==="start"?F:P,onClick:$=>m(!1,$.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!r&&C&&(c?!E:!0)&&(B||c);return k.createElement(k.Fragment,null,X&&k.createElement(ja,{"data-type":"inside",ref:_==null?void 0:_.beforeInsideRef,onFocus:G=>{if(c){const z=K();cr(o[0]==="reference"?z[0]:z[z.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(N.current=!1,oi(G,_.portalNode)){const z=kb()||g;z==null||z.focus()}else{var $;($=_.beforeOutsideRef.current)==null||$.focus()}}}),!E&&J("start"),n,J("end"),X&&k.createElement(ja,{"data-type":"inside",ref:_==null?void 0:_.afterInsideRef,onFocus:G=>{if(c)cr(K()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(d&&(N.current=!0),oi(G,_.portalNode)){const z=Ib()||g;z==null||z.focus()}else{var $;($=_.afterOutsideRef.current)==null||$.focus()}}}))}const pd=new Set,XM=k.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Go();return _e(()=>{if(!r)return;pd.add(s);const i=/iP(hone|ad|od)|iOS/.test(Uu()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,b=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(b))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{pd.delete(s),pd.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),k.createElement("div",Uo({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Fb(e){return mt(e.target)&&e.target.tagName==="BUTTON"}function Lb(e){return Zu(e)}function si(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=k.useRef(),f=k.useRef(!1),h=k.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Vo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Vo(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||Fb(p))&&(p.key===" "&&!Lb(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Fb(p)||Lb(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return k.useMemo(()=>i?{reference:h}:{},[i,h])}function QM(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,d=i.height,f=i.x,h=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function Vb(e){return e!=null&&e.clientX!=null}function JM(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=k.useRef(!1),f=k.useRef(null),[h,p]=k.useState(),[m,b]=k.useState([]),v=bt((E,C)=>{d.current||r.current.openEvent&&!Vb(r.current.openEvent)||i.setPositionReference(QM(s,{x:E,y:C,axis:l,dataRef:r,pointerType:h}))}),y=bt(E=>{c!=null||u!=null||(n?f.current||b([]):v(E.clientX,E.clientY))}),g=Vo(h)?o:n,S=k.useCallback(()=>{if(!g||!a||c!=null||u!=null)return;const E=Rt(o);function C(I){const A=Cn(I);lt(o,A)?(E.removeEventListener("mousemove",C),f.current=null):v(I.clientX,I.clientY)}if(!r.current.openEvent||Vb(r.current.openEvent)){E.addEventListener("mousemove",C);const I=()=>{E.removeEventListener("mousemove",C),f.current=null};return f.current=I,I}i.setPositionReference(s)},[g,a,c,u,o,r,i,s,v]);k.useEffect(()=>S(),[S,m]),k.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),k.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),_e(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const T=k.useMemo(()=>{function E(C){let{pointerType:I}=C;p(I)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:y,onMouseEnter:y}},[y]);return k.useMemo(()=>a?{reference:T}:{},[a,T])}const eN={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},tN={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$b=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Br(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=dr(),b=bt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?b:l,y=k.useRef(!1),g=k.useRef(!1),{escapeKey:S,outsidePress:T}=$b(h),{escapeKey:E,outsidePress:C}=$b(p),I=bt(P=>{var N;if(!n||!i||!a||P.key!=="Escape")return;const L=(N=s.current.floatingContext)==null?void 0:N.nodeId,V=m?Vr(m.nodesRef.current,L):[];if(!S&&(P.stopPropagation(),V.length>0)){let B=!0;if(V.forEach(W=>{var D;if((D=W.context)!=null&&D.open&&!W.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,TD(P)?P.nativeEvent:P,"escape-key")}),A=bt(P=>{var N;const L=()=>{var V;I(P),(V=Cn(P))==null||V.removeEventListener("keydown",L)};(N=Cn(P))==null||N.addEventListener("keydown",L)}),O=bt(P=>{var N;const L=y.current;y.current=!1;const V=g.current;if(g.current=!1,c==="click"&&V||L||typeof v=="function"&&!v(P))return;const B=Cn(P),W="["+fr("inert")+"]",D=St(o.floating).querySelectorAll(W);let j=Ue(B)?B:null;for(;j&&!sr(j);){const G=zn(j);if(sr(G)||!Ue(G))break;j=G}if(D.length&&Ue(B)&&!SD(B)&&!lt(B,o.floating)&&Array.from(D).every(G=>!lt(j,G)))return;if(mt(B)&&F){const G=B.clientWidth>0&&B.scrollWidth>B.clientWidth,$=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let z=$&&P.offsetX>B.clientWidth;if($&&Kt(B).direction==="rtl"&&(z=P.offsetX<=B.offsetWidth-B.clientWidth),z||G&&P.offsetY>B.clientHeight)return}const K=(N=s.current.floatingContext)==null?void 0:N.nodeId,J=m&&Vr(m.nodesRef.current,K).some(G=>{var $;return Ku(P,($=G.context)==null?void 0:$.elements.floating)});if(Ku(P,o.floating)||Ku(P,o.domReference)||J)return;const X=m?Vr(m.nodesRef.current,K):[];if(X.length>0){let G=!0;if(X.forEach($=>{var z;if((z=$.context)!=null&&z.open&&!$.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}r(!1,P,"outside-press")}),M=bt(P=>{var N;const L=()=>{var V;O(P),(V=Cn(P))==null||V.removeEventListener(c,L)};(N=Cn(P))==null||N.addEventListener(c,L)});k.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=S,s.current.__outsidePressBubbles=T;function P(V){r(!1,V,"ancestor-scroll")}const N=St(o.floating);a&&N.addEventListener("keydown",E?A:I,E),v&&N.addEventListener(c,C?M:O,C);let L=[];return f&&(Ue(o.domReference)&&(L=ir(o.domReference)),Ue(o.floating)&&(L=L.concat(ir(o.floating))),!Ue(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(ir(o.reference.contextElement)))),L=L.filter(V=>{var B;return V!==((B=N.defaultView)==null?void 0:B.visualViewport)}),L.forEach(V=>{V.addEventListener("scroll",P,{passive:!0})}),()=>{a&&N.removeEventListener("keydown",E?A:I,E),v&&N.removeEventListener(c,C?M:O,C),L.forEach(V=>{V.removeEventListener("scroll",P)})}},[s,o,a,v,c,n,r,f,i,S,T,I,E,A,O,C,M]),k.useEffect(()=>{y.current=!1},[v,c]);const _=k.useMemo(()=>({onKeyDown:I,[eN[d]]:P=>{u&&r(!1,P.nativeEvent,"reference-press")}}),[I,r,u,d]),F=k.useMemo(()=>({onKeyDown:I,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[tN[c]]:()=>{y.current=!0}}),[I,c]);return k.useMemo(()=>i?{reference:_,floating:F}:{},[i,_,F])}function nN(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Go(),s=k.useRef({}),[i]=k.useState(()=>bb()),a=ur()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Ue(h)&&LM("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=k.useState(r.reference),u=bt((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=k.useMemo(()=>({setPositionReference:c}),[]),f=k.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return k.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function jr(e){e===void 0&&(e={});const{nodeId:t}=e,n=nN({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=k.useState(null),[a,l]=k.useState(null),u=(o==null?void 0:o.reference)||s,d=k.useRef(null),f=dr();_e(()=>{u&&(d.current=u)},[u]);const h=EM({...e,elements:{...o,...a&&{reference:a}}}),p=k.useCallback(g=>{const S=Ue(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),h.refs.setReference(S)},[h.refs]),m=k.useCallback(g=>{(Ue(g)||g===null)&&(d.current=g,i(g)),(Ue(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Ue(g))&&h.refs.setReference(g)},[h.refs]),b=k.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=k.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),y=k.useMemo(()=>({...h,...r,refs:b,elements:v,nodeId:t}),[h,b,v,t,r]);return _e(()=>{r.dataRef.current.floatingContext=y;const g=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);g&&(g.context=y)}),k.useMemo(()=>({...h,context:y,refs:b,elements:v}),[h,b,v,y])}function rN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=k.useRef(!1),u=k.useRef(),d=k.useRef(!0);k.useEffect(()=>{if(!a)return;const h=Rt(i.domReference);function p(){!n&&mt(i.domReference)&&i.domReference===un(St(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),k.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),k.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=k.useMemo(()=>({onPointerDown(h){Gu(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Cn(h.nativeEvent);if(l&&Ue(p))try{if(Yu()&&zv())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Zu(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,b=Ue(p)&&p.hasAttribute(fr("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const y=un(i.domReference?i.domReference.ownerDocument:document);!p&&y===i.domReference||lt((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,y)||lt(i.domReference,y)||b||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return k.useMemo(()=>a?{reference:f}:{},[a,f])}const Rb="active",Bb="selected";function md(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Rb]:i,[Bb]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Rb,Bb].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(b=>b(...p)).find(b=>b!==void 0)}}}else i[c]=u}),i),{})}}function zr(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=k.useCallback(a=>md(a,e,"reference"),t),s=k.useCallback(a=>md(a,e,"floating"),n),i=k.useCallback(a=>md(a,e,"item"),r);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let jb=!1;function za(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function zb(e,t){return za(t,e===ld||e===ti,e===Ho||e===Wo)}function gd(e,t,n){return za(t,e===ti,n?e===Ho:e===Wo)||e==="Enter"||e===" "||e===""}function oN(e,t,n){return za(t,n?e===Ho:e===Wo,e===ti)}function Hb(e,t,n){return za(t,n?e===Wo:e===Ho,e===ld)}function yd(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:E,itemSizes:C,dense:I=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||$a("`useListNavigation` looping must be enabled to allow escaping."),p||$a("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&$a("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const A=ur(),O=dr(),M=bt(a),_=k.useRef(m),F=k.useRef(c??-1),P=k.useRef(null),N=k.useRef(!0),L=k.useRef(M),V=k.useRef(!!o.floating),B=k.useRef(n),W=k.useRef(!1),D=k.useRef(!1),j=At(y),K=At(n),J=At(T),X=At(o.floating),G=At(c),[$,z]=k.useState(),[H,U]=k.useState(),Y=bt(function(re,fe,ue){ue===void 0&&(ue=!1);function Pe(Me){p?(z(Me.id),O==null||O.events.emit("virtualfocus",Me),E&&(E.current=Me)):cr(Me,{preventScroll:!0,sync:zv()&&Yu()?jb||W.current:!1})}const ot=re.current[fe.current];ot&&Pe(ot),requestAnimationFrame(()=>{const Me=re.current[fe.current]||ot;if(!Me)return;ot||Pe(Me);const yt=J.current;yt&&R&&(ue||!N.current)&&(Me.scrollIntoView==null||Me.scrollIntoView(typeof yt=="boolean"?{block:"nearest",inline:"nearest"}:yt))})});_e(()=>{document.createElement("div").focus({get preventScroll(){return jb=!0,!1}})},[]),_e(()=>{l&&(n&&o.floating?_.current&&c!=null&&(D.current=!0,F.current=c,M(c)):V.current&&(F.current=-1,L.current(null)))},[l,n,o.floating,c,M]),_e(()=>{if(l&&n&&o.floating)if(i==null){if(W.current=!1,G.current!=null)return;if(V.current&&(F.current=-1,Y(s,F)),(!B.current||!V.current)&&_.current&&(P.current!=null||_.current===!0&&P.current==null)){let re=0;const fe=()=>{s.current[0]==null?(re<2&&(re?requestAnimationFrame:queueMicrotask)(fe),re++):(F.current=P.current==null||gd(P.current,g,h)||f?cd(s,j.current):fb(s,j.current),P.current=null,M(F.current))};fe()}}else ni(s,i)||(F.current=i,Y(s,F,D.current),D.current=!1)},[l,n,o.floating,i,G,f,s,g,h,M,Y,j]),_e(()=>{var re;if(!l||o.floating||!O||p||!V.current)return;const fe=O.nodesRef.current,ue=(re=fe.find(Me=>Me.id===A))==null||(re=re.context)==null?void 0:re.elements.floating,Pe=un(St(o.floating)),ot=fe.some(Me=>Me.context&&lt(Me.context.elements.floating,Pe));ue&&!ot&&N.current&&ue.focus({preventScroll:!0})},[l,o.floating,O,A,p]),_e(()=>{if(!l||!O||!p||A)return;function re(fe){U(fe.id),E&&(E.current=fe)}return O.events.on("virtualfocus",re),()=>{O.events.off("virtualfocus",re)}},[l,O,p,A,E]),_e(()=>{L.current=M,V.current=!!o.floating}),_e(()=>{n||(P.current=null)},[n]),_e(()=>{B.current=n},[n]);const ce=i!=null,R=k.useMemo(()=>{function re(ue){if(!n)return;const Pe=s.current.indexOf(ue);Pe!==-1&&M(Pe)}return{onFocus(ue){let{currentTarget:Pe}=ue;re(Pe)},onClick:ue=>{let{currentTarget:Pe}=ue;return Pe.focus({preventScroll:!0})},...b&&{onMouseMove(ue){let{currentTarget:Pe}=ue;re(Pe)},onPointerLeave(ue){let{pointerType:Pe}=ue;!N.current||Pe==="touch"||(F.current=-1,Y(s,F),M(null),p||cr(X.current,{preventScroll:!0}))}}}},[n,X,Y,b,s,M,p]),pe=bt(re=>{if(N.current=!1,W.current=!0,!K.current&&re.currentTarget===X.current)return;if(f&&Hb(re.key,g,h)){It(re),r(!1,re.nativeEvent,"list-navigation"),mt(o.domReference)&&!p&&o.domReference.focus();return}const fe=F.current,ue=cd(s,y),Pe=fb(s,y);if(re.key==="Home"&&(It(re),F.current=ue,M(F.current)),re.key==="End"&&(It(re),F.current=Pe,M(F.current)),S>1){const ot=C||Array.from({length:s.current.length},()=>({width:1,height:1})),Me=IM(ot,S,I),yt=Me.findIndex(le=>le!=null&&!Va(s.current,le,y)),ne=Me.reduce((le,Ne,Je)=>Ne!=null&&!Va(s.current,Ne,y)?Je:le,-1);if(F.current=Me[kM({current:Me.map(le=>le!=null?s.current[le]:null)},{event:re,orientation:g,loop:d,cols:S,disabledIndices:OM([...y||s.current.map((le,Ne)=>Va(s.current,Ne)?Ne:void 0),void 0],Me),minIndex:yt,maxIndex:ne,prevIndex:AM(F.current>Pe?ue:F.current,ot,Me,S,re.key===ti?"bl":re.key===Wo?"tr":"tl"),stopEvent:!0})],M(F.current),g==="both")return}if(zb(re.key,g)){if(It(re),n&&!p&&un(re.currentTarget.ownerDocument)===re.currentTarget){F.current=gd(re.key,g,h)?ue:Pe,M(F.current);return}gd(re.key,g,h)?d?F.current=fe>=Pe?u&&fe!==s.current.length?-1:ue:Nt(s,{startingIndex:fe,disabledIndices:y}):F.current=Math.min(Pe,Nt(s,{startingIndex:fe,disabledIndices:y})):d?F.current=fe<=ue?u&&fe!==-1?s.current.length:Pe:Nt(s,{startingIndex:fe,decrement:!0,disabledIndices:y}):F.current=Math.max(ue,Nt(s,{startingIndex:fe,decrement:!0,disabledIndices:y})),ni(s,F.current)?M(null):M(F.current)}}),xe=k.useMemo(()=>p&&n&&ce&&{"aria-activedescendant":H||$},[p,n,ce,H,$]),te=k.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Hv(o.domReference)&&xe,onKeyDown:pe,onPointerMove(){N.current=!0}}),[xe,pe,o.domReference,g]),me=k.useMemo(()=>{function re(ue){m==="auto"&&jv(ue.nativeEvent)&&(_.current=!0)}function fe(ue){_.current=m,m==="auto"&&Gu(ue.nativeEvent)&&(_.current=!0)}return{...xe,onKeyDown(ue){N.current=!1;const Pe=ue.key.indexOf("Arrow")===0,ot=oN(ue.key,g,h),Me=Hb(ue.key,g,h),yt=zb(ue.key,g),ne=(f?ot:yt)||ue.key==="Enter"||ue.key.trim()==="";if(p&&n){const Ot=O==null?void 0:O.nodesRef.current.find(zt=>zt.parentId==null),Vt=O&&Ot?jM(O.nodesRef.current,Ot.id):null;if(Pe&&Vt&&E){const zt=new KeyboardEvent("keydown",{key:ue.key,bubbles:!0});if(ot||Me){var le,Ne;const no=((le=Vt.context)==null?void 0:le.elements.domReference)===ue.currentTarget,hs=Me&&!no?(Ne=Vt.context)==null?void 0:Ne.elements.domReference:ot?s.current.find(ps=>(ps==null?void 0:ps.id)===$):null;hs&&(It(ue),hs.dispatchEvent(zt),U(void 0))}if(yt&&Vt.context&&Vt.context.open&&Vt.parentId&&ue.currentTarget!==Vt.context.elements.domReference){var Je;It(ue),(Je=Vt.context.elements.domReference)==null||Je.dispatchEvent(zt);return}}return pe(ue)}if(!(!n&&!v&&Pe)){if(ne&&(P.current=f&&yt?null:ue.key),f){ot&&(It(ue),n?(F.current=cd(s,j.current),M(F.current)):r(!0,ue.nativeEvent,"list-navigation"));return}yt&&(c!=null&&(F.current=c),It(ue),!n&&v?r(!0,ue.nativeEvent,"list-navigation"):pe(ue),n&&M(F.current))}},onFocus(){n&&!p&&M(null)},onPointerDown:fe,onMouseDown:re,onClick:re}},[$,xe,pe,j,m,s,f,M,r,n,v,g,h,c,O,p,E]);return k.useMemo(()=>l?{reference:me,floating:te,item:R}:{},[l,me,te,R])}const sN=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Hr(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=sN.get(i))!=null?n:i,l=Go(),u=ur()!=null,d=k.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),f=k.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=k.useCallback(p=>{let{active:m,selected:b}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&b};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return k.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const Wb=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Zo(e,t){return typeof e=="function"?e(t):e}function iN(e,t){const[n,r]=k.useState(e);return e&&!n&&r(!0),k.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function aN(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=k.useState("unmounted"),c=iN(n,i);return!c&&a==="close"&&l("unmounted"),_e(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Ub(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=k.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=k.useState(()=>({...Zo(s,c),...Zo(n,c)})),{isMounted:m,status:b}=aN(e,{duration:i}),v=At(n),y=At(r),g=At(o),S=At(s);return _e(()=>{const T=Zo(v.current,c),E=Zo(g.current,c),C=Zo(S.current,c),I=Zo(y.current,c)||Object.keys(T).reduce((A,O)=>(A[O]="",A),{});if(b==="initial"&&p(A=>({transitionProperty:A.transitionProperty,...C,...T})),b==="open"&&p({transitionProperty:Object.keys(I).map(Wb).join(","),transitionDuration:d+"ms",...C,...I}),b==="close"){const A=E||T;p({transitionProperty:Object.keys(A).map(Wb).join(","),transitionDuration:f+"ms",...C,...A})}},[f,g,v,y,S,d,b,c]),{isMounted:m,styles:h}}function lN(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,p=k.useRef(),m=k.useRef(""),b=k.useRef((n=h??i)!=null?n:-1),v=k.useRef(null),y=bt(a),g=bt(l),S=At(u),T=At(f);_e(()=>{r&&(clearTimeout(p.current),v.current=null,m.current="")},[r]),_e(()=>{if(r&&m.current===""){var O;b.current=(O=h??i)!=null?O:-1}},[r,h,i]);const E=bt(O=>{O?o.current.typing||(o.current.typing=O,g(O)):o.current.typing&&(o.current.typing=O,g(O))}),C=bt(O=>{function M(L,V,B){const W=S.current?S.current(V,B):V.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(B.toLocaleLowerCase()))===0);return W?L.indexOf(W):-1}const _=s.current;if(m.current.length>0&&m.current[0]!==" "&&(M(_,_,m.current)===-1?E(!1):O.key===" "&&It(O)),_==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(It(O),E(!0)),_.every(L=>{var V,B;return L?((V=L[0])==null?void 0:V.toLocaleLowerCase())!==((B=L[1])==null?void 0:B.toLocaleLowerCase()):!0})&&m.current===O.key&&(m.current="",b.current=v.current),m.current+=O.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",b.current=v.current,E(!1)},d);const P=b.current,N=M(_,[..._.slice((P||0)+1),..._.slice(0,(P||0)+1)],m.current);N!==-1?(y(N),v.current=N):O.key!==" "&&(m.current="",E(!1))}),I=k.useMemo(()=>({onKeyDown:C}),[C]),A=k.useMemo(()=>({onKeyDown:C,onKeyUp(O){O.key===" "&&E(!1)}}),[C,E]);return k.useMemo(()=>c?{reference:I,floating:A}:{},[c,I,A])}function Gb(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function cN(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Yb(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(d,f){const h=performance.now(),p=h-l;if(i===null||a===null||p===0)return i=d,a=f,l=h,null;const m=d-i,b=f-a,y=Math.sqrt(m*m+b*b)/p;return i=d,a=f,l=h,y}const u=d=>{let{x:f,y:h,placement:p,elements:m,onClose:b,nodeId:v,tree:y}=d;return function(S){function T(){clearTimeout(o),b()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:E,clientY:C}=S,I=[E,C],A=Cn(S),O=S.type==="mouseleave",M=lt(m.floating,A),_=lt(m.domReference,A),F=m.domReference.getBoundingClientRect(),P=m.floating.getBoundingClientRect(),N=p.split("-")[0],L=f>P.right-P.width/2,V=h>P.bottom-P.height/2,B=cN(I,F),W=P.width>F.width,D=P.height>F.height,j=(W?F:P).left,K=(W?F:P).right,J=(D?F:P).top,X=(D?F:P).bottom;if(M&&(s=!0,!O))return;if(_&&(s=!1),_&&!O){s=!0;return}if(O&&Ue(S.relatedTarget)&&lt(m.floating,S.relatedTarget)||y&&Vr(y.nodesRef.current,v).some(z=>{let{context:H}=z;return H==null?void 0:H.open}))return;if(N==="top"&&h>=F.bottom-1||N==="bottom"&&h<=F.top+1||N==="left"&&f>=F.right-1||N==="right"&&f<=F.left+1)return T();let G=[];switch(N){case"top":G=[[j,F.top+1],[j,P.bottom-1],[K,P.bottom-1],[K,F.top+1]];break;case"bottom":G=[[j,P.top+1],[j,F.bottom-1],[K,F.bottom-1],[K,P.top+1]];break;case"left":G=[[P.right-1,X],[P.right-1,J],[F.left+1,J],[F.left+1,X]];break;case"right":G=[[F.right-1,X],[F.right-1,J],[P.left+1,J],[P.left+1,X]];break}function $(z){let[H,U]=z;switch(N){case"top":{const Y=[W?H+t/2:L?H+t*4:H-t*4,U+t+1],ce=[W?H-t/2:L?H+t*4:H-t*4,U+t+1],R=[[P.left,L||W?P.bottom-t:P.top],[P.right,L?W?P.bottom-t:P.top:P.bottom-t]];return[Y,ce,...R]}case"bottom":{const Y=[W?H+t/2:L?H+t*4:H-t*4,U-t],ce=[W?H-t/2:L?H+t*4:H-t*4,U-t],R=[[P.left,L||W?P.top+t:P.bottom],[P.right,L?W?P.top+t:P.bottom:P.top+t]];return[Y,ce,...R]}case"left":{const Y=[H+t+1,D?U+t/2:V?U+t*4:U-t*4],ce=[H+t+1,D?U-t/2:V?U+t*4:U-t*4];return[...[[V||D?P.right-t:P.left,P.top],[V?D?P.right-t:P.left:P.right-t,P.bottom]],Y,ce]}case"right":{const Y=[H-t,D?U+t/2:V?U+t*4:U-t*4],ce=[H-t,D?U-t/2:V?U+t*4:U-t*4],R=[[V||D?P.left+t:P.right,P.top],[V?D?P.left+t:P.right:P.left+t,P.bottom]];return[Y,ce,...R]}}}if(!Gb([E,C],G)){if(s&&!B)return T();if(!O&&r){const z=c(S.clientX,S.clientY);if(z!==null&&z<.1)return T()}Gb([E,C],$([f,h]))?!s&&r&&(o=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const Xo=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[ei(10),id({fallbackAxisSideDirection:"end"}),sd(),ub({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=jr({open:n,middleware:s,transform:!0,whileElementsMounted:Js,onOpenChange:(p,m)=>{var v;const b=m==null?void 0:m.relatedTarget;b&&b.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=si(l),u=Br(l),d=Hr(l),{getReferenceProps:f,getFloatingProps:h}=zr([c,u,d]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&x.jsx($r,{preserveTabOrder:!0,id:`${t}-portal`,children:x.jsx(Ko,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[x.jsx(vb,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},uN=e=>{const t=w.useRef(null),n=w.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=w.useState(!1),{context:a,refs:l}=jr({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=si(a),u=Hr(a),d=Br(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=zr([c,u,d]);return x.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[x.jsx(mo,{...h(e),as:dt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:x.jsx(dt.span,{layoutId:o,children:e.trigger})}),x.jsx(Jn,{children:s?x.jsx($r,{root:t,children:x.jsx(Ko,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:x.jsx(dt.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},qb=300,dN=500,Kb=(e="")=>$e("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),vd=w.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Zb=w.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=ur(),c=l!==null,[u,d]=w.useState(!1),[f,h]=w.useState(!1),[p,m]=w.useState(null),b=w.useRef([]),v=w.useRef([]),y=w.useContext(vd),g=dr(),S=VM(),T=mb(),{floatingStyles:E,refs:C,context:I}=jr({nodeId:S,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Js,placement:c?"right":"bottom-start",middleware:[ei({mainAxis:c?0:4,alignmentAxis:c?-4:0}),id(),sd()]}),A=Hr(I,{role:"menu",enabled:!0}),O=Br(I,{bubbles:!0}),M=Sb(I,{enabled:n,delay:{open:qb},handleClose:Yb({blockPointerEvents:!0,buffer:1})}),_=si(I,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),F=yd(I,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:b,scrollItemIntoView:!0,onNavigate:m}),P=lN(I,{activeIndex:p,listRef:v,resetMs:dN,onMatch:u?m:void 0}),{getReferenceProps:N,getFloatingProps:L,getItemProps:V}=zr([M,_,A,O,F,P]);w.useEffect(()=>{if(!g)return;const W=()=>d(!1),D=j=>{j.nodeId!==S&&j.parentId===l&&d(!1)};return g.events.on("click",W),g.events.on("menuopen",D),()=>{g.events.off("click",W),g.events.off("menuopen",D)}},[g,S,l]),w.useEffect(()=>{u&&g&&g.events.emit("menuopen",{parentId:l,nodeId:S})},[g,u,S,l]);const B=r?i.className:$e(Kb(i.className));return x.jsxs($M,{id:S,children:[x.jsx(w.Fragment,{children:i.asChild?x.jsx(Lo,{children:s,ref:ad([C.setReference,T.ref,a]),tabIndex:c?y.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":f?"":void 0,className:B,...N(y.getItemProps({...i,onFocus(W){var D;(D=i.onFocus)==null||D.call(i,W),h(!1),y.setHasFocusInside(!0)}}))}):x.jsxs("button",{type:"button",ref:ad([C.setReference,T.ref,a]),tabIndex:c?y.activeIndex===T.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":f?"":void 0,className:B,...N(y.getItemProps({...i,onFocus(W){var D;(D=i.onFocus)==null||D.call(i,W),h(!1),y.setHasFocusInside(!0)}})),children:[s,c&&x.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[x.jsx("span",{className:"sr-only",children:"Next menu"}),x.jsx(du,{size:14})]})]})}),x.jsx(vd.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:V,setHasFocusInside:h,isOpen:u},children:x.jsx(MM,{elementsRef:b,labelsRef:v,children:u&&x.jsx($r,{preserveTabOrder:!0,children:x.jsx(Ko,{context:I,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:x.jsx(t,{...L(),ref:C.setFloating,style:{...i.style,...E},className:$e("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),fN=w.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=w.useContext(vd),a=mb({label:r?null:typeof e=="string"?e:t}),l=dr(),c=a.index===i.activeIndex;return x.jsxs("button",{...o,ref:ad([a.ref,s]),"data-active":c,"data-open":i.isOpen,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Kb(o.className),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?x.jsx(n,{size:16}):null]})}),hN=w.forwardRef((e,t)=>ur()!==null?x.jsx(Zb,{...e,isParent:!1,ref:t}):x.jsx(RM,{children:x.jsx(Zb,{...e,isParent:!0,ref:t})})),pN=(e,t)=>Bi()?t:window.matchMedia(e).matches,mN=(e,t=!0)=>{const[n,r]=w.useState(t);return w.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(pN(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},dn="600ms",gN={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:dn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:dn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:dn}},yN={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:dn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:dn}},bd={drawer:e=>e==="left"?gN:yN,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:dn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:dn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:dn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:dn},enter:{opacity:1,scale:[1.05,1],animationDuration:dn},exit:{opacity:0,scale:.97,animationDuration:dn}}},vN=ho("isolate z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),bN={top:0,left:0,right:0,bottom:-1},wN=e=>e*.62,xN=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=wN(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return x.jsx(dt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:bN,whileDrag:{cursor:"grabbing"},className:$e("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?x.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},wd={drawer:"right",sheet:"none",dialog:"none"},TN=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=w.useId(),a=w.useId(),l=mN("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:wd[e]:r?wd[e]:wd.sheet,d=l||r?bd[e]:bd.sheet,f=typeof d=="function"?d(u):d,h=l||r?e:"sheet",{refs:p,context:m}=jr({open:s.open,onOpenChange:s.onChange}),b=si(m),v=Hr(m),y=Br(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:g,getFloatingProps:S}=zr([b,v,y]),T=s.trigger,E=Or(void 0),C=()=>s.onChange(!1);return x.jsxs(w.Fragment,{children:[s.trigger?x.jsx(w.Fragment,{children:s.asChild?x.jsx(Lo,{ref:p.setReference,...g({layoutId:s.layoutId}),children:T}):x.jsx(dt.button,{ref:p.setReference,...g(),layoutId:s.layoutId,type:"button",children:T})}):null,x.jsx($r,{children:x.jsx(Jn,{presenceAffectsLayout:!0,children:s.open?x.jsx(XM,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${h==="drawer"?"":"flex items-start justify-center p-10"}`,children:x.jsx(Ko,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:x.jsxs(dt.div,{exit:"exit",animate:"enter",initial:"initial",variants:f,ref:p.setFloating,"aria-modal":s.open,layoutId:s.layoutId,"aria-labelledby":i,"aria-describedby":a,className:vN({position:u,type:h}),style:h==="drawer"?{width:E}:{height:E},...S(),children:[s.title?x.jsx("header",{className:"relative w-full",children:s.title?x.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,x.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?x.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?x.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:x.jsx("button",{type:"button",onClick:C,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:x.jsx(hu,{})})}):null,c&&t?x.jsx(xN,{onChange:s.onChange,parent:p.floating,position:u,sheet:h==="sheet",value:E}):null]})})}):null})})]})},SN=e=>x.jsx(dt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Xb=({as:e,title:t,children:n,placement:r,focus:o=!0,hover:s=!0,enabled:i=!0,popover:a=!0,followCursor:l=!1,...c})=>{const[u,d]=w.useState(!1),f=w.useRef(null),h=e||"span",{refs:p,floatingStyles:m,context:b}=jr({open:u,placement:r,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Js,middleware:[sd(),ei(5),id({fallbackAxisSideDirection:"start"}),ub({padding:5,element:f})]}),v=Sb(b,{move:!0,delay:{open:qb},enabled:i?s:!1,handleClose:a?Yb():null}),y=rN(b,{enabled:i?o:!1}),g=si(b,{enabled:i?a:!1}),S=Br(b,{enabled:i}),T=Hr(b,{role:"tooltip",enabled:i}),E=JM(b,{enabled:!!i&&!!l}),{getReferenceProps:C,getFloatingProps:I}=zr([T,S,E,o?y:void 0,s?v:void 0,a?g:void 0]);return x.jsxs(w.Fragment,{children:[x.jsx(h,{ref:p.setReference,...C(c),children:t}),x.jsx($r,{preserveTabOrder:!0,children:u&&x.jsxs(po,{...I(),ref:p.setFloating,style:m,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[x.jsx(vb,{ref:f,context:b,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),n]})})]})};class Ha{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Ha.getDescendantProperty(a[l],s,r);else s&&Ha.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Wr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Wr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Ha.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Wr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Wr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Wr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}const Qb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>x.jsxs("div",{className:$e("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||r?x.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?x.jsx(Xb,{as:"button",type:"button",title:x.jsxs("span",{className:"cursor-help",children:[x.jsx("span",{className:"sr-only",children:r}),x.jsx(oy,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:x.jsx("div",{className:"w-full max-w-48 whitespace-break-spaces break-words",children:r})}):null,e?x.jsxs(w.Fragment,{children:[x.jsx(ny,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),x.jsx(dI,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),ii=w.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:p,componentName:m,placeholder:b,hideLeft:v=!1,required:y,disabled:g},S)=>{const T=d??h,E=kt(),C=e??E.inputOptionalLabel;return x.jsxs("fieldset",{ref:S,form:u,disabled:g,"data-error":!!c,"aria-disabled":g,"data-component":m,"data-interactive":!!s,className:$e("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[x.jsxs("label",{form:u,htmlFor:T,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[x.jsx(Qb,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:b,children:C||n?x.jsxs(w.Fragment,{children:[y?null:x.jsx("span",{"aria-disabled":g,className:"text-opacity-70 aria-disabled:text-disabled",children:C}),n?x.jsx(w.Fragment,{children:n}):null]}):null}),x.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?x.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?x.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),x.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),x.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),EN=e=>x.jsx(w.Fragment,{children:e.children}),Jb=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??EN,a=r.label??r.value;return r.hidden?null:x.jsx(dt.li,{...o,ref:s,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsxs("button",{type:"button","aria-busy":r.disabled,"aria-checked":t,"aria-current":t,"aria-selected":t,onClick:n,"data-value":r.value,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary-hover text-primary-foreground":""} ${e?"bg-primary text-primary-foreground":""}`,children:[x.jsx(i,{...o,label:r.label,value:r.value,children:a}),t?x.jsx("span",{children:x.jsx(cI,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),CN={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},PN={caseSensitive:!1,sort:!1},kN=[],IN=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const b=w.useRef(null),v=p.value??p.defaultValue??"",y=kt(),[g,S]=w.useState(!1),[T,E]=w.useState(""),[C,I]=w.useState(v),[A,O]=w.useState(()=>{var R;return((R=e.find(pe=>pe.value===v))==null?void 0:R.label)??v}),[M,_]=w.useState(null),F=w.useRef(kN),P=t&&T!==""?[{value:T,label:T,"data-dynamic":"true"},...e]:e,N=new Wr(P,["value","label"],PN).search(T),L=t?void 0:`^(${e.map(R=>`${Cs(R.value)}${R.label?"|"+Cs(R.label):""}`).join("|")})$`;w.useEffect(()=>{if(p.value){const R=e.find(pe=>pe.value===p.value);I((R==null?void 0:R.label)??p.value)}},[p.value]);const{x:V,y:B,strategy:W,refs:D,context:j}=jr({open:g,transform:!0,strategy:"absolute",onOpenChange:S,whileElementsMounted:Js,middleware:[ei(4),cb({elementContext:"reference",padding:10,apply(R){var xe;const pe=(xe=b.current)==null?void 0:xe.getBoundingClientRect().width;Object.assign(R.elements.floating.style,{width:`${pe}px`,maxWidth:`${pe}px`,maxHeight:`${Math.min(250,R.availableHeight)}px`})}})]}),K=Ub(j,CN),{getReferenceProps:J,getFloatingProps:X,getItemProps:G}=zr([Hr(j,{role:"listbox"}),Br(j),yd(j,{cols:0,listRef:F,loop:!0,virtual:!0,allowEscape:!0,activeIndex:M,selectedIndex:M,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:R=>_(pe=>R??pe)})]);w.useEffect(()=>{const R=D.reference.current;if(R)return Ss(R)},[]);const $=(R,pe)=>{I(R.value);const xe=D.reference.current;if(!xe)return;xe==null||xe.setAttribute("data-value",R.value),xe.value=R.value;const te=new Event("change",{bubbles:!1,cancelable:!0});xe.dispatchEvent(te),p.onChange&&p.onChange(te),O(R.label??""),S(!1),E(""),_(pe)},z=R=>{var xe;const pe=R.target.value;return E(pe),!g&&pe===""?S(!0):(R.target.name=p.name||"",pe?S(!0):(xe=p.onChange)==null?void 0:xe.call(p,R))},H=()=>{S(!0),E("")},U=()=>{var R;E(""),I(""),(R=D.reference.current)==null||R.setAttribute("data-value",""),O(""),Jl(D.reference.current),S(!1)},Y=p.id||p.name,ce=()=>{var R;S(!0),E(""),(R=D.reference.current)==null||R.focus()};return x.jsxs(ii,{...p,left:d,error:f,ref:b,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ce,children:[x.jsx(uu,{size:20}),x.jsx("span",{className:"sr-only",children:y.inputCaretDown})]}),C?x.jsx("button",{type:"button",onClick:U,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{"data-shadow":"true",...J({...p,onChange:z,onFocus:H,pattern:L,ref:D.setReference,name:`${Y}-shadow`,id:`${Y}-shadow`,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),S(!1);if(R.key==="Enter"){if(M!==null&&N[M])return R.preventDefault(),$(N[M],M);if(N.length===1)return R.preventDefault(),$(N[0],0)}}}),"data-value":C,"data-error":!!f,"data-name":Y,"data-target":Y,required:h,value:g?T:A||C,"aria-autocomplete":"list",autoComplete:"off",className:$e("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",p.className)}),x.jsx("input",{id:Y,name:Y,type:"hidden","data-origin":Y,ref:m,required:h,defaultValue:p.value||C||void 0}),x.jsx($r,{preserveTabOrder:!0,children:g?x.jsx(Ko,{guards:!0,returnFocus:!1,context:j,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...X({ref:D.setFloating,style:{position:W,left:(V??0)+(C?26:16),top:B??0,...K.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:x.jsxs(Jn,{children:[N.map((R,pe)=>{const xe=C===R.value||C===R.label;return x.jsx(Jb,{...G({onClick:()=>$(R,pe),ref:te=>void(F.current[pe]=te),selected:M===pe}),option:R,active:xe,selected:M===pe},`${R.value}-option`)}),N.length===0?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:o||y.autocompleteEmpty})}):null]})})}):null})]})}),Wa=0,hr=1,Qo=2,e0=4;function ai(e,t){return n=>e(t(n))}function AN(e,t){return t(e)}function t0(e,t){return n=>e(t,n)}function n0(e,t){return()=>e(t)}function Ua(e,t){return t(e),e}function Xe(...e){return e}function ON(e){e()}function r0(e){return()=>e}function _N(...e){return()=>{e.map(ON)}}function xd(e){return e!==void 0}function Ur(){}function ze(e,t){return e(hr,t)}function Ee(e,t){e(Wa,t)}function Td(e){e(Qo)}function Ft(e){return e(e0)}function he(e,t){return ze(e,t0(t,Wa))}function kn(e,t){const n=e(hr,r=>{n(),t(r)});return n}function Oe(){const e=[];return(t,n)=>{switch(t){case Qo:e.splice(0,e.length);return;case hr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Wa:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ee(e){let t=e;const n=Oe();return(r,o)=>{switch(r){case hr:o(t);break;case Wa:t=o;break;case e0:return t}return n(r,o)}}function DN(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case hr:return s?n===s?void 0:(r(),n=s,t=ze(e,s),t):(r(),Ur);case Qo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Xt(e){return Ua(Oe(),t=>he(e,t))}function Lt(e,t){return Ua(ee(t),n=>he(e,n))}function MN(...e){return t=>e.reduceRight(AN,t)}function q(e,...t){const n=MN(...t);return(r,o)=>{switch(r){case hr:return ze(e,n(o));case Qo:Td(e);return}}}function o0(e,t){return e===t}function Qe(e=o0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function ve(e){return t=>n=>{e(n)&&t(n)}}function ae(e){return t=>ai(t,e)}function In(e){return t=>()=>t(e)}function An(e,t){return n=>r=>n(t=e(t,r))}function Jo(e){return t=>n=>{e>0?e--:t(n)}}function pr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function s0(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Ce(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);ze(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function i0(...e){return function(t,n){switch(t){case hr:return _N(...e.map(r=>ze(r,n)));case Qo:return;default:throw new Error(`unrecognized action ${t}`)}}}function we(e,t=o0){return q(e,Qe(t))}function Et(...e){const t=Oe(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);ze(s,l=>{n[i]=l,r=r|a,r===o&&Ee(t,n)})}),function(s,i){switch(s){case hr:return r===o&&i(n),ze(t,i);case Qo:return Td(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ve(e,t=[],{singleton:n}={singleton:!0}){return{id:NN(),constructor:e,dependencies:t,singleton:n}}const NN=()=>Symbol();function FN(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function LN(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const Ga=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Sd(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(v,y){v.propsReady&&Ee(v.propsReady,!1);for(const g of r){const S=v[t.required[g]];Ee(S,y[g])}for(const g of o)if(g in y){const S=v[t.optional[g]];Ee(S,y[g])}v.propsReady&&Ee(v.propsReady,!0)}function c(v){return s.reduce((y,g)=>(y[g]=S=>{const T=v[t.methods[g]];Ee(T,S)},y),{})}function u(v){return i.reduce((y,g)=>(y[g]=DN(v[t.events[g]]),y),{})}const d=w.forwardRef((v,y)=>{const{children:g,...S}=v,[T]=w.useState(()=>Ua(FN(e),C=>l(C,S))),[E]=w.useState(n0(u,T));return Ga(()=>{for(const C of i)C in S&&ze(E[C],S[C]);return()=>{Object.values(E).map(Td)}},[S,E,T]),Ga(()=>{l(T,S)}),w.useImperativeHandle(y,r0(c(T))),w.createElement(a.Provider,{value:T},n?w.createElement(n,LN([...r,...o,...i],S),g):g)}),f=v=>w.useCallback(t0(Ee,w.useContext(a)[v]),[v]),h=v=>{const g=w.useContext(a)[v],S=w.useCallback(T=>ze(g,T),[g]);return w.useSyncExternalStore(S,()=>Ft(g),()=>Ft(g))},p=v=>{const g=w.useContext(a)[v],[S,T]=w.useState(n0(Ft,g));return Ga(()=>ze(g,E=>{E!==S&&T(r0(E))}),[g,S]),S},m=w.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,y)=>{const S=w.useContext(a)[v];Ga(()=>ze(S,y),[y,S])}}}const VN=typeof document<"u"?w.useLayoutEffect:w.useEffect;var Qt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Qt||{});const $N={0:"debug",1:"log",2:"warn",3:"error"},RN=()=>typeof globalThis>"u"?window:globalThis,mr=Ve(()=>{const e=ee(3);return{log:ee((n,r,o=1)=>{var s;const i=(s=RN().VIRTUOSO_LOG_LEVEL)!=null?s:Ft(e);o>=i&&console[$N[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Ed(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function On(e,t=!0){return Ed(e,t).callbackRef}function a0(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=BN(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(jN("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Ed(a,n)}function BN(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Qt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function jN(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Qt.WARN),t==="normal"?0:parseInt(t??"0",10)}function fn(e,t){return Math.round(e.getBoundingClientRect()[t])}function l0(e,t){return Math.abs(e-t)<1.01}function c0(e,t,n,r=Ur,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,b=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:b})};d.suppressFlushSync?v():Oi.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-b)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,b;f===window?(m=Math.max(fn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,b=document.documentElement.scrollTop):(m=f.scrollHeight,p=fn(f,"height"),b=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),l0(p,m)||d.top===b){e({scrollTop:b,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Bt=Ve(()=>{const e=Oe(),t=Oe(),n=ee(0),r=Oe(),o=ee(0),s=Oe(),i=Oe(),a=ee(0),l=ee(0),c=ee(0),u=ee(0),d=Oe(),f=Oe(),h=ee(!1);return he(q(e,ae(({scrollTop:p})=>p)),t),he(q(e,ae(({scrollHeight:p})=>p)),i),he(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),li={lvl:0};function u0(e,t,n,r=li,o=li){return{k:e,v:t,lvl:n,l:r,r:o}}function Ge(e){return e===li}function es(){return li}function Cd(e,t){if(Ge(e))return li;const{k:n,l:r,r:o}=e;if(t===n){if(Ge(r))return o;if(Ge(o))return r;{const[s,i]=d0(r);return Ya(wt(e,{k:s,v:i,l:f0(r)}))}}else return t<n?Ya(wt(e,{l:Cd(r,t)})):Ya(wt(e,{r:Cd(o,t)}))}function ci(e,t){if(!Ge(e))return t===e.k?e.v:t<e.k?ci(e.l,t):ci(e.r,t)}function hn(e,t,n="k"){if(Ge(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=hn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return hn(e.l,t,n)}function Jt(e,t,n){return Ge(e)?u0(t,n,1):t===e.k?wt(e,{k:t,v:n}):t<e.k?h0(wt(e,{l:Jt(e.l,t,n)})):h0(wt(e,{r:Jt(e.r,t,n)}))}function Pd(e,t,n){if(Ge(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Pd(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Pd(i,t,n))),a}function Gr(e){return Ge(e)?[]:[...Gr(e.l),{k:e.k,v:e.v},...Gr(e.r)]}function d0(e){return Ge(e.r)?[e.k,e.v]:d0(e.r)}function f0(e){return Ge(e.r)?e.l:Ya(wt(e,{r:f0(e.r)}))}function wt(e,t){return u0(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function kd(e){return Ge(e)||e.lvl>e.r.lvl}function h0(e){return Id(m0(e))}function Ya(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(kd(t))return m0(wt(e,{lvl:r-1}));if(!Ge(t)&&!Ge(t.r))return wt(t.r,{l:wt(t,{r:t.r.l}),r:wt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(kd(e))return Id(wt(e,{lvl:r-1}));if(!Ge(n)&&!Ge(n.l)){const o=n.l,s=kd(o)?n.lvl-1:n.lvl;return wt(o,{l:wt(e,{r:o.l,lvl:r-1}),r:Id(wt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function qa(e,t,n){if(Ge(e))return[];const r=hn(e,t)[0];return zN(Pd(e,r,n))}function p0(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function zN(e){return p0(e,({k:t,v:n})=>({index:t,value:n}))}function Id(e){const{r:t,lvl:n}=e;return!Ge(t)&&!Ge(t.r)&&t.lvl===n&&t.r.lvl===n?wt(t,{l:wt(e,{r:t.l}),lvl:n+1}):e}function m0(e){const{l:t}=e;return!Ge(t)&&t.lvl===e.lvl?wt(t,{r:wt(e,{l:t.r})}):e}function Ka(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function g0(e,t,n){return e[Ka(e,t,n)]}function HN(e,t,n,r){const o=Ka(e,t,r),s=Ka(e,n,r,o);return e.slice(o,s+1)}const Ad=Ve(()=>({recalcInProgress:ee(!1)}),[],{singleton:!0});function WN(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function y0(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function UN(e,t){let n=Ge(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Ge(e)){e=Jt(e,0,o);continue}const a=qa(e,s-1,i+1);if(a.some(WN(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Cd(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Jt(e,i+1,f));c&&(e=Jt(e,s,o))}return[e,n]}function GN(){return{offsetTree:[],sizeTree:es(),groupOffsetTree:es(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Od({index:e},t){return t===e?0:t<e?-1:1}function YN({offset:e},t){return t===e?0:t<e?-1:1}function qN(e){return{index:e.index,value:e}}function KN(e,t,n,r=0){return r>0&&(t=Math.max(t,g0(e,r,Od).offset)),p0(HN(e,t,n,YN),qN)}function _d(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ka(o,t-1,Od),a=o[l].offset;const u=hn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===hn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of qa(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function ZN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Qt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Ge(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Jt(Jt(p,m,f),m+1,h),i)}else[i,a]=UN(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=_d(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Jt(f,h,ui(h,l,o)),es()),groupIndices:n}}function ui(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=g0(t,e,Od),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function XN(e){return typeof e.groupIndex<"u"}function v0(e,t,n){if(XN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=b0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function b0(e,t){if(!Za(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Za(e){return!Ge(e.groupOffsetTree)}function QN(e){return Gr(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const JN={offsetHeight:"height",offsetWidth:"width"},_n=Ve(([{log:e},{recalcInProgress:t}])=>{const n=Oe(),r=Oe(),o=Lt(r,0),s=Oe(),i=Oe(),a=ee(0),l=ee([]),c=ee(void 0),u=ee(void 0),d=ee((T,E)=>fn(T,JN[E])),f=ee(void 0),h=ee(0),p=GN(),m=Lt(q(n,Ce(l,e,h),An(ZN,p),Qe()),p),b=Lt(q(l,Qe(),An((T,E)=>({prev:T.current,current:E}),{prev:[],current:[]}),ae(({prev:T})=>T)),[]);he(q(l,ve(T=>T.length>0),Ce(m,h),ae(([T,E,C])=>{const I=T.reduce((A,O,M)=>Jt(A,O,ui(O,E.offsetTree,C)||M),es());return{...E,groupIndices:T,groupOffsetTree:I}})),m),he(q(r,Ce(m),ve(([T,{lastIndex:E}])=>T<E),ae(([T,{lastIndex:E,lastSize:C}])=>[{startIndex:T,endIndex:E,size:C}])),n),he(c,u);const v=Lt(q(c,ae(T=>T===void 0)),!0);he(q(u,ve(T=>T!==void 0&&Ge(Ft(m).sizeTree)),ae(T=>[{startIndex:0,endIndex:0,size:T}])),n);const y=Xt(q(n,Ce(m),An(({sizes:T},[E,C])=>({changed:C!==T,sizes:C}),{changed:!1,sizes:p}),ae(T=>T.changed)));ze(q(a,An((T,E)=>({diff:T.prev-E,prev:E}),{diff:0,prev:0}),ae(T=>T.diff)),T=>{const{groupIndices:E}=Ft(m);if(T>0)Ee(t,!0),Ee(s,T+y0(T,E));else if(T<0){const C=Ft(b);C.length>0&&(T-=y0(-T,C)),Ee(i,T)}}),ze(q(a,Ce(e)),([T,E])=>{T<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Qt.ERROR)});const g=Xt(s);he(q(s,Ce(m),ae(([T,E])=>{const C=E.groupIndices.length>0,I=[],A=E.lastSize;if(C){const O=ci(E.sizeTree,0);let M=0,_=0;for(;M<T;){const N=E.groupIndices[_],L=E.groupIndices.length===_+1?1/0:E.groupIndices[_+1]-N-1;I.push({startIndex:N,endIndex:N,size:O}),I.push({startIndex:N+1,endIndex:N+1+L-1,size:A}),_++,M+=L+1}const F=Gr(E.sizeTree);return M!==T&&F.shift(),F.reduce((N,{k:L,v:V})=>{let B=N.ranges;return N.prevSize!==0&&(B=[...N.ranges,{startIndex:N.prevIndex,endIndex:L+T-1,size:N.prevSize}]),{ranges:B,prevIndex:L+T,prevSize:V}},{ranges:I,prevIndex:T,prevSize:0}).ranges}return Gr(E.sizeTree).reduce((O,{k:M,v:_})=>({ranges:[...O.ranges,{startIndex:O.prevIndex,endIndex:M+T-1,size:O.prevSize}],prevIndex:M+T,prevSize:_}),{ranges:[],prevIndex:0,prevSize:A}).ranges})),n);const S=Xt(q(i,Ce(m,h),ae(([T,{offsetTree:E},C])=>{const I=-T;return ui(I,E,C)})));return he(q(i,Ce(m,h),ae(([T,E,C])=>{if(E.groupIndices.length>0){if(Ge(E.sizeTree))return E;let A=es();const O=Ft(b);let M=0,_=0,F=0;for(;M<-T;){F=O[_];const N=O[_+1]-F-1;_++,M+=N+1}if(A=Gr(E.sizeTree).reduce((N,{k:L,v:V})=>Jt(N,Math.max(0,L+T),V),A),M!==-T){const N=ci(E.sizeTree,F);A=Jt(A,0,N);const L=hn(E.sizeTree,-T+1)[1];A=Jt(A,1,L)}return{...E,sizeTree:A,..._d(E.offsetTree,0,A,C)}}else{const A=Gr(E.sizeTree).reduce((O,{k:M,v:_})=>Jt(O,Math.max(0,M+T),_),es());return{...E,sizeTree:A,..._d(E.offsetTree,0,A,C)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:y,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Xe(mr,Ad),{singleton:!0}),eF=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function w0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!eF)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const di=Ve(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Oe(),p=Oe(),m=ee(0);let b=null,v=null,y=null;function g(){b&&(b(),b=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),Ee(o,!1)}return he(q(h,Ce(e,s,t,m,l,c,f),Ce(r,u,d),ae(([[S,T,E,C,I,A,O,M],_,F,P])=>{const N=w0(S),{align:L,behavior:V,offset:B}=N,W=C-1,D=v0(N,T,W);let j=ui(D,T.offsetTree,_)+A;L==="end"?(j+=F+hn(T.sizeTree,D)[1]-E+P,D===W&&(j+=O)):L==="center"?j+=(F+hn(T.sizeTree,D)[1]-E+P)/2:j-=I,B&&(j+=B);const K=J=>{g(),J?(M("retrying to scroll to",{location:S},Qt.DEBUG),Ee(h,S)):(Ee(p,!0),M("list did not change, scroll successful",{},Qt.DEBUG))};if(g(),V==="smooth"){let J=!1;y=ze(n,X=>{J=J||X}),b=kn(a,()=>{K(J)})}else b=kn(q(n,tF(150)),K);return v=setTimeout(()=>{g()},1200),Ee(o,!0),M("scrolling from index to",{index:D,top:j,behavior:V},Qt.DEBUG),{top:j,behavior:V}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Xe(_n,Bt,mr),{singleton:!0});function tF(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const fi="up",hi="down",nF="none",rF={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},oF=0,pi=Ve(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ee(!1),a=ee(!0),l=Oe(),c=Oe(),u=ee(4),d=ee(oF),f=Lt(q(i0(q(we(t),Jo(1),In(!0)),q(we(t),Jo(1),In(!1),s0(100))),Qe()),!1),h=Lt(q(i0(q(s,In(!0)),q(s,In(!1),s0(200))),Qe()),!1);he(q(Et(we(t),we(d)),ae(([y,g])=>y<=g),Qe()),a),he(q(a,pr(50)),c);const p=Xt(q(Et(e,we(n),we(r),we(o),we(u)),An((y,[{scrollTop:g,scrollHeight:S},T,E,C,I])=>{const A=g+T-S>-I,O={viewportHeight:T,scrollTop:g,scrollHeight:S};if(A){let _,F;return g>y.state.scrollTop?(_="SCROLLED_DOWN",F=y.state.scrollTop-g):(_="SIZE_DECREASED",F=y.state.scrollTop-g||y.scrollTopDelta),{atBottom:!0,state:O,atBottomBecause:_,scrollTopDelta:F}}let M;return O.scrollHeight>y.state.scrollHeight?M="SIZE_INCREASED":T<y.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":g<y.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:O}},rF),Qe((y,g)=>y&&y.atBottom===g.atBottom))),m=Lt(q(e,An((y,{scrollTop:g,scrollHeight:S,viewportHeight:T})=>{if(l0(y.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const E=S-(g+T)<1;return y.scrollTop!==g&&E?{scrollHeight:S,scrollTop:g,jump:y.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),ve(y=>y.changed),ae(y=>y.jump)),0);he(q(p,ae(y=>y.atBottom)),i),he(q(i,pr(50)),l);const b=ee(hi);he(q(e,ae(({scrollTop:y})=>y),Qe(),An((y,g)=>Ft(h)?{direction:y.direction,prevScrollTop:g}:{direction:g<y.prevScrollTop?fi:hi,prevScrollTop:g},{direction:hi,prevScrollTop:0}),ae(y=>y.direction)),b),he(q(e,pr(50),In(nF)),b);const v=ee(0);return he(q(f,ve(y=>!y),In(0)),v),he(q(t,pr(100),Ce(f),ve(([y,g])=>!!g),An(([y,g],[S])=>[g,S],[0,0]),ae(([y,g])=>g-y)),v),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:b,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Xe(Bt)),gr=Ve(([{log:e}])=>{const t=ee(!1),n=Xt(q(t,ve(r=>r),Qe()));return ze(t,r=>{r&&Ft(e)("props updated",{},Qt.DEBUG)}),{propsReady:t,didMount:n}},Xe(mr),{singleton:!0});function Dd(e,t){e==0?t():requestAnimationFrame(()=>Dd(e-1,t))}function Md(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const mi=Ve(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=ee(!0),l=ee(0),c=ee(!0);return he(q(i,Ce(l),ve(([u,d])=>!!d),In(!1)),a),he(q(i,Ce(l),ve(([u,d])=>!!d),In(!1)),c),ze(q(Et(t,i),Ce(a,e,n,c),ve(([[,u],d,{sizeTree:f},h,p])=>u&&(!Ge(f)||xd(h))&&!d&&!p),Ce(l)),([,u])=>{kn(s,()=>{Ee(c,!0)}),Dd(4,()=>{kn(r,()=>{Ee(a,!0)}),Ee(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Xe(_n,Bt,di,gr),{singleton:!0});function x0(e){return e?e==="smooth"?"smooth":"auto":!1}const sF=(e,t)=>typeof e=="function"?x0(e(t)):t&&x0(e),iF=Ve(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ee(!1),d=Oe();let f=null;function h(m){Ee(o,{index:"LAST",align:"end",behavior:m})}ze(q(Et(q(we(e),Jo(1)),a),Ce(we(u),n,s,c),ae(([[m,b],v,y,g,S])=>{let T=b&&g,E="auto";return T&&(E=sF(v,y||S),T=T&&!!E),{totalCount:m,shouldFollow:T,followOutputBehavior:E}}),ve(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:b})=>{f&&(f(),f=null),f=kn(t,()=>{Ft(l)("following output to ",{totalCount:m},Qt.DEBUG),h(b),f=null})});function p(m){const b=kn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Ft(l)("scrolling to bottom due to increased size",{},Qt.DEBUG),h("auto"))});setTimeout(b,100)}return ze(q(Et(we(u),e,i),ve(([m,,b])=>m&&b),An(({value:m},[,b])=>({refreshed:m===b,value:b}),{refreshed:!1,value:0}),ve(({refreshed:m})=>m),Ce(u,e)),([,m])=>{Ft(s)&&p(m!==!1)}),ze(d,()=>{p(Ft(u)!==!1)}),ze(Et(we(u),r),([m,b])=>{m&&!b.atBottom&&b.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Xe(_n,pi,di,mi,gr,mr,Bt));function aF(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const T0=Ve(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Oe(),i=Oe(),a=Xt(q(s,ae(aF)));return he(q(a,ae(l=>l.totalCount)),e),he(q(a,ae(l=>l.groupIndices)),t),he(q(Et(r,n,o),ve(([l,c])=>Za(c)),ae(([l,c,u])=>hn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Qe(),ae(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Xe(_n,Bt));function gi(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function S0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Xa="top",Qa="bottom",E0="none";function C0(e,t,n){return typeof e=="number"?n===fi&&t===Xa||n===hi&&t===Qa?e:0:n===fi?t===Xa?e.main:e.reverse:t===Qa?e.main:e.reverse}function P0(e,t){return typeof e=="number"?e:e[t]||0}const Nd=Ve(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Oe(),i=ee(0),a=ee(0),l=ee(0),c=Lt(q(Et(we(e),we(t),we(r),we(s,gi),we(l),we(i),we(o),we(n),we(a)),ae(([u,d,f,[h,p],m,b,v,y,g])=>{const S=u-y,T=b+v,E=Math.max(f-S,0);let C=E0;const I=P0(g,Xa),A=P0(g,Qa);return h-=y,h+=f+v,p+=f+v,p-=y,h>u+T-I&&(C=fi),p<u-E+d+A&&(C=hi),C!==E0?[Math.max(S-f-C0(m,Xa,C)-I,0),S-E-v+d+C0(m,Qa,C)+A]:null}),ve(u=>u!=null),Qe(gi)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Xe(Bt),{singleton:!0});function lF(e,t,n){if(Za(t)){const r=b0(e,t);return[{index:hn(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const Fd={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function k0(e,t,n){if(e.length===0)return[];if(!Za(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=qa(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function Ja(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:k0(e,o,s),topItems:k0(t,o,s),topListHeight:t.reduce((m,b)=>b.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function I0(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Md(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return Ja(c,[],a,o,n,r)}const Yr=Ve(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=ee([]),b=ee(0),v=Oe();he(s.topItemsIndexes,m);const y=Lt(q(Et(h,p,we(i,gi),we(t),we(e),we(u),c,we(m),we(r),we(o),n),ve(([E,C,,I,,,,,,,A])=>{const O=A&&A.length!==I;return E&&!C&&!O}),ae(([,,[E,C],I,A,O,M,_,F,P,N])=>{const L=A,{sizeTree:V,offsetTree:B}=L,W=Ft(b);if(I===0)return{...Fd,totalCount:I};if(E===0&&C===0)return W===0?{...Fd,totalCount:I}:I0(W,O,A,F,P,N||[]);if(Ge(V))return W>0?null:Ja(lF(Md(O,I),L,N),[],I,P,L,F);const D=[];if(_.length>0){const G=_[0],$=_[_.length-1];let z=0;for(const H of qa(V,G,$)){const U=H.value,Y=Math.max(H.start,G),ce=Math.min(H.end,$);for(let R=Y;R<=ce;R++)D.push({index:R,size:U,offset:z,data:N&&N[R]}),z+=U}}if(!M)return Ja([],D,I,P,L,F);const j=_.length>0?_[_.length-1]+1:0,K=KN(B,E,C,j);if(K.length===0)return null;const J=I-1,X=Ua([],G=>{for(const $ of K){const z=$.value;let H=z.offset,U=$.start;const Y=z.size;if(z.offset<E){U+=Math.floor((E-z.offset+P)/(Y+P));const R=U-$.start;H+=R*Y+R*P}U<j&&(H+=(j-U)*Y,U=j);const ce=Math.min($.end,J);for(let R=U;R<=ce&&!(H>=C);R++)G.push({index:R,size:Y,offset:H,data:N&&N[R]}),H+=Y+P}});return Ja(X,D,I,P,L,F)}),ve(E=>E!==null),Qe()),Fd);he(q(n,ve(xd),ae(E=>E==null?void 0:E.length)),t),he(q(y,ae(E=>E.topListHeight)),d),he(d,l),he(q(y,ae(E=>[E.top,E.bottom])),a),he(q(y,ae(E=>E.items)),v);const g=Xt(q(y,ve(({items:E})=>E.length>0),Ce(t,n),ve(([{items:E},C])=>E[E.length-1].originalIndex===C-1),ae(([,E,C])=>[E-1,C]),Qe(gi),ae(([E])=>E))),S=Xt(q(y,pr(200),ve(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),ae(({items:E})=>E[0].index),Qe())),T=Xt(q(y,ve(({items:E})=>E.length>0),ae(({items:E})=>{let C=0,I=E.length-1;for(;E[C].type==="group"&&C<I;)C++;for(;E[I].type==="group"&&I>C;)I--;return{startIndex:E[C].index,endIndex:E[I].index}}),Qe(S0)));return{listState:y,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:T,itemsRendered:v,initialItemCount:b,...f}},Xe(_n,T0,Nd,mi,di,pi,gr,Ad),{singleton:!0}),cF=Ve(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(he(q(a,Ce(s),ve(([,l])=>l!==0),Ce(o,e,t,r,n),ae(([[,l],c,u,d,f,h=[]])=>I0(l,c,u,d,f,h))),i),{}),Xe(_n,mi,Yr,gr),{singleton:!0}),A0=Ve(([{scrollVelocity:e}])=>{const t=ee(!1),n=Oe(),r=ee(!1);return he(q(e,Ce(r,t,n),ve(([o,s])=>!!s),ae(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Qe()),t),ze(q(Et(t,e,n),Ce(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Xe(pi),{singleton:!0}),uF=Ve(([{topItemsIndexes:e}])=>{const t=ee(0);return he(q(t,ve(n=>n>0),ae(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Xe(Yr)),O0=Ve(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Oe(),i=Lt(q(Et(e,r,t,n,o),ae(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return he(we(i),s),{totalListHeight:i,totalListHeightChanged:s}},Xe(Bt,Yr),{singleton:!0});function _0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const dF=_0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),fF=Ve(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Xt(q(l,Ce(a),An(([,v,y,g],[{items:S,totalCount:T,bottom:E,offsetBottom:C},I])=>{const A=E+C;let O=0;return y===T&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(O=A-g,O!==0&&(O+=I))),[O,S,T,A]},[0,[],0,0]),ve(([v])=>v!==0),Ce(t,i,r,s,h,p),ve(([,v,y,g,,,S])=>!S&&!g&&v!==0&&y===fi),ae(([[v],,,,,y])=>(y("Upward scrolling compensation",{amount:v},Qt.DEBUG),v))));function b(v){v>0?(Ee(e,{top:-v,behavior:"auto"}),Ee(n,0)):(Ee(n,0),Ee(e,{top:-v,behavior:"auto"}))}return ze(q(m,Ce(n,o)),([v,y,g])=>{g&&dF()?Ee(n,y-v):b(-v)}),ze(q(Et(Lt(o,!1),n,p),ve(([v,y,g])=>!v&&!g&&y!==0),ae(([v,y])=>y),pr(1)),b),he(q(u,ae(v=>({top:-v}))),e),ze(q(c,Ce(d,f),ae(([v,{lastSize:y,groupIndices:g,sizeTree:S},T])=>{function E(C){return C*(y+T)}if(g.length===0)return E(v);{let C=0;const I=ci(S,0);let A=0,O=0;for(;A<v;){A++,C+=I;let M=g.length===O+1?1/0:g[O+1]-g[O]-1;A+M>v&&(C-=I,M=v-A+1),A+=M,C+=E(M),O++}return C}})),v=>{Ee(n,v),requestAnimationFrame(()=>{Ee(e,{top:v}),requestAnimationFrame(()=>{Ee(n,0),Ee(p,!1)})})}),{deviation:n}},Xe(Bt,pi,Yr,_n,mr,Ad)),hF=Ve(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ee(0);return ze(q(e,Ce(r),ve(([,o])=>o!==0),ae(([,o])=>({top:o}))),o=>{kn(q(n,Jo(1),ve(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{Ee(t,o)})})}),{initialScrollTop:r}},Xe(gr,Bt,Yr),{singleton:!0}),pF=Ve(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ee(!1),r=Lt(q(Et(n,e,t),ve(([o])=>o),ae(([,o,s])=>Math.max(0,o-s)),pr(0),Qe()),0);return{alignToBottom:n,paddingTopAddition:r}},Xe(Bt,O0),{singleton:!0}),Ld=Ve(([{scrollTo:e,scrollContainerState:t}])=>{const n=Oe(),r=Oe(),o=Oe(),s=ee(!1),i=ee(void 0);return he(q(Et(n,r),ae(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),he(q(e,Ce(r),ae(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Xe(Bt)),mF=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,gF=Ve(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Oe();return he(q(u,Ce(e,o,t,s,i,a,r),Ce(n),ae(([[d,f,h,p,m,b,v,y],g])=>{const{done:S,behavior:T,align:E,calculateViewLocation:C=mF,...I}=d,A=v0(d,f,p-1),O=ui(A,f.offsetTree,g)+m+b,M=O+hn(f.sizeTree,A)[1],_=y+b,F=y+h-v,P=C({itemTop:O,itemBottom:M,viewportTop:_,viewportBottom:F,locationParams:{behavior:T,align:E,...I}});return P?S&&kn(q(l,ve(N=>N===!1),Jo(Ft(l)?1:2)),S):S&&S(),P}),ve(d=>d!==null)),c),{scrollIntoView:u}},Xe(_n,Bt,di,Yr,mr),{singleton:!0}),yF=Ve(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Oe(),u=ee(void 0),d=ee(null),f=ee(null);return he(a,d),he(l,f),ze(q(c,Ce(e,n,i,d,f,r)),([h,p,m,b,v,y,g])=>{const S=QN(p.sizeTree);b&&v!==null&&y!==null&&(m=v.scrollTop-y.offsetTop),m-=g,h({ranges:S,scrollTop:m})}),he(q(u,ve(xd),ae(vF)),o),he(q(s,Ce(u),ve(([,h])=>h!==void 0),Qe(),ae(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Xe(_n,Bt,mi,gr,Ld));function vF(e){return{offset:e.scrollTop,index:0,align:"start"}}const bF=Ve(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Xe(Nd,cF,gr,A0,O0,hF,pF,Ld,gF,mr)),D0=Ve(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,b,v,{listState:y,topItemsIndexes:g,...S},{scrollToIndex:T},E,{topItemCount:C},{groupCounts:I},A])=>(he(S.rangeChanged,A.scrollSeekRangeChanged),he(q(A.windowViewportRect,ae(O=>O.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:I,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:y,scrollToIndex:T,trackItemSizes:o,itemSize:s,groupIndices:l,...S,...A,...m,sizes:d,...b}),Xe(_n,mi,Bt,yF,iF,Yr,di,fF,uF,T0,bF)),Vd="-webkit-sticky",M0="sticky",N0=_0(()=>{if(typeof document>"u")return M0;const e=document.createElement("div");return e.style.position=Vd,e.style.position===Vd?Vd:M0});function $d(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Ed(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const el=w.createContext(void 0),F0=w.createContext(void 0);function Rd(e){return e}const wF=Ve(([e,t])=>({...e,...t}),Xe(D0,Ve(()=>{const e=ee(l=>`Item ${l}`),t=ee(null),n=ee(l=>`Group ${l}`),r=ee({}),o=ee(Rd),s=ee("div"),i=ee(Ur),a=(l,c=null)=>Lt(q(r,ae(u=>u[l]),Qe()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),xF=({height:e})=>w.createElement("div",{style:{height:e}}),TF={position:N0(),zIndex:1,overflowAnchor:"none"},SF={overflowAnchor:"none"},L0=w.memo(function({showTopList:t=!1}){const n=Ae("listState"),r=on("sizeRanges"),o=Ae("useWindowScroll"),s=Ae("customScrollParent"),i=on("windowScrollContainerState"),a=on("scrollContainerState"),l=s||o?i:a,c=Ae("itemContent"),u=Ae("context"),d=Ae("groupContent"),f=Ae("trackItemSizes"),h=Ae("itemSize"),p=Ae("log"),m=on("gap"),{callbackRef:b}=a0(r,h,f,t?Ur:l,p,m,s),[v,y]=w.useState(0);zd("deviation",P=>{v!==P&&y(P)});const g=Ae("EmptyPlaceholder"),S=Ae("ScrollSeekPlaceholder")||xF,T=Ae("ListComponent"),E=Ae("ItemComponent"),C=Ae("GroupComponent"),I=Ae("computeItemKey"),A=Ae("isSeeking"),O=Ae("groupIndices").length>0,M=Ae("alignToBottom"),_=Ae("initialItemFinalLocationReached"),F=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:M?"auto":0,..._?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?w.createElement(g,ct(g,u)):w.createElement(T,{...ct(T,u),ref:b,style:F,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const N=P.originalIndex,L=I(N+n.firstItemIndex,P.data,u);return A?w.createElement(S,{...ct(S,u),key:L,index:P.index,height:P.size,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?w.createElement(C,{...ct(C,u),key:L,"data-index":N,"data-known-size":P.size,"data-item-index":P.index,style:TF},d(P.index,u)):w.createElement(E,{...ct(E,u),...V0(E,P.data),key:L,"data-index":N,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:SF},O?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),EF={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ts=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),CF={width:"100%",position:N0(),top:0,zIndex:1};function ct(e,t){if(typeof e!="string")return{context:t}}function V0(e,t){return{item:typeof e=="string"?void 0:t}}const PF=w.memo(function(){const t=Ae("HeaderComponent"),n=on("headerHeight"),r=Ae("headerFooterTag"),o=On(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=Ae("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),kF=w.memo(function(){const t=Ae("FooterComponent"),n=on("footerHeight"),r=Ae("headerFooterTag"),o=On(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=Ae("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null});function Bd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=c0(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:h,style:{...EF,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ct(c,f)},i)})}function jd({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:b,scrollToCallback:v}=c0(l,u,c,Ur,h);return VN(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",b),w.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...ct(c,p)},i)})}const IF=({children:e})=>{const t=w.useContext(el),n=on("viewportHeight"),r=on("fixedItemHeight"),o=Ae("alignToBottom"),s=On(w.useMemo(()=>ai(n,i=>fn(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:ts(o),ref:s,"data-viewport-type":"element"},e)},AF=({children:e})=>{const t=w.useContext(el),n=on("windowViewportRect"),r=on("fixedItemHeight"),o=Ae("customScrollParent"),s=$d(n,o),i=Ae("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:ts(i),"data-viewport-type":"window"},e)},OF=({children:e})=>{const t=Ae("TopItemListComponent")||"div",n=Ae("headerHeight"),r={...CF,marginTop:`${n}px`},o=Ae("context");return w.createElement(t,{style:r,...ct(t,o)},e)},_F=w.memo(function(t){const n=Ae("useWindowScroll"),r=Ae("topItemsIndexes").length>0,o=Ae("customScrollParent"),s=o||n?NF:MF,i=o||n?AF:IF;return w.createElement(s,{...t},r&&w.createElement(OF,null,w.createElement(L0,{showTopList:!0})),w.createElement(i,null,w.createElement(PF,null),w.createElement(L0,null),w.createElement(kF,null)))}),{Component:DF,usePublisher:on,useEmitterValue:Ae,useEmitter:zd}=Sd(wF,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},_F),MF=Bd({usePublisher:on,useEmitterValue:Ae,useEmitter:zd}),NF=jd({usePublisher:on,useEmitterValue:Ae,useEmitter:zd}),$0=DF,R0={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},FF={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:B0,ceil:j0,floor:tl,min:Hd,max:yi}=Math;function LF(e){return{...FF,items:e}}function z0(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function VF(e,t){return e&&e.column===t.column&&e.row===t.row}function nl(e,t){return e&&e.width===t.width&&e.height===t.height}const $F=Ve(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:b,customScrollParent:v,windowScrollContainerState:y,windowScrollTo:g},S])=>{const T=ee(0),E=ee(0),C=ee(R0),I=ee({height:0,width:0}),A=ee({height:0,width:0}),O=Oe(),M=Oe(),_=ee(0),F=ee(null),P=ee({row:0,column:0}),N=Oe(),L=Oe(),V=ee(!1),B=ee(0),W=ee(!0),D=ee(!1);ze(q(p,Ce(B),ve(([$,z])=>!!z)),()=>{Ee(W,!1),Ee(E,0)}),ze(q(Et(p,W,A,I,B,D),ve(([$,z,H,U,,Y])=>$&&!z&&H.height!==0&&U.height!==0&&!Y)),([,,,,$])=>{Ee(D,!0),Dd(1,()=>{Ee(O,$)}),kn(q(r),()=>{Ee(n,[0,0]),Ee(W,!0)})}),he(q(L,ve($=>$!=null&&$.scrollTop>0),In(0)),E),ze(q(p,Ce(L),ve(([,$])=>$!=null)),([,$])=>{$&&(Ee(I,$.viewport),Ee(A,$==null?void 0:$.item),Ee(P,$.gap),$.scrollTop>0&&(Ee(V,!0),kn(q(r,Jo(1)),z=>{Ee(V,!1)}),Ee(i,{top:$.scrollTop})))}),he(q(I,ae(({height:$})=>$)),o),he(q(Et(we(I,nl),we(A,nl),we(P,($,z)=>$&&$.column===z.column&&$.row===z.row),we(r)),ae(([$,z,H,U])=>({viewport:$,item:z,gap:H,scrollTop:U}))),N),he(q(Et(we(T),t,we(P,VF),we(A,nl),we(I,nl),we(F),we(E),we(V),we(W),we(B)),ve(([,,,,,,,$])=>!$),ae(([$,[z,H],U,Y,ce,R,pe,,xe,te])=>{const{row:me,column:re}=U,{height:fe,width:ue}=Y,{width:Pe}=ce;if(pe===0&&($===0||Pe===0))return R0;if(ue===0){const zt=Md(te,$),no=zt===0?Math.max(pe-1,0):zt;return LF(z0(zt,no,R))}const ot=W0(Pe,ue,re);let Me,yt;xe?z===0&&H===0&&pe>0?(Me=0,yt=pe-1):(Me=ot*tl((z+me)/(fe+me)),yt=ot*j0((H+me)/(fe+me))-1,yt=Hd($-1,yi(yt,ot-1)),Me=Hd(yt,yi(0,Me))):(Me=0,yt=-1);const ne=z0(Me,yt,R),{top:le,bottom:Ne}=H0(ce,U,Y,ne),Je=j0($/ot),Vt=Je*fe+(Je-1)*me-Ne;return{items:ne,offsetTop:le,offsetBottom:Vt,top:le,bottom:Ne,itemHeight:fe,itemWidth:ue}})),C),he(q(F,ve($=>$!==null),ae($=>$.length)),T),he(q(Et(I,A,C,P),ve(([$,z,{items:H}])=>H.length>0&&z.height!==0&&$.height!==0),ae(([$,z,{items:H},U])=>{const{top:Y,bottom:ce}=H0($,U,z,H);return[Y,ce]}),Qe(gi)),n);const j=ee(!1);he(q(r,Ce(j),ae(([$,z])=>z||$!==0)),j);const K=Xt(q(we(C),ve(({items:$})=>$.length>0),Ce(T,j),ve(([{items:$},z,H])=>H&&$[$.length-1].index===z-1),ae(([,$])=>$-1),Qe())),J=Xt(q(we(C),ve(({items:$})=>$.length>0&&$[0].index===0),In(0),Qe())),X=Xt(q(we(C),Ce(V),ve(([{items:$},z])=>$.length>0&&!z),ae(([{items:$}])=>({startIndex:$[0].index,endIndex:$[$.length-1].index})),Qe(S0),pr(0)));he(X,f.scrollSeekRangeChanged),he(q(O,Ce(I,A,T,P),ae(([$,z,H,U,Y])=>{const ce=w0($),{align:R,behavior:pe,offset:xe}=ce;let te=ce.index;te==="LAST"&&(te=U-1),te=yi(0,te,Hd(U-1,te));let me=Wd(z,Y,H,te);return R==="end"?me=B0(me-z.height+H.height):R==="center"&&(me=B0(me-z.height/2+H.height/2)),xe&&(me+=xe),{top:me,behavior:pe}})),i);const G=Lt(q(C,ae($=>$.offsetBottom+$.bottom)),0);return he(q(m,ae($=>({width:$.visibleWidth,height:$.visibleHeight}))),I),{data:F,totalCount:T,viewportDimensions:I,itemDimensions:A,scrollTop:r,scrollHeight:M,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:O,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:b,customScrollParent:v,windowScrollContainerState:y,deviation:_,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:L,...f,initialTopMostItemIndex:B,gridState:C,totalListHeight:G,...d,startReached:J,endReached:K,rangeChanged:X,stateChanged:N,propsReady:h,stateRestoreInProgress:V,...S}},Xe(Nd,Bt,pi,A0,gr,Ld,mr));function H0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Wd(e,t,n,r[0].index),i=Wd(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Wd(e,t,n,r){const o=W0(e.width,n.width,t.column),s=tl(r/o),i=s*n.height+yi(0,s-1)*t.row;return i>0?i+t.row:i}function W0(e,t,n){return yi(1,tl((e+n)/(tl(t)+n)))}const RF=Ve(([e,t])=>({...e,...t}),Xe($F,Ve(()=>{const e=ee(c=>`Item ${c}`),t=ee({}),n=ee(null),r=ee("virtuoso-grid-item"),o=ee("virtuoso-grid-list"),s=ee(Rd),i=ee("div"),a=ee(Ur),l=(c,u=null)=>Lt(q(t,ae(d=>d[c]),Qe()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),BF=w.memo(function(){const t=nt("gridState"),n=nt("listClassName"),r=nt("itemClassName"),o=nt("itemContent"),s=nt("computeItemKey"),i=nt("isSeeking"),a=pn("scrollHeight"),l=nt("ItemComponent"),c=nt("ListComponent"),u=nt("ScrollSeekPlaceholder"),d=nt("context"),f=pn("itemDimensions"),h=pn("gap"),p=nt("log"),m=nt("stateRestoreInProgress"),b=On(w.useMemo(()=>v=>{const y=v.parentElement.parentElement.scrollHeight;a(y);const g=v.firstChild;if(g){const{width:S,height:T}=g.getBoundingClientRect();f({width:S,height:T})}h({row:G0("row-gap",getComputedStyle(v).rowGap,p),column:G0("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:w.createElement(c,{ref:b,className:n,...ct(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const y=s(v.index,v.data,d);return i?w.createElement(u,{key:y,...ct(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...ct(l,d),className:r,"data-index":v.index,key:y},o(v.index,v.data,d))}))}),jF=w.memo(function(){const t=nt("HeaderComponent"),n=pn("headerHeight"),r=nt("headerFooterTag"),o=On(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=nt("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),zF=w.memo(function(){const t=nt("FooterComponent"),n=pn("footerHeight"),r=nt("headerFooterTag"),o=On(w.useMemo(()=>i=>n(fn(i,"height")),[n])),s=nt("context");return t?w.createElement(r,{ref:o},w.createElement(t,ct(t,s))):null}),HF=({children:e})=>{const t=w.useContext(F0),n=pn("itemDimensions"),r=pn("viewportDimensions"),o=On(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:ts(!1),ref:o},e)},WF=({children:e})=>{const t=w.useContext(F0),n=pn("windowViewportRect"),r=pn("itemDimensions"),o=nt("customScrollParent"),s=$d(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:ts(!1)},e)},UF=w.memo(function({...t}){const n=nt("useWindowScroll"),r=nt("customScrollParent"),o=r||n?YF:GF,s=r||n?WF:HF;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(jF,null),w.createElement(BF,null),w.createElement(zF,null)))}),{Component:sR,usePublisher:pn,useEmitterValue:nt,useEmitter:U0}=Sd(RF,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},UF),GF=Bd({usePublisher:pn,useEmitterValue:nt,useEmitter:U0}),YF=jd({usePublisher:pn,useEmitterValue:nt,useEmitter:U0});function G0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Qt.WARN),t==="normal"?0:parseInt(t??"0",10)}const qF=Ve(([e,t])=>({...e,...t}),Xe(D0,Ve(()=>{const e=ee(l=>w.createElement("td",null,"Item $",l)),t=ee(null),n=ee(null),r=ee(null),o=ee({}),s=ee(Rd),i=ee(Ur),a=(l,c=null)=>Lt(q(o,ae(u=>u[l]),Qe()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),KF=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),ZF=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),XF={overflowAnchor:"none"},QF=w.memo(function(){const t=He("listState"),n=mn("sizeRanges"),r=He("useWindowScroll"),o=He("customScrollParent"),s=mn("windowScrollContainerState"),i=mn("scrollContainerState"),a=o||r?s:i,l=He("itemContent"),c=He("trackItemSizes"),u=He("itemSize"),d=He("log"),{callbackRef:f,ref:h}=a0(n,u,c,a,d,void 0,o),[p,m]=w.useState(0);Ud("deviation",L=>{p!==L&&(h.current.style.marginTop=`${L}px`,m(L))});const b=He("EmptyPlaceholder"),v=He("ScrollSeekPlaceholder")||KF,y=He("FillerRow")||ZF,g=He("TableBodyComponent"),S=He("TableRowComponent"),T=He("computeItemKey"),E=He("isSeeking"),C=He("paddingTopAddition"),I=He("firstItemIndex"),A=He("statefulTotalCount"),O=He("context");if(A===0&&b)return w.createElement(b,ct(b,O));const M=t.offsetTop+C+p,_=t.offsetBottom,F=M>0?w.createElement(y,{height:M,key:"padding-top",context:O}):null,P=_>0?w.createElement(y,{height:_,key:"padding-bottom",context:O}):null,N=t.items.map(L=>{const V=L.originalIndex,B=T(V+I,L.data,O);return E?w.createElement(v,{...ct(v,O),key:B,index:L.index,height:L.size,type:L.type||"item"}):w.createElement(S,{...ct(S,O),...V0(S,L.data),key:B,"data-index":V,"data-known-size":L.size,"data-item-index":L.index,style:XF},l(L.index,L.data,O))});return w.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...ct(g,O)},[F,...N,P])}),JF=({children:e})=>{const t=w.useContext(el),n=mn("viewportHeight"),r=mn("fixedItemHeight"),o=On(w.useMemo(()=>ai(n,s=>fn(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:ts(!1),ref:o,"data-viewport-type":"element"},e)},eL=({children:e})=>{const t=w.useContext(el),n=mn("windowViewportRect"),r=mn("fixedItemHeight"),o=He("customScrollParent"),s=$d(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:ts(!1),"data-viewport-type":"window"},e)},tL=w.memo(function(t){const n=He("useWindowScroll"),r=He("customScrollParent"),o=mn("fixedHeaderHeight"),s=mn("fixedFooterHeight"),i=He("fixedHeaderContent"),a=He("fixedFooterContent"),l=He("context"),c=On(w.useMemo(()=>ai(o,y=>fn(y,"height")),[o])),u=On(w.useMemo(()=>ai(s,y=>fn(y,"height")),[s])),d=r||n?oL:rL,f=r||n?eL:JF,h=He("TableComponent"),p=He("TableHeadComponent"),m=He("TableFooterComponent"),b=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ct(p,l)},i()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ct(m,l)},a()):null;return w.createElement(d,{...t},w.createElement(f,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...ct(h,l)},[b,w.createElement(QF,{key:"TableBody"}),v])))}),{Component:nL,usePublisher:mn,useEmitterValue:He,useEmitter:Ud}=Sd(qF,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},tL),rL=Bd({usePublisher:mn,useEmitterValue:He,useEmitter:Ud}),oL=jd({usePublisher:mn,useEmitterValue:He,useEmitter:Ud}),sL=nL,iL=e=>x.jsx(w.Fragment,{children:e.children}),aL={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},lL={caseSensitive:!1,sort:!1},cL=[],uL=w.forwardRef(function(t,n){return x.jsx(dt.ul,{...t,ref:n,className:"w-full border-b border-tooltip-border last:border-transparent rounded-lg",children:x.jsx(Jn,{children:t.children})})}),dL=w.forwardRef(function(t,n){return x.jsx(dt.li,{...t,ref:n,className:"first:rounded-t-lg last:rounded-t-lg",children:t.children})}),fL={List:uL,Item:dL},hL=w.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,emptyMessage:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:f,required:h=!1,...p},m)=>{const b=w.useRef(null),v=w.useRef(null),y=p.value??p.defaultValue??"",g=kt(),[S,T]=w.useState(0),[E,C]=w.useState(!1),[I,A]=w.useState(""),[O,M]=w.useState(y),[_,F]=w.useState(()=>{var te;return((te=e.find(me=>me.value===y))==null?void 0:te.label)??y}),[P,N]=w.useState(null),L=w.useRef(cL),V=t&&I!==""?[{value:I,label:I,"data-dynamic":"true"},...e]:e,B=new Wr(V,["value","label"],lL).search(I),W=t?void 0:`^(${e.map(te=>`${Cs(te.value)}${te.label?"|"+Cs(te.label):""}`).join("|")})$`;w.useEffect(()=>{E||T(0)},[E]),w.useEffect(()=>{if(p.value){const te=e.find(me=>me.value===p.value);M((te==null?void 0:te.label)??p.value)}},[p.value]);const{x:D,y:j,strategy:K,refs:J,context:X}=jr({open:E,transform:!0,strategy:"absolute",onOpenChange:C,whileElementsMounted:Js,middleware:[ei(4),cb({padding:10,elementContext:"reference",apply(te){var Pe;const me=(Pe=b.current)==null?void 0:Pe.getBoundingClientRect().width,re=te.elements.floating.querySelector("ul"),fe=(re==null?void 0:re.getBoundingClientRect().height)||0,ue=Math.min(fe<40?300:fe,300);Oi.flushSync(()=>setTimeout(()=>T(ue),200)),Object.assign(te.elements.floating.style,{width:`${me}px`,maxWidth:`${me}px`,maxHeight:`${ue}px`})}})]}),G=Ub(X,aL),{getReferenceProps:$,getFloatingProps:z,getItemProps:H}=zr([Hr(X,{role:"listbox"}),Br(X),yd(X,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:P,selectedIndex:P,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:te=>N(me=>te??me)})]);w.useEffect(()=>{const te=J.reference.current;if(te)return Ss(te)},[]);const U=(te,me)=>{M(te.value);const re=J.reference.current;if(!re)return;re==null||re.setAttribute("data-value",te.value),re.value=te.value;const fe=new Event("change",{bubbles:!1,cancelable:!0});re.dispatchEvent(fe),p.onChange&&p.onChange(fe),F(te.label??""),C(!1),A(""),N(me)},Y=te=>{var re;const me=te.target.value;return A(me),!E&&me===""?C(!0):(te.target.name=p.name||"",me?C(!0):(re=p.onChange)==null?void 0:re.call(p,te))},ce=()=>{var te;C(!0),A(""),(te=J.reference.current)==null||te.focus()},R=()=>{C(!0),A("")},pe=()=>{var te;(te=J.reference.current)==null||te.setAttribute("data-value",""),A(""),M(""),F(""),Jl(J.reference.current),C(!1)},xe=p.id||p.name;return x.jsxs(ii,{...p,left:d,error:f,ref:b,form:p.form,name:p.name,feedback:n,hideLeft:c,required:h,title:p.title,container:l,rightLabel:i,interactive:s,id:p.name||p.id,optionalText:a,componentName:"autocomplete",labelClassName:r,placeholder:p.placeholder,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:ce,children:[x.jsx(uu,{size:20}),x.jsx("span",{className:"sr-only",children:g.inputCaretDown})]}),O?x.jsx("button",{type:"button",onClick:pe,className:"transition-colors link:text-danger",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[x.jsx("input",{"data-shadow":"true",...$({...p,onChange:Y,onFocus:R,pattern:W,ref:J.setReference,name:`${xe}-shadow`,id:`${xe}-shadow`,onClick:te=>te.currentTarget.focus(),onKeyDown(te){var me,re;if(te.key==="ArrowDown"){let fe=P+1;return fe>B.length-1&&(fe=0),(me=v.current)==null||me.scrollIntoView({index:fe}),N(fe)}if(te.key==="ArrowUp"){let fe=P-1;return fe<0&&(fe=B.length-1),(re=v.current)==null||re.scrollIntoView({index:fe}),N(fe)}if(te.key==="Escape")return te.currentTarget.blur(),C(!1);if(te.key==="Enter"){if(P!==null&&B[P])return te.preventDefault(),U(B[P],P);if(B.length===1)return te.preventDefault(),U(B[0],0)}}}),"data-value":O,"data-error":!!f,"data-name":xe,"data-target":xe,required:h,value:E?I:_||O,"aria-autocomplete":"list",autoComplete:"off",className:$e("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",p.className)}),x.jsx("input",{id:xe,name:xe,type:"hidden","data-origin":xe,ref:m,required:h,defaultValue:p.value||O||void 0}),x.jsx($r,{preserveTabOrder:!0,children:E?x.jsx(Ko,{guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsxs("div",{...z({ref:J.setFloating,style:{...G.styles,position:K,left:(D??0)+(O?26:18),top:j??0}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:[B.length===0?x.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:x.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:o||g.autocompleteEmpty})}):null,x.jsx($0,{data:B,ref:v,hidden:B.length===0,components:fL,className:"bg-floating-background p-0 text-foreground rounded-lg border-floating-border",style:{height:S},itemContent:(te,me)=>{const re=me.Render??iL,fe=O===me.value||O===me.label,ue=P===te,Pe=me.label??me.value;return x.jsx("button",{"data-value":me.value,...H({ref:ot=>void(L.current[te]=ot),role:"option",type:"button","aria-checked":fe,"aria-current":fe,"aria-selected":fe,"aria-busy":me.disabled,onClick:()=>U(me,te),className:`cursor-pointer p-2 text-left ${fe?"bg-primary-hover text-primary-foreground":""} ${ue?"bg-primary text-primary-foreground":""}`}),children:x.jsx(re,{...p,label:me.label,value:me.value,children:Pe})})}})]})}):null})]})}),Y0=w.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>x.jsxs("label",{"data-task":t,"data-component":"checkbox","data-disabled":a.disabled,"aria-disabled":a.disabled,className:$e("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[x.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:$e("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,x.jsx("span",{"data-name":"checkbox-label",className:$e("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),q0=(e,t,n,r)=>w.forwardRef(({type:s="text",feedback:i=null,info:a,labelClassName:l,next:c,interactive:u,rightLabel:d,optionalText:f,container:h,hideLeft:p=!1,right:m,left:b,error:v,...y},g)=>{const S=e,T=y.id??y.name,E=w.useRef(null);return w.useEffect(()=>{if(E.current===null)return;const C=E.current,I=Ss(E.current),A=r==null?void 0:r(C),O=M=>{const _=M;if(_.key==="Enter"&&C.enterKeyHint==="next"){const F=C.getAttribute("data-next");if(F){const P=document.getElementById(F);if(P)return P.focus(),void _.preventDefault()}}};return C.addEventListener("keydown",O),()=>{A==null||A(),I(),C.removeEventListener("keydown",O)}},[]),x.jsx(ii,{...n,componentName:t,info:a,container:h,error:v,feedback:i,hideLeft:p,left:b,optionalText:f,right:m,rightLabel:d,interactive:u,form:y.form,id:y.name||y.id,name:y.name,labelClassName:l,title:y.title,placeholder:y.placeholder,required:y.required,disabled:y.disabled,children:x.jsx(S,{...n,...y,id:T,name:T,type:s,"data-next":c,"aria-busy":y.disabled,"aria-disabled":y.disabled,"aria-readonly":y.readOnly,ref:Ql(g,E),className:$e("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",y.className)})})}),vi=q0(By,"input",{type:"text"}),K0=new Date(1970,11,31),Gd={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Z0={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},pL={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Yd=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},mL=w.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=t||tv(),l=w.useId(),c=kt(),u=w.useMemo(()=>new Intl.DateTimeFormat(a),[a]),[d,f]=w.useState(e||void 0),[h,p]=w.useState(!1),m=Yd(u,K0).flatMap(C=>Ct.keyof(Gd,C.type)?Gd[C.type](C.value):[]),b=Yd(u,K0).reduce((C,I)=>C+(Ct.keyof(Z0,I.type)?Z0[I.type](I.value):""),""),[v,y]=w.useState(d?Yd(u,d).reduce((C,I)=>C+(Ct.keyof(Gd,I.type)?pL[I.type](d,I.value):""),""):""),g=C=>{const I=C.target.value;if(y(I),m.length===I.length&&m.every((O,M)=>{const _=I.charAt(M);return typeof O=="string"?_===O:O.test(_)})){const O=Do(xO(I,b,new Date));return f(O),r==null?void 0:r(O)}return f(void 0),r==null?void 0:r(void 0)},S=C=>(f(C),r==null||r(C),y(C?TA(C,b):"")),T=dy(d),E=T?d.toISOString():void 0;return x.jsx(vi,{...s,mask:m,value:v,id:void 0,name:void 0,className:"uppercase","data-value":E,formNoValidate:!h,"data-target":s.name,"data-component":"date-picker",onChange:g,required:s.required??!0,error:h?void 0:s.error,placeholder:s.placeholder??b,right:x.jsxs(w.Fragment,{children:[x.jsx("input",{"data-origin":s.name,defaultValue:E,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),x.jsx(Xo,{open:h,onChange:p,trigger:x.jsxs("span",{"aria-labelledby":l,children:[x.jsx("span",{id:l,className:"sr-only",children:c.datePickerCalendarButtonLabel}),x.jsx(lI,{})]}),buttonProps:{"aria-describedby":l},children:x.jsx(av,{...s,locale:a,changeOnlyOnClick:!0,markToday:o,onChange:S,disabledDate:n,date:T?d:void 0})})]})})}),gL=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],yL=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],vL=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bL=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],X0=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Q0(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?bL:vL:t.binary?yL:gL,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=X0(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=X0(Number(e),t.locale,i),c=n[a];return s+l+r+c}var qd={exports:{}},rl={exports:{}},Re={};/** @license React v16.13.1
181
178
  * react-is.production.min.js
182
179
  *
183
180
  * Copyright (c) Facebook, Inc. and its affiliates.
184
181
  *
185
182
  * This source code is licensed under the MIT license found in the
186
183
  * LICENSE file in the root directory of this source tree.
187
- */var zv;function uF(){if(zv)return De;zv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function v(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case s:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case h:case i:return S;default:return E}}case n:return E}}}function T(S){return v(S)===c}return De.AsyncMode=l,De.ConcurrentMode=c,De.ContextConsumer=a,De.ContextProvider=i,De.Element=t,De.ForwardRef=u,De.Fragment=r,De.Lazy=p,De.Memo=h,De.Portal=n,De.Profiler=s,De.StrictMode=o,De.Suspense=d,De.isAsyncMode=function(S){return T(S)||v(S)===l},De.isConcurrentMode=T,De.isContextConsumer=function(S){return v(S)===a},De.isContextProvider=function(S){return v(S)===i},De.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},De.isForwardRef=function(S){return v(S)===u},De.isFragment=function(S){return v(S)===r},De.isLazy=function(S){return v(S)===p},De.isMemo=function(S){return v(S)===h},De.isPortal=function(S){return v(S)===n},De.isProfiler=function(S){return v(S)===s},De.isStrictMode=function(S){return v(S)===o},De.isSuspense=function(S){return v(S)===d},De.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===s||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===h||S.$$typeof===i||S.$$typeof===a||S.$$typeof===u||S.$$typeof===g||S.$$typeof===y||S.$$typeof===x||S.$$typeof===m)},De.typeOf=v,De}var ke={};/** @license React v16.13.1
184
+ */var J0;function wL(){if(J0)return Re;J0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function g(T){if(typeof T=="object"&&T!==null){var E=T.$$typeof;switch(E){case t:switch(T=T.type,T){case l:case c:case r:case s:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case p:case h:case i:return T;default:return E}}case n:return E}}}function S(T){return g(T)===c}return Re.AsyncMode=l,Re.ConcurrentMode=c,Re.ContextConsumer=a,Re.ContextProvider=i,Re.Element=t,Re.ForwardRef=u,Re.Fragment=r,Re.Lazy=p,Re.Memo=h,Re.Portal=n,Re.Profiler=s,Re.StrictMode=o,Re.Suspense=d,Re.isAsyncMode=function(T){return S(T)||g(T)===l},Re.isConcurrentMode=S,Re.isContextConsumer=function(T){return g(T)===a},Re.isContextProvider=function(T){return g(T)===i},Re.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Re.isForwardRef=function(T){return g(T)===u},Re.isFragment=function(T){return g(T)===r},Re.isLazy=function(T){return g(T)===p},Re.isMemo=function(T){return g(T)===h},Re.isPortal=function(T){return g(T)===n},Re.isProfiler=function(T){return g(T)===s},Re.isStrictMode=function(T){return g(T)===o},Re.isSuspense=function(T){return g(T)===d},Re.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===p||T.$$typeof===h||T.$$typeof===i||T.$$typeof===a||T.$$typeof===u||T.$$typeof===b||T.$$typeof===v||T.$$typeof===y||T.$$typeof===m)},Re.typeOf=g,Re}var Be={};/** @license React v16.13.1
188
185
  * react-is.development.js
189
186
  *
190
187
  * Copyright (c) Facebook, Inc. and its affiliates.
191
188
  *
192
189
  * This source code is licensed under the MIT license found in the
193
190
  * LICENSE file in the root directory of this source tree.
194
- */var Wv;function dF(){return Wv||(Wv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function v(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===s||R===o||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===p||R.$$typeof===h||R.$$typeof===i||R.$$typeof===a||R.$$typeof===u||R.$$typeof===g||R.$$typeof===y||R.$$typeof===x||R.$$typeof===m)}function T(R){if(typeof R=="object"&&R!==null){var ue=R.$$typeof;switch(ue){case t:var _e=R.type;switch(_e){case l:case c:case r:case s:case o:case d:return _e;default:var $e=_e&&_e.$$typeof;switch($e){case a:case u:case p:case h:case i:return $e;default:return ue}}case n:return ue}}}var S=l,E=c,I=a,O=i,F=t,M=u,_=r,k=p,L=h,P=n,A=s,N=o,$=d,z=!1;function H(R){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.")),D(R)||T(R)===l}function D(R){return T(R)===c}function B(R){return T(R)===a}function X(R){return T(R)===i}function te(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function Q(R){return T(R)===u}function G(R){return T(R)===r}function V(R){return T(R)===p}function j(R){return T(R)===h}function W(R){return T(R)===n}function U(R){return T(R)===s}function Y(R){return T(R)===o}function K(R){return T(R)===d}ke.AsyncMode=S,ke.ConcurrentMode=E,ke.ContextConsumer=I,ke.ContextProvider=O,ke.Element=F,ke.ForwardRef=M,ke.Fragment=_,ke.Lazy=k,ke.Memo=L,ke.Portal=P,ke.Profiler=A,ke.StrictMode=N,ke.Suspense=$,ke.isAsyncMode=H,ke.isConcurrentMode=D,ke.isContextConsumer=B,ke.isContextProvider=X,ke.isElement=te,ke.isForwardRef=Q,ke.isFragment=G,ke.isLazy=V,ke.isMemo=j,ke.isPortal=W,ke.isProfiler=U,ke.isStrictMode=Y,ke.isSuspense=K,ke.isValidElementType=v,ke.typeOf=T}()),ke}var Hv;function Uv(){return Hv||(Hv=1,process.env.NODE_ENV==="production"?ta.exports=uF():ta.exports=dF()),ta.exports}/*
191
+ */var ew;function xL(){return ew||(ew=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function g(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===s||R===o||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===p||R.$$typeof===h||R.$$typeof===i||R.$$typeof===a||R.$$typeof===u||R.$$typeof===b||R.$$typeof===v||R.$$typeof===y||R.$$typeof===m)}function S(R){if(typeof R=="object"&&R!==null){var pe=R.$$typeof;switch(pe){case t:var xe=R.type;switch(xe){case l:case c:case r:case s:case o:case d:return xe;default:var te=xe&&xe.$$typeof;switch(te){case a:case u:case p:case h:case i:return te;default:return pe}}case n:return pe}}}var T=l,E=c,C=a,I=i,A=t,O=u,M=r,_=p,F=h,P=n,N=s,L=o,V=d,B=!1;function W(R){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(R)||S(R)===l}function D(R){return S(R)===c}function j(R){return S(R)===a}function K(R){return S(R)===i}function J(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function X(R){return S(R)===u}function G(R){return S(R)===r}function $(R){return S(R)===p}function z(R){return S(R)===h}function H(R){return S(R)===n}function U(R){return S(R)===s}function Y(R){return S(R)===o}function ce(R){return S(R)===d}Be.AsyncMode=T,Be.ConcurrentMode=E,Be.ContextConsumer=C,Be.ContextProvider=I,Be.Element=A,Be.ForwardRef=O,Be.Fragment=M,Be.Lazy=_,Be.Memo=F,Be.Portal=P,Be.Profiler=N,Be.StrictMode=L,Be.Suspense=V,Be.isAsyncMode=W,Be.isConcurrentMode=D,Be.isContextConsumer=j,Be.isContextProvider=K,Be.isElement=J,Be.isForwardRef=X,Be.isFragment=G,Be.isLazy=$,Be.isMemo=z,Be.isPortal=H,Be.isProfiler=U,Be.isStrictMode=Y,Be.isSuspense=ce,Be.isValidElementType=g,Be.typeOf=S}()),Be}var tw;function nw(){return tw||(tw=1,process.env.NODE_ENV==="production"?rl.exports=wL():rl.exports=xL()),rl.exports}/*
195
192
  object-assign
196
193
  (c) Sindre Sorhus
197
194
  @license MIT
198
- */var bu,Gv;function fF(){if(Gv)return bu;Gv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return bu=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},bu}var wu,Kv;function xu(){if(Kv)return wu;Kv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return wu=e,wu}var Tu,Yv;function qv(){return Yv||(Yv=1,Tu=Function.call.bind(Object.prototype.hasOwnProperty)),Tu}var Su,Xv;function hF(){if(Xv)return Su;Xv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=xu(),n={},r=qv();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Su=o,Su}var Eu,Qv;function pF(){if(Qv)return Eu;Qv=1;var e=Uv(),t=fF(),n=xu(),r=qv(),o=hF(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return Eu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var B=D&&(c&&D[c]||D[u]);if(typeof B=="function")return B}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:v,element:T(),elementType:S(),instanceOf:E,node:M(),objectOf:O,oneOf:I,oneOfType:F,shape:k,exact:L};function p(D,B){return D===B?D!==0||1/D===1/B:D!==D&&B!==B}function m(D,B){this.message=D,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function g(D){if(process.env.NODE_ENV!=="production")var B={},X=0;function te(G,V,j,W,U,Y,K){if(W=W||f,Y=Y||j,K!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=W+":"+j;!B[ue]&&X<3&&(s("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."),B[ue]=!0,X++)}}return V[j]==null?G?V[j]===null?new m("The "+U+" `"+Y+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+U+" `"+Y+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:D(V,j,W,U,Y)}var Q=te.bind(null,!1);return Q.isRequired=te.bind(null,!0),Q}function y(D){function B(X,te,Q,G,V,j){var W=X[te],U=N(W);if(U!==D){var Y=$(W);return new m("Invalid "+G+" `"+V+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return g(B)}function x(){return g(i)}function v(D){function B(X,te,Q,G,V){if(typeof D!="function")return new m("Property `"+V+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var j=X[te];if(!Array.isArray(j)){var W=N(j);return new m("Invalid "+G+" `"+V+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var U=0;U<j.length;U++){var Y=D(j,U,Q,G,V+"["+U+"]",n);if(Y instanceof Error)return Y}return null}return g(B)}function T(){function D(B,X,te,Q,G){var V=B[X];if(!a(V)){var j=N(V);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+j+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return g(D)}function S(){function D(B,X,te,Q,G){var V=B[X];if(!e.isValidElementType(V)){var j=N(V);return new m("Invalid "+Q+" `"+G+"` of type "+("`"+j+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return g(D)}function E(D){function B(X,te,Q,G,V){if(!(X[te]instanceof D)){var j=D.name||f,W=H(X[te]);return new m("Invalid "+G+" `"+V+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+j+"`."))}return null}return g(B)}function I(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function B(X,te,Q,G,V){for(var j=X[te],W=0;W<D.length;W++)if(p(j,D[W]))return null;var U=JSON.stringify(D,function(K,R){var ue=$(R);return ue==="symbol"?String(R):R});return new m("Invalid "+G+" `"+V+"` of value `"+String(j)+"` "+("supplied to `"+Q+"`, expected one of "+U+"."))}return g(B)}function O(D){function B(X,te,Q,G,V){if(typeof D!="function")return new m("Property `"+V+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var j=X[te],W=N(j);if(W!=="object")return new m("Invalid "+G+" `"+V+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var U in j)if(r(j,U)){var Y=D(j,U,Q,G,V+"."+U,n);if(Y instanceof Error)return Y}return null}return g(B)}function F(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var B=0;B<D.length;B++){var X=D[B];if(typeof X!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(X)+" at index "+B+"."),i}function te(Q,G,V,j,W){for(var U=[],Y=0;Y<D.length;Y++){var K=D[Y],R=K(Q,G,V,j,W,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&U.push(R.data.expectedType)}var ue=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new m("Invalid "+j+" `"+W+"` supplied to "+("`"+V+"`"+ue+"."))}return g(te)}function M(){function D(B,X,te,Q,G){return P(B[X])?null:new m("Invalid "+Q+" `"+G+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return g(D)}function _(D,B,X,te,Q){return new m((D||"React class")+": "+B+" type `"+X+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function k(D){function B(X,te,Q,G,V){var j=X[te],W=N(j);if(W!=="object")return new m("Invalid "+G+" `"+V+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var U in D){var Y=D[U];if(typeof Y!="function")return _(Q,G,V,U,$(Y));var K=Y(j,U,Q,G,V+"."+U,n);if(K)return K}return null}return g(B)}function L(D){function B(X,te,Q,G,V){var j=X[te],W=N(j);if(W!=="object")return new m("Invalid "+G+" `"+V+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var U=t({},X[te],D);for(var Y in U){var K=D[Y];if(r(D,Y)&&typeof K!="function")return _(Q,G,V,Y,$(K));if(!K)return new m("Invalid "+G+" `"+V+"` key `"+Y+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(X[te],null," ")+`
199
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var R=K(j,Y,Q,G,V+"."+Y,n);if(R)return R}return null}return g(B)}function P(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(P);if(D===null||a(D))return!0;var B=d(D);if(B){var X=B.call(D),te;if(B!==D.entries){for(;!(te=X.next()).done;)if(!P(te.value))return!1}else for(;!(te=X.next()).done;){var Q=te.value;if(Q&&!P(Q[1]))return!1}}else return!1;return!0;default:return!1}}function A(D,B){return D==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function N(D){var B=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":A(B,D)?"symbol":B}function $(D){if(typeof D>"u"||D===null)return""+D;var B=N(D);if(B==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return B}function z(D){var B=$(D);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function H(D){return!D.constructor||!D.constructor.name?f:D.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Eu}var Cu,Zv;function mF(){if(Zv)return Cu;Zv=1;var e=xu();function t(){}function n(){}return n.resetWarningCache=t,Cu=function(){function r(i,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Cu}if(process.env.NODE_ENV!=="production"){var gF=Uv(),yF=!0;vu.exports=pF()(gF.isElement,yF)}else vu.exports=mF()();var vF=vu.exports;const Be=W0(vF);function Oo(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Ao(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Jv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function eb(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var bF=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 Is(e,t){var n=wF(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 wF(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=bF.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var xF=[".DS_Store","Thumbs.db"];function TF(e){return Oo(this,void 0,void 0,function(){return Ao(this,function(t){return na(e)&&SF(e.dataTransfer)?[2,IF(e.dataTransfer,e.type)]:EF(e)?[2,CF(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,PF(e)]:[2,[]]})})}function SF(e){return na(e)}function EF(e){return na(e)&&na(e.target)}function na(e){return typeof e=="object"&&e!==null}function CF(e){return Pu(e.target.files).map(function(t){return Is(t)})}function PF(e){return Oo(this,void 0,void 0,function(){var t;return Ao(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 Is(r)})]}})})}function IF(e,t){return Oo(this,void 0,void 0,function(){var n,r;return Ao(this,function(o){switch(o.label){case 0:return e.items?(n=Pu(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(OF))]):[3,2];case 1:return r=o.sent(),[2,tb(nb(r))];case 2:return[2,tb(Pu(e.files).map(function(s){return Is(s)}))]}})})}function tb(e){return e.filter(function(t){return xF.indexOf(t.name)===-1})}function Pu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function OF(e){if(typeof e.webkitGetAsEntry!="function")return rb(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ob(t):rb(e)}function nb(e){return e.reduce(function(t,n){return eb(eb([],Jv(t),!1),Jv(Array.isArray(n)?nb(n):[n]),!1)},[])}function rb(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Is(t);return Promise.resolve(n)}function AF(e){return Oo(this,void 0,void 0,function(){return Ao(this,function(t){return[2,e.isDirectory?ob(e):MF(e)]})})}function ob(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Oo(i,void 0,void 0,function(){var l,c,u;return Ao(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(AF)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function MF(e){return Oo(this,void 0,void 0,function(){return Ao(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=Is(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var DF=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function sb(e){return NF(e)||FF(e)||cb(e)||kF()}function kF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
200
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NF(e){if(Array.isArray(e))return Iu(e)}function ib(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 ab(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ib(Object(n),!0).forEach(function(r){lb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ib(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Os(e,t){return VF(e)||_F(e,t)||cb(e,t)||LF()}function LF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
201
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cb(e,t){if(e){if(typeof e=="string")return Iu(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 Iu(e,t)}}function Iu(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 _F(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function VF(e){if(Array.isArray(e))return e}var $F="file-invalid-type",BF="file-too-large",RF="file-too-small",jF="too-many-files",zF=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:$F,message:"File type must be ".concat(n)}},ub=function(t){return{code:BF,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},db=function(t){return{code:RF,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},WF={code:jF,message:"Too many files"};function fb(e,t){var n=e.type==="application/x-moz-file"||DF(e,t);return[n,n?null:zF(t)]}function hb(e,t,n){if(Pr(e.size))if(Pr(t)&&Pr(n)){if(e.size>n)return[!1,ub(n)];if(e.size<t)return[!1,db(t)]}else{if(Pr(t)&&e.size<t)return[!1,db(t)];if(Pr(n)&&e.size>n)return[!1,ub(n)]}return[!0,null]}function Pr(e){return e!=null}function HF(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=fb(l,n),u=Os(c,1),d=u[0],f=hb(l,r,o),h=Os(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function ra(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function oa(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function pb(e){e.preventDefault()}function UF(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function GF(e){return e.indexOf("Edge/")!==-1}function KF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return UF(e)||GF(e)}function dn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!ra(r)&&a&&a.apply(void 0,[r].concat(s)),ra(r)})}}function YF(){return"showOpenFilePicker"in window}function qF(e){if(Pr(e)){var t=Object.entries(e).filter(function(n){var r=Os(n,2),o=r[0],s=r[1],i=!0;return mb(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(gb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=Os(r,2),s=o[0],i=o[1];return ab(ab({},n),{},lb({},s,i))},{});return[{description:"Files",accept:t}]}return e}function XF(e){if(Pr(e))return Object.entries(e).reduce(function(t,n){var r=Os(n,2),o=r[0],s=r[1];return[].concat(sb(t),[o],sb(s))},[]).filter(function(t){return mb(t)||gb(t)}).join(",")}function QF(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ZF(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function mb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function gb(e){return/^.*\.[\w]+$/.test(e)}var JF=["children"],eN=["open"],tN=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],nN=["refKey","onChange","onClick"];function rN(e){return iN(e)||sN(e)||yb(e)||oN()}function oN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
202
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iN(e){if(Array.isArray(e))return Au(e)}function Ou(e,t){return cN(e)||lN(e,t)||yb(e,t)||aN()}function aN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
203
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yb(e,t){if(e){if(typeof e=="string")return Au(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 Au(e,t)}}function Au(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 lN(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function cN(e){if(Array.isArray(e))return e}function vb(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 qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vb(Object(n),!0).forEach(function(r){Mu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sa(e,t){if(e==null)return{};var n=uN(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Du=b.forwardRef(function(e,t){var n=e.children,r=sa(e,JF),o=wb(r),s=o.open,i=sa(o,eN);return b.useImperativeHandle(t,function(){return{open:s}},[s]),b.createElement(b.Fragment,null,n(qe(qe({},i),{},{open:s})))});Du.displayName="Dropzone";var bb={disabled:!1,getFilesFromEvent:TF,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};Du.defaultProps=bb,Du.propTypes={children:Be.func,accept:Be.objectOf(Be.arrayOf(Be.string)),multiple:Be.bool,preventDropOnDocument:Be.bool,noClick:Be.bool,noKeyboard:Be.bool,noDrag:Be.bool,noDragEventsBubbling:Be.bool,minSize:Be.number,maxSize:Be.number,maxFiles:Be.number,disabled:Be.bool,getFilesFromEvent:Be.func,onFileDialogCancel:Be.func,onFileDialogOpen:Be.func,useFsAccessApi:Be.bool,autoFocus:Be.bool,onDragEnter:Be.func,onDragLeave:Be.func,onDragOver:Be.func,onDrop:Be.func,onDropAccepted:Be.func,onDropRejected:Be.func,onError:Be.func,validator:Be.func};var ku={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function wb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=qe(qe({},bb),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,v=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,I=t.noDragEventsBubbling,O=t.onError,F=t.validator,M=b.useMemo(function(){return XF(n)},[n]),_=b.useMemo(function(){return qF(n)},[n]),k=b.useMemo(function(){return typeof g=="function"?g:xb},[g]),L=b.useMemo(function(){return typeof m=="function"?m:xb},[m]),P=b.useRef(null),A=b.useRef(null),N=b.useReducer(dN,ku),$=Ou(N,2),z=$[0],H=$[1],D=z.isFocused,B=z.isFileDialogActive,X=b.useRef(typeof window<"u"&&window.isSecureContext&&y&&YF()),te=function(){!X.current&&B&&setTimeout(function(){if(A.current){var oe=A.current.files;oe.length||(H({type:"closeDialog"}),L())}},300)};b.useEffect(function(){return window.addEventListener("focus",te,!1),function(){window.removeEventListener("focus",te,!1)}},[A,B,L,X]);var Q=b.useRef([]),G=function(oe){P.current&&P.current.contains(oe.target)||(oe.preventDefault(),Q.current=[])};b.useEffect(function(){return v&&(document.addEventListener("dragover",pb,!1),document.addEventListener("drop",G,!1)),function(){v&&(document.removeEventListener("dragover",pb),document.removeEventListener("drop",G))}},[P,v]),b.useEffect(function(){return!r&&x&&P.current&&P.current.focus(),function(){}},[P,x,r]);var V=b.useCallback(function(Z){O?O(Z):console.error(Z)},[O]),j=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),be(Z),Q.current=[].concat(rN(Q.current),[Z.target]),oa(Z)&&Promise.resolve(o(Z)).then(function(oe){if(!(ra(Z)&&!I)){var Te=oe.length,je=Te>0&&HF({files:oe,accept:M,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:F}),se=Te>0&&!je;H({isDragAccept:je,isDragReject:se,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(oe){return V(oe)})},[o,c,V,I,M,i,s,a,l,F]),W=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),be(Z);var oe=oa(Z);if(oe&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return oe&&d&&d(Z),!1},[d,I]),U=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),be(Z);var oe=Q.current.filter(function(je){return P.current&&P.current.contains(je)}),Te=oe.indexOf(Z.target);Te!==-1&&oe.splice(Te,1),Q.current=oe,!(oe.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oa(Z)&&u&&u(Z))},[P,u,I]),Y=b.useCallback(function(Z,oe){var Te=[],je=[];Z.forEach(function(se){var Se=fb(se,M),Ce=Ou(Se,2),Ut=Ce[0],tr=Ce[1],In=hb(se,i,s),Sa=Ou(In,2),xd=Sa[0],Td=Sa[1],Sd=F?F(se):null;if(Ut&&xd&&!Sd)Te.push(se);else{var Ed=[tr,Td];Sd&&(Ed=Ed.concat(Sd)),je.push({file:se,errors:Ed.filter(function(z2){return z2})})}}),(!a&&Te.length>1||a&&l>=1&&Te.length>l)&&(Te.forEach(function(se){je.push({file:se,errors:[WF]})}),Te.splice(0)),H({acceptedFiles:Te,fileRejections:je,type:"setFiles"}),f&&f(Te,je,oe),je.length>0&&p&&p(je,oe),Te.length>0&&h&&h(Te,oe)},[H,a,M,i,s,l,f,h,p,F]),K=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),be(Z),Q.current=[],oa(Z)&&Promise.resolve(o(Z)).then(function(oe){ra(Z)&&!I||Y(oe,Z)}).catch(function(oe){return V(oe)}),H({type:"reset"})},[o,Y,V,I]),R=b.useCallback(function(){if(X.current){H({type:"openDialog"}),k();var Z={multiple:a,types:_};window.showOpenFilePicker(Z).then(function(oe){return o(oe)}).then(function(oe){Y(oe,null),H({type:"closeDialog"})}).catch(function(oe){QF(oe)?(L(oe),H({type:"closeDialog"})):ZF(oe)?(X.current=!1,A.current?(A.current.value=null,A.current.click()):V(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."))):V(oe)});return}A.current&&(H({type:"openDialog"}),k(),A.current.value=null,A.current.click())},[H,k,L,y,Y,V,_,a]),ue=b.useCallback(function(Z){!P.current||!P.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),R())},[P,R]),_e=b.useCallback(function(){H({type:"focus"})},[]),$e=b.useCallback(function(){H({type:"blur"})},[]),Ke=b.useCallback(function(){T||(KF()?setTimeout(R,0):R())},[T,R]),ae=function(oe){return r?null:oe},ge=function(oe){return S?null:ae(oe)},ie=function(oe){return E?null:ae(oe)},be=function(oe){I&&oe.stopPropagation()},Qe=b.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Te=oe===void 0?"ref":oe,je=Z.role,se=Z.onKeyDown,Se=Z.onFocus,Ce=Z.onBlur,Ut=Z.onClick,tr=Z.onDragEnter,In=Z.onDragOver,Sa=Z.onDragLeave,xd=Z.onDrop,Td=sa(Z,tN);return qe(qe(Mu({onKeyDown:ge(dn(se,ue)),onFocus:ge(dn(Se,_e)),onBlur:ge(dn(Ce,$e)),onClick:ae(dn(Ut,Ke)),onDragEnter:ie(dn(tr,j)),onDragOver:ie(dn(In,W)),onDragLeave:ie(dn(Sa,U)),onDrop:ie(dn(xd,K)),role:typeof je=="string"&&je!==""?je:"presentation"},Te,P),!r&&!S?{tabIndex:0}:{}),Td)}},[P,ue,_e,$e,Ke,j,W,U,K,S,E,r]),we=b.useCallback(function(Z){Z.stopPropagation()},[]),nt=b.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Te=oe===void 0?"ref":oe,je=Z.onChange,se=Z.onClick,Se=sa(Z,nN),Ce=Mu({accept:M,multiple:a,type:"file",style:{display:"none"},onChange:ae(dn(je,K)),onClick:ae(dn(se,we)),tabIndex:-1},Te,A);return qe(qe({},Ce),Se)}},[A,n,a,K,r]);return qe(qe({},z),{},{isFocused:D&&!r,getRootProps:Qe,getInputProps:nt,rootRef:P,inputRef:A,open:ae(R)})}function dN(e,t){switch(t.type){case"focus":return qe(qe({},e),{},{isFocused:!0});case"blur":return qe(qe({},e),{},{isFocused:!1});case"openDialog":return qe(qe({},ku),{},{isFileDialogActive:!0});case"closeDialog":return qe(qe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return qe(qe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return qe(qe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return qe({},ku);default:return e}}function xb(){}const fN={isImage:e=>e.type.includes("image")},hN=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(fN.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:jv(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:jv(e.file.size)})},[e.file]),t.type==="img"?w.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[w.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[w.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Wr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(no,{})})]}):w.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[w.jsxs("header",{className:"flex flex-row items-center gap-4",children:[w.jsx(km,{size:48}),w.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Wr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(no,{className:"text-danger"})})]})},pN=e=>w.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>w.jsx(hN,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),mN=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(pN,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(b.Fragment,{children:e.idle}),gN=w.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[w.jsx(MP,{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"})]})]}),yN=({idle:e=gN,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=b.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=wb({onDrop:i});return w.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[w.jsx("input",{...l(r),name:r.name,id:r.name}),w.jsx(mN,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},vN=["INPUT","SELECT"],Fu=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{vN.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},bN=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})},wN=({children:e,className:t="",size:n,...r})=>w.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[w.jsx("input",{...r,type:"radio",className:Me("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),Ir=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const g=bt(),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=Zs(y.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const v=()=>{var T;return(T=y.current)==null?void 0:T.focus()};return w.jsx(Cs,{info:n,left:f,error:h,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:w.jsx("label",{htmlFor:x,children:w.jsxs("button",{onClick:v,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(rc,{size:20}),w.jsx("span",{className:"sr-only",children:g.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:x,name:x,value:p.value,required:e,ref:Xa(m,y),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:Me("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>w.jsx("option",{...T,children:T.label??T.value},`${x}-select-option-${T.value}`))]})})}),Nu=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},xN=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=b.useId(),[i,a]=b.useState(r.checked??!1),l=i,c=b.useRef(null),u=Nu(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=()=>{var h,p;const f=!((h=c.current)!=null&&h.checked);a(f),(p=r==null?void 0:r.onCheck)==null||p.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:Me("flex flex-wrap items-center",t),"data-component":"switch",children:[w.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:f=>a(f.target.checked),ref:c,type:"checkbox"}),w.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:w.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),w.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:w.jsx("span",{className:"font-medium text-foreground",children:e})}),w.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),TN=e=>{const[t,n]=uP();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:mP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},SN=Vv("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
204
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),ia=0,Xn=1,Mo=2,Tb=4;function As(e,t){return n=>e(t(n))}function EN(e,t){return t(e)}function Sb(e,t){return n=>e(t,n)}function Eb(e,t){return()=>e(t)}function aa(e,t){return t(e),e}function Ue(...e){return e}function CN(e){e()}function Cb(e){return()=>e}function PN(...e){return()=>{e.map(CN)}}function Lu(e){return e!==void 0}function Or(){}function Ne(e,t){return e(Xn,t)}function pe(e,t){e(ia,t)}function _u(e){e(Mo)}function Pt(e){return e(Tb)}function le(e,t){return Ne(e,Sb(t,ia))}function fn(e,t){const n=e(Xn,r=>{n(),t(r)});return n}function xe(){const e=[];return(t,n)=>{switch(t){case Mo:e.splice(0,e.length);return;case Xn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ia:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function ee(e){let t=e;const n=xe();return(r,o)=>{switch(r){case Xn:o(t);break;case ia:t=o;break;case Tb:return t}return n(r,o)}}function IN(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Xn:return s?n===s?void 0:(r(),n=s,t=Ne(e,s),t):(r(),Or);case Mo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function $t(e){return aa(xe(),t=>le(e,t))}function It(e,t){return aa(ee(t),n=>le(e,n))}function ON(...e){return t=>e.reduceRight(EN,t)}function q(e,...t){const n=ON(...t);return(r,o)=>{switch(r){case Xn:return Ne(e,n(o));case Mo:_u(e);return}}}function Pb(e,t){return e===t}function Ge(e=Pb){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function de(e){return t=>n=>{e(n)&&t(n)}}function re(e){return t=>As(t,e)}function hn(e){return t=>()=>t(e)}function pn(e,t){return n=>r=>n(t=e(t,r))}function Do(e){return t=>n=>{e>0?e--:t(n)}}function Qn(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ib(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function me(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Ne(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function Ob(...e){return function(t,n){switch(t){case Xn:return PN(...e.map(r=>Ne(r,n)));case Mo:return;default:throw new Error(`unrecognized action ${t}`)}}}function fe(e,t=Pb){return q(e,Ge(t))}function gt(...e){const t=xe(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Ne(s,l=>{n[i]=l,r=r|a,r===o&&pe(t,n)})}),function(s,i){switch(s){case Xn:return r===o&&i(n),Ne(t,i);case Mo:return _u(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ae(e,t=[],{singleton:n}={singleton:!0}){return{id:AN(),constructor:e,dependencies:t,singleton:n}}const AN=()=>Symbol();function MN(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function DN(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const la=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Vu(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=b.createContext({});function l(y,x){y.propsReady&&pe(y.propsReady,!1);for(const v of r){const T=y[t.required[v]];pe(T,x[v])}for(const v of o)if(v in x){const T=y[t.optional[v]];pe(T,x[v])}y.propsReady&&pe(y.propsReady,!0)}function c(y){return s.reduce((x,v)=>(x[v]=T=>{const S=y[t.methods[v]];pe(S,T)},x),{})}function u(y){return i.reduce((x,v)=>(x[v]=IN(y[t.events[v]]),x),{})}const d=b.forwardRef((y,x)=>{const{children:v,...T}=y,[S]=b.useState(()=>aa(MN(e),I=>l(I,T))),[E]=b.useState(Eb(u,S));return la(()=>{for(const I of i)I in T&&Ne(E[I],T[I]);return()=>{Object.values(E).map(_u)}},[T,E,S]),la(()=>{l(S,T)}),b.useImperativeHandle(x,Cb(c(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,DN([...r,...o,...i],T),v):v)}),f=y=>b.useCallback(Sb(pe,b.useContext(a)[y]),[y]),h=y=>{const v=b.useContext(a)[y],T=b.useCallback(S=>Ne(v,S),[v]);return b.useSyncExternalStore(T,()=>Pt(v),()=>Pt(v))},p=y=>{const v=b.useContext(a)[y],[T,S]=b.useState(Eb(Pt,v));return la(()=>Ne(v,E=>{E!==T&&S(Cb(E))}),[v,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];la(()=>Ne(T,x),[x,T])}}}const kN=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Bt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Bt||{});const FN={0:"debug",1:"log",2:"warn",3:"error"},NN=()=>typeof globalThis>"u"?window:globalThis,Zn=Ae(()=>{const e=ee(3);return{log:ee((n,r,o=1)=>{var s;const i=(s=NN().VIRTUOSO_LOG_LEVEL)!=null?s:Pt(e);o>=i&&console[FN[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function $u(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function mn(e,t=!0){return $u(e,t).callbackRef}function Ab(e,t,n,r,o,s,i){const a=b.useCallback(l=>{const c=LN(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(_N("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return $u(a,n)}function LN(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Bt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function _N(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Bt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Yt(e,t){return Math.round(e.getBoundingClientRect()[t])}function Mb(e,t){return Math.abs(e-t)<1.01}function Db(e,t,n,r=Or,o){const s=b.useRef(null),i=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,y=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:g})};d.suppressFlushSync?y():$o.flushSync(y),i.current!==null&&(p===i.current||p<=0||p===m-g)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,g;f===window?(m=Math.max(Yt(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,g=document.documentElement.scrollTop):(m=f.scrollHeight,p=Yt(f,"height"),g=f.scrollTop);const y=m-p;if(d.top=Math.ceil(Math.max(Math.min(y,d.top),0)),Mb(p,m)||d.top===g){e({scrollTop:g,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const At=Ae(()=>{const e=xe(),t=xe(),n=ee(0),r=xe(),o=ee(0),s=xe(),i=xe(),a=ee(0),l=ee(0),c=ee(0),u=ee(0),d=xe(),f=xe(),h=ee(!1);return le(q(e,re(({scrollTop:p})=>p)),t),le(q(e,re(({scrollHeight:p})=>p)),i),le(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Ms={lvl:0};function kb(e,t,n,r=Ms,o=Ms){return{k:e,v:t,lvl:n,l:r,r:o}}function Re(e){return e===Ms}function ko(){return Ms}function Bu(e,t){if(Re(e))return Ms;const{k:n,l:r,r:o}=e;if(t===n){if(Re(r))return o;if(Re(o))return r;{const[s,i]=Fb(r);return ca(dt(e,{k:s,v:i,l:Nb(r)}))}}else return t<n?ca(dt(e,{l:Bu(r,t)})):ca(dt(e,{r:Bu(o,t)}))}function Ds(e,t){if(!Re(e))return t===e.k?e.v:t<e.k?Ds(e.l,t):Ds(e.r,t)}function qt(e,t,n="k"){if(Re(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=qt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return qt(e.l,t,n)}function Rt(e,t,n){return Re(e)?kb(t,n,1):t===e.k?dt(e,{k:t,v:n}):t<e.k?Lb(dt(e,{l:Rt(e.l,t,n)})):Lb(dt(e,{r:Rt(e.r,t,n)}))}function Ru(e,t,n){if(Re(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Ru(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Ru(i,t,n))),a}function Ar(e){return Re(e)?[]:[...Ar(e.l),{k:e.k,v:e.v},...Ar(e.r)]}function Fb(e){return Re(e.r)?[e.k,e.v]:Fb(e.r)}function Nb(e){return Re(e.r)?e.l:ca(dt(e,{r:Nb(e.r)}))}function dt(e,t){return kb(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 ju(e){return Re(e)||e.lvl>e.r.lvl}function Lb(e){return zu(Vb(e))}function ca(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(ju(t))return Vb(dt(e,{lvl:r-1}));if(!Re(t)&&!Re(t.r))return dt(t.r,{l:dt(t,{r:t.r.l}),r:dt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(ju(e))return zu(dt(e,{lvl:r-1}));if(!Re(n)&&!Re(n.l)){const o=n.l,s=ju(o)?n.lvl-1:n.lvl;return dt(o,{l:dt(e,{r:o.l,lvl:r-1}),r:zu(dt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function ua(e,t,n){if(Re(e))return[];const r=qt(e,t)[0];return VN(Ru(e,r,n))}function _b(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function VN(e){return _b(e,({k:t,v:n})=>({index:t,value:n}))}function zu(e){const{r:t,lvl:n}=e;return!Re(t)&&!Re(t.r)&&t.lvl===n&&t.r.lvl===n?dt(t,{l:dt(e,{r:t.l}),lvl:n+1}):e}function Vb(e){const{l:t}=e;return!Re(t)&&t.lvl===e.lvl?dt(t,{r:dt(e,{l:t.r})}):e}function da(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function $b(e,t,n){return e[da(e,t,n)]}function $N(e,t,n,r){const o=da(e,t,r),s=da(e,n,r,o);return e.slice(o,s+1)}const Wu=Ae(()=>({recalcInProgress:ee(!1)}),[],{singleton:!0});function BN(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 Bb(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 RN(e,t){let n=Re(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Re(e)){e=Rt(e,0,o);continue}const a=ua(e,s-1,i+1);if(a.some(BN(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Bu(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=Rt(e,i+1,f));c&&(e=Rt(e,s,o))}return[e,n]}function jN(){return{offsetTree:[],sizeTree:ko(),groupOffsetTree:ko(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Hu({index:e},t){return t===e?0:t<e?-1:1}function zN({offset:e},t){return t===e?0:t<e?-1:1}function WN(e){return{index:e.index,value:e}}function HN(e,t,n,r=0){return r>0&&(t=Math.max(t,$b(e,r,Hu).offset)),_b($N(e,t,n,zN),WN)}function Uu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=da(o,t-1,Hu),a=o[l].offset;const u=qt(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===qt(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ua(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function UN(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Bt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Re(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>Rt(Rt(p,m,f),m+1,h),i)}else[i,a]=RN(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Uu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>Rt(f,h,ks(h,l,o)),ko()),groupIndices:n}}function ks(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=$b(t,e,Hu),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function GN(e){return typeof e.groupIndex<"u"}function Rb(e,t,n){if(GN(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=jb(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function jb(e,t){if(!fa(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function fa(e){return!Re(e.groupOffsetTree)}function KN(e){return Ar(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const YN={offsetHeight:"height",offsetWidth:"width"},gn=Ae(([{log:e},{recalcInProgress:t}])=>{const n=xe(),r=xe(),o=It(r,0),s=xe(),i=xe(),a=ee(0),l=ee([]),c=ee(void 0),u=ee(void 0),d=ee((S,E)=>Yt(S,YN[E])),f=ee(void 0),h=ee(0),p=jN(),m=It(q(n,me(l,e,h),pn(UN,p),Ge()),p),g=It(q(l,Ge(),pn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),re(({prev:S})=>S)),[]);le(q(l,de(S=>S.length>0),me(m,h),re(([S,E,I])=>{const O=S.reduce((F,M,_)=>Rt(F,M,ks(M,E.offsetTree,I)||_),ko());return{...E,groupIndices:S,groupOffsetTree:O}})),m),le(q(r,me(m),de(([S,{lastIndex:E}])=>S<E),re(([S,{lastIndex:E,lastSize:I}])=>[{startIndex:S,endIndex:E,size:I}])),n),le(c,u);const y=It(q(c,re(S=>S===void 0)),!0);le(q(u,de(S=>S!==void 0&&Re(Pt(m).sizeTree)),re(S=>[{startIndex:0,endIndex:0,size:S}])),n);const x=$t(q(n,me(m),pn(({sizes:S},[E,I])=>({changed:I!==S,sizes:I}),{changed:!1,sizes:p}),re(S=>S.changed)));Ne(q(a,pn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),re(S=>S.diff)),S=>{const{groupIndices:E}=Pt(m);if(S>0)pe(t,!0),pe(s,S+Bb(S,E));else if(S<0){const I=Pt(g);I.length>0&&(S-=Bb(-S,I)),pe(i,S)}}),Ne(q(a,me(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},Bt.ERROR)});const v=$t(s);le(q(s,me(m),re(([S,E])=>{const I=E.groupIndices.length>0,O=[],F=E.lastSize;if(I){const M=Ds(E.sizeTree,0);let _=0,k=0;for(;_<S;){const A=E.groupIndices[k],N=E.groupIndices.length===k+1?1/0:E.groupIndices[k+1]-A-1;O.push({startIndex:A,endIndex:A,size:M}),O.push({startIndex:A+1,endIndex:A+1+N-1,size:F}),k++,_+=N+1}const L=Ar(E.sizeTree);return _!==S&&L.shift(),L.reduce((A,{k:N,v:$})=>{let z=A.ranges;return A.prevSize!==0&&(z=[...A.ranges,{startIndex:A.prevIndex,endIndex:N+S-1,size:A.prevSize}]),{ranges:z,prevIndex:N+S,prevSize:$}},{ranges:O,prevIndex:S,prevSize:0}).ranges}return Ar(E.sizeTree).reduce((M,{k:_,v:k})=>({ranges:[...M.ranges,{startIndex:M.prevIndex,endIndex:_+S-1,size:M.prevSize}],prevIndex:_+S,prevSize:k}),{ranges:[],prevIndex:0,prevSize:F}).ranges})),n);const T=$t(q(i,me(m,h),re(([S,{offsetTree:E},I])=>{const O=-S;return ks(O,E,I)})));return le(q(i,me(m,h),re(([S,E,I])=>{if(E.groupIndices.length>0){if(Re(E.sizeTree))return E;let F=ko();const M=Pt(g);let _=0,k=0,L=0;for(;_<-S;){L=M[k];const A=M[k+1]-L-1;k++,_+=A+1}if(F=Ar(E.sizeTree).reduce((A,{k:N,v:$})=>Rt(A,Math.max(0,N+S),$),F),_!==-S){const A=Ds(E.sizeTree,L);F=Rt(F,0,A);const N=qt(E.sizeTree,-S+1)[1];F=Rt(F,1,N)}return{...E,sizeTree:F,...Uu(E.offsetTree,0,F,I)}}else{const F=Ar(E.sizeTree).reduce((M,{k:_,v:k})=>Rt(M,Math.max(0,_+S),k),ko());return{...E,sizeTree:F,...Uu(E.offsetTree,0,F,I)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:v,firstItemIndex:a,gap:h,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:y,itemSize:d}},Ue(Zn,Wu),{singleton:!0}),qN=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function zb(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!qN)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Fs=Ae(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=xe(),p=xe(),m=ee(0);let g=null,y=null,x=null;function v(){g&&(g(),g=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),pe(o,!1)}return le(q(h,me(e,s,t,m,l,c,f),me(r,u,d),re(([[T,S,E,I,O,F,M,_],k,L,P])=>{const A=zb(T),{align:N,behavior:$,offset:z}=A,H=I-1,D=Rb(A,S,H);let B=ks(D,S.offsetTree,k)+F;N==="end"?(B+=L+qt(S.sizeTree,D)[1]-E+P,D===H&&(B+=M)):N==="center"?B+=(L+qt(S.sizeTree,D)[1]-E+P)/2:B-=O,z&&(B+=z);const X=te=>{v(),te?(_("retrying to scroll to",{location:T},Bt.DEBUG),pe(h,T)):(pe(p,!0),_("list did not change, scroll successful",{},Bt.DEBUG))};if(v(),$==="smooth"){let te=!1;x=Ne(n,Q=>{te=te||Q}),g=fn(a,()=>{X(te)})}else g=fn(q(n,XN(150)),X);return y=setTimeout(()=>{v()},1200),pe(o,!0),_("scrolling from index to",{index:D,top:B,behavior:$},Bt.DEBUG),{top:B,behavior:$}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ue(gn,At,Zn),{singleton:!0});function XN(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Ns="up",Ls="down",QN="none",ZN={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},JN=0,_s=Ae(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=ee(!1),a=ee(!0),l=xe(),c=xe(),u=ee(4),d=ee(JN),f=It(q(Ob(q(fe(t),Do(1),hn(!0)),q(fe(t),Do(1),hn(!1),Ib(100))),Ge()),!1),h=It(q(Ob(q(s,hn(!0)),q(s,hn(!1),Ib(200))),Ge()),!1);le(q(gt(fe(t),fe(d)),re(([x,v])=>x<=v),Ge()),a),le(q(a,Qn(50)),c);const p=$t(q(gt(e,fe(n),fe(r),fe(o),fe(u)),pn((x,[{scrollTop:v,scrollHeight:T},S,E,I,O])=>{const F=v+S-T>-O,M={viewportHeight:S,scrollTop:v,scrollHeight:T};if(F){let k,L;return v>x.state.scrollTop?(k="SCROLLED_DOWN",L=x.state.scrollTop-v):(k="SIZE_DECREASED",L=x.state.scrollTop-v||x.scrollTopDelta),{atBottom:!0,state:M,atBottomBecause:k,scrollTopDelta:L}}let _;return M.scrollHeight>x.state.scrollHeight?_="SIZE_INCREASED":S<x.state.viewportHeight?_="VIEWPORT_HEIGHT_DECREASING":v<x.state.scrollTop?_="SCROLLING_UPWARDS":_="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:_,state:M}},ZN),Ge((x,v)=>x&&x.atBottom===v.atBottom))),m=It(q(e,pn((x,{scrollTop:v,scrollHeight:T,viewportHeight:S})=>{if(Mb(x.scrollHeight,T))return{scrollTop:v,scrollHeight:T,jump:0,changed:!1};{const E=T-(v+S)<1;return x.scrollTop!==v&&E?{scrollHeight:T,scrollTop:v,jump:x.scrollTop-v,changed:!0}:{scrollHeight:T,scrollTop:v,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),de(x=>x.changed),re(x=>x.jump)),0);le(q(p,re(x=>x.atBottom)),i),le(q(i,Qn(50)),l);const g=ee(Ls);le(q(e,re(({scrollTop:x})=>x),Ge(),pn((x,v)=>Pt(h)?{direction:x.direction,prevScrollTop:v}:{direction:v<x.prevScrollTop?Ns:Ls,prevScrollTop:v},{direction:Ls,prevScrollTop:0}),re(x=>x.direction)),g),le(q(e,Qn(50),hn(QN)),g);const y=ee(0);return le(q(f,de(x=>!x),hn(0)),y),le(q(t,Qn(100),me(f),de(([x,v])=>!!v),pn(([x,v],[T])=>[v,T],[0,0]),re(([x,v])=>v-x)),y),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:g,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:y,lastJumpDueToItemResize:m}},Ue(At)),Jn=Ae(([{log:e}])=>{const t=ee(!1),n=$t(q(t,de(r=>r),Ge()));return Ne(t,r=>{r&&Pt(e)("props updated",{},Bt.DEBUG)}),{propsReady:t,didMount:n}},Ue(Zn),{singleton:!0});function Gu(e,t){e==0?t():requestAnimationFrame(()=>Gu(e-1,t))}function Ku(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Vs=Ae(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=ee(!0),l=ee(0),c=ee(!0);return le(q(i,me(l),de(([u,d])=>!!d),hn(!1)),a),le(q(i,me(l),de(([u,d])=>!!d),hn(!1)),c),Ne(q(gt(t,i),me(a,e,n,c),de(([[,u],d,{sizeTree:f},h,p])=>u&&(!Re(f)||Lu(h))&&!d&&!p),me(l)),([,u])=>{fn(s,()=>{pe(c,!0)}),Gu(4,()=>{fn(r,()=>{pe(a,!0)}),pe(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ue(gn,At,Fs,Jn),{singleton:!0});function Wb(e){return e?e==="smooth"?"smooth":"auto":!1}const eL=(e,t)=>typeof e=="function"?Wb(e(t)):t&&Wb(e),tL=Ae(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=ee(!1),d=xe();let f=null;function h(m){pe(o,{index:"LAST",align:"end",behavior:m})}Ne(q(gt(q(fe(e),Do(1)),a),me(fe(u),n,s,c),re(([[m,g],y,x,v,T])=>{let S=g&&v,E="auto";return S&&(E=eL(y,x||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),de(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:g})=>{f&&(f(),f=null),f=fn(t,()=>{Pt(l)("following output to ",{totalCount:m},Bt.DEBUG),h(g),f=null})});function p(m){const g=fn(r,y=>{m&&!y.atBottom&&y.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(Pt(l)("scrolling to bottom due to increased size",{},Bt.DEBUG),h("auto"))});setTimeout(g,100)}return Ne(q(gt(fe(u),e,i),de(([m,,g])=>m&&g),pn(({value:m},[,g])=>({refreshed:m===g,value:g}),{refreshed:!1,value:0}),de(({refreshed:m})=>m),me(u,e)),([,m])=>{Pt(s)&&p(m!==!1)}),Ne(d,()=>{p(Pt(u)!==!1)}),Ne(gt(fe(u),r),([m,g])=>{m&&!g.atBottom&&g.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ue(gn,_s,Fs,Vs,Jn,Zn,At));function nL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const Hb=Ae(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=xe(),i=xe(),a=$t(q(s,re(nL)));return le(q(a,re(l=>l.totalCount)),e),le(q(a,re(l=>l.groupIndices)),t),le(q(gt(r,n,o),de(([l,c])=>fa(c)),re(([l,c,u])=>qt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ge(),re(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ue(gn,At));function $s(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Ub(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const ha="top",pa="bottom",Gb="none";function Kb(e,t,n){return typeof e=="number"?n===Ns&&t===ha||n===Ls&&t===pa?e:0:n===Ns?t===ha?e.main:e.reverse:t===pa?e.main:e.reverse}function Yb(e,t){return typeof e=="number"?e:e[t]||0}const Yu=Ae(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=xe(),i=ee(0),a=ee(0),l=ee(0),c=It(q(gt(fe(e),fe(t),fe(r),fe(s,$s),fe(l),fe(i),fe(o),fe(n),fe(a)),re(([u,d,f,[h,p],m,g,y,x,v])=>{const T=u-x,S=g+y,E=Math.max(f-T,0);let I=Gb;const O=Yb(v,ha),F=Yb(v,pa);return h-=x,h+=f+y,p+=f+y,p-=x,h>u+S-O&&(I=Ns),p<u-E+d+F&&(I=Ls),I!==Gb?[Math.max(T-f-Kb(m,ha,I)-O,0),T-E-y+d+Kb(m,pa,I)+F]:null}),de(u=>u!=null),Ge($s)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ue(At),{singleton:!0});function rL(e,t,n){if(fa(t)){const r=jb(e,t);return[{index:qt(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 qu={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(!fa(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=ua(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function ma(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:qb(e,o,s),topItems:qb(t,o,s),topListHeight:t.reduce((m,g)=>g.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function Xb(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Ku(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return ma(c,[],a,o,n,r)}const Mr=Ae(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=ee([]),g=ee(0),y=xe();le(s.topItemsIndexes,m);const x=It(q(gt(h,p,fe(i,$s),fe(t),fe(e),fe(u),c,fe(m),fe(r),fe(o),n),de(([E,I,,O,,,,,,,F])=>{const M=F&&F.length!==O;return E&&!I&&!M}),re(([,,[E,I],O,F,M,_,k,L,P,A])=>{const N=F,{sizeTree:$,offsetTree:z}=N,H=Pt(g);if(O===0)return{...qu,totalCount:O};if(E===0&&I===0)return H===0?{...qu,totalCount:O}:Xb(H,M,F,L,P,A||[]);if(Re($))return H>0?null:ma(rL(Ku(M,O),N,A),[],O,P,N,L);const D=[];if(k.length>0){const G=k[0],V=k[k.length-1];let j=0;for(const W of ua($,G,V)){const U=W.value,Y=Math.max(W.start,G),K=Math.min(W.end,V);for(let R=Y;R<=K;R++)D.push({index:R,size:U,offset:j,data:A&&A[R]}),j+=U}}if(!_)return ma([],D,O,P,N,L);const B=k.length>0?k[k.length-1]+1:0,X=HN(z,E,I,B);if(X.length===0)return null;const te=O-1,Q=aa([],G=>{for(const V of X){const j=V.value;let W=j.offset,U=V.start;const Y=j.size;if(j.offset<E){U+=Math.floor((E-j.offset+P)/(Y+P));const R=U-V.start;W+=R*Y+R*P}U<B&&(W+=(B-U)*Y,U=B);const K=Math.min(V.end,te);for(let R=U;R<=K&&!(W>=I);R++)G.push({index:R,size:Y,offset:W,data:A&&A[R]}),W+=Y+P}});return ma(Q,D,O,P,N,L)}),de(E=>E!==null),Ge()),qu);le(q(n,de(Lu),re(E=>E==null?void 0:E.length)),t),le(q(x,re(E=>E.topListHeight)),d),le(d,l),le(q(x,re(E=>[E.top,E.bottom])),a),le(q(x,re(E=>E.items)),y);const v=$t(q(x,de(({items:E})=>E.length>0),me(t,n),de(([{items:E},I])=>E[E.length-1].originalIndex===I-1),re(([,E,I])=>[E-1,I]),Ge($s),re(([E])=>E))),T=$t(q(x,Qn(200),de(({items:E,topItems:I})=>E.length>0&&E[0].originalIndex===I.length),re(({items:E})=>E[0].index),Ge())),S=$t(q(x,de(({items:E})=>E.length>0),re(({items:E})=>{let I=0,O=E.length-1;for(;E[I].type==="group"&&I<O;)I++;for(;E[O].type==="group"&&O>I;)O--;return{startIndex:E[I].index,endIndex:E[O].index}}),Ge(Ub)));return{listState:x,topItemsIndexes:m,endReached:v,startReached:T,rangeChanged:S,itemsRendered:y,initialItemCount:g,...f}},Ue(gn,Hb,Yu,Vs,Fs,_s,Jn,Wu),{singleton:!0}),oL=Ae(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(le(q(a,me(s),de(([,l])=>l!==0),me(o,e,t,r,n),re(([[,l],c,u,d,f,h=[]])=>Xb(l,c,u,d,f,h))),i),{}),Ue(gn,Vs,Mr,Jn),{singleton:!0}),Qb=Ae(([{scrollVelocity:e}])=>{const t=ee(!1),n=xe(),r=ee(!1);return le(q(e,me(r,t,n),de(([o,s])=>!!s),re(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Ge()),t),Ne(q(gt(t,e,n),me(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ue(_s),{singleton:!0}),sL=Ae(([{topItemsIndexes:e}])=>{const t=ee(0);return le(q(t,de(n=>n>0),re(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ue(Mr)),Zb=Ae(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=xe(),i=It(q(gt(e,r,t,n,o),re(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return le(fe(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ue(At,Mr),{singleton:!0});function Jb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const iL=Jb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),aL=Ae(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=$t(q(l,me(a),pn(([,y,x,v],[{items:T,totalCount:S,bottom:E,offsetBottom:I},O])=>{const F=E+I;let M=0;return x===S&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(M=F-v,M!==0&&(M+=O))),[M,T,S,F]},[0,[],0,0]),de(([y])=>y!==0),me(t,i,r,s,h,p),de(([,y,x,v,,,T])=>!T&&!v&&y!==0&&x===Ns),re(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},Bt.DEBUG),y))));function g(y){y>0?(pe(e,{top:-y,behavior:"auto"}),pe(n,0)):(pe(n,0),pe(e,{top:-y,behavior:"auto"}))}return Ne(q(m,me(n,o)),([y,x,v])=>{v&&iL()?pe(n,x-y):g(-y)}),Ne(q(gt(It(o,!1),n,p),de(([y,x,v])=>!y&&!v&&x!==0),re(([y,x])=>x),Qn(1)),g),le(q(u,re(y=>({top:-y}))),e),Ne(q(c,me(d,f),re(([y,{lastSize:x,groupIndices:v,sizeTree:T},S])=>{function E(I){return I*(x+S)}if(v.length===0)return E(y);{let I=0;const O=Ds(T,0);let F=0,M=0;for(;F<y;){F++,I+=O;let _=v.length===M+1?1/0:v[M+1]-v[M]-1;F+_>y&&(I-=O,_=y-F+1),F+=_,I+=E(_),M++}return I}})),y=>{pe(n,y),requestAnimationFrame(()=>{pe(e,{top:y}),requestAnimationFrame(()=>{pe(n,0),pe(p,!1)})})}),{deviation:n}},Ue(At,_s,Mr,gn,Zn,Wu)),lL=Ae(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ee(0);return Ne(q(e,me(r),de(([,o])=>o!==0),re(([,o])=>({top:o}))),o=>{fn(q(n,Do(1),de(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{pe(t,o)})})}),{initialScrollTop:r}},Ue(Jn,At,Mr),{singleton:!0}),cL=Ae(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ee(!1),r=It(q(gt(n,e,t),de(([o])=>o),re(([,o,s])=>Math.max(0,o-s)),Qn(0),Ge()),0);return{alignToBottom:n,paddingTopAddition:r}},Ue(At,Zb),{singleton:!0}),Xu=Ae(([{scrollTo:e,scrollContainerState:t}])=>{const n=xe(),r=xe(),o=xe(),s=ee(!1),i=ee(void 0);return le(q(gt(n,r),re(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),le(q(e,me(r),re(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ue(At)),uL=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,dL=Ae(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=xe();return le(q(u,me(e,o,t,s,i,a,r),me(n),re(([[d,f,h,p,m,g,y,x],v])=>{const{done:T,behavior:S,align:E,calculateViewLocation:I=uL,...O}=d,F=Rb(d,f,p-1),M=ks(F,f.offsetTree,v)+m+g,_=M+qt(f.sizeTree,F)[1],k=x+g,L=x+h-y,P=I({itemTop:M,itemBottom:_,viewportTop:k,viewportBottom:L,locationParams:{behavior:S,align:E,...O}});return P?T&&fn(q(l,de(A=>A===!1),Do(Pt(l)?1:2)),T):T&&T(),P}),de(d=>d!==null)),c),{scrollIntoView:u}},Ue(gn,At,Fs,Mr,Zn),{singleton:!0}),fL=Ae(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=xe(),u=ee(void 0),d=ee(null),f=ee(null);return le(a,d),le(l,f),Ne(q(c,me(e,n,i,d,f,r)),([h,p,m,g,y,x,v])=>{const T=KN(p.sizeTree);g&&y!==null&&x!==null&&(m=y.scrollTop-x.offsetTop),m-=v,h({ranges:T,scrollTop:m})}),le(q(u,de(Lu),re(hL)),o),le(q(s,me(u),de(([,h])=>h!==void 0),Ge(),re(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ue(gn,At,Vs,Jn,Xu));function hL(e){return{offset:e.scrollTop,index:0,align:"start"}}const pL=Ae(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ue(Yu,oL,Jn,Qb,Zb,lL,cL,Xu,dL,Zn)),e0=Ae(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,g,y,{listState:x,topItemsIndexes:v,...T},{scrollToIndex:S},E,{topItemCount:I},{groupCounts:O},F])=>(le(T.rangeChanged,F.scrollSeekRangeChanged),le(q(F.windowViewportRect,re(M=>M.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:v,topItemCount:I,groupCounts:O,fixedItemHeight:n,defaultItemHeight:r,gap:u,...y,statefulTotalCount:c,listState:x,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...F,...m,sizes:d,...g}),Ue(gn,Vs,At,fL,tL,Mr,Fs,aL,sL,Hb,pL)),Qu="-webkit-sticky",t0="sticky",n0=Jb(()=>{if(typeof document>"u")return t0;const e=document.createElement("div");return e.style.position=Qu,e.style.position===Qu?Qu:t0});function Zu(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:s}=$u(r),i=b.useCallback(()=>{r(s.current)},[r,s]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const ga=b.createContext(void 0),r0=b.createContext(void 0);function Ju(e){return e}const mL=Ae(([e,t])=>({...e,...t}),Ue(e0,Ae(()=>{const e=ee(l=>`Item ${l}`),t=ee(null),n=ee(l=>`Group ${l}`),r=ee({}),o=ee(Ju),s=ee("div"),i=ee(Or),a=(l,c=null)=>It(q(r,re(u=>u[l]),Ge()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),gL=({height:e})=>b.createElement("div",{style:{height:e}}),yL={position:n0(),zIndex:1,overflowAnchor:"none"},vL={overflowAnchor:"none"},o0=b.memo(function({showTopList:t=!1}){const n=ve("listState"),r=Ht("sizeRanges"),o=ve("useWindowScroll"),s=ve("customScrollParent"),i=Ht("windowScrollContainerState"),a=Ht("scrollContainerState"),l=s||o?i:a,c=ve("itemContent"),u=ve("context"),d=ve("groupContent"),f=ve("trackItemSizes"),h=ve("itemSize"),p=ve("log"),m=Ht("gap"),{callbackRef:g}=Ab(r,h,f,t?Or:l,p,m,s),[y,x]=b.useState(0);nd("deviation",P=>{y!==P&&x(P)});const v=ve("EmptyPlaceholder"),T=ve("ScrollSeekPlaceholder")||gL,S=ve("ListComponent"),E=ve("ItemComponent"),I=ve("GroupComponent"),O=ve("computeItemKey"),F=ve("isSeeking"),M=ve("groupIndices").length>0,_=ve("alignToBottom"),k=ve("initialItemFinalLocationReached"),L=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:y!==0?y:_?"auto":0,...k?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&v?b.createElement(v,tt(v,u)):b.createElement(S,{...tt(S,u),ref:g,style:L,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(P=>{const A=P.originalIndex,N=O(A+n.firstItemIndex,P.data,u);return F?b.createElement(T,{...tt(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(I,{...tt(I,u),key:N,"data-index":A,"data-known-size":P.size,"data-item-index":P.index,style:yL},d(P.index,u)):b.createElement(E,{...tt(E,u),...s0(E,P.data),key:N,"data-index":A,"data-known-size":P.size,"data-item-index":P.index,"data-item-group-index":P.groupIndex,style:vL},M?c(P.index,P.groupIndex,P.data,u):c(P.index,P.data,u))}))}),bL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Fo=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),wL={width:"100%",position:n0(),top:0,zIndex:1};function tt(e,t){if(typeof e!="string")return{context:t}}function s0(e,t){return{item:typeof e=="string"?void 0:t}}const xL=b.memo(function(){const t=ve("HeaderComponent"),n=Ht("headerHeight"),r=ve("headerFooterTag"),o=mn(b.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=ve("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),TL=b.memo(function(){const t=ve("FooterComponent"),n=Ht("footerHeight"),r=ve("headerFooterTag"),o=mn(b.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=ve("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null});function ed({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=Db(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...bL,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...tt(c,f)},i)})}function td({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:g,scrollToCallback:y}=Db(l,u,c,Or,h);return kN(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",y),t("scrollBy",g),b.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...tt(c,p)},i)})}const SL=({children:e})=>{const t=b.useContext(ga),n=Ht("viewportHeight"),r=Ht("fixedItemHeight"),o=ve("alignToBottom"),s=mn(b.useMemo(()=>As(n,i=>Yt(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Fo(o),ref:s,"data-viewport-type":"element"},e)},EL=({children:e})=>{const t=b.useContext(ga),n=Ht("windowViewportRect"),r=Ht("fixedItemHeight"),o=ve("customScrollParent"),s=Zu(n,o),i=ve("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:Fo(i),"data-viewport-type":"window"},e)},CL=({children:e})=>{const t=ve("TopItemListComponent")||"div",n=ve("headerHeight"),r={...wL,marginTop:`${n}px`},o=ve("context");return b.createElement(t,{style:r,...tt(t,o)},e)},PL=b.memo(function(t){const n=ve("useWindowScroll"),r=ve("topItemsIndexes").length>0,o=ve("customScrollParent"),s=o||n?AL:OL,i=o||n?EL:SL;return b.createElement(s,{...t},r&&b.createElement(CL,null,b.createElement(o0,{showTopList:!0})),b.createElement(i,null,b.createElement(xL,null),b.createElement(o0,null),b.createElement(TL,null)))}),{Component:IL,usePublisher:Ht,useEmitterValue:ve,useEmitter:nd}=Vu(mL,{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"}},PL),OL=ed({usePublisher:Ht,useEmitterValue:ve,useEmitter:nd}),AL=td({usePublisher:Ht,useEmitterValue:ve,useEmitter:nd}),ML=IL,i0={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},DL={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:a0,ceil:l0,floor:ya,min:rd,max:Bs}=Math;function kL(e){return{...DL,items:e}}function c0(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function FL(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 NL=Ae(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:x,windowScrollTo:v},T])=>{const S=ee(0),E=ee(0),I=ee(i0),O=ee({height:0,width:0}),F=ee({height:0,width:0}),M=xe(),_=xe(),k=ee(0),L=ee(null),P=ee({row:0,column:0}),A=xe(),N=xe(),$=ee(!1),z=ee(0),H=ee(!0),D=ee(!1);Ne(q(p,me(z),de(([V,j])=>!!j)),()=>{pe(H,!1),pe(E,0)}),Ne(q(gt(p,H,F,O,z,D),de(([V,j,W,U,,Y])=>V&&!j&&W.height!==0&&U.height!==0&&!Y)),([,,,,V])=>{pe(D,!0),Gu(1,()=>{pe(M,V)}),fn(q(r),()=>{pe(n,[0,0]),pe(H,!0)})}),le(q(N,de(V=>V!=null&&V.scrollTop>0),hn(0)),E),Ne(q(p,me(N),de(([,V])=>V!=null)),([,V])=>{V&&(pe(O,V.viewport),pe(F,V==null?void 0:V.item),pe(P,V.gap),V.scrollTop>0&&(pe($,!0),fn(q(r,Do(1)),j=>{pe($,!1)}),pe(i,{top:V.scrollTop})))}),le(q(O,re(({height:V})=>V)),o),le(q(gt(fe(O,va),fe(F,va),fe(P,(V,j)=>V&&V.column===j.column&&V.row===j.row),fe(r)),re(([V,j,W,U])=>({viewport:V,item:j,gap:W,scrollTop:U}))),A),le(q(gt(fe(S),t,fe(P,FL),fe(F,va),fe(O,va),fe(L),fe(E),fe($),fe(H),fe(z)),de(([,,,,,,,V])=>!V),re(([V,[j,W],U,Y,K,R,ue,,_e,$e])=>{const{row:Ke,column:ae}=U,{height:ge,width:ie}=Y,{width:be}=K;if(ue===0&&(V===0||be===0))return i0;if(ie===0){const Ce=Ku($e,V),Ut=Ce===0?Math.max(ue-1,0):Ce;return kL(c0(Ce,Ut,R))}const Qe=d0(be,ie,ae);let we,nt;_e?j===0&&W===0&&ue>0?(we=0,nt=ue-1):(we=Qe*ya((j+Ke)/(ge+Ke)),nt=Qe*l0((W+Ke)/(ge+Ke))-1,nt=rd(V-1,Bs(nt,Qe-1)),we=rd(nt,Bs(0,we))):(we=0,nt=-1);const Z=c0(we,nt,R),{top:oe,bottom:Te}=u0(K,U,Y,Z),je=l0(V/Qe),Se=je*ge+(je-1)*Ke-Te;return{items:Z,offsetTop:oe,offsetBottom:Se,top:oe,bottom:Te,itemHeight:ge,itemWidth:ie}})),I),le(q(L,de(V=>V!==null),re(V=>V.length)),S),le(q(gt(O,F,I,P),de(([V,j,{items:W}])=>W.length>0&&j.height!==0&&V.height!==0),re(([V,j,{items:W},U])=>{const{top:Y,bottom:K}=u0(V,U,j,W);return[Y,K]}),Ge($s)),n);const B=ee(!1);le(q(r,me(B),re(([V,j])=>j||V!==0)),B);const X=$t(q(fe(I),de(({items:V})=>V.length>0),me(S,B),de(([{items:V},j,W])=>W&&V[V.length-1].index===j-1),re(([,V])=>V-1),Ge())),te=$t(q(fe(I),de(({items:V})=>V.length>0&&V[0].index===0),hn(0),Ge())),Q=$t(q(fe(I),me($),de(([{items:V},j])=>V.length>0&&!j),re(([{items:V}])=>({startIndex:V[0].index,endIndex:V[V.length-1].index})),Ge(Ub),Qn(0)));le(Q,f.scrollSeekRangeChanged),le(q(M,me(O,F,S,P),re(([V,j,W,U,Y])=>{const K=zb(V),{align:R,behavior:ue,offset:_e}=K;let $e=K.index;$e==="LAST"&&($e=U-1),$e=Bs(0,$e,rd(U-1,$e));let Ke=od(j,Y,W,$e);return R==="end"?Ke=a0(Ke-j.height+W.height):R==="center"&&(Ke=a0(Ke-j.height/2+W.height/2)),_e&&(Ke+=_e),{top:Ke,behavior:ue}})),i);const G=It(q(I,re(V=>V.offsetBottom+V.bottom)),0);return le(q(m,re(V=>({width:V.visibleWidth,height:V.visibleHeight}))),O),{data:L,totalCount:S,viewportDimensions:O,itemDimensions:F,scrollTop:r,scrollHeight:_,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:M,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:v,useWindowScroll:g,customScrollParent:y,windowScrollContainerState:x,deviation:k,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:P,restoreStateFrom:N,...f,initialTopMostItemIndex:z,gridState:I,totalListHeight:G,...d,startReached:te,endReached:X,rangeChanged:Q,stateChanged:A,propsReady:h,stateRestoreInProgress:$,...T}},Ue(Yu,At,_s,Qb,Jn,Xu,Zn));function u0(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=od(e,t,n,r[0].index),i=od(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function od(e,t,n,r){const o=d0(e.width,n.width,t.column),s=ya(r/o),i=s*n.height+Bs(0,s-1)*t.row;return i>0?i+t.row:i}function d0(e,t,n){return Bs(1,ya((e+n)/(ya(t)+n)))}const LL=Ae(([e,t])=>({...e,...t}),Ue(NL,Ae(()=>{const e=ee(c=>`Item ${c}`),t=ee({}),n=ee(null),r=ee("virtuoso-grid-item"),o=ee("virtuoso-grid-list"),s=ee(Ju),i=ee("div"),a=ee(Or),l=(c,u=null)=>It(q(t,re(d=>d[c]),Ge()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),_L=b.memo(function(){const t=Xe("gridState"),n=Xe("listClassName"),r=Xe("itemClassName"),o=Xe("itemContent"),s=Xe("computeItemKey"),i=Xe("isSeeking"),a=Xt("scrollHeight"),l=Xe("ItemComponent"),c=Xe("ListComponent"),u=Xe("ScrollSeekPlaceholder"),d=Xe("context"),f=Xt("itemDimensions"),h=Xt("gap"),p=Xe("log"),m=Xe("stateRestoreInProgress"),g=mn(b.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const v=y.firstChild;if(v){const{width:T,height:S}=v.getBoundingClientRect();f({width:T,height:S})}h({row:h0("row-gap",getComputedStyle(y).rowGap,p),column:h0("column-gap",getComputedStyle(y).columnGap,p)})},[a,f,h,p]));return m?null:b.createElement(c,{ref:g,className:n,...tt(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(y=>{const x=s(y.index,y.data,d);return i?b.createElement(u,{key:x,...tt(u,d),index:y.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...tt(l,d),className:r,"data-index":y.index,key:x},o(y.index,y.data,d))}))}),VL=b.memo(function(){const t=Xe("HeaderComponent"),n=Xt("headerHeight"),r=Xe("headerFooterTag"),o=mn(b.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=Xe("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),$L=b.memo(function(){const t=Xe("FooterComponent"),n=Xt("footerHeight"),r=Xe("headerFooterTag"),o=mn(b.useMemo(()=>i=>n(Yt(i,"height")),[n])),s=Xe("context");return t?b.createElement(r,{ref:o},b.createElement(t,tt(t,s))):null}),BL=({children:e})=>{const t=b.useContext(r0),n=Xt("itemDimensions"),r=Xt("viewportDimensions"),o=mn(b.useMemo(()=>s=>{r(s.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:Fo(!1),ref:o},e)},RL=({children:e})=>{const t=b.useContext(r0),n=Xt("windowViewportRect"),r=Xt("itemDimensions"),o=Xe("customScrollParent"),s=Zu(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:s,style:Fo(!1)},e)},jL=b.memo(function({...t}){const n=Xe("useWindowScroll"),r=Xe("customScrollParent"),o=r||n?WL:zL,s=r||n?RL:BL;return b.createElement(o,{...t},b.createElement(s,null,b.createElement(VL,null),b.createElement(_L,null),b.createElement($L,null)))}),{Component:iV,usePublisher:Xt,useEmitterValue:Xe,useEmitter:f0}=Vu(LL,{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"}},jL),zL=ed({usePublisher:Xt,useEmitterValue:Xe,useEmitter:f0}),WL=td({usePublisher:Xt,useEmitterValue:Xe,useEmitter:f0});function h0(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Bt.WARN),t==="normal"?0:parseInt(t??"0",10)}const HL=Ae(([e,t])=>({...e,...t}),Ue(e0,Ae(()=>{const e=ee(l=>b.createElement("td",null,"Item $",l)),t=ee(null),n=ee(null),r=ee(null),o=ee({}),s=ee(Ju),i=ee(Or),a=(l,c=null)=>It(q(o,re(u=>u[l]),Ge()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),UL=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),GL=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),KL={overflowAnchor:"none"},YL=b.memo(function(){const t=Le("listState"),n=Qt("sizeRanges"),r=Le("useWindowScroll"),o=Le("customScrollParent"),s=Qt("windowScrollContainerState"),i=Qt("scrollContainerState"),a=o||r?s:i,l=Le("itemContent"),c=Le("trackItemSizes"),u=Le("itemSize"),d=Le("log"),{callbackRef:f,ref:h}=Ab(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);sd("deviation",N=>{p!==N&&(h.current.style.marginTop=`${N}px`,m(N))});const g=Le("EmptyPlaceholder"),y=Le("ScrollSeekPlaceholder")||UL,x=Le("FillerRow")||GL,v=Le("TableBodyComponent"),T=Le("TableRowComponent"),S=Le("computeItemKey"),E=Le("isSeeking"),I=Le("paddingTopAddition"),O=Le("firstItemIndex"),F=Le("statefulTotalCount"),M=Le("context");if(F===0&&g)return b.createElement(g,tt(g,M));const _=t.offsetTop+I+p,k=t.offsetBottom,L=_>0?b.createElement(x,{height:_,key:"padding-top",context:M}):null,P=k>0?b.createElement(x,{height:k,key:"padding-bottom",context:M}):null,A=t.items.map(N=>{const $=N.originalIndex,z=S($+O,N.data,M);return E?b.createElement(y,{...tt(y,M),key:z,index:N.index,height:N.size,type:N.type||"item"}):b.createElement(T,{...tt(T,M),...s0(T,N.data),key:z,"data-index":$,"data-known-size":N.size,"data-item-index":N.index,style:KL},l(N.index,N.data,M))});return b.createElement(v,{ref:f,"data-testid":"virtuoso-item-list",...tt(v,M)},[L,...A,P])}),qL=({children:e})=>{const t=b.useContext(ga),n=Qt("viewportHeight"),r=Qt("fixedItemHeight"),o=mn(b.useMemo(()=>As(n,s=>Yt(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Fo(!1),ref:o,"data-viewport-type":"element"},e)},XL=({children:e})=>{const t=b.useContext(ga),n=Qt("windowViewportRect"),r=Qt("fixedItemHeight"),o=Le("customScrollParent"),s=Zu(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:Fo(!1),"data-viewport-type":"window"},e)},QL=b.memo(function(t){const n=Le("useWindowScroll"),r=Le("customScrollParent"),o=Qt("fixedHeaderHeight"),s=Qt("fixedFooterHeight"),i=Le("fixedHeaderContent"),a=Le("fixedFooterContent"),l=Le("context"),c=mn(b.useMemo(()=>As(o,x=>Yt(x,"height")),[o])),u=mn(b.useMemo(()=>As(s,x=>Yt(x,"height")),[s])),d=r||n?e_:JL,f=r||n?XL:qL,h=Le("TableComponent"),p=Le("TableHeadComponent"),m=Le("TableFooterComponent"),g=i?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...tt(p,l)},i()):null,y=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...tt(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(f,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...tt(h,l)},[g,b.createElement(YL,{key:"TableBody"}),y])))}),{Component:ZL,usePublisher:Qt,useEmitterValue:Le,useEmitter:sd}=Vu(HL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},QL),JL=ed({usePublisher:Qt,useEmitterValue:Le,useEmitter:sd}),e_=td({usePublisher:Qt,useEmitterValue:Le,useEmitter:sd}),t_=ZL,n_=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 s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},r_={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"})})},o_=e=>{const t=b.useRef(null),n=n_(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(Ps,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(ML,{height:n,useWindowScroll:!0,data:e.source,components:r_,itemContent:(r,o)=>w.jsx(b.Fragment,{children:w.jsx(_v,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(Wr,{children:w.jsx(oc,{})})}),w.jsx("div",{})]})};var s_=Object.defineProperty,p0=Object.getOwnPropertySymbols,i_=Object.prototype.hasOwnProperty,a_=Object.prototype.propertyIsEnumerable,m0=(e,t,n)=>t in e?s_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l_=(e,t)=>{for(var n in t||(t={}))i_.call(t,n)&&m0(e,n,t[n]);if(p0)for(var n of p0(t))a_.call(t,n)&&m0(e,n,t[n]);return e},id=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},c_=(e,t,n,r)=>wa(id,e,t,n,r),No=e=>typeof e=="object",er=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!No(e)&&!No(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=>er(e[r],t[r]))},u_=(e,t)=>(No(e)||Array.isArray(e))&&t?e[t]:e,d_=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ba=e=>/[0-9.]+/.test(e),g0=e=>["string","number"].includes(typeof e),y0=e=>e==null||(e==null?void 0:e.length)===0||e==="",v0={eq:er,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:y0,notEmpty:e=>!y0(e),in:(e,t)=>id(t,n=>er(e,n)),notIn:(e,t)=>b0(t,n=>!er(e,n))},f_=e=>{if(e in v0)return v0[e];throw new Error("Linq - Symbol not found")},Lo=(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},wa=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=f_(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},h_=(e,t,n,r)=>wa(Lo,e,t,n,r),b0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},p_=(e,t,n,r)=>wa(b0,e,t,n,r),w0=e=>{if(e===null)return null;const t=l_({},e);return Object.keys(t).forEach(n=>t[n]=No(e[n])?w0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},x0=(e,t)=>{if(No(t)){for(let n=0;n<e.length;n++){const r=e[n];if(er(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(er(t,r))return!0}return!1},m_=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},g_=e=>Lo(e,(t,n,r)=>No(t)?n===r.findIndex(o=>er(o,t)):n===r.indexOf(t)),y_=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},T0=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},v_=(e,t)=>T0(e,n=>n[t]),S0=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},b_=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},w_=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return ba(e)&&ba(t)?r.map(i=>Number.parseInt(i)):r},ad=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ba(e)&&ba(t)){const o=[],[s,i]=b_(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return w_(e,t,r)},x_=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?ad(r,o,1):ad(r,s,Number.parseInt(o,10))}return g0(e)&&g0(t)?ad(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},ld=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},E0=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},T_=(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)},S_=(e,t,n,r)=>wa(T_,e,t,n,r),C0=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(d_(t))},P0=(e=>(e.Asc="asc",e.Desc="desc",e))(P0||{}),E_=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),C_=(e,t)=>e.sort(E_(t)),P_=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Lo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},I_=class Cd{constructor(t=[]){this.array=t}static Range(...t){return x_(...t)}static New(t){return new Cd(t)}Where(t,n,r){return this.array=h_(this.array,t,n,r),this}Some(t,n,r){return c_(this.array,t,n,r)}All(t,n,r){return p_(this.array,t,n,r)}Reverse(){return this.array=E0(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=S_(this.array,t,n,r),this}Distinct(){return this.array=g_(this.array),this}First(t){return t===void 0?this.array[0]:y_(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?ld((n,r)=>n+r,0,this.array):ld((n,r)=>n+u_(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return v_(this.array,t)}GroupWith(t){return T0(this.array,t)}Except(t){return Lo(this.array,n=>!x0(t,n))}Intersect(t){return Lo(this.array,n=>x0(t,n))}OrderBy(t,n){let r;return r=t?C0(this.array,t):this.array.toSorted(),this.array=n==="desc"?E0(r):r,this}Includes(t){return id(this.array,n=>er(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 ld(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(S0(this.array,n=>[t,n]))}Zip(t,n){return S0(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Lo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Cd(w0(this.array))}ToObject(t){return m_(this.array,t)}Sort(t){return Array.isArray(t)?C_(this.array,t):C0(this.array,t)}Unique(t){return P_(this.array,t)}},I0=I_,cd={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(g,y)=>{try{Object.keys(g).forEach(y)}catch(x){window.console.log(x)}},n=g=>g==null,r=g=>{const y=typeof g;return y==="string"||y==="number"||y==="boolean"||n(g)},o=(g,y)=>{const x=y.getItem(g);try{return JSON.parse(x)}catch{return x??null}},s=g=>Object.keys(g).reduce((y,x)=>({...y,[x]:o(x,g)}),{}),i=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,y)=>(g[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),g),{}),c=new Set,u=()=>{const g=l();c.forEach(y=>y(g))},d=[{name:"expires",parse:g=>`expires=${i(g.expires??a)}`},{name:"maxAge",parse:g=>g.maxAge?`max-age=${i(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 y=g.domain??"";return y===""?"":`domain=${g.multiDomain?".":""}${y}`}},{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(y=>y.trim().startsWith(`${g}=`)),deleteAll:()=>{document.cookie.split(";").forEach(g=>{document.cookie=g.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:g=>{const y=f.json()[g];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:g=>{document.cookie=`${encodeURIComponent(g)}=;expires=${new Date().toUTCString()}`,u()},set:(g,y,x={})=>{const v=r(y)?y:encodeURIComponent(JSON.stringify(y)),T=d.reduce((S,E)=>{const I=E.parse(x);return I===""?S:S.concat(I)},[`${encodeURIComponent(g)}=${v}`]).join(";");document.cookie=T,u()}},h=g=>{const y=new Set,x=v=>{g().removeItem(v);const T=s(g());y.forEach(S=>S(T))};return{delete:x,listener:v=>(y.add(v),()=>y.delete(v)),clearListeners:()=>y.clear(),json:(v=!1)=>v?s(g()):g(),has:v=>{const T=g().getItem(v);return!n(T)},deleteAll:()=>{t(g(),x),y.forEach(v=>v(g()))},get:v=>o(v,g()),set:(v,T)=>{g().setItem(v,JSON.stringify(T)),y.forEach(S=>S(g()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(cd);const ud=e=>e.headerLabel??e.thead??e.id,dd=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var _o=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(_o||{});const fd=e=>e.type==="number"?e.valueAsNumber:e.value,O_=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},A_={},M_=(e,t)=>{if(!Array.isArray(t))return e;const n=new Map(e.map(r=>[r.id,r]));return t.map(r=>{const o=n.get(r.id);return{...r,...o}})},D_=(e,t,n=A_)=>{const r=Di()?null:cd.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=wc({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:M_(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Di()||cd.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},hd=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??_o.Text,i=t[s]??[],a=((c=i.find(d=>d["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:ms(),operation:l,label:ud(e),name:o,type:s,value:"",...r}},pd=()=>{const e=bt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:b.useMemo(()=>({[_o.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[_o.Boolean]:[t.is,t.isNot],[_o.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},k_=e=>{const t=bt(),n=pd(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,hd(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(p=>u===p.id);return hd(h,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=fd(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return w.jsx(b.Fragment,{children:w.jsx(Po,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(CP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(Ir,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),w.jsx(Ir,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(Ps,{"data-id":l.id,onChange:a,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),w.jsx("div",{className:"mt-5 flex items-center justify-center",children:w.jsx("button",{"data-id":l.id,type:"button",onClick:i,children:w.jsx(no,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[w.jsx(sc,{size:14})," ",t.tableFilterNewFilter]})})]})})})},F_=({filter:e,onDelete:t,set:n})=>{const r=bt(),o=pd(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},i=a=>{const l=a.target.dataset.id||"",c=fd(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(Ir,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),w.jsx(Ps,{"data-id":e.id,onChange:i,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),w.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:w.jsx(no,{className:"text-danger",size:14})})]})},N_=({item:e,onPointerDown:t})=>{const n=dr(0);return w.jsxs(wi.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(EP,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},L_=e=>{var l;const t=bt(),n=dd(e.cols),r=hP(),[o,s]=b.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var g;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((g=u.options.item(f))==null?void 0:g.label)||"";s(h);const p=new I0(e.rows).GroupBy(d),m=e.cols.find(y=>y.id===d);e.setGroups(kx(p).map((y,x)=>{const v=p[y];return{...m,groupId:ms(),groupKey:d,index:x,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return w.jsx(b.Fragment,{children:w.jsxs(Po,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(AP,{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(Ir,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),w.jsx(Wr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(no,{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(NC,{children:w.jsx(wi.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(N_,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},__=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),V_=(e,t)=>e.toSorted(__(t)),O0=(e,t,n)=>({id:ms(),type:n,value:e.id,label:t}),$_=e=>{const t=bt(),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,O0(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return w.jsx(b.Fragment,{children:w.jsx(Po,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(Am,{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(Ir,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(Ir,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:w.jsx(no,{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(sc,{size:14})," ",t.tableSortAddButton]})})]})})})},B_=e=>{const t=bt(),[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=O0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=ud(e.col);return w.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?w.jsx(wP,{size:14}):null,n==="desc"?w.jsx(bP,{size:14}):null,n==="undefined"?w.jsx(Am,{size:14}):null]})},R_=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(k_,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx($_,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(L_,{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=fd(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function j_(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const z_=e=>{const t=b.useId(),n=bt(),r=e.asLink||"button",o=b.useMemo(()=>j_(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return w.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[w.jsx("p",{children:w.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?w.jsxs(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:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>w.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),w.jsx("nav",{children:w.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?w.jsx("li",{children:w.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:w.jsx(b.Fragment,{children:typeof i=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},W_={top:0,left:0,right:0,bottom:-1},H_=e=>{var p;const t=bt(),n=e.filters.filter(m=>m.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=pd(),a=r?PP:IP,l=m=>{const g=m.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(x=>x.id!==g))},c=b.useCallback(m=>{if(m===null)return;const g=new AbortController;return m.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:g.signal}),()=>g.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===P0.Asc?"ascending":"descending":"none",f=ud(e.header),h=dr(void 0);return w.jsxs(wi.Item,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:h},role:"columnheader","aria-sort":d,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[w.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:w.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?w.jsx(Po,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),w.jsx(a,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:w.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:f})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(m=>w.jsx("li",{className:"my-1",children:w.jsx(F_,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(hd(e.header,i.options,i.operations))),children:[w.jsx(sc,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?w.jsx(B_,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),w.jsx(pt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",dragConstraints:W_,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,g)=>{const y=m.target,x=h.get()||y.getBoundingClientRect().width,v=g.delta.x;return h.set(Math.abs(x+v))}})]})},U_=e=>w.jsx(wi.Group,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:w.jsx(to,{children:e.headers.map(t=>w.jsx(H_,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),A0=b.createContext({}),G_=()=>b.useContext(A0),K_=b.forwardRef(({context:e,className:t="",...n},r)=>w.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:w.jsx(to,{children:n.children})})),Y_=b.forwardRef(({context:e,className:t="",...n},r)=>w.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),q_=b.forwardRef(({context:e,...t},n)=>{const r=G_(),o={...t==null?void 0:t.style,top:bn.number(r.sticky)?`${r.sticky}px`:void 0};return w.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),X_=b.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),Q_=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:"h-14 bg-card-background px-2",children:w.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),Z_={TableHead:q_,Table:Y_,TableBody:K_,TableRow:X_,TableFoot:Q_},J_=[0,0,0,0,0,0,0,0,0,0],M0=w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),e2=(e,t,n)=>w.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?M0:w.jsx(jg,{})}),t2=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(b.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=Sc(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.className)||"";return b.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?M0:c?w.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):w.jsx(b.Fragment,{children:bn.nil(l)?"":l}))})})},n2=()=>w.jsx(b.Fragment,{}),r2=[{}],D0=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=b.useRef(null),[f,h]=b.useState(!1),p=Nu(i),m=Nu(u.loadingMore),g=b.useMemo(()=>{if(u.loading)return J_;if(c)return u.rows;const y=new I0(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:y.Where(x.name,x.operation.symbol,x.value)),r.length===0?y.Select():V_(y.Select(),r)},[u.rows,t,r,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const y=d.current,x=new IntersectionObserver(v=>{var E;return v[v.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 ${a?"border border-table-border":""}`,children:[w.jsx(t_,{useWindowScroll:!0,followOutput:"smooth",components:Z_,totalCount:g.length,data:g.length===0?r2:g,fixedFooterContent:f?n2:null,itemContent:g.length===0?e2:t2,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>w.jsx(U_,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),w.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?w.jsx(z_,{...l}):null]})},o2=(e,t)=>typeof t=="function"?t(e):t,xa=(e,t,n)=>e===t||n==null?void 0:n(t),s2=e=>{const t=b.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=b.useMemo(()=>dd(e.cols),[e.cols]),[o,s]=wc({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:o2(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),xa((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),xa((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),xa((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),xa((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return w.jsx(A0.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?w.jsx(R_,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?w.jsx(D0,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):w.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>w.jsx("div",{className:"min-w-full",children:w.jsx(D0,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var i2=String.prototype.replace,a2=/%20/g,md={RFC1738:"RFC1738",RFC3986:"RFC3986"},gd={default:md.RFC3986,formatters:{RFC1738:function(e){return i2.call(e,a2,"+")},RFC3986:function(e){return String(e)}},RFC1738:md.RFC1738,RFC3986:md.RFC3986},l2=gd,yd=Object.prototype.hasOwnProperty,Dr=Array.isArray,yn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c2=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Dr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},k0=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},u2=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Dr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!yd.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 Dr(t)&&!Dr(n)&&(o=k0(t,r)),Dr(t)&&Dr(n)?(n.forEach(function(s,i){if(yd.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return yd.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},d2=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},f2=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}},vd=1024,h2=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=vd){for(var c=i.length>=vd?i.slice(l,l+vd):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===l2.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=yn[f];continue}if(f<2048){u[u.length]=yn[192|f>>6]+yn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=yn[224|f>>12]+yn[128|f>>6&63]+yn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=yn[240|f>>18]+yn[128|f>>12&63]+yn[128|f>>6&63]+yn[128|f&63]}a+=u.join("")}return a},p2=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return c2(n),t},m2=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},g2=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},y2=function(t,n){return[].concat(t,n)},v2=function(t,n){if(Dr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},F0={arrayToObject:k0,assign:d2,combine:y2,compact:p2,decode:f2,encode:h2,isBuffer:g2,isRegExp:m2,maybeMap:v2,merge:u2},N0=Ix,Ta=F0,Rs=gd,b2=Object.prototype.hasOwnProperty,L0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},vn=Array.isArray,w2=Array.prototype.push,_0=function(e,t){w2.apply(e,vn(t)?t:[t])},x2=Date.prototype.toISOString,V0=Rs.default,ft={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Ta.encode,encodeValuesOnly:!1,format:V0,formatter:Rs.formatters[V0],indices:!1,serializeDate:function(t){return x2.call(t)},skipNulls:!1,strictNullHandling:!1},T2=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},bd={},S2=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,g,y,x){for(var v=t,T=x,S=0,E=!1;(T=T.get(bd))!==void 0&&!E;){var I=T.get(t);if(S+=1,typeof I<"u"){if(I===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(bd)>"u"&&(S=0)}if(typeof u=="function"?v=u(n,v):v instanceof Date?v=h(v):r==="comma"&&vn(v)&&(v=Ta.maybeMap(v,function(D){return D instanceof Date?h(D):D})),v===null){if(i)return c&&!g?c(n,ft.encoder,y,"key",p):n;v=""}if(T2(v)||Ta.isBuffer(v)){if(c){var O=g?n:c(n,ft.encoder,y,"key",p);return[m(O)+"="+m(c(v,ft.encoder,y,"value",p))]}return[m(n)+"="+m(String(v))]}var F=[];if(typeof v>"u")return F;var M;if(r==="comma"&&vn(v))g&&c&&(v=Ta.maybeMap(v,c)),M=[{value:v.length>0?v.join(",")||null:void 0}];else if(vn(u))M=u;else{var _=Object.keys(v);M=d?_.sort(d):_}var k=l?n.replace(/\./g,"%2E"):n,L=o&&vn(v)&&v.length===1?k+"[]":k;if(s&&vn(v)&&v.length===0)return L+"[]";for(var P=0;P<M.length;++P){var A=M[P],N=typeof A=="object"&&typeof A.value<"u"?A.value:v[A];if(!(a&&N===null)){var $=f&&l?A.replace(/\./g,"%2E"):A,z=vn(v)?typeof r=="function"?r(L,$):L:L+(f?"."+$:"["+$+"]");x.set(t,S);var H=N0();H.set(bd,x),_0(F,e(N,z,r,o,s,i,a,l,r==="comma"&&g&&vn(v)?null:c,u,d,f,h,p,m,g,y,H))}}return F},E2=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.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||ft.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=Rs.default;if(typeof t.format<"u"){if(!b2.call(Rs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Rs.formatters[r],s=ft.filter;(typeof t.filter=="function"||vn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in L0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=ft.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:ft.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:ft.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ft.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ft.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?ft.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ft.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:ft.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:ft.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ft.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ft.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ft.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ft.strictNullHandling}},C2=function(e,t){var n=e,r=E2(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):vn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=L0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=N0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||_0(i,S2(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},Vo=F0,wd=Object.prototype.hasOwnProperty,P2=Array.isArray,lt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Vo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},I2=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},$0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},O2="utf8=%26%2310003%3B",A2="utf8=%E2%9C%93",M2=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===A2?c="utf-8":i[l]===O2&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,lt.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),lt.decoder,c,"key"),p=Vo.maybeMap($0(u.slice(f+1),n),function(g){return n.decoder(g,lt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=I2(p)),u.indexOf("[]=")>-1&&(p=P2(p)?[p]:p);var m=wd.call(r,h);m&&n.duplicates==="combine"?r[h]=Vo.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},D2=function(e,t,n,r){for(var o=r?t:$0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},k2=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&wd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&wd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),D2(u,n,r,o)}},F2=function(t){if(!t)return lt;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"?lt.charset:t.charset,r=typeof t.duplicates>"u"?lt.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:lt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:lt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:lt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:lt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:lt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:lt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:lt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:lt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:lt.decoder,delimiter:typeof t.delimiter=="string"||Vo.isRegExp(t.delimiter)?t.delimiter:lt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:lt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:lt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:lt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:lt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:lt.strictNullHandling}},N2=function(e,t){var n=F2(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?M2(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=k2(a,r[a],n,typeof e=="string");o=Vo.merge(o,l,n)}return n.allowSparse===!0?o:Vo.compact(o)},L2=C2,_2=N2,V2=gd,$2={formats:V2,parse:_2,stringify:L2};const B2={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},B0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return $2.parse(n.toString(),B2)},R0=e=>e.replace("[",".").replace("]","").split("."),js=(e,t)=>R0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),zs=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),R2=(e,t)=>{const[n,r]=b.useState(null),o=b.useRef({}),[s,i]=b.useState({}),a=(p,m)=>{const g=js(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},l=(p,m)=>{const g=js(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},c=(p,m)=>{const g=js(p,e);return{...m,name:p,id:p,form:t,required:!g.isOptional(),error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}},u=(p,m)=>{const g=js(p,e);return{...m,name:p,id:p,required:!g.isOptional(),form:t,type:g._def.typeName==="ZodNumber"?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:y=>{y!==null&&(o.current[p]={element:y,schema:g})}}};b.useEffect(()=>{const p=Object.values(o.current).map(g=>{const y=g.element.dataset.origin?document.querySelector(`[data-target="${g.element.name}"]`):g.element,x=g.schema.safeParse(zs(y)),v=S=>{var F;const E=y.dataset.target||y.name;if(!E)return;const I=zs(S.target)||(S.relatedTarget?zs(S.relatedTarget):""),O=g.schema.safeParse(I);if(O.success)return y.setCustomValidity(""),i(M=>Ka(M,E,O.data)),r(M=>{const{[E]:_,...k}=M||{};return k===null||bn.empty(k)?null:k});if(y.required){const M=((F=O.error.issues[0])==null?void 0:F.message)||"";y.setCustomValidity(M),r(_=>({..._,[E]:M}))}},T=y.getAttribute("data-trigger")||"blur";return y.addEventListener(T,v),y.tagName==="SELECT"&&y.addEventListener("change",v),{input:g,hasInitialError:y.required?!x.success:!1,unsubscribe:()=>{y.removeEventListener(T,v),y.tagName==="SELECT"&&y.addEventListener("change",v)}}});return p.some(g=>g.hasInitialError)&&r(g=>g===null?{}:g),()=>p.forEach(g=>g.unsubscribe())});const d=b.useCallback(p=>m=>{const g=m.currentTarget,y=Object.values(o.current).reduce((v,T)=>{var F;const S=T.element,E=T.schema.safeParse(zs(S));if(S.dataset.ignore==="ignore"||E.success)return v;const I=(F=E.error.issues[0])==null?void 0:F.message;S.setAttribute("data-initialized","true");const O=S.dataset.name||S.name||"";return{...v,[O]:I}},{}),x=bn.empty(y)?null:y;r(x),p==null||p({form:g,errors:x||{}})},[]),f=b.useCallback(p=>m=>{m.preventDefault();const g=m.currentTarget;let y=B0(g);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(g.elements)).forEach(T=>{if(T.tagName==="SELECT"){const S=T;y=Ka(y,S.name,S.value)}if(T.tagName==="INPUT"){const S=T;y=Ka(y,S.name,zs(S))}});const v=e.safeParse(s);return v.success?p({form:g,json:y,data:v.data,event:m,reset:()=>Fu(g),success:!0,errors:[]}):p({form:g,json:y,event:m,data:y,success:!1,reset:()=>Fu(g),errors:v.error.issues.map(T=>({message:T.message,path:T.path.map(S=>String(S))}))})},[t]);return{state:s,input:u,datepicker:a,checkbox:c,select:l,onSubmit:f,errors:n,onInvalid:d,disabled:n!==null,name:t,get:p=>Sc(s,p)||""}},j2=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};J.Alert=FP,J.Autocomplete=$k,J.Button=Wr,J.Calendar=Bg,J.Card=Rg,J.Checkbox=_v,J.ColType=_o,J.Collapse=Lm,J.ComponentsProvider=bA,J.DatePicker=sF,J.Dropdown=Po,J.Empty=jg,J.Expand=wk,J.FileUpload=yN,J.Form=bN,J.Input=Ps,J.InputFeedback=Mv,J.InputField=Cs,J.Menu=Sk,J.MenuItem=Tk,J.Modal=kk,J.Notifications=EM,J.Option=Dv,J.Polymorph=zr,J.Radiobox=wN,J.RenderOnView=g1,J.Select=Ir,J.Stats=CM,J.Switch=xN,J.Tab=OM,J.Table=s2,J.Tabs=PM,J.Tag=b1,J.TaskList=TN,J.Textarea=SN,J.Toolbar=Fk,J.Tooltip=Av,J.TransferList=o_,J.VirtualAutocomplete=rF,J.convertPath=R0,J.createColumns=O_,J.createDesignTokens=Pg,J.createOptionCols=dd,J.createStyles=hA,J.createTheme=pA,J.css=Me,J.defaultDarkTheme=yA,J.defaultLightTheme=vA,J.dispatchInput=Qa,J.formReset=Fu,J.formToJson=B0,J.getSchemaShape=js,J.initializeInputDataset=Zs,J.isReactComponent=f1,J.isReactFC=h1,J.isSsr=Di,J.mergeRefs=Xa,J.parsers=Ai,J.path=Sc,J.reduceTokens=lo,J.safeRegex=gs,J.splitInto=Fg,J.useColorParser=wA,J.useForm=R2,J.useLocale=Mg,J.useNotification=TM,J.usePrevious=j2,J.useReactive=py,J.useTablePreferences=D_,J.useTranslations=bt,J.uuid=ms,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
195
+ */var Kd,rw;function TL(){if(rw)return Kd;rw=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Kd=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Kd}var Zd,ow;function Xd(){if(ow)return Zd;ow=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Zd=e,Zd}var Qd,sw;function iw(){return sw||(sw=1,Qd=Function.call.bind(Object.prototype.hasOwnProperty)),Qd}var Jd,aw;function SL(){if(aw)return Jd;aw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Xd(),n={},r=iw();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Jd=o,Jd}var ef,lw;function EL(){if(lw)return ef;lw=1;var e=nw(),t=TL(),n=Xd(),r=iw(),o=SL(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return ef=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var j=D&&(c&&D[c]||D[u]);if(typeof j=="function")return j}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:y(),arrayOf:g,element:S(),elementType:T(),instanceOf:E,node:O(),objectOf:I,oneOf:C,oneOfType:A,shape:_,exact:F};function p(D,j){return D===j?D!==0||1/D===1/j:D!==D&&j!==j}function m(D,j){this.message=D,this.data=j&&typeof j=="object"?j:{},this.stack=""}m.prototype=Error.prototype;function b(D){if(process.env.NODE_ENV!=="production")var j={},K=0;function J(G,$,z,H,U,Y,ce){if(H=H||f,Y=Y||z,ce!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=H+":"+z;!j[pe]&&K<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+H+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),j[pe]=!0,K++)}}return $[z]==null?G?$[z]===null?new m("The "+U+" `"+Y+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new m("The "+U+" `"+Y+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:D($,z,H,U,Y)}var X=J.bind(null,!1);return X.isRequired=J.bind(null,!0),X}function v(D){function j(K,J,X,G,$,z){var H=K[J],U=L(H);if(U!==D){var Y=V(H);return new m("Invalid "+G+" `"+$+"` of type "+("`"+Y+"` supplied to `"+X+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return b(j)}function y(){return b(i)}function g(D){function j(K,J,X,G,$){if(typeof D!="function")return new m("Property `"+$+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var z=K[J];if(!Array.isArray(z)){var H=L(z);return new m("Invalid "+G+" `"+$+"` of type "+("`"+H+"` supplied to `"+X+"`, expected an array."))}for(var U=0;U<z.length;U++){var Y=D(z,U,X,G,$+"["+U+"]",n);if(Y instanceof Error)return Y}return null}return b(j)}function S(){function D(j,K,J,X,G){var $=j[K];if(!a($)){var z=L($);return new m("Invalid "+X+" `"+G+"` of type "+("`"+z+"` supplied to `"+J+"`, expected a single ReactElement."))}return null}return b(D)}function T(){function D(j,K,J,X,G){var $=j[K];if(!e.isValidElementType($)){var z=L($);return new m("Invalid "+X+" `"+G+"` of type "+("`"+z+"` supplied to `"+J+"`, expected a single ReactElement type."))}return null}return b(D)}function E(D){function j(K,J,X,G,$){if(!(K[J]instanceof D)){var z=D.name||f,H=W(K[J]);return new m("Invalid "+G+" `"+$+"` of type "+("`"+H+"` supplied to `"+X+"`, expected ")+("instance of `"+z+"`."))}return null}return b(j)}function C(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function j(K,J,X,G,$){for(var z=K[J],H=0;H<D.length;H++)if(p(z,D[H]))return null;var U=JSON.stringify(D,function(ce,R){var pe=V(R);return pe==="symbol"?String(R):R});return new m("Invalid "+G+" `"+$+"` of value `"+String(z)+"` "+("supplied to `"+X+"`, expected one of "+U+"."))}return b(j)}function I(D){function j(K,J,X,G,$){if(typeof D!="function")return new m("Property `"+$+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var z=K[J],H=L(z);if(H!=="object")return new m("Invalid "+G+" `"+$+"` of type "+("`"+H+"` supplied to `"+X+"`, expected an object."));for(var U in z)if(r(z,U)){var Y=D(z,U,X,G,$+"."+U,n);if(Y instanceof Error)return Y}return null}return b(j)}function A(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var j=0;j<D.length;j++){var K=D[j];if(typeof K!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+B(K)+" at index "+j+"."),i}function J(X,G,$,z,H){for(var U=[],Y=0;Y<D.length;Y++){var ce=D[Y],R=ce(X,G,$,z,H,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&U.push(R.data.expectedType)}var pe=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new m("Invalid "+z+" `"+H+"` supplied to "+("`"+$+"`"+pe+"."))}return b(J)}function O(){function D(j,K,J,X,G){return P(j[K])?null:new m("Invalid "+X+" `"+G+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return b(D)}function M(D,j,K,J,X){return new m((D||"React class")+": "+j+" type `"+K+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function _(D){function j(K,J,X,G,$){var z=K[J],H=L(z);if(H!=="object")return new m("Invalid "+G+" `"+$+"` of type `"+H+"` "+("supplied to `"+X+"`, expected `object`."));for(var U in D){var Y=D[U];if(typeof Y!="function")return M(X,G,$,U,V(Y));var ce=Y(z,U,X,G,$+"."+U,n);if(ce)return ce}return null}return b(j)}function F(D){function j(K,J,X,G,$){var z=K[J],H=L(z);if(H!=="object")return new m("Invalid "+G+" `"+$+"` of type `"+H+"` "+("supplied to `"+X+"`, expected `object`."));var U=t({},K[J],D);for(var Y in U){var ce=D[Y];if(r(D,Y)&&typeof ce!="function")return M(X,G,$,Y,V(ce));if(!ce)return new m("Invalid "+G+" `"+$+"` key `"+Y+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(K[J],null," ")+`
196
+ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var R=ce(z,Y,X,G,$+"."+Y,n);if(R)return R}return null}return b(j)}function P(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(P);if(D===null||a(D))return!0;var j=d(D);if(j){var K=j.call(D),J;if(j!==D.entries){for(;!(J=K.next()).done;)if(!P(J.value))return!1}else for(;!(J=K.next()).done;){var X=J.value;if(X&&!P(X[1]))return!1}}else return!1;return!0;default:return!1}}function N(D,j){return D==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function L(D){var j=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":N(j,D)?"symbol":j}function V(D){if(typeof D>"u"||D===null)return""+D;var j=L(D);if(j==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return j}function B(D){var j=V(D);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function W(D){return!D.constructor||!D.constructor.name?f:D.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},ef}var tf,cw;function CL(){if(cw)return tf;cw=1;var e=Xd();function t(){}function n(){}return n.resetWarningCache=t,tf=function(){function r(i,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},tf}if(process.env.NODE_ENV!=="production"){var PL=nw(),kL=!0;qd.exports=EL()(PL.isElement,kL)}else qd.exports=CL()();var IL=qd.exports;const Ye=xx(IL);function ns(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function rs(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function uw(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function dw(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var AL=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 bi(e,t){var n=OL(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 OL(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=AL.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var _L=[".DS_Store","Thumbs.db"];function DL(e){return ns(this,void 0,void 0,function(){return rs(this,function(t){return ol(e)&&ML(e.dataTransfer)?[2,VL(e.dataTransfer,e.type)]:NL(e)?[2,FL(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,LL(e)]:[2,[]]})})}function ML(e){return ol(e)}function NL(e){return ol(e)&&ol(e.target)}function ol(e){return typeof e=="object"&&e!==null}function FL(e){return nf(e.target.files).map(function(t){return bi(t)})}function LL(e){return ns(this,void 0,void 0,function(){var t;return rs(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 bi(r)})]}})})}function VL(e,t){return ns(this,void 0,void 0,function(){var n,r;return rs(this,function(o){switch(o.label){case 0:return e.items?(n=nf(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map($L))]):[3,2];case 1:return r=o.sent(),[2,fw(hw(r))];case 2:return[2,fw(nf(e.files).map(function(s){return bi(s)}))]}})})}function fw(e){return e.filter(function(t){return _L.indexOf(t.name)===-1})}function nf(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function $L(e){if(typeof e.webkitGetAsEntry!="function")return pw(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?mw(t):pw(e)}function hw(e){return e.reduce(function(t,n){return dw(dw([],uw(t),!1),uw(Array.isArray(n)?hw(n):[n]),!1)},[])}function pw(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=bi(t);return Promise.resolve(n)}function RL(e){return ns(this,void 0,void 0,function(){return rs(this,function(t){return[2,e.isDirectory?mw(e):BL(e)]})})}function mw(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return ns(i,void 0,void 0,function(){var l,c,u;return rs(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(RL)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function BL(e){return ns(this,void 0,void 0,function(){return rs(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=bi(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var jL=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function gw(e){return WL(e)||HL(e)||ww(e)||zL()}function zL(){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 HL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WL(e){if(Array.isArray(e))return rf(e)}function yw(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 vw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yw(Object(n),!0).forEach(function(r){bw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bw(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 YL(e)||GL(e,t)||ww(e,t)||UL()}function UL(){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 ww(e,t){if(e){if(typeof e=="string")return rf(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 rf(e,t)}}function rf(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 GL(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function YL(e){if(Array.isArray(e))return e}var qL="file-invalid-type",KL="file-too-large",ZL="file-too-small",XL="too-many-files",QL=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:qL,message:"File type must be ".concat(n)}},xw=function(t){return{code:KL,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Tw=function(t){return{code:ZL,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},JL={code:XL,message:"Too many files"};function Sw(e,t){var n=e.type==="application/x-moz-file"||jL(e,t);return[n,n?null:QL(t)]}function Ew(e,t,n){if(qr(e.size))if(qr(t)&&qr(n)){if(e.size>n)return[!1,xw(n)];if(e.size<t)return[!1,Tw(t)]}else{if(qr(t)&&e.size<t)return[!1,Tw(t)];if(qr(n)&&e.size>n)return[!1,xw(n)]}return[!0,null]}function qr(e){return e!=null}function e2(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=Sw(l,n),u=wi(c,1),d=u[0],f=Ew(l,r,o),h=wi(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function sl(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function il(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 Cw(e){e.preventDefault()}function t2(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function n2(e){return e.indexOf("Edge/")!==-1}function r2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return t2(e)||n2(e)}function Dn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!sl(r)&&a&&a.apply(void 0,[r].concat(s)),sl(r)})}}function o2(){return"showOpenFilePicker"in window}function s2(e){if(qr(e)){var t=Object.entries(e).filter(function(n){var r=wi(n,2),o=r[0],s=r[1],i=!0;return Pw(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(kw))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=wi(r,2),s=o[0],i=o[1];return vw(vw({},n),{},bw({},s,i))},{});return[{description:"Files",accept:t}]}return e}function i2(e){if(qr(e))return Object.entries(e).reduce(function(t,n){var r=wi(n,2),o=r[0],s=r[1];return[].concat(gw(t),[o],gw(s))},[]).filter(function(t){return Pw(t)||kw(t)}).join(",")}function a2(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function l2(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Pw(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function kw(e){return/^.*\.[\w]+$/.test(e)}var c2=["children"],u2=["open"],d2=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],f2=["refKey","onChange","onClick"];function h2(e){return g2(e)||m2(e)||Iw(e)||p2()}function p2(){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 m2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g2(e){if(Array.isArray(e))return sf(e)}function of(e,t){return b2(e)||v2(e,t)||Iw(e,t)||y2()}function y2(){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 Iw(e,t){if(e){if(typeof e=="string")return sf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sf(e,t)}}function sf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function b2(e){if(Array.isArray(e))return e}function Aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Aw(Object(n),!0).forEach(function(r){af(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function af(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function al(e,t){if(e==null)return{};var n=w2(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function w2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var lf=w.forwardRef(function(e,t){var n=e.children,r=al(e,c2),o=_w(r),s=o.open,i=al(o,u2);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(rt(rt({},i),{},{open:s})))});lf.displayName="Dropzone";var Ow={disabled:!1,getFilesFromEvent:DL,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};lf.defaultProps=Ow,lf.propTypes={children:Ye.func,accept:Ye.objectOf(Ye.arrayOf(Ye.string)),multiple:Ye.bool,preventDropOnDocument:Ye.bool,noClick:Ye.bool,noKeyboard:Ye.bool,noDrag:Ye.bool,noDragEventsBubbling:Ye.bool,minSize:Ye.number,maxSize:Ye.number,maxFiles:Ye.number,disabled:Ye.bool,getFilesFromEvent:Ye.func,onFileDialogCancel:Ye.func,onFileDialogOpen:Ye.func,useFsAccessApi:Ye.bool,autoFocus:Ye.bool,onDragEnter:Ye.func,onDragLeave:Ye.func,onDragOver:Ye.func,onDrop:Ye.func,onDropAccepted:Ye.func,onDropRejected:Ye.func,onError:Ye.func,validator:Ye.func};var cf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function _w(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=rt(rt({},Ow),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,b=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,g=t.preventDropOnDocument,S=t.noClick,T=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,I=t.onError,A=t.validator,O=w.useMemo(function(){return i2(n)},[n]),M=w.useMemo(function(){return s2(n)},[n]),_=w.useMemo(function(){return typeof b=="function"?b:Dw},[b]),F=w.useMemo(function(){return typeof m=="function"?m:Dw},[m]),P=w.useRef(null),N=w.useRef(null),L=w.useReducer(x2,cf),V=of(L,2),B=V[0],W=V[1],D=B.isFocused,j=B.isFileDialogActive,K=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&o2()),J=function(){!K.current&&j&&setTimeout(function(){if(N.current){var le=N.current.files;le.length||(W({type:"closeDialog"}),F())}},300)};w.useEffect(function(){return window.addEventListener("focus",J,!1),function(){window.removeEventListener("focus",J,!1)}},[N,j,F,K]);var X=w.useRef([]),G=function(le){P.current&&P.current.contains(le.target)||(le.preventDefault(),X.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",Cw,!1),document.addEventListener("drop",G,!1)),function(){g&&(document.removeEventListener("dragover",Cw),document.removeEventListener("drop",G))}},[P,g]),w.useEffect(function(){return!r&&y&&P.current&&P.current.focus(),function(){}},[P,y,r]);var $=w.useCallback(function(ne){I?I(ne):console.error(ne)},[I]),z=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne),X.current=[].concat(h2(X.current),[ne.target]),il(ne)&&Promise.resolve(o(ne)).then(function(le){if(!(sl(ne)&&!C)){var Ne=le.length,Je=Ne>0&&e2({files:le,accept:O,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:A}),Ot=Ne>0&&!Je;W({isDragAccept:Je,isDragReject:Ot,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ne)}}).catch(function(le){return $(le)})},[o,c,$,C,O,i,s,a,l,A]),H=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne);var le=il(ne);if(le&&ne.dataTransfer)try{ne.dataTransfer.dropEffect="copy"}catch{}return le&&d&&d(ne),!1},[d,C]),U=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne);var le=X.current.filter(function(Je){return P.current&&P.current.contains(Je)}),Ne=le.indexOf(ne.target);Ne!==-1&&le.splice(Ne,1),X.current=le,!(le.length>0)&&(W({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),il(ne)&&u&&u(ne))},[P,u,C]),Y=w.useCallback(function(ne,le){var Ne=[],Je=[];ne.forEach(function(Ot){var Vt=Sw(Ot,O),zt=of(Vt,2),no=zt[0],hs=zt[1],ps=Ew(Ot,i,s),kl=of(ps,2),Vf=kl[0],$f=kl[1],Rf=A?A(Ot):null;if(no&&Vf&&!Rf)Ne.push(Ot);else{var Bf=[hs,$f];Rf&&(Bf=Bf.concat(Rf)),Je.push({file:Ot,errors:Bf.filter(function(H$){return H$})})}}),(!a&&Ne.length>1||a&&l>=1&&Ne.length>l)&&(Ne.forEach(function(Ot){Je.push({file:Ot,errors:[JL]})}),Ne.splice(0)),W({acceptedFiles:Ne,fileRejections:Je,type:"setFiles"}),f&&f(Ne,Je,le),Je.length>0&&p&&p(Je,le),Ne.length>0&&h&&h(Ne,le)},[W,a,O,i,s,l,f,h,p,A]),ce=w.useCallback(function(ne){ne.preventDefault(),ne.persist(),Pe(ne),X.current=[],il(ne)&&Promise.resolve(o(ne)).then(function(le){sl(ne)&&!C||Y(le,ne)}).catch(function(le){return $(le)}),W({type:"reset"})},[o,Y,$,C]),R=w.useCallback(function(){if(K.current){W({type:"openDialog"}),_();var ne={multiple:a,types:M};window.showOpenFilePicker(ne).then(function(le){return o(le)}).then(function(le){Y(le,null),W({type:"closeDialog"})}).catch(function(le){a2(le)?(F(le),W({type:"closeDialog"})):l2(le)?(K.current=!1,N.current?(N.current.value=null,N.current.click()):$(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):$(le)});return}N.current&&(W({type:"openDialog"}),_(),N.current.value=null,N.current.click())},[W,_,F,v,Y,$,M,a]),pe=w.useCallback(function(ne){!P.current||!P.current.isEqualNode(ne.target)||(ne.key===" "||ne.key==="Enter"||ne.keyCode===32||ne.keyCode===13)&&(ne.preventDefault(),R())},[P,R]),xe=w.useCallback(function(){W({type:"focus"})},[]),te=w.useCallback(function(){W({type:"blur"})},[]),me=w.useCallback(function(){S||(r2()?setTimeout(R,0):R())},[S,R]),re=function(le){return r?null:le},fe=function(le){return T?null:re(le)},ue=function(le){return E?null:re(le)},Pe=function(le){C&&le.stopPropagation()},ot=w.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ne.refKey,Ne=le===void 0?"ref":le,Je=ne.role,Ot=ne.onKeyDown,Vt=ne.onFocus,zt=ne.onBlur,no=ne.onClick,hs=ne.onDragEnter,ps=ne.onDragOver,kl=ne.onDragLeave,Vf=ne.onDrop,$f=al(ne,d2);return rt(rt(af({onKeyDown:fe(Dn(Ot,pe)),onFocus:fe(Dn(Vt,xe)),onBlur:fe(Dn(zt,te)),onClick:re(Dn(no,me)),onDragEnter:ue(Dn(hs,z)),onDragOver:ue(Dn(ps,H)),onDragLeave:ue(Dn(kl,U)),onDrop:ue(Dn(Vf,ce)),role:typeof Je=="string"&&Je!==""?Je:"presentation"},Ne,P),!r&&!T?{tabIndex:0}:{}),$f)}},[P,pe,xe,te,me,z,H,U,ce,T,E,r]),Me=w.useCallback(function(ne){ne.stopPropagation()},[]),yt=w.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ne.refKey,Ne=le===void 0?"ref":le,Je=ne.onChange,Ot=ne.onClick,Vt=al(ne,f2),zt=af({accept:O,multiple:a,type:"file",style:{display:"none"},onChange:re(Dn(Je,ce)),onClick:re(Dn(Ot,Me)),tabIndex:-1},Ne,N);return rt(rt({},zt),Vt)}},[N,n,a,ce,r]);return rt(rt({},B),{},{isFocused:D&&!r,getRootProps:ot,getInputProps:yt,rootRef:P,inputRef:N,open:re(R)})}function x2(e,t){switch(t.type){case"focus":return rt(rt({},e),{},{isFocused:!0});case"blur":return rt(rt({},e),{},{isFocused:!1});case"openDialog":return rt(rt({},cf),{},{isFileDialogActive:!0});case"closeDialog":return rt(rt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return rt(rt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return rt(rt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return rt({},cf);default:return e}}function Dw(){}const T2={isImage:e=>e.type.includes("image")},S2=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(T2.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Q0(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Q0(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"gap-jade-200 flex flex-row items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Ao,{})})]}):x.jsxs("div",{className:"gap-jade-200 flex w-full flex-row items-center justify-between",children:[x.jsxs("header",{className:"flex flex-row items-center gap-4",children:[x.jsx(ry,{size:48}),x.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(mo,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(Ao,{className:"text-danger"})})]})},E2=e=>x.jsx("ul",{className:"space-y-jade-200 w-full",children:e.files.map(t=>x.jsx(S2,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),C2=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(E2,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),P2=x.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[x.jsx(vI,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),k2=({idle:e=P2,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=_w({onDrop:i});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border-2 border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:bg-card-background",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(C2,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},I2=["INPUT","SELECT"],Mw=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{I2.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},A2=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},O2=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:$e("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),Kr=w.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:f,error:h,...p},m)=>{const b=kt(),v=w.useRef(null),y=p.id??p.name;w.useImperativeHandle(m,()=>v.current),w.useEffect(()=>{if(v.current===null)return;const S=new AbortController,T=v.current,E=Ss(v.current);return T.addEventListener("change",()=>T.setAttribute("data-selected","true"),{once:!0,signal:S.signal}),()=>{E(),S.abort()}},[]);const g=()=>{var S;return(S=v.current)==null?void 0:S.focus()};return x.jsx(ii,{info:n,left:f,error:h,form:p.form,name:p.name,feedback:o,hideLeft:u,required:e,title:p.title,container:c,componentName:"select",rightLabel:a,interactive:i,id:p.name||p.id,optionalText:l,labelClassName:s,placeholder:p.placeholder,right:x.jsx("label",{htmlFor:y,children:x.jsxs("button",{onClick:g,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[x.jsx(uu,{size:20}),x.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})}),children:x.jsxs("select",{...p,id:y,name:y,value:p.value,required:e,ref:Ql(m,v),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:$e("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[x.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(S=>w.createElement("option",{...S,value:S.value,children:S.label??S.value,key:`${y}-select-option-${S.value}`}))]})})}),uf=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},_2=w.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=w.useId(),[i,a]=w.useState(r.checked??!1),l=i,c=w.useRef(null),u=uf(r.onChange);w.useImperativeHandle(o,()=>c.current),w.useEffect(()=>{if(c.current!==null&&u.current){const f=h=>{h.target.checked=!h.target.checked,u.current&&u.current(h)};return c.current.addEventListener("change",f),()=>{var h;return(h=c.current)==null?void 0:h.removeEventListener("change",f)}}},[]);const d=()=>{var h,p;const f=!((h=c.current)!=null&&h.checked);a(f),(p=r==null?void 0:r.onCheck)==null||p.call(r,f),c.current!==null&&(c.current.checked=f,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return x.jsxs("fieldset",{className:$e("flex flex-col flex-wrap justify-center",t),"data-component":"switch",children:[x.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[x.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:f=>a(f.target.checked),ref:c,type:"checkbox"}),x.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:x.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),x.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]}),x.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),D2=e=>{const[t,n]=Gk();return w.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:Xk(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),x.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},M2=q0("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
201
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),N2=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},F2={Item:w.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},L2=e=>{const t=w.useRef(null),n=N2(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(vi,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx($0,{height:n,useWindowScroll:!0,data:e.source,components:F2,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(Y0,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(mo,{children:x.jsx(du,{})})}),x.jsx("div",{})]})};var V2=Object.defineProperty,Nw=Object.getOwnPropertySymbols,$2=Object.prototype.hasOwnProperty,R2=Object.prototype.propertyIsEnumerable,Fw=(e,t,n)=>t in e?V2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B2=(e,t)=>{for(var n in t||(t={}))$2.call(t,n)&&Fw(e,n,t[n]);if(Nw)for(var n of Nw(t))R2.call(t,n)&&Fw(e,n,t[n]);return e},df=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},j2=(e,t,n,r)=>cl(df,e,t,n,r),os=e=>typeof e=="object",yr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!os(e)&&!os(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>yr(e[r],t[r]))},z2=(e,t)=>(os(e)||Array.isArray(e))&&t?e[t]:e,H2=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ll=e=>/[0-9.]+/.test(e),Lw=e=>["string","number"].includes(typeof e),Vw=e=>e==null||(e==null?void 0:e.length)===0||e==="",$w={eq:yr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:Vw,notEmpty:e=>!Vw(e),in:(e,t)=>df(t,n=>yr(e,n)),notIn:(e,t)=>Rw(t,n=>!yr(e,n))},W2=e=>{if(e in $w)return $w[e];throw new Error("Linq - Symbol not found")},ss=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},cl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=W2(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},U2=(e,t,n,r)=>cl(ss,e,t,n,r),Rw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},G2=(e,t,n,r)=>cl(Rw,e,t,n,r),Bw=e=>{if(e===null)return null;const t=B2({},e);return Object.keys(t).forEach(n=>t[n]=os(e[n])?Bw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},jw=(e,t)=>{if(os(t)){for(let n=0;n<e.length;n++){const r=e[n];if(yr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(yr(t,r))return!0}return!1},Y2=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},q2=e=>ss(e,(t,n,r)=>os(t)?n===r.findIndex(o=>yr(o,t)):n===r.indexOf(t)),K2=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},zw=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},Z2=(e,t)=>zw(e,n=>n[t]),Hw=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},X2=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Q2=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return ll(e)&&ll(t)?r.map(i=>Number.parseInt(i)):r},ff=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ll(e)&&ll(t)){const o=[],[s,i]=X2(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return Q2(e,t,r)},J2=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?ff(r,o,1):ff(r,s,Number.parseInt(o,10))}return Lw(e)&&Lw(t)?ff(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},hf=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},Ww=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},eV=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},tV=(e,t,n,r)=>cl(eV,e,t,n,r),Uw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(H2(t))},Gw=(e=>(e.Asc="asc",e.Desc="desc",e))(Gw||{}),nV=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),rV=(e,t)=>e.sort(nV(t)),oV=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ss(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},sV=class jf{constructor(t=[]){this.array=t}static Range(...t){return J2(...t)}static New(t){return new jf(t)}Where(t,n,r){return this.array=U2(this.array,t,n,r),this}Some(t,n,r){return j2(this.array,t,n,r)}All(t,n,r){return G2(this.array,t,n,r)}Reverse(){return this.array=Ww(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=tV(this.array,t,n,r),this}Distinct(){return this.array=q2(this.array),this}First(t){return t===void 0?this.array[0]:K2(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?hf((n,r)=>n+r,0,this.array):hf((n,r)=>n+z2(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return Z2(this.array,t)}GroupWith(t){return zw(this.array,t)}Except(t){return ss(this.array,n=>!jw(t,n))}Intersect(t){return ss(this.array,n=>jw(t,n))}OrderBy(t,n){let r;return r=t?Uw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Ww(r):r,this}Includes(t){return df(this.array,n=>yr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return hf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Hw(this.array,n=>[t,n]))}Zip(t,n){return Hw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ss(this.array,t).length}Get(t){return this.array[t]}Clone(){return new jf(Bw(this.array))}ToObject(t){return Y2(this.array,t)}Sort(t){return Array.isArray(t)?rV(this.array,t):Uw(this.array,t)}Unique(t){return oV(this.array,t)}},Yw=sV,is={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(b,v)=>{try{Object.keys(b).forEach(v)}catch(y){window.console.log(y)}},n=b=>b==null,r=b=>{const v=typeof b;return v==="string"||v==="number"||v==="boolean"||n(b)},o=(b,v)=>{const y=v.getItem(b);try{return JSON.parse(y)}catch{return y??null}},s=b=>Object.keys(b).reduce((v,y)=>({...v,[y]:o(y,b)}),{}),i=b=>b instanceof Date?b:typeof b=="number"?new Date(new Date*1+b*864e5):b,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(b=>b.split("=")).reduce((b,v)=>(b[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),b),{}),c=new Set,u=()=>{const b=l();c.forEach(v=>v(b))},d=[{name:"expires",parse:b=>`expires=${i(b.expires??a)}`},{name:"maxAge",parse:b=>b.maxAge?`max-age=${i(b.expires??a)}`:""},{name:"path",parse:b=>`path=${b.path??"/"}`},{name:"sameSite",parse:b=>`samesite=${b.sameSite??"strict"}`},{name:"useSecure",parse:b=>`${b.useSecure??!0?"secure":""}`},{name:"domain",parse:b=>{const v=b.domain??"";return v===""?"":`domain=${b.multiDomain?".":""}${v}`}},{name:"partitioned",parse:b=>b.partitioned?"Partitioned":""}],f={json:l,listener:b=>(c.add(b),()=>c.delete(b)),clearListeners:()=>c.clear(),has:b=>document.cookie.split(";").some(v=>v.trim().startsWith(`${b}=`)),deleteAll:()=>{document.cookie.split(";").forEach(b=>{document.cookie=b.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:b=>{const v=f.json()[b];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:b=>{document.cookie=`${encodeURIComponent(b)}=;expires=${new Date().toUTCString()}`,u()},set:(b,v,y={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=d.reduce((T,E)=>{const C=E.parse(y);return C===""?T:T.concat(C)},[`${encodeURIComponent(b)}=${g}`]).join(";");document.cookie=S,u()}},h=b=>{const v=new Set,y=g=>{b().removeItem(g);const S=s(b());v.forEach(T=>T(S))};return{delete:y,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(b()):b(),has:g=>{const S=b().getItem(g);return!n(S)},deleteAll:()=>{t(b(),y),v.forEach(g=>g(b()))},get:g=>o(g,b()),set:(g,S)=>{b().setItem(g,JSON.stringify(S)),v.forEach(T=>T(b()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(is);const pf=e=>e.headerLabel??e.thead??e.id,mf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var as=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(as||{});const gf=e=>e.type==="number"?e.valueAsNumber:e.value,iV=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},aV={},lV=(e,t)=>{if(!Array.isArray(t))return e;const n=new Map(e.map(r=>[r.id,r]));return t.map(r=>{const o=n.get(r.id);return{...r,...o}})},cV=(e,t,n=aV)=>{const r=Bi()?null:is.LocalStorage.get(`@components/table-${e}`)||null,[o,s]=ku({name:e,groups:n.groups||(r==null?void 0:r.groups)||[],sorters:n.sorters||(r==null?void 0:r.sorters)||[],filters:n.filters||(r==null?void 0:r.filters)||[],cols:lV(t,r==null?void 0:r.cols)},i=>{const a=l=>{const c=i.state(),u={...c,...l};return Bi()||is.LocalStorage.set(`@components/table-${c.name}`,u),u};return{set:l=>a(l)}});return{...o,...s,name:e}},yf=(e,t,n,r={})=>{var c,u;const o=e.id,s=e.type??as.Text,i=t[s]??[],a=((c=i.find(d=>d["data-default"]))==null?void 0:c.value)??((u=i[0])==null?void 0:u.value),l=n[a];return{id:Es(),operation:l,label:pf(e),name:o,type:s,value:"",...r}},vf=()=>{const e=kt(),t=w.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:w.useMemo(()=>({[as.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[as.Boolean]:[t.is,t.isNot],[as.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},uV=e=>{const t=kt(),n=vf(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,yf(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(p=>u===p.id);return yf(h,n.options,n.operations,{value:""})}))},s=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},i=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=gf(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return x.jsx(w.Fragment,{children:x.jsx(Xo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(hI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Kr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),x.jsx(Kr,{"data-id":l.id,onChange:s,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),x.jsx(vi,{"data-id":l.id,onChange:a,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:l.type,value:l.value,optionalText:""}),x.jsx("div",{className:"mt-5 flex items-center justify-center",children:x.jsx("button",{"data-id":l.id,type:"button",onClick:i,children:x.jsx(Ao,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[x.jsx(fu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},dV=({filter:e,onDelete:t,set:n})=>{const r=kt(),o=vf(),s=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},i=a=>{const l=a.target.dataset.id||"",c=gf(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(Kr,{"data-id":e.id,onChange:s,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),x.jsx(vi,{"data-id":e.id,onChange:i,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(Ao,{className:"text-danger",size:14})})]})},fV=({item:e,onPointerDown:t})=>{const n=Or(0);return x.jsxs(Jg,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(fI,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},hV=e=>{var l;const t=kt(),n=mf(e.cols),r=Kk(),[o,s]=w.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var b;const u=c.target,d=u.value,f=u.options.selectedIndex,h=((b=u.options.item(f))==null?void 0:b.label)||"";s(h);const p=new Yw(e.rows).GroupBy(d),m=e.cols.find(v=>v.id===d);e.setGroups(uT(p).map((v,y)=>{const g=p[v];return{...m,groupId:Es(),groupKey:d,index:y,rows:g,groupName:v}}))},a=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(Xo,{arrow:!1,title:t.tableGroupLabel,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(yI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(Kr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),x.jsx(mo,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:x.jsx(Ao,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(uS,{children:x.jsx(Xg,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>x.jsx(fV,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},pV=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),mV=(e,t)=>e.toSorted(pV(t)),qw=(e,t,n)=>({id:Es(),type:n,value:e.id,label:t}),gV=e=>{const t=kt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,qw(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return x.jsx(w.Fragment,{children:x.jsx(Xo,{title:t.tableSortDropdownTitle,trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(ty,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(Kr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),x.jsx(Kr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),x.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:x.jsx(Ao,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[x.jsx(fu,{size:14})," ",t.tableSortAddButton]})})]})})})},yV=e=>{const t=kt(),[n,r]=w.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");w.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=qw(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=pf(e.col);return x.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[x.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?x.jsx(aI,{size:14}):null,n==="desc"?x.jsx(iI,{size:14}):null,n==="undefined"?x.jsx(ty,{size:14}):null]})},vV=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(uV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(gV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(hV,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=gf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function bV(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const wV=e=>{const t=w.useId(),n=kt(),r=e.asLink||"button",o=w.useMemo(()=>bV(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[x.jsx("p",{children:x.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(w.Fragment,{children:[x.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),x.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>x.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:x.jsx(w.Fragment,{children:typeof i=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?x.jsx("li",{children:x.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},xV={top:0,left:0,right:0,bottom:-1},TV=e=>{var p;const t=kt(),n=e.filters.filter(m=>m.name===e.header.id),r=n.length>0,o=e.header.allowSort??!0,s=e.header.allowFilter??!0,i=vf(),a=r?pI:mI,l=m=>{const b=m.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(y=>y.id!==b))},c=w.useCallback(m=>{if(m===null)return;const b=new AbortController;return m.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:b.signal}),()=>b.abort()},[]),u=e.sorters.find(m=>e.header.id===m.value),d=u!=null&&u.type?u.type===Gw.Asc?"ascending":"descending":"none",f=pf(e.header),h=Or(void 0);return x.jsxs(Jg,{...e.header.thProps,as:"th",ref:c,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,style:{width:h},role:"columnheader","aria-sort":d,value:e.header,"aria-busy":e.loading,className:`relative hidden min-w-0 border border-b border-transparent border-b-table-border border-r-table-border font-medium first:table-cell last:border-r-transparent md:table-cell ${((p=e.header.thProps)==null?void 0:p.className)??""}`,children:[x.jsx("span",{className:"flex h-full items-center justify-between px-2 py-4",children:x.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?x.jsx(Xo,{arrow:!0,trigger:x.jsxs("span",{children:[x.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",f]}),x.jsx(a,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:x.jsxs("span",{className:"text-lg font-medium",children:[t.tableFilterDropdownTitleUnique," ",x.jsx("span",{className:"text-primary",children:f})]}),children:n.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[n.map(m=>x.jsx("li",{className:"my-1",children:x.jsx(dV,{onDelete:l,filter:m,set:e.setFilters})},`thead-filter-${m.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(m=>m.concat(yf(e.header,i.options,i.operations))),children:[x.jsx(fu,{size:14})," ",t.tableFilterNewFilter]})})]})}):null,x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&o?x.jsx(yV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),x.jsx(dt.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",dragConstraints:xV,whileDrag:{cursor:"grabbing"},className:"absolute right-0 top-0 block h-full w-1 cursor-col-resize hover:bg-primary active:bg-primary",onDrag:(m,b)=>{const v=m.target,y=h.get()||v.getBoundingClientRect().width,g=b.delta.x;return h.set(Math.abs(y+g))}})]})},SV=e=>x.jsx(Xg,{layout:!0,as:"tr",axis:"x",drag:"x",layoutRoot:!0,role:"row",layoutScroll:!0,values:e.headers,onReorder:e.setCols,className:"bg-table-header text-lg",children:x.jsx(Jn,{children:e.headers.map(t=>x.jsx(TV,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),Kw=w.createContext({}),EV=()=>w.useContext(Kw),CV=w.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:x.jsx(Jn,{children:n.children})})),PV=w.forwardRef(({context:e,className:t="",...n},r)=>x.jsx("table",{...n,ref:r,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${t??""}`})),kV=w.forwardRef(({context:e,...t},n)=>{const r=EV(),o={...t==null?void 0:t.style,top:Ct.number(r.sticky)?`${r.sticky}px`:void 0};return x.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),IV=w.forwardRef(({context:e,item:t,...n},r)=>x.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),AV=w.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{role:"row",className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:x.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),OV={TableHead:kV,Table:PV,TableBody:CV,TableRow:IV,TableFoot:AV},_V=[0,0,0,0,0,0,0,0,0,0],Zw=x.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}),DV=(e,t,n)=>x.jsx("td",{role:"cell",colSpan:n.cols.length,className:"hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell",children:n.loading?Zw:x.jsx(cv,{})}),MV=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=ec(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.className)||"";return w.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-l border-table-border px-2 first:table-cell first:border-transparent md:table-cell ${u}`},o?Zw:c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:Ct.nil(l)?"":l}))})})},NV=()=>x.jsx(w.Fragment,{}),FV=[{}],Xw=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,onScrollEnd:i,border:a=!1,pagination:l=null,useControl:c=!1,...u})=>{const d=w.useRef(null),[f,h]=w.useState(!1),p=uf(i),m=uf(u.loadingMore),b=w.useMemo(()=>{if(u.loading)return _V;if(c)return u.rows;const v=new Yw(u.rows);return t.length>0&&t.forEach(y=>y.value===""||Number.isNaN(y.value)?void 0:v.Where(y.name,y.operation.symbol,y.value)),r.length===0?v.Select():mV(v.Select(),r)},[u.rows,t,r,u.loading]);return w.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,y=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return y.observe(v),()=>y.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg ${a?"border border-table-border":""}`,children:[x.jsx(sL,{useWindowScroll:!0,followOutput:"smooth",components:OV,totalCount:b.length,data:b.length===0?FV:b,fixedFooterContent:f?NV:null,itemContent:b.length===0?DV:MV,context:{loading:u.loading,loadingMore:u.loadingMore,cols:e},fixedHeaderContent:()=>x.jsx(SV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:s,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),l!==null?x.jsx(wV,{...l}):null]})},LV=(e,t)=>typeof t=="function"?t(e):t,ul=(e,t,n)=>e===t||n==null?void 0:n(t),VV=e=>{const t=w.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=w.useMemo(()=>mf(e.cols),[e.cols]),[o,s]=ku({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:LV(u[l],c)}};return{cols:a("cols"),sorters:a("sorters"),groups:a("groups"),filters:a("filters")}},{postMiddleware:[(i,a)=>{var l;return(l=e.set)==null||l.call(e,i),ul((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),ul((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),ul((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),ul((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return x.jsx(Kw.Provider,{value:t,children:x.jsxs("div",{className:"relative min-w-full","data-component":"table",children:[n?x.jsx(vV,{cols:o.cols,rows:e.rows,options:r,groups:o.groups,filters:o.filters,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,o.groups.length===0?x.jsx(Xw,{...e,index:0,cols:o.cols,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):x.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>x.jsx("div",{className:"min-w-full",children:x.jsx(Xw,{...e,group:i,index:a,cols:o.cols,pagination:null,rows:i.rows,options:r,groups:o.groups,filters:o.filters,optionCols:r,setCols:s.cols,sorters:o.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${i.groupId}`))})]})})};var $V=String.prototype.replace,RV=/%20/g,bf={RFC1738:"RFC1738",RFC3986:"RFC3986"},wf={default:bf.RFC3986,formatters:{RFC1738:function(e){return $V.call(e,RV,"+")},RFC3986:function(e){return String(e)}},RFC1738:bf.RFC1738,RFC3986:bf.RFC3986},BV=wf,xf=Object.prototype.hasOwnProperty,Zr=Array.isArray,Mn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),jV=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Zr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Qw=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},zV=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Zr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!xf.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Zr(t)&&!Zr(n)&&(o=Qw(t,r)),Zr(t)&&Zr(n)?(n.forEach(function(s,i){if(xf.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return xf.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},HV=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},WV=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Tf=1024,UV=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=Tf){for(var c=i.length>=Tf?i.slice(l,l+Tf):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===BV.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Mn[f];continue}if(f<2048){u[u.length]=Mn[192|f>>6]+Mn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Mn[224|f>>12]+Mn[128|f>>6&63]+Mn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Mn[240|f>>18]+Mn[128|f>>12&63]+Mn[128|f>>6&63]+Mn[128|f&63]}a+=u.join("")}return a},GV=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return jV(n),t},YV=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},qV=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},KV=function(t,n){return[].concat(t,n)},ZV=function(t,n){if(Zr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Jw={arrayToObject:Qw,assign:HV,combine:KV,compact:GV,decode:WV,encode:UV,isBuffer:qV,isRegExp:YV,maybeMap:ZV,merge:zV},ex=sT,dl=Jw,xi=wf,XV=Object.prototype.hasOwnProperty,tx={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Nn=Array.isArray,QV=Array.prototype.push,nx=function(e,t){QV.apply(e,Nn(t)?t:[t])},JV=Date.prototype.toISOString,rx=xi.default,xt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:dl.encode,encodeValuesOnly:!1,format:rx,formatter:xi.formatters[rx],indices:!1,serializeDate:function(t){return JV.call(t)},skipNulls:!1,strictNullHandling:!1},e$=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Sf={},t$=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,b,v,y){for(var g=t,S=y,T=0,E=!1;(S=S.get(Sf))!==void 0&&!E;){var C=S.get(t);if(T+=1,typeof C<"u"){if(C===T)throw new RangeError("Cyclic object value");E=!0}typeof S.get(Sf)>"u"&&(T=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&Nn(g)&&(g=dl.maybeMap(g,function(D){return D instanceof Date?h(D):D})),g===null){if(i)return c&&!b?c(n,xt.encoder,v,"key",p):n;g=""}if(e$(g)||dl.isBuffer(g)){if(c){var I=b?n:c(n,xt.encoder,v,"key",p);return[m(I)+"="+m(c(g,xt.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var A=[];if(typeof g>"u")return A;var O;if(r==="comma"&&Nn(g))b&&c&&(g=dl.maybeMap(g,c)),O=[{value:g.length>0?g.join(",")||null:void 0}];else if(Nn(u))O=u;else{var M=Object.keys(g);O=d?M.sort(d):M}var _=l?n.replace(/\./g,"%2E"):n,F=o&&Nn(g)&&g.length===1?_+"[]":_;if(s&&Nn(g)&&g.length===0)return F+"[]";for(var P=0;P<O.length;++P){var N=O[P],L=typeof N=="object"&&typeof N.value<"u"?N.value:g[N];if(!(a&&L===null)){var V=f&&l?N.replace(/\./g,"%2E"):N,B=Nn(g)?typeof r=="function"?r(F,V):F:F+(f?"."+V:"["+V+"]");y.set(t,T);var W=ex();W.set(Sf,y),nx(A,e(L,B,r,o,s,i,a,l,r==="comma"&&b&&Nn(g)?null:c,u,d,f,h,p,m,b,v,W))}}return A},n$=function(t){if(!t)return xt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||xt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=xi.default;if(typeof t.format<"u"){if(!XV.call(xi.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=xi.formatters[r],s=xt.filter;(typeof t.filter=="function"||Nn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in tx?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=xt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:xt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:xt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:xt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:xt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?xt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:xt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:xt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:xt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:xt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:xt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:xt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:xt.strictNullHandling}},r$=function(e,t){var n=e,r=n$(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):Nn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=tx[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=ex(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||nx(i,t$(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},ls=Jw,Ef=Object.prototype.hasOwnProperty,o$=Array.isArray,gt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ls.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s$=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},ox=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},i$="utf8=%26%2310003%3B",a$="utf8=%E2%9C%93",l$=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===a$?c="utf-8":i[l]===i$&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,gt.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),gt.decoder,c,"key"),p=ls.maybeMap(ox(u.slice(f+1),n),function(b){return n.decoder(b,gt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=s$(p)),u.indexOf("[]=")>-1&&(p=o$(p)?[p]:p);var m=Ef.call(r,h);m&&n.duplicates==="combine"?r[h]=ls.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},c$=function(e,t,n,r){for(var o=r?t:ox(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},u$=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&Ef.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&Ef.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),c$(u,n,r,o)}},d$=function(t){if(!t)return gt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?gt.charset:t.charset,r=typeof t.duplicates>"u"?gt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:gt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:gt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:gt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:gt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:gt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:gt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:gt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:gt.decoder,delimiter:typeof t.delimiter=="string"||ls.isRegExp(t.delimiter)?t.delimiter:gt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:gt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:gt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:gt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:gt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gt.strictNullHandling}},f$=function(e,t){var n=d$(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?l$(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=u$(a,r[a],n,typeof e=="string");o=ls.merge(o,l,n)}return n.allowSparse===!0?o:ls.compact(o)},h$=r$,p$=f$,m$=wf,g$={formats:m$,parse:p$,stringify:h$},De;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(De||(De={}));var sx;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(sx||(sx={}));const se=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xr=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},Z=De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class sn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof sn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}sn.create=e=>new sn(e);const Ti=(e,t)=>{let n;switch(e.code){case Z.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,De.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${De.joinValues(e.keys,", ")}`;break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${De.joinValues(e.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${De.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:De.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:n="Number must be finite";break;default:n=t.defaultError,De.assertNever(e)}return{message:n}};let y$=Ti;function Cf(){return y$}const Pf=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function oe(e,t){const n=Cf(),r=Pf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ti?void 0:Ti].filter(o=>!!o)});e.common.issues.push(r)}class jt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return be;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return jt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return be;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const be=Object.freeze({status:"aborted"}),Si=e=>({status:"dirty",value:e}),Yt=e=>({status:"valid",value:e}),ix=e=>e.status==="aborted",ax=e=>e.status==="dirty",fl=e=>e.status==="valid",hl=e=>typeof Promise<"u"&&e instanceof Promise;function pl(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function lx(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var de;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(de||(de={}));var Ei,Ci;class Fn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const cx=(e,t)=>{if(fl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sn(e.common.issues);return this._error=n,this._error}}};function Te(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class ke{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Xr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jt,ctx:{common:t.parent.common,data:t.data,parsedType:Xr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(hl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return cx(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(hl(o)?o:Promise.resolve(o));return cx(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:Z.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Gn({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Yn.create(this,this._def)}nullable(){return eo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ln.create(this,this._def)}promise(){return Ii.create(this,this._def)}or(t){return yl.create([this,t],this._def)}and(t){return vl.create(this,t,this._def)}transform(t){return new Gn({...Te(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Sl({...Te(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new hx({typeName:ye.ZodBranded,type:this,...Te(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new El({...Te(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cl.create(this,t)}readonly(){return Pl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const v$=/^c[^\s-]{8,}$/i,b$=/^[0-9a-z]+$/,w$=/^[0-9A-HJKMNP-TV-Z]{26}$/,x$=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,T$=/^[a-z0-9_-]{21}$/i,S$=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,E$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,C$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let kf;const P$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,k$=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,I$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ux="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",A$=new RegExp(`^${ux}$`);function dx(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function O$(e){return new RegExp(`^${dx(e)}$`)}function _$(e){let t=`${ux}T${dx(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function D$(e,t){return!!((t==="v4"||!t)&&P$.test(e)||(t==="v6"||!t)&&k$.test(e))}class Hn extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.string,received:s.parsedType}),be}const r=new jt;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?oe(o,{code:Z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&oe(o,{code:Z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")E$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"email",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")kf||(kf=new RegExp(C$,"u")),kf.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"emoji",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")x$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"uuid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")T$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"nanoid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")v$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")b$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid2",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")w$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ulid",code:Z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),oe(o,{validation:"url",code:Z.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"regex",code:Z.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?_$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?A$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?O$(s).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?S$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"duration",code:Z.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?D$(t.data,s.version)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ip",code:Z.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?I$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"base64",code:Z.invalid_string,message:s.message}),r.dirty()):De.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:Z.invalid_string,...de.errToObj(r)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...de.errToObj(t)})}url(t){return this._addCheck({kind:"url",...de.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...de.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...de.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...de.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...de.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...de.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...de.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...de.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...de.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...de.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...de.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...de.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...de.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...de.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...de.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...de.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...de.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...de.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...de.errToObj(n)})}nonempty(t){return this.min(1,de.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:ye.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Te(e)})};function M$(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Qr extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.number,received:s.parsedType}),be}let r;const o=new jt;for(const s of this._def.checks)s.kind==="int"?De.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?M$(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_finite,message:s.message}),o.dirty()):De.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,o){return new Qr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(o)}]})}_addCheck(t){return new Qr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:de.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:de.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:de.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:de.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&De.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Qr.create=e=>new Qr({checks:[],typeName:ye.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Te(e)});class cs extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==se.bigint){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.bigint,received:s.parsedType}),be}let r;const o=new jt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:Z.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):De.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,de.toString(n))}gt(t,n){return this.setLimit("min",t,!1,de.toString(n))}lte(t,n){return this.setLimit("max",t,!0,de.toString(n))}lt(t,n){return this.setLimit("max",t,!1,de.toString(n))}setLimit(t,n,r,o){return new cs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:de.toString(o)}]})}_addCheck(t){return new cs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:de.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:de.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:de.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:de.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:de.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}cs.create=e=>{var t;return new cs({checks:[],typeName:ye.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Te(e)})};class If extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.boolean,received:r.parsedType}),be}return Yt(t.data)}}If.create=e=>new If({typeName:ye.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Te(e)});class Pi extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_type,expected:se.date,received:s.parsedType}),be}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return oe(s,{code:Z.invalid_date}),be}const r=new jt;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:Z.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):De.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Pi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:de.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:de.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Pi.create=e=>new Pi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ye.ZodDate,...Te(e)});class Af extends ke{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.symbol,received:r.parsedType}),be}return Yt(t.data)}}Af.create=e=>new Af({typeName:ye.ZodSymbol,...Te(e)});class ml extends ke{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.undefined,received:r.parsedType}),be}return Yt(t.data)}}ml.create=e=>new ml({typeName:ye.ZodUndefined,...Te(e)});class gl extends ke{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.null,received:r.parsedType}),be}return Yt(t.data)}}gl.create=e=>new gl({typeName:ye.ZodNull,...Te(e)});class Of extends ke{constructor(){super(...arguments),this._any=!0}_parse(t){return Yt(t.data)}}Of.create=e=>new Of({typeName:ye.ZodAny,...Te(e)});class us extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yt(t.data)}}us.create=e=>new us({typeName:ye.ZodUnknown,...Te(e)});class vr extends ke{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:Z.invalid_type,expected:se.never,received:n.parsedType}),be}}vr.create=e=>new vr({typeName:ye.ZodNever,...Te(e)});class _f extends ke{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.void,received:r.parsedType}),be}return Yt(t.data)}}_f.create=e=>new _f({typeName:ye.ZodVoid,...Te(e)});class Ln extends ke{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==se.array)return oe(n,{code:Z.invalid_type,expected:se.array,received:n.parsedType}),be;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(oe(n,{code:i?Z.too_big:Z.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(oe(n,{code:Z.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(oe(n,{code:Z.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Fn(n,i,n.path,a)))).then(i=>jt.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Fn(n,i,n.path,a)));return jt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ln({...this._def,minLength:{value:t,message:de.toString(n)}})}max(t,n){return new Ln({...this._def,maxLength:{value:t,message:de.toString(n)}})}length(t,n){return new Ln({...this._def,exactLength:{value:t,message:de.toString(n)}})}nonempty(t){return this.min(1,t)}}Ln.create=(e,t)=>new Ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...Te(t)});function ds(e){if(e instanceof ut){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Yn.create(ds(r))}return new ut({...e._def,shape:()=>t})}else return e instanceof Ln?new Ln({...e._def,type:ds(e.element)}):e instanceof Yn?Yn.create(ds(e.unwrap())):e instanceof eo?eo.create(ds(e.unwrap())):e instanceof Un?Un.create(e.items.map(t=>ds(t))):e}class ut extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=De.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==se.object){const c=this._getOrReturnCtx(t);return oe(c,{code:Z.invalid_type,expected:se.object,received:c.parsedType}),be}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof vr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Fn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof vr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(oe(o,{code:Z.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Fn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>jt.mergeObjectSync(r,c)):jt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return de.errToObj,new ut({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=de.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ut({...this._def,unknownKeys:"strip"})}passthrough(){return new ut({...this._def,unknownKeys:"passthrough"})}extend(t){return new ut({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ut({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ye.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ut({...this._def,catchall:t})}pick(t){const n={};return De.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ut({...this._def,shape:()=>n})}omit(t){const n={};return De.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ut({...this._def,shape:()=>n})}deepPartial(){return ds(this)}partial(t){const n={};return De.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ut({...this._def,shape:()=>n})}required(t){const n={};return De.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Yn;)s=s._def.innerType;n[r]=s}}),new ut({...this._def,shape:()=>n})}keyof(){return fx(De.objectKeys(this.shape))}}ut.create=(e,t)=>new ut({shape:()=>e,unknownKeys:"strip",catchall:vr.create(),typeName:ye.ZodObject,...Te(t)}),ut.strictCreate=(e,t)=>new ut({shape:()=>e,unknownKeys:"strict",catchall:vr.create(),typeName:ye.ZodObject,...Te(t)}),ut.lazycreate=(e,t)=>new ut({shape:e,unknownKeys:"strip",catchall:vr.create(),typeName:ye.ZodObject,...Te(t)});class yl extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new sn(a.ctx.common.issues));return oe(n,{code:Z.invalid_union,unionErrors:i}),be}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new sn(l));return oe(n,{code:Z.invalid_union,unionErrors:a}),be}}get options(){return this._def.options}}yl.create=(e,t)=>new yl({options:e,typeName:ye.ZodUnion,...Te(t)});const Wn=e=>e instanceof wl?Wn(e.schema):e instanceof Gn?Wn(e.innerType()):e instanceof xl?[e.value]:e instanceof Jr?e.options:e instanceof Tl?De.objectValues(e.enum):e instanceof Sl?Wn(e._def.innerType):e instanceof ml?[void 0]:e instanceof gl?[null]:e instanceof Yn?[void 0,...Wn(e.unwrap())]:e instanceof eo?[null,...Wn(e.unwrap())]:e instanceof hx||e instanceof Pl?Wn(e.unwrap()):e instanceof El?Wn(e._def.innerType):[];class Df extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return oe(n,{code:Z.invalid_type,expected:se.object,received:n.parsedType}),be;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Wn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Df({typeName:ye.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Te(r)})}}function Mf(e,t){const n=Xr(e),r=Xr(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const o=De.objectKeys(t),s=De.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Mf(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Mf(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class vl extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(ix(s)||ix(i))return be;const a=Mf(s.value,i.value);return a.valid?((ax(s)||ax(i))&&n.dirty(),{status:n.value,value:a.data}):(oe(r,{code:Z.invalid_intersection_types}),be)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}vl.create=(e,t,n)=>new vl({left:e,right:t,typeName:ye.ZodIntersection,...Te(n)});class Un extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return oe(r,{code:Z.invalid_type,expected:se.array,received:r.parsedType}),be;if(r.data.length<this._def.items.length)return oe(r,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Fn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>jt.mergeArray(n,i)):jt.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Un({...this._def,rest:t})}}Un.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Un({items:e,typeName:ye.ZodTuple,rest:null,...Te(t)})};class bl extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return oe(r,{code:Z.invalid_type,expected:se.object,received:r.parsedType}),be;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Fn(r,a,r.path,a)),value:i._parse(new Fn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?jt.mergeObjectAsync(n,o):jt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ke?new bl({keyType:t,valueType:n,typeName:ye.ZodRecord,...Te(r)}):new bl({keyType:Hn.create(),valueType:t,typeName:ye.ZodRecord,...Te(n)})}}class Nf extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return oe(r,{code:Z.invalid_type,expected:se.map,received:r.parsedType}),be;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Fn(r,a,r.path,[c,"key"])),value:s._parse(new Fn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Nf.create=(e,t,n)=>new Nf({valueType:t,keyType:e,typeName:ye.ZodMap,...Te(n)});class fs extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return oe(r,{code:Z.invalid_type,expected:se.set,received:r.parsedType}),be;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(oe(r,{code:Z.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(oe(r,{code:Z.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return be;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Fn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new fs({...this._def,minSize:{value:t,message:de.toString(n)}})}max(t,n){return new fs({...this._def,maxSize:{value:t,message:de.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}fs.create=(e,t)=>new fs({valueType:e,minSize:null,maxSize:null,typeName:ye.ZodSet,...Te(t)});class ki extends ke{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.function)return oe(n,{code:Z.invalid_type,expected:se.function,received:n.parsedType}),be;function r(a,l){return Pf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cf(),Ti].filter(c=>!!c),issueData:{code:Z.invalid_arguments,argumentsError:l}})}function o(a,l){return Pf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cf(),Ti].filter(c=>!!c),issueData:{code:Z.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ii){const a=this;return Yt(async function(...l){const c=new sn([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return Yt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new sn([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new sn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ki({...this._def,args:Un.create(t).rest(us.create())})}returns(t){return new ki({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ki({args:t||Un.create([]).rest(us.create()),returns:n||us.create(),typeName:ye.ZodFunction,...Te(r)})}}class wl extends ke{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}wl.create=(e,t)=>new wl({getter:e,typeName:ye.ZodLazy,...Te(t)});class xl extends ke{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:t.data}}get value(){return this._def.value}}xl.create=(e,t)=>new xl({value:e,typeName:ye.ZodLiteral,...Te(t)});function fx(e,t){return new Jr({values:e,typeName:ye.ZodEnum,...Te(t)})}class Jr extends ke{constructor(){super(...arguments),Ei.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:De.joinValues(r),received:n.parsedType,code:Z.invalid_type}),be}if(pl(this,Ei)||lx(this,Ei,new Set(this._def.values)),!pl(this,Ei).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:Z.invalid_enum_value,options:r}),be}return Yt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Jr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Jr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ei=new WeakMap,Jr.create=fx;class Tl extends ke{constructor(){super(...arguments),Ci.set(this,void 0)}_parse(t){const n=De.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const o=De.objectValues(n);return oe(r,{expected:De.joinValues(o),received:r.parsedType,code:Z.invalid_type}),be}if(pl(this,Ci)||lx(this,Ci,new Set(De.getValidEnumValues(this._def.values))),!pl(this,Ci).has(t.data)){const o=De.objectValues(n);return oe(r,{received:r.data,code:Z.invalid_enum_value,options:o}),be}return Yt(t.data)}get enum(){return this._def.values}}Ci=new WeakMap,Tl.create=(e,t)=>new Tl({values:e,typeName:ye.ZodNativeEnum,...Te(t)});class Ii extends ke{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return oe(n,{code:Z.invalid_type,expected:se.promise,received:n.parsedType}),be;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return Yt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ii.create=(e,t)=>new Ii({type:e,typeName:ye.ZodPromise,...Te(t)});class Gn extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{oe(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return be;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?be:l.status==="dirty"||n.value==="dirty"?Si(l.value):l});{if(n.value==="aborted")return be;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?be:a.status==="dirty"||n.value==="dirty"?Si(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?be:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?be:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!fl(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>fl(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);De.assertNever(o)}}Gn.create=(e,t,n)=>new Gn({schema:e,typeName:ye.ZodEffects,effect:t,...Te(n)}),Gn.createWithPreprocess=(e,t,n)=>new Gn({schema:t,effect:{type:"preprocess",transform:e},typeName:ye.ZodEffects,...Te(n)});class Yn extends ke{_parse(t){return this._getType(t)===se.undefined?Yt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yn.create=(e,t)=>new Yn({innerType:e,typeName:ye.ZodOptional,...Te(t)});class eo extends ke{_parse(t){return this._getType(t)===se.null?Yt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}eo.create=(e,t)=>new eo({innerType:e,typeName:ye.ZodNullable,...Te(t)});class Sl extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Sl.create=(e,t)=>new Sl({innerType:e,typeName:ye.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Te(t)});class El extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return hl(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}El.create=(e,t)=>new El({innerType:e,typeName:ye.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Te(t)});class Ff extends ke{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:Z.invalid_type,expected:se.nan,received:r.parsedType}),be}return{status:"valid",value:t.data}}}Ff.create=e=>new Ff({typeName:ye.ZodNaN,...Te(e)});class hx extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cl extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?be:s.status==="dirty"?(n.dirty(),Si(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?be:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Cl({in:t,out:n,typeName:ye.ZodPipeline})}}class Pl extends ke{_parse(t){const n=this._def.innerType._parse(t),r=o=>(fl(o)&&(o.value=Object.freeze(o.value)),o);return hl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Pl.create=(e,t)=>new Pl({innerType:e,typeName:ye.ZodReadonly,...Te(t)}),ut.lazycreate;var ye;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ye||(ye={})),Hn.create,Qr.create,Ff.create,cs.create,If.create,Pi.create,Af.create,ml.create,gl.create,Of.create,us.create,vr.create,_f.create,Ln.create,ut.create,ut.strictCreate,yl.create,Df.create,vl.create,Un.create,bl.create,Nf.create,fs.create,ki.create,wl.create,xl.create,Jr.create,Tl.create,Ii.create,Gn.create,Yn.create,eo.create,Gn.createWithPreprocess,Cl.create;const N$=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},F$=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const s=t[o];if(o===r)e[s]=n;else{if(!(s in e)||typeof e[s]!="object"){const i=t[o+1];e[s]=isNaN(Number(i))?{}:[]}e=e[s]}}},px=e=>e.replace(/\[(\d+)]/g,".$1").split("."),gn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):px(t),o=structuredClone(e);return F$(o,r,n),o},L$=(e,t)=>e.localeCompare(t),Ai={},mx=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return gx(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=mx(e._def.innerType);return t==="ZodArray"?n??[]:n}},gx=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,mx(n)])),yx=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],s=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof s=="object"&&s!==null&&!Array.isArray(s)?n[r]=yx(s,o):n[r]=o||s)}return n},V$={sort:L$,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},vx=e=>{const t=new FormData(e),n=new URLSearchParams(t);return g$.parse(n.toString(),V$)},to=(e,t)=>px(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),br=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Lf=e=>{const t=e.dataset.target;if(!t)return br(e);const n=document.querySelector(`[data-origin="${t}"]`);return br(n||e)},$$={state:{},loading:!1,useOnChange:!1},bx=e=>e.dataset.target||e.name,R$=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=is.LocalStorage.get(t);return N$(n)?n:{}},clear:()=>void is.LocalStorage.delete(t),set:n=>is.LocalStorage.set(t,n)}},B$=(e,t,n=$$)=>{const[r,o]=w.useState(null),s=w.useRef({}),[i,a]=w.useState(()=>Ct.function(n==null?void 0:n.state)?n.state():(n==null?void 0:n.state)??gx(e)??{}),l=w.useCallback(y=>{var A;const g=y.target,S=y.currentTarget;if(g.dataset.optional==="true")return;const E=bx(g),C=Lf(g)||(S?br(S):""),I=to(E,e);if(g.setAttribute("data-initialized","true"),I){const O=I.safeParse(C),M=O.success?void 0:((A=O.error.issues[0])==null?void 0:A.message)??"";o(_=>gn(_??{},E,M))}},[]),c=w.useCallback(y=>g=>{const S=g.currentTarget,T=Object.values(s.current).reduce((C,I)=>{var F;const A=I.element,O=I.schema.safeParse(br(A));if(A.dataset.ignore==="ignore"||O.success)return C;const M=(F=O.error.issues[0])==null?void 0:F.message;A.setAttribute("data-initialized","true");const _=A.dataset.name||A.name||"";return gn(C,_,M)},{}),E=Ct.empty(T)?null:T;o(E),console.error(E),y==null||y({form:S,errors:E||{}})},[]),u=(y,g=Ai)=>{const S=to(y,e),T=E=>{var I;if(!E)return;const C=E instanceof Date?E.toISOString():E.target.value;a(A=>gn(A,y,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)};return{...g,loading:n.loading,name:y,id:y,onChange:T,form:t,date:Ct.string(i[y])?new Date(i[y]):i[y],required:g.required??!S.isOptional(),error:r==null?void 0:r[y],ref:E=>{E!==null&&(s.current[y]={element:E,schema:S})}}},d=(y,g=Ai)=>{const S=to(y,e);return{...g,name:y,id:y,onChange:E=>{var I;const C=E.target.value;a(A=>gn(A,y,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:Tr(r,y,void 0),value:Tr(i,y,void 0)||"",required:g.required??!S.isOptional(),ref:E=>E!==null?s.current[y]={element:E,schema:S}:void 0}},f=(y,g=Ai)=>{const S=to(y,e);return{...g,name:y,id:y,onChange:E=>{var I;const C=E.target.checked;a(A=>gn(A??{},y,C)),(I=g==null?void 0:g.onChange)==null||I.call(g,E)},form:t,loading:n.loading,onInvalid:l,error:Tr(r,y,void 0),required:g.required??!S.isOptional(),ref:E=>E!==null?void(s.current[y]={element:E,schema:S}):void 0}},h=(y,g=Ai)=>{const S=to(y,e),T=E=>{var I,A;(I=E.persist)==null||I.call(E);const C=E.target.value;(A=g==null?void 0:g.onChange)==null||A.call(g,E),a(O=>gn(O,y,C))};return{...g,loading:n.loading,name:y,id:y,onChange:T,form:t,onInvalid:l,error:Tr(r,y,void 0),required:g.required??!S.isOptional(),value:Tr(i,y,void 0)||(g==null?void 0:g.value)||"",type:Ct.instance(S,Qr)?"number":(g==null?void 0:g.type)??"text",ref:E=>E===null?void 0:s.current[y]={element:E,schema:S}}},p=(y,g=Ai)=>{const S=to(y,e),T=S._def.typeName==="ZodNumber";return{...g,name:y,id:y,onChange:C=>{var A,O;(A=C.persist)==null||A.call(C);const I=T?C.target.valueAsNumber:C.target.value;(O=g==null?void 0:g.onChange)==null||O.call(g,C),a(M=>gn(M,y,I))},form:t,loading:n.loading,onInvalid:l,error:Tr(r,y,void 0),required:g.required??!S.isOptional(),type:T?"number":(g==null?void 0:g.type)??"text",value:Tr(i,y,void 0)||(g==null?void 0:g.value)||"",ref:C=>C===null?void 0:void(s.current[y]={element:C,schema:S})}};w.useEffect(()=>{const y=Object.values(s.current).map(S=>{const T=S.element.dataset.origin?document.querySelector(`[data-target="${S.element.name}"]`):S.element,E=S.schema.safeParse(br(T)),C=M=>{var L;const _=bx(M.target);if(!_)return!1;const F=M.target,P=Lf(M.target)||(M.relatedTarget?br(M.relatedTarget):""),N=S.schema.safeParse(P);if(F.setAttribute("value",P),N.success)return T.setCustomValidity(""),o(V=>{if(Ct.null(V))return null;const B=gn(V,_,void 0);return Ct.empty(V)||Ct.nil(V)||Ct.empty(B)?null:B}),!1;if(T.required){const V=((L=N.error.issues[0])==null?void 0:L.message)||"";T.setCustomValidity(V),o(B=>{if(Ct.null(B))return null;const W=gn(B,_,V||void 0);return Ct.empty(W)?null:W})}return!1},I=new AbortController,A=T.getAttribute("data-trigger")||"blur";T.addEventListener(A,C,{signal:I.signal});const O=T.dataset.shadow?!1:T.required?!E.success:!1;return{input:S,hasInitialError:O,unsubscribe:()=>I.abort()}});return y.some(S=>S.hasInitialError)&&o(S=>S===null?{}:S),()=>y.forEach(S=>S.unsubscribe())});const m=y=>g=>{var O;g.preventDefault();const S=g.currentTarget;let T=vx(S);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(S.elements)).forEach(M=>{if(M.tagName==="SELECT"){const _=M;T=gn(T,_.name,_.value)}if(M.tagName==="INPUT"){const _=M,F=Lf(_)||(_?br(_):"");T=gn(T,_.dataset.target||_.name,F)}});const C=yx(T,i),I=e.safeParse(C),A=()=>{var M;Mw(S),(M=n.interceptor)==null||M.clear()};if(I.success){const M=JSON.stringify(I.data);return S.setAttribute("data-json",M),(O=n.interceptor)==null||O.clear(),y==null?void 0:y(g,{form:S,event:g,reset:A,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),S.reportValidity(),y==null?void 0:y(g,{form:S,json:T,event:g,reset:A,data:T,success:!1,errors:I.error.issues.map(M=>({message:M.message,path:M.path.map(_=>String(_))}))})},b=y=>ec(i,y)||"",v=y=>({...y,id:t,name:t});return w.useEffect(()=>{var y;n.interceptor&&((y=n.interceptor)==null||y.set(i))},[i]),{get:b,input:p,state:i,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:v,datepicker:u,name:t,disabled:r!==null}},j$=e=>e?JSON.parse(e.getAttribute("data-json")):{},z$=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};Q.Alert=xI,Q.Autocomplete=IN,Q.Button=mo,Q.Calendar=av,Q.Card=lv,Q.Checkbox=Y0,Q.ColType=as,Q.Collapse=iy,Q.ComponentsProvider=c_,Q.DatePicker=mL,Q.Dropdown=Xo,Q.Empty=cv,Q.Expand=uN,Q.FileUpload=k2,Q.Form=A2,Q.Input=vi,Q.InputFeedback=Qb,Q.InputField=ii,Q.Menu=hN,Q.MenuItem=fN,Q.Modal=TN,Q.Notifications=pD,Q.Option=Jb,Q.Polymorph=po,Q.Radiobox=O2,Q.RenderOnView=qT,Q.Select=Kr,Q.Stats=mD,Q.Switch=_2,Q.Tab=vD,Q.Table=VV,Q.Tabs=gD,Q.Tag=XT,Q.TaskList=D2,Q.Textarea=M2,Q.Toolbar=SN,Q.Tooltip=Xb,Q.TransferList=L2,Q.VirtualAutocomplete=hL,Q.createColumns=iV,Q.createCssProperties=r_,Q.createDesignTokens=Xy,Q.createFormStorage=R$,Q.createOptionCols=mf,Q.createStyles=t_,Q.createTheme=n_,Q.createTokenStyles=o_,Q.css=$e,Q.defaultDarkTheme=a_,Q.defaultLightTheme=l_,Q.dispatchInput=Jl,Q.formReset=Mw,Q.formToJson=vx,Q.getJsonForm=j$,Q.getSchemaShape=to,Q.initializeInputDataset=Ss,Q.isReactComponent=HT,Q.isReactFC=WT,Q.isSsr=Bi,Q.mergeRefs=Ql,Q.parsers=va,Q.path=ec,Q.reduceTokens=Fo,Q.safeRegex=Cs,Q.splitInto=$h,Q.useColorParser=u_,Q.useForm=B$,Q.useLocale=tv,Q.useNotification=fD,Q.usePrevious=z$,Q.useReactive=Lv,Q.useTablePreferences=cV,Q.useTranslations=kt,Q.uuid=Es,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
205
202
  //# sourceMappingURL=index.umd.js.map