diff --git a/console/embedded/native_css.cpp b/console/embedded/native_css.cpp index 6702668d..fa2f8efb 100644 --- a/console/embedded/native_css.cpp +++ b/console/embedded/native_css.cpp @@ -24,14 +24,13 @@ namespace server { DEFINE_EMBEDDED_PAGE(native_pages, char, css, R"DELIM(@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xl:36rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit)DELIM" R"DELIM(;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6a7282;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is(input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#155dfc;outline:2px solid #0000}input::placeholder,textarea::placeholder{color:#6a7282;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-date-and-time-value{text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}select:where([multiple]),select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}input:where([type=checkbox]),input:where([type=radio]){appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#155dfc;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6a7282;flex-shrink:0;width:1rem;height:1re)DELIM" - R"DELIM(m;padding:0;display:inline-block}input:where([type=checkbox]){border-radius:0}input:where([type=radio]){border-radius:100%}input:where([type=checkbox]):focus,input:where([type=radio]):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input:where([type=checkbox]):checked,input:where([type=radio]):checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}input:where([type=checkbox]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=checkbox]):checked{appearance:auto}}input:where([type=radio]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=radio]):checked{appearance:auto}}input:where([type=checkbox]):checked:hover,input:where([type=checkbox]):checked:focus,input:where([type=radio]):checked:hover,input:where([type=radio]):checked:focus{background-color:currentColor;border-color:#0000}input:where([type=checkbox]):indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media(forced-colors:active){input:where([type=checkbox]):indeterminate{appearance:auto}}input:where([type=checkbox]):indeterminate:hover,input:where([type=checkbox]):indeterminate:focus{background-color:currentColor;border-color:#0000}input:where([type=file]){background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}input:where([type=file]):focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.left-0{left:calc(var(--spacing) * 0)}.z-50{z-index:50}.order-1{order:1}.order-2{order:2}.order-3{order:3}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-8{height:calc(var(--spacing) * 8)}.h-full{height:100%}.max-h-\[60vh\]{max-height:60vh}.min-h-\[calc\(100vh-4rem\)\]{min-height:calc(100vh - 4rem)}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing) * 2)}.w-4{width:calc(var(--spacing) * 4)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-0{max-width:calc(var(--spacing) * 0)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[12rem\]{min-width:12rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) *)DELIM" - R"DELIM( 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-accentSecondary\/30>:not(:last-child)){border-color:#c856374d}.place-self-start{place-self:start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-accent{border-color:#ffa022}.border-accent\/20{border-color:#ffa02233}.border-accent\/30{border-color:#ffa0224d}.border-accent\/40{border-color:#ffa02266}.border-accent\/50{border-color:#ffa02280}.border-accentSecondary\/20{border-color:#c8563733}.border-accentSecondary\/30{border-color:#c856374d}.border-accentSecondary\/40{border-color:#c8563766}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500) 50%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-rose-500\/50{border-color:#ff235780}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/50{border-color:color-mix(in oklab,var(--color-rose-500) 50%,transparent)}}.border-slate-500\/50{border-color:#62748e80}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/50{border-color:color-mix(in oklab,var(--color-slate-500) 50%,transparent)}}.border-textMuted\/30{border-color:#cfcfcf4d}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-accent{background-color:#ffa022}.bg-accent\/5{background-color:#ffa0220d}.bg-accentSecondary{background-color:#c85637}.bg-accentSecondary\/10{background-color:#c856371a}.bg-accentSecondary\/20{background-color:#c8563733}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-background{background-color:#272822}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-current{background-color:currentColor}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)DELIM" - R"DELIM()){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-rose-400{background-color:var(--color-rose-400)}.bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/20{background-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-surface\/60{background-color:#1f211c99}.bg-surface\/80{background-color:#1f211ccc}.bg-surface\/90{background-color:#1f211ce6}.bg-surface\/95{background-color:#1f211cf2}.bg-textPrimary{background-color:#ededed}.bg-transparent{background-color:#0000}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[linear-gradient\(180deg\,rgba\(255\,255\,255\,0\.18\)\,rgba\(255\,255\,255\,0\)\)\]{background-image:linear-gradient(#ffffff2e,#fff0)}.from-accent\/8{--tw-gradient-from:oklab(78.4754% .0670866 .152134/.08);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-surface\/60{--tw-gradient-to:oklab(24.3789% -.00557161 .00797938/.6);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-accent{color:#ffa022}.text-accentSecondary{color:#c85637}.text-amber-300{color:var(--color-amber-300)}.text-emerald-300{color:var(--color-emerald-300)}.text-rose-300{color:var(--color-rose-300)}.text-slate-300{color:var(--color-slate-300)}.text-textMuted{color:#cfcfcf}.text-textPrimary{color:#ededed}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var)DELIM" - R"DELIM((--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-focus-within\:max-w-\[18rem\]:is(:where(.group):focus-within *){max-width:18rem}.group-focus-within\:translate-x-0:is(:where(.group):focus-within *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-focus-within\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media(hover:hover){.group-hover\:max-w-\[18rem\]:is(:where(.group):hover *){max-width:18rem}.group-hover\:translate-x-0:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-textMuted::placeholder{color:#cfcfcf}.first\:text-left:first-child{text-align:left}.last\:text-right:last-child{text-align:right}.focus-within\:justify-start:focus-within{justify-content:flex-start}.focus-within\:gap-2:focus-within{gap:calc(var(--spacing) * 2)}.focus-within\:px-3:focus-within{padding-inline:calc(var(--spacing) * 3)}@media(hover:hover){.hover\:justify-start:hover{justify-content:flex-start}.hover\:gap-2:hover{gap:calc(var(--spacing) * 2)}.hover\:border-accent:hover{border-color:#ffa022}.hover\:border-accentSecondary:hover{border-color:#c85637}.hover\:bg-accentSecondary\/10:hover{background-color:#c856371a}.hover\:px-3:hover{padding-inline:calc(var(--spacing) * 3)}.hover\:text-accent:hover{color:#ffa022}.hover\:text-accentSecondary:hover{color:#c85637}}.focus\:border-accent:focus{border-color:#ffa022}.focus\:ring-accent:focus{--tw-ring-color:#ffa022}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-60:disabled{opacity:.6}@media(prefers-reduced-motion:no-preference){.motion-safe\:-translate-x-1{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.motion-safe\:transition-\[max-width\,opacity\,transform\]{transition-property:max-width,opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.motion-safe\:transition-\[padding\,gap\]{transition-property:padding,gap;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.motion-safe\:duration-200{--tw-duration:.2s;transition-duration:.2s}.motion-safe\:ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}}@media(min-width:40rem){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}@media(min-width:48rem){.md\:order-2{order:2}.md\:order-3{order:3}.md\:order-4{order:4}.md\:ml-auto{margin-left:auto}.md\:hidden{display:none}.md\:inline{display:inline}.md)DELIM" - R"DELIM(\:w-72{width:calc(var(--spacing) * 72)}.md\:w-auto{width:auto}.md\:flex-none{flex:none}.md\:flex-nowrap{flex-wrap:nowrap}}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}}@media(min-width:80rem){.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\,1\.5fr\)_minmax\(20rem\,1fr\)\]{grid-template-columns:minmax(0,1.5fr) minmax(20rem,1fr)}}}:root{color-scheme:dark}body{font-family:var(--font-sans);color:#ededed;background-color:#272822}::selection{color:#272822;background-color:#ffa022}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false} + R"DELIM(m;padding:0;display:inline-block}input:where([type=checkbox]){border-radius:0}input:where([type=radio]){border-radius:100%}input:where([type=checkbox]):focus,input:where([type=radio]):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input:where([type=checkbox]):checked,input:where([type=radio]):checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}input:where([type=checkbox]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=checkbox]):checked{appearance:auto}}input:where([type=radio]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=radio]):checked{appearance:auto}}input:where([type=checkbox]):checked:hover,input:where([type=checkbox]):checked:focus,input:where([type=radio]):checked:hover,input:where([type=radio]):checked:focus{background-color:currentColor;border-color:#0000}input:where([type=checkbox]):indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media(forced-colors:active){input:where([type=checkbox]):indeterminate{appearance:auto}}input:where([type=checkbox]):indeterminate:hover,input:where([type=checkbox]):indeterminate:focus{background-color:currentColor;border-color:#0000}input:where([type=file]){background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}input:where([type=file]):focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-y-0{inset-block:0}.left-0{left:0}.z-50{z-index:50}.order-1{order:1}.order-2{order:2}.order-3{order:3}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-8{height:calc(var(--spacing) * 8)}.h-full{height:100%}.max-h-\[60vh\]{max-height:60vh}.min-h-\[calc\(100vh-4rem\)\]{min-height:calc(100vh - 4rem)}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing) * 2)}.w-4{width:calc(var(--spacing) * 4)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-0{max-width:0}.max-w-7xl{max-width:var(--container-7xl)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\[12rem\]{min-width:12rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:0}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last)DELIM" + R"DELIM(-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-accentSecondary\/30>:not(:last-child)){border-color:#c856374d}.place-self-start{place-self:start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-accent{border-color:#ffa022}.border-accent\/20{border-color:#ffa02233}.border-accent\/30{border-color:#ffa0224d}.border-accent\/40{border-color:#ffa02266}.border-accent\/50{border-color:#ffa02280}.border-accentSecondary\/20{border-color:#c8563733}.border-accentSecondary\/30{border-color:#c856374d}.border-accentSecondary\/40{border-color:#c8563766}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500) 50%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-rose-500\/50{border-color:#ff235780}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/50{border-color:color-mix(in oklab,var(--color-rose-500) 50%,transparent)}}.border-slate-500\/50{border-color:#62748e80}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/50{border-color:color-mix(in oklab,var(--color-slate-500) 50%,transparent)}}.border-textMuted\/30{border-color:#cfcfcf4d}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-accent{background-color:#ffa022}.bg-accent\/5{background-color:#ffa0220d}.bg-accentSecondary{background-color:#c85637}.bg-accentSecondary\/10{background-color:#c856371a}.bg-accentSecondary\/20{background-color:#c8563733}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-background{background-color:#272822}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-current{background-color:currentColor}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-rose-400{background-color:var(--color-rose-400)}.bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/)DELIM" + R"DELIM(15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/20{background-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-surface\/60{background-color:#1f211c99}.bg-surface\/80{background-color:#1f211ccc}.bg-surface\/90{background-color:#1f211ce6}.bg-surface\/95{background-color:#1f211cf2}.bg-textPrimary{background-color:#ededed}.bg-transparent{background-color:#0000}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[linear-gradient\(180deg\,rgba\(255\,255\,255\,0\.18\)\,rgba\(255\,255\,255\,0\)\)\]{background-image:linear-gradient(#ffffff2e,#fff0)}.from-accent\/8{--tw-gradient-from:oklab(78.4754% .0670866 .152134/.08);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-surface\/60{--tw-gradient-to:oklab(24.3789% -.00557161 .00797938/.6);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:var(--spacing)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-accent{color:#ffa022}.text-accentSecondary{color:#c85637}.text-amber-300{color:var(--color-amber-300)}.text-emerald-300{color:var(--color-emerald-300)}.text-rose-300{color:var(--color-rose-300)}.text-slate-300{color:var(--color-slate-300)}.text-textMuted{color:#cfcfcf}.text-textPrimary{color:#ededed}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur)DELIM" + R"DELIM(,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-focus-within\:max-w-\[18rem\]:is(:where(.group):focus-within *){max-width:18rem}.group-focus-within\:translate-x-0:is(:where(.group):focus-within *){--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-focus-within\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media(hover:hover){.group-hover\:max-w-\[18rem\]:is(:where(.group):hover *){max-width:18rem}.group-hover\:translate-x-0:is(:where(.group):hover *){--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-textMuted::placeholder{color:#cfcfcf}.first\:text-left:first-child{text-align:left}.last\:text-right:last-child{text-align:right}.focus-within\:justify-start:focus-within{justify-content:flex-start}.focus-within\:gap-2:focus-within{gap:calc(var(--spacing) * 2)}.focus-within\:px-3:focus-within{padding-inline:calc(var(--spacing) * 3)}@media(hover:hover){.hover\:justify-start:hover{justify-content:flex-start}.hover\:gap-2:hover{gap:calc(var(--spacing) * 2)}.hover\:border-accent:hover{border-color:#ffa022}.hover\:border-accentSecondary:hover{border-color:#c85637}.hover\:bg-accentSecondary\/10:hover{background-color:#c856371a}.hover\:px-3:hover{padding-inline:calc(var(--spacing) * 3)}.hover\:text-accent:hover{color:#ffa022}.hover\:text-accentSecondary:hover{color:#c85637}}.focus\:border-accent:focus{border-color:#ffa022}.focus\:ring-accent:focus{--tw-ring-color:#ffa022}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-60:disabled{opacity:.6}@media(prefers-reduced-motion:no-preference){.motion-safe\:-translate-x-1{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.motion-safe\:transition-\[max-width\,opacity\,transform\]{transition-property:max-width,opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.motion-safe\:transition-\[padding\,gap\]{transition-property:padding,gap;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.motion-safe\:duration-200{--tw-duration:.2s;transition-duration:.2s}.motion-safe\:ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}}@media(min-width:40rem){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}@media(min-width:48rem){.md\:order-2{order:2}.md\:order-3{order:3}.md\:order-4{order:4}.md\:ml-auto{margin-left:auto}.md\:hidden{display:none}.md\:inline{display:inline}.md\:w-72{width:calc(var(--spacing) * 72)}.md\:w-auto{width:auto}.md\:flex-none{flex:none}.md\:flex-nowrap{flex-wrap:nowrap}}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,1fr\)_auto\])DELIM" + R"DELIM({grid-template-columns:minmax(0,1fr) auto}}@media(min-width:80rem){.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\,1\.5fr\)_minmax\(20rem\,1fr\)\]{grid-template-columns:minmax(0,1.5fr) minmax(20rem,1fr)}}}:root{color-scheme:dark}body{font-family:var(--font-sans);color:#ededed;background-color:#272822}::selection{color:#272822;background-color:#ffa022}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false} )DELIM" - ) } // namespace server diff --git a/console/embedded/native_ecma.cpp b/console/embedded/native_ecma.cpp index cd494b36..70002ebe 100644 --- a/console/embedded/native_ecma.cpp +++ b/console/embedded/native_ecma.cpp @@ -22,161 +22,189 @@ namespace libbitcoin { namespace server { DEFINE_EMBEDDED_PAGE(native_pages, char, ecma, - R"DELIM(function ZS(e,a){for(var i=0;il[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function i(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(s){if(s.ep)return;s.ep=!0;const u=i(s);fetch(s.href,u)}})();function ih(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jf={exports:{}},ql={};var zv;function qS(){if(zv)return ql;zv=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(l,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:e,type:l,key:f,ref:s!==void 0?s:null,props:u}}return ql.Fragment=a,ql.jsx=i,ql.jsxs=i,ql}var Av;function PS(){return Av||(Av=1,Jf.exports=qS()),Jf.exports}var g=PS(),If={exports:{}},Oe={};var Cv;function QS(){if(Cv)return Oe;Cv=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,k={};function L(R,C,U){this.props=R,this.context=C,this.refs=k,this.updater=U||T}L.prototype.isReactComponent={},L.prototype.setState=function(R,C){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,C,"setState")},L.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function Q(){}Q.prototype=L.prototype;function G(R,C,U){this.props=R,this.context=C,this.refs=k,this.updater=U||T}var ae=G.prototype=new Q;ae.constructor=G,E(ae,L.prototype),ae.isPureReactComponent=!0;var ee=Array.isArray;function me(){}var te={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function ue(R,C,U){var q=U.ref;return{$$typeof:e,type:R,key:C,ref:q!==void 0?q:null,props:U}}function fe(R,C){return ue(R.type,C,R.props)}function Ee(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function de(R){var C={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(U){return C[U]})}var Te=/\/+/g;function Ce(R,C){return typeof R=="object"&&R!==null&&R.key!=null?de(""+R.key):C.toString(36)}function Y(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(me,me):(R.status="pending",R.then(function(C){R.status==="pending"&&(R.status="fulfilled",R.value=C)},function(C){R.status==="pending"&&(R.status="rejected",R.reason=C)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function j(R,C,U,q,W){var ne=typeof R;(ne==="undefined"||ne==="boolean")&&(R=null);var K=!1;if(R===null)K=!0;else switch(ne){case"bigint":case"string":case"number":K=!0;break;case"object":switch(R.$$typeof){case e:case a:K=!0;break;case b:return K=R._init,j(K(R._payload),C,U,q,W)}}if(K)return W=W(R),K=q===""?"."+Ce(R,0):q,ee(W)?(U="",K!=null&&(U=K.replace(Te,"$&/")+"/"),j(W,C,U,"",function(Ie){return Ie})):W!=null&&(Ee(W)&&(W=fe(W,U+(W.key==null||R&&R.key===W.key?"":(""+W.key).replace(Te,"$&/")+"/")+K)),C.push(W)),1;K=0;var pe=q===""?".":q+":";if(ee(R))for(var ye=0;ye>>1,ie=j[le];if(0>>1;les(U,se))qs(W,U)?(j[le]=W,j[q]=se,le=q):(j[le]=U,j[C]=se,le=C);else if(qs(W,se))j[le]=W,j[)DELIM" - R"DELIM(q]=se,le=q;else break e}}return F}function s(j,F){var se=j.sortIndex-F.sortIndex;return se!==0?se:j.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();e.unstable_now=function(){return f.now()-h}}var m=[],p=[],b=1,v=null,x=3,w=!1,T=!1,E=!1,k=!1,L=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function ae(j){for(var F=i(p);F!==null;){if(F.callback===null)l(p);else if(F.startTime<=j)l(p),F.sortIndex=F.expirationTime,a(m,F);else break;F=i(p)}}function ee(j){if(E=!1,ae(j),!T)if(i(m)!==null)T=!0,me||(me=!0,de());else{var F=i(p);F!==null&&Y(ee,F.startTime-j)}}var me=!1,te=-1,O=5,ue=-1;function fe(){return k?!0:!(e.unstable_now()-uej&&fe());){var le=v.callback;if(typeof le=="function"){v.callback=null,x=v.priorityLevel;var ie=le(v.expirationTime<=j);if(j=e.unstable_now(),typeof ie=="function"){v.callback=ie,ae(j),F=!0;break t}v===i(m)&&l(m),ae(j)}else l(m);v=i(m)}if(v!==null)F=!0;else{var R=i(p);R!==null&&Y(ee,R.startTime-j),F=!1}}break e}finally{v=null,x=se,w=!1}F=void 0}}finally{F?de():me=!1}}}var de;if(typeof G=="function")de=function(){G(Ee)};else if(typeof MessageChannel<"u"){var Te=new MessageChannel,Ce=Te.port2;Te.port1.onmessage=Ee,de=function(){Ce.postMessage(null)}}else de=function(){L(Ee,0)};function Y(j,F){te=L(function(){j(e.unstable_now())},F)}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(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125le?(j.sortIndex=se,a(p,j),i(m)===null&&j===i(p)&&(E?(Q(te),te=-1):E=!0,Y(ee,se-le))):(j.sortIndex=ie,a(m,j),T||w||(T=!0,me||(me=!0,de()))),j},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(j){var F=x;return function(){var se=x;x=F;try{return j.apply(this,arguments)}finally{x=se}}}})(td)),td}var jv;function FS(){return jv||(jv=1,ed.exports=YS()),ed.exports}var nd={exports:{}},Jt={};var Mv;function KS(){if(Mv)return Jt;Mv=1;var e=vo();function a(m){var p="https://react.dev/errors/"+m;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),nd.exports=KS(),nd.exports}var Dv;function VS(){if(Dv)return Pl;Dv=1;var e=FS(),a=vo(),i=A0();function l(t){var n="https://react.dev/errors/"+t;if(1ie||(t.current=le[ie],le[ie]=null,ie--)}function U(t,n){ie++,le[ie]=t.current,t.current=n}var q=R(null),W=R(null),ne=R(null),K=R(null);function pe(t,n){switch(U(ne,n),U(W,t),U(q,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Xy(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Xy(n),t=Jy(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}C(q),U(q,t)}function ye(){C(q),C(W),C(ne)}function Ie(t){t.memoizedState!==null&&U(K,t);var n=q.current,r=Jy(n,t.type);n!==r&&(U(W,t),U(q,r))}function ut(t){W.current===t&&(C(q),C(W)),K.current===t&&(C(K),Ul._currentValue=se)}var gt,it;function Ne(t){if(gt===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);gt=n&&n[1]||"",it=-1l[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function i(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(s){if(s.ep)return;s.ep=!0;const u=i(s);fetch(s.href,u)}})();function mh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pd={exports:{}},ro={};var Zg;function PS(){if(Zg)return ro;Zg=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(l,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:e,type:l,key:c,ref:s!==void 0?s:null,props:u}}return ro.Fragment=a,ro.jsx=i,ro.jsxs=i,ro}var qg;function QS(){return qg||(qg=1,pd.exports=PS()),pd.exports}var v=QS(),yd={exports:{}},Oe={};var Pg;function FS(){if(Pg)return Oe;Pg=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function _(z){return z===null||typeof z!="object"?null:(z=x&&z[x]||z["@@iterator"],typeof z=="function"?z:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,k={};function Y(z,C,$){this.props=z,this.context=C,this.refs=k,this.updater=$||R}Y.prototype.isReactComponent={},Y.prototype.setState=function(z,C){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,C,"setState")},Y.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function X(){}X.prototype=Y.prototype;function ne(z,C,$){this.props=z,this.context=C,this.refs=k,this.updater=$||R}var se=ne.prototype=new X;se.constructor=ne,T(se,Y.prototype),se.isPureReactComponent=!0;var te=Array.isArray;function xe(){}var O={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function L(z,C,$){var G=$.ref;return{$$typeof:e,type:z,key:C,ref:G!==void 0?G:null,props:$}}function H(z,C){return L(z.type,C,z.props)}function Q(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function K(z){var C={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function($){return C[$]})}var he=/\/+/g;function me(z,C){return typeof z=="object"&&z!==null&&z.key!=null?K(""+z.key):C.toString(36)}function W(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(xe,xe):(z.status="pending",z.then(function(C){z.status==="pending"&&(z.status="fulfilled",z.value=C)},function(C){z.status==="pending"&&(z.status="rejected",z.reason=C)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function N(z,C,$,G,ie){var fe=typeof z;(fe==="undefined"||fe==="boolean")&&(z=null);var I=!1;if(z===null)I=!0;else switch(fe){case"bigint":case"string":case"number":I=!0;break;case"object":switch(z.$$typeof){case e:case a:I=!0;break;case b:return I=z._init,N(I(z._payload),C,$,G,ie)}}if(I)return ie=ie(z),I=G===""?"."+me(z,0):G,te(ie)?($="",I!=null&&($=I.replace(he,"$&/")+"/"),N(ie,C,$,"",function(tt){return tt})):ie!=null&&(Q(ie)&&(ie=H(ie,$+(ie.key==null||z&&z.key===ie.key?"":(""+ie.key).replace(he,"$&/")+"/")+I)),C.push(ie)),1;I=0;var ge=G===""?".":G+":";if(te(z))for(var be=0;be>>1,ce=N[de];if(0>>1;des($,ue))Gs(ie,$)?(N[de]=ie,N[G]=ue,de=G):(N[de]=$,N[C]=ue,de=C);else if(Gs(ie,ue))N[de]=ie)DELIM" + R"DELIM(,N[G]=ue,de=G;else break e}}return B}function s(N,B){var ue=N.sortIndex-B.sortIndex;return ue!==0?ue:N.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var m=[],p=[],b=1,g=null,x=3,_=!1,R=!1,T=!1,k=!1,Y=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function se(N){for(var B=i(p);B!==null;){if(B.callback===null)l(p);else if(B.startTime<=N)l(p),B.sortIndex=B.expirationTime,a(m,B);else break;B=i(p)}}function te(N){if(T=!1,se(N),!R)if(i(m)!==null)R=!0,xe||(xe=!0,K());else{var B=i(p);B!==null&&W(te,B.startTime-N)}}var xe=!1,O=-1,w=5,L=-1;function H(){return k?!0:!(e.unstable_now()-LN&&H());){var de=g.callback;if(typeof de=="function"){g.callback=null,x=g.priorityLevel;var ce=de(g.expirationTime<=N);if(N=e.unstable_now(),typeof ce=="function"){g.callback=ce,se(N),B=!0;break t}g===i(m)&&l(m),se(N)}else l(m);g=i(m)}if(g!==null)B=!0;else{var z=i(p);z!==null&&W(te,z.startTime-N),B=!1}}break e}finally{g=null,x=ue,_=!1}B=void 0}}finally{B?K():xe=!1}}}var K;if(typeof ne=="function")K=function(){ne(Q)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,me=he.port2;he.port1.onmessage=Q,K=function(){me.postMessage(null)}}else K=function(){Y(Q,0)};function W(N,B){O=Y(function(){N(e.unstable_now())},B)}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(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125de?(N.sortIndex=ue,a(p,N),i(m)===null&&N===i(p)&&(T?(X(O),O=-1):T=!0,W(te,ue-de))):(N.sortIndex=ce,a(m,N),R||_||(R=!0,xe||(xe=!0,K()))),N},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(N){var B=x;return function(){var ue=x;x=B;try{return N.apply(this,arguments)}finally{x=ue}}}})(bd)),bd}var Yg;function KS(){return Yg||(Yg=1,vd.exports=GS()),vd.exports}var xd={exports:{}},Vt={};var Gg;function VS(){if(Gg)return Vt;Gg=1;var e=ph();function a(m){var p="https://react.dev/errors/"+m;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),xd.exports=VS(),xd.exports}var Vg;function XS(){if(Vg)return io;Vg=1;var e=KS(),a=ph(),i=O0();function l(t){var n="https://react.dev/errors/"+t;if(1ce||(t.current=de[ce],de[ce]=null,ce--)}function $(t,n){ce++,de[ce]=t.current,t.current=n}var G=z(null),ie=z(null),fe=z(null),I=z(null);function ge(t,n){switch($(fe,n),$(ie,t),$(G,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?cg(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=cg(n),t=fg(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}C(G),$(G,t)}function be(){C(G),C(ie),C(fe)}function tt(t){t.memoizedState!==null&&$(I,t);var n=G.current,r=fg(n,t.type);n!==r&&($(ie,t),$(G,r))}function dt(t){ie.current===t&&(C(G),C(ie)),I.current===t&&(C(I),eo._currentValue=ue)}var xt,ut;function je(t){if(xt===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);xt=n&&n[1]||"",ut=-1)":-1c||z[o]!==H[c]){var V=` -`+z[o].replace(" at new "," at ");return t.displayName&&V.includes("")&&(V=V.replace("",t.displayName)),V}while(1<=o&&0<=c);break}}}finally{Xe=!1,Error.prepareStackTrace=r}return(r=t?t.displayName||t.name:"")?Ne(r):""}function Pe(t,n){switch(t.tag){case 26:case 27:case 5:return Ne(t.type);case 16:return Ne("Lazy");case 13:return t.child!==n&&n!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return Be(t.type,!1);case 11:return Be(t.type.render,!1);case 1:return Be(t.type,!0);case 31:return Ne("Activity");default:return""}}function _n(t){try{var n="",r=null;do n+=Pe(t,r),r=t,t=t.return;while(t);return n}catch(o){return` +`+xt+t+ut}var Je=!1;function Ue(t,n){if(!t||Je)return"";Je=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(V){var F=V}Reflect.construct(t,[],ae)}else{try{ae.call()}catch(V){F=V}t.call(ae.prototype)}}else{try{throw Error()}catch(V){F=V}(ae=t())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(V){if(V&&F&&typeof V.stack=="string")return[V.stack,F.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=o.DetermineComponentFrameRoot(),y=h[0],S=h[1];if(y&&S){var A=y.split(` +`),q=S.split(` +`);for(f=o=0;of||A[o]!==q[f]){var J=` +`+A[o].replace(" at new "," at ");return t.displayName&&J.includes("")&&(J=J.replace("",t.displayName)),J}while(1<=o&&0<=f);break}}}finally{Je=!1,Error.prepareStackTrace=r}return(r=t?t.displayName||t.name:"")?je(r):""}function Qe(t,n){switch(t.tag){case 26:case 27:case 5:return je(t.type);case 16:return je("Lazy");case 13:return t.child!==n&&n!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Ue(t.type,!1);case 11:return Ue(t.type.render,!1);case 1:return Ue(t.type,!0);case 31:return je("Activity");default:return""}}function An(t){try{var n="",r=null;do n+=Qe(t,r),r=t,t=t.return;while(t);return n}catch(o){return` Error generating stack: `+o.message+` -`+o.stack}}var ua=Object.prototype.hasOwnProperty,Ut=e.unstable_scheduleCallback,ca=e.unstable_cancelCallback,Sr=e.unstable_shouldYield,Ii=e.unstable_requestPaint,Wt=e.unstable_now,fa=e.unstable_getCurrentPriorityLevel,La=e.unstable_ImmediatePriority,Wi=e.unstable_UserBlockingPriority,Ba=e.unstable_NormalPriority,qn=e.unstable_LowPriority,Tn=e.unstable_IdlePriority,Co=e.log,Zu=e.unstable_setDisableYieldValue,da=null,en=null;function Ht(t){if(typeof Co=="function"&&Zu(t),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(da,t)}catch{}}var Vt=Math.clz32?Math.clz32:qu,No=Math.log,Oo=Math.LN2;function qu(t){return t>>>=0,t===0?32:31-(No(t)/Oo|0)|0}var wr=256,ha=262144,Er=4194304;function Pn(t){var n=t&42;if(n!==0)return n;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Jr(t,n,r){var o=t.pendingLanes;if(o===0)return 0;var c=0,d=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var S=o&134217727;return S!==0?(o=S&~d,o!==0?c=Pn(o):(y&=S,y!==0?c=Pn(y):r||(r=S&~t,r!==0&&(c=Pn(r))))):(S=o&~d,S!==0?c=Pn(S):y!==0?c=Pn(y):r||(r=o&~t,r!==0&&(c=Pn(r)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,r=n&-n,d>=r||d===32&&(r&4194048)!==0)?n:c}function Ua(t,n))DELIM" -R"DELIM({return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Pu(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 el(){var t=Er;return Er<<=1,(Er&62914560)===0&&(Er=4194304),t}function Ha(t){for(var n=[],r=0;31>r;r++)n.push(t);return n}function Xn(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function jo(t,n,r,o,c,d){var y=t.pendingLanes;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=r,t.entangledLanes&=r,t.errorRecoveryDisabledLanes&=r,t.shellSuspendCounter=0;var S=t.entanglements,z=t.expirationTimes,H=t.hiddenUpdates;for(r=y&~r;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Dx=/[\n"\\]/g;function Rn(t){return t.replace(Dx,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Qu(t,n,r,o,c,d,y,S){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),n!=null?y==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Nt(n)):t.value!==""+Nt(n)&&(t.value=""+Nt(n)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),n!=null?Gu(t,y,Nt(n)):r!=null?Gu(t,y,Nt(r)):o!=null&&t.removeAttribute("value"),c==null&&d!=null&&(t.defaultChecked=!!d),c!=null&&(t.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+Nt(S):t.removeAttribute("name")}function Qh(t,n,r,o,c,d,y,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.type=d),n!=null||r!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){ei(t);return}r=r!=null?""+Nt(r):"",n=n!=null?""+Nt(n):r,S||n===t.value||(t.value=n),t.defaultValue=n}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=S?t.checked:!!o,t.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),ei(t)}function Gu(t,n,r){n==="number"&&Lo(t.ownerDocument)===t||t.defaultValue===""+r||(t.defaultValue=""+r)}function ti(t,n,r,o){if(t=t.options,n){n={};for(var c=0;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xu=!1;if(pa)try{var nl={};Object.defineProperty(nl,"passive",{get:function(){Xu=!0}}),window.addEventListener("test",nl,nl),window.removeEventListener("test",nl,nl)}catch{Xu=!1}var Za=null,Ju=null,Uo=null;function Jh(){if(Uo)return Uo;var t,n=Ju,r=n.length,o,c="value"in Za?Za.value:Za.textContent,d=c.length;for(t=0;t=il),am=" ",rm=!1;function im(t,n){switch(t){case"keyup":return u1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ii=!1;function f1(t,n){switch(t){case"compositionend":return lm(n);case"keypress":return n.which!==32?null:(rm=!0,am);case"textInput":return t=n.data,t===am&&rm?null:t;default:return null}}function d1(t,n){if(ii)return t==="compositionend"||!nc&&im(t,n)?(t=Jh(),Uo=Ju=Za=null,ii=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:r,offset:n-t};t=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mm(r)}}function ym(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?ym(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function vm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Lo(t.document);n instanceof t.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)t=n.contentWindow;else break;n=Lo(t.document)}return n}function ic(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var x1=pa&&"documentMode"in document&&11>=document.documentMode,li=null,lc=null,ul=null,oc=!1;function gm(t,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;oc||li==null||li!==Lo(o)||(o=li,"selectionStart"in o&&ic(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ul&&sl(ul,o)||(ul=o,o=Os(lc,"onSelect"),0>=y,c-=y,Wn=1<<32-Vt(n)+c|r<ke?(Ze=Se,Se=null):Ze=Se.sibling;var Ke=Z(D,Se,B[ke],X);if(Ke===null){Se===null&&(Se=Ze);break}t&&Se&&Ke.alternate===null&&n(D,Se),N=d(Ke,N,ke),Fe===null?_e=Ke:Fe.sibling=Ke,Fe=Ke,Se=Ze}if(ke===B.length)return r(D,Se),qe&&va(D,ke),_e;if(Se===null){for(;keke?(Ze=Se,Se=null):Ze=Se.sibling;var ur=Z(D,Se,Ke.value,X);if(ur===null){Se===null&&(Se=Ze);break}t&&Se&&ur.alternate===null&&n(D,Se),N=d(ur,N,ke),Fe===null?_e=ur:Fe.sibling=ur,Fe=u)DELIM" -R"DELIM(r,Se=Ze}if(Ke.done)return r(D,Se),qe&&va(D,ke),_e;if(Se===null){for(;!Ke.done;ke++,Ke=B.next())Ke=J(D,Ke.value,X),Ke!==null&&(N=d(Ke,N,ke),Fe===null?_e=Ke:Fe.sibling=Ke,Fe=Ke);return qe&&va(D,ke),_e}for(Se=o(Se);!Ke.done;ke++,Ke=B.next())Ke=P(Se,D,ke,Ke.value,X),Ke!==null&&(t&&Ke.alternate!==null&&Se.delete(Ke.key===null?ke:Ke.key),N=d(Ke,N,ke),Fe===null?_e=Ke:Fe.sibling=Ke,Fe=Ke);return t&&Se.forEach(function($S){return n(D,$S)}),qe&&va(D,ke),_e}function rt(D,N,B,X){if(typeof B=="object"&&B!==null&&B.type===E&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case w:e:{for(var _e=B.key;N!==null;){if(N.key===_e){if(_e=B.type,_e===E){if(N.tag===7){r(D,N.sibling),X=c(N,B.props.children),X.return=D,D=X;break e}}else if(N.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===O&&Dr(_e)===N.type){r(D,N.sibling),X=c(N,B.props),pl(X,B),X.return=D,D=X;break e}r(D,N);break}else n(D,N);N=N.sibling}B.type===E?(X=Nr(B.props.children,D.mode,X,B.key),X.return=D,D=X):(X=Ko(B.type,B.key,B.props,null,D.mode,X),pl(X,B),X.return=D,D=X)}return y(D);case T:e:{for(_e=B.key;N!==null;){if(N.key===_e)if(N.tag===4&&N.stateNode.containerInfo===B.containerInfo&&N.stateNode.implementation===B.implementation){r(D,N.sibling),X=c(N,B.children||[]),X.return=D,D=X;break e}else{r(D,N);break}else n(D,N);N=N.sibling}X=mc(B,D.mode,X),X.return=D,D=X}return y(D);case O:return B=Dr(B),rt(D,N,B,X)}if(Y(B))return ge(D,N,B,X);if(de(B)){if(_e=de(B),typeof _e!="function")throw Error(l(150));return B=_e.call(B),Ae(D,N,B,X)}if(typeof B.then=="function")return rt(D,N,ts(B),X);if(B.$$typeof===G)return rt(D,N,Jo(D,B),X);ns(D,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,N!==null&&N.tag===6?(r(D,N.sibling),X=c(N,B),X.return=D,D=X):(r(D,N),X=hc(B,D.mode,X),X.return=D,D=X),y(D)):r(D,N)}return function(D,N,B,X){try{ml=0;var _e=rt(D,N,B,X);return vi=null,_e}catch(Se){if(Se===yi||Se===Wo)throw Se;var Fe=pn(29,Se,null,D.mode);return Fe.lanes=X,Fe.return=D,Fe}}}var Br=Zm(!0),qm=Zm(!1),Ya=!1;function Rc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zc(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Fa(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ka(t,n,r){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Je&2)!==0){var c=o.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),o.pending=n,n=Fo(t),Tm(t,null,r),n}return Yo(t,o,n,r),Fo(t)}function yl(t,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var o=n.lanes;o&=t.pendingLanes,r|=o,n.lanes=r,ko(t,r)}}function Ac(t,n){var r=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var c=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var y={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};d===null?c=d=y:d=d.next=y,r=r.next}while(r!==null);d===null?c=d=n:d=d.next=n}else c=d=n;r={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=n:t.next=n,r.lastBaseUpdate=n}var Cc=!1;function vl(){if(Cc){var t=pi;if(t!==null)throw t}}function gl(t,n,r,o){Cc=!1;var c=t.updateQueue;Ya=!1;var d=c.firstBaseUpdate,y=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var z=S,H=z.next;z.next=null,y===null?d=H:y.next=H,y=z;var V=t.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==y&&(S===null?V.firstBaseUpdate=H:S.next=H,V.lastBaseUpdate=z))}if(d!==null){var J=c.baseState;y=0,V=H=z=null,S=d;do{var Z=S.lane&-536870913,P=Z!==S.lane;if(P?($e&Z)===Z:(o&Z)===Z){Z!==0&&Z===mi&&(Cc=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ge=t,Ae=S;Z=n;var rt=r;switch(Ae.tag){case 1:if(ge=Ae.payload,typeof ge=="function"){J=ge.call(rt,J,Z);break e}J=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Ae.payload,Z=typeof ge=="function"?ge.call(rt,J,Z):ge,Z==null)break e;J=v({},J,Z);break e;case 2:Ya=!0}}Z=S.callback,Z!==null&&(t.flags|=64,P&&(t.flags|=8192),P=c.callbacks,P===null?c.callbacks=[Z]:P.push(Z))}else P={lane:Z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(H=V=P,z=J):V=V.next=P,y|=Z;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;P=S,S=P.next,P.next=null,c.lastBaseUpdate=P,c.shared.pending=null}}while(!0);V===null&&(z=J),c.baseState=z,c.firstBaseUpdate=H,c.lastBaseUpdate=V,d===null&&(c.shared.lanes=0),Wa|=y,t.lanes=y,t.memoizedState=J}}function Pm(t,n){if(typeof t!="function")throw Error(l(191,t));t.call(n)}function Qm(t,n){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;td?d:8;var y=j.T,S={};j.T=S,Kc(t,!1,n,r);try{var z=c(),H=j.S;if(H!==null&&H(S,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var V=C1(z,o);Sl(t,n,V,xn(t))}else Sl(t,n,o,xn(t))}catch(J){Sl(t,n,{then:function(){},status:"rejected",reason:J},xn())}finally{F.p=d,y!==null&&S.types!==null&&(y.types=S.types),j.T=y}}function D1(){}function Yc(t,n,r,o){if(t.tag!==5)throw Error(l(476));var c=wp(t).queue;Sp(t,c,n,se,r===null?D1:function(){return Ep(t),r(o)})}function wp(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:se},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:r},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Ep(t){var n=wp(t);n.next===null&&(n=t.alternate.memoizedState),Sl(t,n.next.queue,{},xn())}function Fc(){return Pt(Ul)}function _p(){return Tt().memoizedState}function Tp(){return Tt().memoizedState}function L1(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var r=xn();t=Fa(r);var o=Ka(n,t,r);o!==null&&(fn(o,n,r),yl(o,n,r)),n={cache:wc()},t.payload=n;return}n=n.return}}function B1(t,n,r){var o=xn();r={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ds(t)?zp(n,r):(r=fc(t,n,r,o),r!==null&&(fn(r,t,o),Ap(r,n,o)))}function Rp(t,n,r){var o=xn();Sl(t,n,r,o)}function Sl(t,n,r,o){var c={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(ds(t))zp(n,c);else{var d=t.alternate;if(t.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var y=n.lastRenderedState,S=d(y,r);if(c.hasEagerState=!0,c.eagerState=S,mn(S,y))return Yo(t,n,c,0),ot===null&&Go(),!1}catch{}if(r=fc(t,n,c,o),r!==null)return fn(r,t,o),Ap(r,n,o),!0}return!1}function Kc(t,n,r,o){if(o={lane:2,revertLane:zf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},ds(t)){if(n)throw Error(l(479))}else n=fc(t,r,o,2),n!==null&&fn(n,t,2)}function ds(t){var n=t.alternate;return t===je||n!==null&&n===je}function zp(t,n){bi=is=!0;var r=t.pending;r===null?n.next=n:(n.next=r.next,r.next=n),t.pending=n}function Ap(t,n,r){if((r&4194048)!==0){var o=n.lanes;o&=t.pendingLanes,r|=o,n.lanes=r,ko(t,r)}}var wl={readContext:Pt,use:ss,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};wl.useEffectEvent=xt;var Cp={readContext:Pt,use:ss,useCallback:function(t,n){return tn().memoizedState=[t,n===void 0?null:n],t},useContext:Pt,useEffect:dp,useImperativeHandle:function(t,n,r){r=r!=null?r.concat([t]):null,cs(4194308,4,yp.bind(null,n,t),r)},useLayoutEffect:function(t,n){return cs(4194308,4,t,n)},useInsertionEffect:function(t,n){cs(4,2,t,n)},useMemo:function(t,n){var r=tn();n=n===void 0?null:n;var o=t();if(Ur){Ht(!0);try{t()}finally{Ht(!1)}}return r.memoizedState=[o,n],o},useReducer:function(t,n,r){var o=tn();if(r!==void 0){var c=r(n);if(Ur){Ht(!0);try{r(n)}finally{Ht(!1)}}}else c=n;return o.memoizedState=o.baseState=c,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:c},o.queue=t,t=t.dispatch=B1.bind(null,je,t),[o.memoizedState,t]},useRef:function(t){var n=tn();return t={current:t},n.memoizedState=t},useState:function(t){t=Zc(t);var n=t.queue,r=Rp.bind(null,je,n);return n.dispatch=r,[t.memoizedState,r]},useDebugValue:Qc,useDeferredValue:function(t,n){var r=tn();return Gc(r,t,n)},useTransition:function(){var t=Zc(!1);return t=Sp.bind(null,je,t.queue,!0,!1),tn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,r){var o=je,c=tn();if(qe){if(r===void 0)throw Error(l(407));r=r()}else{if(r=n(),ot===null)throw Error(l(349));($e&127)!==0||Xm(o,n,r)}c.memoizedState=r;var d={value:r,getSnapshot:n};return c.queue=d,dp(Im.bind(null,o,d,t),[t]),o.flags|=2048,Si(9,{destroy:void 0},Jm.bind(null,o,d,r,n),null),r},useId:function(){var)DELIM" -R"DELIM( t=tn(),n=ot.identifierPrefix;if(qe){var r=ea,o=Wn;r=(o&~(1<<32-Vt(o)-1)).toString(32)+r,n="_"+n+"R_"+r,r=ls++,0<\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?y.createElement(c,{is:o.is}):y.createElement(c)}}d[ce]=n,d[he]=o;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=d;e:switch(Gt(d,c,o),c){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Ea(n)}}return ht(n),uf(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,r),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==o&&Ea(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(l(166));if(t=ne.current,di(n)){if(t=n.stateNode,r=n.memoizedProps,o=null,c=qt,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}t[ce]=n,t=!!(t.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||Ky(t.nodeValue,r)),t||Qa(n,!0)}else t=js(t).createTextNode(o),t[ce]=n,n.stateNode=t}return ht(n),null;case 31:if(r=n.memoizedState,t===null||t.memoizedState!==null){if(o=di(n),r!==null){if(t===null){if(!o)throw Error(l(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[ce]=n}else Or(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ht(n),t=!1}else r=gc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),t=!0;if(!t)return n.flags&256?(vn(n),n):(vn(n),null);if((n.flags&128)!==0)throw Error(l(558))}return ht(n),null;case 13:if(o=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(c=di(n),o!==null&&o.dehydrated!==null){if(t===null){if(!c)throw Error(l(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(l(317));c[ce]=n}else Or(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ht(n),c=!1}else c=gc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(vn(n),n):(vn(n),null)}return vn(n),(n.flags&128)!==0?(n.lanes=r,n):(r=o!==null,t=t!==null&&t.memoizedState!==null,r&&(o=n.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048)),r!==t&&r&&(n.child.flags|=8192),vs(n,n.updateQueue),ht(n),null);case 4:return ye(),t===null&&Of(n.stateNode.containerInfo),ht(n),null;case 10:return ba(n.type),ht(n),null;case 19:if(C(_t),o=n.memoizedState,o===null)return ht(n),null;if(c=(n.flags&128)!==0,d=o.rendering,d===null)if(c)_l(o,!1);else{if(St!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(d=rs(t),d!==null){for(n.flags|=128,_l(o,!1),t=d.updateQueue,n.updateQueue=t,vs(n,t),n.subtreeFlags=0,t=r,r=n.child;r!==null;)Rm(r,t),r=r.sibling;return U(_t,_t.current&1|2),qe&&va(n,o.treeForkCount),n.child}t=t.sibling}o.tail!==null&&Wt()>ws&&(n.flags|=128,c=!0,_l(o,!1),n.lanes=4194304)}else{if(!c)if(t=rs(d),t!==null){if(n.flags|=128,c=!0,t=t.updateQueue,n.updateQueue=t,vs(n,t),_l(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!qe)return ht(n),null}else 2*Wt()-o.renderingStartTime>ws&&r!==536870912&&(n.flags|=128,c=!0,_l(o,!1),n.lanes=4194304);o.isBackwards?(d.sibling=n.child,n.child=d):(t=o.last,t!==null?t.sibling=d:n.child=d,o.last=d)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Wt(),t.sibling=null,r=_t.current,U(_t,c?r&1|2:r&1),qe&&va(n,o.treeForkCount),t):(ht(n),null);case 22:case 23:return vn(n),Oc(),o=n.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(r&536870912)!==0&&(n.flags&128)===0&&(ht(n),n.subtreeFlags&6&&(n.flags|=8192)):ht(n),r=n.updateQueue,r!==null&&vs(n,r.retryQueue),r=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048),t!==null&&C(kr),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),ba(Ot),ht(n),null;case 25:return null;case 30:return null}throw Error(l(156,n.tag))}function q1(t,n){switch(yc(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return ba(Ot),ye(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t)DELIM" -R"DELIM(&-65537|128,n):null;case 26:case 27:case 5:return ut(n),null;case 31:if(n.memoizedState!==null){if(vn(n),n.alternate===null)throw Error(l(340));Or()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(vn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(l(340));Or()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return C(_t),null;case 4:return ye(),null;case 10:return ba(n.type),null;case 22:case 23:return vn(n),Oc(),t!==null&&C(kr),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return ba(Ot),null;case 25:return null;default:return null}}function Wp(t,n){switch(yc(n),n.tag){case 3:ba(Ot),ye();break;case 26:case 27:case 5:ut(n);break;case 4:ye();break;case 31:n.memoizedState!==null&&vn(n);break;case 13:vn(n);break;case 19:C(_t);break;case 10:ba(n.type);break;case 22:case 23:vn(n),Oc(),t!==null&&C(kr);break;case 24:ba(Ot)}}function Tl(t,n){try{var r=n.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var c=o.next;r=c;do{if((r.tag&t)===t){o=void 0;var d=r.create,y=r.inst;o=d(),y.destroy=o}r=r.next}while(r!==c)}}catch(S){et(n,n.return,S)}}function Ja(t,n,r){try{var o=n.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var d=c.next;o=d;do{if((o.tag&t)===t){var y=o.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,c=n;var z=r,H=S;try{H()}catch(V){et(c,z,V)}}}o=o.next}while(o!==d)}}catch(V){et(n,n.return,V)}}function ey(t){var n=t.updateQueue;if(n!==null){var r=t.stateNode;try{Qm(n,r)}catch(o){et(t,t.return,o)}}}function ty(t,n,r){r.props=Hr(t.type,t.memoizedProps),r.state=t.memoizedState;try{r.componentWillUnmount()}catch(o){et(t,n,o)}}function Rl(t,n){try{var r=t.ref;if(r!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof r=="function"?t.refCleanup=r(o):r.current=o}}catch(c){et(t,n,c)}}function ta(t,n){var r=t.ref,o=t.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(c){et(t,n,c)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(c){et(t,n,c)}else r.current=null}function ny(t){var n=t.type,r=t.memoizedProps,o=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(c){et(t,t.return,c)}}function cf(t,n,r){try{var o=t.stateNode;cS(o,t.type,r,n),o[he]=n}catch(c){et(t,t.return,c)}}function ay(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&rr(t.type)||t.tag===4}function ff(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ay(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&rr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function df(t,n,r){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(t,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(t),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=ma));else if(o!==4&&(o===27&&rr(t.type)&&(r=t.stateNode,n=null),t=t.child,t!==null))for(df(t,n,r),t=t.sibling;t!==null;)df(t,n,r),t=t.sibling}function gs(t,n,r){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?r.insertBefore(t,n):r.appendChild(t);else if(o!==4&&(o===27&&rr(t.type)&&(r=t.stateNode),t=t.child,t!==null))for(gs(t,n,r),t=t.sibling;t!==null;)gs(t,n,r),t=t.sibling}function ry(t){var n=t.stateNode,r=t.memoizedProps;try{for(var o=t.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Gt(n,o,r),n[ce]=t,n[he]=r}catch(d){et(t,t.return,d)}}var _a=!1,kt=!1,hf=!1,iy=typeof WeakSet=="function"?WeakSet:Set,Zt=null;function P1(t,n){if(t=t.containerInfo,kf=Hs,t=vm(t),ic(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var c=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var y=0,S=-1,z=-1,H=0,V=0,J=t,Z=null;t:for(;;){for(var P;J!==r||c!==0&&J.nodeType!==3||(S=y+c),J!==d||o!==0&&J.nodeType!==3||(z=y+o),J.nodeType===3&&(y+=J.nodeValue.length),(P=J.firstChild)!==null;)Z=J,J=P;for(;;){if(J===t)break t;if(Z===r&&++H===c&&(S=y),Z===d&&++V===o&&(z=y),(P=J.nextSibling)!==null)break;J=Z,Z=J.parentNode}J=P}r=S===-1||z===-1?null:{start:S,end:z}}else r=null}r=r||{start:0,end:0}}else r=null;for(Df={focusedElem:t,selectionRange:r},Hs=!1,Zt=n;Zt!==null;)if(n=Zt,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,Zt=t;else for(;Zt!==null;){switch(n=Zt,d=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(r=0;r title"))),Gt(d,o,r),d[ce]=t,st(d),o=d;break e;case"link":var y=fv("link","href",c).get(o+(r.href||""));if(y){for(var S=0;Srt&&(y=rt,rt=Ae,Ae=y);var D=pm(S,Ae),N=pm(S,rt);if(D&&N&&(P.rangeCount!==1||P.anchorNode!==D.node||P.anchorOffset!==D.offset||P.focusNode!==N.node||P.focusOffset!==N.offset)){var B=J.createRange();B.setStart(D.node,D.offset),P.removeAllRanges(),Ae>rt?(P.addRange(B),P.extend(N.node,N.offset)):(B.setEnd(N.node,N.offset),P.addRange(B))}}}}for(J=[],P=S;P=P.parentNode;)P.nodeType===1&&J.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;Sr?32:r,j.T=null,r=xf,xf=null;var d=tr,y=Ca;if(Bt=0,Ri=tr=null,Ca=0,(Je&6)!==0)throw Error(l(331));var S=Je;if(Je|=4,yy(d.current),hy(d,d.current,y,r),Je=S,jl(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(da,d)}catch{}return!0}finally{F.p=c,j.T=o,ky(t,n)}}function Ly(t,n,r){n=An(r,n),n=Ic(t.stateNode,n,2),t=Ka(t,n,2),t!==null&&(Xn(t,2),na(t))}function et(t,n,r){if(t.tag===3)Ly(t,t,r);else for(;n!==null;){if(n.tag===3){Ly(n,t,r);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(er===null||!er.has(o))){t=An(r,t),r=Bp(2),o=Ka(n,r,2),o!==null&&(Up(r,o,n,t)DELIM" -R"DELIM(),Xn(o,2),na(o));break}}n=n.return}}function _f(t,n,r){var o=t.pingCache;if(o===null){o=t.pingCache=new Y1;var c=new Set;o.set(n,c)}else c=o.get(n),c===void 0&&(c=new Set,o.set(n,c));c.has(r)||(yf=!0,c.add(r),t=J1.bind(null,t,n,r),n.then(t,t))}function J1(t,n,r){var o=t.pingCache;o!==null&&o.delete(n),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,ot===t&&($e&r)===r&&(St===4||St===3&&($e&62914560)===$e&&300>Wt()-Ss?(Je&2)===0&&zi(t,0):vf|=r,Ti===$e&&(Ti=0)),na(t)}function By(t,n){n===0&&(n=el()),t=Cr(t,n),t!==null&&(Xn(t,n),na(t))}function I1(t){var n=t.memoizedState,r=0;n!==null&&(r=n.retryLane),By(t,r)}function W1(t,n){var r=0;switch(t.tag){case 31:case 13:var o=t.stateNode,c=t.memoizedState;c!==null&&(r=c.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(n),By(t,r)}function eS(t,n){return Ut(t,n)}var As=null,Ci=null,Tf=!1,Cs=!1,Rf=!1,ar=0;function na(t){t!==Ci&&t.next===null&&(Ci===null?As=Ci=t:Ci=Ci.next=t),Cs=!0,Tf||(Tf=!0,nS())}function jl(t,n){if(!Rf&&Cs){Rf=!0;do for(var r=!1,o=As;o!==null;){if(t!==0){var c=o.pendingLanes;if(c===0)var d=0;else{var y=o.suspendedLanes,S=o.pingedLanes;d=(1<<31-Vt(42|t)+1)-1,d&=c&~(y&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(r=!0,Zy(o,d))}else d=$e,d=Jr(o,o===ot?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Ua(o,d)||(r=!0,Zy(o,d));o=o.next}while(r);Rf=!1}}function tS(){Uy()}function Uy(){Cs=Tf=!1;var t=0;ar!==0&&dS()&&(t=ar);for(var n=Wt(),r=null,o=As;o!==null;){var c=o.next,d=Hy(o,n);d===0?(o.next=null,r===null?As=c:r.next=c,c===null&&(Ci=r)):(r=o,(t!==0||(d&3)!==0)&&(Cs=!0)),o=c}Bt!==0&&Bt!==5||jl(t),ar!==0&&(ar=0)}function Hy(t,n){for(var r=t.suspendedLanes,o=t.pingedLanes,c=t.expirationTimes,d=t.pendingLanes&-62914561;0S)break;var V=z.transferSize,J=z.initiatorType;V&&Vy(J)&&(z=z.responseEnd,y+=V*(z"u"?null:document;function ov(t,n,r){var o=Ni;if(o&&typeof n=="string"&&n){var c=Rn(n);c='link[rel="'+t+'"][href="'+c+'"]',typeof r=="string"&&(c+='[crossorigin="'+r+'"]'),lv.has(c)||(lv.add(c),t={rel:t,crossOrigin:r,href:n},o.querySelector(c)===null&&(n=o.createElement("link"),Gt(n,"link",t),st(n),o.head.appendChild(n)))}}function SS(t){Na.D(t),ov("dns-prefetch",t,null)}function wS(t,n){Na.C(t,n),ov("preconnect",t,n)}function ES(t,n,r){Na.L(t,n,r);var o=Ni;if(o&&t&&n){var c='link[rel="preload"][as="'+Rn(n)+'"]';n==="image"&&r&&r.imageSrcSet?(c+='[imagesrcset="'+Rn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(c+='[imagesizes="'+Rn(r.imageSizes)+'"]')):c+='[href="'+Rn(t)+'"]';var d=c;switch(n){case"style":d=Oi(t);break;case"script":d=ji(t)}kn.has(d)||(t=v({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:t,as:n},r),kn.set(d,t),o.querySelector(c)!==null||n==="style"&&o.querySelector(Ll(d))||n==="script"&&o.querySelector(Bl(d))||(n=o.createElement("link"),Gt(n,"link",t),st(n),o.head.appendChild(n)))}}function _S(t,n){Na.m(t,n);var r=Ni;if(r&&t){var o=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+Rn(o)+'"][href="'+Rn(t)+'"]',d=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ji(t)}if(!kn.has(d)&&(t=v({rel:"modulepreload")DELIM" -R"DELIM(,href:t},n),kn.set(d,t),r.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Bl(d)))return}o=r.createElement("link"),Gt(o,"link",t),st(o),r.head.appendChild(o)}}}function TS(t,n,r){Na.S(t,n,r);var o=Ni;if(o&&t){var c=Ct(o).hoistableStyles,d=Oi(t);n=n||"default";var y=c.get(d);if(!y){var S={loading:0,preload:null};if(y=o.querySelector(Ll(d)))S.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":n},r),(r=kn.get(d))&&qf(t,r);var z=y=o.createElement("link");st(z),Gt(z,"link",t),z._p=new Promise(function(H,V){z.onload=H,z.onerror=V}),z.addEventListener("load",function(){S.loading|=1}),z.addEventListener("error",function(){S.loading|=2}),S.loading|=4,ks(y,n,o)}y={type:"stylesheet",instance:y,count:1,state:S},c.set(d,y)}}}function RS(t,n){Na.X(t,n);var r=Ni;if(r&&t){var o=Ct(r).hoistableScripts,c=ji(t),d=o.get(c);d||(d=r.querySelector(Bl(c)),d||(t=v({src:t,async:!0},n),(n=kn.get(c))&&Pf(t,n),d=r.createElement("script"),st(d),Gt(d,"link",t),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function zS(t,n){Na.M(t,n);var r=Ni;if(r&&t){var o=Ct(r).hoistableScripts,c=ji(t),d=o.get(c);d||(d=r.querySelector(Bl(c)),d||(t=v({src:t,async:!0,type:"module"},n),(n=kn.get(c))&&Pf(t,n),d=r.createElement("script"),st(d),Gt(d,"link",t),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function sv(t,n,r,o){var c=(c=ne.current)?Ms(c):null;if(!c)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(n=Oi(r.href),r=Ct(c).hoistableStyles,o=r.get(n),o||(o={type:"style",instance:null,count:0,state:null},r.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){t=Oi(r.href);var d=Ct(c).hoistableStyles,y=d.get(t);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(t,y),(d=c.querySelector(Ll(t)))&&!d._p&&(y.instance=d,y.state.loading=5),kn.has(t)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},kn.set(t,r),d||AS(c,t,r,y.state))),n&&o===null)throw Error(l(528,""));return y}if(n&&o!==null)throw Error(l(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ji(r),r=Ct(c).hoistableScripts,o=r.get(n),o||(o={type:"script",instance:null,count:0,state:null},r.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Oi(t){return'href="'+Rn(t)+'"'}function Ll(t){return'link[rel="stylesheet"]['+t+"]"}function uv(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function AS(t,n,r,o){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=t.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Gt(n,"link",r),st(n),t.head.appendChild(n))}function ji(t){return'[src="'+Rn(t)+'"]'}function Bl(t){return"script[async]"+t}function cv(t,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var o=t.querySelector('style[data-href~="'+Rn(r.href)+'"]');if(o)return n.instance=o,st(o),o;var c=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),st(o),Gt(o,"style",c),ks(o,r.precedence,t),n.instance=o;case"stylesheet":c=Oi(r.href);var d=t.querySelector(Ll(c));if(d)return n.state.loading|=4,n.instance=d,st(d),d;o=uv(r),(c=kn.get(c))&&qf(o,c),d=(t.ownerDocument||t).createElement("link"),st(d);var y=d;return y._p=new Promise(function(S,z){y.onload=S,y.onerror=z}),Gt(d,"link",o),n.state.loading|=4,ks(d,r.precedence,t),n.instance=d;case"script":return d=ji(r.src),(c=t.querySelector(Bl(d)))?(n.instance=c,st(c),c):(o=r,(c=kn.get(d))&&(o=v({},r),Pf(o,c)),t=t.ownerDocument||t,c=t.createElement("script"),st(c),Gt(c,"link",o),t.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,ks(o,r.precedence,t));return n.instance}function ks(t,n,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,d=c,y=0;y title"):null)}function CS(t,n,r){if(r===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function hv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function NS(t,n,r,o){if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var c=Oi(o.href),d=n.querySelector(Ll(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=Ls.bind(t),n.then(t,t)),r.state.loading|=4,r.instance=d,st(d);return}d=n.ownerDocument||n,o=uv(o),(c=kn.get(c))&&qf(o,c),d=d.createElement("link"),st(d);var y=d;y._p=new Promise(function(S,z){y.onload=S,y.onerror=z}),Gt(d,"link",o),r.instance=d}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(t.count++,r=Ls.bind(t),n.addEventListener("load",r),n.addEventListener("error",r))}}var Qf=0;function OS(t,n){return t.stylesheets&&t.count===0&&Us(t,t.stylesheets),0Qf?50:800)+n);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(c)}}:null}function Ls(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Us(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Bs=null;function Us(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Bs=new Map,n.forEach(jS,t),Bs=null,Ls.call(t))}function jS(t,n){if(!(n.state.loading&4)){var r=Bs.get(t);if(r)var o=r.get(null);else{r=new Map,Bs.set(t,r);for(var c=t.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Wf.exports=VS(),Wf.exports}var JS=XS();const IS=ih(JS);var go=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},WS=class extends go{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const a=()=>e();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.li)DELIM" -R"DELIM(steners.forEach(a=>{a(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},lh=new WS,ew={setTimeout:(e,a)=>setTimeout(e,a),clearTimeout:e=>clearTimeout(e),setInterval:(e,a)=>setInterval(e,a),clearInterval:e=>clearInterval(e)},tw=class{#e=ew;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,a){return this.#e.setTimeout(e,a)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,a){return this.#e.setInterval(e,a)}clearInterval(e){this.#e.clearInterval(e)}},Pr=new tw;function nw(e){setTimeout(e,0)}var aw=typeof window>"u"||"Deno"in globalThis;function dn(){}function rw(e,a){return typeof e=="function"?e(a):e}function Ud(e){return typeof e=="number"&&e>=0&&e!==1/0}function C0(e,a){return Math.max(e+(a||0)-Date.now(),0)}function vr(e,a){return typeof e=="function"?e(a):e}function Ln(e,a){return typeof e=="function"?e(a):e}function Bv(e,a){const{type:i="all",exact:l,fetchStatus:s,predicate:u,queryKey:f,stale:h}=e;if(f){if(l){if(a.queryHash!==oh(f,a.options))return!1}else if(!io(a.queryKey,f))return!1}if(i!=="all"){const m=a.isActive();if(i==="active"&&!m||i==="inactive"&&m)return!1}return!(typeof h=="boolean"&&a.isStale()!==h||s&&s!==a.state.fetchStatus||u&&!u(a))}function Uv(e,a){const{exact:i,status:l,predicate:s,mutationKey:u}=e;if(u){if(!a.options.mutationKey)return!1;if(i){if(ro(a.options.mutationKey)!==ro(u))return!1}else if(!io(a.options.mutationKey,u))return!1}return!(l&&a.state.status!==l||s&&!s(a))}function oh(e,a){return(a?.queryKeyHashFn||ro)(e)}function ro(e){return JSON.stringify(e,(a,i)=>$d(i)?Object.keys(i).sort().reduce((l,s)=>(l[s]=i[s],l),{}):i)}function io(e,a){return e===a?!0:typeof e!=typeof a?!1:e&&a&&typeof e=="object"&&typeof a=="object"?Object.keys(a).every(i=>io(e[i],a[i])):!1}var iw=Object.prototype.hasOwnProperty;function N0(e,a,i=0){if(e===a)return e;if(i>500)return a;const l=Hv(e)&&Hv(a);if(!l&&!($d(e)&&$d(a)))return a;const u=(l?e:Object.keys(e)).length,f=l?a:Object.keys(a),h=f.length,m=l?new Array(h):{};let p=0;for(let b=0;b{Pr.setTimeout(a,e)})}function Zd(e,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,a):i.structuralSharing!==!1?N0(e,a):a}function ow(e,a,i=0){const l=[...e,a];return i&&l.length>i?l.slice(1):l}function sw(e,a,i=0){const l=[a,...e];return i&&l.length>i?l.slice(0,-1):l}var sh=Symbol();function O0(e,a){return!e.queryFn&&a?.initialPromise?()=>a.initialPromise:!e.queryFn||e.queryFn===sh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function j0(e,a){return typeof e=="function"?e(...a):!!e}function uw(e,a,i){let l=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=a(),l||(l=!0,s.aborted?i():s.addEventListener("abort",i,{once:!0})),s)}),e}var lo=(()=>{let e=()=>aw;return{isServer(){return e()},setIsServer(a){e=a}}})();function qd(){let e,a;const i=new Promise((s,u)=>{e=s,a=u});i.status="pending",i.catch(()=>{});function l(s){Object.assign(i,s),delete i.resolve,delete i.reject}return i.resolve=s=>{l({status:"fulfilled",value:s}),e(s)},i.reject=s=>{l({status:"rejected",reason:s}),a(s)},i}var cw=nw;function fw(){let e=[],a=0,i=h=>{h()},l=h=>{h()},s=cw;const u=h=>{a?e.push(h):s(()=>{i(h)})},f=()=>{const h=e;e=[],h.length&&s(()=>{l(()=>{h.forEach(m=>{i(m)})})})};return{batch:h=>{let m;a++;try{m=h()}finally{a--,a||f()}return m},batchCalls:h=>(...m)=>{u(()=>{h(...m)})},schedule:u,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{l=h},setScheduler:h=>{s=h}}}var Ft=fw(),dw=class extends go{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const a=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(i=>{i(e)}))}isOnline(){return this.#e}},vu=new dw;function hw(e){return Math.min(1e3*2**e,3e4)}function M0(e){return(e??"online")==="online"?vu.isOnline():!0}var Pd=class extends Erro)DELIM" -R"DELIM(r{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function k0(e){let a=!1,i=0,l;const s=qd(),u=()=>s.status!=="pending",f=E=>{if(!u()){const k=new Pd(E);x(k),e.onCancel?.(k)}},h=()=>{a=!0},m=()=>{a=!1},p=()=>lh.isFocused()&&(e.networkMode==="always"||vu.isOnline())&&e.canRun(),b=()=>M0(e.networkMode)&&e.canRun(),v=E=>{u()||(l?.(),s.resolve(E))},x=E=>{u()||(l?.(),s.reject(E))},w=()=>new Promise(E=>{l=k=>{(u()||p())&&E(k)},e.onPause?.()}).then(()=>{l=void 0,u()||e.onContinue?.()}),T=()=>{if(u())return;let E;const k=i===0?e.initialPromise:void 0;try{E=k??e.fn()}catch(L){E=Promise.reject(L)}Promise.resolve(E).then(v).catch(L=>{if(u())return;const Q=e.retry??(lo.isServer()?0:3),G=e.retryDelay??hw,ae=typeof G=="function"?G(i,L):G,ee=Q===!0||typeof Q=="number"&&ip()?void 0:w()).then(()=>{a?x(L):T()})})};return{promise:s,status:()=>s.status,cancel:f,continue:()=>(l?.(),s),cancelRetry:h,continueRetry:m,canStart:b,start:()=>(b()?T():w().then(T),s)}}var D0=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ud(this.gcTime)&&(this.#e=Pr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(lo.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Pr.clearTimeout(this.#e),this.#e=void 0)}},mw=class extends D0{#e;#t;#n;#r;#a;#l;#i;constructor(e){super(),this.#i=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=qv(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#l,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=qv(this.options);a.data!==void 0&&(this.setState(Zv(a.data,a.dataUpdatedAt)),this.#e=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,a){const i=Zd(this.state.data,e,this.options);return this.#s({data:i,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),i}setState(e,a){this.#s({type:"setState",state:e,setStateOptions:a})}cancel(e){const a=this.#a?.promise;return this.#a?.cancel(e),a?a.then(dn).catch(dn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ln(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>vr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!C0(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(a=>a.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(a=>a.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(a=>a!==e),this.observers.length||(this.#a&&(this.#i||this.#o()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#o(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,a){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const i=new AbortController,l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#i=!0,i.signal)})},s=()=>{const h=O0(this.options,a),p=(()=>{const b={client:this.#r,queryKey:this.queryKey,meta:this.meta};return l(b),b})();return this.#i=!1,this.options.persister?this.options.persister(h,p,this):h(p)},f=(()=>{const h={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:s};return l(h),h})();this.options.behavior?.onFetch(f,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.met)DELIM" -R"DELIM(a)&&this.#s({type:"fetch",meta:f.fetchOptions?.meta}),this.#a=k0({initialPromise:a?.initialPromise,fn:f.fetchFn,onCancel:h=>{h instanceof Pd&&h.revert&&this.setState({...this.#t,fetchStatus:"idle"}),i.abort()},onFail:(h,m)=>{this.#s({type:"failed",failureCount:h,error:m})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0});try{const h=await this.#a.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#n.config.onSuccess?.(h,this),this.#n.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Pd){if(h.silent)return this.#a.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#s({type:"error",error:h}),this.#n.config.onError?.(h,this),this.#n.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#s(e){const a=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...L0(i.data,this.options),fetchMeta:e.meta??null};case"success":const l={...i,...Zv(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?l:void 0,l;case"error":const s=e.error;return{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=a(this.state),Ft.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function L0(e,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M0(a.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Zv(e,a){return{data:e,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qv(e){const a=typeof e.initialData=="function"?e.initialData():e.initialData,i=a!==void 0,l=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var pw=class extends go{constructor(e,a){super(),this.options=a,this.#e=e,this.#o=null,this.#i=qd(),this.bindMethods(),this.setOptions(a)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#l;#i;#o;#s;#h;#m;#c;#f;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Pv(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const a=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ln(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),a._defaulted&&!Hd(this.options,a)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&Qv(this.#t,i,this.options,a)&&this.#d(),this.updateResult(),l&&(this.#t!==i||Ln(this.options.enabled,this.#t)!==Ln(a.enabled,this.#t)||vr(this.options.staleTime,this.#t)!==vr(a.staleTime,this.#t))&&this.#y();const s=this.#v();l&&(this.#t!==i||Ln(this.options.enabled,this.#t)!==Ln(a.enabled,this.#t)||s!==this.#u)&&this.#g(s)}getOptimisticResult(e){const a=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(a,e);return vw(this,i)&&(this.#r=i,this.#l=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#r}trackResult(e,a){return new Proxy(e,{get:(i,l)=>(this.trackProp(l),a?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,l))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const a=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCache().build(this.#e,a);return i.fetch().then(()=>this.createResult(i,a))}fetch(e){return this.#d({...e,cancelRefet)DELIM" -R"DELIM(ch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(e){this.#w();let a=this.#t.fetch(this.options,e);return e?.throwOnError||(a=a.catch(dn)),a}#y(){this.#x();const e=vr(this.options.staleTime,this.#t);if(lo.isServer()||this.#r.isStale||!Ud(e))return;const i=C0(this.#r.dataUpdatedAt,e)+1;this.#c=Pr.setTimeout(()=>{this.#r.isStale||this.updateResult()},i)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(e){this.#S(),this.#u=e,!(lo.isServer()||Ln(this.options.enabled,this.#t)===!1||!Ud(this.#u)||this.#u===0)&&(this.#f=Pr.setInterval(()=>{(this.options.refetchIntervalInBackground||lh.isFocused())&&this.#d()},this.#u))}#b(){this.#y(),this.#g(this.#v())}#x(){this.#c!==void 0&&(Pr.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#f!==void 0&&(Pr.clearInterval(this.#f),this.#f=void 0)}createResult(e,a){const i=this.#t,l=this.options,s=this.#r,u=this.#a,f=this.#l,m=e!==i?e.state:this.#n,{state:p}=e;let b={...p},v=!1,x;if(a._optimisticResults){const O=this.hasListeners(),ue=!O&&Pv(e,a),fe=O&&Qv(e,i,a,l);(ue||fe)&&(b={...b,...L0(p.data,e.options)}),a._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:w,errorUpdatedAt:T,status:E}=b;x=b.data;let k=!1;if(a.placeholderData!==void 0&&x===void 0&&E==="pending"){let O;s?.isPlaceholderData&&a.placeholderData===f?.placeholderData?(O=s.data,k=!0):O=typeof a.placeholderData=="function"?a.placeholderData(this.#m?.state.data,this.#m):a.placeholderData,O!==void 0&&(E="success",x=Zd(s?.data,O,a),v=!0)}if(a.select&&x!==void 0&&!k)if(s&&x===u?.data&&a.select===this.#s)x=this.#h;else try{this.#s=a.select,x=a.select(x),x=Zd(s?.data,x,a),this.#h=x,this.#o=null}catch(O){this.#o=O}this.#o&&(w=this.#o,x=this.#h,T=Date.now(),E="error");const L=b.fetchStatus==="fetching",Q=E==="pending",G=E==="error",ae=Q&&L,ee=x!==void 0,te={status:E,fetchStatus:b.fetchStatus,isPending:Q,isSuccess:E==="success",isError:G,isInitialLoading:ae,isLoading:ae,data:x,dataUpdatedAt:b.dataUpdatedAt,error:w,errorUpdatedAt:T,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:b.dataUpdateCount>m.dataUpdateCount||b.errorUpdateCount>m.errorUpdateCount,isFetching:L,isRefetching:L&&!Q,isLoadingError:G&&!ee,isPaused:b.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:G&&ee,isStale:uh(e,a),refetch:this.refetch,promise:this.#i,isEnabled:Ln(a.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const O=te.data!==void 0,ue=te.status==="error"&&!O,fe=Te=>{ue?Te.reject(te.error):O&&Te.resolve(te.data)},Ee=()=>{const Te=this.#i=te.promise=qd();fe(Te)},de=this.#i;switch(de.status){case"pending":e.queryHash===i.queryHash&&fe(de);break;case"fulfilled":(ue||te.data!==de.value)&&Ee();break;case"rejected":(!ue||te.error!==de.reason)&&Ee();break}}return te}updateResult(){const e=this.#r,a=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#l=this.options,this.#a.data!==void 0&&(this.#m=this.#t),Hd(a,e))return;this.#r=a;const i=()=>{if(!e)return!0;const{notifyOnChangeProps:l}=this.options,s=typeof l=="function"?l():l;if(s==="all"||!s&&!this.#p.size)return!0;const u=new Set(s??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#r).some(f=>{const h=f;return this.#r[h]!==e[h]&&u.has(h)})};this.#E({listeners:i()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const a=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(a?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){Ft.batch(()=>{e.listeners&&this.listeners.forEach(a=>{a(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function yw(e,a){return Ln(a.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&a.retryOnMount===!1)}function Pv(e,a){return yw(e,a)||e.state.data!==void 0&&Qd(e,a,a.refetchOnMount)}function Qd(e,a,i){if(Ln(a.enabled,e)!==!1&&vr(a.staleTime,e)!=="static"){const l=typeof i=="function"?i(e):i;return l==="always"||l!==!1&&uh(e,a)}return!1}function Qv(e,a,i,l){return(e!==a||Ln(l.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&uh(e,i)}function uh(e,a){return Ln(a.enabled,e)!==!1&&e.isStaleByTime(vr(a.staleTime,e))}function vw(e,a){return!Hd(e.getCurrentResult(),a)}function Gv(e){return{onFetch:(a,i)=>{const l=a.options,s=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],f=a.state.data?.pageParams||[];let h={pages:[],pageParams:[]},m=0;const p=async()=>{let b=!1;const v=T=>{uw(T,()=>a.signal,()=>b=!0)},x=O0(a.options,a.fetchOptions),w=async(T,E,k)=>{if(b)return Promise.reject();if(E==null&&T.pages.length)return Promise.resolve(T);const Q=(()=>{const me={client:a.client,queryKey:a.queryKey,pageParam:E,direction:k?"backward":"forward",meta:a.options.meta};return v(me),me})(),G=await x(Q),{maxPages:ae}=a.options,e)DELIM" -R"DELIM(e=k?sw:ow;return{pages:ee(T.pages,G,ae),pageParams:ee(T.pageParams,E,ae)}};if(s&&u.length){const T=s==="backward",E=T?gw:Yv,k={pages:u,pageParams:f},L=E(l,k);h=await w(k,L,T)}else{const T=e??u.length;do{const E=m===0?f[0]??l.initialPageParam:Yv(l,h);if(m>0&&E==null)break;h=await w(h,E),m++}while(ma.options.persister?.(p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i):a.fetchFn=p}}}function Yv(e,{pages:a,pageParams:i}){const l=a.length-1;return a.length>0?e.getNextPageParam(a[l],a,i[l],i):void 0}function gw(e,{pages:a,pageParams:i}){return a.length>0?e.getPreviousPageParam?.(a[0],a,i[0],i):void 0}var bw=class extends D0{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||xw(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(a=>a!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const a=()=>{this.#a({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=k0({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(u,f)=>{this.#a({type:"failed",failureCount:u,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",s=!this.#r.canStart();try{if(l)a();else{this.#a({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,i);const f=await this.options.onMutate?.(e,i);f!==this.state.context&&this.#a({type:"pending",context:f,variables:e,isPaused:s})}const u=await this.#r.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,i),await this.options.onSuccess?.(u,e,this.state.context,i),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(u,null,e,this.state.context,i),this.#a({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,e,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onError?.(u,e,this.state.context,i)}catch(f){Promise.reject(f)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,i)}catch(f){Promise.reject(f)}throw this.#a({type:"error",error:u}),u}finally{this.#n.runNext(this)}}#a(e){const a=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=a(this.state),Ft.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function xw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sw=class extends go{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,a,i){const l=new bw({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(a),state:i});return this.add(l),l}add(e){this.#e.add(e);const a=Ys(e);if(typeof a=="string"){const i=this.#t.get(a);i?i.push(e):this.#t.set(a,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const a=Ys(e);if(typeof a=="string"){const i=this.#t.get(a);if(i)if(i.length>1){const l=i.indexOf(e);l!==-1&&i.splice(l,1)}else i[0]===e&&this.#t.delete(a)}}this.notify({type:"removed",mutation:e})}canRun(e){const a=Ys(e);if(typeof a=="string"){const l=this.#t.get(a)?.find(s=>s.state.status==="pending");return!l||l===e}else return!0}runNext(e){const a=Ys(e);return typeof a=="string"?this.#t.get(a)?.find(l=>l!==e&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ft.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mut)DELIM" -R"DELIM(ation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const a={exact:!0,...e};return this.getAll().find(i=>Uv(a,i))}findAll(e={}){return this.getAll().filter(a=>Uv(e,a))}notify(e){Ft.batch(()=>{this.listeners.forEach(a=>{a(e)})})}resumePausedMutations(){const e=this.getAll().filter(a=>a.state.isPaused);return Ft.batch(()=>Promise.all(e.map(a=>a.continue().catch(dn))))}};function Ys(e){return e.options.scope?.id}var ww=class extends go{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,a,i){const l=a.queryKey,s=a.queryHash??oh(l,a);let u=this.get(s);return u||(u=new mw({client:e,queryKey:l,queryHash:s,options:e.defaultQueryOptions(a),state:i,defaultOptions:e.getQueryDefaults(l)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const a=this.#e.get(e.queryHash);a&&(e.destroy(),a===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ft.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const a={exact:!0,...e};return this.getAll().find(i=>Bv(a,i))}findAll(e={}){const a=this.getAll();return Object.keys(e).length>0?a.filter(i=>Bv(e,i)):a}notify(e){Ft.batch(()=>{this.listeners.forEach(a=>{a(e)})})}onFocus(){Ft.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ft.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ew=class{#e;#t;#n;#r;#a;#l;#i;#o;constructor(e={}){this.#e=e.queryCache||new ww,this.#t=e.mutationCache||new Sw,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#l=0}mount(){this.#l++,this.#l===1&&(this.#i=lh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=vu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#l--,this.#l===0&&(this.#i?.(),this.#i=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const a=this.defaultQueryOptions({queryKey:e});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(e){const a=this.defaultQueryOptions(e),i=this.#e.build(this,a),l=i.state.data;return l===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(vr(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(l))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:a,state:i})=>{const l=i.data;return[a,l]})}setQueryData(e,a,i){const l=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(l.queryHash)?.state.data,f=rw(a,u);if(f!==void 0)return this.#e.build(this,l).setData(f,{...i,manual:!0})}setQueriesData(e,a,i){return Ft.batch(()=>this.#e.findAll(e).map(({queryKey:l})=>[l,this.setQueryData(l,a,i)]))}getQueryState(e){const a=this.defaultQueryOptions({queryKey:e});return this.#e.get(a.queryHash)?.state}removeQueries(e){const a=this.#e;Ft.batch(()=>{a.findAll(e).forEach(i=>{a.remove(i)})})}resetQueries(e,a){const i=this.#e;return Ft.batch(()=>(i.findAll(e).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...e},a)))}cancelQueries(e,a={}){const i={revert:!0,...a},l=Ft.batch(()=>this.#e.findAll(e).map(s=>s.cancel(i)));return Promise.all(l).then(dn).catch(dn)}invalidateQueries(e,a={}){return Ft.batch(()=>(this.#e.findAll(e).forEach(i=>{i.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},a)))}refetchQueries(e,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},l=Ft.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,i);return i.throwOnError||(u=u.catch(dn)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(l).then(dn)}fetchQuery(e){const a=this.defaultQueryOptions(e);a.retry===void 0&&(a.retry=!1);const i=this.#e.build(this,a);return i.isStaleByTime(vr(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(dn).catch(dn)}fetchInfiniteQuery(e){return e.behavior=Gv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(dn).catch(dn)}ensureInfiniteQueryData(e){return e.behavior=Gv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return vu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,a){this.#r.set(ro(e),{queryKey:e,defaultOptions:a})}getQueryDefaults(e){const a=[...this.#r.values()],i={};return a.forEach(l=>{io(e,l.queryKey)&&Object.assign(i,l.defaultOptions)}),i}setMutationDefaults(e,a){this.#a.set(ro(e),{mutationKey:e,defaultOptions:a})}getMutationDefaults(e){const a=[...this.#a.values()],i={};return a.forEach(l=>{io(e,l.mutationKey)&&Object.assign(i,l.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)r)DELIM" -R"DELIM(eturn e;const a={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return a.queryHash||(a.queryHash=oh(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===sh&&(a.enabled=!1),a}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},B0=_.createContext(void 0),Ou=e=>{const a=_.useContext(B0);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},_w=({client:e,children:a})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(B0.Provider,{value:e,children:a})),U0=_.createContext(!1),Tw=()=>_.useContext(U0);U0.Provider;function Rw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zw=_.createContext(Rw()),Aw=()=>_.useContext(zw),Cw=(e,a,i)=>{const l=i?.state.error&&typeof e.throwOnError=="function"?j0(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||l)&&(a.isReset()||(e.retryOnMount=!1))},Nw=e=>{_.useEffect(()=>{e.clearReset()},[e])},Ow=({result:e,errorResetBoundary:a,throwOnError:i,query:l,suspense:s})=>e.isError&&!a.isReset()&&!e.isFetching&&l&&(s&&e.data===void 0||j0(i,[e.error,l])),jw=e=>{if(e.suspense){const i=s=>s==="static"?s:Math.max(s??1e3,1e3),l=e.staleTime;e.staleTime=typeof l=="function"?(...s)=>i(l(...s)):i(l),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Mw=(e,a)=>e.isLoading&&e.isFetching&&!a,kw=(e,a)=>e?.suspense&&a.isPending,Fv=(e,a,i)=>a.fetchOptimistic(e).catch(()=>{i.clearReset()});function Dw(e,a,i){const l=Tw(),s=Aw(),u=Ou(),f=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(f);const h=u.getQueryCache().get(f.queryHash);f._optimisticResults=l?"isRestoring":"optimistic",jw(f),Cw(f,s,h),Nw(s);const m=!u.getQueryCache().get(f.queryHash),[p]=_.useState(()=>new a(u,f)),b=p.getOptimisticResult(f),v=!l&&e.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(x=>{const w=v?p.subscribe(Ft.batchCalls(x)):dn;return p.updateResult(),w},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),_.useEffect(()=>{p.setOptions(f)},[f,p]),kw(f,b))throw Fv(f,p,s);if(Ow({result:b,errorResetBoundary:s,throwOnError:f.throwOnError,query:h,suspense:f.suspense}))throw b.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(f,b),f.experimental_prefetchInRender&&!lo.isServer()&&Mw(b,l)&&(m?Fv(f,p,s):h?.promise)?.catch(dn).finally(()=>{p.updateResult()}),f.notifyOnChangeProps?b:p.trackResult(b)}function Lw(e,a){return Dw(e,pw)}function I(e,a,i){function l(h,m){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:m,constr:f,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),a(h,m);const p=f.prototype,b=Object.keys(p);for(let v=0;vi?.Parent&&h instanceof i.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class Pi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class H0 extends Error{constructor(a){super(`Encountered unidirectional transform during encode: ${a}`),this.name="ZodEncodeError"}}const $0={};function Yr(e){return $0}function Z0(e){const a=Object.values(e).filter(l=>typeof l=="number");return Object.entries(e).filter(([l,s])=>a.indexOf(+l)===-1).map(([l,s])=>s)}function Gd(e,a){return typeof a=="bigint"?a.toString():a}function ch(e){return{get value(){{const a=e();return Object.defineProperty(this,"value",{value:a}),a}}}}function fh(e){return e==null}function dh(e){const a=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(a,i)}function Bw(e,a){const i=(e.toString().split(".")[1]||"").length,l=a.toString();let s=(l.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(l)){const m=l.match(/\d?e-(\d?)/);m?.[1]&&(s=Number.parseInt(m[1]))}const u=i>s?i:s,f=Number.parseInt(e.toFixed(u).replace(".","")),h=Number.parseInt(a.toFixed(u).replace(".",""));return f%h/10**u}const Kv=Symbol("evaluating");function tt(e,a,i){let l;Object.defineProperty(e,a,{get(){if(l!==Kv)return l===void 0&&(l=Kv,l=i()),l},set(s){Object.defineProperty(e,a,{value:s})},configurable:!0})}function Vr(e,a,i){Object.defineProperty(e,a,{value:i,writable:!0,enumerable:!0,configurable:!0})}function br(...e){const a={};for(const i of e){const l=Object.getOwnPropertyDescriptors(i);Object.assign(a,l)}return Object.defineProperties)DELIM" -R"DELIM(({},a)}function Vv(e){return JSON.stringify(e)}function Uw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const q0="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function gu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Hw=ch(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function oo(e){if(gu(e)===!1)return!1;const a=e.constructor;if(a===void 0||typeof a!="function")return!0;const i=a.prototype;return!(gu(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function P0(e){return oo(e)?{...e}:Array.isArray(e)?[...e]:e}const $w=new Set(["string","number","symbol"]);function ju(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xr(e,a,i){const l=new e._zod.constr(a??e._zod.def);return(!a||i?.parent)&&(l._zod.parent=e),l}function ze(e){const a=e;if(!a)return{};if(typeof a=="string")return{error:()=>a};if(a?.message!==void 0){if(a?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");a.error=a.message}return delete a.message,typeof a.error=="string"?{...a,error:()=>a.error}:a}function Zw(e){return Object.keys(e).filter(a=>e[a]._zod.optin==="optional"&&e[a]._zod.optout==="optional")}const qw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Pw(e,a){const i=e._zod.def,l=i.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=br(e._zod.def,{get shape(){const f={};for(const h in a){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);a[h]&&(f[h]=i.shape[h])}return Vr(this,"shape",f),f},checks:[]});return xr(e,u)}function Qw(e,a){const i=e._zod.def,l=i.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=br(e._zod.def,{get shape(){const f={...e._zod.def.shape};for(const h in a){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);a[h]&&delete f[h]}return Vr(this,"shape",f),f},checks:[]});return xr(e,u)}function Gw(e,a){if(!oo(a))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const u=e._zod.def.shape;for(const f in a)if(Object.getOwnPropertyDescriptor(u,f)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=br(e._zod.def,{get shape(){const u={...e._zod.def.shape,...a};return Vr(this,"shape",u),u}});return xr(e,s)}function Yw(e,a){if(!oo(a))throw new Error("Invalid input to safeExtend: expected a plain object");const i=br(e._zod.def,{get shape(){const l={...e._zod.def.shape,...a};return Vr(this,"shape",l),l}});return xr(e,i)}function Fw(e,a){const i=br(e._zod.def,{get shape(){const l={...e._zod.def.shape,...a._zod.def.shape};return Vr(this,"shape",l),l},get catchall(){return a._zod.def.catchall},checks:[]});return xr(e,i)}function Kw(e,a,i){const s=a._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const f=br(a._zod.def,{get shape(){const h=a._zod.def.shape,m={...h};if(i)for(const p in i){if(!(p in h))throw new Error(`Unrecognized key: "${p}"`);i[p]&&(m[p]=e?new e({type:"optional",innerType:h[p]}):h[p])}else for(const p in h)m[p]=e?new e({type:"optional",innerType:h[p]}):h[p];return Vr(this,"shape",m),m},checks:[]});return xr(a,f)}function Vw(e,a,i){const l=br(a._zod.def,{get shape(){const s=a._zod.def.shape,u={...s};if(i)for(const f in i){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);i[f]&&(u[f]=new e({type:"nonoptional",innerType:s[f]}))}else for(const f in s)u[f]=new e({type:"nonoptional",innerType:s[f]});return Vr(this,"shape",u),u}});return xr(a,l)}function Zi(e,a=0){if(e.aborted===!0)return!0;for(let i=a;i{var l;return(l=i).path??(l.path=[]),i.path.unshift(e),i})}function Fs(e){return typeof e=="string"?e:e?.message}function Fr(e,a,i){const l={...e,path:e.path??[]};if(!e.message){const s=Fs(e.inst?._zod.def?.error?.(e))??Fs(a?.error?.(e))??Fs(i.customError?.(e))??Fs(i.localeError?.(e))??"Invalid input";l.message=s}return delete l.inst,delete l.continue,a?.reportInput||delete l.input,l}function hh(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function so(...e){const[a,i,l]=e;return typeof a=="string"?{message:a,code:"custom",input:i,inst:l}:{...a}}const G0=(e,a)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:a,enumerable:!1}),e.message=JSON.stringify(a,Gd,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Y0=I("$ZodError",G0))DELIM" -R"DELIM(,F0=I("$ZodError",G0,{Parent:Error});function Xw(e,a=i=>i.message){const i={},l=[];for(const s of e.issues)s.path.length>0?(i[s.path[0]]=i[s.path[0]]||[],i[s.path[0]].push(a(s))):l.push(a(s));return{formErrors:l,fieldErrors:i}}function Jw(e,a=i=>i.message){const i={_errors:[]},l=s=>{for(const u of s.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(f=>l({issues:f}));else if(u.code==="invalid_key")l({issues:u.issues});else if(u.code==="invalid_element")l({issues:u.issues});else if(u.path.length===0)i._errors.push(a(u));else{let f=i,h=0;for(;h(a,i,l,s)=>{const u=l?Object.assign(l,{async:!1}):{async:!1},f=a._zod.run({value:i,issues:[]},u);if(f instanceof Promise)throw new Pi;if(f.issues.length){const h=new(s?.Err??e)(f.issues.map(m=>Fr(m,u,Yr())));throw q0(h,s?.callee),h}return f.value},ph=e=>async(a,i,l,s)=>{const u=l?Object.assign(l,{async:!0}):{async:!0};let f=a._zod.run({value:i,issues:[]},u);if(f instanceof Promise&&(f=await f),f.issues.length){const h=new(s?.Err??e)(f.issues.map(m=>Fr(m,u,Yr())));throw q0(h,s?.callee),h}return f.value},Mu=e=>(a,i,l)=>{const s=l?{...l,async:!1}:{async:!1},u=a._zod.run({value:i,issues:[]},s);if(u instanceof Promise)throw new Pi;return u.issues.length?{success:!1,error:new(e??Y0)(u.issues.map(f=>Fr(f,s,Yr())))}:{success:!0,data:u.value}},Iw=Mu(F0),ku=e=>async(a,i,l)=>{const s=l?Object.assign(l,{async:!0}):{async:!0};let u=a._zod.run({value:i,issues:[]},s);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(f=>Fr(f,s,Yr())))}:{success:!0,data:u.value}},Ww=ku(F0),eE=e=>(a,i,l)=>{const s=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return mh(e)(a,i,s)},tE=e=>(a,i,l)=>mh(e)(a,i,l),nE=e=>async(a,i,l)=>{const s=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return ph(e)(a,i,s)},aE=e=>async(a,i,l)=>ph(e)(a,i,l),rE=e=>(a,i,l)=>{const s=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Mu(e)(a,i,s)},iE=e=>(a,i,l)=>Mu(e)(a,i,l),lE=e=>async(a,i,l)=>{const s=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return ku(e)(a,i,s)},oE=e=>async(a,i,l)=>ku(e)(a,i,l),sE=/^[cC][^\s-]{8,}$/,uE=/^[0-9a-z]+$/,cE=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fE=/^[0-9a-vA-V]{20}$/,dE=/^[A-Za-z0-9]{27}$/,hE=/^[a-zA-Z0-9_-]{21}$/,mE=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,pE=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Xv=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,yE=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,vE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function gE(){return new RegExp(vE,"u")}const bE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,SE=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,wE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,EE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,K0=/^[A-Za-z0-9_-]*$/,_E=/^\+[1-9]\d{6,14}$/,V0="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",TE=new RegExp(`^${V0}$`);function X0(e){const a="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${a}`:e.precision===0?`${a}:[0-5]\\d`:`${a}:[0-5]\\d\\.\\d{${e.precision}}`:`${a}(?::[0-5]\\d(?:\\.\\d+)?)?`}function RE(e){return new RegExp(`^${X0(e)}$`)}function zE(e){const a=X0({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${a}(?:${i.join("|")})`;return new RegExp(`^${V0}T(?:${l})$`)}const AE=e=>{const a=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${a}$`)},CE=/^-?\d+$/,NE=/^-?\d+(?:\.\d+)?$/,OE=/^(?:true|false)$/i,jE=/^[^A-Z]*$/,ME=/^[^a-z]*$/,hn=I("$ZodCheck",(e,a)=>{var i;e._zod??()DELIM" -R"DELIM(e._zod={}),e._zod.def=a,(i=e._zod).onattach??(i.onattach=[])}),J0={number:"number",bigint:"bigint",object:"date"},I0=I("$ZodCheckLessThan",(e,a)=>{hn.init(e,a);const i=J0[typeof a.value];e._zod.onattach.push(l=>{const s=l._zod.bag,u=(a.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;a.value{(a.inclusive?l.value<=a.value:l.value{hn.init(e,a);const i=J0[typeof a.value];e._zod.onattach.push(l=>{const s=l._zod.bag,u=(a.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;a.value>u&&(a.inclusive?s.minimum=a.value:s.exclusiveMinimum=a.value)}),e._zod.check=l=>{(a.inclusive?l.value>=a.value:l.value>a.value)||l.issues.push({origin:i,code:"too_small",minimum:typeof a.value=="object"?a.value.getTime():a.value,input:l.value,inclusive:a.inclusive,inst:e,continue:!a.abort})}}),kE=I("$ZodCheckMultipleOf",(e,a)=>{hn.init(e,a),e._zod.onattach.push(i=>{var l;(l=i._zod.bag).multipleOf??(l.multipleOf=a.value)}),e._zod.check=i=>{if(typeof i.value!=typeof a.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%a.value===BigInt(0):Bw(i.value,a.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:a.value,input:i.value,inst:e,continue:!a.abort})}}),DE=I("$ZodCheckNumberFormat",(e,a)=>{hn.init(e,a),a.format=a.format||"float64";const i=a.format?.includes("int"),l=i?"int":"number",[s,u]=qw[a.format];e._zod.onattach.push(f=>{const h=f._zod.bag;h.format=a.format,h.minimum=s,h.maximum=u,i&&(h.pattern=CE)}),e._zod.check=f=>{const h=f.value;if(i){if(!Number.isInteger(h)){f.issues.push({expected:l,format:a.format,code:"invalid_type",continue:!1,input:h,inst:e});return}if(!Number.isSafeInteger(h)){h>0?f.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!a.abort}):f.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!a.abort});return}}hu&&f.issues.push({origin:"number",input:h,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!a.abort})}}),LE=I("$ZodCheckMaxLength",(e,a)=>{var i;hn.init(e,a),(i=e._zod.def).when??(i.when=l=>{const s=l.value;return!fh(s)&&s.length!==void 0}),e._zod.onattach.push(l=>{const s=l._zod.bag.maximum??Number.POSITIVE_INFINITY;a.maximum{const s=l.value;if(s.length<=a.maximum)return;const f=hh(s);l.issues.push({origin:f,code:"too_big",maximum:a.maximum,inclusive:!0,input:s,inst:e,continue:!a.abort})}}),BE=I("$ZodCheckMinLength",(e,a)=>{var i;hn.init(e,a),(i=e._zod.def).when??(i.when=l=>{const s=l.value;return!fh(s)&&s.length!==void 0}),e._zod.onattach.push(l=>{const s=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;a.minimum>s&&(l._zod.bag.minimum=a.minimum)}),e._zod.check=l=>{const s=l.value;if(s.length>=a.minimum)return;const f=hh(s);l.issues.push({origin:f,code:"too_small",minimum:a.minimum,inclusive:!0,input:s,inst:e,continue:!a.abort})}}),UE=I("$ZodCheckLengthEquals",(e,a)=>{var i;hn.init(e,a),(i=e._zod.def).when??(i.when=l=>{const s=l.value;return!fh(s)&&s.length!==void 0}),e._zod.onattach.push(l=>{const s=l._zod.bag;s.minimum=a.length,s.maximum=a.length,s.length=a.length}),e._zod.check=l=>{const s=l.value,u=s.length;if(u===a.length)return;const f=hh(s),h=u>a.length;l.issues.push({origin:f,...h?{code:"too_big",maximum:a.length}:{code:"too_small",minimum:a.length},inclusive:!0,exact:!0,input:l.value,inst:e,continue:!a.abort})}}),Du=I("$ZodCheckStringFormat",(e,a)=>{var i,l;hn.init(e,a),e._zod.onattach.push(s=>{const u=s._zod.bag;u.format=a.format,a.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(a.pattern))}),a.pattern?(i=e._zod).check??(i.check=s=>{a.pattern.lastIndex=0,!a.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:a.format,input:s.value,...a.pattern?{pattern:a.pattern.toString()}:{},inst:e,continue:!a.abort})}):(l=e._zod).check??(l.check=()=>{})}),HE=I("$ZodCheckRegex",(e,a)=>{Du.init(e,a),e._zod.check=i=>{a.pattern.lastIndex=0,!a.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:a.pattern.toString(),inst:e,continue:!a.abort})}}),$E=I("$ZodCheckLowerCase",(e,a)=>{a.pattern??(a.pattern=jE),Du.init(e,a)}),ZE=I("$ZodCheckUpperCase",(e,a)=>{a.pattern??(a.pattern=ME),Du.init(e,a)}),qE=I("$ZodCheckIncludes",(e,a)=>{hn.init(e,a);const i=ju(a.includes),l=new RegExp(typeof a.position=="number"?`^.{${a.position}}${i}`:i);a.pattern=l)DELIM" -R"DELIM(,e._zod.onattach.push(s=>{const u=s._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(l)}),e._zod.check=s=>{s.value.includes(a.includes,a.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:a.includes,input:s.value,inst:e,continue:!a.abort})}}),PE=I("$ZodCheckStartsWith",(e,a)=>{hn.init(e,a);const i=new RegExp(`^${ju(a.prefix)}.*`);a.pattern??(a.pattern=i),e._zod.onattach.push(l=>{const s=l._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=l=>{l.value.startsWith(a.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:a.prefix,input:l.value,inst:e,continue:!a.abort})}}),QE=I("$ZodCheckEndsWith",(e,a)=>{hn.init(e,a);const i=new RegExp(`.*${ju(a.suffix)}$`);a.pattern??(a.pattern=i),e._zod.onattach.push(l=>{const s=l._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=l=>{l.value.endsWith(a.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:a.suffix,input:l.value,inst:e,continue:!a.abort})}}),GE=I("$ZodCheckOverwrite",(e,a)=>{hn.init(e,a),e._zod.check=i=>{i.value=a.tx(i.value)}});class YE{constructor(a=[]){this.content=[],this.indent=0,this&&(this.args=a)}indented(a){this.indent+=1,a(this),this.indent-=1}write(a){if(typeof a=="function"){a(this,{execution:"sync"}),a(this,{execution:"async"});return}const l=a.split(` -`).filter(f=>f),s=Math.min(...l.map(f=>f.length-f.trimStart().length)),u=l.map(f=>f.slice(s)).map(f=>" ".repeat(this.indent*2)+f);for(const f of u)this.content.push(f)}compile(){const a=Function,i=this?.args,s=[...(this?.content??[""]).map(u=>` ${u}`)];return new a(...i,s.join(` -`))}}const FE={major:4,minor:3,patch:6},zt=I("$ZodType",(e,a)=>{var i;e??(e={}),e._zod.def=a,e._zod.bag=e._zod.bag||{},e._zod.version=FE;const l=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&l.unshift(e);for(const s of l)for(const u of s._zod.onattach)u(e);if(l.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(f,h,m)=>{let p=Zi(f),b;for(const v of h){if(v._zod.def.when){if(!v._zod.def.when(f))continue}else if(p)continue;const x=f.issues.length,w=v._zod.check(f);if(w instanceof Promise&&m?.async===!1)throw new Pi;if(b||w instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await w,f.issues.length!==x&&(p||(p=Zi(f,x)))});else{if(f.issues.length===x)continue;p||(p=Zi(f,x))}}return b?b.then(()=>f):f},u=(f,h,m)=>{if(Zi(f))return f.aborted=!0,f;const p=s(h,l,m);if(p instanceof Promise){if(m.async===!1)throw new Pi;return p.then(b=>e._zod.parse(b,m))}return e._zod.parse(p,m)};e._zod.run=(f,h)=>{if(h.skipChecks)return e._zod.parse(f,h);if(h.direction==="backward"){const p=e._zod.parse({value:f.value,issues:[]},{...h,skipChecks:!0});return p instanceof Promise?p.then(b=>u(b,f,h)):u(p,f,h)}const m=e._zod.parse(f,h);if(m instanceof Promise){if(h.async===!1)throw new Pi;return m.then(p=>s(p,l,h))}return s(m,l,h)}}tt(e,"~standard",()=>({validate:s=>{try{const u=Iw(e,s);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return Ww(e,s).then(f=>f.success?{value:f.data}:{issues:f.error?.issues})}},vendor:"zod",version:1}))}),yh=I("$ZodString",(e,a)=>{zt.init(e,a),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??AE(e._zod.bag),e._zod.parse=(i,l)=>{if(a.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),pt=I("$ZodStringFormat",(e,a)=>{Du.init(e,a),yh.init(e,a)}),KE=I("$ZodGUID",(e,a)=>{a.pattern??(a.pattern=pE),pt.init(e,a)}),VE=I("$ZodUUID",(e,a)=>{if(a.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[a.version];if(l===void 0)throw new Error(`Invalid UUID version: "${a.version}"`);a.pattern??(a.pattern=Xv(l))}else a.pattern??(a.pattern=Xv());pt.init(e,a)}),XE=I("$ZodEmail",(e,a)=>{a.pattern??(a.pattern=yE),pt.init(e,a)}),JE=I("$ZodURL",(e,a)=>{pt.init(e,a),e._zod.check=i=>{try{const l=i.value.trim(),s=new URL(l);a.hostname&&(a.hostname.lastIndex=0,a.hostname.test(s.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:a.hostname.source,input:i.value,inst:e,continue:!a.abort})),a.protocol&&(a.protocol.lastIndex=0,a.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:a.protocol.source,input:i.value,inst:e,continue:!a.abort})),a.normalize?i.value=s.href:i.value=l;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!a.abort})}}}),IE=I("$ZodEmoji",(e,a)=>{a.pattern??(a.pattern=gE()),pt.init(e,a)}),WE=I("$ZodNanoID",(e,a)=>{a.pattern??(a.pattern=hE),pt.init(e,a)}),e_=I("$ZodCUID",(e,a)=>{a.pattern??(a.pattern=sE),pt.init(e,a)}),t_=I("$ZodCUID2",(e,a)=>{a.pattern??(a.pattern=uE),pt.init(e,a)}),n_=I("$ZodULID",(e,a)=>{a.pattern??(a.pattern=cE),pt.init(e,a)}),a_=I("$ZodXID",(e,a)=>{a.pattern??()DELIM" -R"DELIM(a.pattern=fE),pt.init(e,a)}),r_=I("$ZodKSUID",(e,a)=>{a.pattern??(a.pattern=dE),pt.init(e,a)}),i_=I("$ZodISODateTime",(e,a)=>{a.pattern??(a.pattern=zE(a)),pt.init(e,a)}),l_=I("$ZodISODate",(e,a)=>{a.pattern??(a.pattern=TE),pt.init(e,a)}),o_=I("$ZodISOTime",(e,a)=>{a.pattern??(a.pattern=RE(a)),pt.init(e,a)}),s_=I("$ZodISODuration",(e,a)=>{a.pattern??(a.pattern=mE),pt.init(e,a)}),u_=I("$ZodIPv4",(e,a)=>{a.pattern??(a.pattern=bE),pt.init(e,a),e._zod.bag.format="ipv4"}),c_=I("$ZodIPv6",(e,a)=>{a.pattern??(a.pattern=xE),pt.init(e,a),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!a.abort})}}}),f_=I("$ZodCIDRv4",(e,a)=>{a.pattern??(a.pattern=SE),pt.init(e,a)}),d_=I("$ZodCIDRv6",(e,a)=>{a.pattern??(a.pattern=wE),pt.init(e,a),e._zod.check=i=>{const l=i.value.split("/");try{if(l.length!==2)throw new Error;const[s,u]=l;if(!u)throw new Error;const f=Number(u);if(`${f}`!==u)throw new Error;if(f<0||f>128)throw new Error;new URL(`http://[${s}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!a.abort})}}});function eb(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const h_=I("$ZodBase64",(e,a)=>{a.pattern??(a.pattern=EE),pt.init(e,a),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{eb(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!a.abort})}});function m_(e){if(!K0.test(e))return!1;const a=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),i=a.padEnd(Math.ceil(a.length/4)*4,"=");return eb(i)}const p_=I("$ZodBase64URL",(e,a)=>{a.pattern??(a.pattern=K0),pt.init(e,a),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{m_(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!a.abort})}}),y_=I("$ZodE164",(e,a)=>{a.pattern??(a.pattern=_E),pt.init(e,a)});function v_(e,a=null){try{const i=e.split(".");if(i.length!==3)return!1;const[l]=i;if(!l)return!1;const s=JSON.parse(atob(l));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||a&&(!("alg"in s)||s.alg!==a))}catch{return!1}}const g_=I("$ZodJWT",(e,a)=>{pt.init(e,a),e._zod.check=i=>{v_(i.value,a.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!a.abort})}}),tb=I("$ZodNumber",(e,a)=>{zt.init(e,a),e._zod.pattern=e._zod.bag.pattern??NE,e._zod.parse=(i,l)=>{if(a.coerce)try{i.value=Number(i.value)}catch{}const s=i.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return i;const u=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...u?{received:u}:{}}),i}}),b_=I("$ZodNumberFormat",(e,a)=>{DE.init(e,a),tb.init(e,a)}),x_=I("$ZodBoolean",(e,a)=>{zt.init(e,a),e._zod.pattern=OE,e._zod.parse=(i,l)=>{if(a.coerce)try{i.value=!!i.value}catch{}const s=i.value;return typeof s=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),i}}),S_=I("$ZodUnknown",(e,a)=>{zt.init(e,a),e._zod.parse=i=>i}),w_=I("$ZodNever",(e,a)=>{zt.init(e,a),e._zod.parse=(i,l)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function Jv(e,a,i){e.issues.length&&a.issues.push(...Q0(i,e.issues)),a.value[i]=e.value}const E_=I("$ZodArray",(e,a)=>{zt.init(e,a),e._zod.parse=(i,l)=>{const s=i.value;if(!Array.isArray(s))return i.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),i;i.value=Array(s.length);const u=[];for(let f=0;fJv(p,i,f))):Jv(m,i,f)}return u.length?Promise.all(u).then(()=>i):i}});function bu(e,a,i,l,s){if(e.issues.length){if(s&&!(i in l))return;a.issues.push(...Q0(i,e.issues))}e.value===void 0?i in l&&(a.value[i]=void 0):a.value[i]=e.value}function nb(e){const a=Object.keys(e.shape);for(const l of a)if(!e.shape?.[l]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${l}": expected a Zod schema`);const i=Zw(e.shape);return{...e,keys:a,keySet:new Set(a),numKeys:a.length,optionalKeys:new Set(i)}}function ab(e,a,i,l,s,u){const f=[],h=s.keySet,m=s.catchall._zod,p=m.def.type,b=m.optout==="optional";for(const v in a){if(h.has(v))continue;if(p==="never"){f.push(v);continue}const x=m.run({value:a[v],issues:[]},l);x instanceof Promise?e.push(x.then(w=>bu(w,i,v,a,b))):bu(x,i,v,a,b)}return f.length&&i.issues.push({code:"unrecognized_keys",keys:f,input:a,inst:u}),e.length?Promise.all(e).then(()=>i):i}const __=I("$ZodObject",(e,a)=>{if(zt.init(e,a),!Object.getOwnPropertyDescriptor(a,"shape")?.get){const h=a.shape;Object.defineProperty(a,"shape",{get:()=>{const m={...h};return Object.defineProperty(a,"shape",{value:m}),m}})}const l=ch(()=>nb(a));tt(e._zod,"propValues",()=>{const h=a.shape,m={};for(const p in h){const b=h[p]._zod;if(b.values){m[p]??(m[p]=new Set);for(const v of b.values)m[p].add()DELIM" -R"DELIM(v)}}return m});const s=gu,u=a.catchall;let f;e._zod.parse=(h,m)=>{f??(f=l.value);const p=h.value;if(!s(p))return h.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),h;h.value={};const b=[],v=f.shape;for(const x of f.keys){const w=v[x],T=w._zod.optout==="optional",E=w._zod.run({value:p[x],issues:[]},m);E instanceof Promise?b.push(E.then(k=>bu(k,h,x,p,T))):bu(E,h,x,p,T)}return u?ab(b,p,h,m,l.value,e):b.length?Promise.all(b).then(()=>h):h}}),T_=I("$ZodObjectJIT",(e,a)=>{__.init(e,a);const i=e._zod.parse,l=ch(()=>nb(a)),s=x=>{const w=new YE(["shape","payload","ctx"]),T=l.value,E=G=>{const ae=Vv(G);return`shape[${ae}]._zod.run({ value: input[${ae}], issues: [] }, ctx)`};w.write("const input = payload.value;");const k=Object.create(null);let L=0;for(const G of T.keys)k[G]=`key_${L++}`;w.write("const newResult = {};");for(const G of T.keys){const ae=k[G],ee=Vv(G),te=x[G]?._zod?.optout==="optional";w.write(`const ${ae} = ${E(G)};`),te?w.write(` - if (${ae}.issues.length) { - if (${ee} in input) { - payload.issues = payload.issues.concat(${ae}.issues.map(iss => ({ +`+o.stack}}var ya=Object.prototype.hasOwnProperty,Ut=e.unstable_scheduleCallback,ga=e.unstable_cancelCallback,Mr=e.unstable_shouldYield,hl=e.unstable_requestPaint,Jt=e.unstable_now,va=e.unstable_getCurrentPriorityLevel,Fa=e.unstable_ImmediatePriority,ml=e.unstable_UserBlockingPriority,Ya=e.unstable_NormalPriority,Yn=e.unstable_LowPriority,Cn=e.unstable_IdlePriority,ic=e.log,lc=e.unstable_setDisableYieldValue,ba=null,Wt=null;function Ht(t){if(typeof ic=="function"&&lc(t),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(ba,t)}catch{}}var Kt=Math.clz32?Math.clz32:oc,Go=Math.log,Ko=Math.LN2;function oc(t){return t>>>=0,t===0?32:31-(Go(t)/Ko|0)|0}var kr=256,xa=262144,Dr=4194304;function Gn(t){var n=t&42;if(n!==0)return n;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ci(t,n,r){var o=t.pendingLanes;if(o===0)return 0;var f=0,h=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var S=o&134217727;return S!==0?(o=S&~h,o!==0?f=Gn(o):(y&=S,y!==0?f=Gn(y):r||(r=S&~t,r!==0&&(f=Gn(r))))):(S=o&~h,S!==0?f=Gn(S):y!==0?f=Gn(y):r||(r=o&~t,r!==0&&(f=Gn(r)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,r=n&-n,h>=r||h===32&&(r&4194048)!==0)?n:f}function Ga(t,n){return(t)DELIM" +R"DELIM(.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function sc(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 pl(){var t=Dr;return Dr<<=1,(Dr&62914560)===0&&(Dr=4194304),t}function Ka(t){for(var n=[],r=0;31>r;r++)n.push(t);return n}function aa(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Vo(t,n,r,o,f,h){var y=t.pendingLanes;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=r,t.entangledLanes&=r,t.errorRecoveryDisabledLanes&=r,t.shellSuspendCounter=0;var S=t.entanglements,A=t.expirationTimes,q=t.hiddenUpdates;for(r=y&~r;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var _a=/[\n"\\]/g;function tn(t){return t.replace(_a,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function yl(t,n,r,o,f,h,y,S){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),n!=null?y==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+ct(n)):t.value!==""+ct(n)&&(t.value=""+ct(n)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),n!=null?uc(t,y,ct(n)):r!=null?uc(t,y,ct(r)):o!=null&&t.removeAttribute("value"),f==null&&h!=null&&(t.defaultChecked=!!h),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+ct(S):t.removeAttribute("name")}function rm(t,n,r,o,f,h,y,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.type=h),n!=null||r!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){hi(t);return}r=r!=null?""+ct(r):"",n=n!=null?""+ct(n):r,S||n===t.value||(t.value=n),t.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=S?t.checked:!!o,t.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),hi(t)}function uc(t,n,r){n==="number"&&nt(t.ownerDocument)===t||t.defaultValue===""+r||(t.defaultValue=""+r)}function pi(t,n,r,o){if(t=t.options,n){n={};for(var f=0;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mc=!1;if(Ta)try{var vl={};Object.defineProperty(vl,"passive",{get:function(){mc=!0}}),window.addEventListener("test",vl,vl),window.removeEventListener("test",vl,vl)}catch{mc=!1}var Xa=null,pc=null,Wo=null;function fm(){if(Wo)return Wo;var t,n=pc,r=n.length,o,f="value"in Xa?Xa.value:Xa.textContent,h=f.length;for(t=0;t=Sl),gm=" ",vm=!1;function bm(t,n){switch(t){case"keyup":return c1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var bi=!1;function d1(t,n){switch(t){case"compositionend":return xm(n);case"keypress":return n.which!==32?null:(vm=!0,gm);case"textInput":return t=n.data,t===gm&&vm?null:t;default:return null}}function h1(t,n){if(bi)return t==="compositionend"||!xc&&bm(t,n)?(t=fm(),Wo=pc=Xa=null,bi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:r,offset:n-t};t=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Am(r)}}function jm(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?jm(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Nm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=nt(t.document);n instanceof t.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)t=n.contentWindow;else break;n=nt(t.document)}return n}function _c(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var S1=Ta&&"documentMode"in document&&11>=document.documentMode,xi=null,Ec=null,Tl=null,Tc=!1;function Om(t,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Tc||xi==null||xi!==nt(o)||(o=xi,"selectionStart"in o&&_c(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Tl&&El(Tl,o)||(Tl=o,o=Ys(Ec,"onSelect"),0>=y,f-=y,ra=1<<32-Kt(n)+f|r<Le?(qe=_e,_e=null):qe=_e.sibling;var Xe=F(U,_e,Z[Le],ee);if(Xe===null){_e===null&&(_e=qe);break}t&&_e&&Xe.alternate===null&&n(U,_e),M=h(Xe,M,Le),Ve===null?Ee=Xe:Ve.sibling=Xe,Ve=Xe,_e=qe}if(Le===Z.length)return r(U,_e),Pe&&za(U,Le),Ee;if(_e===null){for(;LeLe?(qe=_e,_e=null):qe=_e.sibling;var vr=F(U,_e,Xe.value,ee);if(vr===null){_e===null&&(_e=qe);break}t&&_e&&vr.alternate===null&&n(U,_e),M)DELIM" +R"DELIM(=h(vr,M,Le),Ve===null?Ee=vr:Ve.sibling=vr,Ve=vr,_e=qe}if(Xe.done)return r(U,_e),Pe&&za(U,Le),Ee;if(_e===null){for(;!Xe.done;Le++,Xe=Z.next())Xe=ae(U,Xe.value,ee),Xe!==null&&(M=h(Xe,M,Le),Ve===null?Ee=Xe:Ve.sibling=Xe,Ve=Xe);return Pe&&za(U,Le),Ee}for(_e=o(_e);!Xe.done;Le++,Xe=Z.next())Xe=V(_e,U,Le,Xe.value,ee),Xe!==null&&(t&&Xe.alternate!==null&&_e.delete(Xe.key===null?Le:Xe.key),M=h(Xe,M,Le),Ve===null?Ee=Xe:Ve.sibling=Xe,Ve=Xe);return t&&_e.forEach(function(ZS){return n(U,ZS)}),Pe&&za(U,Le),Ee}function ot(U,M,Z,ee){if(typeof Z=="object"&&Z!==null&&Z.type===T&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case _:e:{for(var Ee=Z.key;M!==null;){if(M.key===Ee){if(Ee=Z.type,Ee===T){if(M.tag===7){r(U,M.sibling),ee=f(M,Z.props.children),ee.return=U,U=ee;break e}}else if(M.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===w&&Fr(Ee)===M.type){r(U,M.sibling),ee=f(M,Z.props),Nl(ee,Z),ee.return=U,U=ee;break e}r(U,M);break}else n(U,M);M=M.sibling}Z.type===T?(ee=$r(Z.props.children,U.mode,ee,Z.key),ee.return=U,U=ee):(ee=us(Z.type,Z.key,Z.props,null,U.mode,ee),Nl(ee,Z),ee.return=U,U=ee)}return y(U);case R:e:{for(Ee=Z.key;M!==null;){if(M.key===Ee)if(M.tag===4&&M.stateNode.containerInfo===Z.containerInfo&&M.stateNode.implementation===Z.implementation){r(U,M.sibling),ee=f(M,Z.children||[]),ee.return=U,U=ee;break e}else{r(U,M);break}else n(U,M);M=M.sibling}ee=Oc(Z,U.mode,ee),ee.return=U,U=ee}return y(U);case w:return Z=Fr(Z),ot(U,M,Z,ee)}if(W(Z))return we(U,M,Z,ee);if(K(Z)){if(Ee=K(Z),typeof Ee!="function")throw Error(l(150));return Z=Ee.call(Z),Ae(U,M,Z,ee)}if(typeof Z.then=="function")return ot(U,M,ys(Z),ee);if(Z.$$typeof===ne)return ot(U,M,ds(U,Z),ee);gs(U,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,M!==null&&M.tag===6?(r(U,M.sibling),ee=f(M,Z),ee.return=U,U=ee):(r(U,M),ee=Nc(Z,U.mode,ee),ee.return=U,U=ee),y(U)):r(U,M)}return function(U,M,Z,ee){try{jl=0;var Ee=ot(U,M,Z,ee);return Ni=null,Ee}catch(_e){if(_e===ji||_e===ms)throw _e;var Ve=vn(29,_e,null,U.mode);return Ve.lanes=ee,Ve.return=U,Ve}}}var Gr=tp(!0),np=tp(!1),tr=!1;function Qc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fc(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function nr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ar(t,n,r){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(We&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=ss(t),Hm(t,null,r),n}return os(t,o,n,r),ss(t)}function Ol(t,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var o=n.lanes;o&=t.pendingLanes,r|=o,n.lanes=r,Io(t,r)}}function Yc(t,n){var r=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var f=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var y={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};h===null?f=h=y:h=h.next=y,r=r.next}while(r!==null);h===null?f=h=n:h=h.next=n}else f=h=n;r={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=n:t.next=n,r.lastBaseUpdate=n}var Gc=!1;function Ml(){if(Gc){var t=Ci;if(t!==null)throw t}}function kl(t,n,r,o){Gc=!1;var f=t.updateQueue;tr=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var A=S,q=A.next;A.next=null,y===null?h=q:y.next=q,y=A;var J=t.alternate;J!==null&&(J=J.updateQueue,S=J.lastBaseUpdate,S!==y&&(S===null?J.firstBaseUpdate=q:S.next=q,J.lastBaseUpdate=A))}if(h!==null){var ae=f.baseState;y=0,J=q=A=null,S=h;do{var F=S.lane&-536870913,V=F!==S.lane;if(V?(Ze&F)===F:(o&F)===F){F!==0&&F===Ai&&(Gc=!0),J!==null&&(J=J.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var we=t,Ae=S;F=n;var ot=r;switch(Ae.tag){case 1:if(we=Ae.payload,typeof we=="function"){ae=we.call(ot,ae,F);break e}ae=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Ae.payload,F=typeof we=="function"?we.call(ot,ae,F):we,F==null)break e;ae=g({},ae,F);break e;case 2:tr=!0}}F=S.callback,F!==null&&(t.flags|=64,V&&(t.flags|=8192),V=f.callbacks,V===null?f.callbacks=[F]:V.push(F))}else V={lane:F,tag:S.tag,payload:S.payload,callback:S.callback,next:null},J===null?(q=J=V,A=ae):J=J.next=V,y|=F;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;V=S,S=V.next,V.next=null,f.lastBaseUpdate=V,f.shared.pending=null}}while(!0);J===null&&(A=ae),f.baseState=A,f.firstBaseUpdate=q,f.lastBaseUpdate=J,h===null&&(f.shared.lanes=0),sr|=y,t.lanes=y,t.memoizedState=ae}}function ap(t,n){if(typeof t!="function")throw Error(l(191,t));t.call(n)}function rp(t,n){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;th?h:8;var y=N.T,S={};N.T=S,hf(t,!1,n,r);try{var A=f(),q=N.S;if(q!==null&&q(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var J=j1(A,o);Bl(t,n,J,_n(t))}else Bl(t,n,o,_n(t))}catch(ae){Bl(t,n,{then:function(){},status:"rejected",reason:ae},_n())}finally{B.p=h,y!==null&&S.types!==null&&(y.types=S.types),N.T=y}}function L1(){}function ff(t,n,r,o){if(t.tag!==5)throw Error(l(476));var f=Lp(t).queue;Dp(t,f,n,ue,r===null?L1:function(){return Bp(t),r(o)})}function Lp(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:ue},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:r},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Bp(t){var n=Lp(t);n.next===null&&(n=t.alternate.memoizedState),Bl(t,n.next.queue,{},_n())}function df(){return qt(eo)}function Up(){return Rt().memoizedState}function Hp(){return Rt().memoizedState}function B1(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var r=_n();t=nr(r);var o=ar(n,t,r);o!==null&&(hn(o,n,r),Ol(o,n,r)),n={cache:$c()},t.payload=n;return}n=n.return}}function U1(t,n,r){var o=_n();r={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(t)?Zp(n,r):(r=Cc(t,n,r,o),r!==null&&(hn(r,t,o),qp(r,n,o)))}function $p(t,n,r){var o=_n();Bl(t,n,r,o)}function Bl(t,n,r,o){var f={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(zs(t))Zp(n,f);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var y=n.lastRenderedState,S=h(y,r);if(f.hasEagerState=!0,f.eagerState=S,gn(S,y))return os(t,n,f,0),ft===null&&ls(),!1}catch{}if(r=Cc(t,n,f,o),r!==null)return hn(r,t,o),qp(r,n,o),!0}return!1}function hf(t,n,r,o){if(o={lane:2,revertLane:Ff(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},zs(t)){if(n)throw Error(l(479))}else n=Cc(t,r,o,2),n!==null&&hn(n,t,2)}function zs(t){var n=t.alternate;return t===De||n!==null&&n===De}function Zp(t,n){Mi=xs=!0;var r=t.pending;r===null?n.next=n:(n.next=r.next,r.next=n),t.pending=n}function qp(t,n,r){if((r&4194048)!==0){var o=n.lanes;o&=t.pendingLanes,r|=o,n.lanes=r,Io(t,r)}}var Ul={readContext:qt,use:_s,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};Ul.useEffectEvent=St;var Pp={readContext:qt,use:_s,useCallback:function(t,n){return nn().memoizedState=[t,n===void 0?null:n],t},useContext:qt,useEffect:Rp,useImperativeHandle:function(t,n,r){r=r!=null?r.concat([t]):null,Ts(4194308,4,jp.bind(null,n,t),r)},useLayoutEffect:function(t,n){return Ts(4194308,4,t,n)},useInsertionEffect:function(t,n){Ts(4,2,t,n)},useMemo:function(t,n){var r=nn();n=n===void 0?null:n;var o=t();if(Kr){Ht(!0);try{t()}finally{Ht(!1)}}return r.memoizedState=[o,n],o},useReducer:function(t,n,r){var o=nn();if(r!==void 0){var f=r(n);if(Kr){Ht(!0);try{r(n)}finally{Ht(!1)}}}else f=n;return o.memoizedState=o.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},o.queue=t,t=t.dispatch=U1.bind(null,De,t),[o.memoizedState,t]},useRef:function(t){var n=nn();return t={current:t},n.memoizedState=t},useState:function(t){t=lf(t);var n=t.queue,r=$p.bind(null,De,n);return n.dispatch=r,[t.memoizedState,r]},useDebugValue:uf,useDeferredValue:function(t,n){var r=nn();return cf(r,t,n)},useTransition:function(){var t=lf(!1);return t=Dp.bind(null,De,t.queue,!0,!1),nn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,r){var o=De,f=nn();if(Pe){if(r===void 0)throw Error(l(407));r=r()}else{if(r=n(),ft===null)throw Error(l(349));(Ze&127)!==0||cp(o,n,r)}f.memoizedState=r;var h={value:r,getSnapshot:n};return f.queue=h,)DELIM" +R"DELIM(Rp(dp.bind(null,o,h,t),[t]),o.flags|=2048,Di(9,{destroy:void 0},fp.bind(null,o,h,r,n),null),r},useId:function(){var t=nn(),n=ft.identifierPrefix;if(Pe){var r=ia,o=ra;r=(o&~(1<<32-Kt(o)-1)).toString(32)+r,n="_"+n+"R_"+r,r=Ss++,0<\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?h.multiple=!0:o.size&&(h.size=o.size);break;default:h=typeof o.is=="string"?y.createElement(f,{is:o.is}):y.createElement(f)}}h[pe]=n,h[ve]=o;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=h;e:switch(Qt(h,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Ma(n)}}return pt(n),zf(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,r),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==o&&Ma(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(l(166));if(t=fe.current,Ri(n)){if(t=n.stateNode,r=n.memoizedProps,o=null,f=Zt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}t[pe]=n,t=!!(t.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||sg(t.nodeValue,r)),t||Wa(n,!0)}else t=Gs(t).createTextNode(o),t[pe]=n,n.stateNode=t}return pt(n),null;case 31:if(r=n.memoizedState,t===null||t.memoizedState!==null){if(o=Ri(n),r!==null){if(t===null){if(!o)throw Error(l(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[pe]=n}else Zr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;pt(n),t=!1}else r=Lc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),t=!0;if(!t)return n.flags&256?(xn(n),n):(xn(n),null);if((n.flags&128)!==0)throw Error(l(558))}return pt(n),null;case 13:if(o=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=Ri(n),o!==null&&o.dehydrated!==null){if(t===null){if(!f)throw Error(l(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[pe]=n}else Zr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;pt(n),f=!1}else f=Lc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(xn(n),n):(xn(n),null)}return xn(n),(n.flags&128)!==0?(n.lanes=r,n):(r=o!==null,t=t!==null&&t.memoizedState!==null,r&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==f&&(o.flags|=2048)),r!==t&&r&&(n.child.flags|=8192),Os(n,n.updateQueue),pt(n),null);case 4:return be(),t===null&&Vf(n.stateNode.containerInfo),pt(n),null;case 10:return Ca(n.type),pt(n),null;case 19:if(C(Tt),o=n.memoizedState,o===null)return pt(n),null;if(f=(n.flags&128)!==0,h=o.rendering,h===null)if(f)$l(o,!1);else{if(wt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(h=bs(t),h!==null){for(n.flags|=128,$l(o,!1),t=h.updateQueue,n.updateQueue=t,Os(n,t),n.subtreeFlags=0,t=r,r=n.child;r!==null;)$m(r,t),r=r.sibling;return $(Tt,Tt.current&1|2),Pe&&za(n,o.treeForkCount),n.child}t=t.sibling}o.tail!==null&&Jt()>Bs&&(n.flags|=128,f=!0,$l(o,!1),n.lanes=4194304)}else{if(!f)if(t=bs(h),t!==null){if(n.flags|=128,f=!0,t=t.updateQueue,n.updateQueue=t,Os(n,t),$l(o,!0),o.tail===null&&o.tailMode==="hidden"&&!h.alternate&&!Pe)return pt(n),null}else 2*Jt()-o.renderingStartTime>Bs&&r!==536870912&&(n.flags|=128,f=!0,$l(o,!1),n.lanes=4194304);o.isBackwards?(h.sibling=n.child,n.child=h):(t=o.last,t!==null?t.sibling=h:n.child=h,o.last=h)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Jt(),t.sibling=null,r=Tt.current,$(Tt,f?r&1|2:r&1),Pe&&za(n,o.treeForkCount),t):(pt(n),null);case 22:case 23:return xn(n),Vc(),o=n.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(r&536870912)!==0&&(n.flags&128)===0&&(pt(n),n.subtreeFlags&6&&(n.flags|=8192)):pt(n),r=n.updateQueue,r!==null&&Os(n,r.retryQueue),r=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048),t!==null&&C(Qr),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),Ca(Nt),pt(n),null;case 25:return null;case 30:return null}throw Error(l(156,n.tag))}function P1(t,n){switch(kc(n),n.tag){case 1:return )DELIM" +R"DELIM(t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Ca(Nt),be(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return dt(n),null;case 31:if(n.memoizedState!==null){if(xn(n),n.alternate===null)throw Error(l(340));Zr()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(xn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(l(340));Zr()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return C(Tt),null;case 4:return be(),null;case 10:return Ca(n.type),null;case 22:case 23:return xn(n),Vc(),t!==null&&C(Qr),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Ca(Nt),null;case 25:return null;default:return null}}function hy(t,n){switch(kc(n),n.tag){case 3:Ca(Nt),be();break;case 26:case 27:case 5:dt(n);break;case 4:be();break;case 31:n.memoizedState!==null&&xn(n);break;case 13:xn(n);break;case 19:C(Tt);break;case 10:Ca(n.type);break;case 22:case 23:xn(n),Vc(),t!==null&&C(Qr);break;case 24:Ca(Nt)}}function Zl(t,n){try{var r=n.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var f=o.next;r=f;do{if((r.tag&t)===t){o=void 0;var h=r.create,y=r.inst;o=h(),y.destroy=o}r=r.next}while(r!==f)}}catch(S){rt(n,n.return,S)}}function lr(t,n,r){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var h=f.next;o=h;do{if((o.tag&t)===t){var y=o.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,f=n;var A=r,q=S;try{q()}catch(J){rt(f,A,J)}}}o=o.next}while(o!==h)}}catch(J){rt(n,n.return,J)}}function my(t){var n=t.updateQueue;if(n!==null){var r=t.stateNode;try{rp(n,r)}catch(o){rt(t,t.return,o)}}}function py(t,n,r){r.props=Vr(t.type,t.memoizedProps),r.state=t.memoizedState;try{r.componentWillUnmount()}catch(o){rt(t,n,o)}}function ql(t,n){try{var r=t.ref;if(r!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof r=="function"?t.refCleanup=r(o):r.current=o}}catch(f){rt(t,n,f)}}function la(t,n){var r=t.ref,o=t.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(f){rt(t,n,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(f){rt(t,n,f)}else r.current=null}function yy(t){var n=t.type,r=t.memoizedProps,o=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(f){rt(t,t.return,f)}}function Af(t,n,r){try{var o=t.stateNode;fS(o,t.type,r,n),o[ve]=n}catch(f){rt(t,t.return,f)}}function gy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&hr(t.type)||t.tag===4}function Cf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||gy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&hr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function jf(t,n,r){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(t,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(t),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=Ea));else if(o!==4&&(o===27&&hr(t.type)&&(r=t.stateNode,n=null),t=t.child,t!==null))for(jf(t,n,r),t=t.sibling;t!==null;)jf(t,n,r),t=t.sibling}function Ms(t,n,r){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?r.insertBefore(t,n):r.appendChild(t);else if(o!==4&&(o===27&&hr(t.type)&&(r=t.stateNode),t=t.child,t!==null))for(Ms(t,n,r),t=t.sibling;t!==null;)Ms(t,n,r),t=t.sibling}function vy(t){var n=t.stateNode,r=t.memoizedProps;try{for(var o=t.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Qt(n,o,r),n[pe]=t,n[ve]=r}catch(h){rt(t,t.return,h)}}var ka=!1,kt=!1,Nf=!1,by=typeof WeakSet=="function"?WeakSet:Set,$t=null;function Q1(t,n){if(t=t.containerInfo,Jf=eu,t=Nm(t),_c(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var f=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var y=0,S=-1,A=-1,q=0,J=0,ae=t,F=null;t:for(;;){for(var V;ae!==r||f!==0&&ae.nodeType!==3||(S=y+f),ae!==h||o!==0&&ae.nodeType!==3||(A=y+o),ae.nodeType===3&&(y+=ae.nodeValue.length),(V=ae.firstChild)!==null;)F=ae,ae=V;for(;;){if(ae===t)break t;if(F===r&&++q===f&&(S=y),F===h&&++J===o&&(A=y),(V=ae.nextSibling)!==null)break;ae=F,F=ae.parentNode}ae=V}r=S===-1||A===-1?null:{start:S,end:A}}else r=null}r=r||{start:0,end:0}}else r=null;for(Wf={focusedElem:t,selectionRange:r},eu=!1,$t=n;$t!==null;)if(n=$t,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,$t=t;else for(;$t!==null;){switch(n=$t,h=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(r=0;r title"))),Qt(h,o,r),h[pe]=t,Ye(h),o=h;break e;case"link":var y=Tg("link","href",f).get(o+(r.href||""));if(y){for(var S=0;Sot&&(y=ot,ot=Ae,Ae=y);var U=Cm(S,Ae),M=Cm(S,ot);if(U&&M&&(V.rangeCount!==1||V.anchorNode!==U.node||V.anchorOffset!==U.offset||V.focusNode!==M.node||V.focusOffset!==M.offset)){var Z=ae.createRange();Z.setStart(U.node,U.offset),V.removeAllRanges(),Ae>ot?(V.addRange(Z),V.extend(M.node,M.offset)):(Z.setEnd(M.node,M.offset),V.addRange(Z))}}}}for(ae=[],V=S;V=V.parentNode;)V.nodeType===1&&ae.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;Sr?32:r,N.T=null,r=Uf,Uf=null;var h=cr,y=Ha;if(Bt=0,$i=cr=null,Ha=0,(We&6)!==0)throw Error(l(331));var S=We;if(We|=4,jy(h.current),zy(h,h.current,y,r),We=S,Kl(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(ba,h)}catch{}return!0}finally{B.p=f,N.T=o,Ky(t,n)}}function Xy(t,n,r){n=On(r,n),n=gf(t.stateNode,n,2),t=ar(t,n,2),t!==null&&(aa(t,2),oa(t))}function rt(t,n,r){if(t.tag===3)Xy(t,t,r);else for(;n!==null;){if(n.tag===3){Xy(n,t,r);break}else if(n.tag===1){var o=n.stateNode;if(typeof )DELIM" +R"DELIM(n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ur===null||!ur.has(o))){t=On(r,t),r=Ip(2),o=ar(n,r,2),o!==null&&(Jp(r,o,n,t),aa(o,2),oa(o));break}}n=n.return}}function qf(t,n,r){var o=t.pingCache;if(o===null){o=t.pingCache=new G1;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(r)||(kf=!0,f.add(r),t=J1.bind(null,t,n,r),n.then(t,t))}function J1(t,n,r){var o=t.pingCache;o!==null&&o.delete(n),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,ft===t&&(Ze&r)===r&&(wt===4||wt===3&&(Ze&62914560)===Ze&&300>Jt()-Ls?(We&2)===0&&Zi(t,0):Df|=r,Hi===Ze&&(Hi=0)),oa(t)}function Iy(t,n){n===0&&(n=pl()),t=Hr(t,n),t!==null&&(aa(t,n),oa(t))}function W1(t){var n=t.memoizedState,r=0;n!==null&&(r=n.retryLane),Iy(t,r)}function eS(t,n){var r=0;switch(t.tag){case 31:case 13:var o=t.stateNode,f=t.memoizedState;f!==null&&(r=f.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(n),Iy(t,r)}function tS(t,n){return Ut(t,n)}var Ps=null,Pi=null,Pf=!1,Qs=!1,Qf=!1,dr=0;function oa(t){t!==Pi&&t.next===null&&(Pi===null?Ps=Pi=t:Pi=Pi.next=t),Qs=!0,Pf||(Pf=!0,aS())}function Kl(t,n){if(!Qf&&Qs){Qf=!0;do for(var r=!1,o=Ps;o!==null;){if(t!==0){var f=o.pendingLanes;if(f===0)var h=0;else{var y=o.suspendedLanes,S=o.pingedLanes;h=(1<<31-Kt(42|t)+1)-1,h&=f&~(y&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(r=!0,tg(o,h))}else h=Ze,h=ci(o,o===ft?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||Ga(o,h)||(r=!0,tg(o,h));o=o.next}while(r);Qf=!1}}function nS(){Jy()}function Jy(){Qs=Pf=!1;var t=0;dr!==0&&hS()&&(t=dr);for(var n=Jt(),r=null,o=Ps;o!==null;){var f=o.next,h=Wy(o,n);h===0?(o.next=null,r===null?Ps=f:r.next=f,f===null&&(Pi=r)):(r=o,(t!==0||(h&3)!==0)&&(Qs=!0)),o=f}Bt!==0&&Bt!==5||Kl(t),dr!==0&&(dr=0)}function Wy(t,n){for(var r=t.suspendedLanes,o=t.pingedLanes,f=t.expirationTimes,h=t.pendingLanes&-62914561;0S)break;var J=A.transferSize,ae=A.initiatorType;J&&ug(ae)&&(A=A.responseEnd,y+=J*(A"u"?null:document;function Sg(t,n,r){var o=Qi;if(o&&typeof n=="string"&&n){var f=tn(n);f='link[rel="'+t+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),xg.has(f)||(xg.add(f),t={rel:t,crossOrigin:r,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),Qt(n,"link",t),Ye(n),o.head.appendChild(n)))}}function wS(t){$a.D(t),Sg("dns-prefetch",t,null)}function _S(t,n){$a.C(t,n),Sg("preconnect",t,n)}function ES(t,n,r){$a.L(t,n,r);var o=Qi;if(o&&t&&n){var f='link[rel="preload"][as="'+tn(n)+'"]';n==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+tn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+tn(r.imageSizes)+'"]')):f+='[href="'+tn(t)+'"]';var h=f;switch(n){case"style":h=Fi(t);break;case"script":h=Yi(t)}Un.has(h)||(t=g({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:t,as:n},r),Un.set(h,t),o.querySelector(f)!==null||n==="style"&&o.querySelector(Jl(h))||n==="script"&&o.querySelector(Wl(h))||(n=o.createElement("link"),Qt(n,"link",t),Ye(n),o.head.appendChild(n)))}}function TS(t,n){$a.m(t,n);var r=Qi;if(r&&t){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modu)DELIM" +R"DELIM(lepreload"][as="'+tn(o)+'"][href="'+tn(t)+'"]',h=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Yi(t)}if(!Un.has(h)&&(t=g({rel:"modulepreload",href:t},n),Un.set(h,t),r.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Wl(h)))return}o=r.createElement("link"),Qt(o,"link",t),Ye(o),r.head.appendChild(o)}}}function RS(t,n,r){$a.S(t,n,r);var o=Qi;if(o&&t){var f=Et(o).hoistableStyles,h=Fi(t);n=n||"default";var y=f.get(h);if(!y){var S={loading:0,preload:null};if(y=o.querySelector(Jl(h)))S.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":n},r),(r=Un.get(h))&&ld(t,r);var A=y=o.createElement("link");Ye(A),Qt(A,"link",t),A._p=new Promise(function(q,J){A.onload=q,A.onerror=J}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Vs(y,n,o)}y={type:"stylesheet",instance:y,count:1,state:S},f.set(h,y)}}}function zS(t,n){$a.X(t,n);var r=Qi;if(r&&t){var o=Et(r).hoistableScripts,f=Yi(t),h=o.get(f);h||(h=r.querySelector(Wl(f)),h||(t=g({src:t,async:!0},n),(n=Un.get(f))&&od(t,n),h=r.createElement("script"),Ye(h),Qt(h,"link",t),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(f,h))}}function AS(t,n){$a.M(t,n);var r=Qi;if(r&&t){var o=Et(r).hoistableScripts,f=Yi(t),h=o.get(f);h||(h=r.querySelector(Wl(f)),h||(t=g({src:t,async:!0,type:"module"},n),(n=Un.get(f))&&od(t,n),h=r.createElement("script"),Ye(h),Qt(h,"link",t),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(f,h))}}function wg(t,n,r,o){var f=(f=fe.current)?Ks(f):null;if(!f)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(n=Fi(r.href),r=Et(f).hoistableStyles,o=r.get(n),o||(o={type:"style",instance:null,count:0,state:null},r.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){t=Fi(r.href);var h=Et(f).hoistableStyles,y=h.get(t);if(y||(f=f.ownerDocument||f,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(t,y),(h=f.querySelector(Jl(t)))&&!h._p&&(y.instance=h,y.state.loading=5),Un.has(t)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Un.set(t,r),h||CS(f,t,r,y.state))),n&&o===null)throw Error(l(528,""));return y}if(n&&o!==null)throw Error(l(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Yi(r),r=Et(f).hoistableScripts,o=r.get(n),o||(o={type:"script",instance:null,count:0,state:null},r.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Fi(t){return'href="'+tn(t)+'"'}function Jl(t){return'link[rel="stylesheet"]['+t+"]"}function _g(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function CS(t,n,r,o){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=t.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Qt(n,"link",r),Ye(n),t.head.appendChild(n))}function Yi(t){return'[src="'+tn(t)+'"]'}function Wl(t){return"script[async]"+t}function Eg(t,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var o=t.querySelector('style[data-href~="'+tn(r.href)+'"]');if(o)return n.instance=o,Ye(o),o;var f=g({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Ye(o),Qt(o,"style",f),Vs(o,r.precedence,t),n.instance=o;case"stylesheet":f=Fi(r.href);var h=t.querySelector(Jl(f));if(h)return n.state.loading|=4,n.instance=h,Ye(h),h;o=_g(r),(f=Un.get(f))&&ld(o,f),h=(t.ownerDocument||t).createElement("link"),Ye(h);var y=h;return y._p=new Promise(function(S,A){y.onload=S,y.onerror=A}),Qt(h,"link",o),n.state.loading|=4,Vs(h,r.precedence,t),n.instance=h;case"script":return h=Yi(r.src),(f=t.querySelector(Wl(h)))?(n.instance=f,Ye(f),f):(o=r,(f=Un.get(h))&&(o=g({},r),od(o,f)),t=t.ownerDocument||t,f=t.createElement("script"),Ye(f),Qt(f,"link",o),t.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Vs(o,r.precedence,t));return n.instance}function Vs(t,n,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,h=f,y=0;y title"):null)}function jS(t,n,r){if(r===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function zg(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function NS(t,n,r,o){if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var f=Fi(o.href),h=n.querySelector(Jl(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=Is.bind(t),n.then(t,t)),r.state.loading|=4,r.instance=h,Ye(h);return}h=n.ownerDocument||n,o=_g(o),(f=Un.get(f))&&ld(o,f),h=h.createElement("link"),Ye(h);var y=h;y._p=new Promise(function(S,A){y.onload=S,y.onerror=A}),Qt(h,"link",o),r.instance=h}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(t.count++,r=Is.bind(t),n.addEventListener("load",r),n.addEventListener("error",r))}}var sd=0;function OS(t,n){return t.stylesheets&&t.count===0&&Ws(t,t.stylesheets),0sd?50:800)+n);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Is(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ws(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Js=null;function Ws(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Js=new Map,n.forEach(MS,t),Js=null,Is.call(t))}function MS(t,n){if(!(n.state.loading&4)){var r=Js.get(t);if(r)var o=r.get(null);else{r=new Map,Js.set(t,r);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),gd.exports=XS(),gd.exports}var JS=IS();const WS=mh(JS);var Do=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ew=class extends Do{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const a=()=>e();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=v)DELIM" +R"DELIM(oid 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(a=>{a(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},yh=new ew,tw={setTimeout:(e,a)=>setTimeout(e,a),clearTimeout:e=>clearTimeout(e),setInterval:(e,a)=>setInterval(e,a),clearInterval:e=>clearInterval(e)},nw=class{#e=tw;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,a){return this.#e.setTimeout(e,a)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,a){return this.#e.setInterval(e,a)}clearInterval(e){this.#e.clearInterval(e)}},ti=new nw;function aw(e){setTimeout(e,0)}var rw=typeof window>"u"||"Deno"in globalThis;function mn(){}function iw(e,a){return typeof e=="function"?e(a):e}function Yd(e){return typeof e=="number"&&e>=0&&e!==1/0}function M0(e,a){return Math.max(e+(a||0)-Date.now(),0)}function Cr(e,a){return typeof e=="function"?e(a):e}function En(e,a){return typeof e=="function"?e(a):e}function Ig(e,a){const{type:i="all",exact:l,fetchStatus:s,predicate:u,queryKey:c,stale:d}=e;if(c){if(l){if(a.queryHash!==gh(c,a.options))return!1}else if(!_o(a.queryKey,c))return!1}if(i!=="all"){const m=a.isActive();if(i==="active"&&!m||i==="inactive"&&m)return!1}return!(typeof d=="boolean"&&a.isStale()!==d||s&&s!==a.state.fetchStatus||u&&!u(a))}function Jg(e,a){const{exact:i,status:l,predicate:s,mutationKey:u}=e;if(u){if(!a.options.mutationKey)return!1;if(i){if(wo(a.options.mutationKey)!==wo(u))return!1}else if(!_o(a.options.mutationKey,u))return!1}return!(l&&a.state.status!==l||s&&!s(a))}function gh(e,a){return(a?.queryKeyHashFn||wo)(e)}function wo(e){return JSON.stringify(e,(a,i)=>Kd(i)?Object.keys(i).sort().reduce((l,s)=>(l[s]=i[s],l),{}):i)}function _o(e,a){return e===a?!0:typeof e!=typeof a?!1:e&&a&&typeof e=="object"&&typeof a=="object"?Object.keys(a).every(i=>_o(e[i],a[i])):!1}var lw=Object.prototype.hasOwnProperty;function k0(e,a,i=0){if(e===a)return e;if(i>500)return a;const l=Wg(e)&&Wg(a);if(!l&&!(Kd(e)&&Kd(a)))return a;const u=(l?e:Object.keys(e)).length,c=l?a:Object.keys(a),d=c.length,m=l?new Array(d):{};let p=0;for(let b=0;b{ti.setTimeout(a,e)})}function Vd(e,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,a):i.structuralSharing!==!1?k0(e,a):a}function sw(e,a,i=0){const l=[...e,a];return i&&l.length>i?l.slice(1):l}function uw(e,a,i=0){const l=[a,...e];return i&&l.length>i?l.slice(0,-1):l}var vh=Symbol();function D0(e,a){return!e.queryFn&&a?.initialPromise?()=>a.initialPromise:!e.queryFn||e.queryFn===vh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function L0(e,a){return typeof e=="function"?e(...a):!!e}function cw(e,a,i){let l=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=a(),l||(l=!0,s.aborted?i():s.addEventListener("abort",i,{once:!0})),s)}),e}var Eo=(()=>{let e=()=>rw;return{isServer(){return e()},setIsServer(a){e=a}}})();function Xd(){let e,a;const i=new Promise((s,u)=>{e=s,a=u});i.status="pending",i.catch(()=>{});function l(s){Object.assign(i,s),delete i.resolve,delete i.reject}return i.resolve=s=>{l({status:"fulfilled",value:s}),e(s)},i.reject=s=>{l({status:"rejected",reason:s}),a(s)},i}var fw=aw;function dw(){let e=[],a=0,i=d=>{d()},l=d=>{d()},s=fw;const u=d=>{a?e.push(d):s(()=>{i(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{l(()=>{d.forEach(m=>{i(m)})})})};return{batch:d=>{let m;a++;try{m=d()}finally{a--,a||c()}return m},batchCalls:d=>(...m)=>{u(()=>{d(...m)})},schedule:u,setNotifyFunction:d=>{i=d},setBatchNotifyFunction:d=>{l=d},setScheduler:d=>{s=d}}}var Yt=dw(),hw=class extends Do{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const a=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(t)DELIM" +R"DELIM(his.#e=e,this.listeners.forEach(i=>{i(e)}))}isOnline(){return this.#e}},Ou=new hw;function mw(e){return Math.min(1e3*2**e,3e4)}function B0(e){return(e??"online")==="online"?Ou.isOnline():!0}var Id=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function U0(e){let a=!1,i=0,l;const s=Xd(),u=()=>s.status!=="pending",c=T=>{if(!u()){const k=new Id(T);x(k),e.onCancel?.(k)}},d=()=>{a=!0},m=()=>{a=!1},p=()=>yh.isFocused()&&(e.networkMode==="always"||Ou.isOnline())&&e.canRun(),b=()=>B0(e.networkMode)&&e.canRun(),g=T=>{u()||(l?.(),s.resolve(T))},x=T=>{u()||(l?.(),s.reject(T))},_=()=>new Promise(T=>{l=k=>{(u()||p())&&T(k)},e.onPause?.()}).then(()=>{l=void 0,u()||e.onContinue?.()}),R=()=>{if(u())return;let T;const k=i===0?e.initialPromise:void 0;try{T=k??e.fn()}catch(Y){T=Promise.reject(Y)}Promise.resolve(T).then(g).catch(Y=>{if(u())return;const X=e.retry??(Eo.isServer()?0:3),ne=e.retryDelay??mw,se=typeof ne=="function"?ne(i,Y):ne,te=X===!0||typeof X=="number"&&ip()?void 0:_()).then(()=>{a?x(Y):R()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(l?.(),s),cancelRetry:d,continueRetry:m,canStart:b,start:()=>(b()?R():_().then(R),s)}}var H0=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yd(this.gcTime)&&(this.#e=ti.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Eo.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ti.clearTimeout(this.#e),this.#e=void 0)}};function pw(e){return{onFetch:(a,i)=>{const l=a.options,s=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],c=a.state.data?.pageParams||[];let d={pages:[],pageParams:[]},m=0;const p=async()=>{let b=!1;const g=R=>{cw(R,()=>a.signal,()=>b=!0)},x=D0(a.options,a.fetchOptions),_=async(R,T,k)=>{if(b)return Promise.reject(a.signal.reason);if(T==null&&R.pages.length)return Promise.resolve(R);const X=(()=>{const xe={client:a.client,queryKey:a.queryKey,pageParam:T,direction:k?"backward":"forward",meta:a.options.meta};return g(xe),xe})(),ne=await x(X),{maxPages:se}=a.options,te=k?uw:sw;return{pages:te(R.pages,ne,se),pageParams:te(R.pageParams,T,se)}};if(s&&u.length){const R=s==="backward",T=R?yw:tv,k={pages:u,pageParams:c},Y=T(l,k);d=await _(k,Y,R)}else{const R=e??u.length;do{const T=m===0?c[0]??l.initialPageParam:tv(l,d);if(m>0&&T==null)break;d=await _(d,T),m++}while(ma.options.persister?.(p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i):a.fetchFn=p}}}function tv(e,{pages:a,pageParams:i}){const l=a.length-1;return a.length>0?e.getNextPageParam(a[l],a,i[l],i):void 0}function yw(e,{pages:a,pageParams:i}){return a.length>0?e.getPreviousPageParam?.(a[0],a,i[0],i):void 0}var gw=class extends H0{#e;#t;#n;#a;#i;#r;#o;#l;constructor(e){super(),this.#l=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#a=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=av(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=av(this.options);a.data!==void 0&&(this.setState(nv(a.data,a.dataUpdatedAt)),this.#t=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(e,a){const i=Vd(this.state.data,e,this.options);return this.#s({data:i,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),i}setState(e){this.#s({type:"setState",state:e})}cancel(e){const a=this.#r?.promise;return this.#r?.cancel(e),a?a.then(mn).catch(mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>En(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Cr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!M0(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(a=>a.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(a=>a.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.obser)DELIM" +R"DELIM(vers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(a=>a!==e),this.observers.length||(this.#r&&(this.#l||this.#c()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,a){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const i=new AbortController,l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#l=!0,i.signal)})},s=()=>{const m=D0(this.options,a),b=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return l(g),g})();return this.#l=!1,this.options.persister?this.options.persister(m,b,this):m(b)},c=(()=>{const m={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:s};return l(m),m})();(this.#e==="infinite"?pw(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#s({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=U0({initialPromise:a?.initialPromise,fn:c.fetchFn,onCancel:m=>{m instanceof Id&&m.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.abort()},onFail:(m,p)=>{this.#s({type:"failed",failureCount:m,error:p})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const m=await this.#r.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#a.config.onSuccess?.(m,this),this.#a.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Id){if(m.silent)return this.#r.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#s({type:"error",error:m}),this.#a.config.onError?.(m,this),this.#a.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#s(e){const a=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...$0(i.data,this.options),fetchMeta:e.meta??null};case"success":const l={...i,...nv(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?l:void 0,l;case"error":const s=e.error;return{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=a(this.state),Yt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}};function $0(e,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:B0(a.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nv(e,a){return{data:e,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function av(e){const a=typeof e.initialData=="function"?e.initialData():e.initialData,i=a!==void 0,l=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var vw=class extends Do{constructor(e,a){super(),this.options=a,this.#e=e,this.#l=null,this.#o=Xd(),this.bindMethods(),this.setOptions(a)}#e;#t=void 0;#n=void 0;#a=void 0;#i;#r;#o;#l;#c;#s;#m;#f;#d;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),rv(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const a=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOption)DELIM" +R"DELIM(s(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof En(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),a._defaulted&&!Gd(this.options,a)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&iv(this.#t,i,this.options,a)&&this.#h(),this.updateResult(),l&&(this.#t!==i||En(this.options.enabled,this.#t)!==En(a.enabled,this.#t)||Cr(this.options.staleTime,this.#t)!==Cr(a.staleTime,this.#t))&&this.#y();const s=this.#g();l&&(this.#t!==i||En(this.options.enabled,this.#t)!==En(a.enabled,this.#t)||s!==this.#u)&&this.#v(s)}getOptimisticResult(e){const a=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(a,e);return xw(this,i)&&(this.#a=i,this.#r=this.options,this.#i=this.#t.state),i}getCurrentResult(){return this.#a}trackResult(e,a){return new Proxy(e,{get:(i,l)=>(this.trackProp(l),a?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,l))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const a=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCache().build(this.#e,a);return i.fetch().then(()=>this.createResult(i,a))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#h(e){this.#w();let a=this.#t.fetch(this.options,e);return e?.throwOnError||(a=a.catch(mn)),a}#y(){this.#x();const e=Cr(this.options.staleTime,this.#t);if(Eo.isServer()||this.#a.isStale||!Yd(e))return;const i=M0(this.#a.dataUpdatedAt,e)+1;this.#f=ti.setTimeout(()=>{this.#a.isStale||this.updateResult()},i)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#S(),this.#u=e,!(Eo.isServer()||En(this.options.enabled,this.#t)===!1||!Yd(this.#u)||this.#u===0)&&(this.#d=ti.setInterval(()=>{(this.options.refetchIntervalInBackground||yh.isFocused())&&this.#h()},this.#u))}#b(){this.#y(),this.#v(this.#g())}#x(){this.#f!==void 0&&(ti.clearTimeout(this.#f),this.#f=void 0)}#S(){this.#d!==void 0&&(ti.clearInterval(this.#d),this.#d=void 0)}createResult(e,a){const i=this.#t,l=this.options,s=this.#a,u=this.#i,c=this.#r,m=e!==i?e.state:this.#n,{state:p}=e;let b={...p},g=!1,x;if(a._optimisticResults){const w=this.hasListeners(),L=!w&&rv(e,a),H=w&&iv(e,i,a,l);(L||H)&&(b={...b,...$0(p.data,e.options)}),a._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:_,errorUpdatedAt:R,status:T}=b;x=b.data;let k=!1;if(a.placeholderData!==void 0&&x===void 0&&T==="pending"){let w;s?.isPlaceholderData&&a.placeholderData===c?.placeholderData?(w=s.data,k=!0):w=typeof a.placeholderData=="function"?a.placeholderData(this.#m?.state.data,this.#m):a.placeholderData,w!==void 0&&(T="success",x=Vd(s?.data,w,a),g=!0)}if(a.select&&x!==void 0&&!k)if(s&&x===u?.data&&a.select===this.#c)x=this.#s;else try{this.#c=a.select,x=a.select(x),x=Vd(s?.data,x,a),this.#s=x,this.#l=null}catch(w){this.#l=w}this.#l&&(_=this.#l,x=this.#s,R=Date.now(),T="error");const Y=b.fetchStatus==="fetching",X=T==="pending",ne=T==="error",se=X&&Y,te=x!==void 0,O={status:T,fetchStatus:b.fetchStatus,isPending:X,isSuccess:T==="success",isError:ne,isInitialLoading:se,isLoading:se,data:x,dataUpdatedAt:b.dataUpdatedAt,error:_,errorUpdatedAt:R,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:b.dataUpdateCount>m.dataUpdateCount||b.errorUpdateCount>m.errorUpdateCount,isFetching:Y,isRefetching:Y&&!X,isLoadingError:ne&&!te,isPaused:b.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:ne&&te,isStale:bh(e,a),refetch:this.refetch,promise:this.#o,isEnabled:En(a.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const w=O.data!==void 0,L=O.status==="error"&&!w,H=he=>{L?he.reject(O.error):w&&he.resolve(O.data)},Q=()=>{const he=this.#o=O.promise=Xd();H(he)},K=this.#o;switch(K.status){case"pending":e.queryHash===i.queryHash&&H(K);break;case"fulfilled":(L||O.data!==K.value)&&Q();break;case"rejected":(!L||O.error!==K.reason)&&Q();break}}return O}updateResult(){const e=this.#a,a=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#r=this.options,this.#i.data!==void 0&&(this.#m=this.#t),Gd(a,e))return;this.#a=a;const i=()=>{if(!e)return!0;const{notifyOnChangeProps:l}=this.options,s=typeof l=="function"?l():l;if(s==="all"||!s&&!this.#p.size)return!0;const u=new Set(s??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#a).some(c=>{const d=c;return this.#a[d]!==e[d]&&u.has(d)})};this.#_({listeners:i()})}#w(){const e=this.#e.getQuer)DELIM" +R"DELIM(yCache().build(this.#e,this.options);if(e===this.#t)return;const a=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(a?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#_(e){Yt.batch(()=>{e.listeners&&this.listeners.forEach(a=>{a(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function bw(e,a){return En(a.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&En(a.retryOnMount,e)===!1)}function rv(e,a){return bw(e,a)||e.state.data!==void 0&&Jd(e,a,a.refetchOnMount)}function Jd(e,a,i){if(En(a.enabled,e)!==!1&&Cr(a.staleTime,e)!=="static"){const l=typeof i=="function"?i(e):i;return l==="always"||l!==!1&&bh(e,a)}return!1}function iv(e,a,i,l){return(e!==a||En(l.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&bh(e,i)}function bh(e,a){return En(a.enabled,e)!==!1&&e.isStaleByTime(Cr(a.staleTime,e))}function xw(e,a){return!Gd(e.getCurrentResult(),a)}var Sw=class extends H0{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ww(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(a=>a!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const a=()=>{this.#i({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=U0({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#i({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",s=!this.#a.canStart();try{if(l)a();else{this.#i({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,i);const c=await this.options.onMutate?.(e,i);c!==this.state.context&&this.#i({type:"pending",context:c,variables:e,isPaused:s})}const u=await this.#a.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,i),await this.options.onSuccess?.(u,e,this.state.context,i),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(u,null,e,this.state.context,i),this.#i({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,e,this.state.context,this,i)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,e,this.state.context,i)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,i)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,i)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:u}),u}finally{this.#n.runNext(this)}}#i(e){const a=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=a(this.state),Yt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function ww(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _w=class extends Do{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,a,i){const l=new Sw({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(a),state:i});return this.add(l),l}add(e){this.#e.add(e);const a=ou(e);if(typeof a=="string"){const i=this.#t.get(a);i?i.push(e):this.#t.set(a,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const a=ou(e);if(typeof a=="string"){const i=this.#t.get(a);if(i)if(i.length>1){const l=i.indexOf(e);l!==-1&&i.splice(l,1)}else i[0]===e&&this.#t.delete(a)}}this.notify({type:"removed",mutation:e})}canRun(e){const a=ou(e);if(typeof a=="string"){co)DELIM" +R"DELIM(nst l=this.#t.get(a)?.find(s=>s.state.status==="pending");return!l||l===e}else return!0}runNext(e){const a=ou(e);return typeof a=="string"?this.#t.get(a)?.find(l=>l!==e&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Yt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const a={exact:!0,...e};return this.getAll().find(i=>Jg(a,i))}findAll(e={}){return this.getAll().filter(a=>Jg(e,a))}notify(e){Yt.batch(()=>{this.listeners.forEach(a=>{a(e)})})}resumePausedMutations(){const e=this.getAll().filter(a=>a.state.isPaused);return Yt.batch(()=>Promise.all(e.map(a=>a.continue().catch(mn))))}};function ou(e){return e.options.scope?.id}var Ew=class extends Do{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,a,i){const l=a.queryKey,s=a.queryHash??gh(l,a);let u=this.get(s);return u||(u=new gw({client:e,queryKey:l,queryHash:s,options:e.defaultQueryOptions(a),state:i,defaultOptions:e.getQueryDefaults(l)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const a=this.#e.get(e.queryHash);a&&(e.destroy(),a===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Yt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const a={exact:!0,...e};return this.getAll().find(i=>Ig(a,i))}findAll(e={}){const a=this.getAll();return Object.keys(e).length>0?a.filter(i=>Ig(e,i)):a}notify(e){Yt.batch(()=>{this.listeners.forEach(a=>{a(e)})})}onFocus(){Yt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Yt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Tw=class{#e;#t;#n;#a;#i;#r;#o;#l;constructor(e={}){this.#e=e.queryCache||new Ew,this.#t=e.mutationCache||new _w,this.#n=e.defaultOptions||{},this.#a=new Map,this.#i=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#o=yh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Ou.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#o?.(),this.#o=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const a=this.defaultQueryOptions({queryKey:e});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(e){const a=this.defaultQueryOptions(e),i=this.#e.build(this,a),l=i.state.data;return l===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Cr(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(l))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:a,state:i})=>{const l=i.data;return[a,l]})}setQueryData(e,a,i){const l=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(l.queryHash)?.state.data,c=iw(a,u);if(c!==void 0)return this.#e.build(this,l).setData(c,{...i,manual:!0})}setQueriesData(e,a,i){return Yt.batch(()=>this.#e.findAll(e).map(({queryKey:l})=>[l,this.setQueryData(l,a,i)]))}getQueryState(e){const a=this.defaultQueryOptions({queryKey:e});return this.#e.get(a.queryHash)?.state}removeQueries(e){const a=this.#e;Yt.batch(()=>{a.findAll(e).forEach(i=>{a.remove(i)})})}resetQueries(e,a){const i=this.#e;return Yt.batch(()=>(i.findAll(e).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...e},a)))}cancelQueries(e,a={}){const i={revert:!0,...a},l=Yt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(i)));return Promise.all(l).then(mn).catch(mn)}invalidateQueries(e,a={}){return Yt.batch(()=>(this.#e.findAll(e).forEach(i=>{i.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},a)))}refetchQueries(e,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},l=Yt.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,i);return i.throwOnError||(u=u.catch(mn)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(l).then(mn)}fetchQuery(e){const a=this.defaultQueryOptions(e);a.retry===void 0&&(a.retry=!1);const i=this.#e.build(this,a);return i.isStaleByTime(Cr(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mn).catch(mn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mn).catch(mn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ou.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,a){this.#a.set(wo(e),{queryKey:e,defaultOptions:a})}getQueryDefaults(e){const a=[...this.#a.values()],i={};return a.forEach(l=>{_o(e,l.qu)DELIM" +R"DELIM(eryKey)&&Object.assign(i,l.defaultOptions)}),i}setMutationDefaults(e,a){this.#i.set(wo(e),{mutationKey:e,defaultOptions:a})}getMutationDefaults(e){const a=[...this.#i.values()],i={};return a.forEach(l=>{_o(e,l.mutationKey)&&Object.assign(i,l.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const a={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return a.queryHash||(a.queryHash=gh(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===vh&&(a.enabled=!1),a}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Z0=E.createContext(void 0),Gu=e=>{const a=E.useContext(Z0);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},Rw=({client:e,children:a})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(Z0.Provider,{value:e,children:a})),q0=E.createContext(!1),zw=()=>E.useContext(q0);q0.Provider;function Aw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Cw=E.createContext(Aw()),jw=()=>E.useContext(Cw),Nw=(e,a,i)=>{const l=i?.state.error&&typeof e.throwOnError=="function"?L0(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||l)&&(a.isReset()||(e.retryOnMount=!1))},Ow=e=>{E.useEffect(()=>{e.clearReset()},[e])},Mw=({result:e,errorResetBoundary:a,throwOnError:i,query:l,suspense:s})=>e.isError&&!a.isReset()&&!e.isFetching&&l&&(s&&e.data===void 0||L0(i,[e.error,l])),kw=e=>{if(e.suspense){const i=s=>s==="static"?s:Math.max(s??1e3,1e3),l=e.staleTime;e.staleTime=typeof l=="function"?(...s)=>i(l(...s)):i(l),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Dw=(e,a)=>e.isLoading&&e.isFetching&&!a,Lw=(e,a)=>e?.suspense&&a.isPending,lv=(e,a,i)=>a.fetchOptimistic(e).catch(()=>{i.clearReset()});function Bw(e,a,i){const l=zw(),s=jw(),u=Gu(),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=u.getQueryCache().get(c.queryHash),m=e.subscribed!==!1;c._optimisticResults=l?"isRestoring":m?"optimistic":void 0,kw(c),Nw(c,s,d),Ow(s);const p=!u.getQueryCache().get(c.queryHash),[b]=E.useState(()=>new a(u,c)),g=b.getOptimisticResult(c),x=!l&&m;if(E.useSyncExternalStore(E.useCallback(_=>{const R=x?b.subscribe(Yt.batchCalls(_)):mn;return b.updateResult(),R},[b,x]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),E.useEffect(()=>{b.setOptions(c)},[c,b]),Lw(c,g))throw lv(c,b,s);if(Mw({result:g,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!Eo.isServer()&&Dw(g,l)&&(p?lv(c,b,s):d?.promise)?.catch(mn).finally(()=>{b.updateResult()}),c.notifyOnChangeProps?g:b.trackResult(g)}function Uw(e,a){return Bw(e,vw)}var ov;function re(e,a,i){function l(d,m){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:m,constr:c,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),a(d,m);const p=c.prototype,b=Object.keys(p);for(let g=0;gi?.Parent&&d instanceof i.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class rl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class P0 extends Error{constructor(a){super(`Encountered unidirectional transform during encode: ${a}`),this.name="ZodEncodeError"}}(ov=globalThis).__zod_globalConfig??(ov.__zod_globalConfig={});const xh=globalThis.__zod_globalConfig;function ri(e){return xh}function Q0(e){const a=Object.values(e).filter(l=>typeof l=="number");return Object.entries(e).filter(([l,s])=>a.indexOf(+l)===-1).map(([l,s])=>s)}function Wd(e,a){return typeof a=="bigint"?a.toString():a}function Sh(e){return{get value(){{const a=e();return Object.defineProperty(this,"value",{value:a}),a}}}}function wh(e){return e==null}function _h(e){const a=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(a,i)}function Hw(e,a){const i=e/a,l=Math.round(i),s=Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-l){};function Mu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Zw=Sh(()=>{if(xh.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function To(e){if(Mu(e)===!1)return!1;const a=e.constructor;if(a===void 0||typeof a!="function")return!0;const i=a.prototype;return!(Mu(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Y0(e){return To(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const qw=new Set(["string","number","symbol"]);function Ku(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Or(e,a,i){const l=new e._zod.constr(a??e._zod.def);return(!a||i?.parent)&&(l._zod.parent=e),l}function ze(e){const a=e;if(!a)return{};if(typeof a=="string")return{error:()=>a};if(a?.message!==void 0){if(a?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");a.error=a.message}return delete a.message,typeof a.error=="string"?{...a,error:()=>a.error}:a}function Pw(e){return Object.keys(e).filter(a=>e[a]._zod.optin==="optional"&&e[a]._zod.optout==="optional")}const Qw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Fw(e,a){const i=e._zod.def,l=i.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Nr(e._zod.def,{get shape(){const c={};for(const d in a){if(!(d in i.shape))throw new Error(`Unrecognized key: "${d}"`);a[d]&&(c[d]=i.shape[d])}return oi(this,"shape",c),c},checks:[]});return Or(e,u)}function Yw(e,a){const i=e._zod.def,l=i.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Nr(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const d in a){if(!(d in i.shape))throw new Error(`Unrecognized key: "${d}"`);a[d]&&delete c[d]}return oi(this,"shape",c),c},checks:[]});return Or(e,u)}function Gw(e,a){if(!To(a))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const u=e._zod.def.shape;for(const c in a)if(Object.getOwnPropertyDescriptor(u,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Nr(e._zod.def,{get shape(){const u={...e._zod.def.shape,...a};return oi(this,"shape",u),u}});return Or(e,s)}function Kw(e,a){if(!To(a))throw new Error("Invalid input to safeExtend: expected a plain object");const i=Nr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...a};return oi(this,"shape",l),l}});return Or(e,i)}function Vw(e,a){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const i=Nr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...a._zod.def.shape};return oi(this,"shape",l),l},get catchall(){return a._zod.def.catchall},checks:a._zod.def.checks??[]});return Or(e,i)}function Xw(e,a,i){const s=a._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=Nr(a._zod.def,{get shape(){const d=a._zod.def.shape,m={...d};if(i)for(const p in i){if(!(p in d))throw new Error(`Unrecognized key: "${p}"`);i[p]&&(m[p]=e?new e({type:"optional",innerType:d[p]}):d[p])}else for(const p in d)m[p]=e?new e({type:"optional",innerType:d[p]}):d[p];return oi(this,"shape",m),m},checks:[]});return Or(a,c)}function Iw(e,a,i){const l=Nr(a._zod.def,{get shape(){const s=a._zod.def.shape,u={...s};if(i)for(const c in i){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);i[c]&&(u[c]=new e({type:"nonoptional",innerType:s[c]}))}else for(const c in s)u[c]=new e({type:"nonoptional",innerType:s[c]});return oi(this,"shape",u),u}});return Or(a,l)}function nl(e,a=0){if(e.aborted===!0)return!0;for(let i=a;i{var l;return(l=i).path??(l.path=[]),i.path.unshift(e),i})}function su(e){return typeof e=="string"?e:e?.message}function ii(e,a,i){const l=e.message?e.message:su(e.inst?._zod.def?.error?.(e))??su(a?.error?.(e))??su(i.customError?.(e))??su(i.localeError?.(e))??"Invalid input",{inst:s,continue:u,input:c,...d}=e;re)DELIM" +R"DELIM(turn d.path??(d.path=[]),d.message=l,a?.reportInput&&(d.input=c),d}function Eh(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ro(...e){const[a,i,l]=e;return typeof a=="string"?{message:a,code:"custom",input:i,inst:l}:{...a}}const K0=(e,a)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:a,enumerable:!1}),e.message=JSON.stringify(a,Wd,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},V0=re("$ZodError",K0),X0=re("$ZodError",K0,{Parent:Error});function Ww(e,a=i=>i.message){const i={},l=[];for(const s of e.issues)s.path.length>0?(i[s.path[0]]=i[s.path[0]]||[],i[s.path[0]].push(a(s))):l.push(a(s));return{formErrors:l,fieldErrors:i}}function e2(e,a=i=>i.message){const i={_errors:[]},l=(s,u=[])=>{for(const c of s.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(d=>l({issues:d},[...u,...c.path]));else if(c.code==="invalid_key")l({issues:c.issues},[...u,...c.path]);else if(c.code==="invalid_element")l({issues:c.issues},[...u,...c.path]);else{const d=[...u,...c.path];if(d.length===0)i._errors.push(a(c));else{let m=i,p=0;for(;p(a,i,l,s)=>{const u=l?{...l,async:!1}:{async:!1},c=a._zod.run({value:i,issues:[]},u);if(c instanceof Promise)throw new rl;if(c.issues.length){const d=new(s?.Err??e)(c.issues.map(m=>ii(m,u,ri())));throw F0(d,s?.callee),d}return c.value},Rh=e=>async(a,i,l,s)=>{const u=l?{...l,async:!0}:{async:!0};let c=a._zod.run({value:i,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){const d=new(s?.Err??e)(c.issues.map(m=>ii(m,u,ri())));throw F0(d,s?.callee),d}return c.value},Vu=e=>(a,i,l)=>{const s=l?{...l,async:!1}:{async:!1},u=a._zod.run({value:i,issues:[]},s);if(u instanceof Promise)throw new rl;return u.issues.length?{success:!1,error:new(e??V0)(u.issues.map(c=>ii(c,s,ri())))}:{success:!0,data:u.value}},t2=Vu(X0),Xu=e=>async(a,i,l)=>{const s=l?{...l,async:!0}:{async:!0};let u=a._zod.run({value:i,issues:[]},s);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>ii(c,s,ri())))}:{success:!0,data:u.value}},n2=Xu(X0),a2=e=>(a,i,l)=>{const s=l?{...l,direction:"backward"}:{direction:"backward"};return Th(e)(a,i,s)},r2=e=>(a,i,l)=>Th(e)(a,i,l),i2=e=>async(a,i,l)=>{const s=l?{...l,direction:"backward"}:{direction:"backward"};return Rh(e)(a,i,s)},l2=e=>async(a,i,l)=>Rh(e)(a,i,l),o2=e=>(a,i,l)=>{const s=l?{...l,direction:"backward"}:{direction:"backward"};return Vu(e)(a,i,s)},s2=e=>(a,i,l)=>Vu(e)(a,i,l),u2=e=>async(a,i,l)=>{const s=l?{...l,direction:"backward"}:{direction:"backward"};return Xu(e)(a,i,s)},c2=e=>async(a,i,l)=>Xu(e)(a,i,l),f2=/^[cC][0-9a-z]{6,}$/,d2=/^[0-9a-z]+$/,h2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,m2=/^[0-9a-vA-V]{20}$/,p2=/^[A-Za-z0-9]{27}$/,y2=/^[a-zA-Z0-9_-]{21}$/,g2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,v2=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,cv=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,b2=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,x2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function S2(){return new RegExp(x2,"u")}const w2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,E2=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,T2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,R2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,I0=/^[A-Za-z0-9_-]*$/,z2=/^https?$/,A2=/^\+[1-9]\d{6,14}$/,J0="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",C2=new RegExp(`^${J0}$`);function W0(e){const a="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${a}`:e.precision===0?`${a}:[0-5]\\d`:`${a}:[0-5]\\d\\.\\d{${e)DELIM" +R"DELIM(.precision}}`:`${a}(?::[0-5]\\d(?:\\.\\d+)?)?`}function j2(e){return new RegExp(`^${W0(e)}$`)}function N2(e){const a=W0({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${a}(?:${i.join("|")})`;return new RegExp(`^${J0}T(?:${l})$`)}const O2=e=>{const a=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${a}$`)},M2=/^-?\d+$/,k2=/^-?\d+(?:\.\d+)?$/,D2=/^(?:true|false)$/i,L2=/^[^A-Z]*$/,B2=/^[^a-z]*$/,pn=re("$ZodCheck",(e,a)=>{var i;e._zod??(e._zod={}),e._zod.def=a,(i=e._zod).onattach??(i.onattach=[])}),eb={number:"number",bigint:"bigint",object:"date"},tb=re("$ZodCheckLessThan",(e,a)=>{pn.init(e,a);const i=eb[typeof a.value];e._zod.onattach.push(l=>{const s=l._zod.bag,u=(a.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;a.value{(a.inclusive?l.value<=a.value:l.value{pn.init(e,a);const i=eb[typeof a.value];e._zod.onattach.push(l=>{const s=l._zod.bag,u=(a.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;a.value>u&&(a.inclusive?s.minimum=a.value:s.exclusiveMinimum=a.value)}),e._zod.check=l=>{(a.inclusive?l.value>=a.value:l.value>a.value)||l.issues.push({origin:i,code:"too_small",minimum:typeof a.value=="object"?a.value.getTime():a.value,input:l.value,inclusive:a.inclusive,inst:e,continue:!a.abort})}}),U2=re("$ZodCheckMultipleOf",(e,a)=>{pn.init(e,a),e._zod.onattach.push(i=>{var l;(l=i._zod.bag).multipleOf??(l.multipleOf=a.value)}),e._zod.check=i=>{if(typeof i.value!=typeof a.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%a.value===BigInt(0):Hw(i.value,a.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:a.value,input:i.value,inst:e,continue:!a.abort})}}),H2=re("$ZodCheckNumberFormat",(e,a)=>{pn.init(e,a),a.format=a.format||"float64";const i=a.format?.includes("int"),l=i?"int":"number",[s,u]=Qw[a.format];e._zod.onattach.push(c=>{const d=c._zod.bag;d.format=a.format,d.minimum=s,d.maximum=u,i&&(d.pattern=M2)}),e._zod.check=c=>{const d=c.value;if(i){if(!Number.isInteger(d)){c.issues.push({expected:l,format:a.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?c.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!a.abort}):c.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!a.abort});return}}du&&c.issues.push({origin:"number",input:d,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!a.abort})}}),$2=re("$ZodCheckMaxLength",(e,a)=>{var i;pn.init(e,a),(i=e._zod.def).when??(i.when=l=>{const s=l.value;return!wh(s)&&s.length!==void 0}),e._zod.onattach.push(l=>{const s=l._zod.bag.maximum??Number.POSITIVE_INFINITY;a.maximum{const s=l.value;if(s.length<=a.maximum)return;const c=Eh(s);l.issues.push({origin:c,code:"too_big",maximum:a.maximum,inclusive:!0,input:s,inst:e,continue:!a.abort})}}),Z2=re("$ZodCheckMinLength",(e,a)=>{var i;pn.init(e,a),(i=e._zod.def).when??(i.when=l=>{const s=l.value;return!wh(s)&&s.length!==void 0}),e._zod.onattach.push(l=>{const s=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;a.minimum>s&&(l._zod.bag.minimum=a.minimum)}),e._zod.check=l=>{const s=l.value;if(s.length>=a.minimum)return;const c=Eh(s);l.issues.push({origin:c,code:"too_small",minimum:a.minimum,inclusive:!0,input:s,inst:e,continue:!a.abort})}}),q2=re("$ZodCheckLengthEquals",(e,a)=>{var i;pn.init(e,a),(i=e._zod.def).when??(i.when=l=>{const s=l.value;return!wh(s)&&s.length!==void 0}),e._zod.onattach.push(l=>{const s=l._zod.bag;s.minimum=a.length,s.maximum=a.length,s.length=a.length}),e._zod.check=l=>{const s=l.value,u=s.length;if(u===a.length)return;const c=Eh(s),d=u>a.length;l.issues.push({origin:c,...d?{code:"too_big",maximum:a.length}:{code:"too_small",minimum:a.length},inclusive:!0,exact:!0,input:l.value,inst:e,continue:!a.abort})}}),Iu=re("$ZodCheckStringFormat",(e,a)=>{var i,l;pn.init(e,a),e._zod.onattach.push(s=>{const u=s._zod.bag;u.format=a.format,a.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(a.pattern))}),a.pattern?(i=e._zod).check??(i.check=s=>{a.pattern.lastIndex=0,!a.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:a.format,input:s.value,...a.pattern?{pattern:a.pattern.toString()}:{},inst:e,continue:!a.abort})}):(l=e._zod).check??(l.check=()=>{})}),)DELIM" +R"DELIM(P2=re("$ZodCheckRegex",(e,a)=>{Iu.init(e,a),e._zod.check=i=>{a.pattern.lastIndex=0,!a.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:a.pattern.toString(),inst:e,continue:!a.abort})}}),Q2=re("$ZodCheckLowerCase",(e,a)=>{a.pattern??(a.pattern=L2),Iu.init(e,a)}),F2=re("$ZodCheckUpperCase",(e,a)=>{a.pattern??(a.pattern=B2),Iu.init(e,a)}),Y2=re("$ZodCheckIncludes",(e,a)=>{pn.init(e,a);const i=Ku(a.includes),l=new RegExp(typeof a.position=="number"?`^.{${a.position}}${i}`:i);a.pattern=l,e._zod.onattach.push(s=>{const u=s._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(l)}),e._zod.check=s=>{s.value.includes(a.includes,a.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:a.includes,input:s.value,inst:e,continue:!a.abort})}}),G2=re("$ZodCheckStartsWith",(e,a)=>{pn.init(e,a);const i=new RegExp(`^${Ku(a.prefix)}.*`);a.pattern??(a.pattern=i),e._zod.onattach.push(l=>{const s=l._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=l=>{l.value.startsWith(a.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:a.prefix,input:l.value,inst:e,continue:!a.abort})}}),K2=re("$ZodCheckEndsWith",(e,a)=>{pn.init(e,a);const i=new RegExp(`.*${Ku(a.suffix)}$`);a.pattern??(a.pattern=i),e._zod.onattach.push(l=>{const s=l._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=l=>{l.value.endsWith(a.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:a.suffix,input:l.value,inst:e,continue:!a.abort})}}),V2=re("$ZodCheckOverwrite",(e,a)=>{pn.init(e,a),e._zod.check=i=>{i.value=a.tx(i.value)}});class X2{constructor(a=[]){this.content=[],this.indent=0,this&&(this.args=a)}indented(a){this.indent+=1,a(this),this.indent-=1}write(a){if(typeof a=="function"){a(this,{execution:"sync"}),a(this,{execution:"async"});return}const l=a.split(` +`).filter(c=>c),s=Math.min(...l.map(c=>c.length-c.trimStart().length)),u=l.map(c=>c.slice(s)).map(c=>" ".repeat(this.indent*2)+c);for(const c of u)this.content.push(c)}compile(){const a=Function,i=this?.args,s=[...(this?.content??[""]).map(u=>` ${u}`)];return new a(...i,s.join(` +`))}}const I2={major:4,minor:4,patch:3},Ct=re("$ZodType",(e,a)=>{var i;e??(e={}),e._zod.def=a,e._zod.bag=e._zod.bag||{},e._zod.version=I2;const l=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&l.unshift(e);for(const s of l)for(const u of s._zod.onattach)u(e);if(l.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(c,d,m)=>{let p=nl(c),b;for(const g of d){if(g._zod.def.when){if(Jw(c)||!g._zod.def.when(c))continue}else if(p)continue;const x=c.issues.length,_=g._zod.check(c);if(_ instanceof Promise&&m?.async===!1)throw new rl;if(b||_ instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await _,c.issues.length!==x&&(p||(p=nl(c,x)))});else{if(c.issues.length===x)continue;p||(p=nl(c,x))}}return b?b.then(()=>c):c},u=(c,d,m)=>{if(nl(c))return c.aborted=!0,c;const p=s(d,l,m);if(p instanceof Promise){if(m.async===!1)throw new rl;return p.then(b=>e._zod.parse(b,m))}return e._zod.parse(p,m)};e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){const p=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return p instanceof Promise?p.then(b=>u(b,c,d)):u(p,c,d)}const m=e._zod.parse(c,d);if(m instanceof Promise){if(d.async===!1)throw new rl;return m.then(p=>s(p,l,d))}return s(m,l,d)}}st(e,"~standard",()=>({validate:s=>{try{const u=t2(e,s);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return n2(e,s).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),zh=re("$ZodString",(e,a)=>{Ct.init(e,a),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??O2(e._zod.bag),e._zod.parse=(i,l)=>{if(a.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),gt=re("$ZodStringFormat",(e,a)=>{Iu.init(e,a),zh.init(e,a)}),J2=re("$ZodGUID",(e,a)=>{a.pattern??(a.pattern=v2),gt.init(e,a)}),W2=re("$ZodUUID",(e,a)=>{if(a.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[a.version];if(l===void 0)throw new Error(`Invalid UUID version: "${a.version}"`);a.pattern??(a.pattern=cv(l))}else a.pattern??(a.pattern=cv());gt.init(e,a)}),e_=re("$ZodEmail",(e,a)=>{a.pattern??(a.pattern=b2),gt.init(e,a)}),t_=re("$ZodURL",(e,a)=>{gt.init(e,a),e._zod.check=i=>{try{const l=i.value.trim();if(!a.normalize&&a.protocol?.source===z2.source&&!/^https?:\/\//i.test(l)){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!a.abort});return}const s=new URL(l);a.hostname&&(a.hostname.lastIndex=0,a.hostname.test(s.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:a.hostname.source,input:i.value,inst:e,continue:!a.ab)DELIM" +R"DELIM(ort})),a.protocol&&(a.protocol.lastIndex=0,a.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:a.protocol.source,input:i.value,inst:e,continue:!a.abort})),a.normalize?i.value=s.href:i.value=l;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!a.abort})}}}),n_=re("$ZodEmoji",(e,a)=>{a.pattern??(a.pattern=S2()),gt.init(e,a)}),a_=re("$ZodNanoID",(e,a)=>{a.pattern??(a.pattern=y2),gt.init(e,a)}),r_=re("$ZodCUID",(e,a)=>{a.pattern??(a.pattern=f2),gt.init(e,a)}),i_=re("$ZodCUID2",(e,a)=>{a.pattern??(a.pattern=d2),gt.init(e,a)}),l_=re("$ZodULID",(e,a)=>{a.pattern??(a.pattern=h2),gt.init(e,a)}),o_=re("$ZodXID",(e,a)=>{a.pattern??(a.pattern=m2),gt.init(e,a)}),s_=re("$ZodKSUID",(e,a)=>{a.pattern??(a.pattern=p2),gt.init(e,a)}),u_=re("$ZodISODateTime",(e,a)=>{a.pattern??(a.pattern=N2(a)),gt.init(e,a)}),c_=re("$ZodISODate",(e,a)=>{a.pattern??(a.pattern=C2),gt.init(e,a)}),f_=re("$ZodISOTime",(e,a)=>{a.pattern??(a.pattern=j2(a)),gt.init(e,a)}),d_=re("$ZodISODuration",(e,a)=>{a.pattern??(a.pattern=g2),gt.init(e,a)}),h_=re("$ZodIPv4",(e,a)=>{a.pattern??(a.pattern=w2),gt.init(e,a),e._zod.bag.format="ipv4"}),m_=re("$ZodIPv6",(e,a)=>{a.pattern??(a.pattern=_2),gt.init(e,a),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!a.abort})}}}),p_=re("$ZodCIDRv4",(e,a)=>{a.pattern??(a.pattern=E2),gt.init(e,a)}),y_=re("$ZodCIDRv6",(e,a)=>{a.pattern??(a.pattern=T2),gt.init(e,a),e._zod.check=i=>{const l=i.value.split("/");try{if(l.length!==2)throw new Error;const[s,u]=l;if(!u)throw new Error;const c=Number(u);if(`${c}`!==u)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${s}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!a.abort})}}});function ab(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const g_=re("$ZodBase64",(e,a)=>{a.pattern??(a.pattern=R2),gt.init(e,a),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{ab(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!a.abort})}});function v_(e){if(!I0.test(e))return!1;const a=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),i=a.padEnd(Math.ceil(a.length/4)*4,"=");return ab(i)}const b_=re("$ZodBase64URL",(e,a)=>{a.pattern??(a.pattern=I0),gt.init(e,a),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{v_(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!a.abort})}}),x_=re("$ZodE164",(e,a)=>{a.pattern??(a.pattern=A2),gt.init(e,a)});function S_(e,a=null){try{const i=e.split(".");if(i.length!==3)return!1;const[l]=i;if(!l)return!1;const s=JSON.parse(atob(l));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||a&&(!("alg"in s)||s.alg!==a))}catch{return!1}}const w_=re("$ZodJWT",(e,a)=>{gt.init(e,a),e._zod.check=i=>{S_(i.value,a.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!a.abort})}}),rb=re("$ZodNumber",(e,a)=>{Ct.init(e,a),e._zod.pattern=e._zod.bag.pattern??k2,e._zod.parse=(i,l)=>{if(a.coerce)try{i.value=Number(i.value)}catch{}const s=i.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return i;const u=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...u?{received:u}:{}}),i}}),__=re("$ZodNumberFormat",(e,a)=>{H2.init(e,a),rb.init(e,a)}),E_=re("$ZodBoolean",(e,a)=>{Ct.init(e,a),e._zod.pattern=D2,e._zod.parse=(i,l)=>{if(a.coerce)try{i.value=!!i.value}catch{}const s=i.value;return typeof s=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),i}}),T_=re("$ZodUnknown",(e,a)=>{Ct.init(e,a),e._zod.parse=i=>i}),R_=re("$ZodNever",(e,a)=>{Ct.init(e,a),e._zod.parse=(i,l)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function fv(e,a,i){e.issues.length&&a.issues.push(...G0(i,e.issues)),a.value[i]=e.value}const z_=re("$ZodArray",(e,a)=>{Ct.init(e,a),e._zod.parse=(i,l)=>{const s=i.value;if(!Array.isArray(s))return i.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),i;i.value=Array(s.length);const u=[];for(let c=0;cfv(p,i,c))):fv(m,i,c)}return u.length?Promise.all(u).then(()=>i):i}});function ku(e,a,i,l,s,u){const c=i in l;if(e.issues.length){if(s&&u&&!c)return;a.issues.push(...G0(i,e.issues))}if(!c&&!s){e.issues.length||a.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}e.value===void 0?c&&(a.value[i]=void 0):a.value[i]=e.value}function ib(e){const a=Object.keys(e.shape);for(const l of a)if(!e.shape?.[l]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at k)DELIM" +R"DELIM(ey "${l}": expected a Zod schema`);const i=Pw(e.shape);return{...e,keys:a,keySet:new Set(a),numKeys:a.length,optionalKeys:new Set(i)}}function lb(e,a,i,l,s,u){const c=[],d=s.keySet,m=s.catchall._zod,p=m.def.type,b=m.optin==="optional",g=m.optout==="optional";for(const x in a){if(x==="__proto__"||d.has(x))continue;if(p==="never"){c.push(x);continue}const _=m.run({value:a[x],issues:[]},l);_ instanceof Promise?e.push(_.then(R=>ku(R,i,x,a,b,g))):ku(_,i,x,a,b,g)}return c.length&&i.issues.push({code:"unrecognized_keys",keys:c,input:a,inst:u}),e.length?Promise.all(e).then(()=>i):i}const A_=re("$ZodObject",(e,a)=>{if(Ct.init(e,a),!Object.getOwnPropertyDescriptor(a,"shape")?.get){const d=a.shape;Object.defineProperty(a,"shape",{get:()=>{const m={...d};return Object.defineProperty(a,"shape",{value:m}),m}})}const l=Sh(()=>ib(a));st(e._zod,"propValues",()=>{const d=a.shape,m={};for(const p in d){const b=d[p]._zod;if(b.values){m[p]??(m[p]=new Set);for(const g of b.values)m[p].add(g)}}return m});const s=Mu,u=a.catchall;let c;e._zod.parse=(d,m)=>{c??(c=l.value);const p=d.value;if(!s(p))return d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d;d.value={};const b=[],g=c.shape;for(const x of c.keys){const _=g[x],R=_._zod.optin==="optional",T=_._zod.optout==="optional",k=_._zod.run({value:p[x],issues:[]},m);k instanceof Promise?b.push(k.then(Y=>ku(Y,d,x,p,R,T))):ku(k,d,x,p,R,T)}return u?lb(b,p,d,m,l.value,e):b.length?Promise.all(b).then(()=>d):d}}),C_=re("$ZodObjectJIT",(e,a)=>{A_.init(e,a);const i=e._zod.parse,l=Sh(()=>ib(a)),s=x=>{const _=new X2(["shape","payload","ctx"]),R=l.value,T=ne=>{const se=uv(ne);return`shape[${se}]._zod.run({ value: input[${se}], issues: [] }, ctx)`};_.write("const input = payload.value;");const k=Object.create(null);let Y=0;for(const ne of R.keys)k[ne]=`key_${Y++}`;_.write("const newResult = {};");for(const ne of R.keys){const se=k[ne],te=uv(ne),xe=x[ne],O=xe?._zod?.optin==="optional",w=xe?._zod?.optout==="optional";_.write(`const ${se} = ${T(ne)};`),O&&w?_.write(` + if (${se}.issues.length) { + if (${te} in input) { + payload.issues = payload.issues.concat(${se}.issues.map(iss => ({ ...iss, - path: iss.path ? [${ee}, ...iss.path] : [${ee}] + path: iss.path ? [${te}, ...iss.path] : [${te}] }))); } } - if (${ae}.value === undefined) { - if (${ee} in input) { - newResult[${ee}] = undefined; + if (${se}.value === undefined) { + if (${te} in input) { + newResult[${te}] = undefined; } } else { - newResult[${ee}] = ${ae}.value; + newResult[${te}] = ${se}.value; } - `):w.write(` - if (${ae}.issues.length) { - payload.issues = payload.issues.concat(${ae}.issues.map(iss => ({ + `):O?_.write(` + if (${se}.issues.length) { + payload.issues = payload.issues.concat(${se}.issues.map(iss => ({ ...iss, - path: iss.path ? [${ee}, ...iss.path] : [${ee}] + path: iss.path ? [${te}, ...iss.path] : [${te}] }))); } - if (${ae}.value === undefined) { - if (${ee} in input) { - newResult[${ee}] = undefined; + if (${se}.value === undefined) { + if (${te} in input) { + newResult[${te}] = undefined; } } else { - newResult[${ee}] = ${ae}.value; + newResult[${te}] = ${se}.value; } - `)}w.write("payload.value = newResult;"),w.write("return payload;");const Q=w.compile();return(G,ae)=>Q(x,G,ae)};let u;const f=gu,h=!$0.jitless,p=h&&Hw.value,b=a.catchall;let v;e._zod.parse=(x,w)=>{v??(v=l.value);const T=x.value;return f(T)?h&&p&&w?.async===!1&&w.jitless!==!0?(u||(u=s(a.shape)),x=u(x,w),b?ab([],T,x,w,v,e):x):i(x,w):(x.issues.push({expected:"object",code:"invalid_type",input:T,inst:e}),x)}});function Iv(e,a,i,l){for(const u of e)if(u.issues.length===0)return a.value=u.value,a;const s=e.filter(u=>!Zi(u));return s.length===1?(a.value=s[0].value,s[0]):(a.issues.push({code:"invalid_union",input:a.value,inst:i,errors:e.map(u=>u.issues.map(f=>Fr(f,l,Yr())))}),a)}const R_=I("$ZodUnion",(e,a)=>{zt.init(e,a),tt(e._zod,"optin",()=>a.options.some(s=>s._zod.optin==="optional")?"optional":void 0),tt(e._zod,"optout",()=>a.options.some(s=>s._zod.optout==="optional")?"optional":void 0),tt(e._zod,"values",()=>{if(a.options.every(s=>s._zod.values))return new Set(a.options.flatMap(s=>Array.from(s._zod.values)))}),tt(e._zod,"pattern",()=>{if(a.options.every(s=>s._zod.pattern)){const s=a.options.map(u=>u._zod.pattern);return new RegExp(`^(${s.map(u=>dh(u.source)).join("|")})$`)}});const i=a.options.length===1,l=a.options[0]._zod.run;e._zod.parse=(s,u)=>{if(i)return l(s,u);let f=!1;const h=[];for(const m of a.options){const p=m._zod.run({value:s.value,issues:[]},u);if(p instanceof Promise)h.push(p),f=!0;else{if(p.issues.length===0)return p;h.push(p)}}return f?Promise.all(h).then(m=>Iv(m,s,e,u)):Iv(h,s,e,u)}}),z_=I("$ZodIntersection",(e,a)=>{zt.init(e,a),e._zod.parse=(i,l)=>{const s=i.value,u=a.left._zod.run({value:s,issues:[]},l),f=a.right._zod.run({value:s,issues:[]},l);return u instanceof Promise||f instanceof Promise?Promise.all([u,f]).then(([m,p])=>Wv(i,m,p)):Wv(i,u,f)}});function Yd(e,a){if(e===a)return{valid:!0,data:e};if(e instanceof Date&&a instanceof Date&&+e==+a)return{valid:!0,data:e};if(oo(e)&&oo(a)){const i=Object.keys(a),l=Object.keys(e).filter(u=>i.indexOf(u)!==-1),s={...e,...a};for(const u of l){const f=Yd(e[u],a[u]);if(!f.valid)return{valid:!1,mergeErrorPath:[u,...f.mergeErrorPath]};s[u]=f.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(a)){if(e.length!==a.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let l=0;lh.l&&h.r).map(([h])=>h);if(u.length&&s&&e.issues.push({...s,keys:u}),Zi(e))return e;const f=Yd(a.value,i.value);if(!f.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`);return e.value=f.data,e}const A_=I("$ZodEnum",(e)DELIM" - R"DELIM(,a)=>{zt.init(e,a);const i=Z0(a.entries),l=new Set(i);e._zod.values=l,e._zod.pattern=new RegExp(`^(${i.filter(s=>$w.has(typeof s)).map(s=>typeof s=="string"?ju(s):s.toString()).join("|")})$`),e._zod.parse=(s,u)=>{const f=s.value;return l.has(f)||s.issues.push({code:"invalid_value",values:i,input:f,inst:e}),s}}),C_=I("$ZodTransform",(e,a)=>{zt.init(e,a),e._zod.parse=(i,l)=>{if(l.direction==="backward")throw new H0(e.constructor.name);const s=a.transform(i.value,i);if(l.async)return(s instanceof Promise?s:Promise.resolve(s)).then(f=>(i.value=f,i));if(s instanceof Promise)throw new Pi;return i.value=s,i}});function eg(e,a){return e.issues.length&&a===void 0?{issues:[],value:void 0}:e}const rb=I("$ZodOptional",(e,a)=>{zt.init(e,a),e._zod.optin="optional",e._zod.optout="optional",tt(e._zod,"values",()=>a.innerType._zod.values?new Set([...a.innerType._zod.values,void 0]):void 0),tt(e._zod,"pattern",()=>{const i=a.innerType._zod.pattern;return i?new RegExp(`^(${dh(i.source)})?$`):void 0}),e._zod.parse=(i,l)=>{if(a.innerType._zod.optin==="optional"){const s=a.innerType._zod.run(i,l);return s instanceof Promise?s.then(u=>eg(u,i.value)):eg(s,i.value)}return i.value===void 0?i:a.innerType._zod.run(i,l)}}),N_=I("$ZodExactOptional",(e,a)=>{rb.init(e,a),tt(e._zod,"values",()=>a.innerType._zod.values),tt(e._zod,"pattern",()=>a.innerType._zod.pattern),e._zod.parse=(i,l)=>a.innerType._zod.run(i,l)}),O_=I("$ZodNullable",(e,a)=>{zt.init(e,a),tt(e._zod,"optin",()=>a.innerType._zod.optin),tt(e._zod,"optout",()=>a.innerType._zod.optout),tt(e._zod,"pattern",()=>{const i=a.innerType._zod.pattern;return i?new RegExp(`^(${dh(i.source)}|null)$`):void 0}),tt(e._zod,"values",()=>a.innerType._zod.values?new Set([...a.innerType._zod.values,null]):void 0),e._zod.parse=(i,l)=>i.value===null?i:a.innerType._zod.run(i,l)}),j_=I("$ZodDefault",(e,a)=>{zt.init(e,a),e._zod.optin="optional",tt(e._zod,"values",()=>a.innerType._zod.values),e._zod.parse=(i,l)=>{if(l.direction==="backward")return a.innerType._zod.run(i,l);if(i.value===void 0)return i.value=a.defaultValue,i;const s=a.innerType._zod.run(i,l);return s instanceof Promise?s.then(u=>tg(u,a)):tg(s,a)}});function tg(e,a){return e.value===void 0&&(e.value=a.defaultValue),e}const M_=I("$ZodPrefault",(e,a)=>{zt.init(e,a),e._zod.optin="optional",tt(e._zod,"values",()=>a.innerType._zod.values),e._zod.parse=(i,l)=>(l.direction==="backward"||i.value===void 0&&(i.value=a.defaultValue),a.innerType._zod.run(i,l))}),k_=I("$ZodNonOptional",(e,a)=>{zt.init(e,a),tt(e._zod,"values",()=>{const i=a.innerType._zod.values;return i?new Set([...i].filter(l=>l!==void 0)):void 0}),e._zod.parse=(i,l)=>{const s=a.innerType._zod.run(i,l);return s instanceof Promise?s.then(u=>ng(u,e)):ng(s,e)}});function ng(e,a){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:a}),e}const D_=I("$ZodCatch",(e,a)=>{zt.init(e,a),tt(e._zod,"optin",()=>a.innerType._zod.optin),tt(e._zod,"optout",()=>a.innerType._zod.optout),tt(e._zod,"values",()=>a.innerType._zod.values),e._zod.parse=(i,l)=>{if(l.direction==="backward")return a.innerType._zod.run(i,l);const s=a.innerType._zod.run(i,l);return s instanceof Promise?s.then(u=>(i.value=u.value,u.issues.length&&(i.value=a.catchValue({...i,error:{issues:u.issues.map(f=>Fr(f,l,Yr()))},input:i.value}),i.issues=[]),i)):(i.value=s.value,s.issues.length&&(i.value=a.catchValue({...i,error:{issues:s.issues.map(u=>Fr(u,l,Yr()))},input:i.value}),i.issues=[]),i)}}),L_=I("$ZodPipe",(e,a)=>{zt.init(e,a),tt(e._zod,"values",()=>a.in._zod.values),tt(e._zod,"optin",()=>a.in._zod.optin),tt(e._zod,"optout",()=>a.out._zod.optout),tt(e._zod,"propValues",()=>a.in._zod.propValues),e._zod.parse=(i,l)=>{if(l.direction==="backward"){const u=a.out._zod.run(i,l);return u instanceof Promise?u.then(f=>Ks(f,a.in,l)):Ks(u,a.in,l)}const s=a.in._zod.run(i,l);return s instanceof Promise?s.then(u=>Ks(u,a.out,l)):Ks(s,a.out,l)}});function Ks(e,a,i){return e.issues.length?(e.aborted=!0,e):a._zod.run({value:e.value,issues:e.issues},i)}const B_=I("$ZodReadonly",(e,a)=>{zt.init(e,a),tt(e._zod,"propValues",()=>a.innerType._zod.propValues),tt(e._zod,"values",()=>a.innerType._zod.values),tt(e._zod,"optin",()=>a.innerType?._zod?.optin),tt(e._zod,"optout",()=>a.innerType?._zod?.optout),e._zod.parse=(i,l)=>{if(l.direction==="backward")return a.innerType._zod.run(i,l);const s=a.innerType._zod.run(i,l);return s instanceof Promise?s.then(ag):ag(s)}});function ag(e){return e.value=Object.freeze(e.value),e}const U_=I("$ZodCustom",(e,a)=>{hn.init(e,a),zt.init(e,a),e._zod.parse=(i,l)=>i,e._zod.check=i=>{const l=i.value,s=a.fn(l);if(s instanceof Promise)return s.then(u=>rg(u,i,l,e));rg(s,i,l,e)}});function rg(e,a,i,l){if(!e){const s={code:"custom",input:i,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(s.params=l._zod.def.params),a.issues.push(so(s))}}var ig;class H_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(a,...i){const l=i[0])DELIM" - R"DELIM(;return this._map.set(a,l),l&&typeof l=="object"&&"id"in l&&this._idmap.set(l.id,a),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(a){const i=this._map.get(a);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(a),this}get(a){const i=a._zod.parent;if(i){const l={...this.get(i)??{}};delete l.id;const s={...l,...this._map.get(a)};return Object.keys(s).length?s:void 0}return this._map.get(a)}has(a){return this._map.has(a)}}function $_(){return new H_}(ig=globalThis).__zod_globalRegistry??(ig.__zod_globalRegistry=$_());const Il=globalThis.__zod_globalRegistry;function Z_(e,a){return new e({type:"string",...ze(a)})}function q_(e,a){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ze(a)})}function lg(e,a){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ze(a)})}function P_(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ze(a)})}function Q_(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ze(a)})}function G_(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ze(a)})}function Y_(e,a){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ze(a)})}function F_(e,a){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ze(a)})}function K_(e,a){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ze(a)})}function V_(e,a){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ze(a)})}function X_(e,a){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ze(a)})}function J_(e,a){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ze(a)})}function I_(e,a){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ze(a)})}function W_(e,a){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ze(a)})}function e2(e,a){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ze(a)})}function t2(e,a){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ze(a)})}function n2(e,a){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ze(a)})}function a2(e,a){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ze(a)})}function r2(e,a){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ze(a)})}function i2(e,a){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ze(a)})}function l2(e,a){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ze(a)})}function o2(e,a){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ze(a)})}function s2(e,a){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ze(a)})}function u2(e,a){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ze(a)})}function c2(e,a){return new e({type:"string",format:"date",check:"string_format",...ze(a)})}function f2(e,a){return new e({type:"string",format:"time",check:"string_format",precision:null,...ze(a)})}function d2(e,a){return new e({type:"string",format:"duration",check:"string_format",...ze(a)})}function h2(e,a){return new e({type:"number",checks:[],...ze(a)})}function m2(e,a){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ze(a)})}function p2(e,a){return new e({type:"boolean",...ze(a)})}function y2(e){return new e({type:"unknown"})}function v2(e,a){return new e({type:"never",...ze(a)})}function og(e,a){return new I0({check:"less_than",...ze(a),value:e,inclusive:!1})}function ad(e,a){return new I0({check:"less_than",...ze(a),value:e,inclusive:!0})}function sg(e,a){return new W0({check:"greater_than",...ze(a),value:e,inclusive:!1})}function rd(e,a){return new W0({check:"greater_than",...ze(a),value:e,inclusive:!0})}function ug(e,a){return new kE({check:"multiple_of",...ze(a),value:e})}function ib(e,a){return new LE({check:"max_length",...ze(a),maximum:e})}function xu(e,a){return new BE({check:"min_length",...ze(a),minimum:e})}function lb(e,a){return new UE({check:"length_equals",...ze(a),length:e})}function g2(e,a){return new HE({check:"string_format",format:"regex",...ze(a),pattern:e})}function b2(e){return new $E({check:"string_format",format:"lowercase",...ze(e)})}function x2(e){return new ZE({check:"string_format",format:"uppercase",...ze(e)})}function S2(e,a){return new qE({check:"string_format",format:"includes",...ze(a),includes:e})}function w2(e,a){return new PE({check:"string_format",format:"starts_with",...ze(a),prefix:e})}function E2(e,a){return new QE({check:"string_format",format:"ends_with",...ze(a),suffix:e})}function Vi(e){return new GE({check:"overwrite",tx:e})}function _2(e){return Vi(a=>a.normalize(e))}function T2(){return Vi(e=>e.trim())}fu)DELIM" - R"DELIM(nction R2(){return Vi(e=>e.toLowerCase())}function z2(){return Vi(e=>e.toUpperCase())}function A2(){return Vi(e=>Uw(e))}function C2(e,a,i){return new e({type:"array",element:a,...ze(i)})}function N2(e,a,i){return new e({type:"custom",check:"custom",fn:a,...ze(i)})}function O2(e){const a=j2(i=>(i.addIssue=l=>{if(typeof l=="string")i.issues.push(so(l,i.value,a._zod.def));else{const s=l;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=i.value),s.inst??(s.inst=a),s.continue??(s.continue=!a._zod.def.abort),i.issues.push(so(s))}},e(i.value,i)));return a}function j2(e,a){const i=new hn({check:"custom",...ze(a)});return i._zod.check=e,i}function ob(e){let a=e?.target??"draft-2020-12";return a==="draft-4"&&(a="draft-04"),a==="draft-7"&&(a="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Il,target:a,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Kt(e,a,i={path:[],schemaPath:[]}){var l;const s=e._zod.def,u=a.seen.get(e);if(u)return u.count++,i.schemaPath.includes(e)&&(u.cycle=i.path),u.schema;const f={schema:{},count:1,cycle:void 0,path:i.path};a.seen.set(e,f);const h=e._zod.toJSONSchema?.();if(h)f.schema=h;else{const b={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(a,f.schema,b);else{const x=f.schema,w=a.processors[s.type];if(!w)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);w(e,a,x,b)}const v=e._zod.parent;v&&(f.ref||(f.ref=v),Kt(v,a,b),a.seen.get(v).isParent=!0)}const m=a.metadataRegistry.get(e);return m&&Object.assign(f.schema,m),a.io==="input"&&nn(e)&&(delete f.schema.examples,delete f.schema.default),a.io==="input"&&f.schema._prefault&&((l=f.schema).default??(l.default=f.schema._prefault)),delete f.schema._prefault,a.seen.get(e).schema}function sb(e,a){const i=e.seen.get(a);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=new Map;for(const f of e.seen.entries()){const h=e.metadataRegistry.get(f[0])?.id;if(h){const m=l.get(h);if(m&&m!==f[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(h,f[0])}}const s=f=>{const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=e.external.registry.get(f[0])?.id,x=e.external.uri??(T=>T);if(v)return{ref:x(v)};const w=f[1].defId??f[1].schema.id??`schema${e.counter++}`;return f[1].defId=w,{defId:w,ref:`${x("__shared")}#/${h}/${w}`}}if(f[1]===i)return{ref:"#"};const p=`#/${h}/`,b=f[1].schema.id??`__schema${e.counter++}`;return{defId:b,ref:p+b}},u=f=>{if(f[1].schema.$ref)return;const h=f[1],{ref:m,defId:p}=s(f);h.def={...h.schema},p&&(h.defId=p);const b=h.schema;for(const v in b)delete b[v];b.$ref=m};if(e.cycles==="throw")for(const f of e.seen.entries()){const h=f[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/ + `):_.write(` + const ${se}_present = ${te} in input; + if (${se}.issues.length) { + payload.issues = payload.issues.concat(${se}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${te}, ...iss.path] : [${te}] + }))); + } + if (!${se}_present && !${se}.issues.length) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: undefined, + path: [${te}] + }); + } -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of e.seen.entries()){const h=f[1];if(a===f[0]){u(f);continue}if(e.external){const p=e.external.registry.get(f[0])?.id;if(a!==f[0]&&p){u(f);continue}}if(e.metadataRegistry.get(f[0])?.id){u(f);continue}if(h.cycle){u(f);continue}if(h.count>1&&e.reused==="ref"){u(f);continue}}}function ub(e,a){const i=e.seen.get(a);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=f=>{const h=e.seen.get(f);if(h.ref===null)return;const m=h.def??h.schema,p={...m},b=h.ref;if(h.ref=null,b){l(b);const x=e.seen.get(b),w=x.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(w)):Object.assign(m,w),Object.assign(m,p),f._zod.parent===b)for(const E in m)E==="$ref"||E==="allOf"||E in p||delete m[E];if(w.$ref&&x.def)for(const E in m)E==="$ref"||E==="allOf"||E in x.def&&JSON.stringify(m[E])===JSON.stringify(x.def[E])&&delete m[E]}const v=f._zod.parent;if(v&&v!==b){l(v);const x=e.seen.get(v);if(x?.schema.$ref&&(m.$ref=x.schema.$ref,x.def))for(const w in m)w==="$ref"||w==="allOf"||w in x.def&&JSON.stringify(m[w])===JSON.stringify(x.def[w])&&delete m[w]}e.override({zodSchema:f,jsonSchema:m,path:h.path??[]})};for(const f of[...e.seen.entries()].reverse())l(f[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const f=e.external.registry.get(a)?.id;if(!f)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(f)}Object.assign(s,i.def??i.schema);const u=e.external?.defs??{};for(const f of e.seen.entries()){const h=f[1];h.def&&h.defId&&(u[h.defId]=h.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2)DELIM" -R"DELIM(020-12"?s.$defs=u:s.definitions=u);try{const f=JSON.parse(JSON.stringify(s));return Object.defineProperty(f,"~standard",{value:{...a["~standard"],jsonSchema:{input:Su(a,"input",e.processors),output:Su(a,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function nn(e,a){const i=a??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const l=e._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return nn(l.element,i);if(l.type==="set")return nn(l.valueType,i);if(l.type==="lazy")return nn(l.getter(),i);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return nn(l.innerType,i);if(l.type==="intersection")return nn(l.left,i)||nn(l.right,i);if(l.type==="record"||l.type==="map")return nn(l.keyType,i)||nn(l.valueType,i);if(l.type==="pipe")return nn(l.in,i)||nn(l.out,i);if(l.type==="object"){for(const s in l.shape)if(nn(l.shape[s],i))return!0;return!1}if(l.type==="union"){for(const s of l.options)if(nn(s,i))return!0;return!1}if(l.type==="tuple"){for(const s of l.items)if(nn(s,i))return!0;return!!(l.rest&&nn(l.rest,i))}return!1}const M2=(e,a={})=>i=>{const l=ob({...i,processors:a});return Kt(e,l),sb(l,e),ub(l,e)},Su=(e,a,i={})=>l=>{const{libraryOptions:s,target:u}=l??{},f=ob({...s??{},target:u,io:a,processors:i});return Kt(e,f),sb(f,e),ub(f,e)},k2={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},D2=(e,a,i,l)=>{const s=i;s.type="string";const{minimum:u,maximum:f,format:h,patterns:m,contentEncoding:p}=e._zod.bag;if(typeof u=="number"&&(s.minLength=u),typeof f=="number"&&(s.maxLength=f),h&&(s.format=k2[h]??h,s.format===""&&delete s.format,h==="time"&&delete s.format),p&&(s.contentEncoding=p),m&&m.size>0){const b=[...m];b.length===1?s.pattern=b[0].source:b.length>1&&(s.allOf=[...b.map(v=>({...a.target==="draft-07"||a.target==="draft-04"||a.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},L2=(e,a,i,l)=>{const s=i,{minimum:u,maximum:f,format:h,multipleOf:m,exclusiveMaximum:p,exclusiveMinimum:b}=e._zod.bag;typeof h=="string"&&h.includes("int")?s.type="integer":s.type="number",typeof b=="number"&&(a.target==="draft-04"||a.target==="openapi-3.0"?(s.minimum=b,s.exclusiveMinimum=!0):s.exclusiveMinimum=b),typeof u=="number"&&(s.minimum=u,typeof b=="number"&&a.target!=="draft-04"&&(b>=u?delete s.minimum:delete s.exclusiveMinimum)),typeof p=="number"&&(a.target==="draft-04"||a.target==="openapi-3.0"?(s.maximum=p,s.exclusiveMaximum=!0):s.exclusiveMaximum=p),typeof f=="number"&&(s.maximum=f,typeof p=="number"&&a.target!=="draft-04"&&(p<=f?delete s.maximum:delete s.exclusiveMaximum)),typeof m=="number"&&(s.multipleOf=m)},B2=(e,a,i,l)=>{i.type="boolean"},U2=(e,a,i,l)=>{i.not={}},H2=(e,a,i,l)=>{},$2=(e,a,i,l)=>{const s=e._zod.def,u=Z0(s.entries);u.every(f=>typeof f=="number")&&(i.type="number"),u.every(f=>typeof f=="string")&&(i.type="string"),i.enum=u},Z2=(e,a,i,l)=>{if(a.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},q2=(e,a,i,l)=>{if(a.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},P2=(e,a,i,l)=>{const s=i,u=e._zod.def,{minimum:f,maximum:h}=e._zod.bag;typeof f=="number"&&(s.minItems=f),typeof h=="number"&&(s.maxItems=h),s.type="array",s.items=Kt(u.element,a,{...l,path:[...l.path,"items"]})},Q2=(e,a,i,l)=>{const s=i,u=e._zod.def;s.type="object",s.properties={};const f=u.shape;for(const p in f)s.properties[p]=Kt(f[p],a,{...l,path:[...l.path,"properties",p]});const h=new Set(Object.keys(f)),m=new Set([...h].filter(p=>{const b=u.shape[p]._zod;return a.io==="input"?b.optin===void 0:b.optout===void 0}));m.size>0&&(s.required=Array.from(m)),u.catchall?._zod.def.type==="never"?s.additionalProperties=!1:u.catchall?u.catchall&&(s.additionalProperties=Kt(u.catchall,a,{...l,path:[...l.path,"additionalProperties"]})):a.io==="output"&&(s.additionalProperties=!1)},G2=(e,a,i,l)=>{const s=e._zod.def,u=s.inclusive===!1,f=s.options.map((h,m)=>Kt(h,a,{...l,path:[...l.path,u?"oneOf":"anyOf",m]}));u?i.oneOf=f:i.anyOf=f},Y2=(e,a,i,l)=>{const s=e._zod.def,u=Kt(s.left,a,{...l,path:[...l.path,"allOf",0]}),f=Kt(s.right,a,{...l,path:[...l.path,"allOf",1]}),h=p=>"allOf"in p&&Object.keys(p).length===1,m=[...h(u)?u.allOf:[u],...h(f)?f.allOf:[f]];i.allOf=m},F2=(e,a,i,l)=>{const s=e._zod.def,u=Kt(s.innerType,a,l),f=a.seen.get(e);a.target==="openapi-3.0"?(f.ref=s.innerType,i.nullable=!0):i.anyOf=[u,{type:"null"}]},K2=(e,a,i,l)=>{const s=e._zod.def;Kt(s.innerType,a,l);const u=a.seen.get(e);u.ref=s.innerType},V2=(e,a,i,l)=>{const s=e._zod.def;Kt(s.innerType,a,l);const u=a.seen.get(e);u.ref=s.innerType,i.default=JSON.parse(JSON.stringify(s.defaultValue))},X2=(e,a,i,l)=>{const s=e._zod.def;Kt(s.innerType,a,l);const u=a.seen.get(e);u.ref=s.innerType,a.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},J2=(e,a,i,l)=>{const s=e._zod.def;Kt)DELIM" -R"DELIM((s.innerType,a,l);const u=a.seen.get(e);u.ref=s.innerType;let f;try{f=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=f},I2=(e,a,i,l)=>{const s=e._zod.def,u=a.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;Kt(u,a,l);const f=a.seen.get(e);f.ref=u},W2=(e,a,i,l)=>{const s=e._zod.def;Kt(s.innerType,a,l);const u=a.seen.get(e);u.ref=s.innerType,i.readOnly=!0},cb=(e,a,i,l)=>{const s=e._zod.def;Kt(s.innerType,a,l);const u=a.seen.get(e);u.ref=s.innerType},eT=I("ZodISODateTime",(e,a)=>{i_.init(e,a),vt.init(e,a)});function tT(e){return u2(eT,e)}const nT=I("ZodISODate",(e,a)=>{l_.init(e,a),vt.init(e,a)});function aT(e){return c2(nT,e)}const rT=I("ZodISOTime",(e,a)=>{o_.init(e,a),vt.init(e,a)});function iT(e){return f2(rT,e)}const lT=I("ZodISODuration",(e,a)=>{s_.init(e,a),vt.init(e,a)});function oT(e){return d2(lT,e)}const sT=(e,a)=>{Y0.init(e,a),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>Jw(e,i)},flatten:{value:i=>Xw(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,Gd,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,Gd,2)}},isEmpty:{get(){return e.issues.length===0}}})},Hn=I("ZodError",sT,{Parent:Error}),uT=mh(Hn),cT=ph(Hn),fT=Mu(Hn),dT=ku(Hn),hT=eE(Hn),mT=tE(Hn),pT=nE(Hn),yT=aE(Hn),vT=rE(Hn),gT=iE(Hn),bT=lE(Hn),xT=oE(Hn),At=I("ZodType",(e,a)=>(zt.init(e,a),Object.assign(e["~standard"],{jsonSchema:{input:Su(e,"input"),output:Su(e,"output")}}),e.toJSONSchema=M2(e,{}),e.def=a,e.type=a.type,Object.defineProperty(e,"_def",{value:a}),e.check=(...i)=>e.clone(br(a,{checks:[...a.checks??[],...i.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),{parent:!0}),e.with=e.check,e.clone=(i,l)=>xr(e,i,l),e.brand=()=>e,e.register=((i,l)=>(i.add(e,l),e)),e.parse=(i,l)=>uT(e,i,l,{callee:e.parse}),e.safeParse=(i,l)=>fT(e,i,l),e.parseAsync=async(i,l)=>cT(e,i,l,{callee:e.parseAsync}),e.safeParseAsync=async(i,l)=>dT(e,i,l),e.spa=e.safeParseAsync,e.encode=(i,l)=>hT(e,i,l),e.decode=(i,l)=>mT(e,i,l),e.encodeAsync=async(i,l)=>pT(e,i,l),e.decodeAsync=async(i,l)=>yT(e,i,l),e.safeEncode=(i,l)=>vT(e,i,l),e.safeDecode=(i,l)=>gT(e,i,l),e.safeEncodeAsync=async(i,l)=>bT(e,i,l),e.safeDecodeAsync=async(i,l)=>xT(e,i,l),e.refine=(i,l)=>e.check(h4(i,l)),e.superRefine=i=>e.check(m4(i)),e.overwrite=i=>e.check(Vi(i)),e.optional=()=>hg(e),e.exactOptional=()=>e4(e),e.nullable=()=>mg(e),e.nullish=()=>hg(mg(e)),e.nonoptional=i=>l4(e,i),e.array=()=>Fi(e),e.or=i=>FT([e,i]),e.and=i=>VT(e,i),e.transform=i=>pg(e,IT(i)),e.default=i=>a4(e,i),e.prefault=i=>i4(e,i),e.catch=i=>s4(e,i),e.pipe=i=>pg(e,i),e.readonly=()=>f4(e),e.describe=i=>{const l=e.clone();return Il.add(l,{description:i}),l},Object.defineProperty(e,"description",{get(){return Il.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Il.get(e);const l=e.clone();return Il.add(l,i[0]),l},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),fb=I("_ZodString",(e,a)=>{yh.init(e,a),At.init(e,a),e._zod.processJSONSchema=(l,s,u)=>D2(e,l,s);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...l)=>e.check(g2(...l)),e.includes=(...l)=>e.check(S2(...l)),e.startsWith=(...l)=>e.check(w2(...l)),e.endsWith=(...l)=>e.check(E2(...l)),e.min=(...l)=>e.check(xu(...l)),e.max=(...l)=>e.check(ib(...l)),e.length=(...l)=>e.check(lb(...l)),e.nonempty=(...l)=>e.check(xu(1,...l)),e.lowercase=l=>e.check(b2(l)),e.uppercase=l=>e.check(x2(l)),e.trim=()=>e.check(T2()),e.normalize=(...l)=>e.check(_2(...l)),e.toLowerCase=()=>e.check(R2()),e.toUpperCase=()=>e.check(z2()),e.slugify=()=>e.check(A2())}),ST=I("ZodString",(e,a)=>{yh.init(e,a),fb.init(e,a),e.email=i=>e.check(q_(wT,i)),e.url=i=>e.check(F_(ET,i)),e.jwt=i=>e.check(s2(UT,i)),e.emoji=i=>e.check(K_(_T,i)),e.guid=i=>e.check(lg(cg,i)),e.uuid=i=>e.check(P_(Vs,i)),e.uuidv4=i=>e.check(Q_(Vs,i)),e.uuidv6=i=>e.check(G_(Vs,i)),e.uuidv7=i=>e.check(Y_(Vs,i)),e.nanoid=i=>e.check(V_(TT,i)),e.guid=i=>e.check(lg(cg,i)),e.cuid=i=>e.check(X_(RT,i)),e.cuid2=i=>e.check(J_(zT,i)),e.ulid=i=>e.check(I_(AT,i)),e.base64=i=>e.check(i2(DT,i)),e.base64url=i=>e.check(l2(LT,i)),e.xid=i=>e.check(W_(CT,i)),e.ksuid=i=>e.check(e2(NT,i)),e.ipv4=i=>e.check(t2(OT,i)),e.ipv6=i=>e.check(n2(jT,i)),e.cidrv4=i=>e.check(a2(MT,i)),e.cidrv6=i=>e.check(r2(kT,i)),e.e164=i=>e.check(o2(BT,i)),e.datetime=i=>e.check(tT(i)),e.date=i=>e.check(aT(i)),e.time=i=>e.check(iT(i)),e.duration=i=>e.check(oT(i))});function Lt(e){return Z_(ST,e)}const vt=I("ZodStringFormat",(e,a)=>{pt.init(e,a),fb.init(e,a)}),wT=I("ZodEmail",(e,a)=>{XE.init(e,a),vt.init(e,a)}),cg=I("ZodGUID",(e,a)=>{KE.init(e,a),vt.init(e,a)}),Vs=I("ZodUUID",(e,a)=>{VE.init(e,a),vt.init(e,a)}),ET=I("ZodURL",(e,a)=>{JE.init(e,a),vt.init(e,a)}),_T=I("ZodEmoji",(e,a)=>{IE.init(e,a),vt.init(e,a)}),TT=I("ZodNanoID",(e,a)=>{WE.init(e,a),vt.init(e,a)}),RT=I("ZodCUID",(e,a))DELIM" -R"DELIM(=>{e_.init(e,a),vt.init(e,a)}),zT=I("ZodCUID2",(e,a)=>{t_.init(e,a),vt.init(e,a)}),AT=I("ZodULID",(e,a)=>{n_.init(e,a),vt.init(e,a)}),CT=I("ZodXID",(e,a)=>{a_.init(e,a),vt.init(e,a)}),NT=I("ZodKSUID",(e,a)=>{r_.init(e,a),vt.init(e,a)}),OT=I("ZodIPv4",(e,a)=>{u_.init(e,a),vt.init(e,a)}),jT=I("ZodIPv6",(e,a)=>{c_.init(e,a),vt.init(e,a)}),MT=I("ZodCIDRv4",(e,a)=>{f_.init(e,a),vt.init(e,a)}),kT=I("ZodCIDRv6",(e,a)=>{d_.init(e,a),vt.init(e,a)}),DT=I("ZodBase64",(e,a)=>{h_.init(e,a),vt.init(e,a)}),LT=I("ZodBase64URL",(e,a)=>{p_.init(e,a),vt.init(e,a)}),BT=I("ZodE164",(e,a)=>{y_.init(e,a),vt.init(e,a)}),UT=I("ZodJWT",(e,a)=>{g_.init(e,a),vt.init(e,a)}),db=I("ZodNumber",(e,a)=>{tb.init(e,a),At.init(e,a),e._zod.processJSONSchema=(l,s,u)=>L2(e,l,s),e.gt=(l,s)=>e.check(sg(l,s)),e.gte=(l,s)=>e.check(rd(l,s)),e.min=(l,s)=>e.check(rd(l,s)),e.lt=(l,s)=>e.check(og(l,s)),e.lte=(l,s)=>e.check(ad(l,s)),e.max=(l,s)=>e.check(ad(l,s)),e.int=l=>e.check(fg(l)),e.safe=l=>e.check(fg(l)),e.positive=l=>e.check(sg(0,l)),e.nonnegative=l=>e.check(rd(0,l)),e.negative=l=>e.check(og(0,l)),e.nonpositive=l=>e.check(ad(0,l)),e.multipleOf=(l,s)=>e.check(ug(l,s)),e.step=(l,s)=>e.check(ug(l,s)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function Ge(e){return h2(db,e)}const HT=I("ZodNumberFormat",(e,a)=>{b_.init(e,a),db.init(e,a)});function fg(e){return m2(HT,e)}const $T=I("ZodBoolean",(e,a)=>{x_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>B2(e,i,l)});function vh(e){return p2($T,e)}const ZT=I("ZodUnknown",(e,a)=>{S_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>H2()});function dg(){return y2(ZT)}const qT=I("ZodNever",(e,a)=>{w_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>U2(e,i,l)});function PT(e){return v2(qT,e)}const QT=I("ZodArray",(e,a)=>{E_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>P2(e,i,l,s),e.element=a.element,e.min=(i,l)=>e.check(xu(i,l)),e.nonempty=i=>e.check(xu(1,i)),e.max=(i,l)=>e.check(ib(i,l)),e.length=(i,l)=>e.check(lb(i,l)),e.unwrap=()=>e.element});function Fi(e,a){return C2(QT,e,a)}const GT=I("ZodObject",(e,a)=>{T_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>Q2(e,i,l,s),tt(e,"shape",()=>a.shape),e.keyof=()=>XT(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:dg()}),e.loose=()=>e.clone({...e._zod.def,catchall:dg()}),e.strict=()=>e.clone({...e._zod.def,catchall:PT()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>Gw(e,i),e.safeExtend=i=>Yw(e,i),e.merge=i=>Fw(e,i),e.pick=i=>Pw(e,i),e.omit=i=>Qw(e,i),e.partial=(...i)=>Kw(hb,e,i[0]),e.required=(...i)=>Vw(mb,e,i[0])});function ia(e,a){const i={type:"object",shape:e??{},...ze(a)};return new GT(i)}const YT=I("ZodUnion",(e,a)=>{R_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>G2(e,i,l,s),e.options=a.options});function FT(e,a){return new YT({type:"union",options:e,...ze(a)})}const KT=I("ZodIntersection",(e,a)=>{z_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>Y2(e,i,l,s)});function VT(e,a){return new KT({type:"intersection",left:e,right:a})}const Fd=I("ZodEnum",(e,a)=>{A_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(l,s,u)=>$2(e,l,s),e.enum=a.entries,e.options=Object.values(a.entries);const i=new Set(Object.keys(a.entries));e.extract=(l,s)=>{const u={};for(const f of l)if(i.has(f))u[f]=a.entries[f];else throw new Error(`Key ${f} not found in enum`);return new Fd({...a,checks:[],...ze(s),entries:u})},e.exclude=(l,s)=>{const u={...a.entries};for(const f of l)if(i.has(f))delete u[f];else throw new Error(`Key ${f} not found in enum`);return new Fd({...a,checks:[],...ze(s),entries:u})}});function XT(e,a){const i=Array.isArray(e)?Object.fromEntries(e.map(l=>[l,l])):e;return new Fd({type:"enum",entries:i,...ze(a)})}const JT=I("ZodTransform",(e,a)=>{C_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>q2(e,i),e._zod.parse=(i,l)=>{if(l.direction==="backward")throw new H0(e.constructor.name);i.addIssue=u=>{if(typeof u=="string")i.issues.push(so(u,i.value,a));else{const f=u;f.fatal&&(f.continue=!1),f.code??(f.code="custom"),f.input??(f.input=i.value),f.inst??(f.inst=e),i.issues.push(so(f))}};const s=a.transform(i.value,i);return s instanceof Promise?s.then(u=>(i.value=u,i)):(i.value=s,i)}});function IT(e){return new JT({type:"transform",transform:e})}const hb=I("ZodOptional",(e,a)=>{rb.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>cb(e,i,l,s),e.unwrap=()=>e._zod.def.innerType});function hg(e){return new hb({type:"optional",innerType:e})}const WT=I("ZodExactOptional",(e,a)=>{N_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>cb(e,i,l,s),e.unwrap=()=>e._zod.def.innerTy)DELIM" -R"DELIM(pe});function e4(e){return new WT({type:"optional",innerType:e})}const t4=I("ZodNullable",(e,a)=>{O_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>F2(e,i,l,s),e.unwrap=()=>e._zod.def.innerType});function mg(e){return new t4({type:"nullable",innerType:e})}const n4=I("ZodDefault",(e,a)=>{j_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>V2(e,i,l,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function a4(e,a){return new n4({type:"default",innerType:e,get defaultValue(){return typeof a=="function"?a():P0(a)}})}const r4=I("ZodPrefault",(e,a)=>{M_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>X2(e,i,l,s),e.unwrap=()=>e._zod.def.innerType});function i4(e,a){return new r4({type:"prefault",innerType:e,get defaultValue(){return typeof a=="function"?a():P0(a)}})}const mb=I("ZodNonOptional",(e,a)=>{k_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>K2(e,i,l,s),e.unwrap=()=>e._zod.def.innerType});function l4(e,a){return new mb({type:"nonoptional",innerType:e,...ze(a)})}const o4=I("ZodCatch",(e,a)=>{D_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>J2(e,i,l,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function s4(e,a){return new o4({type:"catch",innerType:e,catchValue:typeof a=="function"?a:()=>a})}const u4=I("ZodPipe",(e,a)=>{L_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>I2(e,i,l,s),e.in=a.in,e.out=a.out});function pg(e,a){return new u4({type:"pipe",in:e,out:a})}const c4=I("ZodReadonly",(e,a)=>{B_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>W2(e,i,l,s),e.unwrap=()=>e._zod.def.innerType});function f4(e){return new c4({type:"readonly",innerType:e})}const d4=I("ZodCustom",(e,a)=>{U_.init(e,a),At.init(e,a),e._zod.processJSONSchema=(i,l,s)=>Z2(e,i)});function h4(e,a={}){return N2(d4,e,a)}function m4(e){return O2(e)}function Kr(e){if(!e)return;const a=e.trim();if(!a)return;const i=a.toLowerCase(),l=i.indexOf("1");if(l>0){const f=i.slice(0,l);if(["bc","tb","bcrt","ltc","sb"].includes(f)){const h=i.slice(l+1);if(!h)return;const m=h.charAt(0);return m==="p"?"p2tr":m==="q"?h.length===39||h.length===40||e.length===42?"p2wpkh":h.length===59||h.length===60||e.length===62?"p2wsh":"segwit":"segwit"}}const s=/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/u.test(a)&&a.length>=26&&a.length<=35;switch(i[0]){case"1":case"m":case"n":return s?"p2pkh":void 0;case"3":case"2":return s?"p2sh":void 0;default:return}}class gh extends Error{constructor(a,i){super(a),this.status=i}status}const Kd=ia({id:Lt(),height:Ge(),timestamp:Ge().optional(),mediantime:Ge().optional(),tx_count:Ge().optional(),size:Ge().optional(),weight:Ge().optional(),difficulty:Ge().optional(),bits:Ge().optional(),merkle_root:Lt().optional(),previousblockhash:Lt().nullable().optional(),nonce:Ge().optional(),version:Ge().optional()}).loose(),p4=ia({confirmed:vh(),block_height:Ge().optional(),block_hash:Lt().optional(),block_time:Ge().optional()}),y4=ia({txid:Lt().optional().nullable(),vout:Ge().optional().nullable(),sequence:Ge().optional(),scriptsig:Lt().optional().nullable(),scriptsig_asm:Lt().optional().nullable(),witness:Fi(Lt()).optional(),is_coinbase:vh().optional(),prevout:ia({scriptpubkey_type:Lt().optional(),scriptpubkey_address:Lt().optional(),scriptpubkey:Lt().optional(),scriptpubkey_asm:Lt().optional(),value:Ge().optional()}).partial().nullable().optional()}).loose(),v4=ia({scriptpubkey_type:Lt().optional(),scriptpubkey_address:Lt().optional(),scriptpubkey:Lt().optional(),scriptpubkey_asm:Lt().optional(),value:Ge(),n:Ge().optional()}).loose(),ou=ia({txid:Lt(),hash:Lt().optional(),fee:Ge().optional(),version:Ge(),locktime:Ge(),vin:Fi(y4),vout:Fi(v4),size:Ge(),weight:Ge(),status:p4}).loose(),su=Fi(Kd),wu=Fi(ou),yg=ia({in_best_chain:vh(),next_best:Lt().optional(),height:Ge().optional()}),vg=ia({address:Lt(),chain_stats:ia({funded_txo_count:Ge().optional(),funded_txo_sum:Ge().optional(),spent_txo_count:Ge().optional(),spent_txo_sum:Ge().optional(),tx_count:Ge().optional()}),mempool_stats:ia({funded_txo_count:Ge().optional(),funded_txo_sum:Ge().optional(),spent_txo_count:Ge().optional(),spent_txo_sum:Ge().optional(),tx_count:Ge().optional()})});async function Yt(e,a,i){const l=a.startsWith("/")?a:`/${a}`,s=await fetch(`${e}${l}`);if(!s.ok)throw new gh(`Request to ${a} failed with status ${String(s.status)}`,s.status);const u=await s.json();return i.parse(u)}async function gg(e,a){const i=await fetch(`${e}/blocks/tip/height`);if(!i.ok)throw new gh("Unable to fetch tip height",i.status);const l=await i.text(),s=Number(l.trim());if(!Number.isFinite(s))throw new TypeError("Invalid tip height response");return a.lastKnownHeight=s,s}async function ki(e,a,i){if(a.lastKnownHeight===null){await gg(e,a);return}typeof i=="number"&&a.lastKnownHeightu.scriptpubkey_address===e?s+u.value:s,0),l=a.vin.reduce((s,u)=>{const f=u.prevout;return f?.scriptpubkey_address===e&&typeof f.value=="number"?s+)DELIM" -R"DELIM(f.value:s},0);return i-l}async function id(e,a){if(a==="latest"||a==="tip"){const i=await Yt(e,"/blocks",su);if(i.length===0)throw new Error("No blocks returned from API");return i[0].id}if(/^\d+$/.test(a)){const i=await fetch(`${e}/block-height/${a}`);if(!i.ok)throw new gh("Unable to resolve block height",i.status);return(await i.text()).trim()}return a}async function bg(e,a,i){if(i.lastKnownHeight==null||a>=i.lastKnownHeight)return null;const l=a+1;try{const s=await fetch(`${e}/block-height/${String(l)}`);return s.ok&&(await s.text()).trim()||null}catch(s){return console.warn(`Failed to resolve hash for height ${String(l)}`,s),null}}function Ql(e){return{hash:e.id,height:e.height,timestamp:e.timestamp??e.mediantime??0,txCount:e.tx_count??0,size:e.size??0,weight:e.weight??0,difficulty:e.difficulty,previousBlockHash:e.previousblockhash??null}}function ld(e,a){const i=e.status.confirmed?"confirmed":"unconfirmed",l=e.vin.map((m,p)=>{const b=m.is_coinbase||m.txid==null?void 0:typeof m.vout=="number"&&m.vout!==4294967295?m.vout:void 0;return{index:p,prevTxId:m.txid??void 0,prevOutputIndex:b,address:m.prevout?.scriptpubkey_address??void 0,valueSats:m.prevout?.value,scriptType:m.prevout?.scriptpubkey_type,isCoinbase:m.is_coinbase??!1,script:m.scriptsig||m.scriptsig_asm?{hex:m.scriptsig??void 0,mnemonic:m.scriptsig_asm??void 0}:void 0,witness:m.witness??void 0,sequence:m.sequence}}),s=e.vout.map((m,p)=>({index:p,address:m.scriptpubkey_address??void 0,valueSats:m.value,scriptType:m.scriptpubkey_type,spent:void 0,script:m.scriptpubkey||m.scriptpubkey_asm?{hex:m.scriptpubkey??void 0,mnemonic:m.scriptpubkey_asm??void 0}:void 0})),u=s.reduce((m,p)=>m+p.valueSats,0),f=a.lastKnownHeight;let h=0;return e.status.block_height&&i==="confirmed"&&(h=f&&f>=e.status.block_height?f-e.status.block_height+1:1),{txid:e.txid,hash:e.hash??e.txid,status:i,confirmations:h,blockHeight:e.status.block_height,blockHash:e.status.block_hash,receivedTime:e.status.block_time,feeSats:e.fee??null,feeRate:e.fee?e.fee/e.weight*4:null,size:e.size,weight:e.weight,version:e.version,locktime:e.locktime,totalInput:null,totalOutput:u,inputs:l,outputs:s}}function b4(e,a){const i=e.chain_stats,l=e.mempool_stats,s=(i.funded_txo_sum??0)-(i.spent_txo_sum??0),u=pb(e.address,a.slice(0,25));return{address:e.address,addressType:Kr(e.address),balance:s,totalReceived:(i.funded_txo_sum??0)+(l.funded_txo_sum??0),totalSent:(i.spent_txo_sum??0)+(l.spent_txo_sum??0),txCount:(i.tx_count??0)+(l.tx_count??0),utxoCount:(i.funded_txo_count??0)-(i.spent_txo_count??0),transactions:u}}function x4(e){const a=e.chain_stats,i=e.mempool_stats,l=(a.funded_txo_sum??0)-(a.spent_txo_sum??0);return{address:e.address,addressType:Kr(e.address),balance:l,totalReceived:(a.funded_txo_sum??0)+(i.funded_txo_sum??0),totalSent:(a.spent_txo_sum??0)+(i.spent_txo_sum??0),txCount:(a.tx_count??0)+(i.tx_count??0),utxoCount:(a.funded_txo_count??0)-(a.spent_txo_count??0)}}function pb(e,a){return a.map(i=>({txid:i.txid,timestamp:i.status.block_time,valueChange:g4(e,i),blockHeight:i.status.block_height}))}async function xg(e,a,i=0){const l=i>0?`/block/${a}/txs/${String(i)}`:`/block/${a}/txs`;return Yt(e,l,wu)}async function S4(e,a,i){return i?Yt(e,`/address/${a}/txs/chain/${i}`,wu):Yt(e,`/address/${a}/txs`,wu)}function yb({baseUrl:e}){const a=new Set;let i=null;const l={lastBlockHash:null,lastKnownHeight:null};async function s(h){const m=await Yt(e,`/tx/${h}`,ou);return await(m.status.block_height?ki(e,l,m.status.block_height):ki(e,l)),ld(m,l)}function u(){i||a.size===0||(i=setInterval(async()=>{try{const h=await Yt(e,"/blocks",su);if(h.length===0)return;const m=h[0];if(m.id!==l.lastBlockHash){l.lastBlockHash=m.id,l.lastKnownHeight=Math.max(m.height,l.lastKnownHeight??0);const p=Ql(m);for(const b of a)b({type:"block.new",payload:p})}}catch(h){console.warn("Block polling failed",h)}},15e3))}function f(){i&&(clearInterval(i),i=null)}return{metadata:{id:"blockstream",label:"Blockstream.info",type:"external",connectionState:"connected",supportsWebsocket:!1,endpoint:e,description:"Read-only adapter using Blockstream public REST API."},getConfiguration(){return Promise.resolve({address:!0,filter:!1,turbo:!1,witness:!0,retarget:!1,difficult:!1})},async getLatestBlocks(h=10){const m=await Yt(e,"/blocks",su);return m.length>0&&(l.lastBlockHash=m[0].id,l.lastKnownHeight=Math.max(m[0].height,l.lastKnownHeight??0)),m.slice(0,h).map(p=>Ql(p))},async getBlocksBefore(h,m=10){const p=Math.max(h,0),b=await Yt(e,`/blocks/${String(p)}`,su);return b.length>0&&(l.lastKnownHeight=Math.max(b[0].height,l.lastKnownHeight??0)),b.slice(0,m).map(v=>Ql(v))},async getBlockHeader(h){const m=await id(e,h);await ki(e,l);const[p,b]=await Promise.all([Yt(e,`/block/${m}`,Kd),Yt(e,`/block/${m}/status`,yg).catch(()=>null)]),v=Ql(p);l.lastBlockHash=v.hash,l.lastKnownHeight=Math.max(v.height,l.lastKnownHeight??v.height);let x=b?.next_best??null;return x||(x=await bg(e,v.height,l)),{...v,merkleRoot:p.merkle_root,nonce:p.nonce,bits:p.bits,version)DELIM" -R"DELIM(:p.version,nextBlockHash:x}},getBlockStats(h){return Promise.resolve({})},async getBlock(h){const m=await id(e,h);await ki(e,l);const p=await Yt(e,`/block/${m}`,Kd),[b,v]=await Promise.allSettled([xg(e,m),Yt(e,`/block/${m}/status`,yg)]);b.status==="rejected"&&console.warn("Failed to load block transactions, defaulting to empty set",b.reason),v.status==="rejected"&&console.warn("Failed to load block status, defaulting to unknown",v.reason);const x=Ql(p);l.lastBlockHash=x.hash,l.lastKnownHeight=Math.max(x.height,l.lastKnownHeight??x.height);const w=b.status==="fulfilled"?b.value:[];let E=(v.status==="fulfilled"?v.value:null)?.next_best??null;return E||(E=await bg(e,x.height,l)),{...x,merkleRoot:p.merkle_root,nonce:p.nonce,bits:p.bits,version:p.version,nextBlockHash:E,transactions:w.map(L=>ld(L,l))}},async getBlockTransactions(h,m=0){const p=await id(e,h),b=await xg(e,p,m),v=b.reduce((x,w)=>w.status.block_height?x===null?w.status.block_height:Math.max(x,w.status.block_height):x,null);return await(typeof v=="number"?ki(e,l,v):ki(e,l)),b.map(x=>ld(x,l))},async getTransactionHeader(h){return s(h)},async getTransaction(h){return s(h)},async getTransactionInputScriptHex(h,m){const p=await Yt(e,`/tx/${h}`,ou);if(m<0||m>=p.vin.length)throw new RangeError(`Input index ${String(m)} not found`);const v=p.vin[m].scriptsig;return typeof v=="string"?v:""},async getTransactionOutputScriptHex(h,m){const p=await Yt(e,`/tx/${h}`,ou);if(m<0||m>=p.vout.length)throw new RangeError(`Output index ${String(m)} not found`);const v=p.vout[m].scriptpubkey;if(typeof v!="string")throw new TypeError("Output script missing in provider response");return v},async getAddressSummary(h){const m=await Yt(e,`/address/${h}`,vg);return x4(m)},async getAddress(h){const m=await Yt(e,`/address/${h}`,vg),p=await Yt(e,`/address/${h}/txs`,wu);return b4(m,p)},async getAddressTransactions(h,m){const p=await S4(e,h,m);return pb(h,p)},subscribeToEvents(h){return a.add(h),u(),()=>{a.delete(h),a.size===0&&f()}}}}function w4({baseUrl:e}){const a=yb({baseUrl:e});return{...a,metadata:{...a.metadata,id:"mempool",label:"mempool.space",endpoint:e,description:"Adapter backed by mempool.space REST API."}}}function uo(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function vb(e,a){return Array.isArray(a)?a.length===0?!0:e?a.every(i=>typeof i=="string"):a.every(i=>Number.isSafeInteger(i)):!1}function gb(e){if(typeof e!="function")throw new Error("function expected");return!0}function co(e,a){if(typeof a!="string")throw new Error(`${e}: string expected`);return!0}function bo(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function Eu(e){if(!Array.isArray(e))throw new Error("array expected")}function bb(e,a){if(!vb(!0,a))throw new Error(`${e}: array of strings expected`)}function bh(e,a){if(!vb(!1,a))throw new Error(`${e}: array of numbers expected`)}function xh(...e){const a=u=>u,i=(u,f)=>h=>u(f(h)),l=e.map(u=>u.encode).reduceRight(i,a),s=e.map(u=>u.decode).reduce(i,a);return{encode:l,decode:s}}function xb(e){const a=typeof e=="string"?e.split(""):e,i=a.length;bb("alphabet",a);const l=new Map(a.map((s,u)=>[s,u]));return{encode:s=>(Eu(s),s.map(u=>{if(!Number.isSafeInteger(u)||u<0||u>=i)throw new Error(`alphabet.encode: digit index outside alphabet "${u}". Allowed: ${e}`);return a[u]})),decode:s=>(Eu(s),s.map(u=>{co("alphabet.decode",u);const f=l.get(u);if(f===void 0)throw new Error(`Unknown letter: "${u}". Allowed: ${e}`);return f}))}}function Sb(e=""){return co("join",e),{encode:a=>(bb("join.decode",a),a.join(e)),decode:a=>(co("join.decode",a),a.split(e))}}function Sg(e,a,i){if(a<2)throw new Error(`convertRadix: invalid from=${a}, base cannot be less than 2`);if(i<2)throw new Error(`convertRadix: invalid to=${i}, base cannot be less than 2`);if(Eu(e),!e.length)return[];let l=0;const s=[],u=Array.from(e,h=>{if(bo(h),h<0||h>=a)throw new Error(`invalid integer: ${h}`);return h}),f=u.length;for(;;){let h=0,m=!0;for(let p=l;pa===0?e:wb(a,e%a),_u=(e,a)=>e+(a-wb(e,a)),uu=(()=>{let e=[];for(let a=0;a<40;a++)e.push(2**a);return e})();function Vd(e,a,i,l){if(Eu(e),a<=0||a>32)throw new Error(`convertRadix2: wrong from=${a}`);if(i<=0||i>32)throw new Error(`convertRadix2: wrong to=${i}`);if(_u(a,i)>32)throw new Error(`convertRadix2: carry overflow from=${a} to=${i} carryBits=${_u(a,i)}`);let s=0,u=0;const f=uu[a],h=uu[i]-1,m=[];for(const p of e){if(bo(p),p>=f)throw new Error(`convertRadix2: invalid data word=${p} from=${a}`);if(s=s<32)throw new Error(`convertRadix2: carry overflow pos=${u} from=${a}`);for(u+=a;u>=i;u-=)DELIM" -R"DELIM(i)m.push((s>>u-i&h)>>>0);const b=uu[u];if(b===void 0)throw new Error("invalid carry");s&=b-1}if(s=s<=a)throw new Error("Excess padding");if(!l&&s>0)throw new Error(`Non-zero padding: ${s}`);return l&&u>0&&m.push(s>>>0),m}function E4(e){bo(e);const a=2**8;return{encode:i=>{if(!uo(i))throw new Error("radix.encode input should be Uint8Array");return Sg(Array.from(i),a,e)},decode:i=>(bh("radix.decode",i),Uint8Array.from(Sg(i,e,a)))}}function _4(e,a=!1){if(bo(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(_u(8,e)>32||_u(e,8)>32)throw new Error("radix2: carry overflow");return{encode:i=>{if(!uo(i))throw new Error("radix2.encode input should be Uint8Array");return Vd(Array.from(i),8,e,!a)},decode:i=>(bh("radix2.decode",i),Uint8Array.from(Vd(i,e,8,a)))}}function wg(e){return gb(e),function(...a){try{return e.apply(null,a)}catch{}}}function T4(e,a){return bo(e),gb(a),{encode(i){if(!uo(i))throw new Error("checksum.encode: input should be Uint8Array");const l=a(i).slice(0,e),s=new Uint8Array(i.length+e);return s.set(i),s.set(l,i.length),s},decode(i){if(!uo(i))throw new Error("checksum.decode: input should be Uint8Array");const l=i.slice(0,-e),s=i.slice(-e),u=a(l).slice(0,e);for(let f=0;fxh(E4(58),xb(e),Sb("")),z4=R4("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),A4=e=>xh(T4(4,a=>e(e(a))),z4),Xd=xh(xb("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),Sb("")),Eg=[996825010,642813549,513874426,1027748829,705979059];function Gl(e){const a=e>>25;let i=(e&33554431)<<5;for(let l=0;l>l&1)===1&&(i^=Eg[l]);return i}function _g(e,a,i=1){const l=e.length;let s=1;for(let u=0;u126)throw new Error(`Invalid prefix (${e})`);s=Gl(s)^f>>5}s=Gl(s);for(let u=0;uw)throw new TypeError(`Length ${E} exceeds limit ${w}`);const k=v.toLowerCase(),L=_g(k,x,a);return`${k}1${Xd.encode(x)}${L}`}function h(v,x=90){co("bech32.decode input",v);const w=v.length;if(w<8||x!==!1&&w>x)throw new TypeError(`invalid string length: ${w} (${v}). Expected (8..${x})`);const T=v.toLowerCase();if(v!==T&&v!==v.toUpperCase())throw new Error("String must be lowercase or uppercase");const E=T.lastIndexOf("1");if(E===0||E===-1)throw new Error('Letter "1" must be present between prefix and data only');const k=T.slice(0,E),L=T.slice(E+1);if(L.length<6)throw new Error("Data must be at least 6 characters long");const Q=Xd.decode(L).slice(0,-6),G=_g(k,Q,a);if(!L.endsWith(G))throw new Error(`Invalid checksum in ${v}: expected "${G}"`);return{prefix:k,words:Q}}const m=wg(h);function p(v){const{prefix:x,words:w}=h(v,!1);return{prefix:x,words:w,bytes:l(w)}}function b(v,x){return f(v,s(x))}return{encode:f,decode:h,encodeFromBytes:b,decodeToBytes:p,decodeUnsafe:m,fromWords:l,fromWordsUnsafe:u,toWords:s}}const Tu=Eb("bech32"),Jd=Eb("bech32m");function C4(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function Sh(e,a,i=""){const l=C4(e),s=e?.length;if(!l||a!==void 0){const f=i&&`"${i}" `,h="",m=l?`length=${s}`:`type=${typeof e}`,p=f+"expected Uint8Array"+h+", got "+m;throw l?new RangeError(p):new TypeError(p)}return e}function Tg(e,a=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(a&&e.finished)throw new Error("Hash#digest() has already been called")}function N4(e,a){Sh(e,void 0,"digestInto() output");const i=a.outputLen;if(e.length='+i)}function Id(...e){for(let a=0;a>>a}const O4=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",j4=Array.from({length:256},(e,a)=>a.toString(16).padStart(2,"0"));function cu(e){if(Sh(e),O4)return e.toHex();let a="";for(let i=0;ie(u).update(s).digest(),l=e(void 0);return i.outputLen=l.outputLen,i.blockLen=l.blockLen,i.canXOF=l.canXOF,i.create=s=>e(s),Object.assign(i,a),Object.freeze(i)}const k4=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function D4(e,a,i){return e&a^~e&i}function L4(e,a,i){return e&a^e&i^a&i}class B4{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(a,i,l,s){this.blockLen=a,this.outputLen=i,this.padOffset=l,this.isLE=s,this.buffer=new Uint8Array(a),t)DELIM" -R"DELIM(his.view=od(this.buffer)}update(a){Tg(this),Sh(a);const{view:i,buffer:l,blockLen:s}=this,u=a.length;for(let f=0;fs-f&&(this.process(l,0),f=0);for(let v=f;vb.length)throw new Error("_sha2: outputLen bigger than state");for(let v=0;v>>3,E=aa(w,17)^aa(w,19)^w>>>10;fr[v]=E+fr[v-7]+T+fr[v-16]|0}let{A:l,B:s,C:u,D:f,E:h,F:m,G:p,H:b}=this;for(let v=0;v<64;v++){const x=aa(h,6)^aa(h,11)^aa(h,25),w=b+x+D4(h,m,p)+U4[v]+fr[v]|0,E=(aa(l,2)^aa(l,13)^aa(l,22))+L4(l,s,u)|0;b=p,p=m,m=h,h=f+w|0,f=u,u=s,s=l,l=w+E|0}l=l+this.A|0,s=s+this.B|0,u=u+this.C|0,f=f+this.D|0,h=h+this.E|0,m=m+this.F|0,p=p+this.G|0,b=b+this.H|0,this.set(l,s,u,f,h,m,p,b)}roundClean(){Id(fr)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Id(this.buffer)}}class $4 extends H4{A=cr[0]|0;B=cr[1]|0;C=cr[2]|0;D=cr[3]|0;E=cr[4]|0;F=cr[5]|0;G=cr[6]|0;H=cr[7]|0;constructor(){super(32)}}const _b=M4(()=>new $4,k4(1)),Tb=A4(_b),Z4=0x00000000ffff0000000000000000000000000000000000000000000000000000n;function wh(e){if(e.length%2!==0)throw new Error("Invalid hex string");const a=new Uint8Array(e.length/2);for(let i=0;i>>24,i=e&8388607;if(i===0||a<3)return;const l=BigInt(i)*(1n<i[1]).filter(Boolean);return a.length>0?a:[e]}function Eh(e){const a=e.toLowerCase();if(a.includes("dup hash160")&&a.includes("equalverify checksig"))return"p2pkh";if(a.startsWith("hash160")&&a.includes("equal"))return"p2sh";if(a.startsWith("zero [")){const l=a.match(/zero \[([0-9a-f]+)\]/)?.[1]??"";return l.length===40?"p2wpkh":l.length===64?"p2wsh":"segwit"}if(a.startsWith("1 ["))return"p2tr"}function xo(){return"mainnet"}function So(e){return e==="testnet"||e==="regtest"?{p2pkh:111,p2sh:196,hrp:e==="regtest"?"bcrt":"tb"}:{p2pkh:0,p2sh:5,hrp:"bc"}}function Rg(e,a){const i=new Uint8Array(a.length/2+1);return i[0]=e,i.set(wh(a),1),Tb.encode(i)}function sd(e,a,i){const l=wh(i),s=Tu.toWords(l);return s.unshift(a),(a===0?Tu:Jd).encode(e,s)}function Rb(e,a){const i=e.toLowerCase(),l=i.match(/dup hash160 \[([0-9a-f]{40})\] equalverify checksig/);if(l)return{address:Rg(a.p2pkh,l[1]),type:"p2pkh"};const s=i.match(/^hash160 \[([0-9a-f]{40})\] equal$/);if(s)return{address:Rg(a.p2sh,s[1]),type:"p2sh"};const u=i.match(/^zero \[([0-9a-f]{40})\]/);if(u)return{address:sd(a.hrp,0,u[1]),type:"p2wpkh"};const f=i.match(/^zero \[([0-9a-f]{64})\]/);if(f)return{address:sd(a.hrp,0,f[1]),type:"p2wsh"};const h=i.match(/^1 \[([0-9a-f]{64})\]/);return h?{address:sd(a.hrp,1,h[1]),type:"p2tr"}:{type:Eh(e)}}function Q4(e,a){try{const s=Tb.decode(e),u=s[0],f=c)DELIM" -R"DELIM(u(s.slice(1));if(f.length===40&&u===a.p2pkh)return{scriptHex:`76a914${f}88ac`,type:"p2pkh"};if(f.length===40&&u===a.p2sh)return{scriptHex:`a914${f}87`,type:"p2sh"}}catch{}const i=e.toLowerCase();if(i.indexOf("1")>0&&i.startsWith(`${a.hrp}1`)){const s=i,u=m=>{try{return m.decode(s,90)}catch{return null}},f=u(Tu);if(f&&f.prefix===a.hrp){const m=f.words[0],p=Tu.fromWords(f.words.slice(1)),b=cu(p),v=p.length.toString(16).padStart(2,"0");if(m===0&&(p.length===20||p.length===32))return{scriptHex:`00${v}${b}`,type:p.length===20?"p2wpkh":"p2wsh"}}const h=u(Jd);if(h&&h.prefix===a.hrp){const m=h.words[0],p=Jd.fromWords(h.words.slice(1)),b=cu(p),v=p.length.toString(16).padStart(2,"0");if(m===1&&p.length===32)return{scriptHex:`51${v}${b}`,type:"p2tr"}}}return null}function gr(e,a){const i=e.toLowerCase();if(/^[0-9a-f]{64}$/.test(i))return{hash:i,type:"script-hash"};const l=Q4(e,a);if(!l)return null;const s=_b(wh(l.scriptHex)),u=Uint8Array.from(s).reverse();return{hash:cu(u),type:l.type}}function Yl(e,a){return{hash:e.hash,height:e.height,timestamp:e.timestamp,txCount:a,size:void 0,weight:void 0,difficulty:q4(e.bits),previousBlockHash:e.previous}}function G4(e){const a=P4(e);return a&&a.length>0?a:void 0}function Y4(e,a,i,l){const s=/^0{64}$/u.test(e.point.hash),u=a?Rb(a.script,i):{address:void 0,type:void 0},f=a?a.value:void 0,h=a?a.script:void 0;return{index:l,prevTxId:s?void 0:e.point.hash,prevOutputIndex:s?void 0:e.point.index,address:u.address,valueSats:f,scriptType:u.type??Eh(h??e.script),isCoinbase:s,script:e.script?{mnemonic:e.script}:void 0,witness:G4(e.witness),sequence:e.sequence}}function F4(e,a,i){const l=Rb(e.script,i);return{index:a,address:l.address,valueSats:e.value,scriptType:l.type??Eh(e.script),spent:void 0,script:e.script?{mnemonic:e.script}:void 0}}function K4(e,a){return typeof e!="number"||typeof a!="number"?0:Math.max(0,e-a+1)}function Xs(e,a,i,l,s){const u=e.outputs.map((b,v)=>F4(b,v,i)),f=u.reduce((b,v)=>b+v.valueSats,0),h=a.reduce((b,v)=>v?(b??0)+v.value:b,null),m=K4(l.tipHeight,l.blockHeight),p=typeof l.blockHeight=="number"?"confirmed":"unconfirmed";return{txid:e.hash,hash:e.hash,status:p,confirmations:m,blockHeight:l.blockHeight,blockHash:l.blockHash,receivedTime:l.timestamp,feeSats:Number.isFinite(s)?s:void 0,feeRate:null,size:void 0,weight:void 0,version:e.version,locktime:e.locktime,totalInput:h,totalOutput:f,inputs:e.inputs.map((b,v)=>Y4(b,a[v],i,v)),outputs:u}}const Js=25,V4="/v1/top/subscribe?format=json",X4="/v1/top/subscribe?format=json&stop=true",J4=5e3,I4=2500,zg=5e3,ud=new Map,cd=new Map,Ru={address:!0,filter:!1,turbo:!0,witness:!0,retarget:!1,difficult:!1};function W4(e){if(!e||typeof e!="object"||Array.isArray(e))return Ru;const a=e,i=l=>typeof a[l]=="boolean"?a[l]:Ru[l];return{address:i("address"),filter:i("filter"),turbo:i("turbo"),witness:i("witness"),retarget:i("retarget"),difficult:i("difficult")}}function Di(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const i=e.state;if(!i||typeof i!="object"||Array.isArray(i))return null;const l=i,s=typeof l.count=="number"?l.count:void 0,u=typeof l.size=="number"?l.size:void 0,f=typeof l.weight=="number"?l.weight:void 0;return s===void 0&&u===void 0&&f===void 0?null:{count:s,size:u,weight:f}}function Fl(e){return e?.weight??e?.size}function eR(e,a){return!Number.isFinite(e)||!Number.isFinite(a)||a<=0?null:e/a*4}function Is(e,a){if(!a)return e;const i=typeof a.fee=="number"?a.fee:void 0,l=typeof a.weight=="number"?a.weight:void 0,s=typeof i=="number"&&typeof l=="number"?eR(i,l):e.feeRate;return{...e,wtxid:a.wtxid||e.wtxid,feeSats:typeof a.fee=="number"?a.fee:e.feeSats,feeRate:s,size:typeof a.maximal=="number"?a.maximal:e.size,weight:typeof a.weight=="number"?a.weight:e.weight,sigops:typeof a.confirmed?.sigops=="number"?a.confirmed.sigops:e.sigops,totalInput:typeof a.value=="number"?a.value:e.totalInput,totalOutput:typeof a.spend=="number"?a.spend:e.totalOutput}}async function an(e,a,i){const l=a.startsWith("/")?a:`/${a}`;let s=l.includes("?")?`${e}${l}`:`${e}${l}?format=json`;i&&(s+=s.includes("?")?"&turbo=true":"?turbo=true");const u=cd.get(s);if(u)return u;const f=(async()=>{const h=await fetch(s,{headers:{Accept:"application/json"}});if(!h.ok){const p=await h.text().catch(()=>"");throw new Error(`Request failed ${String(h.status)}: ${p||h.statusText}`)}const m=await h.text();try{return JSON.parse(m)}catch{return m}})();cd.set(s,f);try{return await f}finally{cd.delete(s)}}async function Rt(e,a,i){try{return await an(e,a,i)}catch{return null}}async function zb(e,a){const i=await an(e,"/v1/top?format=json",a),l=typeof i=="number"?i:Number(i);if(!Number.isFinite(l))throw new Error("Invalid top height");return l}function tR(e){return/^[0-9a-f]{64}$/iu.test(e)}function nR(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0?e:typeof e=="string"&&/^\d+$/u.test(e.trim())?Number(e.trim()):null}function Wd(e){const a=nR(e);if(a!==null)return a;if(typeof e=="string"){const s=e.trim();return tR(s)?s:null}if(!e||typeof e!="objec)DELIM" -R"DELIM(t"||Array.isArray(e))return null;const i=e,l=[i.payload,i.top,i.block,i.header,i.hash,i.height];for(const s of l){if(s===e)continue;const u=Wd(s);if(u!==null)return u}return null}function aR(e){return typeof e=="string"?Promise.resolve(e):e instanceof ArrayBuffer?Promise.resolve(new TextDecoder().decode(e)):e instanceof Blob?e.text():Promise.resolve(null)}function rR(e){const a=e.trim();if(!a)return null;try{return Wd(JSON.parse(a))}catch{return Wd(a)}}function iR(e){const a=e.trim();if(!a)return null;const l=/^[a-z][a-z\d+\-.]*:\/\//iu.test(a)?a:`http://${a}`,s=globalThis.window;try{const u=new URL(l,s?.location.href??"http://localhost");if(u.protocol==="http:")u.protocol="ws:";else if(u.protocol==="https:")u.protocol="wss:";else if(u.protocol!=="ws:"&&u.protocol!=="wss:")return null;return u.hash="",u.search="",u.toString()}catch{return null}}async function qr(e,a){const i=Date.now(),l=`${e}|0`,s=ud.get(l);if(s&&s.expiresAt>i)return s.promise;const u=zb(e,a).then(f=>(ud.set(l,{promise:u,value:f,expiresAt:Date.now()+zg}),f));return ud.set(l,{promise:u,value:s?.value??null,expiresAt:i+zg}),u}async function Ws(e,a,i){if(a==="latest"||a==="tip"){const l=await qr(e,i);return{path:`/v1/block/height/${String(l)}`,height:l}}return/^\d+$/u.test(a)?{path:`/v1/block/height/${a}`}:{path:`/v1/block/hash/${a}`}}function lR(e,a){const i=new Map;return(l,s)=>{const u=`${l}:${String(s)}`,f=i.get(u);if(f)return f;const h=an(e,`/v1/output/${l}/${String(s)}?format=json`,a).catch(()=>null);return i.set(u,h),h}}async function Ag(e,a,i,l){return an(e,`${a}/tx/${String(i)}?format=json`,l)}async function Cg(e,a,i){const l=await Rt(e,`/v1/address/${a}/confirmed?format=json`,i);return Array.isArray(l)?l:[]}async function oR(e,a,i){const l=await Rt(e,`/v1/address/${a}?format=json`,i);return Array.isArray(l)?l:[]}const Ng=25,sR=8,uR=3e4;function cR(e){if(e===void 0)return 0;const a=Number(e);return Number.isInteger(a)&&a>0?a:0}async function fR(e,a,i){const l=await Rt(e,`/v1/output/${a}/${String(i)}/spender?format=json`);return l&&typeof l.hash=="string"?l:null}async function dR(e,a,i){const l=new Array(e.length);let s=0;async function u(){for(;su())),l}async function hR(e,a,i){const l=await dR(a,sR,u=>fR(e,u.point.hash,u.point.index)),s=[];for(const[u,f]of a.entries()){const{hash:h,index:m}=f.point,p=l[u];s.push({id:`in:${h}:${String(m)}`,txid:h,outputIndex:m,valueChange:f.value,direction:"received",spent:p!==null,...i!==null?{cursor:i}:{}}),p&&s.push({id:`out:${h}:${String(m)}`,txid:p.hash,valueChange:-f.value,direction:"sent",...i!==null?{cursor:i}:{}})}return s}function Og(e,a){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()){const l=Number(e);if(Number.isFinite(l))return l}let i=0;for(const l of a)i+=l.value;return i}function fd({baseUrl:e,pollIntervalMs:a=15e3,turbo:i=!1}){const l=new Set,s=new Set;let u=null,f=null,h=null,m=null,p=!1,b=!1,v="idle",x=null,w=null;const T=So(xo());let E=null,k=null;const L=iR(e),Q=!!(L&&globalThis.WebSocket),G=new Map;async function ae(C,U){const q=Date.now(),W=G.get(C);if(W&&W.expiresAt>q)return W.outputs;const ne=await oR(e,C,U);return G.set(C,{outputs:ne,expiresAt:q+uR}),ne}async function ee(C,U,q){const W=await ae(C,U),ne=cR(q),K=W.slice(ne,ne+Ng),pe=ne+Ng,ye=pe{const U=W4(C);return E=U,U}).catch(C=>(console.warn("Libbitcoin configuration fetch failed",C),E=Ru,Ru)),k)}function te(C){return C.address}function O(C){return te(C)&&C.turbo}function ue(){return{transport:v,websocketAvailable:Q&&!p}}function fe(C){if(v===C)return;v=C;const U=ue();for(const q of s)q(U)}async function Ee(C){const U=typeof C=="number"?`/v1/block/height/${String(C)}`:`/v1/block/hash/${C}`,[q,W]=await Promise.all([an(e,`${U}/header?format=json`),Rt(e,`${U}/header/context?format=json`)]);if(w===q.hash||x!==null&&q.heightx&&await Ee(C)}catch(C){console.warn("Libbitcoin poller failed",C)}}function Te(){u||l.size===0||(u=setInterval(()=>{de()},a),fe("polling"))}function Ce(){u&&(clearInterval(u),u=null)}function Y(){h&&(clearTimeout(h),h=null)}function j(){m&&(clearTimeout(m),m=null)}function F(C){if(Y(),!!f){b=!0;try{C&&f.readyState===1&&f.send(X4),f.close()}catch{}finally{f=null}}}function se(){if(j(),f)return!0;if(!Q||!L||p||l.size===0)return!1;try{b=!1,f=new WebSocket(L),fe("connecting")}catch(U){return console.warn("Libbitcoin websocket unavailable, falling back to polling",U),p=!0,!1}const C=f;return h=setTimeout(()=>{f===C&&(p=!0,F(!1),Te())},J4),C.addEventListener("open",()=>{if(f===C){Y();tr)DELIM" -R"DELIM(y{C.send(V4),Ce(),fe("websocket")}catch(U){console.warn("Libbitcoin websocket subscribe failed, falling back to polling",U),p=!0,F(!1),Te()}}}),C.addEventListener("message",U=>{(async()=>{try{const q=await aR(U.data);if(q===null)return;const W=rR(q);if(W===null)return;await Ee(W)}catch(q){console.warn("Libbitcoin websocket event handling failed",q)}})()}),C.addEventListener("error",U=>{b||f!==C||(console.warn("Libbitcoin websocket failed, falling back to polling",U),p=!0,F(!1),Te())}),C.addEventListener("close",()=>{if(Y(),f===C&&(f=null),b){b=!1;return}l.size!==0&&(p=!0,Te())}),!0}function le(){se()||Te()}function ie(){j(),Ce(),F(!0),fe("idle")}function R(){l.size>0||m||(m=setTimeout(()=>{m=null,l.size===0&&ie()},I4))}return{metadata:{id:"libbitcoin",label:"Server",type:"local",connectionState:"connected",supportsWebsocket:Q,endpoint:e,description:"Adapter for the libbitcoin embedded REST API."},getConfiguration(){return me()},async getLatestBlocks(C=10){const U=await qr(e);x=U;const q=Array.from({length:C},(K,pe)=>U-pe).filter(K=>K>=0),[W,ne]=await Promise.all([Promise.all(q.map(K=>an(e,`/v1/block/height/${String(K)}/header?format=json`))),Promise.all(q.map(K=>Rt(e,`/v1/block/height/${String(K)}/header/context?format=json`)))]);return W.map((K,pe)=>{const ye=Di(ne[pe]),Ie=Yl(K,ye?.count);return pe===0&&(w=K.hash),{...Ie,size:Fl(ye)}})},async getBlocksBefore(C,U=10){const q=Array.from({length:U},(K,pe)=>C-pe).filter(K=>K>=0),[W,ne]=await Promise.all([Promise.all(q.map(K=>an(e,`/v1/block/height/${String(K)}/header?format=json`))),Promise.all(q.map(K=>Rt(e,`/v1/block/height/${String(K)}/header/context?format=json`)))]);return W.map((K,pe)=>{const ye=Di(ne[pe]);return{...Yl(K,ye?.count),size:Fl(ye)}})},async getBlockHeader(C){const{path:U,height:q}=await Ws(e,C),W=q===void 0?qr(e):Promise.resolve(q),[ne,K,pe]=await Promise.all([an(e,`${U}/header?format=json`),W,Rt(e,`${U}/header/context?format=json`)]);x=Math.max(x??0,K);let ye=null;ne.heightca),Pe=(await Promise.all(Xe.map(Ut=>Ag(e,U,Ut).catch(()=>null)))).filter(Ut=>Ut!==null),_n=await Promise.all(Pe.map(Ut=>Rt(e,`/v1/tx/${Ut.hash}/details?format=json`))),ua=Pe.map((Ut,ca)=>{const Sr=_n[ca],Ii=Xs(Ut,[],T,{blockHeight:ne.height,blockHash:ne.hash,tipHeight:K,timestamp:ne.timestamp},typeof Sr?.fee=="number"?Sr.fee:void 0);return Is(Ii,Sr)});return{...it,size:ye?.maximal??Fl(ut),weight:ye?.weight,merkleRoot:ne.merkle_root,nonce:ne.nonce,bits:ne.bits,version:ne.version,nextBlockHash:Ie,feesSats:ye?.fees,subsidySats:ye?.subsidy,sigops:ye?.sigops,transactions:ua}},async getBlockTransactions(C,U=0){const{path:q}=await Ws(e,C),[W,ne,K]=await Promise.all([an(e,`${q}/header?format=json`),qr(e),Rt(e,`${q}/header/context?format=json`)]);x=Math.max(x??0,ne);const pe=Di(K)?.count;if(typeof pe=="number"&&U>=pe)return[];const ye=typeof pe=="number"?Math.min(U+Js,pe):U+Js,Ie=Array.from({length:Math.max(0,ye-U)},(Ne,Xe)=>U+Xe),gt=(await Promise.all(Ie.map(Ne=>Ag(e,q,Ne).catch(()=>null)))).filter(Ne=>Ne!==null);if(gt.length===0)return[];const it=await Promise.all(gt.map(Ne=>Rt(e,`/v1/tx/${Ne.hash}/details?format=json`)));return gt.map((Ne,Xe)=>{const Be=it[Xe],Pe=Xs(Ne,[],T,{blockHeight:W.height,blockHash:W.hash,tipHeight:ne,timestamp:W.timestamp},typeof Be?.fee=="number"?Be.fee:void 0);return Is(Pe,Be)})},async getTransaction(C){const U=await an(e,`/v1/tx/${C}?format=json`),q=lR(e),W=Promise.all(U.inputs.map(ut=>/^0{64}$/u.test(ut.point.hash)?Promise.resolve(null):q(ut.point.hash,ut.point.index))),[ne,K,pe,ye]=await Promise.all([Rt(e,`/v1/tx/${C}/header?format=json`),qr(e).catch(()=>null),Rt(e,`/v1/tx/${C}/details?format=json`),W]);typeof K=="number"&&(x=Math.max(x??0,K));const Ie=Xs(U,ye,T,{blockHeight:ne?.height,blockHash:ne?.hash,tipHeight:typeof K=="number"?K:void 0,timestamp:ne?.timestamp},typeof pe?.fee=="number"?pe.fee:void 0);return Is(Ie,pe)},async getTransactionHeader(C){const U=await an(e,`/v1/tx/${C}?format=json`),[q,W,ne]=await Promise.all([Rt(e,`/v1/tx/${C}/header?format=json`),qr(e).catch(()=>null),Rt(e,`/v1/tx/${C}/details?fo)DELIM" -R"DELIM(rmat=json`)]);typeof W=="number"&&(x=Math.max(x??0,W));const K=Xs(U,[],T,{blockHeight:q?.height,blockHash:q?.hash,tipHeight:typeof W=="number"?W:void 0,timestamp:q?.timestamp},typeof ne?.fee=="number"?ne.fee:void 0);return Is(K,ne)},async getTransactionInputScriptHex(C,U){return(await an(e,`/v1/input/${C}/${String(U)}/script?format=text`)).trim()},async getTransactionOutputScriptHex(C,U){return(await an(e,`/v1/output/${C}/${String(U)}/script?format=text`)).trim()},async getAddress(C){const U=gr(C,T);if(!U)throw new Error("Unsupported address format for libbitcoin adapter");const q=E??await me();if(!te(q))throw new Error("Address endpoints are disabled by server configuration");const W=i&&O(q),[ne,K]=await Promise.all([Rt(e,`/v1/address/${U.hash}/balance?format=json`,W),Cg(e,U.hash,W)]),pe=Og(ne,K),ye=await ee(U.hash,W);return{address:C,addressType:U.type,balance:pe,totalReceived:void 0,totalSent:void 0,txCount:void 0,utxoCount:K.length,transactions:ye}},async getAddressSummary(C){const U=gr(C,T);if(!U)throw new Error("Unsupported address format for libbitcoin adapter");const q=E??await me();if(!te(q))throw new Error("Address endpoints are disabled by server configuration");const W=i&&O(q),[ne,K]=await Promise.all([Rt(e,`/v1/address/${U.hash}/balance?format=json`,W),Cg(e,U.hash,W)]),pe=Og(ne,K);return{address:C,addressType:U.type,balance:pe,totalReceived:void 0,totalSent:void 0,txCount:void 0,utxoCount:K.length}},async getAddressTransactions(C,U){const q=gr(C,T);if(!q)return[];const W=E??await me();if(!te(W))return[];const ne=i&&O(W);return ee(q.hash,ne,U)},subscribeToEvents(C){return j(),l.add(C),le(),()=>{l.delete(C),R()}},getEventStatus:ue,subscribeToEventStatus(C){return s.add(C),C(ue()),()=>{s.delete(C)}}}}const Ab=_.createContext(null),Cb=_.createContext(null),Nb=_.createContext(null);function mR({children:e,client:a}){return g.jsx(Ab.Provider,{value:a,children:e})}function pR({children:e,provider:a,setProvider:i,availableProviders:l}){return g.jsx(Cb.Provider,{value:{provider:a,setProvider:i,availableProviders:l},children:e})}function yR({children:e,turbo:a,setTurbo:i}){return g.jsx(Nb.Provider,{value:{turbo:a,setTurbo:i},children:e})}function Da(){const e=_.useContext(Ab);if(!e)throw new Error("BlockchainClientProvider missing in component tree");return e}function wo(){return Da().metadata}function Ob(){const e=_.useContext(Cb);if(!e)throw new Error("ProviderSwitcherProvider missing in component tree");return e}function jb(){const e=_.useContext(Nb);if(!e)throw new Error("TurboProvider missing in component tree");return e}function dd(){const e=globalThis.window;return e?.location.origin?e.location.origin:"http://localhost:8080"}function vR(e,a){if(e==="blockstream")return yb({baseUrl:"https://blockstream.info/api"});if(e==="mempool")return w4({baseUrl:"https://mempool.space/api"});if(e==="libbitcoin"){const l=dd();return fd({baseUrl:l,turbo:a?.turboEnabled})}if(e==="external"){console.warn("No external API URL provided, falling back to libbitcoin provider");const l=dd();return fd({baseUrl:l,turbo:a?.turboEnabled})}console.warn(`Unknown provider "${e}", falling back to libbitcoin provider`);const i=dd();return fd({baseUrl:i,turbo:a?.turboEnabled})}function gR(){return[...new Set(["libbitcoin","blockstream","mempool"])]}const hd=10,bR=20;function Mb(e){return e.metadata.endpoint?{providerId:e.metadata.id,endpoint:e.metadata.endpoint}:{providerId:e.metadata.id}}function xR(e,a){if(!e||typeof e!="object"||Array.isArray(e))return!1;const i=e;return i.providerId===a.providerId&&i.endpoint===a.endpoint}function SR(e,a){if(!e||typeof e!="object"||Array.isArray(e))return a;const i=e.limit;return typeof i=="number"&&Number.isFinite(i)&&i>0?i:a}function wR(e,a,i){const l=e.getQueryCache().findAll({predicate:s=>{const u=s.queryKey;return u.length>=4&&xR(u[0],a)&&u[1]==="blocks"&&u[2]==="latest"}});for(const s of l){const u=SR(s.queryKey[3],hd);e.setQueryData(s.queryKey,f=>[i,...(f??[]).filter(p=>p.hash!==i.hash)].slice(0,u))}e.setQueryData([a,"blocks","latest",{limit:hd}],s=>[i,...(s??[]).filter(h=>h.hash!==i.hash)].slice(0,hd))}function ER(e,a,i){e.setQueryData([a,"transactions","recent"],l=>[i,...(l??[]).filter(f=>f.txid!==i.txid)].slice(0,bR))}function _R(e,a,i){i.type==="block.new"&&wR(e,a,i.payload),i.type==="tx.new"&&ER(e,a,i.payload)}function $n({queryKey:e,queryFn:a,enabled:i,staleTime:l,initialData:s}){const u=Da();return Lw({queryKey:[Mb(u),...e],queryFn:()=>a(u),enabled:i,staleTime:l,initialData:s})}function kb(e=10){return $n({queryKey:["blocks","latest",{limit:e}],queryFn:a=>a.getLatestBlocks(e)})}function Db(){return $n({queryKey:["configuration"],queryFn:e=>e.getConfiguration(),staleTime:6e4})}function Lb(e){return $n({queryKey:["block",e,"header"],queryFn:a=>a.getBlockHeader(e)})}function Bb(e,a){return $n({queryKey:["block",e,"stats"],queryFn:i=>i.getBlockStats(e),enabled:(a?.enabled??!0)&&!!e.trim(),staleTime:1/0})}function TR(e,a=0){return $n({queryKey:["block",e,"transactions",{startIndex:a}])DELIM" -R"DELIM(,queryFn:i=>i.getBlockTransactions(e,a)})}function RR(e){return $n({queryKey:["transaction",e,"header"],queryFn:a=>a.getTransactionHeader(e),enabled:!!e.trim()})}function zR(e,a){return $n({queryKey:["transaction",e],queryFn:i=>i.getTransaction(e),enabled:a?.enabled??!!e.trim()})}function AR(e,a,i){return $n({queryKey:["transaction",e,"input",a,"scriptHex"],queryFn:l=>l.getTransactionInputScriptHex(e,a),enabled:(i?.enabled??!0)&&!!e.trim()})}function CR(e,a,i){return $n({queryKey:["transaction",e,"output",a,"scriptHex"],queryFn:l=>l.getTransactionOutputScriptHex(e,a),enabled:(i?.enabled??!0)&&!!e.trim()})}function NR(e){return $n({queryKey:["address",e,"summary"],queryFn:a=>a.getAddressSummary(e),enabled:!!e.trim()})}function OR(e,a){return $n({queryKey:["address",e,"transactions",{lastSeenTxid:null}],queryFn:i=>i.getAddressTransactions(e,a),enabled:!!e.trim()})}function jR(e){const a=Da(),i=_.useRef(e);_.useEffect(()=>{i.current=e},[e]),_.useEffect(()=>{const l=a.subscribeToEvents(s=>{i.current(s)});return()=>{l()}},[a])}function MR(){const e=Da(),a=_.useMemo(()=>({transport:e.metadata.supportsWebsocket?"websocket":"polling",websocketAvailable:e.metadata.supportsWebsocket}),[e.metadata.supportsWebsocket]),[i,l]=_.useState(()=>e.getEventStatus?e.getEventStatus():a);return _.useEffect(()=>{const s=e.getEventStatus?e.getEventStatus():a;return l(s),e.subscribeToEventStatus?.(l)},[e,a]),i}function kR(){const e=Da(),a=_.useMemo(()=>Mb(e),[e]),i=Ou(),l=_.useCallback(s=>{_R(i,a,s)},[i,a]);return jR(l),null}function DR(e=10){const{data:a,...i}=kb(e),{data:l=[]}=$n({queryKey:["transactions","recent"],queryFn:()=>Promise.resolve([]),enabled:!1,initialData:[]});return{data:a,recentTransactions:l,...i}}function LR({children:e}){const a="libbitcoin",i=gR(),l=(()=>{const v=globalThis.window;return v?v.localStorage.getItem("turboEnabled")==="true":!1})(),s=(()=>{const v=globalThis.window;if(!v)return a;const x=v.localStorage.getItem("blockchainProvider");return x&&i.includes(x)?x:a})(),[u,f]=_.useState(l),[h,m]=_.useState(s),[p]=_.useState(()=>new Ew({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1,retry:1}}})),b=_.useMemo(()=>vR(h,{turboEnabled:u}),[h,u]);return _.useEffect(()=>{const v=globalThis.window;v&&v.localStorage.setItem("turboEnabled",u?"true":"false")},[u]),_.useEffect(()=>{const v=globalThis.window;v&&v.localStorage.setItem("blockchainProvider",h)},[h]),g.jsx(pR,{provider:h,setProvider:m,availableProviders:i,children:g.jsx(yR,{turbo:u,setTurbo:f,children:g.jsx(mR,{client:b,children:g.jsxs(_w,{client:p,children:[g.jsx(kR,{}),e,null]})})})})}var Ub=e=>{throw TypeError(e)},BR=(e,a,i)=>a.has(e)||Ub("Cannot "+i),md=(e,a,i)=>(BR(e,a,"read from private field"),i?i.call(e):a.get(e)),UR=(e,a,i)=>a.has(e)?Ub("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(e):a.set(e,i),jg="popstate";function Mg(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function HR(e={}){function a(l,s){let u=s.state?.masked,{pathname:f,search:h,hash:m}=u||l.location;return fo("",{pathname:f,search:h,hash:m},s.state&&s.state.usr||null,s.state&&s.state.key||"default",u?{pathname:l.location.pathname,search:l.location.search,hash:l.location.hash}:void 0)}function i(l,s){return typeof s=="string"?s:la(s)}return ZR(a,i,null,e)}function Me(e,a){if(e===!1||e===null||typeof e>"u")throw new Error(a)}function wt(e,a){if(!e){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function $R(){return Math.random().toString(36).substring(2,10)}function kg(e,a){return{usr:e.state,key:e.key,idx:a,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function fo(e,a,i=null,l,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof a=="string"?oa(a):a,state:i,key:a&&a.key||l||$R(),unstable_mask:s}}function la({pathname:e="/",search:a="",hash:i=""}){return a&&a!=="?"&&(e+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function oa(e){let a={};if(e){let i=e.indexOf("#");i>=0&&(a.hash=e.substring(i),e=e.substring(0,i));let l=e.indexOf("?");l>=0&&(a.search=e.substring(l),e=e.substring(0,l)),e&&(a.pathname=e)}return a}function ZR(e,a,i,l={}){let{window:s=document.defaultView,v5Compat:u=!1}=l,f=s.history,h="POP",m=null,p=b();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function b(){return(f.state||{idx:null}).idx}function v(){h="POP";let k=b(),L=k==null?null:k-p;p=k,m&&m({action:h,location:E.location,delta:L})}function x(k,L){h="PUSH";let Q=Mg(k)?k:fo(E.location,k,L);p=b()+1;let G=kg(Q,p),ae=E.createHref(Q.unstable_mask||Q);try{f.pushState(G,"",ae)}catch(ee){if(ee instanceof DOMException&&ee.name==="DataCloneError")throw ee;s.location.assign(ae)}u&&m&&m({action:h,location:E.location,delta:1})}function w(k,L){h="REPLACE";let Q=Mg(k)?k:fo(E.location,k,L);p=b();let G=kg(Q,p),ae=E.createHref(Q.unstable_mask||Q);f.replaceState(G,"",ae),u&&m&&m({action:h,location:E.location,delta:0})DELIM" -R"DELIM()}function T(k){return Hb(k)}let E={get action(){return h},get location(){return e(s,f)},listen(k){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(jg,v),m=k,()=>{s.removeEventListener(jg,v),m=null}},createHref(k){return a(s,k)},createURL:T,encodeLocation(k){let L=T(k);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:x,replace:w,go(k){return f.go(k)}};return E}function Hb(e,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Me(i,"No window.location.(origin|href) available to create URL");let l=typeof e=="string"?e:la(e);return l=l.replace(/ $/,"%20"),!a&&l.startsWith("//")&&(l=i+l),new URL(l,i)}var Wl,Dg=class{constructor(e){if(UR(this,Wl,new Map),e)for(let[a,i]of e)this.set(a,i)}get(e){if(md(this,Wl).has(e))return md(this,Wl).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,a){md(this,Wl).set(e,a)}};Wl=new WeakMap;var qR=new Set(["lazy","caseSensitive","path","id","index","children"]);function PR(e){return qR.has(e)}var QR=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function GR(e){return QR.has(e)}function YR(e){return e.index===!0}function ho(e,a,i=[],l={},s=!1){return e.map((u,f)=>{let h=[...i,String(f)],m=typeof u.id=="string"?u.id:h.join("-");if(Me(u.index!==!0||!u.children,"Cannot specify children on an index route"),Me(s||!l[m],`Found a route id collision on id "${m}". Route id's must be globally unique within Data Router usages`),YR(u)){let p={...u,id:m};return l[m]=Lg(p,a(p)),p}else{let p={...u,id:m,children:void 0};return l[m]=Lg(p,a(p)),u.children&&(p.children=ho(u.children,a,h,l,s)),p}})}function Lg(e,a){return Object.assign(e,{...a,...typeof a.lazy=="object"&&a.lazy!=null?{lazy:{...e.lazy,...a.lazy}}:{}})}function mr(e,a,i="/"){return eo(e,a,i,!1)}function eo(e,a,i,l){let s=typeof a=="string"?oa(a):a,u=Un(s.pathname||"/",i);if(u==null)return null;let f=$b(e);KR(f);let h=null;for(let m=0;h==null&&m{let b={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(l)&&m)return;Me(b.relativePath.startsWith(l),`Absolute route path "${b.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(l.length)}let v=Bn([l,b.relativePath]),x=i.concat(b);f.children&&f.children.length>0&&(Me(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),$b(f.children,a,x,v,m)),!(f.path==null&&!f.index)&&a.push({path:v,score:tz(v,f.index),routesMeta:x})};return e.forEach((f,h)=>{if(f.path===""||!f.path?.includes("?"))u(f,h);else for(let m of Zb(f.path))u(f,h,!0,m)}),a}function Zb(e){let a=e.split("/");if(a.length===0)return[];let[i,...l]=a,s=i.endsWith("?"),u=i.replace(/\?$/,"");if(l.length===0)return s?[u,""]:[u];let f=Zb(l.join("/")),h=[];return h.push(...f.map(m=>m===""?u:[u,m].join("/"))),s&&h.push(...f),h.map(m=>e.startsWith("/")&&m===""?"/":m)}function KR(e){e.sort((a,i)=>a.score!==i.score?i.score-a.score:nz(a.routesMeta.map(l=>l.childrenIndex),i.routesMeta.map(l=>l.childrenIndex)))}var VR=/^:[\w-]+$/,XR=3,JR=2,IR=1,WR=10,ez=-2,Bg=e=>e==="*";function tz(e,a){let i=e.split("/"),l=i.length;return i.some(Bg)&&(l+=ez),a&&(l+=JR),i.filter(s=>!Bg(s)).reduce((s,u)=>s+(VR.test(u)?XR:u===""?IR:WR),l)}function nz(e,a){return e.length===a.length&&e.slice(0,-1).every((l,s)=>l===a[s])?e[e.length-1]-a[a.length-1]:0}function az(e,a,i=!1){let{routesMeta:l}=e,s={},u="/",f=[];for(let h=0;h{if(b==="*"){let T=h[x]||"";f=u.slice(0,u.length-T.length).replace(/(.)\/+$/,"$1")}const w=h[x];return v&&!w?p[b]=void 0:p[b]=(w||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:f,pattern:e}}function rz(e,a=!1,i=!0){wt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as)DELIM" -R"DELIM( if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let l=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,m,p,b)=>{if(l.push({paramName:h,isOptional:m!=null}),m){let v=b.charAt(p+f.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(l.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,a?void 0:"i"),l]}function iz(e){try{return e.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return wt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),e}}function Un(e,a){if(a==="/")return e;if(!e.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,l=e.charAt(i);return l&&l!=="/"?null:e.slice(i)||"/"}function lz({basename:e,pathname:a}){return a==="/"?e:Bn([e,a])}var qb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_h=e=>qb.test(e);function oz(e,a="/"){let{pathname:i,search:l="",hash:s=""}=typeof e=="string"?oa(e):e,u;return i?(i=Th(i),i.startsWith("/")?u=Ug(i.substring(1),"/"):u=Ug(i,a)):u=a,{pathname:u,search:uz(l),hash:cz(s)}}function Ug(e,a){let i=Au(a).split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function pd(e,a,i,l){return`Cannot include a '${e}' character in a manually specified \`to.${a}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Pb(e){return e.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Lu(e){let a=Pb(e);return a.map((i,l)=>l===a.length-1?i.pathname:i.pathnameBase)}function Eo(e,a,i,l=!1){let s;typeof e=="string"?s=oa(e):(s={...e},Me(!s.pathname||!s.pathname.includes("?"),pd("?","pathname","search",s)),Me(!s.pathname||!s.pathname.includes("#"),pd("#","pathname","hash",s)),Me(!s.search||!s.search.includes("#"),pd("#","search","hash",s)));let u=e===""||s.pathname==="",f=u?"/":s.pathname,h;if(f==null)h=i;else{let v=a.length-1;if(!l&&f.startsWith("..")){let x=f.split("/");for(;x[0]==="..";)x.shift(),v-=1;s.pathname=x.join("/")}h=v>=0?a[v]:"/"}let m=oz(s,h),p=f&&f!=="/"&&f.endsWith("/"),b=(u||f===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(p||b)&&(m.pathname+="/"),m}var Th=e=>e.replace(/\/\/+/g,"/"),Bn=e=>Th(e.join("/")),Au=e=>e.replace(/\/+$/,""),sz=e=>Au(e).replace(/^\/*/,"/"),uz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,_o=class{constructor(e,a,i,l=!1){this.status=e,this.statusText=a||"",this.internal=l,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function mo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function To(e){let a=e.map(i=>i.route.path).filter(Boolean);return Bn(a)||"/"}var Qb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gb(e,a){let i=e;if(typeof i!="string"||!qb.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let l=i,s=!1;if(Qb)try{let u=new URL(window.location.href),f=i.startsWith("//")?new URL(u.protocol+i):new URL(i),h=Un(f.pathname,a);f.origin===u.origin&&h!=null?i=h+f.search+f.hash:s=!0}catch{wt(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:s,to:i}}var yr=Symbol("Uninstrumented");function fz(e,a){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:a.id,index:a.index,path:a.path,instrument(u){let f=Object.keys(i);for(let h of f)u[h]&&i[h].push(u[h])}}));let l={};if(typeof a.lazy=="function"&&i.lazy.length>0){let s=qi(i.lazy,a.lazy,()=>{});s&&(l.lazy=s)}if(typeof a.lazy=="object"){let s=a.lazy;["middleware","loader","action"].forEach(u=>{let f=s[u],h=i[`lazy.${u}`];if(typeof f=="function"&&h.length>0){let m=qi(h,f,()=>{});m&&(l.lazy=Object.assign(l.lazy||{},{[u]:m}))}})}return["loader","action"].forEach(s=>{let u=a[s];if(typeof u=="function"&&i[s].length>0){let f=u[yr]??u,h=qi(i[s],f,(...m)=>Hg(m[0]));h&&(s==="loader"&&f.hydrate===!0&&(h.hydrate=!0),h[yr]=f,l[s]=h)}}),a.middleware&&a.middleware.length>0&&i.middleware.length>0&&(l.middleware=a.middleware.map(s=>{let u=s[yr]??s,f=qi(i.middleware,u,(...h)=>Hg(h[0]));return f?(f[yr]=u,f):s})),l}function dz(e,a){let i={navigate:[],fetch:[]};if(a.forEach(l=>l({instrument(s){let u=Object.keys(s);for(let f of u)s[f]&&i[f].push(s[f])}})),i.navigate.length>0){let l=e.naviga)DELIM" -R"DELIM(te[yr]??e.navigate,s=qi(i.navigate,l,(...u)=>{let[f,h]=u;return{to:typeof f=="number"||typeof f=="string"?f:f?la(f):".",...$g(e,h??{})}});s&&(s[yr]=l,e.navigate=s)}if(i.fetch.length>0){let l=e.fetch[yr]??e.fetch,s=qi(i.fetch,l,(...u)=>{let[f,,h,m]=u;return{href:h??".",fetcherKey:f,...$g(e,m??{})}});s&&(s[yr]=l,e.fetch=s)}return e}function qi(e,a,i){return e.length===0?null:async(...l)=>{let s=await Yb(e,i(...l),()=>a(...l),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function Yb(e,a,i,l){let s=e[l],u;if(s){let f,h=async()=>(f?console.error("You cannot call instrumented handlers more than once"):f=Yb(e,a,i,l-1),u=await f,Me(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await s(h,a)}catch(m){console.error("An instrumentation function threw an error:",m)}f||await h(),await f}else try{u={type:"success",value:await i()}}catch(f){u={type:"error",value:f}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Hg(e){let{request:a,context:i,params:l,unstable_pattern:s}=e;return{request:hz(a),params:{...l},unstable_pattern:s,context:mz(i)}}function $g(e,a){return{currentUrl:la(e.state.location),..."formMethod"in a?{formMethod:a.formMethod}:{},..."formEncType"in a?{formEncType:a.formEncType}:{},..."formData"in a?{formData:a.formData}:{},..."body"in a?{body:a.body}:{}}}function hz(e){return{method:e.method,url:e.url,headers:{get:(...a)=>e.headers.get(...a)}}}function mz(e){if(yz(e)){let a={...e};return Object.freeze(a),a}else return{get:a=>e.get(a)}}var pz=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function yz(e){if(e===null||typeof e!="object")return!1;const a=Object.getPrototypeOf(e);return a===Object.prototype||a===null||Object.getOwnPropertyNames(a).sort().join("\0")===pz}var Fb=["POST","PUT","PATCH","DELETE"],vz=new Set(Fb),gz=["GET",...Fb],bz=new Set(gz),Kb=new Set([301,302,303,307,308]),xz=new Set([307,308]),yd={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Sz={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Kl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},wz=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Vb="remix-router-transitions",Xb=Symbol("ResetLoaderData");function Ez(e){const a=e.window?e.window:typeof window<"u"?window:void 0,i=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";Me(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=e.hydrationRouteProperties||[],s=e.mapRouteProperties||wz,u=s;if(e.unstable_instrumentations){let A=e.unstable_instrumentations;u=M=>({...s(M),...fz(A.map($=>$.route).filter(Boolean),M)})}let f={},h=ho(e.routes,u,void 0,f),m,p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let b=e.dataStrategy||Az,v={unstable_passThroughRequests:!1,...e.future},x=null,w=new Set,T=null,E=null,k=null,L=e.hydrationData!=null,Q=mr(h,e.history.location,p),G=!1,ae=null,ee,me;if(Q==null&&!e.patchRoutesOnNavigation){let A=Dn(404,{pathname:e.history.location.pathname}),{matches:M,route:$}=eu(h);ee=!0,me=!ee,Q=M,ae={[$.id]:A}}else if(Q&&!e.hydrationData&&Ha(Q,h,e.history.location.pathname).active&&(Q=null),Q)if(Q.some(A=>A.route.lazy))ee=!1,me=!ee;else if(!Q.some(A=>Rh(A.route)))ee=!0,me=!ee;else{let A=e.hydrationData?e.hydrationData.loaderData:null,M=e.hydrationData?e.hydrationData.errors:null,$=Q;if(M){let re=Q.findIndex(oe=>M[oe.route.id]!==void 0);$=$.slice(0,re+1)}me=!1,ee=!0,$.forEach(re=>{let oe=Jb(re.route,A,M);me=me||oe.renderFallback,ee=ee&&!oe.shouldLoad})}else{ee=!1,me=!ee,Q=[];let A=Ha(null,h,e.history.location.pathname);A.active&&A.matches&&(G=!0,Q=A.matches)}let te,O={historyAction:e.history.action,location:e.history.location,matches:Q,initialized:ee,renderFallback:me,navigation:yd,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||ae,fetchers:new Map,blockers:new Map},ue="POP",fe=null,Ee=!1,de,Te=!1,Ce=new Map,Y=null,j=!1,F=!1,se=new Set,le=new Map,ie=0,R=-1,C=new Map,U=new Set,q=new Map,W=new Map,ne=new Set,K=new Map,pe,ye=null;function Ie(){if(x=e.history.listen(({action:A,location:M,delta:$})=>{if(pe){pe(),pe=void 0;return}wt(K.size===0||$!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let re=Er({currentLocation:O.location,nextLocation:M)DELIM" -R"DELIM(,historyAction:A});if(re&&$!=null){let oe=new Promise(be=>{pe=be});e.history.go($*-1),ha(re,{state:"blocked",location:M,proceed(){ha(re,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),oe.then(()=>e.history.go($))},reset(){let be=new Map(O.blockers);be.set(re,Kl),it({blockers:be})}}),fe?.resolve(),fe=null;return}return Pe(A,M)}),i){Yz(a,Ce);let A=()=>Fz(a,Ce);a.addEventListener("pagehide",A),Y=()=>a.removeEventListener("pagehide",A)}return O.initialized||Pe("POP",O.location,{initialHydration:!0}),te}function ut(){x&&x(),Y&&Y(),w.clear(),de&&de.abort(),O.fetchers.forEach((A,M)=>da(M)),O.blockers.forEach((A,M)=>wr(M))}function gt(A){return w.add(A),()=>w.delete(A)}function it(A,M={}){A.matches&&(A.matches=A.matches.map(oe=>{let be=f[oe.route.id],ce=oe.route;return ce.element!==be.element||ce.errorElement!==be.errorElement||ce.hydrateFallbackElement!==be.hydrateFallbackElement?{...oe,route:be}:oe})),O={...O,...A};let $=[],re=[];O.fetchers.forEach((oe,be)=>{oe.state==="idle"&&(ne.has(be)?$.push(be):re.push(be))}),ne.forEach(oe=>{!O.fetchers.has(oe)&&!le.has(oe)&&$.push(oe)}),[...w].forEach(oe=>oe(O,{deletedFetchers:$,newErrors:A.errors??null,viewTransitionOpts:M.viewTransitionOpts,flushSync:M.flushSync===!0})),$.forEach(oe=>da(oe)),re.forEach(oe=>O.fetchers.delete(oe))}function Ne(A,M,{flushSync:$}={}){let re=O.actionData!=null&&O.navigation.formMethod!=null&&It(O.navigation.formMethod)&&O.navigation.state==="loading"&&A.state?._isRedirect!==!0,oe;M.actionData?Object.keys(M.actionData).length>0?oe=M.actionData:oe=null:re?oe=O.actionData:oe=null;let be=M.loaderData?Jg(O.loaderData,M.loaderData,M.matches||[],M.errors):O.loaderData,ce=O.blockers;ce.size>0&&(ce=new Map(ce),ce.forEach((Re,we)=>ce.set(we,Kl)));let he=j?!1:el(A,M.matches||O.matches),xe=Ee===!0||O.navigation.formMethod!=null&&It(O.navigation.formMethod)&&A.state?._isRedirect!==!0;m&&(h=m,m=void 0),j||ue==="POP"||(ue==="PUSH"?e.history.push(A,A.state):ue==="REPLACE"&&e.history.replace(A,A.state));let ve;if(ue==="POP"){let Re=Ce.get(O.location.pathname);Re&&Re.has(A.pathname)?ve={currentLocation:O.location,nextLocation:A}:Ce.has(A.pathname)&&(ve={currentLocation:A,nextLocation:O.location})}else if(Te){let Re=Ce.get(O.location.pathname);Re?Re.add(A.pathname):(Re=new Set([A.pathname]),Ce.set(O.location.pathname,Re)),ve={currentLocation:O.location,nextLocation:A}}it({...M,actionData:oe,loaderData:be,historyAction:ue,location:A,initialized:!0,renderFallback:!1,navigation:yd,revalidation:"idle",restoreScrollPosition:he,preventScrollReset:xe,blockers:ce},{viewTransitionOpts:ve,flushSync:$===!0}),ue="POP",Ee=!1,Te=!1,j=!1,F=!1,fe?.resolve(),fe=null,ye?.resolve(),ye=null}async function Xe(A,M){if(fe?.resolve(),fe=null,typeof A=="number"){fe||(fe=t0());let lt=fe.promise;return e.history.go(A),lt}let $=eh(O.location,O.matches,p,A,M?.fromRouteId,M?.relative),{path:re,submission:oe,error:be}=Zg(!1,$,M),ce;M?.unstable_mask&&(ce={pathname:"",search:"",hash:"",...typeof M.unstable_mask=="string"?oa(M.unstable_mask):{...O.location.unstable_mask,...M.unstable_mask}});let he=O.location,xe=fo(he,re,M&&M.state,void 0,ce);xe={...xe,...e.history.encodeLocation(xe)};let ve=M&&M.replace!=null?M.replace:void 0,Re="PUSH";ve===!0?Re="REPLACE":ve===!1||oe!=null&&It(oe.formMethod)&&oe.formAction===O.location.pathname+O.location.search&&(Re="REPLACE");let we=M&&"preventScrollReset"in M?M.preventScrollReset===!0:void 0,Ye=(M&&M.flushSync)===!0,De=Er({currentLocation:he,nextLocation:xe,historyAction:Re});if(De){ha(De,{state:"blocked",location:xe,proceed(){ha(De,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),Xe(A,M)},reset(){let lt=new Map(O.blockers);lt.set(De,Kl),it({blockers:lt})}});return}await Pe(Re,xe,{submission:oe,pendingError:be,preventScrollReset:we,replace:M&&M.replace,enableViewTransition:M&&M.viewTransition,flushSync:Ye,callSiteDefaultShouldRevalidate:M&&M.unstable_defaultShouldRevalidate})}function Be(){ye||(ye=t0()),Ba(),it({revalidation:"loading"});let A=ye.promise;return O.navigation.state==="submitting"?A:O.navigation.state==="idle"?(Pe(O.historyAction,O.location,{startUninterruptedRevalidation:!0}),A):(Pe(ue||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:Te===!0}),A)}async function Pe(A,M,$){de&&de.abort(),de=null,ue=A,j=($&&$.startUninterruptedRevalidation)===!0,Pu(O.location,O.matches),Ee=($&&$.preventScrollReset)===!0,Te=($&&$.enableViewTransition)===!0;let re=m||h,oe=$&&$.overrideNavigation,be=$?.initialHydration&&O.matches&&O.matches.length>0&&!G?O.matches:mr(re,M,p),ce=($&&$.flushSync)===!0;if(be&&O.initialized&&!F&&Lz(O.location,M)&&!($&&$.submission&&It($.submission.formMethod))){Ne(M,{matches:be},{flushSync:ce});return}let he=Ha(be,re,M.pathname);if(he.active&&he.matches&&(be=he.matches),!be){let{error:ct,notFoundMatches:bt,route:Qe}=Pn(M.pathname);Ne(M,{matches:bt,loaderData:{},errors:{[Qe.id]:ct}},{flushSync:ce});return}de=new AbortController;let xe=$i(e.history,M,de.signal,$&&$.submis)DELIM" -R"DELIM(sion),ve=e.getContext?await e.getContext():new Dg,Re;if($&&$.pendingError)Re=[pr(be).route.id,{type:"error",error:$.pendingError}];else if($&&$.submission&&It($.submission.formMethod)){let ct=await _n(xe,M,$.submission,be,ve,he.active,$&&$.initialHydration===!0,{replace:$.replace,flushSync:ce});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[bt,Qe]=ct.pendingActionResult;if(Sn(Qe)&&mo(Qe.error)&&Qe.error.status===404){de=null,Ne(M,{matches:ct.matches,loaderData:{},errors:{[bt]:Qe.error}});return}}be=ct.matches||be,Re=ct.pendingActionResult,oe=vd(M,$.submission),ce=!1,he.active=!1,xe=$i(e.history,xe.url,xe.signal)}let{shortCircuited:we,matches:Ye,loaderData:De,errors:lt}=await ua(xe,M,be,ve,he.active,oe,$&&$.submission,$&&$.fetcherSubmission,$&&$.replace,$&&$.initialHydration===!0,ce,Re,$&&$.callSiteDefaultShouldRevalidate);we||(de=null,Ne(M,{matches:Ye||be,...Ig(Re),loaderData:De,errors:lt}))}async function _n(A,M,$,re,oe,be,ce,he={}){Ba();let xe=Qz(M,$);if(it({navigation:xe},{flushSync:he.flushSync===!0}),be){let we=await Xn(re,M.pathname,A.signal);if(we.type==="aborted")return{shortCircuited:!0};if(we.type==="error"){if(we.partialMatches.length===0){let{matches:De,route:lt}=eu(h);return{matches:De,pendingActionResult:[lt.id,{type:"error",error:we.error}]}}let Ye=pr(we.partialMatches).route.id;return{matches:we.partialMatches,pendingActionResult:[Ye,{type:"error",error:we.error}]}}else if(we.matches)re=we.matches;else{let{notFoundMatches:Ye,error:De,route:lt}=Pn(M.pathname);return{matches:Ye,pendingActionResult:[lt.id,{type:"error",error:De}]}}}let ve,Re=fu(re,M);if(!Re.route.action&&!Re.route.lazy)ve={type:"error",error:Dn(405,{method:A.method,pathname:M.pathname,routeId:Re.route.id})};else{let we=Qi(u,f,A,M,re,Re,ce?[]:l,oe),Ye=await La(A,M,we,oe,null);if(ve=Ye[Re.route.id],!ve){for(let De of re)if(Ye[De.route.id]){ve=Ye[De.route.id];break}}if(A.signal.aborted)return{shortCircuited:!0}}if(Qr(ve)){let we;return he&&he.replace!=null?we=he.replace:we=Kg(ve.response.headers.get("Location"),new URL(A.url),p,e.history)===O.location.pathname+O.location.search,await fa(A,ve,!0,{submission:$,replace:we}),{shortCircuited:!0}}if(Sn(ve)){let we=pr(re,Re.route.id);return(he&&he.replace)!==!0&&(ue="PUSH"),{matches:re,pendingActionResult:[we.route.id,ve,Re.route.id]}}return{matches:re,pendingActionResult:[Re.route.id,ve]}}async function ua(A,M,$,re,oe,be,ce,he,xe,ve,Re,we,Ye){let De=be||vd(M,ce),lt=ce||he||e0(De),ct=!j&&!ve;if(oe){if(ct){let Et=Ut(we);it({navigation:De,...Et!==void 0?{actionData:Et}:{}},{flushSync:Re})}let Le=await Xn($,M.pathname,A.signal);if(Le.type==="aborted")return{shortCircuited:!0};if(Le.type==="error"){if(Le.partialMatches.length===0){let{matches:Xt,route:Nt}=eu(h);return{matches:Xt,loaderData:{},errors:{[Nt.id]:Le.error}}}let Et=pr(Le.partialMatches).route.id;return{matches:Le.partialMatches,loaderData:{},errors:{[Et]:Le.error}}}else if(Le.matches)$=Le.matches;else{let{error:Et,notFoundMatches:Xt,route:Nt}=Pn(M.pathname);return{matches:Xt,loaderData:{},errors:{[Nt.id]:Et}}}}let bt=m||h,{dsMatches:Qe,revalidatingFetchers:Ct}=qg(A,re,u,f,e.history,O,$,lt,M,ve?[]:l,ve===!0,F,se,ne,q,U,bt,p,e.patchRoutesOnNavigation!=null,we,Ye);if(R=++ie,!e.dataStrategy&&!Qe.some(Le=>Le.shouldLoad)&&!Qe.some(Le=>Le.route.middleware&&Le.route.middleware.length>0)&&Ct.length===0){let Le=No();return Ne(M,{matches:$,loaderData:{},errors:we&&Sn(we[1])?{[we[0]]:we[1].error}:null,...Ig(we),...Le?{fetchers:new Map(O.fetchers)}:{}},{flushSync:Re}),{shortCircuited:!0}}if(ct){let Le={};if(!oe){Le.navigation=De;let Et=Ut(we);Et!==void 0&&(Le.actionData=Et)}Ct.length>0&&(Le.fetchers=ca(Ct)),it(Le,{flushSync:Re})}Ct.forEach(Le=>{Ht(Le.key),Le.controller&&le.set(Le.key,Le.controller)});let st=()=>Ct.forEach(Le=>Ht(Le.key));de&&de.signal.addEventListener("abort",st);let{loaderResults:$a,fetcherResults:Qn}=await Wi(Qe,Ct,A,M,re);if(A.signal.aborted)return{shortCircuited:!0};de&&de.signal.removeEventListener("abort",st),Ct.forEach(Le=>le.delete(Le.key));let $t=tu($a);if($t)return await fa(A,$t.result,!0,{replace:xe}),{shortCircuited:!0};if($t=tu(Qn),$t)return U.add($t.key),await fa(A,$t.result,!0,{replace:xe}),{shortCircuited:!0};let{loaderData:Jn,errors:_r}=Xg(O,$,$a,we,Ct,Qn);ve&&O.errors&&(_r={...O.errors,..._r});let In=No(),Tr=Oo(R),Ir=In||Tr||Ct.length>0;return{matches:$,loaderData:Jn,errors:_r,...Ir?{fetchers:new Map(O.fetchers)}:{}}}function Ut(A){if(A&&!Sn(A[1]))return{[A[0]]:A[1].data};if(O.actionData)return Object.keys(O.actionData).length===0?null:O.actionData}function ca(A){return A.forEach(M=>{let $=O.fetchers.get(M.key),re=Vl(void 0,$?$.data:void 0);O.fetchers.set(M.key,re)}),new Map(O.fetchers)}async function Sr(A,M,$,re){Ht(A);let oe=(re&&re.flushSync)===!0,be=m||h,ce=eh(O.location,O.matches,p,$,M,re?.relative),he=mr(be,ce,p),xe=Ha(he,be,ce);if(xe.active&&xe.matches&&(he=xe.matches),!he){Tn(A,M,Dn(404,{pathname:ce}),{flushSync:oe});return}let{path:ve,submission:Re,error:we}=Zg(!0,ce,re);if(we){Tn(A,M,we,)DELIM" -R"DELIM({flushSync:oe});return}let Ye=e.getContext?await e.getContext():new Dg,De=(re&&re.preventScrollReset)===!0;if(Re&&It(Re.formMethod)){await Ii(A,M,ve,he,Ye,xe.active,oe,De,Re,re&&re.unstable_defaultShouldRevalidate);return}q.set(A,{routeId:M,path:ve}),await Wt(A,M,ve,he,Ye,xe.active,oe,De,Re)}async function Ii(A,M,$,re,oe,be,ce,he,xe,ve){Ba(),q.delete(A);let Re=O.fetchers.get(A);qn(A,Gz(xe,Re),{flushSync:ce});let we=new AbortController,Ye=$i(e.history,$,we.signal,xe);if(be){let ft=await Xn(re,new URL(Ye.url).pathname,Ye.signal,A);if(ft.type==="aborted")return;if(ft.type==="error"){Tn(A,M,ft.error,{flushSync:ce});return}else if(ft.matches)re=ft.matches;else{Tn(A,M,Dn(404,{pathname:$}),{flushSync:ce});return}}let De=fu(re,$);if(!De.route.action&&!De.route.lazy){let ft=Dn(405,{method:xe.formMethod,pathname:$,routeId:M});Tn(A,M,ft,{flushSync:ce});return}le.set(A,we);let lt=ie,ct=Qi(u,f,Ye,$,re,De,l,oe),bt=await La(Ye,$,ct,oe,A),Qe=bt[De.route.id];if(!Qe){for(let ft of ct)if(bt[ft.route.id]){Qe=bt[ft.route.id];break}}if(Ye.signal.aborted){le.get(A)===we&&le.delete(A);return}if(ne.has(A)){if(Qr(Qe)||Sn(Qe)){qn(A,ja(void 0));return}}else{if(Qr(Qe))if(le.delete(A),R>lt){qn(A,ja(void 0));return}else return U.add(A),qn(A,Vl(xe)),fa(Ye,Qe,!1,{fetcherSubmission:xe,preventScrollReset:he});if(Sn(Qe)){Tn(A,M,Qe.error);return}}let Ct=O.navigation.location||O.location,st=$i(e.history,Ct,we.signal),$a=m||h,Qn=O.navigation.state!=="idle"?mr($a,O.navigation.location,p):O.matches;Me(Qn,"Didn't find any matches after fetcher action");let $t=++ie;C.set(A,$t);let Jn=Vl(xe,Qe.data);O.fetchers.set(A,Jn);let{dsMatches:_r,revalidatingFetchers:In}=qg(st,oe,u,f,e.history,O,Qn,xe,Ct,l,!1,F,se,ne,q,U,$a,p,e.patchRoutesOnNavigation!=null,[De.route.id,Qe],ve);In.filter(ft=>ft.key!==A).forEach(ft=>{let Wr=ft.key,ei=O.fetchers.get(Wr),Do=Vl(void 0,ei?ei.data:void 0);O.fetchers.set(Wr,Do),Ht(Wr),ft.controller&&le.set(Wr,ft.controller)}),it({fetchers:new Map(O.fetchers)});let Tr=()=>In.forEach(ft=>Ht(ft.key));we.signal.addEventListener("abort",Tr);let{loaderResults:Ir,fetcherResults:Le}=await Wi(_r,In,st,Ct,oe);if(we.signal.aborted)return;if(we.signal.removeEventListener("abort",Tr),C.delete(A),le.delete(A),In.forEach(ft=>le.delete(ft.key)),O.fetchers.has(A)){let ft=ja(Qe.data);O.fetchers.set(A,ft)}let Et=tu(Ir);if(Et)return fa(st,Et.result,!1,{preventScrollReset:he});if(Et=tu(Le),Et)return U.add(Et.key),fa(st,Et.result,!1,{preventScrollReset:he});let{loaderData:Xt,errors:Nt}=Xg(O,Qn,Ir,void 0,In,Le);Oo($t),O.navigation.state==="loading"&&$t>R?(Me(ue,"Expected pending action"),de&&de.abort(),Ne(O.navigation.location,{matches:Qn,loaderData:Xt,errors:Nt,fetchers:new Map(O.fetchers)})):(it({errors:Nt,loaderData:Jg(O.loaderData,Xt,Qn,Nt),fetchers:new Map(O.fetchers)}),F=!1)}async function Wt(A,M,$,re,oe,be,ce,he,xe){let ve=O.fetchers.get(A);qn(A,Vl(xe,ve?ve.data:void 0),{flushSync:ce});let Re=new AbortController,we=$i(e.history,$,Re.signal);if(be){let Qe=await Xn(re,new URL(we.url).pathname,we.signal,A);if(Qe.type==="aborted")return;if(Qe.type==="error"){Tn(A,M,Qe.error,{flushSync:ce});return}else if(Qe.matches)re=Qe.matches;else{Tn(A,M,Dn(404,{pathname:$}),{flushSync:ce});return}}let Ye=fu(re,$);le.set(A,Re);let De=ie,lt=Qi(u,f,we,$,re,Ye,l,oe),bt=(await La(we,$,lt,oe,A))[Ye.route.id];if(le.get(A)===Re&&le.delete(A),!we.signal.aborted){if(ne.has(A)){qn(A,ja(void 0));return}if(Qr(bt))if(R>De){qn(A,ja(void 0));return}else{U.add(A),await fa(we,bt,!1,{preventScrollReset:he});return}if(Sn(bt)){Tn(A,M,bt.error);return}qn(A,ja(bt.data))}}async function fa(A,M,$,{submission:re,fetcherSubmission:oe,preventScrollReset:be,replace:ce}={}){$||(fe?.resolve(),fe=null),M.response.headers.has("X-Remix-Revalidate")&&(F=!0);let he=M.response.headers.get("Location");Me(he,"Expected a Location header on the redirect Response"),he=Kg(he,new URL(A.url),p,e.history);let xe=fo(O.location,he,{_isRedirect:!0});if(i){let lt=!1;if(M.response.headers.has("X-Remix-Reload-Document"))lt=!0;else if(_h(he)){const ct=Hb(he,!0);lt=ct.origin!==a.location.origin||Un(ct.pathname,p)==null}if(lt){ce?a.location.replace(he):a.location.assign(he);return}}de=null;let ve=ce===!0||M.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Re,formAction:we,formEncType:Ye}=O.navigation;!re&&!oe&&Re&&we&&Ye&&(re=e0(O.navigation));let De=re||oe;if(xz.has(M.response.status)&&De&&It(De.formMethod))await Pe(ve,xe,{submission:{...De,formAction:he},preventScrollReset:be||Ee,enableViewTransition:$?Te:void 0});else{let lt=vd(xe,re);await Pe(ve,xe,{overrideNavigation:lt,fetcherSubmission:oe,preventScrollReset:be||Ee,enableViewTransition:$?Te:void 0})}}async function La(A,M,$,re,oe){let be,ce={};try{be=await Nz(b,A,M,$,oe,re,!1)}catch(he){return $.filter(xe=>xe.shouldLoad).forEach(xe=>{ce[xe.route.id]={type:"error",error:he}}),ce}if(A.signal.aborted)return ce;if(!It(A.method))for(let he of $){if(be[he.route.id]?.type==="error")break;!be.hasOwnProperty(he.route.id)&&!O.loaderData.hasOwnProperty(he)DELIM" -R"DELIM(.route.id)&&(!O.errors||!O.errors.hasOwnProperty(he.route.id))&&he.shouldCallHandler()&&(be[he.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${he.route.id}`)})}for(let[he,xe]of Object.entries(be))if($z(xe)){let ve=xe.result;ce[he]={type:"redirect",response:kz(ve,A,he,$,p)}}else ce[he]=await Mz(xe);return ce}async function Wi(A,M,$,re,oe){let be=La($,re,A,oe,null),ce=Promise.all(M.map(async ve=>{if(ve.matches&&ve.match&&ve.request&&ve.controller){let we=(await La(ve.request,ve.path,ve.matches,oe,ve.key))[ve.match.route.id];return{[ve.key]:we}}else return Promise.resolve({[ve.key]:{type:"error",error:Dn(404,{pathname:ve.path})}})})),he=await be,xe=(await ce).reduce((ve,Re)=>Object.assign(ve,Re),{});return{loaderResults:he,fetcherResults:xe}}function Ba(){F=!0,q.forEach((A,M)=>{le.has(M)&&se.add(M),Ht(M)})}function qn(A,M,$={}){O.fetchers.set(A,M),it({fetchers:new Map(O.fetchers)},{flushSync:($&&$.flushSync)===!0})}function Tn(A,M,$,re={}){let oe=pr(O.matches,M);da(A),it({errors:{[oe.route.id]:$},fetchers:new Map(O.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Co(A){return W.set(A,(W.get(A)||0)+1),ne.has(A)&&ne.delete(A),O.fetchers.get(A)||Sz}function Zu(A,M){Ht(A,M?.reason),qn(A,ja(null))}function da(A){let M=O.fetchers.get(A);le.has(A)&&!(M&&M.state==="loading"&&C.has(A))&&Ht(A),q.delete(A),C.delete(A),U.delete(A),ne.delete(A),se.delete(A),O.fetchers.delete(A)}function en(A){let M=(W.get(A)||0)-1;M<=0?(W.delete(A),ne.add(A)):W.set(A,M),it({fetchers:new Map(O.fetchers)})}function Ht(A,M){let $=le.get(A);$&&($.abort(M),le.delete(A))}function Vt(A){for(let M of A){let $=Co(M),re=ja($.data);O.fetchers.set(M,re)}}function No(){let A=[],M=!1;for(let $ of U){let re=O.fetchers.get($);Me(re,`Expected fetcher: ${$}`),re.state==="loading"&&(U.delete($),A.push($),M=!0)}return Vt(A),M}function Oo(A){let M=[];for(let[$,re]of C)if(re0}function qu(A,M){let $=O.blockers.get(A)||Kl;return K.get(A)!==M&&K.set(A,M),$}function wr(A){O.blockers.delete(A),K.delete(A)}function ha(A,M){let $=O.blockers.get(A)||Kl;Me($.state==="unblocked"&&M.state==="blocked"||$.state==="blocked"&&M.state==="blocked"||$.state==="blocked"&&M.state==="proceeding"||$.state==="blocked"&&M.state==="unblocked"||$.state==="proceeding"&&M.state==="unblocked",`Invalid blocker state transition: ${$.state} -> ${M.state}`);let re=new Map(O.blockers);re.set(A,M),it({blockers:re})}function Er({currentLocation:A,nextLocation:M,historyAction:$}){if(K.size===0)return;K.size>1&&wt(!1,"A router only supports one blocker at a time");let re=Array.from(K.entries()),[oe,be]=re[re.length-1],ce=O.blockers.get(oe);if(!(ce&&ce.state==="proceeding")&&be({currentLocation:A,nextLocation:M,historyAction:$}))return oe}function Pn(A){let M=Dn(404,{pathname:A}),$=m||h,{matches:re,route:oe}=eu($);return{notFoundMatches:re,route:oe,error:M}}function Jr(A,M,$){if(T=A,k=M,E=$||null,!L&&O.navigation===yd){L=!0;let re=el(O.location,O.matches);re!=null&&it({restoreScrollPosition:re})}return()=>{T=null,k=null,E=null}}function Ua(A,M){return E&&E(A,M.map(re=>FR(re,O.loaderData)))||A.key}function Pu(A,M){if(T&&k){let $=Ua(A,M);T[$]=k()}}function el(A,M){if(T){let $=Ua(A,M),re=T[$];if(typeof re=="number")return re}return null}function Ha(A,M,$){if(e.patchRoutesOnNavigation)if(A){if(Object.keys(A[0].params).length>0)return{active:!0,matches:eo(M,$,p,!0)}}else return{active:!0,matches:eo(M,$,p,!0)||[]};return{active:!1,matches:null}}async function Xn(A,M,$,re){if(!e.patchRoutesOnNavigation)return{type:"success",matches:A};let oe=A;for(;;){let be=m==null,ce=m||h,he=f;try{await e.patchRoutesOnNavigation({signal:$,path:M,matches:oe,fetcherKey:re,patch:(Re,we)=>{$.aborted||Pg(Re,we,ce,he,u,!1)}})}catch(Re){return{type:"error",error:Re,partialMatches:oe}}finally{be&&!$.aborted&&(h=[...h])}if($.aborted)return{type:"aborted"};let xe=mr(ce,M,p),ve=null;if(xe){if(Object.keys(xe[0].params).length===0)return{type:"success",matches:xe};if(ve=eo(ce,M,p,!0),!(ve&&oe.length$.route.id===M[re].route.id)}function Mo(A){f={},m=ho(A,u,void 0,f)}function ko(A,M,$=!1){let re=m==null;Pg(A,M,m||h,f,u,$),re&&(h=[...h],it({}))}return te={get basename(){return p},get future(){return v},get state(){return O},get routes(){return h},get window(){return a},initialize:Ie,subscribe:gt,enableScrollRestoration:Jr,navigate:Xe,fetch:Sr,revalidate:Be,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:Co,resetFetcher:Zu,deleteFetcher:en,dispose:ut,getBlocker:qu,deleteBlocker:wr,patchRoutes:ko,_internalFetchControllers:le,_internalSetRoutes:Mo,_internalSetStateDoNotUseOrYouWillBreakYourApp()DELIM" -R"DELIM(A){it(A)}},e.unstable_instrumentations&&(te=dz(te,e.unstable_instrumentations.map(A=>A.router).filter(Boolean))),te}function _z(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function eh(e,a,i,l,s,u){let f,h;if(s){f=[];for(let p of a)if(f.push(p),p.route.id===s){h=p;break}}else f=a,h=a[a.length-1];let m=Eo(l||".",Lu(f),Un(e.pathname,i)||e.pathname,u==="path");if(l==null&&(m.search=e.search,m.hash=e.hash),(l==null||l===""||l===".")&&h){let p=Ah(m.search);if(h.route.index&&!p)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&p){let b=new URLSearchParams(m.search),v=b.getAll("index");b.delete("index"),v.filter(w=>w).forEach(w=>b.append("index",w));let x=b.toString();m.search=x?`?${x}`:""}}return i!=="/"&&(m.pathname=lz({basename:i,pathname:m.pathname})),la(m)}function Zg(e,a,i){if(!i||!_z(i))return{path:a};if(i.formMethod&&!Pz(i.formMethod))return{path:a,error:Dn(405,{method:i.formMethod})};let l=()=>({path:a,error:Dn(400,{type:"invalid-body"})}),u=(i.formMethod||"get").toUpperCase(),f=rx(a);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!It(u))return l();let v=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((x,[w,T])=>`${x}${w}=${T} -`,""):String(i.body);return{path:a,submission:{formMethod:u,formAction:f,formEncType:i.formEncType,formData:void 0,json:void 0,text:v}}}else if(i.formEncType==="application/json"){if(!It(u))return l();try{let v=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:a,submission:{formMethod:u,formAction:f,formEncType:i.formEncType,formData:void 0,json:v,text:void 0}}}catch{return l()}}}Me(typeof FormData=="function","FormData is not available in this environment");let h,m;if(i.formData)h=nh(i.formData),m=i.formData;else if(i.body instanceof FormData)h=nh(i.body),m=i.body;else if(i.body instanceof URLSearchParams)h=i.body,m=Vg(h);else if(i.body==null)h=new URLSearchParams,m=new FormData;else try{h=new URLSearchParams(i.body),m=Vg(h)}catch{return l()}let p={formMethod:u,formAction:f,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(It(p.formMethod))return{path:a,submission:p};let b=oa(a);return e&&b.search&&Ah(b.search)&&h.append("index",""),b.search=`?${h}`,{path:la(b),submission:p}}function qg(e,a,i,l,s,u,f,h,m,p,b,v,x,w,T,E,k,L,Q,G,ae){let ee=G?Sn(G[1])?G[1].error:G[1].data:void 0,me=s.createURL(u.location),te=s.createURL(m),O;if(b&&u.errors){let Y=Object.keys(u.errors)[0];O=f.findIndex(j=>j.route.id===Y)}else if(G&&Sn(G[1])){let Y=G[0];O=f.findIndex(j=>j.route.id===Y)-1}let ue=G?G[1].statusCode:void 0,fe=ue&&ue>=400,Ee={currentUrl:me,currentParams:u.matches[0]?.params||{},nextUrl:te,nextParams:f[0].params,...h,actionResult:ee,actionStatus:ue},de=To(f),Te=f.map((Y,j)=>{let{route:F}=Y,se=null;if(O!=null&&j>O)se=!1;else if(F.lazy)se=!0;else if(!Rh(F))se=!1;else if(b){let{shouldLoad:C}=Jb(F,u.loaderData,u.errors);se=C}else Tz(u.loaderData,u.matches[j],Y)&&(se=!0);if(se!==null)return th(i,l,e,m,de,Y,p,a,se);let le=!1;typeof ae=="boolean"?le=ae:fe?le=!1:(v||me.pathname+me.search===te.pathname+te.search||me.search!==te.search||Rz(u.matches[j],Y))&&(le=!0);let ie={...Ee,defaultShouldRevalidate:le},R=to(Y,ie);return th(i,l,e,m,de,Y,p,a,R,ie,ae)}),Ce=[];return T.forEach((Y,j)=>{if(b||!f.some(q=>q.route.id===Y.routeId)||w.has(j))return;let F=u.fetchers.get(j),se=F&&F.state!=="idle"&&F.data===void 0,le=mr(k,Y.path,L);if(!le){if(Q&&se)return;Ce.push({key:j,routeId:Y.routeId,path:Y.path,matches:null,match:null,request:null,controller:null});return}if(E.has(j))return;let ie=fu(le,Y.path),R=new AbortController,C=$i(s,Y.path,R.signal),U=null;if(x.has(j))x.delete(j),U=Qi(i,l,C,Y.path,le,ie,p,a);else if(se)v&&(U=Qi(i,l,C,Y.path,le,ie,p,a));else{let q;typeof ae=="boolean"?q=ae:fe?q=!1:q=v;let W={...Ee,defaultShouldRevalidate:q};to(ie,W)&&(U=Qi(i,l,C,Y.path,le,ie,p,a,W))}U&&Ce.push({key:j,routeId:Y.routeId,path:Y.path,matches:U,match:ie,request:C,controller:R})}),{dsMatches:Te,revalidatingFetchers:Ce}}function Rh(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Jb(e,a,i){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Rh(e))return{shouldLoad:!1,renderFallback:!1};let l=a!=null&&e.id in a,s=i!=null&&i[e.id]!==void 0;if(!l&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!l};let u=!l&&!s;return{shouldLoad:u,renderFallback:u}}function Tz(e,a,i){let l=!a||i.route.id!==a.route.id,s=!e.hasOwnProperty(i.route.id);return l||s}function Rz(e,a){let i=e.route.path;return e.pathname!==a.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==a.params["*"]}function to(e,a){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(a);if(typeof i=="boolean")return i}return a.defaultShouldRevalidate}function Pg(e,a,i,l,s,u){let f;if(e){let p=l[e];Me(p,`No route found to patch childre)DELIM" -R"DELIM(n into: routeId = ${e}`),p.children||(p.children=[]),f=p.children}else f=i;let h=[],m=[];if(a.forEach(p=>{let b=f.find(v=>Ib(p,v));b?m.push({existingRoute:b,newRoute:p}):h.push(p)}),h.length>0){let p=ho(h,s,[e||"_","patch",String(f?.length||"0")],l);f.push(...p)}if(u&&m.length>0)for(let p=0;pa.children?.some(s=>Ib(i,s)))??!1:!1}var Qg=new WeakMap,Wb=({key:e,route:a,manifest:i,mapRouteProperties:l})=>{let s=i[a.id];if(Me(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[e];if(!u)return;let f=Qg.get(s);f||(f={},Qg.set(s,f));let h=f[e];if(h)return h;let m=(async()=>{let p=PR(e),v=s[e]!==void 0&&e!=="hasErrorBoundary";if(p)wt(!p,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),f[e]=Promise.resolve();else if(v)wt(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await u();x!=null&&(Object.assign(s,{[e]:x}),Object.assign(s,l(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(x=>x===void 0)&&(s.lazy=void 0))})();return f[e]=m,m},Gg=new WeakMap;function zz(e,a,i,l,s){let u=i[e.id];if(Me(u,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let b=Gg.get(u);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let v=(async()=>{Me(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),w={};for(let T in x){let E=x[T];if(E===void 0)continue;let k=GR(T),Q=u[T]!==void 0&&T!=="hasErrorBoundary";k?wt(!k,"Route property "+T+" is not a supported property to be returned from a lazy route function. This property will be ignored."):Q?wt(!Q,`Route "${u.id}" has a static property "${T}" defined but its lazy function is also returning a value for this property. The lazy route property "${T}" will be ignored.`):w[T]=E}Object.assign(u,w),Object.assign(u,{...l(u),lazy:void 0})})();return Gg.set(u,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let f=Object.keys(e.lazy),h=[],m;for(let b of f){if(s&&s.includes(b))continue;let v=Wb({key:b,route:e,manifest:i,mapRouteProperties:l});v&&(h.push(v),b===a&&(m=v))}let p=h.length>0?Promise.all(h).then(()=>{}):void 0;return p?.catch(()=>{}),m?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:m}}async function Yg(e){let a=e.matches.filter(s=>s.shouldLoad),i={};return(await Promise.all(a.map(s=>s.resolve()))).forEach((s,u)=>{i[a[u].route.id]=s}),i}async function Az(e){return e.matches.some(a=>a.route.middleware)?ex(e,()=>Yg(e)):Yg(e)}function ex(e,a){return Cz(e,a,l=>{if(qz(l))throw l;return l},Uz,i);function i(l,s,u){if(u)return Promise.resolve(Object.assign(u.value,{[s]:{type:"error",result:l}}));{let{matches:f}=e,h=Math.min(Math.max(f.findIndex(p=>p.route.id===s),0),Math.max(f.findIndex(p=>p.shouldCallHandler()),0)),m=pr(f,f[h].route.id).route.id;return Promise.resolve({[m]:{type:"error",result:l}})}}}async function Cz(e,a,i,l,s){let{matches:u,...f}=e,h=u.flatMap(p=>p.route.middleware?p.route.middleware.map(b=>[p.route.id,b]):[]);return await tx(f,h,a,i,l,s)}async function tx(e,a,i,l,s,u,f=0){let{request:h}=e;if(h.signal.aborted)throw h.signal.reason??new Error(`Request aborted: ${h.method} ${h.url}`);let m=a[f];if(!m)return await i();let[p,b]=m,v,x=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await tx(e,a,i,l,s,u,f+1)},v.value}catch(w){return v={value:await u(w,p,v)},v.value}};try{let w=await b(e,x),T=w!=null?l(w):void 0;return s(T)?T:v?T??v.value:(v={value:await x()},v.value)}catch(w){return await u(w,p,v)}}function nx(e,a,i,l,s){let u=Wb({key:"middleware",route:l.route,manifest:a,mapRouteProperties:e}),f=zz(l.route,It(i.method)?"action":"loader",a,e,s);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function th(e,a,i,l,s,u,f,h,m,p=null,b){let v=!1,x=nx(e,a,i,u,f);return{...u,_lazyPromises:x,shouldLoad:m,shouldRevalidateArgs:p,shouldCallHandler(w){return v=!0,p?typeof b=="boolean"?to(u,{...p,defaultShouldRevalidate:b}):typeof w=="boolean"?to(u,{...p,defaultShouldRevalidate:w}):to(u,p):m},resolve(w){let{lazy:T,loader:E,middleware:k}=u.route,L=v||m||w&&!It(i.method)&&(T||E),Q=k&&k.length>0&&!E&&!T;return L&&(It(i.method)||!Q)?Oz({request:i,path:l,unstable_pattern:s,match:u,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:w,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function Qi(e,a,i,l,)DELIM" -R"DELIM(s,u,f,h,m=null){return s.map(p=>p.route.id!==u.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:nx(e,a,i,p,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:th(e,a,i,l,To(s),p,f,h,!0,m))}async function Nz(e,a,i,l,s,u,f){l.some(b=>b._lazyPromises?.middleware)&&await Promise.all(l.map(b=>b._lazyPromises?.middleware));let h={request:a,unstable_url:ax(a,i),unstable_pattern:To(l),params:l[0].params,context:u,matches:l},p=await e({...h,fetcherKey:s,runClientMiddleware:b=>{let v=h;return ex(v,()=>b({...v,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(l.flatMap(b=>[b._lazyPromises?.handler,b._lazyPromises?.route]))}catch{}return p}async function Oz({request:e,path:a,unstable_pattern:i,match:l,lazyHandlerPromise:s,lazyRoutePromise:u,handlerOverride:f,scopedContext:h}){let m,p,b=It(e.method),v=b?"action":"loader",x=w=>{let T,E=new Promise((Q,G)=>T=G);p=()=>T(),e.signal.addEventListener("abort",p);let k=Q=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${v}" [routeId: ${l.route.id}]`)):w({request:e,unstable_url:ax(e,a),unstable_pattern:i,params:l.params,context:h},...Q!==void 0?[Q]:[]),L=(async()=>{try{return{type:"data",result:await(f?f(G=>k(G)):k())}}catch(Q){return{type:"error",result:Q}}})();return Promise.race([L,E])};try{let w=b?l.route.action:l.route.loader;if(s||u)if(w){let T,[E]=await Promise.all([x(w).catch(k=>{T=k}),s,u]);if(T!==void 0)throw T;m=E}else{await s;let T=b?l.route.action:l.route.loader;if(T)[m]=await Promise.all([x(T),u]);else if(v==="action"){let E=new URL(e.url),k=E.pathname+E.search;throw Dn(405,{method:e.method,pathname:k,routeId:l.route.id})}else return{type:"data",result:void 0}}else if(w)m=await x(w);else{let T=new URL(e.url),E=T.pathname+T.search;throw Dn(404,{pathname:E})}}catch(w){return{type:"error",result:w}}finally{p&&e.signal.removeEventListener("abort",p)}return m}async function jz(e){let a=e.headers.get("Content-Type");return a&&/\bapplication\/json\b/.test(a)?e.body==null?null:e.json():e.text()}async function Mz(e){let{result:a,type:i}=e;if(zh(a)){let l;try{l=await jz(a)}catch(s){return{type:"error",error:s}}return i==="error"?{type:"error",error:new _o(a.status,a.statusText,l),statusCode:a.status,headers:a.headers}:{type:"data",data:l,statusCode:a.status,headers:a.headers}}return i==="error"?Wg(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:Bz(a),statusCode:mo(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:mo(a)?a.status:void 0}:Wg(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function kz(e,a,i,l,s){let u=e.headers.get("Location");if(Me(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!_h(u)){let f=l.slice(0,l.findIndex(h=>h.route.id===i)+1);u=eh(new URL(a.url),f,s,u),e.headers.set("Location",u)}return e}var Fg=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Kg(e,a,i,l){if(_h(e)){let s=e,u=s.startsWith("//")?new URL(a.protocol+s):new URL(s);if(Fg.includes(u.protocol))throw new Error("Invalid redirect location");let f=Un(u.pathname,i)!=null;if(u.origin===a.origin&&f)return Th(u.pathname)+u.search+u.hash}try{let s=l.createURL(e);if(Fg.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return e}function $i(e,a,i,l){let s=e.createURL(rx(a)).toString(),u={signal:i};if(l&&It(l.formMethod)){let{formMethod:f,formEncType:h}=l;u.method=f.toUpperCase(),h==="application/json"?(u.headers=new Headers({"Content-Type":h}),u.body=JSON.stringify(l.json)):h==="text/plain"?u.body=l.text:h==="application/x-www-form-urlencoded"&&l.formData?u.body=nh(l.formData):u.body=l.formData}return new Request(s,u)}function ax(e,a){let i=new URL(e.url),l=typeof a=="string"?oa(a):a;if(i.pathname=l.pathname||"/",l.search){let s=new URLSearchParams(l.search),u=s.getAll("index");s.delete("index");for(let f of u.filter(Boolean))s.append("index",f);i.search=s.size?`?${s.toString()}`:""}else i.search="";return i.hash=l.hash||"",i}function nh(e){let a=new URLSearchParams;for(let[i,l]of e.entries())a.append(i,typeof l=="string"?l:l.name);return a}function Vg(e){let a=new FormData;for(let[i,l]of e.entries())a.append(i,l);return a}function Dz(e,a,i,l=!1,s=!1){let u={},f=null,h,m=!1,p={},b=i&&Sn(i[1])?i[1].error:void 0;return e.forEach(v=>{if(!(v.route.id in a))return;let x=v.route.id,w=a[x];if(Me(!Qr(w),"Cannot handle redirect results in processLoaderData"),Sn(w)){let T=w.error;if(b!==void 0&&(T=b,b=void 0),f=f||{},s)f[x]=T;else{let E=pr(e,x);f[E.route.id]==null&&(f[E.route.id]=T)}l||(u[x]=Xb),m||(m=)DELIM" -R"DELIM(!0,h=mo(w.error)?w.error.status:500),w.headers&&(p[x]=w.headers)}else u[x]=w.data,w.statusCode&&w.statusCode!==200&&!m&&(h=w.statusCode),w.headers&&(p[x]=w.headers)}),b!==void 0&&i&&(f={[i[0]]:b},i[2]&&(u[i[2]]=void 0)),{loaderData:u,errors:f,statusCode:h||200,loaderHeaders:p}}function Xg(e,a,i,l,s,u){let{loaderData:f,errors:h}=Dz(a,i,l);return s.filter(m=>!m.matches||m.matches.some(p=>p.shouldLoad)).forEach(m=>{let{key:p,match:b,controller:v}=m;if(v&&v.signal.aborted)return;let x=u[p];if(Me(x,"Did not find corresponding fetcher result"),Sn(x)){let w=pr(e.matches,b?.route.id);h&&h[w.route.id]||(h={...h,[w.route.id]:x.error}),e.fetchers.delete(p)}else if(Qr(x))Me(!1,"Unhandled fetcher revalidation redirect");else{let w=ja(x.data);e.fetchers.set(p,w)}}),{loaderData:f,errors:h}}function Jg(e,a,i,l){let s=Object.entries(a).filter(([,u])=>u!==Xb).reduce((u,[f,h])=>(u[f]=h,u),{});for(let u of i){let f=u.route.id;if(!a.hasOwnProperty(f)&&e.hasOwnProperty(f)&&u.route.loader&&(s[f]=e[f]),l&&l.hasOwnProperty(f))break}return s}function Ig(e){return e?Sn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function pr(e,a){return(a?e.slice(0,e.findIndex(l=>l.route.id===a)+1):[...e]).reverse().find(l=>l.route.hasErrorBoundary===!0)||e[0]}function eu(e){let a=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function Dn(e,{pathname:a,routeId:i,method:l,type:s,message:u}={}){let f="Unknown Server Error",h="Unknown @remix-run/router error";return e===400?(f="Bad Request",l&&a&&i?h=`You made a ${l} request to "${a}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:s==="invalid-body"&&(h="Unable to encode submission body")):e===403?(f="Forbidden",h=`Route "${i}" does not match URL "${a}"`):e===404?(f="Not Found",h=`No route matches URL "${a}"`):e===405&&(f="Method Not Allowed",l&&a&&i?h=`You made a ${l.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:l&&(h=`Invalid request method "${l.toUpperCase()}"`)),new _o(e||500,f,new Error(h),!0)}function tu(e){let a=Object.entries(e);for(let i=a.length-1;i>=0;i--){let[l,s]=a[i];if(Qr(s))return{key:l,result:s}}}function rx(e){let a=typeof e=="string"?oa(e):e;return la({...a,hash:""})}function Lz(e,a){return e.pathname!==a.pathname||e.search!==a.search?!1:e.hash===""?a.hash!=="":e.hash===a.hash?!0:a.hash!==""}function Bz(e){return new _o(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Uz(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([a,i])=>typeof a=="string"&&Hz(i))}function Hz(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function $z(e){return zh(e.result)&&Kb.has(e.result.status)}function Sn(e){return e.type==="error"}function Qr(e){return(e&&e.type)==="redirect"}function Wg(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function zh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Zz(e){return Kb.has(e)}function qz(e){return zh(e)&&Zz(e.status)&&e.headers.has("Location")}function Pz(e){return bz.has(e.toUpperCase())}function It(e){return vz.has(e.toUpperCase())}function Ah(e){return new URLSearchParams(e).getAll("index").some(a=>a==="")}function fu(e,a){let i=typeof a=="string"?oa(a).search:a.search;if(e[e.length-1].route.index&&Ah(i||""))return e[e.length-1];let l=Pb(e);return l[l.length-1]}function e0(e){let{formMethod:a,formAction:i,formEncType:l,text:s,formData:u,json:f}=e;if(!(!a||!i||!l)){if(s!=null)return{formMethod:a,formAction:i,formEncType:l,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:a,formAction:i,formEncType:l,formData:u,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:i,formEncType:l,formData:void 0,json:f,text:void 0}}}function vd(e,a){return a?{state:"loading",location:e,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Qz(e,a){return{state:"submitting",location:e,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Vl(e,a){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function Gz(e,a){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:a?a.data:void 0}}func)DELIM" -R"DELIM(tion ja(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Yz(e,a){try{let i=e.sessionStorage.getItem(Vb);if(i){let l=JSON.parse(i);for(let[s,u]of Object.entries(l||{}))u&&Array.isArray(u)&&a.set(s,new Set(u||[]))}}catch{}}function Fz(e,a){if(a.size>0){let i={};for(let[l,s]of a)i[l]=[...s];try{e.sessionStorage.setItem(Vb,JSON.stringify(i))}catch(l){wt(!1,`Failed to save applied view transitions in sessionStorage (${l}).`)}}}function t0(){let e,a,i=new Promise((l,s)=>{e=async u=>{l(u);try{await i}catch{}},a=async u=>{s(u);try{await i}catch{}}});return{promise:i,resolve:e,reject:a}}var Xr=_.createContext(null);Xr.displayName="DataRouter";var Ro=_.createContext(null);Ro.displayName="DataRouterState";var ix=_.createContext(!1);function lx(){return _.useContext(ix)}var Ch=_.createContext({isTransitioning:!1});Ch.displayName="ViewTransition";var ox=_.createContext(new Map);ox.displayName="Fetchers";var Kz=_.createContext(null);Kz.displayName="Await";var wn=_.createContext(null);wn.displayName="Navigation";var Bu=_.createContext(null);Bu.displayName="Location";var Zn=_.createContext({outlet:null,matches:[],isDataRoute:!1});Zn.displayName="Route";var Nh=_.createContext(null);Nh.displayName="RouteError";var sx="REACT_ROUTER_ERROR",Vz="REDIRECT",Xz="ROUTE_ERROR_RESPONSE";function Jz(e){if(e.startsWith(`${sx}:${Vz}:{`))try{let a=JSON.parse(e.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function Iz(e){if(e.startsWith(`${sx}:${Xz}:{`))try{let a=JSON.parse(e.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new _o(a.status,a.statusText,a.data)}catch{}}function Wz(e,{relative:a}={}){Me(Xi(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:l}=_.useContext(wn),{hash:s,pathname:u,search:f}=zo(e,{relative:a}),h=u;return i!=="/"&&(h=u==="/"?i:Bn([i,u])),l.createHref({pathname:h,search:f,hash:s})}function Xi(){return _.useContext(Bu)!=null}function En(){return Me(Xi(),"useLocation() may be used only in the context of a component."),_.useContext(Bu).location}var ux="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function cx(e){_.useContext(wn).static||_.useLayoutEffect(e)}function sa(){let{isDataRoute:e}=_.useContext(Zn);return e?h3():e3()}function e3(){Me(Xi(),"useNavigate() may be used only in the context of a component.");let e=_.useContext(Xr),{basename:a,navigator:i}=_.useContext(wn),{matches:l}=_.useContext(Zn),{pathname:s}=En(),u=JSON.stringify(Lu(l)),f=_.useRef(!1);return cx(()=>{f.current=!0}),_.useCallback((m,p={})=>{if(wt(f.current,ux),!f.current)return;if(typeof m=="number"){i.go(m);return}let b=Eo(m,JSON.parse(u),s,p.relative==="path");e==null&&a!=="/"&&(b.pathname=b.pathname==="/"?a:Bn([a,b.pathname])),(p.replace?i.replace:i.push)(b,p.state,p)},[a,i,u,s,e])}var t3=_.createContext(null);function n3(e){let a=_.useContext(Zn).outlet;return _.useMemo(()=>a&&_.createElement(t3.Provider,{value:e},a),[a,e])}function Oh(){let{matches:e}=_.useContext(Zn),a=e[e.length-1];return a?a.params:{}}function zo(e,{relative:a}={}){let{matches:i}=_.useContext(Zn),{pathname:l}=En(),s=JSON.stringify(Lu(i));return _.useMemo(()=>Eo(e,JSON.parse(s),l,a==="path"),[e,s,l,a])}function a3(e,a,i){Me(Xi(),"useRoutes() may be used only in the context of a component.");let{navigator:l}=_.useContext(wn),{matches:s}=_.useContext(Zn),u=s[s.length-1],f=u?u.params:{},h=u?u.pathname:"/",m=u?u.pathnameBase:"/",p=u&&u.route;{let k=p&&p.path||"";hx(h,!p||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${h}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + if (${se}_present) { + if (${se}.value === undefined) { + newResult[${te}] = undefined; + } else { + newResult[${te}] = ${se}.value; + } + } -Please change the parent to .`)}let b=En(),v;v=b;let x=v.pathname||"/",w=x;if(m!=="/"){let k=m.replace(/^\//,"").split("/");w="/"+x.replace(/^\//,"").split("/").slice(k.length).join("/")}let T=mr(e,{pathname:w});return wt(p||T!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),wt(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),s3(T&&T.map(k=>Object.assign({},k,{params:Object.assign({},f,k.params),pathname:Bn([m,l.encodeLocation?l.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k)DELIM" -R"DELIM(.pathnameBase==="/"?m:Bn([m,l.encodeLocation?l.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),s,i)}function r3(){let e=dx(),a=mo(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,l="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:l},u={padding:"2px 4px",backgroundColor:l},f=null;return console.error("Error handled by React Router default ErrorBoundary:",e),f=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:u},"ErrorBoundary")," or"," ",_.createElement("code",{style:u},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},a),i?_.createElement("pre",{style:s},i):null,f)}var i3=_.createElement(r3,null),fx=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,a){return a.location!==e.location||a.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:a.error,location:a.location,revalidation:e.revalidation||a.revalidation}}componentDidCatch(e,a){this.props.onError?this.props.onError(e,a):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=Iz(e.digest);i&&(e=i)}let a=e!==void 0?_.createElement(Zn.Provider,{value:this.props.routeContext},_.createElement(Nh.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(l3,{error:e},a):a}};fx.contextType=ix;var gd=new WeakMap;function l3({children:e,error:a}){let{basename:i}=_.useContext(wn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let l=Jz(a.digest);if(l){let s=gd.get(a);if(s)throw s;let u=Gb(l.location,i);if(Qb&&!gd.get(a))if(u.isExternal||l.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:l.replace}));throw gd.set(a,f),f}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function o3({routeContext:e,match:a,children:i}){let l=_.useContext(Xr);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),_.createElement(Zn.Provider,{value:e},i)}function s3(e,a=[],i){let l=i?.state;if(e==null){if(!l)return null;if(l.errors)e=l.matches;else if(a.length===0&&!l.initialized&&l.matches.length>0)e=l.matches;else return null}let s=e,u=l?.errors;if(u!=null){let b=s.findIndex(v=>v.route.id&&u?.[v.route.id]!==void 0);Me(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,b+1))}let f=!1,h=-1;if(i&&l){f=l.renderFallback;for(let b=0;b=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let m=i?.onError,p=l&&m?(b,v)=>{m(b,{location:l.location,params:l.matches?.[0]?.params??{},unstable_pattern:To(l.matches),errorInfo:v})}:void 0;return s.reduceRight((b,v,x)=>{let w,T=!1,E=null,k=null;l&&(w=u&&v.route.id?u[v.route.id]:void 0,E=v.route.errorElement||i3,f&&(h<0&&x===0?(hx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,k=null):h===x&&(T=!0,k=v.route.hydrateFallbackElement||null)));let L=a.concat(s.slice(0,x+1)),Q=()=>{let G;return w?G=E:T?G=k:v.route.Component?G=_.createElement(v.route.Component,null):v.route.element?G=v.route.element:G=b,_.createElement(o3,{match:v,routeContext:{outlet:b,matches:L,isDataRoute:l!=null},children:G})};return l&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?_.createElement(fx,{location:l.location,revalidation:l.revalidation,component:E,error:w,children:Q(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:p}):Q()},null)}function jh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function u3(e){let a=_.useContext(Xr);return Me(a,jh(e)),a}function c3(e){let a=_.useContext(Ro);return Me(a,jh(e)),a}function f3(e){let a=_.useContext(Zn);return Me(a,jh(e)),a}function Mh(e){let a=f3(e),i=a.matches[a.matches.length-1];return Me(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.r)DELIM" -R"DELIM(oute.id}function d3(){return Mh("useRouteId")}function dx(){let e=_.useContext(Nh),a=c3("useRouteError"),i=Mh("useRouteError");return e!==void 0?e:a.errors?.[i]}function h3(){let{router:e}=u3("useNavigate"),a=Mh("useNavigate"),i=_.useRef(!1);return cx(()=>{i.current=!0}),_.useCallback(async(s,u={})=>{wt(i.current,ux),i.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:a,...u}))},[e,a])}var n0={};function hx(e,a,i){!a&&!n0[e]&&(n0[e]=!0,wt(!1,i))}var a0={};function r0(e,a){!e&&!a0[a]&&(a0[a]=!0,console.warn(a))}var m3="useOptimistic",i0=GS[m3],p3=()=>{};function y3(e){return i0?i0(e):[e,p3]}function v3(e){let a={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&wt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:_.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&wt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:_.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&wt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:_.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),a}var g3=["HydrateFallback","hydrateFallbackElement"],b3=class{constructor(){this.status="pending",this.promise=new Promise((e,a)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",a(i))}})}};function x3({router:e,flushSync:a,onError:i,unstable_useTransitions:l}){l=lx()||l;let[u,f]=_.useState(e.state),[h,m]=y3(u),[p,b]=_.useState(),[v,x]=_.useState({isTransitioning:!1}),[w,T]=_.useState(),[E,k]=_.useState(),[L,Q]=_.useState(),G=_.useRef(new Map),ae=_.useCallback((ue,{deletedFetchers:fe,newErrors:Ee,flushSync:de,viewTransitionOpts:Te})=>{Ee&&i&&Object.values(Ee).forEach(Y=>i(Y,{location:ue.location,params:ue.matches[0]?.params??{},unstable_pattern:To(ue.matches)})),ue.fetchers.forEach((Y,j)=>{Y.data!==void 0&&G.current.set(j,Y.data)}),fe.forEach(Y=>G.current.delete(Y)),r0(de===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Ce=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(r0(Te==null||Ce,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Te||!Ce){a&&de?a(()=>f(ue)):l===!1?f(ue):_.startTransition(()=>{l===!0&&m(Y=>l0(Y,ue)),f(ue)});return}if(a&&de){a(()=>{E&&(w?.resolve(),E.skipTransition()),x({isTransitioning:!0,flushSync:!0,currentLocation:Te.currentLocation,nextLocation:Te.nextLocation})});let Y=e.window.document.startViewTransition(()=>{a(()=>f(ue))});Y.finished.finally(()=>{a(()=>{T(void 0),k(void 0),b(void 0),x({isTransitioning:!1})})}),a(()=>k(Y));return}E?(w?.resolve(),E.skipTransition(),Q({state:ue,currentLocation:Te.currentLocation,nextLocation:Te.nextLocation})):(b(ue),x({isTransitioning:!0,flushSync:!1,currentLocation:Te.currentLocation,nextLocation:Te.nextLocation}))},[e.window,a,E,w,l,m,i]);_.useLayoutEffect(()=>e.subscribe(ae),[e,ae]);let ee=h.initialized;_.useLayoutEffect(()=>{!ee&&e.state.initialized&&ae(e.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[ee,ae,e.state]),_.useEffect(()=>{v.isTransitioning&&!v.flushSync&&T(new b3)},[v]),_.useEffect(()=>{if(w&&p&&e.window){let ue=p,fe=w.promise,Ee=e.window.document.startViewTransition(async()=>{l===!1?f(ue):_.startTransition(()=>{l===!0&&m(de=>l0(de,ue)),f(ue)}),await fe});Ee.finished.finally(()=>{T(void 0),k(void 0),b(void 0),x({isTransitioning:!1})}),k(Ee)}},[p,w,e.window,l,m]),_.useEffect(()=>{w&&p&&h.location.key===p.location.key&&w.resolve()},[w,E,h.location,p]),_.useEffect(()=>{!v.isTransitioning&&L&&(b(L.state),x({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),Q(void 0))},[v.isTransitioning,L]);let me=_.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:ue=>e.navigate(ue),push:(ue,fe,Ee)=>e.navigate(ue,{state:fe,preventScrollReset:Ee?.preventScrollReset}),replace:(ue,fe,Ee)=>e.navigate(ue,{replace:!0,state:fe,preventScrollReset:Ee?.preventScrollReset})}),[e]),te=e.basename||"/",O=_.useMemo(()=>({router:e,navigator:me,static:!1,basename:te,onError:i}),[e,me,te,i]);return _.createElement(_.Fragment,null,_.createElement(Xr.Provider,{value:O},_.createElement(Ro.Provider,{)DELIM" -R"DELIM(value:h},_.createElement(ox.Provider,{value:G.current},_.createElement(Ch.Provider,{value:v},_.createElement(T3,{basename:te,location:h.location,navigationType:h.historyAction,navigator:me,unstable_useTransitions:l},_.createElement(S3,{routes:e.routes,future:e.future,state:h,isStatic:!1,onError:i})))))),null)}function l0(e,a){return{...e,navigation:a.navigation.state!=="idle"?a.navigation:e.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:e.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:e.actionData,fetchers:a.fetchers}}var S3=_.memo(w3);function w3({routes:e,future:a,state:i,isStatic:l,onError:s}){return a3(e,void 0,{state:i,isStatic:l,onError:s})}function E3({to:e,replace:a,state:i,relative:l}){Me(Xi()," may be used only in the context of a component.");let{static:s}=_.useContext(wn);wt(!s," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:u}=_.useContext(Zn),{pathname:f}=En(),h=sa(),m=Eo(e,Lu(u),f,l==="path"),p=JSON.stringify(m);return _.useEffect(()=>{h(JSON.parse(p),{replace:a,state:i,relative:l})},[h,p,l,a,i]),null}function _3(e){return n3(e.context)}function Dt(e){Me(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function T3({basename:e="/",children:a=null,location:i,navigationType:l="POP",navigator:s,static:u=!1,unstable_useTransitions:f}){Me(!Xi(),"You cannot render a inside another . You should never have more than one in your app.");let h=e.replace(/^\/*/,"/"),m=_.useMemo(()=>({basename:h,navigator:s,static:u,unstable_useTransitions:f,future:{}}),[h,s,u,f]);typeof i=="string"&&(i=oa(i));let{pathname:p="/",search:b="",hash:v="",state:x=null,key:w="default",unstable_mask:T}=i,E=_.useMemo(()=>{let k=Un(p,h);return k==null?null:{location:{pathname:k,search:b,hash:v,state:x,key:w,unstable_mask:T},navigationType:l}},[h,p,b,v,x,w,l,T]);return wt(E!=null,` is not able to match the URL "${p}${b}${v}" because it does not start with the basename, so the won't render anything.`),E==null?null:_.createElement(wn.Provider,{value:m},_.createElement(Bu.Provider,{children:a,value:E}))}function ah(e,a=[]){let i=[];return _.Children.forEach(e,(l,s)=>{if(!_.isValidElement(l))return;let u=[...a,s];if(l.type===_.Fragment){i.push.apply(i,ah(l.props.children,u));return}Me(l.type===Dt,`[${typeof l.type=="string"?l.type:l.type.name}] is not a component. All component children of must be a or `),Me(!l.props.index||!l.props.children,"An index route cannot have child routes.");let f={id:l.props.id||u.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(f.children=ah(l.props.children,u)),i.push(f)}),i}var R3=ah,du="get",hu="application/x-www-form-urlencoded";function Uu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function z3(e){return Uu(e)&&e.tagName.toLowerCase()==="button"}function A3(e){return Uu(e)&&e.tagName.toLowerCase()==="form"}function C3(e){return Uu(e)&&e.tagName.toLowerCase()==="input"}function N3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function O3(e,a){return e.button===0&&(!a||a==="_self")&&!N3(e)}function rh(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((a,i)=>{let l=e[i];return a.concat(Array.isArray(l)?l.map(s=>[i,s]):[[i,l]])},[]))}function j3(e,a){let i=rh(e);return a&&a.forEach((l,s)=>{i.has(s)||a.getAll(s).forEach(u=>{i.append(s,u)})}),i}var nu=null;function M3(){if(nu===null)try{new FormData(document.createElement("form"),0),nu=!1}catch{nu=!0}return nu}var k3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bd(e){return e!=null&&!k3.has(e)?(wt(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${hu}"`),null):e}function D3(e,a){let i,l,s,u,f;if(A3(e)){let h=e.getAttribute("action");l=h?Un(h,a):null,i=e.getAttribute("method")||du,s=bd(e.getAttribute("enctype"))||hu,u=new FormData(e)}else if(z3(e)||C3(e)&&(e.type==="submit"||e.type==="image")){let h=e.form;if(h==null)throw new Error('Cannot submit a