@alepha/devtools 0.19.2 → 0.19.3

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 (121) hide show
  1. package/assets/ui/200.html +10 -0
  2. package/assets/ui/200.html.br +1 -0
  3. package/assets/ui/404.html +10 -0
  4. package/assets/ui/404.html.br +1 -0
  5. package/assets/ui/CNAME +1 -0
  6. package/assets/ui/asset.CHpVij2M.css +1 -0
  7. package/assets/ui/asset.CHpVij2M.css.br +0 -0
  8. package/assets/ui/asset.Cxu56LSy.css +1 -0
  9. package/assets/ui/asset.Cxu56LSy.css.br +0 -0
  10. package/assets/ui/chunk.9plHAFDW.js +1 -0
  11. package/assets/ui/chunk.9plHAFDW.js.br +0 -0
  12. package/assets/ui/chunk.B82rsdDI.js +1 -0
  13. package/assets/ui/chunk.B82rsdDI.js.br +0 -0
  14. package/assets/ui/chunk.B9jGefQy.js +1 -0
  15. package/assets/ui/chunk.B9jGefQy.js.br +0 -0
  16. package/assets/ui/chunk.BHYZ9sAK.js +1 -0
  17. package/assets/ui/chunk.BHYZ9sAK.js.br +0 -0
  18. package/assets/ui/chunk.Bc7_n90V.js +1 -0
  19. package/assets/ui/chunk.Bc7_n90V.js.br +0 -0
  20. package/assets/ui/chunk.CCbhJSL_.js +1 -0
  21. package/assets/ui/chunk.CCbhJSL_.js.br +0 -0
  22. package/assets/ui/chunk.CJt_09bu.js +1 -0
  23. package/assets/ui/chunk.CJt_09bu.js.br +0 -0
  24. package/assets/ui/chunk.CK6Z-I-W.js +1 -0
  25. package/assets/ui/chunk.CK6Z-I-W.js.br +1 -0
  26. package/assets/ui/chunk.Cj1opA98.js +1 -0
  27. package/assets/ui/chunk.Cj1opA98.js.br +0 -0
  28. package/assets/ui/chunk.CvCu4yZb.js +2 -0
  29. package/assets/ui/chunk.CvCu4yZb.js.br +0 -0
  30. package/assets/ui/chunk.D93ZmnLR.js +1 -0
  31. package/assets/ui/chunk.D93ZmnLR.js.br +6 -0
  32. package/assets/ui/chunk.D9MCnLj_.js +7 -0
  33. package/assets/ui/chunk.D9MCnLj_.js.br +0 -0
  34. package/assets/ui/chunk.DOwjsMaD.js +1 -0
  35. package/assets/ui/chunk.DOwjsMaD.js.br +0 -0
  36. package/assets/ui/chunk.DYIu-C82.js +1 -0
  37. package/assets/ui/chunk.DYIu-C82.js.br +0 -0
  38. package/assets/ui/chunk.D_-fkSwu.js +1 -0
  39. package/assets/ui/chunk.D_-fkSwu.js.br +0 -0
  40. package/assets/ui/chunk.Dc4PCYcb.js +1 -0
  41. package/assets/ui/chunk.Dc4PCYcb.js.br +0 -0
  42. package/assets/ui/chunk.De1vj4hM.js +1 -0
  43. package/assets/ui/chunk.De1vj4hM.js.br +0 -0
  44. package/assets/ui/chunk.DuQak1OK.js +1 -0
  45. package/assets/ui/chunk.DuQak1OK.js.br +0 -0
  46. package/assets/ui/chunk.DxnuHDOY.js +1 -0
  47. package/assets/ui/chunk.DxnuHDOY.js.br +0 -0
  48. package/assets/ui/chunk.TIounDiA.js +1 -0
  49. package/assets/ui/chunk.TIounDiA.js.br +0 -0
  50. package/assets/ui/chunk.p3hCiSrt.js +80 -0
  51. package/assets/ui/chunk.p3hCiSrt.js.br +0 -0
  52. package/assets/ui/chunk.yh4jaMrg.js +1 -0
  53. package/assets/ui/chunk.yh4jaMrg.js.br +0 -0
  54. package/assets/ui/entry.DnXws2rz.js +2 -0
  55. package/assets/ui/entry.DnXws2rz.js.br +0 -0
  56. package/assets/ui/index.html +10 -0
  57. package/assets/ui/index.html.br +1 -0
  58. package/dist/public/200.html +10 -0
  59. package/dist/public/200.html.br +1 -0
  60. package/dist/public/404.html +10 -0
  61. package/dist/public/404.html.br +1 -0
  62. package/dist/public/CNAME +1 -0
  63. package/dist/public/asset.CHpVij2M.css +1 -0
  64. package/dist/public/asset.CHpVij2M.css.br +0 -0
  65. package/dist/public/asset.Cxu56LSy.css +1 -0
  66. package/dist/public/asset.Cxu56LSy.css.br +0 -0
  67. package/dist/public/chunk.9plHAFDW.js +1 -0
  68. package/dist/public/chunk.9plHAFDW.js.br +0 -0
  69. package/dist/public/chunk.B82rsdDI.js +1 -0
  70. package/dist/public/chunk.B82rsdDI.js.br +0 -0
  71. package/dist/public/chunk.B9jGefQy.js +1 -0
  72. package/dist/public/chunk.B9jGefQy.js.br +0 -0
  73. package/dist/public/chunk.BHYZ9sAK.js +1 -0
  74. package/dist/public/chunk.BHYZ9sAK.js.br +0 -0
  75. package/dist/public/chunk.Bc7_n90V.js +1 -0
  76. package/dist/public/chunk.Bc7_n90V.js.br +0 -0
  77. package/dist/public/chunk.CCbhJSL_.js +1 -0
  78. package/dist/public/chunk.CCbhJSL_.js.br +0 -0
  79. package/dist/public/chunk.CJt_09bu.js +1 -0
  80. package/dist/public/chunk.CJt_09bu.js.br +0 -0
  81. package/dist/public/chunk.CK6Z-I-W.js +1 -0
  82. package/dist/public/chunk.CK6Z-I-W.js.br +1 -0
  83. package/dist/public/chunk.Cj1opA98.js +1 -0
  84. package/dist/public/chunk.Cj1opA98.js.br +0 -0
  85. package/dist/public/chunk.CvCu4yZb.js +2 -0
  86. package/dist/public/chunk.CvCu4yZb.js.br +0 -0
  87. package/dist/public/chunk.D93ZmnLR.js +1 -0
  88. package/dist/public/chunk.D93ZmnLR.js.br +6 -0
  89. package/dist/public/chunk.D9MCnLj_.js +7 -0
  90. package/dist/public/chunk.D9MCnLj_.js.br +0 -0
  91. package/dist/public/chunk.DOwjsMaD.js +1 -0
  92. package/dist/public/chunk.DOwjsMaD.js.br +0 -0
  93. package/dist/public/chunk.DYIu-C82.js +1 -0
  94. package/dist/public/chunk.DYIu-C82.js.br +0 -0
  95. package/dist/public/chunk.D_-fkSwu.js +1 -0
  96. package/dist/public/chunk.D_-fkSwu.js.br +0 -0
  97. package/dist/public/chunk.Dc4PCYcb.js +1 -0
  98. package/dist/public/chunk.Dc4PCYcb.js.br +0 -0
  99. package/dist/public/chunk.De1vj4hM.js +1 -0
  100. package/dist/public/chunk.De1vj4hM.js.br +0 -0
  101. package/dist/public/chunk.DuQak1OK.js +1 -0
  102. package/dist/public/chunk.DuQak1OK.js.br +0 -0
  103. package/dist/public/chunk.DxnuHDOY.js +1 -0
  104. package/dist/public/chunk.DxnuHDOY.js.br +0 -0
  105. package/dist/public/chunk.TIounDiA.js +1 -0
  106. package/dist/public/chunk.TIounDiA.js.br +0 -0
  107. package/dist/public/chunk.p3hCiSrt.js +80 -0
  108. package/dist/public/chunk.p3hCiSrt.js.br +0 -0
  109. package/dist/public/chunk.yh4jaMrg.js +1 -0
  110. package/dist/public/chunk.yh4jaMrg.js.br +0 -0
  111. package/dist/public/entry.DnXws2rz.js +2 -0
  112. package/dist/public/entry.DnXws2rz.js.br +0 -0
  113. package/dist/public/index.html +10 -0
  114. package/dist/public/index.html.br +1 -0
  115. package/package.json +10 -10
  116. package/src/ui/components/dashboard/DevDashboard.tsx +1 -1
  117. package/dist/index.browser.js +0 -224
  118. package/dist/index.browser.js.map +0 -1
  119. package/dist/index.d.ts +0 -499
  120. package/dist/index.js +0 -839
  121. package/dist/index.js.map +0 -1
@@ -0,0 +1,80 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=Symbol.for(`Alepha.Kind`),d=Symbol.for(`Alepha.Module`),f=Symbol.for(`Alepha.Options`),p=class extends Error{name=`AlephaError`},m=class extends p{name=`CircularDependencyError`;constructor(e,t){super(`Instance not available. Looks like a circular dependency. ? -> ${t?.map(e=>`${e} -> `).join(``)}${e} -> ?`)}},h=class extends p{name=`ContainerLockedError`;constructor(e=`Container is locked. No more providers can be added.`){super(e)}},g=class extends p{name=`TooLateSubstitutionError`;constructor(e,t){super(`Service already substituted. Please, substitute Service '${e}' with Service '${t}' before using it.`)}},_=class extends p{name=`MissingContextError`;constructor(){super(`Missing context. Did you forget to call Alepha.create()?`),this.name=`MissingContextError`}},v={},y=()=>{if(!v.alepha)throw new _;return{alepha:v.alepha,service:v.service,module:v.service?.[d]}},b=class{alepha;options;config;constructor(e){this.alepha=e.alepha,this.options=e.options,this.config={propertyKey:``,service:e.service,module:e.module}}onInit(){}},x=(e,t)=>{let{alepha:n,service:r}=y();return d in e&&e[d]&&n.with(e[d]),n.inject(e,{lifetime:`transient`,args:[{options:t,alepha:n,service:r??Ok}]})};function S(e){if(typeof e!=`function`)return!1;let t=Object.getOwnPropertyDescriptor(e,`prototype`);return!!t&&!t.writable}var C=e=>{let{services:t=[],primitives:n=[],name:r}=e;if(!r||!w.NAME_REGEX.test(r))throw new p(`Invalid module name '${r}'. It should be in the format of 'project.module.submodule'`);let i=class extends w{options=e;register(n){if(e.atoms)for(let t of e.atoms)n.store.register(t);if(typeof e.register==`function`){e.register(n);return}for(let e of t)n.inject(e,{parent:this.constructor})}};Object.defineProperty(i,`name`,{value:r,writable:!1});for(let e of t)w.is(e)||(e[d]=i);for(let e of n)typeof e[u]==`function`&&(e[u][d]=i);return i},w=class e{static NAME_REGEX=/^[a-z-]+(\.[a-z-][a-z0-9-]*)*$/;static is(t){return t.prototype instanceof e}static of(e){return e[d]}},T=Symbol(`als.parent`),E=class e{static create=()=>{};als;constructor(){this.als=e.create()}createContextId(){return crypto.randomUUID()}run(e,t={}){if(!this.als)return e();let n=this.als.getStore()??void 0;return t.registry??=new Map,t.context??=this.createContextId(),this.als.run({...t,[T]:n},e)}exists(){return!!this.get(`context`)}get(e,t){if(!this.als)return;let n=this.als.getStore();if(!n||t===`app`)return;if(t===`current`)return e in n?n[e]:void 0;if(t===`parent`)return n[T]?.[e];if(e in n)return n[e];let r=n[T];for(;r;){if(e in r)return r[e];r=r[T]}}has(e){if(!this.als)return!1;let t=this.als.getStore();if(!t)return!1;if(e in t)return!0;let n=t[T];for(;n;){if(e in n)return!0;n=n[T]}return!1}set(e,t){if(!this.als)return;let n=this.als.getStore();n&&(n[e]=t)}},D=(e,t={})=>{let{alepha:n,service:r}=y();return e===n.constructor?n:n.inject(e,{parent:r??n.constructor,...t})},O=class{stringify=JSON.stringify;parse=JSON.parse},k=class{},A=class extends k{json=D(O);encoder=new TextEncoder;decoder=new TextDecoder;encodeToString(e,t){return this.json.stringify(t)}encodeToBinary(e,t){return this.encoder.encode(this.encodeToString(e,t))}decode(e,t){if(t instanceof Uint8Array){let e=this.decoder.decode(t);return this.json.parse(e)}if(typeof t==`string`){let e=t.trim();return e.startsWith(`{`)||e.startsWith(`[`)?this.json.parse(t):t}return t}},j=e=>x(M,e),M=class extends b{called=0;onInit(){let e=this.options.handler,t=e=>{if(e)return(Array.isArray(e)?e:[e]).map(e=>e.constructor)};this.alepha.events.on(this.options.on,{caller:this.config.service,priority:this.options.priority,before:t(this.options.before),after:t(this.options.after),callback:t=>(this.called+=1,e(t))})}};j[u]=M;var N={assign:0,create:0,clone:0,discard:0,update:0};function P(e,t){return N.assign+=1,{...e,...t}}function F(e,t,n){return e>=t&&e<=n}function ee(e){return F(e,127462,127487)}function I(e){return F(e,65024,65039)}function te(e){return F(e,768,879)||F(e,6832,6911)||F(e,7616,7679)||F(e,65056,65071)}function ne(e){return e>65535?2:1}function L(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(te(n)||I(n))t+=ne(n);else break}return t}function re(e,t){let n=e.codePointAt(t),r=t+ne(n);for(r=L(e,r);r<e.length-1&&e[r]===`‍`;){let t=e.codePointAt(r+1);r+=1+ne(t),r=L(e,r)}return ee(n)&&r<e.length&&ee(e.codePointAt(r))&&(r+=ne(e.codePointAt(r))),r}function ie(e){return F(e,55296,56319)||F(e,768,879)||e===8205}function ae(e){let t=0,n=0;for(;n<e.length;)n=re(e,n),t++;return t}function oe(e,t){if(t===0)return!0;let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>=t)return!0;return!1}function se(e,t){let n=0,r=0;for(;r<e.length;)if(r=re(e,r),n++,n>t)return!1;return!0}function ce(e,t){if(t===0)return!0;let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return oe(e,t);if(n++,n>=t)return!0}return!1}function le(e,t){let n=0;for(;n<e.length;){if(ie(e.charCodeAt(n)))return se(e,t);if(n++,n>t)return!1}return!0}var ue=s({Entries:()=>Fe,EntriesRegExp:()=>Pe,Every:()=>Me,EveryAll:()=>Ne,GraphemeCount:()=>ke,HasPropertyKey:()=>U,IsArray:()=>R,IsAsyncIterator:()=>de,IsBigInt:()=>z,IsBoolean:()=>fe,IsClassInstance:()=>De,IsConstructor:()=>pe,IsDeepEqual:()=>Ve,IsEqual:()=>H,IsFunction:()=>me,IsGreaterEqualThan:()=>Te,IsGreaterThan:()=>Se,IsInteger:()=>he,IsIterator:()=>ge,IsLessEqualThan:()=>we,IsLessThan:()=>Ce,IsMaxLength:()=>Ae,IsMinLength:()=>je,IsMultipleOf:()=>Ee,IsNull:()=>_e,IsNumber:()=>ve,IsObject:()=>be,IsObjectNotArray:()=>ye,IsString:()=>B,IsSymbol:()=>xe,IsUndefined:()=>V,IsValueLike:()=>Oe,Keys:()=>Ie,Symbols:()=>Le,Values:()=>Re});function R(e){return Array.isArray(e)}function de(e){return be(e)&&Symbol.asyncIterator in e}function z(e){return H(typeof e,`bigint`)}function fe(e){return H(typeof e,`boolean`)}function pe(e){if(V(e)||!me(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function me(e){return H(typeof e,`function`)}function he(e){return Number.isInteger(e)}function ge(e){return be(e)&&Symbol.iterator in e}function _e(e){return H(e,null)}function ve(e){return Number.isFinite(e)}function ye(e){return be(e)&&!R(e)}function be(e){return H(typeof e,`object`)&&!_e(e)}function B(e){return H(typeof e,`string`)}function xe(e){return H(typeof e,`symbol`)}function V(e){return H(e,void 0)}function H(e,t){return e===t}function Se(e,t){return e>t}function Ce(e,t){return e<t}function we(e,t){return e<=t}function Te(e,t){return e>=t}function Ee(e,t){if(z(e)||z(t))return BigInt(e)%BigInt(t)===0n;if(!ve(e)||he(e)&&1/t%1==0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t))<1e-10}function De(e){if(!be(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return _e(t)?!1:H(typeof t.constructor,`function`)&&!(H(t.constructor,globalThis.Object)||H(t.constructor.name,`Object`))}function Oe(e){return z(e)||fe(e)||_e(e)||ve(e)||B(e)||V(e)}function ke(e){return ae(e)}function Ae(e,t){return le(e,t)}function je(e,t){return ce(e,t)}function Me(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function Ne(e,t,n){let r=!0;for(let i=t;i<e.length;i++)n(e[i],i)||(r=!1);return r}function U(e,t){return H(t,`__proto__`)||H(t,`constructor`)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Pe(e){return Ie(e).map(t=>[RegExp(`^${t}$`),e[t]])}function Fe(e){return Object.entries(e)}function Ie(e){return Object.getOwnPropertyNames(e)}function Le(e){return Object.getOwnPropertySymbols(e)}function Re(e){return Object.values(e)}function ze(e,t){if(!be(t))return!1;let n=Ie(e);return H(n.length,Ie(t).length)&&n.every(n=>Ve(e[n],t[n]))}function Be(e,t){return R(t)&&H(e.length,t.length)&&e.every((n,r)=>Ve(e[r],t[r]))}function Ve(e,t){return R(e)?Be(e,t):be(e)?ze(e,t):H(e,t)}var He=/^[\p{ID_Start}_$][\p{ID_Continue}_$\u200C\u200D]*$/u;function Ue(e){return He.test(e)}function We(e,t){return`(${e} && ${t})`}function Ge(e,t){return`(${e} || ${t})`}function Ke(e){return`!(${e})`}function qe(e){return`Array.isArray(${e})`}function Je(e){return`Guard.IsAsyncIterator(${e})`}function Ye(e){return`typeof ${e} === "bigint"`}function Xe(e){return`typeof ${e} === "boolean"`}function Ze(e){return`Number.isInteger(${e})`}function Qe(e){return`Guard.IsIterator(${e})`}function $e(e){return`${e} === null`}function et(e){return`Number.isFinite(${e})`}function tt(e){return We(nt(e),Ke(qe(e)))}function nt(e){return`typeof ${e} === "object" && ${e} !== null`}function rt(e){return`typeof ${e} === "string"`}function it(e){return`typeof ${e} === "symbol"`}function at(e){return`${e} === undefined`}function ot(e){return`typeof ${e} === "function"`}function st(e){return`Guard.IsConstructor(${e})`}function ct(e,t){return`${e} === ${t}`}function lt(e,t){return`${e} > ${t}`}function ut(e,t){return`${e} < ${t}`}function dt(e,t){return`${e} <= ${t}`}function ft(e,t){return`${e} >= ${t}`}function pt(e,t){return`Guard.IsMinLength(${e}, ${t})`}function mt(e,t){return`Guard.IsMaxLength(${e}, ${t})`}function ht(e,t,n,r){return H(t,`0`)?`${e}.every((${n[0]}, ${n[1]}) => ${r})`:`((value, callback) => { for(let index = ${t}; index < value.length; index++) if (!callback(value[index], index)) return false; return true })(${e}, (${n[0]}, ${n[1]}) => ${r})`}function gt(e){return`Object.entries(${e})`}function _t(e){return`Object.getOwnPropertyNames(${e})`}function vt(e,t){return H(t,`"__proto__"`)||H(t,`"constructor"`)?`Object.prototype.hasOwnProperty.call(${e}, ${t})`:`${t} in ${e}`}function yt(e,t){return`Guard.IsDeepEqual(${e}, ${t})`}function bt(e){return`[${e.join(`, `)}]`}function xt(e,t){return`((${e.join(`, `)}) => ${t})`}function St(e,t){return`${e}(${t.join(`, `)})`}function Ct(e,t){return`new ${e}(${t.join(`, `)})`}function wt(e,t){return`${e}${Ue(t)?`.${t}`:`[${Tt(t)}]`}`}function Tt(e){return B(e)?JSON.stringify(e):`${e}`}function Et(e,t,n){return`(${e} ? ${t} : ${n})`}function Dt(e){return`{ ${e.join(`; `)}; }`}function Ot(e,t){return`const ${e} = ${t}`}function kt(e,t){return`if(${e}) { ${t} }`}function At(e){return`return ${e}`}function jt(e){return H(e.length,0)?`true`:e.reduce((e,t)=>We(e,t))}function Mt(e){return H(e.length,0)?`false`:e.reduce((e,t)=>Ge(e,t))}function Nt(e){return`++${e}`}function Pt(e,t){return`Guard.IsMultipleOf(${e}, ${t})`}function Ft(e){return e instanceof Boolean}function It(e){return e instanceof Number}function Lt(e){return e instanceof String}function Rt(e){return globalThis.ArrayBuffer.isView(e)}function zt(e){return e instanceof globalThis.RegExp}function Bt(e){return e instanceof globalThis.Date}function Vt(e){return e instanceof globalThis.Set}function Ht(e){return e instanceof globalThis.Map}function Ut(e){return be(e)&&U(e,`~guard`)}function Wt(e){return e}function Gt(e){return e.map(e=>Yt(e))}function Kt(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){let r=n[e];U(r,`value`)&&Object.defineProperty(t,e,{...r,value:Yt(r.value)})}return t}function qt(e){return new RegExp(e.source,e.flags)}function Jt(e){return e}function Yt(e){return e instanceof RegExp?qt(e):Ut(e)?Wt(e):R(e)?Gt(e):be(e)?Kt(e):Jt(e)}function Xt(e){return N.clone+=1,Yt(e)}var Zt={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1};function Qt(e){for(let t of Ie(e)){let n=e[t];n!==void 0&&Object.defineProperty(Zt,t,{value:n})}}function $t(){return Zt}function en(e,t,n={}){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function tn(e,t){return{...e,...t}}function nn(e,t,n={}){N.create+=1;let r=$t(),i=tn(t,n),a=r.enumerableKind?tn(i,e):en(i,e);return r.immutableTypes?Object.freeze(a):a}function rn(e,t){N.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(Xt(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function an(e,t,n){N.update+=1;let r=$t(),i=Xt(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function on(e,t){return be(e)&&U(e,`~kind`)&&H(e[`~kind`],t)}function sn(e){return be(e)}function cn(e){return nn({"~kind":`OptionalAddAction`},{type:e},{})}function ln(e){return be(e)&&U(e,`~kind`)&&U(e,`type`)&&H(e[`~kind`],`OptionalAddAction`)&&sn(e.type)}function un(e){return nn({"~kind":`OptionalRemoveAction`},{type:e},{})}function dn(e){return be(e)&&U(e,`~kind`)&&U(e,`type`)&&H(e[`~kind`],`OptionalRemoveAction`)&&sn(e.type)}function fn(e){return nn({"~kind":`ReadonlyAddAction`},{type:e},{})}function pn(e){return be(e)&&U(e,`~kind`)&&U(e,`type`)&&H(e[`~kind`],`ReadonlyAddAction`)&&sn(e.type)}function mn(e){return nn({"~kind":`ReadonlyRemoveAction`},{type:e},{})}function hn(e){return be(e)&&U(e,`~kind`)&&U(e,`type`)&&H(e[`~kind`],`ReadonlyRemoveAction`)&&sn(e.type)}function gn(e,t,n){return nn({"~kind":`Deferred`},{action:e,parameters:t,options:n},{})}function _n(e){return on(e,`Deferred`)}function vn(e){return an(e,{"~immutable":!0},{})}function yn(e){return vn(e)}function bn(e){return sn(e)&&U(e,`~immutable`)}function xn(e){return rn(e,[`~optional`])}function Sn(e){return an(e,{"~optional":!0},{})}function Cn(e){return Sn(e)}function wn(e){return sn(e)&&U(e,`~optional`)}function Tn(e){return rn(e,[`~readonly`])}function En(e){return an(e,{"~readonly":!0},{})}function Dn(e){return En(e)}function On(e){return sn(e)&&U(e,`~readonly`)}function kn(e,t){return nn({"~kind":`Array`},{type:`array`,items:e},t)}function An(e){return on(e,`Array`)}function jn(e){return rn(e,[`~kind`,`type`,`items`])}function Mn(e,t){return nn({"~kind":`AsyncIterator`},{type:`asyncIterator`,iteratorItems:e},t)}function Nn(e){return on(e,`AsyncIterator`)}function Pn(e){return rn(e,[`~kind`,`type`,`iteratorItems`])}function Fn(e){return{enumerable:$t().enumerableKind,writable:!1,configurable:!1,value:e}}var In=class{constructor(){globalThis.Object.defineProperty(this,`~kind`,Fn(`Base`)),globalThis.Object.defineProperty(this,`~guard`,Fn({check:e=>this.Check(e),errors:e=>this.Errors(e)}))}Check(e){return!0}Errors(e){return[]}Convert(e){return e}Clean(e){return e}Default(e){return e}Create(){throw Error(`Create not implemented`)}Clone(){throw Error(`Clone not implemented`)}};function Ln(e){return on(e,`Base`)}function Rn(e,t,n={}){return nn({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function zn(e){return on(e,`Constructor`)}function Bn(e){return rn(e,[`~kind`,`type`,`parameters`,`instanceType`])}function Vn(e,t,n={}){return nn({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function Hn(e){return on(e,`Function`)}function Un(e){return rn(e,[`~kind`,`type`,`parameters`,`returnType`])}function Wn(e,t){return nn({"~kind":`Ref`},{$ref:e},t)}function Gn(e){return on(e,`Ref`)}function Kn(e,t){return nn({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function qn(e){return on(e,`Generic`)}function Jn(e){return nn({"~kind":`Any`},{},e)}function Yn(e){return on(e,`Any`)}var Xn=`(?!)`;function Zn(e){return nn({"~kind":`Never`},{not:{}},e)}function Qn(e){return on(e,`Never`)}function $n(e){return Ie(e).filter(t=>!wn(e[t]))}function er(e){return Ie(e)}function tr(e){return Re(e)}function nr(e,t={}){let n=$n(e),r=n.length>0?{required:n}:{};return nn({"~kind":`Object`},{type:`object`,...r,properties:e},t)}function rr(e){return on(e,`Object`)}function ir(e){return rn(e,[`~kind`,`type`,`properties`,`required`])}function ar(e,t={}){return nn({"~kind":`Union`},{anyOf:e},t)}function or(e){return on(e,`Union`)}function sr(e){return rn(e,[`~kind`,`anyOf`])}function cr(e){return nn({"~kind":`Unknown`},{},e)}function lr(e){return on(e,`Unknown`)}function ur(e,t,n){let r=Ie(e).reduce((t,n)=>({...t,[n]:an(e[n],{},{$id:n})}),{});return nn({"~kind":`Cyclic`},{$defs:r,$ref:t},n)}function dr(e){return on(e,`Cyclic`)}function fr(e,t){return t[e.length]?.(...e)??(()=>{throw Error(`Invalid Arguments`)})()}function pr(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t,t],1:e=>[e,cr(),cr()]});return nn({"~kind":`Infer`},{type:`infer`,name:t,extends:n},{})}function mr(e){return on(e,`Infer`)}function hr(e){return ye(e)}function gr(e){return Ie(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function _r(e,t){let n=hr(e)?gr(e):e;return nn({"~kind":`Enum`},{enum:n},t)}function vr(e){return on(e,`Enum`)}function yr(e,t={}){return nn({"~kind":`Intersect`},{allOf:e},t)}function br(e){return on(e,`Intersect`)}function xr(e){return rn(e,[`~kind`,`allOf`])}function Sr(){throw Error(`Unreachable`)}var Cr=void 0;function wr(){try{return new globalThis.Function(`null`)(),!0}catch{return!1}}function Tr(){return V(Cr)&&(Cr=wr()),Cr&&$t().useAcceleration}var Er=s({Hash:()=>ti,HashCode:()=>ei});function Dr(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function Or(e){return typeof e==`number`}var kr;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(kr||={});var Ar=BigInt(`14695981039346656037`),[jr,Mr]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],Nr=Array.from({length:256}).map((e,t)=>BigInt(t)),Pr=new Float64Array(1),Fr=new DataView(Pr.buffer),Ir=new Uint8Array(Pr.buffer);function Lr(e){Ar^=Nr[e],Ar=Ar*jr%Mr}function Rr(e){Lr(kr.Array);for(let t of e)$r(t)}function zr(e){Lr(kr.BigInt),Fr.setBigInt64(0,e);for(let e of Ir)Lr(e)}function Br(e){Lr(kr.Boolean),Lr(e?1:0)}function Vr(e){Lr(kr.Constructor),$r(e.toString())}function Hr(e){Lr(kr.Date),$r(e.getTime())}function Ur(e){Lr(kr.Function),$r(e.toString())}function Wr(e){Lr(kr.Null)}function Gr(e){Lr(kr.Number),Fr.setFloat64(0,e,!0);for(let e of Ir)Lr(e)}function Kr(e){Lr(kr.Object);for(let t of Dr(e).sort())$r(t),$r(e[t])}function qr(e){Lr(kr.RegExp),Yr(e.toString())}var Jr=new TextEncoder;function Yr(e){Lr(kr.String);for(let t of Jr.encode(e))Lr(t)}function Xr(e){Lr(kr.Symbol),$r(e.toString())}function Zr(e){Lr(kr.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)Lr(t[e])}function Qr(e){return Lr(kr.Undefined)}function $r(e){return Rt(e)?Zr(e):Bt(e)?Hr(e):zt(e)?qr(e):Ft(e)?Br(e.valueOf()):Lt(e)?Yr(e.valueOf()):It(e)?Gr(e.valueOf()):Or(e)?Gr(e):R(e)?Rr(e):fe(e)?Br(e):z(e)?zr(e):pe(e)?Vr(e):_e(e)?Wr(e):be(e)?Kr(e):B(e)?Yr(e):xe(e)?Xr(e):V(e)?Qr(e):me(e)?Ur(e):Sr()}function ei(e){return Ar=BigInt(`14695981039346656037`),$r(e),Ar}function ti(e){return ei(e).toString(16).padStart(16,`0`)}function ni(e){switch(e.keyword){case`additionalProperties`:return`must not have additional properties`;case`anyOf`:return`must match a schema in anyOf`;case`boolean`:return`schema is false`;case`const`:return`must be equal to constant`;case`contains`:return`must contain at least 1 valid item`;case`dependencies`:return`must have properties ${e.params.dependencies.join(`, `)} when property ${e.params.property} is present`;case`dependentRequired`:return`must have properties ${e.params.dependencies.join(`, `)} when property ${e.params.property} is present`;case`enum`:return`must be equal to one of the allowed values`;case`exclusiveMaximum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`exclusiveMinimum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`format`:return`must match format "${e.params.format}"`;case`if`:return`must match "${e.params.failingKeyword}" schema`;case`maxItems`:return`must not have more than ${e.params.limit} items`;case`maxLength`:return`must not have more than ${e.params.limit} characters`;case`maxProperties`:return`must not have more than ${e.params.limit} properties`;case`maximum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`minItems`:return`must not have fewer than ${e.params.limit} items`;case`minLength`:return`must not have fewer than ${e.params.limit} characters`;case`minProperties`:return`must not have fewer than ${e.params.limit} properties`;case`minimum`:return`must be ${e.params.comparison} ${e.params.limit}`;case`multipleOf`:return`must be multiple of ${e.params.multipleOf}`;case`not`:return`must not be valid`;case`oneOf`:return`must match exactly one schema in oneOf`;case`pattern`:return`must match pattern "${e.params.pattern}"`;case`propertyNames`:return`property names ${e.params.propertyNames.join(`, `)} are invalid`;case`required`:return`must have required properties ${e.params.requiredProperties.join(`, `)}`;case`type`:return typeof e.params.type==`string`?`must be ${e.params.type}`:`must be either ${e.params.type.join(` or `)}`;case`unevaluatedItems`:return`must not have unevaluated items`;case`unevaluatedProperties`:return`must not have unevaluated properties`;case`uniqueItems`:return`must not have duplicate items`;case`~guard`:return`must match check function`;case`~refine`:return e.params.message;default:return`an unknown validation error occurred`}}var ri=ni;function ii(){return ri}var ai=class{constructor(e,t){this.type=e,this.decode=t}Encode(e){let t=this.type,n={decode:ui(t)?e=>this.decode(t[`~codec`].decode(e)):this.decode,encode:ui(t)?n=>t[`~codec`].encode(e(n)):e};return an(this.type,{"~codec":n},{})}},oi=class{constructor(e){this.type=e}Decode(e){return new ai(this.type,e)}};function si(e){return new oi(e)}function ci(e,t){return si(e).Decode(t).Encode(()=>{throw Error(`Encode not implemented`)})}function li(e,t){return si(e).Decode(()=>{throw Error(`Decode not implemented`)}).Encode(t)}function ui(e){return sn(e)&&U(e,`~codec`)&&be(e[`~codec`])&&U(e[`~codec`],`encode`)&&U(e[`~codec`],`decode`)}function di(e,t){let n=pi(e)?[...e[`~refine`],t]:[t];return an(e,{"~refine":n},{})}function fi(e,t,n=`error`){return di(e,{refine:t,message:n})}function pi(e){return sn(e)&&U(e,`~refine`)}var mi=`-?(?:0|[1-9][0-9]*)n`;function hi(e){return nn({"~kind":`BigInt`},{type:`bigint`},e)}function gi(e){return on(e,`BigInt`)}function _i(e){return nn({"~kind":`Boolean`},{type:`boolean`},e)}function vi(e){return on(e,`Boolean`)}function yi(e){return nn({"~kind":`Identifier`},{name:e})}function bi(e){return on(e,`Identifier`)}var xi=`-?(?:0|[1-9][0-9]*)`;function Si(e){return nn({"~kind":`Integer`},{type:`integer`},e)}function Ci(e){return on(e,`Integer`)}function wi(e,t){return nn({"~kind":`Iterator`},{type:`iterator`,iteratorItems:e},t)}function Ti(e){return on(e,`Iterator`)}function Ei(e){return rn(e,[`~kind`,`type`,`iteratorItems`])}var Di=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,`cause`,{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function Oi(e){return z(e)?`bigint`:fe(e)?`boolean`:ve(e)?`number`:B(e)?`string`:(()=>{throw new Di(e)})()}function ki(e,t){return nn({"~kind":`Literal`},{type:Oi(e),const:e},t)}function Ai(e){return z(e)||fe(e)||ve(e)||B(e)}function ji(e){return Fi(e)&&z(e.const)}function Mi(e){return Fi(e)&&fe(e.const)}function Ni(e){return Fi(e)&&ve(e.const)}function Pi(e){return Fi(e)&&B(e.const)}function Fi(e){return on(e,`Literal`)}function Ii(e){return nn({"~kind":`Null`},{type:`null`},e)}function Li(e){return on(e,`Null`)}var Ri=`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`;function zi(e){return nn({"~kind":`Number`},{type:`number`},e)}function Bi(e){return on(e,`Number`)}function Vi(e){return nn({"~kind":`Symbol`},{type:`symbol`},e)}function Hi(e){return on(e,`Symbol`)}function Ui(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,t],1:e=>[e,cr(),cr()]});return nn({"~kind":`Parameter`},{name:t,extends:n,equals:r},{})}function Wi(e){return on(e,`Parameter`)}function Gi(e,t){return nn({"~kind":`Promise`},{type:`promise`,item:e},t)}function Ki(e){return on(e,`Promise`)}function qi(e){return rn(e,[`~kind`,`type`,`item`])}function Ji(e){return nn({"~kind":`String`},{type:`string`},e)}function Yi(e){return on(e,`String`)}function Xi(e){let t=gd(e);return H(t.length,2)?t[0]:[]}function Zi(e){return!0}function Qi(e){let[t,...n]=e;return sn(t)?ea(t)?Qi(n):!1:!0}function $i(e){return H(e.length,0)?!1:Qi(e)}function ea(e){return or(e)?$i(e.anyOf):Fi(e)?Zi(e.const):!1}function ta(e){return $i(e)}function na(e){return nn({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function ra(e,t,n=[]){let[r,...i]=e;return B(r)?ra(i,t,[...n,`${r}${t}`]):n}function ia(e,t){return H(e.length,0)?[`${t}`]:ra(e,t)}function aa(e,t,n=[]){let[r,...i]=t;return sn(r)?aa(e,i,[...n,...oa(e,r)]):n}function oa(e,t){return or(t)?aa(e,t.anyOf):Fi(t)?ia(e,t.const):Sr()}function sa(e,t){let[n,...r]=t;return sn(n)?sa(oa(e,n),r):e}function ca(e){return e.map(e=>ki(e))}function la(e){return ar(ca(sa([],e)))}function ua(e){return H(e.length,0)?Sr():H(e.length,1)&&Fi(e[0])?e[0]:la(e)}function da(e){let t=Xi(e);return H(t.length,0)?Ji():ta(t)?ua(t):na(e)}function fa(e){let t=da(e);return Id(t)?Ji():t}function pa(e,t){let n={[e]:t};return nn({"~kind":`Record`},{type:`object`,patternProperties:n})}var ma=`^${xi}$`,ha=`^${Ri}$`,ga=`^.*$`;function _a(e,t,n={}){return gn(`Record`,[e,t],n)}function va(e,t,n={}){return gy({},_a(e,t,n))}function ya(e,t,n={}){return va(e,t,n)}function ba(e,t){return pa(e,t)}function xa(e){return Ie(e.patternProperties)[0]}function Sa(e){let t=xa(e);return H(t,ga)?Ji():H(t,ma)?Si():H(t,ha)?zi():da(t)}function Ca(e){return e.patternProperties[xa(e)]}function wa(e){return on(e,`Record`)}function Ta(e){return nn({"~kind":`Rest`},{type:`rest`,items:e},{})}function Ea(e){return on(e,`Rest`)}function Da(e){return nn({"~kind":`This`},{$ref:`#`},e)}function Oa(e){return on(e,`This`)}function ka(e,t={}){let[n,r,i]=[e,e.length,!1];return nn({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function Aa(e){return on(e,`Tuple`)}function ja(e){return rn(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function Ma(e){return nn({"~kind":`Undefined`},{type:`undefined`},e)}function Na(e){return on(e,`Undefined`)}function Pa(e){return nn({"~kind":`Unsafe`},{},e)}function Fa(e){return on(e,`Unsafe`)}function Ia(e){return nn({"~kind":`Void`},{type:`void`},e)}function La(e){return on(e,`Void`)}function Ra(e,t){return H(e,`Array`)?kn(t[0]):H(e,`AsyncIterator`)?Mn(t[0]):H(e,`Iterator`)?wi(t[0]):H(e,`Promise`)?Gi(t[0]):H(e,`Awaited`)?_y(t[0]):H(e,`Capitalize`)?nh(t[0]):H(e,`ConstructorParameters`)?Eh(t[0]):H(e,`Evaluate`)?yy(t[0]):H(e,`Exclude`)?jh(t[0],t[1]):H(e,`Extract`)?Rh(t[0],t[1]):H(e,`Index`)?_g(t[0],t[1]):H(e,`InstanceType`)?Ng(t[0]):H(e,`Lowercase`)?ih(t[0]):H(e,`NonNullable`)?h_(t[0]):H(e,`Omit`)?x_(t[0],t[1]):H(e,`Options`)?D_(t[0],t[1]):H(e,`Parameters`)?j_(t[0]):H(e,`Partial`)?I_(t[0]):H(e,`Pick`)?G_(t[0],t[1]):H(e,`Readonly`)?Z_(t[0]):H(e,`KeyOf`)?Bg(t[0]):H(e,`Record`)?_a(t[0],t[1]):H(e,`Required`)?jv(t[0]):H(e,`ReturnType`)?Fv(t[0]):H(e,`Uncapitalize`)?oh(t[0]):H(e,`Uppercase`)?ch(t[0]):Gm(Wn(e),t)}function za(){throw Error(`Unreachable`)}var Ba=(e,t=[])=>e.reduce((e,t)=>R(t)&&H(t.length,2)?[...e,t[0]]:[...e,t],[]),Va=e=>{let[t,n]=e;return Ba([...t,...n])};function Ha(e){return Ui(e[0],e[2],e[4])}function Ua(e){return Ui(e[0],e[2],e[2])}function Wa(e){return Ui(e[0],cr(),e[2])}function Ga(e){return Ui(e,cr(),cr())}function Ka(e){return e}function qa(e){return Va(e)}function Ja(e){return e[1]}function Ya(e){return Va(e)}function Xa(e){return e[1]}function Za(e){return Ra(e[0],e[1])}function Qa(e){return null}function $a(e){return Ji()}function eo(e){return zi()}function to(e){return _i()}function no(e){return Ma()}function ro(e){return Ii()}function io(e){return Si()}function ao(e){return hi()}function oo(e){return cr()}function so(e){return Jn()}function co(e){return nr({})}function lo(e){return Zn()}function uo(e){return Vi()}function fo(e){return Ia()}function po(e){return Da()}function mo(e){return e}function ho(e){return e[1]}function go(e){return ki(e)}function _o(e){return H(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function vo(e){return e[1]}function yo(e){return Md(e)}function bo(e){return ki(BigInt(e))}function xo(e){return ki(H(e,`true`))}function So(e){return ki(parseFloat(e))}function Co(e){return ki(e)}function wo(e){return e}function To(e){return e.length>0}function Eo(e){return e.reduce((e,t)=>H(t.length,3)?[...e,[t[1]]]:[...e,[]],[])}function Do(e){return H(e.length,6)?[e[1],e[3],e[5]]:[]}function Oo(e){return R(e)&&H(e.length,3)?e[1]:e}var ko=(e,t)=>t.reduce((e,t)=>{let n=t;return H(n.length,1)?_g(e,n[0]):H(n.length,0)?kn(e):za()},e),Ao=(e,t)=>H(t.length,3)?Sh(e,t[0],t[1],t[2]):e;function jo(e){let[t,n,r,i]=e;return Ao(t?Bg(ko(n,r)):ko(n,r),i)}function Mo(e,t){return H(t.length,3)?(()=>{let[n,r,i]=t,a=Mo(r,i);if(H(n,`&`))return br(a)?yr([e,...a.allOf]):yr([e,a]);if(H(n,`|`))return or(a)?ar([e,...a.anyOf]):ar([e,a]);za()})():e}function No(e){return e}function Po(e){let[t,n]=e;return Mo(t,n)}function Fo(e){return e}function Io(e){let[t,n]=e;return Mo(t,n)}function Lo(e){return vn(e[1])}function Ro(e){return e[1]}function zo(e){return Kn(e[0],e[2])}function Bo(e){return H(e.length,4)?pr(e[1],e[3]):H(e.length,2)?pr(e[1],cr()):za()}function Vo(e){return e}function Ho(e){return`${e}`}function Uo(e){return e}function Wo(e){return e}function Go(e){return Ci(e[3])?ma:Bi(e[3])?ha:Hi(e[3])||Yi(e[3])?ga:za()}function Ko(e){return e}function qo(e){return e.length>0}function Jo(e){return e.length>0}function Yo(e){let[t,n,r,i,a]=e;return{[n]:t&&r?En(Sn(a)):t&&!r?En(a):!t&&r?Sn(a):a}}function Xo(e){return e}function Zo(e){return Va(e)}function Qo(e){return e.reduce((e,t)=>U(t,ma)||U(t,ha)||U(t,ga)?[e[0],P(e[1],t)]:[P(e[0],t),e[1]],[{},{}])}function $o(e){return Qo(e[1])}function es(e){let[t,n]=e;return nr(t,H(Ie(n).length,0)?{}:{patternProperties:n})}function ts(e){return H(e.length,5)?En(Sn(e[4])):H(e.length,3)?e[2]:H(e.length,4)?H(e[2],`readonly`)?En(e[3]):Sn(e[3]):za()}function ns(e){return En(Sn(e[1]))}function rs(e){return En(e[1])}function is(e){return Sn(e[0])}function as(e){return e}function os(e){return H(e.length,2)?Ta(e[1]):H(e.length,1)?e[0]:za()}function ss(e){return Va(e)}function cs(e){return ka(e[1])}function ls(e){return En(Sn(e[4]))}function us(e){return En(e[3])}function ds(e){return Sn(e[3])}function fs(e){return e[2]}function ps(e){return e}function ms(e){return H(e.length,2)?Ta(e[1]):H(e.length,1)?e[0]:za()}function hs(e){return Va(e)}function gs(e){return Vn(e[1],e[4])}function _s(e){return Rn(e[2],e[5])}function vs(e,t){return H(e,`remove`)?mn(t):H(e,`add`)?fn(t):t}function ys(e){return H(e.length,2)&&H(e[0],`-`)?`remove`:H(e.length,2)&&H(e[0],`+`)||H(e.length,1)?`add`:`none`}function bs(e,t){return H(e,`remove`)?un(t):H(e,`add`)?cn(t):t}function xs(e){return H(e.length,2)&&H(e[0],`-`)?`remove`:H(e.length,2)&&H(e[0],`+`)||H(e.length,1)?`add`:`none`}function Ss(e){return H(e.length,2)?[e[1]]:[]}function Cs(e){return R(e[6])&&H(e[6].length,1)?Qg(yi(e[3]),e[5],e[6][0],vs(e[1],bs(e[8],e[10]))):Qg(yi(e[3]),e[5],Wn(e[3]),vs(e[1],bs(e[8],e[10])))}function ws(e){return Wn(e)}function Ts(e){return D_(e[2],e[4])}function Es(e){return parseFloat(e)}function Ds(e){return H(e,`true`)}function Os(e){return e}function ks(e){return null}function As(e){return{[e[0]]:e[2]}}function js(e){return Va(e)}function Ms(e){return e.reduce((e,t)=>P(e,t),{})}function Ns(e){return Ms(e[1])}function Ps(e){return Va(e)}function Fs(e){return e[1]}function Is(e){return e}function Ls(e){return hi()}function Rs(e){return Ji()}function zs(e){return zi()}function Bs(e){return Si()}function Vs(e){return Zn()}function Hs(e){return ki(e)}function Us(e){return e}function Ws(e){return ar(e[1])}function Gs(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Ks(e){return[e[0],...e[1]]}function qs(e){return e}function Js(e){return e[1]}function Ys(e){return Va(e)}function Xs(e){return H(e.length,2)?e[1]:[]}function Zs(e){let t=e[2],n=e[3],[r,i]=e[4],a=H(Ie(i).length,0)?{}:{patternProperties:i};return{[e[1]]:Kn(t,fp(n,r,a))}}function Qs(e){let t=e[2],[n,r]=e[3],i=H(Ie(r).length,0)?{}:{patternProperties:r};return{[e[1]]:fp(t,n,i)}}function $s(e){return{[e[1]]:Kn(e[2],e[4])}}function ec(e){return{[e[1]]:e[3]}}function tc(e){return null}function nc(e){return e}function rc(e){return Qo(Va(e))}function ic(e){return e[1]}function ac(e){let t=e[0],n=e[1];return xy(P(t,n[0]))}function oc(e){return e}function sc(e){return H(e.length,2)}function cc(e,t,n){return sc(e)?t(e[0],e[1]):n()}function lc(e,t){return H(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function uc(e,t){for(let n=0;n<e.length;n++){let r=lc(e[n],t);if(sc(r))return r}return[]}function dc(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var fc=[...dc(97,122),...dc(65,90)],pc=dc(49,57),mc=[`0`,...pc],hc=`//`,gc=`/*`,_c=`*/`;function vc(e){let t=e.indexOf(_c);return H(t,-1)?``:e.slice(t+2)}function yc(e){let t=e.indexOf(`
2
+ `);return H(t,-1)?``:e.slice(t)}function bc(e){return e.replace(/^[ \t\r\f\v]+/,``)}function xc(e){let t=bc(e);return t.startsWith(gc)?xc(vc(t.slice(2))):t.startsWith(hc)?xc(yc(t.slice(2))):t}function Sc(e){let t=e.trimStart();return t.startsWith(gc)?Sc(vc(t.slice(2))):t.startsWith(hc)?Sc(yc(t.slice(2))):t}function Cc(e,t){return cc(uc([e],t),(e,t)=>[e,t],()=>[``,t])}function wc(e,t){return e.includes(t)}function Tc(e,t,n,r=``){return cc(uc(e,n),(n,i)=>wc(t,n)?Tc(e,t,i,r):Tc(e,t,i,`${r}${n}`),()=>[r,n])}function Ec(e){return uc(pc,e)}var Dc=[...mc,`_`];function Oc(e){return Tc(Dc,[`_`],e)}function kc(e){return cc(uc([`0`],e),(e,t)=>[e,t],()=>cc(Ec(e),(e,t)=>cc(Oc(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[]))}function Ac(e){return kc(Sc(e))}function jc(e){return Cc(`-`,e)}function Mc(e){return cc(jc(e),(e,t)=>cc(Ac(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Nc(e){return Mc(Sc(e))}function Pc(e){return cc(Nc(e),(e,t)=>cc(uc([`n`],t),(t,n)=>[`${e}`,n],()=>[]),()=>[])}function Fc(e){return Pc(e)}function Ic(e,t){return uc([e],t)}function W(e,t){return H(e,``)?[``,t]:e.startsWith(`
3
+ `)?Ic(e,xc(t)):e.startsWith(` `)?Ic(e,t):Ic(e,Sc(t))}var Lc=[...fc,`_`,`$`];function Rc(e){return uc(Lc,e)}var zc=[...Lc,...mc];function Bc(e,t=``){return cc(uc(zc,e),(e,n)=>Bc(n,`${t}${e}`),()=>[t,e])}function Vc(e){return cc(Rc(e),(e,t)=>cc(Bc(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Hc(e){return Vc(Sc(e))}var Uc=[...mc,`_`];function Wc(e){return sc(uc([`.`],e))}function Gc(e){return cc(Tc(Uc,[`_`],e),(e,t)=>H(e,``)?[]:[e,t],()=>[])}function Kc(e){return cc(uc([`.`],e),(e,t)=>cc(Gc(t),(t,n)=>[`0${e}${t}`,n],()=>[]),()=>[])}function qc(e){return cc(Ac(e),(e,t)=>cc(uc([`.`],t),(t,n)=>cc(Gc(n),(n,r)=>[`${e}${t}${n}`,r],()=>[`${e}`,n]),()=>[`${e}`,t]),()=>[])}function Jc(e){return Wc(e)?Kc(e):qc(e)}function Yc(e){return Jc(Sc(e))}function Xc(e){return Cc(`-`,e)}function Zc(e){return cc(Xc(e),(e,t)=>cc(Yc(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Qc(e){return Zc(Sc(e))}function $c(e){return H(e,``)?[]:[e.slice(0,1),e.slice(1)]}function el(e,t){let[n,...r]=e;return B(n)?t.startsWith(n)?!0:el(r,t):!1}function tl(e,t,n=``){return cc($c(t),(r,i)=>el(e,t)?[n,t]:tl(e,i,`${n}${r}`),()=>[])}function nl(e,t,n){return cc(uc([e],n),(e,n)=>cc(tl([t],n),(e,n)=>cc(uc([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function rl(e,t,n){return cc(uc([e],n),(e,n)=>cc(tl([`
4
+ `,t],n),(e,n)=>cc(uc([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function il(e,t,n,r){return n?nl(e,t,Sc(r)):rl(e,t,Sc(r))}function al(e,t){return uc(e,t)}function ol(e,t){return il(e,e,!1,t)}function sl(e,t){return cc(al(e,t),(e,t)=>ol(e,`${e}${t}`),()=>[])}function cl(e,t){return sl(e,Sc(t))}function ll(e,t){return cc(tl(e,t),(e,t)=>H(e,``)?[]:[e,t],()=>[])}var G=(e,t,n=()=>[])=>e.length===2?t(e):n(),ul=e=>G(G(Hc(e),([e,t])=>G(W(`extends`,t),([t,n])=>G(cu(n),([n,r])=>G(W(`=`,r),([r,i])=>G(cu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Ha(e),t]),dl=e=>G(G(Hc(e),([e,t])=>G(W(`extends`,t),([t,n])=>G(cu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ua(e),t]),fl=e=>G(G(Hc(e),([e,t])=>G(W(`=`,t),([t,n])=>G(cu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Wa(e),t]),pl=e=>G(Hc(e),([e,t])=>[Ga(e),t]),ml=e=>G(G(ul(e),([e,t])=>[e,t],()=>G(dl(e),([e,t])=>[e,t],()=>G(fl(e),([e,t])=>[e,t],()=>G(pl(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[Ka(e),t]),hl=(e,t=[])=>G(G(ml(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>hl(n,[...t,e]),()=>[t,e]),gl=e=>G(G(hl(e),([e,t])=>G(G(G(ml(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[qa(e),t]),_l=e=>G(G(W(`<`,e),([e,t])=>G(gl(t),([t,n])=>G(W(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ja(e),t]),vl=(e,t=[])=>G(G(cu(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>vl(n,[...t,e]),()=>[t,e]),yl=e=>G(G(vl(e),([e,t])=>G(G(G(cu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Ya(e),t]),bl=e=>G(G(W(`<`,e),([e,t])=>G(yl(t),([t,n])=>G(W(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Xa(e),t]),xl=e=>G(G(Hc(e),([e,t])=>G(bl(t),([t,n])=>[[e,t],n])),([e,t])=>[Za(e),t]),Sl=e=>G(G(G(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Qa(e),t]),Cl=e=>G(W(`string`,e),([e,t])=>[$a(e),t]),wl=e=>G(W(`number`,e),([e,t])=>[eo(e),t]),Tl=e=>G(W(`boolean`,e),([e,t])=>[to(e),t]),El=e=>G(W(`undefined`,e),([e,t])=>[no(e),t]),Dl=e=>G(W(`null`,e),([e,t])=>[ro(e),t]),Ol=e=>G(W(`integer`,e),([e,t])=>[io(e),t]),kl=e=>G(W(`bigint`,e),([e,t])=>[ao(e),t]),Al=e=>G(W(`unknown`,e),([e,t])=>[oo(e),t]),jl=e=>G(W(`any`,e),([e,t])=>[so(e),t]),Ml=e=>G(W(`object`,e),([e,t])=>[co(e),t]),Nl=e=>G(W(`never`,e),([e,t])=>[lo(e),t]),Pl=e=>G(W(`symbol`,e),([e,t])=>[uo(e),t]),Fl=e=>G(W(`void`,e),([e,t])=>[fo(e),t]),Il=e=>G(W(`this`,e),([e,t])=>[po(e),t]),Ll=e=>G(G(Cl(e),([e,t])=>[e,t],()=>G(wl(e),([e,t])=>[e,t],()=>G(Tl(e),([e,t])=>[e,t],()=>G(El(e),([e,t])=>[e,t],()=>G(Dl(e),([e,t])=>[e,t],()=>G(Ol(e),([e,t])=>[e,t],()=>G(kl(e),([e,t])=>[e,t],()=>G(Al(e),([e,t])=>[e,t],()=>G(jl(e),([e,t])=>[e,t],()=>G(Ml(e),([e,t])=>[e,t],()=>G(Nl(e),([e,t])=>[e,t],()=>G(Pl(e),([e,t])=>[e,t],()=>G(Fl(e),([e,t])=>[e,t],()=>G(Il(e),([e,t])=>[e,t],()=>[])))))))))))))),([e,t])=>[mo(e),t]),Rl=e=>G(G(W("${",e),([e,t])=>G(cu(t),([t,n])=>G(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ho(e),t]),zl=e=>G(tl(["${","`"],e),([e,t])=>[go(e),t]),Bl=e=>G(G(G(zl(e),([e,t])=>G(Rl(t),([t,n])=>G(Bl(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G(G(zl(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G(G(zl(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[_o(e),t]),Vl=e=>G(G(W("`",e),([e,t])=>G(Bl(t),([t,n])=>G(W("`",n),([n,r])=>[[e,t,n],r]))),([e,t])=>[vo(e),t]),Hl=e=>G(Vl(e),([e,t])=>[yo(e),t]),Ul=e=>G(Fc(e),([e,t])=>[bo(e),t]),Wl=e=>G(G(W(`true`,e),([e,t])=>[e,t],()=>G(W(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[xo(e),t]),Gl=e=>G(Qc(e),([e,t])=>[So(e),t]),Kl=e=>G(cl([`'`,`"`],e),([e,t])=>[Co(e),t]),ql=e=>G(G(Ul(e),([e,t])=>[e,t],()=>G(Wl(e),([e,t])=>[e,t],()=>G(Gl(e),([e,t])=>[e,t],()=>G(Kl(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[wo(e),t]),Jl=e=>G(G(G(W(`keyof`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[To(e),t]),Yl=(e,t=[])=>G(G(G(W(`[`,e),([e,t])=>G(cu(t),([t,n])=>G(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G(G(W(`[`,e),([e,t])=>G(W(`]`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,n])=>Yl(n,[...t,e]),()=>[t,e]),Xl=e=>G(Yl(e),([e,t])=>[Eo(e),t]),Zl=e=>G(G(G(W(`extends`,e),([e,t])=>G(cu(t),([t,n])=>G(W(`?`,n),([n,r])=>G(cu(r),([r,i])=>G(W(`:`,i),([i,a])=>G(cu(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Do(e),t]),Ql=e=>G(G(G(W(`(`,e),([e,t])=>G(cu(t),([t,n])=>G(W(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G(Ll(e),([e,t])=>[e,t],()=>G(xu(e),([e,t])=>[e,t],()=>G(Au(e),([e,t])=>[e,t],()=>G(Hl(e),([e,t])=>[e,t],()=>G(ql(e),([e,t])=>[e,t],()=>G(Bu(e),([e,t])=>[e,t],()=>G(zu(e),([e,t])=>[e,t],()=>G(Wu(e),([e,t])=>[e,t],()=>G(Ku(e),([e,t])=>[e,t],()=>G(xl(e),([e,t])=>[e,t],()=>G(Gu(e),([e,t])=>[e,t],()=>[])))))))))))),([e,t])=>[Oo(e),t]),$l=e=>G(G(Jl(e),([e,t])=>G(Ql(t),([t,n])=>G(Xl(n),([n,r])=>G(Zl(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[jo(e),t]),eu=e=>G(G(G(W(`&`,e),([e,t])=>G($l(t),([t,n])=>G(eu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[No(e),t]),tu=e=>G(G($l(e),([e,t])=>G(eu(t),([t,n])=>[[e,t],n])),([e,t])=>[Po(e),t]),nu=e=>G(G(G(W(`|`,e),([e,t])=>G(tu(t),([t,n])=>G(nu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Fo(e),t]),ru=e=>G(G(tu(e),([e,t])=>G(nu(t),([t,n])=>[[e,t],n])),([e,t])=>[Io(e),t]),iu=e=>G(G(W(`readonly`,e),([e,t])=>G(ru(t),([t,n])=>[[e,t],n])),([e,t])=>[Lo(e),t]),au=e=>G(G(W(`|`,e),([e,t])=>G(ru(t),([t,n])=>[[e,t],n])),([e,t])=>[Ro(e),t]),ou=e=>G(G(_l(e),([e,t])=>G(W(`=`,t),([t,n])=>G(cu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[zo(e),t]),su=e=>G(G(G(W(`infer`,e),([e,t])=>G(Hc(t),([t,n])=>G(W(`extends`,n),([n,r])=>G(ru(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>G(G(W(`infer`,e),([e,t])=>G(Hc(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,t])=>[Bo(e),t]),cu=e=>G(G(su(e),([e,t])=>[e,t],()=>G(au(e),([e,t])=>[e,t],()=>G(iu(e),([e,t])=>[e,t],()=>G(ru(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[Vo(e),t]),lu=e=>G(Qc(e),([e,t])=>[Ho(e),t]),uu=e=>G(Hc(e),([e,t])=>[Uo(e),t]),du=e=>G(cl([`'`,`"`],e),([e,t])=>[Wo(e),t]),fu=e=>G(G(W(`[`,e),([e,t])=>G(Hc(t),([t,n])=>G(W(`:`,n),([n,r])=>G(G(Ol(r),([e,t])=>[e,t],()=>G(wl(r),([e,t])=>[e,t],()=>G(Cl(r),([e,t])=>[e,t],()=>G(Pl(r),([e,t])=>[e,t],()=>[])))),([r,i])=>G(W(`]`,i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Go(e),t]),pu=e=>G(G(lu(e),([e,t])=>[e,t],()=>G(uu(e),([e,t])=>[e,t],()=>G(du(e),([e,t])=>[e,t],()=>G(fu(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[Ko(e),t]),mu=e=>G(G(G(W(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[qo(e),t]),hu=e=>G(G(G(W(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Jo(e),t]),gu=e=>G(G(mu(e),([e,t])=>G(pu(t),([t,n])=>G(hu(n),([n,r])=>G(W(`:`,r),([r,i])=>G(cu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Yo(e),t]),_u=e=>G(G(G(W(`,`,e),([e,t])=>G(W(`
5
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`;`,e),([e,t])=>G(W(`
6
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`,`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G(G(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G(G(W(`
7
+ `,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))))),([e,t])=>[Xo(e),t]),vu=(e,t=[])=>G(G(gu(e),([e,t])=>G(_u(t),([t,n])=>[[e,t],n])),([e,n])=>vu(n,[...t,e]),()=>[t,e]),yu=e=>G(G(vu(e),([e,t])=>G(G(G(gu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Zo(e),t]),bu=e=>G(G(W(`{`,e),([e,t])=>G(yu(t),([t,n])=>G(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[$o(e),t]),xu=e=>G(bu(e),([e,t])=>[es(e),t]),Su=e=>G(G(G(Hc(e),([e,t])=>G(W(`?`,t),([t,n])=>G(W(`:`,n),([n,r])=>G(W(`readonly`,r),([r,i])=>G(cu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[e,t],()=>G(G(Hc(e),([e,t])=>G(W(`:`,t),([t,n])=>G(W(`readonly`,n),([n,r])=>G(cu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>G(G(Hc(e),([e,t])=>G(W(`?`,t),([t,n])=>G(W(`:`,n),([n,r])=>G(cu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>G(G(Hc(e),([e,t])=>G(W(`:`,t),([t,n])=>G(cu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>[])))),([e,t])=>[ts(e),t]),Cu=e=>G(G(W(`readonly`,e),([e,t])=>G(cu(t),([t,n])=>G(W(`?`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ns(e),t]),wu=e=>G(G(W(`readonly`,e),([e,t])=>G(cu(t),([t,n])=>[[e,t],n])),([e,t])=>[rs(e),t]),Tu=e=>G(G(cu(e),([e,t])=>G(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[is(e),t]),Eu=e=>G(G(Su(e),([e,t])=>[e,t],()=>G(Cu(e),([e,t])=>[e,t],()=>G(wu(e),([e,t])=>[e,t],()=>G(Tu(e),([e,t])=>[e,t],()=>G(cu(e),([e,t])=>[e,t],()=>[]))))),([e,t])=>[as(e),t]),Du=e=>G(G(G(W(`...`,e),([e,t])=>G(Eu(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(Eu(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[os(e),t]),Ou=(e,t=[])=>G(G(Du(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>Ou(n,[...t,e]),()=>[t,e]),ku=e=>G(G(Ou(e),([e,t])=>G(G(G(Du(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[ss(e),t]),Au=e=>G(G(W(`[`,e),([e,t])=>G(ku(t),([t,n])=>G(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[cs(e),t]),ju=e=>G(G(Hc(e),([e,t])=>G(W(`?`,t),([t,n])=>G(W(`:`,n),([n,r])=>G(W(`readonly`,r),([r,i])=>G(cu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[ls(e),t]),Mu=e=>G(G(Hc(e),([e,t])=>G(W(`:`,t),([t,n])=>G(W(`readonly`,n),([n,r])=>G(cu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[us(e),t]),Nu=e=>G(G(Hc(e),([e,t])=>G(W(`?`,t),([t,n])=>G(W(`:`,n),([n,r])=>G(cu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[ds(e),t]),Pu=e=>G(G(Hc(e),([e,t])=>G(W(`:`,t),([t,n])=>G(cu(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[fs(e),t]),Fu=e=>G(G(ju(e),([e,t])=>[e,t],()=>G(Mu(e),([e,t])=>[e,t],()=>G(Nu(e),([e,t])=>[e,t],()=>G(Pu(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[ps(e),t]),Iu=e=>G(G(G(W(`...`,e),([e,t])=>G(Fu(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(Fu(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[ms(e),t]),Lu=(e,t=[])=>G(G(Iu(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>Lu(n,[...t,e]),()=>[t,e]),Ru=e=>G(G(Lu(e),([e,t])=>G(G(G(Iu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[hs(e),t]),zu=e=>G(G(W(`(`,e),([e,t])=>G(Ru(t),([t,n])=>G(W(`)`,n),([n,r])=>G(W(`=>`,r),([r,i])=>G(cu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[gs(e),t]),Bu=e=>G(G(W(`new`,e),([e,t])=>G(W(`(`,t),([t,n])=>G(Ru(n),([n,r])=>G(W(`)`,r),([r,i])=>G(W(`=>`,i),([i,a])=>G(cu(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[_s(e),t]),Vu=e=>G(G(G(W(`+`,e),([e,t])=>G(W(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`-`,e),([e,t])=>G(W(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[ys(e),t]),Hu=e=>G(G(G(W(`+`,e),([e,t])=>G(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`-`,e),([e,t])=>G(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[xs(e),t]),Uu=e=>G(G(G(W(`as`,e),([e,t])=>G(cu(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Ss(e),t]),Wu=e=>G(G(W(`{`,e),([e,t])=>G(Vu(t),([t,n])=>G(W(`[`,n),([n,r])=>G(Hc(r),([r,i])=>G(W(`in`,i),([i,a])=>G(cu(a),([a,o])=>G(Uu(o),([o,s])=>G(W(`]`,s),([s,c])=>G(Hu(c),([c,l])=>G(W(`:`,l),([l,u])=>G(cu(u),([u,d])=>G(Sl(d),([d,f])=>G(W(`}`,f),([f,p])=>[[e,t,n,r,i,a,o,s,c,l,u,d,f],p]))))))))))))),([e,t])=>[Cs(e),t]),Gu=e=>G(Hc(e),([e,t])=>[ws(e),t]),Ku=e=>G(G(W(`Options`,e),([e,t])=>G(W(`<`,t),([t,n])=>G(cu(n),([n,r])=>G(W(`,`,r),([r,i])=>G(ed(i),([i,a])=>G(W(`>`,a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[Ts(e),t]),qu=e=>G(Qc(e),([e,t])=>[Es(e),t]),Ju=e=>G(G(W(`true`,e),([e,t])=>[e,t],()=>G(W(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[Ds(e),t]),Yu=e=>G(cl([`"`,`'`],e),([e,t])=>[Os(e),t]),Xu=e=>G(W(`null`,e),([e,t])=>[ks(e),t]),Zu=e=>G(G(pu(e),([e,t])=>G(W(`:`,t),([t,n])=>G(id(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[As(e),t]),Qu=(e,t=[])=>G(G(Zu(e),([e,t])=>G(_u(t),([t,n])=>[[e,t],n])),([e,n])=>Qu(n,[...t,e]),()=>[t,e]),$u=e=>G(G(Qu(e),([e,t])=>G(G(G(Zu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[js(e),t]),ed=e=>G(G(W(`{`,e),([e,t])=>G($u(t),([t,n])=>G(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ns(e),t]),td=(e,t=[])=>G(G(id(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>td(n,[...t,e]),()=>[t,e]),nd=e=>G(G(td(e),([e,t])=>G(G(G(id(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Ps(e),t]),rd=e=>G(G(W(`[`,e),([e,t])=>G(nd(t),([t,n])=>G(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Fs(e),t]),id=e=>G(G(qu(e),([e,t])=>[e,t],()=>G(Ju(e),([e,t])=>[e,t],()=>G(Yu(e),([e,t])=>[e,t],()=>G(Xu(e),([e,t])=>[e,t],()=>G(ed(e),([e,t])=>[e,t],()=>G(rd(e),([e,t])=>[e,t],()=>[])))))),([e,t])=>[Is(e),t]),ad=e=>G(W(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[Ls(e),t]),od=e=>G(W(`.*`,e),([e,t])=>[Rs(e),t]),sd=e=>G(W(`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`,e),([e,t])=>[zs(e),t]),cd=e=>G(W(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[Bs(e),t]),ld=e=>G(W(`(?!)`,e),([e,t])=>[Vs(e),t]),ud=e=>G(ll([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[Hs(e),t]),dd=e=>G(G(ad(e),([e,t])=>[e,t],()=>G(od(e),([e,t])=>[e,t],()=>G(sd(e),([e,t])=>[e,t],()=>G(cd(e),([e,t])=>[e,t],()=>G(ld(e),([e,t])=>[e,t],()=>G(fd(e),([e,t])=>[e,t],()=>G(ud(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[Us(e),t]),fd=e=>G(G(W(`(`,e),([e,t])=>G(hd(t),([t,n])=>G(W(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ws(e),t]),pd=e=>G(G(G(md(e),([e,t])=>G(W(`|`,t),([t,n])=>G(pd(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>G(G(md(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[Gs(e),t]),md=e=>G(G(dd(e),([e,t])=>G(hd(t),([t,n])=>[[e,t],n])),([e,t])=>[Ks(e),t]),hd=e=>G(G(pd(e),([e,t])=>[e,t],()=>G(md(e),([e,t])=>[e,t],()=>[])),([e,t])=>[qs(e),t]),gd=e=>G(G(W(`^`,e),([e,t])=>G(hd(t),([t,n])=>G(W(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Js(e),t]),_d=(e,t=[])=>G(G(cu(e),([e,t])=>G(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>_d(n,[...t,e]),()=>[t,e]),vd=e=>G(G(_d(e),([e,t])=>G(G(G(cu(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Ys(e),t]),yd=e=>G(G(G(W(`extends`,e),([e,t])=>G(vd(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Xs(e),t]),bd=e=>G(G(W(`interface`,e),([e,t])=>G(Hc(t),([t,n])=>G(_l(n),([n,r])=>G(yd(r),([r,i])=>G(bu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Zs(e),t]),xd=e=>G(G(W(`interface`,e),([e,t])=>G(Hc(t),([t,n])=>G(yd(n),([n,r])=>G(bu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[Qs(e),t]),Sd=e=>G(G(W(`type`,e),([e,t])=>G(Hc(t),([t,n])=>G(_l(n),([n,r])=>G(W(`=`,r),([r,i])=>G(cu(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[$s(e),t]),Cd=e=>G(G(W(`type`,e),([e,t])=>G(Hc(t),([t,n])=>G(W(`=`,n),([n,r])=>G(cu(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[ec(e),t]),wd=e=>G(G(G(W(`export`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[tc(e),t]),Td=e=>G(G(G(W(`;`,e),([e,t])=>G(W(`
8
+ `,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>G(G(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G(G(W(`
9
+ `,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[nc(e),t]),Ed=(e,t=[])=>G(G(Od(e),([e,t])=>G(Td(t),([t,n])=>[[e,t],n])),([e,n])=>Ed(n,[...t,e]),()=>[t,e]),Dd=e=>G(G(Ed(e),([e,t])=>G(G(G(Od(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>G([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[rc(e),t]),Od=e=>G(G(wd(e),([e,t])=>G(G(bd(t),([e,t])=>[e,t],()=>G(xd(t),([e,t])=>[e,t],()=>G(Sd(t),([e,t])=>[e,t],()=>G(Cd(t),([e,t])=>[e,t],()=>[])))),([t,n])=>G(Sl(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ic(e),t]),kd=e=>G(G(Od(e),([e,t])=>G(Dd(t),([t,n])=>[[e,t],n])),([e,t])=>[ac(e),t]),Ad=e=>G(G(kd(e),([e,t])=>[e,t],()=>G(ou(e),([e,t])=>[e,t],()=>G(cu(e),([e,t])=>[e,t],()=>[]))),([e,t])=>[oc(e),t]);function jd(e){let t=Vl(`\`${e}\``);return H(t.length,2)?t[0]:Sr()}function Md(e,t={}){return gn(`TemplateLiteral`,[e],t)}function Nd(e){return gy({},Md(e,{}))}function Pd(e){return Nd(jd(e))}function Fd(e,t={}){return an(B(e)?Pd(e):Nd(e),{},t)}function Id(e){return on(e,`TemplateLiteral`)}var Ld=s({ExtendsFalse:()=>Hd,ExtendsTrue:()=>Bd,ExtendsUnion:()=>Rd,IsExtendsFalse:()=>Ud,IsExtendsTrue:()=>Vd,IsExtendsTrueLike:()=>Wd,IsExtendsUnion:()=>zd,Match:()=>Gd,TakeLeft:()=>Kd});function Rd(e){return nn({"~kind":`ExtendsUnion`},{inferred:e})}function zd(e){return be(e)&&U(e,`~kind`)&&U(e,`inferred`)&&H(e[`~kind`],`ExtendsUnion`)&&be(e.inferred)}function Bd(e){return nn({"~kind":`ExtendsTrue`},{inferred:e})}function Vd(e){return be(e)&&U(e,`~kind`)&&U(e,`inferred`)&&H(e[`~kind`],`ExtendsTrue`)&&be(e.inferred)}function Hd(){return nn({"~kind":`ExtendsFalse`},{})}function Ud(e){return be(e)&&U(e,`~kind`)&&H(e[`~kind`],`ExtendsFalse`)}function Wd(e){return zd(e)||Vd(e)}function Gd(e,t,n){return Wd(e)?t(e.inferred):n()}function Kd(e,t,n){return H(e.length,0)?n():t(e[0],e.slice(1))}function qd(e){return B(e)||ve(e)?ki(e):_e(e)?Ii():Zn()}function Jd(e){return e.map(e=>qd(e))}function Yd(e){return ar(Jd(e))}function Xd(e){return Yd(e.enum)}function Zd(e,t,n,r){return Gd(dp(e,n,r),r=>Bd(P(P(e,r),{[t]:n})),()=>Hd())}function Qd(e,t){return Bd(e)}function $d(e,t,n){return dp(e,t,Yd(n))}function ef(e,t,n){return Kd(n,(n,r)=>Gd(dp(e,t,n),e=>ef(e,t,r),()=>Hd()),()=>Bd(e))}function tf(e,t,n){return dp(e,t,fa(n))}function nf(e,t,n){return Kd(n,(n,r)=>Gd(dp(e,t,n),e=>Bd(e),()=>nf(e,t,r)),()=>Hd())}function rf(e,t,n){return Yn(n)?Qd(e,t):vr(n)?$d(e,t,n.enum):mr(n)?Zd(e,n.name,t,n.extends):br(n)?ef(e,t,n.allOf):Id(n)?tf(e,t,n.pattern):or(n)?nf(e,t,n.anyOf):lr(n)?Bd(e):Hd()}function af(e,t,n){return mr(n)?rf(e,t,n):Yn(n)||lr(n)?Bd(e):Rd(e)}function of(e,t){let n=bn(e),r=bn(t);return n&&r||!n&&r?!0:!(n&&!r)}function sf(e,t,n,r){return An(r)?of(t,r)?dp(e,n,r.items):Hd():rf(e,t,r)}function cf(e,t,n){return Nn(n)?dp(e,t,n.iteratorItems):rf(e,Mn(t),n)}function lf(e,t,n){return gi(n)?Bd(e):rf(e,t,n)}function uf(e,t,n){return vi(n)?Bd(e):rf(e,t,n)}function df(e,t,n,r,i){let a=mr(r)?t:r,o=mr(r)?r:t,s=wn(t),c=wn(r);return!s&&c?Hd():Gd(dp(e,a,o),e=>mf(e,n,i),()=>Hd())}function ff(e,t,n,r){return Kd(r,(r,i)=>df(e,t,n,r,i),()=>wn(t)?Bd(e):Hd())}function pf(e,t,n){return Kd(t,(t,r)=>ff(e,t,r,n),()=>Bd(e))}function mf(e,t,n){return pf(e,t,n)}function hf(e,t,n){return La(n)?Bd(e):dp(e,t,n)}function gf(e,t,n,r){return Yn(r)||lr(r)?Bd(e):zn(r)?Gd(mf(e,t,r.parameters),e=>hf(e,n,r.instanceType),()=>Hd()):Hd()}function _f(e,t,n){return dp(e,Xd(t),n)}function vf(e,t,n,r){return Yn(r)||lr(r)?Bd(e):Hn(r)?Gd(mf(e,t,r.parameters),e=>hf(e,n,r.returnType),()=>Hd()):Hd()}function yf(e,t,n){return Ci(n)||Bi(n)?Bd(e):rf(e,t,n)}function bf(e,t,n){return dp(e,Yp(t),n)}function xf(e,t,n){return Ti(n)?dp(e,t,n.iteratorItems):rf(e,wi(t),n)}function Sf(e,t,n){return t===n?Bd(e):Hd()}function Cf(e,t,n){return Fi(n)?Sf(e,t,n.const):gi(n)?Bd(e):rf(e,ki(t),n)}function wf(e,t,n){return Fi(n)?Sf(e,t,n.const):vi(n)?Bd(e):rf(e,ki(t),n)}function Tf(e,t,n){return Fi(n)?Sf(e,t,n.const):Bi(n)?Bd(e):rf(e,ki(t),n)}function Ef(e,t,n){return Fi(n)?Sf(e,t,n.const):Yi(n)?Bd(e):rf(e,ki(t),n)}function Df(e,t,n){return z(t.const)?Cf(e,t.const,n):fe(t.const)?wf(e,t.const,n):ve(t.const)?Tf(e,t.const,n):B(t.const)?Ef(e,t.const,n):Sr()}function Of(e,t,n){return mr(n)?rf(e,t,n):Bd(e)}function kf(e,t,n){return Li(n)?Bd(e):rf(e,t,n)}function Af(e,t,n){return Bi(n)?Bd(e):rf(e,t,n)}function jf(e,t,n){return wn(t)?wn(n)?Bd(e):Hd():Bd(e)}function Mf(e,t,n){return mr(n)&&Qn(n.extends)?Hd():Gd(dp(e,t,n),e=>jf(e,t,n),()=>Hd())}function Nf(e,t){return e.reduce((e,n)=>n in t&&Wd(t[n])?{...e,...t[n].inferred}:Sr(),{})}function Pf(e,t,n){let r={};for(let i of Ie(n))r[i]=i in t?Mf({},t[i],n[i]):wn(n[i])?mr(n[i])?Bd(P(e,{[n[i].name]:n[i].extends})):Bd(e):Hd();let i=Re(r).every(e=>Wd(e)),a=i?Nf(Ie(r),r):{};return i?Bd(a):Hd()}function Ff(e,t,n){let r=Pf(e,t,n);return Wd(r)?Bd(P(e,r.inferred)):Hd()}function If(e,t,n){return Ff(e,t,n)}function Lf(e,t,n){return rr(n)?If(e,t,n.properties):rf(e,nr(t),n)}function Rf(e,t,n){return Ki(n)?dp(e,t,n.item):rf(e,Gi(t),n)}function zf(e,t,n){return Yi(n)?Bd(e):rf(e,t,n)}function Bf(e,t,n){return Hi(n)?Bd(e):rf(e,t,n)}function Vf(e,t,n){return dp(e,fa(t),n)}function Hf(e,t){return nn({"~kind":`Inferrable`},{name:e,type:t},{})}function Uf(e){return be(e)&&U(e,`~kind`)&&U(e,`name`)&&U(e,`type`)&&H(e[`~kind`],`Inferrable`)&&B(e.name)&&be(e.type)}function Wf(e){return Ea(e)?mr(e.items)?An(e.items.extends)?Hf(e.items.name,e.items.extends.items):lr(e.items.extends)?Hf(e.items.name,e.items.extends):void 0:Sr():void 0}function Gf(e){return mr(e)?Hf(e.name,e.extends):void 0}function Kf(e,t,n=[]){return Kd(e,(e,r)=>Gd(dp({},e,t),()=>Kf(r,t,[...n,e]),()=>void 0),()=>n)}function qf(e,t,n,r){let i=Kf(n,r);return R(i)?Bd(P(e,{[t]:ka(i)})):Hd()}function Jf(e,t,n,r){let i=Kf(n,r);return R(i)?Bd(P(e,{[t]:ar(i)})):Hd()}function Yf(e){return[...e].reverse()}function Xf(e,t){return t?Yf(e):e}function Zf(e){let t=e.length>0?e[0]:void 0;return sn(sn(t)?Wf(t):void 0)}function Qf(e,t,n,r,i,a){return Gd(dp(e,n,i),e=>tp(e,t,r,a),()=>Hd())}function $f(e,t,n,r,i){let a=Wf(r);return Uf(a)?qf(e,a.name,Xf(n,t),a.type):Kd(n,(n,a)=>Qf(e,t,n,a,r,i),()=>Hd())}function ep(e,t,n,r){return Kd(r,(r,i)=>$f(e,t,n,r,i),()=>H(n.length,0)?Bd(e):Hd())}function tp(e,t,n,r){return ep(e,t,n,r)}function np(e,t,n){let r=fy(e,{callstack:[]},n),i=Zf(r);return tp(e,i,Xf(t,i),Xf(r,i))}function rp(e,t,n){let r=Gf(n);return Uf(r)?Jf(e,r.name,t,r.type):Kd(t,(t,r)=>Gd(dp(e,t,n),e=>rp(e,r,n),()=>Hd()),()=>Bd(e))}function ip(e,t,n){let r=fy(e,{callstack:[]},t);return Aa(n)?np(e,r,n.items):An(n)?rp(e,r,n.items):rf(e,ka(r),n)}function ap(e,t,n){return La(n)||Na(n)?Bd(e):rf(e,t,n)}function op(e,t,n){return Kd(n,(n,r)=>Gd(dp(e,t,n),e=>Bd(e),()=>op(e,t,r)),()=>Hd())}function sp(e,t,n){return Kd(t,(t,r)=>Gd(op(e,t,n),e=>sp(e,r,n),()=>Hd()),()=>Bd(e))}function cp(e,t,n){let r=Gf(n);return Uf(r)?Jf(e,r.name,t,r.type):or(n)?sp(e,t,n.anyOf):sp(e,t,[n])}function lp(e,t,n){return mr(n)?rf(e,t,n):Yn(n)||lr(n)?Bd(e):Hd()}function up(e,t,n){return La(n)?Bd(e):rf(e,t,n)}function dp(e,t,n){return Yn(t)?af(e,t,n):An(t)?sf(e,t,t.items,n):Nn(t)?cf(e,t.iteratorItems,n):gi(t)?lf(e,t,n):vi(t)?uf(e,t,n):zn(t)?gf(e,t.parameters,t.instanceType,n):vr(t)?_f(e,t,n):Hn(t)?vf(e,t.parameters,t.returnType,n):Ci(t)?yf(e,t,n):br(t)?bf(e,t.allOf,n):Ti(t)?xf(e,t.iteratorItems,n):Fi(t)?Df(e,t,n):Qn(t)?Of(e,t,n):Li(t)?kf(e,t,n):Bi(t)?Af(e,t,n):rr(t)?Lf(e,t.properties,n):Ki(t)?Rf(e,t.item,n):Yi(t)?zf(e,t,n):Hi(t)?Bf(e,t,n):Id(t)?Vf(e,t.pattern,n):Aa(t)?ip(e,t.items,n):Na(t)?ap(e,t,n):or(t)?cp(e,t.anyOf,n):lr(t)?lp(e,t,n):La(t)?up(e,t,n):Hd()}function fp(e,t,n={}){return gn(`Interface`,[e,t],n)}function pp(e){return sn(e)&&U(e,`action`)&&H(e.action,`Interface`)}function mp(e,t,n={}){return gy({},fp(e,t,n))}function hp(e,t,n){return e.includes(n)?!0:vp([...e,n],t,t[n])}function gp(e,t,n){return _p(e,t,tr(n))}function _p(e,t,n){let[r,...i]=n;return sn(r)?vp(e,t,r)?!0:_p(e,t,i):!1}function vp(e,t,n){return Gn(n)?hp(e,t,n.$ref):An(n)?vp(e,t,n.items):Nn(n)?vp(e,t,n.iteratorItems):zn(n)?_p(e,t,[...n.parameters,n.instanceType]):Hn(n)?_p(e,t,[...n.parameters,n.returnType]):pp(n)?gp(e,t,n.parameters[1]):br(n)?_p(e,t,n.allOf):Ti(n)?vp(e,t,n.iteratorItems):rr(n)?gp(e,t,n.properties):Ki(n)?vp(e,t,n.item):or(n)?_p(e,t,n.anyOf):Aa(n)?_p(e,t,n.items):wa(n)?vp(e,t,Ca(n)):!1}function yp(e,t,n){return vp(e,t,n)}function bp(e,t){return t.reduce((t,n)=>n in e?yp([n],e,e[n])?[...t,n]:t:Sr(),[])}function xp(e){return bp(e,er(e))}function Sp(e,t,n){return n.includes(t)?n:t in e?Tp(e,e[t],[...n,t]):Sr()}function Cp(e,t,n){return wp(e,tr(t),n)}function wp(e,t,n){return t.reduce((t,n)=>Tp(e,n,t),n)}function Tp(e,t,n){return Gn(t)?Sp(e,t.$ref,n):An(t)?Tp(e,t.items,n):Nn(t)?Tp(e,t.iteratorItems,n):zn(t)?wp(e,[...t.parameters,t.instanceType],n):Hn(t)?wp(e,[...t.parameters,t.returnType],n):pp(t)?Cp(e,t.parameters[1],n):br(t)?wp(e,t.allOf,n):Ti(t)?Tp(e,t.iteratorItems,n):rr(t)?Cp(e,t.properties,n):Ki(t)?Tp(e,t.item,n):or(t)?wp(e,t.anyOf,n):Aa(t)?wp(e,t.items,n):wa(t)?Tp(e,Ca(t),n):n}function Ep(e,t,n){return Tp(e,n,[t])}function Dp(e){return Jn()}function Op(e){return Ie(e).reduce((t,n)=>({...t,[n]:Ap(e[n])}),{})}function kp(e){return e.reduce((e,t)=>[...e,Ap(t)],[])}function Ap(e){return Gn(e)?Dp(e.$ref):An(e)?kn(Ap(e.items),jn(e)):Nn(e)?Mn(Ap(e.iteratorItems)):zn(e)?Rn(kp(e.parameters),Ap(e.instanceType)):Hn(e)?Vn(kp(e.parameters),Ap(e.returnType)):br(e)?yr(kp(e.allOf)):Ti(e)?wi(Ap(e.iteratorItems)):rr(e)?nr(Op(e.properties)):Ki(e)?Gi(Ap(e.item)):wa(e)?ya(Sa(e),Ap(Ca(e))):or(e)?ar(kp(e.anyOf)):Aa(e)?ka(kp(e.items)):e}function jp(e,t){return t in e?Ap(e[t]):cr()}function Mp(e){return jp(e.$defs,e.$ref)}function Np(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function Pp(e){return nr(Np(e.items))}function Fp(e,t){return On(e)?!!On(t):!1}function Ip(e,t){return wn(e)?!!wn(t):!1}function Lp(e,t){let n=Fp(e,t),r=Ip(e,t),i=Tn(xn(Yp([e,t])));return n&&r?En(Sn(i)):n&&!r?En(i):!n&&r?Sn(i):i}function Rp(e,t,n){return n in e?n in t?Lp(e[n],t[n]):e[n]:n in t?t[n]:Zn()}function zp(e,t){return[...new Set([...Ie(t),...Ie(e)])].reduce((n,r)=>({...n,[r]:Rp(e,t,r)}),{})}function Bp(e){return rr(e)?e.properties:Aa(e)?Np(e.items):Sr()}function Vp(e,t){return nr(zp(Bp(e),Bp(t)))}function Hp(e,t){let n=um(e,t);return H(n,`left-inside`)?e:H(n,`right-inside`)||H(n,`equal`)?t:Zn()}function Up(e){return rr(e)||Aa(e)}function Wp(e,t){let n=or(e),r=or(t);return n||r}function Gp(e,t){let n=Zp(e),r=Zp(t),i=Wp(n,r),a=Up(n),o=Up(r);return i?Yp([n,r]):a&&o?Vp(n,r):a&&!o?n:!a&&o?r:Hp(n,r)}function Kp(e,t,n=[]){let[r,...i]=t;return V(r)?n.length===0?[e]:n:Kp(e,i,[...n,Gp(e,r)])}function qp(e,t,n=[]){let[r,...i]=e;return sn(r)?qp(i,t,[...n,...Jp([r],t)]):n}function Jp(e,t=[]){let[n,...r]=e;return sn(n)?or(n)?Jp(r,qp(n.anyOf,t)):Jp(r,Kp(n,t)):t}function Yp(e){return _m(Jp(e))}function Xp(e){return _m(e)}function Zp(e){return br(e)?Yp(e.allOf):or(e)?Xp(e.anyOf):e}function Qp(e){return H(e.length,1)?e[0]:H(e.length,0)?Zn():ar(e)}function $p(e,t,n){let r=py(e,{callstack:[]},t),i=dy({},{callstack:[]},n);return Yp([...r,nr(i)])}function em(e,t){return Ie(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=pp(r)?$p(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function tm(e,t,n){return ur(em(e,Ep(e,t,n)),t)}function nm(e,t){return t in e?Gn(e[t])?nm(e,e[t].$ref):e[t]:Zn()}function rm(e,t){return nm(e,t)}function im(e){return dr(e)?Mp(e):e}function am(e,t,n){return dp(e,im(t),im(n))}var om=`equal`,sm=`disjoint`,cm=`left-inside`,lm=`right-inside`;function um(e,t){let n=[lr(e)?Hd():am({},e,t),lr(e)?Bd({}):am({},t,e)];return Wd(n[0])&&Wd(n[1])?om:Wd(n[0])&&Ud(n[1])?cm:Ud(n[0])&&Wd(n[1])?lm:sm}function dm(e){return or(e)?fm(e.anyOf):[e]}function fm(e){return e.reduce((e,t)=>[...e,...dm(t)],[])}function pm(e,t){return t.filter(t=>um(e,t)!==`right-inside`)}function mm(e,t){return H(t.some(t=>{let n=um(e,t);return H(n,`left-inside`)||H(n,`equal`)}),!1)}function hm(e,t){let n=Zp(e);return Yn(n)?[n]:mm(n,t)?[...pm(n,t),n]:t}function gm(e,t=[]){return e.reduce((e,t)=>rr(t)?[...e,t]:Qn(t)?e:hm(t,e),[])}function _m(e){let t=fm(gm(e));return t.length===0?Zn():t.length===1?t[0]:ar(t)}function vm(e,t,n,r){return an(Zp(hy(e,t,n)),{},r)}function ym(e,t,n,r){return vm(e,t,n,r)}function bm(e,t=[]){return _n(e)&&H(e.action,`Conditional`)?Gn(e.parameters[0])?bm(e.parameters[2],bm(e.parameters[3],[...t,e.parameters[0].$ref])):bm(e.parameters[2],bm(e.parameters[3],t)):_n(e)&&H(e.action,`Mapped`)&&_n(e.parameters[1])&&H(e.parameters[1].action,`KeyOf`)&&Gn(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function xm(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function Sm(e,t,n=[]){let[r,...i]=e,[a,...o]=t;return Se(e.length,0)&&Se(t.length,0)?Sm(i,o,[...n,[a,r]]):n}function Cm(e){return or(e)?[...e.anyOf]:[e]}function wm(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function Tm(e,t){return t.reduce((t,n)=>[...t,...wm(e,n)],[])}function Em(e){return e.reduce((e,t)=>H(t[0],!0)?Tm(e,Cm(t[1])):Tm(e,[t[1]]),[[]])}function Dm(e,t,n){let r=Sm(t,xm(e,bm(n)));return _n(n)&&H(n.action,`Conditional`)||_n(n)&&H(n.action,`Mapped`)?Em(r):[t]}function Om(){return[`(not-resolvable)`,Zn()]}function km(){return[`(not-generic)`,Zn()]}function Am(e,t,n){return[e,Kn(t,n)]}function jm(e,t,n){return t in e?Mm(e,t,e[t],n):Om()}function Mm(e,t,n,r){return qn(n)?Am(t,n.parameters,n.expression):Gn(n)?jm(e,n.$ref,r):km()}function Nm(e,t,n){return Mm(e,`(anonymous)`,t,n)}function Pm(e,t,n){if(mr(t)||qm(t)||Wd(am({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function Fm(e,t,n,r,i){let a=hy(e,t,i);return Pm(n,a,r),P(e,{[n]:a})}function Im(e,t,n,r,i){let a=hy(e,t,n.extends),o=hy(e,t,n.equals),[s,...c]=i;return sn(s)?Lm(Fm(e,t,n.name,a,s),t,r,c):Lm(Fm(e,t,n.name,a,o),t,r,[])}function Lm(e,t,n,r){let[i,...a]=n;return sn(i)?Im(e,t,i,a,r):e}function Rm(e,t,n,r){return Lm(e,t,n,r)}function zm(e){return Se(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function Bm(e,t){return H(zm(e),t)}function Vm(e,t,n,r,i,a){return hy(e,t,hy(Rm(e,t,r,a),{callstack:[...t.callstack,n.$ref]},i))}function Hm(e,t,n,r,i,a){return a.reduce((a,o)=>[...a,Vm(e,t,n,r,i,o)],[])}function Um(e,t,n,r,i,a){let o=Hm(e,t,n,r,i,Dm(r,a,i));return H(o.length,1)?o[0]:Xp(o)}function Wm(e,t,n,r){let i=py(e,t,r),a=Nm(e,n,r),o=a[0],s=a[1];return qn(s)?Bm(t,o)?Gm(Wn(o),i):Um(e,t,Wn(o),s.parameters,s.expression,i):Gm(n,i)}function Gm(e,t){return nn({"~kind":`Call`},{target:e,arguments:t},{})}function Km(e,t){return Wm({},{callstack:[]},e,t)}function qm(e){return on(e,`Call`)}function Jm(e){return Ki(e)?Jm(e.item):e}function Ym(e,t,n,r){return an(Jm(hy(e,t,n)),{},r)}function Xm(e,t,n,r){return sy(e,[n])?Ym(e,t,n,r):_y(n,r)}function Zm(e,t){return e(t)}function Qm(e,t){return B(t)?ki(Zm(e,t)):ki(t)}function $m(e,t){return th(e,fa(t))}function eh(e,t){return ar(t.map(t=>th(e,t)))}function th(e,t){return Fi(t)?Qm(e,t.const):Id(t)?$m(e,t.pattern):or(t)?eh(e,t.anyOf):t}function nh(e,t={}){return gn(`Capitalize`,[e],t)}function rh(e,t={}){return gy({},nh(e,t))}function ih(e,t={}){return gn(`Lowercase`,[e],t)}function ah(e,t={}){return gy({},ih(e,t))}function oh(e,t={}){return gn(`Uncapitalize`,[e],t)}function sh(e,t={}){return gy({},oh(e,t))}function ch(e,t={}){return gn(`Uppercase`,[e],t)}function lh(e,t={}){return gy({},ch(e,t))}var uh=e=>e[0].toUpperCase()+e.slice(1),dh=e=>e.toLowerCase(),fh=e=>e[0].toLowerCase()+e.slice(1),ph=e=>e.toUpperCase();function mh(e,t,n,r){return an(th(uh,hy(e,t,n)),{},r)}function hh(e,t,n,r){return sy(e,[n])?mh(e,t,n,r):nh(n,r)}function gh(e,t,n,r){return an(th(dh,hy(e,t,n)),{},r)}function _h(e,t,n,r){return sy(e,[n])?gh(e,t,n,r):ih(n,r)}function vh(e,t,n,r){return an(th(fh,hy(e,t,n)),{},r)}function yh(e,t,n,r){return sy(e,[n])?vh(e,t,n,r):oh(n,r)}function bh(e,t,n,r){return an(th(ph,hy(e,t,n)),{},r)}function xh(e,t,n,r){return sy(e,[n])?bh(e,t,n,r):ch(n,r)}function Sh(e,t,n,r,i={}){return gn(`Conditional`,[e,t,n,r],i)}function Ch(e,t,n,r,i={}){return gy({},Sh(e,t,n,r,i))}function wh(e,t,n,r,i,a,o){let s=am(e,hy(e,t,n),hy(e,t,r));return an(zd(s)?ar([hy(s.inferred,t,i),hy(e,t,a)]):Vd(s)?hy(s.inferred,t,i):hy(e,t,a),{},o)}function Th(e,t,n,r,i,a,o){return sy(e,[n,r])?wh(e,t,n,r,i,a,o):Sh(n,r,i,a,o)}function Eh(e,t={}){return gn(`ConstructorParameters`,[e],t)}function Dh(e,t={}){return gy({},Eh(e,t))}function Oh(e){return zn(e)?hy({},{callstack:[]},ka(e.parameters)):Zn()}function kh(e,t,n,r){return an(Oh(hy(e,t,n)),{},r)}function Ah(e,t,n,r){return sy(e,[n])?kh(e,t,n,r):Eh(n,r)}function jh(e,t,n={}){return gn(`Exclude`,[e,t],n)}function Mh(e,t,n={}){return gy({},jh(e,t,n))}function Nh(e,t){return e.reduce((e,n)=>[...e,...Ph(n,t)],[])}function Ph(e,t){return Wd(am({},e,t))?[]:[e]}function Fh(e,t){return Xp(vr(e)?Nh(Jd(e.enum),t):or(e)?Nh(fm(e.anyOf),t):Ph(e,t))}function Ih(e,t,n,r,i){return an(Fh(hy(e,t,n),hy(e,t,r)),{},i)}function Lh(e,t,n,r,i){return sy(e,[n,r])?Ih(e,t,n,r,i):jh(n,r,i)}function Rh(e,t,n={}){return gn(`Extract`,[e,t],n)}function zh(e,t,n={}){return gy({},Rh(e,t,n))}function Bh(e,t){return e.reduce((e,n)=>[...e,...Vh(n,t)],[])}function Vh(e,t){return Wd(am({},e,t))?[e]:[]}function Hh(e,t){return Xp(vr(e)?Bh(Jd(e.enum),t):or(e)?Bh(fm(e.anyOf),t):Vh(e,t))}function Uh(e,t,n,r,i){return an(Hh(hy(e,t,n),hy(e,t,r)),{},i)}function Wh(e,t,n,r,i){return sy(e,[n,r])?Uh(e,t,n,r,i):Rh(n,r,i)}var Gh=RegExp(`^(?:0|[1-9][0-9]*)$`);function Kh(e){let t=`${e}`;return Gh.test(t)?parseInt(t):e}function qh(e){return ki(Kh(e))}function Jh(e){return e.map(e=>Yh(e))}function Yh(e){return br(e)?yr(Jh(e.allOf)):or(e)?ar(Jh(e.anyOf)):Fi(e)?qh(e.const):e}function Xh(e,t){return Wd(am({},Yh(t),zi()))?e:Fi(t)&&H(t.const,`length`)?zi():Zn()}function Zh(e,t){return rg(rm(e,t))}function Qh(e){return e.reduce((e,t)=>[...e,...rg(t)],[])}function $h(e){return Qh(Jd(e))}function eg(e){return rg(Yp(e))}function tg(e){return[`${e}`]}function ng(e){return rg(fa(e))}function rg(e){return dr(e)?Zh(e.$defs,e.$ref):vr(e)?$h(e.enum):br(e)?eg(e.allOf):Fi(e)?tg(e.const):Id(e)?ng(e.pattern):or(e)?Qh(e.anyOf):[]}function ig(e){return rg(e)}function ag(e,t){return t in e?[e[t]]:[]}function og(e,t){return t.reduce((t,n)=>[...t,...ag(e,n)],[])}function sg(e,t){return Xp(og(e,ig(t)))}function cg(e){return ki(Kh(e))}function lg(e){return e.map(e=>ug(e))}function ug(e){return br(e)?yr(lg(e.allOf)):or(e)?ar(lg(e.anyOf)):Fi(e)?cg(e.const):e}function dg(e,t){return e.reduceRight((e,n,r)=>Wd(am({},ki(r),t))?[n,...e]:e,[])}function fg(e,t){return Qp(dg(e,ug(t)))}function pg(e){return Qp(e)}function mg(e,t){return Fi(t)&&H(t.const,`length`)?ki(e.length):Bi(t)||Ci(t)?pg(e):fg(e,t)}function hg(e){return e.reduce((e,t)=>Ai(t)?[...e,ki(t)]:e,[])}function gg(e){return ar(hg(e))}function _g(e,t,n={}){return gn(`Index`,[e,t],n)}function vg(e,t,n={}){return gy({},_g(e,R(t)?gg(t):t,n))}function yg(e,t){return Dg(rm(e,t))}function bg(e,t){let n=Ie(e).filter(e=>!U(t,e)),r=Ie(t).filter(t=>!U(e,t)),i=Ie(e).filter(e=>U(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:Yp([e[r],t[r]])}),{});return P(P(a,o),s)}function xg(e){return e.reduce((e,t)=>bg(e,Dg(t)),{})}function Sg(e){return e}function Cg(e){return Dg(Pp(ka(e)))}function wg(e,t){return Ie(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:Xp([e[r],t[r]])}),{})}function Tg(e,t){let[n,...r]=e;return sn(n)?Tg(r,wg(t,Dg(n))):t}function Eg(e){let[t,...n]=e;return sn(t)?Tg(n,Dg(t)):Sr()}function Dg(e){return dr(e)?yg(e.$defs,e.$ref):br(e)?xg(e.allOf):or(e)?Eg(e.anyOf):Aa(e)?Cg(e.items):rr(e)?Sg(e.properties):{}}function Og(e){return nr(Dg(e))}function kg(e){return dr(e)||br(e)||or(e)?Og(e):e}function Ag(e,t){let n=kg(e);return An(n)?Xh(n.items,t):rr(n)?sg(n.properties,t):Aa(n)?mg(n.items,t):Zn()}function jg(e,t,n,r,i){return an(Ag(hy(e,t,n),hy(e,t,r)),{},i)}function Mg(e,t,n,r,i){return sy(e,[n,r])?jg(e,t,n,r,i):_g(n,r,i)}function Ng(e,t={}){return gn(`InstanceType`,[e],t)}function Pg(e,t={}){return gy({},Ng(e,t))}function Fg(e){return zn(e)?e.instanceType:Zn()}function Ig(e,t,n,r){return an(Fg(hy(e,t,n)),{},r)}function Lg(e,t,n,r={}){return sy(e,[n])?Ig(e,t,n,r):Ng(n,r)}function Rg(e,t,n,r,i){let a=py(e,{callstack:[]},n),o=dy(e,{callstack:[]},r);return an(Yp([...a,nr(o)]),{},i)}function zg(e,t,n,r,i){return sy(e,n)?Rg(e,t,n,r,i):fp(n,r,i)}function Bg(e,t={}){return gn(`KeyOf`,[e],t)}function Vg(e,t={}){return gy({},Bg(e,t))}function Hg(){return ar([zi(),Ji(),Vi()])}function Ug(e){return zi()}function Wg(e){return e.reduce((e,t)=>Ai(t)?[...e,ki(Kh(t))]:Sr(),[])}function Gg(e){return Qp(Wg(Ie(e)))}function Kg(e){return Sa(e)}function qg(e){return Qp(e.map((e,t)=>ki(t)))}function Jg(e){return dr(e)||br(e)||or(e)?Og(e):e}function Yg(e){let t=Jg(e);return Yn(t)?Hg():An(t)?Ug(t.items):rr(t)?Gg(t.properties):wa(t)?Kg(t):Aa(t)?qg(t.items):Zn()}function Xg(e,t,n,r){return an(Yg(hy(e,t,n)),{},r)}function Zg(e,t,n,r){return sy(e,[n])?Xg(e,t,n,r):Bg(n,r)}function Qg(e,t,n,r,i={}){return gn(`Mapped`,[e,t,n,r],i)}function $g(e,t,n,r,i={}){return gy({},Qg(e,t,n,r,i))}function e_(e){return n_(fa(e))}function t_(e){return e.reduce((e,t)=>[...e,...n_(t)],[])}function n_(e){return vr(e)?t_(Jd(e.enum)):Pi(e)||Ni(e)?[e]:Id(e)?e_(e.pattern):or(e)?t_(e.anyOf):[e]}function r_(e){return n_(e)}function i_(e){return Id(e)?fa(e.pattern):e}function a_(e,t,n,r,i,a){let o=P(e,{[n.name]:r}),s=i_(hy(o,t,i)),c=hy(o,t,a);return Ni(s)||Pi(s)?{[s.const]:c}:{}}function o_(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,a_(e,t,n,o,i,a)],[])}function s_(e){return e.reduce((e,t)=>[...e,nr(t)],[])}function c_(e,t,n,r,i,a){return Yp(s_(o_(e,t,n,r_(r),i,a)))}function l_(e,t,n,r,i,a,o){return an(c_(e,t,n,hy(e,t,r),i,a),{},o)}function u_(e,t,n,r,i,a,o){return sy(e,[r])?l_(e,t,n,r,i,a,o):Qg(n,r,i,a,o)}function d_(e,t){return Ie(e).filter(e=>t.includes(e)).reduce((t,n)=>({...t,[n]:tm(e,n,e[n])}),{})}function f_(e,t){return Ie(e).filter(e=>!t.includes(e)).reduce((t,n)=>({...t,[n]:hy(e,{callstack:[]},e[n])}),{})}function p_(e,t){let n=xp(e),r=d_(e,n),i=f_(e,n);return an({...r,...i},{},t)}function m_(e,t,n,r){return p_(P(e,n),r)}function h_(e,t={}){return gn(`NonNullable`,[e],t)}function g_(e,t={}){return gy({},h_(e,t))}function __(e){return Lh({},{callstack:[]},e,ar([Ii(),Ma()]),{})}function v_(e,t,n,r){return an(__(hy(e,t,n)),{},r)}function y_(e,t,n,r){return sy(e,[n])?v_(e,t,n,r):h_(n,r)}function b_(e){let t=Og(e);return rr(t)?t.properties:Sr()}function x_(e,t,n={}){return gn(`Omit`,[e,t],n)}function S_(e,t,n={}){return gy({},x_(e,R(t)?gg(t):t,n))}function C_(e,t){return Ie(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function w_(e,t){return nr(C_(b_(e),ig(t)))}function T_(e,t,n,r,i){return an(w_(hy(e,t,n),hy(e,t,r)),{},i)}function E_(e,t,n,r,i){return sy(e,[n,r])?T_(e,t,n,r,i):x_(n,r,i)}function D_(e,t){return gn(`Options`,[e,t],{})}function O_(e,t){return gy({},D_(e,t))}function k_(e,t,n,r){return an(hy(e,t,n),{},r)}function A_(e,t,n,r){return sy(e,[n])?k_(e,t,n,r):D_(n,r)}function j_(e,t={}){return gn(`Parameters`,[e],t)}function M_(e,t={}){return gy({},j_(e,t))}function N_(e){return Hn(e)?hy({},{callstack:[]},ka(e.parameters)):Zn()}function P_(e,t,n,r){return an(N_(hy(e,t,n)),{},r)}function F_(e,t,n,r){return sy(e,[n])?P_(e,t,n,r):j_(n,r)}function I_(e,t={}){return gn(`Partial`,[e],t)}function L_(e,t={}){return gy({},I_(e,t))}function R_(e,t){let n=H_(rm(e,t));return ur(P(e,{[t]:n}),t)}function z_(e){return Yp(e.map(e=>H_(e)))}function B_(e){return ar(e.map(e=>H_(e)))}function V_(e){return nr(Ie(e).reduce((t,n)=>({...t,[n]:Cn(e[n])}),{}))}function H_(e){return dr(e)?R_(e.$defs,e.$ref):br(e)?z_(e.allOf):or(e)?B_(e.anyOf):rr(e)?V_(e.properties):nr({})}function U_(e,t,n,r){return an(H_(hy(e,t,n)),{},r)}function W_(e,t,n,r){return sy(e,[n])?U_(e,t,n,r):I_(n,r)}function G_(e,t,n={}){return gn(`Pick`,[e,t],n)}function K_(e,t,n={}){return gy({},G_(e,R(t)?gg(t):t,n))}function q_(e,t){return Ie(e).reduce((n,r)=>t.includes(r)?P(n,{[r]:e[r]}):n,{})}function J_(e,t){return nr(q_(b_(e),ig(t)))}function Y_(e,t,n,r,i){return an(J_(hy(e,t,n),hy(e,t,r)),{},i)}function X_(e,t,n,r,i){return sy(e,[n,r])?Y_(e,t,n,r,i):G_(n,r,i)}function Z_(e,t={}){return gn(`ReadonlyType`,[e],t)}function Q_(e,t={}){return gy({},Z_(e,t))}function $_(e){return yn(kn(e))}function ev(e,t){let n=av(rm(e,t));return ur(P(e,{[t]:n}),t)}function tv(e){return Yp(e.map(e=>av(e)))}function nv(e){return nr(Ie(e).reduce((t,n)=>({...t,[n]:Dn(e[n])}),{}))}function rv(e){return yn(ka(e))}function iv(e){return ar(e.map(e=>av(e)))}function av(e){return An(e)?$_(e.items):dr(e)?ev(e.$defs,e.$ref):br(e)?tv(e.allOf):rr(e)?nv(e.properties):Aa(e)?rv(e.items):or(e)?iv(e.anyOf):e}function ov(e,t,n,r){return an(av(hy(e,t,n)),{},r)}function sv(e,t,n,r){return sy(e,[n])?ov(e,t,n,r):Z_(n,r)}function cv(e){return pa(ga,e)}function lv(e){return nr({true:e,false:e})}function uv(e,t){return Sv(Yd(e),t)}function dv(e,t){return pa(ma,t)}function fv(e,t){return Sv(Yp(e),t)}function pv(e,t){return B(e)||ve(e)?nr({[e]:t}):H(e,!1)?nr({false:t}):H(e,!0)?nr({true:t}):nr({})}function mv(e,t){return pa(ha,t)}function hv(e,t){return U(e,`pattern`)&&(B(e.pattern)||e.pattern instanceof RegExp)?pa(e.pattern.toString(),t):pa(ga,t)}function gv(e,t){return ta(Xi(e))?Sv(fa(e),t):pa(e,t)}function _v(e){return e.some(e=>Yi(e)||Bi(e)||Ci(e))}function vv(e,t){return H(_v(e),!0)?pa(ga,t):void 0}function yv(e,t){return e.reduce((e,n)=>Fi(n)&&(B(n.const)||ve(n.const))?{...e,[n.const]:t}:e,{})}function bv(e,t){return nr(yv(e,t))}function xv(e,t){let n=fm(e),r=vv(n,t);return sn(r)?r:bv(n,t)}function Sv(e,t){return Yn(e)?cv(t):vi(e)?lv(t):vr(e)?uv(e.enum,t):Ci(e)?dv(e,t):br(e)?fv(e.allOf,t):Fi(e)?pv(e.const,t):Bi(e)?mv(e,t):or(e)?xv(e.anyOf,t):Yi(e)?hv(e,t):Id(e)?gv(e.pattern,t):nr({})}function Cv(e,t,n,r,i){return an(Sv(hy(e,t,n),hy(e,t,r)),{},i)}function wv(e,t,n,r,i){return sy(e,[n])?Cv(e,t,n,r,i):_a(n,r,i)}function Tv(e,t,n,r){return r in e?yp([r],e,e[r])?n:hy(e,t,e[r]):n}function Ev(e,t){let n=Av(rm(e,t));return ur(P(e,{[t]:n}),t)}function Dv(e){return Yp(e.map(e=>Av(e)))}function Ov(e){return ar(e.map(e=>Av(e)))}function kv(e){return nr(Ie(e).reduce((t,n)=>({...t,[n]:xn(e[n])}),{}))}function Av(e){return dr(e)?Ev(e.$defs,e.$ref):br(e)?Dv(e.allOf):or(e)?Ov(e.anyOf):rr(e)?kv(e.properties):nr({})}function jv(e,t={}){return gn(`Required`,[e],t)}function Mv(e,t={}){return gy({},jv(e,t))}function Nv(e,t,n,r){return an(Av(hy(e,t,n)),{},r)}function Pv(e,t,n,r){return sy(e,[n])?Nv(e,t,n,r):jv(n,r)}function Fv(e,t={}){return gn(`ReturnType`,[e],t)}function Iv(e,t={}){return gy({},Fv(e,t))}function Lv(e){return Hn(e)?e.returnType:Zn()}function Rv(e,t,n,r){return an(Lv(hy(e,t,n)),{},r)}function zv(e,t,n,r){return sy(e,[n])?Rv(e,t,n,r):Fv(n,r)}function Bv(e){return e.join(`|`)}function Vv(e){return e.slice(1,e.length-1)}function Hv(e,t,n){return Qv(t,`${n}${e}`)}function Uv(e,t){return Qv(e,`${t}${mi}`)}function Wv(e,t){return Qv(e,`${t}${xi}`)}function Gv(e,t){return Qv(e,`${t}${Ri}`)}function Kv(e,t){return Zv(ar([ki(`false`),ki(`true`)]),e,t)}function qv(e,t){return Qv(e,`${t}.*`)}function Jv(e,t,n){return Qv(t,`${n}${Vv(e)}`)}function Yv(e,t,n,r=[]){return Xv(Jd(e),t,n)}function Xv(e,t,n,r=[]){let[i,...a]=e;return sn(i)?Xv(a,t,n,[...r,Zv(i,[],``)]):Qv(t,`${n}(${Bv(r)})`)}function Zv(e,t,n){return vr(e)?Yv(e.enum,t,n):Ci(e)?Wv(t,n):Fi(e)?Hv(e.const,t,n):gi(e)?Uv(t,n):vi(e)?Kv(t,n):Bi(e)?Gv(t,n):Yi(e)?qv(t,n):Id(e)?Jv(e.pattern,t,n):or(e)?Xv(e.anyOf,t,n):Xn}function Qv(e,t){let[n,...r]=e;return sn(n)?Zv(n,r,t):t}function $v(e){return`^${Qv(e,``)}$`}function ey(e){return na($v(e))}function ty(e,t,n,r){return an(ey(py(e,t,n)),{},r)}function ny(e,t,n,r){return sy(e,n)?ty(e,t,n,r):Md(n,r)}function ry(e){return Ea(e)?Aa(e.items)?iy(e.items.items):mr(e.items)||Gn(e.items)?[e]:[Zn()]:[e]}function iy(e){return e.reduce((e,t)=>[...e,...ry(t)],[])}function ay(e,t){return t in e}function oy(e,t){return br(t)?sy(e,t.allOf):or(t)?sy(e,t.anyOf):Gn(t)?ay(e,t.$ref):!0}function sy(e,t){let[n,...r]=t;return sn(n)?oy(e,n)?sy(e,r):!1:!0}function cy(e,t,n){return hn(e)?cy(e.type,`remove`,n):dn(e)?cy(e.type,t,`remove`):pn(e)?cy(e.type,`add`,n):ln(e)?cy(e.type,t,`add`):[e,t,n]}function ly(e,t){return H(e,`remove`)?Tn(t):H(e,`add`)?En(t):t}function uy(e,t){return H(e,`remove`)?xn(t):H(e,`add`)?Sn(t):t}function dy(e,t,n){return Ie(n).reduce((r,i)=>({...r,[i]:hy(e,t,n[i])}),{})}function fy(e,t,n){return iy(py(e,t,n))}function py(e,t,n){return n.map(n=>hy(e,t,n))}function my(e,t,n,r,i){return H(n,`Awaited`)?Xm(e,t,r[0],i):H(n,`Capitalize`)?hh(e,t,r[0],i):H(n,`Conditional`)?Th(e,t,r[0],r[1],r[2],r[3],i):H(n,`ConstructorParameters`)?Ah(e,t,r[0],i):H(n,`Evaluate`)?ym(e,t,r[0],i):H(n,`Exclude`)?Lh(e,t,r[0],r[1],i):H(n,`Extract`)?Wh(e,t,r[0],r[1],i):H(n,`Index`)?Mg(e,t,r[0],r[1],i):H(n,`InstanceType`)?Lg(e,t,r[0],i):H(n,`Interface`)?zg(e,t,r[0],r[1],i):H(n,`KeyOf`)?Zg(e,t,r[0],i):H(n,`Lowercase`)?_h(e,t,r[0],i):H(n,`Mapped`)?u_(e,t,r[0],r[1],r[2],r[3],i):H(n,`Module`)?m_(e,t,r[0],i):H(n,`NonNullable`)?y_(e,t,r[0],i):H(n,`Pick`)?X_(e,t,r[0],r[1],i):H(n,`Options`)?A_(e,t,r[0],r[1]):H(n,`Parameters`)?F_(e,t,r[0],i):H(n,`Partial`)?W_(e,t,r[0],i):H(n,`Omit`)?E_(e,t,r[0],r[1],i):H(n,`ReadonlyType`)?sv(e,t,r[0],i):H(n,`Record`)?wv(e,t,r[0],r[1],i):H(n,`Required`)?Pv(e,t,r[0],i):H(n,`ReturnType`)?zv(e,t,r[0],i):H(n,`TemplateLiteral`)?ny(e,t,r[0],i):H(n,`Uncapitalize`)?yh(e,t,r[0],i):H(n,`Uppercase`)?xh(e,t,r[0],i):gn(n,r,i)}function hy(e,t,n){let r=bn(n),i=cy(n,On(n)?`add`:`none`,wn(n)?`add`:`none`),a=Ln(i[0])?i[0].Clone():i[0],o=Gn(a)?Tv(e,t,a,a.$ref):An(a)?kn(hy(e,t,a.items),jn(a)):Nn(a)?Mn(hy(e,t,a.iteratorItems),Pn(a)):qm(a)?Wm(e,t,a.target,a.arguments):zn(a)?Rn(py(e,t,a.parameters),hy(e,t,a.instanceType),Bn(a)):_n(a)?my(e,t,a.action,a.parameters,a.options):Hn(a)?Vn(py(e,t,a.parameters),hy(e,t,a.returnType),Un(a)):br(a)?yr(py(e,t,a.allOf),xr(a)):Ti(a)?wi(hy(e,t,a.iteratorItems),Ei(a)):rr(a)?nr(dy(e,t,a.properties),ir(a)):Ki(a)?Gi(hy(e,t,a.item),qi(a)):wa(a)?ba(xa(a),hy(e,t,Ca(a))):Ea(a)?Ta(hy(e,t,a.items)):Aa(a)?ka(fy(e,t,a.items),ja(a)):or(a)?ar(py(e,t,a.anyOf),sr(a)):a,s=r?yn(o):o;return ly(i[1],uy(i[2],s))}function gy(e,t){return hy(e,{callstack:[]},t)}function _y(e,t={}){return gn(`Awaited`,[e],t)}function vy(e,t={}){return gy({},_y(e,t))}function yy(e,t={}){return gn(`Evaluate`,[e],t)}function by(e,t={}){return gy({},yy(e,t))}function xy(e,t={}){return gn(`Module`,[e],t)}function Sy(e,t={}){return gy({},xy(e,t))}function Cy(...e){let[t,n,r]=fr(e,{2:(e,t)=>B(e)?[{},e,t]:[e,t,{}],3:(e,t,n)=>[e,t,n],1:e=>[{},e,{}]}),i=Ad(n);return an(R(i)&&H(i.length,2)?hy(t,{callstack:[]},i[0]):Zn(),{},r)}var wy=s({Any:()=>Jn,Array:()=>kn,AsyncIterator:()=>Mn,Awaited:()=>vy,Base:()=>In,BigInt:()=>hi,Boolean:()=>_i,Call:()=>Km,Capitalize:()=>rh,Codec:()=>si,Conditional:()=>Ch,Constructor:()=>Rn,ConstructorParameters:()=>Dh,Cyclic:()=>ur,Decode:()=>ci,DecodeBuilder:()=>oi,Encode:()=>li,EncodeBuilder:()=>ai,Enum:()=>_r,Evaluate:()=>by,Exclude:()=>Mh,Extends:()=>am,ExtendsResult:()=>Ld,Extract:()=>zh,Function:()=>Vn,Generic:()=>Kn,Identifier:()=>yi,Immutable:()=>yn,Index:()=>vg,Infer:()=>pr,InstanceType:()=>Pg,Instantiate:()=>gy,Integer:()=>Si,Interface:()=>mp,Intersect:()=>yr,IsAny:()=>Yn,IsArray:()=>An,IsAsyncIterator:()=>Nn,IsBase:()=>Ln,IsBigInt:()=>gi,IsBoolean:()=>vi,IsCall:()=>qm,IsCodec:()=>ui,IsConstructor:()=>zn,IsCyclic:()=>dr,IsEnum:()=>vr,IsFunction:()=>Hn,IsGeneric:()=>qn,IsIdentifier:()=>bi,IsImmutable:()=>bn,IsInfer:()=>mr,IsInteger:()=>Ci,IsIntersect:()=>br,IsIterator:()=>Ti,IsKind:()=>on,IsLiteral:()=>Fi,IsNever:()=>Qn,IsNull:()=>Li,IsNumber:()=>Bi,IsObject:()=>rr,IsOptional:()=>wn,IsParameter:()=>Wi,IsPromise:()=>Ki,IsReadonly:()=>On,IsRecord:()=>wa,IsRef:()=>Gn,IsRefine:()=>pi,IsRest:()=>Ea,IsSchema:()=>sn,IsString:()=>Yi,IsSymbol:()=>Hi,IsTemplateLiteral:()=>Id,IsThis:()=>Oa,IsTuple:()=>Aa,IsUndefined:()=>Na,IsUnion:()=>or,IsUnknown:()=>lr,IsUnsafe:()=>Fa,IsVoid:()=>La,Iterator:()=>wi,KeyOf:()=>Vg,Literal:()=>ki,Lowercase:()=>ah,Mapped:()=>$g,Module:()=>Sy,Never:()=>Zn,NonNullable:()=>g_,Null:()=>Ii,Number:()=>zi,Object:()=>nr,Omit:()=>S_,Optional:()=>Cn,Options:()=>O_,Parameter:()=>Ui,Parameters:()=>M_,Partial:()=>L_,Pick:()=>K_,Promise:()=>Gi,Readonly:()=>Dn,ReadonlyType:()=>Q_,Record:()=>ya,RecordKey:()=>Sa,RecordKeyAsPattern:()=>xa,RecordValue:()=>Ca,Ref:()=>Wn,Refine:()=>fi,Required:()=>Mv,Rest:()=>Ta,ReturnType:()=>Iv,Script:()=>Cy,String:()=>Ji,Symbol:()=>Vi,TemplateLiteral:()=>Fd,This:()=>Da,Tuple:()=>ka,Uncapitalize:()=>sh,Undefined:()=>Ma,Union:()=>ar,Unknown:()=>cr,Unsafe:()=>Pa,Uppercase:()=>lh,Void:()=>Ia}),Ty=[0,31,28,31,30,31,30,31,31,30,31,30,31],Ey=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function Dy(e){return e%4==0&&(e%100!=0||e%400==0)}function Oy(e){let t=Ey.exec(e);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&Dy(n)?29:Ty[r])}var ky=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function Ay(e,t=!0){let n=ky.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4]===`-`?-1:1,s=+(n[5]||0),c=+(n[6]||0);if(s>23||c>59||t&&!n[4]&&e.toLowerCase().indexOf(`z`)===-1)return!1;if(r<=23&&i<=59&&a<60)return!0;let l=i-c*o,u=r-s*o-(l<0?1:0);return(u===23||u===-1)&&(l===59||l===-1)&&a<61}function jy(e,t=!0){let n=e.split(/T/i);return n.length===2&&Oy(n[0])&&Ay(n[1],t)}var My=/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/;function Ny(e){return My.test(e)}function Py(e,t,n){let r=0,i=0,a=0,o=0;for(let s=t;s<n;s++){let t=e.charCodeAt(s);if(t===46){if(a===0||i>255||o===48&&a>1)return!1;r++,i=0,a=0,o=0}else if(t>=48&&t<=57)a===0&&(o=t),i=i*10+(t-48),a++;else return!1}return r===3&&a>0&&i<=255&&!(o===48&&a>1)}function Fy(e){return Py(e,0,e.length)}function Iy(e){let t=e.indexOf(`.`),n=e.indexOf(`@`),r=e[0]===`"`&&e[n-1]===`"`,i=e[n+1]===`[`&&e[e.length-1]===`]`,a=i&&e.indexOf(`:`,n)!==-1,o=i&&!a&&Py(e,n+2,e.length-1);return n>0&&n<e.length-1&&!(!r&&t===0||!r&&t!==-1&&e.indexOf(`.`,t+1)===t+1||t!==-1&&e.indexOf(`@`,t)===t+1||!r&&e.indexOf(` `)!==-1||e.indexOf(`,`)!==-1||i&&!o&&!a||e.indexOf(`=`,n)!==-1)}function Ly(e){if(e.length>253||e.length===0)return!1;let t=0,n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i===46){if(r===e.length-1&&t<r)break;let i=r-t;if(i===0||i>63||e.charCodeAt(t)===45||n===45)return!1;t=r+1}else if(!(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45))return!1;n=i}let r=e.length-t,i=e.charCodeAt(t),a=e.charCodeAt(e.length-1);return r>0&&r<=63&&i!==45&&a!==45}function Ry(e){return Iy(e)}function zy(e){return e>=12352&&e<=12447||e>=12448&&e<=12543&&e!==12539||e>=19968&&e<=40959}function By(e){if(e.length===0||e.includes(` `))return!1;let t=e.normalize(`NFC`).replace(/[\u002E\u3002\uFF0E\uFF61]/g,`.`);if(t.length>253)return!1;let n=t.split(`.`);for(let e of n){if(e.length===0||e.length>63||e.charCodeAt(0)===45||e.charCodeAt(e.length-1)===45)return!1;if((e.charCodeAt(0)===120||e.charCodeAt(0)===88)&&(e.charCodeAt(1)===110||e.charCodeAt(1)===78)&&e.charCodeAt(2)===45&&e.charCodeAt(3)===45){let t=e.slice(4);if(t.length<2||t.includes(`---`))return!1;continue}let t=!1,n=!1;for(let r=0;r<e.length;r++){let i=e.codePointAt(r)??0;if(i===12334||i===12335||i===12337||i===12338||i===12339||i===12340||i===12341||i===12347||i===1600||i===2042||r===0&&(i===2307||i===768||i===1160))return!1;if(i===183){if(r===0||r===e.length-1)return!1;let t=e.codePointAt(r-1)??0,n=e.codePointAt(r+1)??0;if(t!==108&&t!==76||n!==108&&n!==76)return!1}if(i===12539){if(e.length===1)return!1;if(r===0){if(!zy(e.codePointAt(r+1)??0))return!1}else{let t=e.codePointAt(r-1)??0,n=e.codePointAt(r+1)??0;if(!zy(t)||!zy(n))return!1}}if(i===885){if(r===e.length-1)return!1;let t=e.codePointAt(r+1)??0;if(t<880||t>1023)return!1}if(i===1523||i===1524){if(r===0)return!1;let t=e.codePointAt(r-1)??0;if(t<1488||t>1514)return!1}if(i===8205&&(r===0||(e.codePointAt(r-1)??0)!==2381))return!1;i>=1632&&i<=1641&&(t=!0),i>=1776&&i<=1785&&(n=!0)}if(t&&n)return!1}return!0}function Vy(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Hy(e){let t=e.length;if(t===0)return!1;let n=0,r=!1,i=0;if(e.charCodeAt(0)===58&&e.charCodeAt(1)===58){if(t===2)return!0;r=!0,i=2}for(;i<t;){let a=0,o=i;for(;i<t&&Vy(e.charCodeAt(i));)i++,a++;if(a===0)return!1;let s=e.charCodeAt(i);if(s===46){if(!Py(e,o,t))return!1;n+=2,i=t;break}if(a>4)return!1;if(n++,i===t)break;if(s!==58)return!1;if(i++,e.charCodeAt(i)===58){if(r||e.charCodeAt(i+1)===58)return!1;if(r=!0,i++,i===t)break}}return r?n<=7:n===8}function Uy(e){try{return new URL(e,`http://example.com`),!0}catch{return!1}}function Wy(e){if(e.includes(` `)||e.includes(`\\`)||/[\x00-\x1F\x7F]/.test(e)||/%(?![0-9a-fA-F]{2})/.test(e))return!1;if(e===``)return!0;let t=e.indexOf(`:`);return t>0&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e.substring(0,t))?Uy(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:Uy(e)}function Gy(e){try{return new URL(e),!0}catch{return!1}}var Ky=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function qy(e){return Ky.test(e)}var Jy=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function Yy(e){return Jy.test(e)}function Xy(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var Zy=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function Qy(e){return Zy.test(e)}var $y=/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i;function eb(e){return $y.test(e)}var tb=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;function nb(e){return tb.test(e)}function rb(e){return e>=97&&e<=122||e>=65&&e<=90}function ib(e){return rb(e)||e>=48&&e<=57}function ab(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function ob(e){return ib(e)||e===43||e===45||e===46}function sb(e){return ib(e)||e===45||e===46||e===95||e===126}function cb(e){return e===33||e===36||e===38||e===39||e===40||e===41||e===42||e===43||e===44||e===59||e===61}function lb(e){return sb(e)||cb(e)||e===58||e===64}function ub(e){let t=e.length;if(t===0||!rb(e.charCodeAt(0)))return!1;let n=1;for(;n<t;){let t=e.charCodeAt(n);if(t===58)break;if(!ob(t))return!1;n++}if(e.charCodeAt(n)!==58)return!1;if(n++,e.charCodeAt(n)===47&&e.charCodeAt(n+1)===47){n+=2;let r=n,i=-1;for(let r=n;r<t;r++){let t=e.charCodeAt(r);if(t===64){i=r;break}if(t===47||t===63||t===35)break}if(i!==-1){for(let t=r;t<i;t++){let n=e.charCodeAt(t);if(n===91||n===93)return!1;if(n===37){if(t+2>=i||!ab(e.charCodeAt(t+1))||!ab(e.charCodeAt(t+2)))return!1;t+=2}else if(!sb(n)&&!cb(n)&&n!==58)return!1}n=i+1}if(e.charCodeAt(n)===91){for(n++;n<t&&e.charCodeAt(n)!==93;)n++;if(e.charCodeAt(n)!==93)return!1;n++}else for(;n<t;){let t=e.charCodeAt(n);if(t===47||t===63||t===35||t===58)break;if(t<128&&!sb(t)&&!cb(t))return!1;n++}if(e.charCodeAt(n)===58)for(n++;n<t;){let t=e.charCodeAt(n);if(t===47||t===63||t===35)break;if(t<48||t>57)return!1;n++}}for(;n<t;){let r=e.charCodeAt(n);if(r===37){if(n+2>=t||!ab(e.charCodeAt(n+1))||!ab(e.charCodeAt(n+2)))return!1;n+=2}else if(r>127)return!1;else if(!(lb(r)||r===47||r===63||r===35))return!1;n++}return!0}var db=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;function fb(e){return db.test(e)}var pb=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function mb(e){return pb.test(e)}var hb=new Map;function gb(){hb.clear()}function _b(){return[...hb.entries()]}function vb(e,t){hb.set(e,t)}function yb(e){return hb.has(e)}function bb(e){return hb.get(e)}function xb(e,t){return hb.get(e)?.(t)??!0}function Sb(){gb(),hb.set(`date-time`,jy),hb.set(`date`,Oy),hb.set(`duration`,Ny),hb.set(`email`,Iy),hb.set(`hostname`,Ly),hb.set(`idn-email`,Ry),hb.set(`idn-hostname`,By),hb.set(`ipv4`,Fy),hb.set(`ipv6`,Hy),hb.set(`iri-reference`,Wy),hb.set(`iri`,Gy),hb.set(`json-pointer-uri-fragment`,qy),hb.set(`json-pointer`,Yy),hb.set(`regex`,Xy),hb.set(`relative-json-pointer`,Qy),hb.set(`time`,Ay),hb.set(`uri-reference`,eb),hb.set(`uri-template`,nb),hb.set(`uri`,ub),hb.set(`url`,fb),hb.set(`uuid`,mb)}Sb();var Cb=s({Clear:()=>gb,Entries:()=>_b,Get:()=>bb,Has:()=>yb,IsDate:()=>Oy,IsDateTime:()=>jy,IsDuration:()=>Ny,IsEmail:()=>Iy,IsHostname:()=>Ly,IsIPv4:()=>Fy,IsIPv6:()=>Hy,IsIdnEmail:()=>Ry,IsIdnHostname:()=>By,IsIri:()=>Gy,IsIriReference:()=>Wy,IsJsonPointer:()=>Yy,IsJsonPointerUriFragment:()=>qy,IsRegex:()=>Xy,IsRelativeJsonPointer:()=>Qy,IsTime:()=>Ay,IsUri:()=>ub,IsUriReference:()=>eb,IsUriTemplate:()=>nb,IsUrl:()=>fb,IsUuid:()=>mb,Reset:()=>Sb,Set:()=>vb,Test:()=>xb}),wb=Cb;function Tb(e){return be(e)&&U(e,`check`)&&U(e,`errors`)&&me(e.check)&&me(e.errors)}function Eb(e){return U(e,`~guard`)&&Tb(e[`~guard`])}function Db(e){return U(e,`~refine`)&&R(e[`~refine`])&&Me(e[`~refine`],0,e=>be(e)&&U(e,`refine`)&&U(e,`message`)&&me(e.refine)&&B(e.message))}function Ob(e){return be(e)&&!R(e)}function kb(e){return fe(e)}function Ab(e){return Ob(e)||kb(e)}function jb(e){return U(e,`additionalItems`)&&Ab(e.additionalItems)}function Mb(e){return U(e,`additionalProperties`)&&Ab(e.additionalProperties)}function Nb(e){return U(e,`allOf`)&&R(e.allOf)&&e.allOf.every(e=>Ab(e))}function Pb(e){return U(e,`$anchor`)&&B(e.$anchor)}function Fb(e){return U(e,`anyOf`)&&R(e.anyOf)&&e.anyOf.every(e=>Ab(e))}function Ib(e){return U(e,`const`)}function Lb(e){return U(e,`contains`)&&Ab(e.contains)}function Rb(e){return U(e,`default`)}function zb(e){return U(e,`dependencies`)&&be(e.dependencies)&&Object.values(e.dependencies).every(e=>Ab(e)||R(e)&&e.every(e=>B(e)))}function Bb(e){return U(e,`dependentRequired`)&&be(e.dependentRequired)&&Object.values(e.dependentRequired).every(e=>R(e)&&e.every(e=>B(e)))}function Vb(e){return U(e,`dependentSchemas`)&&be(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(e=>Ab(e))}function Hb(e){return U(e,`$dynamicAnchor`)&&B(e.$dynamicAnchor)}function Ub(e){return U(e,`else`)&&Ab(e.else)}function Wb(e){return U(e,`enum`)&&R(e.enum)}function Gb(e){return U(e,`exclusiveMaximum`)&&(ve(e.exclusiveMaximum)||z(e.exclusiveMaximum))}function Kb(e){return U(e,`exclusiveMinimum`)&&(ve(e.exclusiveMinimum)||z(e.exclusiveMinimum))}function qb(e){return U(e,`format`)&&B(e.format)}function Jb(e){return U(e,`$id`)&&B(e.$id)}function Yb(e){return U(e,`if`)&&Ab(e.if)}function Xb(e){return U(e,`items`)&&(Ab(e.items)||R(e.items)&&e.items.every(e=>Ab(e)))}function Zb(e){return Xb(e)&&R(e.items)}function Qb(e){return U(e,`maximum`)&&(ve(e.maximum)||z(e.maximum))}function $b(e){return U(e,`maxContains`)&&ve(e.maxContains)}function ex(e){return U(e,`maxItems`)&&ve(e.maxItems)}function tx(e){return U(e,`maxLength`)&&ve(e.maxLength)}function nx(e){return U(e,`maxProperties`)&&ve(e.maxProperties)}function rx(e){return U(e,`minimum`)&&(ve(e.minimum)||z(e.minimum))}function ix(e){return U(e,`minContains`)&&ve(e.minContains)}function ax(e){return U(e,`minItems`)&&ve(e.minItems)}function ox(e){return U(e,`minLength`)&&ve(e.minLength)}function sx(e){return U(e,`minProperties`)&&ve(e.minProperties)}function cx(e){return U(e,`multipleOf`)&&(ve(e.multipleOf)||z(e.multipleOf))}function lx(e){return U(e,`not`)&&Ab(e.not)}function ux(e){return U(e,`oneOf`)&&R(e.oneOf)&&e.oneOf.every(e=>Ab(e))}function dx(e){return U(e,`pattern`)&&(B(e.pattern)||e.pattern instanceof RegExp)}function fx(e){return U(e,`patternProperties`)&&be(e.patternProperties)&&Object.values(e.patternProperties).every(e=>Ab(e))}function px(e){return U(e,`prefixItems`)&&R(e.prefixItems)&&e.prefixItems.every(e=>Ab(e))}function mx(e){return U(e,`properties`)&&be(e.properties)&&Object.values(e.properties).every(e=>Ab(e))}function hx(e){return U(e,`propertyNames`)&&(be(e.propertyNames)||Ab(e.propertyNames))}function gx(e){return U(e,`$recursiveAnchor`)&&fe(e.$recursiveAnchor)}function _x(e){return gx(e)&&H(e.$recursiveAnchor,!0)}function vx(e){return U(e,`$recursiveRef`)&&B(e.$recursiveRef)}function yx(e){return U(e,`$ref`)&&B(e.$ref)}function bx(e){return U(e,`required`)&&R(e.required)&&e.required.every(e=>B(e))}function xx(e){return U(e,`then`)&&Ab(e.then)}function Sx(e){return U(e,`type`)&&(B(e.type)||R(e.type)&&e.type.every(e=>B(e)))}function Cx(e){return U(e,`uniqueItems`)&&fe(e.uniqueItems)}function wx(e){return U(e,`unevaluatedItems`)&&Ab(e.unevaluatedItems)}function Tx(e){return U(e,`unevaluatedProperties`)&&Ab(e.unevaluatedProperties)}function Ex(e){return wx(e)||Tx(e)||Ie(e).some(t=>Ox(e[t]))}function Dx(e){return e.some(e=>Ox(e))}function Ox(e){return R(e)?Dx(e):be(e)?Ex(e):!1}function kx(e,t){return Ox(t)||Ie(e).some(t=>Ox(e[t]))}var Ax=class{constructor(e){this.hasUnevaluated=e}UseUnevaluated(){return this.hasUnevaluated}AddIndex(e){return St(wt(`context`,`AddIndex`),[e])}AddKey(e){return St(wt(`context`,`AddKey`),[e])}Merge(e){return St(wt(`context`,`Merge`),[e])}},jx=class{constructor(){this.indices=new Set,this.keys=new Set}AddIndex(e){return this.indices.add(e),!0}AddKey(e){return this.keys.add(e),!0}GetIndices(){return this.indices}GetKeys(){return this.keys}Merge(e){for(let t of e)t.indices.forEach(e=>this.indices.add(e)),t.keys.forEach(e=>this.keys.add(e));return!0}},Mx=class extends jx{constructor(e){super(),this.callback=e}AddError(e){return this.callback(e),!1}},Nx=class extends Mx{constructor(){super(e=>this.errors.push(e)),this.errors=[]}AddError(e){return this.errors.push(e),!1}GetErrors(){return this.errors}},Px=`external_`,Fx=0,Ix={identifier:`${Px}${Fx}`,variables:[]};function Lx(){Ix.identifier=`${Px}${Fx}`,Ix.variables=[],Fx+=1}function Rx(e){let t=`${Ix.identifier}[${Ix.variables.length}]`;return Ix.variables.push(e),t}function zx(){return Ix}function Bx(e,t,n,r){return St(wt(wt(Rx(n),`~guard`),`check`),[r])}function Vx(e,t,n,r){return n[`~guard`].check(r)}function Hx(e,t,n,r,i,a){return i[`~guard`].check(a)||t.AddError({keyword:`~guard`,schemaPath:n,instancePath:r,params:{errors:i[`~guard`].errors(a)}})}function Ux(e,t,n,r){return ht(Rx(n[`~refine`].map(e=>e)),Tt(0),[`refinement`,`_`],St(wt(`refinement`,`refine`),[r]))}function Wx(e,t,n,r){return Me(n[`~refine`],0,(e,t)=>e.refine(r))}function Gx(e,t,n,r,i,a){return Ne(i[`~refine`],0,(e,i)=>e.refine(a)||t.AddError({keyword:`~refine`,schemaPath:n,instancePath:r,params:{index:i,message:e.message}}))}var Kx=0;function qx(){return`var_${Kx++}`}function Jx(e){return Xb(e)&&R(e.items)}function Yx(e,t,n,r){if(!Jx(n))return Tt(!0);let[i,a]=[qx(),qx()],o=Qw(e,t,n.additionalItems,i),s=ut(a,Tt(n.items.length)),c=t.AddIndex(a),l=t.UseUnevaluated()?Ge(s,We(o,c)):Ge(s,o);return St(wt(r,`every`),[xt([i,a],l)])}function Xx(e,t,n,r){return Jx(n)?r.every((r,i)=>Ce(i,n.items.length)||$w(e,t,n.additionalItems,r)&&t.AddIndex(i)):!0}function Zx(e,t,n,r,i,a){return Jx(i)?a.every((a,o)=>{let s=`${n}/additionalItems`,c=`${r}/${o}`;return Ce(o,i.items.length)||eT(e,t,s,c,i.additionalItems,a)&&t.AddIndex(o)}):!0}function Qx(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}$`}function $x(e){let t=[];return fx(e)&&t.push(...Ie(e.patternProperties)),mx(e)&&t.push(...Ie(e.properties).map(Qx)),H(t.length,0)?`(?!)`:`(${t.join(`|`)})`}function eS(e,t,n){return bx(t)&&mx(t)&&!fx(t)&&H(t.additionalProperties,!1)&&H(Ie(t.properties).length,t.required.length)}function tS(e,t,n){return ct(wt(St(wt(`Object`,`getOwnPropertyNames`),[n]),`length`),Tt(t.required.length))}function nS(e,t,n,r){let[i,a]=[qx(),qx()],o=Rx(new RegExp($x(n))),s=Qw(e,t,n.additionalProperties,`${r}[${i}]`),c=St(wt(o,`test`),[i]),l=t.AddKey(i),u=t.UseUnevaluated()?Ge(c,We(s,l)):Ge(c,s);return ht(_t(r),Tt(0),[i,a],u)}function rS(e,t,n,r){return eS(t,n,r)?tS(t,n,r):nS(e,t,n,r)}function iS(e,t,n,r){let i=new RegExp($x(n));return Me(Ie(r),0,(a,o)=>i.test(a)||$w(e,t,n.additionalProperties,r[a])&&t.AddKey(a))}function aS(e,t,n,r,i,a){let o=new RegExp($x(i)),s=[];return Ne(Ie(a),0,(c,l)=>{let u=`${n}/additionalProperties`,d=`${r}/${c}`,f=new Nx,p=o.test(c)||eT(e,f,u,d,i.additionalProperties,a[c])&&t.AddKey(c);return p||s.push(c),p})||t.AddError({keyword:`additionalProperties`,schemaPath:n,instancePath:r,params:{additionalProperties:s}})}function oS(e,t,n,r,i){let a=Ot(`results`,`[]`),o=n.map((e,t)=>Ot(`context_${t}`,Ct(`CheckContext`,[]))),s=n.map((n,i)=>Ot(`condition_${i}`,St(xt([`context`],Qw(e,t,n,r)),[`context_${i}`]))),c=n.map((e,t)=>kt(`condition_${t}`,St(wt(`results`,`push`),[`context_${t}`]))),l=At(We(i,t.Merge(`results`)));return St(xt([],Dt([a,...o,...s,...c,l])),[])}function sS(e,t,n,r){return oS(e,t,n.allOf,r,ct(wt(`results`,`length`),Tt(n.allOf.length)))}function cS(e,t,n,r){return jt(n.allOf.map(n=>Qw(e,t,n,r)))}function lS(e,t,n,r){return t.UseUnevaluated()?sS(e,t,n,r):cS(e,t,n,r)}function uS(e,t,n,r){let i=n.allOf.reduce((t,n)=>{let i=new jx;return $w(e,i,n,r)?[...t,i]:t},[]);return H(i.length,n.allOf.length)&&t.Merge(i)}function dS(e,t,n,r,i,a){let o=[],s=i.allOf.reduce((t,i,s)=>{let c=`${n}/allOf/${s}`,l=new Nx,u=eT(e,l,c,r,i,a);return u||o.push(l),u?[...t,l]:t},[]),c=H(s.length,i.allOf.length)&&t.Merge(s);return c||o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),c}function fS(e,t,n,r){return oS(e,t,n.anyOf,r,lt(wt(`results`,`length`),Tt(0)))}function pS(e,t,n,r){return Mt(n.anyOf.map(n=>Qw(e,t,n,r)))}function mS(e,t,n,r){return t.UseUnevaluated()?fS(e,t,n,r):pS(e,t,n,r)}function hS(e,t,n,r){let i=n.anyOf.reduce((t,n,i)=>{let a=new jx;return $w(e,a,n,r)?[...t,a]:t},[]);return Se(i.length,0)&&t.Merge(i)}function gS(e,t,n,r,i,a){let o=[],s=i.anyOf.reduce((t,i,s)=>{let c=new Nx,l=eT(e,c,`${n}/anyOf/${s}`,r,i,a);return l||o.push(c),l?[...t,c]:t},[]),c=Se(s.length,0)&&t.Merge(s);return c||o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),c||t.AddError({keyword:`anyOf`,schemaPath:n,instancePath:r,params:{}})}function _S(e,t,n,r){return Tt(!!n)}function vS(e,t,n,r){return n}function yS(e,t,n,r,i,a){return vS(e,t,i,a)||t.AddError({keyword:`boolean`,schemaPath:n,instancePath:r,params:{}})}function bS(e,t,n,r){return Oe(n.const)?ct(r,Tt(n.const)):yt(r,Rx(n.const))}function xS(e,t,n,r){return Oe(n.const)?H(r,n.const):Ve(r,n.const)}function SS(e,t,n,r,i,a){return xS(e,t,i,a)||t.AddError({keyword:`const`,schemaPath:n,instancePath:r,params:{allowedValue:i.const}})}function CS(e){return!(ix(e)&&H(e.minContains,0))}function wS(e,t,n,r){if(!CS(n))return Tt(!0);let i=qx();return We(Ke(ct(wt(r,`length`),Tt(0))),St(wt(r,`some`),[xt([i],Qw(e,t,n.contains,i))]))}function TS(e,t,n,r){return CS(n)?!H(r.length,0)&&r.some(r=>$w(e,t,n.contains,r)):!0}function ES(e,t,n,r,i,a){return TS(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:1}})}function DS(e,t,n,r){return Ge(ct(wt(_t(r),`length`),Tt(0)),jt(Fe(n.dependencies).map(([n,i])=>{let a=Ke(vt(r,Tt(n))),o=Qw(e,t,i,r);return Ge(a,R(i)?(e=>jt(e.map(e=>vt(r,Tt(e)))))(i):o)})))}function OS(e,t,n,r){let i=H(Ie(r).length,0),a=Me(Fe(n.dependencies),0,([n,i])=>!U(r,n)||(R(i)?i.every(e=>U(r,e)):$w(e,t,i,r)));return i||a}function kS(e,t,n,r,i,a){let o=H(Ie(a).length,0),s=Ne(Fe(i.dependencies),0,([i,o])=>{let s=`${n}/dependencies/${i}`;return!U(a,i)||(R(o)?o.every(e=>U(a,e)||t.AddError({keyword:`dependencies`,schemaPath:n,instancePath:r,params:{property:i,dependencies:o}})):eT(e,t,s,r,o,a))});return o||s}function AS(e,t,n,r){return Ge(ct(wt(_t(r),`length`),Tt(0)),jt(Fe(n.dependentRequired).map(([e,t])=>Ge(Ke(vt(r,Tt(e))),jt(t.map(e=>vt(r,Tt(e))))))))}function jS(e,t,n,r){let i=H(Ie(r).length,0),a=Me(Fe(n.dependentRequired),0,([e,t])=>!U(r,e)||t.every(e=>U(r,e)));return i||a}function MS(e,t,n,r,i,a){let o=H(Ie(a).length,0),s=Ne(Fe(i.dependentRequired),0,([e,i])=>!U(a,e)||Ne(i,0,o=>U(a,o)||t.AddError({keyword:`dependentRequired`,schemaPath:n,instancePath:r,params:{property:e,dependencies:i}})));return o||s}function NS(e,t,n,r){return Ge(ct(wt(_t(r),`length`),Tt(0)),jt(Fe(n.dependentSchemas).map(([n,i])=>Ge(Ke(vt(r,Tt(n))),Qw(e,t,i,r)))))}function PS(e,t,n,r){let i=H(Ie(r).length,0),a=Me(Fe(n.dependentSchemas),0,([n,i])=>!U(r,n)||$w(e,t,i,r));return i||a}function FS(e,t,n,r,i,a){let o=H(Ie(a).length,0),s=Ne(Fe(i.dependentSchemas),0,([i,o])=>{let s=`${n}/dependentSchemas/${i}`;return!U(a,i)||eT(e,t,s,r,o,a)});return o||s}function IS(e,t,n,r){return Mt(n.enum.map(e=>Oe(e)?ct(r,Tt(e)):yt(r,Rx(e))))}function LS(e,t,n,r){return n.enum.some(e=>Oe(e)?H(r,e):Ve(r,e))}function RS(e,t,n,r,i,a){return LS(e,t,i,a)||t.AddError({keyword:`enum`,schemaPath:n,instancePath:r,params:{allowedValues:i.enum}})}function zS(e,t,n,r){return ut(r,Tt(n.exclusiveMaximum))}function BS(e,t,n,r){return Ce(r,n.exclusiveMaximum)}function VS(e,t,n,r,i,a){return BS(e,t,i,a)||t.AddError({keyword:`exclusiveMaximum`,schemaPath:n,instancePath:r,params:{comparison:`<`,limit:i.exclusiveMaximum}})}function HS(e,t,n,r){return lt(r,Tt(n.exclusiveMinimum))}function US(e,t,n,r){return Se(r,n.exclusiveMinimum)}function WS(e,t,n,r,i,a){return US(e,t,i,a)||t.AddError({keyword:`exclusiveMinimum`,schemaPath:n,instancePath:r,params:{comparison:`>`,limit:i.exclusiveMinimum}})}function GS(e,t,n,r){return St(wt(`Format`,`Test`),[Tt(n.format),r])}function KS(e,t,n,r){return xb(n.format,r)}function qS(e,t,n,r,i,a){return KS(e,t,i,a)||t.AddError({keyword:`format`,schemaPath:n,instancePath:r,params:{format:i.format}})}function JS(e,t,n,r){let i=xx(n)?n.then:!0,a=Ub(n)?n.else:!0;return Et(Qw(e,t,n.if,r),Qw(e,t,i,r),Qw(e,t,a,r))}function YS(e,t,n,r){let i=xx(n)?n.then:!0,a=Ub(n)?n.else:!0;return $w(e,t,n.if,r)?$w(e,t,i,r):$w(e,t,a,r)}function XS(e,t,n,r,i,a){let o=xx(i)?i.then:!0,s=Ub(i)?i.else:!0,c=new Nx,l=eT(e,c,`${n}/if`,r,i.if,a)?eT(e,c,`${n}/then`,r,o,a)||t.AddError({keyword:`if`,schemaPath:n,instancePath:r,params:{failingKeyword:`then`}}):eT(e,t,`${n}/else`,r,s,a)||t.AddError({keyword:`if`,schemaPath:n,instancePath:r,params:{failingKeyword:`else`}});return l&&t.Merge([c]),l}function ZS(e,t,n,r){return jt(n.items.map((n,i)=>{let a=dt(wt(r,`length`),Tt(i)),o=Qw(e,t,n,`${r}[${i}]`),s=t.AddIndex(Tt(i));return Ge(a,t.UseUnevaluated()?We(o,s):o)}))}function QS(e,t,n,r){return Me(n.items,0,(n,i)=>we(r.length,i)||$w(e,t,n,r[i])&&t.AddIndex(i))}function $S(e,t,n,r,i,a){return Ne(i.items,0,(i,o)=>{let s=`${n}/items/${o}`,c=`${r}/${o}`;return we(a.length,o)||eT(e,t,s,c,i,a[o])&&t.AddIndex(o)})}function eC(e,t,n,r){let i=px(n)?n.prefixItems.length:0,a=Qw(e,t,n.items,`element`),o=t.AddIndex(`index`),s=t.UseUnevaluated()?We(a,o):a;return ht(r,Tt(i),[`element`,`index`],s)}function tC(e,t,n,r){return Me(r,px(n)?n.prefixItems.length:0,(r,i)=>$w(e,t,n.items,r)&&t.AddIndex(i))}function nC(e,t,n,r,i,a){return Ne(a,px(i)?i.prefixItems.length:0,(a,o)=>eT(e,t,`${n}/items`,`${r}/${o}`,i.items,a)&&t.AddIndex(o))}function rC(e,t,n,r){return Zb(n)?ZS(e,t,n,r):eC(e,t,n,r)}function iC(e,t,n,r){return Zb(n)?QS(e,t,n,r):tC(e,t,n,r)}function aC(e,t,n,r,i,a){return Zb(i)?$S(e,t,n,r,i,a):nC(e,t,n,r,i,a)}function oC(e){return Lb(e)}function sC(e,t,n,r){if(!oC(n))return Tt(!0);let[i,a]=[qx(),qx()];return dt(St(wt(r,`reduce`),[xt([i,a],Et(Qw(e,t,n.contains,a),Nt(i),i)),Tt(0)]),Tt(n.maxContains))}function cC(e,t,n,r){return oC(n)?we(r.reduce((r,i)=>$w(e,t,n.contains,i)?++r:r,0),n.maxContains):!0}function lC(e,t,n,r,i,a){let o=ix(i)?i.minContains:1;return cC(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:o,maxContains:i.maxContains}})}function uC(e,t,n,r){return dt(r,Tt(n.maximum))}function dC(e,t,n,r){return we(r,n.maximum)}function fC(e,t,n,r,i,a){return dC(e,t,i,a)||t.AddError({keyword:`maximum`,schemaPath:n,instancePath:r,params:{comparison:`<=`,limit:i.maximum}})}function pC(e,t,n,r){return dt(wt(r,`length`),Tt(n.maxItems))}function mC(e,t,n,r){return we(r.length,n.maxItems)}function hC(e,t,n,r,i,a){return mC(e,t,i,a)||t.AddError({keyword:`maxItems`,schemaPath:n,instancePath:r,params:{limit:i.maxItems}})}function gC(e,t,n,r){return mt(r,Tt(n.maxLength))}function _C(e,t,n,r){return Ae(r,n.maxLength)}function vC(e,t,n,r,i,a){return _C(e,t,i,a)||t.AddError({keyword:`maxLength`,schemaPath:n,instancePath:r,params:{limit:i.maxLength}})}function yC(e,t,n,r){return dt(wt(_t(r),`length`),Tt(n.maxProperties))}function bC(e,t,n,r){return we(Ie(r).length,n.maxProperties)}function xC(e,t,n,r,i,a){return bC(e,t,i,a)||t.AddError({keyword:`maxProperties`,schemaPath:n,instancePath:r,params:{limit:i.maxProperties}})}function SC(e){return Lb(e)}function CC(e,t,n,r){if(!SC(n))return Tt(!0);let[i,a]=[qx(),qx()];return ft(St(wt(r,`reduce`),[xt([i,a],Et(Qw(e,t,n.contains,a),Nt(i),i)),Tt(0)]),Tt(n.minContains))}function wC(e,t,n,r){return SC(n)?Te(r.reduce((r,i)=>$w(e,t,n.contains,i)?++r:r,0),n.minContains):!0}function TC(e,t,n,r,i,a){return wC(e,t,i,a)||t.AddError({keyword:`contains`,schemaPath:n,instancePath:r,params:{minContains:i.minContains}})}function EC(e,t,n,r){return ft(r,Tt(n.minimum))}function DC(e,t,n,r){return Te(r,n.minimum)}function OC(e,t,n,r,i,a){return DC(e,t,i,a)||t.AddError({keyword:`minimum`,schemaPath:n,instancePath:r,params:{comparison:`>=`,limit:i.minimum}})}function kC(e,t,n,r){return ft(wt(r,`length`),Tt(n.minItems))}function AC(e,t,n,r){return Te(r.length,n.minItems)}function jC(e,t,n,r,i,a){return AC(e,t,i,a)||t.AddError({keyword:`minItems`,schemaPath:n,instancePath:r,params:{limit:i.minItems}})}function MC(e,t,n,r){return pt(r,Tt(n.minLength))}function NC(e,t,n,r){return je(r,n.minLength)}function PC(e,t,n,r,i,a){return NC(e,t,i,a)||t.AddError({keyword:`minLength`,schemaPath:n,instancePath:r,params:{limit:i.minLength}})}function FC(e,t,n,r){return ft(wt(_t(r),`length`),Tt(n.minProperties))}function IC(e,t,n,r){return Te(Ie(r).length,n.minProperties)}function LC(e,t,n,r,i,a){return IC(e,t,i,a)||t.AddError({keyword:`minProperties`,schemaPath:n,instancePath:r,params:{limit:i.minProperties}})}function RC(e,t,n,r){return Pt(r,Tt(n.multipleOf))}function zC(e,t,n,r){return Ee(r,n.multipleOf)}function BC(e,t,n,r,i,a){return zC(e,t,i,a)||t.AddError({keyword:`multipleOf`,schemaPath:n,instancePath:r,params:{multipleOf:i.multipleOf}})}function VC(e,t,n,r){return oS(e,t,[n.not],r,Ke(ct(wt(`results`,`length`),Tt(1))))}function HC(e,t,n,r){return Ke(Qw(e,t,n.not,r))}function UC(e,t,n,r){return t.UseUnevaluated()?VC(e,t,n,r):HC(e,t,n,r)}function WC(e,t,n,r){let i=new jx;return!$w(e,i,n.not,r)&&t.Merge([i])}function GC(e,t,n,r,i,a){return WC(e,t,i,a)||t.AddError({keyword:`not`,schemaPath:n,instancePath:r,params:{}})}function KC(e,t,n,r){return oS(e,t,n.oneOf,r,ct(wt(`results`,`length`),Tt(1)))}function qC(e,t,n,r){return ct(St(wt(bt(n.oneOf.map(n=>Qw(e,t,n,r))),`reduce`),[xt([`count`,`result`],Et(ct(`result`,Tt(!0)),Nt(`count`),`count`)),Tt(0)]),Tt(1))}function JC(e,t,n,r){return t.UseUnevaluated()?KC(e,t,n,r):qC(e,t,n,r)}function YC(e,t,n,r){let i=n.oneOf.reduce((t,n)=>{let i=new jx;return $w(e,i,n,r)?[...t,i]:t},[]);return H(i.length,1)&&t.Merge(i)}function XC(e,t,n,r,i,a){let o=[],s=[],c=i.oneOf.reduce((t,i,c)=>{let l=new Nx,u=eT(e,l,`${n}/oneOf/${c}`,r,i,a);return u&&s.push(c),u||o.push(l),u?[...t,l]:t},[]),l=H(c.length,1)&&t.Merge(c);return!l&&H(s.length,0)&&o.forEach(e=>e.GetErrors().forEach(e=>t.AddError(e))),l||t.AddError({keyword:`oneOf`,schemaPath:n,instancePath:r,params:{passingSchemas:s}})}function ZC(e,t,n,r){return St(wt(Rx(B(n.pattern)?new RegExp(n.pattern):n.pattern),`test`),[r])}function QC(e,t,n,r){return(B(n.pattern)?new RegExp(n.pattern):n.pattern).test(r)}function $C(e,t,n,r,i,a){return QC(e,t,i,a)||t.AddError({keyword:`pattern`,schemaPath:n,instancePath:r,params:{pattern:i.pattern}})}function ew(e,t,n,r){return jt(Fe(n.patternProperties).map(([n,i])=>{let[a,o]=[qx(),qx()],s=Ke(St(wt(Rx(new RegExp(n)),`test`),[a])),c=Qw(e,t,i,o),l=t.AddKey(a),u=t.UseUnevaluated()?Ge(s,We(c,l)):Ge(s,c);return ht(gt(r),Tt(0),[`[${a}, ${o}]`,`_`],u)}))}function tw(e,t,n,r){return Me(Fe(n.patternProperties),0,([n,i])=>{let a=new RegExp(n);return Me(Fe(r),0,([n,r])=>!a.test(n)||$w(e,t,i,r)&&t.AddKey(n))})}function nw(e,t,n,r,i,a){return Ne(Fe(i.patternProperties),0,([i,o])=>{let s=`${n}/patternProperties/${i}`,c=new RegExp(i);return Ne(Fe(a),0,([n,i])=>{let a=`${r}/${n}`;return!c.test(n)||eT(e,t,s,a,o,i)&&t.AddKey(n)})})}function rw(e,t,n,r){return jt(n.prefixItems.map((n,i)=>{let a=dt(wt(r,`length`),Tt(i)),o=Qw(e,t,n,`${r}[${i}]`),s=t.AddIndex(Tt(i));return Ge(a,t.UseUnevaluated()?We(o,s):o)}))}function iw(e,t,n,r){return H(r.length,0)||Me(n.prefixItems,0,(n,i)=>we(r.length,i)||$w(e,t,n,r[i])&&t.AddIndex(i))}function aw(e,t,n,r,i,a){return H(a.length,0)||Ne(i.prefixItems,0,(i,o)=>{let s=`${n}/prefixItems/${o}`,c=`${r}/${o}`;return we(a.length,o)||eT(e,t,s,c,i,a[o])&&t.AddIndex(o)})}function ow(e,t){return e.includes(t)||$t().exactOptionalPropertyTypes}function sw(e,t){return at(wt(e,t))}function cw(e,t){return V(e[t])}function lw(e,t,n,r){let i=bx(n)?n.required:[];return jt(Fe(n.properties).map(([n,a])=>{let o=Ke(vt(r,Tt(n))),s=Qw(e,t,a,wt(r,n)),c=t.AddKey(Tt(n)),l=t.UseUnevaluated()?We(s,c):s,u=i.includes(n)?l:Ge(o,l);return ow(i,n)?u:Ge(sw(r,n),u)}))}function uw(e,t,n,r){let i=bx(n)?n.required:[];return Me(Fe(n.properties),0,([n,a])=>{let o=!U(r,n)||$w(e,t,a,r[n])&&t.AddKey(n);return ow(i,n)?o:cw(r,n)||o})}function dw(e,t,n,r,i,a){let o=bx(i)?i.required:[];return Ne(Fe(i.properties),0,([i,s])=>{let c=`${n}/properties/${i}`,l=`${r}/${i}`,u=()=>!U(a,i)||eT(e,t,c,l,s,a[i])&&t.AddKey(i);return ow(o,i)?u():cw(a,i)||u()})}function fw(e,t,n,r){let[i,a]=[qx(),qx()];return ht(_t(r),Tt(0),[i,a],Qw(e,t,n.propertyNames,i))}function pw(e,t,n,r){return Me(Ie(r),0,(r,i)=>$w(e,t,n.propertyNames,r))}function mw(e,t,n,r,i,a){let o=[];return Ne(Ie(a),0,(t,a)=>{let s=`${r}/${t}`,c=`${n}/propertyNames`,l=eT(e,new Nx,c,s,i.propertyNames,t);return l||o.push(t),l})||t.AddError({keyword:`propertyNames`,schemaPath:n,instancePath:r,params:{propertyNames:o}})}function hw(e,t,n,r){return oT(e,t,e.RecursiveRef(n.$recursiveRef)??!1,r)}function gw(e,t,n,r){let i=e.RecursiveRef(n.$recursiveRef)??!1;return Ab(i)&&$w(e,t,i,r)}function _w(e,t,n,r,i,a){let o=e.RecursiveRef(i.$recursiveRef)??!1;return Ab(o)&&eT(e,t,`#`,r,o,a)}function vw(e,t,n,r){let i=xt([`context`,`value`],oT(e,t,n,`value`));return St(xt([`context`,`value`],Dt([Ot(`nextContext`,Ct(`CheckContext`,[])),Ot(`result`,St(i,[`nextContext`,`value`])),kt(`result`,t.Merge(`[nextContext]`)),At(`result`)])),[`context`,r])}function yw(e,t,n,r){return oT(e,t,n,r)}function bw(e,t,n,r){let i=e.Ref(n.$ref)??!1;return t.UseUnevaluated()?vw(e,t,i,r):yw(e,t,i,r)}function xw(e,t,n,r){let i=e.Ref(n.$ref)??!1,a=new jx,o=Ab(i)&&$w(e,a,i,r);return o&&t.Merge([a]),o}function Sw(e,t,n,r,i,a){let o=e.Ref(i.$ref)??!1,s=new Nx,c=Ab(o)&&eT(e,s,`#`,r,o,a);return c&&t.Merge([s]),c||s.GetErrors().forEach(e=>t.AddError(e)),c}function Cw(e,t,n,r){return jt(n.required.map(e=>vt(r,Tt(e))))}function ww(e,t,n,r){return Me(n.required,0,e=>U(r,e))}function Tw(e,t,n,r,i,a){let o=[];return Ne(i.required,0,e=>{let t=U(a,e);return t||o.push(e),t})||t.AddError({keyword:`required`,schemaPath:n,instancePath:r,params:{requiredProperties:o}})}function Ew(e,t,n,r){return H(n,`object`)?tt(r):H(n,`array`)?qe(r):H(n,`boolean`)?Xe(r):H(n,`integer`)?Ze(r):H(n,`number`)?et(r):H(n,`null`)?$e(r):H(n,`string`)?rt(r):H(n,`asyncIterator`)?Je(r):H(n,`bigint`)?Ye(r):H(n,`constructor`)?st(r):H(n,`function`)?ot(r):H(n,`iterator`)?Qe(r):H(n,`symbol`)?it(r):H(n,`undefined`)||H(n,`void`)?at(r):Tt(!0)}function Dw(e,t,n,r,i){return H(n,`object`)?ye(i):H(n,`array`)?R(i):H(n,`boolean`)?fe(i):H(n,`integer`)?he(i):H(n,`number`)?ve(i):H(n,`null`)?_e(i):H(n,`string`)?B(i):H(n,`asyncIterator`)?de(i):H(n,`bigint`)?z(i):H(n,`constructor`)?pe(i):H(n,`function`)?me(i):H(n,`iterator`)?ge(i):H(n,`symbol`)?xe(i):H(n,`undefined`)||H(n,`void`)?V(i):!0}function Ow(e,t,n,r){return Mt(n.map(n=>Ew(e,t,n,r)))}function kw(e,t,n,r,i){return n.some(n=>Dw(e,t,n,r,i))}function Aw(e,t,n,r){return R(n.type)?Ow(e,t,n.type,r):Ew(e,t,n.type,r)}function jw(e,t,n,r){return R(n.type)?kw(e,t,n.type,n,r):Dw(e,t,n.type,n,r)}function Mw(e,t,n,r,i,a){return(R(i.type)?kw(e,t,i.type,i,a):Dw(e,t,i.type,i,a))||t.AddError({keyword:`type`,schemaPath:n,instancePath:r,params:{type:i.type}})}function Nw(e,t,n,r){let[i,a]=[qx(),qx()],o=St(wt(`context`,`GetIndices`),[]),s=St(wt(`indices`,`has`),[i]),c=Qw(e,t,n.unevaluatedItems,a),l=St(wt(`context`,`AddIndex`),[i]),u=ht(r,Tt(0),[a,i],We(Ge(s,c),l));return St(xt([`context`],Dt([Ot(`indices`,o),At(u)])),[`context`])}function Pw(e,t,n,r){let i=t.GetIndices();return Me(r,0,(r,a)=>(i.has(a)||$w(e,t,n.unevaluatedItems,r))&&t.AddIndex(a))}function Fw(e,t,n,r,i,a){let o=t.GetIndices(),s=[];return Ne(a,0,(a,c)=>{let l=new Nx,u=(o.has(c)||eT(e,l,n,r,i.unevaluatedItems,a))&&t.AddIndex(c);return u||s.push(c),u})||t.AddError({keyword:`unevaluatedItems`,schemaPath:n,instancePath:r,params:{unevaluatedItems:s}})}function Iw(e,t,n,r){let[i,a]=[qx(),qx()],o=St(wt(`context`,`GetKeys`),[]),s=St(wt(`keys`,`has`),[i]),c=St(wt(`context`,`AddKey`),[i]),l=Qw(e,t,n.unevaluatedProperties,a),u=ht(gt(r),Tt(0),[`[${i}, ${a}]`,`_`],Ge(s,We(l,c)));return St(xt([`context`],Dt([Ot(`keys`,o),At(u)])),[`context`])}function Lw(e,t,n,r){let i=t.GetKeys();return Me(Fe(r),0,([r,a])=>i.has(r)||$w(e,t,n.unevaluatedProperties,a)&&t.AddKey(r))}function Rw(e,t,n,r,i,a){let o=t.GetKeys(),s=[];return Ne(Fe(a),0,([a,c])=>{let l=new Nx,u=o.has(a)||eT(e,l,n,r,i.unevaluatedProperties,c)&&t.AddKey(a);return u||s.push(a),u})||t.AddError({keyword:`unevaluatedProperties`,schemaPath:n,instancePath:r,params:{unevaluatedProperties:s}})}function zw(e){return!H(e.uniqueItems,!1)}function Bw(e,t,n,r){return zw(n)?ct(wt(Ct(`Set`,[St(wt(r,`map`),[wt(`Hashing`,`Hash`)])]),`size`),wt(r,`length`)):Tt(!0)}function Vw(e,t,n,r){if(!zw(n))return!0;let i=new Set(r.map(ti)).size,a=r.length;return H(i,a)}function Hw(e,t,n,r,i,a){if(!zw(i))return!0;let o=new Set,s=a.reduce((e,t,n)=>{let r=ti(t);return o.has(r)?[...e,n]:(o.add(r),e)},[]);return H(s.length,0)||t.AddError({keyword:`uniqueItems`,schemaPath:n,instancePath:r,params:{duplicateItems:s}})}function Uw(e,t){return Sx(e)&&(R(e.type)&&e.type.includes(t)||H(e.type,t))}function Ww(e){return Uw(e,`object`)}function Gw(e){return Ob(e)&&(Mb(e)||zb(e)||Bb(e)||Vb(e)||mx(e)||fx(e)||hx(e)||sx(e)||nx(e)||bx(e)||Tx(e))}function Kw(e){return Uw(e,`array`)}function qw(e){return Ob(e)&&(jb(e)||Xb(e)||Lb(e)||$b(e)||ex(e)||ix(e)||ax(e)||px(e)||wx(e)||Cx(e))}function Jw(e){return Uw(e,`string`)}function Yw(e){return Ob(e)&&(ox(e)||tx(e)||qb(e)||dx(e))}function Xw(e){return Uw(e,`number`)||Uw(e,`bigint`)}function Zw(e){return Ob(e)&&(rx(e)||Qb(e)||Gb(e)||Kb(e)||cx(e))}function Qw(e,t,n,r){e.Push(n);let i=[];if(kb(n))return _S(e,t,n,r);if(Sx(n)&&i.push(Aw(e,t,n,r)),Gw(n)){let a=[];bx(n)&&a.push(Cw(e,t,n,r)),Mb(n)&&a.push(rS(e,t,n,r)),zb(n)&&a.push(DS(e,t,n,r)),Bb(n)&&a.push(AS(e,t,n,r)),Vb(n)&&a.push(NS(e,t,n,r)),fx(n)&&a.push(ew(e,t,n,r)),mx(n)&&a.push(lw(e,t,n,r)),hx(n)&&a.push(fw(e,t,n,r)),sx(n)&&a.push(FC(e,t,n,r)),nx(n)&&a.push(yC(e,t,n,r));let o=jt(a),s=Ge(Ke(tt(r)),o);i.push(Ww(n)?o:s)}if(qw(n)){let a=[];jb(n)&&a.push(Yx(e,t,n,r)),Lb(n)&&a.push(wS(e,t,n,r)),Xb(n)&&a.push(rC(e,t,n,r)),$b(n)&&a.push(sC(e,t,n,r)),ex(n)&&a.push(pC(e,t,n,r)),ix(n)&&a.push(CC(e,t,n,r)),ax(n)&&a.push(kC(e,t,n,r)),px(n)&&a.push(rw(e,t,n,r)),Cx(n)&&a.push(Bw(e,t,n,r));let o=jt(a),s=Ge(Ke(qe(r)),o);i.push(Kw(n)?o:s)}if(Yw(n)){let a=[];tx(n)&&a.push(gC(e,t,n,r)),ox(n)&&a.push(MC(e,t,n,r)),qb(n)&&a.push(GS(e,t,n,r)),dx(n)&&a.push(ZC(e,t,n,r));let o=jt(a),s=Ge(Ke(rt(r)),o);i.push(Jw(n)?o:s)}if(Zw(n)){let a=[];Gb(n)&&a.push(zS(e,t,n,r)),Kb(n)&&a.push(HS(e,t,n,r)),Qb(n)&&a.push(uC(e,t,n,r)),rx(n)&&a.push(EC(e,t,n,r)),cx(n)&&a.push(RC(e,t,n,r));let o=jt(a),s=Ge(Ke(Ge(et(r),Ye(r))),o);i.push(Xw(n)?o:s)}vx(n)&&i.push(hw(e,t,n,r)),yx(n)&&i.push(bw(e,t,n,r)),Eb(n)&&i.push(Bx(e,t,n,r)),Ib(n)&&i.push(bS(e,t,n,r)),Wb(n)&&i.push(IS(e,t,n,r)),Yb(n)&&i.push(JS(e,t,n,r)),lx(n)&&i.push(UC(e,t,n,r)),Nb(n)&&i.push(lS(e,t,n,r)),Fb(n)&&i.push(mS(e,t,n,r)),ux(n)&&i.push(JC(e,t,n,r)),wx(n)&&i.push(Ge(Ke(qe(r)),Nw(e,t,n,r))),Tx(n)&&i.push(Ge(Ke(nt(r)),Iw(e,t,n,r))),Db(n)&&i.push(Ux(e,t,n,r));let a=jt(i);return e.Pop(n),a}function $w(e,t,n,r){e.Push(n);let i=kb(n)?vS(e,t,n,r):(!Sx(n)||jw(e,t,n,r))&&(!(be(r)&&!R(r))||(!bx(n)||ww(e,t,n,r))&&(!Mb(n)||iS(e,t,n,r))&&(!zb(n)||OS(e,t,n,r))&&(!Bb(n)||jS(e,t,n,r))&&(!Vb(n)||PS(e,t,n,r))&&(!fx(n)||tw(e,t,n,r))&&(!mx(n)||uw(e,t,n,r))&&(!hx(n)||pw(e,t,n,r))&&(!sx(n)||IC(e,t,n,r))&&(!nx(n)||bC(e,t,n,r)))&&(!R(r)||(!jb(n)||Xx(e,t,n,r))&&(!Lb(n)||TS(e,t,n,r))&&(!Xb(n)||iC(e,t,n,r))&&(!$b(n)||cC(e,t,n,r))&&(!ex(n)||mC(e,t,n,r))&&(!ix(n)||wC(e,t,n,r))&&(!ax(n)||AC(e,t,n,r))&&(!px(n)||iw(e,t,n,r))&&(!Cx(n)||Vw(e,t,n,r)))&&(!B(r)||(!tx(n)||_C(e,t,n,r))&&(!ox(n)||NC(e,t,n,r))&&(!qb(n)||KS(e,t,n,r))&&(!dx(n)||QC(e,t,n,r)))&&(!(ve(r)||z(r))||(!Gb(n)||BS(e,t,n,r))&&(!Kb(n)||US(e,t,n,r))&&(!Qb(n)||dC(e,t,n,r))&&(!rx(n)||DC(e,t,n,r))&&(!cx(n)||zC(e,t,n,r)))&&(!vx(n)||gw(e,t,n,r))&&(!yx(n)||xw(e,t,n,r))&&(!Eb(n)||Vx(e,t,n,r))&&(!Ib(n)||xS(e,t,n,r))&&(!Wb(n)||LS(e,t,n,r))&&(!Yb(n)||YS(e,t,n,r))&&(!lx(n)||WC(e,t,n,r))&&(!Nb(n)||uS(e,t,n,r))&&(!Fb(n)||hS(e,t,n,r))&&(!ux(n)||YC(e,t,n,r))&&(!wx(n)||!R(r)||Pw(e,t,n,r))&&(!Tx(n)||!be(r)||Lw(e,t,n,r))&&(!Db(n)||Wx(e,t,n,r));return e.Pop(n),i}function eT(e,t,n,r,i,a){e.Push(i);let o=kb(i)?yS(e,t,n,r,i,a):!!((!Sx(i)||Mw(e,t,n,r,i,a))&+(!(be(a)&&!R(a))||!!((!bx(i)||Tw(e,t,n,r,i,a))&+(!Mb(i)||aS(e,t,n,r,i,a))&(!zb(i)||kS(e,t,n,r,i,a))&(!Bb(i)||MS(e,t,n,r,i,a))&(!Vb(i)||FS(e,t,n,r,i,a))&(!fx(i)||nw(e,t,n,r,i,a))&(!mx(i)||dw(e,t,n,r,i,a))&(!hx(i)||mw(e,t,n,r,i,a))&(!sx(i)||LC(e,t,n,r,i,a))&(!nx(i)||xC(e,t,n,r,i,a))))&(!R(a)||!!((!jb(i)||Zx(e,t,n,r,i,a))&+(!Lb(i)||ES(e,t,n,r,i,a))&(!Xb(i)||aC(e,t,n,r,i,a))&(!$b(i)||lC(e,t,n,r,i,a))&(!ex(i)||hC(e,t,n,r,i,a))&(!ix(i)||TC(e,t,n,r,i,a))&(!ax(i)||jC(e,t,n,r,i,a))&(!px(i)||aw(e,t,n,r,i,a))&(!Cx(i)||Hw(e,t,n,r,i,a))))&(!B(a)||!!((!tx(i)||vC(e,t,n,r,i,a))&+(!ox(i)||PC(e,t,n,r,i,a))&(!qb(i)||qS(e,t,n,r,i,a))&(!dx(i)||$C(e,t,n,r,i,a))))&(!(ve(a)||z(a))||!!((!Gb(i)||VS(e,t,n,r,i,a))&+(!Kb(i)||WS(e,t,n,r,i,a))&(!Qb(i)||fC(e,t,n,r,i,a))&(!rx(i)||OC(e,t,n,r,i,a))&(!cx(i)||BC(e,t,n,r,i,a))))&(!vx(i)||_w(e,t,n,r,i,a))&(!yx(i)||Sw(e,t,n,r,i,a))&(!Eb(i)||Hx(e,t,n,r,i,a))&(!Ib(i)||SS(e,t,n,r,i,a))&(!Wb(i)||RS(e,t,n,r,i,a))&(!Yb(i)||XS(e,t,n,r,i,a))&(!lx(i)||GC(e,t,n,r,i,a))&(!Nb(i)||dS(e,t,n,r,i,a))&(!Fb(i)||gS(e,t,n,r,i,a))&(!ux(i)||XC(e,t,n,r,i,a))&(!wx(i)||!R(a)||Fw(e,t,n,r,i,a))&(!Tx(i)||!be(a)||Rw(e,t,n,r,i,a)))&&(!Db(i)||Gx(e,t,n,r,i,a));return e.Pop(i),o}var tT=new Map;function nT(e,t,n,r){return e.UseUnevaluated()?St(`check_${n}`,[`context`,r]):St(`check_${n}`,[r])}function rT(e,t,n,r){let i=Qw(e,t,n,`value`);return t.UseUnevaluated()?Ot(`check_${r}`,xt([`context`,`value`],i)):Ot(`check_${r}`,xt([`value`],i))}function iT(){tT.clear()}function aT(){return[...tT.values()]}function oT(e,t,n,r){let i=Ob(n)?ti({__baseURL:e.BaseURL().href,...n}):ti(n),a=nT(t,n,i,r);return tT.has(i)?a:(tT.set(i,``),tT.set(i,rT(e,t,n,i)),a)}function sT(e,t){return be(t)?t[e]:void 0}function cT(e,t){return e.reduce((e,t)=>sT(t,e),t)}function lT(e){if(H(e.length,0))return[];let t=e.split(`/`).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`));return t.length>0&&t[0]===``?t.slice(1):t}function uT(e,t){return cT(lT(t),e)}function dT(e,t,n){if(e.$id===n.hash)return e;let r=new URL(e.$id,t.href),i=new URL(n.href,t.href);if(H(r.pathname,i.pathname))return n.hash.startsWith(`#`)?pT(e,t,n):e}function fT(e,t,n){let r=new URL(`#${e.$anchor}`,t.href),i=new URL(n.href,t.href);if(H(r.href,i.href))return e}function pT(e,t,n){return n.href.endsWith(`#`)?e:n.hash.startsWith(`#`)?uT(e,decodeURIComponent(n.hash.slice(1))):void 0}function mT(e,t,n){if(Jb(e)){let r=dT(e,t,n);if(!V(r))return r}if(Pb(e)){let r=fT(e,t,n);if(!V(r))return r}return pT(e,t,n)}function hT(e,t,n){return e.reduce((e,r)=>{let i=_T(r,t,n);return V(i)?e:i},void 0)}function gT(e,t,n){return Ie(e).reduce((r,i)=>{let a=_T(e[i],t,n);return V(a)?r:a},void 0)}function _T(e,t,n){if(t=Ob(e)&&Jb(e)?new URL(e.$id,t.href):t,Ob(e)){let r=mT(e,t,n);if(!V(r))return r}if(R(e))return hT(e,t,n);if(be(e))return gT(e,t,n)}function vT(e,t){let n=new URL(`http://unknown`),r=Jb(e)?new URL(e.$id,n.href):n;return _T(e,r,new URL(t,r.href))}var yT=class{constructor(e,t){this.context=e,this.schema=t,this.ids=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[]}BaseURL(){return this.ids.reduce((e,t)=>new URL(t.$id,e),new URL(`http://unknown`))}Base(){return this.ids[this.ids.length-1]??this.schema}Push(e){Ob(e)&&(Jb(e)&&this.ids.push(e),Pb(e)&&this.anchors.push(e),_x(e)&&this.recursiveAnchors.push(e),Hb(e)&&this.dynamicAnchors.push(e))}Pop(e){Ob(e)&&(Jb(e)&&this.ids.pop(),Pb(e)&&this.anchors.pop(),_x(e)&&this.recursiveAnchors.pop(),Hb(e)&&this.dynamicAnchors.pop())}FromContext(e){return U(this.context,e)?this.context[e]:void 0}FromRef(e){return e.startsWith(`#`)?vT(this.Base(),e):vT(this.schema,e)}Ref(e){return this.FromContext(e)??this.FromRef(e)}RecursiveRef(e){return _x(this.Base())?vT(this.recursiveAnchors[0],e):vT(this.Base(),e)}};function bT(e){return`${e.Functions().join(`;
10
+ `)}; return (value) => { ${(e.UseUnevaluated()?[`const context = new CheckContext({}, {})`,`return ${e.Call()}`]:[`return ${e.Call()}`]).join(`; `)} }`}function xT(e,t){return new globalThis.Function(`CheckContext`,`Guard`,`Format`,`Hashing`,e.External().identifier,t)(jx,ue,Cb,Er,e.External().variables)}function ST(e){let t=new yT(e.Context(),e.Schema()),n=new jx;return r=>$w(t,n,e.Schema(),r)}function CT(e,t){return Tr()?xT(e,t):ST(e)}var wT=class{constructor(e,t,n,r,i,a){this.context=e,this.schema=t,this.external=n,this.functions=r,this.call=i,this.useUnevaluated=a}Context(){return this.context}Schema(){return this.schema}UseUnevaluated(){return this.useUnevaluated}External(){return this.external}Functions(){return this.functions}Call(){return this.call}Evaluate(){let e=bT(this),t=CT(this,e);return{IsAccelerated:Tr(),Code:e,Check:t}}};function TT(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t],1:e=>[{},e]});Lx(),iT();let r=new yT(t,n),i=new Ax(kx(t,n)),a=oT(r,i,n,`value`),o=aT();return new wT(t,n,zx(),o,a,i.UseUnevaluated())}function ET(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]}),i=$t(),a=ii(),o=[];return[eT(new yT(t,n),new Mx(e=>{if(!Te(o.length,i.maxErrors))return o.push({...e,message:a(e)})}),`#`,``,n,r),o]}function DT(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return $w(new yT(t,n),new jx,n,r)}function OT(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return DT(t,n,r)}function kT(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]}),[i,a]=ET(t,n,r);return a}var AT=class extends Error{constructor(e,t,n){super(e),Object.defineProperty(this,`cause`,{value:{source:e,errors:n,value:t},writable:!1,configurable:!1,enumerable:!1})}};function jT(e,t,n){return R(n)?n.map(n=>ZT(e,t.items,n)):n}function MT(e,t,n){return t.Clean(n)}function NT(e,t,n){return ZT({...e,...t.$defs},Wn(t.$ref),n)}function PT(e,t){let n=U(t,`unevaluatedProperties`)?{additionalProperties:t.unevaluatedProperties}:{},r=by(gy(e,t));return rr(r)?O_(r,n):r}function FT(e,t,n){return ZT(e,PT(e,t),n)}function IT(e){return U(e,`additionalProperties`)?e.additionalProperties:void 0}function LT(e,t,n){if(!be(n)||R(n))return n;let r=IT(t);for(let i of Ie(n)){if(U(t.properties,i)){n[i]=ZT(e,t.properties[i],n[i]);continue}if(fe(r)&&H(r,!0)||sn(r)&&OT(e,r,n[i])){n[i]=ZT(e,r,n[i]);continue}delete n[i]}return n}function RT(e,t,n){if(!be(n))return n;let r=IT(t),[i,a]=[new RegExp(xa(t)),Ca(t)];for(let t of Ie(n)){if(i.test(t)){n[t]=ZT(e,a,n[t]);continue}if(fe(r)&&H(r,!0)||sn(r)&&OT(e,r,n[t])){n[t]=ZT(e,r,n[t]);continue}delete n[t]}return n}function zT(e,t,n){return U(e,t.$ref)?ZT(e,e[t.$ref],n):n}function BT(e,t,n){if(!R(n))return n;let r=Math.min(n.length,t.items.length);for(let i=0;i<r;i++)n[i]=ZT(e,t.items[i],n[i]);return Se(n.length,r)?n.slice(0,r):n}function VT(e){return e}function HT(e){let t={};for(let n of Object.getOwnPropertyNames(e))t[n]=YT(e[n]);for(let n of Object.getOwnPropertySymbols(e))t[n]=YT(e[n]);return t}function UT(e){return De(e)?VT(e):HT(e)}function WT(e){return e.map(e=>YT(e))}function GT(e){return e.slice()}function KT(e){return new Map(YT([...e.entries()]))}function qT(e){return new Set(YT([...e.values()]))}function JT(e){return e}function YT(e){return Rt(e)?GT(e):Ht(e)?KT(e):Vt(e)?qT(e):R(e)?WT(e):be(e)?UT(e):JT(e)}function XT(e,t,n){for(let r of t.anyOf){let t=ZT(e,r,YT(n));if(OT(e,r,t))return t}return n}function ZT(e,t,n){return An(t)?jT(e,t,n):Ln(t)?MT(e,t,n):dr(t)?NT(e,t,n):br(t)?FT(e,t,n):rr(t)?LT(e,t,n):wa(t)?RT(e,t,n):Gn(t)?zT(e,t,n):Aa(t)?BT(e,t,n):or(t)?XT(e,t,n):n}function QT(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return ZT(t,n,r)}function $T(e,t,n){return R(n)?n.map(n=>ED(e,t.items,n)):n}function eE(e,t,n){return t.Convert(n)}function tE(e){return be(e)&&U(e,`value`)}function nE(e){return{value:e}}function rE(e){return nE(e)}function iE(e){return H(e,!0)?nE(BigInt(1)):nE(BigInt(0))}function aE(e){return nE(BigInt(Math.trunc(e)))}function oE(e){return nE(BigInt(0))}var sE=/^-?(0|[1-9]\d*)n$/,cE=/^-?(0|[1-9]\d*)\.\d+$/,lE=/^-?(0|[1-9]\d*)$/;function uE(e){return sE.test(e)}function dE(e){return cE.test(e)}function fE(e){return lE.test(e)}function pE(e){let t=e.toLowerCase();return uE(e)?nE(BigInt(e.slice(0,e.length-1))):dE(e)?nE(BigInt(e.split(`.`)[0])):fE(e)?nE(BigInt(e)):H(t,`false`)?nE(BigInt(0)):H(t,`true`)?nE(BigInt(1)):void 0}function mE(e){return nE(BigInt(0))}function hE(e){return z(e)?rE(e):fe(e)?iE(e):ve(e)?aE(e):_e(e)?oE(e):B(e)?pE(e):V(e)?mE(e):void 0}function gE(e){return H(e,BigInt(0))?nE(!1):H(e,BigInt(1))?nE(!0):void 0}function _E(e){return nE(e)}function vE(e){return H(e,0)?nE(!1):H(e,1)?nE(!0):void 0}function yE(e){return nE(!1)}function bE(e){return H(e.toLowerCase(),`false`)?nE(!1):H(e.toLowerCase(),`true`)?nE(!0):H(e,`0`)?nE(!1):H(e,`1`)?nE(!0):void 0}function xE(e){return nE(!1)}function SE(e){return z(e)?gE(e):fe(e)?_E(e):ve(e)?vE(e):_e(e)?yE(e):B(e)?bE(e):V(e)?xE(e):void 0}function CE(e){return H(e,BigInt(0))?nE(null):void 0}function wE(e){return H(e,!1)?nE(null):void 0}function TE(e){return H(e,0)?nE(null):void 0}function EE(e){return nE(null)}function DE(e){let t=e.toLowerCase();return H(t,`undefined`)||H(t,`null`)||H(e,``)||H(e,`0`)?nE(null):void 0}function OE(e){return nE(null)}function kE(e){return z(e)?CE(e):fe(e)?wE(e):ve(e)?TE(e):_e(e)?EE(e):B(e)?DE(e):V(e)?OE(e):void 0}var AE=BigInt(2**53-1),jE=BigInt(-(2**53-1));function ME(e){return e<=AE&&e>=jE}function NE(e){return ME(e)?nE(Number(e)):void 0}function PE(e){return nE(e?1:0)}function FE(e){return nE(e)}function IE(e){return nE(0)}function LE(e){let t=+e;if(ve(t))return nE(t);let n=e.toLowerCase();if(H(n,`false`))return nE(0);if(H(n,`true`))return nE(1);let r=hE(e);if(tE(r))return NE(r.value)}function RE(e){return nE(0)}function zE(e){return z(e)?NE(e):fe(e)?PE(e):ve(e)?FE(e):_e(e)?IE(e):B(e)?LE(e):V(e)?RE(e):void 0}function BE(e){return nE(e.toString())}function VE(e){return nE(e.toString())}function HE(e){return nE(e.toString())}function UE(e){return nE(`null`)}function WE(e){return nE(e)}function GE(e){return nE(``)}function KE(e){return z(e)?BE(e):fe(e)?VE(e):ve(e)?HE(e):_e(e)?UE(e):B(e)?WE(e):V(e)?GE(e):void 0}function qE(e){return H(e,BigInt(0))?nE(void 0):void 0}function JE(e){return H(e,!1)?nE(void 0):void 0}function YE(e){return H(e,0)?nE(void 0):void 0}function XE(e){return nE(void 0)}function ZE(e){let t=e.toLowerCase();return H(t,`undefined`)||H(t,`null`)||H(e,``)||H(e,`0`)?nE(void 0):void 0}function QE(e){return nE(void 0)}function $E(e){return z(e)?qE(e):fe(e)?JE(e):ve(e)?YE(e):_e(e)?XE(e):B(e)?ZE(e):V(e)?QE(e):void 0}function eD(e,t,n){if(z(n))return n;let r=hE(n);return tE(r)?r.value:n}function tD(e,t,n){if(fe(n))return n;let r=SE(n);return tE(r)?r.value:n}function nD(e,t,n){return ED({...e,...t.$defs},Wn(t.$ref),n)}function rD(e,t,n){if(t.anyOf.some(t=>OT(e,t,n)))return n;let r=t.anyOf.map(t=>ED(e,t,YT(n))).find(n=>OT(e,t,n));return V(r)?n:r}function iD(e,t,n){return rD(e,Xd(t),n)}function aD(e,t,n){if(he(n))return n;let r=zE(n);return tE(r)?Math.trunc(r.value):n}function oD(e,t,n){return ED(e,by(gy(e,t)),n)}function sD(e,t,n){let r=hE(n);return tE(r)&&H(t.const,r.value)?r.value:n}function cD(e,t,n){let r=SE(n);return tE(r)&&H(t.const,r.value)?r.value:n}function lD(e,t,n){let r=zE(n);return tE(r)&&H(t.const,r.value)?r.value:n}function uD(e,t,n){let r=KE(n);return tE(r)&&H(t.const,r.value)?r.value:n}function dD(e,t,n){return H(t.const,n)?n:ji(t)?sD(e,t,n):Mi(t)?cD(e,t,n):Ni(t)?lD(e,t,n):Pi(t)?uD(e,t,n):Sr()}function fD(e,t,n){if(_e(n))return n;let r=kE(n);return tE(r)?r.value:n}function pD(e,t,n){if(ve(n))return n;let r=zE(n);return tE(r)?r.value:n}function mD(e,t,n,r){let i=Ie(r);for(let[a,o]of t)for(let t of i)a.test(t)||(r[t]=ED(e,n,r[t]));return r}function hD(e,t,n){return wn(e)&&V(n[t])}function gD(e,t,n){let r=Pe(t.properties),i=Ie(n);for(let[t,a]of r)for(let r of i)!t.test(r)||hD(a,r,n)||(n[r]=ED(e,a,n[r]));return U(t,`additionalProperties`)&&be(t.additionalProperties)?mD(e,r,t.additionalProperties,n):n}function _D(e,t,n){return ye(n)?gD(e,t,n):n}function vD(e,t,n){let r=Pe(t.patternProperties),i=Ie(n);for(let[t,a]of r)for(let r of i)t.test(r)&&(n[r]=ED(e,a,n[r]));return U(t,`additionalProperties`)&&be(t.additionalProperties)?mD(e,r,t.additionalProperties,n):n}function yD(e,t,n){return ye(n)?vD(e,t,n):n}function bD(e,t,n){return U(e,t.$ref)?ED(e,e[t.$ref],n):n}function xD(e,t,n){if(B(n))return n;let r=KE(n);return tE(r)?r.value:n}function SD(e,t,n){return ED(e,fa(t.pattern),n)}function CD(e,t,n){if(!R(n))return n;for(let r=0;r<Math.min(t.items.length,n.length);r++)n[r]=ED(e,t.items[r],n[r]);return n}function wD(e,t,n){if(V(n))return n;let r=$E(n);return tE(r)?r.value:n}function TD(e,t,n){return V(n)?n:tE($E(n))?void 0:n}function ED(e,t,n){return An(t)?$T(e,t,n):Ln(t)?eE(e,t,n):gi(t)?eD(e,t,n):vi(t)?tD(e,t,n):dr(t)?nD(e,t,n):vr(t)?iD(e,t,n):Ci(t)?aD(e,t,n):br(t)?oD(e,t,n):Fi(t)?dD(e,t,n):Li(t)?fD(e,t,n):Bi(t)?pD(e,t,n):rr(t)?_D(e,t,n):wa(t)?yD(e,t,n):Gn(t)?bD(e,t,n):Yi(t)?xD(e,t,n):Id(t)?SD(e,t,n):Aa(t)?CD(e,t,n):Na(t)?wD(e,t,n):or(t)?rD(e,t,n):La(t)?TD(e,t,n):n}function DD(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return ED(t,n,r)}function OD(e,t,n){if(!R(n))return n;for(let r=0;r<n.length;r++)n[r]=RD(e,t.items,n[r]);return n}function kD(e,t,n){return t.Default(n)}function AD(e,t,n){return RD({...e,...t.$defs},Wn(t.$ref),n)}function jD(e,t){return V(t)?me(e.default)?e.default():YT(e.default):t}function MD(e,t,n){return RD(e,by(gy(e,t)),n)}function ND(e,t,n){if(!be(n))return n;let r=Ie(t.properties);for(let i of r)V(RD(e,t.properties[i],n[i]))&&(wn(t.properties[i])||!U(t.properties[i],`default`))||(n[i]=RD(e,t.properties[i],n[i]));if(!Mb(t)||fe(t.additionalProperties))return n;for(let i of Ie(n))r.includes(i)||(n[i]=RD(e,t.additionalProperties,n[i]));return n}function PD(e,t,n){if(!be(n))return n;let[r,i]=[new RegExp(xa(t)),Ca(t)];for(let t of Ie(n))r.test(t)&&Rb(i)&&(n[t]=RD(e,i,n[t]));if(!Mb(t))return n;for(let i of Ie(n))r.test(i)||(n[i]=RD(e,t.additionalProperties,n[i]));return n}function FD(e,t,n){return U(e,t.$ref)?RD(e,e[t.$ref],n):n}function ID(e,t,n){if(!R(n))return n;let[r,i]=[t.items,Math.max(t.items.length,n.length)];for(let t=0;t<i;t++)t<r.length&&(n[t]=RD(e,r[t],n[t]));return n}function LD(e,t,n){for(let r of t.anyOf){let t=RD(e,r,YT(n));if(OT(e,r,t))return t}return n}function RD(e,t,n){let r=Rb(t)?jD(t,n):n;return An(t)?OD(e,t,r):Ln(t)?kD(e,t,r):dr(t)?AD(e,t,r):br(t)?MD(e,t,r):rr(t)?ND(e,t,r):wa(t)?PD(e,t,r):Gn(t)?FD(e,t,r):Aa(t)?ID(e,t,r):or(t)?LD(e,t,r):r}function zD(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return RD(t,n,r)}function BD(e){return(...t)=>{let[n,r,i]=fr(t,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return e.reduce((e,t)=>t(n,r,e),i)}}function VD(e,t,n){return t[`~codec`].decode(n)}function HD(e,t,n){return t[`~codec`].encode(n)}function UD(e,t,n,r){return ui(n)?H(e,`Decode`)?VD(t,n,r):HD(t,n,r):r}function WD(e,t,n,r){if(!R(r))return Sr();for(let i=0;i<r.length;i++)r[i]=dO(e,t,n.items,r[i]);return UD(e,t,n,r)}function GD(e,t,n,r){let i=UD(e,t,n,r);if(!R(i))return i;for(let r=0;r<i.length;r++)i[r]=dO(e,t,n.items,i[r]);return i}function KD(e,t,n,r){return H(e,`Decode`)?WD(e,t,n,r):GD(e,t,n,r)}function qD(e,t,n,r){return r=dO(e,{...t,...n.$defs},Wn(n.$ref),r),UD(e,t,n,r)}function JD(e,t,n,r){for(let i of n.allOf)r=dO(e,t,i,r);return UD(e,t,n,r)}function YD(e,t,n,r){let i=UD(e,t,n,r);for(let r of n.allOf)i=dO(e,t,r,i);return i}function XD(e,t,n,r){return H(e,`Decode`)?JD(e,t,n,r):YD(e,t,n,r)}function ZD(e,t,n,r){if(!ye(r))return Sr();for(let i of Ie(n.properties))!U(r,i)||hD(n.properties[i],i,r)||(r[i]=dO(e,t,n.properties[i],r[i]));return UD(e,t,n,r)}function QD(e,t,n,r){let i=UD(e,t,n,r);if(!ye(i))return i;for(let r of Ie(n.properties))!U(i,r)||hD(n.properties[r],r,i)||(i[r]=dO(e,t,n.properties[r],i[r]));return i}function $D(e,t,n,r){return H(e,`Decode`)?ZD(e,t,n,r):QD(e,t,n,r)}function eO(e,t,n,r){if(!ye(r))return Sr();let i=new RegExp(xa(n));for(let a of Ie(r))i.test(a)||Sr(),r[a]=dO(e,t,Ca(n),r[a]);return UD(e,t,n,r)}function tO(e,t,n,r){let i=UD(e,t,n,r);if(!ye(i))return i;let a=new RegExp(xa(n));for(let r of Ie(i))a.test(r)&&(i[r]=dO(e,t,Ca(n),i[r]));return i}function nO(e,t,n,r){return H(e,`Decode`)?eO(e,t,n,r):tO(e,t,n,r)}function rO(e,t,n,r){return U(t,n.$ref)?dO(e,t,t[n.$ref],r):r}function iO(e,t,n,r){return H(e,`Decode`)?UD(e,t,n,rO(e,t,n,r)):rO(e,t,n,UD(e,t,n,r))}function aO(e,t,n,r){if(!R(r))return Sr();for(let i=0;i<Math.min(n.items.length,r.length);i++)r[i]=dO(e,t,n.items[i],r[i]);return UD(e,t,n,r)}function oO(e,t,n,r){let i=UD(e,t,n,r);if(!R(i))return r;for(let r=0;r<Math.min(n.items.length,i.length);r++)i[r]=dO(e,t,n.items[r],i[r]);return i}function sO(e,t,n,r){return H(e,`Decode`)?aO(e,t,n,r):oO(e,t,n,r)}function cO(e,t,n,r){for(let i of n.anyOf)if(OT(t,i,r))return UD(e,t,n,dO(e,t,i,r));return Sr()}function lO(e,t,n,r){let i=UD(e,t,n,r);for(let r of n.anyOf){let n=dO(e,t,r,YT(i));if(OT(t,r,n))return n}return i}function uO(e,t,n,r){return H(e,`Decode`)?cO(e,t,n,r):lO(e,t,n,r)}function dO(e,t,n,r){return An(n)?KD(e,t,n,r):dr(n)?qD(e,t,n,r):br(n)?XD(e,t,n,r):rr(n)?$D(e,t,n,r):wa(n)?nO(e,t,n,r):Gn(n)?iO(e,t,n,r):Aa(n)?sO(e,t,n,r):or(n)?uO(e,t,n,r):UD(e,t,n,r)}var fO=class extends AT{constructor(e,t){super(`Decode`,e,t)}};function pO(e,t,n){if(!OT(e,t,n))throw new fO(n,kT(e,t,n));return n}function mO(e,t,n){return dO(`Decode`,e,t,n)}var hO=BD([(e,t,n)=>YT(n),(e,t,n)=>zD(e,t,n),(e,t,n)=>DD(e,t,n),(e,t,n)=>QT(e,t,n),(e,t,n)=>pO(e,t,n),(e,t,n)=>mO(e,t,n)]);function gO(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return hO(t,n,r)}var _O=class extends AT{constructor(e,t){super(`Encode`,e,t)}};function vO(e,t,n){if(!OT(e,t,n))throw new _O(n,kT(e,t,n));return n}function yO(e,t,n){return dO(`Encode`,e,t,n)}var bO=BD([(e,t,n)=>YT(n),(e,t,n)=>yO(e,t,n),(e,t,n)=>zD(e,t,n),(e,t,n)=>DD(e,t,n),(e,t,n)=>QT(e,t,n),(e,t,n)=>vO(e,t,n)]);function xO(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return bO(t,n,r)}function SO(e,t){return ui(t)||AO(e,t.items)}function CO(e,t){return ui(t)||DO({...e,...t.$defs},Wn(t.$ref))}function wO(e,t){return ui(t)||t.allOf.some(t=>AO(e,t))}function TO(e,t){return ui(t)||Ie(t.properties).some(n=>AO(e,t.properties[n]))}function EO(e,t){return ui(t)||AO(e,Ca(t))}function DO(e,t){return jO.has(t.$ref)?!1:(jO.add(t.$ref),ui(t)||U(e,t.$ref)&&AO(e,e[t.$ref]))}function OO(e,t){return ui(t)||t.items.some(t=>AO(e,t))}function kO(e,t){return ui(t)||t.anyOf.some(t=>AO(e,t))}function AO(e,t){return An(t)?SO(e,t):dr(t)?CO(e,t):br(t)?wO(e,t):rr(t)?TO(e,t):wa(t)?EO(e,t):Gn(t)?DO(e,t):Aa(t)?OO(e,t):or(t)?kO(e,t):ui(t)}var jO=new Set;function MO(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return jO.clear(),AO(t,n)}var NO=class extends Error{constructor(e,t){super(t),this.type=e}};function PO(e,t){return me(t.default)?t.default(t):be(t.default)?YT(t.default):t.default}function FO(e,t){if(Cx(t)&&!Rb(t))throw new NO(t,`Arrays with uniqueItems constraints must specify a default annotation`);let n=ax(t)?t.minItems:0;return Array.from({length:n},()=>ck(e,t.items))}async function*IO(){}function LO(e,t){return IO()}function RO(e,t){return t.Create()}function zO(e,t){return Kb(t)?BigInt(t.exclusiveMinimum)+BigInt(1):rx(t)?BigInt(t.minimum):BigInt(0)}function BO(e,t){return!1}function VO(e,t){let n=ck(e,t.instanceType);return class{constructor(){Object.assign(this,n)}}}function HO(e,t){return ck({...e,...t.$defs},Wn(t.$ref))}function UO(e,t){return ck(e,Xd(t))}function WO(e,t){let n=ck(e,t.returnType);return()=>n}function GO(e,t){return Kb(t)&&ve(t.exclusiveMinimum)?t.exclusiveMinimum+1:rx(t)?t.minimum:0}function KO(e,t){return ck(e,by(gy(e,t)))}function*qO(){}function JO(e,t){return qO()}function YO(e,t){return t.const}function XO(e,t){throw new NO(t,`Cannot create TNever types`)}function ZO(e,t){return null}function QO(e,t){return Kb(t)&&ve(t.exclusiveMinimum)?t.exclusiveMinimum+1:rx(t)?t.minimum:0}function $O(e,t){return(V(t.required)?[]:t.required).reduce((n,r)=>({...n,[r]:ck(e,t.properties[r])}),{})}function ek(e,t){return Promise.resolve(ck(e,t.item))}function tk(e,t){if(sx(t)&&!Rb(t))throw new NO(t,`Record with the minProperties constraint must have a default annotation`);return{}}function nk(e,t){return U(e,t.$ref)?ck(e,e[t.$ref]):(()=>{throw new NO(t,`Unable to deref Ref`)})()}function rk(e,t){if((dx(t)||qb(t))&&!Rb(t))throw Error(`Strings with format or pattern constraints must specify default`);let n=ox(t)?t.minLength:0;return``.padEnd(n)}function ik(e,t){return Symbol()}function ak(e,t){let n=fa(t.pattern);if(Yi(n))throw new NO(t,`Unable to create TemplateLiteral due to infinite type expansion`);return ck(e,n)}function ok(e,t){return Array.from({length:t.minItems},(n,r)=>ck(e,t.items[r]))}function sk(e,t){if(H(t.anyOf.length,0))throw Error(`Unable to create Union with no variants`);return ck(e,t.anyOf[0])}function ck(e,t){return Rb(t)?PO(e,t):An(t)?FO(e,t):Nn(t)?LO(e,t):Ln(t)?RO(e,t):gi(t)?zO(e,t):vi(t)?BO(e,t):zn(t)?VO(e,t):dr(t)?HO(e,t):vr(t)?UO(e,t):Hn(t)?WO(e,t):Ci(t)?GO(e,t):br(t)?KO(e,t):Ti(t)?JO(e,t):Fi(t)?YO(e,t):Qn(t)?XO(e,t):Li(t)?ZO(e,t):Bi(t)?QO(e,t):rr(t)?$O(e,t):Ki(t)?ek(e,t):wa(t)?tk(e,t):Gn(t)?nk(e,t):Yi(t)?rk(e,t):Hi(t)?ik(e,t):Id(t)?ak(e,t):Aa(t)?ok(e,t):Na(t)?void 0:or(t)?sk(e,t):(La(t),void 0)}function lk(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return ck(t,n)}var uk=class extends AT{constructor(e,t){super(`Parse`,e,t)}};function dk(e,t,n){if(!OT(e,t,n))throw new uk(n,kT(e,t,n));return n}var fk=BD([(e,t,n)=>YT(n),(e,t,n)=>zD(e,t,n),(e,t,n)=>DD(e,t,n),(e,t,n)=>QT(e,t,n),(e,t,n)=>dk(e,t,n)]);function pk(...e){let[t,n,r]=fr(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});if(OT(t,n,r))return r;if($t().correctiveParse)return fk(t,n,r);throw new uk(r,kT(t,n,r))}ar([nr({type:ki(`insert`),path:Ji(),value:cr()}),Object({type:ki(`update`),path:Ji(),value:cr()}),nr({type:ki(`delete`),path:Ji()})]);var mk=e=>e&&typeof e==`object`&&`format`in e&&e.format===`binary`,hk=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.size==`number`&&typeof e.stream.bind(e)==`function`;Qt({correctiveParse:!0});var gk=class{isBigInt=e=>Yi(e)&&`format`in e&&e.format===`bigint`;isUUID=e=>Yi(e)&&`format`in e&&e.format===`uuid`;isObject=rr;isNumber=Bi;isString=Yi;isBoolean=vi;isAny=Yn;isArray=An;isOptional=wn;isUnion=or;isInteger=Ci;isNull=Li;isUndefined=Na;isUnsafe=Fa;isRecord=wa;isTuple=Aa;isVoid=La;isLiteral=Fi;isSchema=sn;isScalar=e=>this.isString(e)||this.isNumber(e)||this.isInteger(e)||this.isBoolean(e);isFile=mk;isDateTime=e=>K.schema.isString(e)&&e.format===`date-time`;isDate=e=>K.schema.isString(e)&&e.format===`date`;isTime=e=>K.schema.isString(e)&&e.format===`time`;isDuration=e=>K.schema.isString(e)&&e.format===`duration`},_k=class e{static format=wb;static{wb.Set(`bigint`,t=>e.isValidBigInt(t))}static translateError(e,t){return e.cause.message}static setLocale(e){}static isValidBigInt(e){if(typeof e==`number`)return Number.isInteger(e);if(!e.trim()||!/^-?\d+$/.test(e))return!1;try{return BigInt(e),!0}catch{return!1}}static DEFAULT_STRING_MAX_LENGTH=255;static DEFAULT_SHORT_STRING_MAX_LENGTH=64;static DEFAULT_LONG_STRING_MAX_LENGTH=1024;static DEFAULT_RICH_STRING_MAX_LENGTH=65535;static DEFAULT_ARRAY_MAX_ITEMS=1e3;raw=wy;any=Jn;void=Ia;undefined=Ma;record=ya;union=ar;tuple=ka;null=Ii;const=ki;options=O_;schema=new gk;extend(e,t,n){return mp(Array.isArray(e)?e:[e],t,{additionalProperties:!1,...n})}pick(e,t,n){return K_(e,t,{additionalProperties:!1,...n})}omit(e,t,n){return S_(e,t,{additionalProperties:!1,...n})}partial(e,t){return L_(e,{additionalProperties:!1,...t})}object(e,t){return nr(e,{additionalProperties:!1,...t})}array(t,n){return kn(t,{maxItems:e.DEFAULT_ARRAY_MAX_ITEMS,...n})}string(e={}){return Ji({...e})}text(t={}){let{size:n,...r}=t;return Ji({maxLength:n===`short`?e.DEFAULT_SHORT_STRING_MAX_LENGTH:n===`long`?e.DEFAULT_LONG_STRING_MAX_LENGTH:n===`rich`?e.DEFAULT_RICH_STRING_MAX_LENGTH:e.DEFAULT_STRING_MAX_LENGTH,"~options":{trim:t.trim??!0,lowercase:t.lowercase??!1},...r})}json(e){return K.record(K.text(),K.any(),e)}boolean(e){return _i({...e})}number(e){return zi({...e})}integer(e){return Si({...e})}int32(e){return Si({minimum:-2147483648,maximum:2147483647,...e})}int64(e){return zi({format:`int64`,multipleOf:1,minimum:-9007199254740991,maximum:9007199254740991,...e})}optional(e){return Cn(e)}nullable(e,t){return ar([Ii(),e],t)}nullify=(e,t)=>$g(yi(`K`),Vg(e),Wn(`K`),ar([vg(e,Wn(`K`)),Ii()]),t);enum(e,t){return Pa(K.text({enum:e,pattern:e.map(e=>`^${e}$`).join(`|`),...t}))}bigint(e){return K.string({...e,format:`bigint`})}url(e){return this.string({...e,format:`url`})}binary(e={}){return this.string({...e,format:`binary`})}uuid(e){return this.string({...e,format:`uuid`})}file(e){return Pa(Jn({[f]:e,format:`binary`}))}stream(){return Pa(Jn({format:`stream`,type:`string`}))}email(e){return this.text({...e,format:`email`,trim:!0,lowercase:!0})}e164(e){return this.text({...e,description:`Phone number in E.164 format, e.g. +1234567890.`,pattern:`^\\+[1-9]\\d{1,14}$`})}bcp47(e){return this.text({...e,description:`BCP 47 language tag, e.g. en, en-US, fr, fr-CA.`,pattern:`^[a-z]{2,3}(?:-[A-Z]{2})?$`})}shortText(e){return this.text({size:`short`,...e})}longText(e){return this.text({size:`long`,...e})}richText(e){return this.text({size:`rich`,...e})}constantCase=e=>this.text({pattern:`^[A-Z_-]+$`,...e});valueLabel=e=>this.object({value:this.constantCase({description:`Machine-readable value.`}),label:this.text({description:`Human-readable label.`}),description:this.optional(this.text({description:`Description of the value.`,size:`long`}))},e);datetime=e=>K.text({...e,format:`date-time`});date=e=>K.text({...e,format:`date`});time=e=>K.text({...e,format:`time`});duration=e=>K.text({...e,format:`duration`})},K=new _k,vk=class extends k{cache=new Map;textEncoder=new TextEncoder;textDecoder=new TextDecoder;varCounter=0;useFunctionCompilation=!0;configure(e){return e.useFunctionCompilation!==void 0&&(this.useFunctionCompilation=e.useFunctionCompilation,this.cache.clear()),this}onConfigure=j({on:`configure`,handler:()=>{this.useFunctionCompilation=this.canUseFunction()}});encodeToString(e,t){return this.getCodec(e).encode(t)}encodeToBinary(e,t){return this.textEncoder.encode(this.encodeToString(e,t))}decode(e,t){if(t instanceof Uint8Array){let n=this.textDecoder.decode(t);return this.getCodec(e).decode(n)}return typeof t==`string`?this.getCodec(e).decode(t):Array.isArray(t)?this.reconstructObject(e,t):t}canUseFunction(){try{return Function(`return true`)()===!0}catch{return!1}}getCodec(e){let t=this.cache.get(e);return t||(t=this.useFunctionCompilation?this.compileWithFunction(e):this.compileInterpreted(e),this.cache.set(e,t)),t}nextVar(){return`_${this.varCounter++}`}compileWithFunction(e){this.varCounter=0;let t=this.genEnc(e,`v`);this.varCounter=0;let n=this.genDec(e);return{encode:Function(`v`,`return JSON.stringify(${t});`),decode:Function(`s`,`const a=JSON.parse(s);let i=0;${n.code}return ${n.result};`)}}compileInterpreted(e){let t=this;return{encode(n){return JSON.stringify(t.interpretEncode(e,n))},decode(n){let r={arr:JSON.parse(n),i:0};return t.interpretDecode(e,r)}}}interpretEncode(e,t){if(this.isLeaf(e))return t;if(K.schema.isBigInt(e))return`${t}n`;if(K.schema.isArray(e)){let n=e;return!Array.isArray(t)||K.schema.isScalar(n.items)?t:t.map(e=>this.interpretEncode(n.items,e))}if(K.schema.isObject(e)){let n=[];for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=t[r];i?n.push(e===void 0?null:this.interpretEncode(o,e)):a?n.push(e===null?null:this.interpretEncode(o,e)):n.push(this.interpretEncode(o,e))}return n}if(K.schema.isOptional(e)||K.schema.isUnion(e)){let n=this.unwrap(e);return this.isNullable(e)?t===null?null:this.interpretEncode(n,t):t===void 0?null:this.interpretEncode(n,t)}return t}interpretDecode(e,t){if(this.isLeaf(e))return t.arr[t.i++];if(K.schema.isBigInt(e))return BigInt(t.arr[t.i++].slice(0,-1));if(K.schema.isArray(e)){let n=e,r=t.arr[t.i++];return Array.isArray(r)&&K.schema.isObject(n.items)?r.map(e=>this.interpretDecodeFromValue(n.items,e)):r}if(K.schema.isObject(e)){let n={};for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=t.arr[t.i++];i?e!==null&&(n[r]=this.interpretDecodeFromValue(o,e)):a?n[r]=e===null?null:this.interpretDecodeFromValue(o,e):n[r]=this.interpretDecodeFromValue(o,e)}return n}if(K.schema.isOptional(e)||K.schema.isUnion(e)){let n=this.unwrap(e),r=t.arr[t.i++];return r===null?this.isNullable(e)?null:void 0:K.schema.isObject(n)||K.schema.isArray(n)?this.interpretDecodeFromValue(n,r):r}return t.arr[t.i++]}interpretDecodeFromValue(e,t){if(this.isLeaf(e))return t;if(K.schema.isBigInt(e))return BigInt(t.slice(0,-1));if(K.schema.isArray(e)){if(!Array.isArray(t))return t;let n=e;return K.schema.isObject(n.items)?t.map(e=>this.interpretDecodeFromValue(n.items,e)):t}if(K.schema.isObject(e)){let n=e.properties,r=Object.keys(n),i={};for(let e=0;e<r.length;e++){let a=r[e],o=n[a],s=K.schema.isOptional(o),c=this.unwrap(o),l=t[e];s&&l===null||(K.schema.isObject(c)?i[a]=this.interpretDecodeFromValue(c,l):K.schema.isBigInt(c)?i[a]=BigInt(l.slice(0,-1)):i[a]=l)}return i}return t}genEnc(e,t){if(this.isLeaf(e))return t;if(K.schema.isBigInt(e))return`${t}+'n'`;if(K.schema.isArray(e)){let n=e,r=this.genEnc(n.items,`e`);return K.schema.isScalar(n.items)?t:`${t}.map(e=>${r})`}if(K.schema.isObject(e)){let n=[];for(let{key:r,isOpt:i,isNullable:a,inner:o}of this.getObjectFields(e)){let e=`${t}[${JSON.stringify(r)}]`,s=this.genEnc(o,e);i?n.push(`${e}!==undefined?${s}:null`):a?n.push(`${e}!==null?${s}:null`):n.push(s)}return`[${n.join(`,`)}]`}if(K.schema.isOptional(e)||K.schema.isUnion(e)){let n=this.unwrap(e),r=this.genEnc(n,t);return this.isNullable(e)?`${t}!==null?${r}:null`:`${t}!==undefined?${r}:null`}return t}genDec(e){let t=this.nextVar();if(this.isLeaf(e))return{code:``,result:`a[i++]`};if(K.schema.isBigInt(e))return{code:``,result:`BigInt(a[i++].slice(0,-1))`};if(K.schema.isArray(e)){let t=e;return K.schema.isObject(t.items)?{code:``,result:`a[i++].map(e=>${this.genDecFromValue(t.items,`e`)})`}:{code:``,result:`a[i++]`}}if(K.schema.isObject(e)){let n=this.getObjectFields(e);if(n.every(({isOpt:e,isNullable:t,inner:n})=>!e&&!t&&!K.schema.isObject(n)&&!K.schema.isArray(n)))return{code:``,result:`{${n.map(({key:e})=>`${JSON.stringify(e)}:a[i++]`).join(`,`)}}`};let r=`const ${t}={};`;for(let{key:e,isOpt:i,isNullable:a,inner:o}of n){let n=JSON.stringify(e);if(i){let e=this.genDecFromValue(o,`t`);r+=`{const t=a[i++];if(t!==null){${t}[${n}]=${e};}}`}else if(a){let e=this.genDecFromValue(o,`t`);r+=`{const t=a[i++];if(t===null){${t}[${n}]=null;}else{${t}[${n}]=${e};}}`}else if(K.schema.isObject(o)){let e=this.genDecFromValue(o,`a[i++]`);r+=`${t}[${n}]=${e};`}else if(K.schema.isArray(o)){let e=o;if(K.schema.isObject(e.items)){let i=this.genDecFromValue(e.items,`e`);r+=`${t}[${n}]=a[i++].map(e=>${i});`}else r+=`${t}[${n}]=a[i++];`}else r+=`${t}[${n}]=a[i++];`}return{code:r,result:t}}if(K.schema.isOptional(e)||K.schema.isUnion(e)){let n=this.unwrap(e),r=this.genDec(n);return{code:`const ${t}t=a[i++];let ${t};if(${t}t===null){${t}=${this.isNullable(e)?`null`:`undefined`};}else{${r.code.replace(/a\[i\+\+\]/g,`${t}t`)}${t}=${r.result.replace(/a\[i\+\+\]/g,`${t}t`)};}`,result:t}}return{code:``,result:`a[i++]`}}genDecFromValue(e,t){if(this.isLeaf(e))return t;if(K.schema.isBigInt(e))return`BigInt(${t}.slice(0,-1))`;if(K.schema.isArray(e)){let n=e.items;if(K.schema.isObject(n)||K.schema.isBigInt(n)){let e=this.nextVar();return`${t}.map(${e}=>${this.genDecFromValue(n,e)})`}return t}if(K.schema.isObject(e)){let n=e.properties,r=Object.keys(n),i=this.nextVar();return`((${i}=${t})=>({${r.map((e,t)=>{let r=this.unwrap(n[e]),a=`${i}[${t}]`,o=JSON.stringify(e);return K.schema.isObject(r)?`${o}:${this.genDecFromValue(r,a)}`:K.schema.isBigInt(r)?`${o}:BigInt(${a}.slice(0,-1))`:`${o}:${a}`}).join(`,`)}}))()`}return t}isLeaf(e){return K.schema.isScalar(e)||this.isEnum(e)}getObjectFields(e){let t=e.properties,n=new Set(e.required||[]);return Object.keys(t).map(e=>{let r=t[e];return{key:e,isOpt:!n.has(e)||K.schema.isOptional(r),isNullable:this.isNullable(r),inner:this.unwrap(r)}})}isEnum(e){return`enum`in e&&Array.isArray(e.enum)&&(e.enum?.length??0)>0}isNullable(e){return K.schema.isUnion(e)?e.anyOf?.some(e=>K.schema.isNull(e))??!1:!1}unwrap(e){return`anyOf`in e&&Array.isArray(e.anyOf)&&e.anyOf.find(e=>!K.schema.isNull(e))||e}reconstructObject(e,t){if(!K.schema.isObject(e))return t;let n={},r=0;for(let{key:i,isOpt:a,isNullable:o,inner:s}of this.getObjectFields(e)){let e=t[r++];a?e!==null&&(n[i]=K.schema.isObject(s)?this.reconstructObject(s,e):e):o?n[i]=e===null?null:K.schema.isObject(s)?this.reconstructObject(s,e):e:n[i]=K.schema.isObject(s)?this.reconstructObject(s,e):e}return n}},yk=class e extends In{constructor(...e){super();let t=fr(e,{6:(e,t,n,r,i,a)=>[e,t,n,r,i,a],2:(e,t)=>[e,t]});if(t.length===6){let[e,n,r,i,a,o]=t;this.context=e,this.type=n,this.isAccelerated=r,this.hasCodec=i,this.code=a,this.check=o}else{let[e,n]=t,r=TT(e,n).Evaluate();this.hasCodec=MO(e,n),this.context=e,this.type=n,this.isAccelerated=r.IsAccelerated,this.code=r.Code,this.check=r.Check}}IsAccelerated(){return this.isAccelerated}Context(){return this.context}Type(){return this.type}Code(){return this.code}Check(e){return this.check(e)}Errors(e){return Tr()&&this.check(e)?[]:kT(this.context,this.type,e)}Clean(e){return QT(this.context,this.type,e)}Convert(e){return DD(this.context,this.type,e)}Create(){return lk(this.context,this.type)}Default(e){return zD(this.context,this.type,e)}Clone(){return new e(this.context,this.type,this.isAccelerated,this.hasCodec,this.code,this.check)}Parse(e){if(this.Check(e))return e;if($t().correctiveParse)return fk(this.context,this.type,e);throw new uk(e,this.Errors(e))}Decode(e){return this.hasCodec?gO(this.context,this.type,e):this.Parse(e)}Encode(e){return this.hasCodec?xO(this.context,this.type,e):this.Parse(e)}};function bk(...e){let[t,n]=fr(e,{2:(e,t)=>[e,t],1:e=>[{},e]});return new yk(t,n)}var xk=class extends p{name=`TypeBoxError`;cause;value;constructor(e){super(`Invalid input: ${e.message}${e.instancePath?` at ${e.instancePath}`:``}`,{cause:e});let t=e.params;t?.requiredProperties?this.value={path:`/${t.requiredProperties[0]}`,message:`must be defined`}:this.value={path:e.instancePath,message:e.message},this.cause=e}},Sk=class{cache=new Map;useEval=!0;validate(e,t,n={}){let r=this.beforeParse(e,t,{trim:n.trim??!0,nullToUndefined:n.nullToUndefined??!0,deleteUndefined:n.deleteUndefined??!0});try{return this.useEval?this.getValidator(e).Parse(r):pk(e,r)}catch(e){throw e.cause?.errors?.[0]?new xk(e.cause.errors[0]):e}}getValidator(e){if(this.cache.has(e))return this.cache.get(e);let t=bk(e);return this.cache.set(e,t),t}beforeParse(e,t,n){if(!e)return t;if(!(t===null&&!this.isSchemaNullable(e)&&n.nullToUndefined)){if(!e.type&&e.anyOf&&(e=e.anyOf.find(e=>e.type!==`null`&&e.type!==`undefined`)||e),Array.isArray(t))return t.map(t=>this.beforeParse(e.items,t,n));if(typeof t==`string`&&e.type===`string`){let r=t;return n.trim&&e[`~options`]?.trim&&(r=r.trim()),e[`~options`]?.lowercase&&(r=r.toLowerCase()),r}if(typeof t==`object`&&t&&e.type===`object`){let r={};for(let i in t){let a=this.beforeParse(e.properties?.[i],t[i],n);a===void 0&&n.deleteUndefined||(r[i]=a)}return r}return t}}isSchemaNullable=e=>e?e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)?!0:e.anyOf?e.anyOf.some(e=>this.isSchemaNullable(e)):e.oneOf?e.oneOf.some(e=>this.isSchemaNullable(e)):e.allOf?e.allOf.some(e=>this.isSchemaNullable(e)):!1:!1;onConfigure=j({on:`configure`,handler:()=>{this.useEval=this.canEval()}});canEval(){try{return bk(K.object({test:K.string()})).Parse({test:`value`}),!0}catch{return!1}}},Ck=class{codecs=new Map;jsonCodec=D(A);keylessCodec=D(vk);schemaValidator=D(Sk);default=`json`;constructor(){this.register({name:`json`,codec:this.jsonCodec,default:!0}),this.register({name:`keyless`,codec:this.keylessCodec})}register(e){this.codecs.set(e.name,e.codec),e.default&&(this.default=e.name)}getCodec(e){let t=this.codecs.get(e);if(!t)throw new p(`Codec "${e}" not found. Available codecs: ${Array.from(this.codecs.keys()).join(`, `)}`);return t}encode(e,t,n){let r=this.getCodec(n?.encoder??this.default),i=n?.as??`object`;return n?.validation!==!1&&(t=this.schemaValidator.validate(e,t,n?.validation)),i===`object`?t:i===`binary`?r.encodeToBinary(e,t):r.encodeToString(e,t)}decode(e,t,n){let r=n?.encoder??this.default,i=this.getCodec(r).decode(e,t);return n?.validation!==!1&&(i=this.schemaValidator.validate(e,i,n?.validation)),i}validate(e,t,n){return this.schemaValidator.validate(e,t,n)}},wk=class{logFn;events={};cache=new Map;sortedCache=new Map;constructor(e){this.logFn=e}get log(){return this.logFn?.()}clear(){this.events={},this.cache.clear(),this.sortedCache.clear()}on(e,t){this.events[e]||(this.events[e]={first:[],normal:[],last:[]});let n=typeof t==`function`?{callback:t}:t,r=this.events[e];return n.priority===`first`?r.first.push(n):n.priority===`last`?r.last.push(n):r.normal.push(n),this.invalidateCache(e),()=>{let t=this.events[e];if(t){for(let e of[`first`,`normal`,`last`])t[e]=t[e].filter(e=>e.callback!==n.callback);this.invalidateCache(e)}}}invalidateCache(e){this.cache.delete(e),this.cache.delete(`${e}:catch`),this.sortedCache.delete(e)}resolve(e){let t=this.sortedCache.get(e);if(t)return t;let n=this.events[e];if(!n)return[];let r=[...this.topoSort(n.first),...this.topoSort(n.normal),...this.topoSort(n.last)];return this.sortedCache.set(e,r),r}topoSort(e){if(e.length<=1||!e.some(e=>e.before&&e.before.length>0||e.after&&e.after.length>0))return e;let t=new Map,n=new Map;for(let r of e)t.set(r,0),n.set(r,new Set);let r=new Map;for(let t of e)if(t.caller){let e=r.get(t.caller);e||(e=[],r.set(t.caller,e)),e.push(t)}for(let i of e){if(i.after)for(let e of i.after){let a=r.get(e);if(a)for(let e of a)e!==i&&!n.get(e).has(i)&&(n.get(e).add(i),t.set(i,t.get(i)+1))}if(i.before)for(let e of i.before){let a=r.get(e);if(a)for(let e of a)e!==i&&!n.get(i).has(e)&&(n.get(i).add(e),t.set(e,t.get(e)+1))}}let i=[];for(let n of e)t.get(n)===0&&i.push(n);let a=[];for(;i.length>0;){let e=i.shift();a.push(e);for(let r of n.get(e)){let e=t.get(r)-1;t.set(r,e),e===0&&i.push(r)}}if(a.length!==e.length)throw new p(`Circular dependency detected in hook before/after constraints`);return a}compile(e,t={}){let n=this.resolve(e);if(n.length===0)return()=>{};let r=t.catch??!1,i=this.log,a=async(t,a)=>{for(let o=t;o<n.length;o++){let t=n[o];try{let n=t.callback(a);n&&typeof n==`object`&&`then`in n&&(r?await n.catch(n=>{i?.error(`${String(e)}(${t.caller?.name??`unknown`}) ERROR`,n)}):await n)}catch(n){if(r)i?.error(`${String(e)}(${t.caller?.name??`unknown`}) ERROR`,n);else throw n}}};return t=>{for(let o=0;o<n.length;o++){let s=n[o];try{let n=s.callback(t);if(n&&typeof n==`object`&&`then`in n)return r?n.catch(t=>{i?.error(`${String(e)}(${s.caller?.name??`unknown`}) ERROR`,t)}).then(()=>a(o+1,t)):n.then(()=>a(o+1,t))}catch(t){if(r)i?.error(`${String(e)}(${s.caller?.name??`unknown`}) ERROR`,t);else throw t}}}}async emit(e,t,n={}){if(!n.log){let r=n.catch?`${e}:catch`:e,i=this.cache.get(r);i||(i=this.compile(e,{catch:n.catch}),this.cache.set(r,i)),await i(t);return}let r=this.resolve(e);if(r.length===0)return;let i=performance.now();this.log?.trace(`${String(e)} ...`);for(let i of r){let r=i.caller?.name??`unknown`,a=performance.now();this.log?.trace(`${String(e)}(${r}) ...`);try{let e=i.callback(t);e&&typeof e==`object`&&`then`in e&&await e}catch(t){if(n.catch){this.log?.error(`${String(e)}(${r}) ERROR`,t);continue}throw new p(`Failed during '${String(e)}()' hook for service: ${r}`,{cause:t})}this.log?.debug(`${String(e)}(${r}) OK [${(performance.now()-a).toFixed(1)}ms]`)}this.log?.debug(`${String(e)} OK [${(performance.now()-i).toFixed(1)}ms]`)}},Tk=e=>new Ek(e),Ek=class{options;get schema(){return this.options.schema}get key(){return this.options.name}constructor(e){this.options=e}};Tk[u]=`atom`;var Dk=class{als=D(E);events=D(wk);codec=D(A);atoms=new Map;store={};constructor(e={}){this.store=e}exportAtoms(e){let t={};if(e===`current`){if(this.als?.exists())for(let e of this.atoms.values()){let n=this.als.get(e.key,`current`);n!==void 0&&(t[e.key]=n)}return t}for(let[n,r]of this.atoms.entries()){let i=this.get(r,e);i!==void 0&&(t[n]=i)}return t}getAtoms(e=!0){let t=[];if(e&&this.als?.exists())for(let e of this.atoms.values()){let n=this.als.get(e.key);n!==void 0&&t.push({atom:e,value:n})}else for(let[e,n]of this.atoms.entries())t.push({atom:n,value:this.store[e]});return t}register(e){let t=e.key;return this.atoms.has(t)||(this.atoms.set(t,e),t in this.store||this.set(t,e.options.default,{skipContext:!0})),this}get(e,t){e instanceof Ek&&this.register(e);let n=e instanceof Ek?e.key:e,r=this.store;return t===`app`?r[n]:this.als?.exists()?this.als.get(n,t)??(t?void 0:r[n]):r[n]}set(e,t,n){e instanceof Ek&&this.register(e);let r=e instanceof Ek?e.key:e,i=this.store,a=this.get(r);return a===t&&typeof t!=`object`?this:(n?.skipContext!==!0&&this.als?.exists()?this.als.set(r,t):i[r]=t,n?.skipEvents!==!0&&this.events?.emit(`state:mutate`,{key:r,value:t,prevValue:a},{catch:!0}).catch(()=>null),this)}mut(e,t){let n=t(this.get(e));return this.set(e,n)}has(e){return this.als?.has(e)?!0:e in this.store}del(e){return this.set(e,void 0)}push(e,...t){let n=this.get(e)??[];return Array.isArray(n)&&this.set(e,[...n,...t]),this}clear(){return this.store={},this}keys(){return Object.keys(this.store)}},Ok=class e{static create(t={}){typeof process==`object`&&(t.env={...t.env}),typeof process==`object`&&(t.env??={},Object.assign(t.env,{NODE_ENV:`production`}));let n=new e(t);if(n.isTest()){let e=globalThis,r=t[`alepha.test.beforeAll`]??e.beforeAll,i=t[`alepha.test.afterAll`]??e.afterAll,a=t[`alepha.test.afterEach`]??e.afterEach,o=t[`alepha.test.onTestFinished`]??e.onTestFinished;r?.(()=>n.start()),i?.(()=>n.stop());try{o?.(()=>n.stop())}catch{}n.store.set(`alepha.test.beforeAll`,r).set(`alepha.test.afterAll`,i).set(`alepha.test.afterEach`,a).set(`alepha.test.onTestFinished`,o)}else t[`alepha.logger`]??={trace:console.log,debug:console.debug,info:console.log,warn:console.warn,error:console.error};return n}locked=!1;configured=!1;started=!1;ready=!1;startPromise;startedAt=0;pendingInstantiations=[];cacheEnv=new Map;modules=[];substitutions=new Map;primitiveRegistry=new Map;registry=new Map;context;events;store;codec;get log(){return this.store.get(`alepha.logger`)}get env(){return this.store.get(`env`)??{}}constructor(e={}){this.store=this.inject(Dk,{args:[e]}),this.events=this.inject(wk),this.events.logFn=()=>this.log,this.context=this.inject(E),this.codec=this.inject(Ck)}fork(e,t={}){return this.context.run(e,t)}get(e,t){return this.store.get(e,t)}set(e,t){return this.store.set(e,t),this}isLocked(){return this.locked}isConfigured(){return this.configured}isStarted(){return this.started}isReady(){return this.ready}isCI(){return this.env.GITHUB_ACTIONS?!0:!!this.env.CI}isBrowser(){return typeof window<`u`}isViteDev(){return this.isBrowser()?!1:!!this.env.VITE_ALEPHA_DEV}isBun(){return`Bun`in globalThis}isServerless(){return this.isBrowser()?!1:!!(this.env.ALEPHA_SERVERLESS||this.env.VERCEL_REGION||typeof global==`object`&&typeof global.Cloudflare==`object`)}isTest(){return this.env.NODE_ENV===`test`}isProduction(){return this.env.NODE_ENV===`production`}static STARTUP_TIMEOUT=3e4;async start(){if(this.ready)return this.log?.debug(`App is already started, skipping...`),this;if(this.startPromise){let t=performance.now()-this.startedAt;if(t>e.STARTUP_TIMEOUT)this.log?.warn(`Previous start attempt is stale (${Math.round(t)}ms ago), resetting...`),this.resetStartup();else return this.log?.warn(`App is already starting, waiting for it to finish...`),this.startPromise}return this.startedAt=performance.now(),this.startPromise=this.boot(),this.startPromise}async boot(){let e=performance.now();this.log?.info(`Starting App...`);try{for(let[e]of this.substitutions.entries())this.inject(e);let t=this.store.get(`alepha.target`);if(t){this.store.set(`alepha.target`,void 0),this.modules=[],this.registry=new Map,this.primitiveRegistry=new Map,this.pendingInstantiations=[],this.events.clear(),delete t[d],this.with(t);for(let[e]of this.substitutions.entries())this.inject(e)}return this.locked=!0,await this.events.emit(`configure`,this,{log:!0}),this.configured=!0,await this.events.emit(`start`,this,{log:!0}),this.started=!0,await this.events.emit(`ready`,this,{log:!0}),this.log?.info(`App is now ready [${Math.round(performance.now()-e)}ms]`),this.ready=!0,this}catch(e){throw this.resetStartup(),e}}resetStartup(){this.startPromise=void 0,this.startedAt=0,this.locked=!1,this.configured=!1,this.started=!1,this.ready=!1}async stop(){this.started&&(this.log?.info(`Stopping App...`),await this.events.emit(`stop`,this,{log:!0}),this.log?.info(`App is now off`),this.started=!1,this.ready=!1,this.startPromise=void 0,this.startedAt=0)}async destroy(){await this.stop(),this.modules=[],this.registry=new Map,this.primitiveRegistry=new Map,this.pendingInstantiations=[],this.substitutions=new Map,this.cacheEnv=new Map,this.events.clear(),this.locked=!1,this.configured=!1}has(t,n={}){if(t===e)return!0;let{inStack:r=!0,inRegistry:i=!0,inSubstitutions:a=!0,registry:o=this.registry}=n,{provide:s}=typeof t==`object`&&`provide`in t?t:{provide:t};if(a&&this.substitutions.get(s)||i&&o.get(s))return!0;if(r){let e=this.substitutions.get(s)?.use;return e&&this.pendingInstantiations.includes(e)?!0:this.pendingInstantiations.includes(s)}return!1}with(e){if(this.store?.get(`alepha.target`))return this;let t=`default`in e?e.default:e;if(this.has(t,{inSubstitutions:!1,inRegistry:!1}))return this;if(typeof t==`object`){if(t.provide===t.use)return this.inject(t.provide),this;if(!this.substitutions.has(t.provide)&&!this.has(t.provide)){if(this.started)throw new h;d in t.provide&&typeof t.provide[d]==`function`&&(t.use[d]??=t.provide[d]),this.substitutions.set(t.provide,{use:t.use})}else if(!t.optional)throw new g(t.provide.name,t.use.name);return this}return this.inject(t),this}inject(t,n={}){let r=n.lifetime??`singleton`,i=n.parent===void 0?v?.parent??e:n.parent,a=r===`transient`,o=r===`scoped`?this.context.get(`registry`)??this.registry:this.registry;if(t===e)return this;if(typeof t==`string`){for(let[e,n]of o.entries())if(e.name===t)return n.instance;throw new p(`Service not found: ${t}`)}let s=this.substitutions.get(t);if(s)return this.inject(s.use,{parent:i,lifetime:r});let c=this.pendingInstantiations.indexOf(t);if(c!==-1&&!a)throw new m(t.name,this.pendingInstantiations.slice(0,c).map(e=>e.name));if(!a){let e=o.get(t);if(e)return!e.parents.includes(i)&&i!==t&&e.parents.push(i),e.instance;if(this.started){let e=t[d]?.name;throw new h(`Container is locked. No more services can be added. Attempted to inject '${t.name}' from '${i?.name}'. ${e?`Module '${e}' is not registered ?`:``}`)}}let l=t[d];if(l&&typeof l==`function`&&this.with(l),this.has(t,{registry:o})&&!a)return this.inject(t,{parent:i,lifetime:r});let u=this.new(t,n.args),f={parents:[i],instance:u};if(a||o.set(t,f),u instanceof w){this.modules.push(u);let e=v.parent;v.parent=u.constructor,u.register(this),v.parent=e}return u}parseEnv(e){if(this.cacheEnv.has(e))return this.cacheEnv.get(e);let t=this.codec.validate(e,this.env),n=Object.keys(t).sort((e,t)=>t.length-e.length),r=!0;for(let e=0;r&&e<10;e++){r=!1;for(let e in t)if(typeof t[e]==`string`)for(let i of n){let n=t[e];t[e]=n.replaceAll(`$${i}`,String(t[i]??``)),t[e]!==n&&(r=!0)}}return this.cacheEnv.set(e,t),t}getEnvSchemas(){let e=[];for(let[t,n]of this.cacheEnv.entries())e.push({schema:t,values:n});return e}graph(){for(let[e]of this.substitutions.entries())this.has(e)||this.inject(e);let e={};for(let[t,{parents:n}]of this.registry.entries()){if(t.name===``||w.is(t))continue;e[t.name]={from:n.filter(e=>!!e).map(e=>e.name)};let r=this.substitutions.entries().filter(e=>e[1].use===t).map(e=>e[0].name).toArray();r.length&&(e[t.name].as=r);let i=w.of(t);i&&(e[t.name].module=i.name)}return e}dump(){let e={};for(let[t]of this.cacheEnv.entries()){let n=t;for(let[t,r]of Object.entries(n.properties)){let i=r;e[t]={description:i.description,default:i.default,required:n.required?.includes(t)??void 0,enum:i.enum?[...i.enum]:void 0}}}return{env:e,providers:this.graph()}}services(e){let t=[];for(let[n,r]of this.registry.entries())r.instance instanceof e&&t.push(r.instance);return t}primitives(e){if(typeof e==`string`){let t=e.toLowerCase().replace(`$`,``),n=`${t}primitive`;for(let[e,r]of this.primitiveRegistry.entries()){let i=e.name.toLowerCase();if(i===t||i===n)return r}return[]}return this.primitiveRegistry.get(e[u])??[]}new(e,t=[]){this.pendingInstantiations.push(e),v.alepha=this,v.service=e;let n=S(e)?new e(...t):e(...t)??{},r=n;for(let[e,t]of Object.entries(r))if(t instanceof b&&this.processPrimitive(t,e),typeof t==`object`&&t&&typeof t[f]==`object`&&`getter`in t[f]){let n=t[f].getter;Object.defineProperty(r,e,{get:()=>this.store.get(n)})}return this.pendingInstantiations.pop(),this.pendingInstantiations.length===0&&(v.alepha=void 0),v.service=this.pendingInstantiations[this.pendingInstantiations.length-1],n}processPrimitive(e,t=``){e.config.propertyKey=t,e.onInit();let n=e.constructor,r=this.primitiveRegistry.get(n);r?r.push(e):this.primitiveRegistry.set(n,[e])}};function kk(e){if(e.const!==void 0)return K.const(e.const);if(e.enum&&Array.isArray(e.enum))return e.enum.every(e=>typeof e==`string`)?K.enum(e.enum,Ak({title:e.title,description:e.description,default:e.default})):K.union(e.enum.map(e=>K.const(e)));if(e.anyOf&&Array.isArray(e.anyOf)){let t=e.anyOf.find(e=>e.type===`null`),n=e.anyOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=kk(n[0]);return K.nullable(e)}return K.union(e.anyOf.map(e=>kk(e)))}if(e.allOf&&Array.isArray(e.allOf)){let t=e.allOf.find(e=>e.type===`null`),n=e.allOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=kk(n[0]);return K.nullable(e)}if(n.length>0)return kk(n[0])}if(e.oneOf&&Array.isArray(e.oneOf)){let t=e.oneOf.find(e=>e.type===`null`),n=e.oneOf.filter(e=>e.type!==`null`);if(t&&n.length===1){let e=kk(n[0]);return K.nullable(e)}return K.union(e.oneOf.map(e=>kk(e)))}switch(Array.isArray(e.type)?e.type[0]:e.type){case`string`:return jk(e);case`number`:return Mk(e);case`integer`:return Nk(e);case`boolean`:return Pk(e);case`null`:return K.null();case`object`:return Fk(e);case`array`:return Ik(e);default:return e.properties?Fk(e):K.any()}}function Ak(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0))}function jk(e){let t=Ak({title:e.title,description:e.description,default:e.default,minLength:e.minLength,maxLength:e.maxLength,pattern:e.pattern}),n=e[`~options`]?{...t,"~options":e[`~options`]}:t;switch(e.format){case`email`:return K.email(n);case`uuid`:return K.uuid(n);case`date-time`:return K.datetime(n);case`date`:return K.date(n);case`time`:return K.time(n);case`url`:case`uri`:return K.url(n);case`binary`:return K.binary(n);case`bigint`:return K.bigint(n);case`duration`:return K.duration(n);case`color`:return K.text({...n,format:`color`});case`e164`:return K.e164(n);case`bcp47`:return K.bcp47(n);default:return e.format?K.string({...n,format:e.format}):K.string(n)}}function Mk(e){return K.number(Ak({title:e.title,description:e.description,default:e.default,minimum:e.minimum,maximum:e.maximum,exclusiveMinimum:e.exclusiveMinimum,exclusiveMaximum:e.exclusiveMaximum,multipleOf:e.multipleOf}))}function Nk(e){return K.integer(Ak({title:e.title,description:e.description,default:e.default,minimum:e.minimum,maximum:e.maximum,exclusiveMinimum:e.exclusiveMinimum,exclusiveMaximum:e.exclusiveMaximum,multipleOf:e.multipleOf}))}function Pk(e){return K.boolean(Ak({title:e.title,description:e.description,default:e.default}))}function Fk(e){if(!e.properties)return K.json(Ak({title:e.title,description:e.description}));let t=new Set(e.required??[]),n={};for(let[r,i]of Object.entries(e.properties)){let e=kk(i);t.has(r)||(e=K.optional(e)),n[r]=e}return K.object(n,Ak({title:e.title,description:e.description}))}function Ik(e){let t=e.items?kk(e.items):K.any();return K.array(t,Ak({title:e.title,description:e.description,minItems:e.minItems,maxItems:e.maxItems,uniqueItems:e.uniqueItems}))}function Lk(e){let t=x(Rk,e);return Object.setPrototypeOf((...e)=>t.run(...e),t)}var Rk=class extends b{handler=new zk(this.options.handler,this.options.use);get middlewares(){return(this.options.use??[]).map(e=>e[f])}run(...e){return this.handler.run(...e)}},zk=class{fn;middlewares;constructor(e,t){this.fn=e,this.middlewares=t??[]}wrapped;use(...e){this.middlewares.unshift(...e),this.wrapped=void 0}run(...e){if(!this.wrapped){this.wrapped=this.fn;for(let e=this.middlewares.length-1;e>=0;e--)this.wrapped=this.middlewares[e](this.wrapped)}return this.wrapped(...e)}};Lk[u]=Rk;var Bk=e=>{let{alepha:t}=y();t.store.register(e);let n=t.store.get(e.key);return{[f]:{getter:e.key},...n}};K.object({page:K.optional(K.integer({description:`The page number to retrieve.`,minimum:0,default:0})),size:K.optional(K.integer({description:`The number of items per page.`,minimum:1,maximum:100,default:10})),sort:K.optional(K.text({description:`Sort by field(s). Multiple columns separated by comma. Prefix with '-' for DESC. Examples: 'name' (ASC), '-createdAt' (DESC), 'role,-name' (role ASC, name DESC)`}))});var Vk=K.object({number:K.integer({description:`Page number, starting from 0`}),size:K.integer({description:`Number of items per page (requested page size)`}),offset:K.integer({description:`Offset in the dataset (page × size)`}),numberOfElements:K.integer({description:`Number of elements in THIS page (content.length). Different from totalElements which is the total across all pages.`}),totalElements:K.optional(K.integer({description:`Total number of elements across all pages. Only available when counting is enabled.`})),totalPages:K.optional(K.integer({description:"Total number of pages. Only available when `totalElements` is present."})),isEmpty:K.boolean({description:`Indicates if the current page has no items (numberOfElements === 0)`}),isFirst:K.boolean({description:`Indicates if this is the first page (number === 0)`}),isLast:K.boolean({description:`Indicates if this is the last page (no more pages after this)`}),sort:K.optional(K.object({sorted:K.boolean({description:`Whether the results are sorted`}),fields:K.array(K.object({field:K.text({description:`The field used for sorting`}),direction:K.enum([`asc`,`desc`],{description:`The direction of the sort. Either 'asc' or 'desc'`})}))}))}),Hk=(e,t)=>K.object({content:K.array(e),page:Vk},t);_k.prototype.page=e=>Hk(e);var Uk=(e,t)=>{let n=e instanceof Ok?e:Ok.create({env:{...t?.env}});if(!(e instanceof Ok)){let t=Array.isArray(e)?e:[e];for(let e of t)n.with(e)}return(async()=>{try{await t?.configure?.(n),await n.start(),t?.ready&&await t.ready(n)}catch(e){n.log?.error(`Alepha failed to start`,e)}})(),window.alepha=n,n},Wk=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ee=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),Gk=o(((e,t)=>{t.exports=Wk()})),q=l(Gk(),1),Kk=e=>{let[t,n]=(0,q.useState)(!1);return(0,q.useEffect)(()=>n(!0),[]),e.disabled||t?e.children:e.fallback},qk=class extends q.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){return this.state.error?this.props.fallback(this.state.error,()=>{this.setState({error:void 0})}):this.props.children}},Jk=(0,q.createContext)(void 0),Yk=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Xk=o(((e,t)=>{t.exports=Yk()})),J=Xk(),Zk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e||={};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m<p;m+=1){var h=f[m];h.d&&(c=o?n(t).diff(a,h.d,!0):a.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))})),Qk=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:c,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(l);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/s),e%=s,this.$d.months=h(e/c),e%=c,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(o,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),$k=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_utc=r()})(e,(function(){var e=`minute`,t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,a){var o=i.prototype;a.utc=function(e){return new i({date:e,utc:!0,args:arguments})},o.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var c=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=o.utcOffset;o.utcOffset=function(r,i){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?l.call(this):this.$offset;if(typeof r==`string`&&(r=function(e){e===void 0&&(e=``);var r=e.match(t);if(!r)return null;var i=(``+r[0]).match(n)||[`-`,0,0],a=i[0],o=60*i[1]+ +i[2];return o===0?0:a===`+`?o:-o}(r),r===null))return this;var o=Math.abs(r)<=16?60*r:r;if(o===0)return this.utc(i);var s=this.clone();if(i)return s.$offset=o,s.$u=!1,s;var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(o+c,e)).$offset=o,s.$x.$localOffset=c,s};var u=o.format;o.format=function(e){var t=e||(this.$u?`YYYY-MM-DDTHH:mm:ss[Z]`:``);return u.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return e===`s`&&this.$offset?a(this.format(`YYYY-MM-DD HH:mm:ss:SSS`)).toDate():d.call(this)};var f=o.diff;o.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),i=a(e).local();return f.call(r,i,t,n)}}}))})),eA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_timezone=r()})(e,(function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,i){var a,o=function(e,n,r){r===void 0&&(r={});var i=new Date(e);return function(e,n){n===void 0&&(n={});var r=n.timeZoneName||`short`,i=e+`|`+r,a=t[i];return a||(a=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:r}),t[i]=a),a}(n,r).formatToParts(i)},s=function(t,n){for(var r=o(t,n),a=[],s=0;s<r.length;s+=1){var c=r[s],l=c.type,u=c.value,d=e[l];d>=0&&(a[d]=parseInt(u,10))}var f=a[3],p=f===24?0:f,m=a[0]+`-`+a[1]+`-`+a[2]+` `+p+`:`+a[4]+`:`+a[5]+`:000`,h=+t;return(i.utc(m).valueOf()-(h-=h%1e3))/6e4},c=r.prototype;c.tz=function(e,t){e===void 0&&(e=a);var n,r=this.utcOffset(),o=this.toDate(),s=o.toLocaleString(`en-US`,{timeZone:e}),c=Math.round((o-new Date(s))/1e3/60),l=15*-Math.round(o.getTimezoneOffset()/15)-c;if(!Number(l))n=this.utcOffset(0,t);else if(n=i(s,{locale:this.$L}).$set(`millisecond`,this.$ms).utcOffset(l,!0),t){var u=n.utcOffset();n=n.add(r-u,`minute`)}return n.$x.$timezone=e,n},c.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=o(this.valueOf(),t,{timeZoneName:e}).find((function(e){return e.type.toLowerCase()===`timezonename`}));return n&&n.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=i(this.format(`YYYY-MM-DD HH:mm:ss:SSS`),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,o=n||t||a,c=s(+i(),o);if(typeof e!=`string`)return i(e).tz(o);var l=function(e,t,n){var r=e-60*t*1e3,i=s(r,n);if(t===i)return[r,t];var a=s(r-=60*(i-t)*1e3,n);return i===a?[r,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}(i.utc(e,r).valueOf(),c,o),u=l[0],d=l[1],f=i(u).utcOffset(d);return f.$x.$timezone=o,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){a=e}}}))})),tA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localizedFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};return function(t,n,r){var i=n.prototype,a=i.format;r.en.formats=e,i.format=function(t){t===void 0&&(t=`YYYY-MM-DDTHH:mm:ssZ`);var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,i){var a=i&&i.toUpperCase();return r||n[i]||e[i]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,n===void 0?{}:n);return a.call(this,r)}}}))})),nA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),rA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(nA()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_ar=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r=`يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر`.split(`_`),i={1:`١`,2:`٢`,3:`٣`,4:`٤`,5:`٥`,6:`٦`,7:`٧`,8:`٨`,9:`٩`,0:`٠`},a={"١":`1`,"٢":`2`,"٣":`3`,"٤":`4`,"٥":`5`,"٦":`6`,"٧":`7`,"٨":`8`,"٩":`9`,"٠":`0`},o=/[١٢٣٤٥٦٧٨٩٠]/g,s=/،/g,c=/\d/g,l=/,/g,u={name:`ar`,weekdays:`الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت`.split(`_`),weekdaysShort:`أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت`.split(`_`),weekdaysMin:`ح_ن_ث_ر_خ_ج_س`.split(`_`),months:r,monthsShort:r,weekStart:6,meridiem:function(e){return e>12?`م`:`ص`},relativeTime:{future:`بعد %s`,past:`منذ %s`,s:`ثانية واحدة`,m:`دقيقة واحدة`,mm:`%d دقائق`,h:`ساعة واحدة`,hh:`%d ساعات`,d:`يوم واحد`,dd:`%d أيام`,M:`شهر واحد`,MM:`%d أشهر`,y:`عام واحد`,yy:`%d أعوام`},preparse:function(e){return e.replace(o,(function(e){return a[e]})).replace(s,`,`)},postformat:function(e){return e.replace(c,(function(e){return i[e]})).replace(l,`،`)},ordinal:function(e){return e},formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`D/‏M/‏YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`}};return n.default.locale(u,null,!0),u}))})),iA=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(nA()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_fr=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`fr`,weekdays:`dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi`.split(`_`),weekdaysShort:`dim._lun._mar._mer._jeu._ven._sam.`.split(`_`),weekdaysMin:`di_lu_ma_me_je_ve_sa`.split(`_`),months:`janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre`.split(`_`),monthsShort:`janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.`.split(`_`),weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD/MM/YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`},relativeTime:{future:`dans %s`,past:`il y a %s`,s:`quelques secondes`,m:`une minute`,mm:`%d minutes`,h:`une heure`,hh:`%d heures`,d:`un jour`,dd:`%d jours`,M:`un mois`,MM:`%d mois`,y:`un an`,yy:`%d ans`},ordinal:function(e){return``+e+(e===1?`er`:``)}};return n.default.locale(r,null,!0),r}))})),aA=l(Zk(),1),oA=l(Qk(),1),sA=l($k(),1),cA=l(eA(),1),lA=l(tA(),1);rA(),iA();var Y=l(nA(),1),uA=Y.default,dA=class e{static PLUGINS=[oA.default,aA.default,sA.default,cA.default,lA.default];alepha=D(Ok);ref=null;timeouts=[];intervals=[];constructor(){for(let t of e.PLUGINS)uA.extend(t)}onStart=j({on:`start`,handler:async()=>{await Promise.all(this.intervals.map(async e=>{e.timer??=(await e.run(),setInterval(e.run,e.duration))}))}});onStop=j({on:`stop`,handler:()=>{for(let e of[...this.timeouts])this.clearTimeout(e);for(let e of this.intervals)clearInterval(e.timer),e.duration=0,e.timer=null}});setLocale(e){uA.locale(e)}isDateTime(e){return uA.isDayjs(e)}utc(e){return uA.utc(e)}of(e){return uA(e)}toISOString(e=this.now()){return this.of(e).toISOString()}now(){return this.getCurrentDate()}nowISOString(){return this.ref?this.ref.toISOString():new Date().toISOString()}nowMillis(){return this.ref?this.ref.valueOf():Date.now()}getCurrentDate(){return this.ref?this.ref:uA()}duration=(e,t)=>Array.isArray(e)?uA.duration(e[0],e[1]):typeof e==`number`?uA.duration(e,t||`milliseconds`):e;isDurationLike(e){try{return uA.isDuration(this.duration(e))}catch{return!1}}async tick(){await new Promise(e=>setTimeout(e,0))}wait(e,t={}){return new Promise(n=>{let r,i,a=this.createTimeout(()=>{t.signal&&r&&t.signal.removeEventListener(`abort`,i),n()},e,t.now);t.signal&&(r=()=>this.clearTimeout(a),i=()=>{r(),n()},t.signal.addEventListener(`abort`,i))})}createInterval(e,t,n=!1){let r={run:e,duration:this.duration(t).asMilliseconds()};return this.intervals.push(r),n&&(r.timer=setInterval(r.run,r.duration)),r}createTimeout(e,t,n){if(this.ref&&n)return this.of(n).add(this.duration(t))<this.now()&&e(),{now:n,duration:0,callback:()=>{},clear:()=>{}};let r={now:n??this.now().valueOf(),duration:this.duration(t).asMilliseconds(),callback:e,clear:()=>this.clearTimeout(r)};return r.timer=setTimeout(()=>{let e=this.timeouts.indexOf(r);e!==-1&&this.timeouts.splice(e,1),r.callback()},r.duration),this.timeouts.push(r),r}clearTimeout(e){clearTimeout(e.timer),e.duration=0,e.timer=null;let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1)}clearInterval(e){clearInterval(e.timer),e.duration=0,e.timer=null}async deadline(e,t){let n=new AbortController,r=this.createTimeout(()=>n.abort(),t);try{return await e(n.signal)}finally{this.clearTimeout(r)}}async travel(e,t){this.ref=this.ref||this.now();let n=this.duration(e,t).asMilliseconds(),r=this.nowMillis();this.ref=this.ref.add(this.duration(e,t));for(let e of[...this.timeouts]){if(!e.timer)continue;clearTimeout(e.timer),e.timer=null;let t=r-e.now;if(e.duration=e.duration-t-n,e.duration<=0){let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1),e.callback()}else e.timer=setTimeout(()=>{let t=this.timeouts.indexOf(e);t!==-1&&this.timeouts.splice(t,1),e.callback()},e.duration)}for(let e of this.intervals){if(!e.timer)continue;clearInterval(e.timer);let t=Math.floor(n/e.duration);for(let n=0;n<t;n++)await e.run();e.timer=null}await this.tick()}pause(){return this.ref=this.ref||this.now(),this.ref}reset(){this.ref=null}},fA=e=>x(pA,e),pA=class extends b{dateTimeProvider=D(dA);called=0;onInit(){this.dateTimeProvider.createInterval(async()=>{await this.options.handler(),this.called+=1},this.options.duration)}};fA[u]=pA;var mA=C({name:`alepha.datetime`,primitives:[fA],services:[dA]}),hA=()=>{let e=(0,q.useContext)(Jk);if(!e)throw new p(`Hook 'useAlepha()' must be used within an AlephaContext.Provider`);return e},gA=e=>{let t=hA();return(0,q.useMemo)(()=>t.inject(e),[])};function _A(e,t){let n=hA(),r=gA(dA),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(),[c,l]=(0,q.useState)(),u=(0,q.useRef)(!1),d=(0,q.useRef)(void 0),f=(0,q.useRef)(void 0),p=(0,q.useRef)(!0),m=(0,q.useRef)(void 0);(0,q.useEffect)(()=>(p.current=!0,()=>{p.current=!1,d.current&&=(r.clearTimeout(d.current),void 0),m.current&&=(r.clearInterval(m.current),void 0),f.current&&=(f.current.abort(),void 0)}),[]);let h=(0,q.useCallback)(async(...t)=>{if(u.current)return;f.current&&f.current.abort();let r=new AbortController;f.current=r,u.current=!0,a(!0),s(void 0);try{await n.events.emit(`react:action:begin`,{type:`custom`,id:e.id});let i=await e.handler(...t,{signal:r.signal});return!p.current||r.signal.aborted?void 0:(l(i),await n.events.emit(`react:action:success`,{type:`custom`,id:e.id}),e.onSuccess&&await e.onSuccess(i),i)}catch(t){if(t instanceof Error&&t.name===`AbortError`||!p.current)return;let r=t;if(s(r),await n.events.emit(`react:action:error`,{type:`custom`,id:e.id,error:r}),e.onError)await e.onError(r);else throw r}finally{u.current=!1,p.current&&a(!1),await n.events.emit(`react:action:end`,{type:`custom`,id:e.id}),f.current===r&&(f.current=void 0)}},[...t,e.id,e.onError,e.onSuccess]),g=(0,q.useCallback)(async(...t)=>e.debounce?(d.current&&r.clearTimeout(d.current),new Promise(n=>{d.current=r.createTimeout(async()=>{n(await h(...t))},e.debounce??0)})):h(...t),[h,e.debounce]),_=(0,q.useCallback)(()=>{d.current&&=(r.clearTimeout(d.current),void 0),f.current&&=(f.current.abort(),void 0),p.current&&(u.current=!1,a(!1))},[]);return(0,q.useEffect)(()=>{e.runOnInit&&g()},t),(0,q.useEffect)(()=>{if(e.runEvery)return m.current=r.createInterval(()=>g(),e.runEvery,!0),()=>{m.current&&=(r.clearInterval(m.current),void 0)}},[g,e.runEvery]),{run:g,loading:i,error:o,cancel:_,result:c}}var vA=K.object({path:K.text({description:`Pathname used to access the action.`}),method:K.optional(K.text({description:`HTTP method. Omitted when GET (the default for ~75% of actions).`})),contentType:K.optional(K.text({description:`Content type for the request body. Only present for non-JSON types (e.g. 'multipart/form-data'). When absent, defaults to application/json.`})),kind:K.optional(K.text({description:`Action kind. Used to distinguish special action types (e.g. 'sse' for Server-Sent Events streams).`})),service:K.optional(K.text({description:`Service name associated with the action, used for service discovery and routing.`}))}),yA=K.object({prefix:K.optional(K.text()),actions:K.record(K.text(),vA),permissions:K.optional(K.array(K.text()))}),bA=Tk({name:`alepha.server.request.apiLinks`,schema:K.optional(yA)}),xA=Tk({name:`alepha.server.links.options`,description:`Configuration options for the links module.`,schema:K.object({batch:K.boolean({description:`Enable batch collection for browser-side calls.`,default:!0})}),default:{batch:!0}}),SA=class{},CA=class{},wA=class{alepha=D(Ok);formatter=D(CA);destination=D(SA);dateTimeProvider=D(dA);levels={SILENT:-1,ERROR:0,WARN:1,INFO:2,DEBUG:3,TRACE:4};service;module;app;appLogLevel=`INFO`;logLevel=`INFO`;constructor(e,t){this.service=e,this.module=t,this.app=this.alepha.env.APP_NAME}get context(){return this.alepha.context.get(`context`)}get level(){let e=this.alepha.store.get(`alepha.logger.level`);return e&&e!==this.appLogLevel&&(this.appLogLevel=e,this.logLevel=this.parseLevel(this.appLogLevel,this.module)),this.logLevel}parseLevel(e,t){let n=e.toLowerCase().split(/[,;]/);for(let e of n){let n=e.trim();if(n&&(n.includes(`:`)||n.includes(`=`))){let[e,r]=n.split(/[:=]/),i=e.trim(),a=r?.trim();if(!a)continue;if(this.matchesPattern(t,i))try{return this.asLogLevel(a)}catch{throw new p(`Invalid log level '${r?.trim()}' for module pattern '${i}'`)}}}for(let e of n){let t=e.trim();if(t&&!t.includes(`:`)&&!t.includes(`=`))try{return this.asLogLevel(t)}catch{throw new p(`Invalid global log level "${t}"`)}}return`INFO`}matchesPattern(e,t){if(t.includes(`*`)){let n=t.replace(/\./g,`\\.`).replace(/\*/g,`.*`);return RegExp(`^${n}`).test(e)}return e.startsWith(t)}asLogLevel(e){let t=e.trim().toUpperCase();if(this.levels[t]!==void 0)return t;throw new p(`Invalid log level: ${e}`)}error(e,t){this.log(`ERROR`,e,t)}warn(e,t){this.log(`WARN`,e,t)}info(e,t){this.log(`INFO`,e,t)}debug(e,t){this.log(`DEBUG`,e,t)}trace(e,t){this.log(`TRACE`,e,t)}log(e,t,n){let r=``;typeof t==`string`?r=t:typeof n==`string`&&(r=n);let i;typeof n==`object`&&n?i=n:typeof t==`object`&&t&&(i=t);let a={level:e,message:r,data:i,context:this.context,service:this.service,module:this.module,app:this.app,timestamp:this.dateTimeProvider.nowMillis()};if(this.levels[e]>this.levels[this.level]){this.emit(a);return}let o=this.formatter.format(a);this.emit(a,o),this.destination.write(o,a)}emit(e,t){this.alepha.events.emit(`log`,{message:t,entry:e},{catch:!0}).catch(()=>null)}},TA=(e={})=>{let{alepha:t,service:n,module:r}=y();return D(wA,{lifetime:`transient`,args:[e.name??n?.name??`Func`,r?.name??t.env.MODULE_NAME??`app`]})};TA[u]=wA;var EA=class e{static COLORS={RESET:`\x1B[0m`,BLACK:`\x1B[30m`,RED:`\x1B[31m`,GREEN:`\x1B[32m`,ORANGE:`\x1B[33m`,BLUE:`\x1B[34m`,PURPLE:`\x1B[35m`,CYAN:`\x1B[36m`,GREY_LIGHT:`\x1B[37m`,GREY_LIGHT_BOLD:`\x1B[1;37m`,GREY_DARK:`\x1B[90m`,GREY_DARK_BOLD:`\x1B[1;90m`,WHITE:`\x1B[97m`,WHITE_BOLD:`\x1B[1;97m`,DIM:`\x1B[2m`,BOLD:`\x1B[1m`,INVERSE:`\x1B[7m`,SILENT:``,ERROR:`\x1B[31m`,WARN:`\x1B[33m`,INFO:`\x1B[32m`,DEBUG:`\x1B[34m`,TRACE:`\x1B[90m`};alepha=D(Ok);enabled=!0;constructor(){this.enabled=this.isEnabled()}isEnabled(){return this.alepha.env.NO_COLOR?!1:this.alepha.env.FORCE_COLOR?!0:this.alepha.isBrowser()&&!navigator.userAgent.includes(`Chrome`)?!1:!this.alepha.isProduction()}set(t,n,r=e.COLORS.RESET){return this.enabled?`${e.COLORS[t]}${n}${r}`:n}},DA=class extends SA{write(e){console.log(e)}},OA=class extends CA{format(e){let t={level:e.level,message:e.message,context:e.context,service:e.service,module:e.module,app:e.app,time:e.timestamp};return e.data instanceof Error?t.error=this.formatJsonError(e.data):t.data=e.data,JSON.stringify(t)}formatJsonError(e){return{name:e.name,message:e.message,stack:e.stack,cause:e.cause instanceof Error?this.formatJsonError(e.cause):void 0}}},kA=class extends SA{entries=[];options={maxEntries:1e4};write(e,t){this.entries.push({...t,formatted:e}),this.entries.length>this.options.maxEntries&&(this.entries=this.entries.slice(-Math.floor(this.options.maxEntries*.8)))}get logs(){return[...this.entries]}clear(){this.entries=[]}},AA=class extends CA{color=D(EA);alepha=D(Ok);format(e){let{data:t,timestamp:n}=e,r=``,i=``,a=t instanceof Error;if(a)i=this.formatError(t);else if(t){let e=``,n=t;if(`error`in t&&t.error instanceof Error){e=this.formatError(t.error);let{error:r,...i}=t;n=i}if(Object.keys(n).length>0)try{i=JSON.stringify(n)}catch{i=`[Unserializable Object]`}e&&(i+=`\n${e}`)}r+=this.color.set(`GREY_DARK`,`[${this.formatTimestamp(n)}]`),r+=` `,r+=this.color.set(e.level,e.level.toUpperCase()),r+=` `,e.app&&(r+=this.color.set(`GREY_DARK`,`${e.app}`),r+=` `),e.context&&(r+=this.color.set(`GREY_DARK`,`(${this.formatContext(e.context)})`),r+=` `);let o=this.color.set(`GREY_LIGHT`,`${e.module}.`),s=this.color.set(this.alepha.isBrowser()?`RESET`:`WHITE`,e.service);return r+=`<${o}${s}>`,e.message?r+=`: ${this.color.set(`CYAN`,e.message)}`:r+=`:`,i&&(a?r+=` \n${i}`:r+=` ${this.color.set(`GREY_DARK`,i)}`),r}formatTimestamp(e){let t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=t.getSeconds(),a=t.getMilliseconds();return`${this.pad2(n)}:${this.pad2(r)}:${this.pad2(i)}.${this.pad3(a)}`}pad2=e=>(e<10?`0`:``)+e;pad3=e=>e<10?`00${e}`:e<100?`0${e}`:`${e}`;formatContext(e){return this.alepha.isProduction()?e:e.slice(0,8)}formatError(e){if(this.alepha.isBrowser())return setTimeout(()=>{console.error(e)}),``;let t=this.alepha.store.get(`alepha.vite.server`);t?.ssrFixStacktrace(e);let n=e.stack??e.message,r=e.cause;for(;r&&r instanceof Error;)t?.ssrFixStacktrace(r),n+=`\nCaused by: ${r.stack??r.message}`,r=r.cause;return n}},jA=class extends CA{format(e){let t=``;if(t+=`${e.message}`,e.data instanceof Error){t+=`\n${e.data.message}`;let n=e.data.cause;for(;n instanceof Error;)t+=`\nCaused by: ${n.message}`,n=n.cause}return t}};K.object({level:K.enum([`SILENT`,`TRACE`,`DEBUG`,`INFO`,`WARN`,`ERROR`]),message:K.text({size:`rich`}),service:K.text(),module:K.text(),context:K.optional(K.text()),app:K.optional(K.text()),data:K.optional(K.any()),timestamp:K.number()}),C({name:`alepha.logger`,primitives:[TA],services:[wA,DA,kA,OA,AA,jA,EA],register:e=>{let t=e.parseEnv(MA),n=t.LOG_LEVEL,r=t.LOG_FORMAT;if(t.DEBUG){if(t.DEBUG===`1`||t.DEBUG===`true`)n??=`trace`;else{let e=t.DEBUG.split(`,`).map(e=>e.trim().replaceAll(`:`,`.`)).filter(Boolean);n??=`${e.map(e=>`${e}:debug`).join(`,`)},info`}r??=`pretty`}e.with({optional:!0,provide:SA,use:(()=>{if(e.isTest()&&!n){let t=t=>{if(t.task?.result?.state===`fail`){let t=e.inject(kA);for(let e of t.logs)console.log(e.formatted)}};try{e.store.get(`alepha.test.afterEach`)?.(t),e.store.get(`alepha.test.onTestFinished`)?.(t)}catch{}return kA}return DA})()}),e.with({optional:!0,provide:CA,use:r?r===`json`?OA:r===`raw`?jA:AA:e.isProduction()&&!e.isBrowser()?OA:AA}),e.store.set(`alepha.logger`,e.inject(wA,{lifetime:`transient`,args:[`Alepha`,`alepha.core`]})),e.store.set(`alepha.logger.level`,n??(e.isTest()?`trace`:e.isProduction()&&e.isBrowser()?`warn`:`info`))}});var MA=K.object({DEBUG:K.optional(K.text({description:`Enable debug logging for specific modules using the debug package convention. Example: DEBUG=alepha:*`})),LOG_LEVEL:K.optional(K.text({description:`Application log level on startup.
11
+ Levels are: trace, debug, info, warn, error, silent
12
+ Level can be set for a specific module:
13
+ "my.module.name:debug,info" -> Set debug level for my.module.name and info for all other modules
14
+ "alepha:trace,info" -> Set trace level for all alepha modules and info for all other modules`,lowercase:!0})),LOG_FORMAT:K.optional(K.enum([`json`,`pretty`,`raw`],{description:`Default log format for the application.`,lowercase:!0}))}),NA=class extends p{},PA=class{encoder=new TextEncoder;decoder=new TextDecoder;codes={BINARY:1,JSON:2,STRING:3,COMPRESSED:4};async setTyped(e,t,n,r){let i=this.serialize(n);r?.compress&&(i=await this.compress(i)),await this.set(e,t,i,r?.ttl)}async getTyped(e,t){let n=await this.get(e,t);if(n){if(n[0]===this.codes.COMPRESSED){let e=await this.decompress(n.subarray(1));return this.deserialize(e)}return this.deserialize(n)}}async invalidateKeys(e,t){let n=[];for(let r of t)if(r.endsWith(`*`)){let t=await this.keys(e,r.slice(0,-1));n.push(...t)}else n.push(r);await this.del(e,...n)}serialize(e){if(e instanceof Uint8Array){let t=new Uint8Array(1+e.length);return t[0]=this.codes.BINARY,t.set(e,1),t}let t=this.encoder.encode(typeof e==`string`?e:JSON.stringify(e)),n=typeof e==`string`?this.codes.STRING:this.codes.JSON,r=new Uint8Array(1+t.length);return r[0]=n,r.set(t,1),r}deserialize(e){let t=e[0],n=e.slice(1);if(t===this.codes.BINARY)return n;if(t===this.codes.JSON)return JSON.parse(this.decoder.decode(n));if(t===this.codes.STRING)return this.decoder.decode(n);throw new NA(`Unknown serialization type: ${t}`)}async compress(e){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),n=new Uint8Array(await new Response(new Blob([t]).stream().pipeThrough(new CompressionStream(`gzip`))).arrayBuffer()),r=new Uint8Array(1+n.length);return r[0]=this.codes.COMPRESSED,r.set(n,1),r}async decompress(e){let t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(await new Response(new Blob([t]).stream().pipeThrough(new DecompressionStream(`gzip`))).arrayBuffer())}},FA=class extends PA{dateTimeProvider=D(dA);log=TA();store={};getCalls=[];setCalls=[];delCalls=[];_stats={hits:0,misses:0,sets:0,deletes:0};getError=null;setError=null;delError=null;constructor(e={}){super(),this.getError=e.getError??null,this.setError=e.setError??null,this.delError=e.delError??null}async get(e,t){if(this.getCalls.push({name:e,key:t,timestamp:this.dateTimeProvider.nowMillis()}),this.getError)throw this.getError;let n=this.store[e]?.[t]?.data;return n===void 0?this._stats.misses++:this._stats.hits++,n}async set(e,t,n,r){if(this.setCalls.push({name:e,key:t,value:n,ttl:r,timestamp:this.dateTimeProvider.nowMillis()}),this._stats.sets++,this.setError)throw this.setError;return this.store[e]??(this.store[e]={}),this.store[e][t]??={},this.store[e][t].data=n,this.log.debug(`Setting cache for name`,{name:e,key:t,ttl:r}),this.store[e][t].timeout&&(this.dateTimeProvider.clearTimeout(this.store[e][t].timeout),this.store[e][t].timeout=void 0),r&&(this.store[e][t].timeout=this.dateTimeProvider.createTimeout(()=>this.del(e,t),r)),this.store[e][t].data}async del(e,...t){if(this.delCalls.push({name:e,keys:t,timestamp:this.dateTimeProvider.nowMillis()}),this._stats.deletes++,this.delError)throw this.delError;if(t.length===0){if(this.log.debug(`Deleting all cache for name`,{name:e}),this.store[e])for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}delete this.store[e];return}this.log.debug(`Deleting cache for name`,{name:e,keys:t});for(let n of t){if(this.store[e]==null)break;let t=this.store[e][n]?.timeout;t&&this.dateTimeProvider.clearTimeout(t),delete this.store[e][n]}Object.keys(this.store[e]??{}).length===0&&delete this.store[e]}async has(e,t){return this.store[e]?.[t]?.data!=null}async keys(e,t){let n=this.store[e]??{},r=Object.keys(n);return t?r.filter(e=>e.startsWith(t)):r}async clear(){this.log.debug(`Clearing all cache`);for(let e of Object.keys(this.store))for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}this.store={}}async incr(e,t,n){this.store[e]??(this.store[e]={});let r=this.store[e][t]?.data,i=0;if(r)try{i=this.deserialize(r)}catch{let e=new TextDecoder().decode(r);i=Number.parseInt(e,10)||0}let a=i+n;return this.store[e][t]??={},this.store[e][t].data=this.serialize(a),a}stats(){return{...this._stats}}wasSet(e,t){return t===void 0?this.setCalls.some(t=>t.name===e):this.setCalls.some(n=>n.name===e&&n.key===t)}wasGet(e,t){return t===void 0?this.getCalls.some(t=>t.name===e):this.getCalls.some(n=>n.name===e&&n.key===t)}wasDeleted(e,t){return t===void 0?this.delCalls.some(t=>t.name===e):this.delCalls.some(n=>n.name===e&&n.keys.includes(t))}size(e){return e===void 0?Object.values(this.store).reduce((e,t)=>e+Object.keys(t).length,0):Object.keys(this.store[e]??{}).length}names(){return Object.keys(this.store)}reset(){for(let e of Object.keys(this.store))for(let t of Object.keys(this.store[e])){let n=this.store[e][t]?.timeout;n&&this.dateTimeProvider.clearTimeout(n)}this.store={},this.getCalls=[],this.setCalls=[],this.delCalls=[],this._stats={hits:0,misses:0,sets:0,deletes:0},this.getError=null,this.setError=null,this.delError=null}};function IA(e={}){let t=x(RA,e);if(e.handler)return Object.setPrototypeOf((...e)=>t.run(...e),t);let n=e=>(async(...n)=>{let r=t.key(...n),i=await t.get(r);if(i!==void 0)return i;let a=await e(...n);return t.set(r,a).catch(()=>{}),a});return n[f]={name:`$cache`,options:e},Object.setPrototypeOf(n,t)}var LA=Tk({name:`alepha.cache.options`,schema:K.object({enabled:K.boolean({default:!0,description:`Whether caching is enabled.`}),defaultTtl:K.number({default:300,description:`Default time to live for cache entries in seconds.`})}),default:{enabled:!0,defaultTtl:300}}),RA=class extends b{settings=Bk(LA);dateTimeProvider=D(dA);provider=this.$provider();get container(){return this.options.name??`${this.config.service.name}:${this.config.propertyKey}`}async run(...e){let t=this.options.handler;if(!t)throw new p(`Cache handler is not defined.`);let n=this.key(...e),r=await this.get(n);if(r!==void 0)return r;let i=await t(...e);return await this.set(n,i),i}key(...e){return this.options.key?this.options.key(...e):JSON.stringify(e)}async incr(e,t=1){return this.provider.incr(this.container,e,t)}async invalidate(...e){await this.provider.invalidateKeys(this.container,e)}async set(e,t,n){if(!this.alepha.isStarted()||this.options.disabled||!this.settings.enabled)return;let r=this.dateTimeProvider.duration(n??this.options.ttl??[this.settings.defaultTtl,`seconds`]).as(`milliseconds`);await this.provider.setTyped(this.container,e,t,{ttl:r>0?r:void 0,compress:this.options.compress})}async get(e){if(!(!this.alepha.isStarted()||this.options.disabled||!this.settings.enabled))return this.provider.getTyped(this.container,e)}$provider(){return this.options.provider?this.options.provider===`memory`?this.alepha.inject(FA):this.alepha.inject(this.options.provider):this.alepha.inject(PA)}};IA[u]=RA,C({name:`alepha.cache`,primitives:[IA],services:[PA,FA],register:e=>e.with({optional:!0,provide:PA,use:FA})});var zA=(e,t)=>e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&`status`in e&&typeof e.status==`number`?t?e.status===t:!0:!1,BA=class extends p{name=`HttpError`;static is=zA;static toJSON(e){let t={error:e.error,status:e.status,message:e.message};return e.details&&(t.details=e.details),e.requestId&&(t.requestId=e.requestId),e.reason&&(t.cause=e.reason),t}error;status;requestId;details;reason;constructor(e,t){super(e.message,{cause:t}),this.status=e.status??500,this.details=e.details,this.requestId=e.requestId,typeof e.cause==`object`?this.reason={name:e.cause.name,message:e.cause.message}:t instanceof Error&&(this.reason={name:t.name,message:t.message}),this.constructor.name===`HttpError`?this.error=e.error??VA[this.status]??`HttpError`:this.error=this.constructor.name}},VA={400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,405:`MethodNotAllowedError`,409:`ConflictError`,410:`GoneError`,413:`PayloadTooLargeError`,415:`UnsupportedMediaTypeError`,429:`TooManyRequestsError`,500:`InternalServerError`,501:`NotImplementedError`,502:`BadGatewayError`,503:`ServiceUnavailableError`,504:`GatewayTimeoutError`},HA=e=>{if(e.contentType===`multipart/form-data`||e.requestBodyType===`multipart/form-data`)return!0;if(e.schema?.body&&`properties`in e.schema.body){let t=e.schema.body.properties;for(let e in t)if(t[e].format===`binary`)return!0}return!1},UA=K.object({error:K.text({description:`HTTP error name`}),status:K.integer({description:`HTTP status code`}),message:K.text({description:`Short text which describe the error`,size:`rich`}),details:K.optional(K.text({description:`Detailed description of the error`,size:`rich`})),requestId:K.optional(K.text()),cause:K.optional(K.object({name:K.text(),message:K.text({description:`Cause Error message`,size:`rich`})}))},{title:`HttpError`,description:`Generic response after a failed operation`}),WA=class{log=TA();alepha=D(Ok);cache=IA({provider:`memory`,name:`http:client`});pendingRequests={};async fetchAction(e){let t=e.action,n=e.options??{},r=e.config??{},i=e.host??``,a={...n.request},o=t.method,s={},c=this.url(i,t,r);return await this.alepha.events.emit(`client:onRequest`,{route:t,config:r,options:n,headers:s,request:a}),a.method??=o,await this.body(a,s,t,r),a.headers={...r.headers,...Object.fromEntries(new Headers(a.headers).entries()),...s},await this.fetch(c,{...a,schema:t.schema,...n})}async fetch(e,t={}){let n={cache:t.localCache,schema:t.schema?.response,key:t.key};t.method??=`GET`,this.log.trace(`Request`,{url:e,method:t.method,body:t.body,headers:t.headers,options:n});let r=await this.cache.get(e);if(r&&t.method===`GET`)if(r.etag)t.headers=new Headers(t.headers),t.headers.has(`if-none-match`)||t.headers.set(`if-none-match`,r.etag);else return{data:r.data,status:200,statusText:`OK`,headers:new Headers};await this.alepha.events.emit(`client:beforeFetch`,{url:e,options:n,request:t});let i=t.method===`GET`||t.method===`HEAD`||t.method===`OPTIONS`,a=n.key??(i?JSON.stringify({url:e,method:t.method}):void 0);if(a){let e=this.pendingRequests[a];if(e)return this.log.info(`Request already pending`,a),e}let o=fetch(e,t).then(async r=>{this.log.debug(`Response`,{url:e,status:r.status});let i={data:await this.responseData(r,n),status:r.status,statusText:r.statusText,headers:r.headers,raw:r};if(t.method===`GET`){if(n.cache)await this.cache.set(e,{data:i.data},typeof n.cache==`boolean`?void 0:n.cache);else if(!this.alepha.isBrowser()){let t=r.headers.get(`etag`)??void 0;t&&await this.cache.set(e,{data:i.data,etag:t})}}return i}).finally(()=>{a&&delete this.pendingRequests[a]});return a&&(this.pendingRequests[a]=o),o}url(e,t,n){let r=e;return t.prefix&&(r+=t.prefix),r+=t.path,r=this.pathVariables(r,t,n),r=this.queryParams(r,t,n),r}async body(e,t,n,r={}){if(typeof e.headers==`object`&&`content-type`in e.headers&&e.headers[`content-type`]===`multipart/form-data`||HA(n)){typeof e.headers==`object`&&`content-type`in e.headers&&delete e.headers[`content-type`];let t=new FormData;for(let[e,n]of Object.entries(r.body??{})){if(typeof n==`string`){t.append(e,n);continue}if(n instanceof Blob){t.append(e,n);continue}hk(n)&&t.append(e,new File([await n.arrayBuffer()],n.name,{type:n.type}))}e.body=t;return}!e.body&&n.schema?.body&&(t[`content-type`]=`application/json`,e.body=this.alepha.codec.encode(n.schema?.body,r.body,{as:`string`}))}async responseData(e,t){if(e.status===304){let t=e.url;typeof window<`u`&&(t=t.replace(window.location.origin,``));let n=await this.cache.get(t);return n?n.data:``}if(e.status!==204){if(this.isMaybeFile(e))return this.createFileLike(e);if(e.headers.get(`Content-Type`)?.startsWith(`text/`))return await e.text();if(e.headers.get(`Content-Type`)===`application/json`){let n=await e.json();if(e.status>=400){let e=new BA(this.alepha.codec.decode(UA,n));throw await this.alepha.events.emit(`client:onError`,{error:e}),e}return t.schema?this.alepha.codec.decode(t.schema,n):n}if(e.status>=400){let t=new BA({status:e.status,message:`An error occurred while fetching the resource. (${e.statusText})`});throw await this.alepha.events.emit(`client:onError`,{error:t}),t}return e}}isMaybeFile(e){let t=e.headers.get(`Content-Type`);return t?e.headers.get(`Content-Disposition`)?.includes(`attachment`)?!0:t.startsWith(`application/octet-stream`)||t.startsWith(`application/pdf`)||t.startsWith(`application/zip`)||t.startsWith(`image/`)||t.startsWith(`video/`)||t.startsWith(`audio/`):!1}createFileLike(e,t=``){let n=(e.headers.get(`Content-Disposition`)??``).match(/filename="(.+)"/);return{name:n?.[1]?n[1]:t,type:e.headers.get(`Content-Type`)??`application/octet-stream`,size:Number(e.headers.get(`Content-Length`)??0),lastModified:Date.now(),stream:()=>{throw new p(`Not implemented`)},arrayBuffer:async()=>await e.arrayBuffer(),text:async()=>await e.text()}}pathVariables(e,t,n={}){if(typeof n.params==`object`){let r=t.schema?.params?this.alepha.codec.decode(t.schema.params,n.params):n.params;for(let t of Object.keys(r))e=e.replace(`:${t}`,r[t]),e=e.replace(`{${t}}`,r[t])}return e}queryParams(e,t,n={}){if(typeof n.query==`object`){let r=t.schema?.query?this.alepha.codec.decode(t.schema.query,n.query??{}):n.query;for(let e of Object.keys(r))r[e]===void 0&&delete r[e],typeof r[e]==`object`&&(r[e]=JSON.stringify(r[e]));let i=new URLSearchParams(r).toString();return i?`${e}?${i}`:e}return e}},GA=class extends BA{constructor(e=`No permission to access this resource`,t){super({message:e,status:403},t)}},KA=class extends BA{name=`UnauthorizedError`;constructor(e=`Not allowed to access this resource`,t){super({message:e,status:401},t)}},qA=class{headers={};status;body;redirect(e,t=302){this.status=t,this.headers.location=e}setStatus(e){return this.status=e,this}setHeader(e,t){return this.headers[e.toLowerCase()]=t,this}setBody(e){return this.body=e,this}};K.object({ok:K.boolean({description:`True when operation succeed`}),id:K.optional(K.union([K.text(),K.integer()])),count:K.optional(K.number({description:`Number of resources affected`}))},{title:`Ok`,description:`Generic response after a successful operation on a resource`});var JA=C({name:`alepha.server`,primitives:[],services:[WA]}),YA=class e{static MAX_BATCH_SIZE=20;log=TA();httpClient=D(WA);pending=[];scheduled=!1;add(e){return new Promise((t,n)=>{this.pending.push({entry:e,resolve:t,reject:n}),this.scheduled||(this.scheduled=!0,setTimeout(()=>{this.scheduled=!1,this.flush().catch(e=>this.log.error(e))},10))})}async flush(){let t=this.pending.splice(0);if(t.length===0)return;if(t.length===1){let e=t[0];try{let t=await e.entry.directCall();e.resolve(t)}catch(t){e.reject(t)}return}let{unique:n,indexMap:r}=this.dedupe(t),i=this.chunk(n,e.MAX_BATCH_SIZE);try{let e=(await Promise.all(i.map(e=>{let t=[...new Set(e.map(e=>e.entry.action))].join(`,`);return this.httpClient.fetch(`/api/_batch?actions=${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e.map(e=>({action:e.entry.action,params:e.entry.params,query:e.entry.query,body:e.entry.body})))}).then(e=>e.data)}))).flat();for(let n=0;n<t.length;n++){let i=e[r[n]];i.status>=400?t[n].reject(new BA({message:i.error??`${i.action} failed (${i.status})`,status:i.status})):t[n].resolve(i.data)}}catch(e){for(let n of t)n.reject(e)}}dedupe(e){let t=new Map,n=[],r=[];for(let i of e){let e=`${i.entry.action}:${JSON.stringify({params:i.entry.params,query:i.entry.query,body:i.entry.body})}`,a=t.get(e);if(a!==void 0)r.push(a);else{let a=n.length;t.set(e,a),n.push(i),r.push(a)}}return{unique:n,indexMap:r}}chunk(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}},XA=class e{static path={apiLinks:`/api/_links`};log=TA();alepha=D(Ok);httpClient=D(WA);serverLinkMap=new Map;actionMap=new Map;permissions=new Set;lastLoadedRegistry=null;batchCollector;options=Bk(xA);getServerLinks(){return this.alepha.isBrowser()?(this.log.warn("Getting server links in the browser is not supported. Use `fetchLinks` to get links from the server."),[]):[...this.serverLinkMap.values()]}registerLink(e){if(this.alepha.isBrowser()){this.log.warn("Registering links in the browser is not supported. Use `fetchLinks` to get links from the server.");return}if(!e.handler&&!e.host)throw new p(`Can't create link - 'handler' or 'host' is required`);if(this.serverLinkMap.get(e.name)?.handler&&e.handler)throw new p(`Duplicate action name "${e.name}". Each action must have a unique name.`);this.serverLinkMap.set(e.name,e)}loadRegistry(e){this.lastLoadedRegistry=e,this.permissions.clear(),this.actionMap.clear();for(let[t,n]of Object.entries(e.actions))this.actionMap.set(t,{name:t,path:n.path,kind:n.kind,method:n.method,contentType:n.contentType,service:n.service});if(e.permissions)for(let t of e.permissions)this.permissions.add(t)}get links(){let e=this.alepha.store.get(`alepha.server.request.apiLinks`);if(e){if(this.alepha.isBrowser())return(this.actionMap.size===0||e!==this.lastLoadedRegistry)&&this.loadRegistry(e),[...this.actionMap.values()];let t=[];for(let n of Object.keys(e.actions)){let e=this.serverLinkMap.get(n);e&&t.push(e)}return t}return[...this.serverLinkMap.values()]}async fetchLinks(){let{data:t}=await this.httpClient.fetch(`${e.path.apiLinks}`,{method:`GET`,schema:{response:yA}});return this.alepha.store.set(`alepha.server.request.apiLinks`,t),this.loadRegistry(t),[...this.actionMap.values()]}client(e={}){return new Proxy({},{get:(t,n)=>{if(typeof n==`string`)return this.createVirtualAction(n,e)}})}can(e){if(this.actionMap.size>0){if(this.actionMap.has(e))return!0}else if(this.serverLinkMap.has(e)||this.links.some(t=>t.name===e))return!0;if(e.includes(`:`)){if(e.endsWith(`*`)){let t=e.slice(0,-1);for(let e of this.permissions)if(e.startsWith(t))return!0;return!1}return this.permissions.has(e)}return!1}async follow(e,t={},n={}){this.log.trace(`Following link`,{name:e,config:t,options:n});let r=await this.getLinkByName(e,n);return r.handler&&!n.request?(this.log.trace(`Local link found`,{name:e}),r.handler({method:r.method,url:new URL(`http://localhost${r.path}`),query:t.query??{},body:t.body??{},params:t.params??{},headers:t.headers??{},metadata:{},reply:new qA},n)):(this.log.trace(`Remote link found`,{name:e,host:r.host,service:r.service}),this.options.batch&&this.alepha.isBrowser()&&!r.host?(this.batchCollector??=this.alepha.inject(YA),this.batchCollector.add({action:e,params:t.params,query:t.query,body:t.body,directCall:()=>this.followRemote(r,t,n).then(e=>e.data)})):this.followRemote(r,t,n).then(e=>e.data))}createVirtualAction(e,t={}){let n=async(n={},r={})=>this.follow(e,n,{...t,...r});return Object.defineProperty(n,`name`,{value:e,writable:!1}),n.run=async(n={},r={})=>this.follow(e,n,{...t,...r}),n.fetch=async(n={},r={})=>{let i=await this.getLinkByName(e,t);return this.followRemote(i,n,r)},n.can=()=>this.can(e),n}async followRemote(e,t={},n={}){n.request??={},n.request.headers=new Headers(n.request.headers);let r=this.alepha.store.get(`alepha.http.request`);r?.headers.authorization&&n.request.headers.set(`authorization`,r.headers.authorization);let i=this.alepha.context.get(`context`);typeof i==`string`&&n.request.headers.set(`x-request-id`,i);let a={...e,schema:{body:K.any(),response:K.any()}};return!e.host&&e.service&&(a.path=`/${e.service}${a.path}`),a.path=`${a.prefix??`/api`}${a.path}`,a.prefix=void 0,this.httpClient.fetchAction({host:e.host,config:t,options:n,action:a})}async getLinkByName(e,t={}){this.alepha.isBrowser()&&!this.alepha.store.get(`alepha.server.request.apiLinks`)&&await this.fetchLinks();let n=this.links.find(n=>n.name===e&&(!t.service||t.service===n.service));if(!n){let t=new KA(`Action ${e} not found.`);throw await this.alepha.events.emit(`client:onError`,{route:n,error:t}),t}return t.hostname?{...n,host:t.hostname}:n}},ZA=e=>D(XA).client(e);ZA[u]=`$client`;var QA=e=>x($A,e),$A=class extends b{get name(){return this.options.name??this.config.propertyKey}};QA[u]=$A;var ej=C({name:`alepha.server.links`,atoms:[bA,xA],primitives:[QA,ZA],services:[XA,YA]}),tj=(e,t)=>{let n=hA();(0,q.useEffect)(()=>{if(!n.isBrowser())return;let t=[];for(let[r,i]of Object.entries(e))t.push(n.events.on(r,i));return()=>{for(let e of t)e()}},t)};function nj(e,t){let n=hA();(0,q.useMemo)(()=>{t!=null&&n.store.get(e)==null&&n.store.set(e,t)},[t]);let[r,i]=(0,q.useState)(n.store.get(e));return(0,q.useEffect)(()=>{if(!n.isBrowser())return;let t=e instanceof Ek?e.key:e;return n.events.on(`state:mutate`,e=>{e.key===t&&i(e.value)})},[]),[r,t=>{n.store.set(e,t)}]}var rj=C({name:`alepha.react.core`}),ij=(e,t=[`loading`,`dirty`,`error`])=>{let n=hA(),r=t,[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(void 0),[u,d]=(0,q.useState)(void 0),f=`form`in e?e.form:e,p=`path`in e?e.path:void 0,m=r.includes(`values`),h=r.includes(`error`),g=r.includes(`dirty`),_=r.includes(`loading`);return(0,q.useEffect)(()=>{let e=[];return(h||m||g)&&e.push(n.events.on(`form:change`,e=>{e.id===f.id&&((!p||e.path===p)&&(g&&a(!0),h&&l(void 0)),m&&d(f.currentValues))})),_&&e.push(n.events.on(`form:submit:begin`,e=>{e.id===f.id&&s(!0)}),n.events.on(`form:submit:end`,e=>{e.id===f.id&&s(!1)})),(m||g)&&e.push(n.events.on(`form:submit:success`,e=>{e.id===f.id&&(m&&d(e.values),g&&a(!1))})),g&&e.push(n.events.on(`form:reset`,e=>{e.id===f.id&&a(!1)})),h&&e.push(n.events.on(`form:submit:error`,e=>{e.id===f.id&&(!p||e.error instanceof xk&&e.error.value.path===p)&&l(e.error)})),()=>{for(let t of e)t()}},[]),{dirty:i,loading:o,error:c,values:u}},aj=class extends xk{name=`ValidationError`;constructor(e){super({message:e.message,instancePath:e.path,schemaPath:``,keyword:`not`,params:{}})}},oj=e=>{let t=hA(),[n,r]=(0,q.useState)(e?.initialValue);return(0,q.useEffect)(()=>{if(!(!e?.form||!t.isBrowser()))return t.events.on(`form:change`,t=>{t.id===e.form.id&&t.path===e.path&&r(t.value)})},[]),[n,t=>{e.set(t)}]},sj=class{log=TA();alepha=D(Ok);values={};initialValues={};submitInProgress=!1;input;get submitting(){return this.submitInProgress}constructor(e,t){this.id=e,this.options=t,this.options=t;let n=this.extractSchemaDefaults(t.schema);if(Object.keys(n).length>0&&Object.assign(this.values,n),t.initialValues){let e=this.alepha.codec.decode(t.schema,t.initialValues);Object.assign(this.values,e)}this.initialValues={...this.values},this.input=this.createProxyFromSchema(t,t.schema,{store:this.values,parent:``})}extractSchemaDefaults(e,t=``){let n={};if(!e.properties)return n;for(let[r,i]of Object.entries(e.properties)){let e=t?`${t}.${r}`:r;if(`default`in i&&i.default!==void 0)n[e]=i.default;else if(i&&`type`in i&&i.type===`object`&&`properties`in i){let t=this.extractSchemaDefaults(i,e);Object.assign(n,t)}}return n}get currentValues(){return this.restructureValues(this.values)}get props(){return{id:this.id,noValidate:!0,onSubmit:e=>{e?.preventDefault?.(),this.submit()},onReset:e=>this.reset(e)}}setInitialValues=e=>{let t=this.alepha.codec.decode(this.options.schema,e);for(let e in this.initialValues)delete this.initialValues[e];Object.assign(this.initialValues,t);for(let e in this.values)delete this.values[e];Object.assign(this.values,{...this.initialValues});for(let[e,t]of Object.entries(this.values)){let n=`/${e.replaceAll(`.`,`/`)}`;this.alepha.events.emit(`form:change`,{id:this.id,path:n,value:t},{catch:!0})}};reset=e=>{e?.preventDefault?.();for(let e in this.values)delete this.values[e];Object.assign(this.values,{...this.initialValues});for(let[e,t]of Object.entries(this.values)){let n=`/${e.replaceAll(`.`,`/`)}`;this.alepha.events.emit(`form:change`,{id:this.id,path:n,value:t},{catch:!0})}this.alepha.events.emit(`form:reset`,{id:this.id},{catch:!0}),this.options.onReset?.()};submit=async()=>{if(this.submitInProgress){this.log.warn(`Form submission already in progress, ignoring duplicate submit.`);return}await this.alepha.events.emit(`react:action:begin`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:begin`,{id:this.id}),this.submitInProgress=!0;let e=this.options;try{let t=this.restructureValues(this.values);K.schema.isSchema(e.schema)&&(t=this.alepha.codec.decode(e.schema,t)),await e.handler(t),await this.alepha.events.emit(`react:action:success`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:success`,{id:this.id,values:t})}catch(t){this.log.error(`Form submission error:`,t),e.onError?.(t),await this.alepha.events.emit(`react:action:error`,{type:`form`,id:this.id,error:t}),await this.alepha.events.emit(`form:submit:error`,{error:t,id:this.id})}finally{this.submitInProgress=!1}await this.alepha.events.emit(`react:action:end`,{type:`form`,id:this.id}),await this.alepha.events.emit(`form:submit:end`,{id:this.id})};restructureValues(e){let t={};for(let[n,r]of Object.entries(e))n.includes(`.`)?this.restructureNestedValue(t,n,r):t[n]=r;return t}restructureNestedValue(e,t,n){let r=t.split(`.`),i=r.pop();if(!i)return;let a=e;for(let e of r)a[e]??={},a=a[e];a[i]=n}createProxyFromSchema(e,t,n){return n.parent,new Proxy({},{get:(r,i)=>{if(!e.schema||!K.schema.isObject(t))return{};if(i in t.properties)return this.createInputFromSchema(i,e,t,t.required?.includes(i)||!1,n)}})}createInputFromSchema(e,t,n,r,i){let a=i.parent||``,o=n.properties?.[e];if(!o)return{path:``,required:r,initialValue:void 0,props:{},schema:n,set:()=>{},form:this};let s=n.required?.includes(e)??!1,c=a?`${a}.${e}`:e,l=`/${c.replaceAll(`.`,`/`)}`,u=e=>{let n=this.getValueFromInput(e,o);i.store[c]=n,t.onChange&&t.onChange(c,n,i.store),this.alepha.events.emit(`form:change`,{id:this.id,path:l,value:n},{catch:!0})},d={name:c};if(t.id&&(d.id=`${t.id}-${c}`,d[`data-testid`]=d.id),K.schema.isString(o)&&(o.maxLength!=null&&(d.maxLength=Number(o.maxLength)),o.minLength!=null&&(d.minLength=Number(o.minLength))),s&&(d.required=!0),`description`in o&&typeof o.description==`string`&&(d[`aria-label`]=o.description),K.schema.isInteger(o)||K.schema.isNumber(o)?d.type=`number`:e===`password`?d.type=`password`:e===`email`?d.type=`email`:e===`url`?d.type=`url`:K.schema.isString(o)?o.format===`binary`?d.type=`file`:o.format===`date`?d.type=`date`:o.format===`time`?d.type=`time`:o.format===`date-time`?d.type=`datetime-local`:d.type=`text`:K.schema.isBoolean(o)&&(d.type=`checkbox`),t.onCreateField){let n=t.onCreateField(e,o);Object.assign(d,n)}return K.schema.isObject(o)?{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c],items:this.createProxyFromSchema(t,o,{parent:c,store:i.store})}:K.schema.isArray(o)?{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c],items:[]}:{path:l,props:d,schema:o,set:u,form:this,required:r,initialValue:i.store[c]}}getValueFromInput(e,t){if(e instanceof File)return K.schema.isString(t)&&t.format===`binary`?e:null;if(K.schema.isBoolean(t))return e===`true`?!0:e===`false`?!1:e===``||e==null?void 0:!!e;if(K.schema.isNumber(t)){let t=Number(e);return Number.isNaN(t)?null:t}return K.schema.isString(t)?t.format===`date`?new Date(e).toISOString().slice(0,10):t.format===`time`?new Date(`1970-01-01T${e}`).toISOString().slice(11,16):t.format===`date-time`?new Date(e).toISOString():String(e):e}},cj=(e,t=[])=>{let n=hA(),r=(0,q.useId)(),i=(0,q.useRef)(e.initialValues),a=(0,q.useMemo)(()=>n.inject(sj,{lifetime:`transient`,args:[e.id||r,e]}),t);return(0,q.useEffect)(()=>{i.current!==e.initialValues&&(i.current=e.initialValues,e.initialValues&&a.setInitialValues(e.initialValues))},[e.initialValues]),a},lj=C({name:`alepha.react.form`}),uj=class{expand(e){let t=[],n=[];return e.description||e.image||e.url||e.siteName||e.locale||e.type||e.og||e.twitter?(e.description&&t.push({name:`description`,content:e.description}),e.url&&n.push({rel:`canonical`,href:e.url}),this.expandOpenGraph(e,t),this.expandTwitter(e,t),{meta:t,link:n}):{meta:t,link:n}}expandOpenGraph(e,t){let n=e.og?.title??e.title,r=e.og?.description??e.description,i=e.og?.image??e.image;(e.type||n)&&t.push({property:`og:type`,content:e.type??`website`}),e.url&&t.push({property:`og:url`,content:e.url}),n&&t.push({property:`og:title`,content:n}),r&&t.push({property:`og:description`,content:r}),i&&(t.push({property:`og:image`,content:i}),e.imageWidth&&t.push({property:`og:image:width`,content:String(e.imageWidth)}),e.imageHeight&&t.push({property:`og:image:height`,content:String(e.imageHeight)}),e.imageAlt&&t.push({property:`og:image:alt`,content:e.imageAlt})),e.siteName&&t.push({property:`og:site_name`,content:e.siteName}),e.locale&&t.push({property:`og:locale`,content:e.locale})}expandTwitter(e,t){let n=e.twitter?.title??e.title,r=e.twitter?.description??e.description,i=e.twitter?.image??e.image;(e.twitter?.card||n||i)&&t.push({name:`twitter:card`,content:e.twitter?.card??(i?`summary_large_image`:`summary`)}),e.url&&t.push({name:`twitter:url`,content:e.url}),n&&t.push({name:`twitter:title`,content:n}),r&&t.push({name:`twitter:description`,content:r}),i&&(t.push({name:`twitter:image`,content:i}),e.imageAlt&&t.push({name:`twitter:image:alt`,content:e.imageAlt})),e.twitter?.site&&t.push({name:`twitter:site`,content:e.twitter.site}),e.twitter?.creator&&t.push({name:`twitter:creator`,content:e.twitter.creator})}},dj=class{log=TA();seoExpander=D(uj);global=[];warnedAboutHtmlAttributes=!1;resolveGlobalHead(){let e={htmlAttributes:{lang:`en`}};for(let t of this.global??[]){let n=typeof t==`function`?t():t;n.htmlAttributes&&(e.htmlAttributes={...e.htmlAttributes,...n.htmlAttributes})}return e}resolveGlobal(){let e={};for(let t of this.global??[]){let n=typeof t==`function`?t():t,{meta:r,link:i}=this.seoExpander.expand(n);e={...e,...n,meta:[...e.meta??[],...r,...n.meta??[]],link:[...e.link??[],...i,...n.link??[]],script:[...e.script??[],...n.script??[]]}}return e}fillHead(e){e.head={...e.head};for(let t of this.global??[]){let n=typeof t==`function`?t():t;this.mergeHead(e,n)}for(let t of e.layers)t.route?.head&&!t.error&&this.fillHeadByPage(t.route,e,t.props??{});e.head.title??=`App`,e.head.htmlAttributes={lang:`en`,...e.head.htmlAttributes}}mergeHead(e,t){let{meta:n,link:r}=this.seoExpander.expand(t);e.head={...e.head,...t,meta:[...e.head.meta??[],...n,...t.meta??[]],link:[...e.head.link??[],...r,...t.link??[]],script:[...e.head.script??[],...t.script??[]]}}fillHeadByPage(e,t,n){if(!e.head)return;t.head??={};let r=typeof e.head==`function`?e.head(n,t.head):e.head,{meta:i,link:a}=this.seoExpander.expand(r);t.head.meta=[...t.head.meta??[],...i],t.head.link=[...t.head.link??[],...a],r.title&&(t.head??={},t.head.titleSeparator?t.head.title=`${r.title}${t.head.titleSeparator}${t.head.title}`:t.head.title=r.title,t.head.titleSeparator=r.titleSeparator),r.htmlAttributes&&!this.warnedAboutHtmlAttributes&&(this.warnedAboutHtmlAttributes=!0,this.log.warn(`Page-level htmlAttributes are ignored. Use global $head() for htmlAttributes instead, as they are sent before page loaders run for early streaming optimization.`)),r.bodyAttributes&&(t.head.bodyAttributes={...t.head.bodyAttributes,...r.bodyAttributes}),r.meta&&(t.head.meta=[...t.head.meta??[],...r.meta??[]]),r.link&&(t.head.link=[...t.head.link??[],...r.link??[]]),r.script&&(t.head.script=[...t.head.script??[],...r.script??[]])}},fj=e=>x(pj,e),pj=class extends b{provider=D(dj);onInit(){this.provider.global=[...this.provider.global??[],this.options]}};fj[u]=pj;var mj=class{alepha=D(Ok);headProvider=D(dj);get document(){return window.document}fillAndRenderHead(e){this.alepha.isBrowser()&&(this.headProvider.fillHead(e),e.head&&this.renderHead(this.document,e.head))}refreshGlobalHead(){let e=this.headProvider.resolveGlobal();this.renderHead(this.document,e)}getHead(e){return{get title(){return e.title},get htmlAttributes(){let t={};for(let n of e.documentElement.attributes)t[n.name]=n.value;return t},get bodyAttributes(){let t={};for(let n of e.body.attributes)t[n.name]=n.value;return t},get meta(){let t=[];for(let n of e.head.querySelectorAll(`meta[name]`)){let e=n.getAttribute(`name`),r=n.getAttribute(`content`);e&&r&&t.push({name:e,content:r})}for(let n of e.head.querySelectorAll(`meta[property]`)){let e=n.getAttribute(`property`),r=n.getAttribute(`content`);e&&r&&t.push({property:e,content:r})}return t}}}renderHead(e,t){if(t.title&&(e.title=t.title),t.bodyAttributes)for(let[n,r]of Object.entries(t.bodyAttributes))r?e.body.setAttribute(n,r):e.body.removeAttribute(n);if(t.htmlAttributes)for(let[n,r]of Object.entries(t.htmlAttributes))r?e.documentElement.setAttribute(n,r):e.documentElement.removeAttribute(n);if(t.meta)for(let n of t.meta)this.renderMetaTag(e,n);if(t.link)for(let n of t.link){let{rel:t,href:r}=n,i=e.querySelector(`link[rel="${t}"][href="${r}"]`);i||(i=e.createElement(`link`),i.setAttribute(`rel`,t),i.setAttribute(`href`,r),n.type&&i.setAttribute(`type`,n.type),n.as&&i.setAttribute(`as`,n.as),n.crossorigin!=null&&i.setAttribute(`crossorigin`,``),e.head.appendChild(i))}if(t.script)for(let n of t.script)this.renderScriptTag(e,n)}renderScriptTag(e,t){let n=e.createElement(`script`);if(typeof t==`string`){n.textContent=t,e.head.appendChild(n);return}let{content:r,...i}=t;if(!(i.src&&e.querySelector(`script[src="${i.src}"]`))){for(let[e,t]of Object.entries(i))t===!0?n.setAttribute(e,``):t!==void 0&&t!==!1&&n.setAttribute(e,String(t));r&&(n.textContent=r),e.head.appendChild(n)}}renderMetaTag(e,t){let{content:n}=t;if(t.property){let r=e.querySelector(`meta[property="${t.property}"]`);if(r)r.setAttribute(`content`,n);else{let r=e.createElement(`meta`);r.setAttribute(`property`,t.property),r.setAttribute(`content`,n),e.head.appendChild(r)}return}if(t.name){let r=e.querySelector(`meta[name="${t.name}"]`);if(r)r.setAttribute(`content`,n);else{let r=e.createElement(`meta`);r.setAttribute(`name`,t.name),r.setAttribute(`content`,n),e.head.appendChild(r)}}}},hj=C({name:`alepha.react.head`,primitives:[fj],services:[rj,mj]}),gj=class{parseRequestCookies(e){let t={},n=e.split(`;`);for(let e of n){let n=e.indexOf(`=`);if(n===-1)continue;let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();!r||!i||(t[r]=i)}return t}serializeResponseCookies(e,t){let n=[];for(let[r,i]of Object.entries(e)){if(i==null){n.push(`${r}=; Path=/; Max-Age=0`);continue}i.value&&n.push(this.cookieToString(r,i,t))}return n}cookieToString(e,t,n){let r=[];return r.push(`${e}=${t.value}`),t.path&&r.push(`Path=${t.path}`),t.maxAge&&r.push(`Max-Age=${t.maxAge}`),t.secure!==!1&&n&&r.push(`Secure`),t.httpOnly&&r.push(`HttpOnly`),t.sameSite&&r.push(`SameSite=${t.sameSite}`),t.domain&&r.push(`Domain=${t.domain}`),r.join(`; `)}},_j=(e,t)=>(t&&(e={key:e.key,schema:e.schema,...t}),x(vj,e)),vj=class extends b{cookieParser=D(gj);alepha=D(Ok);dateTimeProvider=D(dA);cookie;onInit(){this.options.key&&(this.alepha.events.on(`state:mutate`,({key:e,value:t})=>{e===this.options.key&&this.set(t)}),this.alepha.events.on(`configure`,()=>{try{let e=this.get();e!==void 0&&this.alepha.set(this.options.key,e)}catch{}}))}get schema(){return this.options.schema}get name(){return this.options.name??`${this.config.propertyKey}`}set(e){let t=JSON.stringify(this.alepha.codec.decode(this.schema,e)),n=this.options;if(n.compress)throw new p(`Compression is not supported in browser cookies.`);if(n.encrypt)throw new p(`Encryption is not supported in browser cookies.`);if(n.sign)throw new p(`Signing is not supported in browser cookies.`);let r={value:encodeURIComponent(t),path:n.path??`/`,sameSite:n.sameSite??`lax`,secure:!1,httpOnly:!1,domain:n.domain};n.ttl&&(r.maxAge=this.dateTimeProvider.duration(n.ttl).as(`seconds`)),document.cookie=this.cookieParser.cookieToString(this.name,r)}get(e){let t=this.cookieParser.parseRequestCookies(document.cookie)[this.name];if(!t)return;let n=decodeURIComponent(t);if(this.options.compress)throw new p(`Compression is not supported in browser cookies.`);if(this.options.encrypt)throw new p(`Encryption is not supported in browser cookies.`);if(this.options.sign)throw new p(`Signing is not supported in browser cookies.`);return this.alepha.codec.decode(this.schema,JSON.parse(n))}del(){let e=this.options,t={value:``,path:e.path??`/`,sameSite:e.sameSite??`lax`,secure:!1,httpOnly:!1,domain:e.domain,maxAge:0};document.cookie=this.cookieParser.cookieToString(this.name,t)}};_j[u]=vj,C({name:`alepha.server.cookies`,primitives:[],services:[JA]});var yj=class{log=TA();alepha=D(Ok);dateTimeProvider=D(dA);cookie=_j({name:`lang`,schema:K.text(),ttl:[1,`year`]});registry=[];options={fallbackLang:`en`};dateFormat=new Intl.DateTimeFormat(this.lang);numberFormat=new Intl.NumberFormat(this.lang);get languages(){let e=new Set;for(let t of this.registry)e.add(t.lang);return e.add(this.options.fallbackLang),Array.from(e)}constructor(){this.refreshLocale()}onRender=j({on:`server:onRequest`,priority:`last`,handler:async({request:e})=>{this.alepha.store.set(`alepha.react.i18n.lang`,this.cookie.get(e))}});onStart=j({on:`start`,handler:async()=>{if(this.alepha.isBrowser()){let e=this.cookie.get();e&&this.alepha.store.set(`alepha.react.i18n.lang`,e);for(let e of this.registry)(e.lang===this.lang||e.lang===this.options.fallbackLang)&&(this.log.trace(`Loading language`,{lang:e.lang,name:e.name,target:e.target}),e.translations=await e.loader());return}for(let e of this.registry)e.translations=await e.loader()}});refreshLocale(){this.numberFormat=new Intl.NumberFormat(this.lang),this.dateFormat=new Intl.DateTimeFormat(this.lang),this.dateTimeProvider.setLocale(this.lang),_k.setLocale(this.lang)}setLang=async e=>{if(this.alepha.isBrowser()){for(let t of this.registry)if(e===t.lang){if(Object.keys(t.translations).length>0)continue;t.translations=await t.loader()}this.cookie.set(e)}this.alepha.store.set(`alepha.react.i18n.lang`,e),this.refreshLocale()};mutate=j({on:`state:mutate`,handler:async({key:e,value:t})=>{if(e===`alepha.react.i18n.lang`&&this.alepha.isBrowser()){let e=!1;for(let n of this.registry)if(t===n.lang){if(Object.keys(n.translations).length>0)continue;n.translations=await n.loader(),e=!0}this.refreshLocale(),e&&this.alepha.store.set(`alepha.react.i18n.lang`,t)}}});get lang(){return this.alepha.store.get(`alepha.react.i18n.lang`)||this.options.fallbackLang}translate=(e,t=[])=>{for(let n of this.registry)if(n.lang===this.lang&&n.translations[e])return this.render(n.translations[e],t);for(let n of this.registry)if(n.lang===this.options.fallbackLang&&n.translations[e])return this.render(n.translations[e],t);return e};l=(e,t={})=>{if(typeof e==`number`&&!t.date)return new Intl.NumberFormat(this.lang,t.number).format(e);if(e instanceof Date||this.dateTimeProvider.isDateTime(e)||typeof e==`string`&&t.date||typeof e==`number`&&t.date){let n=this.dateTimeProvider.of(e);return t.timezone&&(n=n.tz(t.timezone)),typeof t.date==`string`?t.date===`fromNow`?n.locale(this.lang).fromNow():n.locale(this.lang).format(t.date):t.date?new Intl.DateTimeFormat(this.lang,t.timezone?{...t.date,timeZone:t.timezone}:t.date).format(n.toDate()):t.timezone?new Intl.DateTimeFormat(this.lang,{timeZone:t.timezone}).format(n.toDate()):new Intl.DateTimeFormat(this.lang).format(n.toDate())}return e instanceof xk?_k.translateError(e,this.lang):e};tr=(e,t={})=>{let n=this.translate(e,t.args||[]);return n===e&&t.default?t.default:n};render(e,t){let n=e;for(let e=0;e<t.length;e++)n=n.replace(`$${e+1}`,t[e]);return n}},bj=e=>x(xj,e),xj=class extends b{provider=D(yj);onInit(){this.provider.registry.push({target:this.config.service.name,name:this.options.name??this.config.propertyKey,lang:this.options.lang??this.config.propertyKey,loader:async()=>(await this.options.lazy()).default,translations:{}})}};bj[u]=xj;var Sj=()=>(nj(`alepha.react.i18n.lang`),gA(yj)),Cj=C({name:`alepha.react.i18n`,primitives:[bj],services:[yj]}),wj=Tk({name:`alepha.ui.sidebar`,schema:K.object({closed:K.boolean(),collapsed:K.boolean(),expandedWidth:K.number(),collapsedWidth:K.number()}),default:{closed:!0,collapsed:!1,expandedWidth:300,collapsedWidth:72}}),Tj=Tk({name:`alepha.ui.theme`,schema:K.object({index:K.integer()}),default:{index:0}}),Ej=Tk({name:`alepha.ui.themeOverrides`,schema:K.object({primaryColor:K.optional(K.text()),radius:K.optional(K.text()),fontFamily:K.optional(K.text()),fontSize:K.optional(K.text()),scale:K.optional(K.text())}),default:{}}),Dj={name:`Default`,description:`Default Alepha Theme`};function Oj(e){return Object.keys(e)}function kj(e){return e&&typeof e==`object`&&!Array.isArray(e)}function Aj(e,t){let n={...e},r=t;return kj(e)&&kj(t)&&Object.keys(t).forEach(t=>{kj(r[t])&&t in e?n[t]=Aj(n[t],r[t]):n[t]=r[t]}),n}function jj(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Mj(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function Nj(e){let t=Mj(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function Pj(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function Fj(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?Pj(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?Pj(n):n}}return r}return n}var X=Fj(`rem`,{shouldScale:!0}),Ij=Fj(`em`);function Lj(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function Rj(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function zj(e){return Array.isArray(e)||e===null?!1:typeof e==`object`?e.type!==q.Fragment:!1}function Bj(e){let t=(0,q.createContext)(null);return[t,()=>{let n=(0,q.use)(t);if(n===null)throw Error(e);return n}]}function Vj(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function Hj(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function Uj(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}function Wj(e,t,n){return Vj(e,n)===Vj(t,n)}function Gj({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:a=`rtl`,orientation:o}){return s=>{n?.(s);let c=Array.from(Vj(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>Wj(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=Uj(l,c,r),d=Hj(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break;case`End`:{s.stopPropagation(),s.preventDefault();let e=c.length-1;!c[e].disabled&&c[e].focus();break}}}}var Kj={app:100,modal:200,popover:300,overlay:400,max:9999};function qj(e){return Kj[e]}var Jj=()=>{};function Yj(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||Jj:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function Xj(e,t=`size`,n=!0){if(e!==void 0)return Rj(e)?n?X(e):e:`var(--${t}-${e})`}function Zj(e){return Xj(e,`mantine-spacing`)}function Qj(e){return e===void 0?`var(--mantine-radius-default)`:Xj(e,`mantine-radius`)}function $j(e){return Xj(e,`mantine-font-size`)}function eM(e){return Xj(e,`mantine-line-height`,!1)}function tM(e){if(e)return Xj(e,`mantine-shadow`,!1)}function nM(e,t){return n=>{e?.(n),t?.(n)}}function rM(e,t){return e in t?Nj(t[e]):Nj(e)}function iM(e,t){let n=e.map(e=>({value:e,px:rM(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function aM(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function oM(e,t,n){return n?Array.from(Vj(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}function sM(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):Math.min(t===void 0&&n!==void 0?e:Math.max(e,t),n)}function cM(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function lM(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1){let r=n[i];if(!(r in t)||e[r]!==t[r]&&!(Number.isNaN(e[r])&&Number.isNaN(t[r])))return!1}return!0}function uM(e){let t=(0,q.useRef)(e);return(0,q.useEffect)(()=>{t.current=e}),(0,q.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function dM(e,t){let{delay:n,flushOnUnmount:r,leading:i}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1}:t,a=uM(e),o=(0,q.useRef)(0),s=(0,q.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(o.current);let r=e._isFirstCall;e._isFirstCall=!1;function s(){window.clearTimeout(o.current),o.current=0,e._isFirstCall=!0}if(i&&r){a(...t),e.flush=()=>{o.current!==0&&(s(),a(...t))},e.cancel=()=>{s()},o.current=window.setTimeout(()=>{s()},n);return}if(i&&!r){e.flush=()=>{o.current!==0&&(s(),a(...t))},e.cancel=()=>{s()},o.current=window.setTimeout(()=>{s()},n);return}let c=()=>{o.current!==0&&(s(),a(...t))};e.flush=c,e.cancel=()=>{s()},o.current=window.setTimeout(c,n)},{flush:()=>{},cancel:()=>{},_isFirstCall:!0});return e},[a,n,i]);return(0,q.useEffect)(()=>()=>{r?s.flush():s.cancel()},[s,r]),s}var fM=[`mousedown`,`touchstart`];function pM(e,t,n){let r=(0,q.useRef)(null),i=t||fM,a=(0,q.useEffectEvent)(t=>{let{target:i}=t??{};if(Array.isArray(n)){let r=!document.body.contains(i)&&i?.tagName!==`HTML`;n.every(e=>!!e&&!t.composedPath().includes(e))&&!r&&e(t)}else r.current&&!r.current.contains(i)&&e(t)});return(0,q.useEffect)(()=>(i.forEach(e=>document.addEventListener(e,a)),()=>{i.forEach(e=>document.removeEventListener(e,a))}),[]),r}function mM(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window?window.matchMedia(e).matches:!1}function hM(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,q.useState)(n?t:mM(e));return(0,q.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}function gM(e,t){return hM(`(prefers-color-scheme: dark)`,e===`dark`,t)?`dark`:`light`}var _M=typeof document<`u`?q.useLayoutEffect:q.useEffect;function vM(e,t){let n=(0,q.useRef)(!1);(0,q.useEffect)(()=>()=>{n.current=!1},[]),(0,q.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}function yM({opened:e,shouldReturnFocus:t=!0}){let n=(0,q.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return vM(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};return document.addEventListener(`keydown`,a),e?n.current=document.activeElement:t&&(i=window.setTimeout(r,10)),()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var bM=/input|select|textarea|button|object/,xM=`a, input, select, textarea, button, object, [tabindex]`;function SM(e){return e.style.display===`none`}function CM(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&!(t===document.body||t.nodeType===11);){if(SM(t))return!1;t=t.parentNode}return!0}function wM(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function TM(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(wM(e));return(bM.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&CM(e)}function EM(e){let t=wM(e);return(Number.isNaN(t)||t>=0)&&TM(e)}function DM(e){return Array.from(e.querySelectorAll(xM)).filter(EM)}function OM(e,t){let n=DM(e);if(!n.length){t.preventDefault();return}let r=n[t.shiftKey?0:n.length-1],i=e.getRootNode(),a=r===i.activeElement||e===i.activeElement,o=i.activeElement;if(o.tagName===`INPUT`&&o.getAttribute(`type`)===`radio`&&(a=n.filter(e=>e.getAttribute(`type`)===`radio`&&e.getAttribute(`name`)===o.getAttribute(`name`)).includes(r)),!a)return;t.preventDefault();let s=n[t.shiftKey?n.length-1:0];s&&s.focus()}function kM(e=!0){let t=(0,q.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(xM));t=n.find(EM)||n.find(TM)||null,!t&&TM(e)&&(t=e)}t?t.focus({preventScroll:!0}):console.warn(`[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node`,e)},r=(0,q.useCallback)(r=>{e&&r!==null&&t.current!==r&&(r?(setTimeout(()=>{r.getRootNode()?n(r):console.warn(`[@mantine/hooks/use-focus-trap] Ref node is not part of the dom`,r)}),t.current=r):t.current=null)},[e]);return(0,q.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));let r=e=>{e.key===`Tab`&&t.current&&OM(t.current,e)};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e]),r}var AM=e=>(e+1)%1e6;function jM(){let[,e]=(0,q.useReducer)(AM,0);return e}function MM(e){let[t,n]=(0,q.useState)(`mantine-${(0,q.useId)().replace(/:/g,``)}`);return _M(()=>{n(cM())},[]),typeof e==`string`?e:t}function NM(e,t,n){let r=(0,q.useEffectEvent)(t);(0,q.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}function PM(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function FM(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=PM(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():PM(e,null)}),t.clear()}}}function IM(...e){return(0,q.useCallback)(FM(...e),e)}function LM(e){return{x:sM(e.x,0,1),y:sM(e.y,0,1)}}function RM(e,t,n=`ltr`){let r=(0,q.useRef)(!1),i=(0,q.useRef)(!1),a=(0,q.useRef)(0),[o,s]=(0,q.useState)(!1);return(0,q.useEffect)(()=>{r.current=!0},[]),{ref:(0,q.useCallback)(o=>{let c=({x:t,y:i})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(r.current&&o){o.style.userSelect=`none`;let r=o.getBoundingClientRect();if(r.width&&r.height){let a=sM((t-r.left)/r.width,0,1);e({x:n===`ltr`?a:1-a,y:sM((i-r.top)/r.height,0,1)})}}})},l=()=>{document.addEventListener(`mousemove`,m),document.addEventListener(`mouseup`,f),document.addEventListener(`touchmove`,g,{passive:!1}),document.addEventListener(`touchend`,f)},u=()=>{document.removeEventListener(`mousemove`,m),document.removeEventListener(`mouseup`,f),document.removeEventListener(`touchmove`,g),document.removeEventListener(`touchend`,f)},d=()=>{!i.current&&r.current&&(i.current=!0,typeof t?.onScrubStart==`function`&&t.onScrubStart(),s(!0),l())},f=()=>{i.current&&r.current&&(i.current=!1,s(!1),u(),setTimeout(()=>{typeof t?.onScrubEnd==`function`&&t.onScrubEnd()},0))},p=e=>{d(),e.preventDefault(),m(e)},m=e=>c({x:e.clientX,y:e.clientY}),h=e=>{e.cancelable&&e.preventDefault(),d(),g(e)},g=e=>{e.cancelable&&e.preventDefault(),c({x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY})};return o?.addEventListener(`mousedown`,p),o?.addEventListener(`touchstart`,h,{passive:!1}),()=>{o&&(o.removeEventListener(`mousedown`,p),o.removeEventListener(`touchstart`,h))}},[n,e]),active:o}}function zM({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,q.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function BM(e,t){return hM(`(prefers-reduced-motion: reduce)`,e,t)}function VM(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!lM(e[n],t[n]))return!1;return!0}function HM(e){let t=(0,q.useRef)([]),n=(0,q.useRef)(0);return VM(t.current,e)||(t.current=e,n.current+=1),[n.current]}function UM(e,t){(0,q.useEffect)(e,HM(t))}var WM={" ":`space`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,Escape:`escape`,Esc:`escape`,esc:`escape`,Enter:`enter`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,"+":`plus`,"-":`minus`,"*":`asterisk`,"/":`slash`};function GM(e){let t=e.replace(`Key`,``).toLowerCase();return WM[e]||t}function KM(e){let t=e.toLowerCase().split(`+`).map(e=>e.trim()),n={alt:t.includes(`alt`),ctrl:t.includes(`ctrl`),meta:t.includes(`meta`),mod:t.includes(`mod`),shift:t.includes(`shift`),plus:t.includes(`[plus]`)},r=[`alt`,`ctrl`,`meta`,`shift`,`mod`],i=t.find(e=>!r.includes(e));return{...n,key:i===`[plus]`?`+`:i}}function qM(e,t,n){let{alt:r,ctrl:i,meta:a,mod:o,shift:s,key:c}=e,{altKey:l,ctrlKey:u,metaKey:d,shiftKey:f,key:p,code:m}=t;if(r!==l)return!1;if(o){if(!u&&!d)return!1}else if(i!==u||a!==d)return!1;return s===f?!!(c&&(n?GM(m)===GM(c):GM(p??m)===GM(c))):!1}function JM(e,t){return n=>qM(KM(e),n,t)}function YM(e,t,n=!1){return e.target instanceof HTMLElement?(n||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function XM(e,t=[`INPUT`,`TEXTAREA`,`SELECT`],n=!1){let r=(0,q.useEffectEvent)(r=>{e.forEach(([e,i,a={preventDefault:!0,usePhysicalKeys:!1}])=>{JM(e,a.usePhysicalKeys)(r)&&YM(r,t,n)&&(a.preventDefault&&r.preventDefault(),i(r))})});(0,q.useEffect)(()=>(document.documentElement.addEventListener(`keydown`,r),()=>document.documentElement.removeEventListener(`keydown`,r)),[])}function ZM(e){return/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i.test(e)}function QM(e){return/(iPhone)|(iPad)|(iPod)/i.test(e)}function $M(e){return/(Win32)|(Win64)|(Windows)|(WinCE)/i.test(e)}function eN(e){return/Android/i.test(e)}function tN(e){return/Linux/i.test(e)}function nN(e){return/CrOS/i.test(e)}function rN(){if(typeof window>`u`)return`undetermined`;let{userAgent:e}=window.navigator;return QM(e)||ZM(e)&&`ontouchend`in document?`ios`:ZM(e)?`macos`:$M(e)?`windows`:eN(e)?`android`:tN(e)?`linux`:nN(e)?`chromeos`:`undetermined`}function iN(e={getValueInEffect:!0}){let[t,n]=(0,q.useState)(e.getValueInEffect?`undetermined`:rN());return _M(()=>{e.getValueInEffect&&n(rN)},[]),t}function aN(e=!1,t={}){let[n,r]=(0,q.useState)(e),i=(0,q.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,q.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,q.useCallback)(()=>{n?a():i()},[a,i,n]),set:r}]}function oN(e,t,n={autoInvoke:!1}){let r=(0,q.useRef)(null),i=(0,q.useCallback)((...n)=>{r.current||=window.setTimeout(()=>{e(n),r.current=null},t)},[t]),a=(0,q.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,q.useEffect)(()=>(n.autoInvoke&&i(),a),[a,i]),{start:i,clear:a}}function sN(e){let t=(0,q.useRef)(void 0);return(0,q.useEffect)(()=>{t.current=e},[e]),t.current}function cN(){let[e,t]=(0,q.useState)(!1);return _M(()=>{t(typeof window<`u`&&!lN()&&`EyeDropper`in window)},[]),{supported:e,open:(0,q.useCallback)((t={})=>e?new window.EyeDropper().open(t):Promise.resolve(void 0),[e])}}function lN(){return navigator.userAgent.includes(`OPR`)}function uN(e,t,n){let r=(0,q.useRef)(null);(0,q.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function dN(){let[e,t]=(0,q.useState)(!1);return(0,q.useEffect)(()=>t(!0),[]),e}var fN=o((e=>{var t=Gk();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),pN=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fN()}));function mN(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function hN(e){function t(t){let n=Object.keys(t).reduce((n,r)=>(n[`${e}:${r}`]=e=>t[r](e.detail),n),{});_M(()=>(Object.keys(n).forEach(e=>{window.removeEventListener(e,n[e]),window.addEventListener(e,n[e])}),()=>Object.keys(n).forEach(e=>{window.removeEventListener(e,n[e])})),[n])}function n(t){return(...n)=>mN(`${e}:${String(t)}`,n[0])}return[t,n]}function gN(){return`development`}function _N(e){let t=new Map;return(...n)=>{let r=JSON.stringify(n);if(t.has(r))return t.get(r);let i=e(...n);return t.set(r,i),i}}function vN(e,t){return t.length===0?e:t.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t)}function yN(e){return e?.props?.ref}function bN(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function xN(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=xN(e,n.shadowRoot);if(t)return t}}return null}function SN(e,t=document){let n=[],r=t.querySelectorAll(e);n.push(...Array.from(r));let i=t.querySelectorAll(`*`);for(let t=0;t<i.length;t+=1){let r=i[t];if(r.shadowRoot){let t=SN(e,r.shadowRoot);n.push(...t)}}return n}function CN(e){if(!e)return document;let t=e.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t:document}function wN(e){let t=q.Children.toArray(e);return t.length!==1||!zj(t[0])?null:t[0]}function TN(e){return e}function EN(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=EN(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function DN(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=EN(e))&&(r&&(r+=` `),r+=t);return r}var ON={};function kN(e){let t={};return e.forEach(e=>{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=DN(t[e],n):t[e]=n})}),t}function AN({theme:e,classNames:t,props:n,stylesCtx:r}){return kN((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||ON))}function jN({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function MN(e){return e===`auto`||e===`dark`||e===`light`}function NN({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return MN(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&MN(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function PN(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function FN(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function IN(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function LN(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function RN(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function zN(e){return FN(e)?IN(e):e.startsWith(`rgb`)?LN(e):e.startsWith(`hsl`)?RN(e):{r:0,g:0,b:0,a:1}}function BN(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function VN(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function HN(e){if(e.startsWith(`oklch(`))return(VN(e)||0)/100;let{r:t,g:n,b:r}=zN(e),i=t/255,a=n/255,o=r/255,s=BN(i),c=BN(a),l=BN(o);return .2126*s+.7152*c+.0722*l}function UN(e,t=.179){return e.startsWith(`var(`)?!1:HN(e)>t}function WN({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:UN(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:UN(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:UN(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][PN(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:UN(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:UN(e,t.luminanceThreshold),shade:a,variable:void 0}}function GN(e,t){let n=WN({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function KN(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=zN(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function qN(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=GN(n.from,t),i=GN(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function JN(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=zN(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var YN=JN,XN=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=WN({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let t=o&&a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:t,border:`${X(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:t,border:`${X(1)} solid transparent`}:{background:e,hover:KN(e,.1),color:t,border:`${X(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${X(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:KN(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${X(1)} solid transparent`}}return{background:e,hover:KN(e,.1),color:UN(e)?`var(--mantine-color-black)`:`var(--mantine-color-white)`,border:`${X(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${X(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:JN(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${X(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:JN(e,.05),color:e,border:`${X(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${X(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:JN(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${X(1)} solid transparent`}}return{background:`transparent`,hover:JN(e,.12),color:e,border:`${X(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${X(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${X(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${X(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:KN(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${X(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:KN(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${X(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:KN(t.white,.01),color:e,border:`${X(1)} solid transparent`}:n===`gradient`?{background:qN(r,t),hover:qN(r,t),color:`var(--mantine-color-white)`,border:`none`}:n===`default`?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${X(1)} solid var(--mantine-color-default-border)`}:{}};function ZN({color:e,theme:t,autoContrast:n}){return(typeof n==`boolean`?n:t.autoContrast)&&WN({color:e||t.primaryColor,theme:t}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function QN(e,t){return ZN({color:e.colors[e.primaryColor][PN(e,t)],theme:e,autoContrast:null})}function $N(e,t){return typeof e==`boolean`?e:t.autoContrast}var eP=(0,q.createContext)(null);function tP(){let e=(0,q.use)(eP);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function nP(){return tP().cssVariablesResolver}function rP(){return tP().classNamesPrefix}function iP(){return tP().getStyleNonce}function aP(){return tP().withStaticClasses}function oP(){return tP().headless}function sP(){return tP().stylesTransform?.sx}function cP(){return tP().stylesTransform?.styles}function lP(){return tP().env||`default`}function uP(e){let t=document.createElement(`style`);return t.setAttribute(`data-mantine-styles`,`inline`),t.innerHTML=`*, *::before, *::after {transition: none !important;}`,t.setAttribute(`data-mantine-disable-transition`,`true`),e&&t.setAttribute(`nonce`,e),document.head.appendChild(t),()=>document.querySelectorAll(`[data-mantine-disable-transition]`).forEach(e=>e.remove())}function dP({keepTransitions:e}={}){let t=(0,q.useRef)(Jj),n=(0,q.useRef)(-1),r=(0,q.use)(eP),i=(0,q.useRef)(iP()?.());if(!r)throw Error(`[@mantine/core] MantineProvider was not found in tree`);let a=a=>{r.setColorScheme(a),t.current=e?()=>{}:uP(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},o=()=>{r.clearColorScheme(),t.current=e?()=>{}:uP(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},s=gM(`light`,{getInitialValueInEffect:!1}),c=r.colorScheme===`auto`?s:r.colorScheme,l=(0,q.useCallback)(()=>a(c===`light`?`dark`:`light`),[a,c]);return(0,q.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:a,clearColorScheme:o,toggleColorScheme:l}}function fP(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function pP({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,q.useRef)(null),[a,o]=(0,q.useState)(()=>e.get(t)),s=r||a,c=(0,q.useCallback)(t=>{r||(fP(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,q.useCallback)(()=>{o(t),fP(t,n),e.clear()},[e.clear,t]);return(0,q.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),_M(()=>{fP(e.get(t),n)},[]),(0,q.useEffect)(()=>{if(r)return fP(r,n),()=>{};r===void 0&&fP(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&fP(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var mP=({defaultColorScheme:e,localStorageKey:t,forceColorScheme:n})=>n?`document.documentElement.setAttribute("data-mantine-color-scheme", '${n}');`:`try {
15
+ var _colorScheme = window.localStorage.getItem("${t}");
16
+ var colorScheme = _colorScheme === "light" || _colorScheme === "dark" || _colorScheme === "auto" ? _colorScheme : "${e}";
17
+ var computedColorScheme = colorScheme !== "auto" ? colorScheme : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
18
+ document.documentElement.setAttribute("data-mantine-color-scheme", computedColorScheme);
19
+ } catch (e) {}
20
+ `;function hP({defaultColorScheme:e=`light`,localStorageKey:t=`mantine-color-scheme-value`,forceColorScheme:n,...r}){let i=[`light`,`dark`,`auto`].includes(e)?e:`light`;return(0,J.jsx)(`script`,{...r,"data-mantine-script":!0,dangerouslySetInnerHTML:{__html:mP({defaultColorScheme:i,localStorageKey:t,forceColorScheme:n})}})}var gP={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},_P=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,vP={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:gP,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:XN,autoContrast:!1,luminanceThreshold:.3,fontFamily:_P,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:_P,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:X(34),lineHeight:`1.3`},h2:{fontSize:X(26),lineHeight:`1.35`},h3:{fontSize:X(22),lineHeight:`1.4`},h4:{fontSize:X(18),lineHeight:`1.45`},h5:{fontSize:X(16),lineHeight:`1.5`},h6:{fontSize:X(14),lineHeight:`1.5`}}},fontSizes:{xs:X(12),sm:X(14),md:X(16),lg:X(18),xl:X(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:X(2),sm:X(4),md:X(8),lg:X(16),xl:X(32)},spacing:{xs:X(10),sm:X(12),md:X(16),lg:X(20),xl:X(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), 0 ${X(1)} ${X(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${X(10)} ${X(15)} ${X(-5)}, rgba(0, 0, 0, 0.04) 0 ${X(7)} ${X(7)} ${X(-5)}`,md:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${X(20)} ${X(25)} ${X(-5)}, rgba(0, 0, 0, 0.04) 0 ${X(10)} ${X(10)} ${X(-5)}`,lg:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${X(28)} ${X(23)} ${X(-7)}, rgba(0, 0, 0, 0.04) 0 ${X(12)} ${X(12)} ${X(-7)}`,xl:`0 ${X(1)} ${X(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${X(36)} ${X(28)} ${X(-7)}, rgba(0, 0, 0, 0.04) 0 ${X(17)} ${X(17)} ${X(-7)}`},other:{},components:{}},yP=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,bP=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function xP(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function SP(e){if(!(e.primaryColor in e.colors))throw Error(yP);if(typeof e.primaryShade==`object`&&(!xP(e.primaryShade.dark)||!xP(e.primaryShade.light))||typeof e.primaryShade==`number`&&!xP(e.primaryShade))throw Error(bP)}function CP(e,t){if(!t)return SP(e),e;let n=Aj(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings.fontFamily=t.fontFamily),SP(n),n}var wP=(0,q.createContext)(null),TP=()=>(0,q.use)(wP)||vP;function EP(){let e=(0,q.use)(wP);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function DP({theme:e,children:t,inherit:n=!0}){let r=TP();return(0,J.jsx)(wP,{value:(0,q.useMemo)(()=>CP(n?r:vP,e),[e,r,n]),children:t})}DP.displayName=`@mantine/core/MantineThemeProvider`;function OP(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function kP(e,t){let n=t?[t]:[`:root`,`:host`],r=OP(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=OP(e.dark),o=OP(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function AP({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=PN(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:YN(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=PN(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:KN(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:KN(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:YN(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function jP(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function MP(e,t,n){Oj(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var NP=e=>{let t=PN(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:X(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":QN(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":QN(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};MP(r.variables,e.breakpoints,`breakpoint`),MP(r.variables,e.spacing,`spacing`),MP(r.variables,e.fontSizes,`font-size`),MP(r.variables,e.lineHeights,`line-height`),MP(r.variables,e.shadows,`shadow`),MP(r.variables,e.radius,`radius`),MP(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),Oj(e.colors).forEach(t=>{let n=e.colors[t];if(jP(n)){Object.assign(r.light,AP({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,AP({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0}));return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,AP({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,AP({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return Oj(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function PP(){let e=EP(),t=iP(),n=Oj(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=Nj(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:Ij(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:Ij(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,J.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function FP({theme:e,generator:t}){let n=NP(e),r=t?.(e);return r?Aj(n,r):n}var IP=NP(vP);function LP(e){let t={variables:{},light:{},dark:{}};return Oj(e.variables).forEach(n=>{IP.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),Oj(e.light).forEach(n=>{IP.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),Oj(e.dark).forEach(n=>{IP.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function RP(e){return kP({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function zP({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=EP(),r=iP(),i=FP({theme:n,generator:nP()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=kP(a?LP(i):i,e);return o?(0,J.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:RP(e)}`}}):null}zP.displayName=`@mantine/CssVariables`;function BP({respectReducedMotion:e,getRootElement:t}){_M(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function VP({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=NN(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h}){let{colorScheme:g,setColorScheme:_,clearColorScheme:v}=pP({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return BP({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,J.jsx)(eP,{value:{colorScheme:g,setColorScheme:_,clearColorScheme:v,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h},children:(0,J.jsxs)(DP,{theme:e,children:[o&&(0,J.jsx)(zP,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,J.jsx)(PP,{}),t]})})}VP.displayName=`@mantine/core/MantineProvider`;function HP({children:e,theme:t,env:n}){return(0,J.jsx)(eP,{value:{colorScheme:`auto`,setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:`mantine`,cssVariablesSelector:`:root`,withStaticClasses:!1,headless:!0,env:n},children:(0,J.jsx)(DP,{theme:t,children:e})})}HP.displayName=`@mantine/core/HeadlessMantineProvider`;function Z(e,t,n){let r=EP(),i=r.components[e]?.defaultProps,a=typeof i==`function`?i(r):i;return{...t,...a,...Lj(n)}}function UP({classNames:e,styles:t,props:n,stylesCtx:r}){let i=EP();return{resolvedClassNames:AN({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:jN({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var WP={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function GP({theme:e,options:t,unstyled:n}){return DN(t?.focusable&&!n&&(e.focusClassName||WP[e.focusRing]),t?.active&&!n&&e.activeClassName)}function KP({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return AN({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function qP({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return AN({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function JP({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function YP({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function XP({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function ZP({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function QP({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return DN(GP({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),ZP({options:t,classes:s,selector:r,unstyled:c||m}),a[r],qP({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),KP({selector:r,stylesCtx:f,options:t,props:d,theme:e}),JP({rootSelector:u,selector:r,className:l}),YP({selector:r,classes:s,unstyled:c||m}),p&&!m&&XP({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function $P({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...$P({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function eF({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&jN({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...$P({style:n?.style,theme:e})}}function tF(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...Lj(t[n])}}),e),{})}function nF({props:e,stylesCtx:t,themeName:n,theme:r}){let i=cP()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function rF({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=EP(),m=rP(),h=aP(),g=oP(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=nF({props:n,stylesCtx:r,themeName:_,theme:p}),b=AN({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>AN({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:jN({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=jN({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=tF([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=$P({style:a,theme:p});return(e,a)=>({...f?.[e],className:QP({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:eF({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function iF(e){return Oj(e).reduce((t,n)=>e[n]===void 0?t:`${t}${jj(n)}:${e[n]};`,``).trim()}function aF({selector:e,styles:t,media:n,container:r}){let i=t?iF(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${iF(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${iF(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function oF(e){let t=iP();return(0,J.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:t?.(),dangerouslySetInnerHTML:{__html:aF(e)}})}function sF(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:M,lh:N,fs:P,tt:F,td:ee,w:I,miw:te,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:ue,left:R,bottom:de,right:z,inset:fe,display:pe,flex:me,hiddenFrom:he,visibleFrom:ge,lightHidden:_e,darkHidden:ve,sx:ye,...be}=e;return{styleProps:Lj({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:M,lh:N,fs:P,tt:F,td:ee,w:I,miw:te,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:ue,left:R,bottom:de,right:z,inset:fe,display:pe,flex:me,bdrs:w,hiddenFrom:he,visibleFrom:ge,lightHidden:_e,darkHidden:ve,sx:ye}),rest:be}}var cF={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function lF(e,t){let n=WN({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function uF(e,t){let n=WN({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:lF(e,t)}function dF(e,t){if(typeof e==`number`)return X(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${X(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${lF(i.join(` `),t)}`),a.trim()}return e}var fF={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function pF(e){return typeof e==`string`&&e in fF?fF[e]:e}var mF=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function hF(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&mF.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?X(e):e}function gF(e){return e}var _F=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function vF(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&_F.includes(e)?`var(--mantine-${e}-line-height)`:e}function yF(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?X(e):e}function bF(e){return typeof e==`number`?X(e):e}function xF(e,t){if(typeof e==`number`)return X(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return X(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var SF={color:lF,textColor:uF,fontSize:hF,spacing:xF,radius:yF,identity:gF,size:bF,lineHeight:vF,fontFamily:pF,border:dF};function CF(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function wF({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(CF(e))-Number(CF(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function TF(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return!(t.length===1&&t[0]===`base`)}function EF(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function DF(e){return typeof e==`object`&&e?Oj(e).filter(e=>e!==`base`):[]}function OF(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function kF({styleProps:e,data:t,theme:n}){return wF(Oj(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=EF(e[i]);if(!TF(e[i]))return o.forEach(e=>{r.inlineStyles[e]=SF[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=DF(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=SF[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:SF[a.type](OF(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function AF(){return`__m__-${(0,q.useId)().replace(/[:«»]/g,``)}`}function jF(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...jF(n,t)}),{}):typeof e==`function`?e(t):e??{}}function MF(e){return e}var NF=MF;function PF(e){return e}function Q(e){let t=e;return t.extend=PF,t.withProps=e=>{let n=n=>(0,J.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function FF(e){return Q(e)}function IF(e){let t=e;return t.withProps=e=>{let n=n=>(0,J.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=PF,t}function LF(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function RF(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[LF(n)]=e[n]),t},{})}function zF(e){return e?typeof e==`string`?{[LF(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...zF(t)}),{}):RF(e):null}function BF(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...BF(n,t)}),{}):typeof e==`function`?e(t):e??{}}function VF({theme:e,style:t,vars:n,styleProps:r}){let i=BF(t,e),a=BF(n,e);return{...i,...a,...r}}function HF({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=EP(),g=e||`div`,{styleProps:_,rest:v}=sF(m),y=sP()?.()?.(_.sx),b=AF(),x=kF({styleProps:_,theme:h,data:cF}),S={ref:p,style:VF({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:DN(r,y,{[b]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":Rj(o)?void 0:o||void 0,size:f,...zF(a),...v};return(0,J.jsxs)(J.Fragment,{children:[x.hasResponsiveStyles&&(0,J.jsx)(oF,{selector:`.${b}`,styles:x.styles,media:x.media}),typeof d==`function`?d(S):(0,J.jsx)(g,{...S})]})}HF.displayName=`@mantine/core/Box`;var $=NF(HF),UF=(0,q.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function WF(){return(0,q.use)(UF)}var[GF,KF]=Bj(`ScrollArea.Root component was not found in tree`);function qF(e,t){let n=(0,q.useEffectEvent)(t);_M(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function JF(e){let{style:t,...n}=e,r=KF(),[i,a]=(0,q.useState)(0),[o,s]=(0,q.useState)(0),c=!!(i&&o);return qF(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),qF(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,J.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function YF(e){let t=KF(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,J.jsx)(JF,{...e}):null}var XF={scrollHideDelay:1e3,type:`hover`};function ZF(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=Z(`ScrollAreaRoot`,XF,e),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(null),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(null),[_,v]=(0,q.useState)(0),[y,b]=(0,q.useState)(0),[x,S]=(0,q.useState)(!1),[C,w]=(0,q.useState)(!1),T=IM(a,e=>c(e));return(0,J.jsx)(GF,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,J.jsx)($,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}ZF.displayName=`@mantine/core/ScrollAreaRoot`;function QF(e,t){let n=e/t;return Number.isNaN(n)?0:n}function $F(e){let t=QF(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function eI(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function tI(e,[t,n]){return Math.min(n,Math.max(t,e))}function nI(e,t,n=`ltr`){let r=$F(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=tI(e,n===`ltr`?[0,o]:[o*-1,0]);return eI([0,o],[0,s])(c)}function rI(e,t,n,r=`ltr`){let i=$F(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return eI([c,l],d)(e)}function iI(e,t){return e>0&&e<t}function aI(e){return e?parseInt(e,10):0}function oI(e,t,{checkForDefaultPrevented:n=!0}={}){return r=>{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[sI,cI]=Bj(`ScrollAreaScrollbar was not found in tree`);function lI(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=KF(),[p,m]=(0,q.useState)(null),h=IM(u,e=>m(e)),g=(0,q.useRef)(null),_=(0,q.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,q.useEffectEvent)(c),x=uM(o),S=dM(l,10),C=e=>{g.current&&s({x:e.clientX-g.current.left,y:e.clientY-g.current.top})};return(0,q.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,q.useEffect)(x,[t,x]),qF(p,S),qF(f.content,S),(0,J.jsx)(sI,{value:{scrollbar:p,hasThumb:n,onThumbChange:uM(r),onThumbPointerUp:uM(i),onThumbPositionChange:x,onThumbPointerDown:uM(a)},children:(0,J.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:oI(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:oI(e.onPointerMove,C),onPointerUp:oI(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var uI=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=KF(),[s,c]=(0,q.useState)(),l=(0,q.useRef)(null),u=IM(i,l,o.onScrollbarXChange);return(0,q.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,J.jsx)(lI,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${$F(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),iI(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:aI(s.paddingLeft),paddingEnd:aI(s.paddingRight)}})}})};uI.displayName=`@mantine/core/ScrollAreaScrollbarX`;function dI(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=KF(),[s,c]=(0,q.useState)(),l=(0,q.useRef)(null),u=IM(i,l,o.onScrollbarYChange);return(0,q.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,J.jsx)(lI,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${$F(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),iI(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:aI(s.paddingTop),paddingEnd:aI(s.paddingBottom)}})}})}dI.displayName=`@mantine/core/ScrollAreaScrollbarY`;function fI(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=WF(),i=KF(),a=(0,q.useRef)(null),o=(0,q.useRef)(0),[s,c]=(0,q.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=QF(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>rI(e,o.current,s,t);return t===`horizontal`?(0,J.jsx)(uI,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=nI(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,J.jsx)(dI,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=nI(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}fI.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function pI(e){let t=KF(),{forceMount:n,...r}=e,[i,a]=(0,q.useState)(!1),o=e.orientation===`horizontal`,s=dM(()=>{if(t.viewport){let e=t.viewport.offsetWidth<t.viewport.scrollWidth,n=t.viewport.offsetHeight<t.viewport.scrollHeight;a(o?e:n)}},10);return qF(t.viewport,s),qF(t.content,s),n||i?(0,J.jsx)(fI,{"data-state":i?`visible`:`hidden`,...r}):null}pI.displayName=`@mantine/core/ScrollAreaScrollbarAuto`;function mI(e){let{forceMount:t,...n}=e,r=KF(),[i,a]=(0,q.useState)(!1);return(0,q.useEffect)(()=>{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,J.jsx)(pI,{"data-state":i?`visible`:`hidden`,...n}):null}mI.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function hI(e){let{forceMount:t,...n}=e,r=KF(),i=e.orientation===`horizontal`,[a,o]=(0,q.useState)(`hidden`),s=dM(()=>o(`idle`),100);return(0,q.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,q.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,J.jsx)(fI,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:oI(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:oI(e.onPointerLeave,()=>o(`idle`))}):null}function gI(e){let{forceMount:t,...n}=e,r=KF(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,q.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,J.jsx)(mI,{...n,forceMount:t}):r.type===`scroll`?(0,J.jsx)(hI,{...n,forceMount:t}):r.type===`auto`?(0,J.jsx)(pI,{...n,forceMount:t}):r.type===`always`?(0,J.jsx)(fI,{...n}):null}gI.displayName=`@mantine/core/ScrollAreaScrollbar`;function _I(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function vI(e){let{style:t,ref:n,...r}=e,i=KF(),a=cI(),{onThumbPositionChange:o}=a,s=IM(n,e=>a.onThumbChange(e)),c=(0,q.useRef)(void 0),l=dM(()=>{c.current&&=(c.current(),void 0)},100);return(0,q.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{l(),c.current||(c.current=_I(e,o),o())};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,J.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:oI(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:oI(e.onPointerUp,a.onThumbPointerUp)})}vI.displayName=`@mantine/core/ScrollAreaThumb`;function yI(e){let{forceMount:t,...n}=e,r=cI();return t||r.hasThumb?(0,J.jsx)(vI,{...n}):null}yI.displayName=`@mantine/core/ScrollAreaThumb`;function bI({children:e,style:t,ref:n,onWheel:r,...i}){let a=KF(),o=IM(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,J.jsx)($,{...i,ref:o,onWheel:s,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,J.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}bI.displayName=`@mantine/core/ScrollAreaViewport`;var xI={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function SI(){return typeof window<`u`}function CI(e){return EI(e)?(e.nodeName||``).toLowerCase():`#document`}function wI(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function TI(e){return((EI(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function EI(e){return SI()?e instanceof Node||e instanceof wI(e).Node:!1}function DI(e){return SI()?e instanceof Element||e instanceof wI(e).Element:!1}function OI(e){return SI()?e instanceof HTMLElement||e instanceof wI(e).HTMLElement:!1}function kI(e){return!SI()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof wI(e).ShadowRoot}function AI(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=VI(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function jI(e){return/^(table|td|th)$/.test(CI(e))}function MI(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var NI=/transform|translate|scale|rotate|perspective|filter/,PI=/paint|layout|strict|content/,FI=e=>!!e&&e!==`none`,II;function LI(e){let t=DI(e)?VI(e):e;return FI(t.transform)||FI(t.translate)||FI(t.scale)||FI(t.rotate)||FI(t.perspective)||!zI()&&(FI(t.backdropFilter)||FI(t.filter))||NI.test(t.willChange||``)||PI.test(t.contain||``)}function RI(e){let t=UI(e);for(;OI(t)&&!BI(t);){if(LI(t))return t;if(MI(t))return null;t=UI(t)}return null}function zI(){return II??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),II}function BI(e){return/^(html|body|#document)$/.test(CI(e))}function VI(e){return wI(e).getComputedStyle(e)}function HI(e){return DI(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function UI(e){if(CI(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||kI(e)&&e.host||TI(e);return kI(t)?t.host:t}function WI(e){let t=UI(e);return BI(t)?e.ownerDocument?e.ownerDocument.body:e.body:OI(t)&&AI(t)?t:WI(t)}function GI(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=WI(e),i=r===e.ownerDocument?.body,a=wI(r);if(i){let e=KI(a);return t.concat(a,a.visualViewport||[],AI(r)?r:[],e&&n?GI(e):[])}else return t.concat(r,GI(r,[],n))}function KI(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var qI=[`top`,`right`,`bottom`,`left`],JI=Math.min,YI=Math.max,XI=Math.round,ZI=Math.floor,QI=e=>({x:e,y:e}),$I={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function eL(e,t,n){return YI(e,JI(t,n))}function tL(e,t){return typeof e==`function`?e(t):e}function nL(e){return e.split(`-`)[0]}function rL(e){return e.split(`-`)[1]}function iL(e){return e===`x`?`y`:`x`}function aL(e){return e===`y`?`height`:`width`}function oL(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function sL(e){return iL(oL(e))}function cL(e,t,n){n===void 0&&(n=!1);let r=rL(e),i=sL(e),a=aL(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=_L(o)),[o,_L(o)]}function lL(e){let t=_L(e);return[uL(e),t,uL(t)]}function uL(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var dL=[`left`,`right`],fL=[`right`,`left`],pL=[`top`,`bottom`],mL=[`bottom`,`top`];function hL(e,t,n){switch(e){case`top`:case`bottom`:return n?t?fL:dL:t?dL:fL;case`left`:case`right`:return t?pL:mL;default:return[]}}function gL(e,t,n,r){let i=rL(e),a=hL(nL(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(uL)))),a}function _L(e){let t=nL(e);return $I[t]+e.slice(t.length)}function vL(e){return{top:0,right:0,bottom:0,left:0,...e}}function yL(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:vL(e)}function bL(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function xL(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function SL(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function CL(){return/apple/i.test(navigator.vendor)}function wL(){return xL().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function TL(){return SL().includes(`jsdom/`)}var EL=`data-floating-ui-focusable`,DL=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function OL(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 kL(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&kI(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function AL(e){return`composedPath`in e?e.composedPath()[0]:e.target}function jL(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function ML(e){return e.matches(`html,body`)}function NL(e){return e?.ownerDocument||document}function PL(e){return OI(e)&&e.matches(DL)}function FL(e){if(!e||TL())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function IL(e){return e?e.hasAttribute(EL)?e:e.querySelector(`[`+EL+`]`)||e:null}function LL(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...LL(e,t.id,n)])}function RL(e){return`nativeEvent`in e}function zL(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var BL=typeof document<`u`?q.useLayoutEffect:function(){},VL={...q};function HL(e){let t=q.useRef(e);return BL(()=>{t.current=e}),t}var UL=VL.useInsertionEffect||(e=>e());function WL(e){let t=q.useRef(()=>{});return UL(()=>{t.current=e}),q.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function GL(e,t,n){let{reference:r,floating:i}=e,a=oL(t),o=sL(t),s=aL(o),c=nL(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(rL(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function KL(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=tL(t,e),p=yL(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=bL(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=bL(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var qL=50,JL=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:KL},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=GL(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<qL&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=GL(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},YL=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=tL(e,t)||{};if(l==null)return{};let d=yL(u),f={x:n,y:r},p=sL(i),m=aL(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=JI(d[_],T),D=JI(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=eL(O,A,k),M=!c.arrow&&rL(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),XL=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=tL(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=nL(r),_=oL(o),v=nL(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[_L(o)]:lL(o)),x=p!==`none`;!d&&x&&b.push(...gL(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=cL(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==oL(t))||T.every(e=>oL(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=oL(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ZL(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QL(e){return qI.some(t=>e[t]>=0)}var $L=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=tL(e,t);switch(i){case`referenceHidden`:{let e=ZL(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:QL(e)}}}case`escaped`:{let e=ZL(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:QL(e)}}}default:return{}}}}};function eR(e){let t=JI(...e.map(e=>e.left)),n=JI(...e.map(e=>e.top)),r=YI(...e.map(e=>e.right)),i=YI(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function tR(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>bL(eR(e)))}var nR=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=tL(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=tR(u),f=bL(eR(u)),p=yL(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(oL(n)===`y`){let e=d[0],t=d[d.length-1],r=nL(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=nL(n)===`left`,t=YI(...d.map(e=>e.right)),r=JI(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},rR=new Set([`left`,`top`]);async function iR(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nL(n),s=rL(n),c=oL(n)===`y`,l=rR.has(o)?-1:1,u=a&&c?-1:1,d=tL(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var aR=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await iR(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},oR=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=tL(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=oL(nL(i)),p=iL(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=eL(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=eL(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},sR=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=tL(e,t),u={x:n,y:r},d=oL(i),f=iL(d),p=u[f],m=u[d],h=tL(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=rR.has(nL(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},cR=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=tL(e,t),u=await o.detectOverflow(t,l),d=nL(i),f=rL(i),p=oL(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=JI(h-u[g],v),x=JI(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=YI(u.left,0),t=YI(u.right,0),n=YI(u.top,0),r=YI(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:YI(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:YI(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function lR(e){let t=VI(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=OI(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=XI(n)!==a||XI(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function uR(e){return DI(e)?e:e.contextElement}function dR(e){let t=uR(e);if(!OI(t))return QI(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lR(t),o=(a?XI(n.width):n.width)/r,s=(a?XI(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var fR=QI(0);function pR(e){let t=wI(e);return!zI()||!t.visualViewport?fR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wI(e)?!1:t}function hR(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=uR(e),o=QI(1);t&&(r?DI(r)&&(o=dR(r)):o=dR(e));let s=mR(a,n,r)?pR(a):QI(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=wI(a),t=r&&DI(r)?wI(r):r,n=e,i=KI(n);for(;i&&r&&t!==n;){let e=dR(i),t=i.getBoundingClientRect(),r=VI(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=wI(i),i=KI(n)}}return bL({width:u,height:d,x:c,y:l})}function gR(e,t){let n=HI(e).scrollLeft;return t?t.left+n:hR(TI(e)).left+n}function _R(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-gR(e,n),y:n.top+t.scrollTop}}function vR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=TI(r),s=t?MI(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=QI(1),u=QI(0),d=OI(r);if((d||!d&&!a)&&((CI(r)!==`body`||AI(o))&&(c=HI(r)),d)){let e=hR(r);l=dR(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?_R(o,c):QI(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function yR(e){return Array.from(e.getClientRects())}function bR(e){let t=TI(e),n=HI(e),r=e.ownerDocument.body,i=YI(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=YI(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+gR(e),s=-n.scrollTop;return VI(r).direction===`rtl`&&(o+=YI(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var xR=25;function SR(e,t){let n=wI(e),r=TI(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=zI();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=gR(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=xR&&(a-=o)}else l<=xR&&(a+=l);return{width:a,height:o,x:s,y:c}}function CR(e,t){let n=hR(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=OI(e)?dR(e):QI(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function wR(e,t,n){let r;if(t===`viewport`)r=SR(e,n);else if(t===`document`)r=bR(TI(e));else if(DI(t))r=CR(t,n);else{let n=pR(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return bL(r)}function TR(e,t){let n=UI(e);return n===t||!DI(n)||BI(n)?!1:VI(n).position===`fixed`||TR(n,t)}function ER(e,t){let n=t.get(e);if(n)return n;let r=GI(e,[],!1).filter(e=>DI(e)&&CI(e)!==`body`),i=null,a=VI(e).position===`fixed`,o=a?UI(e):e;for(;DI(o)&&!BI(o);){let t=VI(o),n=LI(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||AI(o)&&!n&&TR(e,o))?r=r.filter(e=>e!==o):i=t,o=UI(o)}return t.set(e,r),r}function DR(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?MI(t)?[]:ER(t,this._c):[].concat(n),r],o=wR(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=wR(t,a[e],i);s=YI(n.top,s),c=JI(n.right,c),l=JI(n.bottom,l),u=YI(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function OR(e){let{width:t,height:n}=lR(e);return{width:t,height:n}}function kR(e,t,n){let r=OI(t),i=TI(t),a=n===`fixed`,o=hR(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=QI(0);function l(){c.x=gR(i)}if(r||!r&&!a)if((CI(t)!==`body`||AI(i))&&(s=HI(t)),r){let e=hR(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?_R(i,s):QI(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function AR(e){return VI(e).position===`static`}function jR(e,t){if(!OI(e)||VI(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return TI(e)===n&&(n=n.ownerDocument.body),n}function MR(e,t){let n=wI(e);if(MI(e))return n;if(!OI(e)){let t=UI(e);for(;t&&!BI(t);){if(DI(t)&&!AR(t))return t;t=UI(t)}return n}let r=jR(e,t);for(;r&&jI(r)&&AR(r);)r=jR(r,t);return r&&BI(r)&&AR(r)&&!LI(r)?n:r||RI(e)||n}var NR=async function(e){let t=this.getOffsetParent||MR,n=this.getDimensions,r=await n(e.floating);return{reference:kR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PR(e){return VI(e).direction===`rtl`}var FR={convertOffsetParentRelativeRectToViewportRelativeRect:vR,getDocumentElement:TI,getClippingRect:DR,getOffsetParent:MR,getElementRects:NR,getClientRects:yR,getDimensions:OR,getScale:dR,isElement:DI,isRTL:PR};function IR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LR(e,t){let n=null,r,i=TI(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=ZI(d),h=ZI(i.clientWidth-(u+f)),g=ZI(i.clientHeight-(d+p)),_=ZI(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:YI(0,JI(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!IR(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function RR(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=uR(e),u=i||a?[...l?GI(l):[],...t?GI(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?LR(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?hR(e):null;c&&g();function g(){let t=hR(e);h&&!IR(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var zR=aR,BR=oR,VR=XL,HR=cR,UR=$L,WR=YL,GR=nR,KR=sR,qR=(e,t,n)=>{let r=new Map,i={platform:FR,...n},a={...i.platform,_c:r};return JL(e,t,{...i,platform:a})},JR=l(pN(),1),YR=typeof document<`u`?q.useLayoutEffect:function(){};function XR(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,i;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(!XR(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!XR(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ZR(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QR(e,t){let n=ZR(e);return Math.round(t*n)/n}function $R(e){let t=q.useRef(e);return YR(()=>{t.current=e}),t}function ez(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=q.useState(r);XR(f,r)||p(r);let[m,h]=q.useState(null),[g,_]=q.useState(null),v=q.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=q.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=q.useRef(null),C=q.useRef(null),w=q.useRef(u),T=c!=null,E=$R(c),D=$R(i),O=$R(l),k=q.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),qR(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!XR(w.current,t)&&(w.current=t,JR.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);YR(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=q.useRef(!1);YR(()=>(A.current=!0,()=>{A.current=!1}),[]),YR(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=q.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=q.useMemo(()=>({reference:b,floating:x}),[b,x]),N=q.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=QR(M.floating,u.x),r=QR(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ZR(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return q.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var tz=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:WR({element:r.current,padding:i}).fn(n):r?WR({element:r,padding:i}).fn(n):{}}}},nz=(e,t)=>{let n=zR(e);return{name:n.name,fn:n.fn,options:[e,t]}},rz=(e,t)=>{let n=BR(e);return{name:n.name,fn:n.fn,options:[e,t]}},iz=(e,t)=>({fn:KR(e).fn,options:[e,t]}),az=(e,t)=>{let n=VR(e);return{name:n.name,fn:n.fn,options:[e,t]}},oz=(e,t)=>{let n=HR(e);return{name:n.name,fn:n.fn,options:[e,t]}},sz=(e,t)=>{let n=UR(e);return{name:n.name,fn:n.fn,options:[e,t]}},cz=(e,t)=>{let n=GR(e);return{name:n.name,fn:n.fn,options:[e,t]}},lz=(e,t)=>{let n=tz(e);return{name:n.name,fn:n.fn,options:[e,t]}};function uz(e){let t=q.useRef(void 0),n=q.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return q.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var dz=`data-floating-ui-focusable`,fz=`active`,pz=`selected`,mz=`ArrowLeft`,hz=`ArrowRight`,gz=`ArrowUp`,_z=`ArrowDown`,vz=[mz,hz],yz=[gz,_z];[...vz,...yz];var bz={...q},xz=!1,Sz=0,Cz=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ Sz++;function wz(){let[e,t]=q.useState(()=>xz?Cz():void 0);return BL(()=>{e??t(Cz())},[]),q.useEffect(()=>{xz=!0},[]),e}var Tz=bz.useId||wz;function Ez(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Dz=q.createContext(null),Oz=q.createContext(null),kz=()=>q.useContext(Dz)?.id||null,Az=()=>q.useContext(Oz);function jz(e){return`data-floating-ui-`+e}function Mz(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Nz=jz(`safe-polygon`);function Pz(e,t,n){if(n&&!zL(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Fz(e){return typeof e==`function`?e():e}function Iz(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Az(),m=kz(),h=HL(l),g=HL(c),_=HL(n),v=HL(d),y=q.useRef(),b=q.useRef(-1),x=q.useRef(),S=q.useRef(-1),C=q.useRef(!0),w=q.useRef(!1),T=q.useRef(()=>{}),E=q.useRef(!1),D=WL(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});q.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Mz(b),Mz(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),q.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=NL(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=q.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Pz(g.current,`close`,y.current);i&&!x.current?(Mz(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Mz(b),r(!1,e,n))},[g,r]),k=WL(()=>{T.current(),x.current=void 0}),A=WL(()=>{if(w.current){let e=NL(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Nz),w.current=!1}}),j=WL(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);q.useEffect(()=>{if(!s)return;function e(e){if(Mz(b),C.current=!1,u&&!zL(y.current)||Fz(v.current)>0&&!Pz(g.current,`open`))return;let t=Pz(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=NL(o.floating);if(Mz(S),E.current=!1,h.current&&i.current.floatingContext){n||Mz(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!kL(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){Mz(b)}function l(e){j()||O(e,!1)}if(DI(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),BL(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(DI(o.domReference)&&e){var t;let n=NL(o.floating).body;n.setAttribute(Nz,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),BL(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),q.useEffect(()=>()=>{k(),Mz(b),Mz(S),A()},[s,o.domReference,k,A]);let M=q.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}u&&!zL(y.current)||n||Fz(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(Mz(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,Fz(v.current))))}}},[u,r,n,_,v]);return q.useMemo(()=>s?{reference:M}:{},[s,M])}var Lz=()=>{},Rz=q.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Lz,setState:Lz,isInstantPhase:!1}),zz=()=>q.useContext(Rz);function Bz(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=q.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=q.useRef(null),s=q.useCallback(e=>{a({currentId:e})},[]);return BL(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,J.jsx)(Rz.Provider,{value:q.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function Vz(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=zz(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return BL(()=>{o&&l&&(f({delay:{open:1,close:Pz(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),BL(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),BL(()=>{o&&(u===Lz||!n||u(s))},[o,n,u,s]),c}var Hz={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Uz={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Wz=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Gz(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Az(),g=WL(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=q.useRef(!1),{escapeKey:y,outsidePress:b}=Wz(p),{escapeKey:x,outsidePress:S}=Wz(m),C=q.useRef(!1),w=WL(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?LL(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,RL(e)?e.nativeEvent:e,`escape-key`)}),T=WL(e=>{var t;let n=()=>{var t;w(e),(t=AL(e))==null||t.removeEventListener(`keydown`,n)};(t=AL(e))==null||t.addEventListener(`keydown`,n)}),E=WL(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=AL(e),s=`[`+jz(`inert`)+`]`,c=NL(i.floating).querySelectorAll(s),u=DI(o)?o:null;for(;u&&!BI(u);){let e=UI(u);if(BI(e)||!DI(e))break;u=e}if(c.length&&DI(o)&&!ML(o)&&!kL(o,i.floating)&&Array.from(c).every(e=>!kL(u,e)))return;if(OI(o)&&k){let t=BI(o),n=VI(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&LL(h.nodesRef.current,d).some(t=>jL(e,t.context?.elements.floating));if(jL(e,i.floating)||jL(e,i.domReference)||f)return;let p=h?LL(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=WL(e=>{var t;let n=()=>{var t;E(e),(t=AL(e))==null||t.removeEventListener(l,n)};(t=AL(e))==null||t.addEventListener(l,n)});q.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},zI()?5:0)}let d=NL(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(DI(i.domReference)&&(p=GI(i.domReference)),DI(i.floating)&&(p=p.concat(GI(i.floating))),!DI(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(GI(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),q.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=q.useMemo(()=>({onKeyDown:w,...u&&{[Hz[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=q.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[Uz[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return q.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function Kz(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Tz(),a=q.useRef({}),[o]=q.useState(()=>Ez()),s=kz()!=null,[c,l]=q.useState(r.reference),u=WL((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=q.useMemo(()=>({setPositionReference:l}),[]),f=q.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return q.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function qz(e){e===void 0&&(e={});let{nodeId:t}=e,n=Kz({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=q.useState(null),[s,c]=q.useState(null),l=i?.domReference||a,u=q.useRef(null),d=Az();BL(()=>{l&&(u.current=l)},[l]);let f=ez({...e,elements:{...i,...s&&{reference:s}}}),p=q.useCallback(e=>{let t=DI(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=q.useCallback(e=>{(DI(e)||e===null)&&(u.current=e,o(e)),(DI(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!DI(e))&&f.refs.setReference(e)},[f.refs]),h=q.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=q.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=q.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return BL(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),q.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}function Jz(){return wL()&&CL()}function Yz(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=q.useRef(!1),u=q.useRef(-1),d=q.useRef(!0);q.useEffect(()=>{if(!s)return;let e=wI(o.domReference);function t(){!n&&OI(o.domReference)&&o.domReference===OL(NL(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Jz()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Jz()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),q.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),q.useEffect(()=>()=>{Mz(u)},[]);let f=q.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=AL(e.nativeEvent);if(c&&DI(t)){if(Jz()&&!e.relatedTarget){if(!d.current&&!PL(t))return}else if(!FL(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=DI(t)&&t.hasAttribute(jz(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=OL(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||kL(a.current.floatingContext?.refs.floating.current,e)||kL(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return q.useMemo(()=>s?{reference:f}:{},[s,f])}function Xz(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[fz]:t,[pz]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[dz]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[fz,pz].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function Zz(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=q.useCallback(t=>Xz(t,e,`reference`),t),a=q.useCallback(t=>Xz(t,e,`floating`),n),o=q.useCallback(t=>Xz(t,e,`item`),r);return q.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Qz=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function $z(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=Tz(),c=r.domReference?.id||s,l=q.useMemo(()=>IL(r.floating)?.id||i,[r.floating,i]),u=Qz.get(o)??o,d=kz()!=null,f=q.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=q.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=q.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return q.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var eB={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},tB=TN((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":X(t),"--scrollarea-over-scroll-behavior":i}}}),nB=Q(e=>{let t=Z(`ScrollArea`,eB,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,attributes:C,...w}=t,[T,E]=(0,q.useState)(!1),[D,O]=(0,q.useState)(!1),[k,A]=(0,q.useState)(!1),j=(0,q.useRef)(!0),M=(0,q.useRef)(!1),N=(0,q.useRef)(!0),P=(0,q.useRef)(!1),F=rF({name:`ScrollArea`,props:t,classes:xI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:C,vars:c,varsResolver:tB}),ee=(0,q.useRef)(null),I=uz([f,ee]);return _M(()=>{S&&ee.current&&ee.current.scrollTo({left:S.x??0,top:S.y??0})},[]),qF(h===`present`?ee.current:null,()=>{let e=ee.current;e&&(O(e.scrollHeight>e.clientHeight),A(e.scrollWidth>e.clientWidth))}),(0,J.jsxs)(ZF,{getStyles:F,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...F(`root`),...w,children:[(0,J.jsx)(bI,{...d,...F(`viewport`,{style:d?.style}),ref:I,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-horizontal-hidden":h===`present`&&!k?`true`:void 0,"data-vertical-hidden":h===`present`&&!D?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!M.current&&_?.(),c&&!j.current&&v?.(),M.current=s,j.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!P.current&&b?.(),u&&!N.current&&y?.(),P.current=l,N.current=u},children:m}),(g===`xy`||g===`x`)&&(0,J.jsx)(gI,{...F(`scrollbar`),orientation:`horizontal`,"data-hidden":l===`never`||h===`present`&&!k?!0:void 0,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),children:(0,J.jsx)(yI,{...F(`thumb`)})}),(g===`xy`||g===`y`)&&(0,J.jsx)(gI,{...F(`scrollbar`),orientation:`vertical`,"data-hidden":l===`never`||h===`present`&&!D?!0:void 0,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),children:(0,J.jsx)(yI,{...F(`thumb`)})}),(0,J.jsx)(YF,{...F(`corner`),"data-hovered":T||void 0,"data-hidden":l===`never`||void 0})]})});nB.displayName=`@mantine/core/ScrollArea`;var rB=Q(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,onOverflowChange:x,...S}=Z(`ScrollAreaAutosize`,eB,e),C=(0,q.useRef)(null),w=uz([u,C]),T=(0,q.useRef)(!1),E=(0,q.useRef)(!1),D=(0,q.useEffectEvent)(()=>{let e=C.current;if(!e||!x)return;let t=e.scrollHeight>e.clientHeight;t!==T.current&&(E.current?x(t):(E.current=!0,t&&x(!0)),T.current=t)});return qF(x?C.current:null,D),(0,J.jsx)($,{...S,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,J.jsx)($,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,J.jsx)(nB,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:w,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,"data-autosize":`true`,children:t})})})});nB.classes=xI,nB.varsResolver=tB,rB.displayName=`@mantine/core/ScrollAreaAutosize`,rB.classes=xI,nB.Autosize=rB;var iB={root:`m_87cf2631`},aB={__staticSelector:`UnstyledButton`},oB=IF(e=>{let t=Z(`UnstyledButton`,aB,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,J.jsx)($,{...rF({name:i,props:t,classes:iB,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});oB.classes=iB,oB.displayName=`@mantine/core/UnstyledButton`;var sB={root:`m_515a97f8`},cB=Q(e=>{let t=Z(`VisuallyHidden`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t;return(0,J.jsx)($,{component:`span`,...rF({name:`VisuallyHidden`,classes:sB,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c})(`root`),...l})});cB.classes=sB,cB.displayName=`@mantine/core/VisuallyHidden`;var lB={root:`m_1b7284a3`},uB=TN((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:Qj(t),"--paper-shadow":tM(n)}})),dB=IF(e=>{let t=Z(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=rF({name:`Paper`,props:t,classes:lB,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:uB});return(0,J.jsx)($,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});dB.classes=lB,dB.varsResolver=uB,dB.displayName=`@mantine/core/Paper`;function fB(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function pB(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var mB={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function hB({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[mB[c]]:r},d=-t/2;return c===`left`?{...u,...fB(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...fB(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...pB(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...pB(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function gB({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=WF();return a?(0,J.jsx)(`div`,{...l,style:{...c,...hB({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}gB.displayName=`@mantine/core/FloatingArrow`;function _B(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function vB({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,q.useRef)(-1),a=(0,q.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,q.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var yB={root:`m_9814e45f`},bB={zIndex:qj(`modal`)},xB=TN((e,{gradient:t,color:n,backgroundOpacity:r,blur:i,radius:a,zIndex:o})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&JN(n||`#000`,r??.6)||void 0,"--overlay-filter":i?`blur(${X(i)})`:void 0,"--overlay-radius":a===void 0?void 0:Qj(a),"--overlay-z-index":o?.toString()}})),SB=IF(e=>{let t=Z(`Overlay`,bB,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fixed:c,center:l,children:u,radius:d,zIndex:f,gradient:p,blur:m,color:h,backgroundOpacity:g,mod:_,attributes:v,...y}=t;return(0,J.jsx)($,{...rF({name:`Overlay`,props:t,classes:yB,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:xB})(`root`),mod:[{center:l,fixed:c},_],...y,children:u})});SB.classes=yB,SB.varsResolver=xB,SB.displayName=`@mantine/core/Overlay`;function CB(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function wB({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||CB(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=CB(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return CB(n)}var TB={reuseTargetNode:!0},EB=Q(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=Z(`Portal`,TB,e),[o,s]=(0,q.useState)(!1),c=(0,q.useRef)(null);return _M(()=>(s(!0),c.current=wB({target:n,reuseTargetNode:r,...a}),PM(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,JR.createPortal)((0,J.jsx)(J.Fragment,{children:t}),c.current)});EB.displayName=`@mantine/core/Portal`;var DB=Q(({withinPortal:e=!0,children:t,...n})=>lP()===`test`||!e?(0,J.jsx)(J.Fragment,{children:t}):(0,J.jsx)(EB,{...n,children:t}));DB.displayName=`@mantine/core/OptionalPortal`;var OB=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),kB={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...OB(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...OB(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...OB(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...OB(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...OB(`top`),common:{transformOrigin:`top right`}}},AB={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function jB({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in kB?{transitionProperty:kB[e].transitionProperty,...i,...kB[e].common,...kB[e][AB[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[AB[t]]}}function MB({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=EP(),d=BM(),f=u.respectReducedMotion?d:!1,[p,m]=(0,q.useState)(f?0:e),[h,g]=(0,q.useState)(r?`entered`:`exited`),_=(0,q.useRef)(-1),v=(0,q.useRef)(-1),y=(0,q.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{JR.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return vM(()=>{S(r)},[r]),(0,q.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function NB({keepMounted:e,transition:t=`fade`,duration:n=250,exitDuration:r=n,mounted:i,children:a,timingFunction:o=`ease`,onExit:s,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f}){let p=lP(),{transitionDuration:m,transitionStatus:h,transitionTimingFunction:g}=MB({mounted:i,exitDuration:r,duration:n,timingFunction:o,onExit:s,onEntered:c,onEnter:l,onExited:u,enterDelay:d,exitDelay:f});if(p===`test`)return i?(0,J.jsx)(J.Fragment,{children:a({})}):e?a({display:`none`}):null;if(m===0)return e?(0,J.jsx)(q.Activity,{mode:i?`visible`:`hidden`,children:a({})}):i?(0,J.jsx)(J.Fragment,{children:a({})}):null;let _=h===`exited`;return e?(0,J.jsx)(q.Activity,{mode:_?`hidden`:`visible`,children:a(_?{}:jB({transition:t,duration:m,state:h,timingFunction:g}))}):_?null:(0,J.jsx)(J.Fragment,{children:a(jB({transition:t,duration:m,state:h,timingFunction:g}))})}NB.displayName=`@mantine/core/Transition`;var PB={duration:100,transition:`fade`};function FB(e,t){return{...PB,...t,...e}}var[IB,LB]=Bj(`Popover component was not found in the tree`);function RB({children:e,active:t=!0,refProp:n=`ref`,innerRef:r}){let i=IM(kM(t),r),a=wN(e);return a?(0,q.cloneElement)(a,{[n]:i}):e}function zB(e){return(0,J.jsx)(cB,{tabIndex:-1,"data-autofocus":!0,...e})}RB.displayName=`@mantine/core/FocusTrap`,zB.displayName=`@mantine/core/FocusTrapInitialFocus`,RB.InitialFocus=zB;var BB={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},VB=Q(e=>{let t=Z(`PopoverDropdown`,null,e),{className:n,style:r,vars:i,children:a,onKeyDownCapture:o,variant:s,classNames:c,styles:l,ref:u,...d}=t,f=LB(),p=yM({opened:f.opened,shouldReturnFocus:f.returnFocus}),m=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:`dialog`,tabIndex:-1}:{},h=IM(u,f.floating);return f.disabled?null:(0,J.jsx)(DB,{...f.portalProps,withinPortal:f.withinPortal,children:(0,J.jsx)(NB,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||`fade`,duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:typeof f.transitionProps?.exitDuration==`number`?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,J.jsx)(RB,{active:f.trapFocus&&f.opened,innerRef:h,children:(0,J.jsxs)($,{...m,...d,variant:s,onKeyDownCapture:Yj(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:p,onKeyDown:o}),"data-position":f.placement,"data-fixed":f.floatingStrategy===`fixed`||void 0,...f.getStyles(`dropdown`,{className:n,props:t,classNames:c,styles:l,style:[{...e,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width===`target`?void 0:X(f.width),...f.referenceHidden?{display:`none`}:null},f.resolvedStyles.dropdown,l?.dropdown,r]}),children:[a,(0,J.jsx)(gB,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles(`arrow`,{props:t,classNames:c,styles:l})})]})})})})});VB.classes=BB,VB.displayName=`@mantine/core/PopoverDropdown`;var HB={refProp:`ref`,popupType:`dialog`},UB=Q(e=>{let{children:t,refProp:n,popupType:r,ref:i,...a}=Z(`PopoverTarget`,HB,e),o=wN(t);if(!o)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let s=a,c=LB(),l=IM(c.reference,yN(o),i),u=c.withRoles?{"aria-haspopup":r,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return(0,q.cloneElement)(o,{...s,...u,...c.targetProps,className:DN(c.targetProps.className,s.className,d.className),[n]:l,...c.controlled?null:{onClick:e=>{c.onToggle(),d.onClick?.(e)}}})});UB.displayName=`@mantine/core/PopoverTarget`;function WB(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function GB(e,t,n){let r=WB(e.middlewares),i=[nz(e.offset),sz()];return e.dropdownVisible&&n!==`test`&&e.preventPositionChangeWhenVisible&&(r.flip=!1),r.flip&&i.push(typeof r.flip==`boolean`?az():az(r.flip)),r.shift&&i.push(rz(typeof r.shift==`boolean`?{limiter:iz(),padding:5}:{limiter:iz(),padding:5,...r.shift})),r.inline&&i.push(typeof r.inline==`boolean`?cz():cz(r.inline)),i.push(lz({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width===`target`)&&i.push(oz({...typeof r.size==`boolean`?{}:r.size,apply({rects:n,availableWidth:i,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};r.size&&(typeof r.size==`object`&&r.size.apply?r.size.apply({rects:n,availableWidth:i,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${i}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),i}function KB(e){let t=lP(),[n,r]=zM({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),i=(0,q.useRef)(n),a=()=>{n&&!e.disabled&&r(!1)},o=()=>{e.disabled||r(!n)},s=qz({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:GB(e,()=>s,t),whileElementsMounted:e.keepMounted?void 0:RR});return(0,q.useEffect)(()=>{if(!(!s.refs.reference.current||!s.refs.floating.current)&&n)return RR(s.refs.reference.current,s.refs.floating.current,s.update)},[n,s.update]),vM(()=>{e.onPositionChange?.(s.placement),e.positionRef.current=s.placement},[s.placement,e.preventPositionChangeWhenVisible]),vM(()=>{n!==i.current&&(n?e.onOpen?.():e.onClose?.()),i.current=n},[n,e.onClose,e.onOpen]),_M(()=>{let t=-1;return n&&(t=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(t)}},[n,e.position]),{floating:s,controlled:typeof e.opened==`boolean`,opened:n,onClose:a,onToggle:o}}var qB={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:[`mousedown`,`touchstart`],zIndex:qj(`popover`),__staticSelector:`Popover`,width:`max-content`},JB=TN((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:Qj(t),"--popover-shadow":tM(n)}}));function YB(e){let t=Z(`Popover`,qB,e),{children:n,position:r,offset:i,onPositionChange:a,opened:o,transitionProps:s,onExitTransitionEnd:c,onEnterTransitionEnd:l,width:u,middlewares:d,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,unstyled:_,classNames:v,styles:y,closeOnClickOutside:b,withinPortal:x,portalProps:S,closeOnEscape:C,clickOutsideEvents:w,trapFocus:T,onClose:E,onDismiss:D,onOpen:O,onChange:k,zIndex:A,radius:j,shadow:M,id:N,defaultOpened:P,__staticSelector:F,withRoles:ee,disabled:I,returnFocus:te,variant:ne,keepMounted:L,vars:re,floatingStrategy:ie,withOverlay:ae,overlayProps:oe,hideDetached:se,attributes:ce,preventPositionChangeWhenVisible:le,...ue}=t,R=rF({name:F,props:t,classes:BB,classNames:v,styles:y,unstyled:_,attributes:ce,rootSelector:`dropdown`,vars:re,varsResolver:JB}),{resolvedStyles:de}=UP({classNames:v,styles:y,props:t}),[z,fe]=(0,q.useState)(o??P??!1),pe=(0,q.useRef)(r),me=(0,q.useRef)(null),[he,ge]=(0,q.useState)(null),[_e,ve]=(0,q.useState)(null),{dir:ye}=WF(),be=lP(),B=MM(N),xe=KB({middlewares:d,width:u,position:_B(ye,r),offset:typeof i==`number`?i+(f?p/2:0):i,arrowRef:me,arrowOffset:m,onPositionChange:a,opened:o,defaultOpened:P,onChange:k,onOpen:O,onClose:E,onDismiss:D,strategy:ie,dropdownVisible:z,setDropdownVisible:fe,positionRef:pe,disabled:I,preventPositionChangeWhenVisible:le,keepMounted:L});pM(()=>{b&&(xe.onClose(),D?.())},w,[he,_e]);let V=(0,q.useCallback)(e=>{ge(e),xe.floating.refs.setReference(e)},[xe.floating.refs.setReference]),H=(0,q.useCallback)(e=>{ve(e),xe.floating.refs.setFloating(e)},[xe.floating.refs.setFloating]),Se=(0,q.useCallback)(()=>{s?.onExited?.(),c?.(),fe(!1),le||(pe.current=r)},[s?.onExited,c,le,r]),Ce=(0,q.useCallback)(()=>{s?.onEntered?.(),l?.()},[s?.onEntered,l]);return(0,J.jsxs)(IB,{value:{returnFocus:te,disabled:I,controlled:xe.controlled,reference:V,floating:H,x:xe.floating.x,y:xe.floating.y,arrowX:xe.floating?.middlewareData?.arrow?.x,arrowY:xe.floating?.middlewareData?.arrow?.y,opened:xe.opened,arrowRef:me,transitionProps:{...s,onExited:Se,onEntered:Ce},width:u,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,placement:xe.floating.placement,trapFocus:T,withinPortal:x,portalProps:S,zIndex:A,radius:j,shadow:M,closeOnEscape:C,onDismiss:D,onClose:xe.onClose,onToggle:xe.onToggle,getTargetId:()=>B,getDropdownId:()=>`${B}-dropdown`,withRoles:ee,targetProps:ue,__staticSelector:F,classNames:v,styles:y,unstyled:_,variant:ne,keepMounted:L,getStyles:R,resolvedStyles:de,floatingStrategy:ie,referenceHidden:se&&be!==`test`?xe.floating.middlewareData.hide?.referenceHidden:!1},children:[n,ae&&(0,J.jsx)(NB,{transition:`fade`,mounted:xe.opened,duration:s?.duration||250,exitDuration:s?.exitDuration||250,children:e=>(0,J.jsx)(DB,{withinPortal:x,children:(0,J.jsx)(SB,{...oe,...R(`overlay`,{className:oe?.className,style:[e,oe?.style]})})})})]})}YB.Target=UB,YB.Dropdown=VB,YB.varsResolver=JB,YB.displayName=`@mantine/core/Popover`,YB.extend=e=>e;var XB={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},ZB=({className:e,...t})=>(0,J.jsxs)($,{component:`span`,className:DN(XB.barsLoader,e),...t,children:[(0,J.jsx)(`span`,{className:XB.bar}),(0,J.jsx)(`span`,{className:XB.bar}),(0,J.jsx)(`span`,{className:XB.bar})]});ZB.displayName=`@mantine/core/Bars`;var QB=({className:e,...t})=>(0,J.jsxs)($,{component:`span`,className:DN(XB.dotsLoader,e),...t,children:[(0,J.jsx)(`span`,{className:XB.dot}),(0,J.jsx)(`span`,{className:XB.dot}),(0,J.jsx)(`span`,{className:XB.dot})]});QB.displayName=`@mantine/core/Dots`;var $B=({className:e,...t})=>(0,J.jsx)($,{component:`span`,className:DN(XB.ovalLoader,e),...t});$B.displayName=`@mantine/core/Oval`;var eV={bars:ZB,oval:$B,dots:QB},tV={loaders:eV,type:`oval`},nV=TN((e,{size:t,color:n})=>({root:{"--loader-size":Xj(t,`loader-size`),"--loader-color":n?GN(n,e):void 0}})),rV=Q(e=>{let t=Z(`Loader`,tV,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=rF({name:`Loader`,props:t,classes:XB,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:nV});return p?(0,J.jsx)($,{...g(`root`),...h,children:p}):(0,J.jsx)($,{...g(`root`),component:d[i],variant:f,size:n,...h})});rV.defaultLoaders=eV,rV.classes=XB,rV.varsResolver=nV,rV.displayName=`@mantine/core/Loader`;var iV={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},aV={orientation:`horizontal`},oV=TN((e,{borderWidth:t})=>({group:{"--ai-border-width":X(t)}})),sV=Q(e=>{let t=Z(`ActionIconGroup`,aV,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=Z(`ActionIconGroup`,aV,e);return(0,J.jsx)($,{...rF({name:`ActionIconGroup`,props:t,classes:iV,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:oV,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});sV.classes=iV,sV.varsResolver=oV,sV.displayName=`@mantine/core/ActionIconGroup`;var cV=TN((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":Xj(o,`section-height`),"--section-padding-x":Xj(o,`section-padding-x`),"--section-fz":$j(o),"--section-radius":t===void 0?void 0:Qj(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),lV=Q(e=>{let t=Z(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,J.jsx)($,{...rF({name:`ActionIconGroupSection`,props:t,classes:iV,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:cV,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});lV.classes=iV,lV.varsResolver=cV,lV.displayName=`@mantine/core/ActionIconGroupSection`;var uV=TN((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":Xj(t,`ai-size`),"--ai-radius":n===void 0?void 0:Qj(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),dV=IF(e=>{let t=Z(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=rF({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:iV,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:uV});return(0,J.jsxs)(oB,{...C(`root`,{active:!_&&!c&&!v}),...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,J.jsx)(NB,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,J.jsx)($,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,J.jsx)(rV,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,J.jsx)($,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});dV.classes=iV,dV.varsResolver=uV,dV.displayName=`@mantine/core/ActionIcon`,dV.Group=sV,dV.GroupSection=lV;function fV({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,J.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,J.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`})})}fV.displayName=`@mantine/core/CloseIcon`;var pV={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},mV={variant:`subtle`},hV=TN((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":Xj(t,`cb-size`),"--cb-radius":n===void 0?void 0:Qj(n),"--cb-icon-size":X(r)}})),gV=IF(e=>{let t=Z(`CloseButton`,mV,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=rF({name:_||`CloseButton`,props:t,className:o,style:c,classes:pV,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:hV});return(0,J.jsxs)(oB,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,J.jsx)(fV,{}),r]})});gV.classes=pV,gV.varsResolver=hV,gV.displayName=`@mantine/core/CloseButton`;function _V(e){return q.Children.toArray(e).filter(Boolean)}var vV={root:`m_4081bf90`},yV={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},bV=TN((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":Zj(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),xV=Q(e=>{let t=Z(`Group`,yV,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=_V(s),x=b.length,S=Zj(c??`md`);return(0,J.jsx)($,{...rF({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:vV,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:bV})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});xV.classes=vV,xV.varsResolver=bV,xV.displayName=`@mantine/core/Group`;var[SV,CV]=Bj(`ModalBase component was not found in tree`);function wV({opened:e,transitionDuration:t}){let[n,r]=(0,q.useState)(e),i=(0,q.useRef)(-1),a=BM()?0:t;return(0,q.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function TV({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o}){let s=MM(e),[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(!1),f=wV({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return NM(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&a()},{capture:!0}),yM({opened:n,shouldReturnFocus:r&&o}),{_id:s,titleMounted:c,bodyMounted:u,shouldLockScroll:f,setTitleMounted:l,setBodyMounted:d}}var EV=function(){return EV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},EV.apply(this,arguments)};function DV(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function OV(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var kV=`right-scroll-bar-position`,AV=`width-before-scroll-bar`,jV=`with-scroll-bars-hidden`,MV=`--removed-body-scroll-bar-size`;function NV(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function PV(e,t){var n=(0,q.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var FV=typeof window<`u`?q.useLayoutEffect:q.useEffect,IV=new WeakMap;function LV(e,t){var n=PV(t||null,function(t){return e.forEach(function(e){return NV(e,t)})});return FV(function(){var t=IV.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||NV(e,null)}),i.forEach(function(e){r.has(e)||NV(e,a)})}IV.set(n,e)},[e]),n}function RV(e){return e}function zV(e,t){t===void 0&&(t=RV);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function BV(e){e===void 0&&(e={});var t=zV(null);return t.options=EV({async:!0,ssr:!1},e),t}var VV=function(e){var t=e.sideCar,n=DV(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return q.createElement(r,EV({},n))};VV.isSideCarExport=!0;function HV(e,t){return e.useMedium(t),VV}var UV=BV(),WV=function(){},GV=q.forwardRef(function(e,t){var n=q.useRef(null),r=q.useState({onScrollCapture:WV,onWheelCapture:WV,onTouchMoveCapture:WV}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=DV(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=LV([n,t]),C=EV(EV({},b),i);return q.createElement(q.Fragment,null,u&&q.createElement(x,{sideCar:UV,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?q.cloneElement(q.Children.only(s),EV(EV({},C),{ref:S})):q.createElement(v,EV({},C,{className:c,ref:S}),s))});GV.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},GV.classNames={fullWidth:AV,zeroRight:kV};var KV,qV=function(){if(KV)return KV;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function JV(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=qV();return t&&e.setAttribute(`nonce`,t),e}function YV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function XV(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ZV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=JV())&&(YV(t,n),XV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QV=function(){var e=ZV();return function(t,n){q.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$V=function(){var e=QV();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},eH={left:0,top:0,right:0,gap:0},tH=function(e){return parseInt(e||``,10)||0},nH=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[tH(n),tH(r),tH(i)]},rH=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return eH;var t=nH(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iH=$V(),aH=`data-scroll-locked`,oH=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
21
+ .${jV} {
22
+ overflow: hidden ${r};
23
+ padding-right: ${s}px ${r};
24
+ }
25
+ body[${aH}] {
26
+ overflow: hidden ${r};
27
+ overscroll-behavior: contain;
28
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
29
+ padding-left: ${i}px;
30
+ padding-top: ${a}px;
31
+ padding-right: ${o}px;
32
+ margin-left:0;
33
+ margin-top:0;
34
+ margin-right: ${s}px ${r};
35
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
36
+ }
37
+
38
+ .${kV} {
39
+ right: ${s}px ${r};
40
+ }
41
+
42
+ .${AV} {
43
+ margin-right: ${s}px ${r};
44
+ }
45
+
46
+ .${kV} .${kV} {
47
+ right: 0 ${r};
48
+ }
49
+
50
+ .${AV} .${AV} {
51
+ margin-right: 0 ${r};
52
+ }
53
+
54
+ body[${aH}] {
55
+ ${MV}: ${s}px;
56
+ }
57
+ `},sH=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},cH=function(){q.useEffect(function(){return document.body.setAttribute(aH,(sH()+1).toString()),function(){var e=sH()-1;e<=0?document.body.removeAttribute(aH):document.body.setAttribute(aH,e.toString())}},[])},lH=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;cH();var a=q.useMemo(function(){return rH(i)},[i]);return q.createElement(iH,{styles:oH(a,!t,i,n?``:`!important`)})},uH=!1;if(typeof window<`u`)try{var dH=Object.defineProperty({},`passive`,{get:function(){return uH=!0,!0}});window.addEventListener(`test`,dH,dH),window.removeEventListener(`test`,dH,dH)}catch{uH=!1}var fH=uH?{passive:!1}:!1,pH=function(e){return e.tagName===`TEXTAREA`},mH=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!pH(e)&&n[t]===`visible`)},hH=function(e){return mH(e,`overflowY`)},gH=function(e){return mH(e,`overflowX`)},_H=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),bH(e,r)){var i=xH(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vH=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},yH=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},bH=function(e,t){return e===`v`?hH(t):gH(t)},xH=function(e,t){return e===`v`?vH(t):yH(t)},SH=function(e,t){return e===`h`&&t===`rtl`?-1:1},CH=function(e,t,n,r,i){var a=SH(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=xH(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&bH(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},wH=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},TH=function(e){return[e.deltaX,e.deltaY]},EH=function(e){return e&&`current`in e?e.current:e},DH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OH=function(e){return`
58
+ .block-interactivity-${e} {pointer-events: none;}
59
+ .allow-interactivity-${e} {pointer-events: all;}
60
+ `},kH=0,AH=[];function jH(e){var t=q.useRef([]),n=q.useRef([0,0]),r=q.useRef(),i=q.useState(kH++)[0],a=q.useState($V)[0],o=q.useRef(e);q.useEffect(function(){o.current=e},[e]),q.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=OV([e.lockRef.current],(e.shards||[]).map(EH),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=q.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=wH(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=_H(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=_H(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return CH(h,t,e,h===`h`?s:c,!0)},[]),c=q.useCallback(function(e){var n=e;if(!(!AH.length||AH[AH.length-1]!==a)){var r=`deltaY`in n?TH(n):wH(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&DH(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(EH).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=q.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:MH(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=q.useCallback(function(e){n.current=wH(e),r.current=void 0},[]),d=q.useCallback(function(t){l(t.type,TH(t),t.target,s(t,e.lockRef.current))},[]),f=q.useCallback(function(t){l(t.type,wH(t),t.target,s(t,e.lockRef.current))},[]);q.useEffect(function(){return AH.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,fH),document.addEventListener(`touchmove`,c,fH),document.addEventListener(`touchstart`,u,fH),function(){AH=AH.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,fH),document.removeEventListener(`touchmove`,c,fH),document.removeEventListener(`touchstart`,u,fH)}},[]);var p=e.removeScrollBar,m=e.inert;return q.createElement(q.Fragment,null,m?q.createElement(a,{styles:OH(i)}):null,p?q.createElement(lH,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function MH(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var NH=HV(UV,jH),PH=q.forwardRef(function(e,t){return q.createElement(GV,EV({},e,{ref:t,sideCar:NH}))});PH.classNames=GV.classNames;function FH({keepMounted:e,opened:t,onClose:n,id:r,transitionProps:i,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:s,closeOnEscape:c,returnFocus:l,closeOnClickOutside:u,withinPortal:d,portalProps:f,lockScroll:p,children:m,zIndex:h,shadow:g,padding:_,__vars:v,unstyled:y,removeScrollProps:b,...x}){let{_id:S,titleMounted:C,bodyMounted:w,shouldLockScroll:T,setTitleMounted:E,setBodyMounted:D}=TV({id:r,transitionProps:i,opened:t,trapFocus:s,closeOnEscape:c,onClose:n,returnFocus:l}),{key:O,...k}=b||{};return(0,J.jsx)(DB,{...f,withinPortal:d,children:(0,J.jsx)(SV,{value:{opened:t,onClose:n,closeOnClickOutside:u,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...i,keepMounted:e},getTitleId:()=>`${S}-title`,getBodyId:()=>`${S}-body`,titleMounted:C,bodyMounted:w,setTitleMounted:E,setBodyMounted:D,trapFocus:s,closeOnEscape:c,zIndex:h,unstyled:y},children:(0,J.jsx)(PH,{enabled:T&&p,...k,children:(0,J.jsx)($,{...x,id:S,__vars:{...v,"--mb-z-index":(h||qj(`modal`)).toString(),"--mb-shadow":tM(g),"--mb-padding":Zj(_)},children:m})},O)})})}FH.displayName=`@mantine/core/ModalBase`;function IH(){let e=CV();return(0,q.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var LH={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function RH({className:e,...t}){let n=IH(),r=CV();return(0,J.jsx)($,{id:n,className:DN({[LH.body]:!r.unstyled},e),...t})}RH.displayName=`@mantine/core/ModalBaseBody`;function zH({className:e,onClick:t,...n}){let r=CV();return(0,J.jsx)(gV,{...n,onClick:e=>{r.onClose(),t?.(e)},className:DN({[LH.close]:!r.unstyled},e),unstyled:r.unstyled})}zH.displayName=`@mantine/core/ModalBaseCloseButton`;function BH({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=CV();return(0,J.jsx)(NB,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,J.jsx)(`div`,{...n,className:DN({[LH.inner]:!s.unstyled},n.className),children:(0,J.jsx)(RB,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,J.jsx)(dB,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:DN({[LH.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}BH.displayName=`@mantine/core/ModalBaseContent`;function VH({className:e,...t}){let n=CV();return(0,J.jsx)($,{component:`header`,className:DN({[LH.header]:!n.unstyled},e),...t})}VH.displayName=`@mantine/core/ModalBaseHeader`;var HH={duration:200,timingFunction:`ease`,transition:`fade`};function UH(e){let t=CV();return{...HH,...t.transitionProps,...e}}function WH({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=CV(),o=UH(t);return(0,J.jsx)(NB,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,J.jsx)(SB,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}WH.displayName=`@mantine/core/ModalBaseOverlay`;function GH(){let e=CV();return(0,q.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function KH({className:e,...t}){let n=GH(),r=CV();return(0,J.jsx)($,{component:`h2`,className:DN({[LH.title]:!r.unstyled},e),id:n,...t})}KH.displayName=`@mantine/core/ModalBaseTitle`;function qH({children:e}){return(0,J.jsx)(J.Fragment,{children:e})}var JH=(0,q.createContext)({size:`sm`}),YH=Q(e=>{let t=Z(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,q.use)(JH),{resolvedClassNames:l,resolvedStyles:u}=UP({classNames:a,styles:o,props:t});return(0,J.jsx)(gV,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});YH.displayName=`@mantine/core/InputClearButton`;var XH={xs:7,sm:8,md:10,lg:12,xl:15};function ZH({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,J.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:XH[i]},children:[o,n||r]}):n===null?null:n||o||r}var QH=(0,q.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),$H={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,description:`m_fe47ce59`},eU=TN((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${$j(t)} - ${X(2)})`}})),tU=Q(e=>{let t=Z(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=Z(`InputDescription`,null,t),f=(0,q.use)(QH),p=rF({name:[`InputWrapper`,c],props:t,classes:$H,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:eU});return(0,J.jsx)($,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});tU.classes=$H,tU.varsResolver=eU,tU.displayName=`@mantine/core/InputDescription`;var nU=TN((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${$j(t)} - ${X(2)})`}})),rU=Q(e=>{let t=Z(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=rF({name:[`InputWrapper`,l],props:t,classes:$H,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:nU}),p=(0,q.use)(QH);return(0,J.jsx)($,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});rU.classes=$H,rU.varsResolver=nU,rU.displayName=`@mantine/core/InputError`;var iU={labelElement:`label`},aU=TN((e,{size:t})=>({label:{"--input-label-size":$j(t),"--input-asterisk-color":void 0}})),oU=Q(e=>{let t=Z(`InputLabel`,iU,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=rF({name:[`InputWrapper`,p],props:t,classes:$H,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:aU}),v=(0,q.use)(QH),y=v?.getStyles||_;return(0,J.jsxs)($,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:c===`label`?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,J.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});oU.classes=$H,oU.varsResolver=aU,oU.displayName=`@mantine/core/InputLabel`;var sU=Q(e=>{let t=Z(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,J.jsx)($,{...rF({name:[`InputPlaceholder`,c],props:t,classes:$H,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});sU.classes=$H,sU.displayName=`@mantine/core/InputPlaceholder`;function cU(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var lU={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},uU=TN((e,{size:t})=>({label:{"--input-label-size":$j(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${$j(t)} - ${X(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${$j(t)} - ${X(2)})`}})),dU=Q(e=>{let t=Z(`InputWrapper`,lU,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,description:h,labelProps:g,descriptionProps:_,errorProps:v,labelElement:y,children:b,withAsterisk:x,id:S,required:C,__stylesApiProps:w,mod:T,attributes:E,...D}=t,O=rF({name:[`InputWrapper`,u],props:w||t,classes:$H,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:uU}),k={size:c,variant:l,__staticSelector:u},A=MM(S),j=typeof x==`boolean`?x:C,M=v?.id||`${A}-error`,N=_?.id||`${A}-description`,P=A,F=!!m&&typeof m!=`boolean`,ee=!!h,I=`${F?M:``} ${ee?N:``}`,te=I.trim().length>0?I.trim():void 0,ne=g?.id||`${A}-label`,L=p&&(0,J.jsx)(oU,{labelElement:y,id:ne,htmlFor:P,required:j,...k,...g,children:p},`label`),re=ee&&(0,J.jsx)(tU,{..._,...k,size:_?.size||k.size,id:_?.id||N,children:h},`description`),ie=(0,J.jsx)(q.Fragment,{children:d(b)},`input`),ae=F&&(0,q.createElement)(rU,{...v,...k,size:v?.size||k.size,key:`error`,id:v?.id||M},m),oe=f.map(e=>{switch(e){case`label`:return L;case`input`:return ie;case`description`:return re;case`error`:return ae;default:return null}});return(0,J.jsx)(QH,{value:{getStyles:O,describedBy:te,inputId:P,labelId:ne,...cU(f,{hasDescription:ee,hasError:F})},children:(0,J.jsx)($,{variant:l,size:c,mod:[{error:!!m},T],id:y===`label`?void 0:S,...O(`root`),...D,children:oe})})});dU.classes=$H,dU.varsResolver=uU,dU.displayName=`@mantine/core/InputWrapper`;var fU={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},pU=TN((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":Xj(t.size,`input-height`),"--input-fz":$j(t.size),"--input-radius":t.radius===void 0?void 0:Qj(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:X(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:X(t.rightSectionWidth),"--input-padding-y":t.multiline?Xj(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),mU=IF(e=>{let t=Z(`Input`,fU,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,disabled:p,leftSection:m,leftSectionProps:h,leftSectionWidth:g,rightSection:_,rightSectionProps:v,rightSectionWidth:y,rightSectionPointerEvents:b,leftSectionPointerEvents:x,variant:S,vars:C,pointer:w,multiline:T,radius:E,id:D,withAria:O,withErrorStyles:k,mod:A,inputSize:j,attributes:M,__clearSection:N,__clearable:P,__clearSectionMode:F,__defaultRightSection:ee,loading:I,loadingPosition:te,...ne}=t,{styleProps:L,rest:re}=sF(ne),ie=(0,q.use)(QH),ae={offsetBottom:ie?.offsetBottom,offsetTop:ie?.offsetTop},oe=rF({name:[`Input`,c],props:l||t,classes:$H,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:M,stylesCtx:ae,rootSelector:`wrapper`,vars:C,varsResolver:pU}),se=O?{required:s,disabled:p,"aria-invalid":!!f,"aria-describedby":ie?.describedBy,id:ie?.inputId||D}:{},ce=I?(0,J.jsx)(rV,{size:te===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,le=I&&te===`left`?ce:m,ue=ZH({__clearable:P,__clearSection:N,rightSection:I&&te===`right`?ce:_,__defaultRightSection:ee,size:u,__clearSectionMode:F});return(0,J.jsx)(JH,{value:{size:u||`sm`},children:(0,J.jsxs)($,{...oe(`wrapper`),...L,...d,mod:[{error:!!f&&k,pointer:w,disabled:p,multiline:T,"data-with-right-section":!!ue,"data-with-left-section":!!le},A],variant:S,size:u,children:[le&&(0,J.jsx)(`div`,{...h,"data-position":`left`,...oe(`section`,{className:h?.className,style:h?.style}),children:le}),(0,J.jsx)($,{component:`input`,...re,...se,required:s,mod:{disabled:p,error:!!f&&k},variant:S,__size:j,...oe(`input`)}),ue&&(0,J.jsx)(`div`,{...v,"data-position":`right`,...oe(`section`,{className:v?.className,style:v?.style}),children:ue})]})})});mU.classes=$H,mU.varsResolver=pU,mU.Wrapper=dU,mU.Label=oU,mU.Error=rU,mU.Description=tU,mU.Placeholder=sU,mU.ClearButton=YH,mU.displayName=`@mantine/core/Input`;function hU(e,t,n){let r=Z(e,t,n),{label:i,description:a,error:o,required:s,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:p,errorProps:m,labelProps:h,descriptionProps:g,wrapperProps:_,id:v,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,vars:T,mod:E,attributes:D,...O}=r,{styleProps:k,rest:A}=sF(O),j={label:i,description:a,error:o,required:s,classNames:c,className:u,__staticSelector:f,__stylesApiProps:p||r,errorProps:m,labelProps:h,descriptionProps:g,unstyled:d,styles:l,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,id:v,mod:E,attributes:D,..._};return{...A,classNames:c,styles:l,unstyled:d,wrapperProps:{...j,...k},inputProps:{required:s,classNames:c,styles:l,unstyled:d,size:y,__staticSelector:f,__stylesApiProps:p||r,error:o,variant:w,id:v,attributes:D}}}var gU={__staticSelector:`InputBase`,withAria:!0,size:`sm`},_U=IF(e=>{let{inputProps:t,wrapperProps:n,...r}=hU(`InputBase`,gU,e);return(0,J.jsx)(mU.Wrapper,{...n,children:(0,J.jsx)(mU,{...t,...r})})});_U.classes={...mU.classes,...mU.Wrapper.classes},_U.displayName=`@mantine/core/InputBase`;var vU={gap:{type:`spacing`,property:`gap`},rowGap:{type:`spacing`,property:`rowGap`},columnGap:{type:`spacing`,property:`columnGap`},align:{type:`identity`,property:`alignItems`},justify:{type:`identity`,property:`justifyContent`},wrap:{type:`identity`,property:`flexWrap`},direction:{type:`identity`,property:`flexDirection`}},yU={root:`m_8bffd616`},bU=IF(e=>{let t=Z(`Flex`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,gap:c,rowGap:l,columnGap:u,align:d,justify:f,wrap:p,direction:m,attributes:h,...g}=t,_=rF({name:`Flex`,classes:yU,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=EP(),y=AF(),b=kF({styleProps:{gap:c,rowGap:l,columnGap:u,align:d,justify:f,wrap:p,direction:m},theme:v,data:vU});return(0,J.jsxs)(J.Fragment,{children:[b.hasResponsiveStyles&&(0,J.jsx)(oF,{selector:`.${y}`,styles:b.styles,media:b.media}),(0,J.jsx)($,{..._(`root`,{className:y,style:Lj(b.inlineStyles)}),...g})]})});bU.classes=yU,bU.displayName=`@mantine/core/Flex`;function xU(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function SU({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,q.useRef)(-1),s=(0,q.useRef)(e),[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(typeof r==`boolean`?r:!1),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=window.getComputedStyle(e),o=window.getComputedStyle(t),s=aI(a.borderTopWidth)+aI(o.borderTopWidth),c=aI(a.borderLeftWidth)+aI(o.borderLeftWidth),l={top:r.top-i.top-s,left:r.left-i.left-c,width:r.width,height:r.height};n.current.style.transform=`translateY(${l.top}px) translateX(${l.left}px)`,n.current.style.width=`${l.width}px`,n.current.style.height=`${l.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,q.useRef)(null),h=(0,q.useRef)(null);return(0,q.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,q.useEffect)(()=>{if(t){let e=e=>{xU(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,q.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),oN(()=>{gN()!==`test`&&l(!0)},20,{autoInvoke:!0}),uN(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var CU={root:`m_96b553a6`},wU=TN((e,{transitionDuration:t},{shouldReduceMotion:n})=>{let r=e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`;return{root:{"--transition-duration":r}}}),TU=Q(e=>{let t=Z(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=rF({name:`FloatingIndicator`,classes:CU,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:wU,stylesCtx:{shouldReduceMotion:BM()}}),y=(0,q.useRef)(null),{initialized:b,hidden:x}=SU({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=IM(g,y);return!c||!l?null:(0,J.jsx)($,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});TU.displayName=`@mantine/core/FloatingIndicator`,TU.classes=CU,TU.varsResolver=wU;function EU({style:e,size:t=16,...n}){return(0,J.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:X(t),height:X(t),display:`block`},...n,children:(0,J.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}EU.displayName=`@mantine/core/AccordionChevron`;var DU={root:`m_b6d8b162`};function OU(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var kU={inherit:!1},AU=TN((e,{variant:t,lineClamp:n,gradient:r,size:i})=>({root:{"--text-fz":$j(i),"--text-lh":eM(i),"--text-gradient":t===`gradient`?qN(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0}})),jU=IF(e=>{let t=Z(`Text`,kU,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,__staticSelector:c,vars:l,className:u,style:d,classNames:f,styles:p,unstyled:m,variant:h,mod:g,size:_,attributes:v,...y}=t;return(0,J.jsx)($,{...rF({name:[`Text`,c],props:t,classes:DU,className:u,style:d,classNames:f,styles:p,unstyled:m,attributes:v,vars:l,varsResolver:AU})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:h,mod:[{"data-truncate":OU(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},g],size:_,...y})});jU.classes=DU,jU.varsResolver=AU,jU.displayName=`@mantine/core/Text`;var MU={root:`m_849cf0da`},NU={underline:`hover`},PU=IF(e=>{let{underline:t,className:n,unstyled:r,mod:i,...a}=Z(`Anchor`,NU,e);return(0,J.jsx)(jU,{component:`a`,className:DN({[MU.root]:!r},n),...a,mod:[{underline:t},i],__staticSelector:`Anchor`,unstyled:r})});PU.classes=MU,PU.displayName=`@mantine/core/Anchor`;var[FU,IU]=Bj(`AppShell was not found in tree`),LU={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},RU=Q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=Z(`AppShellAside`,null,e),d=IU();return d.disabled?null:(0,J.jsx)($,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:DN({[PH.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});RU.classes=LU,RU.displayName=`@mantine/core/AppShellAside`;var zU=Q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=Z(`AppShellFooter`,null,e),d=IU();return d.disabled?null:(0,J.jsx)($,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:DN({[PH.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});zU.classes=LU,zU.displayName=`@mantine/core/AppShellFooter`;var BU=Q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=Z(`AppShellHeader`,null,e),d=IU();return d.disabled?null:(0,J.jsx)($,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:DN({[PH.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});BU.classes=LU,BU.displayName=`@mantine/core/AppShellHeader`;var VU=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`AppShellMain`,null,e);return(0,J.jsx)($,{component:`main`,...IU().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});VU.classes=LU,VU.displayName=`@mantine/core/AppShellMain`;var HU=Q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=Z(`AppShellNavbar`,null,e),d=IU();return d.disabled?null:(0,J.jsx)($,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});HU.classes=LU,HU.displayName=`@mantine/core/AppShellNavbar`;var UU=IF(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=Z(`AppShellSection`,null,e),l=IU();return(0,J.jsx)($,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});UU.classes=LU,UU.displayName=`@mantine/core/AppShellSection`;function WU(e){return typeof e==`object`?e.base:e}function GU(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function KU(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function qU({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),GU(o)){let t=X(WU(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(KU(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=X(o.base),e[`--app-shell-aside-offset`]=X(o.base)),Oj(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=X(o[e]),t[e][`--app-shell-aside-offset`]=X(o[e]))})),r?.breakpoint&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=rM(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function JU({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),GU(i)){let t=X(WU(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}KU(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=X(i.base),a&&(e[`--app-shell-footer-offset`]=X(i.base))),Oj(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=X(i[e]),a&&(t[e][`--app-shell-footer-offset`]=X(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function YU({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),GU(i)){let t=X(WU(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}KU(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=X(i.base),a&&(e[`--app-shell-header-offset`]=X(i.base))),Oj(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=X(i[e]),a&&(t[e][`--app-shell-header-offset`]=X(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function XU({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),GU(o)){let t=X(WU(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(KU(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=X(o.base),e[`--app-shell-navbar-offset`]=X(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=X(o.base))),Oj(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=X(o[e]),t[e][`--app-shell-navbar-offset`]=X(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=X(o[e])))})),r?.breakpoint&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=rM(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function ZU(e){return Number(e)===0?`0px`:Zj(e)}function QU({padding:e,baseStyles:t,minMediaStyles:n}){GU(e)&&(t[`--app-shell-padding`]=ZU(WU(e))),KU(e)&&(e.base&&(t[`--app-shell-padding`]=ZU(e.base)),Oj(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=ZU(e[t]))}))}function $U({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),XU({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),qU({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),YU({baseStyles:l,minMediaStyles:s,header:t,mode:o}),JU({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),QU({baseStyles:l,minMediaStyles:s,padding:i});let u=iM(Oj(s),a.breakpoints).map(e=>({query:`(min-width: ${Ij(e.px)})`,styles:s[e.value]})),d=iM(Oj(c),a.breakpoints).map(e=>({query:`(max-width: ${Ij(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function eW({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=EP(),c=tP(),{media:l,baseStyles:u}=$U({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,J.jsx)(oF,{media:l,styles:u,selector:o||c.cssVariablesSelector})}function tW({transitionDuration:e,disabled:t}){let[n,r]=(0,q.useState)(!0),i=(0,q.useRef)(-1),a=(0,q.useRef)(-1);return NM(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,q.startTransition)(()=>{r(!1)}),200)}),_M(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,q.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var nW={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:qj(`app`),mode:`fixed`},rW=TN((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),iW=Q(e=>{let t=Z(`AppShell`,nW,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:S,id:C,...w}=t,T=rF({name:`AppShell`,classes:LU,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:rW}),E=tW({disabled:g,transitionDuration:d}),D=MM(C);return(0,J.jsxs)(FU,{value:{getStyles:T,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,J.jsx)(eW,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${D}`:void 0}),(0,J.jsx)($,{...T(`root`),id:D,mod:[{resizing:E,layout:h,disabled:g,mode:b},x],...w})]})});iW.classes=LU,iW.varsResolver=rW,iW.displayName=`@mantine/core/AppShell`,iW.Navbar=HU,iW.Header=BU,iW.Main=VU,iW.Aside=RU,iW.Footer=zU,iW.Section=UU;function aW(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>aW(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function oW(e){return e?e.map(e=>aW(e)):[]}function sW(e){return e.reduce((e,t)=>`group`in t?{...e,...sW(t.items)}:(e[`${t.value}`]=t,e),{})}var cW={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},lW={error:null},uW=TN((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":Xj(t,`combobox-chevron-size`),"--combobox-chevron-color":n?GN(n,e):void 0}})),dW=Q(e=>{let t=Z(`ComboboxChevron`,lW,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=rF({name:`ComboboxChevron`,classes:cW,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:uW,attributes:u,rootSelector:`chevron`});return(0,J.jsx)($,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,J.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});dW.classes=cW,dW.varsResolver=uW,dW.displayName=`@mantine/core/ComboboxChevron`;var[fW,pW]=Bj(`Combobox component was not found in tree`);function mW({size:e,onMouseDown:t,onClick:n,onClear:r,...i}){return(0,J.jsx)(mU.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:e=>{e.preventDefault(),t?.(e)},onClick:e=>{r(),n?.(e)}})}mW.displayName=`@mantine/core/ComboboxClearButton`;var hW=Q(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=Z(`ComboboxDropdown`,null,e),s=pW();return(0,J.jsx)(YB.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});hW.classes=cW,hW.displayName=`@mantine/core/ComboboxDropdown`;var gW={refProp:`ref`},_W=Q(e=>{let{children:t,refProp:n,ref:r}=Z(`ComboboxDropdownTarget`,gW,e);if(pW(),!zj(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,J.jsx)(YB.Target,{ref:r,refProp:n,children:t})});_W.displayName=`@mantine/core/ComboboxDropdownTarget`;var vW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ComboboxEmpty`,null,e);return(0,J.jsx)($,{...pW().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});vW.classes=cW,vW.displayName=`@mantine/core/ComboboxEmpty`;function yW({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:n,withExpandedAttribute:r,targetType:i,autoComplete:a}){let o=pW(),[s,c]=(0,q.useState)(null),l=n=>{if(e?.(n),!o.readOnly&&t){if(n.nativeEvent.isComposing)return;if(n.nativeEvent.code===`ArrowDown`&&(n.preventDefault(),o.store.dropdownOpened?c(o.store.selectNextOption()):(o.store.openDropdown(`keyboard`),c(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),n.nativeEvent.code===`ArrowUp`&&(n.preventDefault(),o.store.dropdownOpened?c(o.store.selectPreviousOption()):(o.store.openDropdown(`keyboard`),c(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),n.nativeEvent.code===`Enter`||n.nativeEvent.code===`NumpadEnter`){if(n.nativeEvent.keyCode===229)return;let e=o.store.getSelectedOptionIndex();o.store.dropdownOpened&&e!==-1?(n.preventDefault(),o.store.clickSelectedOption()):i===`button`&&(n.preventDefault(),o.store.openDropdown(`keyboard`))}n.key===`Escape`&&o.store.closeDropdown(`keyboard`),n.nativeEvent.code===`Space`&&i===`button`&&(n.preventDefault(),o.store.toggleDropdown(`keyboard`))}};return{...n?{...r?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":r?!!(o.store.listId&&o.store.dropdownOpened):void 0,"aria-controls":o.store.dropdownOpened&&o.store.listId?o.store.listId:void 0,"aria-activedescendant":o.store.dropdownOpened&&s||void 0,autoComplete:a,"data-expanded":o.store.dropdownOpened||void 0,"data-mantine-stop-propagation":o.store.dropdownOpened||void 0}:{},onKeyDown:l}}var bW={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},xW=Q(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=Z(`ComboboxEventsTarget`,bW,e),u=wN(t);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=pW();return(0,q.cloneElement)(u,{...yW({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,autoComplete:s}),...l,[n]:IM(c,d.store.targetRef,yN(u))})});xW.displayName=`@mantine/core/ComboboxEventsTarget`;var SW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ComboboxFooter`,null,e);return(0,J.jsx)($,{...pW().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});SW.classes=cW,SW.displayName=`@mantine/core/ComboboxFooter`;var CW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=Z(`ComboboxGroup`,null,e),u=pW(),d=MM(c);return(0,J.jsxs)($,{role:`group`,"aria-labelledby":s?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[s&&(0,J.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});CW.classes=cW,CW.displayName=`@mantine/core/ComboboxGroup`;var wW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ComboboxHeader`,null,e);return(0,J.jsx)($,{...pW().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});wW.classes=cW,wW.displayName=`@mantine/core/ComboboxHeader`;function TW({value:e,valuesDivider:t=`,`,...n}){return(0,J.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}TW.displayName=`@mantine/core/ComboboxHiddenInput`;var EW=Q(e=>{let t=Z(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=pW(),_=(0,q.useId)(),v=c||_;return(0,J.jsx)($,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});EW.classes=cW,EW.displayName=`@mantine/core/ComboboxOption`;var DW=Q(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=Z(`ComboboxOptions`,null,e),l=pW(),u=MM(a);return(0,q.useEffect)(()=>{l.store.setListId(u)},[u]),(0,J.jsx)($,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});DW.classes=cW,DW.displayName=`@mantine/core/ComboboxOptions`;var OW={withAriaAttributes:!0,withKeyboardNavigation:!0},kW=Q(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,withKeyboardNavigation:s,size:c,ref:l,...u}=Z(`ComboboxSearch`,OW,e),d=pW(),f=d.getStyles(`search`),p=yW({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:s,withExpandedAttribute:!1,onKeyDown:o,autoComplete:`off`});return(0,J.jsx)(mU,{ref:IM(l,d.store.searchRef),classNames:[{input:f.className},t],styles:[{input:f.style},n],size:c||d.size,...p,...u,__staticSelector:`Combobox`})});kW.classes=cW,kW.displayName=`@mantine/core/ComboboxSearch`;var AW={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},jW=Q(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=Z(`ComboboxTarget`,AW,e),u=wN(t);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=pW(),f=(0,q.cloneElement)(u,{...yW({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,autoComplete:s}),...l});return(0,J.jsx)(YB.Target,{ref:IM(c,d.store.targetRef),children:f})});jW.displayName=`@mantine/core/ComboboxTarget`;function MW(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function NW(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function PW(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function FW({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=zM({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,q.useRef)(null),u=(0,q.useRef)(-1),d=(0,q.useRef)(null),f=(0,q.useRef)(null),p=(0,q.useRef)(-1),m=(0,q.useRef)(-1),h=(0,q.useRef)(-1),g=(0,q.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,q.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,q.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,q.useCallback)(()=>{let e=CN(f.current),t=xN(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,q.useCallback)(e=>{let t=CN(f.current),n=xN(`#${l.current}`,t),r=n?SN(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,q.useCallback)(()=>{let e=CN(f.current),t=xN(`#${l.current} [data-combobox-active]`,e);return b(t?SN(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t):0)},[b]),S=(0,q.useCallback)(()=>{let e=CN(f.current),t=SN(`#${l.current} [data-combobox-option]`,e);return b(NW(u.current,t,a))},[b,a]),C=(0,q.useCallback)(()=>{let e=CN(f.current),t=SN(`#${l.current} [data-combobox-option]`,e);return b(MW(u.current,t,a))},[b,a]),w=(0,q.useCallback)(()=>{let e=CN(f.current);return b(PW(SN(`#${l.current} [data-combobox-option]`,e)))},[b]),T=(0,q.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=CN(f.current),r=SN(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=CN(f.current),r=SN(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,q.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,q.useCallback)(()=>{let e=CN(f.current);(SN(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,q.useCallback)(e=>{l.current=e},[]),k=(0,q.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,q.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,q.useCallback)(()=>u.current,[]);return(0,q.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var IW={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},LW=TN((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":$j(t),"--combobox-option-padding":Xj(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:X(n),"--combobox-option-fz":$j(t),"--combobox-option-padding":Xj(t,`combobox-option-padding`)}})),RW=e=>{let t=Z(`Combobox`,IW,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,...g}=t,_=FW(),v=o||_,y=rF({name:p||`Combobox`,classes:cW,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:LW}),b=()=>{l?.(),v.closeDropdown()};return(0,J.jsx)(fW,{value:{getStyles:y,store:v,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m},children:(0,J.jsx)(YB,{opened:v.dropdownOpened,preventPositionChangeWhenVisible:!1,...g,onChange:e=>!e&&b(),withRoles:!1,unstyled:i,children:a})})};RW.extend=e=>e,RW.classes=cW,RW.varsResolver=LW,RW.displayName=`@mantine/core/Combobox`,RW.Target=jW,RW.Dropdown=hW,RW.Options=DW,RW.Option=EW,RW.Search=kW,RW.Empty=vW,RW.Chevron=dW,RW.Footer=SW,RW.Header=wW,RW.EventsTarget=xW,RW.DropdownTarget=_W,RW.Group=CW,RW.ClearButton=mW,RW.HiddenInput=TW;function zW({children:e,role:t}){let n=(0,q.use)(QH);return n?(0,J.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,J.jsx)(J.Fragment,{children:e})}function BW({size:e,style:t,...n}){return(0,J.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:X(e),height:X(e),...t},"aria-hidden":!0,...n,children:(0,J.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function VW({indeterminate:e,...t}){return e?(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,J.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,J.jsx)(BW,{...t})}var HW={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},UW=HW;function WW({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=rF({name:e,props:t,className:n,style:_,classes:HW,classNames:r,styles:i,unstyled:a,attributes:b});return(0,J.jsx)($,{...S(`root`),__vars:{"--label-fz":$j(f),"--label-lh":Xj(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,J.jsxs)($,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,J.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,J.jsx)($,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,J.jsx)(mU.Description,{size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,J.jsx)(mU.Error,{size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}WW.displayName=`@mantine/core/InlineInput`;function GW(e){return`group`in e}function KW({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;GW(o)&&i.push({group:o.group,items:KW({options:o.items,search:t,limit:n-i.length})}),GW(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function qW(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function JW(e,t=new Set){if(Array.isArray(e))for(let n of e)if(GW(n))JW(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function YW(e,t){return Array.isArray(e)?e.includes(t):e===t}function XW({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!GW(e)){let s=YW(r,e.value),c=t&&(s?(0,J.jsx)(BW,{className:cW.optionsDropdownCheckIcon}):n?(0,J.jsx)(`div`,{className:cW.optionsDropdownCheckPlaceholder}):null),l=(0,J.jsxs)(J.Fragment,{children:[i===`left`&&c,(0,J.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,J.jsx)(RW.Option,{value:e.value,disabled:e.disabled,className:DN({[cW.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,J.jsx)(XW,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,J.jsx)(RW.Group,{label:e.group,children:s})}function ZW({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,withScrollArea:s=!0,filterOptions:c=!0,withCheckIcon:l=!1,withAlignedLabels:u=!1,value:d,checkIconPosition:f,nothingFoundMessage:p,unstyled:m,labelId:h,renderOption:g,scrollAreaProps:_,"aria-label":v}){JW(e);let y=typeof i==`string`?(r||KW)({options:e,search:c?i:``,limit:a??1/0}):e,b=qW(y),x=y.map(e=>(0,J.jsx)(XW,{data:e,withCheckIcon:l,withAlignedLabels:u,value:d,checkIconPosition:f,unstyled:m,renderOption:g},GW(e)?e.group:`${e.value}`));return(0,J.jsx)(RW.Dropdown,{hidden:t||n&&b,"data-composed":!0,children:(0,J.jsxs)(RW.Options,{labelledBy:h,"aria-label":v,children:[s?(0,J.jsx)(nB.Autosize,{mah:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,..._,children:x}):x,b&&p&&(0,J.jsx)(RW.Empty,{children:p})]})})}var QW=Q(e=>{let t=Z(`Autocomplete`,null,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:C,limit:w,withScrollArea:T,maxDropdownHeight:E,size:D,id:O,renderOption:k,autoComplete:A,scrollAreaProps:j,onClear:M,clearButtonProps:N,error:P,clearable:F,clearSectionMode:ee,rightSection:I,autoSelectOnBlur:te,openOnFocus:ne=!0,attributes:L,...re}=t,ie=MM(O),ae=oW(m),oe=sW(ae),[se,ce]=zM({value:h,defaultValue:g,finalValue:``,onChange:p}),le=FW({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v&&le.selectFirstOption()},onDropdownClose:()=>{c?.(),setTimeout(le.resetSelectedOption,0)}}),ue=e=>{ce(e),le.resetSelectedOption()},{resolvedClassNames:R,resolvedStyles:de}=UP({props:t,styles:r,classNames:n});(0,q.useEffect)(()=>{_&&le.selectFirstOption()},[_,se]);let z=(0,J.jsx)(RW.ClearButton,{...N,onClear:()=>{ue(``),M?.()}});return(0,J.jsxs)(RW,{store:le,__staticSelector:`Autocomplete`,classNames:R,styles:de,unstyled:i,readOnly:x,size:D,attributes:L,keepMounted:te,onOptionSubmit:e=>{y?.(e),ue(oe[e].label),le.closeDropdown()},...b,children:[(0,J.jsx)(RW.Target,{autoComplete:A,withExpandedAttribute:!0,children:(0,J.jsx)(_U,{...re,size:D,__staticSelector:`Autocomplete`,__clearSection:z,__clearable:F&&!!se&&!S&&!x,__clearSectionMode:ee,rightSection:I,disabled:S,readOnly:x,value:se,error:P,onChange:e=>{ue(e.currentTarget.value),le.openDropdown(),_&&le.selectFirstOption()},onFocus:e=>{ne&&le.openDropdown(),u?.(e)},onBlur:e=>{te&&le.clickSelectedOption(),le.closeDropdown(),d?.(e)},onClick:e=>{le.openDropdown(),f?.(e)},classNames:R,styles:de,unstyled:i,attributes:L,id:ie})}),(0,J.jsx)(ZW,{data:ae,hidden:x||S,filter:C,search:se,limit:w,hiddenWhenEmpty:!0,withScrollArea:T,maxDropdownHeight:E,unstyled:i,labelId:re.label?`${ie}-label`:void 0,"aria-label":re.label?void 0:re[`aria-label`],renderOption:k,scrollAreaProps:j})]})});QW.classes={..._U.classes,...RW.classes},QW.displayName=`@mantine/core/Autocomplete`;var $W={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},eG=TN((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":Xj(a,`badge-height`),"--badge-padding-x":Xj(a,`badge-padding-x`),"--badge-fz":Xj(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:Qj(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?GN(n,e):void 0}}}),tG=IF(e=>{let t=Z(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=rF({name:`Badge`,props:t,classes:$W,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:eG});return(0,J.jsxs)($,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,J.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,J.jsx)(`span`,{...x(`label`),children:p}),f&&(0,J.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});tG.classes=$W,tG.varsResolver=eG,tG.displayName=`@mantine/core/Badge`;var nG={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},rG=TN((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?GN(t,e):void 0,"--burger-size":Xj(n,`burger-size`),"--burger-line-size":r?X(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),iG=Q(e=>{let t=Z(`Burger`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,children:l,transitionDuration:u,transitionTimingFunction:d,lineSize:f,attributes:p,...m}=t,h=rF({name:`Burger`,classes:nG,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:rG});return(0,J.jsxs)(oB,{...h(`root`),...m,children:[(0,J.jsx)($,{mod:[`reduce-motion`,{opened:c}],...h(`burger`)}),l]})});iG.classes=nG,iG.varsResolver=rG,iG.displayName=`@mantine/core/Burger`;var aG={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},oG={orientation:`horizontal`},sG=TN((e,{borderWidth:t})=>({group:{"--button-border-width":X(t)}})),cG=Q(e=>{let t=Z(`ButtonGroup`,oG,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=Z(`ButtonGroup`,oG,e);return(0,J.jsx)($,{...rF({name:`ButtonGroup`,props:t,classes:aG,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:sG,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});cG.classes=aG,cG.varsResolver=sG,cG.displayName=`@mantine/core/ButtonGroup`;var lG=TN((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":Xj(o,`section-height`),"--section-padding-x":Xj(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?$j(o.replace(`compact-`,``)):$j(o),"--section-radius":t===void 0?void 0:Qj(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),uG=Q(e=>{let t=Z(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,J.jsx)($,{...rF({name:`ButtonGroupSection`,props:t,classes:aG,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:lG,rootSelector:`groupSection`})(`groupSection`),...f})});uG.classes=aG,uG.varsResolver=lG,uG.displayName=`@mantine/core/ButtonGroupSection`;var dG={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${X(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},fG=TN((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":Xj(a,`button-height`),"--button-padding-x":Xj(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?$j(a.replace(`compact-`,``)):$j(a),"--button-radius":t===void 0?void 0:Qj(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),pG=IF(e=>{let t=Z(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=rF({name:`Button`,props:t,classes:aG,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:fG}),T=!!c,E=!!l;return(0,J.jsxs)(oB,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,J.jsx)(NB,{mounted:p,transition:dG,duration:150,children:e=>(0,J.jsx)($,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,J.jsx)(rV,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,J.jsxs)(`span`,{...w(`inner`),children:[c&&(0,J.jsx)($,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,J.jsx)($,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,J.jsx)($,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});pG.classes=aG,pG.varsResolver=fG,pG.displayName=`@mantine/core/Button`,pG.Group=cG,pG.GroupSection=uG;var[mG,hG]=Bj(`Card component was not found in tree`),gG={root:`m_e615b15f`,section:`m_599a2148`},_G=IF(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,withBorder:o,inheritPadding:s,mod:c,...l}=Z(`CardSection`,null,e),u=hG();return(0,J.jsx)($,{mod:[{"with-border":o,"inherit-padding":s},c],...u.getStyles(`section`,{className:n,style:r,styles:i,classNames:t}),...l})});_G.classes=gG,_G.displayName=`@mantine/core/CardSection`;var vG=TN((e,{padding:t})=>({root:{"--card-padding":Zj(t)}})),yG={orientation:`vertical`},bG=IF(e=>{let t=Z(`Card`,yG,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,padding:l,attributes:u,orientation:d,...f}=t,p=rF({name:`Card`,props:t,classes:gG,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:vG}),m=q.Children.toArray(c),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&e.type===_G?(0,q.cloneElement)(e,{"data-orientation":d,"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,J.jsx)(mG,{value:{getStyles:p},children:(0,J.jsx)(dB,{unstyled:o,"data-orientation":d,...p(`root`),...f,children:h})})});bG.classes=gG,bG.varsResolver=vG,bG.displayName=`@mantine/core/Card`,bG.Section=_G;var xG={root:`m_de3d2490`,colorOverlay:`m_862f3d1b`,shadowOverlay:`m_98ae7f22`,alphaOverlay:`m_95709ac0`,childrenOverlay:`m_93e74e3`},SG={withShadow:!0},CG=TN((e,{radius:t,size:n})=>({root:{"--cs-radius":t===void 0?void 0:Qj(t),"--cs-size":X(n)}})),wG=IF(e=>{let t=Z(`ColorSwatch`,SG,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,radius:l,withShadow:u,children:d,attributes:f,...p}=Z(`ColorSwatch`,SG,t),m=rF({name:`ColorSwatch`,props:t,classes:xG,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:CG});return(0,J.jsxs)($,{...m(`root`,{focusable:!0}),...p,children:[(0,J.jsx)(`span`,{...m(`alphaOverlay`)}),u&&(0,J.jsx)(`span`,{...m(`shadowOverlay`)}),(0,J.jsx)(`span`,{...m(`colorOverlay`,{style:{backgroundColor:c}})}),(0,J.jsx)(`span`,{...m(`childrenOverlay`),children:d})]})});wG.classes=xG,wG.varsResolver=CG,wG.displayName=`@mantine/core/ColorSwatch`;function TG(e,t=0,n=10**t){return Math.round(n*e)/n}function EG({h:e,s:t,l:n,a:r}){let i=t*((n<50?n:100-n)/100);return{h:e,s:i>0?2*i/(n+i)*100:0,v:n+i,a:r}}var DG={grad:360/400,turn:360,rad:360/(Math.PI*2)};function OG(e,t=`deg`){return Number(e)*(DG[t]||1)}var kG=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function AG(e){let t=kG.exec(e);return t?EG({h:OG(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function jG({r:e,g:t,b:n,a:r}){let i=Math.max(e,t,n),a=i-Math.min(e,t,n),o=a?i===e?(t-n)/a:i===t?2+(n-e)/a:4+(e-t)/a:0;return{h:TG(60*(o<0?o+6:o),3),s:TG(i?a/i*100:0,3),v:TG(i/255*100,3),a:r}}function MG(e){let t=e[0]===`#`?e.slice(1):e;return t.length===3?jG({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):jG({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function NG(e){let t=e[0]===`#`?e.slice(1):e,n=e=>TG(parseInt(e,16)/255,3);if(t.length===4){let e=t.slice(0,3),r=n(t[3]+t[3]);return{...MG(e),a:r}}let r=t.slice(0,6),i=n(t.slice(6,8));return{...MG(r),a:i}}var PG=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function FG(e){let t=PG.exec(e);return t?jG({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}var IG={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},LG={hex:MG,hexa:NG,rgb:FG,rgba:FG,hsl:AG,hsla:AG};function RG(e){for(let[,t]of Object.entries(IG))if(t.test(e))return!0;return!1}function zG(e){if(typeof e!=`string`)return{h:0,s:0,v:0,a:1};if(e===`transparent`)return{h:0,s:0,v:0,a:0};let t=e.trim();for(let[e,n]of Object.entries(IG))if(n.test(t))return LG[e](t);return{h:0,s:0,v:0,a:1}}var BG=(0,q.createContext)(null);function VG({position:e,...t}){return(0,J.jsx)($,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...t})}VG.displayName=`@mantine/core/ColorPickerThumb`;var HG={wrapper:`m_fee9c77`,preview:`m_9dddfbac`,body:`m_bffecc3e`,sliders:`m_3283bb96`,thumb:`m_40d572ba`,swatch:`m_d8ee6fd8`,swatches:`m_5711e686`,saturation:`m_202a296e`,saturationOverlay:`m_11b3db02`,slider:`m_d856d47d`,sliderOverlay:`m_8f327113`},UG=Q(e=>{let t=Z(`ColorSlider`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,onChange:c,onChangeEnd:l,maxValue:u,round:d,size:f=`md`,focusable:p=!0,value:m,overlays:h,thumbColor:g=`transparent`,onScrubStart:_,onScrubEnd:v,__staticSelector:y=`ColorPicker`,attributes:b,ref:x,...S}=t,C=rF({name:y,classes:HG,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,rootSelector:`slider`}),w=(0,q.use)(BG)?.getStyles||C,T=EP(),[E,D]=(0,q.useState)({y:0,x:m/u}),O=(0,q.useRef)(E),k=e=>d?Math.round(e*u):e*u,{ref:A}=RM(({x:e,y:t})=>{O.current={x:e,y:t},c?.(k(e))},{onScrubEnd:()=>{let{x:e}=O.current;l?.(k(e)),v?.()},onScrubStart:_});vM(()=>{D({y:0,x:m/u})},[m]);let j=(e,t)=>{e.preventDefault();let n=LM(t);c?.(k(n.x)),l?.(k(n.x))},M=e=>{switch(e.key){case`ArrowRight`:j(e,{x:E.x+.05,y:E.y});break;case`ArrowLeft`:j(e,{x:E.x-.05,y:E.y});break}},N=h.map((e,t)=>(0,q.createElement)(`div`,{...w(`sliderOverlay`),style:e,key:t}));return(0,J.jsxs)($,{...S,ref:IM(A,x),...w(`slider`),size:f,role:`slider`,"aria-valuenow":m,"aria-valuemax":u,"aria-valuemin":0,tabIndex:p?0:-1,onKeyDown:M,"data-focus-ring":T.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${f})`},children:[N,(0,J.jsx)(VG,{position:E,...w(`thumb`,{style:{top:X(1),background:g}})})]})});UG.displayName=`@mantine/core/ColorSlider`,UG.classes=HG;var WG={__staticSelector:`AlphaSlider`},GG=Q(e=>{let{value:t,onChange:n,onChangeEnd:r,color:i,...a}=Z(`AlphaSlider`,WG,e);return(0,J.jsx)(UG,{...a,value:t,onChange:e=>n?.(TG(e,2)),onChangeEnd:e=>r?.(TG(e,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:`linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)`,backgroundSize:`${X(8)} ${X(8)}`,backgroundPosition:`0 0, 0 ${X(4)}, ${X(4)} ${X(-4)}, ${X(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${i})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`}]})});GG.displayName=`@mantine/core/AlphaSlider`,GG.classes=UG.classes;function KG({h:e,s:t,v:n,a:r}){let i=e/360*6,a=t/100,o=n/100,s=Math.floor(i),c=o*(1-a),l=o*(1-(i-s)*a),u=o*(1-(1-i+s)*a),d=s%6;return{r:TG([o,l,c,c,u,o][d]*255),g:TG([u,o,o,l,c,c][d]*255),b:TG([c,c,u,o,o,l][d]*255),a:TG(r,2)}}function qG(e,t){let{r:n,g:r,b:i,a}=KG(e);return t?`rgba(${n}, ${r}, ${i}, ${TG(a,2)})`:`rgb(${n}, ${r}, ${i})`}function JG({h:e,s:t,v:n,a:r},i){let a=(200-t)*n/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?t*n/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return i?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${TG(r,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function YG(e){let t=e.toString(16);return t.length<2?`0${t}`:t}function XG(e){let{r:t,g:n,b:r}=KG(e);return`#${YG(t)}${YG(n)}${YG(r)}`}function ZG(e){let t=Math.round(e.a*255);return`${XG(e)}${YG(t)}`}var QG={hex:XG,hexa:e=>ZG(e),rgb:e=>qG(e,!1),rgba:e=>qG(e,!0),hsl:e=>JG(e,!1),hsla:e=>JG(e,!0)};function $G(e,t){return t?e in QG?QG[e](t):QG.hex(t):`#000000`}var eK={__staticSelector:`HueSlider`},tK=Q(e=>{let{value:t,onChange:n,onChangeEnd:r,color:i,...a}=Z(`HueSlider`,eK,e);return(0,J.jsx)(UG,{...a,value:t,onChange:n,onChangeEnd:r,maxValue:360,thumbColor:`hsl(${t}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:`linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`}]})});tK.displayName=`@mantine/core/HueSlider`,tK.classes=UG.classes;function nK({className:e,onChange:t,onChangeEnd:n,value:r,saturationLabel:i,focusable:a=!0,size:o,color:s,onScrubStart:c,onScrubEnd:l,...u}){let{getStyles:d}=(0,q.use)(BG),[f,p]=(0,q.useState)({x:r.s/100,y:1-r.v/100}),m=(0,q.useRef)(f),{ref:h}=RM(({x:e,y:n})=>{m.current={x:e,y:n},t({s:Math.round(e*100),v:Math.round((1-n)*100)})},{onScrubEnd:()=>{let{x:e,y:t}=m.current;n({s:Math.round(e*100),v:Math.round((1-t)*100)}),l?.()},onScrubStart:c});(0,q.useEffect)(()=>{p({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);let g=(e,r)=>{e.preventDefault();let i=LM(r);t({s:Math.round(i.x*100),v:Math.round((1-i.y)*100)}),n({s:Math.round(i.x*100),v:Math.round((1-i.y)*100)})},_=e=>{switch(e.key){case`ArrowUp`:g(e,{y:f.y-.05,x:f.x});break;case`ArrowDown`:g(e,{y:f.y+.05,x:f.x});break;case`ArrowRight`:g(e,{x:f.x+.05,y:f.y});break;case`ArrowLeft`:g(e,{x:f.x-.05,y:f.y});break}};return(0,J.jsxs)($,{...d(`saturation`),ref:h,...u,role:`slider`,"aria-label":i,"aria-valuenow":f.x,"aria-valuetext":$G(`rgba`,r),tabIndex:a?0:-1,onKeyDown:_,children:[(0,J.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundColor:`hsl(${r.h}, 100%, 50%)`}})}),(0,J.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundImage:`linear-gradient(90deg, #fff, transparent)`}})}),(0,J.jsx)(`div`,{...d(`saturationOverlay`,{style:{backgroundImage:`linear-gradient(0deg, #000, transparent)`}})}),(0,J.jsx)(VG,{position:f,...d(`thumb`,{style:{backgroundColor:s}})})]})}nK.displayName=`@mantine/core/Saturation`;function rK({className:e,datatype:t,setValue:n,onChangeEnd:r,size:i,focusable:a,data:o,swatchesPerRow:s,value:c,...l}){let u=(0,q.use)(BG),d=o.map((e,t)=>(0,q.createElement)(wG,{...u.getStyles(`swatch`),unstyled:u.unstyled,component:`button`,type:`button`,color:e,key:t,radius:`sm`,onClick:()=>{n(e),r?.(e)},"aria-label":e,tabIndex:a?0:-1,"data-swatch":!0},c===e&&(0,J.jsx)(BW,{size:`35%`,color:HN(e)<.5?`white`:`black`})));return(0,J.jsx)($,{...u.getStyles(`swatches`),...l,children:d})}rK.displayName=`@mantine/core/Swatches`;var iK={swatchesPerRow:7,withPicker:!0,focusable:!0,size:`md`,__staticSelector:`ColorPicker`},aK=TN((e,{size:t,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":Xj(t,`cp-preview-size`),"--cp-width":Xj(t,`cp-width`),"--cp-body-spacing":Zj(t),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":Xj(t,`cp-thumb-size`),"--cp-saturation-height":Xj(t,`cp-saturation-height`)}})),oK=Q(e=>{let t=Z(`ColorPicker`,iK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,format:c=`hex`,value:l,defaultValue:u,onChange:d,onChangeEnd:f,withPicker:p,size:m,saturationLabel:h,hueLabel:g,alphaLabel:_,focusable:v,swatches:y,swatchesPerRow:b,fullWidth:x,onColorSwatchClick:S,__staticSelector:C,mod:w,attributes:T,name:E,hiddenInputProps:D,...O}=t,k=rF({name:C,props:t,classes:HG,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,rootSelector:`wrapper`,vars:s,varsResolver:aK}),A=(0,q.useRef)(c||`hex`),j=(0,q.useRef)(``),M=(0,q.useRef)(-1),N=(0,q.useRef)(!1),P=c===`hexa`||c===`rgba`||c===`hsla`,[F,ee,I]=zM({value:l,defaultValue:u,finalValue:`#FFFFFF`,onChange:d}),[te,ne]=(0,q.useState)(zG(F)),L=()=>{window.clearTimeout(M.current),N.current=!0},re=()=>{window.clearTimeout(M.current),M.current=window.setTimeout(()=>{N.current=!1},200)},ie=e=>{ne(t=>{let n={...t,...e};return j.current=$G(A.current,n),n}),ee(j.current)};return vM(()=>{typeof l==`string`&&RG(l)&&!N.current&&ne(zG(l))},[l]),vM(()=>{A.current=c||`hex`,ee($G(A.current,te))},[c]),(0,J.jsx)(BG,{value:{getStyles:k,unstyled:o},children:(0,J.jsxs)($,{...k(`wrapper`),size:m,mod:[{"full-width":x},w],...O,children:[E&&(0,J.jsx)(`input`,{type:`hidden`,name:E,value:F,...D}),p&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(nK,{value:te,onChange:ie,onChangeEnd:({s:e,v:t})=>f?.($G(A.current,{...te,s:e,v:t})),color:F,size:m,focusable:v,saturationLabel:h,onScrubStart:L,onScrubEnd:re}),(0,J.jsxs)(`div`,{...k(`body`),children:[(0,J.jsxs)(`div`,{...k(`sliders`),children:[(0,J.jsx)(tK,{value:te.h,onChange:e=>ie({h:e}),onChangeEnd:e=>f?.($G(A.current,{...te,h:e})),size:m,focusable:v,"aria-label":g,onScrubStart:L,onScrubEnd:re}),P&&(0,J.jsx)(GG,{value:te.a,onChange:e=>ie({a:e}),onChangeEnd:e=>{f?.($G(A.current,{...te,a:e}))},size:m,color:$G(`hex`,te),focusable:v,"aria-label":_,onScrubStart:L,onScrubEnd:re})]}),P&&(0,J.jsx)(wG,{color:F,radius:`sm`,size:`var(--cp-preview-size)`,...k(`preview`)})]})]}),Array.isArray(y)&&(0,J.jsx)(rK,{data:y,swatchesPerRow:b,focusable:v,setValue:ee,value:F,onChangeEnd:e=>{let t=$G(c,zG(e));S?.(t),f?.(t),I||ne(zG(e))}})]})})});oK.classes=HG,oK.varsResolver=aK,oK.displayName=`@mantine/core/ColorPicker`;function sK({style:e,...t}){return(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,style:{width:`var(--ci-eye-dropper-icon-size)`,height:`var(--ci-eye-dropper-icon-size)`,...e},viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,...t,children:[(0,J.jsx)(`path`,{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}),(0,J.jsx)(`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}),(0,J.jsx)(`path`,{d:`M12 3l0 4`}),(0,J.jsx)(`path`,{d:`M12 21l0 -3`}),(0,J.jsx)(`path`,{d:`M3 12l4 0`}),(0,J.jsx)(`path`,{d:`M21 12l-3 0`}),(0,J.jsx)(`path`,{d:`M12 12l0 .01`})]})}var cK={eyeDropperIcon:`m_b077c2bc`,eyeDropperButton:`m_66a028b5`,colorPreview:`m_c5ccdcab`,dropdown:`m_5ece2cd7`},lK={format:`hex`,fixOnBlur:!0,withPreview:!0,swatchesPerRow:7,withPicker:!0,popoverProps:{transitionProps:{transition:`fade`,duration:0}},withEyeDropper:!0,size:`sm`,leftSectionPointerEvents:`none`},uK=TN((e,{size:t})=>({eyeDropperIcon:{"--ci-eye-dropper-icon-size":Xj(t,`ci-eye-dropper-icon-size`)},eyeDropperButton:{"--ci-button-size":Xj(t,`ci-button-size`)},colorPreview:{"--ci-preview-size":Xj(t,`ci-preview-size`)}})),dK=Q(e=>{let t=Z(`ColorInput`,lK,e),{classNames:n,styles:r,unstyled:i,disallowInput:a,fixOnBlur:o,popoverProps:s,withPreview:c,withEyeDropper:l,eyeDropperIcon:u,closeOnColorSwatchClick:d,eyeDropperButtonProps:f,value:p,defaultValue:m,onChange:h,onChangeEnd:g,onClick:_,onFocus:v,onBlur:y,inputProps:b,format:x=`hex`,wrapperProps:S,readOnly:C,withPicker:w,swatches:T,disabled:E,leftSection:D,rightSection:O,swatchesPerRow:k,...A}=hU(`ColorInput`,lK,e),j=rF({name:`ColorInput`,props:t,classes:cK,classNames:n,styles:r,unstyled:i,rootSelector:`wrapper`,vars:t.vars,varsResolver:uK}),{resolvedClassNames:M,resolvedStyles:N}=UP({classNames:n,styles:r,props:t}),[P,F]=(0,q.useState)(!1),[ee,I]=(0,q.useState)(``),[te,ne]=zM({value:p,defaultValue:m,finalValue:``,onChange:h}),{supported:L,open:re}=cN(),ie=(0,J.jsx)(dV,{...f,...j(`eyeDropperButton`,{className:f?.className,style:f?.style}),variant:`subtle`,color:`gray`,unstyled:i,onClick:()=>re().then(e=>{if(e?.sRGBHex){let t=$G(x,zG(e.sRGBHex));ne(t),g?.(t)}}).catch(()=>{}),children:u||(0,J.jsx)(sK,{...j(`eyeDropperIcon`)})}),ae=e=>{v?.(e),F(!0)},oe=e=>{o&&ne(ee),y?.(e),F(!1)},se=e=>{_?.(e),F(!0)};return(0,q.useEffect)(()=>{(RG(te)||te.trim()===``)&&I(te)},[te]),vM(()=>{RG(te)&&ne($G(x,zG(te)))},[x]),(0,J.jsx)(mU.Wrapper,{...S,classNames:M,styles:N,__staticSelector:`ColorInput`,children:(0,J.jsxs)(YB,{__staticSelector:`ColorInput`,position:`bottom-start`,offset:5,opened:P,...s,classNames:M,styles:N,unstyled:i,withRoles:!1,disabled:C||w===!1&&(!Array.isArray(T)||T.length===0),children:[(0,J.jsx)(YB.Target,{children:(0,J.jsx)(mU,{autoComplete:`off`,...A,...b,classNames:M,styles:N,disabled:E,__staticSelector:`ColorInput`,onFocus:ae,onBlur:oe,onClick:se,spellCheck:!1,value:te,onChange:e=>{let t=e.currentTarget.value;ne(t),RG(t)&&g?.($G(x,zG(t)))},leftSection:D||(c?(0,J.jsx)(wG,{color:RG(te)?te:`#fff`,size:`var(--ci-preview-size)`,...j(`colorPreview`)}):null),readOnly:a||C,pointer:a,unstyled:i,rightSection:O||(l&&!E&&!C&&L?ie:null)})}),(0,J.jsx)(YB.Dropdown,{onMouseDown:e=>e.preventDefault(),className:cK.dropdown,children:(0,J.jsx)(oK,{__staticSelector:`ColorInput`,value:te,onChange:ne,onChangeEnd:g,format:x,swatches:T,swatchesPerRow:k,withPicker:w,size:b.size,focusable:!1,unstyled:i,styles:N,classNames:M,onColorSwatchClick:()=>d&&F(!1),attributes:S.attributes})})]})})});dK.classes=_U.classes,dK.varsResolver=uK,dK.displayName=`@mantine/core/ColorInput`;var fK={root:`m_7485cace`},pK={strategy:`block`},mK=TN((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:Xj(t,`container-size`)}})),hK=Q(e=>{let t=Z(`Container`,pK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=rF({name:`Container`,classes:fK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:mK});return(0,J.jsx)($,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});hK.classes=fK,hK.varsResolver=mK,hK.displayName=`@mantine/core/Container`;var gK={root:`m_3eebeb36`,label:`m_9e365f20`},_K={orientation:`horizontal`},vK=TN((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?GN(t,e):void 0,"--divider-border-style":n,"--divider-size":Xj(r,`divider-size`)}})),yK=Q(e=>{let t=Z(`Divider`,_K,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,orientation:l,label:u,labelPosition:d,mod:f,attributes:p,...m}=t,h=rF({name:`Divider`,classes:gK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:vK});return(0,J.jsx)($,{mod:[{orientation:l,withLabel:!!u},f],role:`separator`,...h(`root`),...m,children:u&&(0,J.jsx)($,{component:`span`,mod:{position:d},...h(`label`),children:u})})});yK.classes=gK,yK.varsResolver=vK,yK.displayName=`@mantine/core/Divider`;var bK={root:`m_e9408a47`,"root--default":`m_84c9523a`,"root--filled":`m_ef274e49`,"root--unstyled":`m_eda993d3`,legend:`m_90794832`,"legend--unstyled":`m_74ca27fe`},xK={variant:`default`},SK=TN((e,{radius:t})=>({root:{"--fieldset-radius":t===void 0?void 0:Qj(t)}})),CK=Q(e=>{let t=Z(`Fieldset`,xK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,legend:c,variant:l,children:u,attributes:d,...f}=t,p=rF({name:`Fieldset`,classes:bK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:SK});return(0,J.jsxs)($,{component:`fieldset`,variant:l,...p(`root`,{variant:l}),...f,children:[c&&(0,J.jsx)(`legend`,{...p(`legend`,{variant:l}),children:c}),u]})});CK.classes=bK,CK.varsResolver=SK,CK.displayName=`@mantine/core/Fieldset`;var wK=FF(e=>{let{onChange:t,children:n,multiple:r,accept:i,name:a,form:o,resetRef:s,disabled:c,capture:l,inputProps:u,ref:d,...f}=Z(`FileButton`,null,e),p=(0,q.useRef)(null),m=()=>{!c&&p.current?.click()};return PM(s,()=>{p.current&&(p.current.value=``)}),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`input`,{style:{display:`none`},type:`file`,accept:i,multiple:r,onChange:e=>{if(e.currentTarget.files===null)return t(r?[]:null);t(r?Array.from(e.currentTarget.files):e.currentTarget.files[0]||null)},ref:IM(d,p),name:a,form:o,capture:l,...u}),n({onClick:m,...f})]})});wK.displayName=`@mantine/core/FileButton`;var TK={valueComponent:({value:e})=>(0,J.jsx)(`div`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:Array.isArray(e)?e.map(e=>e.name).join(`, `):e?.name}),size:`sm`},EK=FF(e=>{let t=Z(`FileInput`,TK,e),{unstyled:n,vars:r,onChange:i,value:a,defaultValue:o,multiple:s,accept:c,name:l,form:u,valueComponent:d,clearable:f,clearSectionMode:p,clearButtonProps:m,readOnly:h,capture:g,fileInputProps:_,rightSection:v,size:y,placeholder:b,component:x,resetRef:S,classNames:C,styles:w,attributes:T,...E}=t,D=(0,q.useRef)(null),{resolvedClassNames:O,resolvedStyles:k}=UP({classNames:C,styles:w,props:t}),[A,j]=zM({value:a,defaultValue:o,onChange:i,finalValue:s?[]:null}),M=Array.isArray(A)?A.length!==0:A!==null,N=(0,J.jsx)(gV,{...m,variant:`subtle`,onClick:()=>j(s?[]:null),size:y,unstyled:n}),P=f&&M&&!h;return(0,q.useEffect)(()=>{(Array.isArray(A)&&A.length===0||A===null)&&D.current?.()},[A]),(0,J.jsx)(wK,{onChange:j,multiple:s,accept:c,name:l,form:u,resetRef:IM(D,S),disabled:h,capture:g,inputProps:_,children:e=>(0,J.jsx)(_U,{component:x||`button`,rightSection:v,__clearSection:N,__clearable:P,__clearSectionMode:p,...e,...E,__staticSelector:`FileInput`,multiline:!0,type:`button`,pointer:!0,__stylesApiProps:t,unstyled:n,size:y,classNames:C,styles:w,attributes:T,children:M?(0,J.jsx)(d,{value:A}):(0,J.jsx)(mU.Placeholder,{__staticSelector:`FileInput`,classNames:O,styles:k,attributes:T,children:b})})})});EK.classes=_U.classes,EK.displayName=`@mantine/core/FileInput`;var[DK,OK]=Bj(`Grid component was not found in tree`),kK=(e,t)=>{if(e===`content`)return`auto`;if(e===`auto`)return`0rem`;if(e)return e===t?`100%`:`calc(${100*e/t}% - ${(t-e)/t} * var(--grid-column-gap))`},AK=(e,t,n)=>n||e===`auto`?`100%`:e===`content`?`unset`:kK(e,t),jK=(e,t)=>{if(e)return e===`auto`||t?`1`:`auto`},MK=(e,t)=>{if(e===0)return`0`;if(e)return`calc(${100*e/t}% + ${e/t} * var(--grid-column-gap))`};function NK({span:e,order:t,offset:n,align:r,selector:i}){let a=EP(),o=OK(),s=o.breakpoints||a.breakpoints,c=aM(e),l=c===void 0?12:c,u=Lj({"--col-order":aM(t)?.toString(),"--col-flex-grow":jK(l,o.grow),"--col-flex-basis":kK(l,o.columns),"--col-width":l===`content`?`auto`:void 0,"--col-max-width":AK(l,o.columns,o.grow),"--col-offset":MK(aM(n),o.columns),"--col-align-self":aM(r)}),d=Oj(s).reduce((i,a)=>(i[a]||(i[a]={}),typeof t==`object`&&t[a]!==void 0&&(i[a][`--col-order`]=t[a]?.toString()),typeof e==`object`&&e[a]!==void 0&&(i[a][`--col-flex-grow`]=jK(e[a],o.grow),i[a][`--col-flex-basis`]=kK(e[a],o.columns),i[a][`--col-width`]=e[a]===`content`?`auto`:void 0,i[a][`--col-max-width`]=AK(e[a],o.columns,o.grow)),typeof n==`object`&&n[a]!==void 0&&(i[a][`--col-offset`]=MK(n[a],o.columns)),typeof r==`object`&&r[a]!==void 0&&(i[a][`--col-align-self`]=r[a]),i),{}),f=iM(Oj(d),s).filter(e=>Oj(d[e.value]).length>0).map(e=>({query:o.type===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:d[e.value]}));return(0,J.jsx)(oF,{styles:u,media:o.type===`container`?void 0:f,container:o.type===`container`?f:void 0,selector:i})}var PK={container:`m_8478a6da`,root:`m_410352e9`,inner:`m_dee7bd2f`,col:`m_96bdd299`},FK={span:12},IK=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,span:o,order:s,offset:c,align:l,...u}=Z(`GridCol`,FK,e),d=OK(),f=AF();return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(NK,{selector:`.${f}`,span:o,order:s,offset:c,align:l}),(0,J.jsx)($,{...d.getStyles(`col`,{className:DN(n,f),style:r,classNames:t,styles:i}),...u})]})});IK.classes=PK,IK.displayName=`@mantine/core/GridCol`;function LK({gap:e,rowGap:t,columnGap:n,selector:r,breakpoints:i,type:a}){let o=EP(),s=i||o.breakpoints,c=Lj({"--grid-gap":Zj(aM(e)),"--grid-row-gap":Zj(aM(t)),"--grid-column-gap":Zj(aM(n))}),l=Oj(s).reduce((r,i)=>(r[i]||(r[i]={}),typeof e==`object`&&e[i]!==void 0&&(r[i][`--grid-gap`]=Zj(e[i])),typeof t==`object`&&t[i]!==void 0&&(r[i][`--grid-row-gap`]=Zj(t[i])),typeof n==`object`&&n[i]!==void 0&&(r[i][`--grid-column-gap`]=Zj(n[i])),r),{}),u=iM(Oj(l),s).filter(e=>Oj(l[e.value]).length>0).map(e=>({query:a===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:l[e.value]}));return(0,J.jsx)(oF,{styles:c,media:a===`container`?void 0:u,container:a===`container`?u:void 0,selector:r})}var RK={gap:`md`,columns:12},zK=TN((e,{justify:t,align:n,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":n,"--grid-overflow":r}})),BK=Q(e=>{let t=Z(`Grid`,RK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,grow:c,gap:l,rowGap:u,columnGap:d,columns:f,align:p,justify:m,children:h,breakpoints:g,type:_,attributes:v,...y}=t,b=rF({name:`Grid`,classes:PK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:zK}),x=AF();return _===`container`&&g?(0,J.jsxs)(DK,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,J.jsx)(LK,{selector:`.${x}`,...t}),(0,J.jsx)(`div`,{...b(`container`),children:(0,J.jsx)($,{...b(`root`,{className:x}),...y,children:(0,J.jsx)(`div`,{...b(`inner`),children:h})})})]}):(0,J.jsxs)(DK,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,J.jsx)(LK,{selector:`.${x}`,...t}),(0,J.jsx)($,{...b(`root`,{className:x}),...y,children:(0,J.jsx)(`div`,{...b(`inner`),children:h})})]})});BK.classes=PK,BK.varsResolver=zK,BK.displayName=`@mantine/core/Grid`,BK.Col=IK;function VK({color:e,theme:t,defaultShade:n}){let r=WN({color:e,theme:t});return r.isThemeColor?r.shade===void 0?`var(--mantine-color-${r.color}-${n})`:`var(${r.variable})`:e}var HK={root:`m_bcb3f3c2`},UK={color:`yellow`},WK=TN((e,{color:t})=>({root:{"--mark-bg-dark":VK({color:t,theme:e,defaultShade:5}),"--mark-bg-light":VK({color:t,theme:e,defaultShade:2})}})),GK=Q(e=>{let t=Z(`Mark`,UK,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,variant:l,attributes:u,...d}=t;return(0,J.jsx)($,{component:`mark`,variant:l,...rF({name:`Mark`,props:t,className:r,style:i,classes:HK,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:WK})(`root`),...d})});GK.classes=HK,GK.varsResolver=WK,GK.displayName=`@mantine/core/Mark`;function KK(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,`\\$&`)}function qK(e,t,n={}){if(t==null)return[{chunk:e,highlighted:!1}];let r=Array.isArray(t)?t.map(KK):KK(t);if(!(Array.isArray(r)?r.filter(e=>e.trim().length>0).length>0:r.trim()!==``))return[{chunk:e,highlighted:!1}];let i=typeof r==`string`?r.trim():r.filter(e=>e.trim().length!==0).map(e=>e.trim()).sort((e,t)=>t.length-e.length).join(`|`),a=n.wholeWord?`\\b(${i})\\b`:`(${i})`,o=new RegExp(a,`gi`);return e.split(o).map((e,t)=>({chunk:e,highlighted:t%2==1})).filter(({chunk:e})=>e)}var JK={color:`yellow`,wholeWord:!1},YK=IF(e=>{let{unstyled:t,children:n,highlight:r,highlightStyles:i,color:a,wholeWord:o,...s}=Z(`Highlight`,JK,e),c=Array.isArray(r)&&typeof r[0]==`object`,l=new Map,u;u=c?r.map(e=>(e.color&&l.set(e.text.toLowerCase(),e.color),e.text)):Array.isArray(r)?r:[r];let d=qK(n,u,{wholeWord:o});return(0,J.jsx)(jU,{unstyled:t,...s,__staticSelector:`Highlight`,children:d.map(({chunk:e,highlighted:n},r)=>n?(0,J.jsx)(GK,{unstyled:t,color:l.get(e.toLowerCase())||a,style:i,"data-highlight":e,children:e},r):(0,J.jsx)(`span`,{children:e},r))})});YK.classes=jU.classes,YK.displayName=`@mantine/core/Highlight`;var XK={root:`m_9e117634`},ZK=TN((e,{radius:t,fit:n})=>({root:{"--image-radius":t===void 0?void 0:Qj(t),"--image-object-fit":n}})),QK=IF(e=>{let t=Z(`Image`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,onError:c,src:l,radius:u,fit:d,fallbackSrc:f,mod:p,attributes:m,...h}=t,[g,_]=(0,q.useState)(!l);(0,q.useEffect)(()=>_(!l),[l]);let v=rF({name:`Image`,classes:XK,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:ZK});return g&&f?(0,J.jsx)($,{component:`img`,src:f,...v(`root`),onError:c,mod:[`fallback`,p],...h}):(0,J.jsx)($,{component:`img`,...v(`root`),src:l,onError:e=>{c?.(e),_(!0)},mod:p,...h})});QK.classes=XK,QK.varsResolver=ZK,QK.displayName=`@mantine/core/Image`;var $K=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],eq={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function tq(e){Object.keys(eq).forEach(t=>{e.style.setProperty(t,eq[t],`important`)})}function nq(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of $K)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var rq=null;function iq(e,t,n=1,r=1/0){rq||(rq=document.createElement(`textarea`),rq.setAttribute(`tabindex`,`-1`),rq.setAttribute(`aria-hidden`,`true`),rq.setAttribute(`aria-label`,`autosize measurement`),tq(rq)),rq.parentNode===null&&document.body.appendChild(rq);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{rq.style[e]=o[e]}),tq(rq),rq.value=t;let c=s===`border-box`?rq.scrollHeight+a:rq.scrollHeight-i;rq.value=t,c=s===`border-box`?rq.scrollHeight+a:rq.scrollHeight-i,rq.value=`x`;let l=rq.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function aq({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,q.useRef)(null),s=IM(o,r),c=(0,q.useRef)(0),l=()=>{let n=o.current,r=nq(n);if(!r)return;let[i]=iq(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},u=e=>{a||l(),n?.(e)};return(0,q.useLayoutEffect)(l),(0,q.useEffect)(()=>{let e=()=>l();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,q.useEffect)(()=>{let e=()=>l();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,q.useEffect)(()=>{let e=e=>{if(o.current?.form===e.target&&!a){let e=o.current.value;requestAnimationFrame(()=>{o.current&&e!==o.current.value&&l()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[a]),(0,J.jsx)(`textarea`,{...i,onChange:u,ref:s})}var oq={size:`sm`},sq=Q(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,...o}=Z(`Textarea`,oq,e),s=t&&gN()!==`test`,c=s?{maxRows:n,minRows:r}:{};return(0,J.jsx)(_U,{component:s?aq:`textarea`,...o,__staticSelector:i||`Textarea`,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...c})});sq.classes=_U.classes,sq.displayName=`@mantine/core/Textarea`;var cq={root:`m_dc6f14e2`},lq=TN((e,{size:t})=>({root:{"--kbd-fz":Xj(t,`kbd-fz`)}})),uq=Q(e=>{let t=Z(`Kbd`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t;return(0,J.jsx)($,{component:`kbd`,...rF({name:`Kbd`,classes:cq,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:lq})(`root`),...l})});uq.classes=cq,uq.varsResolver=lq,uq.displayName=`@mantine/core/Kbd`;var[dq,fq]=Bj(`Menu component was not found in the tree`),pq={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,itemLabel:`m_5476e0d3`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},mq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`MenuDivider`,null,e);return(0,J.jsx)($,{...fq().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});mq.classes=pq,mq.displayName=`@mantine/core/MenuDivider`;var hq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=Z(`MenuDropdown`,null,e),f=(0,q.useRef)(null),p=fq(),m=nM(c,e=>{(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),h=nM(o,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),g=nM(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,J.jsxs)(YB.Dropdown,{...d,onMouseEnter:h,onMouseLeave:g,role:`menu`,"aria-orientation":`vertical`,ref:IM(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:m,children:[p.withInitialFocusPlaceholder&&(0,J.jsx)(`div`,{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),l]})});hq.classes=pq,hq.displayName=`@mantine/core/MenuDropdown`;var gq=(0,q.createContext)(null),_q=IF(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,ref:p,...m}=Z(`MenuItem`,null,e),h=fq(),g=(0,q.use)(gq),_=EP(),{dir:v}=WF(),y=(0,q.useRef)(null),b=m,x=nM(b.onClick,()=>{f||(typeof s==`boolean`?s&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),S=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,C=o?WN({color:o,theme:_}):null,w=nM(b.onKeyDown,e=>{e.key===`ArrowLeft`&&g&&(g.close(),g.focusParentItem())});return(0,J.jsxs)(oB,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:IM(y,p),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onClick:x,onKeyDown:Gj({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:w}),__vars:{"--menu-item-color":C?.isThemeColor&&C?.shade===void 0?`var(--mantine-color-${C.color}-6)`:S?.color,"--menu-item-hover":S?.hover},children:[c&&(0,J.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:c}),u&&(0,J.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),children:u}),l&&(0,J.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:l})]})});_q.classes=pq,_q.displayName=`@mantine/core/MenuItem`;var vq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`MenuLabel`,null,e);return(0,J.jsx)($,{...fq().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});vq.classes=pq,vq.displayName=`@mantine/core/MenuLabel`;var yq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=Z(`MenuSubDropdown`,null,e),f=(0,q.useRef)(null),p=fq(),m=(0,q.use)(gq),h=nM(o,m?.open),g=nM(s,m?.close);return(0,J.jsx)(YB.Dropdown,{...d,onMouseEnter:h,onMouseLeave:g,role:`menu`,"aria-orientation":`vertical`,ref:IM(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:l})});yq.classes=pq,yq.displayName=`@mantine/core/MenuSubDropdown`;var bq=IF(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,leftSection:s,rightSection:c,children:l,disabled:u,"data-disabled":d,closeMenuOnClick:f,ref:p,...m}=Z(`MenuSubItem`,null,e),h=fq(),g=(0,q.use)(gq),_=EP(),{dir:v}=WF(),y=(0,q.useRef)(null),b=m,x=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,S=o?WN({color:o,theme:_}):null,C=nM(b.onKeyDown,e=>{e.key===`ArrowRight`&&(g?.open(),g?.focusFirstItem()),e.key===`ArrowLeft`&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),w=nM(b.onClick,()=>{!d&&f&&h.closeDropdownImmediately()}),T=nM(b.onMouseEnter,g?.open),E=nM(b.onMouseLeave,g?.close);return(0,J.jsxs)(oB,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:IM(y,p),role:`menuitem`,disabled:u,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:T,onMouseLeave:E,onClick:w,onKeyDown:Gj({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:C}),__vars:{"--menu-item-color":S?.isThemeColor&&S?.shade===void 0?`var(--mantine-color-${S.color}-6)`:x?.color,"--menu-item-hover":x?.hover},children:[s&&(0,J.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:s}),l&&(0,J.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),children:l}),(0,J.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:c||(0,J.jsx)(EU,{...h.getStyles(`chevron`),size:14})})]})});bq.classes=pq,bq.displayName=`@mantine/core/MenuSubItem`;function xq({children:e,refProp:t}){if(!zj(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return fq(),(0,J.jsx)(YB.Target,{refProp:t,popupType:`menu`,children:e})}xq.displayName=`@mantine/core/MenuSubTarget`;var Sq={offset:0,position:`right-start`,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Cq(e){let{children:t,closeDelay:n,openDelay:r,...i}=Z(`MenuSub`,Sq,e),a=MM(),[o,{open:s,close:c}]=aN(!1),l=(0,q.use)(gq),{openDropdown:u,closeDropdown:d}=vB({open:s,close:c,closeDelay:n,openDelay:r});return(0,J.jsx)(gq,{value:{opened:o,close:d,open:u,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${a}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${a}-target`)?.focus()},16),parentContext:l},children:(0,J.jsx)(YB,{opened:o,withinPortal:!1,withArrow:!1,id:a,...i,children:t})})}Cq.extend=e=>e,Cq.displayName=`@mantine/core/MenuSub`,Cq.Target=xq,Cq.Dropdown=yq,Cq.Item=bq;var wq={refProp:`ref`};function Tq(e){let{children:t,refProp:n,...r}=Z(`MenuTarget`,wq,e),i=wN(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=fq(),o=i.props,s=nM(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=nM(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=nM(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,J.jsx)(YB.Target,{refProp:n,popupType:`menu`,...r,children:(0,q.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Tq.displayName=`@mantine/core/MenuTarget`;var Eq={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1},Dq=Q(e=>{let t=Z(`Menu`,Eq,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:C,...w}=t,T=rF({name:`Menu`,classes:pq,props:t,classNames:h,styles:g,unstyled:_,attributes:C}),[E,D]=zM({value:a,defaultValue:o,finalValue:!1,onChange:c}),[O,k]=(0,q.useState)(!1),A=()=>{D(!1),k(!1),E&&i?.()},j=()=>{D(!0),!E&&r?.()},M=()=>{E?A():j()},{openDropdown:N,closeDropdown:P}=vB({open:j,close:A,closeDelay:m,openDelay:p}),F=e=>oM(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:ee,resolvedStyles:I}=UP({classNames:h,styles:g,props:t});return(0,J.jsx)(dq,{value:{getStyles:T,opened:E,toggleDropdown:M,getItemIndex:F,openedViaClick:O,setOpenedViaClick:k,closeOnItemClick:l,closeDropdown:f===`click`?A:P,openDropdown:f===`click`?j:N,closeDropdownImmediately:A,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S},children:(0,J.jsx)(YB,{returnFocus:!0,...w,opened:E,onChange:M,defaultOpened:o,trapFocus:x?!1:s,closeOnEscape:d,__staticSelector:`Menu`,classNames:ee,styles:I,unstyled:_,variant:v,keepMounted:x,children:n})})});Dq.displayName=`@mantine/core/Menu`,Dq.classes=pq,Dq.Item=_q,Dq.Label=vq,Dq.Dropdown=hq,Dq.Target=Tq,Dq.Divider=mq,Dq.Sub=Cq;var[Oq,kq]=Bj(`Modal component was not found in tree`),Aq={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},jq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalBody`,null,e);return(0,J.jsx)(RH,{...kq().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});jq.classes=Aq,jq.displayName=`@mantine/core/ModalBody`;var Mq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalCloseButton`,null,e);return(0,J.jsx)(zH,{...kq().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});Mq.classes=Aq,Mq.displayName=`@mantine/core/ModalCloseButton`;var Nq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=Z(`ModalContent`,null,e),l=kq(),u=l.scrollAreaComponent||qH;return(0,J.jsx)(BH,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,J.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${X(l.yOffset)} * 2))`},children:o})})});Nq.classes=Aq,Nq.displayName=`@mantine/core/ModalContent`;var Pq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalHeader`,null,e);return(0,J.jsx)(VH,{...kq().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Pq.classes=Aq,Pq.displayName=`@mantine/core/ModalHeader`;var Fq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalOverlay`,null,e);return(0,J.jsx)(WH,{...kq().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});Fq.classes=Aq,Fq.displayName=`@mantine/core/ModalOverlay`;var Iq={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:qj(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},Lq=TN((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:Qj(t),"--modal-size":Xj(n,`modal-size`),"--modal-y-offset":X(r),"--modal-x-offset":X(i)}})),Rq=Q(e=>{let t=Z(`ModalRoot`,Iq,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=rF({name:m,classes:Aq,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Lq});return(0,J.jsx)(Oq,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,J.jsx)(FH,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===nB.Autosize||void 0,unstyled:o,...g})})});Rq.classes=Aq,Rq.varsResolver=Lq,Rq.displayName=`@mantine/core/ModalRoot`;var zq=(0,q.createContext)(null);function Bq({children:e}){let[t,n]=(0,q.useState)([]),[r,i]=(0,q.useState)(qj(`modal`));return(0,J.jsx)(zq,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Bq.displayName=`@mantine/core/ModalStack`;var Vq=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ModalTitle`,null,e);return(0,J.jsx)(KH,{...kq().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});Vq.classes=Aq,Vq.displayName=`@mantine/core/ModalTitle`;var Hq={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:qj(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},Uq=Q(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=Z(`Modal`,Hq,e),f=(0,q.use)(zq),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l)}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,q.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||qj(`modal`)):f.removeModal(l))},[c,l,u]),(0,J.jsxs)(Rq,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,J.jsx)(Fq,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,J.jsxs)(Nq,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,J.jsxs)(Pq,{children:[t&&(0,J.jsx)(Vq,{children:t}),i&&(0,J.jsx)(Mq,{...a})]}),(0,J.jsx)(jq,{children:o})]})]})});Uq.classes=Aq,Uq.displayName=`@mantine/core/Modal`,Uq.Root=Rq,Uq.Overlay=Fq,Uq.Content=Nq,Uq.Body=jq,Uq.Header=Pq,Uq.Title=Vq,Uq.CloseButton=Mq,Uq.Stack=Bq;var Wq=(0,q.createContext)(null),Gq={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},Kq=(0,q.createContext)(null),qq=TN((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?Xj(n,`pg-gap`):Xj(t)}})),Jq=Q(e=>{let t=Z(`PillGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,disabled:l,attributes:u,...d}=t,f=(0,q.use)(Wq)?.size||c||void 0,p=rF({name:`PillGroup`,classes:Gq,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:qq,stylesCtx:{size:f},rootSelector:`group`});return(0,J.jsx)(Kq,{value:{size:f,disabled:l},children:(0,J.jsx)($,{size:f,...p(`group`),...d})})});Jq.classes=Gq,Jq.varsResolver=qq,Jq.displayName=`@mantine/core/PillGroup`;var Yq={variant:`default`},Xq=TN((e,{radius:t},{size:n})=>({root:{"--pill-fz":Xj(n,`pill-fz`),"--pill-height":Xj(n,`pill-height`),"--pill-radius":t===void 0?void 0:Qj(t)}})),Zq=Q(e=>{let t=Z(`Pill`,Yq,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,variant:c,children:l,withRemoveButton:u,onRemove:d,removeButtonProps:f,radius:p,size:m,disabled:h,mod:g,attributes:_,...v}=t,y=(0,q.use)(Kq),b=(0,q.use)(Wq),x=m||y?.size||void 0,S=b?.variant===`filled`?`contrast`:c||`default`,C=rF({name:`Pill`,classes:Gq,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:Xq,stylesCtx:{size:x}});return(0,J.jsxs)($,{component:`span`,variant:S,size:x,...C(`root`,{variant:S}),mod:[{"with-remove":u&&!h,disabled:h||y?.disabled},g],...v,children:[(0,J.jsx)(`span`,{...C(`label`),children:l}),u&&(0,J.jsx)(gV,{variant:`transparent`,radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:o,...f,...C(`remove`,{className:f?.className,style:f?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),f?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),d?.(),f?.onClick?.(e)}})]})});Zq.classes=Gq,Zq.varsResolver=Xq,Zq.displayName=`@mantine/core/Pill`,Zq.Group=Jq;var Qq={field:`m_45c4369d`},$q={type:`visible`},eJ=Q(e=>{let t=Z(`PillsInputField`,$q,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,type:c,disabled:l,id:u,pointer:d,mod:f,attributes:p,ref:m,...h}=t,g=(0,q.use)(Wq),_=(0,q.use)(QH),v=rF({name:`PillsInputField`,classes:Qq,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,rootSelector:`field`}),y=l||g?.disabled;return(0,J.jsx)($,{component:`input`,ref:IM(m,g?.fieldRef),"data-type":c,disabled:y,mod:[{disabled:y,pointer:d},f],...v(`field`),...h,id:_?.inputId||u,"aria-invalid":g?.hasError,"aria-describedby":_?.describedBy,type:`text`,onMouseDown:e=>!d&&e.stopPropagation()})});eJ.classes=Qq,eJ.displayName=`@mantine/core/PillsInputField`;var tJ={size:`sm`},nJ=Q(e=>{let{children:t,onMouseDown:n,onClick:r,size:i,disabled:a,__staticSelector:o,error:s,variant:c,...l}=Z(`PillsInput`,tJ,e),u=(0,q.useRef)(null);return(0,J.jsx)(Wq,{value:{fieldRef:u,size:i,disabled:a,hasError:!!s,variant:c},children:(0,J.jsx)(_U,{size:i,error:s,variant:c,component:`div`,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),n?.(e),u.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(u.current?.focus(),r?.(e))},...l,multiline:!0,disabled:a,__staticSelector:o||`PillsInput`,withAria:!1,children:t})})});nJ.displayName=`@mantine/core/PillsInput`,nJ.classes=_U.classes,nJ.Field=eJ;function rJ(e){return typeof e==`string`?e.trim().toLowerCase():e}function iJ({data:e,value:t}){let n=t.map(rJ);return e.reduce((e,t)=>(GW(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(rJ(e.value))===-1)}):n.indexOf(rJ(t.value))===-1&&e.push(t),e),[])}var aJ={xs:41,sm:50,md:60,lg:72,xl:89},oJ={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},sJ=FF(e=>{let t=Z(`MultiSelect`,oJ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,value:l,defaultValue:u,onChange:d,onKeyDown:f,variant:p,data:m,dropdownOpened:h,defaultDropdownOpened:g,onDropdownOpen:_,onDropdownClose:v,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,filter:C,limit:w,withScrollArea:T,maxDropdownHeight:E,searchValue:D,defaultSearchValue:O,onSearchChange:k,readOnly:A,disabled:j,onFocus:M,onBlur:N,radius:P,rightSection:F,rightSectionWidth:ee,rightSectionPointerEvents:I,rightSectionProps:te,leftSection:ne,leftSectionWidth:L,leftSectionPointerEvents:re,leftSectionProps:ie,inputContainer:ae,inputWrapperOrder:oe,withAsterisk:se,labelProps:ce,descriptionProps:le,errorProps:ue,wrapperProps:R,description:de,label:z,error:fe,maxValues:pe,searchable:me,nothingFoundMessage:he,withCheckIcon:ge,withAlignedLabels:_e,checkIconPosition:ve,hidePickedOptions:ye,withErrorStyles:be,name:B,form:xe,id:V,clearable:H,clearSectionMode:Se,clearButtonProps:Ce,hiddenInputProps:we,placeholder:Te,hiddenInputValuesDivider:Ee,required:De,mod:Oe,renderOption:ke,renderPill:Ae,onRemove:je,onClear:Me,onMaxValues:Ne,scrollAreaProps:U,chevronColor:Pe,attributes:Fe,clearSearchOnChange:Ie,openOnFocus:Le,...Re}=t,ze=MM(V),Be=oW(m),Ve=sW(Be),He=(0,q.useRef)({}),Ue=FW({opened:h,defaultOpened:g,onDropdownOpen:()=>{_?.(),b&&Ue.selectFirstOption()},onDropdownClose:()=>{v?.(),Ue.resetSelectedOption()}}),{styleProps:We,rest:{type:Ge,autoComplete:Ke,...qe}}=sF(Re),[Je,Ye]=zM({value:l,defaultValue:u,finalValue:[],onChange:d}),[Xe,Ze]=zM({value:D,defaultValue:O,finalValue:``,onChange:k}),Qe=e=>{Ze(e),Ue.resetSelectedOption()},$e=rF({name:`MultiSelect`,classes:{},props:t,classNames:n,styles:a,unstyled:o,attributes:Fe}),{resolvedClassNames:et,resolvedStyles:tt}=UP({props:t,styles:a,classNames:n}),nt=e=>{f?.(e),e.key===` `&&!me&&(e.preventDefault(),Ue.toggleDropdown()),e.key===`Backspace`&&Xe.length===0&&Je.length>0&&(je?.(Je[Je.length-1]),Ye(Je.slice(0,Je.length-1)))},rt=Je.map((e,t)=>{let n=Ve[`${e}`]||He.current[`${e}`];return Ae?(0,J.jsx)(q.Fragment,{children:Ae({option:n,value:e,onRemove:()=>{Ye(Je.filter(t=>e!==t)),je?.(e)},disabled:j})},`${e}-${t}`):(0,J.jsx)(Zq,{withRemoveButton:!A&&!Ve[`${e}`]?.disabled,onRemove:()=>{Ye(Je.filter(t=>e!==t)),je?.(e)},unstyled:o,disabled:j,...$e(`pill`),children:n?.label||e},`${e}-${t}`)});(0,q.useEffect)(()=>{y&&Ue.selectFirstOption()},[y,Xe]),(0,q.useEffect)(()=>{Je.forEach(e=>{`${e}`in Ve&&(He.current[`${e}`]=Ve[`${e}`])})},[Ve,Je]);let it=(0,J.jsx)(RW.ClearButton,{...Ce,onClear:()=>{Me?.(),Ye([]),Qe(``)}}),at=iJ({data:Be,value:Je}),ot=H&&Je.length>0&&!j&&!A,st=ot?{paddingInlineEnd:aJ[c]??aJ.sm}:void 0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(RW,{store:Ue,classNames:et,styles:tt,unstyled:o,size:c,readOnly:A,__staticSelector:`MultiSelect`,attributes:Fe,onOptionSubmit:e=>{x?.(e),Ie&&Qe(``),Ue.updateSelectedOptionIndex(`selected`),Je.includes(Ve[`${e}`].value)?(Ye(Je.filter(t=>t!==Ve[`${e}`].value)),je?.(Ve[`${e}`].value)):Je.length<pe?Ye([...Je,Ve[`${e}`].value]):Ne?.()},...S,children:[(0,J.jsx)(RW.DropdownTarget,{children:(0,J.jsx)(nJ,{...We,__staticSelector:`MultiSelect`,classNames:et,styles:tt,unstyled:o,size:c,className:r,style:i,variant:p,disabled:j,radius:P,__defaultRightSection:(0,J.jsx)(RW.Chevron,{size:c,error:fe,unstyled:o,color:Pe}),__clearSection:it,__clearable:ot,__clearSectionMode:Se,rightSection:F,rightSectionPointerEvents:I||`none`,rightSectionWidth:ee,rightSectionProps:te,leftSection:ne,leftSectionWidth:L,leftSectionPointerEvents:re,leftSectionProps:ie,inputContainer:ae,inputWrapperOrder:oe,withAsterisk:se,labelProps:ce,descriptionProps:le,errorProps:ue,wrapperProps:R,description:de,label:z,error:fe,withErrorStyles:be,__stylesApiProps:{...t,rightSectionPointerEvents:I||`none`,multiline:!0},pointer:!me,onClick:()=>me?Ue.openDropdown():Ue.toggleDropdown(),"data-expanded":Ue.dropdownOpened||void 0,id:ze,required:De,mod:Oe,attributes:Fe,children:(0,J.jsxs)(Zq.Group,{attributes:Fe,disabled:j,unstyled:o,...$e(`pillsList`,{style:st}),children:[rt,(0,J.jsx)(RW.EventsTarget,{autoComplete:Ke,withExpandedAttribute:!0,children:(0,J.jsx)(nJ.Field,{...qe,id:ze,placeholder:Te,type:!me&&!Te?`hidden`:`visible`,...$e(`inputField`),unstyled:o,onFocus:e=>{M?.(e),Le&&me&&Ue.openDropdown()},onBlur:e=>{N?.(e),Ue.closeDropdown(),Qe(``)},onKeyDown:nt,value:Xe,onChange:e=>{Qe(e.currentTarget.value),me&&Ue.openDropdown(),y&&Ue.selectFirstOption()},disabled:j,readOnly:A||!me,pointer:!me})})]})})}),(0,J.jsx)(ZW,{data:ye?at:Be,hidden:A||j,filter:C,search:Xe,limit:w,hiddenWhenEmpty:!he,withScrollArea:T,maxDropdownHeight:E,filterOptions:me,value:Je,checkIconPosition:ve,withCheckIcon:ge,withAlignedLabels:_e,nothingFoundMessage:he,unstyled:o,labelId:z?`${ze}-label`:void 0,"aria-label":z?void 0:Re[`aria-label`],renderOption:ke,scrollAreaProps:U})]}),(0,J.jsx)(RW.HiddenInput,{name:B,valuesDivider:Ee,value:Je,form:xe,disabled:j,...we})]})});sJ.classes={..._U.classes,...RW.classes},sJ.displayName=`@mantine/core/MultiSelect`;var cJ={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},lJ={withCloseButton:!0},uJ=TN((e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:Qj(t),"--notification-color":n?GN(n,e):void 0}})),dJ=Q(e=>{let t=Z(`Notification`,lJ,e),{className:n,color:r,radius:i,loading:a,withCloseButton:o,withBorder:s,title:c,icon:l,children:u,onClose:d,closeButtonProps:f,classNames:p,style:m,styles:h,unstyled:g,vars:_,mod:v,loaderProps:y,role:b,attributes:x,...S}=t,C=rF({name:`Notification`,classes:cJ,props:t,className:n,style:m,classNames:p,styles:h,unstyled:g,attributes:x,vars:_,varsResolver:uJ});return(0,J.jsxs)($,{...C(`root`),mod:[{"data-with-icon":!!l||a,"data-with-border":s},v],role:b||`alert`,...S,children:[l&&!a&&(0,J.jsx)(`div`,{...C(`icon`),children:l}),a&&(0,J.jsx)(rV,{size:28,color:r,...C(`loader`),...y}),(0,J.jsxs)(`div`,{...C(`body`),children:[c&&(0,J.jsx)(`div`,{...C(`title`),children:c}),(0,J.jsx)($,{...C(`description`),mod:{"data-with-title":!!c},children:u})]}),o&&(0,J.jsx)(gV,{iconSize:16,color:`gray`,...f,unstyled:g,onClick:e=>{f?.onClick?.(e),d?.()},...C(`closeButton`)})]})});dJ.classes=cJ,dJ.varsResolver=uJ,dJ.displayName=`@mantine/core/Notification`;function fJ(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var pJ;(function(e){e.event=`event`,e.props=`prop`})(pJ||={});function mJ(){}function hJ(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}}function gJ(e){return!!(e||``).match(/\d/)}function _J(e){return e==null}function vJ(e){return typeof e==`number`&&isNaN(e)}function yJ(e){return _J(e)||vJ(e)||typeof e==`number`&&!isFinite(e)}function bJ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function xJ(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function SJ(e,t,n){var r=xJ(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function CJ(e){var t=(0,q.useRef)(e);return t.current=e,(0,q.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function wJ(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function TJ(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function EJ(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function DJ(e,t){return Array(t+1).join(e)}function OJ(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+DJ(`0`,Math.abs(o))+i:o>=s?i+=DJ(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function kJ(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=wJ(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=EJ(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function AJ(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var jJ=hJ(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),MJ=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function NJ(e,t,n){return Math.min(Math.max(e,t),n)}function PJ(e){return Math.max(e.selectionStart,e.selectionEnd)}function FJ(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function IJ(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function LJ(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function RJ(e,t,n,r,i,a,o){o===void 0&&(o=LJ);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function zJ(e,t,n,r){var i=e.length;if(t=NJ(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function BJ(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(gJ(e[n])||gJ(e[n-1]));return t}function VJ(e,t,n,r,i,a){a===void 0&&(a=mJ);var o=CJ(function(e,t){var n,a;return yJ(e)?(a=``,n=``):typeof e==`number`||t?(a=typeof e==`number`?OJ(e):e,n=r(a)):(a=i(e,void 0),n=r(a)),{formattedValue:n,numAsString:a}}),s=(0,q.useState)(function(){return o(_J(e)?t:e,n)}),c=s[0],l=s[1],u=CJ(function(e,t){e.formattedValue!==c.formattedValue&&l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}),d=e,f=n;_J(e)&&(d=c.numAsString,f=!0);var p=o(d,f);return(0,q.useMemo)(function(){l(p)},[p.formattedValue]),(0,q.useEffect)(function(){if(!_J(t)&&_J(e)&&c.formattedValue!==``){var n=parseFloat(c.numAsString);u({formattedValue:c.formattedValue,value:c.numAsString,floatValue:isNaN(n)?void 0:n},{event:void 0,source:pJ.props})}},[]),[c,u]}function HJ(e){return e.replace(/[^0-9]/g,``)}function UJ(e){return e}function WJ(e){var t=e.type;t===void 0&&(t=`text`);var n=e.displayType;n===void 0&&(n=`input`);var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=UJ);var s=e.removeFormatting;s===void 0&&(s=HJ);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=mJ);var p=e.onKeyDown;p===void 0&&(p=mJ);var m=e.onMouseUp;m===void 0&&(m=mJ);var h=e.onFocus;h===void 0&&(h=mJ);var g=e.onBlur;g===void 0&&(g=mJ);var _=e.value,v=e.getCaretBoundary;v===void 0&&(v=BJ);var y=e.isValidInputCharacter;y===void 0&&(y=gJ);var b=e.isCharacterSame,x=fJ(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),S=VJ(_,c,!!l,o,s,u),C=S[0],w=C.formattedValue,T=C.numAsString,E=S[1],D=(0,q.useRef)(),O=(0,q.useRef)({formattedValue:w,numAsString:T}),k=function(e,t){O.current={formattedValue:e.formattedValue,numAsString:e.value},E(e,t)},A=(0,q.useState)(!1),j=A[0],M=A[1],N=(0,q.useRef)(null),P=(0,q.useRef)({setCaretTimeout:null,focusTimeout:null});(0,q.useEffect)(function(){return M(!0),function(){clearTimeout(P.current.setCaretTimeout),clearTimeout(P.current.focusTimeout)}},[]);var F=o,ee=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},I=function(e,t,n){e.selectionStart===0&&e.selectionEnd===e.value.length||(AJ(e,t),P.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&AJ(e,t)},0))},te=function(e,t,n){return zJ(e,t,v(e),n)},ne=function(e,t,n){var r=v(t),i=RJ(t,w,e,n,r,y,b);return i=zJ(t,i,r),i},L=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=PJ(n);n.value=t,o=ne(s,t,c),o!==void 0&&I(n,o,t)}t!==w&&k(ee(t,a),{event:i,source:r})};(0,q.useEffect)(function(){var e=O.current,t=e.formattedValue,n=e.numAsString;(w!==t||T!==n)&&k(ee(w,T),{event:void 0,source:pJ.props})},[w,T]);var re=N.current?PJ(N.current):void 0;(typeof window<`u`?q.useLayoutEffect:q.useEffect)(function(){var e=N.current;if(w!==O.current.formattedValue&&e){var t=ne(O.current.formattedValue,w,re);e.value=w,I(e,t,w)}},[w]);var ie=function(e,t,n){var r=t.target,i=D.current?MJ(D.current,r.selectionEnd):jJ(w,e),a=Object.assign(Object.assign({},i),{lastValue:w}),o=s(e,a),c=F(o);if(o=s(c,void 0),d&&!d(ee(c,o))){var l=t.target,u=ne(e,w,PJ(l));return l.value=w,I(l,u,w),!1}return L({formattedValue:c,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},ae=function(e,t){t===void 0&&(t=0),D.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},oe=function(e){var t=e.target.value;ie(t,e,pJ.event)&&f(e),D.current=void 0},se=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c){p(e),ae(t,s);return}var l=o;c?(l=te(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!y(a[o])?l=te(a,o,`right`):n===`Backspace`&&!y(a[o])&&(l=te(a,o,`left`)),l!==o&&I(t,l,a),p(e),ae(t,s)},ce=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=te(r,e);i!==e&&I(t,i,r)}};n(),requestAnimationFrame(function(){n()}),m(e),ae(t)},le=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;N.current=t,P.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=te(a,r);o!==r&&!(r===0&&i===a.length)&&I(t,o,a),h(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},ue=function(e){N.current=null,clearTimeout(P.current.focusTimeout),clearTimeout(P.current.setCaretTimeout),g(e)},R=j&&FJ()?`numeric`:void 0,de=Object.assign({inputMode:R},x,{type:t,value:w,onChange:oe,onKeyDown:se,onMouseUp:ce,onFocus:le,onBlur:ue});if(n===`text`)return i?q.createElement(q.Fragment,null,i(w,x)||null):q.createElement(`span`,Object.assign({},x,{ref:a}),w);if(r){var z=r;return q.createElement(z,Object.assign({},de,{ref:a}))}return q.createElement(`input`,Object.assign({},de,{ref:a}))}function GJ(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=KJ(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=wJ(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=EJ(m,n,!!r)),l&&(p=SJ(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function KJ(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function qJ(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function JJ(e,t){return RegExp(`(^-)|[0-9]|`+bJ(e),t?`g`:void 0)}function YJ(e,t,n){return e===``?!0:!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function XJ(e,t,n){var r;t===void 0&&(t=IJ(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=KJ(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(gJ(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=r?1:0;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=qJ(y?`-`+e:e,i),e=(e.match(JJ(m,!0))||[]).join(``);var O=e.indexOf(m);e=e.replace(new RegExp(bJ(m),`g`),function(e,t){return t===O?`.`:``});var k=wJ(e,i),A=k.beforeDecimal,j=k.afterDecimal,M=k.addNegation;return l.end-l.start<c.end-c.start&&A===``&&h&&!parseFloat(j)&&(e=M?`-`:``),e}function ZJ(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,Math.min(n.length+(a?1:0),e.length));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function QJ(e){var t=KJ(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
61
+ Decimal separator can't be same as thousand separator.
62
+ thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
63
+ decimalSeparator: `+r+` (default value for decimalSeparator is .)
64
+ `);return i.startsWith(`-`)&&a&&(console.error(`
65
+ Prefix can't start with '-' when allowNegative is true.
66
+ prefix: `+i+`
67
+ allowNegative: `+a+`
68
+ `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function $J(e){e=QJ(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=mJ);var a=e.onBlur;a===void 0&&(a=mJ);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=fJ(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=KJ(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return GJ(t,e)},y=function(t,n){return XJ(t,n,e)},b=_J(d)?u:d,x=f??YJ(b,l,t);_J(d)?_J(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return yJ(e)?e:(typeof e==`number`&&(e=OJ(e)),x&&typeof s==`number`?kJ(e,s,!!c):e)},C=VJ(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g?!0:gJ(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=jJ(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return ZJ(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length&&d!==`-`){e.preventDefault();return}if(a!==u){i(e);return}r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&AJ(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?(AJ(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&AJ(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&AJ(t,a-1),r===`Delete`&&d[a]===f&&AJ(t,a+1),i(e)},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=TJ(n)),c&&s&&(n=kJ(n,s,c)),n!==T&&D({formattedValue:GJ(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:pJ.event}),a(t)}})}function eY(e){var t=$J(e);return q.createElement(WJ,Object.assign({},t))}function tY({direction:e,style:t,...n}){return(0,J.jsx)(`svg`,{style:{width:`var(--ni-chevron-size)`,height:`var(--ni-chevron-size)`,transform:e===`up`?`rotate(180deg)`:void 0,...t},viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...n,children:(0,J.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var nY={root:`m_e2f5cd4e`,controls:`m_95e17d22`,control:`m_80b4b171`},rY=/^(0\.0*|-0(\.0*)?)$/,iY=/^-?0\d+(\.\d+)?\.?$/,aY=/\.\d*0$/,oY=/^-?\d+\.$/;function sY(e){return typeof e==`string`&&e!==``&&!Number.isNaN(Number(e))}function cY(e){return typeof e==`bigint`}function lY(e){return typeof e==`number`?e<2**53-1:e===``||sY(e)&&Number(e)<2**53-1}function uY(e,t){return e===``||e===`-`||!t&&e.startsWith(`-`)?!1:/^-?\d+$/.test(e)}function dY(e,t){return typeof e==`bigint`?!0:e===``||uY(e,t)}function fY(e){if(!/^-?\d+$/.test(e))return null;try{return BigInt(e)}catch{return null}}function pY(e){if(typeof e==`bigint`)return e;if(typeof e==`number`&&Number.isFinite(e)&&Number.isInteger(e))return BigInt(e)}function mY(e,t,n){return t!==void 0&&e<t?t:n!==void 0&&e>n?n:e}function hY(e){return e.toString().replace(`.`,``).length}function gY(e,t){return(typeof e==`number`?e<2**53-1:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&hY(t)<14&&t!==``}function _Y(e,t,n){return e===void 0?!0:(t===void 0||e>=t)&&(n===void 0||e<=n)}var vY={step:1,clampBehavior:`blur`,allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[`.`,`,`]},yY=TN((e,{size:t})=>({controls:{"--ni-chevron-size":Xj(t,`ni-chevron-size`)}}));function bY(e,t,n){let r=e.toString(),i=oY.test(r),a=r.replace(/^0+(?=\d)/,``),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>2**53-1)return t===void 0?a:t;let s=sM(o,n,t);return i?`${s.toString().replace(/^0+(?=\d)/,``)}.`:s}function xY(e,t){if(e===``||e===`-`)return e;let n=fY(e);return n===null?e:t.clampBehavior===`blur`?mY(n,t.min,t.max):n}var SY=FF(e=>{let t=Z(`NumberInput`,vY,e),{className:n,classNames:r,styles:i,unstyled:a,vars:o,onChange:s,onValueChange:c,value:l,defaultValue:u,max:d,min:f,step:p,hideControls:m,rightSection:h,isAllowed:g,clampBehavior:_,onBlur:v,allowDecimal:y,decimalScale:b,onKeyDown:x,onKeyDownCapture:S,handlersRef:C,startValue:w,disabled:T,rightSectionPointerEvents:E,allowNegative:D,readOnly:O,size:k,rightSectionWidth:A,stepHoldInterval:j,stepHoldDelay:M,allowLeadingZeros:N,withKeyboardEvents:P,trimLeadingZeroesOnBlur:F,allowedDecimalSeparators:ee,selectAllOnFocus:I,onMinReached:te,onMaxReached:ne,onFocus:L,attributes:re,ref:ie,...ae}=t,oe=D??!0,se=N??!0,ce=rF({name:`NumberInput`,classes:nY,props:t,classNames:r,styles:i,unstyled:a,attributes:re,vars:o,varsResolver:yY}),{resolvedClassNames:le,resolvedStyles:ue}=UP({classNames:r,styles:i,props:t}),R=(0,q.useRef)(cY(l)||cY(u)?`bigint`:`number`);cY(l)?R.current=`bigint`:typeof l==`number`&&(R.current=`number`);let de=R.current===`bigint`,[z,fe]=zM({value:l,defaultValue:u,finalValue:``,onChange:s}),pe=M!==void 0&&j!==void 0,me=(0,q.useRef)(null),he=(0,q.useRef)(null),ge=(0,q.useRef)(0),_e=typeof f==`number`?f:void 0,ve=typeof d==`number`?d:void 0,ye=typeof p==`number`?p:vY.step,be=typeof w==`number`?w:vY.startValue,B=pY(f),xe=pY(d),V=pY(p)??BigInt(1),H=pY(w)??BigInt(0),Se=e=>!uY(e,oe)||se&&iY.test(e)?e:fY(e)??e,Ce=e=>{let t=Number(e);return Number.isSafeInteger(t)?t:void 0},we=(e,t)=>{t.source===`event`&&fe(de?Se(e.value):gY(e.floatValue,e.value)&&!rY.test(e.value)&&!(se&&iY.test(e.value))&&!aY.test(e.value)&&!oY.test(e.value)?e.floatValue:e.value),c?.(e,t)},Te=e=>{let t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},Ee=e=>{me.current&&e!==void 0&&me.current.setSelectionRange(e,e)},De=(0,q.useRef)(Jj);De.current=()=>{if(de){if(!dY(z,oe))return;let e,t=z;if(typeof t==`bigint`){let n=t+V;xe!==void 0&&n>xe&&ne?.(),e=xe!==void 0&&n>xe?xe:n}else if(typeof t==`string`&&t!==``){let n=fY(t);if(n===null)return;let r=n+V;xe!==void 0&&r>xe&&ne?.(),e=xe!==void 0&&r>xe?xe:r}else e=mY(H,B,xe);let n=e.toString();fe(e),c?.({floatValue:Ce(e),formattedValue:n,value:n},{source:`increment`}),setTimeout(()=>Ee(me.current?.value.length),0);return}if(!lY(z))return;let e,t=Te(z),n=Te(ye),r=Math.max(t,n),i=10**r;if(!sY(z)&&(typeof z!=`number`||Number.isNaN(z)))e=sM(be,_e,ve);else if(ve!==void 0){let t=(Math.round(Number(z)*i)+Math.round(ye*i))/i;t>ve&&ne?.(),e=t<=ve?t:ve}else e=(Math.round(Number(z)*i)+Math.round(ye*i))/i;let a=e.toFixed(r);fe(parseFloat(a)),c?.({floatValue:parseFloat(a),formattedValue:a,value:a},{source:`increment`}),setTimeout(()=>Ee(me.current?.value.length),0)};let Oe=(0,q.useRef)(Jj);Oe.current=()=>{if(de){if(!dY(z,oe))return;let e,t=B===void 0?oe?void 0:BigInt(0):B,n=z;if(typeof n==`bigint`){let r=n-V;t!==void 0&&r<t&&te?.(),e=t!==void 0&&r<t?t:r}else if(typeof n==`string`&&n!==``){let r=fY(n);if(r===null)return;let i=r-V;t!==void 0&&i<t&&te?.(),e=t!==void 0&&i<t?t:i}else e=mY(H,t,xe);let r=e.toString();fe(e),c?.({floatValue:Ce(e),formattedValue:r,value:r},{source:`decrement`}),setTimeout(()=>Ee(me.current?.value.length),0);return}if(!lY(z))return;let e,t=_e===void 0?oe?-(2**53-1):0:_e,n=Te(z),r=Te(ye),i=Math.max(n,r),a=10**i;if(!sY(z)&&typeof z!=`number`||Number.isNaN(z))e=sM(be,t,ve);else{let n=(Math.round(Number(z)*a)-Math.round(ye*a))/a;t!==void 0&&n<t&&te?.(),e=t!==void 0&&n<t?t:n}let o=e.toFixed(i);fe(parseFloat(o)),c?.({floatValue:parseFloat(o),formattedValue:o,value:o},{source:`decrement`}),setTimeout(()=>Ee(me.current?.value.length),0)};let ke=e=>{let t=e.clipboardData.getData(`text`),n=ae.decimalSeparator||`.`,r=(ee||[`.`,`,`]).filter(e=>e!==n);if(r.some(e=>t.includes(e))){e.preventDefault();let i=t;r.forEach(e=>{i=i.split(e).join(n)});let a=me.current;if(a){let e=a.selectionStart??0,t=a.selectionEnd??0,n=a.value,r=n.substring(0,e)+i+n.substring(t);(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(a,r),a.dispatchEvent(new Event(`change`,{bubbles:!0}));let o=e+i.length;setTimeout(()=>Ee(o),0)}}ae.onPaste?.(e)},Ae=e=>{x?.(e),!(O||!P)&&(e.key===`ArrowUp`&&(e.preventDefault(),De.current?.()),e.key===`ArrowDown`&&(e.preventDefault(),Oe.current?.()))},je=e=>{if(S?.(e),e.key===`Backspace`){let t=me.current;t&&t.selectionStart===0&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),window.setTimeout(()=>Ee(0),0))}},Me=e=>{I&&setTimeout(()=>e.currentTarget.select(),0),L?.(e)},Ne=e=>{let t=z;de?(_===`blur`&&typeof t==`bigint`&&(t=mY(t,B,xe)),F&&typeof t==`string`&&(t=xY(t,{min:B,max:xe,clampBehavior:_}))):(_===`blur`&&typeof t==`number`&&(t=sM(t,_e,ve)),F&&typeof t==`string`&&Te(t)<15&&(t=bY(t,ve,_e))),z!==t&&fe(t),v?.(e)};PM(C,{increment:De.current,decrement:Oe.current});let U=e=>{e?De.current?.():Oe.current?.(),ge.current+=1},Pe=e=>{if(U(e),pe){let t=typeof j==`number`?j:j(ge.current);he.current=window.setTimeout(()=>Pe(e),t)}},Fe=(e,t)=>{e.preventDefault(),me.current?.focus(),U(t),pe&&(he.current=window.setTimeout(()=>Pe(t),M))},Ie=()=>{he.current&&window.clearTimeout(he.current),he.current=null,ge.current=0},Le=(0,J.jsxs)(`div`,{...ce(`controls`),children:[(0,J.jsx)(oB,{...ce(`control`),tabIndex:-1,"aria-hidden":!0,disabled:T||typeof z==`number`&&ve!==void 0&&z>=ve||typeof z==`bigint`&&xe!==void 0&&z>=xe,mod:{direction:`up`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Fe(e,!0)},onPointerUp:Ie,onPointerLeave:Ie,children:(0,J.jsx)(tY,{direction:`up`})}),(0,J.jsx)(oB,{...ce(`control`),tabIndex:-1,"aria-hidden":!0,disabled:T||typeof z==`number`&&_e!==void 0&&z<=_e||typeof z==`bigint`&&B!==void 0&&z<=B,mod:{direction:`down`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Fe(e,!1)},onPointerUp:Ie,onPointerLeave:Ie,children:(0,J.jsx)(tY,{direction:`down`})})]});return(0,J.jsx)(_U,{component:eY,allowNegative:D,className:DN(nY.root,n),size:k,...ae,inputMode:de?`numeric`:`decimal`,readOnly:O,disabled:T,value:typeof z==`bigint`?z.toString():z,getInputRef:IM(ie,me),onValueChange:we,rightSection:m||O||!(de?dY(z,oe):lY(z))?h:h||Le,classNames:le,styles:ue,unstyled:a,__staticSelector:`NumberInput`,decimalScale:de?0:y?b:0,onPaste:ke,onFocus:Me,onKeyDown:Ae,onKeyDownCapture:je,rightSectionPointerEvents:E??(T?`none`:void 0),rightSectionWidth:A??`var(--ni-right-section-width-${k||`sm`})`,allowLeadingZeros:N,allowedDecimalSeparators:ee,onBlur:Ne,attributes:re,isAllowed:e=>{if(!(!g||g(e)))return!1;if(_!==`strict`)return!0;if(!de)return _Y(e.floatValue,_e,ve);if(e.value===``||e.value===`-`)return!0;let t=fY(e.value);return t===null?!0:(B===void 0||t>=B)&&(xe===void 0||t<=xe)}})});SY.classes={..._U.classes,...nY},SY.varsResolver=yY,SY.displayName=`@mantine/core/NumberInput`;function CY({reveal:e}){return(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,style:{width:`var(--psi-icon-size)`,height:`var(--psi-icon-size)`},children:e?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),(0,J.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53`}),(0,J.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6`})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),(0,J.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z`}),(0,J.jsx)(`circle`,{cx:`128`,cy:`128`,r:`40`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`})]})})}var wY={root:`m_f61ca620`,input:`m_ccf8da4c`,innerInput:`m_f2d85dd2`,visibilityToggle:`m_b1072d44`},TY={visibilityToggleIcon:CY},EY=TN((e,{size:t})=>({root:{"--psi-icon-size":Xj(t,`psi-icon-size`),"--psi-button-size":Xj(t,`psi-button-size`)}})),DY=Q(e=>{let t=Z(`PasswordInput`,TY,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,required:c,error:l,leftSection:u,disabled:d,id:f,variant:p,inputContainer:m,description:h,label:g,size:_,errorProps:v,descriptionProps:y,labelProps:b,withAsterisk:x,inputWrapperOrder:S,wrapperProps:C,radius:w,rightSection:T,rightSectionWidth:E,rightSectionPointerEvents:D,leftSectionWidth:O,visible:k,defaultVisible:A,onVisibilityChange:j,visibilityToggleIcon:M,visibilityToggleButtonProps:N,rightSectionProps:P,leftSectionProps:F,leftSectionPointerEvents:ee,withErrorStyles:I,mod:te,attributes:ne,...L}=t,re=MM(f),[ie,ae]=zM({value:k,defaultValue:A,finalValue:!1,onChange:j}),oe=()=>ae(!ie),se=rF({name:`PasswordInput`,classes:wY,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ne,vars:s,varsResolver:EY}),{resolvedClassNames:ce,resolvedStyles:le}=UP({classNames:n,styles:a,props:t}),{styleProps:ue,rest:R}=sF(L),de=v?.id||`${re}-error`,z=y?.id||`${re}-description`,fe=`${l&&typeof l!=`boolean`?de:``} ${h?z:``}`,pe=fe.trim().length>0?fe.trim():void 0,me=(0,J.jsx)(dV,{...se(`visibilityToggle`),disabled:d,radius:w,"aria-pressed":ie,tabIndex:-1,"aria-label":`Toggle password visibility`,...N,variant:N?.variant??`subtle`,color:`gray`,unstyled:o,onTouchEnd:e=>{e.preventDefault(),N?.onTouchEnd?.(e),oe()},onMouseDown:e=>{e.preventDefault(),N?.onMouseDown?.(e),oe()},onKeyDown:e=>{N?.onKeyDown?.(e),e.key===` `&&(e.preventDefault(),oe())},children:(0,J.jsx)(M,{reveal:ie})});return(0,J.jsx)(mU.Wrapper,{required:c,id:re,label:g,error:l,description:h,size:_,classNames:ce,styles:le,__staticSelector:`PasswordInput`,__stylesApiProps:t,unstyled:o,withAsterisk:x,inputWrapperOrder:S,inputContainer:m,variant:p,labelProps:{...b,htmlFor:re},descriptionProps:{...y,id:z},errorProps:{...v,id:de},mod:te,attributes:ne,...se(`root`),...ue,...C,children:(0,J.jsx)(mU,{component:`div`,error:l,leftSection:u,size:_,classNames:{...ce,input:DN(wY.input,ce.input)},styles:le,radius:w,disabled:d,__staticSelector:`PasswordInput`,__stylesApiProps:t,rightSectionWidth:E,rightSection:T??me,variant:p,unstyled:o,leftSectionWidth:O,rightSectionPointerEvents:D||`all`,rightSectionProps:P,leftSectionProps:F,leftSectionPointerEvents:ee,withAria:!1,withErrorStyles:I,attributes:ne,children:(0,J.jsx)(`input`,{required:c,"data-invalid":!!l||void 0,"data-with-left-section":!!u||void 0,...se(`innerInput`),disabled:d,id:re,...R,"aria-describedby":pe,autoComplete:R.autoComplete||`off`,type:ie?`text`:`password`})})})});DY.classes={..._U.classes,...wY},DY.varsResolver=EY,DY.displayName=`@mantine/core/PasswordInput`;var[OY,kY]=Bj(`Progress.Root component was not found in tree`),AY={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},jY=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=Z(`ProgressLabel`,null,e);return(0,J.jsx)($,{...kY().getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...o})});jY.classes=AY,jY.displayName=`@mantine/core/ProgressLabel`;var MY=TN((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":Xj(t,`progress-size`),"--progress-radius":n===void 0?void 0:Qj(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),NY=Q(e=>{let t=Z(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,transitionDuration:l,orientation:u,attributes:d,mod:f,...p}=t,m=rF({name:`Progress`,classes:AY,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:MY});return(0,J.jsx)(OY,{value:{getStyles:m,autoContrast:c},children:(0,J.jsx)($,{mod:[{orientation:u},f],...m(`root`),...p})})});NY.classes=AY,NY.varsResolver=MY,NY.displayName=`@mantine/core/ProgressRoot`;var PY={withAria:!0},FY=Q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,value:o,withAria:s,color:c,striped:l,animated:u,mod:d,...f}=Z(`ProgressSection`,PY,e),p=kY(),m=EP(),h=s?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":o,"aria-valuetext":`${o}%`}:{};return(0,J.jsx)($,{...p.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...f,...h,mod:[{striped:l||u,animated:u},d],__vars:{"--progress-section-size":`${o}%`,"--progress-section-color":GN(c,m),"--progress-label-color":$N(p.autoContrast,m)?ZN({color:c,theme:m,autoContrast:p.autoContrast}):void 0}})});FY.classes=AY,FY.displayName=`@mantine/core/ProgressSection`;var IY=Q(e=>{let t=Z(`Progress`,null,e),{value:n,classNames:r,styles:i,vars:a,color:o,striped:s,animated:c,"aria-label":l,...u}=t,{resolvedClassNames:d,resolvedStyles:f}=UP({classNames:r,styles:i,props:t});return(0,J.jsx)(NY,{classNames:d,styles:f,vars:a,...u,children:(0,J.jsx)(FY,{value:n,color:o,striped:s,animated:c,"aria-label":l})})});IY.classes=AY,IY.displayName=`@mantine/core/Progress`,IY.Section=FY,IY.Root=NY,IY.Label=jY;function LY({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,q.useState)(n),a=(0,q.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=qz({placement:t,middleware:[rz({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,q.useCallback)(({clientX:e,clientY:t})=>{l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,q.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=GI(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var RY={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},zY={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:qj(`popover`)},BY=TN((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Qj(t),"--tooltip-bg":n?GN(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),VY=Q(e=>{let t=Z(`TooltipFloating`,zY,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=EP(),E=rF({name:`TooltipFloating`,props:t,classes:RY,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:BY}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:M,setOpened:N}=LY({offset:p,position:m,defaultOpened:v}),P=wN(n);if(!P)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let F=IM(j,yN(P),C),ee=P.props,I=e=>{ee.onMouseEnter?.(e),D(e),N(!0)},te=e=>{ee.onMouseLeave?.(e),N(!1)};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(DB,{...x,withinPortal:i,children:(0,J.jsx)($,{...w,...E(`tooltip`,{style:{...jF(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:(k&&Math.round(k))??``,left:(O&&Math.round(O))??``}}),variant:y,ref:M,mod:{multiline:h},children:f})}),(0,q.cloneElement)(P,{...ee,[r]:F,onMouseEnter:I,onMouseLeave:te})]})});VY.classes=RY,VY.varsResolver=BY,VY.displayName=`@mantine/core/TooltipFloating`;var HY=(0,q.createContext)({withinGroup:!1}),UY={openDelay:0,closeDelay:0};function WY(e){let{openDelay:t,closeDelay:n,children:r}=Z(`TooltipGroup`,UY,e);return(0,J.jsx)(HY,{value:{withinGroup:!0},children:(0,J.jsx)(Bz,{delay:{open:t,close:n},children:r})})}WY.displayName=`@mantine/core/TooltipGroup`,WY.extend=e=>e;function GY(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function KY(e){let t=GY(e.middlewares),n=[nz(e.offset)];return t.shift&&n.push(rz(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?az():az(t.flip)),n.push(lz({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?cz():cz(t.inline)):e.inline&&n.push(cz()),n}function qY(e){let[t,n]=(0,q.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,q.use)(HY).withinGroup,a=MM(),o=(0,q.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=qz({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:KY(e),whileElementsMounted:RR}),{delay:m,currentId:h,setCurrentId:g}=Vz(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=Zz([Iz(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),Yz(l,{enabled:e.events?.focus,visibleOnly:!0}),$z(l,{role:`tooltip`}),Gz(l,{enabled:e.opened===void 0})]);vM(()=>{e.onPositionChange?.(d)},[d]);let y=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:y,opened:r,placement:d}}var JY={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:qj(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},YY=TN((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:Qj(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),XY=Q(e=>{let t=Z(`Tooltip`,JY,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,zIndex:O,disabled:k,onClick:A,onMouseEnter:j,onMouseLeave:M,inline:N,variant:P,keepMounted:F,vars:ee,portalProps:I,mod:te,floatingStrategy:ne,middlewares:L,autoContrast:re,attributes:ie,target:ae,ref:oe,...se}=t,{dir:ce}=WF(),le=(0,q.useRef)(null),ue=qY({position:_B(ce,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,arrowRef:le,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:N,strategy:ne,middlewares:L});(0,q.useEffect)(()=>{let e=ae instanceof HTMLElement?ae:typeof ae==`string`?document.querySelector(ae):ae?.current||null;e&&ue.reference(e)},[ae,ue]);let R=rF({name:`Tooltip`,props:t,classes:RY,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ie,rootSelector:`tooltip`,vars:ee,varsResolver:YY}),de=wN(n);if(!ae&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let z=R(`tooltip`);if(ae){let e=FB(T,{duration:100,transition:`fade`});return(0,J.jsx)(J.Fragment,{children:(0,J.jsx)(DB,{...I,withinPortal:d,children:(0,J.jsx)(NB,{...e,keepMounted:F,mounted:!k&&!!ue.opened,duration:ue.isGroupPhase?10:e.duration,children:e=>(0,J.jsxs)($,{...se,"data-fixed":ne===`fixed`||void 0,variant:P,mod:[{multiline:E},te],...z,...ue.getFloatingProps({ref:ue.floating,className:z.className,style:{...z.style,...e,zIndex:O,top:ue.y??0,left:ue.x??0}}),children:[a,(0,J.jsx)(gB,{ref:le,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:y,position:ue.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...R(`arrow`)})]})})})})}let fe=de.props,pe=IM(ue.reference,yN(de),oe),me=FB(T,{duration:100,transition:`fade`});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(DB,{...I,withinPortal:d,children:(0,J.jsx)(NB,{...me,keepMounted:F,mounted:!k&&!!ue.opened,duration:ue.isGroupPhase?10:me.duration,children:e=>(0,J.jsxs)($,{...se,"data-fixed":ne===`fixed`||void 0,variant:P,mod:[{multiline:E},te],...ue.getFloatingProps({ref:ue.floating,className:R(`tooltip`).className,style:{...R(`tooltip`).style,...e,zIndex:O,top:ue.y??0,left:ue.x??0}}),children:[a,(0,J.jsx)(gB,{ref:le,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:y,position:ue.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...R(`arrow`)})]})})}),(0,q.cloneElement)(de,ue.getReferenceProps({onClick:A,onMouseEnter:j,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...fe,className:DN(v,fe.className),[i]:pe}))]})});XY.classes=RY,XY.varsResolver=YY,XY.displayName=`@mantine/core/Tooltip`,XY.Floating=VY,XY.Group=WY;var ZY={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},QY={withItemsBorders:!0},$Y=TN((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:Qj(t),"--sc-color":n?GN(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":Xj(i,`sc-padding`),"--sc-font-size":$j(i)}})),eX=FF(e=>{let t=Z(`SegmentedControl`,QY,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:C,withItemsBorders:w,mod:T,attributes:E,ref:D,...O}=t,k=rF({name:`SegmentedControl`,props:t,classes:ZY,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:$Y}),A=EP(),j=c.map(e=>bN(e)?{label:`${e}`,value:e}:e),M=dN(),[N,P]=(0,q.useState)(cM()),[F,ee]=(0,q.useState)(null),[I,te]=(0,q.useState)({}),ne=(e,t)=>{I[t]=e,te(I)},[L,re]=zM({value:l,defaultValue:u,finalValue:Array.isArray(c)?j.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ie=MM(p),ae=j.map(e=>(0,q.createElement)($,{...k(`control`),mod:{active:L===e.value,orientation:_},key:`${e.value}`},(0,q.createElement)(`input`,{...k(`input`),disabled:m||e.disabled,type:`radio`,name:ie,value:`${e.value}`,id:`${ie}-${e.value}`,checked:L===e.value,onChange:()=>!h&&re(e.value),"data-focus-ring":A.focusRing,key:`${e.value}-input`}),(0,q.createElement)($,{component:`label`,...k(`label`),mod:{active:L===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ie}-${e.value}`,ref:t=>ne(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:ZN({color:y,theme:A,autoContrast:C})},key:`${e.value}-label`},(0,J.jsx)(`span`,{...k(`innerLabel`),children:e.label})))),oe=IM(D,e=>ee(e));return UM(()=>{P(cM())},[c.length]),c.length===0?null:(0,J.jsxs)($,{...k(`root`),variant:S,size:f,ref:oe,mod:[{"full-width":g,orientation:_,initialized:M,"with-items-borders":w},T],...O,role:`radiogroup`,"data-disabled":m,children:[L!==void 0&&(0,J.jsx)(TU,{target:I[`${L}`],parent:F,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...k(`indicator`)},N),ae]})});eX.classes=ZY,eX.varsResolver=$Y,eX.displayName=`@mantine/core/SegmentedControl`;var tX={withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},nX=FF(e=>{let t=Z(`Select`,tX,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:C,limit:w,withScrollArea:T,maxDropdownHeight:E,size:D,searchable:O,rightSection:k,checkIconPosition:A,withCheckIcon:j,withAlignedLabels:M,nothingFoundMessage:N,name:P,form:F,searchValue:ee,defaultSearchValue:I,onSearchChange:te,allowDeselect:ne,error:L,rightSectionPointerEvents:re,id:ie,clearable:ae,clearSectionMode:oe,clearButtonProps:se,hiddenInputProps:ce,renderOption:le,onClear:ue,autoComplete:R,scrollAreaProps:de,__defaultRightSection:z,__clearSection:fe,__clearable:pe,chevronColor:me,autoSelectOnBlur:he,openOnFocus:ge,attributes:_e,...ve}=t,ye=(0,q.useMemo)(()=>oW(m),[m]),be=(0,q.useRef)({}),B=(0,q.useMemo)(()=>sW(ye),[ye]),xe=MM(ie),[V,H,Se]=zM({value:h,defaultValue:g,finalValue:null,onChange:p}),Ce=V==null?void 0:`${V}`in B?B[`${V}`]:be.current[`${V}`],we=sN(Ce),[Te,Ee,De]=zM({value:ee,defaultValue:I,finalValue:Ce?Ce.label:``,onChange:te}),Oe=FW({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?Oe.selectFirstOption():Oe.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(Oe.resetSelectedOption,0)}}),ke=e=>{Ee(e),Oe.resetSelectedOption()},{resolvedClassNames:Ae,resolvedStyles:je}=UP({props:t,styles:r,classNames:n});(0,q.useEffect)(()=>{_&&Oe.selectFirstOption()},[_,Te]),(0,q.useEffect)(()=>{h===null&&ke(``),h!=null&&Ce&&(we?.value!==Ce.value||we?.label!==Ce.label)&&ke(Ce.label)},[h,Ce]),(0,q.useEffect)(()=>{!Se&&!De&&ke(V==null?``:`${V}`in B?B[`${V}`]?.label:be.current[`${V}`]?.label||``)},[B,V]),(0,q.useEffect)(()=>{V&&`${V}`in B&&(be.current[`${V}`]=B[`${V}`])},[B,V]);let Me=(0,J.jsx)(RW.ClearButton,{...se,onClear:()=>{H(null,null),ke(``),ue?.()}}),Ne=ae&&!!V&&!S&&!x;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(RW,{store:Oe,__staticSelector:`Select`,classNames:Ae,styles:je,unstyled:i,readOnly:x,size:D,attributes:_e,keepMounted:he,onOptionSubmit:e=>{y?.(e);let t=ne&&`${B[e].value}`==`${V}`?null:B[e],n=t?t.value:null;n!==V&&H(n,t),!Se&&ke(n==null?``:t?.label||``),Oe.closeDropdown()},...b,children:[(0,J.jsx)(RW.Target,{targetType:O?`input`:`button`,autoComplete:R,withExpandedAttribute:!0,children:(0,J.jsx)(_U,{id:xe,__defaultRightSection:(0,J.jsx)(RW.Chevron,{size:D,error:L,unstyled:i,color:me}),__clearSection:Me,__clearable:Ne,__clearSectionMode:oe,rightSection:k,rightSectionPointerEvents:re||`none`,...ve,size:D,__staticSelector:`Select`,disabled:S,readOnly:x||!O,value:Te,onChange:e=>{ke(e.currentTarget.value),Oe.openDropdown(),_&&Oe.selectFirstOption()},onFocus:e=>{ge&&O&&Oe.openDropdown(),u?.(e)},onBlur:e=>{he&&Oe.clickSelectedOption(),O&&Oe.closeDropdown();let t=V!=null&&(`${V}`in B?B[`${V}`]:be.current[`${V}`]);ke(t&&t.label||``),d?.(e)},onClick:e=>{O?Oe.openDropdown():Oe.toggleDropdown(),f?.(e)},classNames:Ae,styles:je,unstyled:i,pointer:!O,error:L,attributes:_e})}),(0,J.jsx)(ZW,{data:ye,hidden:x||S,filter:C,search:Te,limit:w,hiddenWhenEmpty:!N,withScrollArea:T,maxDropdownHeight:E,filterOptions:!!O&&Ce?.label!==Te,value:V,checkIconPosition:A,withCheckIcon:j,withAlignedLabels:M,nothingFoundMessage:N,unstyled:i,labelId:ve.label?`${xe}-label`:void 0,"aria-label":ve.label?void 0:ve[`aria-label`],renderOption:le,scrollAreaProps:de})]}),(0,J.jsx)(RW.HiddenInput,{value:V,name:P,form:F,disabled:S,...ce})]})});nX.classes={..._U.classes,...RW.classes},nX.displayName=`@mantine/core/Select`;function rX(e){if(e!==void 0)return typeof e==`number`?X(e):e}function iX({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=EP(),s=t===void 0?e:t,c=r!==void 0,l=Lj({"--sg-spacing-x":Zj(aM(e)),"--sg-spacing-y":Zj(aM(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":rX(r)}:{"--sg-cols":aM(n)?.toString()}}),u=Oj(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=Zj(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=Zj(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,J.jsx)(oF,{styles:l,media:iM(Oj(u),o.breakpoints).filter(e=>Oj(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function aX(e){return typeof e==`object`&&e?Oj(e):[]}function oX(e){return e.sort((e,t)=>Nj(e)-Nj(t))}function sX({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return oX(Array.from(new Set([...aX(e),...aX(t),...r===void 0?aX(n):[]])))}function cX({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=Lj({"--sg-spacing-x":Zj(aM(e)),"--sg-spacing-y":Zj(aM(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":rX(r)}:{"--sg-cols":aM(n)?.toString()}}),l=sX({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=Zj(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=Zj(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,J.jsx)(oF,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var lX={container:`m_925c2d2c`,root:`m_2415a157`},uX={cols:1,spacing:`md`,type:`media`},dX=Q(e=>{let t=Z(`SimpleGrid`,uX,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=rF({name:`SimpleGrid`,classes:lX,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=AF(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(cX,{...t,selector:`.${v}`}),(0,J.jsx)(`div`,{..._(`container`),children:(0,J.jsx)($,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(iX,{...t,selector:`.${v}`}),(0,J.jsx)($,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});dX.classes=lX,dX.displayName=`@mantine/core/SimpleGrid`;var[fX,pX]=Bj(`SliderProvider was not found in tree`);function mX({size:e,disabled:t,variant:n,color:r,thumbSize:i,radius:a,orientation:o,...s}){let{getStyles:c}=pX();return(0,J.jsx)($,{tabIndex:-1,variant:n,size:e,...c(`root`),mod:{orientation:o},...s})}mX.displayName=`@mantine/core/SliderRoot`;function hX({max:e,min:t,value:n,position:r,label:i,dragging:a,onMouseDown:o,onKeyDownCapture:s,labelTransitionProps:c,labelAlwaysOn:l,thumbLabel:u,onFocus:d,onBlur:f,showLabelOnHover:p,isHovered:m,children:h=null,disabled:g,orientation:_=`horizontal`,ref:v}){let{getStyles:y}=pX(),[b,x]=(0,q.useState)(!1),S=l||a||b||p&&m;return(0,J.jsxs)($,{tabIndex:g?-1:0,role:`slider`,"aria-label":u,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":n,"aria-disabled":g,"aria-orientation":_,ref:v,__vars:{"--slider-thumb-offset":`${r}%`},...y(`thumb`,{focusable:!0}),mod:{dragging:a,disabled:g},onFocus:e=>{x(!0),typeof d==`function`&&d(e)},onBlur:e=>{x(!1),typeof f==`function`&&f(e)},onTouchStart:o,onMouseDown:o,onKeyDownCapture:s,onClick:e=>e.stopPropagation(),children:[h,(0,J.jsx)(NB,{mounted:i!=null&&!!S,transition:`fade`,duration:0,...c,children:e=>(0,J.jsx)(`div`,{...y(`label`,{style:e}),children:i})})]})}hX.displayName=`@mantine/core/SliderThumb`;function gX({value:e,min:t,max:n}){let r=(e-t)/(n-t)*100;return Math.min(Math.max(r,0),100)}function _X({mark:e,offset:t,value:n,inverted:r=!1}){return r?typeof t==`number`&&e.value<=t||e.value>=n:typeof t==`number`?e.value>=t&&e.value<=n:e.value<=n}function vX({marks:e,min:t,max:n,disabled:r,value:i,offset:a,inverted:o}){let{getStyles:s}=pX();return e?(0,J.jsx)(`div`,{children:e.map((e,c)=>e.hidden?null:(0,q.createElement)($,{...s(`markWrapper`),__vars:{"--mark-offset":`${gX({value:e.value,min:t,max:n})}%`},key:c},(0,J.jsx)($,{...s(`mark`),mod:{filled:_X({mark:e,value:i,offset:a,inverted:o}),disabled:r}}),e.label&&(0,J.jsx)(`div`,{...s(`markLabel`),children:e.label})))}):null}vX.displayName=`@mantine/core/SliderMarks`;function yX({filled:e,children:t,offset:n,disabled:r,marksOffset:i,inverted:a,containerProps:o,...s}){let{getStyles:c}=pX();return(0,J.jsx)($,{...c(`trackContainer`),mod:{disabled:r},...o,children:(0,J.jsxs)($,{...c(`track`),mod:{inverted:a,disabled:r},children:[(0,J.jsx)($,{mod:{inverted:a,disabled:r},__vars:{"--slider-bar-width":`calc(${e}% + 2 * var(--slider-size))`,"--slider-bar-offset":`calc(${n}% - var(--slider-size))`},...c(`bar`)}),t,(0,J.jsx)(vX,{...s,offset:i,disabled:r,inverted:a})]})})}yX.displayName=`@mantine/core/SliderTrack`;function bX({value:e,containerWidth:t,min:n,max:r,step:i,precision:a}){let o=(t?Math.min(Math.max(e,0),t)/t:e)*(r-n),s=(o===0?0:Math.round(o/i)*i)+n,c=Math.max(s,n);return a===void 0?c:Number(c.toFixed(a))}function xX(e,t){return parseFloat(e.toFixed(t))}function SX(e){if(!e)return 0;let t=e.toString().split(`.`);return t.length>1?t[1].length:0}function CX(e,t){let n=[...t].sort((e,t)=>e.value-t.value).find(t=>t.value>e);return n?n.value:e}function wX(e,t){let n=[...t].sort((e,t)=>t.value-e.value).find(t=>t.value<e);return n?n.value:e}function TX(e){let t=[...e].sort((e,t)=>e.value-t.value);return t.length>0?t[0].value:0}function EX(e){let t=[...e].sort((e,t)=>e.value-t.value);return t.length>0?t[t.length-1].value:100}var DX={root:`m_dd36362e`,label:`m_c9357328`,thumb:`m_c9a9a60a`,trackContainer:`m_a8645c2`,track:`m_c9ade57f`,bar:`m_38aeed47`,markWrapper:`m_b7b0423a`,mark:`m_dd33bc19`,markLabel:`m_68c77a5b`},OX={radius:`xl`,min:0,max:100,step:1,marks:[],label:e=>e,labelTransitionProps:{transition:`fade`,duration:0},thumbLabel:``,showLabelOnHover:!0,scale:e=>e,size:`md`},kX=TN((e,{size:t,color:n,thumbSize:r,radius:i})=>({root:{"--slider-size":Xj(t,`slider-size`),"--slider-color":n?GN(n,e):void 0,"--slider-radius":i===void 0?void 0:Qj(i),"--slider-thumb-size":r===void 0?`calc(var(--slider-size) * 2)`:X(r)}})),AX=Q(e=>{let t=Z(`Slider`,OX,e),{classNames:n,styles:r,value:i,onChange:a,onChangeEnd:o,size:s,min:c,max:l,domain:u,step:d,precision:f,defaultValue:p,name:m,marks:h,label:g,labelTransitionProps:_,labelAlwaysOn:v,thumbLabel:y,showLabelOnHover:b,thumbChildren:x,disabled:S,unstyled:C,scale:w,inverted:T,orientation:E,className:D,style:O,vars:k,hiddenInputProps:A,restrictToMarks:j,thumbProps:M,attributes:N,ref:P,...F}=t,ee=rF({name:`Slider`,props:t,classes:DX,classNames:n,className:D,styles:r,style:O,attributes:N,vars:k,varsResolver:kX,unstyled:C}),{dir:I}=WF(),[te,ne]=(0,q.useState)(!1),[L,re]=zM({value:typeof i==`number`?sM(i,c,l):i,defaultValue:typeof p==`number`?sM(p,c,l):p,finalValue:sM(0,c,l),onChange:a}),ie=(0,q.useRef)(L),ae=(0,q.useRef)(o);(0,q.useEffect)(()=>{ae.current=o},[o]);let oe=(0,q.useRef)(null),se=(0,q.useRef)(null),[ce,le]=u||[c,l],ue=gX({value:L,min:ce,max:le}),R=w(L),de=typeof g==`function`?g(R):g,z=f??SX(d),fe=(0,q.useCallback)(({x:e})=>{if(!S){let t=sM(bX({value:e,min:ce,max:le,step:d,precision:z}),c,l);re(j&&h?.length?vN(t,h.map(e=>e.value)):t),ie.current=t}},[S,c,l,ce,le,d,z,re,h,j]),{ref:pe,active:me}=RM(({x:e,y:t})=>fe({x:E===`vertical`?1-t:e}),{onScrubEnd:(0,q.useCallback)(()=>{if(!S&&ae.current){let e=j&&h?.length?vN(ie.current,h.map(e=>e.value)):ie.current;ae.current(e)}},[S,h,j])},I),he=(0,q.useCallback)(e=>{!S&&ae.current&&ae.current(e)},[S]),ge=e=>{if(!S)switch(e.key){case`ArrowUp`:{if(e.preventDefault(),se.current?.focus(),j&&h){let e=CX(L,h);re(e),he(e);break}let t=xX(Math.min(Math.max(L+d,ce),le),z);re(t),he(t);break}case`ArrowRight`:{if(e.preventDefault(),se.current?.focus(),j&&h){let e=I===`rtl`?wX(L,h):CX(L,h);re(e),he(e);break}let t=xX(Math.min(Math.max(I===`rtl`?L-d:L+d,ce),le),z);re(t),he(t);break}case`ArrowDown`:{if(e.preventDefault(),se.current?.focus(),j&&h){let e=wX(L,h);re(e),he(e);break}let t=xX(Math.min(Math.max(L-d,ce),le),z);re(t),he(t);break}case`ArrowLeft`:{if(e.preventDefault(),se.current?.focus(),j&&h){let e=I===`rtl`?CX(L,h):wX(L,h);re(e),he(e);break}let t=xX(Math.min(Math.max(I===`rtl`?L+d:L-d,ce),le),z);re(t),he(t);break}case`Home`:if(e.preventDefault(),se.current?.focus(),j&&h){re(TX(h)),he(TX(h));break}re(c),he(c);break;case`End`:if(e.preventDefault(),se.current?.focus(),j&&h){re(EX(h)),he(EX(h));break}re(l),he(l);break;default:break}};return(0,J.jsx)(fX,{value:{getStyles:ee},children:(0,J.jsxs)(mX,{...F,ref:IM(P,oe),onKeyDownCapture:ge,onMouseDownCapture:()=>oe.current?.focus(),size:s,disabled:S,orientation:E,children:[(0,J.jsx)(yX,{inverted:T,offset:0,filled:ue,marks:h,min:ce,max:le,value:R,disabled:S,containerProps:{ref:pe,onMouseEnter:b?()=>ne(!0):void 0,onMouseLeave:b?()=>ne(!1):void 0},children:(0,J.jsx)(hX,{max:le,min:ce,value:R,position:ue,dragging:me,label:de,ref:se,labelTransitionProps:_,labelAlwaysOn:v,thumbLabel:y,showLabelOnHover:b,isHovered:te,disabled:S,orientation:E,...M,children:x})}),(0,J.jsx)(`input`,{type:`hidden`,name:m,value:R,...A})]})})});AX.classes=DX,AX.varsResolver=kX,AX.displayName=`@mantine/core/Slider`;var jX=(0,q.createContext)(null),MX={hiddenInputValuesSeparator:`,`},NX=FF((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=Z(`SwitchGroup`,MX,e),[m,h]=zM({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,J.jsx)(jX,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,J.jsxs)(mU.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`SwitchGroup`,children:[(0,J.jsx)(zW,{role:`group`,children:o}),(0,J.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));NX.classes=mU.Wrapper.classes,NX.displayName=`@mantine/core/SwitchGroup`;var PX={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},FX={labelPosition:`right`,withThumbIndicator:!0},IX=TN((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:Qj(t),"--switch-height":Xj(r,`switch-height`),"--switch-width":Xj(r,`switch-width`),"--switch-thumb-size":Xj(r,`switch-thumb-size`),"--switch-label-font-size":Xj(r,`switch-label-font-size`),"--switch-track-label-padding":Xj(r,`switch-track-label-padding`),"--switch-color":n?GN(n,e):void 0}})),LX=Q(e=>{let t=Z(`Switch`,FX,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,offLabel:u,onLabel:d,id:f,size:p,radius:m,wrapperProps:h,thumbIcon:g,checked:_,defaultChecked:v,onChange:y,labelPosition:b,description:x,error:S,disabled:C,variant:w,rootRef:T,mod:E,withThumbIndicator:D,attributes:O,...k}=t,A=(0,q.use)(jX),j=p||A?.size,M=rF({name:`Switch`,props:t,classes:PX,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:IX}),{styleProps:N,rest:P}=sF(k),F=MM(f),ee={checked:A?.value.includes(P.value)??_,onChange:e=>{A?.onChange(e),y?.(e)}},I=C||A?.isDisabled?.(P.value),[te,ne]=zM({value:ee.checked??_,defaultValue:v,finalValue:!1});return(0,J.jsxs)(WW,{...M(`root`),__staticSelector:`Switch`,__stylesApiProps:t,id:F,size:j,labelPosition:b,label:l,description:x,error:S,disabled:I,bodyElement:`label`,labelElement:`span`,classNames:n,styles:a,unstyled:o,"data-checked":ee.checked,variant:w,ref:T,mod:E,attributes:O,inert:P.inert,...N,...h,children:[(0,J.jsx)(`input`,{...P,...ee,disabled:I,checked:te,"data-checked":ee.checked,onChange:e=>{ee.onChange?.(e),ne(e.currentTarget.checked)},id:F,type:`checkbox`,role:`switch`,inert:P.inert,...M(`input`)}),(0,J.jsxs)($,{"aria-hidden":`true`,component:`span`,mod:{error:S,"label-position":b,"without-labels":!d&&!u},...M(`track`),children:[(0,J.jsx)($,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":D&&!g},...M(`thumb`),children:g}),(0,J.jsx)(`span`,{...M(`trackLabel`),children:te?d:u})]})]})});LX.classes={...PX,...UW},LX.varsResolver=IX,LX.displayName=`@mantine/core/Switch`,LX.Group=NX;function RX({data:e,value:t}){let n=t.map(e=>e.trim().toLowerCase());return e.reduce((e,t)=>(GW(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(e.label.toLowerCase().trim())===-1)}):n.indexOf(t.label.toLowerCase().trim())===-1&&e.push(t),e),[])}function zX(e,t){return e?t.split(RegExp(`[${e.join(``)}]`)).map(e=>e.trim()).filter(e=>e!==``):[t]}function BX({splitChars:e,allowDuplicates:t,maxTags:n,value:r,currentTags:i,isDuplicate:a,onDuplicate:o}){let s=zX(e,r),c=[];if(t)c.push(...i,...s);else{c.push(...i);for(let e of s)(a?e=>a(e,c):e=>c.some(t=>t.toLowerCase()===e.toLowerCase()))(e)?o?.(e):c.push(e)}return n?c.slice(0,n):c}var VX={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[`,`],hiddenInputValuesDivider:`,`,openOnFocus:!0,size:`sm`},HX=Q(e=>{let t=Z(`TagsInput`,VX,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,value:l,defaultValue:u,onChange:d,onKeyDown:f,maxTags:p,allowDuplicates:m,onDuplicate:h,variant:g,data:_,dropdownOpened:v,defaultDropdownOpened:y,onDropdownOpen:b,onDropdownClose:x,selectFirstOptionOnChange:S,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:w,comboboxProps:T,filter:E,limit:D,withScrollArea:O,maxDropdownHeight:k,searchValue:A,defaultSearchValue:j,onSearchChange:M,readOnly:N,disabled:P,splitChars:F,onFocus:ee,onBlur:I,onPaste:te,radius:ne,rightSection:L,rightSectionWidth:re,rightSectionPointerEvents:ie,rightSectionProps:ae,leftSection:oe,leftSectionWidth:se,leftSectionPointerEvents:ce,leftSectionProps:le,inputContainer:ue,inputWrapperOrder:R,withAsterisk:de,required:z,labelProps:fe,descriptionProps:pe,errorProps:me,wrapperProps:he,description:ge,label:_e,error:ve,withErrorStyles:ye,name:be,form:B,id:xe,clearable:V,clearSectionMode:H,clearButtonProps:Se,hiddenInputProps:Ce,hiddenInputValuesDivider:we,mod:Te,renderOption:Ee,renderPill:De,onRemove:Oe,onClear:ke,onMaxTags:Ae,scrollAreaProps:je,acceptValueOnBlur:Me,isDuplicate:Ne,openOnFocus:U,attributes:Pe,ref:Fe,...Ie}=t,Le=MM(xe),Re=oW(_),ze=sW(Re),Be=(0,q.useRef)(null),Ve=IM(Be,Fe),He=FW({opened:v,defaultOpened:y,onDropdownOpen:()=>{b?.(),C&&He.selectFirstOption()},onDropdownClose:()=>{x?.(),He.resetSelectedOption()}}),{styleProps:Ue,rest:{type:We,autoComplete:Ge,...Ke}}=sF(Ie),[qe,Je]=zM({value:l,defaultValue:u,finalValue:[],onChange:d}),[Ye,Xe]=zM({value:A,defaultValue:j,finalValue:``,onChange:M}),Ze=e=>{Xe(e),He.resetSelectedOption()},Qe=rF({name:`TagsInput`,classes:{},props:t,classNames:n,styles:a,unstyled:o}),{resolvedClassNames:$e,resolvedStyles:et}=UP({props:t,styles:a,classNames:n}),tt=e=>{if((Ne?Ne(e,qe):qe.some(t=>t.toLowerCase()===e.toLowerCase()))&&(h?.(e),!m)){Ze(``);return}if(qe.length>=p){Ae?.(e);return}w?.(e),Ze(``),e.length>0&&Je([...qe,e])},nt=e=>{if(f?.(e),e.isPropagationStopped())return;let t=Ye.trim(),{length:n}=t;if(F.includes(e.key)&&n>0&&(Je(BX({splitChars:F,allowDuplicates:m,maxTags:p,value:Ye,currentTags:qe,isDuplicate:Ne,onDuplicate:h})),Ze(``),e.preventDefault()),e.key===`Enter`&&n>0&&!e.nativeEvent.isComposing){if(e.preventDefault(),document.querySelector(`#${He.listId} [data-combobox-option][data-combobox-selected]`))return;tt(t)}e.key===`Backspace`&&n===0&&qe.length>0&&!e.nativeEvent.isComposing&&!N&&(Oe?.(qe[qe.length-1]),Je(qe.slice(0,qe.length-1)))},rt=e=>{te?.(e),e.preventDefault(),e.clipboardData&&(Je(BX({splitChars:F,allowDuplicates:m,maxTags:p,value:`${Ye}${e.clipboardData.getData(`text/plain`)}`,currentTags:qe,isDuplicate:Ne,onDuplicate:h})),Ze(``))},it=qe.map((e,t)=>{let n=()=>{let n=qe.slice();n.splice(t,1),Je(n),Oe?.(e)};return De?(0,J.jsx)(q.Fragment,{children:De({option:ze[e]||{value:e,label:e,disabled:!1},value:e,onRemove:n,disabled:P||N})},`${e}-${t}`):(0,J.jsx)(Zq,{withRemoveButton:!N,onRemove:n,unstyled:o,disabled:P,attributes:Pe,...Qe(`pill`),children:e},`${e}-${t}`)});(0,q.useEffect)(()=>{S&&He.selectFirstOption()},[S,qe,Ye]);let at=(0,J.jsx)(RW.ClearButton,{...Se,onClear:()=>{Je([]),Ze(``),Be.current?.focus(),He.openDropdown(),ke?.()}});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(RW,{store:He,classNames:$e,styles:et,unstyled:o,size:c,readOnly:N,__staticSelector:`TagsInput`,attributes:Pe,onOptionSubmit:e=>{w?.(e),Ze(``),qe.length>=p?Ae?.(e):Je([...qe,ze[e].value]),He.resetSelectedOption()},...T,children:[(0,J.jsx)(RW.DropdownTarget,{children:(0,J.jsx)(nJ,{...Ue,__staticSelector:`TagsInput`,classNames:$e,styles:et,unstyled:o,size:c,className:r,style:i,variant:g,disabled:P,radius:ne,rightSection:L,__clearSection:at,__clearable:V&&qe.length>0&&!P&&!N,__clearSectionMode:H,rightSectionWidth:re,rightSectionPointerEvents:ie,rightSectionProps:ae,leftSection:oe,leftSectionWidth:se,leftSectionPointerEvents:ce,leftSectionProps:le,inputContainer:ue,inputWrapperOrder:R,withAsterisk:de,required:z,labelProps:fe,descriptionProps:pe,errorProps:me,wrapperProps:he,description:ge,label:_e,error:ve,withErrorStyles:ye,__stylesApiProps:{...t,multiline:!0},id:Le,mod:Te,attributes:Pe,children:(0,J.jsxs)(Zq.Group,{disabled:P,unstyled:o,...Qe(`pillsList`),children:[it,(0,J.jsx)(RW.EventsTarget,{autoComplete:Ge,withExpandedAttribute:!0,children:(0,J.jsx)(nJ.Field,{...Ke,ref:Ve,...Qe(`inputField`),unstyled:o,onKeyDown:nt,onFocus:e=>{ee?.(e),U&&He.openDropdown()},onBlur:e=>{I?.(e),Me&&tt(Ye),He.closeDropdown()},onPaste:rt,value:Ye,onChange:e=>Ze(e.currentTarget.value),required:z&&qe.length===0,disabled:P,readOnly:N,id:Le})})]})})}),(0,J.jsx)(ZW,{data:RX({data:Re,value:qe}),hidden:N||P,filter:E,search:Ye,limit:D,hiddenWhenEmpty:!0,withScrollArea:O,maxDropdownHeight:k,unstyled:o,labelId:_e?`${Le}-label`:void 0,"aria-label":_e?void 0:Ie[`aria-label`],renderOption:Ee,scrollAreaProps:je})]}),(0,J.jsx)(RW.HiddenInput,{name:be,form:B,value:qe,valuesDivider:we,disabled:P,...Ce})]})});HX.classes={..._U.classes,...RW.classes},HX.displayName=`@mantine/core/TagsInput`;var UX=Q(e=>(0,J.jsx)(_U,{component:`input`,...Z(`TextInput`,null,e),__staticSelector:`TextInput`}));UX.classes=_U.classes,UX.displayName=`@mantine/core/TextInput`;function WX(e,t,n=[]){let r=[];for(let i of e)if(Array.isArray(i.children)&&i.children.length>0){let e=WX(i.children,t,n);if(e.currentTreeChecked.length===i.children.length){let t=e.currentTreeChecked.every(e=>e.checked),a={checked:t,indeterminate:!t,value:i.value,hasChildren:!0};r.push(a),n.push(a)}else if(e.currentTreeChecked.length>0){let e={checked:!1,indeterminate:!0,value:i.value,hasChildren:!0};r.push(e),n.push(e)}}else if(t.includes(i.value)){let e={checked:!0,indeterminate:!1,value:i.value,hasChildren:!1};r.push(e),n.push(e)}return{result:n,currentTreeChecked:r}}function GX(e,t){for(let n of t){if(n.value===e)return n;if(Array.isArray(n.children)){let t=GX(e,n.children);if(t)return t}}return null}function KX(e,t,n=[]){let r=GX(e,t);return r?!Array.isArray(r.children)||r.children.length===0?[r.value]:(r.children.forEach(e=>{Array.isArray(e.children)&&e.children.length>0?KX(e.value,t,n):n.push(e.value)}),n):n}function qX(e){return e.reduce((e,t)=>(Array.isArray(t.children)&&t.children.length>0?e.push(...qX(t.children)):e.push(t.value),e),[])}function JX(e,t,n){return n.length===0?!1:n.includes(e)?!0:WX(t,n).result.some(t=>t.value===e&&t.checked)}var YX=_N(JX);function XX(e,t,n){return n.length===0?!1:WX(t,n).result.some(t=>t.value===e&&t.indeterminate)}var ZX=_N(XX);function QX(e,t,n,r={}){return t.forEach(t=>{r[t.value]=t.value in e?e[t.value]:t.value===n,Array.isArray(t.children)&&QX(e,t.children,n,r)}),r}function $X(e,t){let n=QX({},e,[]);return t===`*`?Object.keys(n).reduce((e,t)=>({...e,[t]:!0}),{}):(t.forEach(e=>{n[e]=!0}),n)}function eZ(e,t){let n=[];return e.forEach(e=>n.push(...KX(e,t))),Array.from(new Set(n))}function tZ({initialSelectedState:e=[],expandedState:t,initialCheckedState:n=[],checkedState:r,initialExpandedState:i={},selectedState:a,multiple:o=!1,onNodeCollapse:s,onNodeExpand:c,onCheckedStateChange:l,onSelectedStateChange:u,onExpandedStateChange:d}={}){let[f,p]=(0,q.useState)([]),[m,h]=zM({value:t,defaultValue:i,finalValue:{},onChange:d}),[g,_]=zM({value:a,defaultValue:e,finalValue:[],onChange:u}),[v,y]=zM({value:r,defaultValue:n,finalValue:[],onChange:l}),[b,x]=(0,q.useState)(null),S=(0,q.useCallback)(e=>{h(QX(m,e,g)),y(eZ(v,e)),p(e)},[g,v,m]),C=(0,q.useCallback)(e=>{let t={...m,[e]:!m[e]};t[e]?c?.(e):s?.(e),h(t)},[s,c,m]),w=(0,q.useCallback)(e=>{m[e]!==!1&&s?.(e),h({...m,[e]:!1})},[s,m]),T=(0,q.useCallback)(e=>{m[e]!==!0&&c?.(e),h({...m,[e]:!0})},[c,m]),E=(0,q.useCallback)(()=>{let e={...m};Object.keys(e).forEach(t=>{e[t]=!0}),h(e)},[m]),D=(0,q.useCallback)(()=>{let e={...m};Object.keys(e).forEach(t=>{e[t]=!1}),h(e)},[m]),O=(0,q.useCallback)(e=>{if(!o)return g.includes(e)?(x(null),[]):(x(e),[e]);if(g.includes(e))return x(null),g.filter(t=>t!==e);x(e),_([...g,e])},[g]),k=(0,q.useCallback)(e=>{x(e),_(o?g.includes(e)?g:[...g,e]:[e])},[g]),A=(0,q.useCallback)(e=>{b===e&&x(null),_(g.filter(t=>t!==e))},[g]),j=(0,q.useCallback)(()=>{_([]),x(null)},[]);return{multiple:o,expandedState:m,selectedState:g,checkedState:v,anchorNode:b,initialize:S,toggleExpanded:C,collapse:w,expand:T,expandAllNodes:E,collapseAllNodes:D,setExpandedState:h,checkNode:(0,q.useCallback)(e=>{let t=KX(e,f);y(Array.from(new Set([...v,...t])))},[f,v]),uncheckNode:(0,q.useCallback)(e=>{let t=KX(e,f);y(v.filter(e=>!t.includes(e)))},[f,v]),checkAllNodes:(0,q.useCallback)(()=>{y(qX(f))},[f]),uncheckAllNodes:(0,q.useCallback)(()=>{y([])},[]),setCheckedState:y,toggleSelected:O,select:k,deselect:A,clearSelected:j,setSelectedState:_,getCheckedNodes:()=>WX(f,v).result,isNodeChecked:e=>YX(e,f,v),isNodeIndeterminate:e=>ZX(e,f,v)}}function nZ(e,t,n){if(!e||!t)return[];let r=n.indexOf(e),i=n.indexOf(t),a=Math.min(r,i),o=Math.max(r,i);return n.slice(a,o+1)}function rZ({node:e,getStyles:t,rootIndex:n,controller:r,expandOnClick:i,selectOnClick:a,isSubtree:o,level:s=1,renderNode:c,flatValues:l,allowRangeSelection:u,expandOnSpace:d,checkOnSpace:f,keepMounted:p}){let m=(0,q.useRef)(null),h=(e.children||[]).map(e=>(0,J.jsx)(rZ,{node:e,flatValues:l,getStyles:t,rootIndex:void 0,level:s+1,controller:r,expandOnClick:i,isSubtree:!0,renderNode:c,selectOnClick:a,allowRangeSelection:u,expandOnSpace:d,checkOnSpace:f,keepMounted:p},e.value)),g=t=>{if(t.nativeEvent.code===`ArrowRight`&&(t.stopPropagation(),t.preventDefault(),r.expandedState[e.value]?t.currentTarget.querySelector(`[role=treeitem]`)?.focus():r.expand(e.value)),t.nativeEvent.code===`ArrowLeft`&&(t.stopPropagation(),t.preventDefault(),r.expandedState[e.value]&&(e.children||[]).length>0?r.collapse(e.value):o&&Vj(t.currentTarget,`[role=treeitem]`)?.focus()),t.nativeEvent.code===`ArrowDown`||t.nativeEvent.code===`ArrowUp`){let e=Vj(t.currentTarget,`[data-tree-root]`);if(!e)return;t.stopPropagation(),t.preventDefault();let n=Array.from(e.querySelectorAll(`[role=treeitem]`)).filter(e=>e.style.display!==`none`),i=n.indexOf(t.currentTarget);if(i===-1)return;let a=t.nativeEvent.code===`ArrowDown`?i+1:i-1;if(n[a]?.focus(),t.shiftKey){let e=n[a];e&&r.setSelectedState(nZ(r.anchorNode,e.dataset.value,l))}}t.nativeEvent.code===`Space`&&(d&&(t.stopPropagation(),t.preventDefault(),r.toggleExpanded(e.value)),f&&(t.stopPropagation(),t.preventDefault(),r.isNodeChecked(e.value)?r.uncheckNode(e.value):r.checkNode(e.value)))},_=t=>{t.stopPropagation(),u&&t.shiftKey&&r.anchorNode?(r.setSelectedState(nZ(r.anchorNode,e.value,l)),m.current?.focus()):(i&&r.toggleExpanded(e.value),a&&r.select(e.value),m.current?.focus())},v=r.selectedState.includes(e.value),y={...t(`label`),onClick:_,"data-selected":v||void 0,"data-value":e.value};return(0,J.jsxs)(`li`,{...t(`node`,{style:{"--label-offset":`calc(var(--level-offset) * ${s-1})`}}),role:`treeitem`,"aria-selected":v,"data-value":e.value,"data-selected":v||void 0,"data-level":s,tabIndex:n===0?0:-1,onKeyDown:g,ref:m,children:[typeof c==`function`?c({node:e,level:s,selected:v,tree:r,expanded:r.expandedState[e.value]||!1,hasChildren:Array.isArray(e.children)&&e.children.length>0,elementProps:y}):(0,J.jsx)(`div`,{...y,children:e.label}),p&&h.length>0?(0,J.jsx)(q.Activity,{mode:r.expandedState[e.value]?`visible`:`hidden`,children:(0,J.jsx)($,{component:`ul`,role:`group`,...t(`subtree`),"data-level":s,children:h})}):r.expandedState[e.value]&&h.length>0&&(0,J.jsx)($,{component:`ul`,role:`group`,...t(`subtree`),"data-level":s,children:h})]})}rZ.displayName=`@mantine/core/TreeNode`;var iZ={root:`m_f698e191`,subtree:`m_75f3ecf`,node:`m_f6970eb1`,label:`m_dc283425`};function aZ(e){return e.reduce((e,t)=>(e.push(t.value),t.children&&e.push(...aZ(t.children)),e),[])}var oZ={expandOnClick:!0,allowRangeSelection:!0,expandOnSpace:!0},sZ=TN((e,{levelOffset:t})=>({root:{"--level-offset":Zj(t)}})),cZ=Q(e=>{let t=Z(`Tree`,oZ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,expandOnClick:l,tree:u,renderNode:d,selectOnClick:f,clearSelectionOnOutsideClick:p,allowRangeSelection:m,expandOnSpace:h,levelOffset:g,checkOnSpace:_,keepMounted:v,attributes:y,ref:b,...x}=t,S=tZ(),C=u||S,w=rF({name:`Tree`,classes:iZ,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:sZ}),T=IM(b,pM(()=>p&&C.clearSelected())),E=(0,q.useMemo)(()=>aZ(c),[c]);(0,q.useEffect)(()=>{C.initialize(c)},[c]);let D=c.map((e,t)=>(0,J.jsx)(rZ,{node:e,getStyles:w,rootIndex:t,expandOnClick:l,selectOnClick:f,controller:C,renderNode:d,flatValues:E,allowRangeSelection:m,expandOnSpace:h,checkOnSpace:_,keepMounted:v},e.value));return(0,J.jsx)($,{component:`ul`,ref:T,...w(`root`),...x,role:`tree`,"aria-multiselectable":C.multiple,"data-tree-root":!0,children:D})});cZ.displayName=`@mantine/core/Tree`,cZ.classes=iZ,cZ.varsResolver=sZ;var lZ={name:`Editorial`,description:`Serif typography with newspaper elegance`,defaultColorScheme:`light`,head:{link:[{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossorigin:``},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap`}]},primaryColor:`ink`,primaryShade:{light:7,dark:3},autoContrast:!0,fontFamily:`"Source Serif 4", "Georgia", "Times New Roman", serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`"Playfair Display", "Georgia", "Times New Roman", serif`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`2.5rem`,lineHeight:`1.15`},h2:{fontSize:`1.75rem`,lineHeight:`1.2`},h3:{fontSize:`1.375rem`,lineHeight:`1.3`},h4:{fontSize:`1.125rem`,lineHeight:`1.4`},h5:{fontSize:`1rem`,lineHeight:`1.5`},h6:{fontSize:`0.875rem`,lineHeight:`1.5`}}},defaultRadius:`sm`,radius:{xs:`2px`,sm:`3px`,md:`4px`,lg:`6px`,xl:`8px`},shadows:{xs:`0 1px 2px rgba(0, 0, 0, 0.06)`,sm:`0 1px 3px rgba(0, 0, 0, 0.08)`,md:`0 2px 6px rgba(0, 0, 0, 0.08)`,lg:`0 4px 12px rgba(0, 0, 0, 0.1)`,xl:`0 8px 24px rgba(0, 0, 0, 0.1)`},colors:{ink:[`#f5f3f0`,`#e8e4de`,`#d4cec5`,`#b5ad9f`,`#8c8272`,`#6b6050`,`#4a4035`,`#332b22`,`#1f1812`,`#0d0a07`],burgundy:[`#faf0f0`,`#f0d4d4`,`#e0adad`,`#cc8585`,`#b35e5e`,`#944545`,`#763636`,`#5a2828`,`#3d1b1b`,`#220f0f`],gray:[`#faf9f7`,`#f0eee9`,`#e0dcd5`,`#c8c2b8`,`#a8a194`,`#8a8273`,`#6b6456`,`#504a3f`,`#36322b`,`#1e1b17`],dark:[`#d5d2cd`,`#aba59c`,`#817a6e`,`#5e584e`,`#46413a`,`#36322c`,`#2a2721`,`#201d19`,`#171411`,`#0d0b09`]},components:{Button:pG.extend({defaultProps:{fw:600},styles:{root:{letterSpacing:`0.02em`}}}),ActionIcon:dV.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Paper:dB.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:bG.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:UX.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`}}}),Badge:tG.extend({defaultProps:{fw:600,variant:`outline`},styles:{root:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,letterSpacing:`0.04em`,textTransform:`uppercase`,fontSize:`0.65rem`}}})}},uZ={name:`Midnight`,description:`Clean, developer-focused design`,primaryColor:`pink`,primaryShade:{light:7,dark:8},fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`600`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},radius:{xs:`3px`,sm:`6px`,md:`6px`,lg:`8px`,xl:`12px`},defaultRadius:`sm`,colors:{dark:[`#d0d7de`,`#8b949e`,`#6e7681`,`#484f58`,`#30363d`,`#21262d`,`#161b22`,`#151b23`,`#0d1117`,`#010409`],gray:[`#f6f8fa`,`#eaeef2`,`#d0d7de`,`#afb8c1`,`#8c959f`,`#6e7781`,`#57606a`,`#424a53`,`#32383f`,`#24292f`],blue:[`#ddf4ff`,`#b6e3ff`,`#80ccff`,`#54aeff`,`#218bff`,`#0969da`,`#0550ae`,`#033d8b`,`#0a3069`,`#002155`],green:[`#dafbe1`,`#aceebb`,`#6fdd8b`,`#4ac26b`,`#2da44e`,`#1a7f37`,`#116329`,`#044f1e`,`#003d16`,`#002d11`],red:[`#ffebe9`,`#ffcecb`,`#ffaba8`,`#ff8182`,`#fa4549`,`#cf222e`,`#a40e26`,`#82071e`,`#660018`,`#4c0014`]}},dZ={name:`Monochrome`,description:`Pure black and white — zero color, maximum typography`,primaryColor:`mono`,primaryShade:{light:8,dark:1},autoContrast:!0,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`800`,textWrap:`wrap`,sizes:{h1:{fontSize:`2.25rem`,lineHeight:`1.15`},h2:{fontSize:`1.625rem`,lineHeight:`1.25`},h3:{fontSize:`1.25rem`,lineHeight:`1.35`},h4:{fontSize:`1.0625rem`,lineHeight:`1.45`},h5:{fontSize:`0.9375rem`,lineHeight:`1.5`},h6:{fontSize:`0.8125rem`,lineHeight:`1.5`}}},defaultRadius:`0`,radius:{xs:`0`,sm:`0`,md:`0`,lg:`0`,xl:`2px`},shadows:{xs:`0 1px 2px rgba(0, 0, 0, 0.08)`,sm:`0 1px 4px rgba(0, 0, 0, 0.1)`,md:`0 2px 8px rgba(0, 0, 0, 0.12)`,lg:`0 4px 16px rgba(0, 0, 0, 0.14)`,xl:`0 8px 32px rgba(0, 0, 0, 0.16)`},colors:{mono:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],gray:[`#f5f5f5`,`#e5e5e5`,`#cccccc`,`#b0b0b0`,`#909090`,`#707070`,`#555555`,`#3a3a3a`,`#252525`,`#121212`],blue:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],green:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],red:[`#f5f5f5`,`#e0e0e0`,`#c0c0c0`,`#a0a0a0`,`#808080`,`#606060`,`#404040`,`#282828`,`#141414`,`#000000`],dark:[`#d0d0d0`,`#a0a0a0`,`#707070`,`#505050`,`#383838`,`#282828`,`#1c1c1c`,`#141414`,`#0a0a0a`,`#000000`]},components:{Button:pG.extend({defaultProps:{fw:700},styles:{root:{border:`2px solid currentColor`,letterSpacing:`0.03em`,textTransform:`uppercase`,fontSize:`0.8125rem`}}}),ActionIcon:dV.extend({styles:{root:{border:`2px solid currentColor`}}}),Paper:dB.extend({styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),Card:bG.extend({styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),TextInput:UX.extend({styles:{input:{border:`2px solid var(--mantine-color-default-border)`}}}),Badge:tG.extend({defaultProps:{fw:700,variant:`outline`},styles:{root:{textTransform:`uppercase`,letterSpacing:`0.06em`,fontSize:`0.65rem`,border:`2px solid currentColor`}}})}},fZ={name:`Rosé Pine`,description:`Muted pinks and golds on warm dark backgrounds`,defaultColorScheme:`dark`,primaryColor:`rose`,primaryShade:{light:5,dark:4},autoContrast:!0,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`600`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`md`,radius:{xs:`4px`,sm:`6px`,md:`8px`,lg:`12px`,xl:`16px`},shadows:{xs:`0 1px 3px rgba(0, 0, 0, 0.2)`,sm:`0 2px 6px rgba(0, 0, 0, 0.2)`,md:`0 4px 12px rgba(0, 0, 0, 0.25)`,lg:`0 8px 24px rgba(0, 0, 0, 0.3)`,xl:`0 12px 36px rgba(0, 0, 0, 0.35)`},colors:{rose:[`#faf0f4`,`#f2d8e3`,`#eabdd0`,`#e0a0bb`,`#d4849f`,`#c4748f`,`#b06282`,`#9a5275`,`#7a3f5e`,`#5c2e47`],gold:[`#fdf8ec`,`#f8ecc8`,`#f2dda0`,`#eacb72`,`#e0b94d`,`#c9a33e`,`#a98830`,`#866b24`,`#634f1a`,`#403310`],pine:[`#ecf5f0`,`#d0e6da`,`#add4be`,`#86c0a0`,`#62ac84`,`#4e9670`,`#3e7a5a`,`#2f5e44`,`#20412f`,`#12251b`],foam:[`#edf6f7`,`#d2e9eb`,`#b0d9dd`,`#8bc6cc`,`#6ab3bb`,`#569da5`,`#438088`,`#33636a`,`#23454a`,`#14292c`],red:[`#f9eef0`,`#efd3d8`,`#e3b2bb`,`#d68e9b`,`#c86c7c`,`#b25566`,`#944454`,`#733442`,`#52252f`,`#33161d`],gray:[`#f4f0f2`,`#e4dde1`,`#cec5cb`,`#b5aab2`,`#9a8e96`,`#7e737a`,`#635a60`,`#4a4248`,`#332d31`,`#1e1a1c`],dark:[`#e0d8e0`,`#b0a6b2`,`#817786`,`#615768`,`#4a3f54`,`#3a3044`,`#2a2436`,`#211e2e`,`#1a1724`,`#110f1a`]},components:{Button:pG.extend({defaultProps:{fw:500},styles:{root:{transition:`background-color 0.15s ease, opacity 0.15s ease`}}}),ActionIcon:dV.extend({styles:{root:{transition:`background-color 0.15s ease, opacity 0.15s ease`}}}),Paper:dB.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:bG.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:UX.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`}}}),Badge:tG.extend({defaultProps:{fw:500}})}},pZ={name:`Soft Brutalism`,description:`Pastel pop with bold borders and offset shadows`,head:{link:[{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossorigin:``},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap`}]},primaryColor:`lavender`,primaryShade:{light:5,dark:7},autoContrast:!0,cursorType:`pointer`,fontFamily:`Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`2rem`,lineHeight:`1.25`},h2:{fontSize:`1.5rem`,lineHeight:`1.3`},h3:{fontSize:`1.25rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`md`,radius:{xs:`6px`,sm:`8px`,md:`12px`,lg:`16px`,xl:`24px`},shadows:{xs:`2px 2px 0 0 rgba(100, 80, 140, 0.15)`,sm:`3px 3px 0 0 rgba(100, 80, 140, 0.2)`,md:`4px 4px 0 0 rgba(100, 80, 140, 0.2)`,lg:`6px 6px 0 0 rgba(100, 80, 140, 0.25)`,xl:`8px 8px 0 0 rgba(100, 80, 140, 0.3)`},colors:{lavender:[`#f3f0fa`,`#e4dcf4`,`#d1c4e9`,`#b4a7d6`,`#9a8bc4`,`#7f6cb0`,`#6a549e`,`#543f87`,`#3d2d6b`,`#2a1d52`],peach:[`#fef3ec`,`#fce4d0`,`#f9d0ae`,`#f4b886`,`#f4a261`,`#e68a42`,`#c67234`,`#a35a28`,`#6b3a1a`,`#4a2710`],mint:[`#ecfaf0`,`#d4f2dc`,`#b3e8c2`,`#8edba4`,`#81c995`,`#5ab874`,`#42a05c`,`#2e8548`,`#1a5c2e`,`#0f3f1e`],coral:[`#fef0ef`,`#fcd9d7`,`#f8b8b4`,`#f29490`,`#e97171`,`#d65454`,`#b83e3e`,`#962d2d`,`#6b1f1f`,`#4a1414`],gray:[`#faf8f6`,`#f0ece8`,`#ddd7d0`,`#c4bbb2`,`#a89e95`,`#8c8279`,`#6e655d`,`#524b44`,`#3a342f`,`#24211e`],dark:[`#d4d0dc`,`#a9a2b5`,`#7e7690`,`#5c546e`,`#443c56`,`#342d45`,`#2a2339`,`#1e1a2e`,`#161224`,`#0f0c1a`]},components:{Button:pG.extend({defaultProps:{fw:600},styles:{root:{border:`2px solid currentColor`,boxShadow:`3px 3px 0 0 rgba(100, 80, 140, 0.2)`,transition:`box-shadow 0.15s ease, transform 0.15s ease`}}}),ActionIcon:dV.extend({styles:{root:{border:`2px solid currentColor`,boxShadow:`2px 2px 0 0 rgba(100, 80, 140, 0.15)`}}}),Paper:dB.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),Card:bG.extend({defaultProps:{shadow:`sm`},styles:{root:{border:`2px solid var(--mantine-color-default-border)`}}}),TextInput:UX.extend({styles:{input:{border:`2px solid var(--mantine-color-default-border)`,transition:`box-shadow 0.15s ease, border-color 0.15s ease`}}}),Badge:tG.extend({defaultProps:{fw:600},styles:{root:{border:`2px solid currentColor`}}})}},mZ={name:`Terminal`,description:`Green phosphor on black — monospace hacker aesthetic`,defaultColorScheme:`dark`,primaryColor:`terminal`,primaryShade:{light:5,dark:4},autoContrast:!0,fontFamily:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,fontFamilyMonospace:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,headings:{fontFamily:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:`1.75rem`,lineHeight:`1.3`},h2:{fontSize:`1.375rem`,lineHeight:`1.35`},h3:{fontSize:`1.125rem`,lineHeight:`1.4`},h4:{fontSize:`1rem`,lineHeight:`1.5`},h5:{fontSize:`0.875rem`,lineHeight:`1.5`},h6:{fontSize:`0.75rem`,lineHeight:`1.5`}}},defaultRadius:`0`,radius:{xs:`0`,sm:`0`,md:`0`,lg:`2px`,xl:`4px`},shadows:{xs:`none`,sm:`none`,md:`0 0 8px rgba(0, 255, 65, 0.08)`,lg:`0 0 16px rgba(0, 255, 65, 0.1)`,xl:`0 0 24px rgba(0, 255, 65, 0.12)`},colors:{terminal:[`#e6fff0`,`#b3ffd1`,`#80ffb3`,`#4dff94`,`#00ff41`,`#00d636`,`#00ad2b`,`#008521`,`#005c17`,`#00330d`],amber:[`#fff8e6`,`#ffecb3`,`#ffe080`,`#ffd54d`,`#ffca28`,`#d4a520`,`#aa8418`,`#806310`,`#554208`,`#2b2104`],red:[`#ffe6e6`,`#ffb3b3`,`#ff8080`,`#ff4d4d`,`#ff1a1a`,`#d41515`,`#aa1010`,`#800c0c`,`#550808`,`#2b0404`],gray:[`#e8eaed`,`#c8cdd3`,`#a4aab3`,`#808892`,`#5f6872`,`#474f58`,`#363c44`,`#282d33`,`#1c2026`,`#12151a`],dark:[`#c9cdd2`,`#8b9198`,`#5c636b`,`#3d444c`,`#2b3138`,`#1e242b`,`#151a20`,`#0e1216`,`#080c0f`,`#020303`]},components:{Button:pG.extend({defaultProps:{fw:600},styles:{root:{border:`1px solid currentColor`,textTransform:`uppercase`,letterSpacing:`0.05em`,fontSize:`0.8125rem`}}}),ActionIcon:dV.extend({styles:{root:{border:`1px solid currentColor`}}}),Paper:dB.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),Card:bG.extend({styles:{root:{border:`1px solid var(--mantine-color-default-border)`}}}),TextInput:UX.extend({styles:{input:{border:`1px solid var(--mantine-color-default-border)`,fontFamily:`inherit`}}}),Badge:tG.extend({defaultProps:{fw:600},styles:{root:{border:`1px solid currentColor`,textTransform:`uppercase`,letterSpacing:`0.05em`}}})}},hZ=Tk({name:`alepha.ui.themeList`,schema:K.array(K.json()),default:[Dj,uZ,pZ,mZ,lZ,fZ,dZ]}),gZ=class e{alepha=D(Ok);cookie=_j({name:`theme`,schema:Tj.schema,ttl:[1,`year`]});overridesCookie=_j({name:`themeOverrides`,schema:Ej.schema,ttl:[1,`year`]});head=fj(()=>{let e=this.getTheme();return!e||!e.name?{}:{htmlAttributes:{"data-theme":this.slugify(e.name)},...e.head}});setTheme(e){if(!this.alepha.store.get(hZ)[e])throw new p(`Theme with index ${e} not found`);this.cookie.set({index:e}),this.alepha.store.set(Tj,{index:e}),this.alepha.isBrowser()&&this.alepha.inject(mj).refreshGlobalHead()}slugify(e){return e.toLowerCase().replace(/\s+/g,`-`)}static FONT_SIZE_MULTIPLIERS={xs:.85,sm:.925,md:1,lg:1.1,xl:1.25};static SCALE_VALUES={xs:.85,sm:.925,md:1,lg:1.1,xl:1.25};static DEFAULT_FONT_SIZES={xs:`0.75rem`,sm:`0.875rem`,md:`1rem`,lg:`1.125rem`,xl:`1.25rem`};getTheme(){let t=this.getThemeIndex(),n=this.alepha.store.get(hZ),r=n[t]||n[0]||Dj,i=this.getThemeOverrides();if(!i.primaryColor&&!i.radius&&!i.fontFamily&&!i.fontSize&&!i.scale)return r;let a={...r,...i.primaryColor&&{primaryColor:i.primaryColor},...i.radius&&{defaultRadius:i.radius},...i.fontFamily&&{fontFamily:i.fontFamily},...i.scale&&i.scale!==`md`&&{scale:e.SCALE_VALUES[i.scale]??1}};if(i.fontSize&&i.fontSize!==`md`){let t=e.FONT_SIZE_MULTIPLIERS[i.fontSize]??1,n=r.fontSizes??e.DEFAULT_FONT_SIZES;a.fontSizes=Object.fromEntries(Object.entries(n).map(([e,n])=>[e,`${(Number.parseFloat(String(n))*t).toFixed(4)}rem`]))}return a}setThemeOverrides(e){this.overridesCookie.set(e),this.alepha.store.set(Ej,e),this.alepha.isBrowser()&&this.alepha.inject(mj).refreshGlobalHead()}getThemeOverrides(){try{return this.overridesCookie.get()??this.alepha.store.get(Ej)??{}}catch{return this.alepha.store.get(Ej)??{}}}resetThemeOverrides(){this.setThemeOverrides({})}getThemeIndex(){try{return this.cookie.get()?.index??this.alepha.store.get(Tj)?.index??0}catch{return this.alepha.store.get(Tj)?.index??0}}},_Z=(0,q.createContext)(null);_Z.displayName=`@mantine/modals/ModalsContext`;function vZ(){let e=(0,q.use)(_Z);if(!e)throw Error(`[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component`);return e}var[yZ,bZ]=hN(`mantine-modals`),xZ={open:e=>{let t=e.modalId||cM();return bZ(`openModal`)({...e,modalId:t}),t},close:bZ(`closeModal`),closeAll:bZ(`closeAllModals`),openConfirmModal:e=>{let t=e.modalId||cM();return bZ(`openConfirmModal`)({...e,modalId:t}),t},openContextModal:e=>{let t=e.modalId||cM();return bZ(`openContextModal`)({...e,modalId:t}),t},updateModal:e=>bZ(`updateModal`)(e),updateContextModal:e=>bZ(`updateContextModal`)(e)};function SZ({id:e,cancelProps:t,confirmProps:n,labels:r={cancel:``,confirm:``},closeOnConfirm:i=!0,closeOnCancel:a=!0,groupProps:o,onCancel:s,onConfirm:c,children:l}){let{cancel:u,confirm:d}=r,f=vZ(),p=n=>{typeof t?.onClick==`function`&&t?.onClick(n),typeof s==`function`&&s(),a&&f.closeModal(e)},m=t=>{typeof n?.onClick==`function`&&n?.onClick(t),typeof c==`function`&&c(),i&&f.closeModal(e)};return(0,J.jsxs)(J.Fragment,{children:[l&&(0,J.jsx)($,{mb:`md`,children:l}),(0,J.jsxs)(xV,{mt:l?0:`md`,justify:`flex-end`,...o,children:[(0,J.jsx)(pG,{variant:`default`,...t,onClick:p,children:t?.children||u}),(0,J.jsx)(pG,{...n,onClick:m,children:n?.children||d})]})]})}function CZ(e,t){t&&e.type===`confirm`&&e.props.onCancel?.(),e.props.onClose?.()}function wZ(e,t){switch(t.type){case`OPEN`:return{current:t.modal,modals:[...e.modals,t.modal]};case`CLOSE`:{if(!e.modals.find(e=>e.id===t.modalId))return e;let n=e.modals.filter(e=>e.id!==t.modalId);return{current:n[n.length-1]||e.current,modals:n}}case`CLOSE_ALL`:return e.modals.length?{current:e.current,modals:[]}:e;case`UPDATE`:{let{modalId:n,newProps:r}=t,i=e.modals.map(e=>e.id===n?e.type===`content`||e.type===`confirm`?{...e,props:{...e.props,...r}}:e.type===`context`?{...e,props:{...e.props,...r,innerProps:{...e.props.innerProps,...r.innerProps}}}:e:e),a=e.current?.id===n&&i.find(e=>e.id===n)||e.current;return{...e,modals:i,current:a}}default:return e}}function TZ(e){if(!e)return{confirmProps:{},modalProps:{}};let{id:t,children:n,onCancel:r,onConfirm:i,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:c,groupProps:l,labels:u,...d}=e;return{confirmProps:{id:t,children:n,onCancel:r,onConfirm:i,closeOnConfirm:a,closeOnCancel:o,cancelProps:s,confirmProps:c,groupProps:l,labels:u},modalProps:{id:t,...d}}}function EZ({children:e,modalProps:t,labels:n,modals:r}){let[i,a]=(0,q.useReducer)(wZ,{modals:[],current:null}),o=(0,q.useRef)(i);o.current=i;let s=(0,q.useCallback)(e=>{o.current.modals.concat().reverse().forEach(t=>{CZ(t,e)}),a({type:`CLOSE_ALL`,canceled:e})},[o,a]),c=(0,q.useCallback)(({modalId:e,...t})=>{let n=e||cM();return a({type:`OPEN`,modal:{id:n,type:`content`,props:t}}),n},[a]),l=(0,q.useCallback)(({modalId:e,...t})=>{let n=e||cM();return a({type:`OPEN`,modal:{id:n,type:`confirm`,props:t}}),n},[a]),u=(0,q.useCallback)((e,{modalId:t,...n})=>{let r=t||cM();return a({type:`OPEN`,modal:{id:r,type:`context`,props:n,ctx:e}}),r},[a]),d=(0,q.useCallback)((e,t)=>{let n=o.current.modals.find(t=>t.id===e);n&&CZ(n,t),a({type:`CLOSE`,modalId:e,canceled:t})},[o,a]),f=(0,q.useCallback)(({modalId:e,...t})=>{a({type:`UPDATE`,modalId:e,newProps:t})},[a]),p=(0,q.useCallback)(({modalId:e,...t})=>{a({type:`UPDATE`,modalId:e,newProps:t})},[a]);yZ({openModal:c,openConfirmModal:l,openContextModal:({modal:e,...t})=>u(e,t),closeModal:d,closeContextModal:d,closeAllModals:s,updateModal:f,updateContextModal:p});let m={modalProps:t||{},modals:i.modals,openModal:c,openConfirmModal:l,openContextModal:u,closeModal:d,closeContextModal:d,closeAll:s,updateModal:f,updateContextModal:p},{modalProps:h,content:g}=(()=>{let e=o.current.current;switch(e?.type){case`context`:{let{innerProps:t,...n}=e.props,i=r[e.ctx];return{modalProps:n,content:(0,J.jsx)(i,{innerProps:t,context:m,id:e.id})}}case`confirm`:{let{modalProps:t,confirmProps:r}=TZ(e.props);return{modalProps:t,content:(0,J.jsx)(SZ,{...r,id:e.id,labels:e.props.labels||n})}}case`content`:{let{children:t,...n}=e.props;return{modalProps:n,content:t}}default:return{modalProps:{},content:null}}})();return(0,J.jsxs)(_Z,{value:m,children:[(0,J.jsx)(Uq,{zIndex:qj(`modal`)+1,...t,...h,opened:i.modals.length>0,onClose:()=>d(i.current?.id),children:g}),e]})}var DZ=({options:e,onClose:t})=>(0,J.jsxs)(J.Fragment,{children:[e?.message&&(0,J.jsx)(jU,{mb:`md`,children:e.message}),(0,J.jsx)(bU,{justify:`flex-end`,children:(0,J.jsx)(pG,{onClick:t,children:e?.okLabel||`OK`})})]}),OZ=({options:e,onConfirm:t})=>(0,J.jsxs)(J.Fragment,{children:[e?.message&&(0,J.jsx)(jU,{mb:`md`,children:e.message}),(0,J.jsxs)(bU,{justify:`flex-end`,children:[(0,J.jsx)(pG,{variant:`subtle`,onClick:()=>t(!1),children:e?.cancelLabel||`Cancel`}),(0,J.jsx)(pG,{color:e?.confirmColor||`blue`,onClick:()=>t(!0),children:e?.confirmLabel||`Confirm`})]})]}),kZ=({options:e,onSubmit:t})=>{let[n,r]=(0,q.useState)(e?.defaultValue||``),i=(0,q.useRef)(null);(0,q.useEffect)(()=>{i.current?.focus()},[]);let a=()=>{(!e?.required||n.trim())&&t(n)};return(0,J.jsxs)(J.Fragment,{children:[e?.message&&(0,J.jsx)(jU,{mb:`md`,children:e.message}),(0,J.jsx)(UX,{ref:i,label:e?.label,placeholder:e?.placeholder,value:n,onChange:e=>r(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&a()},required:e?.required,mb:`md`}),(0,J.jsxs)(bU,{justify:`flex-end`,gap:`xs`,children:[(0,J.jsx)(pG,{variant:`subtle`,onClick:()=>t(null),children:e?.cancelLabel||`Cancel`}),(0,J.jsx)(pG,{onClick:a,disabled:e?.required&&!n.trim(),children:e?.submitLabel||`OK`})]})]})},AZ=class{options={default:{centered:!0,withCloseButton:!0,size:`md`,overlayProps:{backgroundOpacity:.55,blur:3},transitionProps:{transition:`pop`,duration:200}}};alert(e){return new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())},i=this.open({...e,title:e?.title||`Alert`,onClose:r,content:(0,J.jsx)(DZ,{options:e,onClose:()=>{this.close(i),r()}})})})}confirm(e){return new Promise(t=>{let n=!1,r=e=>{n||(n=!0,t(e))},i=this.open({...e,title:e?.title||`Confirm`,closeOnClickOutside:!1,closeOnEscape:!1,onClose:()=>r(!1),content:(0,J.jsx)(OZ,{options:e,onConfirm:e=>{r(e),this.close(i)}})})})}prompt(e){return new Promise(t=>{let n=!1,r=e=>{n||(n=!0,t(e))},i=this.open({...e,title:e?.title||`Input`,closeOnClickOutside:!1,closeOnEscape:!1,onClose:()=>r(null),content:(0,J.jsx)(kZ,{options:e,onSubmit:e=>{r(e),this.close(i)}})})})}open(e){return xZ.open({...this.options.default,...e,children:e?.content||e?.message})}close(e){e?xZ.close(e):xZ.closeAll()}};function jZ(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function MZ(e){return(0,q.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}function NZ(e,t,n){let r=[],i=[],a={};for(let o of e){let e=o.position||t;a[e]=a[e]||0,a[e]+=1,a[e]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}var PZ=jZ({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),FZ=(e=PZ)=>MZ(e);function IZ(e,t){let n=e.getState(),r=NZ(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function LZ(e,t=PZ){let n=e.id||cM();return IZ(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function RZ(e,t=PZ){return IZ(t,t=>t.filter(t=>t.id===e?(t.onClose?.(t),!1):!0)),e}function zZ(e,t=PZ){return IZ(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function BZ(e=PZ){IZ(e,()=>[])}function VZ(e=PZ){IZ(e,t=>t.slice(0,e.getState().limit))}var HZ={show:LZ,hide:RZ,update:zZ,clean:BZ,cleanQueue:VZ,updateState:IZ},UZ=[`bottom-center`,`bottom-left`,`bottom-right`,`top-center`,`top-left`,`top-right`];function WZ(e,t){return e.reduce((e,n)=>(e[n.position||t].push(n),e),UZ.reduce((e,t)=>(e[t]=[],e),{}))}var GZ={left:`translateX(-100%)`,right:`translateX(100%)`,"top-center":`translateY(-100%)`,"bottom-center":`translateY(100%)`},KZ={left:`translateX(0)`,right:`translateX(0)`,"top-center":`translateY(0)`,"bottom-center":`translateY(0)`};function qZ({state:e,maxHeight:t,position:n,transitionDuration:r}){let[i,a]=n.split(`-`),o=a===`center`?`${i}-center`:a,s={opacity:0,maxHeight:t,transform:GZ[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear`,transitionProperty:`opacity, transform, max-height`},c={opacity:1,transform:KZ[o]},l={opacity:0,maxHeight:0,transform:GZ[o]},u={entering:c,entered:c,exiting:l,exited:l};return{...s,...u[e]}}function JZ(e,t){return typeof t==`number`?t:t===!1||e===!1?!1:e}function YZ({data:e,onHide:t,autoClose:n,paused:r,onHoverStart:i,onHoverEnd:a,...o}){let{autoClose:s,message:c,...l}=e,u=JZ(n,e.autoClose),d=(0,q.useRef)(-1),[f,p]=(0,q.useState)(!1),m=()=>window.clearTimeout(d.current),h=()=>{t(e.id),m()},g=()=>{m(),typeof u==`number`&&(d.current=window.setTimeout(h,u))},_=()=>{p(!0),i?.()},v=()=>{p(!1),a?.()};return(0,q.useEffect)(()=>{e.onOpen?.(e)},[]),(0,q.useEffect)(()=>(g(),m),[u]),(0,q.useEffect)(()=>(r||f?m():g(),m),[r,f]),(0,J.jsx)(dJ,{...o,...l,onClose:h,onMouseEnter:_,onMouseLeave:v,children:c})}YZ.displayName=`@mantine/notifications/NotificationContainer`;var XZ={root:`m_b37d9ac7`,notification:`m_5ed0edd0`};function ZZ(){return ZZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZZ.apply(null,arguments)}function QZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $Z(e,t){return $Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$Z(e,t)}function eQ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$Z(e,t)}var tQ={disabled:!1},nQ=q.createContext(null),rQ=function(e){return e.scrollTop},iQ=`unmounted`,aQ=`exited`,oQ=`entering`,sQ=`entered`,cQ=`exiting`,lQ=function(e){eQ(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=aQ,r.appearStatus=oQ):o=sQ:o=t.unmountOnExit||t.mountOnEnter?iQ:aQ,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:aQ}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=oQ):(n===`entering`||n===`entered`)&&(t=cQ)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:JR.default.findDOMNode(this);n&&rQ(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:iQ})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[JR.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||tQ.disabled){this.safeSetState({status:sQ},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:oQ},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:sQ},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:JR.default.findDOMNode(this);if(!t||tQ.disabled){this.safeSetState({status:aQ},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:cQ},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:aQ},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:JR.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=QZ(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return q.createElement(nQ.Provider,{value:null},typeof n==`function`?n(e,r):q.cloneElement(q.Children.only(n),r))},t}(q.Component);lQ.contextType=nQ,lQ.propTypes={};function uQ(){}lQ.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:uQ,onEntering:uQ,onEntered:uQ,onExit:uQ,onExiting:uQ,onExited:uQ},lQ.UNMOUNTED=iQ,lQ.EXITED=aQ,lQ.ENTERING=oQ,lQ.ENTERED=sQ,lQ.EXITING=cQ;function dQ(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function fQ(e,t){var n=function(e){return t&&(0,q.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&q.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function pQ(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function mQ(e,t,n){return n[t]==null?e.props[t]:n[t]}function hQ(e,t){return fQ(e.children,function(n){return(0,q.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:mQ(n,`appear`,e),enter:mQ(n,`enter`,e),exit:mQ(n,`exit`,e)})})}function gQ(e,t,n){var r=fQ(e.children),i=pQ(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,q.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,q.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,q.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:mQ(o,`exit`,e),enter:mQ(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,q.cloneElement)(o,{in:!1}):c&&s&&(0,q.isValidElement)(l)&&(i[a]=(0,q.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:mQ(o,`exit`,e),enter:mQ(o,`enter`,e)}))}}),i}var _Q=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},vQ={component:`div`,childFactory:function(e){return e}},yQ=function(e){eQ(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(dQ(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?hQ(e,r):gQ(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=fQ(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=ZZ({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=QZ(e,[`component`,`childFactory`]),i=this.state.contextValue,a=_Q(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?q.createElement(nQ.Provider,{value:i},a):q.createElement(nQ.Provider,{value:i},q.createElement(t,r,a))},t}(q.Component);yQ.propTypes={},yQ.defaultProps=vQ;var bQ=lQ,xQ={position:`bottom-right`,autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:qj(`overlay`),store:PZ,withinPortal:!0,pauseResetOnHover:`all`},SQ=TN((e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":X(n)}})),CQ=Q(e=>{let t=Z(`Notifications`,xQ,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,position:l,autoClose:u,transitionDuration:d,containerWidth:f,notificationMaxHeight:p,limit:m,zIndex:h,store:g,portalProps:_,withinPortal:v,pauseResetOnHover:y,...b}=t,x=EP(),S=FZ(g),C=jM(),w=BM(),T=(0,q.useRef)({}),E=(0,q.useRef)(0),[D,O]=(0,q.useState)(0),k=(0,q.useCallback)(()=>O(e=>e+1),[]),A=(0,q.useCallback)(()=>O(e=>Math.max(0,e-1)),[]),j=x.respectReducedMotion&&w?1:d,M=rF({name:`Notifications`,classes:XZ,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:SQ});(0,q.useEffect)(()=>{g?.updateState(e=>({...e,limit:m||5,defaultPosition:l}))},[m,l]),vM(()=>{S.notifications.length>E.current&&setTimeout(()=>C(),0),E.current=S.notifications.length},[S.notifications]);let N=WZ(S.notifications,l),P=UZ.reduce((e,t)=>(e[t]=N[t].map(({style:e,...n})=>(0,J.jsx)(bQ,{timeout:j,onEnter:()=>T.current[n.id].offsetHeight,nodeRef:{current:T.current[n.id]},children:r=>(0,J.jsx)(YZ,{ref:e=>{e&&(T.current[n.id]=e)},data:n,onHide:e=>RZ(e,g),autoClose:u,paused:y===`all`?D>0:!1,onHoverStart:k,onHoverEnd:A,...M(`notification`,{style:{...qZ({state:r,position:t,transitionDuration:j,maxHeight:p}),...e}})})},n.id)),e),{});return(0,J.jsxs)(DB,{withinPortal:v,..._,children:[(0,J.jsx)($,{...M(`root`),"data-position":`top-center`,...b,children:(0,J.jsx)(yQ,{children:P[`top-center`]})}),(0,J.jsx)($,{...M(`root`),"data-position":`top-left`,...b,children:(0,J.jsx)(yQ,{children:P[`top-left`]})}),(0,J.jsx)($,{...M(`root`,{className:PH.classNames.fullWidth}),"data-position":`top-right`,...b,children:(0,J.jsx)(yQ,{children:P[`top-right`]})}),(0,J.jsx)($,{...M(`root`,{className:PH.classNames.fullWidth}),"data-position":`bottom-right`,...b,children:(0,J.jsx)(yQ,{children:P[`bottom-right`]})}),(0,J.jsx)($,{...M(`root`),"data-position":`bottom-left`,...b,children:(0,J.jsx)(yQ,{children:P[`bottom-left`]})}),(0,J.jsx)($,{...M(`root`),"data-position":`bottom-center`,...b,children:(0,J.jsx)(yQ,{children:P[`bottom-center`]})})]})});CQ.classes=XZ,CQ.varsResolver=SQ,CQ.displayName=`@mantine/notifications/Notifications`,CQ.show=HZ.show,CQ.hide=HZ.hide,CQ.update=HZ.update,CQ.clean=HZ.clean,CQ.cleanQueue=HZ.cleanQueue,CQ.updateState=HZ.updateState;var wQ={outline:{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`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},TQ=(e,t,n,r)=>{let i=(0,q.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,q.createElement)(`svg`,{ref:u,...wQ[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,q.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,q.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},EQ=TQ(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),DQ=TQ(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),OQ=TQ(`outline`,`at`,`At`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28`,key:`svg-1`}]]),kQ=TQ(`outline`,`calendar`,`Calendar`,[[`path`,{d:`M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12`,key:`svg-0`}],[`path`,{d:`M16 3v4`,key:`svg-1`}],[`path`,{d:`M8 3v4`,key:`svg-2`}],[`path`,{d:`M4 11h16`,key:`svg-3`}],[`path`,{d:`M11 15h1`,key:`svg-4`}],[`path`,{d:`M12 15v3`,key:`svg-5`}]]),AQ=TQ(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),jQ=TQ(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),MQ=TQ(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),NQ=TQ(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),PQ=TQ(`outline`,`color-picker`,`ColorPicker`,[[`path`,{d:`M11 7l6 6`,key:`svg-0`}],[`path`,{d:`M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4`,key:`svg-1`}]]),FQ=TQ(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),IQ=TQ(`outline`,`file`,`File`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}]]),LQ=TQ(`outline`,`filter`,`Filter`,[[`path`,{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}]]),RQ=TQ(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),zQ=TQ(`outline`,`hash`,`Hash`,[[`path`,{d:`M5 9l14 0`,key:`svg-0`}],[`path`,{d:`M5 15l14 0`,key:`svg-1`}],[`path`,{d:`M11 4l-4 16`,key:`svg-2`}],[`path`,{d:`M17 4l-4 16`,key:`svg-3`}]]),BQ=TQ(`outline`,`info-circle`,`InfoCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),VQ=TQ(`outline`,`info-triangle`,`InfoTriangle`,[[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),HQ=TQ(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),UQ=TQ(`outline`,`language`,`Language`,[[`path`,{d:`M9 6.371c0 4.418 -2.239 6.629 -5 6.629`,key:`svg-0`}],[`path`,{d:`M4 6.371h7`,key:`svg-1`}],[`path`,{d:`M5 9c0 2.144 2.252 3.908 6 4`,key:`svg-2`}],[`path`,{d:`M12 20l4 -9l4 9`,key:`svg-3`}],[`path`,{d:`M19.1 18h-6.2`,key:`svg-4`}],[`path`,{d:`M6.694 3l.793 .582`,key:`svg-5`}]]),WQ=TQ(`outline`,`layout-sidebar-left-collapse`,`LayoutSidebarLeftCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M9 4v16`,key:`svg-1`}],[`path`,{d:`M15 10l-2 2l2 2`,key:`svg-2`}]]),GQ=TQ(`outline`,`layout-sidebar-right-collapse`,`LayoutSidebarRightCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M15 4v16`,key:`svg-1`}],[`path`,{d:`M9 10l2 2l-2 2`,key:`svg-2`}]]),KQ=TQ(`outline`,`letter-case`,`LetterCase`,[[`path`,{d:`M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0`,key:`svg-0`}],[`path`,{d:`M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5`,key:`svg-1`}],[`path`,{d:`M3 13h7`,key:`svg-2`}],[`path`,{d:`M21 12v7`,key:`svg-3`}]]),qQ=TQ(`outline`,`link`,`Link`,[[`path`,{d:`M9 15l6 -6`,key:`svg-0`}],[`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`,key:`svg-1`}],[`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`,key:`svg-2`}]]),JQ=TQ(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),YQ=TQ(`outline`,`mail`,`Mail`,[[`path`,{d:`M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10`,key:`svg-0`}],[`path`,{d:`M3 7l9 6l9 -6`,key:`svg-1`}]]),XQ=TQ(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),ZQ=TQ(`outline`,`palette`,`Palette`,[[`path`,{d:`M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25`,key:`svg-0`}],[`path`,{d:`M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}]]),QQ=TQ(`outline`,`phone`,`Phone`,[[`path`,{d:`M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2`,key:`svg-0`}]]),$Q=TQ(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),e$=TQ(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),t$=TQ(`outline`,`selector`,`Selector`,[[`path`,{d:`M8 9l4 -4l4 4`,key:`svg-0`}],[`path`,{d:`M16 15l-4 4l-4 -4`,key:`svg-1`}]]),n$=TQ(`outline`,`square-rounded`,`SquareRounded`,[[`path`,{d:`M12 3c7.2 0 9 1.8 9 9c0 7.2 -1.8 9 -9 9c-7.2 0 -9 -1.8 -9 -9c0 -7.2 1.8 -9 9 -9`,key:`svg-0`}]]),r$=TQ(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),i$=TQ(`outline`,`toggle-left`,`ToggleLeft`,[[`path`,{d:`M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M2 12a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6`,key:`svg-1`}]]),a$=TQ(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),o$=TQ(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),s$=class{raw=HZ;options={default:{radius:`md`,withBorder:!0,withCloseButton:!0,autoClose:5e3,position:`top-center`}};show(e){HZ.show({...this.options.default,...e})}info(e){typeof e==`string`&&(e={message:e}),this.show({color:`blue`,icon:(0,J.jsx)(BQ,{size:20}),title:`Info`,message:`Information notification`,...e})}success(e){typeof e==`string`&&(e={message:e}),this.show({color:`green`,icon:(0,J.jsx)(AQ,{size:16}),title:`Success`,message:`Operation completed successfully`,...e})}warning(e){typeof e==`string`&&(e={message:e}),this.show({color:`yellow`,icon:(0,J.jsx)(EQ,{size:20}),title:`Warning`,message:`Please review this warning`,...e})}danger(e){typeof e==`string`&&(e={message:e}),this.show({color:`red`,icon:(0,J.jsx)(o$,{size:20}),title:`Error`,message:`An error occurred`,...e})}},c$=class{fetch(e,t={}){throw new p(`Fetch is not available for this environment.`)}render(e,t={}){throw new p(`Render is not available for this environment.`)}},l$=e=>x(u$,e),u$=class extends b{reactPageService=D(c$);onInit(){this.options.static&&(this.options.use??=[],this.options.use.some(e=>e[f]?.name===`$cache`)||this.options.use.push(IA({name:`page:${this.name}`,provider:`memory`,ttl:[1,`week`]})))}get name(){return this.options.name??this.config.propertyKey}async render(e){return this.reactPageService.render(this.name,e)}async fetch(e){return this.reactPageService.fetch(this.options.path||``,e)}};l$[u]=u$;var d$=class{routePathRegex=/^\/[A-Za-z0-9._~!$&%'()*+,;=:@{}?/-]*$/;tree={children:{}};cache=new Map;match(e){if(this.cache.has(e))return this.cache.get(e);let t=this.mapParams(this.createRouteMatch(e));return this.cache.set(e,t),t}test(e){if(!this.routePathRegex.test(e))throw new p(`Route '${e}' is not valid`)}push(e){let t=e.path.replaceAll(`//`,`/`);this.test(t);let n=this.createParts(t),r=this.tree;for(let i=0;i<n.length;i++){let a=i===n.length-1,o=n[i].toLowerCase();if(o===`*`&&a){r.wildcard={route:e};break}if(o.includes(`*`))throw new p(`Route '${t}' has an invalid wildcard syntax`);if(o.includes(`{`)||o.includes(`}`))if(o.startsWith(`{`)&&o.endsWith(`}`))o=`:${o.slice(1,-1)}`;else throw new p(`Route '${t}' has an invalid param syntax`);if(o.startsWith(`:`)){let o=n[i].slice(1).replaceAll(`}`,``);if(!o)throw new p(`Route '${t}' has an empty param name`);r.param?r.param.name!==o&&(e.mapParams??={},e.mapParams[r.param.name]=o):r.param={name:o,children:{}},a&&(r.param.route=e),r=r.param;continue}r.children[o]||(r.children[o]={children:{}}),a&&(r.children[o].route=e),r=r.children[o]}}createRouteMatch(e){if(e[0]!==`/`)throw new p(`Path '${e}' must start with "/"`);let t=this.createParts(e),n=this.tree,r,i={};for(let e=0;e<t.length;e++){let a=t[e].toLowerCase();if(n.children[a])n.wildcard&&(r=n.wildcard),n=n.children[a];else if(n.param)n.wildcard&&(r=n.wildcard),i[n.param.name]=t[e],n=n.param;else if(n.wildcard)return i[`*`]=t.slice(e).join(`/`),{route:n.wildcard.route,params:i};else return{route:r?.route,params:i}}return n?.route?{route:n.route,params:i}:n.wildcard?{route:n.wildcard.route,params:i}:{route:r?.route,params:i}}mapParams(e){if(e.route?.mapParams&&e.params)for(let[t,n]of Object.entries(e.route.mapParams))e.params[t]&&(e.params[n]=e.params[t],delete e.params[t]);return e}createParts(e){let t=e.split(`?`)[0].replaceAll(`//`,`/`);return t.endsWith(`/`)&&t.length>1&&(t=t.slice(0,-1)),t.split(`/`).slice(1)}},f$=e=>(0,J.jsxs)(`div`,{style:{width:`100%`,minHeight:`90vh`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,textAlign:`center`,fontFamily:`system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,padding:`2rem`,...e.style},children:[(0,J.jsx)(`div`,{style:{fontSize:`6rem`,fontWeight:200,lineHeight:1},children:`404`}),(0,J.jsx)(`div`,{style:{fontSize:`0.875rem`,marginTop:`1rem`,opacity:.6},children:`Page not found`})]}),p$=class extends p{redirect;constructor(e){super(`Redirection`),this.redirect=e}},m$=()=>{let[e]=nj(`alepha.react.router.state`);if(!e)throw new p(`Missing react router state`);return e},h$=`ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace`,g$=e=>e.alepha.isProduction()?(0,J.jsx)(y$,{error:e.error}):(0,J.jsx)(_$,{...e}),_$=e=>{let[t,n]=(0,q.useState)(!1),r=m$().url.pathname,i=()=>{let t=x$(e.error);typeof navigator<`u`&&navigator.clipboard&&(navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),2e3))},a=S$(e.error);return(0,J.jsx)(`div`,{style:C$.overlay,children:(0,J.jsxs)(`div`,{style:C$.card,children:[(0,J.jsxs)(`div`,{style:C$.header,children:[(0,J.jsxs)(`div`,{style:C$.headerLeft,children:[(0,J.jsx)(`div`,{style:C$.icon,children:`!`}),(0,J.jsx)(`div`,{style:C$.title,children:e.error.name||`Error`})]}),(0,J.jsxs)(`div`,{style:C$.headerRight,children:[e.onRetry&&(0,J.jsx)(`button`,{type:`button`,style:C$.retryBtn,onClick:e.onRetry,children:`Retry`}),(0,J.jsx)(`button`,{type:`button`,style:C$.copyBtn,onClick:i,children:t?`Copied`:`Copy`})]})]}),(0,J.jsx)(v$,{error:e.error}),(0,J.jsxs)(`div`,{style:C$.meta,children:[r&&(0,J.jsx)(`span`,{style:C$.metaItem,children:r}),(0,J.jsx)(`span`,{style:C$.metaItem,children:new Date().toLocaleTimeString()}),a&&(0,J.jsx)(`span`,{style:C$.statusBadge,children:a})]})]})})},v$=e=>{let{error:t,depth:n=0}=e;return(0,J.jsxs)(J.Fragment,{children:[n>0&&(0,J.jsx)(`div`,{style:C$.causedBy,children:`Caused by:`}),(0,J.jsxs)(`pre`,{style:C$.messageBlock,children:[t.name,`: `,t.message]}),t.stack&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{style:C$.stackLabel,children:`STACK TRACE`}),(0,J.jsx)(`pre`,{style:C$.stackBlock,children:b$(t.stack)})]}),t.cause instanceof Error&&(0,J.jsx)(v$,{error:t.cause,depth:n+1})]})},y$=e=>{let t=e.error.requestId;return(0,J.jsx)(`div`,{style:w$.page,children:(0,J.jsxs)(`div`,{style:w$.card,children:[(0,J.jsx)(`div`,{style:w$.heading,children:`Something went wrong`}),(0,J.jsx)(`div`,{style:w$.subtitle,children:`We're having trouble processing your request.`}),t&&(0,J.jsxs)(`div`,{style:w$.refText,children:[`Reference: `,t]}),(0,J.jsxs)(`div`,{style:w$.actions,children:[(0,J.jsx)(`button`,{type:`button`,style:w$.reloadBtn,onClick:()=>{typeof window<`u`&&window.location.reload()},children:`Reload page`}),(0,J.jsx)(`a`,{href:`/`,style:w$.homeLink,children:`Go home`})]})]})})};function b$(e){return e.split(`
69
+ `).slice(1).map(e=>e.trim()).join(`
70
+ `)}function x$(e){let t=[],n=(e,r)=>{r>0&&t.push(`
71
+ Caused by:`),t.push(`${e.name}: ${e.message}`),e.stack&&t.push(b$(e.stack)),e.cause instanceof Error&&n(e.cause,r+1)};return n(e,0),t.join(`
72
+ `)}function S$(e){if(`status`in e&&typeof e.status==`number`)return e.status}var C$={overlay:{position:`fixed`,inset:0,zIndex:2147483647,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`24px`,backgroundColor:`rgba(0, 0, 0, 0.75)`,backdropFilter:`blur(4px)`,fontFamily:h$,fontSize:`13px`,color:`#e5e7eb`,boxSizing:`border-box`,overflow:`auto`},card:{width:`100%`,maxWidth:`900px`,maxHeight:`90vh`,overflow:`auto`,padding:`24px`,backgroundColor:`#111`,borderLeft:`4px solid #ef4444`,borderRadius:`8px`,boxShadow:`0 25px 50px rgba(0, 0, 0, 0.5)`},header:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`20px`,flexWrap:`wrap`,gap:`12px`},headerLeft:{display:`flex`,alignItems:`center`,gap:`12px`,minWidth:0},headerRight:{display:`flex`,gap:`8px`,flexShrink:0},icon:{width:`28px`,height:`28px`,borderRadius:`50%`,backgroundColor:`#ef4444`,color:`#fff`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700,fontSize:`16px`,flexShrink:0},title:{color:`#f87171`,fontSize:`18px`,fontWeight:700},retryBtn:{padding:`6px 16px`,backgroundColor:`#2563eb`,color:`#fff`,border:`none`,borderRadius:`6px`,cursor:`pointer`,fontFamily:h$,fontSize:`12px`,fontWeight:600},copyBtn:{padding:`6px 16px`,backgroundColor:`transparent`,color:`#9ca3af`,border:`1px solid #374151`,borderRadius:`6px`,cursor:`pointer`,fontFamily:h$,fontSize:`12px`,fontWeight:600},messageBlock:{margin:`0 0 12px`,padding:`12px`,backgroundColor:`#1f2937`,borderRadius:`6px`,color:`#f9fafb`,fontSize:`13px`,lineHeight:1.6,whiteSpace:`pre-wrap`,wordBreak:`break-word`,overflow:`auto`},stackLabel:{fontSize:`10px`,color:`#6b7280`,textTransform:`uppercase`,letterSpacing:`1.5px`,marginBottom:`6px`,fontWeight:600},stackBlock:{margin:`0 0 20px`,padding:`12px`,backgroundColor:`#0f172a`,borderRadius:`6px`,color:`#94a3b8`,fontSize:`12px`,lineHeight:1.6,whiteSpace:`pre-wrap`,wordBreak:`break-all`,overflow:`auto`},causedBy:{fontSize:`10px`,color:`#6b7280`,textTransform:`uppercase`,letterSpacing:`1.5px`,marginBottom:`8px`,paddingTop:`12px`,borderTop:`1px solid #374151`,fontWeight:600},meta:{display:`flex`,gap:`16px`,alignItems:`center`,paddingTop:`12px`,borderTop:`1px solid #1f2937`,flexWrap:`wrap`},metaItem:{fontSize:`11px`,color:`#6b7280`},statusBadge:{fontSize:`11px`,color:`#fbbf24`,backgroundColor:`#422006`,padding:`2px 8px`,borderRadius:`4px`,fontWeight:600}},w$={page:{minHeight:`100vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#0f172a`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,padding:`24px`},card:{textAlign:`center`,maxWidth:`440px`},heading:{fontSize:`28px`,fontWeight:700,color:`#f1f5f9`,marginBottom:`12px`},subtitle:{fontSize:`16px`,color:`#94a3b8`,marginBottom:`24px`,lineHeight:1.5},refText:{fontSize:`13px`,color:`#64748b`,marginBottom:`24px`,fontFamily:h$},actions:{display:`flex`,gap:`12px`,justifyContent:`center`,alignItems:`center`},reloadBtn:{padding:`10px 24px`,backgroundColor:`#2563eb`,color:`#fff`,border:`none`,borderRadius:`8px`,cursor:`pointer`,fontSize:`14px`,fontWeight:600},homeLink:{padding:`10px 24px`,color:`#94a3b8`,textDecoration:`none`,fontSize:`14px`}},T$=(0,q.createContext)(void 0),E$=(0,q.memo)(e=>{let t=(0,q.use)(T$),n=t?.index??0,r=t?.onError,i=m$(),a=hA(),[o,s]=(0,q.useState)(0),[c,l]=(0,q.useState)(i.layers[n]?.element),[u,d]=(0,q.useState)(``),f=(0,q.useRef)(0),p=(0,q.useRef)(0);tj({"react:transition:begin":async({previous:e,state:t})=>{let r=e.layers[n];if(!r||`${t.url.pathname}/`.startsWith(`${r.path}/`))return;let i=D$(r.route?.animation,t,`exit`);if(i){let e=i.duration||200;p.current=Date.now(),f.current=e,d(i.animation)}else p.current=0,f.current=0,d(``)},"react:transition:end":async({state:e})=>{let t=e.layers[n];if(p.current){let e=f.current,t=Date.now()-p.current;t<e&&await new Promise(n=>setTimeout(n,e-t))}if(!t?.cache){l(t?.element);let n=D$(t?.route?.animation,e,`enter`);d(n?n.animation:``)}}},[]);let m=c??e.children??null;return u&&(m=(0,J.jsx)(`div`,{style:{display:`flex`,flex:1,height:`100%`,width:`100%`,position:`relative`,overflow:`hidden`},children:(0,J.jsx)(`div`,{style:{height:`100%`,width:`100%`,display:`flex`,animation:u},children:m})})),e.errorBoundary===!1?(0,J.jsx)(J.Fragment,{children:m}):e.errorBoundary?(0,J.jsx)(qk,{fallback:e.errorBoundary,children:m},o):(0,J.jsx)(qk,{fallback:e=>{let t=r?.(e,i)??(0,J.jsx)(g$,{error:e,alepha:a});return t instanceof p$?`Redirection inside ErrorBoundary is not allowed.`:t},children:m},o)});function D$(e,t,n=`enter`){if(!e)return;let r=typeof e==`function`?e(t):e;if(typeof r==`string`)return n===`exit`?void 0:{duration:300,animation:`300ms ${r}`};if(typeof r==`object`){let e=r[n],t=typeof e==`object`?e.duration??300:300,i=typeof e==`object`?e.name:e;return{duration:t,animation:`${t}ms ${typeof e==`object`?e.timing??``:``} ${i}`}}}var O$=Tk({name:`alepha.react.page.options`,description:`Configuration options for the React page provider.`,schema:K.object({strictMode:K.boolean({default:!0}),staticFilePattern:K.string()}),default:{strictMode:!0,staticFilePattern:`\\.[a-zA-Z0-9]{1,10}$`}}),k$=class{dateTimeProvider=D(dA);log=TA();options=Bk(O$);alepha=D(Ok);pages=[];nextIdCursor=0;configure=j({on:`configure`,handler:()=>{let e=!1,t=this.alepha.primitives(l$),n=e=>{if(e.options.parent)return!0;for(let n of t)if((n.options.children?Array.isArray(n.options.children)?n.options.children:n.options.children():[]).includes(e))return!0};for(let r of t)r.options.path===`/*`&&(e=!0),!n(r)&&this.add(this.map(t,r));!e&&t.length>0&&this.add({path:`/*`,name:`notFound`,component:f$,onServerResponse:({reply:e})=>{e.status=404}})}});getPages(){return this.pages}getConcretePages(){let e=[];for(let t of this.pages){if(t.children&&t.children.length>0)continue;let n=this.pathname(t.name);if(n.includes(`:`)||n.includes(`*`)){if(typeof t.static==`object`){let n=t.static.entries;if(n&&n.length>0)for(let r of n){let n=r.params,i=this.compile(t.path??``,n);!i.includes(`:`)&&!i.includes(`*`)&&e.push({...t,name:n[Object.keys(n)[0]],staticName:t.name,path:i,...r})}}continue}e.push(t)}return e}page(e){for(let t of this.pages)if(t.name===e)return t;throw new p(`Page '${e}' not found`)}pathname(e,t={}){let n=this.page(e);if(!n)throw new p(`Page ${e} not found`);let r=n.path??``,i=n.parent;for(;i;)r=`${i.path??``}/${r}`,i=i.parent;if(r=this.compile(r,t.params??{}),t.query){let e=new URLSearchParams(t.query);e.toString()&&(r+=`?${e.toString()}`)}return r.replace(/\/\/+/g,`/`)||`/`}url(e,t={}){return new URL(this.pathname(e,t),t.host??`http://localhost`)}root(e){let t=(0,q.createElement)(Jk.Provider,{value:this.alepha},(0,q.createElement)(E$,{},e.layers[0]?.element));return this.options.strictMode?(0,q.createElement)(q.StrictMode,{},t):t}convertStringObjectToObject=(e,t)=>{if(K.schema.isObject(e)&&typeof t==`object`){for(let n in e.properties)if(K.schema.isObject(e.properties[n])&&typeof t[n]==`string`)try{t[n]=this.alepha.codec.decode(e.properties[n],decodeURIComponent(t[n]))}catch{}}return t};async createLayers(e,t,n=[]){let r={},i=[{route:e}],a=e.parent;for(;a;)i.unshift({route:a}),a=a.parent;let o=!1;for(let e=0;e<i.length;e++){let a=i[e],s=a.route,c={};try{this.convertStringObjectToObject(s.schema?.query,t.query),c.query=s.schema?.query?this.alepha.codec.decode(s.schema.query,t.query):{}}catch(e){a.error=e instanceof Error?e:Error(String(e));break}try{c.params=s.schema?.params?this.alepha.codec.decode(s.schema.params,t.params):{}}catch(e){a.error=e instanceof Error?e:Error(String(e));break}if(a.config={...c},n?.[e]&&!o&&n[e].name===s.name){let t=e=>e?e.replace(/\/\/+/g,`/`):`/`;if(JSON.stringify({part:t(n[e].part),params:n[e].config?.params??{}})===JSON.stringify({part:t(s.path),params:c.params??{}})){a.props=n[e].props,a.error=n[e].error,a.cache=!0,r={...r,...a.props};continue}o=!0}if(s.redirect)return{redirect:s.redirect};if(s.loader)try{let e=Object.create(t);Object.assign(e,c,r);let n=await s.loader?.(e)??{};a.props={...n},r={...r,...n}}catch(e){if(e instanceof p$)return{redirect:e.redirect};this.log.error(`Page loader has failed`,e),a.error=e instanceof Error?e:Error(String(e));break}}let s=``;for(let e=0;e<i.length;e++){let n=i[e],a=n.props??{},o={...n.config?.params};for(let e of Object.keys(o))o[e]=String(o[e]);s+=`/`,s+=n.route.path?this.compile(n.route.path,o):``;let c=s.replace(/\/+/,`/`),l=this.getErrorHandler(n.route);if(l){let e=t.onError;t.onError=(t,n)=>{let r=l(t,n);return r===void 0?e(t,n):r}}if(!n.error)try{let i=await this.createElement(n.route,{...n.route.props?n.route.props():{},...a,...r},t.url);t.layers.push({name:n.route.name,props:a,part:n.route.path,config:n.config,element:this.renderView(e+1,c,i,n.route),index:e+1,path:c,route:n.route,cache:n.cache})}catch(e){n.error=e instanceof Error?e:Error(String(e))}if(n.error)try{let r=await t.onError(n.error,t);if(r===void 0)throw n.error;if(r instanceof p$)return{redirect:r.redirect};r===null&&(r=this.renderError(n.error)),t.layers.push({props:a,error:n.error,name:n.route.name,part:n.route.path,config:n.config,element:this.renderView(e+1,c,r,n.route),index:e+1,path:c,route:n.route,cache:n.cache});break}catch(e){if(e instanceof p$)return{redirect:e.redirect};throw e}}return{state:t}}getErrorHandler(e){if(e.errorHandler)return e.errorHandler;let t=e.parent;for(;t;){if(t.errorHandler)return t.errorHandler;t=t.parent}}async createElement(e,t,n){if(e.lazy&&e.component&&this.log.warn(`Page ${e.name} has both lazy and component options, lazy will be used`),e.lazy)try{return(0,q.createElement)((await e.lazy()).default,t)}catch(e){if(this.alepha.isBrowser()&&this.isChunkLoadError(e)&&this.reloadAfterChunkError(n))return;throw e}if(e.component)return(0,q.createElement)(e.component,t)}isChunkLoadError(e){if(!(e instanceof Error))return!1;let t=e.message;return/Failed to fetch dynamically imported module/.test(t)||/error loading dynamically imported module/i.test(t)||/Unable to preload CSS/.test(t)||/Importing a module script failed/.test(t)}reloadAfterChunkError(e){let t=`alepha:chunk-reload`,n=sessionStorage.getItem(t),r=this.dateTimeProvider.nowMillis();return n&&r-Number(n)<1e4?(this.log.error(`Chunk load failed after recent reload, not retrying to avoid loop`),!1):(this.log.warn(`Chunk load failed after deployment, reloading page`),sessionStorage.setItem(t,String(r)),window.location.assign(e?e.pathname+e.search:window.location.href),!0)}renderError(e){return(0,q.createElement)(g$,{error:e,alepha:this.alepha})}renderEmptyView(){return(0,q.createElement)(E$,{})}href(e,t={}){let n=this.pages.find(t=>t.name===e.options.name);if(!n)throw new p(`Page ${e.options.name} not found`);let r=n.path??``,i=n.parent;for(;i;)r=`${i.path??``}/${r}`,i=i.parent;return r=this.compile(r,t),r.replace(/\/\/+/g,`/`)||`/`}compile(e,t={}){for(let[n,r]of Object.entries(t))e=e.replace(`:${n}`,r);return e}renderView(e,t,n,r){n??=this.renderEmptyView();let i=r.client?(0,q.createElement)(Kk,typeof r.client==`object`?r.client:{},n):n;return(0,q.createElement)(T$.Provider,{value:{index:e,path:t,onError:this.getErrorHandler(r)??(e=>this.renderError(e))}},i)}map(e,t){let n=t.options.children?Array.isArray(t.options.children)?t.options.children:t.options.children():[];return n.push(...(t=>{let n=[];for(let r of e)r.options.parent===t&&n.push(r);return n})(t)),{...t.options,name:t.name,parent:void 0,children:n.map(t=>this.map(e,t))}}add(e){if(this.alepha.isReady())throw new p(`Router is already initialized`);e.name??=this.nextId();let t=e;if(t.match=this.createMatch(t),this.pages.push(t),t.children)for(let e of t.children)e.parent=t,this.add(e)}createMatch(e){let t=e.path??`/`,n=e.parent;for(;n;)t=`${n.path??``}/${t}`,n=n.parent;let r=t.replace(/\/\/+/g,`/`);return r.endsWith(`/`)&&r!==`/`&&(r=r.slice(0,-1)),r}nextId(){return this.nextIdCursor+=1,`P${this.nextIdCursor}`}},A$=e=>e&&typeof e==`object`&&typeof e.path==`string`&&typeof e.page==`object`,j$=class extends d${log=TA();alepha=D(Ok);pageApi=D(k$);browserHeadProvider=D(mj);add(e){this.pageApi.add(e)}configure=j({on:`configure`,handler:async()=>{for(let e of this.pageApi.getPages())(e.component||e.lazy||e.redirect)&&this.push({path:e.match,page:e})}});async transition(e,t=[],n={}){let{pathname:r,search:i}=e,a={url:e,query:{},params:{},layers:[],onError:()=>null,meta:n};await this.alepha.events.emit(`react:action:begin`,{type:`transition`}),await this.alepha.events.emit(`react:transition:begin`,{previous:this.alepha.store.get(`alepha.react.router.state`),state:a});try{let{route:e,params:n}=this.match(r),o={};if(i)for(let[e,t]of new URLSearchParams(i).entries())o[e]=String(t);if(e?.page.can&&!e.page.can())throw new GA(`Access denied to this page.`);if(a.name=e?.page.name,a.query=o,a.params=n??{},A$(e)){let{redirect:n}=await this.pageApi.createLayers(e.page,a,t);if(n)return n}a.layers.length===0&&a.layers.push({name:`not-found`,element:(0,q.createElement)(f$),index:0,path:`/`}),await this.alepha.events.emit(`react:action:success`,{type:`transition`}),await this.alepha.events.emit(`react:transition:success`,{state:a})}catch(e){this.log.error(`Transition has failed`,e);let t;try{let n=a.onError(e,a);n!=null&&!(n instanceof p$)&&(t=n)}catch{}a.layers=[{name:`error`,element:t??this.pageApi.renderError(e),index:0,path:`/`}],await this.alepha.events.emit(`react:action:error`,{type:`transition`,error:e}),await this.alepha.events.emit(`react:transition:error`,{error:e,state:a})}if(t)for(let e=0;e<t.length;e++){let n=t[e];a.layers[e]?.name!==n.name&&n.name!==`error`&&this.pageApi.page(n.name)?.onLeave?.()}for(let e=0;e<a.layers.length;e++){let n=a.layers[e];t?.[e]?.name!==n.name&&n.name!==`error`&&this.pageApi.page(n.name)?.onEnter?.()}this.alepha.store.set(`alepha.react.router.state`,a),await this.alepha.events.emit(`react:action:end`,{type:`transition`}),await this.alepha.events.emit(`react:transition:end`,{state:a}),this.browserHeadProvider.fillAndRenderHead(a)}root(e){return this.pageApi.root(e)}},M$=Tk({name:`alepha.react.browser.options`,schema:K.object({scrollRestoration:K.enum([`top`,`manual`])}),default:{scrollRestoration:`top`}}),N$=class{log=TA();client=D(XA);alepha=D(Ok);router=D(j$);dateTimeProvider=D(dA);browserHeadProvider=D(mj);options=Bk(M$);get rootId(){return`root`}getRootElement(){let e=this.document.getElementById(this.rootId);if(e)return e;let t=this.document.createElement(`div`);return t.id=this.rootId,this.document.body.prepend(t),t}transitioning;get state(){return this.alepha.store.get(`alepha.react.router.state`)}get document(){return window.document}get history(){return window.history}get location(){return window.location}get base(){let e=`/__devtools`;return e===`/`?``:e}get url(){let e=this.location.pathname+this.location.search;return this.base?e.replace(this.base,``):e}pushState(e,t){let n=this.base+e;t?this.history.replaceState({},``,n):this.history.pushState({},``,n)}async invalidate(e){let t=[];if(this.log.trace(`Invalidating layers`),e){let[n]=Object.keys(e),r=e[n];for(let e of this.state.layers){if(e.props?.[n]){t.push({...e,props:{...e.props,[n]:r}});break}t.push(e)}}await this.render({previous:t})}async push(e,t={}){if(this.log.trace(`Going to ${e}`,{url:e,options:t}),await this.render({url:e,previous:t.force?[]:this.state.layers,meta:t.meta}),this.state.url.pathname+this.state.url.search!==e){this.pushState(this.state.url.pathname+this.state.url.search);return}this.pushState(e,t.replace)}async render(e={}){let t=e.previous??this.state.layers,n=e.url??this.url,r=this.dateTimeProvider.now();this.transitioning={to:n,from:this.state?.url.pathname},this.log.debug(`Transitioning...`,{to:n});let i=await this.router.transition(new URL(`http://localhost${n}`),t,e.meta);if(i)if(this.log.info(`Redirecting to`,{redirect:i}),i.startsWith(`http`))window.location.href=i;else return await this.render({url:i});let a=this.dateTimeProvider.now().diff(r);this.log.info(`Transition OK [${a}ms]`,this.transitioning),this.transitioning=void 0}getHydrationState(){try{let e=this.document.getElementById(`__ssr`);if(e?.textContent)return JSON.parse(e.textContent)}catch(e){console.error(e)}}onTransitionEnd=j({on:`react:transition:end`,handler:()=>{this.options.scrollRestoration===`top`&&typeof window<`u`&&!this.alepha.isTest()&&(this.log.trace(`Restoring scroll position to top`),window.scrollTo(0,0))}});ready=j({on:`ready`,handler:async()=>{let e=this.getHydrationState(),t=e?.[`alepha.react.router.layers`]??[];if(e)for(let[t,n]of Object.entries(e))t!==`alepha.react.router.layers`&&this.alepha.set(t,n);await this.render({previous:t});let n=this.router.root(this.state);await this.alepha.events.emit(`react:browser:render`,{element:n,root:this.getRootElement(),hydration:e,state:this.state}),window.addEventListener(`popstate`,()=>{this.base+this.state.url.pathname!==this.location.pathname&&(this.log.debug(`Popstate event triggered - rendering new state`,{url:this.location.pathname+this.location.search}),this.render())})}})},P$=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),F$=o(((e,t)=>{t.exports=P$()})),I$=o((e=>{var t=F$(),n=Gk(),r=pN();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},ee=[],I=-1;function te(e){return{current:e}}function ne(e){0>I||(e.current=ee[I],ee[I]=null,I--)}function L(e,t){I++,ee[I]=e.current,e.current=t}var re=te(null),ie=te(null),ae=te(null),oe=te(null);function se(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),L(re,e)}function ce(){ne(re),ne(ie),ne(ae)}function le(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=qd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ue(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),rp._currentValue=F)}var R,de;function z(e){if(R===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||``,de=-1<e.stack.indexOf(`
73
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
74
+ `+R+e+de}var fe=!1;function pe(e,t){if(!e||fe)return``;fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
75
+ `),l=s.split(`
76
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
77
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?z(n):``}function me(e,t){switch(e.tag){case 26:case 27:case 5:return z(e.type);case 16:return z(`Lazy`);case 13:return e.child!==t&&t!==null?z(`Suspense Fallback`):z(`Suspense`);case 19:return z(`SuspenseList`);case 0:case 15:return pe(e.type,!1);case 11:return pe(e.type.render,!1);case 1:return pe(e.type,!0);case 31:return z(`Activity`);default:return``}}function he(e){try{var t=``,n=null;do t+=me(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
78
+ Error generating stack: `+e.message+`
79
+ `+e.stack}}var ge=Object.prototype.hasOwnProperty,_e=t.unstable_scheduleCallback,ve=t.unstable_cancelCallback,ye=t.unstable_shouldYield,be=t.unstable_requestPaint,B=t.unstable_now,xe=t.unstable_getCurrentPriorityLevel,V=t.unstable_ImmediatePriority,H=t.unstable_UserBlockingPriority,Se=t.unstable_NormalPriority,Ce=t.unstable_LowPriority,we=t.unstable_IdlePriority,Te=t.log,Ee=t.unstable_setDisableYieldValue,De=null,Oe=null;function ke(e){if(typeof Te==`function`&&Ee(e),Oe&&typeof Oe.setStrictMode==`function`)try{Oe.setStrictMode(De,e)}catch{}}var Ae=Math.clz32?Math.clz32:Ne,je=Math.log,Me=Math.LN2;function Ne(e){return e>>>=0,e===0?32:31-(je(e)/Me|0)|0}var U=256,Pe=262144,Fe=4194304;function Ie(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Le(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ie(n))):i=Ie(o):i=Ie(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ie(n))):i=Ie(o)):i=Ie(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Re(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Be(){var e=Fe;return Fe<<=1,!(Fe&62914560)&&(Fe=4194304),e}function Ve(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function He(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ae(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&We(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function We(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ae(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ge(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ae(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ke(e,t){var n=t&-t;return n=n&42?1:qe(n),(n&(e.suspendedLanes|t))===0?n:0}function qe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Je(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ye(){var e=P.p;return e===0?(e=window.event,e===void 0?32:yp(e.type)):e}function Xe(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Ze=Math.random().toString(36).slice(2),Qe=`__reactFiber$`+Ze,$e=`__reactProps$`+Ze,et=`__reactContainer$`+Ze,tt=`__reactEvents$`+Ze,nt=`__reactListeners$`+Ze,rt=`__reactHandles$`+Ze,it=`__reactResources$`+Ze,at=`__reactMarker$`+Ze;function ot(e){delete e[Qe],delete e[$e],delete e[tt],delete e[nt],delete e[rt]}function st(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[et]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gf(e);e!==null;){if(n=e[Qe])return n;e=gf(e)}return t}e=n,n=e.parentNode}return null}function ct(e){if(e=e[Qe]||e[et]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function lt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ut(e){var t=e[it];return t||=e[it]={hoistableStyles:new Map,hoistableScripts:new Map},t}function dt(e){e[at]=!0}var ft=new Set,pt={};function mt(e,t){ht(e,t),ht(e+`Capture`,t)}function ht(e,t){for(pt[e]=t,e=0;e<t.length;e++)ft.add(t[e])}var gt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),_t={},vt={};function yt(e){return ge.call(vt,e)?!0:ge.call(_t,e)?!1:gt.test(e)?vt[e]=!0:(_t[e]=!0,!1)}function bt(e,t,n){if(yt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function xt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function St(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ct(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function wt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Tt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Et(e){if(!e._valueTracker){var t=wt(e)?`checked`:`value`;e._valueTracker=Tt(e,t,``+e[t])}}function Dt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=wt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ot(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var kt=/[\n"\\]/g;function At(e){return e.replace(kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function jt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ct(t)):e.value!==``+Ct(t)&&(e.value=``+Ct(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Nt(e,o,Ct(n)):Nt(e,o,Ct(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ct(s):e.removeAttribute(`name`)}function Mt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Et(e);return}n=n==null?``:``+Ct(n),t=t==null?n:``+Ct(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Et(e)}function Nt(e,t,n){t===`number`&&Ot(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Pt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ct(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ft(e,t,n){if(t!=null&&(t=``+Ct(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ct(n)}function It(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(M(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ct(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Et(e)}function Lt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function zt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Rt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Bt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&zt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&zt(e,o,t[o])}function Vt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ht=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Ut=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Wt(e){return Ut.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Gt(){}var Kt=null;function qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jt=null,Yt=null;function Xt(e){var t=ct(e);if(t&&(e=t.stateNode)){var n=e[$e]||null;a:switch(e=t.stateNode,t.type){case`input`:if(jt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+At(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[$e]||null;if(!a)throw Error(i(90));jt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Dt(r)}break a;case`textarea`:Ft(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Pt(e,!!n.multiple,t,!1)}}}var Zt=!1;function Qt(e,t,n){if(Zt)return e(t,n);Zt=!0;try{return e(t)}finally{if(Zt=!1,(Jt!==null||Yt!==null)&&(Su(),Jt&&(t=Jt,e=Yt,Yt=Jt=null,Xt(t),e)))for(t=0;t<e.length;t++)Xt(e[t])}}function $t(e,t){var n=e.stateNode;if(n===null)return null;var r=n[$e]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var en=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),tn=!1;if(en)try{var nn={};Object.defineProperty(nn,`passive`,{get:function(){tn=!0}}),window.addEventListener(`test`,nn,nn),window.removeEventListener(`test`,nn,nn)}catch{tn=!1}var rn=null,an=null,on=null;function sn(){if(on)return on;var e,t=an,n=t.length,r,i=`value`in rn?rn.value:rn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return on=i.slice(e,1<r?1-r:void 0)}function cn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ln(){return!0}function un(){return!1}function dn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?ln:un,this.isPropagationStopped=un,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=dn(fn),mn=f({},fn,{view:0,detail:0}),hn=dn(mn),gn,_n,vn,yn=f({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==vn&&(vn&&e.type===`mousemove`?(gn=e.screenX-vn.screenX,_n=e.screenY-vn.screenY):_n=gn=0,vn=e),gn)},movementY:function(e){return`movementY`in e?e.movementY:_n}}),bn=dn(yn),xn=dn(f({},yn,{dataTransfer:0})),Sn=dn(f({},mn,{relatedTarget:0})),Cn=dn(f({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=dn(f({},fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=dn(f({},fn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=dn(f({},mn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=dn(f({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=dn(f({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=dn(f({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=dn(f({},yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),In=dn(f({},fn,{newState:0,oldState:0})),Ln=[9,13,27,32],Rn=en&&`CompositionEvent`in window,zn=null;en&&`documentMode`in document&&(zn=document.documentMode);var Bn=en&&`TextEvent`in window&&!zn,Vn=en&&(!Rn||zn&&8<zn&&11>=zn),Hn=` `,Un=!1;function Wn(e,t){switch(e){case`keyup`:return Ln.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(Un=!0,Hn):null;case`textInput`:return e=t.data,e===Hn&&Un?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!Rn&&Wn(e,t)?(e=sn(),on=an=rn=null,Kn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Vn&&t.locale!==`ko`?null:t.data;default:return null}}var Yn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Yn[e.type]:t===`textarea`}function Zn(e,t,n,r){Jt?Yt?Yt.push(r):Yt=[r]:Jt=r,t=Ad(t,`onChange`),0<t.length&&(n=new pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Qn=null,$n=null;function er(e){Sd(e,0)}function tr(e){if(Dt(lt(e)))return e}function nr(e,t){if(e===`change`)return t}var rr=!1;if(en){var ir;if(en){var ar=`oninput`in document;if(!ar){var or=document.createElement(`div`);or.setAttribute(`oninput`,`return;`),ar=typeof or.oninput==`function`}ir=ar}else ir=!1;rr=ir&&(!document.documentMode||9<document.documentMode)}function sr(){Qn&&(Qn.detachEvent(`onpropertychange`,cr),$n=Qn=null)}function cr(e){if(e.propertyName===`value`&&tr($n)){var t=[];Zn(t,$n,e,qt(e)),Qt(er,t)}}function lr(e,t,n){e===`focusin`?(sr(),Qn=t,$n=n,Qn.attachEvent(`onpropertychange`,cr)):e===`focusout`&&sr()}function ur(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return tr($n)}function dr(e,t){if(e===`click`)return tr(t)}function fr(e,t){if(e===`input`||e===`change`)return tr(t)}function pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var mr=typeof Object.is==`function`?Object.is:pr;function hr(e,t){if(mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ge.call(t,i)||!mr(e[i],t[i]))return!1}return!0}function gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _r(e,t){var n=gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=gr(n)}}function vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ot(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ot(e.document)}return t}function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var xr=en&&`documentMode`in document&&11>=document.documentMode,Sr=null,Cr=null,wr=null,Tr=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tr||Sr==null||Sr!==Ot(r)||(r=Sr,`selectionStart`in r&&br(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wr&&hr(wr,r)||(wr=r,r=Ad(Cr,`onSelect`),0<r.length&&(t=new pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Or={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},kr={},Ar={};en&&(Ar=document.createElement(`div`).style,`AnimationEvent`in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),`TransitionEvent`in window||delete Or.transitionend.transition);function jr(e){if(kr[e])return kr[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ar)return kr[e]=t[n];return e}var Mr=jr(`animationend`),Nr=jr(`animationiteration`),Pr=jr(`animationstart`),Fr=jr(`transitionrun`),Ir=jr(`transitionstart`),Lr=jr(`transitioncancel`),Rr=jr(`transitionend`),zr=new Map,Br=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Br.push(`scrollEnd`);function Vr(e,t){zr.set(e,t),mt(t,[e])}var Hr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ur=[],Wr=0,Gr=0;function Kr(){for(var e=Wr,t=Gr=Wr=0;t<e;){var n=Ur[t];Ur[t++]=null;var r=Ur[t];Ur[t++]=null;var i=Ur[t];Ur[t++]=null;var a=Ur[t];if(Ur[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Xr(n,i,a)}}function qr(e,t,n,r){Ur[Wr++]=e,Ur[Wr++]=t,Ur[Wr++]=n,Ur[Wr++]=r,Gr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Jr(e,t,n,r){return qr(e,t,n,r),Zr(e)}function Yr(e,t){return qr(e,null,null,t),Zr(e)}function Xr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ae(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Zr(e){if(50<pu)throw pu=0,mu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qr={};function $r(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(e,t,n,r){return new $r(e,t,n,r)}function ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var n=e.alternate;return n===null?(n=ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ri(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ii(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ti(e)&&(s=1);else if(typeof e==`string`)s=Jf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ei(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ai(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ei(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ei(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ei(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ai(e,t,n,r){return e=ei(7,e,r,t),e.lanes=n,e}function oi(e,t,n){return e=ei(6,e,null,t),e.lanes=n,e}function si(e){var t=ei(18,null,null,0);return t.stateNode=e,t}function ci(e,t,n){return t=ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=new WeakMap;function ui(e,t){if(typeof e==`object`&&e){var n=li.get(e);return n===void 0?(t={value:e,source:t,stack:he(t)},li.set(e,t),t):n}return{value:e,source:t,stack:he(t)}}var di=[],fi=0,pi=null,mi=0,hi=[],gi=0,_i=null,vi=1,yi=``;function bi(e,t){di[fi++]=mi,di[fi++]=pi,pi=e,mi=t}function xi(e,t,n){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,_i=e;var r=vi;e=yi;var i=32-Ae(r)-1;r&=~(1<<i),n+=1;var a=32-Ae(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vi=1<<32-Ae(t)+i|n<<i|r,yi=a+e}else vi=1<<a|n<<i|r,yi=e}function Si(e){e.return!==null&&(bi(e,1),xi(e,1,0))}function Ci(e){for(;e===pi;)pi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null;for(;e===_i;)_i=hi[--gi],hi[gi]=null,yi=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null}function wi(e,t){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,vi=t.id,yi=t.overflow,_i=e}var Ti=null,Ei=null,Di=!1,Oi=null,ki=!1,Ai=Error(i(519));function ji(e){throw Li(ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ai}function Mi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Qe]=e,t[$e]=r,n){case`dialog`:Cd(`cancel`,t),Cd(`close`,t);break;case`iframe`:case`object`:case`embed`:Cd(`load`,t);break;case`video`:case`audio`:for(n=0;n<bd.length;n++)Cd(bd[n],t);break;case`source`:Cd(`error`,t);break;case`img`:case`image`:case`link`:Cd(`error`,t),Cd(`load`,t);break;case`details`:Cd(`toggle`,t);break;case`input`:Cd(`invalid`,t),Mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Cd(`invalid`,t);break;case`textarea`:Cd(`invalid`,t),It(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Id(t.textContent,n)?(r.popover!=null&&(Cd(`beforetoggle`,t),Cd(`toggle`,t)),r.onScroll!=null&&Cd(`scroll`,t),r.onScrollEnd!=null&&Cd(`scrollend`,t),r.onClick!=null&&(t.onclick=Gt),t=!0):t=!1,t||ji(e,!0)}function Ni(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:ki=!1;return;case 27:case 3:ki=!0;return;default:Ti=Ti.return}}function Pi(e){if(e!==Ti)return!1;if(!Di)return Ni(e),Di=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Jd(e.type,e.memoizedProps)),n=!n),n&&Ei&&ji(e),Ni(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=hf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ei=hf(e)}else t===27?(t=Ei,nf(e.type)?(e=mf,mf=null,Ei=e):Ei=t):Ei=Ti?pf(e.stateNode.nextSibling):null;return!0}function Fi(){Ei=Ti=null,Di=!1}function Ii(){var e=Oi;return e!==null&&($l===null?$l=e:$l.push.apply($l,e),Oi=null),e}function Li(e){Oi===null?Oi=[e]:Oi.push(e)}var Ri=te(null),zi=null,Bi=null;function Vi(e,t,n){L(Ri,t._currentValue),t._currentValue=n}function Hi(e){e._currentValue=Ri.current,ne(Ri)}function Ui(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Wi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ui(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ui(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Gi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[rp]:e.push(rp))}a=a.return}e!==null&&Wi(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){zi=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ji(e){return Xi(zi,e)}function Yi(e,t){return zi===null&&qi(e),Xi(e,t)}function Xi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Bi===null){if(e===null)throw Error(i(308));Bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bi=Bi.next=t;return n}var Zi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Qi=t.unstable_scheduleCallback,$i=t.unstable_NormalPriority,ea={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ta(){return{controller:new Zi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&Qi($i,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function sa(e,t){if(ra===null){var n=ra=[];ia=0,aa=md(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(ca,ca),t}function ca(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function la(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ua=N.S;N.S=function(e,t){nu=B(),typeof t==`object`&&t&&typeof t.then==`function`&&sa(e,t),ua!==null&&ua(e,t)};var da=te(null);function fa(){var e=da.current;return e===null?Ll.pooledCache:e}function pa(e,t){t===null?L(da,da.current):L(da,t.pool)}function ma(){var e=fa();return e===null?null:{parent:ea._currentValue,pool:e}}var ha=Error(i(460)),ga=Error(i(474)),_a=Error(i(542)),va={then:function(){}};function ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ba(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Gt,Gt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e;default:if(typeof t.status==`string`)t.then(Gt,Gt);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e}throw Sa=t,ha}}function xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Sa=e,ha):e}}var Sa=null;function Ca(){if(Sa===null)throw Error(i(459));var e=Sa;return Sa=null,e}function wa(e){if(e===ha||e===_a)throw Error(i(483))}var Ta=null,Ea=0;function Da(e){var t=Ea;return Ea+=1,Ta===null&&(Ta=[]),ba(Ta,e,t)}function Oa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ka(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Aa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ni(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&xa(i)===t.type)?(t=a(t,n.props),Oa(t,n),t.return=e,t):(t=ii(n.type,n.key,n.props,null,e.mode,r),Oa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ai(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ii(t.type,t.key,t.props,null,e.mode,n),Oa(n,t),n.return=e,n;case h:return t=ci(t,e.mode,n),t.return=e,t;case T:return t=xa(t),f(e,t,n)}if(M(t)||k(t))return t=ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Da(t),n);if(t.$$typeof===b)return f(e,Yi(e,t),n);ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=xa(n),p(e,t,n,r)}if(M(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Da(n),r);if(n.$$typeof===b)return p(e,t,Yi(e,n),r);ka(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=xa(r),_(e,t,n,r,i)}if(M(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Da(r),i);if(r.$$typeof===b)return _(e,t,n,Yi(t,r),i);ka(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Di&&bi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Di&&bi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Di&&bi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Di&&bi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Di&&bi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Di&&bi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Oa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=ai(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ii(o.type,o.key,o.props,null,e.mode,c),Oa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ci(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=xa(o),x(e,r,o,c)}if(M(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Da(o),c);if(o.$$typeof===b)return x(e,r,Yi(e,o),c);ka(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ea=0;var i=x(e,t,n,r);return Ta=null,i}catch(t){if(t===ha||t===_a)throw t;var a=ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ja=Aa(!0),Ma=Aa(!1),Na=!1;function Pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Zr(e),Xr(e,null,n),t}return qr(e,r,t,n),Zr(e)}function Ra(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}function za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ba=!1;function Va(){if(Ba){var e=oa;if(e!==null)throw e}}function Ha(e,t,n,r){Ba=!1;var i=e.updateQueue;Na=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(zl&p)===p:(r&p)===p){p!==0&&p===aa&&(Ba=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Na=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Wa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ua(n[e],t)}var Ga=te(null),Ka=te(0);function qa(e,t){e=Gl,L(Ka,e),L(Ga,t),Gl=e|t.baseLanes}function Ja(){L(Ka,Gl),L(Ga,Ga.current)}function Ya(){Gl=Ka.current,ne(Ga),ne(Ka)}var Xa=te(null),Za=null;function Qa(e){var t=e.alternate;L(ro,ro.current&1),L(Xa,e),Za===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(Za=e)}function $a(e){L(ro,ro.current),L(Xa,e),Za===null&&(Za=e)}function eo(e){e.tag===22?(L(ro,ro.current),L(Xa,e),Za===null&&(Za=e)):to(e)}function to(){L(ro,ro.current),L(Xa,Xa.current)}function no(e){ne(Xa),Za===e&&(Za=null),ne(ro)}var ro=te(0);function io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uf(n)||df(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ao=0,oo=null,so=null,co=null,lo=!1,uo=!1,fo=!1,po=0,mo=0,ho=null,go=0;function _o(){throw Error(i(321))}function vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mr(e[n],t[n]))return!1;return!0}function yo(e,t,n,r,i,a){return ao=a,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Is:Ls,fo=!1,a=n(r,i),fo=!1,uo&&(a=xo(t,n,r,i)),bo(e),a}function bo(e){N.H=Fs;var t=so!==null&&so.next!==null;if(ao=0,co=so=oo=null,lo=!1,mo=0,ho=null,t)throw Error(i(300));e===null||ec||(e=e.dependencies,e!==null&&Ki(e)&&(ec=!0))}function xo(e,t,n,r){oo=e;var a=0;do{if(uo&&(ho=null),mo=0,uo=!1,25<=a)throw Error(i(301));if(a+=1,co=so=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Rs,o=t(n,r)}while(uo);return o}function So(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?ko(t):t,e=e.useState()[0],(so===null?null:so.memoizedState)!==e&&(oo.flags|=1024),t}function Co(){var e=po!==0;return po=0,e}function wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function To(e){if(lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lo=!1}ao=0,co=so=oo=null,uo=!1,mo=po=0,ho=null}function Eo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return co===null?oo.memoizedState=co=e:co=co.next=e,co}function Do(){if(so===null){var e=oo.alternate;e=e===null?null:e.memoizedState}else e=so.next;var t=co===null?oo.memoizedState:co.next;if(t!==null)co=t,so=e;else{if(e===null)throw oo.alternate===null?Error(i(467)):Error(i(310));so=e,e={memoizedState:so.memoizedState,baseState:so.baseState,baseQueue:so.baseQueue,queue:so.queue,next:null},co===null?oo.memoizedState=co=e:co=co.next=e}return co}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ko(e){var t=mo;return mo+=1,ho===null&&(ho=[]),e=ba(ho,e,t),t=oo,(co===null?t.memoizedState:co.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Is:Ls),e}function Ao(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ko(e);if(e.$$typeof===b)return Ji(e)}throw Error(i(438,String(e)))}function jo(e){var t=null,n=oo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=oo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Oo(),oo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function Mo(e,t){return typeof t==`function`?t(e):t}function No(e){return Po(Do(),so,e)}function Po(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ao&f)===f:(zl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===aa&&(d=!0);else if((ao&p)===p){u=u.next,p===aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,oo.lanes|=p,ql|=p;f=u.action,fo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,oo.lanes|=f,ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!mr(o,e.memoizedState)&&(ec=!0,d&&(n=oa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Fo(e){var t=Do(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);mr(o,t.memoizedState)||(ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Io(e,t,n){var r=oo,a=Do(),o=Di;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!mr((so||a).memoizedState,n);if(s&&(a.memoizedState=n,ec=!0),a=a.queue,ss(zo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||co!==null&&co.memoizedState.tag&1){if(r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||ao&127||Lo(r,t,n)}return n}function Lo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=oo.updateQueue,t===null?(t=Oo(),oo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ro(e,t,n,r){t.value=n,t.getSnapshot=r,Bo(t)&&Vo(e)}function zo(e,t,n){return n(function(){Bo(t)&&Vo(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mr(e,n)}catch{return!0}}function Vo(e){var t=Yr(e,2);t!==null&&_u(t,e,2)}function Ho(e){var t=Eo();if(typeof e==`function`){var n=e;if(e=n(),fo){ke(!0);try{n()}finally{ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:e},t}function Uo(e,t,n,r){return e.baseState=n,Po(e,so,typeof r==`function`?r:Mo)}function Wo(e,t,n,r,a){if(Ms(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Go(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Go(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Ko(e,t,s)}catch(n){Jo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Ko(e,t,a)}catch(n){Jo(e,t,n)}}function Ko(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){qo(e,t,n)},function(n){return Jo(e,t,n)}):qo(e,t,n)}function qo(e,t,n){t.status=`fulfilled`,t.value=n,Yo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Go(e,n)))}function Jo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Yo(t),t=t.next;while(t!==r)}e.action=null}function Yo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xo(e,t){return t}function Zo(e,t){if(Di){var n=Ll.formState;if(n!==null){a:{var r=oo;if(Di){if(Ei){b:{for(var i=Ei,a=ki;i.nodeType!==8;){if(!a){i=null;break b}if(i=pf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ei=pf(i.nextSibling),r=i.data===`F!`;break a}}ji(r)}r=!1}r&&(t=n[0])}}return n=Eo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:t},n.queue=r,n=ks.bind(null,oo,r),r.dispatch=n,r=Ho(!1),a=js.bind(null,oo,!1,r.queue),r=Eo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Wo.bind(null,oo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Qo(e){return $o(Do(),so,e)}function $o(e,t,n){if(t=Po(e,t,Xo)[0],e=No(Mo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ko(t)}catch(e){throw e===ha?_a:e}else r=t;t=Do();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(oo.flags|=2048,ns(9,{destroy:void 0},es.bind(null,i,n),null)),[r,a,e]}function es(e,t){e.action=t}function ts(e){var t=Do(),n=so;if(n!==null)return $o(t,n,e);Do(),t=t.memoizedState,n=Do();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=oo.updateQueue,t===null&&(t=Oo(),oo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function rs(){return Do().memoizedState}function is(e,t,n,r){var i=Eo();oo.flags|=e,i.memoizedState=ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function as(e,t,n,r){var i=Do();r=r===void 0?null:r;var a=i.memoizedState.inst;so!==null&&r!==null&&vo(r,so.memoizedState.deps)?i.memoizedState=ns(t,a,n,r):(oo.flags|=e,i.memoizedState=ns(1|t,a,n,r))}function os(e,t){is(8390656,8,e,t)}function ss(e,t){as(2048,8,e,t)}function cs(e){oo.flags|=4;var t=oo.updateQueue;if(t===null)t=Oo(),oo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Do().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(Il&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return as(4,2,e,t)}function ds(e,t){return as(4,4,e,t)}function fs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){n=n==null?null:n.concat([e]),as(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Do();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&vo(t,r[1]))return r[0];if(r=e(),fo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||ao&1073741824&&!(zl&261930)?e.memoizedState=t:(e.memoizedState=n,e=gu(),oo.lanes|=e,ql|=e,n)}function vs(e,t,n,r){return mr(n,t)?n:Ga.current===null?!(ao&42)||ao&1073741824&&!(zl&261930)?(ec=!0,e.memoizedState=n):(e=gu(),oo.lanes|=e,ql|=e,t):(e=_s(e,n,r),mr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,js(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,la(c,r),hu(e)):As(e,t,r,hu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ss(e).queue;ys(e,a,t,F,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},hu())}function ws(){return Ji(rp)}function Ts(){return Do().memoizedState}function Es(){return Do().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Ia(n);var r=La(t,e,n);r!==null&&(_u(r,t,n),Ra(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=Jr(e,t,n,r),n!==null&&(_u(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,hu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,mr(s,o))return qr(e,t,i,0),Ll===null&&Kr(),!1}catch{}if(n=Jr(e,t,i,r),n!==null)return _u(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:md(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(i(479))}else t=Jr(e,n,r,2),t!==null&&_u(t,e,2)}function Ms(e){var t=e.alternate;return e===oo||t!==null&&t===oo}function Ns(e,t){uo=lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}var Fs={readContext:Ji,use:Ao,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useLayoutEffect:_o,useInsertionEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useSyncExternalStore:_o,useId:_o,useHostTransitionStatus:_o,useFormState:_o,useActionState:_o,useOptimistic:_o,useMemoCache:_o,useCacheRefresh:_o};Fs.useEffectEvent=_o;var Is={readContext:Ji,use:Ao,useCallback:function(e,t){return Eo().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:os,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),is(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var n=Eo();t=t===void 0?null:t;var r=e();if(fo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Eo();if(n!==void 0){var i=n(t);if(fo){ke(!0);try{n(t)}finally{ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,oo,e),[r.memoizedState,e]},useRef:function(e){var t=Eo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=ks.bind(null,oo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Eo(),e,t)},useTransition:function(){var e=Ho(!1);return e=ys.bind(null,oo,e.queue,!0,!1),Eo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=oo,a=Eo();if(Di){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));zl&127||Lo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,os(zo.bind(null,r,o,e),[e]),r.flags|=2048,ns(9,{destroy:void 0},Ro.bind(null,r,o,n,t),null),n},useId:function(){var e=Eo(),t=Ll.identifierPrefix;if(Di){var n=yi,r=vi;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=po++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=Eo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,oo,!0,n),n.dispatch=t,[e,t]},useMemoCache:jo,useCacheRefresh:function(){return Eo().memoizedState=Ds.bind(null,oo)},useEffectEvent:function(e){var t=Eo(),n={impl:e};return t.memoizedState=n,function(){if(Il&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:Ji,use:Ao,useCallback:hs,useContext:Ji,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:No,useRef:rs,useState:function(){return No(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Do(),so.memoizedState,e,t)},useTransition:function(){var e=No(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){return Uo(Do(),so,e,t)},useMemoCache:jo,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:Ji,use:Ao,useCallback:hs,useContext:Ji,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Fo,useRef:rs,useState:function(){return Fo(Mo)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Do();return so===null?_s(n,e,t):vs(n,so.memoizedState,e,t)},useTransition:function(){var e=Fo(Mo)[0],t=Do().memoizedState;return[typeof e==`boolean`?e:ko(e),t]},useSyncExternalStore:Io,useId:Ts,useHostTransitionStatus:ws,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){var n=Do();return so===null?(n.baseState=e,[e,n.queue.dispatch]):Uo(n,so,e,t)},useMemoCache:jo,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Ia(r);i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(_u(t,e,r),Ra(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Ia(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(_u(t,e,r),Ra(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=Ia(n);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,n),t!==null&&(_u(t,e,n),Ra(t,e,n))}};function Vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!hr(n,r)||!hr(i,a):!0}function Hs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Us(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ws(e){Hr(e)}function Gs(e){console.error(e)}function Ks(e){Hr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){return n=Ia(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=Ia(e),e.tag=3,e}function Zs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(au===null?au=new Set([this]):au.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,a,!0),n=Xa.current,n!==null){switch(n.tag){case 31:case 13:return Za===null?ku():n.alternate===null&&Kl===0&&(Kl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===va?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ju(e,r,a)),!1;case 22:return n.flags|=65536,r===va?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ju(e,r,a)),!1}throw Error(i(435,n.tag))}return Ju(e,r,a),ku(),!1}if(Di)return t=Xa.current,t===null?(r!==Ai&&(t=Error(i(423),{cause:r}),Li(ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ui(r,n),a=Ys(e.stateNode,r,a),za(e,a),Kl!==4&&(Kl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ai&&(e=Error(i(422),{cause:r}),Li(ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ui(o,n),Ql===null?Ql=[o]:Ql.push(o),Kl!==4&&(Kl=2),t===null)return!0;r=ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ys(n.stateNode,r,e),za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(au===null||!au.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xs(a),Zs(a,e,n,r),za(n,a),!1}n=n.return}while(n!==null);return!1}var $s=Error(i(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?Ma(t,null,n,r):ja(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return qi(t),r=yo(e,t,n,o,a,i),s=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(Di&&s&&Si(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ti(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Dc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?hr:n,n(o,r)&&e.ref===t.ref)return Ec(e,t,i)}return t.flags|=1,e=ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(hr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Dc(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Ec(e,t,i)}return fc(e,t,n,r,i)}function ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pa(t,a===null?null:a.cachePool),a===null?Ja():qa(t,a),eo(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&pa(t,null),Ja(),to(t)):(pa(t,a.cachePool),qa(t,a),to(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=fa();return a=a===null?null:{parent:ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&pa(t,null),Ja(),eo(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return ja(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,no(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Di){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if($a(t),(e=Ei)?(e=lf(e,ki),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return t.lanes=536870912,null}return cc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if($a(t),a)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ec||Gi(e,t,n,!1),a=(n&e.childLanes)!==0,ec||a){if(r=Ll,r!==null&&(s=Ke(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Yr(e,s),_u(r,e,s),$s;ku(),t=lc(e,t,n)}else e=o.treeContext,Ei=pf(s.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=cc(t,r),t.flags|=4096;return t}return e=ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return qi(t),n=yo(e,t,n,r,void 0,i),r=Co(),e!==null&&!ec?(wo(e,t,i),Ec(e,t,i)):(Di&&r&&Si(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=xo(t,r,n,i),bo(e),r=Co(),e!==null&&!ec?(wo(e,t,a),Ec(e,t,a)):(Di&&r&&Si(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=Qr,o=n.contextType;typeof o==`object`&&o&&(a=Ji(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Pa(t),o=n.contextType,a.context=typeof o==`object`&&o?Ji(o):Qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Bs.enqueueReplaceState(a,a.state,null),Ha(t,r,a,i),Va(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=Qr,typeof u==`object`&&u&&(o=Ji(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Hs(t,a,r,o),Na=!1;var f=t.memoizedState;a.state=f,Ha(t,r,a,i),Va(),l=t.memoizedState,s||f!==l||Na?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Na||Vs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fa(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Qr,typeof l==`object`&&l&&(c=Ji(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Hs(t,a,r,c),Na=!1,f=t.memoizedState,a.state=f,Ha(t,r,a,i),Va();var p=t.memoizedState;o!==d||f!==p||Na||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Na||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,dc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ja(t,e.child,null,i),t.child=ja(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ec(e,t,i),e}function hc(e,t,n,r){return Fi(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:ma()}}function vc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Xl),e}function yc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(ro.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Di){if(a?Qa(t):to(t),(e=Ei)?(e=lf(e,ki),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,Ei=null)):e=null,e===null)throw ji(t);return df(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(to(t),a=t.mode,c=xc({mode:`hidden`,children:c},a),r=ai(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(null,r)):(Qa(t),bc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Qa(t),t.flags&=-257,t=Sc(e,t,n)):t.memoizedState===null?(to(t),c=r.fallback,a=t.mode,r=xc({mode:`visible`,children:r.children},a),c=ai(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ja(t,e.child,null,n),r=t.child,r.memoizedState=_c(n),r.childLanes=vc(e,s,n),t.memoizedState=gc,t=oc(null,r)):(to(t),t.child=e.child,t.flags|=128,t=null);else if(Qa(t),df(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Li({value:r,source:null,stack:null}),t=Sc(e,t,n)}else if(ec||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,ec||s){if(s=Ll,s!==null&&(r=Ke(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Yr(e,r),_u(s,e,r),$s;uf(c)||ku(),t=Sc(e,t,n)}else uf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ei=pf(c.nextSibling),Ti=t,Di=!0,Oi=null,ki=!1,e!==null&&wi(t,e),t=bc(t,r.children),t.flags|=4096);return t}return a?(to(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ni(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ai(c,a,n,null),c.flags|=2):c=ni(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=_c(n):(a=c.cachePool,a===null?a=ma():(l=ea._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=vc(e,s,n),t.memoizedState=gc,oc(e.child,r)):(Qa(t),n=e.child,e=n.sibling,n=ni(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function bc(e,t){return t=xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function xc(e,t){return e=ei(22,e,null,t),e.lanes=0,e}function Sc(e,t,n){return ja(t,e.child,null,n),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function wc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Tc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ro.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(ro,o),tc(e,t,r,n),r=Di?mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cc(e,n,t);else if(e.tag===19)Cc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&io(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wc(t,!0,n,null,a,r);break;case`together`:wc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Gi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ki(e))):!0}function Oc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Vi(t,ea,e.memoizedState.cache),Fi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Vi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$a(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Qa(t),e=Ec(e,t,n),e===null?null:e.sibling):yc(e,t,n):(Qa(t),t.flags|=128,null);Qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Tc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(ro,ro.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Vi(t,ea,e.memoizedState.cache)}return Ec(e,t,n)}function kc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Dc(e,n)&&!(t.flags&128))return ec=!1,Oc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,Di&&t.flags&1048576&&xi(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=xa(t.elementType),t.type=e,typeof e==`function`)ti(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=nc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=j(e)||e,Error(i(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Us(r,t.pendingProps),mc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Fa(e,t),Ha(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Vi(t,ea,r),r!==o.cache&&Wi(t,[ea],n,!0),Va(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==a){a=ui(Error(i(424)),t),Li(a),t=hc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ei=pf(e.firstChild),Ti=t,Di=!0,Oi=null,ki=!0,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fi(),r===a){t=Ec(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=Pf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Di||(n=t.type,e=t.pendingProps,r=Gd(ae.current).createElement(n),r[Qe]=t,r[$e]=e,zd(r,n,e),dt(r),t.stateNode=r):t.memoizedState=Pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&Di&&(r=t.stateNode=_f(t.type,t.pendingProps,ae.current),Ti=t,ki=!0,a=Ei,nf(t.type)?(mf=a,Ei=pf(r.firstChild)):Ei=a),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Di&&((a=r=Ei)&&(r=sf(r,t.type,t.pendingProps,ki),r===null?a=!1:(t.stateNode=r,Ti=t,Ei=pf(r.firstChild),ki=!1,a=!0)),a||ji(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Jd(a,o)?r=null:s!==null&&Jd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=yo(e,t,So,null,null,n),rp._currentValue=a),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&Di&&((e=n=Ei)&&(n=cf(n,t.pendingProps,ki),n===null?e=!1:(t.stateNode=n,Ti=t,Ei=null,e=!0)),e||ji(t)),null;case 13:return yc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ja(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Vi(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,qi(t),a=Ji(a),r=r(a),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return Tc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return qi(t),r=Ji(ea),e===null?(a=fa(),a===null&&(a=Ll,o=ta(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Pa(t),Vi(t,ea,a)):((e.lanes&n)!==0&&(Fa(e,t),Ha(t,null,null,n),Va()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Vi(t,ea,r),r!==a.cache&&Wi(t,[ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Vi(t,ea,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ac(e){e.flags|=4}function jc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Eu())e.flags|=8192;else throw Sa=va,ga}else e.flags&=-16777217}function Mc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Yf(t))if(Eu())e.flags|=8192;else throw Sa=va,ga}function Nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Be(),e.lanes|=t,Zl|=t)}function Pc(e,t){if(!Di)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ic(e,t,n){var r=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fc(t),null;case 1:return Fc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hi(ea),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pi(t)?Ac(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ii())),Fc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ac(t),o===null?(Fc(t),jc(t,a,null,r,n)):(Fc(t),Mc(t,o))):o?o===e.memoizedState?(Fc(t),t.flags&=-16777217):(Ac(t),Fc(t),Mc(t,o)):(e=e.memoizedProps,e!==r&&Ac(t),Fc(t),jc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Fc(t),null}e=re.current,Pi(t)?Mi(t,e):(e=_f(a,r,n),t.stateNode=e,Ac(t))}return Fc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Fc(t),null}if(o=re.current,Pi(t))Mi(t,o);else{var s=Gd(ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Qe]=t,o[$e]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(zd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ac(t)}}return Fc(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ac(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Pi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ti,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||ji(t,!0)}else e=Gd(e).createTextNode(r),e[Qe]=t,t.stateNode=e}return Fc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Qe]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),e=!1}else n=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(no(t),t):(no(t),null);if(t.flags&128)throw Error(i(558))}return Fc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Pi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Qe]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fc(t),a=!1}else a=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(no(t),t):(no(t),null)}return no(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),Fc(t),null);case 4:return ce(),e===null&&Ed(t.stateNode.containerInfo),Fc(t),null;case 10:return Hi(t.type),Fc(t),null;case 19:if(ne(ro),r=t.memoizedState,r===null)return Fc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Pc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,Pc(r,!1),e=o.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ri(n,e),n=n.sibling;return L(ro,ro.current&1|2),Di&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&B()>ru&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304)}else{if(!a)if(e=io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Di)return Fc(t),null}else 2*B()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Fc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=B(),e.sibling=null,n=ro.current,L(ro,a?n&1|2:n&1),Di&&bi(t,r.treeForkCount),e);case 22:case 23:return no(t),Ya(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fc(t),t.subtreeFlags&6&&(t.flags|=8192)):Fc(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ne(da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hi(ea),Fc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function W(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hi(ea),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(no(t),t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(no(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ro),null;case 4:return ce(),null;case 10:return Hi(t.type),null;case 22:case 23:return no(t),Ya(),e!==null&&ne(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hi(ea),null;case 25:return null;default:return null}}function Lc(e,t){switch(Ci(t),t.tag){case 3:Hi(ea),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&no(t);break;case 13:no(t);break;case 19:ne(ro);break;case 10:Hi(t.type);break;case 22:case 23:no(t),Ya(),e!==null&&ne(da);break;case 24:Hi(ea)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){qu(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){qu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wa(t,n)}catch(t){qu(e,e.return,t)}}}function Vc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){qu(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){qu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){qu(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){qu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[$e]=t}catch(t){qu(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&nf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gt));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[Qe]=e,t[$e]=n}catch(t){qu(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Ud=fp,e=yr(e),br(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Wd={focusedElem:e,selectionRange:n},fp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Us(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)of(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:of(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Rc(5,n);break;case 1:if(_l(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){qu(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){qu(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(_l(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Wa(e,t)}catch(e){qu(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&ll(e,n);break;case 13:_l(e,n),r&4&&G(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Zu.bind(null,n),ff(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?yl(e,n,(n.subtreeFlags&8772)!=0):_l(e,n),Zc=i,Qc=a}break;case 30:break;default:_l(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ot(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Oe&&typeof Oe.onCommitFiberUnmount==`function`)try{Oe.onCommitFiberUnmount(De,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;nf(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),vf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){qu(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){qu(n,t,e)}break;case 18:al!==null&&(ol?(e=al,rf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Rp(e)):rf(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Rp(e)}catch(e){qu(t,t.return,e)}}}function G(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rp(e)}catch(e){qu(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Qu.bind(null,e,t);t.then(r,r)}})}function fl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(nf(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=pl;if(fl(t,e),hl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[at]||o[Qe]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),zd(o,r,n),o[Qe]=e,dt(o),r=o;break a;case`link`:var s=Kf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Kf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[Qe]=e,dt(o),r=o}e.stateNode=r}else qf(a,e.type,e.stateNode);else e.stateNode=Vf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?qf(a,e.type,e.stateNode):Vf(a,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Lt(a,``)}catch(t){qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){qu(e,e.return,t)}}break;case 3:if(Gf=null,a=pl,pl=xf(t.containerInfo),fl(t,e),pl=a,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rp(t.containerInfo)}catch(t){qu(e,e.return,t)}$c&&($c=!1,gl(e));break;case 4:r=pl,pl=xf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(tu=B()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,fl(t,e),Qc=d,Zc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||vl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?af(m,!0):af(l.stateNode,!1)}catch(e){qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Lt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),vl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),vl(t);break;case 27:vf(t.stateNode);case 26:case 5:Uc(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:yl(i,a,n),Rc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ua(c[i],s)}catch(e){qu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&ll(i,a);break;case 13:yl(i,a,n),n&&o&4&&G(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Hc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&na(n))}function xl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e)));break;case 12:if(i&2048){Sl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){qu(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:wl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Xf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=xf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&zc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Pl={getCacheForType:function(e){var t=Ji(ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ji(ea).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Il=0,Ll=null,Rl=null,zl=0,Bl=0,Vl=null,Hl=!1,Ul=!1,Wl=!1,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=null,$l=null,eu=!1,tu=0,nu=0,ru=1/0,iu=null,au=null,ou=0,su=null,cu=null,lu=0,uu=0,du=null,fu=null,pu=0,mu=null;function hu(){return Il&2&&zl!==0?zl&-zl:N.T===null?Ye():md()}function gu(){if(Xl===0)if(!(zl&536870912)||Di){var e=Pe;Pe<<=1,!(Pe&3932160)&&(Pe=262144),Xl=e}else Xl=536870912;return e=Xa.current,e!==null&&(e.flags|=32),Xl}function _u(e,t,n){(e===Ll&&(Bl===2||Bl===9)||e.cancelPendingCommit!==null)&&(wu(e,0),xu(e,zl,Xl,!1)),He(e,n),(!(Il&2)||e!==Ll)&&(e===Ll&&(!(Il&2)&&(Jl|=n),Kl===4&&xu(e,zl,Xl,!1)),od(e))}function vu(e,t,n){if(Il&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Re(e,t),a=r?Mu(e,t):Au(e,t,!0),o=r;do{if(a===0){Ul&&!r&&xu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!bu(n)){a=Au(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Ql;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Wl&&!l){c.errorRecoveryDisabledLanes|=o,Jl|=o,a=4;break a}o=$l,$l=a,o!==null&&($l===null?$l=o:$l.push.apply($l,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){wu(e,0),xu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:xu(r,t,Xl,!Hl);break a;case 2:$l=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=tu+300-B(),10<a)){if(xu(r,t,Xl,!Hl),Le(r,0,!0)!==0)break a;lu=t,r.timeoutHandle=Zd(yu.bind(null,r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,`Throttled`,-0,0),a);break a}yu(r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,null,-0,0)}}break}while(1);od(e)}function yu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gt},Ol(t,a,d);var m=(a&62914560)===a?tu-B():(a&4194048)===a?nu-B():0;if(m=Qf(d,m),m!==null){lu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),xu(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function bu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xu(e,t,n,r){t&=~Yl,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ae(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&We(e,n,t)}function Su(){return Il&6?!0:(sd(0,!1),!1)}function Cu(){if(Rl!==null){if(Bl===0)var e=Rl.return;else e=Rl,Bi=zi=null,To(e),Ta=null,Ea=0,e=Rl;for(;e!==null;)Lc(e.alternate,e),e=e.return;Rl=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lu=0,Cu(),Ll=e,Rl=n=ni(e.current,null),zl=t,Bl=0,Vl=null,Hl=!1,Ul=Re(e,t),Wl=!1,Zl=Xl=Yl=Jl=ql=Kl=0,$l=Ql=null,eu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ae(r),a=1<<i;t|=e[i],r&=~a}return Gl=t,Kr(),n}function Tu(e,t){oo=null,N.H=Fs,t===ha||t===_a?(t=Ca(),Bl=3):t===ga?(t=Ca(),Bl=4):Bl=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Vl=t,Rl===null&&(Kl=1,qs(e,ui(t,e.current)))}function Eu(){var e=Xa.current;return e===null?!0:(zl&4194048)===zl?Za===null:(zl&62914560)===zl||zl&536870912?e===Za:!1}function Du(){var e=N.H;return N.H=Fs,e===null?Fs:e}function Ou(){var e=N.A;return N.A=Pl,e}function ku(){Kl=4,Hl||(zl&4194048)!==zl&&Xa.current!==null||(Ul=!0),!(ql&134217727)&&!(Jl&134217727)||Ll===null||xu(Ll,zl,Xl,!1)}function Au(e,t,n){var r=Il;Il|=2;var i=Du(),a=Ou();(Ll!==e||zl!==t)&&(iu=null,wu(e,t)),t=!1;var o=Kl;a:do try{if(Bl!==0&&Rl!==null){var s=Rl,c=Vl;switch(Bl){case 8:Cu(),o=6;break a;case 3:case 2:case 9:case 6:Xa.current===null&&(t=!0);var l=Bl;if(Bl=0,Vl=null,Iu(e,s,c,l),n&&Ul){o=0;break a}break;default:l=Bl,Bl=0,Vl=null,Iu(e,s,c,l)}}ju(),o=Kl;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,Bi=zi=null,Il=r,N.H=i,N.A=a,Rl===null&&(Ll=null,zl=0,Kr()),o}function ju(){for(;Rl!==null;)Pu(Rl)}function Mu(e,t){var n=Il;Il|=2;var r=Du(),a=Ou();Ll!==e||zl!==t?(iu=null,ru=B()+500,wu(e,t)):Ul=Re(e,t);a:do try{if(Bl!==0&&Rl!==null){t=Rl;var o=Vl;b:switch(Bl){case 1:Bl=0,Vl=null,Iu(e,t,o,1);break;case 2:case 9:if(ya(o)){Bl=0,Vl=null,Fu(t);break}t=function(){Bl!==2&&Bl!==9||Ll!==e||(Bl=7),od(e)},o.then(t,t);break a;case 3:Bl=7;break a;case 4:Bl=5;break a;case 7:ya(o)?(Bl=0,Vl=null,Fu(t)):(Bl=0,Vl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(Rl.tag){case 26:s=Rl.memoizedState;case 5:case 27:var c=Rl;if(s?Yf(s):c.stateNode.complete){Bl=0,Vl=null;var l=c.sibling;if(l!==null)Rl=l;else{var u=c.return;u===null?Rl=null:(Rl=u,Lu(u))}break b}}Bl=0,Vl=null,Iu(e,t,o,5);break;case 6:Bl=0,Vl=null,Iu(e,t,o,6);break;case 8:Cu(),Kl=6;break a;default:throw Error(i(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return Bi=zi=null,N.H=r,N.A=a,Il=n,Rl===null?(Ll=null,zl=0,Kr(),Kl):0}function Nu(){for(;Rl!==null&&!ye();)Pu(Rl)}function Pu(e){var t=kc(e.alternate,e,Gl);e.memoizedProps=e.pendingProps,t===null?Lu(e):Rl=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,zl);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,zl);break;case 5:To(t);default:Lc(n,t),t=Rl=ri(t,Gl),t=kc(n,t,Gl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):Rl=t}function Iu(e,t,n,r){Bi=zi=null,To(t),Ta=null,Ea=0;var i=t.return;try{if(Qs(e,i,t,n,zl)){Kl=1,qs(e,ui(n,e.current)),Rl=null;return}}catch(t){if(i!==null)throw Rl=i,t;Kl=1,qs(e,ui(n,e.current)),Rl=null;return}t.flags&32768?(Di||r===1?e=!0:Ul||zl&536870912?e=!1:(Hl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Hl);return}e=t.return;var n=Ic(t.alternate,t,Gl);if(n!==null){Rl=n;return}if(t=t.sibling,t!==null){Rl=t;return}Rl=t=e}while(t!==null);Kl===0&&(Kl=5)}function Ru(e,t){do{var n=W(e.alternate,e);if(n!==null){n.flags&=32767,Rl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Rl=e;return}Rl=e=n}while(e!==null);Kl=6,Rl=null}function zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Wu();while(ou!==0);if(Il&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Gr,Ue(e,n,o,s,c,l),e===Ll&&(Rl=Ll=null,zl=0),cu=t,su=e,lu=n,uu=o,du=a,fu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,$u(Se,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=Il,Il|=4;try{nl(e,t,n)}finally{Il=s,P.p=a,N.T=r}}ou=1,Bu(),Vu(),Hu()}}function Bu(){if(ou===1){ou=0;var e=su,t=cu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Il;Il|=4;try{ml(t,e);var a=Wd,o=yr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&vr(s.ownerDocument.documentElement,s)){if(c!==null&&br(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=_r(s,h),v=_r(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}fp=!!Ud,Wd=Ud=null}finally{Il=i,P.p=r,N.T=n}}e.current=t,ou=2}}function Vu(){if(ou===2){ou=0;var e=su,t=cu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Il;Il|=4;try{rl(e,t.alternate,t)}finally{Il=i,P.p=r,N.T=n}}ou=3}}function Hu(){if(ou===4||ou===3){ou=0,be();var e=su,t=cu,n=lu,r=fu;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,cu=su=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(au=null),Je(n),t=t.stateNode,Oe&&typeof Oe.onCommitFiberRoot==`function`)try{Oe.onCommitFiberRoot(De,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{N.T=t,P.p=i}}lu&3&&Wu(),od(e),i=e.pendingLanes,n&261930&&i&42?e===mu?pu++:(pu=0,mu=e):pu=0,sd(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Wu(){return Bu(),Vu(),Hu(),Gu()}function Gu(){if(ou!==5)return!1;var e=su,t=uu;uu=0;var n=Je(lu),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Il&6)throw Error(i(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,sd(0,!1),Oe&&typeof Oe.onPostCommitFiberRoot==`function`)try{Oe.onPostCommitFiberRoot(De,o)}catch{}return!0}finally{P.p=a,N.T=r,Uu(e,t)}}function Ku(e,t,n){t=ui(n,t),t=Ys(e.stateNode,t,2),e=La(e,t,2),e!==null&&(He(e,2),od(e))}function qu(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=ui(n,e),n=Xs(2),r=La(t,n,2),r!==null&&(Zs(n,r,t,e),He(r,2),od(r));break}}t=t.return}}function Ju(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Yu.bind(null,e,t,n),t.then(e,e))}function Yu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(zl&n)===n&&(Kl===4||Kl===3&&(zl&62914560)===zl&&300>B()-tu?!(Il&2)&&wu(e,0):Yl|=n,Zl===zl&&(Zl=0)),od(e)}function Xu(e,t){t===0&&(t=Be()),e=Yr(e,t),e!==null&&(He(e,t),od(e))}function Zu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xu(e,n)}function Qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Xu(e,n)}function $u(e,t){return _e(e,t)}var ed=null,td=null,nd=!1,rd=!1,id=!1,ad=0;function od(e){e!==td&&e.next===null&&(td===null?ed=td=e:td=td.next=e),rd=!0,nd||(nd=!0,pd())}function sd(e,t){if(!id&&rd){id=!0;do for(var n=!1,r=ed;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ae(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,fd(r,a))}else a=zl,a=Le(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Re(r,a)||(n=!0,fd(r,a));r=r.next}while(n);id=!1}}function cd(){ld()}function ld(){rd=nd=!1;var e=0;ad!==0&&Xd()&&(e=ad);for(var t=B(),n=null,r=ed;r!==null;){var i=r.next,a=ud(r,t);a===0?(r.next=null,n===null?ed=i:n.next=i,i===null&&(td=n)):(n=r,(e!==0||a&3)&&(rd=!0)),r=i}ou!==0&&ou!==5||sd(e,!1),ad!==0&&(ad=0)}function ud(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ae(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ze(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=zl,n=Le(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Bl===2||Bl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ve(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Re(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ve(r),Je(n)){case 2:case 8:n=H;break;case 32:n=Se;break;case 268435456:n=we;break;default:n=Se}return r=dd.bind(null,e),n=_e(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ve(r),e.callbackPriority=2,e.callbackNode=null,2}function dd(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Wu()&&e.callbackNode!==n)return null;var r=zl;return r=Le(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(vu(e,r,t),ud(e,B()),e.callbackNode!=null&&e.callbackNode===n?dd.bind(null,e):null)}function fd(e,t){if(Wu())return null;vu(e,t,!0)}function pd(){ef(function(){Il&6?_e(V,cd):ld()})}function md(){if(ad===0){var e=aa;e===0&&(e=U,U<<=1,!(U&261888)&&(U=256)),ad=e}return ad}function hd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Wt(``+e)}function gd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function _d(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=hd((i[$e]||null).action),o=r.submitter;o&&(t=(t=o[$e]||null)?hd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ad!==0){var e=o?gd(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?gd(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var vd=0;vd<Br.length;vd++){var yd=Br[vd];Vr(yd.toLowerCase(),`on`+(yd[0].toUpperCase()+yd.slice(1)))}Vr(Mr,`onAnimationEnd`),Vr(Nr,`onAnimationIteration`),Vr(Pr,`onAnimationStart`),Vr(`dblclick`,`onDoubleClick`),Vr(`focusin`,`onFocus`),Vr(`focusout`,`onBlur`),Vr(Fr,`onTransitionRun`),Vr(Ir,`onTransitionStart`),Vr(Lr,`onTransitionCancel`),Vr(Rr,`onTransitionEnd`),ht(`onMouseEnter`,[`mouseout`,`mouseover`]),ht(`onMouseLeave`,[`mouseout`,`mouseover`]),ht(`onPointerEnter`,[`pointerout`,`pointerover`]),ht(`onPointerLeave`,[`pointerout`,`pointerover`]),mt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),mt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),mt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),mt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),mt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),mt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var bd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),xd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(bd));function Sd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}}}}function Cd(e,t){var n=t[tt];n===void 0&&(n=t[tt]=new Set);var r=e+`__bubble`;n.has(r)||(Dd(t,e,2,!1),n.add(r))}function wd(e,t,n){var r=0;t&&(r|=4),Dd(n,e,r,t)}var Td=`_reactListening`+Math.random().toString(36).slice(2);function Ed(e){if(!e[Td]){e[Td]=!0,ft.forEach(function(t){t!==`selectionchange`&&(xd.has(t)||wd(t,!1,e),wd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Td]||(t[Td]=!0,wd(`selectionchange`,!1,t))}}function Dd(e,t,n,r){switch(yp(t)){case 2:var i=pp;break;case 8:i=mp;break;default:i=hp}n=i.bind(null,t,n,e),i=void 0,!tn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Od(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=st(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Qt(function(){var r=a,i=qt(n),s=[];a:{var c=zr.get(e);if(c!==void 0){var l=pn,u=e;switch(e){case`keypress`:if(cn(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Nn;break;case Mr:case Nr:case Pr:l=Cn;break;case Rr:l=Pn;break;case`scroll`:case`scrollend`:l=hn;break;case`wheel`:l=Fn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=In}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=$t(m,p),g!=null&&d.push(kd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Kt&&(u=n.relatedTarget||n.fromElement)&&(st(u)||u[et]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?st(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:lt(l),h=u==null?c:lt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,st(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=jd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Md(s,c,l,d,!1),u!==null&&f!==null&&Md(s,f,u,d,!0)}}a:{if(c=r?lt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=nr;else if(Xn(c))if(rr)v=fr;else{v=ur;var y=lr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Vt(r.elementType)&&(v=nr):v=dr;if(v&&=v(e,r)){Zn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Nt(c,`number`,c.value)}switch(y=r?lt(r):window,e){case`focusin`:(Xn(y)||y.contentEditable===`true`)&&(Sr=y,Cr=r,wr=null);break;case`focusout`:wr=Cr=Sr=null;break;case`mousedown`:Tr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Tr=!1,Er(s,n,i);break;case`selectionchange`:if(xr)break;case`keydown`:case`keyup`:Er(s,n,i)}var b;if(Rn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Kn?Wn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Vn&&n.locale!==`ko`&&(Kn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Kn&&(b=sn()):(rn=i,an=`value`in rn?rn.value:rn.textContent,Kn=!0)),y=Ad(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Gn(n),b!==null&&(x.data=b)))),(b=Bn?qn(e,n):Jn(e,n))&&(x=Ad(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),_d(s,e,r,n,i)}Sd(s,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=$t(e,n),i!=null&&r.unshift(kd(e,i,a)),i=$t(e,t),i!=null&&r.push(kd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function jd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=$t(n,a),l!=null&&o.unshift(kd(n,l,c))):i||(l=$t(n,a),l!=null&&o.push(kd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Nd=/\r\n?/g,Pd=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Nd,`
80
+ `).replace(Pd,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Ld(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Lt(e,``+r);break;case`className`:xt(e,`class`,r);break;case`tabIndex`:xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:xt(e,n,r);break;case`style`:Bt(e,r,o);break;case`data`:if(t!==`object`){xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ld(e,t,`name`,a.name,a,null),Ld(e,t,`formEncType`,a.formEncType,a,null),Ld(e,t,`formMethod`,a.formMethod,a,null),Ld(e,t,`formTarget`,a.formTarget,a,null)):(Ld(e,t,`encType`,a.encType,a,null),Ld(e,t,`method`,a.method,a,null),Ld(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`onScroll`:r!=null&&Cd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Cd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Wt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Cd(`beforetoggle`,e),Cd(`toggle`,e),bt(e,`popover`,r);break;case`xlinkActuate`:St(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:St(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:St(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:St(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:bt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ht.get(n)||n,bt(e,n,r))}}function Rd(e,t,n,r,a,o){switch(n){case`style`:Bt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Lt(e,``+r);break;case`onScroll`:r!=null&&Cd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Cd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[$e]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):bt(e,n,r)}}}function zd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Cd(`error`,e),Cd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ld(e,t,o,s,n,null)}}a&&Ld(e,t,`srcSet`,n.srcSet,n,null),r&&Ld(e,t,`src`,n.src,n,null);return;case`input`:Cd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Ld(e,t,r,d,n,null)}}Mt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Cd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ld(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Pt(e,!!r,n,!0):Pt(e,!!r,t,!1);return;case`textarea`:for(s in Cd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Ld(e,t,s,c,n,null)}It(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Ld(e,t,l,r,n,null)}return;case`dialog`:Cd(`beforetoggle`,e),Cd(`toggle`,e),Cd(`cancel`,e),Cd(`close`,e);break;case`iframe`:case`object`:Cd(`load`,e);break;case`video`:case`audio`:for(r=0;r<bd.length;r++)Cd(bd[r],e);break;case`image`:Cd(`error`,e),Cd(`load`,e);break;case`details`:Cd(`toggle`,e);break;case`embed`:case`source`:case`link`:Cd(`error`,e),Cd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ld(e,t,u,r,n,null)}return;default:if(Vt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ld(e,t,c,r,n,null))}function Bd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Ld(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Ld(e,t,p,m,r,f)}}jt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Ld(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ld(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Pt(e,!!n,n?[]:``,!1):Pt(e,!!n,t,!0)):Pt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ld(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Ld(e,t,s,a,r,o)}Ft(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Ld(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ld(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Ld(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Ld(e,t,u,p,r,m)}return;default:if(Vt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ld(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Ld(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Vd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Vd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Jd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yd=null;function Xd(){var e=window.event;return e&&e.type===`popstate`?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var Zd=typeof setTimeout==`function`?setTimeout:void 0,Qd=typeof clearTimeout==`function`?clearTimeout:void 0,$d=typeof Promise==`function`?Promise:void 0,ef=typeof queueMicrotask==`function`?queueMicrotask:$d===void 0?Zd:function(e){return $d.resolve(null).then(e).catch(tf)};function tf(e){setTimeout(function(){throw e})}function nf(e){return e===`head`}function rf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Rp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[at]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vf(e.ownerDocument.body);n=i}while(n);Rp(t)}function af(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function of(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:of(n),ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[at])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pf(e.nextSibling),e===null)break}return null}function cf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pf(e.nextSibling),e===null))return null;return e}function lf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pf(e.nextSibling),e===null))return null;return e}function uf(e){return e.data===`$?`||e.data===`$~`}function df(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function ff(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mf=null;function hf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _f(e,t,n){switch(t=Gd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ot(e)}var yf=new Map,bf=new Set;function xf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sf=P.d;P.d={f:Cf,r:wf,D:Df,C:Of,L:kf,m:Af,X:Mf,S:jf,M:Nf};function Cf(){var e=Sf.f(),t=Su();return e||t}function wf(e){var t=ct(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):Sf.r(e)}var Tf=typeof document>`u`?null:document;function Ef(e,t,n){var r=Tf;if(r&&typeof t==`string`&&t){var i=At(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bf.has(i)||(bf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Df(e){Sf.D(e),Ef(`dns-prefetch`,e,null)}function Of(e,t){Sf.C(e,t),Ef(`preconnect`,e,t)}function kf(e,t,n){Sf.L(e,t,n);var r=Tf;if(r&&e&&t){var i=`link[rel="preload"][as="`+At(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+At(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+At(n.imageSizes)+`"]`)):i+=`[href="`+At(e)+`"]`;var a=i;switch(t){case`style`:a=Ff(e);break;case`script`:a=zf(e)}yf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),yf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(If(a))||t===`script`&&r.querySelector(Bf(a))||(t=r.createElement(`link`),zd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Af(e,t){Sf.m(e,t);var n=Tf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+At(r)+`"][href="`+At(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zf(e)}if(!yf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),yf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),dt(r),n.head.appendChild(r)}}}function jf(e,t,n){Sf.S(e,t,n);var r=Tf;if(r&&e){var i=ut(r).hoistableStyles,a=Ff(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(If(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=yf.get(a))&&Uf(e,n);var c=o=r.createElement(`link`);dt(c),zd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mf(e,t){Sf.X(e,t);var n=Tf;if(n&&e){var r=ut(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=f({src:e,async:!0},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),dt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t){Sf.M(e,t);var n=Tf;if(n&&e){var r=ut(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),dt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t,n,r){var a=(a=ae.current)?xf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Ff(n.href),n=ut(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Ff(n.href);var o=ut(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(If(e)))&&!o._p&&(s.instance=o,s.state.loading=5),yf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},yf.set(e,n),o||Rf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=zf(n),n=ut(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Ff(e){return`href="`+At(e)+`"`}function If(e){return`link[rel="stylesheet"][`+e+`]`}function Lf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Rf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),zd(t,`link`,n),dt(t),e.head.appendChild(t))}function zf(e){return`[src="`+At(e)+`"]`}function Bf(e){return`script[async]`+e}function Vf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+At(n.href)+`"]`);if(r)return t.instance=r,dt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),dt(r),zd(r,`style`,a),Hf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Ff(n.href);var o=e.querySelector(If(a));if(o)return t.state.loading|=4,t.instance=o,dt(o),o;r=Lf(n),(a=yf.get(a))&&Uf(r,a),o=(e.ownerDocument||e).createElement(`link`),dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Hf(o,n.precedence,e),t.instance=o;case`script`:return o=zf(n.src),(a=e.querySelector(Bf(o)))?(t.instance=a,dt(a),a):(r=n,(a=yf.get(o))&&(r=f({},n),Wf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),dt(a),zd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hf(r,n.precedence,e));return t.instance}function Hf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gf=null;function Kf(e,t,n){if(Gf===null){var r=new Map,i=Gf=new Map;i.set(n,r)}else i=Gf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[at]||a[Qe]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Yf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Ff(r.href),a=t.querySelector(If(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=$f.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,dt(a);return}a=t.ownerDocument||t,r=Lf(r),(i=yf.get(i))&&Uf(r,i),a=a.createElement(`link`),dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=$f.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Zf=0;function Qf(e,t){return e.stylesheets&&e.count===0&&tp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Zf===0&&(Zf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Zf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function $f(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ep=null;function tp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ep=new Map,t.forEach(np,e),ep=null,$f.call(e))}function np(e,t){if(!(t.state.loading&4)){var n=ep.get(e);if(n)var r=n.get(null);else{n=new Map,ep.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=$f.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var rp={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function ip(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ve(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ve(0),this.hiddenUpdates=Ve(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ap(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ip(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Pa(a),e}function op(e){return e?(e=Qr,e):Qr}function sp(e,t,n,r,i,a){i=op(i),r.context===null?r.context=i:r.pendingContext=i,r=Ia(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=La(e,r,t),n!==null&&(_u(n,e,t),Ra(n,e,t))}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lp(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function up(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&_u(t,e,67108864),lp(e,67108864)}}function dp(e){if(e.tag===13||e.tag===31){var t=hu();t=qe(t);var n=Yr(e,t);n!==null&&_u(n,e,t),lp(e,t)}}var fp=!0;function pp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,hp(e,t,n,r)}finally{P.p=a,N.T=i}}function mp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,hp(e,t,n,r)}finally{P.p=a,N.T=i}}function hp(e,t,n,r){if(fp){var i=gp(r);if(i===null)Od(e,t,r,_p,n),Op(e,r);else if(Ap(i,e,t,n,r))r.stopPropagation();else if(Op(e,r),t&4&&-1<Dp.indexOf(e)){for(;i!==null;){var a=ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ie(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ae(o);s.entanglements[1]|=c,o&=~c}od(a),!(Il&6)&&(ru=B()+500,sd(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&_u(s,a,2),Su(),lp(a,2)}if(a=gp(r),a===null&&Od(e,t,r,_p,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Od(e,t,r,null,n)}}function gp(e){return e=qt(e),vp(e)}var _p=null;function vp(e){if(_p=null,e=st(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _p=e,null}function yp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(xe()){case V:return 2;case H:return 8;case Se:case Ce:return 32;case we:return 268435456;default:return 32}default:return 32}}var bp=!1,xp=null,Sp=null,Cp=null,wp=new Map,Tp=new Map,Ep=[],Dp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Op(e,t){switch(e){case`focusin`:case`focusout`:xp=null;break;case`dragenter`:case`dragleave`:Sp=null;break;case`mouseover`:case`mouseout`:Cp=null;break;case`pointerover`:case`pointerout`:wp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Tp.delete(t.pointerId)}}function kp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ct(t),t!==null&&up(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ap(e,t,n,r,i){switch(t){case`focusin`:return xp=kp(xp,e,t,n,r,i),!0;case`dragenter`:return Sp=kp(Sp,e,t,n,r,i),!0;case`mouseover`:return Cp=kp(Cp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return wp.set(a,kp(wp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Tp.set(a,kp(Tp.get(a)||null,e,t,n,r,i)),!0}return!1}function jp(e){var t=st(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Xe(e.priority,function(){dp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Xe(e.priority,function(){dp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Kt=r,n.target.dispatchEvent(r),Kt=null}else return t=ct(n),t!==null&&up(t),e.blockedOn=n,!1;t.shift()}return!0}function Np(e,t,n){Mp(e)&&n.delete(t)}function Pp(){bp=!1,xp!==null&&Mp(xp)&&(xp=null),Sp!==null&&Mp(Sp)&&(Sp=null),Cp!==null&&Mp(Cp)&&(Cp=null),wp.forEach(Np),Tp.forEach(Np)}function Fp(e,n){e.blockedOn===n&&(e.blockedOn=null,bp||(bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pp)))}var Ip=null;function Lp(e){Ip!==e&&(Ip=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ip===e&&(Ip=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(vp(r||n)===null)continue;break}var a=ct(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Rp(e){function t(t){return Fp(t,e)}xp!==null&&Fp(xp,e),Sp!==null&&Fp(Sp,e),Cp!==null&&Fp(Cp,e),wp.forEach(t),Tp.forEach(t);for(var n=0;n<Ep.length;n++){var r=Ep[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ep.length&&(n=Ep[0],n.blockedOn===null);)jp(n),n.blockedOn===null&&Ep.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[$e]||null;if(typeof a==`function`)o||Lp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[$e]||null)s=o.formAction;else if(vp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Lp(n)}}}function zp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Bp(e){this._internalRoot=e}Vp.prototype.render=Bp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;sp(n,hu(),e,t,null,null)},Vp.prototype.unmount=Bp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sp(e.current,2,null,e,null,null),Su(),t[et]=null}};function Vp(e){this._internalRoot=e}Vp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ye();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ep.length&&t!==0&&t<Ep[n].priority;n++);Ep.splice(n,0,e),n===0&&jp(e)}};var Hp=n.version;if(Hp!==`19.2.4`)throw Error(i(527,Hp,`19.2.4`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Up={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Wp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wp.isDisabled&&Wp.supportsFiber)try{De=Wp.inject(Up),Oe=Wp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ws,s=Gs,c=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ap(e,1,!1,null,null,n,r,null,o,s,c,zp),e[et]=t.current,Ed(e),new Bp(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Ws,c=Gs,l=Ks,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ap(e,1,!0,t,n??null,r,o,u,s,c,l,zp),t.context=op(null),n=t.current,r=hu(),r=qe(r),o=Ia(r),o.callback=null,La(n,o,r),n=r,t.current.lanes=n,He(t,n),od(t),e[et]=t.current,Ed(e),new Vp(t)}})),L$=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=I$()}))(),R$=class{log=TA();root;onBrowserRender=j({on:`react:browser:render`,handler:async({hydration:e,root:t,element:n})=>{e?.[`alepha.react.router.layers`]?(this.root=(0,L$.hydrateRoot)(t,n),this.log.info(`Hydrated root element`)):(this.root??=(0,L$.createRoot)(t),this.root.render(n),this.log.info(`Created root element`))}})},z$=class{alepha=D(Ok);pageApi=D(k$);get state(){return this.alepha.store.get(`alepha.react.router.state`)}get pages(){return this.pageApi.getPages()}get concretePages(){return this.pageApi.getConcretePages()}get browser(){if(this.alepha.isBrowser())return this.alepha.inject(N$)}isActive(e,t={}){let n=this.state.url.pathname,r=n===e||n===`${e}/`||`${n}/`===e;return t.startWith&&!r&&(r=n.startsWith(e)),r}node(e,t={}){let n=this.pageApi.page(e);return!n.lazy&&!n.component?{...n,label:n.label??n.name,children:void 0}:{...n,label:n.label??n.name,href:this.path(e,t),children:void 0}}path(e,t={}){return this.pageApi.pathname(e,{params:{...this.state?.params,...t.params},query:t.query})}async reload(){this.browser&&await this.push(this.location.pathname+this.location.search,{replace:!0,force:!0})}getURL(){return this.browser?new URL(this.location.href):this.state.url}get location(){if(!this.browser)throw new p(`Browser is required`);return this.browser.location}get current(){return this.state}get pathname(){return this.state.url.pathname}get query(){let e={};for(let[t,n]of new URLSearchParams(this.state.url.search).entries())e[t]=String(n);return e}async back(){this.browser?.history.back()}async forward(){this.browser?.history.forward()}async invalidate(e){await this.browser?.invalidate(e)}async push(e,t){for(let n of this.pages)if(n.name===e){await this.browser?.push(this.path(e,t),t);return}await this.browser?.push(e,t)}anchor(e,t={}){let n=e;for(let r of this.pages)if(r.name===e){n=this.path(e,t);break}return{href:this.base(n),onClick:e=>{e.stopPropagation(),e.preventDefault(),this.push(n,t).catch(console.error)}}}base(e){let t=`/__devtools`;return t===`/`?e:t+e}setQueryParams(e,t={}){let n=new URLSearchParams((typeof e==`function`?e:()=>e)(this.query)).toString(),r=n?`${this.pathname}?${n}`:this.pathname,i=this.base(r);t.push?window.history.pushState({},``,i):window.history.replaceState({},``,i)}},B$=()=>gA(z$),V$=e=>{let t=B$();return(0,q.createElement)(`a`,{...e,...t.anchor(e.href)},e.children)},H$=e=>{m$();let t=B$(),[n,r]=(0,q.useState)(!1),i=typeof e==`string`?{href:e}:{...e,href:e.href},a=i.href,o=t.isActive(a,i);return{isPending:n,isActive:o,anchorProps:{href:t.base(a),onClick:async e=>{if(e?.stopPropagation(),e?.preventDefault(),!o&&!n){r(!0);try{await t.push(a)}finally{r(!1)}}}}}},U$=(e,t={})=>{let n=hA(),r=t.key??`q`,i=B$(),a=i.query[r],[o={},s]=(0,q.useState)(G$(n,e,i.query[r]));return(0,q.useEffect)(()=>{s(G$(n,e,a))},[a]),[o,t=>{s(t),i.setQueryParams(i=>({...i,[r]:W$(n,e,t)}))}]},W$=(e,t,n)=>btoa(JSON.stringify(e.codec.decode(t,n))),G$=(e,t,n)=>{try{return e.codec.decode(t,JSON.parse(atob(decodeURIComponent(n))))}catch{return}};C({name:`alepha.react.router`,primitives:[l$],services:[k$,j$,N$,z$,R$,c$],register:e=>e.with(rj).with(hj).with(mA).with(JA).with(ej).with(k$).with(N$).with(j$).with(R$).with(z$)});var K$=class{root=l$({path:`/`,component:m0})};function q$(e){let t=.5;return e>=0&&e<=20?t=10:e>=20&&e<=50?t=4:e>=50&&e<=80?t=2:e>=80&&e<=99?t=1:e>=99&&e<=100&&(t=0),e+t}var J$=()=>jZ({mounted:!1,progress:0,interval:0,step:1,stepInterval:100,timeouts:[]}),Y$=e=>MZ(e);function X$(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function Z$(e){X$(e=>({progress:Math.max(e.progress-e.step,0)}),e)}function Q$(e,t){X$(()=>({progress:sM(e,0,100),mounted:!0}),t)}function $$(e){X$(e=>(window.clearInterval(e.interval),e.timeouts.forEach(e=>window.clearTimeout(e)),{timeouts:[]}),e)}function e1(e){$$(e),X$(t=>({progress:100,timeouts:[window.setTimeout(()=>{X$(()=>({mounted:!1}),e)},50),window.setTimeout(()=>{X$(()=>({progress:0}),e)},t.stepInterval+50)]}),e)}function t1(e){X$(e=>({progress:q$(e.progress),mounted:!0}),e),X$(t=>(window.clearInterval(t.interval),{interval:window.setInterval(()=>{X$(e=>({progress:q$(e.progress),mounted:!0}),e)},t.stepInterval),mounted:!0}),e)}function n1(e){X$(e=>(window.clearInterval(e.interval),{interval:-1}),e)}function r1(e){$$(e),n1(e),X$(()=>({progress:0,mounted:!1}),e)}function i1(e){X$(t=>{let n=Math.min(t.progress+t.step,100),r=n!==100&&n!==0;if(!r){let i=window.setTimeout(()=>r1(e),t.stepInterval+50);return{progress:n,mounted:r,timeouts:[...t.timeouts,i]}}return{progress:n,mounted:r}},e)}function a1(){let e=J$();return[e,{start:()=>t1(e),stop:()=>n1(e),reset:()=>r1(e),set:t=>Q$(t,e),increment:()=>i1(e),decrement:()=>Z$(e),complete:()=>e1(e),cleanup:()=>$$(e)}]}var[o1,s1]=a1(),{start:c1,stop:l1,reset:u1,set:d1,increment:f1,decrement:p1,complete:m1,cleanup:h1}=s1,g1={root:`m_8f2832ae`,section:`m_7a0fe999`};function _1({initialProgress:e=0,color:t,size:n=3,stepInterval:r=500,withinPortal:i=!0,portalProps:a,zIndex:o=qj(`max`),store:s=o1,...c}){s.initialize({mounted:!1,progress:e,interval:-1,step:1,stepInterval:r,timeouts:[]});let l=Y$(s);return(0,q.useEffect)(()=>()=>r1(s),[s]),(0,J.jsx)(DB,{...a,withinPortal:i,children:(0,J.jsx)(IY,{radius:0,value:l.progress,size:n,color:t,classNames:g1,"data-mounted":l.mounted||void 0,__vars:{"--nprogress-z-index":o?.toString()},...c})})}_1.displayName=`@mantine/nprogress/NavigationProgress`;var v1=()=>{nj(Tj),nj(Ej);let e=gA(gZ);return[e.getTheme(),t=>{e.setTheme(t.index)},{overrides:e.getThemeOverrides(),setOverrides:t=>{e.setThemeOverrides(t)},resetOverrides:()=>{e.resetThemeOverrides()}}]},y1=()=>gA(s$),b1=()=>jZ({opened:!1,empty:!1,selected:-1,listId:``,query:``,registeredActions:new Set}),x1=e=>MZ(e);function S1(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function C1(e){S1(()=>({opened:!0,selected:-1}),e)}function w1(e){S1(()=>({opened:!1}),e)}function T1(e){S1(e=>({opened:!e.opened,selected:e.opened?e.selected:-1}),e)}function E1(e,t){t.updateState(t=>({...t,selected:e}))}function D1(e,t){t.updateState(t=>({...t,listId:e}))}function O1(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t instanceof ShadowRoot?t.host.children:t.children;for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=O1(e,n.shadowRoot);if(t)return t}let i=O1(e,n);if(i)return i}return null}function k1(e,t){let n=t.getState(),r=n.listId?O1(`#${n.listId}`):null,i=r?.querySelector(`[data-selected]`),a=r?.querySelectorAll(`[data-action]`)??[],o=sM(e===-1?a.length-1:e===a.length?0:e,0,a.length-1);return i?.removeAttribute(`data-selected`),a[o]?.scrollIntoView({block:`nearest`}),a[o]?.setAttribute(`data-selected`,`true`),E1(o,t),o}function A1(e){return k1(e.getState().selected+1,e)}function j1(e){return k1(e.getState().selected-1,e)}function M1(e){O1(`#${e.getState().listId} [data-selected]`)?.click()}function N1(e,t){let n=t.getState();return n.registeredActions.add(e),()=>{n.registeredActions.delete(e)}}function P1(e,t){S1(()=>({query:e}),t),Promise.resolve().then(()=>{k1(0,t),S1(e=>({empty:e.query.trim().length>0&&e.registeredActions.size===0||!1}),t)})}function F1({clearQuery:e},t){t.updateState(t=>({...t,selected:-1,query:e?``:t.query,empty:e?!1:t.empty}))}var I1={open:C1,close:w1,toggle:T1,updateState:S1,setSelectedAction:E1,setListId:D1,selectAction:k1,selectNextAction:A1,selectPreviousAction:j1,triggerSelectedAction:M1,registerAction:N1,setQuery:P1,clearSpotlightState:F1};function L1(){let e=b1();return[e,{open:()=>C1(e),close:()=>w1(e),toggle:()=>T1(e)}]}var[R1,z1]=L1(),{open:B1,close:V1,toggle:H1}=z1;function U1(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}var[W1,G1]=Bj(`Spotlight component was not found in tree`),K1={root:`m_d2b315db`,content:`m_3cd250e0`,body:`m_d2abce9b`,search:`m_f366a061`,actionsList:`m_6e463822`,action:`m_d49bb8ef`,actionBody:`m_3d475731`,actionSection:`m_832642f6`,actionLabel:`m_6c2a1345`,actionDescription:`m_a6d9d78d`,empty:`m_82f78f74`,footer:`m_ddcaf054`,actionsGroup:`m_5a3e5f7b`},q1={dimmedSections:!0,highlightQuery:!1},J1=Q(e=>{let{className:t,style:n,classNames:r,styles:i,id:a,description:o,label:s,leftSection:c,rightSection:l,children:u,dimmedSections:d,highlightQuery:f,highlightColor:p,closeSpotlightOnTrigger:m,onClick:h,onMouseDown:g,keywords:_,vars:v,...y}=Z(`SpotlightAction`,q1,e),b=G1(),x={classNames:r,styles:i},S=f&&typeof s==`string`?(0,J.jsx)(YK,{component:`span`,highlight:b.query,color:p,...b.getStyles(`actionLabel`,x),children:s}):(0,J.jsx)(`span`,{...b.getStyles(`actionLabel`,x),children:s});return(0,J.jsx)(oB,{"data-action":!0,...b.getStyles(`action`,{className:t,style:n,...x}),...y,onMouseDown:e=>{e.preventDefault(),g?.(e)},onClick:e=>{h?.(e),(m??b.closeOnActionTrigger)&&I1.close(b.store)},tabIndex:-1,children:u||(0,J.jsxs)(J.Fragment,{children:[c&&(0,J.jsx)($,{component:`span`,mod:{position:`left`,dimmed:d},...b.getStyles(`actionSection`,x),children:c}),(0,J.jsxs)(`span`,{...b.getStyles(`actionBody`,x),children:[S,(0,J.jsx)(`span`,{...b.getStyles(`actionDescription`,x),children:o})]}),l&&(0,J.jsx)($,{component:`span`,mod:{position:`right`,dimmed:d},...b.getStyles(`actionSection`,x),children:l})]})})});J1.classes=K1,J1.displayName=`@mantine/spotlight/SpotlightAction`;var Y1=Q(e=>{let{className:t,style:n,styles:r,classNames:i,label:a,children:o,...s}=Z(`SpotlightActionsGroup`,null,e);return(0,J.jsx)($,{...G1().getStyles(`actionsGroup`,{className:t,style:n,classNames:i,styles:r}),...s,__vars:{"--spotlight-label":`'${a?.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}'`},children:o})});Y1.classes=K1,Y1.displayName=`@mantine/core/SpotlightActionsGroup`;var X1=Q(e=>{let{className:t,style:n,id:r,children:i,vars:a,classNames:o,styles:s,...c}=Z(`SpotlightActionsList`,null,e),l=G1(),u=`mantine-${(0,q.useId)().replace(/:/g,``)}`,d=r||u;return(0,q.useEffect)(()=>(I1.setListId(d,l.store),()=>I1.setListId(``,l.store)),[]),(0,J.jsx)(nB.Autosize,{...l.getStyles(`actionsList`,{className:t,style:n,classNames:o,styles:s}),type:`scroll`,scrollbarSize:`var(--spotlight-actions-list-padding)`,offsetScrollbars:`y`,id:d,...c,children:i})});X1.classes=K1,X1.displayName=`@mantine/spotlight/SpotlightActionsList`;var Z1=Q(e=>{let{className:t,style:n,classNames:r,styles:i,...a}=Z(`SpotlightEmpty`,null,e);return(0,J.jsx)($,{...G1().getStyles(`empty`,{classNames:r,styles:i,className:t,style:n}),...a})});Z1.classes=K1,Z1.displayName=`@mantine/spotlight/SpotlightEmpty`;var Q1=Q(e=>{let{className:t,style:n,classNames:r,styles:i,...a}=Z(`SpotlightFooter`,null,e);return(0,J.jsx)($,{...G1().getStyles(`footer`,{className:t,classNames:r,style:n,styles:i}),...a})});Q1.classes=K1,Q1.displayName=`@mantine/spotlight/SpotlightFooter`;function $1(e,t){if(!e)return[];let n=()=>I1.open(t);return Array.isArray(e)?e.map(e=>[e,n]):[[e,n]]}var e0={size:600,yOffset:80,zIndex:qj(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:R1,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`,maxHeight:400},t0=Q(e=>{let t=Z(`SpotlightRoot`,e0,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,store:c,children:l,query:u,onQueryChange:d,transitionProps:f,clearQueryOnClose:p,shortcut:m,tagsToIgnore:h,triggerOnContentEditable:g,disabled:_,onSpotlightOpen:v,onSpotlightClose:y,forceOpened:b,closeOnActionTrigger:x,maxHeight:S,scrollable:C,attributes:w,...T}=t,{opened:E,query:D}=x1(c),O=typeof u==`string`?u:D,k=e=>{d?.(e),I1.setQuery(e,c)},A=rF({name:`Spotlight`,classes:K1,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w}),{resolvedClassNames:j,resolvedStyles:M}=UP({classNames:n,styles:a,props:t});return XM($1(m,c),h,g),vM(()=>{E?v?.():y?.()},[E]),_?null:(0,J.jsx)(W1,{value:{getStyles:A,query:O,setQuery:k,store:c,closeOnActionTrigger:x},children:(0,J.jsx)(Uq,{...T,withCloseButton:!1,opened:E||!!b,padding:0,onClose:()=>I1.close(c),className:r,style:i,classNames:j,styles:M,attributes:w,transitionProps:{...f,onExited:()=>{p&&k(``),I1.clearSpotlightState({clearQuery:p},c),f?.onExited?.()}},__vars:{"--spotlight-max-height":C?X(S):void 0},__staticSelector:`Spotlight`,"data-scrollable":C||void 0,children:l})})});t0.classes=K1,t0.displayName=`@mantine/spotlight/SpotlightRoot`;var n0={size:`lg`},r0=Q(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,vars:a,value:o,attributes:s,...c}=Z(`SpotlightSearch`,n0,e),l=G1(),u=l.getStyles(`search`),[d,f]=(0,q.useState)(!1),p=e=>{r?.(e),!d&&(e.nativeEvent.code===`ArrowDown`&&(e.preventDefault(),I1.selectNextAction(l.store)),e.nativeEvent.code===`ArrowUp`&&(e.preventDefault(),I1.selectPreviousAction(l.store)),(e.nativeEvent.code===`Enter`||e.nativeEvent.code===`NumpadEnter`)&&(e.preventDefault(),I1.triggerSelectedAction(l.store)))};return(0,J.jsx)(mU,{...u,classNames:[{input:u.className},t],styles:[{input:u.style},n],...c,value:o??l.query,onChange:e=>{l.setQuery(e.currentTarget.value),i?.(e)},onKeyDown:p,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});r0.classes=K1,r0.displayName=`@mantine/spotlight/SpotlightSearch`;function i0(e){return Array.isArray(e)?e.map(e=>e.trim()).join(`,`).toLowerCase().trim():typeof e==`string`?e.toLowerCase().trim():``}function a0(e){return e.reduce((e,t)=>`actions`in t?[...e,...t.actions.map(e=>({...e,group:t.group}))]:[...e,t],[])}function o0(e){let t={},n=[];return e.forEach(e=>{e.group?(t[e.group]||(t[e.group]={pushed:!1,data:{group:e.group,actions:[]}}),t[e.group].data.actions.push(e),t[e.group].pushed||(t[e.group].pushed=!0,n.push(t[e.group].data))):n.push(e)}),n}var s0=(e,t)=>{let n=e.trim().toLowerCase(),r=[[],[]];return a0(t).forEach(e=>{e.label?.toLowerCase().includes(n)?r[0].push(e):(e.description?.toLowerCase().includes(n)||i0(e.keywords).includes(n))&&r[1].push(e)}),o0(r.flat())};function c0(e,t){if(!Array.isArray(e))return[];let n=0;return e.reduce((e,r)=>{if(n>=t)return e;if(U1(r)){let i=c0(r.actions,t-n);e.push({group:r.group,actions:i}),n+=i.length}else e.push(r),n+=1;return e},[])}var l0={size:600,yOffset:80,limit:1/0,zIndex:qj(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:R1,filter:s0,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`},u0=Q(e=>{let{searchProps:t,filter:n,query:r,onQueryChange:i,actions:a,nothingFound:o,highlightQuery:s,limit:c,scrollAreaProps:l,...u}=Z(`Spotlight`,l0,e),[d,f]=zM({value:r,defaultValue:``,finalValue:``,onChange:i}),p=c0(n(d,a),c).map(e=>{if(U1(e)){let t=e.actions.map(({id:e,...t})=>(0,J.jsx)(J1,{highlightQuery:s,...t},e));return(0,J.jsx)(Y1,{label:e.group,children:t},e.group)}return(0,J.jsx)(J1,{highlightQuery:s,...e},e.id)});return(0,J.jsxs)(t0,{...u,query:d,onQueryChange:f,children:[(0,J.jsx)(r0,{...t}),p.length>0&&(0,J.jsx)(X1,{...l,children:p}),p.length===0&&o&&(0,J.jsx)(Z1,{children:o})]})});u0.classes=K1,u0.displayName=`@mantine/spotlight/Spotlight`,u0.Search=r0,u0.ActionsList=X1,u0.Action=J1,u0.Empty=Z1,u0.ActionsGroup=Y1,u0.Footer=Q1,u0.Root=t0,u0.open=z1.open,u0.close=z1.close,u0.toggle=z1.toggle;var d0=K.object({id:K.text({description:`Unique identifier for the user.`}),name:K.optional(K.text({description:`Full name of the user.`})),email:K.optional(K.text({description:`Email address of the user.`,format:`email`})),username:K.optional(K.text({description:`Preferred username of the user.`})),picture:K.optional(K.text({description:`URL to the user's profile picture.`})),sessionId:K.optional(K.text({description:`Session identifier for the user, if applicable.`})),organization:K.optional(K.uuid({description:`Organization the user belongs to.`})),roles:K.optional(K.array(K.text(),{description:`List of roles assigned to the user.`})),realm:K.optional(K.text({description:`The realm (issuer) the user was authenticated from.`}))}),f0=Tk({name:`alepha.security.user`,schema:K.optional(d0)});K.object({name:K.text({description:`Name of the permission.`}),group:K.optional(K.text({description:`Group of the permission.`})),description:K.optional(K.text({description:`Describe the permission.`})),method:K.optional(K.text({description:`HTTP method of the permission. When available.`})),path:K.optional(K.text({description:`Pathname of the permission. When available.`}))}),K.object({name:K.text({description:`Name of the role.`}),description:K.optional(K.text({description:`Describe the role.`})),default:K.optional(K.boolean({description:`If true, this role will be assigned to all users by default.`})),permissions:K.array(K.object({name:K.text({description:`Name of the permission.`}),ownership:K.optional(K.boolean({description:`If true, user will only have access to it's own resources.`})),exclude:K.optional(K.array(K.text(),{description:`Exclude some permissions. Useful when 'name' is a wildcard.`}))}))}),C({name:`alepha.security`});var p0=e=>{let t=e.shortcut??`mod+K`,n=e.searchPlaceholder??`Search...`,r=e.nothingFound??`Nothing found...`,i=B$(),[a]=nj(f0);return(0,J.jsx)(u0,{actions:(0,q.useMemo)(()=>i.concretePages.filter(e=>!(e.can&&!e.can())).map(e=>({id:e.name,label:e.label??e.name,description:e.description,onClick:()=>e.staticName?i.push(e.staticName,{params:e.params}):i.push(e.name),leftSection:B0(e.icon)})),[a]),shortcut:t,limit:10,searchProps:{leftSection:(0,J.jsx)(e$,{size:h0.sizes.icon.md}),placeholder:n},nothingFound:r})},m0=e=>{let t=y1(),[n]=v1();tj({"react:transition:begin":()=>{s1.start()},"react:transition:end":()=>{s1.complete()},"react:action:error":({error:e,type:n})=>{n===`transition`||e instanceof aj||e instanceof xk||t.danger({title:e.name||`Error`,message:e.message??`An error occurred while processing your action.`})}},[]);let r=e.mantine?.defaultColorScheme??n.defaultColorScheme;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(hP,{defaultColorScheme:r,...e.colorSchemeScript}),(0,J.jsxs)(VP,{...e.mantine,defaultColorScheme:r,theme:{...n,...e.mantine?.theme},children:[(0,J.jsx)(CQ,{...e.notifications}),(0,J.jsx)(_1,{...e.navigationProgress}),(0,J.jsxs)(EZ,{...e.modals,children:[e.omnibar!==!1&&(0,J.jsx)(p0,{...e.omnibar}),e.children??(0,J.jsx)(E$,{})]})]})]})},h0={colors:{transparent:`transparent`,background:`var(--alepha-ground)`,surface:`var(--alepha-surface)`,elevated:`var(--alepha-elevated)`,border:`var(--alepha-border)`},sizes:{icon:{xs:16,sm:20,md:24,lg:28,xl:32}}};function g0(e){return(0,q.isValidElement)(e)?!1:typeof e==`function`||typeof e==`object`&&!!e&&`$$typeof`in e}var _0=e=>{let t=EP(),n={...e};n.variant;let{tooltip:r,menu:i,icon:a,iconSize:o,...s}=n;if(n.intent&&(n.intent===`primary`?s.color??=t.primaryColor:n.intent===`success`?(s.c??=`white`,s.color??=`green`):n.intent===`danger`?(s.c??=`white`,s.color??=`red`):n.intent===`warning`?s.color??=`yellow`:n.intent===`info`&&(s.c??=`white`,s.color??=`blue`)),n.icon){let e=h0.sizes.icon,t=n.iconSize??e[n.size||`sm`],r=g0(n.icon)?(0,J.jsx)(n.icon,{size:t}):(0,J.jsx)(`span`,{children:n.icon});n.children?s.leftSection=r:(s.children=q.Children.only(r),s.p??=8)}if(n.leftSection&&!n.children&&(s.px??=`xs`),n.textVisibleFrom){let{children:e,textVisibleFrom:t,leftSection:n,...a}=s;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(bU,{w:`100%`,visibleFrom:t,children:(0,J.jsx)(_0,{flex:1,...a,leftSection:n,tooltip:r,menu:i,children:e})}),(0,J.jsx)(bU,{w:`100%`,hiddenFrom:t,children:(0,J.jsx)(_0,{px:`xs`,...a,"aria-label":typeof e==`string`?e:void 0,tooltip:r,menu:i,children:n})})]})}let c=`href`in s&&s.href?s.href.startsWith(`http`)||s.target?(0,J.jsx)(C0,{...s,href:s.href,children:s.children}):(0,J.jsx)(S0,{...s,href:s.href,children:s.children}):(delete s.classNameActive,delete s.variantActive,delete s.propsActive,`action`in s&&s.action?(0,J.jsx)(b0,{...s,action:s.action,children:s.children}):`onClick`in s&&s.onClick?(0,J.jsx)(x0,{...s,onClick:s.onClick,children:s.children}):`form`in s&&s.form?s.type===`reset`?(0,J.jsx)(y0,{...s,form:s.form,children:s.children}):(0,J.jsx)(v0,{...s,form:s.form,children:s.children}):(0,J.jsx)(pG,{...s,children:s.children}));if(i&&(c=(0,J.jsxs)(Dq,{position:i.position||`bottom-start`,width:i.width||200,shadow:i.shadow||`md`,trigger:i.on===`hover`?`hover`:`click`,...i.menuProps,children:[(0,J.jsx)(Dq.Target,{...i.targetProps,children:c}),(0,J.jsx)(Dq.Dropdown,{children:i.items.map((e,t)=>(0,J.jsx)(w0,{item:e,index:t},t))})]})),r){let e={openDelay:1e3};return(0,J.jsx)(XY,{...typeof r==`string`||typeof r==`number`?{...e,label:r,children:c}:{...e,...r,children:c}})}return c},v0=e=>{let{form:t,...n}=e,r=ij(t);return(0,J.jsx)(pG,{...n,form:t.id,loading:r.loading,disabled:r.loading,type:`submit`,children:e.children})},y0=e=>{let{form:t,...n}=e,r=ij(t);return(0,J.jsx)(pG,{...n,disabled:r.loading,type:`reset`,children:e.children})},b0=e=>{let{action:t,...n}=e;return(0,J.jsx)(pG,{...n,disabled:t.loading||e.disabled,loading:t.loading,onClick:()=>t.run(),children:e.children})},x0=({preventDefault:e,...t})=>{let n=_A({handler:async n=>{e&&n.preventDefault(),await t.onClick(n)}},[t.onClick,e]);return(0,J.jsx)(pG,{...t,disabled:n.loading||t.disabled,loading:n.loading,onClick:n.run,children:t.children})},S0=e=>{let{active:t,classNameActive:n,variantActive:r,propsActive:i,routerGoOptions:a,onClick:o,anchorProps:s,anchor:c,...l}=e,u=B$(),{isPending:d,isActive:f}=H$(t?{href:e.href,...t}:{href:e.href}),p=u.anchor(e.href,a);i&&f&&Object.assign(l,i);let m=e=>{o?.(e),p.onClick?.(e)},h=l.className||``;return f&&t!==!1&&n&&(l.className=`${h} ${n}`.trim()),s||c?(0,J.jsx)(PU,{component:`a`,...p,...l,...s,onClick:m,children:e.children}):(0,J.jsx)(pG,{component:`a`,loading:d,...l,...p,onClick:m,variant:f&&t!==!1?r??`filled`:l.variant??`subtle`,children:e.children})},C0=e=>{let{active:t,classNameActive:n,variantActive:r,propsActive:i,routerGoOptions:a,target:o,...s}=e;return(0,J.jsx)(pG,{component:`a`,target:o,...s,children:e.children})},w0=e=>{let{item:t,index:n}=e,r=B$(),i=_A({handler:async e=>{await t.onClick?.()}},[t.onClick]);if(t.type===`divider`)return(0,J.jsx)(Dq.Divider,{},n);if(t.type===`label`)return(0,J.jsx)(Dq.Label,{children:t.label},n);if(t.children&&t.children.length>0)return(0,J.jsxs)(Dq,{trigger:`hover`,position:`right-start`,offset:2,children:[(0,J.jsx)(Dq.Target,{children:(0,J.jsx)(Dq.Item,{leftSection:t.icon,rightSection:(0,J.jsx)(MQ,{size:14}),children:t.label})}),(0,J.jsx)(Dq.Dropdown,{children:t.children.map((e,t)=>(0,J.jsx)(w0,{item:e,index:t},t))})]},n);let a={};return e.item.onClick?a.onClick=i.run:e.item.href&&Object.assign(a,r.anchor(e.item.href)),(0,J.jsx)(Dq.Item,{leftSection:t.icon??(t.active?(0,J.jsx)(AQ,{size:h0.sizes.icon.sm}):(0,J.jsx)(bU,{w:h0.sizes.icon.sm})),onClick:t.onClick,color:t.color,...a,children:t.label},n)},T0=e=>{let[t,n]=nj(wj);return(0,J.jsx)(iG,{opened:!t.closed,onClick:()=>n({...t,closed:!t.closed}),hiddenFrom:`md`,size:`sm`,...e})},E0=e=>{let{setColorScheme:t}=dP(),n=()=>{t((document.documentElement.getAttribute(`data-mantine-color-scheme`)??`light`)===`dark`?`light`:`dark`)},r=e.size??`sm`,i=h0.sizes.icon[r]??h0.sizes.icon.sm;return(0,J.jsx)(_0,{onClick:n,variant:e.variant??`default`,size:r,"aria-label":`Toggle color scheme`,icon:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(r$,{size:i,className:`alepha-light-hidden`}),(0,J.jsx)(XQ,{size:i,className:`alepha-dark-hidden`})]}),...e})},D0=e=>{let t=Sj();return(0,J.jsx)(_0,{variant:`default`,icon:UQ,menu:{items:t.languages.map(e=>({label:t.tr(e),onClick:()=>t.setLang(e),active:t.lang===e}))},...e})},O0=e=>{let t=iN(),n=t===`macos`||t===`ios`?`⌘`:`Ctrl`;return e.collapsed?(0,J.jsx)(_0,{variant:`subtle`,onClick:z1.open,icon:e$,tooltip:{label:`Search`,position:`right`},...e.actionProps}):(0,J.jsx)(_0,{variant:`default`,onClick:z1.open,justify:`space-between`,rightSection:(0,J.jsxs)(uq,{visibleFrom:`sm`,size:`sm`,children:[(0,J.jsx)(Kk,{children:n}),`+K`]}),radius:`md`,...e.actionProps,children:(0,J.jsxs)(bU,{align:`center`,gap:`xs`,children:[(0,J.jsx)(e$,{size:16,color:`gray`}),(0,J.jsx)(bU,{visibleFrom:`sm`,miw:192,children:(0,J.jsx)(jU,{size:`xs`,c:`dimmed`,children:`Search...`})})]})})},k0=()=>gA(AZ),A0=[`red`,`pink`,`grape`,`violet`,`indigo`,`blue`,`cyan`,`teal`,`green`,`lime`,`yellow`,`orange`],j0=[{label:`xs`,value:`xs`},{label:`sm`,value:`sm`},{label:`md`,value:`md`},{label:`lg`,value:`lg`},{label:`xl`,value:`xl`}],M0=[{label:`xs`,value:`xs`},{label:`sm`,value:`sm`},{label:`md`,value:`md`},{label:`lg`,value:`lg`},{label:`xl`,value:`xl`}],N0=[{label:`System`,value:``},{label:`Inter`,value:`Inter, sans-serif`},{label:`Mono`,value:`ui-monospace, SFMono-Regular, Menlo, monospace`},{label:`Serif`,value:`Georgia, 'Times New Roman', serif`}],P0=()=>{let[,,e]=v1(),t=k0(),n=EP(),{overrides:r,setOverrides:i}=e,a=r.primaryColor||n.primaryColor,o=r.radius||n.defaultRadius||`md`,s=r.fontFamily||``,c=r.fontSize||`md`,l=r.scale||`md`,u=e=>{i({...r,...e})};return(0,J.jsxs)(bU,{direction:`column`,gap:`lg`,children:[(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(jU,{fw:500,size:`sm`,children:`Primary Color`}),(0,J.jsx)(dX,{cols:6,spacing:`xs`,children:A0.map(e=>(0,J.jsx)(bU,{justify:`center`,children:(0,J.jsx)(wG,{color:n.colors[e]?.[6]??e,onClick:()=>u({primaryColor:e}),style:{cursor:`pointer`},size:32,children:a===e&&(0,J.jsx)(AQ,{size:14,color:`white`})})},e))})]}),(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(jU,{fw:500,size:`sm`,children:`Border Radius`}),(0,J.jsx)(bU,{gap:`xs`,children:j0.map(e=>(0,J.jsx)(_0,{variant:String(o)===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({radius:e.value}),children:e.label},e.value))})]}),(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(jU,{fw:500,size:`sm`,children:`Font Family`}),(0,J.jsx)(nX,{data:N0,value:s,onChange:e=>u({fontFamily:e??``}),allowDeselect:!1})]}),(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(jU,{fw:500,size:`sm`,children:`Font Size`}),(0,J.jsx)(bU,{gap:`xs`,children:M0.map(e=>(0,J.jsx)(_0,{variant:c===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({fontSize:e.value}),children:e.label},e.value))})]}),(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(jU,{fw:500,size:`sm`,children:`Scale`}),(0,J.jsx)(bU,{gap:`xs`,children:M0.map(e=>(0,J.jsx)(_0,{variant:l===e.value?`filled`:`default`,size:`xs`,flex:1,onClick:()=>u({scale:e.value}),children:e.label},e.value))})]}),(0,J.jsxs)(bU,{justify:`space-between`,children:[(0,J.jsx)(_0,{variant:`subtle`,color:`red`,onClick:()=>e.resetOverrides(),children:`Reset`}),(0,J.jsx)(_0,{variant:`default`,px:`xl`,onClick:()=>t.close(),children:`OK`})]})]})},F0=e=>{let{expert:t,...n}=e,[r,i]=v1(),a=nj(hZ)[0],o=k0(),s=a.map((e,t)=>({label:e.name,onClick:()=>i({index:t}),active:r.name===e.name}));return t&&s.push({type:`divider`},{label:`Customize...`,onClick:()=>{o.open({title:`Customize Theme`,content:(0,J.jsx)(P0,{})})}}),(0,J.jsx)(_0,{variant:`default`,icon:ZQ,menu:{items:s},...n})},I0=e=>{let[t,n]=nj(wj);return(0,J.jsx)(_0,{icon:t.collapsed?GQ:WQ,visibleFrom:`md`,variant:`default`,onClick:()=>{n({...t,collapsed:!t.collapsed})},tooltip:{position:`right`,label:t.collapsed?`Show sidebar`:`Hide sidebar`},...e})},L0=(0,q.forwardRef)((e,t)=>{let{fill:n,center:r,centerX:i,centerY:a,col:o,ground:s,surface:c,elevated:l,rounded:u,bordered:d,borderedTop:f,borderedBottom:p,shadowed:m,overflow:h,form:g,..._}=e;if(n&&(_.flex??=1),o&&(_.direction??=`column`),r&&(_.align??=`center`,_.justify??=`center`),i&&(_.justify??=`center`),a&&(_.align??=`center`),s?_.bg=`var(--alepha-ground)`:c?_.bg=`var(--alepha-surface)`:l&&(_.bg=`var(--alepha-elevated)`),u&&(_.bdrs=u===!0?`md`:u),d&&(_.bd=`1px solid var(--alepha-border)`),f&&(_.style={borderTop:`1px solid var(--alepha-border)`,..._.style??{}}),p&&(_.style={borderBottom:`1px solid var(--alepha-border)`,..._.style??{}}),m&&(_.className=`${_.className??``} shadow-${m===!0?`md`:m}`.trim()),h&&(_.className=`${_.className??``} overflow-auto`.trim()),g){let e=typeof g==`object`?g:{};return e instanceof sj&&(e=e.props),(0,J.jsx)(bU,{ref:t,component:`form`,...e,..._})}return(0,J.jsx)(bU,{ref:t,..._})});L0.displayName=`Flex`;var R0=e=>{let{items:t=[]}=e,n=B$(),r=(e,t)=>{if(e.can&&!e.can())return null;if(`type`in e){if(e.type===`burger`)return(0,J.jsx)(T0,{},t);if(e.type===`dark`)return(0,J.jsx)(E0,{...e.props},t);if(e.type===`theme`)return(0,J.jsx)(F0,{...e.props},t);if(e.type===`search`)return(0,J.jsx)(O0,{...e.props},t);if(e.type===`lang`)return(0,J.jsx)(D0,{...e.props},t);if(e.type===`spacer`)return(0,J.jsx)(L0,{w:16},t);if(e.type===`divider`)return(0,J.jsx)(yK,{orientation:`vertical`},t);if(e.type===`logo`)return i(e,t);if(e.type===`back`)return a(e,t)}return`element`in e?e.element:null},i=(e,t)=>{let{src:n,text:r,icon:i,href:a,height:o=32,width:s,fontWeight:c=700,fontSize:l=`lg`}=e.props??{},u=n?(0,J.jsx)(QK,{src:n,h:o,w:s,fit:`contain`}):i?typeof i==`function`?(0,J.jsx)(i,{}):i:r?(0,J.jsx)(H0,{fw:c,size:l,children:r}):null;return a?(0,J.jsx)(PU,{component:V$,href:a,underline:`never`,c:`inherit`,children:u},t):(0,J.jsx)(L0,{children:u},t)},a=(e,t)=>{let{label:r=`Back`,iconOnly:i=!0,href:a,icon:o}=e.props??{},s=o?typeof o==`function`?(0,J.jsx)(o,{size:18}):o:(0,J.jsx)(DQ,{size:18}),c=()=>{a?n.push(a):n.back()};return i?(0,J.jsx)(_0,{icon:s,variant:`subtle`,color:`gray`,onClick:c,tooltip:{label:r,position:`bottom`}},t):(0,J.jsx)(_0,{leftSection:s,variant:`subtle`,color:`gray`,onClick:c,children:r},t)},o=t.filter(e=>e.position===`left`),s=t.filter(e=>e.position===`center`),c=t.filter(e=>e.position===`right`),l=(0,J.jsxs)(L0,{h:`100%`,align:`center`,px:e.container?0:`md`,justify:`space-between`,...e.flexProps,children:[(0,J.jsx)(L0,{flex:1,children:o.map((e,t)=>(0,J.jsx)(L0,{ml:t===0?0:`md`,align:`center`,children:r(e,t)},t))}),(0,J.jsx)(L0,{children:s.map((e,t)=>(0,J.jsx)(L0,{mx:`md`,align:`center`,children:r(e,t)},t))}),(0,J.jsx)(L0,{flex:1,align:`center`,justify:`end`,children:c.map((e,t)=>(0,J.jsx)(L0,{ml:t===0?0:`md`,align:`center`,children:r(e,t)},t))})]});return e.container?(0,J.jsx)(hK,{h:`100%`,...typeof e.container==`boolean`?{}:e.container,children:l}):l},z0=(0,q.forwardRef)((e,t)=>(0,J.jsx)(hK,{ref:t,...e}));z0.displayName=`Container`;var B0=(e,t)=>e?(0,q.isValidElement)(e)?e:g0(e)?(0,J.jsx)(e,{size:t??h0.sizes.icon.md}):e:null,V0={primary:`blue`,info:`cyan`,success:`green`,warning:`yellow`,danger:`red`},H0=(0,q.forwardRef)((e,t)=>{let{intent:n,bold:r,italic:i,light:a,muted:o,small:s,uppercase:c,capitalize:l,center:u,monospace:d,title:f,...p}=e;return n&&(p.c??=V0[n]),r&&(p.fw??=700),a&&(p.fw??=300),i&&(p.fs??=`italic`),o&&(p.c??=`dimmed`),s&&(p.size??=`xs`),c&&(p.tt??=`uppercase`),l&&(p.tt??=`capitalize`),u&&(p.ta??=`center`),d&&(p.ff??=`monospace`),f&&(p.size??=`xl`),(0,J.jsx)(jU,{ref:t,...p})});H0.displayName=`Text`;var U0=e=>{let t=B$(),n=()=>{e.onItemClick?.(e.item),e.item.onClick?.()},r=e.item.children&&e.item.children.length>0,i=r?{on:`hover`,position:`right`,menuProps:{arrowPosition:`center`,arrowSize:10,withArrow:!0},items:[{type:`label`,label:e.item.label},...e.item.children.filter(e=>!e.can||e.can()).map(e=>({label:e.label,icon:B0(e.icon,h0.sizes.icon.sm),href:e.href,active:e.href?t.isActive(e.href,{startWith:e.activeStartsWith}):void 0}))]}:void 0;return(0,J.jsx)(L0,{w:`100%`,justify:`center`,pos:`relative`,children:(0,J.jsx)(_0,{size:e.item.theme?.size??e.theme.button?.size??(e.level===0?`sm`:`xs`),bd:0,variant:`default`,propsActive:{variant:`outline`},tooltip:r?void 0:{label:e.item.label,position:`right`},onClick:r?void 0:n,icon:B0(e.item.icon,h0.sizes.icon.sm)??(0,J.jsx)(n$,{size:h0.sizes.icon.sm}),href:r?void 0:e.item.href,target:r?void 0:e.item.target,menu:i,...e.item.actionProps})})},W0=e=>{let t=B$(),n=(0,q.useCallback)(e=>{if(!e.children)return!1;for(let r of e.children)if(r.href&&t.isActive(r.href)||n(r))return!0;return!1},[]),[r,i]=(0,q.useState)(n(e.item));return tj({"react:transition:end":()=>{n(e.item)&&i(!0)}},[]),e.level>2?null:(0,J.jsxs)(L0,{direction:`column`,ps:e.level===0?0:32,pos:`relative`,children:[(0,J.jsx)(_0,{w:`100%`,justify:`space-between`,href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(e.level===0?`sm`:`xs`),bd:0,fw:`normal`,variant:`default`,propsActive:{variant:`outline`},radius:e.item.theme?.radius??e.theme.button?.radius??`md`,onClick:t=>{e.item.target||t.preventDefault(),e.item.children&&e.item.children.length>0?i(!r):(e.onItemClick?.(e.item),e.item.onClick?.())},leftSection:(0,J.jsxs)(L0,{w:`100%`,align:`center`,gap:`sm`,children:[B0(e.item.icon,h0.sizes.icon.sm),(0,J.jsx)(L0,{direction:`column`,children:(0,J.jsx)(L0,{children:e.item.label})})]}),rightSection:e.item.children?(0,J.jsx)(L0,{children:r?(0,J.jsx)(jQ,{size:14}):(0,J.jsx)(MQ,{size:14})}):e.item.rightSection,...e.item.actionProps}),e.item.children&&r&&(0,J.jsxs)(L0,{direction:`column`,"data-parent-level":e.level,gap:2,py:2,children:[(0,J.jsx)(L0,{style:{position:`absolute`,width:1,background:`linear-gradient(to bottom, transparent, var(--mantine-color-default-border), transparent)`,top:48,left:20+32*e.level,bottom:16}}),e.item.children.filter(e=>!e.can||e.can()).map((t,n)=>(0,J.jsx)(W0,{item:t,level:e.level+1,onItemClick:e.onItemClick,theme:e.theme},n))]})]})},G0=e=>{let t=B$(),n=(e,t,n)=>(0,J.jsx)(L0,{h:1,bg:`var(--mantine-color-default-border)`,my:`xs`,mx:t?`calc(-1 * var(--mantine-spacing-md))`:n?0:`sm`},e),r=(t,i,a)=>{if(`type`in t){if(t.type===`spacer`)return a?null:(0,J.jsx)(L0,{h:16},i);if(t.type===`divider`)return n(i,t.fill,a);if(t.type===`search`)return(0,J.jsx)(L0,{mb:`xs`,w:`100%`,justify:`center`,pos:`relative`,children:(0,J.jsx)(O0,{collapsed:a})},i);if(t.type===`toggle`)return(0,J.jsx)(I0,{},i);if(t.type===`section`)return t.children&&t.children.length>0&&!t.children.some(e=>!(`can`in e)||!e.can||e.can())?null:a?(0,J.jsx)(q.Fragment,{children:t.children?.map((e,t)=>r(e,`s${i}-${t}`,a))},i):(0,J.jsxs)(q.Fragment,{children:[(0,J.jsxs)(L0,{mt:`md`,align:`center`,gap:`xs`,children:[B0(t.icon,h0.sizes.icon.sm),(0,J.jsx)(H0,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:`bold`,children:t.label})]}),t.children?.map((e,t)=>r(e,`s${i}-${t}`,a))]},i)}return`element`in t?(0,J.jsx)(q.Fragment,{children:t.element},i):t.can&&!t.can()||t.children&&t.children.length>0&&!t.children.some(e=>!e.can||e.can())?null:a?(0,J.jsx)(U0,{item:t,level:0,onItemClick:e.onItemClick,theme:e.theme??{}},i):(0,J.jsx)(W0,{item:t,level:0,onItemClick:e.onItemClick,theme:e.theme??{}},i)},i=()=>{if(e.items)return e.items;if(e.autoPopulateMenu){let n=t.concretePages.filter(e=>!e.can||e.can()).map(e=>({label:e.label??e.name,icon:B0(e.icon),href:t.path(e.name)}));if(typeof e.autoPopulateMenu==`object`&&e.autoPopulateMenu.startsWith){let t=e.autoPopulateMenu.startsWith;return n.filter(e=>e.href?.startsWith(t))}return n}return[]},a=e.items?e.gap??8:`xs`,o=(0,q.useMemo)(()=>i(),[e.items,e.autoPopulateMenu]),s=t=>(0,J.jsxs)(L0,{flex:1,py:`md`,direction:`column`,...e.flexProps,children:[(0,J.jsx)(L0,{gap:a,px:`md`,direction:`column`,children:o.filter(e=>e.position===`top`).map((e,n)=>r(e,n,t))}),(0,J.jsx)(L0,{gap:a,px:`md`,direction:`column`,flex:1,children:o.filter(e=>!e.position).map((e,n)=>r(e,n,t))}),(0,J.jsx)(L0,{gap:a,px:`md`,direction:`column`,children:o.filter(e=>e.position===`bottom`).map((e,n)=>r(e,n,t))})]});return e.collapsed?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(L0,{flex:1,direction:`column`,visibleFrom:`md`,children:s(!0)}),(0,J.jsx)(L0,{flex:1,direction:`column`,hiddenFrom:`md`,children:s(!1)})]}):s(!1)},K0=e=>{let t=B$(),[n,r]=nj(wj),i=e.sidebarProps?.collapsed===void 0?n.collapsed:e.sidebarProps.collapsed,{collapsedWidth:a,expandedWidth:o}=n,s=()=>{if(e.noSidebarWhen?.paths){for(let n of e.noSidebarWhen.paths)if(t.isActive(n,{startWith:!0}))return!1}return!0},[c,l]=(0,q.useState)(s());tj({"react:transition:end":()=>{l(s())},"react:transition:begin":()=>{r({...n,closed:!0})}},[n]);let u=[{position:`left`,type:`burger`}],d={...e.appBarProps};d.container??=e.container;let f=c&&e.sidebarProps!==void 0,p=e.appBarProps||e.header,m=e.footer;e.footerHeight&&(m??=(0,J.jsx)(L0,{h:e.footerHeight}));let h=e.headerHeight??60,g=e.footerHeight??24,_=p?h:0,v=m?g:0,y=i?a:o,b=e.children??(0,J.jsx)(E$,{});return(0,J.jsxs)(iW,{layout:`alt`,w:`100%`,h:`100vh`,flex:1,header:p?{height:h}:void 0,navbar:f?{width:{base:y},breakpoint:`md`,collapsed:{mobile:n.closed}}:void 0,footer:m?{height:g}:void 0,...e.appShellProps,children:[p&&(0,J.jsx)(iW.Header,{...e.appShellHeaderProps,children:e.header??(0,J.jsx)(R0,{items:u,...d})}),f&&(0,J.jsxs)(iW.Navbar,{...e.appShellNavbarProps,children:[e.navbarHeader?(0,J.jsx)(L0,{style:{borderBottom:`1px solid var(--mantine-color-default-border)`},h:_,children:e.navbarHeader({collapsed:i})}):null,(0,J.jsx)(G0,{...e.sidebarProps??{},collapsed:i}),e.navbarFooter?(0,J.jsx)(L0,{style:{borderTop:`1px solid var(--mantine-color-default-border)`},h:v,children:e.navbarFooter}):null]}),(0,J.jsx)(iW.Main,{display:`flex`,bg:`var(--alepha-ground)`,pos:`relative`,h:e.fill?`100%`:`inherit`,...e.appShellMainProps,children:e.container?(0,J.jsx)(z0,{...typeof e.container==`boolean`?{}:e.container,children:b}):b}),m&&(0,J.jsx)(iW.Footer,{...e.appShellFooterProps,children:m})]})};h0.sizes.icon.xs,h0.sizes.icon.sm,h0.sizes.icon.md;var q0=(e,t)=>{let n=e.input.props.id,r=e.label??(`title`in e.input.schema&&typeof e.input.schema.title==`string`?e.input.schema.title:void 0)??o6(e.input.path),i=e.description??(`description`in e.input.schema&&typeof e.input.schema.description==`string`?e.input.schema.description:void 0),a=t.error&&t.error instanceof xk?t.error.value.message:void 0,o=e.icon?(0,q.isValidElement)(e.icon)?e.icon:(0,q.createElement)(e.icon,{size:h0.sizes.icon.sm}):i6({type:e.input.schema&&`type`in e.input.schema?String(e.input.schema.type):void 0,format:e.input.schema&&`format`in e.input.schema&&typeof e.input.schema.format==`string`?e.input.schema.format:void 0,name:e.input.props.name,isEnum:e.input.schema&&`enum`in e.input.schema&&!!e.input.schema.enum,isArray:e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`array`,size:e.size}),s=e.input.schema&&`format`in e.input.schema&&typeof e.input.schema.format==`string`?e.input.schema.format:void 0,c=e.input.required,l=e.input.schema,u=e.input.props?.[`data-testid`],d={label:r,description:i,error:a,required:c,disabled:!1,...u?{"data-testid":u}:{}};return`minLength`in l&&typeof l.minLength==`number`&&(d.minLength=l.minLength),`maxLength`in l&&typeof l.maxLength==`number`&&(d.maxLength=l.maxLength),`minimum`in l&&typeof l.minimum==`number`&&(d.minimum=l.minimum),`maximum`in l&&typeof l.maximum==`number`&&(d.maximum=l.maximum),{id:n,icon:o,format:s,schema:e.input.schema,inputProps:d}},J0=e=>{let t=hA(),n=(0,q.useRef)(0),[r,i]=(0,q.useState)(()=>{let t=e?.initialValue;return Array.isArray(t)?t.map(e=>({key:n.current++,value:e})):[]}),a=(0,q.useCallback)(e=>{if(!Array.isArray(e)){i([]);return}i(t=>t.length===e.length&&t.every((t,n)=>t.value===e[n])?t:(n.current=0,e.map(e=>({key:n.current++,value:e}))))},[]);return(0,q.useEffect)(()=>{if(!e?.form)return;let n=e.form.id,r=e.path;return t.events.on(`form:change`,e=>{e.id===n&&e.path===r&&a(e.value)})},[t,e,a]),{items:r,setItems:(0,q.useCallback)(t=>{i(t),e?.set(t.map(e=>e.value))},[e]),nextKey:(0,q.useCallback)(()=>n.current++,[])}},Y0=(e,t,n,r,i,a)=>({schema:t,path:`${e.path}/${n}`,required:!1,form:e.form,initialValue:i,props:{id:`${e.props.id}-${n}`,name:`${e.props.name}[${n}]`},set:a}),X0=(e,t,n,r,i,a,o)=>({schema:t.properties[n],path:`${e.path}/${r}/${n}`,required:t.required?.includes(n)??!1,form:e.form,initialValue:a?.[n],props:{id:`${e.props.id}-${r}-${n}`,name:`${e.props.name}[${r}].${n}`},set:e=>o(n,e)}),Z0=e=>{let{inputProps:t}=q0(e,{}),{items:n,setItems:r,nextKey:i}=J0(e.input);if(!e.input?.props)return null;let a=e.input.schema;if(!a||!(`items`in a))return null;let o=a.items,s=o&&`properties`in o,{min:c=0,max:l=1/0,columns:u=1}=e,d=()=>{if(n.length>=l)return;let e;if(s){e={};let t=o;for(let[n,r]of Object.entries(t.properties))`default`in r&&(e[n]=r.default)}else e=``;r([...n,{key:i(),value:e}])},f=e=>{n.length<=c||r(n.filter((t,n)=>n!==e))},p=(e,t)=>{let i=[...n];i[e]={...i[e],value:t},r(i)},m=(e,t,i)=>{let a=[...n];a[e]={...a[e],value:{...a[e].value,[t]:i}},r(a)},h=12/u,g=s?o:null,_=g?Object.keys(g.properties):[],v=()=>(0,J.jsxs)(bU,{direction:`column`,gap:`sm`,children:[n.map((t,r)=>(0,J.jsxs)(bU,{gap:`sm`,align:`flex-start`,p:`xs`,bg:h0.colors.surface,style:{borderRadius:`var(--mantine-radius-sm)`},children:[e.sortable&&(0,J.jsx)(dV,{variant:`subtle`,color:`gray`,style:{cursor:`grab`},children:(0,J.jsx)(RQ,{size:16})}),g?(0,J.jsx)(BK,{style:{flex:1},gap:`sm`,children:_.map(n=>{let i=e.controlProps?.[n]??{},a=X0(e.input,g,n,r,t.key,t.value,(e,t)=>m(r,e,t));return(0,J.jsx)(BK.Col,{span:h,children:(0,J.jsx)(G3,{input:a,...i})},n)})}):(0,J.jsx)(bU,{style:{flex:1},children:(0,J.jsx)(G3,{input:Y0(e.input,o,r,t.key,t.value,e=>p(r,e)),...e.itemControlProps})}),(0,J.jsx)(dV,{variant:`subtle`,color:`red`,onClick:()=>f(r),disabled:n.length<=c,children:(0,J.jsx)(a$,{size:16})})]},t.key)),(0,J.jsxs)(oB,{onClick:d,disabled:n.length>=l,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:6,padding:`8px 12px`,borderRadius:`var(--mantine-radius-sm)`,border:`1px dashed var(--mantine-color-dimmed)`,color:`var(--mantine-color-dimmed)`,fontSize:`var(--mantine-font-size-sm)`,cursor:n.length>=l?`not-allowed`:`pointer`,opacity:n.length>=l?.5:1,transition:`all 150ms ease`},onMouseEnter:e=>{n.length<l&&(e.currentTarget.style.borderColor=`var(--mantine-color-blue-filled)`,e.currentTarget.style.color=`var(--mantine-color-blue-filled)`,e.currentTarget.style.background=`var(--mantine-color-blue-light)`)},onMouseLeave:e=>{e.currentTarget.style.borderColor=`var(--mantine-color-dimmed)`,e.currentTarget.style.color=`var(--mantine-color-dimmed)`,e.currentTarget.style.background=`transparent`},children:[(0,J.jsx)($Q,{size:14}),e.addLabel??`Add`]})]});return e.variant===`plain`?(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[t.label&&(0,J.jsx)(jU,{size:`sm`,fw:500,children:t.label}),t.description&&(0,J.jsx)(jU,{size:`sm`,c:`dimmed`,children:t.description}),v(),t.error&&(0,J.jsx)(jU,{size:`sm`,c:`red`,children:t.error})]}):(0,J.jsx)(CK,{legend:t.label,children:(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[t.description&&(0,J.jsx)(jU,{size:`sm`,c:`dimmed`,children:t.description}),v(),t.error&&(0,J.jsx)(jU,{size:`sm`,c:`red`,children:t.error})]})})};function Q0({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:i}){switch(e){case`up`:return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=i[t-1][i[t-1].length-1]-1?i[t-1].length-1:i[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case`down`:return n===i[t].length-1||n===i[t].length-2&&r>=i[t][i[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case`left`:return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:i[t-1].length-1,cellIndex:i[t-1][i[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:i[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case`right`:return n===i[t].length-1&&r===i[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===i[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function $0({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=Q0({direction:t,size:a,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;let s=e.current?.[o.levelIndex]?.[o.rowIndex]?.[o.cellIndex];s&&(s.disabled||s.getAttribute(`data-hidden`)||s.getAttribute(`data-outside`)?$0({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function e2(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function t2(e){return e.current?.map(e=>e.map(e=>e.length))}function n2({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=e2(i.key);a&&(i.preventDefault(),$0({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:t2(e)}))}function r2(e,t){let n=e?(0,Y.default)(e):(0,Y.default)();if(t===``)return n.format(`YYYY-MM-DD HH:mm:ss`);let[r,i,a=0]=t.split(`:`).map(Number);return n=n.set(`hour`,r),n=n.set(`minute`,i),n=n.set(`second`,a),n=n.set(`millisecond`,0),n.format(`YYYY-MM-DD HH:mm:ss`)}function i2(e){return e==null||e===``?e:(0,Y.default)(e).format(`YYYY-MM-DD`)}function a2(e){return e==null||e===``?e:(0,Y.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function o2({minDate:e,maxDate:t}){let n=(0,Y.default)();return!e&&!t?i2(n):e&&(0,Y.default)(n).isBefore(e)?i2(e):t&&(0,Y.default)(n).isAfter(t)?i2(t):i2(n)}function s2(e,t,n){return!e&&!t?a2(n):e&&(0,Y.default)(n).isBefore(e)?a2(e):t&&(0,Y.default)(n).isAfter(t)?a2(t):a2(n)}var c2=(0,q.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function l2(){let e=(0,q.use)(c2),t=(0,q.useCallback)(t=>t||e.locale,[e.locale]),n=(0,q.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,q.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,q.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function u2({value:e,type:t,withTime:n}){let r=n?a2:i2;if(t===`range`&&Array.isArray(e)){let t=r(e[0]),n=r(e[1]);return t?n?`${t} – ${n}`:`${t} –`:``}return t===`multiple`&&Array.isArray(e)?e.filter(Boolean).join(`, `):!Array.isArray(e)&&e?r(e):``}function d2({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,J.jsx)(`input`,{type:`hidden`,value:u2({value:e,type:t,withTime:i}),name:n,form:r})}d2.displayName=`@mantine/dates/HiddenDatesInput`;var f2={input:`m_468e7eda`},p2=Q(e=>{let t=Z(`TimeInput`,null,e),{classNames:n,styles:r,unstyled:i,vars:a,withSeconds:o,minTime:s,maxTime:c,value:l,onChange:u,step:d,...f}=t,{resolvedClassNames:p,resolvedStyles:m}=UP({classNames:n,styles:r,props:t}),h=e=>{if(s!==void 0||c!==void 0){let[t,n,r]=e.split(`:`).map(Number);if(s){let[e,i,a]=s.split(`:`).map(Number);if(t<e||t===e&&n<i||o&&t===e&&n===i&&r<a)return-1}if(c){let[e,i,a]=c.split(`:`).map(Number);if(t>e||t===e&&n>i||o&&t===e&&n===i&&r>a)return 1}}return 0},g=e=>{if(t.onBlur?.(e),s!==void 0||c!==void 0){let n=e.currentTarget.value;if(n){let r=h(n);r===1?(c&&(e.currentTarget.value=c),t.onChange?.(e)):r===-1&&(s&&(e.currentTarget.value=s),t.onChange?.(e))}}};return(0,J.jsx)(_U,{classNames:{...p,input:DN(f2.input,p?.input)},styles:m,unstyled:i,value:l,step:d??(o?1:60),...f,onChange:u,onBlur:g,type:`time`,__staticSelector:`TimeInput`})});p2.classes=_U.classes,p2.displayName=`@mantine/dates/TimeInput`;function m2(e){return e<10?`0${e}`:`${e}`}function h2(e){let[t=null,n=null,r=null]=e.split(`:`).map(Number);return{hours:t,minutes:n,seconds:r}}function g2(e,t){return`${e.getHours()}:${e.getMinutes()}${t?`:${e.getSeconds()}`:``}`}function _2({value:e,format:t,amPmLabels:n,withSeconds:r}){let i=h2(typeof e==`string`?e:g2(e,r));if(i.hours===null||i.minutes===null)return null;if(t===`24h`)return`${m2(i.hours)}:${m2(i.minutes)}${r?`:${m2(i.seconds||0)}`:``}`;let a=i.hours>=12;return`${i.hours%12==0?12:i.hours%12}:${m2(i.minutes)}${r?`:${m2(i.seconds||0)}`:``} ${a?n.pm:n.am}`}function v2({value:e,format:t=`24h`,amPmLabels:n={am:`AM`,pm:`PM`},withSeconds:r=!1}){return(0,J.jsx)(J.Fragment,{children:_2({value:e,format:t,amPmLabels:n,withSeconds:r})})}v2.displayName=`@mantine/dates/TimeValue`;var y2=e=>Number(e.toFixed(0)[0]);function b2({value:e,min:t,max:n,onChange:r,focusable:i,step:a,onNextInput:o,onPreviousInput:s,onFocus:c,readOnly:l,allowTemporaryZero:u=!1,placeholder:d=`--`,...f}){let p=y2(n),m=n+1-a,h=e=>{if(l)return;let i=e.replace(/\D/g,``);if(i!==``){let a=parseInt(i,10),s=u&&a===0&&t>0?0:sM(a,t,n);r(s),(s>p||e.startsWith(`00`))&&o?.()}},g=i=>{l||((i.key===`0`||i.key===`Num0`)&&e===0&&(i.preventDefault(),o?.()),i.key===`Home`&&(i.preventDefault(),r(t)),i.key===`End`&&(i.preventDefault(),r(n)),(i.key===`Backspace`||i.key===`Delete`)&&(i.preventDefault(),e===null?s?.():r(null)),i.key===`ArrowRight`&&(i.preventDefault(),o?.()),i.key===`ArrowLeft`&&(i.preventDefault(),s?.()),i.key===`ArrowUp`&&(i.preventDefault(),r(e===null?t:sM(e+a,t,m))),i.key===`ArrowDown`&&(i.preventDefault(),r(e===null?m:sM(e-a,t,m))))};return(0,J.jsx)(`input`,{type:`text`,role:`spinbutton`,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":e===null?0:e,"data-empty":e===null||void 0,inputMode:`numeric`,placeholder:d,value:e===null?``:m2(e),onChange:e=>h(e.currentTarget.value),onKeyDown:g,onFocus:e=>{e.currentTarget.select(),c?.(e)},onClick:e=>{e.stopPropagation(),e.currentTarget.select()},onMouseDown:e=>e.stopPropagation(),...f})}b2.displayName=`@mantine/dates/SpinInput`;var[x2,S2]=Bj(`TimeInput component was not found in the component tree`);function C2({labels:e,value:t,onChange:n,className:r,style:i,onPreviousInput:a,readOnly:o,onMouseDown:s,onTouchStart:c,inputType:l,...u}){let d=S2(),f=r=>{o||(r.key===`Home`&&(r.preventDefault(),n(e.am)),r.key===`End`&&(r.preventDefault(),n(e.pm)),(r.key===`Backspace`||r.key===`Delete`)&&(r.preventDefault(),t===null?a?.():n(null)),r.key===`ArrowLeft`&&(r.preventDefault(),a?.()),(r.key===`ArrowUp`||r.key===`ArrowDown`)&&(r.preventDefault(),n(t===e.am?e.pm:e.am)),r.code===`KeyA`&&(r.preventDefault(),n(e.am)),r.code===`KeyP`&&(r.preventDefault(),n(e.pm)))};if(l===`input`){let e=t||`--`,a=e.length+1;return(0,J.jsx)(`input`,{...d.getStyles(`field`,{className:r,style:i}),value:e,size:a,onChange:e=>!o&&n(e.target.value||null),onClick:(e=>e.stopPropagation()),onKeyDown:f,onMouseDown:e=>{e.stopPropagation(),s?.(e)},"data-am-pm":!0,...u})}return(0,J.jsxs)(`select`,{...d.getStyles(`field`,{className:r,style:i}),value:t||``,onChange:e=>!o&&n(e.target.value||null),onClick:e=>e.stopPropagation(),onKeyDown:f,onMouseDown:e=>{e.stopPropagation(),s?.(e)},"data-am-pm":!0,...u,children:[(0,J.jsx)(`option`,{value:``,children:`--`}),(0,J.jsx)(`option`,{value:e.am,children:e.am}),(0,J.jsx)(`option`,{value:e.pm,children:e.pm})]})}C2.displayName=`@mantine/dates/AmPmInput`;function w2({value:e,active:t,onSelect:n}){let r=S2();return(0,J.jsx)(oB,{mod:{active:t},onClick:()=>n(e),onMouseDown:e=>e.preventDefault(),"data-value":e,tabIndex:-1,...r.getStyles(`control`),children:typeof e==`number`?m2(e):e})}w2.displayName=`@mantine/dates/TimeControl`;function T2({labels:e,value:t,onSelect:n}){let r=S2(),i=[e.am,e.pm].map(e=>(0,J.jsx)(w2,{value:e,active:t===e,onSelect:n},e));return(0,J.jsx)(`div`,{...r.getStyles(`controlsList`),children:i})}T2.displayName=`@mantine/dates/AmPmControlsList`;function E2(e,t){if(!e||!t)return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right}function D2(e,t,n){let r=[];for(let i=e;i<=t;i+=n)r.push(i);return r}function O2({min:e,max:t,step:n,value:r,onSelect:i,reversed:a}){let o=S2(),s=(0,q.useRef)(null),c=D2(e,t,n),l=(a?c.reverse():c).map(e=>(0,J.jsx)(w2,{value:e,active:r===e,onSelect:i},e));return(0,q.useEffect)(()=>{r!==null&&requestAnimationFrame(()=>{let e=s.current?.querySelector(`[data-value="${r}"]`);E2(e,s.current)||e?.scrollIntoView({block:`nearest`})})},[r]),(0,J.jsx)(nB,{h:o.maxDropdownContentHeight,type:`never`,viewportRef:s,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,J.jsx)(`div`,{...o.getStyles(`controlsList`),children:l})})}O2.displayName=`@mantine/dates/TimeControlsList`;function k2({time:e,compare:t,withSeconds:n}){let r=h2(e),i=h2(t);return n?r.hours===i.hours&&r.minutes===i.minutes&&r.seconds===i.seconds:r.hours===i.hours&&r.minutes===i.minutes}function A2({value:e,active:t,onChange:n,format:r,amPmLabels:i,withSeconds:a}){let o=S2();return(0,J.jsx)(oB,{mod:{active:t},onClick:()=>n(e),...o.getStyles(`presetControl`),children:(0,J.jsx)(v2,{withSeconds:a,value:e,format:r,amPmLabels:i})})}A2.displayName=`@mantine/dates/TimePresetControl`;function j2({value:e,data:t,onChange:n,format:r,amPmLabels:i,withSeconds:a}){let o=S2(),s=t.values.map(t=>(0,J.jsx)(A2,{value:t,format:r,amPmLabels:i,withSeconds:a,active:k2({time:t,compare:e,withSeconds:a}),onChange:n},t));return(0,J.jsxs)(`div`,{...o.getStyles(`presetsGroup`),children:[(0,J.jsx)(`div`,{...o.getStyles(`presetsGroupLabel`),children:t.label}),(0,J.jsx)(dX,{cols:a?2:3,spacing:4,children:s})]})}j2.displayName=`@mantine/dates/TimePresetGroup`;function M2({presets:e,format:t,amPmLabels:n,withSeconds:r,value:i,onChange:a}){let o=S2();if(e.length===0)return null;if(typeof e[0]==`string`){let s=e.map(e=>(0,J.jsx)(A2,{value:e,format:t,amPmLabels:n,withSeconds:r,active:k2({time:e,compare:i,withSeconds:r}),onChange:a},e));return(0,J.jsx)(nB.Autosize,{mah:o.maxDropdownContentHeight,type:`never`,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,J.jsx)(`div`,{...o.getStyles(`presetsRoot`),children:(0,J.jsx)(dX,{cols:r?2:3,spacing:4,children:s})})})}let s=e.map((e,o)=>(0,J.jsx)(j2,{data:e,value:i,format:t,amPmLabels:n,withSeconds:r,onChange:a},o));return(0,J.jsx)(nB.Autosize,{mah:o.maxDropdownContentHeight,type:`never`,...o.getStyles(`scrollarea`),...o.scrollAreaProps,children:(0,J.jsx)(`div`,{...o.getStyles(`presetsRoot`),children:s})})}M2.displayName=`@mantine/dates/TimePresets`;function N2(e){let[t=0,n=0,r=0]=e.split(`:`).map(Number);return t*3600+n*60+r}function P2(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return{timeString:`${m2(t)}:${m2(n)}:${m2(r)}`,hours:t,minutes:n,seconds:r}}function F2(e,t,n){let r=N2(e),i=t?N2(t):-1/0,a=n?N2(n):1/0;return P2(Math.max(i,Math.min(r,a)))}function I2({hours:e,minutes:t,seconds:n,amPmLabels:r}){if(e===null)return{hours:null,minutes:null,seconds:null,amPm:null};let i=e>=12?r.pm:r.am;return{hours:e%12==0?12:e%12,minutes:typeof t==`number`?t:null,seconds:typeof n==`number`?n:null,amPm:i}}function L2({time:e,format:t,amPmLabels:n}){if(e===``)return{hours:null,minutes:null,seconds:null,amPm:null};let{hours:r,minutes:i,seconds:a}=h2(e),o={hours:r,minutes:i,seconds:a};return t===`12h`?I2({...o,amPmLabels:n}):{...o,amPm:null}}function R2({hours:e,minutes:t,seconds:n,amPm:r,amPmLabels:i,withSeconds:a}){let o=e;return r===i.pm&&e!==12?o+=12:r===i.am&&e===12&&(o=0),`${m2(o)}:${m2(t)}${a?`:${m2(n||0)}`:``}`}function z2({hours:e,minutes:t,seconds:n,format:r,withSeconds:i,amPm:a,amPmLabels:o}){return e===null||t===null||i&&n===null?{valid:!1,value:``}:r===`24h`?{valid:!0,value:`${m2(e)}:${m2(t)}${i?`:${m2(n)}`:``}`}:a===null?{valid:!1,value:``}:{valid:!0,value:R2({hours:e,minutes:t,seconds:n,amPm:a,amPmLabels:o,withSeconds:i})}}function B2({value:e,defaultValue:t,onChange:n,format:r,amPmLabels:i,withSeconds:a=!1,min:o,max:s,clearable:c,readOnly:l,disabled:u,pasteSplit:d}){let f=L2({time:e||t||``,amPmLabels:i,format:r}),p=z2({hours:f.hours,minutes:f.minutes,seconds:f.seconds,format:r,withSeconds:a,amPm:f.amPm,amPmLabels:i}),m=(0,q.useRef)(!0),h=(0,q.useRef)(!p.valid),[g,_]=(0,q.useState)(f.hours),[v,y]=(0,q.useState)(f.minutes),[b,x]=(0,q.useState)(f.seconds),[S,C]=(0,q.useState)(f.amPm),w=c&&!l&&!u&&(g!==null||v!==null||b!==null||S!==null),T=(0,q.useRef)(null),E=(0,q.useRef)(null),D=(0,q.useRef)(null),O=(0,q.useRef)(null),k=e=>{e===`hours`&&T.current?.focus(),e===`minutes`&&E.current?.focus(),e===`seconds`&&D.current?.focus(),e===`amPm`&&O.current?.focus()},A=(e,t)=>{let o=z2({hours:g,minutes:v,seconds:b,amPm:S,[e]:t,format:r,withSeconds:a,amPmLabels:i});o.valid?(m.current=!1,h.current=!1,e===`hours`&&_(t),e===`minutes`&&y(t),e===`seconds`&&x(t),e===`amPm`&&C(t),n?.(o.value)):(m.current=!1,h.current||=(n?.(``),!0))},j=e=>{m.current=!1;let t=L2({time:e,amPmLabels:i,format:r});_(t.hours),y(t.minutes),x(t.seconds),C(t.amPm),h.current=!z2({...t,format:r,withSeconds:a,amPmLabels:i}).valid,n?.(e)},M=e=>{let t=e;r===`12h`&&typeof e==`number`&&e>12&&(t=(e-1)%12+1),_(t),A(`hours`,t),k(`hours`)},N=e=>{y(e),A(`minutes`,e),k(`minutes`)},P=e=>{x(e),A(`seconds`,e),k(`seconds`)},F=e=>{C(e),A(`amPm`,e),k(`amPm`)},ee=()=>{m.current=!1,_(null),y(null),x(null),C(null),n?.(``),h.current=!0,k(`hours`)},I=e=>{e.preventDefault();let t=e.clipboardData.getData(`text`),c=(d||L2)({time:t,format:r,amPmLabels:i}),l=z2({...c,format:r,withSeconds:a,amPmLabels:i});if(l.valid){m.current=!1;let e=F2(l.value,o||`00:00:00`,s||`23:59:59`);n?.(e.timeString),_(c.hours),y(c.minutes),x(c.seconds),C(c.amPm)}},te=z2({hours:g,minutes:v,seconds:b,format:r,withSeconds:a,amPm:S,amPmLabels:i});return vM(()=>{if(e===``){m.current=!1,_(null),y(null),x(null),C(null),m.current=!0;return}if(m.current&&typeof e==`string`){let t=L2({time:e||``,amPmLabels:i,format:r});_(t.hours),y(t.minutes),x(t.seconds),C(t.amPm)}m.current=!0},[e]),{refs:{hours:T,minutes:E,seconds:D,amPm:O},values:{hours:g,minutes:v,seconds:b,amPm:S},setHours:M,setMinutes:N,setSeconds:P,setAmPm:F,focus:k,clear:ee,onPaste:I,setTimeString:j,isClearable:w,hiddenInputValue:te.value}}var V2={fieldsRoot:`m_7a8f1e6d`,fieldsGroup:`m_d6bb0a54`,controlsList:`m_b97ecb26`,controlsListGroup:`m_31fe42f9`,dropdown:`m_9c4817c3`,control:`m_154c536b`,presetControl:`m_7be09d0c`,presetsGroup:`m_7d00001d`,presetsGroupLabel:`m_d8d918d7`,field:`m_6b43ba88`},H2={hoursStep:1,minutesStep:1,secondsStep:1,format:`24h`,amPmLabels:{am:`AM`,pm:`PM`},pasteSplit:L2,maxDropdownContentHeight:200,hoursPlaceholder:`--`,minutesPlaceholder:`--`,secondsPlaceholder:`--`},U2=TN((e,{size:t})=>({dropdown:{"--control-font-size":$j(t)}})),W2=Q(e=>{let t=Z(`TimePicker`,H2,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,onClick:c,format:l,value:u,defaultValue:d,onChange:f,hoursStep:p,minutesStep:m,secondsStep:h,withSeconds:g,hoursInputLabel:_,minutesInputLabel:v,secondsInputLabel:y,amPmInputLabel:b,amPmLabels:x,clearable:S,clearSectionMode:C,onMouseDown:w,onFocusCapture:T,onBlurCapture:E,min:D,max:O,popoverProps:k,withDropdown:A,rightSection:j,onFocus:M,onBlur:N,clearButtonProps:P,hoursInputProps:F,minutesInputProps:ee,secondsInputProps:I,amPmSelectProps:te,readOnly:ne,disabled:L,size:re,name:ie,form:ae,hiddenInputProps:oe,labelProps:se,pasteSplit:ce,hoursRef:le,minutesRef:ue,secondsRef:R,amPmRef:de,presets:z,maxDropdownContentHeight:fe,scrollAreaProps:pe,attributes:me,reverseTimeControlsList:he,hoursPlaceholder:ge,minutesPlaceholder:_e,secondsPlaceholder:ve,...ye}=t,{resolvedClassNames:be,resolvedStyles:B}=UP({classNames:n,styles:a,props:t}),xe=rF({name:`TimePicker`,classes:V2,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:me,vars:s,varsResolver:U2}),V=B2({value:u,defaultValue:d,onChange:f,format:l,amPmLabels:x,withSeconds:g,min:D,max:O,clearable:S,disabled:L,readOnly:ne,pasteSplit:ce}),H=IM(V.refs.hours,le),Se=IM(V.refs.minutes,ue),Ce=IM(V.refs.seconds,R),we=IM(V.refs.amPm,de),Te=MM(),Ee=(0,q.useRef)(!1),[De,Oe]=(0,q.useState)(!1),ke=e=>{Ee.current||(Ee.current=!0,M?.(e))},Ae=e=>{if(!e.currentTarget.contains(e.relatedTarget)){let t=V.values,n=z2({...t,format:l,amPmLabels:x,withSeconds:!!g});if(n.valid&&(D||O)){let e=F2(n.value,D,O);e.timeString!==n.value&&V.setTimeString(e.timeString)}Ee.current=!1,N?.(e)}};return(0,J.jsx)(x2,{value:{getStyles:xe,scrollAreaProps:pe,maxDropdownContentHeight:fe},children:(0,J.jsxs)(YB,{opened:De,transitionProps:{duration:0},position:`bottom-start`,withRoles:!1,disabled:L||ne||!A,...k,children:[(0,J.jsx)(YB.Target,{children:(0,J.jsxs)(_U,{component:`div`,size:re,disabled:L,onClick:e=>{c?.(e),V.focus(`hours`)},onMouseDown:e=>{e.preventDefault(),w?.(e)},onFocusCapture:e=>{Oe(!0),T?.(e)},onBlurCapture:e=>{Oe(!1),E?.(e)},rightSection:j,__clearSection:(0,J.jsx)(gV,{...P,size:re,onClick:e=>{V.clear(),P?.onClick?.(e)},onMouseDown:e=>{e.preventDefault(),P?.onMouseDown?.(e)}}),__clearable:V.isClearable,__clearSectionMode:C,labelProps:{htmlFor:Te,...se},style:i,className:r,classNames:be,styles:B,attributes:me,__staticSelector:`TimePicker`,...ye,children:[(0,J.jsx)(`div`,{...xe(`fieldsRoot`),dir:`ltr`,children:(0,J.jsxs)(`div`,{...xe(`fieldsGroup`),onBlur:Ae,children:[(0,J.jsx)(b2,{id:Te,...F,...xe(`field`,{className:F?.className,style:F?.style}),value:V.values.hours,onChange:V.setHours,onNextInput:()=>V.focus(`minutes`),min:l===`12h`?1:0,max:l===`12h`?12:23,allowTemporaryZero:l===`12h`,focusable:!0,step:p,ref:H,"aria-label":_,readOnly:ne,disabled:L,onPaste:V.onPaste,onFocus:e=>{ke(e),F?.onFocus?.(e)},onBlur:e=>{let t=e.currentTarget.value;l===`12h`&&(t?parseInt(t,10):null)===0&&V.setHours(12),F?.onBlur?.(e)},placeholder:ge}),(0,J.jsx)(`span`,{children:`:`}),(0,J.jsx)(b2,{...ee,...xe(`field`,{className:ee?.className,style:ee?.style}),value:V.values.minutes,onChange:V.setMinutes,min:0,max:59,focusable:!0,step:m,ref:Se,onPreviousInput:()=>V.focus(`hours`),onNextInput:()=>g?V.focus(`seconds`):V.focus(`amPm`),"aria-label":v,tabIndex:-1,readOnly:ne,disabled:L,onPaste:V.onPaste,onFocus:e=>{ke(e),ee?.onFocus?.(e)},placeholder:_e}),g&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{children:`:`}),(0,J.jsx)(b2,{...I,...xe(`field`,{className:I?.className,style:I?.style}),value:V.values.seconds,onChange:V.setSeconds,min:0,max:59,focusable:!0,step:h,ref:Ce,onPreviousInput:()=>V.focus(`minutes`),onNextInput:()=>V.focus(`amPm`),"aria-label":y,tabIndex:-1,readOnly:ne,disabled:L,onPaste:V.onPaste,onFocus:e=>{ke(e),I?.onFocus?.(e)},placeholder:ve})]}),l===`12h`&&(0,J.jsx)(C2,{...te,inputType:A?`input`:`select`,labels:x,value:V.values.amPm,onChange:V.setAmPm,ref:we,"aria-label":b,onPreviousInput:()=>g?V.focus(`seconds`):V.focus(`minutes`),readOnly:ne,disabled:L,tabIndex:-1,onPaste:V.onPaste,onFocus:e=>{ke(e),te?.onFocus?.(e)}})]})}),(0,J.jsx)(`input`,{type:`hidden`,name:ie,form:ae,value:V.hiddenInputValue,...oe})]})}),(0,J.jsx)(YB.Dropdown,{...xe(`dropdown`),onMouseDown:e=>e.preventDefault(),children:z?(0,J.jsx)(M2,{value:V.hiddenInputValue,onChange:V.setTimeString,format:l,presets:z,amPmLabels:x,withSeconds:g||!1}):(0,J.jsxs)(`div`,{...xe(`controlsListGroup`),children:[(0,J.jsx)(O2,{min:l===`12h`?1:0,max:l===`12h`?12:23,step:p,value:V.values.hours,onSelect:V.setHours,reversed:he}),(0,J.jsx)(O2,{min:0,max:59,step:m,value:V.values.minutes,onSelect:V.setMinutes,reversed:he}),g&&(0,J.jsx)(O2,{min:0,max:59,step:h,value:V.values.seconds,onSelect:V.setSeconds,reversed:he}),l===`12h`&&(0,J.jsx)(T2,{labels:x,value:V.values.amPm,onSelect:V.setAmPm})]})})]})})});W2.displayName=`@mantine/dates/TimePicker`,W2.classes=V2,W2.varsResolver=U2;var G2={day:`m_396ce5cb`},K2=TN((e,{size:t})=>({day:{"--day-size":Xj(t,`day-size`)}})),q2=Q(e=>{let t=Z(`Day`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,date:c,disabled:l,__staticSelector:u,weekend:d,outside:f,selected:p,renderDay:m,inRange:h,firstInRange:g,lastInRange:_,hidden:v,static:y,highlightToday:b,fullWidth:x,attributes:S,...C}=t;return(0,J.jsx)(oB,{...rF({name:u||`Day`,classes:G2,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:K2,rootSelector:`day`})(`day`,{style:v?{display:`none`}:void 0}),component:y?`div`:`button`,disabled:l,"data-today":(0,Y.default)(c).isSame(new Date,`day`)||void 0,"data-hidden":v||void 0,"data-highlight-today":b||void 0,"data-disabled":l||void 0,"data-weekend":!l&&!f&&d||void 0,"data-outside":!l&&f||void 0,"data-selected":!l&&p||void 0,"data-in-range":h&&!l||void 0,"data-first-in-range":g&&!l||void 0,"data-last-in-range":_&&!l||void 0,"data-static":y||void 0,"data-full-width":x||void 0,unstyled:o,...C,children:m?.(c)||(0,Y.default)(c).date()})});q2.classes=G2,q2.varsResolver=K2,q2.displayName=`@mantine/dates/Day`;function J2({locale:e,format:t=`dd`,firstDayOfWeek:n=1}){let r=(0,Y.default)().day(n),i=[];for(let n=0;n<7;n+=1)typeof t==`string`?i.push((0,Y.default)(r).add(n,`days`).locale(e).format(t)):i.push(t((0,Y.default)(r).add(n,`days`).format(`YYYY-MM-DD`)));return i}var Y2={weekday:`m_18a3eca`},X2=TN((e,{size:t})=>({weekdaysRow:{"--wr-fz":$j(t),"--wr-spacing":Zj(t)}})),Z2=Q(e=>{let t=Z(`WeekdaysRow`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,locale:c,firstDayOfWeek:l,weekdayFormat:u,cellComponent:d=`th`,__staticSelector:f,withWeekNumbers:p,attributes:m,...h}=t,g=rF({name:f||`WeekdaysRow`,classes:Y2,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:X2,rootSelector:`weekdaysRow`}),_=l2(),v=J2({locale:_.getLocale(c),format:u,firstDayOfWeek:_.getFirstDayOfWeek(l)}).map((e,t)=>(0,J.jsx)(d,{...g(`weekday`),children:e},t));return(0,J.jsxs)($,{component:`tr`,...g(`weekdaysRow`),...h,children:[p&&(0,J.jsx)(d,{...g(`weekday`),children:`#`}),v]})});Z2.classes=Y2,Z2.varsResolver=X2,Z2.displayName=`@mantine/dates/WeekdaysRow`;function Q2(e,t=1){let n=(0,Y.default)(e);if(!n.isValid())return n;let r=t===0?6:t-1;for(;n.day()!==r;)n=n.add(1,`day`);return n.format(`YYYY-MM-DD`)}function $2(e,t=1){let n=(0,Y.default)(e);for(;n.day()!==t;)n=n.subtract(1,`day`);return n.format(`YYYY-MM-DD`)}function e4({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){let r=(0,Y.default)((0,Y.default)(e).subtract((0,Y.default)(e).date()-1,`day`).format(`YYYY-M-D`)),i=r.format(`YYYY-MM-DD`),a=Q2(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,Y.default)($2(i,t));for(;(0,Y.default)(s).isBefore(a,`day`);){let e=[];for(let t=0;t<7;t+=1)e.push(s.format(`YYYY-MM-DD`)),s=s.add(1,`day`);o.push(e)}if(n&&o.length<6){let e=o[o.length-1],t=e[e.length-1],n=(0,Y.default)(t).add(1,`day`);for(;o.length<6;){let e=[];for(let t=0;t<7;t+=1)e.push(n.format(`YYYY-MM-DD`)),n=n.add(1,`day`);o.push(e)}}return o}function t4(e,t){return(0,Y.default)(e).format(`YYYY-MM`)===(0,Y.default)(t).format(`YYYY-MM`)}function n4(e,t){return t?(0,Y.default)(e).isAfter((0,Y.default)(t).subtract(1,`day`),`day`):!0}function r4(e,t){return t?(0,Y.default)(e).isBefore((0,Y.default)(t).add(1,`day`),`day`):!0}function i4({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>r4(e,n)&&n4(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||t4(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,Y.default)().isSame(e,`date`))||s[0]}var a4=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}))(),1);Y.default.extend(a4.default);function o4(e){return(0,Y.default)(e.find(e=>(0,Y.default)(e).day()===1)).isoWeek()}var s4={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},c4={withCellSpacing:!0},l4=TN((e,{size:t})=>({weekNumber:{"--wn-fz":$j(t),"--wn-size":Xj(t,`wn-size`)}})),u4=Q(e=>{let t=Z(`Month`,c4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,month:f,weekendDays:p,getDayProps:m,excludeDate:h,minDate:g,maxDate:_,renderDay:v,hideOutsideDates:y,hideWeekdays:b,getDayAriaLabel:x,static:S,__getDayRef:C,__onDayKeyDown:w,__onDayClick:T,__onDayMouseEnter:E,__preventFocus:D,__stopPropagation:O,withCellSpacing:k,size:A,highlightToday:j,withWeekNumbers:M,fullWidth:N,attributes:P,...F}=t,ee=rF({name:c||`Month`,classes:s4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:l4,rootSelector:`month`}),I=l2(),te=e4({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=i4({dates:te,minDate:i2(g),maxDate:i2(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:L,resolvedStyles:re}=UP({classNames:n,styles:a,props:t}),ie=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!t4(e,f),i=x?.(e)||(0,Y.default)(e).locale(l||I.locale).format(`D MMMM YYYY`),a=m?.(e),s=(0,Y.default)(e).isSame(ne,`date`);return(0,J.jsx)(`td`,{...ee(`monthCell`),"data-with-spacing":k||void 0,children:(0,J.jsx)(q2,{__staticSelector:c||`Month`,classNames:L,styles:re,attributes:P,unstyled:o,"data-mantine-stop-propagation":O||void 0,highlightToday:j,renderDay:v,date:e,size:A,weekend:I.getWeekendDays(p).includes((0,Y.default)(e).get(`day`)),outside:r,hidden:y?r:!1,"aria-label":i,static:S,fullWidth:N,disabled:h?.(e)||!r4(e,i2(_))||!n4(e,i2(g)),ref:e=>{e&&C?.(t,n,e)},...a,onKeyDown:r=>{a?.onKeyDown?.(r),w?.(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{a?.onMouseEnter?.(t),E?.(t,e)},onClick:t=>{a?.onClick?.(t),T?.(t,e)},onMouseDown:e=>{a?.onMouseDown?.(e),D&&e.preventDefault()},tabIndex:D||!s?-1:0})},e.toString())});return(0,J.jsxs)(`tr`,{...ee(`monthRow`),children:[M&&(0,J.jsx)(`td`,{...ee(`weekNumber`),children:o4(e)}),n]},t)});return(0,J.jsxs)($,{component:`table`,...ee(`month`),size:A,"data-full-width":N||void 0,...F,children:[!b&&(0,J.jsx)(`thead`,{...ee(`monthThead`),children:(0,J.jsx)(Z2,{__staticSelector:c||`Month`,locale:l,firstDayOfWeek:u,weekdayFormat:d,withWeekNumbers:M,size:A,classNames:L,styles:re,unstyled:o,attributes:P})}),(0,J.jsx)(`tbody`,{...ee(`monthTbody`),children:ie})]})});u4.classes=s4,u4.varsResolver=l4,u4.displayName=`@mantine/dates/Month`;var d4={pickerControl:`m_dc6a3c71`},f4=TN((e,{size:t})=>({pickerControl:{"--dpc-fz":$j(t),"--dpc-size":Xj(t,`dpc-size`)}})),p4=Q(e=>{let t=Z(`PickerControl`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,firstInRange:c,lastInRange:l,inRange:u,__staticSelector:d,selected:f,disabled:p,fullWidth:m,attributes:h,...g}=t;return(0,J.jsx)(oB,{...rF({name:d||`PickerControl`,classes:d4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:f4,rootSelector:`pickerControl`})(`pickerControl`),unstyled:o,"data-picker-control":!0,"data-full-width":m||void 0,"data-selected":f&&!p||void 0,"data-disabled":p||void 0,"data-in-range":u&&!p&&!f||void 0,"data-first-in-range":c&&!p||void 0,"data-last-in-range":l&&!p||void 0,disabled:p,...g})});p4.classes=d4,p4.varsResolver=f4,p4.displayName=`@mantine/dates/PickerControl`;function m4({year:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,Y.default)(e).isBefore(t,`year`)||n&&(0,Y.default)(e).isAfter(n,`year`))}function h4({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!m4({year:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,Y.default)().isSame(e,`year`))||i[0]}function g4(e){let t=(0,Y.default)(e).year(),n=t-t%10,r=0,i=[[],[],[],[]];for(let e=0;e<4;e+=1){let t=e===3?1:3;for(let a=0;a<t;a+=1)i[e].push((0,Y.default)(new Date(n+r,0)).format(`YYYY-MM-DD`)),r+=1}return i}var _4={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},v4={yearsListFormat:`YYYY`,withCellSpacing:!0},y4=Q(e=>{let t=Z(`YearsList`,v4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,decade:c,yearsListFormat:l,locale:u,minDate:d,maxDate:f,getYearControlProps:p,__staticSelector:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=rF({name:m||`YearsList`,classes:_4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=l2(),O=g4(c),k=h4({years:O,minDate:d,maxDate:f,getYearControlProps:p}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=p?.(e),i=(0,Y.default)(e).isSame(k,`year`);return(0,J.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":x||void 0,children:(0,J.jsx)(p4,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:m4({year:e,minDate:d,maxDate:f}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,Y.default)(e).locale(D.getLocale(u)).format(l)})},n)});return(0,J.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,J.jsx)($,{component:`table`,size:C,...E(`yearsList`),"data-full-width":S||void 0,...T,children:(0,J.jsx)(`tbody`,{children:A})})});y4.classes=_4,y4.displayName=`@mantine/dates/YearsList`;function b4({month:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,Y.default)(e).isBefore(t,`month`)||n&&(0,Y.default)(e).isAfter(n,`month`))}function x4({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!b4({month:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,Y.default)().isSame(e,`month`))||i[0]}function S4(e){let t=(0,Y.default)(e).startOf(`year`).toDate(),n=[[],[],[],[]],r=0;for(let e=0;e<4;e+=1)for(let i=0;i<3;i+=1)n[e].push((0,Y.default)(t).add(r,`months`).format(`YYYY-MM-DD`)),r+=1;return n}var C4={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},w4={monthsListFormat:`MMM`,withCellSpacing:!0},T4=Q(e=>{let t=Z(`MonthsList`,w4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,year:l,monthsListFormat:u,locale:d,minDate:f,maxDate:p,getMonthControlProps:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=rF({name:c||`MonthsList`,classes:C4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=l2(),O=S4(l),k=x4({months:O,minDate:i2(f),maxDate:i2(p),getMonthControlProps:m}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=m?.(e),i=(0,Y.default)(e).isSame(k,`month`);return(0,J.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":x||void 0,children:(0,J.jsx)(p4,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:b4({month:e,minDate:i2(f),maxDate:i2(p)}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,Y.default)(e).locale(D.getLocale(d)).format(u)})},n)});return(0,J.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,J.jsx)($,{component:`table`,size:C,...E(`monthsList`),"data-full-width":S||void 0,...T,children:(0,J.jsx)(`tbody`,{children:A})})});T4.classes=C4,T4.displayName=`@mantine/dates/MonthsList`;var E4={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},D4={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},O4=TN((e,{size:t})=>({calendarHeader:{"--dch-control-size":Xj(t,`dch-control-size`),"--dch-fz":$j(t)}})),k4=Q(e=>{let t=Z(`CalendarHeader`,D4,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,nextIcon:c,previousIcon:l,nextLabel:u,previousLabel:d,onNext:f,onPrevious:p,onLevelClick:m,label:h,nextDisabled:g,previousDisabled:_,hasNextLevel:v,levelControlAriaLabel:y,withNext:b,withPrevious:x,headerControlsOrder:S,fullWidth:C,__staticSelector:w,__preventFocus:T,__stopPropagation:E,attributes:D,...O}=t,k=rF({name:w||`CalendarHeader`,classes:E4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:O4,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,q.createElement)(oB,{...k(`calendarHeaderControl`),key:`previous`,"data-direction":`previous`,"aria-label":d,onClick:p,unstyled:o,onMouseDown:A,disabled:_,"data-disabled":_||void 0,tabIndex:T||_?-1:0,"data-mantine-stop-propagation":E||void 0},l||(0,J.jsx)(EU,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,q.createElement)(oB,{component:v?`button`:`div`,...k(`calendarHeaderLevel`),key:`level`,onClick:v?m:void 0,unstyled:o,onMouseDown:v?A:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":y,tabIndex:T||!v?-1:0,"data-mantine-stop-propagation":E||void 0},h),N=b&&(0,q.createElement)(oB,{...k(`calendarHeaderControl`),key:`next`,"data-direction":`next`,"aria-label":u,onClick:f,unstyled:o,onMouseDown:A,disabled:g,"data-disabled":g||void 0,tabIndex:T||g?-1:0,"data-mantine-stop-propagation":E||void 0},c||(0,J.jsx)(EU,{...k(`calendarHeaderControlIcon`),"data-direction":`next`,size:`45%`})),P=S.map(e=>e===`previous`?j:e===`level`?M:e===`next`?N:null);return(0,J.jsx)($,{...k(`calendarHeader`),"data-full-width":C||void 0,...O,children:P})});k4.classes=E4,k4.varsResolver=O4,k4.displayName=`@mantine/dates/CalendarHeader`;function A4(e){let t=g4(e);return[t[0][0],t[3][0]]}var j4={decadeLabelFormat:`YYYY`},M4=Q(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:y,previousDisabled:b,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,decadeLabelFormat:T,classNames:E,styles:D,unstyled:O,__staticSelector:k,__stopPropagation:A,size:j,fullWidth:M,attributes:N,...P}=Z(`DecadeLevel`,j4,e),F=l2(),[ee,I]=A4(t),te={__staticSelector:k||`DecadeLevel`,classNames:E,styles:D,unstyled:O,size:j,attributes:N},ne=typeof y==`boolean`?y:i?!(0,Y.default)(I).endOf(`year`).isBefore(i):!1,L=typeof b==`boolean`?b:r?!(0,Y.default)(ee).startOf(`year`).isAfter(r):!1,re=(e,t)=>(0,Y.default)(e).locale(n||F.locale).format(t);return(0,J.jsxs)($,{"data-decade-level":!0,size:j,...P,children:[(0,J.jsx)(k4,{label:typeof T==`function`?T(ee,I):`${re(ee,T)} – ${re(I,T)}`,__preventFocus:f,__stopPropagation:A,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:ne,previousDisabled:L,hasNextLevel:!1,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,fullWidth:M,...te}),(0,J.jsx)(y4,{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:A,withCellSpacing:d,fullWidth:M,...te})]})});M4.classes={...y4.classes,...k4.classes},M4.displayName=`@mantine/dates/DecadeLevel`;var N4={yearLabelFormat:`YYYY`},P4=Q(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:b,previousDisabled:x,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,yearLabelFormat:D,__staticSelector:O,__stopPropagation:k,size:A,classNames:j,styles:M,unstyled:N,fullWidth:P,attributes:F,...ee}=Z(`YearLevel`,N4,e),I=l2(),te={__staticSelector:O||`YearLevel`,classNames:j,styles:M,unstyled:N,size:A,attributes:F},ne=typeof b==`boolean`?b:i?!(0,Y.default)(t).endOf(`year`).isBefore(i):!1,L=typeof x==`boolean`?x:r?!(0,Y.default)(t).startOf(`year`).isAfter(r):!1;return(0,J.jsxs)($,{"data-year-level":!0,size:A,...ee,children:[(0,J.jsx)(k4,{label:typeof D==`function`?D(t):(0,Y.default)(t).locale(n||I.locale).format(D),__preventFocus:f,__stopPropagation:k,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:ne,previousDisabled:L,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,fullWidth:P,...te}),(0,J.jsx)(T4,{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:k,withCellSpacing:d,fullWidth:P,...te})]})});P4.classes={...k4.classes,...T4.classes},P4.displayName=`@mantine/dates/YearLevel`;var F4={monthLabelFormat:`MMMM YYYY`},I4=Q(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:A,previousDisabled:j,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:F,headerControlsOrder:ee,monthLabelFormat:I,classNames:te,styles:ne,unstyled:L,__staticSelector:re,size:ie,static:ae,fullWidth:oe,attributes:se,...ce}=Z(`MonthLevel`,F4,e),le=l2(),ue={__staticSelector:re||`MonthLevel`,classNames:te,styles:ne,unstyled:L,size:ie,attributes:se},R=typeof A==`boolean`?A:l?!(0,Y.default)(t).endOf(`month`).isBefore(l):!1,de=typeof j==`boolean`?j:c?!(0,Y.default)(t).startOf(`month`).isAfter(c):!1;return(0,J.jsxs)($,{"data-month-level":!0,size:ie,...ce,children:[(0,J.jsx)(k4,{label:typeof I==`function`?I(t):(0,Y.default)(t).locale(n||le.locale).format(I),__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:R,previousDisabled:de,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:F,headerControlsOrder:ee,fullWidth:oe,...ue}),(0,J.jsx)(u4,{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,__preventFocus:x,__stopPropagation:S,static:ae,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,fullWidth:oe,...ue})]})});I4.classes={...u4.classes,...k4.classes},I4.displayName=`@mantine/dates/MonthLevel`;var L4={levelsGroup:`m_30b26e33`},R4=Q(e=>{let t=Z(`LevelsGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,fullWidth:l,attributes:u,...d}=t;return(0,J.jsx)($,{...rF({name:c||`LevelsGroup`,classes:L4,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,rootSelector:`levelsGroup`})(`levelsGroup`),"data-full-width":l||void 0,...d})});R4.classes=L4,R4.displayName=`@mantine/dates/LevelsGroup`;var z4={numberOfColumns:1},B4=Q(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,headerControlsOrder:y,classNames:b,styles:x,unstyled:S,__staticSelector:C,__stopPropagation:w,numberOfColumns:T,levelControlAriaLabel:E,decadeLabelFormat:D,size:O,fullWidth:k,vars:A,attributes:j,...M}=Z(`DecadeLevelGroup`,z4,e),N=(0,q.useRef)([]),P=Array(T).fill(0).map((e,A)=>{let M=(0,Y.default)(t).add(A*10,`years`).format(`YYYY-MM-DD`);return(0,J.jsx)(M4,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>n2({levelIndex:A,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:N}),__getControlRef:(e,t,n)=>{Array.isArray(N.current[A])||(N.current[A]=[]),Array.isArray(N.current[A][e])||(N.current[A][e]=[]),N.current[A][e][t]=n},levelControlAriaLabel:typeof E==`function`?E(M):E,locale:n,minDate:r,maxDate:i,__preventFocus:u,__stopPropagation:w,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,getYearControlProps:o,__staticSelector:C||`DecadeLevelGroup`,classNames:b,styles:x,unstyled:S,withCellSpacing:l,headerControlsOrder:y,fullWidth:k,attributes:j},A)});return(0,J.jsx)(R4,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});B4.classes={...R4.classes,...M4.classes},B4.displayName=`@mantine/dates/DecadeLevelGroup`;var V4={numberOfColumns:1},H4=Q(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,headerControlsOrder:x,classNames:S,styles:C,unstyled:w,__staticSelector:T,__stopPropagation:E,numberOfColumns:D,levelControlAriaLabel:O,yearLabelFormat:k,size:A,fullWidth:j,vars:M,attributes:N,...P}=Z(`YearLevelGroup`,V4,e),F=(0,q.useRef)([]),ee=Array(D).fill(0).map((e,M)=>{let P=(0,Y.default)(t).add(M,`years`).format(`YYYY-MM-DD`);return(0,J.jsx)(P4,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>n2({levelIndex:M,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:F}),__getControlRef:(e,t,n)=>{Array.isArray(F.current[M])||(F.current[M]=[]),Array.isArray(F.current[M][e])||(F.current[M][e]=[]),F.current[M][e][t]=n},levelControlAriaLabel:typeof O==`function`?O(P):O,locale:n,minDate:r,maxDate:i,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,getMonthControlProps:o,classNames:S,styles:C,unstyled:w,__staticSelector:T||`YearLevelGroup`,withCellSpacing:l,headerControlsOrder:x,fullWidth:j,attributes:N},M)});return(0,J.jsx)(R4,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:ee})});H4.classes={...P4.classes,...R4.classes},H4.displayName=`@mantine/dates/YearLevelGroup`;var U4={numberOfColumns:1},W4=Q(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__onDayClick:m,__onDayMouseEnter:h,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,headerControlsOrder:A,classNames:j,styles:M,unstyled:N,numberOfColumns:P,levelControlAriaLabel:F,monthLabelFormat:ee,__staticSelector:I,__stopPropagation:te,size:ne,static:L,fullWidth:re,vars:ie,attributes:ae,...oe}=Z(`MonthLevelGroup`,U4,e),se=(0,q.useRef)([]),ce=Array(P).fill(0).map((e,ie)=>{let oe=(0,Y.default)(t).add(ie,`months`).format(`YYYY-MM-DD`);return(0,J.jsx)(I4,{month:oe,withNext:ie===P-1,withPrevious:ie===0,monthLabelFormat:ee,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>n2({levelIndex:ie,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:se}),__getDayRef:(e,t,n)=>{Array.isArray(se.current[ie])||(se.current[ie]=[]),Array.isArray(se.current[ie][e])||(se.current[ie][e]=[]),se.current[ie][e][t]=n},levelControlAriaLabel:typeof F==`function`?F(oe):F,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,classNames:j,styles:M,unstyled:N,__staticSelector:I||`MonthLevelGroup`,size:ne,static:L,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,headerControlsOrder:A,fullWidth:re,attributes:ae},ie)});return(0,J.jsx)(R4,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:re,attributes:ae,...oe,children:ce})});W4.classes={...R4.classes,...I4.classes},W4.displayName=`@mantine/dates/MonthLevelGroup`;var G4={input:`m_6fa5e2aa`},K4=Q(e=>{let{inputProps:t,wrapperProps:n,placeholder:r,classNames:i,styles:a,unstyled:o,popoverProps:s,modalProps:c,dropdownType:l,children:u,formattedValue:d,dropdownHandlers:f,dropdownOpened:p,onClick:m,clearable:h,clearSectionMode:g,onClear:_,clearButtonProps:v,rightSection:y,shouldClear:b,readOnly:x,disabled:S,value:C,name:w,form:T,type:E,onDropdownClose:D,withTime:O,...k}=hU(`PickerInputBase`,{size:`sm`},e),A=(0,J.jsx)(mU.ClearButton,{onClick:_,unstyled:o,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),f.close()};return(0,J.jsxs)(J.Fragment,{children:[l===`modal`&&!x&&(0,J.jsx)(Uq,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,J.jsx)(mU.Wrapper,{...n,children:(0,J.jsxs)(YB,{position:`bottom-start`,opened:p,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:D,...s,disabled:s?.disabled||l===`modal`||x,onChange:e=>{e||(s?.onClose?.(),j())},children:[(0,J.jsx)(YB.Target,{children:(0,J.jsx)(mU,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:S,component:`button`,type:`button`,multiline:!0,onClick:e=>{m?.(e),f.toggle()},__clearSection:A,__clearable:h&&b&&!x&&!S,__clearSectionMode:g,rightSection:y,...t,classNames:{...i,input:DN(G4.input,i?.input)},...k,children:d||(0,J.jsx)(mU.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,J.jsx)(YB.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,J.jsx)(d2,{value:C,name:w,form:T,type:E,withTime:O})]})});K4.classes=G4,K4.displayName=`@mantine/dates/PickerInputBase`;var q4=e=>e===`range`?[null,null]:e===`multiple`?[]:null,J4=(e,t)=>{let n=t?a2:i2;return Array.isArray(e)?e.map(n):n(e)};function Y4({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,q.useRef)(e),[o,s,c]=zM({value:J4(t,i),defaultValue:J4(n,i),finalValue:q4(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?q4(e):n,s(l))),[l,s,c]}function X4(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function Z4(e){return e===0?`month`:e===1?`year`:`decade`}function Q4(e,t,n){return Z4(sM(X4(e,0),X4(t,0),X4(n,2)))}var $4={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},e3=Q(e=>{let t=Z(`Calendar`,$4,e),{vars:n,maxLevel:r,minLevel:i,defaultLevel:a,level:o,onLevelChange:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,headerControlsOrder:b,__updateDateOnYearSelect:x,__updateDateOnMonthSelect:S,__setDateRef:C,__setLevelRef:w,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,monthLabelFormat:P,nextIcon:F,previousIcon:ee,__onDayClick:I,__onDayMouseEnter:te,withCellSpacing:ne,highlightToday:L,withWeekNumbers:re,monthsListFormat:ie,getMonthControlProps:ae,yearLabelFormat:oe,yearsListFormat:se,getYearControlProps:ce,decadeLabelFormat:le,classNames:ue,styles:R,unstyled:de,minDate:z,maxDate:fe,locale:pe,__staticSelector:me,size:he,__preventFocus:ge,__stopPropagation:_e,onNextDecade:ve,onPreviousDecade:ye,onNextYear:be,onPreviousYear:B,onNextMonth:xe,onPreviousMonth:V,static:H,enableKeyboardNavigation:Se,fullWidth:Ce,attributes:we,ref:Te,...Ee}=t,{resolvedClassNames:De,resolvedStyles:Oe}=UP({classNames:ue,styles:R,props:t}),[ke,Ae]=zM({value:o?Q4(o,i,r):void 0,defaultValue:a?Q4(a,i,r):void 0,finalValue:Q4(void 0,i,r),onChange:s}),[je,Me]=Y4({type:`default`,value:i2(c),defaultValue:i2(l),onChange:u});(0,q.useImperativeHandle)(C,()=>e=>{Me(e)}),(0,q.useImperativeHandle)(w,()=>e=>{Ae(e)});let Ne={__staticSelector:me||`Calendar`,styles:Oe,classNames:De,unstyled:de,size:he,attributes:we},U=f||d||1,Pe=(0,q.useRef)(null);if(Pe.current===null){let e=new Date;Pe.current=z&&(0,Y.default)(e).isAfter(z)?z:(0,Y.default)(e).format(`YYYY-MM-DD`)}let Fe=je||Pe.current,Ie=()=>{let e=(0,Y.default)(Fe).add(U,`month`).format(`YYYY-MM-DD`);xe?.(e),Me(e)},Le=()=>{let e=(0,Y.default)(Fe).subtract(U,`month`).format(`YYYY-MM-DD`);V?.(e),Me(e)},Re=()=>{let e=(0,Y.default)(Fe).add(U,`year`).format(`YYYY-MM-DD`);be?.(e),Me(e)},ze=()=>{let e=(0,Y.default)(Fe).subtract(U,`year`).format(`YYYY-MM-DD`);B?.(e),Me(e)},Be=()=>{let e=(0,Y.default)(Fe).add(10*U,`year`).format(`YYYY-MM-DD`);ve?.(e),Me(e)},Ve=()=>{let e=(0,Y.default)(Fe).subtract(10*U,`year`).format(`YYYY-MM-DD`);ye?.(e),Me(e)},He=(0,q.useRef)(null);return(0,q.useEffect)(()=>{if(!Se||H)return;let e=e=>{if(!He.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),Ve()):t&&(e.preventDefault(),ze());break;case`ArrowDown`:t&&n?(e.preventDefault(),Be()):t&&(e.preventDefault(),Re());break;case`y`:case`Y`:ke===`month`&&(e.preventDefault(),Ae(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[Se,H,ke,Re,ze,Be,Ve]),(0,J.jsxs)($,{ref:IM(He,Te),size:he,"data-calendar":!0,"data-full-width":Ce||void 0,...Ee,children:[ke===`month`&&(0,J.jsx)(W4,{month:Fe,minDate:z,maxDate:fe,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,onNext:Ie,onPrevious:Le,hasNextLevel:r!==`month`,onLevelClick:()=>Ae(`year`),numberOfColumns:d,locale:pe,levelControlAriaLabel:p?.monthLevelControl,nextLabel:p?.nextMonth??m,nextIcon:F,previousLabel:p?.previousMonth??h,previousIcon:ee,monthLabelFormat:P,__onDayClick:I,__onDayMouseEnter:te,__preventFocus:ge,__stopPropagation:_e,static:H,withCellSpacing:ne,highlightToday:L,withWeekNumbers:re,headerControlsOrder:b,fullWidth:Ce,...Ne}),ke===`year`&&(0,J.jsx)(H4,{year:Fe,numberOfColumns:d,minDate:z,maxDate:fe,monthsListFormat:ie,getMonthControlProps:ae,locale:pe,onNext:Re,onPrevious:ze,hasNextLevel:r!==`month`&&r!==`year`,onLevelClick:()=>Ae(`decade`),levelControlAriaLabel:p?.yearLevelControl,nextLabel:p?.nextYear??m,nextIcon:F,previousLabel:p?.previousYear??h,previousIcon:ee,yearLabelFormat:oe,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Me(t),Ae(Q4(`month`,i,r)),_?.(t)},__preventFocus:ge,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Ce,...Ne}),ke===`decade`&&(0,J.jsx)(B4,{decade:Fe,minDate:z,maxDate:fe,yearsListFormat:se,getYearControlProps:ce,locale:pe,onNext:Be,onPrevious:Ve,numberOfColumns:d,nextLabel:p?.nextDecade??m,nextIcon:F,previousLabel:p?.previousDecade??h,previousIcon:ee,decadeLabelFormat:le,__onControlMouseEnter:v,__onControlClick:(e,t)=>{x&&Me(t),Ae(Q4(`year`,i,r)),g?.(t)},__preventFocus:ge,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Ce,...Ne})]})});e3.classes={...B4.classes,...H4.classes,...W4.classes},e3.displayName=`@mantine/dates/Calendar`;function t3(e){let{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,__setLevelRef:j,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:F,weekendDays:ee,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:L,hideWeekdays:re,getDayAriaLabel:ie,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:R,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me,...he}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:F,weekendDays:ee,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:L,hideWeekdays:re,getDayAriaLabel:ie,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:R,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me},others:he}}function n3(e,t){let n=[...t].sort((e,t)=>(0,Y.default)(e).isAfter((0,Y.default)(t))?1:-1);return(0,Y.default)(n[0]).startOf(`day`).subtract(1,`ms`).isBefore(e)&&(0,Y.default)(n[1]).endOf(`day`).add(1,`ms`).isAfter(e)}function r3({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=Y4({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,q.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,q.useState)(null),m=n=>{if(e===`range`){if(u&&!c[1]){if((0,Y.default)(n).isSame(u,t)&&!a){d(null),p(null),l([null,null]);return}let e=[n,u];e.sort((e,t)=>(0,Y.default)(e).isAfter((0,Y.default)(t))?1:-1),l(e),p(null),d(null);return}if(c[0]&&!c[1]&&(0,Y.default)(n).isSame(c[0],t)&&!a){d(null),p(null),l([null,null]);return}l([n,null]),p(null),d(n);return}if(e===`multiple`){c.some(e=>(0,Y.default)(e).isSame(n,t))?l(c.filter(e=>!(0,Y.default)(e).isSame(n,t))):l([...c,n]);return}c&&o&&(0,Y.default)(n).isSame(c,t)?l(null):l(n)},h=e=>u&&f?n3(e,[f,u]):c[0]&&c[1]?n3(e,c):!1,g=e===`range`?e=>{s?.(e),p(null)}:s,_=e=>c[0]&&(0,Y.default)(e).isSame(c[0],t)?!(f&&(0,Y.default)(f).isBefore(c[0])):!1,v=e=>c[1]?(0,Y.default)(e).isSame(c[1],t):!c[0]||!f?!1:(0,Y.default)(f).isBefore(c[0])&&(0,Y.default)(e).isSame(c[0],t),y=n=>{if(e===`range`)return{selected:c.some(e=>e&&(0,Y.default)(e).isSame(n,t)),inRange:h(n),firstInRange:_(n),lastInRange:v(n),"data-autofocus":!!c[0]&&(0,Y.default)(c[0]).isSame(n,t)||void 0};if(e===`multiple`)return{selected:c.some(e=>e&&(0,Y.default)(e).isSame(n,t)),"data-autofocus":!!c[0]&&(0,Y.default)(c[0]).isSame(n,t)||void 0};let r=(0,Y.default)(c).isSame(n,t);return{selected:r,"data-autofocus":r||void 0}},b=e===`range`&&u?p:()=>{};return(0,q.useEffect)(()=>{if(e===`range`)if(c[0]&&!c[1])d(c[0]);else{let e=c[0]==null&&c[1]==null,t=c[0]!=null&&c[1]!=null;(e||t)&&(d(null),p(null))}},[c]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:y,_value:c,setValue:l}}var i3={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},a3=TN((e,{size:t})=>({datePickerRoot:{"--preset-font-size":$j(t)}})),o3={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},s3=Q(e=>{let t=Z(`DatePicker`,o3,e),{allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s,classNames:c,styles:l,__staticSelector:u,__onDayClick:d,__onDayMouseEnter:f,__onPresetSelect:p,__stopPropagation:m,presets:h,className:g,style:_,unstyled:v,size:y,vars:b,attributes:x,...S}=t,{calendarProps:C,others:w}=t3(S),T=(0,q.useRef)(null),E=(0,q.useRef)(null),D=rF({name:u||`DatePicker`,classes:i3,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:a3,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=r3({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:F}=UP({classNames:c,styles:l,props:t}),ee=(0,J.jsx)(e3,{classNames:P,styles:F,__staticSelector:u||`DatePicker`,onMouseLeave:k,size:y,...C,...h?{}:w,__stopPropagation:m,__setDateRef:T,__setLevelRef:E,minLevel:C.minLevel||`month`,__onDayMouseEnter:(e,t)=>{A(t),f?.(e,t)},__onDayClick:(e,t)=>{O(t),d?.(e,t)},getDayProps:e=>({...j(e),...C.getDayProps?.(e)}),getMonthControlProps:e=>({selected:typeof M==`string`?t4(e,M):!1,...C.getMonthControlProps?.(e)}),getYearControlProps:e=>({selected:typeof M==`string`?(0,Y.default)(e).isSame(M,`year`):!1,...C.getYearControlProps?.(e)}),hideOutsideDates:C.hideOutsideDates??C.numberOfColumns!==1,attributes:x,...h?{}:{className:g,style:_}});if(!h)return ee;let I=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(T.current?.(t),E.current?.(`month`),p?p(t):N(e))},te=h.map((e,t)=>(0,J.jsx)(oB,{...D(`presetButton`),onClick:()=>I(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":m||void 0,children:e.label},t));return(0,J.jsxs)($,{...D(`datePickerRoot`),size:y,...w,children:[(0,J.jsx)(`div`,{...D(`presetsList`),children:te}),ee]})});s3.classes=e3.classes,s3.varsResolver=a3,s3.displayName=`@mantine/dates/DatePicker`;function c3(e){if(e===null)return null;let t=new Date(e);return Number.isNaN(t.getTime())||!e?null:(0,Y.default)(t).format(`YYYY-MM-DD`)}function l3({date:e,maxDate:t,minDate:n}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&(0,Y.default)(e).isAfter(t,`date`)||n&&(0,Y.default)(e).isBefore(n,`date`))}var u3={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},d3=Q(e=>{let{inputProps:t,wrapperProps:n,value:r,defaultValue:i,onChange:a,clearable:o,clearSectionMode:s,clearButtonProps:c,popoverProps:l,getDayProps:u,locale:d,valueFormat:f,withTime:p,dateParser:m,minDate:h,maxDate:g,fixOnBlur:_,onFocus:v,onBlur:y,onClick:b,onKeyDown:x,readOnly:S,name:C,form:w,rightSection:T,unstyled:E,classNames:D,styles:O,allowDeselect:k,date:A,defaultDate:j,onDateChange:M,getMonthControlProps:N,getYearControlProps:P,disabled:F,...ee}=hU(`DateInput`,u3,e),I=(0,q.useRef)(null),te=(0,q.useRef)(null),[ne,L]=(0,q.useState)(!1),{calendarProps:re,others:ie}=t3(ee),ae=l2(),oe=m||(e=>{let t=(0,Y.default)(e,f,ae.getLocale(d)).toDate();return Number.isNaN(t.getTime())?c3(e):(0,Y.default)(t).format(p?`YYYY-MM-DD HH:mm:ss`:`YYYY-MM-DD`)}),se=k===void 0?o:k,ce=e=>e?(0,Y.default)(e).locale(ae.getLocale(d)).format(f):``,[le,ue,R]=Y4({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[de,z]=Y4({type:`default`,value:A,defaultValue:i||j,onChange:M});(0,q.useEffect)(()=>{R&&r!==null&&z(r)},[R,r]);let[fe,pe]=(0,q.useState)(ce(le));(0,q.useEffect)(()=>{pe(ce(le))},[ae.getLocale(d)]);let me=e=>{let t=e.currentTarget.value;if(pe(t),L(!0),t.trim()===``&&(k||o))ue(null);else{let e=oe(t);e&&l3({date:e,minDate:h,maxDate:g})&&(ue(e),z(e))}},he=e=>{y?.(e),L(!1),_&&pe(ce(le))},ge=e=>{v?.(e),L(!0)},_e=e=>{b?.(e),L(!0)},ve=e=>{e.key===`Escape`&&L(!1),x?.(e)},ye=e=>({...u?.(e),selected:(0,Y.default)(le).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=se&&(0,Y.default)(le).isSame(e,`day`)?null:e;ue(n),!R&&n&&pe(ce(n)),L(!1)}}),be=(0,J.jsx)(mU.ClearButton,{onClick:()=>{ue(null),!R&&pe(``),L(!1)},unstyled:E,...c}),B=o&&!!le&&!S&&!F;return vM(()=>{le!==void 0&&!ne&&pe(ce(le))},[le]),pM(()=>L(!1),void 0,[I.current,te.current]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(mU.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,J.jsxs)(YB,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||F,withRoles:!1,unstyled:E,...l,children:[(0,J.jsx)(YB.Target,{children:(0,J.jsx)(mU,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,value:fe,onChange:me,onBlur:he,onFocus:ge,onClick:_e,onKeyDown:ve,readOnly:S,rightSection:T,__clearSection:be,__clearable:B,__clearSectionMode:s,...t,...ie,disabled:F,__staticSelector:`DateInput`})}),(0,J.jsx)(YB.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,J.jsx)(e3,{__staticSelector:`DateInput`,...re,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:h,maxDate:g,locale:d,getDayProps:ye,size:t.size,date:de,onDateChange:z,getMonthControlProps:e=>({selected:typeof le==`string`?t4(e,le):!1,...N?.(e)}),getYearControlProps:e=>({selected:typeof le==`string`?(0,Y.default)(e).isSame(le,`year`):!1,...P?.(e)}),attributes:n.attributes})})]})}),(0,J.jsx)(d2,{name:C,form:w,value:le,type:`default`,withTime:p})]})});d3.classes={...mU.classes,...e3.classes},d3.displayName=`@mantine/dates/DateInput`;function f3({minDate:e,value:t}){let n=e?(0,Y.default)(e).format(`HH:mm:ss`):null;return t&&e&&t===e?n??void 0:void 0}function p3({maxDate:e,value:t}){let n=e?(0,Y.default)(e).format(`HH:mm:ss`):null;return t&&e&&t===e?n??void 0:void 0}var m3={timeWrapper:`m_208d2562`,timeInput:`m_62ee059`},h3={dropdownType:`popover`,size:`sm`},g3=Q(e=>{let t=Z(`DateTimePicker`,h3,e),{value:n,defaultValue:r,onChange:i,valueFormat:a,locale:o,classNames:s,styles:c,unstyled:l,timePickerProps:u,submitButtonProps:d,withSeconds:f,level:p,defaultLevel:m,size:h,variant:g,dropdownType:_,vars:v,minDate:y,maxDate:b,defaultDate:x,defaultTimeValue:S,presets:C,attributes:w,onDropdownClose:T,...E}=t,D=rF({name:`DateTimePicker`,classes:m3,props:t,classNames:s,styles:c,unstyled:l,attributes:w,vars:v}),{resolvedClassNames:O,resolvedStyles:k}=UP({classNames:s,styles:c,props:t}),A=a||(f?`DD/MM/YYYY HH:mm:ss`:`DD/MM/YYYY HH:mm`),j=(0,q.useRef)(null),M=IM(j,u?.hoursRef),{calendarProps:{allowSingleDateInRange:N,...P},others:F}=t3(E),ee=l2(),[I,te]=Y4({type:`default`,value:n,defaultValue:r,onChange:i,withTime:!0}),ne=x||I,L=e=>e?(0,Y.default)(e).format(f?`HH:mm:ss`:`HH:mm`):``,[re,ie]=(0,q.useState)(S||L(I)),[ae,oe]=(0,q.useState)(p||m||`month`),[se,ce]=aN(!1),le=I?(0,Y.default)(I).locale(ee.getLocale(o)).format(A):``,ue=e=>{u?.onChange?.(e),ie(e),e&&te(r2(I,e))},R=e=>{e&&te(r2(s2(y,b,e),re||S||``)),j.current?.focus()},de=e=>{e.key===`Enter`&&(e.preventDefault(),ce.close())};vM(()=>{se||ie(L(I))},[I,se]),vM(()=>{se&&oe(`month`)},[se]);let z=_===`popover`,fe=()=>{let e=s2(y,b,I);I&&I!==e&&te(s2(y,b,I)),T?.()};return(0,J.jsxs)(K4,{formattedValue:le,dropdownOpened:E.disabled?!1:se,dropdownHandlers:ce,classNames:O,styles:k,unstyled:l,onClear:()=>te(null),shouldClear:!!I,value:I,size:h,variant:g,dropdownType:_,...F,type:`default`,__staticSelector:`DateTimePicker`,onDropdownClose:fe,withTime:!0,attributes:w,children:[(0,J.jsx)(s3,{...P,maxDate:b,minDate:y,size:h,variant:g,type:`default`,value:I,defaultDate:ne||o2({maxDate:b,minDate:y}),onChange:R,locale:o,classNames:O,styles:k,unstyled:l,__staticSelector:`DateTimePicker`,__stopPropagation:z,level:p,defaultLevel:m,onLevelChange:e=>{oe(e),P.onLevelChange?.(e)},presets:C,__onPresetSelect:e=>{te(e),e&&ie(L(e))},attributes:w}),ae===`month`&&(0,J.jsxs)(`div`,{...D(`timeWrapper`),children:[(0,J.jsx)(W2,{value:re,withSeconds:f,unstyled:l,min:f3({minDate:y,value:I}),max:p3({maxDate:b,value:I}),...u,...D(`timeInput`,{className:u?.className,style:u?.style}),onChange:ue,onKeyDown:de,size:h,"data-mantine-stop-propagation":z||void 0,hoursRef:M,attributes:w}),(0,J.jsx)(dV,{variant:`default`,size:`input-${h||`sm`}`,...D(`submitButton`,{className:d?.className,style:d?.style}),unstyled:l,"data-mantine-stop-propagation":z||void 0,children:(0,J.jsx)(BW,{size:`30%`}),...d,onClick:e=>{d?.onClick?.(e),ce.close(),fe()}})]})]})});g3.classes={...m3,...K4.classes,...s3.classes},g3.displayName=`@mantine/dates/DateTimePicker`;var _3=e=>{let t=ij(e.input),[n,r]=oj(e.input),{inputProps:i,id:a,icon:o,format:s}=q0(e,t);if(!e.input?.props)return null;if(e.datetime||s===`date-time`){let t=typeof e.datetime==`object`?e.datetime:{};return(0,J.jsx)(g3,{...i,id:a,leftSection:o,value:n?new Date(n):null,onChange:e=>r(e?new Date(e).toISOString():void 0),...t})}if(e.date||s===`date`){let t=typeof e.date==`object`?e.date:{};return(0,J.jsx)(d3,{...i,id:a,leftSection:o,value:n?new Date(n):null,onChange:e=>r(e?new Date(e).toISOString().slice(0,10):void 0),...t})}if(e.time||s===`time`){let t=typeof e.time==`object`?e.time:{};return(0,J.jsx)(p2,{...i,id:a,leftSection:o,value:n??``,onChange:e=>r(e.currentTarget.value),...t})}return null},v3=e=>{let t=ij(e.input),[n,r]=oj(e.input),{inputProps:i,id:a,icon:o}=q0(e,t);if(!e.input?.props)return null;if(e.sliderProps){let t=e.sliderProps.min??i.minimum??0,o=e.sliderProps.max??i.maximum??100;return(0,J.jsx)(mU.Wrapper,{...i,children:(0,J.jsx)(`div`,{style:{height:32,padding:8},children:(0,J.jsx)(AX,{...i,id:a,...e.sliderProps,value:n??0,min:t,max:o,label:()=>n,onChange:e=>r(e)})})})}return(0,J.jsx)(SY,{...i,id:a,leftSection:o,...e.numberInputProps,value:n??``,onChange:e=>{r(e===null?void 0:Number(e))}})},y3=e=>{let{inputProps:t}=q0(e,{});if(!e.input?.props)return null;let n=e.input.schema;if(!n?.properties)return null;let r=Object.keys(n.properties),i=12/(e.columns??1),a=e.input.items,o=()=>(0,J.jsx)(BK,{children:r.map(t=>{let n=e.controlProps?.[t]??{},r=a?.[t];return r?(0,J.jsx)(BK.Col,{span:i,children:(0,J.jsx)(G3,{input:r,...n})},t):null})});return e.variant===`plain`?o():(0,J.jsx)(CK,{legend:t.label,children:(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[t.description&&(0,J.jsx)(jU,{size:`sm`,c:`dimmed`,children:t.description}),o(),t.error&&(0,J.jsx)(jU,{size:`sm`,c:`red`,children:t.error})]})})};function b3(e){return!e||e.trim()===``?{}:new x3(e).parse()}var x3=class{pos=0;query;constructor(e){this.query=e.trim()}parse(){return this.parseExpression()}parseExpression(){return this.parseOr()}parseOr(){let e=this.parseAnd();if(this.peek()===`|`){let t=[e];for(;this.peek()===`|`;)this.consume(`|`),t.push(this.parseAnd());return{or:t}}return e}parseAnd(){let e=this.parsePrimary();if(this.peek()===`&`){let t=[e];for(;this.peek()===`&`;)this.consume(`&`),t.push(this.parsePrimary());return{and:t}}return e}parsePrimary(){if(this.skipWhitespace(),this.peek()===`(`){this.consume(`(`);let e=this.parseExpression();return this.consume(`)`),e}return this.parseCondition()}parseCondition(){let e=this.parseFieldPath();this.skipWhitespace();let t=this.parseOperator();this.skipWhitespace();let n=this.parseValue();if(n===``)throw new p(`Expected value for field '${e.join(`.`)}'`);return this.buildCondition(e,t,n)}parseFieldPath(){let e=[],t=``;for(;this.pos<this.query.length;){let n=this.query[this.pos];if(n===`.`&&t){e.push(t),t=``,this.pos++;continue}if(n===`=`||n===`!`||n===`>`||n===`<`||n===` `)break;t+=n,this.pos++}return t&&e.push(t),e}parseOperator(){this.skipWhitespace();let e=this.query.slice(this.pos);if(e.startsWith(`>=`))return this.pos+=2,`>=`;if(e.startsWith(`<=`))return this.pos+=2,`<=`;if(e.startsWith(`!=`))return this.pos+=2,`!=`;let t=this.query[this.pos];if(t===`=`||t===`>`||t===`<`)return this.pos++,t;throw new p(`Expected operator at position ${this.pos}`)}parseValue(){if(this.skipWhitespace(),this.query.slice(this.pos,this.pos+4).toLowerCase()===`null`)return this.pos+=4,null;if(this.query[this.pos]===`[`)return this.parseArray();if(this.query[this.pos]===`"`||this.query[this.pos]===`'`)return this.parseQuotedString();let e=``;for(;this.pos<this.query.length;){let t=this.query[this.pos];if(t===`&`||t===`|`||t===`)`)break;e+=t,this.pos++}return this.coerceValue(e.trim())}parseArray(){this.consume(`[`);let e=[];for(;this.pos<this.query.length&&this.query[this.pos]!==`]`;){if(this.skipWhitespace(),this.query[this.pos]===`"`||this.query[this.pos]===`'`)e.push(this.parseQuotedString());else{let t=``;for(;this.pos<this.query.length&&this.query[this.pos]!==`,`&&this.query[this.pos]!==`]`;)t+=this.query[this.pos],this.pos++;e.push(this.coerceValue(t.trim()))}this.skipWhitespace(),this.query[this.pos]===`,`&&this.pos++}return this.consume(`]`),e}parseQuotedString(){let e=this.query[this.pos];this.pos++;let t=``,n=!1;for(;this.pos<this.query.length;){let r=this.query[this.pos];if(n){t+=r,n=!1,this.pos++;continue}if(r===`\\`){n=!0,this.pos++;continue}if(r===e){this.pos++;break}t+=r,this.pos++}return t}coerceValue(e){return/^-?\d+$/.test(e)?parseInt(e,10):/^-?\d+\.\d+$/.test(e)?parseFloat(e):e.toLowerCase()===`true`?!0:e.toLowerCase()===`false`?!1:e}buildCondition(e,t,n){let r;if(t===`=`)if(n===null)r={isNull:!0};else if(Array.isArray(n))r={inArray:n};else if(typeof n==`string`&&n.includes(`*`)){let e=n.startsWith(`*`),t=n.endsWith(`*`),i=n.replace(/^\*|\*$/g,``);r=e&&t?{contains:i}:e?{endsWith:i}:t?{startsWith:i}:{eq:n}}else r={eq:n};else if(t===`!=`)r=n===null?{isNotNull:!0}:{ne:n};else if(t===`>`)r={gt:n};else if(t===`>=`)r={gte:n};else if(t===`<`)r={lt:n};else if(t===`<=`)r={lte:n};else throw new p(`Unsupported operator: ${t}`);if(e.length===1)return{[e[0]]:r};let i=r;for(let t=e.length-1;t>=0;t--)i={[e[t]]:i};return i}peek(){return this.skipWhitespace(),this.query[this.pos]||``}consume(e){if(this.skipWhitespace(),this.query[this.pos]!==e)throw new p(`Expected '${e}' at position ${this.pos}, got '${this.query[this.pos]}'`);this.pos++}skipWhitespace(){for(;this.pos<this.query.length&&/\s/.test(this.query[this.pos]);)this.pos++}},S3=(e,t,n)=>(Object.assign(e,{[t]:n??{}}),e),C3=Symbol.for(`Alepha.Postgres.Default`),w3=Symbol.for(`Alepha.Postgres.PrimaryKey`),T3=Symbol.for(`Alepha.Postgres.CreatedAt`),E3=Symbol.for(`Alepha.Postgres.UpdatedAt`),D3=Symbol.for(`Alepha.Postgres.DeletedAt`),O3=Symbol.for(`Alepha.Postgres.Version`),k3=Symbol.for(`Alepha.Postgres.Identity`),A3=Symbol.for(`Alepha.Postgres.Enum`),j3=Symbol.for(`Alepha.Postgres.Ref`),M3=Symbol.for(`Alepha.Postgres.Generated`),N3=Symbol.for(`Alepha.Postgres.Organization`),P3=Symbol.for(`Alepha.Postgres.Serial`),F3=e=>{let t={};for(let n in e.properties){let r=e.properties[n];M3 in r||(C3 in r?t[n]=K.optional(r):t[n]=r)}return K.object(t,`options`in e&&typeof e.options==`object`?{...e.options}:{})},I3=e=>{let t={};for(let n in e.properties){let r=e.properties[n];M3 in r||(K.schema.isOptional(r)?t[n]=K.optional(K.union([r,K.raw.Null()])):t[n]=r)}return K.object(t,`options`in e&&typeof e.options==`object`?{...e.options}:{})},L3=e=>new R3(e),R3=class e{options;constructor(e){this.options=e}alias(t){let n=new e(this.options);return new Proxy(n,{get(e,n,r){return n===`$alias`?t:Reflect.get(e,n,r)}})}get cols(){let e={};for(let t of Object.keys(this.schema.properties))e[t]={name:t,entity:this};return e}get name(){return this.options.name}get schema(){return this.options.schema}get insertSchema(){return F3(this.options.schema)}get updateSchema(){return I3(this.options.schema)}};L3[u]=R3;var z3=e=>new B3(e),B3=class{options;isView=!0;constructor(e){this.options=e}get name(){return this.options.name}get schema(){return this.options.schema}get materialized(){return this.options.materialized??!1}};z3[u]=B3,new class{attr=S3;identityPrimaryKey=(e,t)=>S3(S3(S3(K.integer(t),w3),k3,e),C3);bigIdentityPrimaryKey=(e,t)=>S3(S3(S3(K.int64(t),w3),k3,e),C3);uuidPrimaryKey=()=>S3(S3(K.uuid(),w3),C3);primaryKey(e,t,n){if(!e||K.schema.isInteger(e))return S3(S3(S3(K.integer(t),w3),k3,n),C3);if(K.schema.isString(e)&&e.format===`uuid`)return S3(S3(K.uuid(),w3),C3);if(K.schema.isNumber(e)&&e.format===`int64`)return S3(S3(S3(K.number(t),w3),k3,n),C3);if(K.schema.isBigInt(e))return S3(S3(S3(K.bigint(t),w3),k3,n),C3);throw new p(`Unsupported type for primary key: ${e}`)}default=(e,t)=>(t!=null&&Object.assign(e,{default:t}),this.attr(e,C3));version=(e={})=>this.default(S3(K.integer(e),O3),0);createdAt=e=>S3(S3(K.datetime(e),T3),C3);updatedAt=e=>S3(S3(K.datetime(e),E3),C3);deletedAt=e=>S3(K.optional(K.datetime(e)),D3);organization=()=>S3(K.optional(K.uuid()),N3);enum=(e,t,n)=>S3(K.enum(e,{description:t?.description,...n}),A3,t);ref=(e,t,n)=>{let r=n??{onDelete:K.schema.isOptional(e)?`set null`:`cascade`};return this.attr(e,j3,{ref:t,actions:r})};page=(e,t)=>Hk(e,t)},S3(S3(S3(K.integer(),w3),P3),C3),C({name:`alepha.orm`,primitives:[],services:[mA]});var V3=e=>{let{fields:t,onInsert:n}=e;return(0,J.jsxs)(bU,{gap:`md`,align:`flex-start`,wrap:`nowrap`,bg:h0.colors.surface,p:`sm`,bdrs:`sm`,children:[(0,J.jsxs)(bU,{direction:`column`,gap:`md`,style:{flex:1},children:[(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(jU,{size:`sm`,fw:600,children:`Operators`}),(0,J.jsx)(bU,{direction:`column`,gap:4,children:Object.entries(r6).map(([e,t])=>(0,J.jsxs)(bU,{gap:`xs`,wrap:`nowrap`,children:[(0,J.jsx)(_0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(t.symbol),children:t.symbol}),(0,J.jsx)(jU,{size:`xs`,c:`dimmed`,style:{flex:1},children:t.label})]},e))})]}),(0,J.jsx)(yK,{}),(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,children:[(0,J.jsx)(jU,{size:`sm`,fw:600,children:`Logic`}),(0,J.jsxs)(bU,{direction:`column`,gap:4,children:[(0,J.jsxs)(bU,{gap:`xs`,wrap:`nowrap`,children:[(0,J.jsx)(_0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(`&`),children:`&`}),(0,J.jsx)(jU,{size:`xs`,c:`dimmed`,children:`AND`})]}),(0,J.jsxs)(bU,{gap:`xs`,wrap:`nowrap`,children:[(0,J.jsx)(_0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`center`,miw:48,onClick:()=>n(`|`),children:`|`}),(0,J.jsx)(jU,{size:`xs`,c:`dimmed`,children:`OR`})]})]})]})]}),t.length>0&&(0,J.jsx)(yK,{orientation:`vertical`}),t.length>0&&(0,J.jsxs)(bU,{direction:`column`,gap:`xs`,style:{flex:2},children:[(0,J.jsx)(jU,{size:`sm`,fw:600,children:`Fields`}),(0,J.jsx)(bU,{direction:`column`,gap:4,style:{maxHeight:300,overflowY:`auto`},children:t.map(e=>(0,J.jsxs)(bU,{gap:`xs`,wrap:`nowrap`,align:`flex-start`,children:[(0,J.jsx)(_0,{px:`xs`,size:`xs`,h:24,variant:`default`,justify:`end`,miw:120,onClick:()=>n(e.path),children:e.path}),(0,J.jsxs)(bU,{mt:3,direction:`column`,gap:2,style:{flex:1,minWidth:0},children:[(0,J.jsx)(jU,{size:`xs`,c:`dimmed`,lineClamp:1,children:e.description||e.type}),e.enum&&(0,J.jsx)(bU,{gap:0,wrap:`wrap`,children:e.enum.map(e=>(0,J.jsx)(_0,{px:`xs`,size:`xs`,h:24,onClick:()=>n(e),children:e},e))})]}),(0,J.jsx)(tG,{size:`xs`,variant:`light`,style:{flexShrink:0},children:e.type})]},e.path))})]})]})},H3=e=>{let{schema:t,value:n=``,onChange:r,placeholder:i=`Enter query or click for assistance...`,...a}=e,[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(n),u=(0,q.useRef)(null),d=t?n6(t):[],[f,p]=(0,q.useState)(null),m=e=>{try{b3(e.trim())}catch(e){return p(e.message),!1}return p(null),!0},h=e=>{l(e),m(e)&&r?.(e)},g=()=>{l(``),r?.(``),m(``)},_=e=>{let t=c?`${c}${e} `:`${e} `;l(t),m(t)&&r?.(t),setTimeout(()=>{u.current?.focus();let e=u.current?.value.length||0;u.current?.setSelectionRange(e,e)},0)};return tj({"form:change":e=>{e.id===u.current?.form?.id&&e.path===a[`data-path`]&&l(e.value??``)}},[]),(0,J.jsxs)(YB,{width:800,position:`bottom-start`,shadow:`md`,opened:o,onChange:s,closeOnClickOutside:!0,closeOnEscape:!0,transitionProps:{transition:`fade-up`,duration:200,timingFunction:`ease`},children:[(0,J.jsx)(YB.Target,{children:(0,J.jsx)(UX,{ref:u,placeholder:i,value:c,onChange:e=>h(e.currentTarget.value),onFocus:()=>s(!0),leftSection:f?(0,J.jsx)(VQ,{size:16}):(0,J.jsx)(LQ,{size:16}),rightSection:c&&(0,J.jsx)(dV,{size:`sm`,variant:`subtle`,color:`gray`,onClick:g,children:(0,J.jsx)(o$,{size:14})}),...a})}),(0,J.jsx)(YB.Dropdown,{bg:`transparent`,p:`xs`,bd:`1px solid ${h0.colors.border}`,style:{backdropFilter:`blur(20px)`},children:(0,J.jsx)(V3,{fields:d,onInsert:_})})]})},U3=e=>{let t=ij(e.input),[n,r]=oj(e.input),{inputProps:i,id:a,icon:o}=q0(e,t),s=e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`array`,c=e.input.schema&&`type`in e.input.schema&&(e.input.schema.type===`integer`||e.input.schema.type===`number`),l=e.input.schema&&`type`in e.input.schema&&e.input.schema.type===`boolean`,u=e.input.schema&&`enum`in e.input.schema&&Array.isArray(e.input.schema.enum)?e.input.schema.enum:[],{data:d,loading:f,mode:p,search:m}=W3(e.loader,e.loaderThreshold??100,e.loaderDebounce??300,e.input.initialValue),[h,g]=(0,q.useState)([]),_=JSON.stringify(u);(0,q.useEffect)(()=>{!e.input?.props||e.loader||(l&&u.length===0?g([{value:`true`,label:`True`},{value:`false`,label:`False`}]):g(u))},[e.input,e.loader,_,l]);let v=e.loader?d:h;if(!e.input?.props)return null;let y=e=>e==null?e:c?Number(e):l?e===`true`:e;if(e.segmentedProps){let t=typeof e.segmentedProps==`object`?e.segmentedProps:{},a=t.data??v.slice(0,10);return(0,J.jsx)(mU.Wrapper,{...i,children:(0,J.jsx)(bU,{my:`calc(var(--mantine-spacing-xs) / 2)`,children:(0,J.jsx)(eX,{disabled:i.disabled,value:n==null?``:String(n),...t,onChange:e=>{r(y(e))},data:a})})})}let b={size:e.size,id:a,leftSection:f?(0,J.jsx)(rV,{color:`gray`,size:10}):o,data:v},x={...b,searchable:!0,rightSection:(0,J.jsx)(`span`,{})},S=p===`long`?{filter:({options:e})=>e,onSearchChange:m.run}:{};if(e.creatable&&(s||e.tagsInputProps)){let t=e.tagsInputProps??{};return(0,J.jsx)(HX,{...i,...b,...S,value:Array.isArray(n)?n:[],onChange:e=>{r(e)},...t})}if(e.creatable){let t=e.autocompleteProps??{};return(0,J.jsx)(QW,{...i,...b,...S,value:n==null?``:String(n),onChange:e=>{r(y(e))},...t})}if(s||e.multiSelectProps){let t=typeof e.multiSelectProps==`object`?e.multiSelectProps:{};return(0,J.jsx)(sJ,{...i,...x,...S,value:Array.isArray(n)?n:[],onChange:e=>{r(e)},...t})}let C=typeof e.selectProps==`object`?e.selectProps:{};return p===`static`?(0,J.jsx)(nX,{...i,...x,value:n==null?null:String(n),onChange:e=>{r(y(e))},...C}):(0,J.jsx)(nX,{...i,...x,...S,value:n==null?null:String(n),onChange:e=>{r(y(e))},...C})},W3=(e,t,n,r)=>{let[i,a]=(0,q.useState)([]),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(`static`),u=(0,q.useRef)(new Map);return _A({name:`select:loader:init`,runOnInit:!0,handler:async()=>{if(!e){l(`static`);return}s(!0);try{let n=await e(``),i=n.length<=t;if(l(i?`short`:`long`),u.current.set(``,n),a(n),!i&&r!=null&&String(r)!==``){let t=await e(``,[String(r)]);t.length>0&&a(e=>{let n=new Set(e.map(e=>typeof e==`string`?e:e.value)),r=t.filter(e=>{let t=typeof e==`string`?e:e.value;return!n.has(t)});return[...e,...r]})}}finally{s(!1)}}},[e,t]),{data:i,loading:o,mode:c,search:_A({debounce:n,handler:async t=>{if(!(!e||c!==`long`)){if(u.current.has(t)){a(u.current.get(t));return}s(!0);try{let n=await e(t);u.current.set(t,n),a(n)}finally{s(!1)}}}},[e,c,n])}},G3=e=>{let t=ij(e.input,[`error`]),[n,r]=oj(e.input);if(!e.input?.props)return null;let{inputProps:i,id:a,icon:o,format:s,schema:c}=q0(e,t),l={...e,...c.$control};if(l.query)return(0,J.jsx)(H3,{...i,schema:l.query,value:n,onChange:e=>{r(e)}});if(l.custom){let e=l.custom;return(0,J.jsx)(mU.Wrapper,{...i,children:(0,J.jsx)(bU,{flex:1,mt:`calc(var(--mantine-spacing-xs) / 2)`,children:(0,J.jsx)(e,{value:n,onChange:e=>{r(e)}})})})}let u=l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`object`&&`properties`in l.input.schema;if(l.object||u){let e=typeof l.object==`object`?l.object:{};return(0,J.jsx)(y3,{input:l.input,label:l.label,description:l.description,...e})}let d=l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`array`,f=d&&`items`in l.input.schema&&l.input.schema.items&&typeof l.input.schema.items==`object`&&`properties`in l.input.schema.items;if(l.array||f){let e=typeof l.array==`object`?l.array:{};return(0,J.jsx)(Z0,{input:l.input,label:l.label,description:l.description,...e})}if(l.number||!l.select&&l.input.schema&&`type`in l.input.schema&&(l.input.schema.type===`number`||l.input.schema.type===`integer`)){let e=typeof l.number==`object`?l.number:{};return l.slider&&(e.sliderProps??={}),(0,J.jsx)(v3,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,...e})}if(l.file){let e=typeof l.file==`object`?l.file:{};return(0,J.jsx)(EK,{...i,size:l.size,id:a,leftSection:o,onChange:e=>r(e),...e})}if(l.color||s===`color`){let e=typeof l.color==`object`?l.color:{};return(0,J.jsx)(dK,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e),...e})}if(l.input.schema&&`enum`in l.input.schema&&l.input.schema.enum||d&&!f||l.select){let e=typeof l.select==`object`?l.select:{};return l.segmented&&(e.segmentedProps??={}),(0,J.jsx)(U3,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,...e})}if(l.input.schema&&`type`in l.input.schema&&l.input.schema.type===`boolean`){if(l.switch){let e=typeof l.switch==`object`?l.switch:{};return(0,J.jsx)(LX,{...i,size:l.size,id:a,color:`blue`,checked:!!n,onChange:e=>{r(e.currentTarget.checked)},...e})}let e={input:l.input,selectProps:{data:[{value:`true`,label:`Yes`},{value:`false`,label:`No`}]}};return(0,J.jsx)(U3,{size:l.size,label:l.label,description:l.description,icon:o,...e})}if(l.password||l.input.props.name?.includes(`password`)){let e=typeof l.password==`object`?l.password:{};return(0,J.jsx)(DY,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e.target.value),...e})}if(l.area){let e=typeof l.area==`object`?l.area:{};return(0,J.jsx)(sq,{...i,size:l.size,id:a,leftSection:o,value:n??``,onChange:e=>r(e.target.value),...e})}if(l.date||l.datetime||l.time||s===`date`||s===`date-time`||s===`time`)return(0,J.jsx)(_3,{size:l.size,input:l.input,label:l.label,description:l.description,icon:o,date:l.date,datetime:l.datetime,time:l.time});let p=typeof l.text==`object`?l.text:{},m=()=>{switch(s){case`email`:return`email`;case`url`:case`uri`:return`url`;case`tel`:case`phone`:return`tel`;default:return l.input.props.type??`text`}};return(0,J.jsx)(UX,{...i,size:l.size,id:a,leftSection:o,type:m(),value:n??``,onChange:e=>r(e.target.value),...p})},K3=e=>{let{form:t,columns:n=3,children:r,controlProps:i,fieldControlProps:a,skipFormElement:o=!1,skipSubmitButton:s=!1,submitButtonProps:c,fill:l=!0,size:u}=e,{dirty:d}=ij(t,[`dirty`]),f=e.schema||t.options.schema;if(!f?.properties)return null;let p=Object.keys(f.properties),m=typeof n==`number`?{xs:12,sm:6,lg:12/n}:{base:n.base?12/n.base:void 0,xs:n.xs?12/n.xs:12,sm:n.sm?12/n.sm:6,md:n.md?12/n.md:void 0,lg:n.lg?12/n.lg:4,xl:n.xl?12/n.xl:void 0},h=()=>r?(0,J.jsx)(J.Fragment,{children:r(t.input)}):(0,J.jsx)(BK,{children:p.map(e=>{let n=t.input[e],r=f.properties[e];if(!n||!r)return null;let o=r&&`type`in r&&r.type===`object`,s=r&&`type`in r&&r.type===`array`&&`items`in r&&r.items&&`properties`in r.items,c=o||s?12:m,l={...i,...a?.[e]};return u&&(l.size=u),(0,J.jsx)(BK.Col,{span:c,children:(0,J.jsx)(G3,{input:n,...l})},e)})}),g=(0,J.jsxs)(bU,{direction:`column`,gap:`sm`,flex:l?1:void 0,...e.flexProps,children:[(0,J.jsx)(bU,{direction:`column`,gap:`sm`,flex:1,children:h()}),!s&&(0,J.jsx)(bG,{w:`100%`,withBorder:!0,children:(0,J.jsxs)(bU,{gap:`sm`,flex:1,children:[(0,J.jsx)(bU,{}),(0,J.jsx)(bU,{flex:1}),(0,J.jsxs)(bU,{gap:`sm`,children:[(0,J.jsx)(_0,{variant:`subtle`,type:`reset`,disabled:!d,children:`Reset`}),(0,J.jsx)(_0,{intent:`primary`,form:t,disabled:!d,...c,children:c?.children??`Submit`})]})]})})]});return o?g:(0,J.jsx)(bU,{component:`form`,flex:l?1:void 0,...t.props,...e.flexProps,children:g})},q3=e=>{let[t,n]=(0,q.useState)(!1),r=(0,q.useCallback)(t=>{t.stopPropagation(),navigator.clipboard.writeText(e.value),n(!0),setTimeout(()=>n(!1),1500)},[e.value]);return(0,J.jsx)(dV,{size:e.iconSize+4,variant:`transparent`,c:t?`green`:`dimmed`,onClick:r,className:`alepha-json-viewer-copy`,children:t?(0,J.jsx)(AQ,{size:e.iconSize}):(0,J.jsx)(FQ,{size:e.iconSize})})},J3={xs:{icon:14,levelOffset:16},sm:{icon:16,levelOffset:20},md:{icon:18,levelOffset:24},lg:{icon:20,levelOffset:28},xl:{icon:22,levelOffset:32}},Y3={root:{fontFamily:`var(--mantine-font-family-monospace)`},chevron:{flexShrink:0,color:`var(--mantine-color-dimmed)`},key:{color:`var(--mantine-color-cyan-text)`,fontWeight:500},colon:{color:`var(--mantine-color-dimmed)`},string:{color:`var(--mantine-color-teal-text)`},number:{color:`var(--mantine-color-blue-text)`},boolean:{color:`var(--mantine-color-violet-text)`},null:{color:`var(--mantine-color-dimmed)`,fontStyle:`italic`},preview:{color:`var(--mantine-color-dimmed)`}},X3=e=>e===null?`null`:e===void 0?`undefined`:Array.isArray(e)?`array`:typeof e,Z3=e=>{let{nodeValue:t,nodeKey:n,path:r,isArrayItem:i}=e.node,a=X3(t),o=a===`object`||a===`array`,s=()=>{if(!o)return null;let n=(a===`array`?t:Object.keys(t)).length,r=a===`array`?`item`:`key`;return e.expanded?null:(0,J.jsx)(jU,{fs:`italic`,component:`span`,size:e.size,style:Y3.preview,children:n===0?a===`array`?`[]`:`{}`:a===`array`?`[ ${n} ${n===1?r:`${r}s`} ]`:`{ ${n} ${n===1?r:`${r}s`} }`})},c=()=>o?JSON.stringify(t,null,2):String(t??``);return(0,J.jsxs)(bU,{gap:6,wrap:`nowrap`,...e.elementProps,className:`alepha-json-viewer-row ${e.elementProps.className||``}`,children:[e.hasChildren?e.expanded?(0,J.jsx)(jQ,{size:e.config.icon,style:Y3.chevron}):(0,J.jsx)(MQ,{size:e.config.icon,style:Y3.chevron}):(0,J.jsx)(`span`,{style:{width:e.config.icon,flexShrink:0}}),n!==void 0&&!i&&(0,J.jsxs)(jU,{component:`span`,size:e.size,children:[(0,J.jsx)(`span`,{style:Y3.key,children:e.showQuotes?`"${n}"`:n}),(0,J.jsx)(`span`,{style:Y3.colon,children:`:`})]}),n!==void 0&&i&&(0,J.jsxs)(jU,{component:`span`,size:e.size,children:[(0,J.jsx)(`span`,{style:Y3.key,children:n}),(0,J.jsx)(`span`,{style:Y3.colon,children:`:`})]}),e.hasChildren?s():o?a===`array`?(0,J.jsx)(jU,{component:`span`,size:e.size,style:Y3.preview,children:`[]`}):(0,J.jsx)(jU,{component:`span`,size:e.size,style:Y3.preview,children:`{}`}):e.renderValue(t,n,r),e.showCopyButton&&(0,J.jsx)(q3,{value:c(),iconSize:e.config.icon})]})},Q3=e=>{let{data:t,defaultExpandedDepth:n=2,maxDepth:r=10,size:i=`sm`,showQuotes:a=!1,showCopyButton:o=!0,formatValue:s}=e,c=J3[i]||J3.sm,l=(0,q.useMemo)(()=>{let e=X3(t);if(e===`object`||e===`array`){let n=(e===`array`?t.map((e,t)=>[String(t),e]):Object.entries(t)).map(([t,n])=>$3(n,[],t,e===`array`,r)).filter(e=>e!==null);return[{value:`root`,label:``,nodeValue:t,nodeKey:void 0,path:[],isArrayItem:!1,isRoot:!0,children:n.length>0?n:void 0}]}let n=$3(t,[],void 0,!1,r);return n?[n]:[]},[t,r]),u=tZ({initialExpandedState:(0,q.useMemo)(()=>n===0?{}:n===1/0?$X(l,`*`):$X(l,e6(l,n+1)),[l,n])}),d=(0,q.useCallback)((e,t,n)=>{let r=s?.(t,e,n);if(r!==void 0)return(0,J.jsx)(jU,{component:`span`,size:i,style:Y3.string,className:`alepha-json-viewer-value`,title:String(e),children:r});let a=X3(e);switch(a){case`string`:return(0,J.jsxs)(jU,{style:Y3.string,component:`span`,size:i,className:`alepha-json-viewer-value`,title:e,children:[`"`,e,`"`]});case`number`:return(0,J.jsx)(jU,{component:`span`,size:i,style:Y3.number,children:e});case`boolean`:return(0,J.jsx)(jU,{component:`span`,size:i,style:Y3.boolean,children:String(e)});case`null`:case`undefined`:return(0,J.jsx)(jU,{component:`span`,size:i,style:Y3.null,children:a});default:return(0,J.jsx)(jU,{component:`span`,size:i,children:String(e)})}},[s,a,i]),f=(0,q.useCallback)(({node:e,expanded:t,hasChildren:n,elementProps:r})=>(0,J.jsx)(Z3,{node:e,expanded:t,hasChildren:n,elementProps:r,size:i,config:c,showQuotes:a,showCopyButton:o,renderValue:d}),[c,d,o,a,i]);return l.length===0?(0,J.jsx)(jU,{size:i,style:Y3.null,children:t===null?`null`:t===void 0?`undefined`:`{}`}):(0,J.jsx)(cZ,{data:l,tree:u,levelOffset:c.levelOffset,expandOnClick:!0,renderNode:f,styles:{root:Y3.root}})},$3=(e,t=[],n,r=!1,i=10)=>{let a=n===void 0?t:[...t,n],o=a.length>0?a.join(`.`):`root`;if(a.length>i)return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r};let s=X3(e);if(s===`object`||s===`array`){let t=(s===`array`?e.map((e,t)=>[String(t),e]):Object.entries(e)).map(([e,t])=>$3(t,a,e,s===`array`,i)).filter(e=>e!==null);return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r,children:t.length>0?t:void 0}}return{value:o,label:n??``,nodeValue:e,nodeKey:n,path:a,isArrayItem:r}},e6=(e,t,n=0)=>{if(n>=t)return[];let r=[];for(let i of e)i.children&&(r.push(i.value),r.push(...e6(i.children,t,n+1)));return r},t6=(e={})=>{let{alepha:t}=y();return e.themes&&t.store.set(hZ,e.themes),t.inject(K$)};function n6(e,t=``){let n=[];if(!e||typeof e!=`object`)return n;let r=`properties`in e?e.properties:e;if(!r||typeof r!=`object`)return n;for(let[e,i]of Object.entries(r)){if(typeof i!=`object`||!i)continue;let r=i,a=t?`${t}.${e}`:e,o=`format`in r?r.format:void 0,s=`type`in r?r.type:`object`;o===`date-time`?s=`datetime`:o===`date`?s=`date`:o===`time`?s=`time`:o===`duration`&&(s=`duration`);let c={name:e,path:a,type:s,format:o,description:`description`in r?r.description:void 0};`enum`in r&&r.enum&&(c.enum=r.enum,c.type=`enum`),`type`in r&&r.type===`object`&&`properties`in r&&typeof r.properties==`object`&&(c.nested=n6(r.properties,a)),n.push(c),c.nested&&n.push(...c.nested)}return n}var r6={eq:{symbol:`=`,label:`equals`,example:`name=John`},ne:{symbol:`!=`,label:`not equals`,example:`status!=archived`},gt:{symbol:`>`,label:`greater than`,example:`age>18`},gte:{symbol:`>=`,label:`greater or equal`,example:`age>=18`},lt:{symbol:`<`,label:`less than`,example:`age<65`},lte:{symbol:`<=`,label:`less or equal`,example:`age<=65`},null:{symbol:`=null`,label:`is null`,example:`deletedAt=null`},notNull:{symbol:`!=null`,label:`is not null`,example:`email!=null`},in:{symbol:`[...]`,label:`in array`,example:`status=[active,pending]`}},i6=e=>{let{type:t,format:n,name:r,isEnum:i,isArray:a,size:o=`xs`}=e,s=h0.sizes.icon[o]-4;if(n)switch(n){case`email`:return(0,J.jsx)(YQ,{size:s});case`url`:case`uri`:return(0,J.jsx)(qQ,{size:s});case`tel`:case`phone`:return(0,J.jsx)(QQ,{size:s});case`date`:return(0,J.jsx)(kQ,{size:s});case`date-time`:return(0,J.jsx)(kQ,{size:s});case`time`:return(0,J.jsx)(NQ,{size:s});case`color`:return(0,J.jsx)(PQ,{size:s});case`uuid`:return(0,J.jsx)(HQ,{size:s})}if(r){let e=r.toLowerCase();if(e.includes(`password`)||e.includes(`secret`))return(0,J.jsx)(HQ,{size:s});if(e.includes(`email`)||e.includes(`mail`))return(0,J.jsx)(YQ,{size:s});if(e.includes(`url`)||e.includes(`link`))return(0,J.jsx)(qQ,{size:s});if(e.includes(`phone`)||e.includes(`tel`))return(0,J.jsx)(QQ,{size:s});if(e.includes(`color`))return(0,J.jsx)(ZQ,{size:s});if(e.includes(`file`)||e.includes(`upload`))return(0,J.jsx)(IQ,{size:s});if(e.includes(`date`))return(0,J.jsx)(kQ,{size:s});if(e.includes(`time`))return(0,J.jsx)(NQ,{size:s})}if(i||a)return(0,J.jsx)(t$,{size:s});if(t)switch(t){case`boolean`:return(0,J.jsx)(i$,{size:s});case`number`:case`integer`:return(0,J.jsx)(zQ,{size:s});case`array`:return(0,J.jsx)(JQ,{size:s});case`string`:return(0,J.jsx)(KQ,{size:s})}return(0,J.jsx)(OQ,{size:s})},a6=e=>e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),o6=e=>{let t=e.split(`/`).filter(e=>e&&!/^\d+$/.test(e));return a6(t[t.length-1]||e.replaceAll(`/`,``))};C({name:`alepha.ui`,services:[AZ,s$,gZ,K$],register:e=>{e.with(Cj),e.with(hj),e.with(lj),e.with(gZ),e.with(AZ),e.with(s$)}});export{rV as $,TQ as A,Xk as At,BK as B,HQ as C,Gj as Ct,jQ as D,WA as Dt,MQ as E,cj as Et,nX as F,C as Ft,UW as G,bG as H,eX as I,o as It,jU as J,VW as K,XY as L,l as Lt,UX as M,Uk as Mt,LX as N,kk as Nt,AQ as O,_A as Ot,dX as P,K as Pt,gV as Q,SY as R,qQ as S,Xj as St,NQ as T,X as Tt,tG as U,yK as V,WW as W,_U as X,bU as Y,mU as Z,a$ as _,pN as _t,L0 as a,Q as at,YQ as b,MM as bt,E0 as c,rF as ct,U$ as d,lP as dt,dB as et,B$ as f,$N as ft,o$ as g,TN as gt,l$ as h,WN as ht,K0 as i,$ as it,uZ as j,Gk as jt,EQ as k,gA as kt,_0 as l,Z as lt,m$ as m,GN as mt,Q3 as n,nB as nt,k0 as o,FF as ot,E$ as p,ZN as pt,zW as q,K3 as r,WF as rt,O0 as s,sF as st,t6 as t,oB as tt,h0 as u,EP as ut,e$ as v,zM as vt,FQ as w,Bj as wt,JQ as x,Qj as xt,$Q as y,IM as yt,sq as z};