@orbit-software/sdk 1.94.1 → 1.94.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(`/*! tailwindcss v4.0.0 | MIT License | https://tailwindcss.com */:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:ui-serif,Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-red-950:oklch(.258 .092 26.042);--color-orange-50:oklch(.98 .016 73.684);--color-orange-100:oklch(.954 .038 75.164);--color-orange-200:oklch(.901 .076 70.697);--color-orange-300:oklch(.837 .128 66.29);--color-orange-400:oklch(.75 .183 55.934);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-orange-800:oklch(.47 .157 37.304);--color-orange-900:oklch(.408 .123 38.172);--color-orange-950:oklch(.266 .079 36.259);--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-300:oklch(.879 .169 91.605);--color-amber-400:oklch(.828 .189 84.429);--color-amber-500:oklch(.769 .188 70.08);--color-amber-600:oklch(.666 .179 58.318);--color-amber-700:oklch(.555 .163 48.998);--color-amber-800:oklch(.473 .137 46.201);--color-amber-900:oklch(.414 .112 45.904);--color-amber-950:oklch(.279 .077 45.635);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-yellow-950:oklch(.286 .066 53.813);--color-lime-50:oklch(.986 .031 120.757);--color-lime-100:oklch(.967 .067 122.328);--color-lime-200:oklch(.938 .127 124.321);--color-lime-300:oklch(.897 .196 126.665);--color-lime-400:oklch(.841 .238 128.85);--color-lime-500:oklch(.768 .233 130.85);--color-lime-600:oklch(.648 .2 131.684);--color-lime-700:oklch(.532 .157 131.589);--color-lime-800:oklch(.453 .124 130.933);--color-lime-900:oklch(.405 .101 131.063);--color-lime-950:oklch(.274 .072 132.109);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-300:oklch(.871 .15 154.449);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-700:oklch(.527 .154 150.069);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-green-950:oklch(.266 .065 152.934);--color-emerald-50:oklch(.979 .021 166.113);--color-emerald-100:oklch(.95 .052 163.051);--color-emerald-200:oklch(.905 .093 164.15);--color-emerald-300:oklch(.845 .143 164.978);--color-emerald-400:oklch(.765 .177 163.223);--color-emerald-500:oklch(.696 .17 162.48);--color-emerald-600:oklch(.596 .145 163.225);--color-emerald-700:oklch(.508 .118 165.612);--color-emerald-800:oklch(.432 .095 166.913);--color-emerald-900:oklch(.378 .077 168.94);--color-emerald-950:oklch(.262 .051 172.552);--color-teal-50:oklch(.984 .014 180.72);--color-teal-100:oklch(.953 .051 180.801);--color-teal-200:oklch(.91 .096 180.426);--color-teal-300:oklch(.855 .138 181.071);--color-teal-400:oklch(.777 .152 181.912);--color-teal-500:oklch(.704 .14 182.503);--color-teal-600:oklch(.6 .118 184.704);--color-teal-700:oklch(.511 .096 186.391);--color-teal-800:oklch(.437 .078 188.216);--color-teal-900:oklch(.386 .063 188.416);--color-teal-950:oklch(.277 .046 192.524);--color-cyan-50:oklch(.984 .019 200.873);--color-cyan-100:oklch(.956 .045 203.388);--color-cyan-200:oklch(.917 .08 205.041);--color-cyan-300:oklch(.865 .127 207.078);--color-cyan-400:oklch(.789 .154 211.53);--color-cyan-500:oklch(.715 .143 215.221);--color-cyan-600:oklch(.609 .126 221.723);--color-cyan-700:oklch(.52 .105 223.128);--color-cyan-800:oklch(.45 .085 224.283);--color-cyan-900:oklch(.398 .07 227.392);--color-cyan-950:oklch(.302 .056 229.695);--color-sky-50:oklch(.977 .013 236.62);--color-sky-100:oklch(.951 .026 236.824);--color-sky-200:oklch(.901 .058 230.902);--color-sky-300:oklch(.828 .111 230.318);--color-sky-400:oklch(.746 .16 232.661);--color-sky-500:oklch(.685 .169 237.323);--color-sky-600:oklch(.588 .158 241.966);--color-sky-700:oklch(.5 .134 242.749);--color-sky-800:oklch(.443 .11 240.79);--color-sky-900:oklch(.391 .09 240.876);--color-sky-950:oklch(.293 .066 243.157);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-blue-950:oklch(.282 .091 267.935);--color-indigo-50:oklch(.962 .018 272.314);--color-indigo-100:oklch(.93 .034 272.788);--color-indigo-200:oklch(.87 .065 274.039);--color-indigo-300:oklch(.785 .115 274.713);--color-indigo-400:oklch(.673 .182 276.935);--color-indigo-500:oklch(.585 .233 277.117);--color-indigo-600:oklch(.511 .262 276.966);--color-indigo-700:oklch(.457 .24 277.023);--color-indigo-800:oklch(.398 .195 277.366);--color-indigo-900:oklch(.359 .144 278.697);--color-indigo-950:oklch(.257 .09 281.288);--color-violet-50:oklch(.969 .016 293.756);--color-violet-100:oklch(.943 .029 294.588);--color-violet-200:oklch(.894 .057 293.283);--color-violet-300:oklch(.811 .111 293.571);--color-violet-400:oklch(.702 .183 293.541);--color-violet-500:oklch(.606 .25 292.717);--color-violet-600:oklch(.541 .281 293.009);--color-violet-700:oklch(.491 .27 292.581);--color-violet-800:oklch(.432 .232 292.759);--color-violet-900:oklch(.38 .189 293.745);--color-violet-950:oklch(.283 .141 291.089);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-200:oklch(.902 .063 306.703);--color-purple-300:oklch(.827 .119 306.383);--color-purple-400:oklch(.714 .203 305.504);--color-purple-500:oklch(.627 .265 303.9);--color-purple-600:oklch(.558 .288 302.321);--color-purple-700:oklch(.496 .265 301.924);--color-purple-800:oklch(.438 .218 303.724);--color-purple-900:oklch(.381 .176 304.987);--color-purple-950:oklch(.291 .149 302.717);--color-fuchsia-50:oklch(.977 .017 320.058);--color-fuchsia-100:oklch(.952 .037 318.852);--color-fuchsia-200:oklch(.903 .076 319.62);--color-fuchsia-300:oklch(.833 .145 321.434);--color-fuchsia-400:oklch(.74 .238 322.16);--color-fuchsia-500:oklch(.667 .295 322.15);--color-fuchsia-600:oklch(.591 .293 322.896);--color-fuchsia-700:oklch(.518 .253 323.949);--color-fuchsia-800:oklch(.452 .211 324.591);--color-fuchsia-900:oklch(.401 .17 325.612);--color-fuchsia-950:oklch(.293 .136 325.661);--color-pink-50:oklch(.971 .014 343.198);--color-pink-100:oklch(.948 .028 342.258);--color-pink-200:oklch(.899 .061 343.231);--color-pink-300:oklch(.823 .12 346.018);--color-pink-400:oklch(.718 .202 349.761);--color-pink-500:oklch(.656 .241 354.308);--color-pink-600:oklch(.592 .249 .584);--color-pink-700:oklch(.525 .223 3.958);--color-pink-800:oklch(.459 .187 3.815);--color-pink-900:oklch(.408 .153 2.432);--color-pink-950:oklch(.284 .109 3.907);--color-rose-50:oklch(.969 .015 12.422);--color-rose-100:oklch(.941 .03 12.58);--color-rose-200:oklch(.892 .058 10.001);--color-rose-300:oklch(.81 .117 11.638);--color-rose-400:oklch(.712 .194 13.428);--color-rose-500:oklch(.645 .246 16.439);--color-rose-600:oklch(.586 .253 17.585);--color-rose-700:oklch(.514 .222 16.935);--color-rose-800:oklch(.455 .188 13.697);--color-rose-900:oklch(.41 .159 10.272);--color-rose-950:oklch(.271 .105 12.094);--color-slate-50:oklch(.984 .003 247.858);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-400:oklch(.704 .04 256.788);--color-slate-500:oklch(.554 .046 257.417);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-slate-800:oklch(.279 .041 260.031);--color-slate-900:oklch(.208 .042 265.755);--color-slate-950:oklch(.129 .042 264.695);--color-gray-50:oklch(.985 .002 247.839);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-500:oklch(.551 .027 264.364);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-gray-900:oklch(.21 .034 264.665);--color-gray-950:oklch(.13 .028 261.692);--color-zinc-50:oklch(.985 0 0);--color-zinc-100:oklch(.967 .001 286.375);--color-zinc-200:oklch(.92 .004 286.32);--color-zinc-300:oklch(.871 .006 286.286);--color-zinc-400:oklch(.705 .015 286.067);--color-zinc-500:oklch(.552 .016 285.938);--color-zinc-600:oklch(.442 .017 285.786);--color-zinc-700:oklch(.37 .013 285.805);--color-zinc-800:oklch(.274 .006 286.033);--color-zinc-900:oklch(.21 .006 285.885);--color-zinc-950:oklch(.141 .005 285.823);--color-neutral-50:oklch(.985 0 0);--color-neutral-100:oklch(.97 0 0);--color-neutral-200:oklch(.922 0 0);--color-neutral-300:oklch(.87 0 0);--color-neutral-400:oklch(.708 0 0);--color-neutral-500:oklch(.556 0 0);--color-neutral-600:oklch(.439 0 0);--color-neutral-700:oklch(.371 0 0);--color-neutral-800:oklch(.269 0 0);--color-neutral-900:oklch(.205 0 0);--color-neutral-950:oklch(.145 0 0);--color-stone-50:oklch(.985 .001 106.423);--color-stone-100:oklch(.97 .001 106.424);--color-stone-200:oklch(.923 .003 48.717);--color-stone-300:oklch(.869 .005 56.366);--color-stone-400:oklch(.709 .01 56.259);--color-stone-500:oklch(.553 .013 58.071);--color-stone-600:oklch(.444 .011 73.639);--color-stone-700:oklch(.374 .01 67.558);--color-stone-800:oklch(.268 .007 34.298);--color-stone-900:oklch(.216 .006 56.043);--color-stone-950:oklch(.147 .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--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-base:1rem;--text-base--line-height: 1.5 ;--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 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-2xs:0 1px #0000000d;--shadow-xs:0 1px 2px 0 #0000000d;--shadow-sm:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--inset-shadow-2xs:inset 0 1px #0000000d;--inset-shadow-xs:inset 0 1px 1px #0000000d;--inset-shadow-sm:inset 0 2px 4px #0000000d;--drop-shadow-xs:0 1px 1px #0000000d;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--perspective-dramatic:100px;--perspective-near:300px;--perspective-normal:500px;--perspective-midrange:800px;--perspective-distant:1200px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--spacing-safe-area-inset-bottom:max(var(--tg-safe-area-inset-bottom),16px);--spacing-tg-safe-area-inset-bottom:var(--tg-safe-area-inset-bottom);--color-primary:var(--tg-theme-button-color);--color-text:var(--tg-theme-text-color);--color-link:var(--tg-theme-link-color);--color-hint:var(--tg-theme-hint-color);--color-background:var(--tg-theme-bg-color);--color-border:#00000026;--color-button:var(--tg-theme-button-color);--color-button-foreground:var(--tgui--button_text_color);--color-secondary-bg-color:var(--tg-theme-secondary-bg-color);--color-section-bg-color:var(--tg-theme-section-bg-color);--color-section-header-text-color:var(--tg-theme-section-header-text-color);--color-destructive-text-color:var(--tg-theme-destructive-text-color);--color-secondary-fill:var(--tgui--secondary_fill);--color-tgui-bg:var(--tgui--bg_color);--color-tgui-secondary-bg:var(--tgui--secondary_bg_color);--color-tgui-section-bg:var(--tgui--section_bg_color);--color-tgui-surface-primary:var(--tgui--surface_primary);--color-tgui-text:var(--tgui--text_color);--color-tgui-subtitle-text:var(--tgui--subtitle_text_color);--color-tgui-link:var(--tgui--link_color);--color-tgui-hint:var(--tgui--hint_color);--color-custom-green:#1ec948;--font-headline:-apple-system-headline,BlinkMacSystemFont,sans-serif;--shadow-top-divider:0 calc(var(--retina-separator-width,1px)*-1)0 var(--tgui--divider);--shadow-card:0 5px 6px 0 #0000000f,0 0 2px 1px #00000005}#overlay-root *,#overlay-root :after,#overlay-root :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,#overlay-root :host{-webkit-text-size-adjust:100%;-moz-tab-size:4;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}body{line-height:inherit}#overlay-root hr{height:0;color:inherit;border-top-width:1px}#overlay-root abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}#overlay-root h1,#overlay-root h2,#overlay-root h3,#overlay-root h4,#overlay-root h5,#overlay-root h6{font-size:inherit;font-weight:inherit}#overlay-root a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}#overlay-root b,#overlay-root strong{font-weight:bolder}#overlay-root code,#overlay-root kbd,#overlay-root samp,#overlay-root 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}#overlay-root small{font-size:80%}#overlay-root sub,#overlay-root sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}#overlay-root sub{bottom:-.25em}#overlay-root sup{top:-.5em}#overlay-root table{text-indent:0;border-color:inherit;border-collapse:collapse}#overlay-root :-moz-focusring{outline:auto}#overlay-root progress{vertical-align:baseline}#overlay-root summary{display:list-item}#overlay-root ol,#overlay-root ul,#overlay-root menu{list-style:none}#overlay-root img,#overlay-root svg,#overlay-root video,#overlay-root canvas,#overlay-root audio,#overlay-root iframe,#overlay-root embed,#overlay-root object{vertical-align:middle;display:block}#overlay-root img,#overlay-root video{max-width:100%;height:auto}#overlay-root button,#overlay-root input,#overlay-root select,#overlay-root optgroup,#overlay-root textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;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}#overlay-root :where(select:is([multiple],[size])) optgroup{font-weight:bolder}#overlay-root :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}#overlay-root textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-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}#overlay-root :-moz-ui-invalid{box-shadow:none}#overlay-root button,#overlay-root input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}#overlay-root [hidden]:where(:not([hidden=until-found])){display:none!important}#overlay-root .pointer-events-auto{pointer-events:auto}#overlay-root .pointer-events-none{pointer-events:none}#overlay-root .collapse{visibility:collapse}#overlay-root .invisible{visibility:hidden}#overlay-root .visible{visibility:visible}#overlay-root .sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}#overlay-root .not-sr-only{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}#overlay-root .absolute{position:absolute}#overlay-root .fixed{position:fixed}#overlay-root .relative{position:relative}#overlay-root .static{position:static}#overlay-root .sticky{position:sticky}#overlay-root .-inset-1{inset:calc(var(--spacing)*-1)}#overlay-root .inset-0{inset:calc(var(--spacing)*0)}#overlay-root .top-1\\/2{top:50%}#overlay-root .top-3{top:calc(var(--spacing)*3)}#overlay-root .top-18{top:calc(var(--spacing)*18)}#overlay-root .-right-4{right:calc(var(--spacing)*-4)}#overlay-root .-right-8{right:calc(var(--spacing)*-8)}#overlay-root .right-0{right:calc(var(--spacing)*0)}#overlay-root .right-2{right:calc(var(--spacing)*2)}#overlay-root .right-6{right:calc(var(--spacing)*6)}#overlay-root .-bottom-2{bottom:calc(var(--spacing)*-2)}#overlay-root .-bottom-15{bottom:calc(var(--spacing)*-15)}#overlay-root .bottom-0{bottom:calc(var(--spacing)*0)}#overlay-root .bottom-1{bottom:calc(var(--spacing)*1)}#overlay-root .bottom-2{bottom:calc(var(--spacing)*2)}#overlay-root .bottom-3{bottom:calc(var(--spacing)*3)}#overlay-root .bottom-4{bottom:calc(var(--spacing)*4)}#overlay-root .bottom-6{bottom:calc(var(--spacing)*6)}#overlay-root .bottom-7{bottom:calc(var(--spacing)*7)}#overlay-root .bottom-8{bottom:calc(var(--spacing)*8)}#overlay-root .bottom-10{bottom:calc(var(--spacing)*10)}#overlay-root .bottom-11{bottom:calc(var(--spacing)*11)}#overlay-root .bottom-12{bottom:calc(var(--spacing)*12)}#overlay-root .bottom-13{bottom:calc(var(--spacing)*13)}#overlay-root .-left-3{left:calc(var(--spacing)*-3)}#overlay-root .-left-6{left:calc(var(--spacing)*-6)}#overlay-root .left-0{left:calc(var(--spacing)*0)}#overlay-root .left-1\\/2{left:50%}#overlay-root .left-2{left:calc(var(--spacing)*2)}#overlay-root .left-4{left:calc(var(--spacing)*4)}#overlay-root .left-7{left:calc(var(--spacing)*7)}#overlay-root .left-8{left:calc(var(--spacing)*8)}#overlay-root .left-10{left:calc(var(--spacing)*10)}#overlay-root .isolate{isolation:isolate}#overlay-root .isolation-auto{isolation:auto}#overlay-root .z-0{z-index:0}#overlay-root .z-1{z-index:1}#overlay-root .z-10{z-index:10}#overlay-root .z-\\[-1\\]{z-index:-1}#overlay-root .z-\\[-2\\]{z-index:-2}#overlay-root .order-123{order:123}#overlay-root .\\!container{width:100%!important}@media (width>=40rem){#overlay-root .\\!container{max-width:40rem!important}}@media (width>=48rem){#overlay-root .\\!container{max-width:48rem!important}}@media (width>=64rem){#overlay-root .\\!container{max-width:64rem!important}}@media (width>=80rem){#overlay-root .\\!container{max-width:80rem!important}}@media (width>=96rem){#overlay-root .\\!container{max-width:96rem!important}}#overlay-root .container{width:100%}@media (width>=40rem){#overlay-root .container{max-width:40rem}}@media (width>=48rem){#overlay-root .container{max-width:48rem}}@media (width>=64rem){#overlay-root .container{max-width:64rem}}@media (width>=80rem){#overlay-root .container{max-width:80rem}}@media (width>=96rem){#overlay-root .container{max-width:96rem}}#overlay-root .mx-auto{margin-inline:auto}#overlay-root .\\!mt-6\\.5{margin-top:calc(var(--spacing)*6.5)!important}#overlay-root .-mt-1\\.5{margin-top:calc(var(--spacing)*-1.5)}#overlay-root .mt-0\\.5{margin-top:calc(var(--spacing)*.5)}#overlay-root .mt-5{margin-top:calc(var(--spacing)*5)}#overlay-root .mb-2{margin-bottom:calc(var(--spacing)*2)}#overlay-root .-ml-3{margin-left:calc(var(--spacing)*-3)}#overlay-root .ml-1{margin-left:calc(var(--spacing)*1)}#overlay-root .block{display:block}#overlay-root .contents{display:contents}#overlay-root .flex{display:flex}#overlay-root .flow-root{display:flow-root}#overlay-root .grid{display:grid}#overlay-root .hidden{display:none}#overlay-root .inline{display:inline}#overlay-root .inline-block{display:inline-block}#overlay-root .inline-flex{display:inline-flex}#overlay-root .inline-grid{display:inline-grid}#overlay-root .inline-table{display:inline-table}#overlay-root .list-item{display:list-item}#overlay-root .table{display:table}#overlay-root .table-caption{display:table-caption}#overlay-root .table-cell{display:table-cell}#overlay-root .table-column{display:table-column}#overlay-root .table-column-group{display:table-column-group}#overlay-root .table-footer-group{display:table-footer-group}#overlay-root .table-header-group{display:table-header-group}#overlay-root .table-row{display:table-row}#overlay-root .table-row-group{display:table-row-group}#overlay-root .aspect-square{aspect-ratio:1}#overlay-root .size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}#overlay-root .size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}#overlay-root .size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}#overlay-root .size-18{width:calc(var(--spacing)*18);height:calc(var(--spacing)*18)}#overlay-root .size-24{width:calc(var(--spacing)*24);height:calc(var(--spacing)*24)}#overlay-root .size-\\[25px\\]{width:25px;height:25px}#overlay-root .\\!h-7{height:calc(var(--spacing)*7)!important}#overlay-root .h-12{height:calc(var(--spacing)*12)}#overlay-root .h-12\\.5{height:calc(var(--spacing)*12.5)}#overlay-root .h-18{height:calc(var(--spacing)*18)}#overlay-root .h-\\[30px\\]{height:30px}#overlay-root .h-\\[100dvh\\]{height:100dvh}#overlay-root .h-\\[var\\(--tabbar-current-height\\)\\]{height:var(--tabbar-current-height)}#overlay-root .h-\\[var\\(--tg-safe-area-inset-bottom\\)\\]{height:var(--tg-safe-area-inset-bottom)}#overlay-root .h-auto{height:auto}#overlay-root .h-full{height:100%}#overlay-root .max-h-12\\.5{max-height:calc(var(--spacing)*12.5)}#overlay-root .min-h-0{min-height:calc(var(--spacing)*0)}#overlay-root .min-h-\\[96px\\]{min-height:96px}#overlay-root .min-h-\\[100dvh\\]{min-height:100dvh}#overlay-root .w-12{width:calc(var(--spacing)*12)}#overlay-root .w-16{width:calc(var(--spacing)*16)}#overlay-root .w-\\[130px\\]{width:130px}#overlay-root .w-\\[210px\\]{width:210px}#overlay-root .w-fit{width:fit-content}#overlay-root .w-full{width:100%}#overlay-root .max-w-20{max-width:calc(var(--spacing)*20)}#overlay-root .min-w-\\[96px\\]{min-width:96px}#overlay-root .flex-1{flex:1}#overlay-root .flex-\\[0\\.2\\]{flex:.2}#overlay-root .flex-shrink-0{flex-shrink:0}#overlay-root .shrink{flex-shrink:1}#overlay-root .shrink-0{flex-shrink:0}#overlay-root .flex-grow,#overlay-root .grow{flex-grow:1}#overlay-root .border-collapse{border-collapse:collapse}#overlay-root .origin-center{transform-origin:50%}#overlay-root .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}#overlay-root .translate-none{translate:none}#overlay-root .scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}#overlay-root .scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}#overlay-root .-rotate-3{rotate:-3deg}#overlay-root .-rotate-4{rotate:-4deg}#overlay-root .-rotate-5{rotate:-5deg}#overlay-root .-rotate-6{rotate:-6deg}#overlay-root .-rotate-8{rotate:-8deg}#overlay-root .-rotate-12{rotate:-12deg}#overlay-root .-rotate-15{rotate:-15deg}#overlay-root .-rotate-90{rotate:-90deg}#overlay-root .rotate-3{rotate:3deg}#overlay-root .rotate-5{rotate:5deg}#overlay-root .rotate-10{rotate:10deg}#overlay-root .rotate-11{rotate:11deg}#overlay-root .\\!transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)!important}#overlay-root .transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}#overlay-root .animate-pulse{animation:var(--animate-pulse)}#overlay-root .animate-spin{animation:var(--animate-spin)}#overlay-root .cursor-pointer{cursor:pointer}#overlay-root .touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}#overlay-root .resize{resize:both}#overlay-root .auto-cols-max{grid-auto-columns:max-content}#overlay-root .grid-flow-col{grid-auto-flow:column}#overlay-root .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}#overlay-root .grid-cols-\\[minmax\\(0\\,1fr\\)_max-content\\]{grid-template-columns:minmax(0,1fr) max-content}#overlay-root .flex-col{flex-direction:column}#overlay-root .flex-row{flex-direction:row}#overlay-root .flex-wrap{flex-wrap:wrap}#overlay-root .items-center{align-items:center}#overlay-root .items-start{align-items:flex-start}#overlay-root .justify-between{justify-content:space-between}#overlay-root .justify-center{justify-content:center}#overlay-root .justify-start{justify-content:flex-start}#overlay-root .justify-items-center{justify-items:center}#overlay-root .gap-0{gap:calc(var(--spacing)*0)}#overlay-root .gap-0\\.5{gap:calc(var(--spacing)*.5)}#overlay-root .gap-1{gap:calc(var(--spacing)*1)}#overlay-root .gap-1\\.5{gap:calc(var(--spacing)*1.5)}#overlay-root .gap-2{gap:calc(var(--spacing)*2)}#overlay-root .gap-2\\.5{gap:calc(var(--spacing)*2.5)}#overlay-root .gap-3{gap:calc(var(--spacing)*3)}#overlay-root .gap-4{gap:calc(var(--spacing)*4)}#overlay-root .gap-5{gap:calc(var(--spacing)*5)}#overlay-root .gap-6{gap:calc(var(--spacing)*6)}#overlay-root .gap-\\[5px\\]{gap:5px}#overlay-root .gap-\\[6px\\]{gap:6px}#overlay-root .gap-\\[10px\\]{gap:10px}#overlay-root .gap-x-2\\.5{column-gap:calc(var(--spacing)*2.5)}#overlay-root :where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}#overlay-root .gap-y-\\[30px\\]{row-gap:30px}#overlay-root :where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}#overlay-root :where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}#overlay-root :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)))}#overlay-root :where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}#overlay-root .self-stretch{align-self:stretch}#overlay-root .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#overlay-root .overflow-hidden{overflow:hidden}#overlay-root .overflow-visible{overflow:visible}#overlay-root .rounded{border-radius:.25rem}#overlay-root .rounded-\\[20px\\]{border-radius:20px}#overlay-root .rounded-\\[40px\\]{border-radius:40px}#overlay-root .rounded-full{border-radius:3.40282e38px}#overlay-root .rounded-lg{border-radius:var(--radius-lg)}#overlay-root .rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}#overlay-root .rounded-ss{border-start-start-radius:.25rem}#overlay-root .rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}#overlay-root .rounded-se{border-start-end-radius:.25rem}#overlay-root .rounded-ee{border-end-end-radius:.25rem}#overlay-root .rounded-es{border-end-start-radius:.25rem}#overlay-root .rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}#overlay-root .rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}#overlay-root .rounded-tl{border-top-left-radius:.25rem}#overlay-root .rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}#overlay-root .rounded-tr{border-top-right-radius:.25rem}#overlay-root .rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}#overlay-root .rounded-br{border-bottom-right-radius:.25rem}#overlay-root .rounded-bl{border-bottom-left-radius:.25rem}#overlay-root .border{border-style:var(--tw-border-style);border-width:1px}#overlay-root .border-0{border-style:var(--tw-border-style);border-width:0}#overlay-root .border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}#overlay-root .border-y{border-block-style:var(--tw-border-style);border-block-width:1px}#overlay-root .border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}#overlay-root .border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}#overlay-root .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}#overlay-root .border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}#overlay-root .border-r{border-right-style:var(--tw-border-style);border-right-width:1px}#overlay-root .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}#overlay-root .border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}#overlay-root .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}#overlay-root .bg-\\[var\\(--tgui--plain_background\\)\\]{background-color:var(--tgui--plain_background)}#overlay-root .bg-tgui-section-bg{background-color:var(--tgui--section_bg_color)}#overlay-root .bg-transparent{background-color:#0000}#overlay-root .bg-white{background-color:var(--color-white)}#overlay-root .bg-center{background-position:50%}#overlay-root .bg-no-repeat{background-repeat:no-repeat}#overlay-root .bg-repeat{background-repeat:repeat}#overlay-root .object-contain{object-fit:contain}#overlay-root .object-cover{object-fit:cover}#overlay-root .p-0{padding:calc(var(--spacing)*0)}#overlay-root .p-4{padding:calc(var(--spacing)*4)}#overlay-root .p-\\[10px_10px_14px_10px\\]{padding:10px 10px 14px}#overlay-root .px-0\\.75{padding-inline:calc(var(--spacing)*.75)}#overlay-root .px-1{padding-inline:calc(var(--spacing)*1)}#overlay-root .px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}#overlay-root .px-2{padding-inline:calc(var(--spacing)*2)}#overlay-root .px-4{padding-inline:calc(var(--spacing)*4)}#overlay-root .px-\\[9px\\]{padding-inline:9px}#overlay-root .px-\\[12px\\]{padding-inline:12px}#overlay-root .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}#overlay-root .py-\\[2\\.5px\\]{padding-block:2.5px}#overlay-root .py-\\[2px\\]{padding-block:2px}#overlay-root .py-\\[5px\\]{padding-block:5px}#overlay-root .py-px{padding-block:1px}#overlay-root .pt-1{padding-top:calc(var(--spacing)*1)}#overlay-root .pt-7\\.5{padding-top:calc(var(--spacing)*7.5)}#overlay-root .pr-1\\.5{padding-right:calc(var(--spacing)*1.5)}#overlay-root .pr-\\[7px\\]{padding-right:7px}#overlay-root .pb-0{padding-bottom:calc(var(--spacing)*0)}#overlay-root .pb-2{padding-bottom:calc(var(--spacing)*2)}#overlay-root .pb-2\\.5{padding-bottom:calc(var(--spacing)*2.5)}#overlay-root .pb-3{padding-bottom:calc(var(--spacing)*3)}#overlay-root .pb-6{padding-bottom:calc(var(--spacing)*6)}#overlay-root .pb-6505{padding-bottom:calc(var(--spacing)*6505)}#overlay-root .pb-\\[calc\\(var\\(--tg-safe-area-inset-bottom\\)\\+6px\\)\\]{padding-bottom:calc(var(--tg-safe-area-inset-bottom) + 6px)}#overlay-root .pl-2\\.5{padding-left:calc(var(--spacing)*2.5)}#overlay-root .text-center{text-align:center}#overlay-root .text-left{text-align:left}#overlay-root .text-\\[3em\\]{font-size:3em}#overlay-root .text-\\[4em\\]{font-size:4em}#overlay-root .text-\\[6em\\]{font-size:6em}#overlay-root .text-\\[8px\\]{font-size:8px}#overlay-root .text-\\[10px\\]{font-size:10px}#overlay-root .text-\\[13px\\]{font-size:13px}#overlay-root .text-\\[14px\\]{font-size:14px}#overlay-root .text-\\[16px\\]{font-size:16px}#overlay-root .text-\\[24px\\]{font-size:24px}#overlay-root .leading-\\[13px\\]{--tw-leading:13px;line-height:13px}#overlay-root .leading-\\[16px\\]{--tw-leading:16px;line-height:16px}#overlay-root .font-\\[400\\]{--tw-font-weight:400;font-weight:400}#overlay-root .font-\\[590\\]{--tw-font-weight:590;font-weight:590}#overlay-root .font-\\[800\\]{--tw-font-weight:800;font-weight:800}#overlay-root .font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}#overlay-root .tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}#overlay-root .text-wrap{text-wrap:wrap}#overlay-root .text-clip{text-overflow:clip}#overlay-root .text-ellipsis{text-overflow:ellipsis}#overlay-root .whitespace-nowrap{white-space:nowrap}#overlay-root .\\!text-black{color:var(--color-black)!important}#overlay-root .\\!text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)!important}#overlay-root .\\!text-gray-900{color:var(--color-gray-900)!important}#overlay-root .\\!text-white{color:var(--color-white)!important}#overlay-root .text-\\[var\\(--tgui--button_color\\)\\]{color:var(--tgui--button_color)}#overlay-root .text-black{color:var(--color-black)}#overlay-root .text-button-foreground{color:var(--tgui--button_text_color)}#overlay-root .text-gray-900{color:var(--color-gray-900)}#overlay-root .text-inherit{color:inherit}#overlay-root .text-red-500{color:var(--color-red-500)}#overlay-root .text-tgui-hint{color:var(--tgui--hint_color)}#overlay-root .text-tgui-subtitle-text{color:var(--tgui--subtitle_text_color)}#overlay-root .capitalize{text-transform:capitalize}#overlay-root .lowercase{text-transform:lowercase}#overlay-root .normal-case{text-transform:none}#overlay-root .uppercase{text-transform:uppercase}#overlay-root .italic{font-style:italic}#overlay-root .not-italic{font-style:normal}#overlay-root .diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .normal-nums{font-variant-numeric:normal}#overlay-root .oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#overlay-root .line-through{text-decoration-line:line-through}#overlay-root .no-underline{text-decoration-line:none}#overlay-root .overline{text-decoration-line:overline}#overlay-root .underline{text-decoration-line:underline}#overlay-root .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#overlay-root .subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}#overlay-root .opacity-0{opacity:0}#overlay-root .opacity-40{opacity:.4}#overlay-root .opacity-70{opacity:.7}#overlay-root .opacity-100{opacity:1}#overlay-root .mix-blend-overlay{mix-blend-mode:overlay}#overlay-root .inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#overlay-root .ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#overlay-root .shadow{--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)}#overlay-root .shadow-\\[0_0_10px_0_rgba\\(0\\,0\\,0\\,0\\.20\\)\\]{--tw-shadow:0 0 10px 0 var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#overlay-root .outline{outline-style:var(--tw-outline-style);outline-width:1px}#overlay-root .blur{--tw-blur:blur(8px);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,)}#overlay-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);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,)}#overlay-root .grayscale{--tw-grayscale:grayscale(100%);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,)}#overlay-root .invert{--tw-invert:invert(100%);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,)}#overlay-root .sepia{--tw-sepia:sepia(100%);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,)}#overlay-root .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,)}#overlay-root .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,)}#overlay-root .backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-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,)}#overlay-root .backdrop-invert{--tw-backdrop-invert:invert(100%);-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,)}#overlay-root .backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-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,)}#overlay-root .backdrop-filter{-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,)}#overlay-root .\\!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!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}#overlay-root .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;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#overlay-root .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#overlay-root .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#overlay-root .duration-200{--tw-duration:.2s;transition-duration:.2s}#overlay-root .duration-300{--tw-duration:.3s;transition-duration:.3s}#overlay-root .duration-400{--tw-duration:.4s;transition-duration:.4s}#overlay-root .ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}#overlay-root .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}#overlay-root .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}#overlay-root .will-change-transform{will-change:transform}#overlay-root :where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}#overlay-root .ring-inset{--tw-ring-inset:inset}#overlay-root .select-all{-webkit-user-select:all;user-select:all}#overlay-root .before\\:hidden:before{content:var(--tw-content);display:none}@media (width>=40rem){#overlay-root .sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width>=80rem){#overlay-root .xl\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}div#overlay-root [vaul-overlay]{background:var(--tgui--overlay_bg_color)!important}div#overlay-root div[vaul-overlay]{background:#0006!important}.box-opening-modal-drawer[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transition:none!important;animation:none!important;transform:none!important}.box-opening-modal-drawer[vaul-drawer],.box-opening-modal-drawer[vaul-drawer]>*,.box-opening-modal-drawer[vaul-drawer] [role=dialog],.box-opening-modal-drawer[vaul-drawer] [data-vaul-drawer-wrapper]{background:0 0!important}.box-opening-modal-drawer header,.box-opening-modal-drawer [class*=ModalHeader]{z-index:999!important}#overlay-root div#root{z-index:0;position:relative}div#overlay-root{overscroll-behavior:none;scroll-behavior:smooth;pointer-events:none;width:100vw;height:100vh;position:fixed;z-index:9999!important}div#overlay-root.cssdk-overlay-hidden{visibility:hidden;pointer-events:none!important}div#overlay-root.cssdk-overlay-hidden .cssdk-orientation-check{visibility:visible;pointer-events:auto}div#overlay-root div[class*=flex]{display:flex!important}div#overlay-root div[class*=grid]{display:grid!important}div#overlay-root div[class*=inline]{display:inline!important}div#overlay-root div[class*=inline-block]{display:inline-block!important}div#overlay-root div[class*=inline-flex]{display:inline-flex!important}div#overlay-root .flex{display:flex!important}div#overlay-root .inline-flex{display:inline-flex!important}div#overlay-root .grid{display:grid!important}div#overlay-root .inline-grid{display:inline-grid!important}div#overlay-root .block{display:block!important}div#overlay-root .inline-block{display:inline-block!important}div#overlay-root .inline{display:inline!important}div#overlay-root *{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:#0000;-webkit-user-select:none;user-select:none;-ms-overflow-style:none;scrollbar-width:none}div#overlay-root ::-webkit-scrollbar{display:none}div#overlay-root img{pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}div#overlay-root button[class^=tgui]:after{border-radius:inherit}.cssdk-text-rounded{font-family:-apple-system-rounded,Arial Rounded MT,ui-rounded,system-ui,sans-serif!important}.cssdk-page-container{--container-padding:16px;--floating-profile-area-height:0px;--container-padding-top:calc(var(--container-padding) + var(--tg-safe-area-inset-top,0px));--container-padding-bottom:calc(var(--container-bottom-padding,var(--container-padding)) + var(--floating-profile-area-height,0) + var(--tg-safe-area-inset-bottom,0px));--container-padding-left:calc(var(--container-padding) + var(--tg-safe-area-inset-left,0px));--container-padding-right:calc(var(--container-padding) + var(--tg-safe-area-inset-right,0px));padding:var(--container-padding-top)var(--container-padding-right)var(--container-padding-bottom)var(--container-padding-left);box-sizing:border-box;overscroll-behavior:none;background-color:var(--tgui--secondary_bg_color);height:auto;min-height:100dvh;max-height:100dvh;overflow:hidden scroll}.cssdk-floating-profile{box-sizing:border-box;z-index:1;background:var(--tgui--bg_color,#282e33);cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--tg-theme-text-color,#f5f5f5);overscroll-behavior:none;will-change:box-shadow;border:none;font-family:system-ui,-apple-system,BlinkMacSystemFont,Roboto,Apple Color Emoji,Helvetica Neue,sans-serif;transition:box-shadow .3s ease-in-out}.cssdk-floating-profile:hover{cursor:grab}.cssdk-floating-profile:active{cursor:grabbing}.cssdk-floating-profile.cssdk-floating-profile--light{color:var(--tgui--text_color,#f5f5f5);background:var(--tgui--bg_color);box-shadow:var(--floating-profile-shadow)}.cssdk-floating-profile.cssdk-floating-profile--dark{--floating-profile-shadow:0px 0px 1px 1px #ffffff1a,0px 32px 64px 0px #ffffff1a;--floating-profile-shadow-active:0px 0px 1px 1px #ffffff0d,0px 4px 16px 0px #ffffff0d;color:#fff;box-shadow:var(--floating-profile-shadow);background:#000}.cssdk-floating-profile.cssdk-floating-profile--translucent{color:#fff;background:#ffffff26}.cssdk-close-btn{cursor:pointer;color:var(--tgui--hint_color)!important;padding:0!important}.cssdk-close-btn:hover{filter:brightness(1.2)}.cssdk-close-btn:active{filter:brightness(.6)}.cssdk-floating-profile:not(.cssdk-floating-profile--expanded):active{box-shadow:var(--floating-profile-shadow-active)}.cssdk-floating-profile:focus-visible,.cssdk-floating-profile:focus-within{outline:none}.cssdk-profile-modal{max-height:60dvh!important}.cssdk-profile-modal .cssdk-page-container{min-height:0!important;max-height:60dvh!important}@media (orientation:landscape){.cssdk-profile-modal{width:410px!important;max-height:100dvh!important;top:0!important;left:unset!important}.cssdk-profile-modal .cssdk-page-container{min-height:100dvh!important;max-height:100dvh!important}}.cssdk-balance-section{will-change:transform;-webkit-tap-highlight-color:transparent;flex-direction:column;align-items:center;width:100%;display:flex;transform:scale(1);cursor:pointer!important}.cssdk-balance-section:active{transition:transform .2s cubic-bezier(.34,1.56,.64,1);transform:scale(.95)!important}.tmanetwork_close+iframe{z-index:1;position:relative}.cssdk-banner-container{pointer-events:none;justify-content:center;align-items:center;transition:opacity .3s ease-in-out,transform .3s ease-in-out;display:flex;position:fixed;left:0;right:0}.cssdk-banner-top{top:var(--tg-safe-area-inset-top,0px);height:var(--banner-top-height,0px);background:0 0;transform:translateY(-100%)}.cssdk-banner-bottom{bottom:var(--tg-safe-area-inset-bottom,0px);height:var(--banner-bottom-height,0px);background:0 0;transform:translateY(100%)}.cssdk-banner-container:not(:empty){pointer-events:auto}.cssdk-banner-top.cssdk-banner-show,.cssdk-banner-bottom.cssdk-banner-show{transform:translateY(0)}.cssdk-banner-top.cssdk-banner-hide{transform:translateY(-100%)}.cssdk-banner-bottom.cssdk-banner-hide{transform:translateY(100%)}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@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-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@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:"<length>";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-outline-style{syntax:"*";inherits:false;initial-value:solid}@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-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-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}#overlay-root .tgui-f23c0e195677169c{background:var(--tgui--bg_color);overflow:hidden}#overlay-root .tgui-947b927060015de8{max-height:0;transition:max-height .1s ease-in-out}#overlay-root .tgui-60e7968097edfa6f{color:var(--tgui--link_color);transition:transform .15s ease-out}#overlay-root .tgui-c900ecbd6d8d6d5e{transform:rotate(180deg)}#overlay-root .tgui-b8dfba0b5c3d054c{--tgui--cell--middle--padding:16px 0;align-items:center;display:flex;gap:24px;padding:0 24px}#overlay-root .tgui-7b5bccbb645b495f{gap:16px}#overlay-root .tgui-7edaaf0c57797623{background:var(--tgui--tertiary_bg_color)}#overlay-root .tgui-56b2e897ed7ccb22,#overlay-root .tgui-aaa795d78c356ac1{align-items:center;display:flex;justify-content:center}#overlay-root .tgui-8735a62be5a8b8a7{display:flex;flex-direction:column;flex-grow:1;gap:2px;max-width:100%;min-width:0;padding:var(--tgui--cell--middle--padding)}#overlay-root .tgui-1c6d7865a76a19bc,#overlay-root .tgui-8735a62be5a8b8a7>*{overflow:hidden;text-overflow:ellipsis}#overlay-root .tgui-b8dfba0b5c3d054c:not(.tgui-6c49dadccf648a5b) .tgui-1c6d7865a76a19bc,#overlay-root .tgui-b8dfba0b5c3d054c:not(.tgui-6c49dadccf648a5b) .tgui-8735a62be5a8b8a7>*{white-space:nowrap}#overlay-root .tgui-46dd90b57ffed25f{color:var(--tgui--subtitle_text_color)}#overlay-root .tgui-a894f59f4c5ad72f{align-items:center;display:inline-flex;gap:4px}#overlay-root .tgui-bb909928b48f948b,#overlay-root .tgui-d528ef65a8b76273,#overlay-root .tgui-fc059ed3ac5799a6{color:var(--tgui--hint_color)}#overlay-root .tgui-7b5bccbb645b495f{--tgui--cell--middle--padding:12px 0;padding:0 16px}@media (hover:hover) and (pointer:fine){#overlay-root .tgui-b8dfba0b5c3d054c:hover{background:var(--tgui--tertiary_bg_color)}}#overlay-root .tgui-b5d680db78c4cc2e{cursor:pointer;isolation:isolate;position:relative;transition:opacity .15s ease-out}#overlay-root .tgui-b5d680db78c4cc2e[readonly]{cursor:default;pointer-events:visible}#overlay-root .tgui-b5d680db78c4cc2e[disabled]{cursor:default;opacity:.35}#overlay-root .tgui-34eb6f8b96874d40:active,#overlay-root .tgui-7c5d6c1f6bbe3eaf:active{opacity:.65}@media (hover:hover) and (pointer:fine){#overlay-root .tgui-34eb6f8b96874d40:hover,#overlay-root .tgui-7c5d6c1f6bbe3eaf:hover{opacity:.85}}#overlay-root .tgui-8071f6e38c77bc0b{border-radius:inherit;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0;transition:background-color .15s ease-out}#overlay-root .tgui-e156954daf886976{animation:tgui-81605f53eca39186 .3s cubic-bezier(.3,.3,.5,1);background:var(--tgui--outline);border-radius:50%;content:"";height:24px;margin:-12px 0;opacity:0;position:absolute;width:24px}@keyframes tgui-81605f53eca39186{0%{opacity:1;transform:scale(1)}30%{opacity:1}to{opacity:0;transform:scale(8)}}#overlay-root .tgui-30064fce0d501f17{font-size:var(--tgui--subheadline1--font_size);line-height:var(--tgui--subheadline1--line_height)}#overlay-root .tgui-8f63cd31b2513281{font-size:var(--tgui--subheadline2--font_size);line-height:var(--tgui--subheadline2--line_height)}#overlay-root .tgui-c3e2e598bd70eee6{font-family:var(--tgui--font-family)}#overlay-root .tgui-080a44e6ac3f4d27{margin:0}#overlay-root .tgui-5c92f90c2701fa17{font-weight:var(--tgui--font_weight--accent1)}#overlay-root .tgui-809f1f8a3f64154d{font-weight:var(--tgui--font_weight--accent2)}#overlay-root .tgui-5b8bdfbd2af10f59{font-weight:var(--tgui--font_weight--accent3)}#overlay-root .tgui-c602097b30e4ede9{text-transform:uppercase}#overlay-root .tgui-2916d621b0ea5857{font-size:var(--tgui--caption1--font_size);line-height:var(--tgui--caption1--line_height)}#overlay-root .tgui-937d123c23df98b3{font-size:var(--tgui--caption2--font_size);line-height:var(--tgui--caption2--line_height)}#overlay-root .tgui-65c206f0fd891b6b{font-size:var(--tgui--text--font_size);line-height:var(--tgui--text--line_height)}#overlay-root .tgui-91c5537b51b490a7{border-radius:50%}#overlay-root .tgui-305551eb3f5abb68.tgui-305551eb3f5abb68{background-color:var(--tgui--secondary_fill);color:var(--tgui--link_color)}#overlay-root .tgui-30d8642662534eb5{align-items:center;background-color:var(--tgui--tertiary_bg_color);box-shadow:0 0 0 1px var(--tgui--outline);display:flex;justify-content:center;position:relative}#overlay-root .tgui-1191c597a64dbd25{border-radius:inherit;display:block;height:100%;-o-object-fit:cover;object-fit:cover;position:absolute;visibility:hidden;width:100%}#overlay-root .tgui-72bd4140eca37f53 .tgui-1191c597a64dbd25{visibility:visible}#overlay-root .tgui-5ee2f1c6e1da49b5{align-items:center;display:flex;justify-content:center;position:absolute}#overlay-root .tgui-e3bcc434a6ee9317{position:absolute;right:-12px;top:-12px}#overlay-root .tgui-562f7459d74103ea{align-items:center;border-radius:20px;box-sizing:border-box;display:inline-flex;height:20px;justify-content:center;margin:0 6px;min-width:20px;padding:0 5px}#overlay-root .tgui-c1a5e9170826a773{height:24px;padding:0 6px}#overlay-root .tgui-4f69ed647e40e245{border-radius:50%;display:inline-block;height:6px;margin:7px;width:6px}#overlay-root .tgui-6e63faaa2b33f4ae{background:var(--tgui--button_color);color:var(--tgui--button_text_color)}#overlay-root .tgui-4b52474c713ffa7c{background:var(--tgui--destructive_text_color);color:var(--tgui--button_text_color)}#overlay-root .tgui-0278f262d68294f0{background:var(--tgui--secondary_fill);color:var(--tgui--link_color)}#overlay-root .tgui-0883e451f3707277{background:var(--tgui--plain_background);color:var(--tgui--plain_foreground)}#overlay-root .tgui-6b3dbcedd9052940{background:var(--tgui--white);color:var(--tgui--link_color)}#overlay-root .tgui-e05fce4753086879{font-size:var(--tgui--headline--font_size);line-height:var(--tgui--headline--line_height)}#overlay-root .tgui-c6d7432a5c12debe{font-size:var(--tgui--large_title--font_size);line-height:var(--tgui--large_title--line_height)}#overlay-root .tgui-2fc52ee93e8068a6{font-size:var(--tgui--title1--font_size);line-height:var(--tgui--title1--line_height)}#overlay-root .tgui-72c2a480384c4fb1{font-size:var(--tgui--title2--font_size);line-height:var(--tgui--title2--line_height)}#overlay-root .tgui-45c5f45d3e9105f4{font-size:var(--tgui--title3--font_size);line-height:var(--tgui--title3--line_height)}#overlay-root .tgui-54214e0db34f53c3{position:absolute;right:-12px;top:0}#overlay-root .tgui-28e0a2576155be01{display:flex}#overlay-root .tgui-28e0a2576155be01>:not(:first-child){margin-left:-12px}#overlay-root .tgui-28e0a2576155be01>*{box-shadow:0 0 0 3px var(--tgui--bg_color)}#overlay-root .tgui-c3d21871b48e0ba3{background:var(--tgui--bg_color);display:flex;gap:20px;overflow:hidden;padding:16px 20px;position:relative}#overlay-root .tgui-7b260d7ad33f3ba0:not(.tgui-f80265c401d577b0){box-shadow:var(--tgui--base--section--box_shadow)}#overlay-root .tgui-cefdf70a2d9648ea{border-radius:16px}#overlay-root .tgui-f80265c401d577b0{padding:20px}#overlay-root .tgui-f80265c401d577b0 .tgui-2646957e5c9379f3{color:var(--tgui--white)}#overlay-root .tgui-f80265c401d577b0 .tgui-62a759a0c54c3667{color:var(--tgui--white);opacity:.8}#overlay-root .tgui-d67d90bbcab86e14{background:var(--tgui--bg_color)}#overlay-root .tgui-7b260d7ad33f3ba0.tgui-d67d90bbcab86e14{border:1px solid var(--tgui--outline);border-radius:16px;box-shadow:none;margin:8px 20px}#overlay-root .tgui-cefdf70a2d9648ea.tgui-d67d90bbcab86e14{background:var(--tgui--quartenary_bg_color);margin:8px 16px}#overlay-root .tgui-11921b54915b369c{bottom:0;left:0;position:absolute;right:0;top:0}#overlay-root .tgui-a04b768cea14d789{display:flex;flex:1 1 0;flex-direction:column;gap:2px;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-62a759a0c54c3667{color:var(--tgui--subtitle_text_color)}#overlay-root .tgui-1e638bcb841cdfbc{color:var(--tgui--hint_color)}#overlay-root .tgui-5e0d89b3bc8342d8{display:flex;gap:4px;margin-top:10px}#overlay-root .tgui-fa2f2ea4a4ffc035{border-radius:50%;height:28px}#overlay-root .tgui-79024fcb6d81ad79{background:var(--tgui--secondary_fill);border-left:3px solid var(--tgui--link_color);border-radius:4px;padding:6px 28px 8px 12px;position:relative}#overlay-root .tgui-16ed20e7a6e2daa0{color:var(--tgui--text_color)}#overlay-root .tgui-bd5b6cd161834705{display:block;position:absolute;right:6px;top:4px}#overlay-root .tgui-6c9b3f1fd52a3108{color:var(--tgui--link_color)}#overlay-root .tgui-117e77cd385a9c8d{align-items:center;border:none;border-radius:8px;box-sizing:border-box;display:inline-flex;justify-content:center;max-width:100%;min-width:80px;text-decoration:none}#overlay-root .tgui-726846958fe7f4a0{flex-grow:1;width:100%}#overlay-root .tgui-117e77cd385a9c8d:after{background:var(--tgui--bg_color);bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .15s ease-out}#overlay-root .tgui-06cc94d03a7c4dd7,#overlay-root .tgui-8310172a5320ab71{align-items:center;display:flex;justify-content:center}#overlay-root .tgui-5f6014c0f063b6de{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-014f2b7d196b090d.tgui-014f2b7d196b090d{align-items:center;background:inherit;border-radius:inherit;color:var(--tgui--button--spinner-color);cursor:auto;display:flex;height:100%;justify-content:center;position:absolute;width:100%}#overlay-root .tgui-13f23a224303ddaa{border-radius:20px;gap:6px;height:36px;min-width:34px;padding:8px 12px}#overlay-root .tgui-1a16a49d89076ff4{gap:8px;height:42px;min-width:42px;padding:8px 14px}#overlay-root .tgui-9cef742a22f195c9{gap:10px;height:50px;padding:10px 20px}#overlay-root .tgui-8a1ca9efa24f4809{--tgui--button--hovered-opacity:.15;--tgui--button--spinner-color:var(--tgui--button_text_color);background:var(--tgui--button_color);color:var(--tgui--button_text_color)}#overlay-root .tgui-91bda9a36246a33c{--tgui--button--hovered-opacity:.07;--tgui--button--spinner-color:var(--tgui--link_color);background:var(--tgui--secondary_fill);color:var(--tgui--link_color)}#overlay-root .tgui-48956537c34690db{--tgui--button--hovered-opacity:.03;--tgui--button--spinner-color:var(--tgui--plain_foreground);background:transparent;color:var(--tgui--link_color)}#overlay-root .tgui-93106efd6b6d66ee{background:var(--tgui--plain_background)}#overlay-root .tgui-93106efd6b6d66ee,#overlay-root .tgui-e884e36ff1faa596{--tgui--button--hovered-opacity:.5;--tgui--button--spinner-color:var(--tgui--plain_foreground);color:var(--tgui--plain_foreground)}#overlay-root .tgui-e884e36ff1faa596{background:inherit;box-shadow:0 0 0 1px var(--tgui--outline)}#overlay-root .tgui-ba6d30cc81e39ae5{--tgui--button--hovered-opacity:.5;--tgui--button--spinner-color:var(--tgui--surface_dark);background:var(--tgui--white)}#overlay-root .tgui-55e8aa7f5cea2280.tgui-1a16a49d89076ff4{border-radius:12px}#overlay-root .tgui-55e8aa7f5cea2280:after{content:unset}#overlay-root .tgui-490cb0f5ec4998f3 .tgui-06cc94d03a7c4dd7,#overlay-root .tgui-490cb0f5ec4998f3 .tgui-5f6014c0f063b6de,#overlay-root .tgui-490cb0f5ec4998f3 .tgui-8310172a5320ab71{opacity:0}@media (hover:hover) and (pointer:fine){#overlay-root .tgui-117e77cd385a9c8d:hover:after{opacity:var(--tgui--button--hovered-opacity)}}#overlay-root .tgui-0ac8c3540e603b63{color:var(--tgui--link_color)}#overlay-root .tgui-562a3eae646b486d{color:var(--tgui--hint_color)}#overlay-root .tgui-dbf261f4b3046bb3{background:var(--tgui--tertiary_bg_color);border-radius:20px;box-shadow:0 32px 64px #0000000a,0 0 2px 1px #00000005;display:inline-block;overflow:hidden;position:relative}#overlay-root .tgui-c6ad96fdf8ce4b28{background:var(--tgui--plain_foreground)}#overlay-root .tgui-80c6a0ba7b3c11fd{--tgui--cell--middle--padding:16px 0;background:var(--tgui--card_bg_color);padding:0 20px}#overlay-root .tgui-814d1971a92687e3{--tgui--text_color:var(--tgui--white);--tgui--hint_color:hsla(0,0%,100%,.75);background:linear-gradient(180deg,transparent 0,var(--tgui--black) 100%);bottom:0;left:0;padding-top:48px;position:absolute;right:0}#overlay-root .tgui-422c21c917cc0873{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:break-spaces}#overlay-root .tgui-27c5a061c5f35c04{font-weight:var(--tgui--font_weight--accent2)}#overlay-root .tgui-814d1971a92687e3 .tgui-27c5a061c5f35c04{color:var(--tgui--white)}#overlay-root .tgui-79efb12936705a6f{position:absolute;right:16px;top:16px}#overlay-root .tgui-6372c64c79ad2959{align-items:center;border-radius:10px;box-sizing:border-box;display:inline-flex;gap:8px;justify-content:center;padding:8px 12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}#overlay-root .tgui-b8b077d7e3491b30{background:var(--tgui--surface_primary);box-shadow:0 12px 24px #0000000d}#overlay-root .tgui-ccc3e4a302799418{background:var(--tgui--plain_background)}#overlay-root .tgui-fdfccf8f92c11530{border-radius:10px;box-shadow:0 0 0 1px var(--tgui--outline)}#overlay-root .tgui-9c7ff8cd23a6ea9a{color:var(--tgui--plain_foreground);flex:1 1 0;overflow:hidden;text-overflow:ellipsis}#overlay-root .tgui-0d7ce20ebc0fc7aa{margin-right:2px}#overlay-root .tgui-67f596882eb2b6ab{align-items:center;color:var(--tgui--secondary_hint_color);display:flex;margin-top:1.5px}#overlay-root .tgui-a8ce18a8594cea9b{align-items:center;background:transparent;border:none;color:var(--tgui--link_color);display:flex;gap:24px;height:48px;padding:10px 24px;width:100%}#overlay-root .tgui-6e7ca796043fe6ca{color:var(--tgui--destructive_text_color)}#overlay-root .tgui-f464dba82cb8b46e{gap:18px;height:44px;padding:8px 18px}#overlay-root .tgui-c5be765fabc1327f{text-align:right}#overlay-root .tgui-437ab2028f14c95c{align-items:center;color:var(--tgui--secondary_hint_color);display:flex;gap:12px}#overlay-root .tgui-4af039094fb946b4{color:var(--tgui--hint_color);margin:2px 0 0}#overlay-root .tgui-97dd747d03e9d3e0{align-items:center;color:var(--tgui--hint_color);display:flex;gap:8px}#overlay-root .tgui-64a5a0dc5509605e{flex-grow:1;overflow-wrap:anywhere}#overlay-root .tgui-3b026a2674eb3f4c{flex-shrink:0}#overlay-root .tgui-dda0e80fdf796ba5{border:none;border-radius:12px;display:inline-flex;padding:8px}#overlay-root .tgui-b92d762e02762017{border-radius:50%;padding:6px}#overlay-root .tgui-93cba8aff2e72079{background:var(--tgui--secondary_fill);color:var(--tgui--link_color)}#overlay-root .tgui-08ef1486bc111162{background:transparent;color:var(--tgui--link_color)}#overlay-root .tgui-2250ff52f0b5cf71{background:var(--tgui--plain_background);color:var(--tgui--plain_foreground)}#overlay-root .tgui-53781f3cf83e8be1{background:inherit;box-shadow:0 0 0 1px var(--tgui--outline);color:var(--tgui--plain_foreground)}#overlay-root .tgui-39e9f02ce4b4b950{display:flex;gap:12px}#overlay-root .tgui-b3d7f75461a64b76{gap:8px}#overlay-root .tgui-c5545e0bc6105e48{align-items:center;background:transparent;border:none;border-radius:12px;box-sizing:border-box;color:var(--tgui--link_color);display:flex;flex:1 0 0;flex-direction:column;gap:3px;justify-content:center;max-width:100%;min-height:60px;min-width:64px;padding:0 12px}#overlay-root .tgui-bf32cd3c110b8729{gap:4px;min-height:64px;min-width:72px}#overlay-root .tgui-99a630d0096f2169{background:var(--tgui--secondary_fill)}#overlay-root .tgui-30bf4976f818e8bf{background:var(--tgui--plain_background);color:var(--tgui--plain_foreground)}#overlay-root .tgui-c0c9bf3b1a53a8a4{max-width:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-389a43acd684137a>:not(:last-child){margin-bottom:12px}#overlay-root .tgui-cfed40fe81d34ad5{box-sizing:border-box;padding:10px 18px}#overlay-root .tgui-e5c3a5b87f8b1f46{align-items:center;display:flex;flex-direction:column;gap:24px;justify-content:center;overflow:hidden;padding:32px}#overlay-root .tgui-9c3dbc0ef84585d4{margin:0;overflow-wrap:anywhere;text-align:center}#overlay-root .tgui-87cd6af55f73428d{color:var(--tgui--hint_color)}#overlay-root .tgui-87cd6af55f73428d:not(:first-child){margin-top:8px}#overlay-root .tgui-8e15431b81f6601e .tgui-db9be63c4fecf79b{background:var(--tgui--section_bg_color);box-shadow:0 1px 2px #0000001a}#overlay-root .tgui-97eca24324122dbc .tgui-4b78bed6e925088e{background:var(--tgui--section_bg_color);border-radius:12px}#overlay-root .tgui-97eca24324122dbc .tgui-4b78bed6e925088e>:first-child{border-radius:12px 12px 0 0}#overlay-root .tgui-97eca24324122dbc .tgui-4b78bed6e925088e>:last-child{border-radius:0 0 12px 12px}#overlay-root .tgui-97eca24324122dbc .tgui-4b78bed6e925088e>:only-child{border-radius:12px}#overlay-root .tgui-8af0d10d5540c6cc{border-top:none;border-color:var(--tgui--outline);border-width:var(--tgui--border--width);margin:0}#overlay-root .tgui-dbb364e8ced00cc8{padding:12px 24px}#overlay-root .tgui-8c4c6f82ba895475{padding:8px 16px 0}#overlay-root .tgui-8ebba379083b615a{padding:16px 24px 20px;text-align:center}#overlay-root .tgui-8c4c6f82ba895475.tgui-8ebba379083b615a{padding:16px 16px 0}#overlay-root .tgui-67471b69da3e3062{color:var(--tgui--section_header_text_color)}#overlay-root .tgui-d0251b46536ac046{color:var(--tgui--link_color);padding:20px 24px 4px 22px}#overlay-root .tgui-34fd1a25cc171439{color:var(--tgui--text_color);padding-left:24px}#overlay-root .tgui-b7217abb24e8763a{color:var(--tgui--section_header_text_color);padding:16px 16px 8px}#overlay-root .tgui-b7217abb24e8763a.tgui-34fd1a25cc171439{color:var(--tgui--text_color);padding:0 0 12px}#overlay-root .tgui-f492b616576c67fb{display:flex;gap:9px;padding:12px}#overlay-root .tgui-d45985ba4cb27e5f{background:var(--tgui--tertiary_bg_color);border-radius:2px;height:3px;min-width:3px;width:100%}#overlay-root .tgui-352b8d247f473986{background:var(--tgui--link_color)}#overlay-root .tgui-b53f1370d519b689{display:flex;flex-direction:column;gap:24px;margin:0;padding:32px 44px}#overlay-root .tgui-732e8859c58ffb77{flex-direction:row}#overlay-root .tgui-4614301efc783534{display:flex;overflow-x:scroll;-webkit-overflow-scrolling:touch;scrollbar-width:none}#overlay-root .tgui-4e145f66199825da::-webkit-scrollbar{display:none}#overlay-root .tgui-caaaa27ccfa566b7{--tgui--timeline--item--thickness:4px;--tgui--timeline--item--size:12px;display:flex;gap:32px}#overlay-root .tgui-caaaa27ccfa566b7:last-child .tgui-3fc2f0d7045d23d8{display:none}#overlay-root .tgui-0f46575488c31b93{min-width:var(--tgui--timeline--item--size);position:relative}#overlay-root .tgui-d7ba9c56743387af{border-radius:50%;height:var(--tgui--timeline--item--size);left:0;top:4px;width:var(--tgui--timeline--item--size)}#overlay-root .tgui-3fc2f0d7045d23d8,#overlay-root .tgui-d7ba9c56743387af{background:var(--tgui--quartenary_bg_color);position:absolute}#overlay-root .tgui-3fc2f0d7045d23d8{border-radius:2px;bottom:0;height:calc(100% - 4px);left:50%;top:24px;transform:translate(-50%);width:var(--tgui--timeline--item--thickness)}#overlay-root .tgui-bf9f87dd32ecad81{overflow:hidden}#overlay-root .tgui-2b850faa8f3a520a{display:inline-block;margin-bottom:4px}#overlay-root .tgui-b9a4d9afcd70e355{color:var(--tgui--hint_color)}#overlay-root .tgui-581d134185fd28b4 .tgui-d7ba9c56743387af,#overlay-root .tgui-dcd66bc07faad440 .tgui-3fc2f0d7045d23d8,#overlay-root .tgui-dcd66bc07faad440 .tgui-d7ba9c56743387af{background:var(--tgui--link_color)}#overlay-root .tgui-566b727e7a35e935 .tgui-0f46575488c31b93{--tgui--timeline--item--size:16px}#overlay-root .tgui-566b727e7a35e935 .tgui-d7ba9c56743387af{top:6px}#overlay-root .tgui-566b727e7a35e935 .tgui-3fc2f0d7045d23d8{height:calc(100% + 26px);top:6px}#overlay-root .tgui-f461f2eeb28c21d0{flex-direction:column;gap:24px}#overlay-root .tgui-f461f2eeb28c21d0 .tgui-0f46575488c31b93{align-items:center;display:flex;height:var(--tgui--timeline--item--size)}#overlay-root .tgui-f461f2eeb28c21d0 .tgui-d7ba9c56743387af{top:0}#overlay-root .tgui-f461f2eeb28c21d0 .tgui-3fc2f0d7045d23d8{height:var(--tgui--timeline--item--thickness);left:0;top:50%;transform:translateY(-50%);width:calc(100% + 36px)}#overlay-root .tgui-f461f2eeb28c21d0 .tgui-2b850faa8f3a520a{white-space:nowrap}#overlay-root .tgui-81a5164cd16c05d5{stroke:var(--tgui--link_color);transform:rotate(-90deg)}#overlay-root .tgui-ced47fd163a53511{border-radius:2px;height:4px;overflow:hidden;position:relative}#overlay-root .tgui-44060f289fdbdb84:after{bottom:0;content:"";left:0;opacity:.4;right:0;top:0}#overlay-root .tgui-027278a6d6708965,#overlay-root .tgui-44060f289fdbdb84:after{background:var(--tgui--link_color);position:absolute}#overlay-root .tgui-027278a6d6708965{border-radius:inherit;height:100%;transition:width .2s ease;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-97f2df57786b02dc{position:relative}#overlay-root .tgui-3eb6091f664c15d6:after,#overlay-root .tgui-3eb6091f664c15d6:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-97f2df57786b02dc:before{background:var(--tgui--secondary_bg_color)}#overlay-root .tgui-97f2df57786b02dc:not(.tgui-ecf101b3117a96c8):after{animation:tgui-3a837cc9661e7502 1.8s linear infinite;background-color:var(--tgui--bg_color);z-index:var(--tgui--z-index--skeleton)}@keyframes tgui-3a837cc9661e7502{0%,to{opacity:.4}50%{opacity:.7}}#overlay-root .tgui-bed09b0692380ce7{animation:tgui-738ce40067f9bb6e .34s cubic-bezier(.3,.3,.5,1);bottom:10px;box-sizing:border-box;left:10px;max-width:460px;position:fixed;right:10px;transition:transform .32s cubic-bezier(.3,.3,.5,1);-webkit-user-select:none;-moz-user-select:none;user-select:none}#overlay-root .tgui-a869502f11f22b6c{align-items:center;-webkit-backdrop-filter:blur(28px);backdrop-filter:blur(28px);background:var(--tgui--surface_dark);border-radius:10px;bottom:0;box-sizing:border-box;display:flex;gap:12px;left:0;padding:10px 16px 10px 10px;position:sticky;right:0;top:0;width:100%}#overlay-root .tgui-a1e25a2488982fc5{transform:translate3d(0,140%,0)}#overlay-root .tgui-c2ca59c94a46245e{bottom:16px}#overlay-root .tgui-c2ca59c94a46245e .tgui-a869502f11f22b6c{border-radius:14px}#overlay-root .tgui-093aea87229643ac,#overlay-root .tgui-229bfa1a0a8ac43f{align-items:center;color:var(--tgui--toast_accent_color);display:flex}#overlay-root .tgui-7d8f183ba67229e9{color:var(--tgui--white);display:flex;flex:1 1 0;flex-direction:column;gap:1px}@keyframes tgui-738ce40067f9bb6e{0%{transform:translate3d(0,140%,0)}to{transform:translateZ(0)}}#overlay-root .tgui-4d26fba7185ffa9f{background:transparent;border:none;color:var(--tgui--toast_accent_color);padding:0}#overlay-root .tgui-86f452d8e92a2075{display:table;position:relative}#overlay-root .tgui-86f452d8e92a2075:before{background-color:var(--tgui--bg_color);background-image:url("data:image/svg+xml,%3csvg%20width='72'%20height='66'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23a)'%20filter='url(%23b)'%20fill='%23000'%3e%3ccircle%20opacity='.75'%20cx='37.5'%20cy='8.5'%20r='.5'/%3e%3ccircle%20cx='4'%20cy='36'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='51.5'%20cy='29.5'%20r='.5'/%3e%3ccircle%20cx='63.5'%20cy='29.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='43.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='2'%20cy='41'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='34.5'%20cy='11.5'%20r='1.5'/%3e%3ccircle%20cx='20'%20cy='17'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='29.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20cx='14.5'%20cy='1.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='68.5'%20cy='32.5'%20r='1.5'/%3e%3ccircle%20cx='35'%20cy='54'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='35'%20cy='2'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='31.5'%20cy='59.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='68'%20cy='40'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='4.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='7.5'%20cy='28.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='30.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='67.5'%20cy='3.5'%20r='1.5'/%3e%3ccircle%20cx='43.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='.5'%20cy='26.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='25.5'%20cy='9.5'%20r='.5'/%3e%3ccircle%20cx='36.5'%20cy='26.5'%20r='.5'/%3e%3ccircle%20cx='54.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='18.5'%20cy='36.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='3.5'%20cy='63.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='70.5'%20cy='48.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='26.5'%20cy='8.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='57.5'%20cy='31.5'%20r='.5'/%3e%3ccircle%20cx='34'%20cy='17'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='45'%20cy='31'%20r='1'/%3e%3ccircle%20cx='44.5'%20cy='46.5'%20r='1.5'/%3e%3ccircle%20cx='33'%20cy='36'%20r='1'/%3e%3ccircle%20cx='28.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20cx='61.5'%20cy='27.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='44.5'%20cy='43.5'%20r='.5'/%3e%3ccircle%20cx='54.5'%20cy='37.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='1.5'%20cy='30.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='64'%20cy='16'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='1.5'%20cy='47.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='59.5'%20cy='.5'%20r='.5'/%3e%3ccircle%20cx='5.5'%20cy='50.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='35.5'%20r='1.5'/%3e%3ccircle%20cx='30'%20cy='60'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='57'%20cy='33'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='8'%20cy='54'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='35.5'%20cy='40.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='11.5'%20cy='54.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='46.5'%20cy='29.5'%20r='.5'/%3e%3ccircle%20cx='19'%20cy='13'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='5.5'%20cy='14.5'%20r='1.5'/%3e%3ccircle%20cx='3.5'%20cy='2.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='46'%20cy='29'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='43'%20cy='25'%20r='1'/%3e%3ccircle%20cx='4.5'%20cy='6.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='12'%20cy='34'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='10.5'%20cy='18.5'%20r='.5'/%3e%3ccircle%20cx='61.5'%20cy='3.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='68.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20cx='42.5'%20cy='59.5'%20r='1.5'/%3e%3ccircle%20cx='65.5'%20cy='46.5'%20r='1.5'/%3e%3ccircle%20cx='62.5'%20cy='65.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='63.5'%20r='.5'/%3e%3ccircle%20cx='19.5'%20cy='16.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='9.5'%20cy='29.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='27'%20cy='3'%20r='1'/%3e%3ccircle%20cx='40'%20cy='48'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='9'%20cy='7'%20r='1'/%3e%3ccircle%20cx='52.5'%20cy='38.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='71'%20cy='15'%20r='1'/%3e%3ccircle%20cx='11.5'%20cy='20.5'%20r='1.5'/%3e%3ccircle%20cx='31.5'%20cy='16.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='10.5'%20cy='53.5'%20r='.5'/%3e%3ccircle%20cx='41.5'%20cy='55.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='52.5'%20cy='62.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='27'%20cy='19'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='1.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20cx='50'%20cy='62'%20r='1'/%3e%3ccircle%20cx='47'%20cy='1'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='54.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='38'%20cy='21'%20r='1'/%3e%3ccircle%20cx='59'%20cy='62'%20r='1'/%3e%3ccircle%20cx='54.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='11'%20cy='9'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='15.5'%20cy='37.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='6.5'%20cy='41.5'%20r='1.5'/%3e%3ccircle%20cx='67.5'%20cy='22.5'%20r='1.5'/%3e%3ccircle%20cx='12.5'%20cy='16.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='17'%20cy='31'%20r='1'/%3e%3ccircle%20cx='14.5'%20cy='58.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='69'%20cy='19'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='57'%20cy='46'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='2'%20cy='25'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='32'%20cy='35'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='26'%20cy='16'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='55'%20cy='57'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='9.5'%20cy='6.5'%20r='.5'/%3e%3ccircle%20cx='61.5'%20cy='35.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='5.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='65.5'%20cy='23.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='38.5'%20cy='23.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='22'%20cy='3'%20r='1'/%3e%3ccircle%20cx='18.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20cx='54.5'%20cy='52.5'%20r='.5'/%3e%3ccircle%20cx='69.5'%20cy='54.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='63.5'%20cy='24.5'%20r='.5'/%3e%3ccircle%20cx='6.5'%20cy='34.5'%20r='1.5'/%3e%3ccircle%20cx='60'%20cy='4'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='35'%20cy='34'%20r='1'/%3e%3ccircle%20cx='43.5'%20cy='64.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='5.5'%20cy='33.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='71.5'%20cy='14.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='6.5'%20cy='49.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='66'%20cy='33'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='41'%20cy='54'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='7'%20cy='13'%20r='1'/%3e%3ccircle%20cx='47.5'%20cy='30.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='13'%20cy='31'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='51.5'%20cy='8.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='45.5'%20cy='6.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='4'%20cy='59'%20r='1'/%3e%3ccircle%20cx='15'%20cy='23'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='63'%20cy='47'%20r='1'/%3e%3ccircle%20cx='7'%20cy='31'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='2'%20cy='12'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='50.5'%20cy='35.5'%20r='.5'/%3e%3ccircle%20cx='12'%20cy='35'%20r='1'/%3e%3ccircle%20cx='22.5'%20cy='54.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='60.5'%20cy='53.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='39.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='68.5'%20cy='64.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='18.5'%20cy='37.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='8.5'%20cy='27.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='48.5'%20cy='46.5'%20r='.5'/%3e%3ccircle%20cx='60.5'%20cy='1.5'%20r='1.5'/%3e%3ccircle%20cx='11.5'%20cy='62.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='39.5'%20cy='47.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='25.5'%20cy='1.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='50.5'%20cy='8.5'%20r='1.5'/%3e%3ccircle%20cx='40.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='9.5'%20cy='8.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='66.5'%20cy='57.5'%20r='.5'/%3e%3ccircle%20cx='16'%20cy='39'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='12'%20cy='44'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='44.5'%20cy='28.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='41.5'%20cy='4.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='27.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20cx='63.5'%20cy='56.5'%20r='.5'/%3e%3ccircle%20cx='34.5'%20cy='45.5'%20r='.5'/%3e%3ccircle%20cx='10.5'%20cy='50.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='17'%20cy='2'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='60.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='49.5'%20cy='34.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='41'%20cy='39'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='32.5'%20cy='41.5'%20r='.5'/%3e%3ccircle%20cx='25.5'%20cy='2.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='36.5'%20cy='40.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='49'%20cy='28'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='27'%20cy='41'%20r='1'/%3e%3ccircle%20cx='2.5'%20cy='26.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='40.5'%20cy='19.5'%20r='.5'/%3e%3ccircle%20cx='11.5'%20cy='52.5'%20r='.5'/%3e%3ccircle%20cx='65.5'%20cy='33.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='52.5'%20cy='19.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='17'%20cy='15'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='16.5'%20cy='11.5'%20r='1.5'/%3e%3ccircle%20cx='20.5'%20cy='9.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='36.5'%20cy='4.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='31.5'%20cy='9.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='71'%20cy='18'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='40'%20cy='50'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='22.5'%20cy='37.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='47'%20cy='51'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='61.5'%20cy='5.5'%20r='1.5'/%3e%3ccircle%20cx='70.5'%20cy='34.5'%20r='.5'/%3e%3ccircle%20cx='14'%20cy='34'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='20'%20cy='33'%20r='1'/%3e%3ccircle%20cx='7.5'%20cy='17.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='14.5'%20cy='41.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='69'%20cy='63'%20r='1'/%3e%3ccircle%20cx='25'%20cy='35'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='43'%20cy='32'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='5.5'%20cy='44.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='29.5'%20cy='14.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='42.5'%20cy='57.5'%20r='.5'/%3e%3ccircle%20cx='42'%20cy='42'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='10.5'%20cy='13.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='57.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='19.5'%20cy='29.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='20.5'%20cy='34.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='7.5'%20cy='17.5'%20r='.5'/%3e%3ccircle%20cx='13'%20cy='61'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='23.5'%20cy='49.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='69.5'%20cy='10.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='15'%20cy='60'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='54'%20cy='53'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='10'%20cy='57'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='45.5'%20cy='10.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='67.5'%20cy='57.5'%20r='.5'/%3e%3ccircle%20cx='60.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='35.5'%20cy='59.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='40'%20cy='26'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='35.5'%20cy='38.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='54.5'%20cy='26.5'%20r='1.5'/%3e%3ccircle%20cx='52.5'%20cy='5.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='37.5'%20cy='9.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='64.5'%20cy='52.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='61'%20cy='7'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='24.5'%20cy='19.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='4'%20cy='59'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='14.5'%20cy='51.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='26.5'%20cy='42.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='8.5'%20cy='33.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='2.5'%20r='1.5'/%3e%3ccircle%20cx='33'%20cy='61'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='70.5'%20cy='24.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='36.5'%20cy='18.5'%20r='1.5'/%3e%3ccircle%20cx='61.5'%20cy='57.5'%20r='.5'/%3e%3ccircle%20cx='43'%20cy='31'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='50'%20cy='11'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='44.5'%20cy='20.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='59.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20cx='40.5'%20cy='58.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='59.5'%20cy='44.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='23.5'%20cy='30.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='36'%20cy='1'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='28.5'%20cy='13.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='39.5'%20cy='11.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='49'%20cy='38'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='68'%20cy='50'%20r='1'/%3e%3ccircle%20cx='44.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='17.5'%20cy='27.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='23'%20cy='37'%20r='1'/%3e%3ccircle%20cx='-.5'%20cy='60.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='19'%20cy='26'%20r='1'/%3e%3ccircle%20cx='57.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='11.5'%20cy='13.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='56.5'%20cy='48.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='29'%20cy='53'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='3'%20cy='22'%20r='1'/%3e%3ccircle%20cx='8.5'%20cy='63.5'%20r='.5'/%3e%3ccircle%20cx='57.5'%20cy='4.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='63.5'%20cy='4.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='10.5'%20cy='16.5'%20r='1.5'/%3e%3ccircle%20cx='41.5'%20cy='16.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='40.5'%20cy='47.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='60'%20cy='22'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='14.5'%20cy='37.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='15'%20cy='18'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='16.5'%20cy='24.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='8.5'%20cy='64.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='58'%20cy='51'%20r='1'/%3e%3ccircle%20cx='69'%20cy='12'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='39'%20cy='52'%20r='1'/%3e%3ccircle%20cx='51.5'%20cy='9.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='13.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='26.5'%20cy='38.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='63'%20cy='13'%20r='1'/%3e%3ccircle%20cx='39.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='46'%20cy='31'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='40.5'%20cy='13.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='33.5'%20cy='50.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='1.5'%20cy='47.5'%20r='.5'/%3e%3ccircle%20cx='15.5'%20cy='5.5'%20r='1.5'/%3e%3ccircle%20cx='40.5'%20cy='24.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='24.5'%20cy='59.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='45.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20cx='53.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20cx='28'%20cy='34'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='25.5'%20cy='42.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='63.5'%20cy='45.5'%20r='.5'/%3e%3ccircle%20cx='56.5'%20cy='25.5'%20r='1.5'/%3e%3ccircle%20cx='53.5'%20cy='60.5'%20r='1.5'/%3e%3ccircle%20cx='9.5'%20cy='3.5'%20r='1.5'/%3e%3ccircle%20cx='68'%20cy='61'%20r='1'/%3e%3ccircle%20cx='31.5'%20cy='14.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='14.5'%20cy='25.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='8.5'%20cy='55.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='63.5'%20cy='39.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='52.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='13'%20cy='48'%20r='1'/%3e%3ccircle%20cx='40'%20cy='22'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='12'%20cy='23'%20r='1'/%3e%3ccircle%20cx='16.5'%20cy='42.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='17.5'%20cy='28.5'%20r='1.5'/%3e%3ccircle%20cx='63'%20cy='2'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='65'%20cy='12'%20r='1'/%3e%3ccircle%20cx='13.5'%20cy='3.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='31.5'%20cy='36.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='3.5'%20cy='17.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='60.5'%20cy='47.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='13.5'%20cy='45.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='50.5'%20cy='31.5'%20r='.5'/%3e%3ccircle%20cx='64'%20cy='19'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='30.5'%20cy='48.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='19.5'%20cy='7.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='52'%20cy='22'%20r='1'/%3e%3ccircle%20cx='2'%20cy='6'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='46'%20cy='54'%20r='1'/%3e%3ccircle%20cx='57.5'%20cy='13.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='30.5'%20cy='52.5'%20r='.5'/%3e%3ccircle%20cx='38.5'%20cy='60.5'%20r='.5'/%3e%3ccircle%20cx='65.5'%20cy='41.5'%20r='.5'/%3e%3ccircle%20cx='60'%20cy='54'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='47.5'%20cy='47.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='58.5'%20cy='49.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='46'%20cy='62'%20r='1'/%3e%3ccircle%20cx='52.5'%20cy='54.5'%20r='1.5'/%3e%3ccircle%20cx='70.5'%20cy='49.5'%20r='1.5'/%3e%3ccircle%20cx='62.5'%20cy='64.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='48'%20cy='41'%20r='1'/%3e%3ccircle%20cx='21.5'%20cy='62.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='64'%20cy='15'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='49'%20cy='5'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='37.5'%20cy='41.5'%20r='1.5'/%3e%3ccircle%20cx='49.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='49'%20cy='18'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='5.5'%20cy='27.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='42.5'%20cy='49.5'%20r='.5'/%3e%3ccircle%20opacity='.75'%20cx='30.5'%20cy='5.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='6.5'%20cy='32.5'%20r='1.5'/%3e%3ccircle%20cx='8.5'%20cy='38.5'%20r='1.5'/%3e%3ccircle%20cx='17.5'%20cy='55.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='49'%20cy='25'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='7.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='64'%20cy='35'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='26'%20cy='62'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='63.5'%20cy='5.5'%20r='.5'/%3e%3ccircle%20cx='29.5'%20cy='27.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='52.5'%20cy='56.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='2.5'%20cy='26.5'%20r='1.5'/%3e%3ccircle%20cx='18.5'%20cy='32.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='4.5'%20cy='32.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='2.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20cx='30.5'%20cy='40.5'%20r='.5'/%3e%3ccircle%20opacity='.5'%20cx='56.5'%20cy='38.5'%20r='1.5'/%3e%3ccircle%20cx='26.5'%20cy='22.5'%20r='.5'/%3e%3ccircle%20cx='22'%20cy='26'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='50.5'%20cy='61.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='30.5'%20cy='33.5'%20r='1.5'/%3e%3ccircle%20cx='56.5'%20cy='25.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='15'%20cy='30'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='14.5'%20cy='36.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='15.5'%20cy='61.5'%20r='.5'/%3e%3ccircle%20cx='67'%20cy='16'%20r='1'/%3e%3ccircle%20opacity='.5'%20cx='26'%20cy='37'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='17'%20cy='2'%20r='1'/%3e%3ccircle%20cx='50.5'%20cy='32.5'%20r='1.5'/%3e%3ccircle%20opacity='.5'%20cx='49.5'%20cy='36.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='12'%20cy='29'%20r='1'/%3e%3ccircle%20opacity='.75'%20cx='66.5'%20cy='2.5'%20r='1.5'/%3e%3ccircle%20opacity='.75'%20cx='31.5'%20cy='48.5'%20r='1.5'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h72v66H0z'/%3e%3c/clipPath%3e%3cfilter%20id='b'%20x='0'%20y='0'%20width='72'%20height='66'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset/%3e%3cfeGaussianBlur%20stdDeviation='1'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='arithmetic'%20k2='-1'%20k3='1'/%3e%3cfeColorMatrix%20values='0%200%200%200%201%200%200%200%200%201%200%200%200%200%201%200%200%200%201%200'/%3e%3cfeBlend%20in2='shape'%20result='effect1_innerShadow_379_752'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e");bottom:0;content:"";left:0;position:absolute;right:0;top:0;transition:.4s ease;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-aff2a6268e887037:before{opacity:0}#overlay-root .tgui-abbb25a9ce45033e{cursor:pointer;position:relative}#overlay-root .tgui-6e9776e8c33b2626{cursor:default;opacity:.3}#overlay-root .tgui-21b20ecaad17ccf9{color:var(--tgui--outline);display:block}#overlay-root .tgui-bca5056bf34297b0{color:var(--tgui--link_color);opacity:0;position:absolute;top:0;transition:opacity .15s ease-out}#overlay-root .tgui-60cf4cc79ba44c4f:checked~.tgui-bca5056bf34297b0{opacity:1}#overlay-root .tgui-b9fd8cdf929947df{height:1px;margin:-1px;padding:0;position:absolute;white-space:nowrap;width:1px;clip:rect(0,0,0,0);border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);opacity:0;overflow:hidden}#overlay-root .tgui-a03137b1ed760aaf{display:flex;gap:10px;min-height:48px;padding:10px 12px 10px 16px}#overlay-root .tgui-ca1c0e2d013ae260{min-height:50px;padding:10px 16px}#overlay-root .tgui-f3ab78c8048cb9dc{align-items:center;background:conic-gradient(from 0deg at 50% 50%,#0c28ff,#03ffff,#24d627,#fdff22,#ff2227,#fe2df6,#7122ff 1turn);border-radius:50%;display:flex;height:24px;justify-content:center;position:relative;width:24px}#overlay-root .tgui-93beab8699996b1e{border-radius:50%;height:16px;width:16px}#overlay-root .tgui-93beab8699996b1e:after,#overlay-root .tgui-93beab8699996b1e:before{border-radius:inherit;content:"";position:absolute}#overlay-root .tgui-93beab8699996b1e:before{background:var(--tgui--bg_color);bottom:2px;left:2px;right:2px;top:2px}#overlay-root .tgui-93beab8699996b1e:after{background:inherit;bottom:4px;left:4px;right:4px;top:4px}#overlay-root .tgui-21dba5277ef0ddd7{flex:1 1 0}#overlay-root .tgui-8ca550c2fc85eff5{background:var(--tgui--bg_color);padding:20px 22px 16px;position:relative}#overlay-root .tgui-8ca550c2fc85eff5 .tgui-9f9a52f695b85cc9{background:var(--tgui--bg_color);border-radius:5px;color:var(--tgui--secondary_hint_color);left:32px;max-width:calc(100% - 86px);overflow:hidden;padding:0 6px;position:absolute;text-overflow:ellipsis;top:6px;white-space:nowrap}#overlay-root .tgui-4a83fef1f04acb0e{pointer-events:none;position:relative}#overlay-root .tgui-7707c5d942b7b9af.tgui-4a83fef1f04acb0e{opacity:.35}#overlay-root .tgui-8ca550c2fc85eff5.tgui-4a83fef1f04acb0e:after{background:var(--tgui--bg_color);bottom:0;content:"";left:0;opacity:.5;position:absolute;right:0;top:0}#overlay-root .tgui-0f5050defacbf813{align-items:center;box-sizing:border-box;display:flex}#overlay-root .tgui-16b3783d394bc7db,#overlay-root .tgui-8f04eff653cfa5e5{display:flex}#overlay-root .tgui-8ca550c2fc85eff5 .tgui-0f5050defacbf813{border-radius:14px;box-shadow:0 0 0 2px var(--tgui--outline)}#overlay-root .tgui-8ca550c2fc85eff5.tgui-41b168516bddcf4b .tgui-9f9a52f695b85cc9{color:var(--tgui--destructive_text_color)}#overlay-root .tgui-8ca550c2fc85eff5.tgui-41b168516bddcf4b .tgui-0f5050defacbf813{box-shadow:0 0 0 2px var(--tgui--destructive_text_color)}#overlay-root .tgui-8ca550c2fc85eff5.tgui-89277928456f0e30 .tgui-9f9a52f695b85cc9{color:var(--tgui--link_color)}#overlay-root .tgui-8ca550c2fc85eff5.tgui-89277928456f0e30 .tgui-0f5050defacbf813{box-shadow:0 0 0 2px var(--tgui--link_color)}#overlay-root .tgui-7707c5d942b7b9af .tgui-0f5050defacbf813{background:var(--tgui--bg_color);border-radius:12px}#overlay-root .tgui-7707c5d942b7b9af.tgui-41b168516bddcf4b .tgui-0f5050defacbf813{box-shadow:0 0 0 1.5px var(--tgui--destructive_text_color)}#overlay-root .tgui-d9de1f32aee12a15{gap:12px;padding:12px 16px}#overlay-root .tgui-9b2ad13855aef059{min-height:48px}#overlay-root .tgui-c4863cd4c893a047{background:transparent;border:0;box-sizing:border-box;color:var(--tgui--text_color);display:block;margin:0;outline:0;padding:0;resize:none;text-overflow:ellipsis;width:100%}#overlay-root .tgui-c4863cd4c893a047::-webkit-inner-spin-button,#overlay-root .tgui-c4863cd4c893a047::-webkit-outer-spin-button{-webkit-appearance:none}#overlay-root .tgui-c4863cd4c893a047::-moz-placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-c4863cd4c893a047::placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-6cca8a28a056cc34{--tgui--multiselect--min-height:52px;min-height:var(--tgui--multiselect--min-height);position:relative;width:100%}#overlay-root .tgui-1ed7193796bd9fff.tgui-1ed7193796bd9fff{min-height:var(--tgui--multiselect--min-height);padding-right:48px}#overlay-root .tgui-e9b05eb8feaa0359{color:var(--tgui--secondary_hint_color);position:absolute;right:16px}#overlay-root .tgui-c56e136f855e5144{--tgui--multiselect--gap:8px;box-sizing:border-box;display:flex;flex-grow:1;flex-shrink:1;flex-wrap:wrap;gap:var(--tgui--multiselect--gap);margin:0;max-width:100%;overflow:hidden;padding:8px;position:relative}#overlay-root .tgui-991d85450550abb9{max-width:calc(100% - var(--tgui--multiselect--gap));padding:6px 12px}#overlay-root .tgui-41e02fd2529dfbd2{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;box-shadow:none;color:var(--tgui--text_color);display:flex;flex:1;flex-direction:column;justify-content:center;outline:none;padding:0 8px;position:relative;width:100%}#overlay-root .tgui-41e02fd2529dfbd2::-moz-placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-41e02fd2529dfbd2::placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-41e02fd2529dfbd2[readonly]{cursor:default}#overlay-root .tgui-ac1d436c45aafe04 .tgui-41e02fd2529dfbd2{text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-0b4134fd8d5c05ac{color:var(--tgui--hint_color);display:flex}#overlay-root .tgui-70d34454bcf3c3e4{background:var(--tgui--bg_color);border-radius:12px;box-shadow:0 32px 64px #0000000a,0 0 2px 1px #00000005;box-sizing:border-box;margin-top:8px;max-height:168px;overflow-y:scroll;width:100%}#overlay-root .tgui-6a25d2bd42bb932c{color:var(--tgui--hint_color)}#overlay-root .tgui-15f9ec3c119467a6{height:48px;padding:0 16px}#overlay-root .tgui-e3f4e376df0c272c{color:var(--tgui--link_color)}#overlay-root .tgui-e9c83f4f150e5513{z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-97a62789a70393d0{position:absolute}#overlay-root .tgui-6ae8c47f9448321b{content:"";display:block;transform:translateY(1px)}#overlay-root .tgui-6c3deae89ec68e99{transform:rotate(90deg) translate(50%,-50%);transform-origin:right}#overlay-root .tgui-fed67e27ad8cb75f{transform:rotate(180deg)}#overlay-root .tgui-b27d1c4f6222569e{transform:rotate(-90deg) translate(-50%,-50%);transform-origin:left}#overlay-root .tgui-9bfdebc3fdae031b{cursor:pointer;position:relative}#overlay-root .tgui-55c1caaee1c1e33e{cursor:default;opacity:.25}#overlay-root .tgui-18734a5360b84fba{color:var(--tgui--outline);display:block}#overlay-root .tgui-1ec4b447aa5cf66a{color:var(--tgui--link_color);opacity:0;position:absolute;top:0}#overlay-root .tgui-18734a5360b84fba,#overlay-root .tgui-1ec4b447aa5cf66a{transition:opacity .15s ease-out}#overlay-root .tgui-7cd9bbef46d9194c:checked~.tgui-18734a5360b84fba{opacity:0}#overlay-root .tgui-7cd9bbef46d9194c:checked~.tgui-1ec4b447aa5cf66a{opacity:1}#overlay-root .tgui-a641ca1e63331268{background:var(--tgui--bg_color);bottom:0;box-sizing:border-box;left:0;padding:32px 20px;position:fixed;right:0;top:0}#overlay-root .tgui-a40b67b8ec9e3a49,#overlay-root .tgui-a641ca1e63331268{align-items:center;display:flex;flex-direction:column;justify-content:center;overflow:hidden}#overlay-root .tgui-a40b67b8ec9e3a49{flex:1 1 0;max-width:100%;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-bf64531d065e1bd9 .tgui-a40b67b8ec9e3a49{flex:unset}#overlay-root .tgui-7df9ee9d6d6586de,#overlay-root .tgui-a40b67b8ec9e3a49{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-7df9ee9d6d6586de{max-width:100%;text-align:center}#overlay-root .tgui-36c453f0a9d51371{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;margin-top:20px}#overlay-root .tgui-0e77c7f1a1b82c84{--tgui--pin_input--buttons-gap:12px;--tgui--pin_input--button-width:33.3%;display:flex;flex-direction:column;flex-wrap:wrap;gap:var(--tgui--pin_input--buttons-gap);margin-top:52px;width:100%}#overlay-root .tgui-bf64531d065e1bd9 .tgui-0e77c7f1a1b82c84{--tgui--pin_input--button-width:76px}#overlay-root .tgui-49b69c407401f76c{display:flex;gap:var(--tgui--pin_input--buttons-gap);justify-content:center}#overlay-root .tgui-49b69c407401f76c:last-child{justify-content:flex-end;margin-left:calc(var(--tgui--pin_input--buttons-gap) * 2)}#overlay-root .tgui-bf64531d065e1bd9 .tgui-49b69c407401f76c:last-child{justify-content:center;margin-left:calc(var(--tgui--pin_input--button-width) + var(--tgui--pin_input--buttons-gap))}#overlay-root .tgui-14d79626209a204a{color:var(--tgui--link_color);display:block;margin:auto}#overlay-root .tgui-6eaa561b38208c72{background:var(--tgui--tertiary_bg_color);border:none;border-radius:16px;color:var(--tgui--text_color);height:56px;padding:0;width:var(--tgui--pin_input--button-width)}#overlay-root .tgui-3bea52c968cee224{border-radius:50%;height:76px;width:76px}#overlay-root .tgui-bad1e0d3a612c110{align-items:center;background:var(--tgui--bg_color);border:2.5px solid var(--tgui--divider);border-radius:12px;display:flex;height:44px;justify-content:center;padding:0;transition:border-color .15s ease-out;width:40px}#overlay-root .tgui-b9a1527d00258387{background:var(--tgui--link_color);border:none;border-radius:50%;height:13px;opacity:.1;width:13px}#overlay-root .tgui-b9a1527d00258387.tgui-1d6fb1351888c5e0{opacity:1}#overlay-root .tgui-bad1e0d3a612c110:focus-within{border-color:var(--tgui--link_color)}#overlay-root .tgui-9fa4f4531187df59{background:var(--tgui--text_color);border-radius:50%;height:8px;width:8px}#overlay-root .tgui-de477a8e3910f19f{cursor:pointer;display:block;position:relative}#overlay-root .tgui-d5c5e7402bfd8c12{cursor:default;opacity:.25}#overlay-root .tgui-bfcd091645843388{color:var(--tgui--outline);display:block}#overlay-root .tgui-8d2d5ba97b4abd79{color:var(--tgui--link_color);opacity:0;position:absolute;top:0}#overlay-root .tgui-8d2d5ba97b4abd79,#overlay-root .tgui-bfcd091645843388{transition:opacity .15s ease-out}#overlay-root .tgui-743a4b0f25e5d51b:checked~.tgui-bfcd091645843388{opacity:0}#overlay-root .tgui-743a4b0f25e5d51b:checked~.tgui-8d2d5ba97b4abd79{opacity:1}#overlay-root .tgui-0487bdb4329cd879{display:flex;gap:4px;padding:12px;position:relative}#overlay-root .tgui-6169bc2e9d6fdeb8{color:var(--tgui--tertiary_bg_color);position:relative}#overlay-root .tgui-6169bc2e9d6fdeb8:focus-visible{outline:2px solid var(--tgui--link_color)}#overlay-root .tgui-f0faaa15f44569ba{color:var(--tgui--link_color);position:absolute}#overlay-root .tgui-52ba7059852e9950{bottom:0;margin:0;opacity:0;position:absolute;top:0}#overlay-root .tgui-919c5658483cae11{position:relative}#overlay-root .tgui-a0742fd4c73756f7{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:inherit;border:none;border-radius:inherit;color:var(--tgui--text_color);outline:none;padding:12px 58px 12px 16px;width:100%}#overlay-root .tgui-025a45d791e466f6{color:var(--tgui--secondary_hint_color);pointer-events:none;position:absolute;right:16px;top:50%;transform:translateY(-50%)}#overlay-root .tgui-aa094d6480bfa32a{cursor:pointer;position:relative}#overlay-root .tgui-7d31e315f5cc4733{cursor:default;opacity:.25}#overlay-root .tgui-ad96577f259c5732{color:var(--tgui--link_color);display:block;opacity:0;transition:opacity .15s ease-out}#overlay-root .tgui-6988c618806a5171:checked~.tgui-ad96577f259c5732{opacity:1}#overlay-root .tgui-717c3649db8d5af2{--tgui--slider--thumb--size:12px;align-items:center;box-sizing:border-box;display:flex;gap:24px;min-height:52px;padding:16px 24px}#overlay-root .tgui-35faba867393ce37{border-radius:8px;cursor:pointer;height:var(--tgui--slider--thumb--size);position:relative;width:100%}#overlay-root .tgui-c591a831de13ba23{cursor:default;opacity:.35}#overlay-root .tgui-4de4feff2dcc975c,#overlay-root .tgui-e11a455378c63b15{border-radius:inherit;height:3px;left:0;margin-top:-1px;position:absolute;top:50%}#overlay-root .tgui-e11a455378c63b15{align-items:center;background-color:var(--tgui--tertiary_bg_color);box-sizing:border-box;display:flex;justify-content:space-between;width:100%}#overlay-root .tgui-4de4feff2dcc975c{background:var(--tgui--button_color);width:auto}#overlay-root .tgui-7fe9f0fbc9771947{height:100%;isolation:isolate;margin-left:calc(var(--tgui--slider--thumb--size) / 10);margin-right:calc(var(--tgui--slider--thumb--size) / 10);position:relative;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-6598607160233201,#overlay-root .tgui-a56564bcfd4b56e5{align-items:center;display:flex;justify-content:center;margin-top:3px}#overlay-root .tgui-d2e2a2e28ef0f746{--tgui--slider--thumb--size:24px;gap:20px;padding:20px}#overlay-root .tgui-d2e2a2e28ef0f746 .tgui-4de4feff2dcc975c,#overlay-root .tgui-d2e2a2e28ef0f746 .tgui-e11a455378c63b15{height:4px;margin-top:-2px}#overlay-root .tgui-b632646f586ff14d{background:var(--tgui--secondary_hint_color);border-radius:50%;height:2px;position:absolute;width:2px}#overlay-root .tgui-2b0a006b5a9ffd68{background:var(--tgui--secondary_hint_color);opacity:.35}#overlay-root .tgui-7951a89b824476b3{background:var(--tgui--tertiary_bg_color);border-radius:3px;height:20px;width:4px}#overlay-root .tgui-7951a89b824476b3.tgui-2b0a006b5a9ffd68{background:var(--tgui--button_color);opacity:1}#overlay-root .tgui-b632646f586ff14d:not(.tgui-7951a89b824476b3):first-child{transform:translate(50%)}#overlay-root .tgui-b632646f586ff14d:last-child{transform:translate(-150%)}#overlay-root .tgui-7951a89b824476b3:last-child{transform:translate(-100%)}#overlay-root .tgui-83b7253102c6addc{background:var(--tgui--button_color);border-radius:50%;height:var(--tgui--slider--thumb--size);position:absolute;top:50%;transform:translate(-50%,-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--tgui--slider--thumb--size);z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-96f5864d281f94a8{background:var(--tgui--white);box-shadow:0 6px 6.5px #0000001f,0 .5px 2px #0000001f}#overlay-root .tgui-abdeb837bfc726cb{height:100%;width:100%}#overlay-root .tgui-a1dc55b304d32032{align-items:center;border-radius:16px;cursor:pointer;display:flex;height:32px;overflow:hidden;position:relative;width:52px}#overlay-root .tgui-57a00e000de7483d{cursor:default;opacity:.4}#overlay-root .tgui-3acc6d0262399734:before{background:var(--tgui--secondary_bg_color);bottom:0;content:"";left:0;position:absolute;right:0;top:0}#overlay-root .tgui-2776944549f431fc .tgui-3acc6d0262399734:before{border:3px solid var(--tgui--secondary_hint_color);border-radius:16px}#overlay-root .tgui-3acc6d0262399734:after{border-radius:50%;content:"";position:absolute;top:50%;transform:translateY(-50%)}#overlay-root .tgui-2776944549f431fc .tgui-3acc6d0262399734:after{background:var(--tgui--secondary_hint_color);height:16px;margin-left:8px;width:16px}#overlay-root .tgui-b70ccb0e7742541a .tgui-3acc6d0262399734:after{background:var(--tgui--white);box-shadow:0 3px 1px #0000000f,0 3px 8px #00000026,0 0 0 1px #0000000a;height:28px;margin-left:2px;width:28px}#overlay-root .tgui-edfaab8ff474b0de:checked+.tgui-3acc6d0262399734:before{background-color:var(--tgui--link_color);border-color:var(--tgui--link_color)}#overlay-root .tgui-2776944549f431fc .tgui-edfaab8ff474b0de:checked+.tgui-3acc6d0262399734:after{height:24px;width:24px}#overlay-root .tgui-edfaab8ff474b0de:checked+.tgui-3acc6d0262399734:after{transform:translate(20px) translateY(-50%)}#overlay-root .tgui-2776944549f431fc .tgui-edfaab8ff474b0de:checked+.tgui-3acc6d0262399734:after{background:var(--tgui--white);transform:translate(16px) translateY(-50%)}@media (prefers-reduced-motion:no-preference){#overlay-root .tgui-3acc6d0262399734:before{transition:background-color,border-color 67ms linear}#overlay-root .tgui-3acc6d0262399734:after{transition:transform .3s cubic-bezier(.175,.885,.32,1.275) 0s}#overlay-root .tgui-b70ccb0e7742541a .tgui-3acc6d0262399734:before{transition:background-color .2s ease}#overlay-root .tgui-b70ccb0e7742541a .tgui-3acc6d0262399734:after{transition:transform .2s cubic-bezier(.36,-.24,.26,1.32)}}#overlay-root .tgui-d40ec83150e66029{background:inherit;border:none;border-radius:inherit;color:var(--tgui--text_color);min-height:80px;outline:none;padding:12px 16px;resize:none;width:100%}#overlay-root .tgui-d40ec83150e66029::-moz-placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-d40ec83150e66029::placeholder{color:var(--tgui--secondary_hint_color)}#overlay-root .tgui-2453b62de8016bfa .tgui-d40ec83150e66029{min-height:84px;padding:16px}#overlay-root .tgui-7a5facec9dc28fae{left:0;position:fixed;right:0}#overlay-root .tgui-d83e15d73344cdc0{top:0}#overlay-root .tgui-01790b7e59088ea5{bottom:0;padding-bottom:var(--tgui--safe_area_inset_bottom)}#overlay-root .tgui-53cb2ebed0c3b08f{background:var(--tgui--surface_primary);box-shadow:0 -1px 0 var(--tgui--divider);display:flex;justify-items:stretch;padding:0 16px}#overlay-root .tgui-a2b4713d67582227{padding:0}#overlay-root .tgui-64cd0db020a9bacf{align-items:center;background:transparent;border:none;color:var(--tgui--secondary_hint_color);display:flex;flex:1 0 0;flex-direction:column;gap:6px;justify-content:center;margin:0;max-width:100%;min-width:0;padding:12px 16px 16px;transition:.15s ease-out}#overlay-root .tgui-ecbb746748ea4134{gap:4px;padding:8px 12px 4px}#overlay-root .tgui-e6658d0b8927f95e{color:var(--tgui--link_color)}#overlay-root .tgui-e6658d0b8927f95e:not(.tgui-ecbb746748ea4134) .tgui-44d48e11585af170{background:var(--tgui--secondary_fill)}#overlay-root .tgui-44d48e11585af170{border-radius:35px;display:flex;justify-content:center;min-width:64px;padding:2px 10px}#overlay-root .tgui-ecbb746748ea4134 .tgui-44d48e11585af170{padding:0}#overlay-root .tgui-aeab497081949a15{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-0eddcd83377979c2,#overlay-root .tgui-68fc52f1068b8e16{align-items:center;display:flex}#overlay-root .tgui-0eddcd83377979c2{color:var(--tgui--divider);height:20px;justify-content:center;margin:0 -6px;width:24px}#overlay-root .tgui-a9c3d618b6e43d64{color:var(--tgui--link_color)}#overlay-root .tgui-32fe6ce00169d72e{border-radius:8px;color:var(--tgui--hint_color);cursor:pointer;padding:8px 10px;text-decoration:none;transition:opacity .15s ease-out}#overlay-root .tgui-32fe6ce00169d72e:active{opacity:.5}@media (hover:hover) and (pointer:fine){#overlay-root .tgui-32fe6ce00169d72e:hover{background:var(--tgui--tertiary_bg_color)}}#overlay-root .tgui-442a9579d6c19dc4{--tgui--compact_pagination--dot--opacity--selected:.1;--tgui--compact_pagination--dot--background--selected:var(--tgui--link_color);display:inline-flex;gap:8px;padding:4px}#overlay-root .tgui-15adbef8fe5efed9{backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);background:#00000040;border-radius:28px;padding:8px 9px}#overlay-root .tgui-15adbef8fe5efed9,#overlay-root .tgui-cdc228e9d92dac5b{--tgui--compact_pagination--dot--opacity--selected:.25;--tgui--compact_pagination--dot--background--selected:var(--tgui--white);gap:6px}#overlay-root .tgui-cdc228e9d92dac5b{padding:0}#overlay-root .tgui-747563e660315b07{background:var(--tgui--compact_pagination--dot--background--selected,var(--tgui--link_color));border:none;border-radius:50%;cursor:pointer;display:block;height:8px;opacity:var(--tgui--compact_pagination--dot--opacity--selected,.25);padding:0;transition:opacity .15s ease-in-out;width:8px}#overlay-root .tgui-6d14364fac453a65{opacity:1}#overlay-root .tgui-bfabaddd169233a9{color:var(--tgui--link_color);text-decoration:none}#overlay-root .tgui-38580a5c868cecc4{display:flex;gap:8px;padding:16px}#overlay-root .tgui-645f8efe8c9c3cc5{opacity:.35}#overlay-root .tgui-8dab5cf704c88e82{align-items:center;background:transparent;border:none;border-radius:12px;box-sizing:border-box;color:var(--tgui--hint_color);cursor:pointer;display:flex;height:44px;justify-content:center;min-width:44px;padding:0 10px}#overlay-root .tgui-64016be270020f33{background:var(--tgui--tertiary_bg_color);color:var(--textColor)}#overlay-root .tgui-a43e090d3501d4ca{cursor:default;opacity:.35}#overlay-root .tgui-670c6b2f3c8df445{cursor:default;opacity:1}#overlay-root .tgui-2636b28cb21c42cc{color:var(--tgui--link_color)}#overlay-root .tgui-71259e3311d7116e{background:var(--tgui--tertiary_bg_color);border-radius:44px;box-sizing:border-box;height:100%;overflow:hidden;padding:2px;width:100%}#overlay-root .tgui-b0a9057ab5d33005{align-content:stretch;align-items:center;border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}#overlay-root .tgui-31f461ccfea23ec3{background:var(--tgui--segmented_control_active_bg);border-radius:40px;bottom:0;box-sizing:border-box;left:0;position:absolute;right:0;top:0;transition:transform .15s;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-16c6b1986a48e2b5{background:var(--tgui--tertiary_bg_color);border-radius:9px}#overlay-root .tgui-16c6b1986a48e2b5 .tgui-31f461ccfea23ec3{border:var(--tgui--border--width) solid rgba(0,0,0,.04);border-radius:inherit;box-shadow:0 3px 1px #0000000a,0 3px 8px #0000001f}#overlay-root .tgui-bbfb272d22eb23e8{background:transparent;border:none;border-radius:inherit;color:var(--tgui--text_color);flex:1 1 0;max-width:100%;overflow:hidden;padding:10px 24px;text-overflow:ellipsis;white-space:nowrap;z-index:var(--tgui--z-index--simple)}#overlay-root .tgui-513fce1023cbbd63{padding:6px 24px}#overlay-root .tgui-89d3925598b8fd68{align-content:stretch;align-items:center;display:flex;gap:12px;height:100%;overflow:hidden;position:relative;width:100%}#overlay-root .tgui-8e986e14448c29e6{background:var(--tgui--button_color);border-radius:4px 4px 1px 1px;bottom:0;height:3px;left:0;position:absolute;right:0;transition:transform 125ms}#overlay-root .tgui-96892ceed80c1bf3{background:transparent;border:none;border-radius:inherit;color:var(--tgui--secondary_hint_color);flex:1 0 0;height:44px;max-width:100%;overflow:hidden;text-overflow:ellipsis;transition:color 125ms;white-space:nowrap}#overlay-root .tgui-44ea091aea23df33{color:var(--tgui--link_color)}#overlay-root .tgui-cc76354712c6e8d9{background-color:var(--tgui--bg_color);border-top-left-radius:16px;border-top-right-radius:16px;bottom:0;display:flex;flex-direction:column;left:0;max-height:96%;outline:none;position:fixed;right:0;z-index:var(--tgui--z-index--overlay)}#overlay-root .tgui-2c53ae2ef0209d4d{align-items:center;border-bottom:1px solid var(--tgui--divider);display:flex;justify-content:space-between;padding:16px}#overlay-root .tgui-5dc6ad1ca3ac3ed4{overflow-y:auto;padding-bottom:var(--tgui--safe_area_inset_bottom)}#overlay-root .tgui-f67c8fb3553eee55{align-items:center;box-sizing:border-box;display:flex;gap:12px;justify-content:space-between;padding:16px;position:relative}#overlay-root .tgui-f67c8fb3553eee55:before{background:var(--tgui--divider);border-radius:4px;content:"";height:4px;left:50%;position:absolute;top:8px;transform:translate(-50%);width:36px}#overlay-root .tgui-09b5f6cfd7ba56ab,#overlay-root .tgui-fe1d6742d85038d7{align-items:center;display:flex;flex:1 0 0}#overlay-root .tgui-09b5f6cfd7ba56ab{justify-content:flex-start}#overlay-root .tgui-fe1d6742d85038d7{justify-content:flex-end}#overlay-root .tgui-7ce1022bfdcb0ae3{--tgui--text--line_height:28px;display:block;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}#overlay-root .tgui-3197096cb603b35a{bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--tgui--z-index--overlay)}#overlay-root .tgui-5638a4ef4e806d8c{background:var(--tgui--white);border-radius:12px;box-shadow:0 8px 24px #0000001a;color:var(--tgui--black);padding:10px}#overlay-root .tgui-bc60ca772e3ae3c6{background:var(--tooltip_background_dark);box-shadow:none}#overlay-root .tgui-5638a4ef4e806d8c .tgui-e0107e1e5ea5b9f3,#overlay-root .tgui-bc60ca772e3ae3c6{color:var(--tgui--white)}#overlay-root .tgui-bc60ca772e3ae3c6 .tgui-e0107e1e5ea5b9f3{color:var(--tooltip_background_dark)}#overlay-root .tgui-e37c114229ebfe85 .tgui-bc60ca772e3ae3c6{backdrop-filter:blur(50px);-webkit-backdrop-filter:blur(50px)}#overlay-root .tgui-6a12827a138e8827{--tgui--font-family:system-ui,-apple-system,BlinkMacSystemFont,"Roboto","Apple Color Emoji","Helvetica Neue",sans-serif;--tgui--font_weight--accent1:700;--tgui--font_weight--accent2:600;--tgui--font_weight--accent3:400;--tgui--large_title--font_size:34px;--tgui--large_title--line_height:42px;--tgui--title1--font_size:28px;--tgui--title1--line_height:36px;--tgui--title2--font_size:24px;--tgui--title2--line_height:32px;--tgui--title3--font_size:20px;--tgui--title3--line_height:24px;--tgui--headline--font_size:19px;--tgui--headline--line_height:28px;--tgui--text--font_size:17px;--tgui--text--line_height:26px;--tgui--subheadline1--font_size:16px;--tgui--subheadline1--line_height:24px;--tgui--subheadline2--font_size:15px;--tgui--subheadline2--line_height:22px;--tgui--caption1--font_size:13px;--tgui--caption1--line_height:20px;--tgui--caption2--font_size:11px;--tgui--caption2--line_height:16px;--tgui--border--width:1px;--tgui--base--section--box_shadow:0 1px 2px 0 rgba(0,0,0,.1);--tgui--bg_color:var(--tg-theme-bg-color,#fff);--tgui--text_color:var(--tg-theme-text-color,#000);--tgui--hint_color:var(--tg-theme-hint-color,#707579);--tgui--link_color:var(--tg-theme-link-color,#007aff);--tgui--button_color:var(--tg-theme-button-color,#007aff);--tgui--button_text_color:var(--tg-theme-button-text-color,#fff);--tgui--secondary_bg_color:var(--tg-theme-secondary-bg-color,#efeff4);--tgui--header_bg_color:var(--tg-theme-header-bg-color,#fff);--tgui--accent_text_color:var(--tg-theme-accent-text-color,#007aff);--tgui--section_bg_color:var(--tg-theme-section-bg-color,#fff);--tgui--section_header_text_color:var(--tg-theme-section-header-text-color,#707579);--tgui--subtitle_text_color:var(--tg-theme-subtitle-text-color,#707579);--tgui--destructive_text_color:var(--tg-theme-destructive-text-color,#e53935);--tgui--skeleton:hsla(0,0%,100%,.03);--tgui--divider:rgba(0,0,0,.15);--tgui--outline:rgba(0,0,0,.05);--tgui--surface_primary:hsla(0,0%,100%,.95);--tgui--tertiary_bg_color:#f4f4f7;--tgui--quartenary_bg_color:#f6f6fa;--tgui--segmented_control_active_bg:#fff;--tgui--card_bg_color:#fff;--tgui--secondary_hint_color:#a2acb0;--tgui--secondary_fill:rgba(67,120,255,.1);--tgui--green:#31d158;--tgui--destructive_background:#e53935;--tgui--primary_code_highlight:#4378ff;--tgui--secondary_code_highlight:#b00fb4;--tgui--tertiary_code_highlight:#3a9f20;--tgui--plain_background:rgba(0,0,0,.04);--tgui--plain_foreground:rgba(0,0,0,.8);--tgui--toast_accent_color:#55a6ff;--tgui--surface_dark:rgba(56,56,56,.85);--tooltip_background_dark:rgba(0,0,0,.85);--tgui--white:#fff;--tgui--black:#000;--tgui--z-index--simple:1;--tgui--z-index--skeleton:2;--tgui--z-index--overlay:3;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;color:var(--tgui--text_color)}#overlay-root .tgui-56dbb42c1dbd5e2b{--tgui--large_title--line_height:41px;--tgui--title1--line_height:34px;--tgui--title2--line_height:28px;--tgui--title3--line_height:25px;--tgui--headline--line_height:24px;--tgui--text--line_height:22px;--tgui--subheadline1--line_height:21px;--tgui--subheadline2--line_height:20px;--tgui--caption1--line_height:16px;--tgui--caption2--line_height:13px}#overlay-root .tgui-865b921add8ee075{--tgui--bg_color:var(--tg-theme-bg-color,#212121);--tgui--text_color:var(--tg-theme-text-color,#fff);--tgui--hint_color:var(--tg-theme-hint-color,#aaa);--tgui--link_color:var(--tg-theme-link-color,#2990ff);--tgui--button_color:var(--tg-theme-button-color,#2990ff);--tgui--button_text_color:var(--tg-theme-button-text-color,#fff);--tgui--secondary_bg_color:var(--tg-theme-secondary-bg-color,#0f0f0f);--tgui--header_bg_color:var(--tg-theme-header-bg-color,#212121);--tgui--accent_text_color:var(--tg-theme-accent-text-color,#007aff);--tgui--section_bg_color:var(--tg-theme-section-bg-color,#212121);--tgui--section_header_text_color:var(--tg-theme-section-header-text-color,#aaa);--tgui--subtitle_text_color:var(--tg-theme-subtitle-text-color,#aaa);--tgui--destructive_text_color:var(--tg-theme-destructive-text-color,#e53935);--tgui--skeleton:hsla(0,0%,100%,.03);--tgui--divider:hsla(0,0%,100%,.05);--tgui--outline:hsla(0,0%,100%,.1);--tgui--surface_primary:hsla(0,0%,9%,.95);--tgui--tertiary_bg_color:#2a2a2a;--tgui--quartenary_bg_color:#2f2f2f;--tgui--segmented_control_active_bg:#2f2f2f;--tgui--card_bg_color:#242424;--tgui--secondary_hint_color:#78797e;--tgui--secondary_fill:rgba(41,144,255,.15);--tgui--green:#32e55e;--tgui--destructive_background:rgba(255,35,35,.02);--tgui--primary_code_highlight:#2990ff;--tgui--secondary_code_highlight:#e937ed;--tgui--tertiary_code_highlight:#5ae536;--tgui--plain_background:hsla(0,0%,100%,.08);--tgui--plain_foreground:hsla(0,0%,100%,.95)}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2dppx){#overlay-root .tgui-6a12827a138e8827{--tgui--border--width:.5px}}@supports (padding-top:constant(safe-area-inset-bottom)){#overlay-root .tgui-6a12827a138e8827{--tgui--safe_area_inset_bottom:constant(safe-area-inset-bottom)}}@supports (padding-top:env(safe-area-inset-bottom)){#overlay-root .tgui-6a12827a138e8827{--tgui--safe_area_inset_bottom:env(safe-area-inset-bottom)}}@supports (color:color-mix(in srgb,var(--tgui--accent_text_color ) 10%,transparent)){#overlay-root .tgui-6a12827a138e8827{--tgui--secondary_fill:color-mix(in srgb,var(--tgui--accent_text_color) 10%,transparent)}#overlay-root .tgui-865b921add8ee075{--tgui--secondary_fill:color-mix(in srgb,var(--tgui--accent_text_color) 15%,transparent)}}#overlay-root .ui-snackbar#snackbar{animation:tgui-738ce40067f9bb6e .34s cubic-bezier(.3,.3,.5,1);box-sizing:border-box;max-width:460px;position:fixed;transition:transform .32s cubic-bezier(.3,.3,.5,1);-webkit-user-select:none;user-select:none;z-index:4;bottom:calc(10px + var(--tg-safe-area-inset-bottom, 0px))!important;left:calc(10px + var(--tg-safe-area-inset-left, 0px));right:calc(10px + var(--tg-safe-area-inset-right, 0px))}#overlay-root .ui-snackbar#snackbar>div{align-items:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:var(--tgui--surface_dark);bottom:0;box-sizing:border-box;display:flex;gap:12px;left:0;position:sticky;right:0;top:0;width:100%;padding:10px 14px;border-radius:14px}#overlay-root .ui-snackbar#snackbar .before,#overlay-root .ui-snackbar#snackbar .after{align-items:center;color:var(--tgui--toast_accent_color);display:flex}#overlay-root .ui-snackbar#snackbar .content{color:var(--tgui--white);display:flex;flex:1 1;flex-direction:column;gap:1px}#overlay-root .ui-snackbar#snackbar.enter{animation:slideInFromBottom .34s cubic-bezier(.3,.3,.5,1)}#overlay-root .ui-snackbar#snackbar.exit{animation:slideOutToBottom .34s cubic-bezier(.3,.3,.5,1)}#overlay-root .ui-snackbar--success_top#snackbar,#overlay-root .ui-snackbar--warning#snackbar,#overlay-root .ui-snackbar--error#snackbar{bottom:auto!important;top:calc(10px + var(--tg-safe-area-inset-top, 0px))!important}#overlay-root .ui-snackbar--success_top#snackbar.enter,#overlay-root .ui-snackbar--warning#snackbar.enter,#overlay-root .ui-snackbar--error#snackbar.enter{animation:slideInFromTop .34s cubic-bezier(.3,.3,.5,1)}#overlay-root .ui-snackbar--success_top#snackbar.exit,#overlay-root .ui-snackbar--warning#snackbar.exit,#overlay-root .ui-snackbar--error#snackbar.exit{animation:slideOutToTop .34s cubic-bezier(.3,.3,.5,1)}@keyframes slideInFromBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutToBottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromTop{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideOutToTop{0%{transform:translateY(0)}to{transform:translateY(-100%)}}#overlay-root .xs-button{height:28px!important;min-height:28px!important;max-height:28px!important;min-width:32px!important;gap:6px!important;padding:0 10px!important;border-radius:14px!important;min-inline-size:32px!important;display:flex!important;align-items:center!important;justify-content:center!important}#overlay-root .xs-button [role=status]{color:inherit!important}#overlay-root .xs-button h6{margin:0!important;padding:0!important;line-height:1!important;display:flex!important;align-items:center!important}#overlay-root .xs-button>div{display:flex!important;align-items:center!important;justify-content:center!important;line-height:1!important}`)),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(ht,St){typeof exports=="object"&&typeof module<"u"?St(exports):typeof define=="function"&&define.amd?define(["exports"],St):(ht=typeof globalThis<"u"?globalThis:ht||self,St(ht.OrbitSDK={}))})(this,function(exports){"use strict";var Rd=ht=>{throw TypeError(ht)};var ql=(ht,St,Kt)=>St.has(ht)||Rd("Cannot "+Kt);var ne=(ht,St,Kt)=>(ql(ht,St,"read from private field"),Kt?Kt.call(ht):St.get(ht)),Xe=(ht,St,Kt)=>St.has(ht)?Rd("Cannot add the same private member more than once"):St instanceof WeakSet?St.add(ht):St.set(ht,Kt),De=(ht,St,Kt,_r)=>(ql(ht,St,"write to private field"),_r?_r.call(ht,Kt):St.set(ht,Kt),Kt),lt=(ht,St,Kt)=>(ql(ht,St,"access private method"),Kt);var ca=(ht,St,Kt,_r)=>({set _(zr){De(ht,St,zr,Kt)},get _(){return ne(ht,St,_r)}});var ht,St,Kt,_r,zr,mi,rc,gi,vn,yi,nc,$n,ic,zn,vi,Er,Un,Gt,ss,Gn,Ir,yn,sc,cr,dt,os,ir,Hn,xi,tn,xn,as,bi,_i,Wn,qn,bn,Ei,vt,qs,Kl,Yl,Xl,Ql,Jl,Zl,ec,Id,oc,ls,Ur,sr,Kn,Gr,Vn,ac,rn,kr,cs,lc,nn,_n,ur,sn,on,ua,tc,cc,Hr,uc,jt,En,Sn,Si,wi,wn,Ti,Ci,dc,fc,hc;function _mergeNamespaces(o,l){for(var u=0;u<l.length;u++){const d=l[u];if(typeof d!="string"&&!Array.isArray(d)){for(const f in d)if(f!=="default"&&!(f in o)){const h=Object.getOwnPropertyDescriptor(d,f);h&&Object.defineProperty(o,f,h.get?h:{enumerable:!0,get:()=>d[f]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}const version="1.94.1";function getDefaultExportFromCjs$1(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/**
2
+ (function(ht,St){typeof exports=="object"&&typeof module<"u"?St(exports):typeof define=="function"&&define.amd?define(["exports"],St):(ht=typeof globalThis<"u"?globalThis:ht||self,St(ht.OrbitSDK={}))})(this,function(exports){"use strict";var Rd=ht=>{throw TypeError(ht)};var ql=(ht,St,Kt)=>St.has(ht)||Rd("Cannot "+Kt);var ne=(ht,St,Kt)=>(ql(ht,St,"read from private field"),Kt?Kt.call(ht):St.get(ht)),Xe=(ht,St,Kt)=>St.has(ht)?Rd("Cannot add the same private member more than once"):St instanceof WeakSet?St.add(ht):St.set(ht,Kt),De=(ht,St,Kt,_r)=>(ql(ht,St,"write to private field"),_r?_r.call(ht,Kt):St.set(ht,Kt),Kt),lt=(ht,St,Kt)=>(ql(ht,St,"access private method"),Kt);var ca=(ht,St,Kt,_r)=>({set _(zr){De(ht,St,zr,Kt)},get _(){return ne(ht,St,_r)}});var ht,St,Kt,_r,zr,mi,rc,gi,vn,yi,nc,$n,ic,zn,vi,Er,Un,Gt,ss,Gn,Ir,yn,sc,cr,dt,os,ir,Hn,xi,tn,xn,as,bi,_i,Wn,qn,bn,Ei,vt,qs,Kl,Yl,Xl,Ql,Jl,Zl,ec,Id,oc,ls,Ur,sr,Kn,Gr,Vn,ac,rn,kr,cs,lc,nn,_n,ur,sn,on,ua,tc,cc,Hr,uc,jt,En,Sn,Si,wi,wn,Ti,Ci,dc,fc,hc;function _mergeNamespaces(o,l){for(var u=0;u<l.length;u++){const d=l[u];if(typeof d!="string"&&!Array.isArray(d)){for(const f in d)if(f!=="default"&&!(f in o)){const h=Object.getOwnPropertyDescriptor(d,f);h&&Object.defineProperty(o,f,h.get?h:{enumerable:!0,get:()=>d[f]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}const version="1.94.2";function getDefaultExportFromCjs$1(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/**
3
3
  * @license React
4
4
  * react.production.min.js
5
5
  *
@@ -88,7 +88,7 @@ Error generating stack: `+F.message+`
88
88
 
89
89
  If you want to hide the \`${l.titleName}\`, you can wrap it with our VisuallyHidden component.
90
90
 
91
- For more information, see https://radix-ui.com/primitives/docs/components/${l.docsSlug}`;return reactExports.useEffect(()=>{o&&(document.getElementById(o)||console.error(u))},[u,o]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:o,descriptionId:l})=>{const d=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return reactExports.useEffect(()=>{var h;const f=(h=o.current)==null?void 0:h.getAttribute("aria-describedby");l&&f&&(document.getElementById(l)||console.warn(d))},[d,o,l]),null},Root$1=Dialog,Trigger=DialogTrigger,Portal=DialogPortal,Overlay$1=DialogOverlay,Content$1=DialogContent,Title=DialogTitle,Description=DialogDescription,Close=DialogClose;function __insertCSS$1(o){if(typeof document>"u")return;let l=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css",l.appendChild(u),u.styleSheet?u.styleSheet.cssText=o:u.appendChild(document.createTextNode(o))}const DrawerContext=React.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),useDrawerContext=()=>React.useContext(DrawerContext);__insertCSS$1("[vaul-drawer]{touch-action:none;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}");const useIsomorphicLayoutEffect$1=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function chain(...o){return(...l)=>{for(let u of o)typeof u=="function"&&u(...l)}}function isMac(){return testPlatform(/^Mac/)}function isIPhone(){return testPlatform(/^iPhone/)}function isIPad(){return testPlatform(/^iPad/)||isMac()&&navigator.maxTouchPoints>1}function isIOS(){return isIPhone()||isIPad()}function testPlatform(o){return typeof window<"u"&&window.navigator!=null?o.test(window.navigator.platform):void 0}const visualViewport=typeof document<"u"&&window.visualViewport;function isScrollable(o){let l=window.getComputedStyle(o);return/(auto|scroll)/.test(l.overflow+l.overflowX+l.overflowY)}function getScrollParent(o){for(isScrollable(o)&&(o=o.parentElement);o&&!isScrollable(o);)o=o.parentElement;return o||document.scrollingElement||document.documentElement}const nonTextInputTypes=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let preventScrollCount=0,restore;function usePreventScroll(o={}){let{isDisabled:l}=o;useIsomorphicLayoutEffect$1(()=>{if(!l)return preventScrollCount++,preventScrollCount===1&&(isIOS()?restore=preventScrollMobileSafari():restore=preventScrollStandard()),()=>{preventScrollCount--,preventScrollCount===0&&restore()}},[l])}function preventScrollStandard(){return chain(setStyle$1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`))}function preventScrollMobileSafari(){let o,l=0,u=v=>{o=getScrollParent(v.target),!(o===document.documentElement&&o===document.body)&&(l=v.changedTouches[0].pageY)},d=v=>{if(!o||o===document.documentElement||o===document.body){v.preventDefault();return}let x=v.changedTouches[0].pageY,b=o.scrollTop,S=o.scrollHeight-o.clientHeight;S!==0&&((b<=0&&x>l||b>=S&&x<l)&&v.preventDefault(),l=x)},f=v=>{let x=v.target;isInput(x)&&x!==document.activeElement&&(v.preventDefault(),x.style.transform="translateY(-2000px)",x.focus(),requestAnimationFrame(()=>{x.style.transform=""}))},h=v=>{let x=v.target;isInput(x)&&(x.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{x.style.transform="",visualViewport&&(visualViewport.height<window.innerHeight?requestAnimationFrame(()=>{scrollIntoView(x)}):visualViewport.addEventListener("resize",()=>scrollIntoView(x),{once:!0}))}))},m=chain(setStyle$1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`)),g=chain(addEvent(document,"touchstart",u,{passive:!1,capture:!0}),addEvent(document,"touchmove",d,{passive:!1,capture:!0}),addEvent(document,"touchend",f,{passive:!1,capture:!0}),addEvent(document,"focus",h,!0));return()=>{m(),g()}}function setStyle$1(o,l,u){let d=o.style[l];return o.style[l]=u,()=>{o.style[l]=d}}function addEvent(o,l,u,d){return o.addEventListener(l,u,d),()=>{o.removeEventListener(l,u,d)}}function scrollIntoView(o){let l=document.scrollingElement||document.documentElement;for(;o&&o!==l;){let u=getScrollParent(o);if(u!==document.documentElement&&u!==document.body&&u!==o){let d=u.getBoundingClientRect().top,f=o.getBoundingClientRect().top,h=o.getBoundingClientRect().bottom;const m=u.getBoundingClientRect().bottom;h>m&&(u.scrollTop+=f-d)}o=u.parentElement}}function isInput(o){return o instanceof HTMLInputElement&&!nonTextInputTypes.has(o.type)||o instanceof HTMLTextAreaElement||o instanceof HTMLElement&&o.isContentEditable}function setRef$1(o,l){typeof o=="function"?o(l):o!=null&&(o.current=l)}function composeRefs$1(...o){return l=>o.forEach(u=>setRef$1(u,l))}function useComposedRefs$1(...o){return reactExports.useCallback(composeRefs$1(...o),o)}let previousBodyPosition=null;function usePositionFixed({isOpen:o,modal:l,nested:u,hasBeenOpened:d,preventScrollRestoration:f}){const[h,m]=React.useState(typeof window<"u"?window.location.href:""),g=React.useRef(0),v=React.useCallback(()=>{if(previousBodyPosition===null&&o){previousBodyPosition={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:b,innerHeight:S}=window;document.body.style.setProperty("position","fixed","important"),document.body.style.top=`${-g.current}px`,document.body.style.left=`${-b}px`,document.body.style.right="0px",document.body.style.height="auto",setTimeout(()=>requestAnimationFrame(()=>{console.log(["scrollPosition",g.current,S]),g.current>=S&&(document.body.style.top=`${-g.current}px`)}),300)}},[o]),x=React.useCallback(()=>{if(previousBodyPosition!==null){const b=-parseInt(document.body.style.top,10),S=-parseInt(document.body.style.left,10);document.body.style.position=previousBodyPosition.position,document.body.style.top=previousBodyPosition.top,document.body.style.left=previousBodyPosition.left,document.body.style.height=previousBodyPosition.height,document.body.style.right="unset",requestAnimationFrame(()=>{if(f&&h!==window.location.href){m(window.location.href);return}window.scrollTo(S,b)}),previousBodyPosition=null}},[h]);return React.useEffect(()=>{function b(){g.current=window.scrollY}return b(),window.addEventListener("scroll",b),()=>{window.removeEventListener("scroll",b)}},[]),React.useEffect(()=>{u||!d||(o?l||setTimeout(()=>{x()},500):x())},[o,d,h,l,u,v,x]),{restorePositionSetting:x}}const cache$1=new WeakMap;function set(o,l,u=!1){if(!o||!(o instanceof HTMLElement)||!l)return;let d={};Object.entries(l).forEach(([f,h])=>{if(f.startsWith("--")){o.style.setProperty(f,h);return}d[f]=o.style[f],o.style[f]=h}),!u&&cache$1.set(o,d)}function reset(o,l){if(!o||!(o instanceof HTMLElement))return;let u=cache$1.get(o);u&&(l?o.style[l]=u[l]:Object.entries(u).forEach(([d,f])=>{o.style[d]=f}))}const isVertical=o=>{switch(o){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return o}};function getTranslate(o,l){if(!o)return null;const u=window.getComputedStyle(o),d=u.transform||u.webkitTransform||u.mozTransform;let f=d.match(/^matrix3d\((.+)\)$/);return f?parseFloat(f[1].split(", ")[isVertical(l)?13:12]):(f=d.match(/^matrix\((.+)\)$/),f?parseFloat(f[1].split(", ")[isVertical(l)?5:4]):null)}function dampenValue(o){return 8*(Math.log(o+1)-2)}const TRANSITIONS={DURATION:.5,EASE:[.32,.72,0,1]},VELOCITY_THRESHOLD=.4;function useCallbackRef(o){const l=React.useRef(o);return React.useEffect(()=>{l.current=o}),React.useMemo(()=>(...u)=>l.current==null?void 0:l.current.call(l,...u),[])}function useUncontrolledState({defaultProp:o,onChange:l}){const u=React.useState(o),[d]=u,f=React.useRef(d),h=useCallbackRef(l);return React.useEffect(()=>{f.current!==d&&(h(d),f.current=d)},[d,f,h]),u}function useControllableState({prop:o,defaultProp:l,onChange:u=()=>{}}){const[d,f]=useUncontrolledState({defaultProp:l,onChange:u}),h=o!==void 0,m=h?o:d,g=useCallbackRef(u),v=React.useCallback(x=>{if(h){const S=typeof x=="function"?x(o):x;S!==o&&g(S)}else f(x)},[h,o,f,g]);return[m,v]}function useSnapPoints({activeSnapPointProp:o,setActiveSnapPointProp:l,snapPoints:u,drawerRef:d,overlayRef:f,fadeFromIndex:h,onSnapPointChange:m,direction:g="bottom"}){const[v,x]=useControllableState({prop:o,defaultProp:u==null?void 0:u[0],onChange:l}),b=React.useMemo(()=>v===(u==null?void 0:u[u.length-1])||null,[u,v]),S=u&&u.length>0&&(h||h===0)&&!Number.isNaN(h)&&u[h]===v||!u,E=React.useMemo(()=>u==null?void 0:u.findIndex(I=>I===v),[u,v]),w=React.useMemo(()=>{var I;return(I=u==null?void 0:u.map(O=>{const j=typeof window<"u",N=typeof O=="string";let V=0;if(N&&(V=parseInt(O,10)),isVertical(g)){const W=N?V:j?O*window.innerHeight:0;return j?g==="bottom"?window.innerHeight-W:-window.innerHeight+W:W}const z=N?V:j?O*window.innerWidth:0;return j?g==="right"?window.innerWidth-z:-window.innerWidth+z:z}))!=null?I:[]},[u]),T=React.useMemo(()=>E!==null?w==null?void 0:w[E]:null,[w,E]),C=React.useCallback(I=>{var O;const j=(O=w==null?void 0:w.findIndex(N=>N===I))!=null?O:null;m(j),set(d.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:isVertical(g)?`translate3d(0, ${I}px, 0)`:`translate3d(${I}px, 0, 0)`}),w&&j!==w.length-1&&j!==h?set(f.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"0"}):set(f.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"1"}),x(j!==null?u==null?void 0:u[j]:null)},[d.current,u,w,h,f,x]);React.useEffect(()=>{if(o){var I;const O=(I=u==null?void 0:u.findIndex(j=>j===o))!=null?I:-1;w&&O!==-1&&typeof w[O]=="number"&&C(w[O])}},[o,u,w,C]);function M({draggedDistance:I,closeDrawer:O,velocity:j,dismissible:N}){if(h===void 0)return;const V=g==="bottom"||g==="right"?(T??0)-I:(T??0)+I,z=E===h-1,W=E===0,X=I>0;if(z&&set(f.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),j>2&&!X){N?O():C(w[0]);return}if(j>2&&X&&w&&u){C(w[u.length-1]);return}const ie=w==null?void 0:w.reduce((le,Q)=>typeof le!="number"||typeof Q!="number"?le:Math.abs(Q-V)<Math.abs(le-V)?Q:le),oe=isVertical(g)?window.innerHeight:window.innerWidth;if(j>VELOCITY_THRESHOLD&&Math.abs(I)<oe*.4){const le=X?1:-1;if(le>0&&b){C(w[u.length-1]);return}if(W&&le<0&&N&&O(),E===null)return;C(w[E+le]);return}C(ie)}function A({draggedDistance:I}){if(T===null)return;const O=g==="bottom"||g==="right"?T-I:T+I;(g==="bottom"||g==="right")&&O<w[w.length-1]||(g==="top"||g==="left")&&O>w[w.length-1]||set(d.current,{transform:isVertical(g)?`translate3d(0, ${O}px, 0)`:`translate3d(${O}px, 0, 0)`})}function k(I,O){if(!u||typeof E!="number"||!w||h===void 0)return null;const j=E===h-1;if(E>=h&&O)return 0;if(j&&!O)return 1;if(!S&&!j)return null;const V=j?E+1:E-1,z=j?w[V]-w[V-1]:w[V+1]-w[V],W=I/Math.abs(z);return j?1-W:W}return{isLastSnapPoint:b,activeSnapPoint:v,shouldFade:S,getPercentageDragged:k,setActiveSnapPoint:x,activeSnapPointIndex:E,onRelease:M,onDrag:A,snapPointsOffset:w}}const CLOSE_THRESHOLD=.25,SCROLL_LOCK_TIMEOUT=100,BORDER_RADIUS=8,NESTED_DISPLACEMENT=16,WINDOW_TOP_OFFSET=26,DRAG_CLASS="vaul-dragging";function Root({open:o,onOpenChange:l,children:u,shouldScaleBackground:d,onDrag:f,onRelease:h,snapPoints:m,nested:g=!1,closeThreshold:v=CLOSE_THRESHOLD,scrollLockTimeout:x=SCROLL_LOCK_TIMEOUT,dismissible:b=!0,fadeFromIndex:S=m&&m.length-1,activeSnapPoint:E,setActiveSnapPoint:w,fixed:T,modal:C=!0,onClose:M,direction:A="bottom",preventScrollRestoration:k=!0,disablePreventScroll:I=!1}){var O;const[j=!1,N]=React.useState(!1),[V,z]=React.useState(!1),[W,X]=React.useState(!1),[ie,oe]=React.useState(!1),[le,Q]=React.useState(!1),[K,$]=React.useState(!1),G=React.useRef(null),L=React.useRef(null),B=React.useRef(null),q=React.useRef(null),U=React.useRef(null),Y=React.useRef(!1),te=React.useRef(null),ae=React.useRef(0),ue=React.useRef(!1),ve=React.useRef(0),fe=React.useRef(null),ee=React.useRef(((O=fe.current)==null?void 0:O.getBoundingClientRect().height)||0),de=React.useRef(0),ge=React.useCallback(Ae=>{m&&Ae===je.length-1&&(L.current=new Date)},[]),{activeSnapPoint:he,activeSnapPointIndex:Se,setActiveSnapPoint:be,onRelease:_e,snapPointsOffset:je,onDrag:He,shouldFade:Be,getPercentageDragged:rt}=useSnapPoints({snapPoints:m,activeSnapPointProp:E,setActiveSnapPointProp:w,drawerRef:fe,fadeFromIndex:S,overlayRef:G,onSnapPointChange:ge,direction:A});usePreventScroll({isDisabled:!j||le||!C||K||!V||I});const{restorePositionSetting:Ke}=usePositionFixed({isOpen:j,modal:C,nested:g,hasBeenOpened:V,preventScrollRestoration:k});function we(){return(window.innerWidth-WINDOW_TOP_OFFSET)/window.innerWidth}function Me(Ae){var Ie;!b&&!m||fe.current&&!fe.current.contains(Ae.target)||(ee.current=((Ie=fe.current)==null?void 0:Ie.getBoundingClientRect().height)||0,Q(!0),B.current=new Date,isIOS()&&window.addEventListener("touchend",()=>Y.current=!1,{once:!0}),Ae.target.setPointerCapture(Ae.pointerId),ae.current=isVertical(A)?Ae.clientY:Ae.clientX)}function $e(Ae,Ie){var Ge;let Ye=Ae;const st=(Ge=window.getSelection())==null?void 0:Ge.toString(),ze=fe.current?getTranslate(fe.current,A):null,Le=new Date;if(Ye.hasAttribute("data-vaul-no-drag")||Ye.closest("[data-vaul-no-drag]"))return!1;if(A==="right"||A==="left")return!0;if(L.current&&Le.getTime()-L.current.getTime()<500)return!1;if(ze!==null&&(A==="bottom"?ze>0:ze<0))return!0;if(st&&st.length>0)return!1;if(U.current&&Le.getTime()-U.current.getTime()<x&&ze===0||Ie)return U.current=Le,!1;for(;Ye;){if(Ye.scrollHeight>Ye.clientHeight){if(Ye.scrollTop!==0)return U.current=new Date,!1;if(Ye.getAttribute("role")==="dialog")return!0}Ye=Ye.parentNode}return!0}function Qe(Ae){if(fe.current&&le){const Ie=A==="bottom"||A==="right"?1:-1,Ge=(ae.current-(isVertical(A)?Ae.clientY:Ae.clientX))*Ie,Ye=Ge>0,st=m&&!b&&!Ye;if(st&&Se===0)return;const ze=Math.abs(Ge),Le=document.querySelector("[vaul-drawer-wrapper]");let at=ze/ee.current;const It=rt(ze,Ye);if(It!==null&&(at=It),st&&at>=1||!Y.current&&!$e(Ae.target,Ye))return;if(fe.current.classList.add(DRAG_CLASS),Y.current=!0,set(fe.current,{transition:"none"}),set(G.current,{transition:"none"}),m&&He({draggedDistance:Ge}),Ye&&!m){const kt=dampenValue(Ge),Qt=Math.min(kt*-1,0)*Ie;set(fe.current,{transform:isVertical(A)?`translate3d(0, ${Qt}px, 0)`:`translate3d(${Qt}px, 0, 0)`});return}const Ft=1-at;if((Be||S&&Se===S-1)&&(f==null||f(Ae,at),set(G.current,{opacity:`${Ft}`,transition:"none"},!0)),Le&&G.current&&d){const kt=Math.min(we()+at*(1-we()),1),Qt=8-at*8,Je=Math.max(0,14-at*14);set(Le,{borderRadius:`${Qt}px`,transform:isVertical(A)?`scale(${kt}) translate3d(0, ${Je}px, 0)`:`scale(${kt}) translate3d(${Je}px, 0, 0)`,transition:"none"},!0)}if(!m){const kt=ze*Ie;set(fe.current,{transform:isVertical(A)?`translate3d(0, ${kt}px, 0)`:`translate3d(${kt}px, 0, 0)`})}}}React.useEffect(()=>()=>{ut(!1),Ke()},[]),React.useEffect(()=>{var Ae;function Ie(){if(!fe.current)return;const Ge=document.activeElement;if(isInput(Ge)||ue.current){var Ye;const st=((Ye=window.visualViewport)==null?void 0:Ye.height)||0;let ze=window.innerHeight-st;const Le=fe.current.getBoundingClientRect().height||0;de.current||(de.current=Le);const at=fe.current.getBoundingClientRect().top;if(Math.abs(ve.current-ze)>60&&(ue.current=!ue.current),m&&m.length>0&&je&&Se){const It=je[Se]||0;ze+=It}if(ve.current=ze,Le>st||ue.current){const It=fe.current.getBoundingClientRect().height;let Ft=It;It>st&&(Ft=st-WINDOW_TOP_OFFSET),T?fe.current.style.height=`${It-Math.max(ze,0)}px`:fe.current.style.height=`${Math.max(Ft,st-at)}px`}else fe.current.style.height=`${de.current}px`;m&&m.length>0&&!ue.current?fe.current.style.bottom="0px":fe.current.style.bottom=`${Math.max(ze,0)}px`}}return(Ae=window.visualViewport)==null||Ae.addEventListener("resize",Ie),()=>{var Ge;return(Ge=window.visualViewport)==null?void 0:Ge.removeEventListener("resize",Ie)}},[Se,m,je]);function Oe(){fe.current&&(it(),M==null||M(),set(fe.current,{transform:isVertical(A)?`translate3d(0, ${A==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${A==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),set(G.current,{opacity:"0",transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),ut(!1),setTimeout(()=>{X(!1),N(!1)},300),setTimeout(()=>{m&&be(m[0])},TRANSITIONS.DURATION*1e3))}React.useEffect(()=>{if(!j&&d){const Ae=setTimeout(()=>{reset(document.body)},200);return()=>clearTimeout(Ae)}},[j,d]),React.useLayoutEffect(()=>{o?(N(!0),z(!0)):Oe()},[o]),React.useEffect(()=>{ie&&(l==null||l(j))},[j]),React.useEffect(()=>{oe(!0)},[]);function tt(){if(!fe.current)return;const Ae=document.querySelector("[vaul-drawer-wrapper]"),Ie=getTranslate(fe.current,A);set(fe.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),set(G.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"1"}),d&&Ie&&Ie>0&&j&&set(Ae,{borderRadius:`${BORDER_RADIUS}px`,overflow:"hidden",...isVertical(A)?{transform:`scale(${we()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${we()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${TRANSITIONS.DURATION}s`,transitionTimingFunction:`cubic-bezier(${TRANSITIONS.EASE.join(",")})`},!0)}function it(){!le||!fe.current||(fe.current.classList.remove(DRAG_CLASS),Y.current=!1,Q(!1),q.current=new Date)}function ft(Ae){if(!le||!fe.current)return;fe.current.classList.remove(DRAG_CLASS),Y.current=!1,Q(!1),q.current=new Date;const Ie=getTranslate(fe.current,A);if(!$e(Ae.target,!1)||!Ie||Number.isNaN(Ie)||B.current===null)return;const Ge=q.current.getTime()-B.current.getTime(),Ye=ae.current-(isVertical(A)?Ae.clientY:Ae.clientX),st=Math.abs(Ye)/Ge;if(st>.05&&($(!0),setTimeout(()=>{$(!1)},200)),m){_e({draggedDistance:Ye*(A==="bottom"||A==="right"?1:-1),closeDrawer:Oe,velocity:st,dismissible:b}),h==null||h(Ae,!0);return}if(A==="bottom"||A==="right"?Ye>0:Ye<0){tt(),h==null||h(Ae,!0);return}if(st>VELOCITY_THRESHOLD){Oe(),h==null||h(Ae,!1);return}var ze;const Le=Math.min((ze=fe.current.getBoundingClientRect().height)!=null?ze:0,window.innerHeight);if(Ie>=Le*v){Oe(),h==null||h(Ae,!1);return}h==null||h(Ae,!0),tt()}React.useEffect(()=>{j&&(set(document.documentElement,{scrollBehavior:"auto"}),L.current=new Date,ut(!0))},[j]),React.useEffect(()=>{if(fe.current&&W){var Ae;const Ie=fe==null||(Ae=fe.current)==null?void 0:Ae.querySelectorAll("*");Ie==null||Ie.forEach(Ge=>{const Ye=Ge;(Ye.scrollHeight>Ye.clientHeight||Ye.scrollWidth>Ye.clientWidth)&&Ye.classList.add("vaul-scrollable")})}},[W]);function ut(Ae){const Ie=document.querySelector("[vaul-drawer-wrapper]");!Ie||!d||(Ae?(set(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),set(document.body,{background:"black"},!0),set(Ie,{borderRadius:`${BORDER_RADIUS}px`,overflow:"hidden",...isVertical(A)?{transform:`scale(${we()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${we()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${TRANSITIONS.DURATION}s`,transitionTimingFunction:`cubic-bezier(${TRANSITIONS.EASE.join(",")})`})):(reset(Ie,"overflow"),reset(Ie,"transform"),reset(Ie,"borderRadius"),set(Ie,{transitionProperty:"transform, border-radius",transitionDuration:`${TRANSITIONS.DURATION}s`,transitionTimingFunction:`cubic-bezier(${TRANSITIONS.EASE.join(",")})`})))}function xt(Ae){const Ie=Ae?(window.innerWidth-NESTED_DISPLACEMENT)/window.innerWidth:1,Ge=Ae?-NESTED_DISPLACEMENT:0;te.current&&window.clearTimeout(te.current),set(fe.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:`scale(${Ie}) translate3d(0, ${Ge}px, 0)`}),!Ae&&fe.current&&(te.current=setTimeout(()=>{const Ye=getTranslate(fe.current,A);set(fe.current,{transition:"none",transform:isVertical(A)?`translate3d(0, ${Ye}px, 0)`:`translate3d(${Ye}px, 0, 0)`})},500))}function ct(Ae,Ie){if(Ie<0)return;const Ge=isVertical(A)?window.innerHeight:window.innerWidth,Ye=(Ge-NESTED_DISPLACEMENT)/Ge,st=Ye+Ie*(1-Ye),ze=-NESTED_DISPLACEMENT+Ie*NESTED_DISPLACEMENT;set(fe.current,{transform:isVertical(A)?`scale(${st}) translate3d(0, ${ze}px, 0)`:`scale(${st}) translate3d(${ze}px, 0, 0)`,transition:"none"})}function qe(Ae,Ie){const Ge=isVertical(A)?window.innerHeight:window.innerWidth,Ye=Ie?(Ge-NESTED_DISPLACEMENT)/Ge:1,st=Ie?-NESTED_DISPLACEMENT:0;Ie&&set(fe.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:isVertical(A)?`scale(${Ye}) translate3d(0, ${st}px, 0)`:`scale(${Ye}) translate3d(${st}px, 0, 0)`})}return React.createElement(Root$1,{modal:C,onOpenChange:Ae=>{if(o!==void 0){l==null||l(Ae);return}Ae?(z(!0),N(Ae)):Oe()},open:j},React.createElement(DrawerContext.Provider,{value:{visible:W,activeSnapPoint:he,snapPoints:m,setActiveSnapPoint:be,drawerRef:fe,overlayRef:G,scaleBackground:ut,onOpenChange:l,onPress:Me,setVisible:X,onRelease:ft,onDrag:Qe,dismissible:b,isOpen:j,shouldFade:Be,closeDrawer:Oe,onNestedDrag:ct,onNestedOpenChange:xt,onNestedRelease:qe,keyboardIsOpen:ue,openProp:o,modal:C,snapPointsOffset:je,direction:A}},u))}const Overlay=React.forwardRef(function({children:o,...l},u){const{overlayRef:d,snapPoints:f,onRelease:h,shouldFade:m,isOpen:g,visible:v}=useDrawerContext(),x=useComposedRefs$1(u,d),b=f&&f.length>0;return React.createElement(Overlay$1,{onMouseUp:h,ref:x,"vaul-drawer-visible":v?"true":"false","vaul-overlay":"","vaul-snap-points":g&&b?"true":"false","vaul-snap-points-overlay":g&&m?"true":"false",...l})});Overlay.displayName="Drawer.Overlay";const Content=React.forwardRef(function({onOpenAutoFocus:o,onPointerDownOutside:l,onAnimationEnd:u,style:d,...f},h){const{drawerRef:m,onPress:g,onRelease:v,onDrag:x,dismissible:b,keyboardIsOpen:S,snapPointsOffset:E,visible:w,closeDrawer:T,modal:C,openProp:M,onOpenChange:A,setVisible:k,direction:I}=useDrawerContext(),O=useComposedRefs$1(h,m),j=React.useRef(null);React.useEffect(()=>{k(!0)},[]);const N=(V,z,W=0)=>{const X=Math.abs(V.x),ie=Math.abs(V.y),oe=X>ie;return z==="left"||z==="right"?oe&&X>W:!oe&&ie>W};return React.createElement(Content$1,{"vaul-drawer":"","vaul-drawer-direction":I,"vaul-drawer-visible":w?"true":"false",...f,ref:O,style:E&&E.length>0?{"--snap-point-height":`${E[0]}px`,...d}:d,onOpenAutoFocus:V=>{if(o)o(V);else{var z;V.preventDefault(),(z=m.current)==null||z.focus()}},onPointerDown:V=>{f.onPointerDown==null||f.onPointerDown.call(f,V),j.current={x:V.clientX,y:V.clientY},g(V)},onPointerDownOutside:V=>{if(l==null||l(V),!C||V.defaultPrevented){V.preventDefault();return}S.current&&(S.current=!1),V.preventDefault(),A==null||A(!1),!(!b||M!==void 0)&&T()},onPointerMove:V=>{if(f.onPointerMove==null||f.onPointerMove.call(f,V),!j.current)return null;const z=V.clientY-j.current.y,W=V.clientX-j.current.x,X=["left","right"].includes(I),ie=["left","top"].includes(I)?Math.min:Math.max,oe=X?ie(0,W):0,le=X?0:ie(0,z),Q=V.pointerType==="touch"?10:2;N({x:oe,y:le},I,Q)?x(V):(Math.abs(W)>Q||Math.abs(z)>Q)&&(j.current=null)},onPointerUp:V=>{f.onPointerUp==null||f.onPointerUp.call(f,V),j.current=null,v(V)}})});Content.displayName="Drawer.Content";function NestedRoot({onDrag:o,onOpenChange:l,...u}){const{onNestedDrag:d,onNestedOpenChange:f,onNestedRelease:h}=useDrawerContext();if(!d)throw new Error("Drawer.NestedRoot must be placed in another drawer");return React.createElement(Root,{nested:!0,onClose:()=>{f(!1)},onDrag:(m,g)=>{d(m,g),o==null||o(m,g)},onOpenChange:m=>{m&&f(m),l==null||l(m)},onRelease:h,...u})}const Drawer$1={Root,NestedRoot,Content,Overlay,Trigger,Portal,Close,Title,Description},ModalClose=o=>jsxRuntimeExports.jsx(Drawer$1.Close,_object_spread({asChild:!0},o)),ModalHeader=reactExports.forwardRef((o,l)=>{var{before:u,after:d,className:f,children:h}=o,m=_object_without_properties(o,["before","after","className","children"]);const g=usePlatform$1();return jsxRuntimeExports.jsxs("header",_object_spread_props(_object_spread({ref:l,className:classNames("tgui-f67c8fb3553eee55",f)},m),{children:[jsxRuntimeExports.jsx("div",{className:"tgui-09b5f6cfd7ba56ab",children:u}),g==="ios"&&jsxRuntimeExports.jsx(Text,{weight:"2",className:"tgui-7ce1022bfdcb0ae3",children:h}),jsxRuntimeExports.jsx("div",{className:"tgui-fe1d6742d85038d7",children:d})]}))}),hexToRGB=o=>{let l=o;o.length===4&&(l=o.replace(/([^#])/g,"$1$1"));const u=parseInt(l.replace("#",""),16),d=u>>16,f=u>>8;return[d&255,f&255,u&255]},getTelegramData=()=>{var o;if(canUseDOM$1)return(o=window.Telegram)===null||o===void 0?void 0:o.WebApp},DEFAULT_LIGHT_OVERLAY_RGB=[255,255,255],DEFAULT_DARK_OVERLAY_RGB=[33,33,33],ModalOverlay=reactExports.forwardRef((o,l)=>{var{className:u}=o,d=_object_without_properties(o,["className"]);const f=useAppRootContext(),[h,m,g]=reactExports.useMemo(()=>{const v=getTelegramData();return v&&v.themeParams.bg_color?hexToRGB(v.themeParams.bg_color):f.appearance==="light"?DEFAULT_LIGHT_OVERLAY_RGB:DEFAULT_DARK_OVERLAY_RGB},[f.appearance]);return jsxRuntimeExports.jsx(Drawer$1.Overlay,_object_spread({ref:l,style:{background:`rgba(${h}, ${m}, ${g}, .4)`},className:classNames("tgui-3197096cb603b35a",u)},d))}),Modal=reactExports.forwardRef((o,l)=>{var{overlayComponent:u=jsxRuntimeExports.jsx(ModalOverlay,{}),open:d,onOpenChange:f,header:h,className:m,children:g,nested:v,trigger:x,closeThreshold:b,scrollLockTimeout:S,snapPoints:E,fadeFromIndex:w,modal:T,preventScrollRestoration:C,dismissible:M}=o,A=_object_without_properties(o,["overlayComponent","open","onOpenChange","header","className","children","nested","trigger","closeThreshold","scrollLockTimeout","snapPoints","fadeFromIndex","modal","preventScrollRestoration","dismissible"]),k;const I=useAppRootContext(),[O,j]=reactExports.useState((k=I.portalContainer)===null||k===void 0?void 0:k.current);reactExports.useEffect(()=>{var V;j((V=I.portalContainer)===null||V===void 0?void 0:V.current)},[I.portalContainer]);const N=v?Drawer$1.NestedRoot:Drawer$1.Root;return jsxRuntimeExports.jsxs(N,{open:d,onOpenChange:f,closeThreshold:b,scrollLockTimeout:S,snapPoints:E,fadeFromIndex:w,modal:T,preventScrollRestoration:C,dismissible:M,children:[x&&jsxRuntimeExports.jsx(Drawer$1.Trigger,{asChild:!0,children:x}),jsxRuntimeExports.jsxs(Drawer$1.Portal,{container:O,children:[u,jsxRuntimeExports.jsxs(Drawer$1.Content,_object_spread_props(_object_spread({ref:l,className:classNames("tgui-cc76354712c6e8d9",m)},A),{children:[h,jsxRuntimeExports.jsx("div",{className:"tgui-5dc6ad1ca3ac3ed4",children:g})]}))]})]})});Modal.Header=ModalHeader,Modal.Overlay=ModalOverlay,Modal.Close=ModalClose;const getBrowserAppearanceSubscriber=o=>{if(!canUseDOM$1||!window.matchMedia)return()=>{};const l=window.matchMedia("(prefers-color-scheme: dark)"),u=()=>{o(l.matches?"dark":"light")};return l.addEventListener("change",u),()=>l.removeEventListener("change",u)},getInitialAppearance=()=>canUseDOM$1&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",useAppearance=o=>{const{appearance:l}=reactExports.useContext(AppRootContext),[u,d]=reactExports.useState(o||l||getInitialAppearance()),f=reactExports.useCallback(()=>{const h=getTelegramData();h&&d(h.colorScheme)},[]);return reactExports.useEffect(()=>{if(o!==void 0)return d(o),()=>{};const h=getTelegramData();return h?(h.onEvent("themeChanged",f),()=>h.offEvent("themeChanged",f)):getBrowserAppearanceSubscriber(d)},[o]),u},getInitialPlatform=()=>{const o=getTelegramData();return o&&["ios","macos"].includes(o.platform)?"ios":"base"},usePlatform=o=>{if(o!==void 0)return o;const l=reactExports.useContext(AppRootContext);return l.isRendered&&l.platform!==void 0?l.platform:getInitialPlatform()},usePortalContainer=o=>{if(o!==void 0)return o;const l=reactExports.useContext(AppRootContext);return l.isRendered&&l.portalContainer!==void 0?l.portalContainer:reactExports.useRef(null)},AppRoot=reactExports.forwardRef((o,l)=>{var{platform:u,appearance:d,portalContainer:f,children:h,className:m}=o,g=_object_without_properties(o,["platform","appearance","portalContainer","children","className"]);const v=useAppearance(d),x=usePortalContainer(f),b=usePlatform(u),S=useObjectMemo({platform:b,appearance:v,portalContainer:x,isRendered:!0});return jsxRuntimeExports.jsx("div",_object_spread_props(_object_spread({ref:multipleRef(l,x),className:classNames("tgui-6a12827a138e8827",b==="ios"&&"tgui-56dbb42c1dbd5e2b",v==="dark"&&"tgui-865b921add8ee075",m)},g),{children:jsxRuntimeExports.jsx(AppRootContext.Provider,{value:S,children:h})}))}),LayoutGroupContext=reactExports.createContext({});function useConstant(o){const l=reactExports.useRef(null);return l.current===null&&(l.current=o()),l.current}const isBrowser=typeof window<"u",useIsomorphicLayoutEffect=isBrowser?reactExports.useLayoutEffect:reactExports.useEffect,PresenceContext=reactExports.createContext(null);function addUniqueItem(o,l){o.indexOf(l)===-1&&o.push(l)}function removeItem(o,l){const u=o.indexOf(l);u>-1&&o.splice(u,1)}const clamp=(o,l,u)=>u>l?l:u<o?o:u;let invariant=()=>{};const MotionGlobalConfig={},isNumericalString=o=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(o);function isObject$2(o){return typeof o=="object"&&o!==null}const isZeroValueString=o=>/^0[^.\s]+$/u.test(o);function memo(o){let l;return()=>(l===void 0&&(l=o()),l)}const noop$2=o=>o,combineFunctions=(o,l)=>u=>l(o(u)),pipe=(...o)=>o.reduce(combineFunctions),progress=(o,l,u)=>{const d=l-o;return d===0?1:(u-o)/d};class SubscriptionManager{constructor(){this.subscriptions=[]}add(l){return addUniqueItem(this.subscriptions,l),()=>removeItem(this.subscriptions,l)}notify(l,u,d){const f=this.subscriptions.length;if(f)if(f===1)this.subscriptions[0](l,u,d);else for(let h=0;h<f;h++){const m=this.subscriptions[h];m&&m(l,u,d)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const secondsToMilliseconds=o=>o*1e3,millisecondsToSeconds=o=>o/1e3;function velocityPerSecond(o,l){return l?o*(1e3/l):0}const wrap$1=(o,l,u)=>{const d=l-o;return((u-o)%d+d)%d+o},calcBezier=(o,l,u)=>(((1-3*u+3*l)*o+(3*u-6*l))*o+3*l)*o,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(o,l,u,d,f){let h,m,g=0;do m=l+(u-l)/2,h=calcBezier(m,d,f)-o,h>0?u=m:l=m;while(Math.abs(h)>subdivisionPrecision&&++g<subdivisionMaxIterations);return m}function cubicBezier(o,l,u,d){if(o===l&&u===d)return noop$2;const f=h=>binarySubdivide(h,0,1,o,u);return h=>h===0||h===1?h:calcBezier(f(h),l,d)}const mirrorEasing=o=>l=>l<=.5?o(2*l)/2:(2-o(2*(1-l)))/2,reverseEasing=o=>l=>1-o(1-l),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=o=>(o*=2)<1?.5*backIn(o):.5*(2-Math.pow(2,-10*(o-1))),circIn=o=>1-Math.sin(Math.acos(o)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=o=>Array.isArray(o)&&typeof o[0]!="number";function getEasingForSegment(o,l){return isEasingArray(o)?o[wrap$1(0,o.length,l)]:o}const isBezierDefinition=o=>Array.isArray(o)&&typeof o[0]=="number",easingLookup={linear:noop$2,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},isValidEasing=o=>typeof o=="string",easingDefinitionToFunction=o=>{if(isBezierDefinition(o)){invariant(o.length===4);const[l,u,d,f]=o;return cubicBezier(l,u,d,f)}else if(isValidEasing(o))return invariant(easingLookup[o]!==void 0),easingLookup[o];return o},stepsOrder=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function createRenderStep(o,l){let u=new Set,d=new Set,f=!1,h=!1;const m=new WeakSet;let g={delta:0,timestamp:0,isProcessing:!1};function v(b){m.has(b)&&(x.schedule(b),o()),b(g)}const x={schedule:(b,S=!1,E=!1)=>{const T=E&&f?u:d;return S&&m.add(b),T.has(b)||T.add(b),b},cancel:b=>{d.delete(b),m.delete(b)},process:b=>{if(g=b,f){h=!0;return}f=!0,[u,d]=[d,u],u.forEach(v),u.clear(),f=!1,h&&(h=!1,x.process(b))}};return x}const maxElapsed=40;function createRenderBatcher(o,l){let u=!1,d=!0;const f={delta:0,timestamp:0,isProcessing:!1},h=()=>u=!0,m=stepsOrder.reduce((I,O)=>(I[O]=createRenderStep(h),I),{}),{setup:g,read:v,resolveKeyframes:x,preUpdate:b,update:S,preRender:E,render:w,postRender:T}=m,C=()=>{const I=MotionGlobalConfig.useManualTiming?f.timestamp:performance.now();u=!1,MotionGlobalConfig.useManualTiming||(f.delta=d?1e3/60:Math.max(Math.min(I-f.timestamp,maxElapsed),1)),f.timestamp=I,f.isProcessing=!0,g.process(f),v.process(f),x.process(f),b.process(f),S.process(f),E.process(f),w.process(f),T.process(f),f.isProcessing=!1,u&&l&&(d=!1,o(C))},M=()=>{u=!0,d=!0,f.isProcessing||o(C)};return{schedule:stepsOrder.reduce((I,O)=>{const j=m[O];return I[O]=(N,V=!1,z=!1)=>(u||M(),j.schedule(N,V,z)),I},{}),cancel:I=>{for(let O=0;O<stepsOrder.length;O++)m[stepsOrder[O]].cancel(I)},state:f,steps:m}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps:frameSteps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop$2,!0);let now;function clearTime(){now=void 0}const time={now:()=>(now===void 0&&time.set(frameData.isProcessing||MotionGlobalConfig.useManualTiming?frameData.timestamp:performance.now()),now),set:o=>{now=o,queueMicrotask(clearTime)}},checkStringStartsWith=o=>l=>typeof l=="string"&&l.startsWith(o),isCSSVariableName=checkStringStartsWith("--"),startsAsVariableToken=checkStringStartsWith("var(--"),isCSSVariableToken=o=>startsAsVariableToken(o)?singleCssVariableRegex.test(o.split("/*")[0].trim()):!1,singleCssVariableRegex=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,number={test:o=>typeof o=="number",parse:parseFloat,transform:o=>o},alpha={...number,transform:o=>clamp(0,1,o)},scale={...number,default:1},sanitize=o=>Math.round(o*1e5)/1e5,floatRegex=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function isNullish(o){return o==null}const singleColorRegex=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(o,l)=>u=>!!(typeof u=="string"&&singleColorRegex.test(u)&&u.startsWith(o)||l&&!isNullish(u)&&Object.prototype.hasOwnProperty.call(u,l)),splitColor=(o,l,u)=>d=>{if(typeof d!="string")return d;const[f,h,m,g]=d.match(floatRegex);return{[o]:parseFloat(f),[l]:parseFloat(h),[u]:parseFloat(m),alpha:g!==void 0?parseFloat(g):1}},clampRgbUnit=o=>clamp(0,255,o),rgbUnit={...number,transform:o=>Math.round(clampRgbUnit(o))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:o,green:l,blue:u,alpha:d=1})=>"rgba("+rgbUnit.transform(o)+", "+rgbUnit.transform(l)+", "+rgbUnit.transform(u)+", "+sanitize(alpha.transform(d))+")"};function parseHex(o){let l="",u="",d="",f="";return o.length>5?(l=o.substring(1,3),u=o.substring(3,5),d=o.substring(5,7),f=o.substring(7,9)):(l=o.substring(1,2),u=o.substring(2,3),d=o.substring(3,4),f=o.substring(4,5),l+=l,u+=u,d+=d,f+=f),{red:parseInt(l,16),green:parseInt(u,16),blue:parseInt(d,16),alpha:f?parseInt(f,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},createUnitType=o=>({test:l=>typeof l=="string"&&l.endsWith(o)&&l.split(" ").length===1,parse:parseFloat,transform:l=>`${l}${o}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:o=>percent.parse(o)/100,transform:o=>percent.transform(o*100)},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:o,saturation:l,lightness:u,alpha:d=1})=>"hsla("+Math.round(o)+", "+percent.transform(sanitize(l))+", "+percent.transform(sanitize(u))+", "+sanitize(alpha.transform(d))+")"},color={test:o=>rgba.test(o)||hex.test(o)||hsla.test(o),parse:o=>rgba.test(o)?rgba.parse(o):hsla.test(o)?hsla.parse(o):hex.parse(o),transform:o=>typeof o=="string"?o:o.hasOwnProperty("red")?rgba.transform(o):hsla.transform(o),getAnimatableNone:o=>{const l=color.parse(o);return l.alpha=0,color.transform(l)}},colorRegex=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function test(o){var l,u;return isNaN(o)&&typeof o=="string"&&(((l=o.match(floatRegex))==null?void 0:l.length)||0)+(((u=o.match(colorRegex))==null?void 0:u.length)||0)>0}const NUMBER_TOKEN="number",COLOR_TOKEN="color",VAR_TOKEN="var",VAR_FUNCTION_TOKEN="var(",SPLIT_TOKEN="${}",complexRegex=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(o){const l=o.toString(),u=[],d={color:[],number:[],var:[]},f=[];let h=0;const g=l.replace(complexRegex,v=>(color.test(v)?(d.color.push(h),f.push(COLOR_TOKEN),u.push(color.parse(v))):v.startsWith(VAR_FUNCTION_TOKEN)?(d.var.push(h),f.push(VAR_TOKEN),u.push(v)):(d.number.push(h),f.push(NUMBER_TOKEN),u.push(parseFloat(v))),++h,SPLIT_TOKEN)).split(SPLIT_TOKEN);return{values:u,split:g,indexes:d,types:f}}function parseComplexValue(o){return analyseComplexValue(o).values}function createTransformer(o){const{split:l,types:u}=analyseComplexValue(o),d=l.length;return f=>{let h="";for(let m=0;m<d;m++)if(h+=l[m],f[m]!==void 0){const g=u[m];g===NUMBER_TOKEN?h+=sanitize(f[m]):g===COLOR_TOKEN?h+=color.transform(f[m]):h+=f[m]}return h}}const convertNumbersToZero=o=>typeof o=="number"?0:color.test(o)?color.getAnimatableNone(o):o;function getAnimatableNone$1(o){const l=parseComplexValue(o);return createTransformer(o)(l.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1};function hueToRgb(o,l,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?o+(l-o)*6*u:u<1/2?l:u<2/3?o+(l-o)*(2/3-u)*6:o}function hslaToRgba({hue:o,saturation:l,lightness:u,alpha:d}){o/=360,l/=100,u/=100;let f=0,h=0,m=0;if(!l)f=h=m=u;else{const g=u<.5?u*(1+l):u+l-u*l,v=2*u-g;f=hueToRgb(v,g,o+1/3),h=hueToRgb(v,g,o),m=hueToRgb(v,g,o-1/3)}return{red:Math.round(f*255),green:Math.round(h*255),blue:Math.round(m*255),alpha:d}}function mixImmediate(o,l){return u=>u>0?l:o}const mixNumber$1=(o,l,u)=>o+(l-o)*u,mixLinearColor=(o,l,u)=>{const d=o*o,f=u*(l*l-d)+d;return f<0?0:Math.sqrt(f)},colorTypes=[hex,rgba,hsla],getColorType=o=>colorTypes.find(l=>l.test(o));function asRGBA(o){const l=getColorType(o);if(!l)return!1;let u=l.parse(o);return l===hsla&&(u=hslaToRgba(u)),u}const mixColor=(o,l)=>{const u=asRGBA(o),d=asRGBA(l);if(!u||!d)return mixImmediate(o,l);const f={...u};return h=>(f.red=mixLinearColor(u.red,d.red,h),f.green=mixLinearColor(u.green,d.green,h),f.blue=mixLinearColor(u.blue,d.blue,h),f.alpha=mixNumber$1(u.alpha,d.alpha,h),rgba.transform(f))},invisibleValues=new Set(["none","hidden"]);function mixVisibility(o,l){return invisibleValues.has(o)?u=>u<=0?o:l:u=>u>=1?l:o}function mixNumber(o,l){return u=>mixNumber$1(o,l,u)}function getMixer(o){return typeof o=="number"?mixNumber:typeof o=="string"?isCSSVariableToken(o)?mixImmediate:color.test(o)?mixColor:mixComplex:Array.isArray(o)?mixArray:typeof o=="object"?color.test(o)?mixColor:mixObject:mixImmediate}function mixArray(o,l){const u=[...o],d=u.length,f=o.map((h,m)=>getMixer(h)(h,l[m]));return h=>{for(let m=0;m<d;m++)u[m]=f[m](h);return u}}function mixObject(o,l){const u={...o,...l},d={};for(const f in u)o[f]!==void 0&&l[f]!==void 0&&(d[f]=getMixer(o[f])(o[f],l[f]));return f=>{for(const h in d)u[h]=d[h](f);return u}}function matchOrder(o,l){const u=[],d={color:0,var:0,number:0};for(let f=0;f<l.values.length;f++){const h=l.types[f],m=o.indexes[h][d[h]],g=o.values[m]??0;u[f]=g,d[h]++}return u}const mixComplex=(o,l)=>{const u=complex.createTransformer(l),d=analyseComplexValue(o),f=analyseComplexValue(l);return d.indexes.var.length===f.indexes.var.length&&d.indexes.color.length===f.indexes.color.length&&d.indexes.number.length>=f.indexes.number.length?invisibleValues.has(o)&&!f.values.length||invisibleValues.has(l)&&!d.values.length?mixVisibility(o,l):pipe(mixArray(matchOrder(d,f),f.values),u):mixImmediate(o,l)};function mix(o,l,u){return typeof o=="number"&&typeof l=="number"&&typeof u=="number"?mixNumber$1(o,l,u):getMixer(o)(o,l)}const frameloopDriver=o=>{const l=({timestamp:u})=>o(u);return{start:(u=!0)=>frame.update(l,u),stop:()=>cancelFrame(l),now:()=>frameData.isProcessing?frameData.timestamp:time.now()}},generateLinearEasing=(o,l,u=10)=>{let d="";const f=Math.max(Math.round(l/u),2);for(let h=0;h<f;h++)d+=Math.round(o(h/(f-1))*1e4)/1e4+", ";return`linear(${d.substring(0,d.length-2)})`},maxGeneratorDuration=2e4;function calcGeneratorDuration(o){let l=0;const u=50;let d=o.next(l);for(;!d.done&&l<maxGeneratorDuration;)l+=u,d=o.next(l);return l>=maxGeneratorDuration?1/0:l}function createGeneratorEasing(o,l=100,u){const d=u({...o,keyframes:[0,l]}),f=Math.min(calcGeneratorDuration(d),maxGeneratorDuration);return{type:"keyframes",ease:h=>d.next(f*h).value/l,duration:millisecondsToSeconds(f)}}const velocitySampleDuration=5;function calcGeneratorVelocity(o,l,u){const d=Math.max(l-velocitySampleDuration,0);return velocityPerSecond(u-o(d),l-d)}const springDefaults={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},safeMin=.001;function findSpring({duration:o=springDefaults.duration,bounce:l=springDefaults.bounce,velocity:u=springDefaults.velocity,mass:d=springDefaults.mass}){let f,h,m=1-l;m=clamp(springDefaults.minDamping,springDefaults.maxDamping,m),o=clamp(springDefaults.minDuration,springDefaults.maxDuration,millisecondsToSeconds(o)),m<1?(f=x=>{const b=x*m,S=b*o,E=b-u,w=calcAngularFreq(x,m),T=Math.exp(-S);return safeMin-E/w*T},h=x=>{const S=x*m*o,E=S*u+u,w=Math.pow(m,2)*Math.pow(x,2)*o,T=Math.exp(-S),C=calcAngularFreq(Math.pow(x,2),m);return(-f(x)+safeMin>0?-1:1)*((E-w)*T)/C}):(f=x=>{const b=Math.exp(-x*o),S=(x-u)*o+1;return-safeMin+b*S},h=x=>{const b=Math.exp(-x*o),S=(u-x)*(o*o);return b*S});const g=5/o,v=approximateRoot(f,h,g);if(o=secondsToMilliseconds(o),isNaN(v))return{stiffness:springDefaults.stiffness,damping:springDefaults.damping,duration:o};{const x=Math.pow(v,2)*d;return{stiffness:x,damping:m*2*Math.sqrt(d*x),duration:o}}}const rootIterations=12;function approximateRoot(o,l,u){let d=u;for(let f=1;f<rootIterations;f++)d=d-o(d)/l(d);return d}function calcAngularFreq(o,l){return o*Math.sqrt(1-l*l)}const durationKeys=["duration","bounce"],physicsKeys=["stiffness","damping","mass"];function isSpringType(o,l){return l.some(u=>o[u]!==void 0)}function getSpringOptions(o){let l={velocity:springDefaults.velocity,stiffness:springDefaults.stiffness,damping:springDefaults.damping,mass:springDefaults.mass,isResolvedFromDuration:!1,...o};if(!isSpringType(o,physicsKeys)&&isSpringType(o,durationKeys))if(o.visualDuration){const u=o.visualDuration,d=2*Math.PI/(u*1.2),f=d*d,h=2*clamp(.05,1,1-(o.bounce||0))*Math.sqrt(f);l={...l,mass:springDefaults.mass,stiffness:f,damping:h}}else{const u=findSpring(o);l={...l,...u,mass:springDefaults.mass},l.isResolvedFromDuration=!0}return l}function spring(o=springDefaults.visualDuration,l=springDefaults.bounce){const u=typeof o!="object"?{visualDuration:o,keyframes:[0,1],bounce:l}:o;let{restSpeed:d,restDelta:f}=u;const h=u.keyframes[0],m=u.keyframes[u.keyframes.length-1],g={done:!1,value:h},{stiffness:v,damping:x,mass:b,duration:S,velocity:E,isResolvedFromDuration:w}=getSpringOptions({...u,velocity:-millisecondsToSeconds(u.velocity||0)}),T=E||0,C=x/(2*Math.sqrt(v*b)),M=m-h,A=millisecondsToSeconds(Math.sqrt(v/b)),k=Math.abs(M)<5;d||(d=k?springDefaults.restSpeed.granular:springDefaults.restSpeed.default),f||(f=k?springDefaults.restDelta.granular:springDefaults.restDelta.default);let I;if(C<1){const j=calcAngularFreq(A,C);I=N=>{const V=Math.exp(-C*A*N);return m-V*((T+C*A*M)/j*Math.sin(j*N)+M*Math.cos(j*N))}}else if(C===1)I=j=>m-Math.exp(-A*j)*(M+(T+A*M)*j);else{const j=A*Math.sqrt(C*C-1);I=N=>{const V=Math.exp(-C*A*N),z=Math.min(j*N,300);return m-V*((T+C*A*M)*Math.sinh(z)+j*M*Math.cosh(z))/j}}const O={calculatedDuration:w&&S||null,next:j=>{const N=I(j);if(w)g.done=j>=S;else{let V=j===0?T:0;C<1&&(V=j===0?secondsToMilliseconds(T):calcGeneratorVelocity(I,j,N));const z=Math.abs(V)<=d,W=Math.abs(m-N)<=f;g.done=z&&W}return g.value=g.done?m:N,g},toString:()=>{const j=Math.min(calcGeneratorDuration(O),maxGeneratorDuration),N=generateLinearEasing(V=>O.next(j*V).value,j,30);return j+"ms "+N},toTransition:()=>{}};return O}spring.applyToOptions=o=>{const l=createGeneratorEasing(o,100,spring);return o.ease=l.ease,o.duration=secondsToMilliseconds(l.duration),o.type="keyframes",o};function inertia({keyframes:o,velocity:l=0,power:u=.8,timeConstant:d=325,bounceDamping:f=10,bounceStiffness:h=500,modifyTarget:m,min:g,max:v,restDelta:x=.5,restSpeed:b}){const S=o[0],E={done:!1,value:S},w=z=>g!==void 0&&z<g||v!==void 0&&z>v,T=z=>g===void 0?v:v===void 0||Math.abs(g-z)<Math.abs(v-z)?g:v;let C=u*l;const M=S+C,A=m===void 0?M:m(M);A!==M&&(C=A-S);const k=z=>-C*Math.exp(-z/d),I=z=>A+k(z),O=z=>{const W=k(z),X=I(z);E.done=Math.abs(W)<=x,E.value=E.done?A:X};let j,N;const V=z=>{w(E.value)&&(j=z,N=spring({keyframes:[E.value,T(E.value)],velocity:calcGeneratorVelocity(I,z,E.value),damping:f,stiffness:h,restDelta:x,restSpeed:b}))};return V(0),{calculatedDuration:null,next:z=>{let W=!1;return!N&&j===void 0&&(W=!0,O(z),V(z)),j!==void 0&&z>=j?N.next(z-j):(!W&&O(z),E)}}}function createMixers(o,l,u){const d=[],f=u||MotionGlobalConfig.mix||mix,h=o.length-1;for(let m=0;m<h;m++){let g=f(o[m],o[m+1]);if(l){const v=Array.isArray(l)?l[m]||noop$2:l;g=pipe(v,g)}d.push(g)}return d}function interpolate(o,l,{clamp:u=!0,ease:d,mixer:f}={}){const h=o.length;if(invariant(h===l.length),h===1)return()=>l[0];if(h===2&&l[0]===l[1])return()=>l[1];const m=o[0]===o[1];o[0]>o[h-1]&&(o=[...o].reverse(),l=[...l].reverse());const g=createMixers(l,d,f),v=g.length,x=b=>{if(m&&b<o[0])return l[0];let S=0;if(v>1)for(;S<o.length-2&&!(b<o[S+1]);S++);const E=progress(o[S],o[S+1],b);return g[S](E)};return u?b=>x(clamp(o[0],o[h-1],b)):x}function fillOffset(o,l){const u=o[o.length-1];for(let d=1;d<=l;d++){const f=progress(0,l,d);o.push(mixNumber$1(u,1,f))}}function defaultOffset(o){const l=[0];return fillOffset(l,o.length-1),l}function convertOffsetToTimes(o,l){return o.map(u=>u*l)}function defaultEasing(o,l){return o.map(()=>l||easeInOut).splice(0,o.length-1)}function keyframes({duration:o=300,keyframes:l,times:u,ease:d="easeInOut"}){const f=isEasingArray(d)?d.map(easingDefinitionToFunction):easingDefinitionToFunction(d),h={done:!1,value:l[0]},m=convertOffsetToTimes(u&&u.length===l.length?u:defaultOffset(l),o),g=interpolate(m,l,{ease:Array.isArray(f)?f:defaultEasing(l,f)});return{calculatedDuration:o,next:v=>(h.value=g(v),h.done=v>=o,h)}}const isNotNull$1=o=>o!==null;function getFinalKeyframe$1(o,{repeat:l,repeatType:u="loop"},d,f=1){const h=o.filter(isNotNull$1),g=f<0||l&&u!=="loop"&&l%2===1?0:h.length-1;return!g||d===void 0?h[g]:d}const transitionTypeMap={decay:inertia,inertia,tween:keyframes,keyframes,spring};function replaceTransitionType(o){typeof o.type=="string"&&(o.type=transitionTypeMap[o.type])}class WithPromise{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(l=>{this.resolve=l})}notifyFinished(){this.resolve()}then(l,u){return this.finished.then(l,u)}}const percentToProgress=o=>o/100;class JSAnimation extends WithPromise{constructor(l){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var d,f;const{motionValue:u}=this.options;u&&u.updatedAt!==time.now()&&this.tick(time.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(f=(d=this.options).onStop)==null||f.call(d))},this.options=l,this.initAnimation(),this.play(),l.autoplay===!1&&this.pause()}initAnimation(){const{options:l}=this;replaceTransitionType(l);const{type:u=keyframes,repeat:d=0,repeatDelay:f=0,repeatType:h,velocity:m=0}=l;let{keyframes:g}=l;const v=u||keyframes;v!==keyframes&&typeof g[0]!="number"&&(this.mixKeyframes=pipe(percentToProgress,mix(g[0],g[1])),g=[0,100]);const x=v({...l,keyframes:g});h==="mirror"&&(this.mirroredGenerator=v({...l,keyframes:[...g].reverse(),velocity:-m})),x.calculatedDuration===null&&(x.calculatedDuration=calcGeneratorDuration(x));const{calculatedDuration:b}=x;this.calculatedDuration=b,this.resolvedDuration=b+f,this.totalDuration=this.resolvedDuration*(d+1)-f,this.generator=x}updateTime(l){const u=Math.round(l-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=u}tick(l,u=!1){const{generator:d,totalDuration:f,mixKeyframes:h,mirroredGenerator:m,resolvedDuration:g,calculatedDuration:v}=this;if(this.startTime===null)return d.next(0);const{delay:x=0,keyframes:b,repeat:S,repeatType:E,repeatDelay:w,type:T,onUpdate:C,finalKeyframe:M}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,l):this.speed<0&&(this.startTime=Math.min(l-f/this.speed,this.startTime)),u?this.currentTime=l:this.updateTime(l);const A=this.currentTime-x*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?A<0:A>f;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let I=this.currentTime,O=d;if(S){const z=Math.min(this.currentTime,f)/g;let W=Math.floor(z),X=z%1;!X&&z>=1&&(X=1),X===1&&W--,W=Math.min(W,S+1),!!(W%2)&&(E==="reverse"?(X=1-X,w&&(X-=w/g)):E==="mirror"&&(O=m)),I=clamp(0,1,X)*g}const j=k?{done:!1,value:b[0]}:O.next(I);h&&(j.value=h(j.value));let{done:N}=j;!k&&v!==null&&(N=this.playbackSpeed>=0?this.currentTime>=f:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return V&&T!==inertia&&(j.value=getFinalKeyframe$1(b,this.options,M,this.speed)),C&&C(j.value),V&&this.finish(),j}then(l,u){return this.finished.then(l,u)}get duration(){return millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){const{delay:l=0}=this.options||{};return this.duration+millisecondsToSeconds(l)}get time(){return millisecondsToSeconds(this.currentTime)}set time(l){var u;l=secondsToMilliseconds(l),this.currentTime=l,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=l:this.driver&&(this.startTime=this.driver.now()-l/this.playbackSpeed),(u=this.driver)==null||u.start(!1)}get speed(){return this.playbackSpeed}set speed(l){this.updateTime(time.now());const u=this.playbackSpeed!==l;this.playbackSpeed=l,u&&(this.time=millisecondsToSeconds(this.currentTime))}play(){var f,h;if(this.isStopped)return;const{driver:l=frameloopDriver,startTime:u}=this.options;this.driver||(this.driver=l(m=>this.tick(m))),(h=(f=this.options).onPlay)==null||h.call(f);const d=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=d):this.holdTime!==null?this.startTime=d-this.holdTime:this.startTime||(this.startTime=u??d),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(time.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var l,u;this.notifyFinished(),this.teardown(),this.state="finished",(u=(l=this.options).onComplete)==null||u.call(l)}cancel(){var l,u;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(u=(l=this.options).onCancel)==null||u.call(l)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(l){return this.startTime=0,this.tick(l,!0)}attachTimeline(l){var u;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(u=this.driver)==null||u.stop(),l.observe(this)}}function fillWildcards(o){for(let l=1;l<o.length;l++)o[l]??(o[l]=o[l-1])}const radToDeg=o=>o*180/Math.PI,rotate=o=>{const l=radToDeg(Math.atan2(o[1],o[0]));return rebaseAngle(l)},matrix2dParsers={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:o=>(Math.abs(o[0])+Math.abs(o[3]))/2,rotate,rotateZ:rotate,skewX:o=>radToDeg(Math.atan(o[1])),skewY:o=>radToDeg(Math.atan(o[2])),skew:o=>(Math.abs(o[1])+Math.abs(o[2]))/2},rebaseAngle=o=>(o=o%360,o<0&&(o+=360),o),rotateZ=rotate,scaleX=o=>Math.sqrt(o[0]*o[0]+o[1]*o[1]),scaleY=o=>Math.sqrt(o[4]*o[4]+o[5]*o[5]),matrix3dParsers={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX,scaleY,scale:o=>(scaleX(o)+scaleY(o))/2,rotateX:o=>rebaseAngle(radToDeg(Math.atan2(o[6],o[5]))),rotateY:o=>rebaseAngle(radToDeg(Math.atan2(-o[2],o[0]))),rotateZ,rotate:rotateZ,skewX:o=>radToDeg(Math.atan(o[4])),skewY:o=>radToDeg(Math.atan(o[1])),skew:o=>(Math.abs(o[1])+Math.abs(o[4]))/2};function defaultTransformValue(o){return o.includes("scale")?1:0}function parseValueFromTransform(o,l){if(!o||o==="none")return defaultTransformValue(l);const u=o.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let d,f;if(u)d=matrix3dParsers,f=u;else{const g=o.match(/^matrix\(([-\d.e\s,]+)\)$/u);d=matrix2dParsers,f=g}if(!f)return defaultTransformValue(l);const h=d[l],m=f[1].split(",").map(convertTransformToNumber);return typeof h=="function"?h(m):m[h]}const readTransformValue=(o,l)=>{const{transform:u="none"}=getComputedStyle(o);return parseValueFromTransform(u,l)};function convertTransformToNumber(o){return parseFloat(o.trim())}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder),isNumOrPxType=o=>o===number||o===px,transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(o=>!transformKeys.has(o));function removeNonTranslationalTransform(o){const l=[];return nonTranslationalTransformKeys.forEach(u=>{const d=o.getValue(u);d!==void 0&&(l.push([u,d.get()]),d.set(u.startsWith("scale")?1:0))}),l}const positionalValues={width:({x:o},{paddingLeft:l="0",paddingRight:u="0"})=>o.max-o.min-parseFloat(l)-parseFloat(u),height:({y:o},{paddingTop:l="0",paddingBottom:u="0"})=>o.max-o.min-parseFloat(l)-parseFloat(u),top:(o,{top:l})=>parseFloat(l),left:(o,{left:l})=>parseFloat(l),bottom:({y:o},{top:l})=>parseFloat(l)+(o.max-o.min),right:({x:o},{left:l})=>parseFloat(l)+(o.max-o.min),x:(o,{transform:l})=>parseValueFromTransform(l,"x"),y:(o,{transform:l})=>parseValueFromTransform(l,"y")};positionalValues.translateX=positionalValues.x,positionalValues.translateY=positionalValues.y;const toResolve=new Set;let isScheduled=!1,anyNeedsMeasurement=!1,isForced=!1;function measureAllKeyframes(){if(anyNeedsMeasurement){const o=Array.from(toResolve).filter(d=>d.needsMeasurement),l=new Set(o.map(d=>d.element)),u=new Map;l.forEach(d=>{const f=removeNonTranslationalTransform(d);f.length&&(u.set(d,f),d.render())}),o.forEach(d=>d.measureInitialState()),l.forEach(d=>{d.render();const f=u.get(d);f&&f.forEach(([h,m])=>{var g;(g=d.getValue(h))==null||g.set(m)})}),o.forEach(d=>d.measureEndState()),o.forEach(d=>{d.suspendedScrollY!==void 0&&window.scrollTo(0,d.suspendedScrollY)})}anyNeedsMeasurement=!1,isScheduled=!1,toResolve.forEach(o=>o.complete(isForced)),toResolve.clear()}function readAllKeyframes(){toResolve.forEach(o=>{o.readKeyframes(),o.needsMeasurement&&(anyNeedsMeasurement=!0)})}function flushKeyframeResolvers(){isForced=!0,readAllKeyframes(),measureAllKeyframes(),isForced=!1}class KeyframeResolver{constructor(l,u,d,f,h,m=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...l],this.onComplete=u,this.name=d,this.motionValue=f,this.element=h,this.isAsync=m}scheduleResolve(){this.state="scheduled",this.isAsync?(toResolve.add(this),isScheduled||(isScheduled=!0,frame.read(readAllKeyframes),frame.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:l,name:u,element:d,motionValue:f}=this;if(l[0]===null){const h=f==null?void 0:f.get(),m=l[l.length-1];if(h!==void 0)l[0]=h;else if(d&&u){const g=d.readValue(u,m);g!=null&&(l[0]=g)}l[0]===void 0&&(l[0]=m),f&&h===void 0&&f.set(l[0])}fillWildcards(l)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(l=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,l),toResolve.delete(this)}cancel(){this.state==="scheduled"&&(toResolve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const isCSSVar=o=>o.startsWith("--");function setStyle(o,l,u){isCSSVar(l)?o.style.setProperty(l,u):o.style[l]=u}const supportsScrollTimeline=memo(()=>window.ScrollTimeline!==void 0),supportsFlags={};function memoSupports(o,l){const u=memo(o);return()=>supportsFlags[l]??u()}const supportsLinearEasing=memoSupports(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cubicBezierAsString=([o,l,u,d])=>`cubic-bezier(${o}, ${l}, ${u}, ${d})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(o,l){if(o)return typeof o=="function"?supportsLinearEasing()?generateLinearEasing(o,l):"ease-out":isBezierDefinition(o)?cubicBezierAsString(o):Array.isArray(o)?o.map(u=>mapEasingToNativeEasing(u,l)||supportedWaapiEasing.easeOut):supportedWaapiEasing[o]}function startWaapiAnimation(o,l,u,{delay:d=0,duration:f=300,repeat:h=0,repeatType:m="loop",ease:g="easeOut",times:v}={},x=void 0){const b={[l]:u};v&&(b.offset=v);const S=mapEasingToNativeEasing(g,f);Array.isArray(S)&&(b.easing=S);const E={delay:d,duration:f,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:h+1,direction:m==="reverse"?"alternate":"normal"};return x&&(E.pseudoElement=x),o.animate(b,E)}function isGenerator(o){return typeof o=="function"&&"applyToOptions"in o}function applyGeneratorOptions({type:o,...l}){return isGenerator(o)&&supportsLinearEasing()?o.applyToOptions(l):(l.duration??(l.duration=300),l.ease??(l.ease="easeOut"),l)}class NativeAnimation extends WithPromise{constructor(l){if(super(),this.finishedTime=null,this.isStopped=!1,!l)return;const{element:u,name:d,keyframes:f,pseudoElement:h,allowFlatten:m=!1,finalKeyframe:g,onComplete:v}=l;this.isPseudoElement=!!h,this.allowFlatten=m,this.options=l,invariant(typeof l.type!="string");const x=applyGeneratorOptions(l);this.animation=startWaapiAnimation(u,d,f,x,h),x.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!h){const b=getFinalKeyframe$1(f,this.options,g,this.speed);this.updateMotionValue?this.updateMotionValue(b):setStyle(u,d,b),this.animation.cancel()}v==null||v(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var l,u;(u=(l=this.animation).finish)==null||u.call(l)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:l}=this;l==="idle"||l==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var l,u;this.isPseudoElement||(u=(l=this.animation).commitStyles)==null||u.call(l)}get duration(){var u,d;const l=((d=(u=this.animation.effect)==null?void 0:u.getComputedTiming)==null?void 0:d.call(u).duration)||0;return millisecondsToSeconds(Number(l))}get iterationDuration(){const{delay:l=0}=this.options||{};return this.duration+millisecondsToSeconds(l)}get time(){return millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(l){this.finishedTime=null,this.animation.currentTime=secondsToMilliseconds(l)}get speed(){return this.animation.playbackRate}set speed(l){l<0&&(this.finishedTime=null),this.animation.playbackRate=l}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(l){this.animation.startTime=l}attachTimeline({timeline:l,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,l&&supportsScrollTimeline()?(this.animation.timeline=l,noop$2):u(this)}}const unsupportedEasingFunctions={anticipate,backInOut,circInOut};function isUnsupportedEase(o){return o in unsupportedEasingFunctions}function replaceStringEasing(o){typeof o.ease=="string"&&isUnsupportedEase(o.ease)&&(o.ease=unsupportedEasingFunctions[o.ease])}const sampleDelta=10;class NativeAnimationExtended extends NativeAnimation{constructor(l){replaceStringEasing(l),replaceTransitionType(l),super(l),l.startTime&&(this.startTime=l.startTime),this.options=l}updateMotionValue(l){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...m}=this.options;if(!u)return;if(l!==void 0){u.set(l);return}const g=new JSAnimation({...m,autoplay:!1}),v=secondsToMilliseconds(this.finishedTime??this.time);u.setWithVelocity(g.sample(v-sampleDelta).value,g.sample(v).value,sampleDelta),g.stop()}}const isAnimatable=(o,l)=>l==="zIndex"?!1:!!(typeof o=="number"||Array.isArray(o)||typeof o=="string"&&(complex.test(o)||o==="0")&&!o.startsWith("url("));function hasKeyframesChanged(o){const l=o[0];if(o.length===1)return!0;for(let u=0;u<o.length;u++)if(o[u]!==l)return!0}function canAnimate(o,l,u,d){const f=o[0];if(f===null)return!1;if(l==="display"||l==="visibility")return!0;const h=o[o.length-1],m=isAnimatable(f,l),g=isAnimatable(h,l);return!m||!g?!1:hasKeyframesChanged(o)||(u==="spring"||isGenerator(u))&&d}function makeAnimationInstant(o){o.duration=0,o.type="keyframes"}const acceleratedValues=new Set(["opacity","clipPath","filter","transform"]),supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function supportsBrowserAnimation(o){var b;const{motionValue:l,name:u,repeatDelay:d,repeatType:f,damping:h,type:m}=o;if(!(((b=l==null?void 0:l.owner)==null?void 0:b.current)instanceof HTMLElement))return!1;const{onUpdate:v,transformTemplate:x}=l.owner.getProps();return supportsWaapi()&&u&&acceleratedValues.has(u)&&(u!=="transform"||!x)&&!v&&!d&&f!=="mirror"&&h!==0&&m!=="inertia"}const MAX_RESOLVE_DELAY=40;class AsyncMotionValueAnimation extends WithPromise{constructor({autoplay:l=!0,delay:u=0,type:d="keyframes",repeat:f=0,repeatDelay:h=0,repeatType:m="loop",keyframes:g,name:v,motionValue:x,element:b,...S}){var T;super(),this.stop=()=>{var C,M;this._animation&&(this._animation.stop(),(C=this.stopTimeline)==null||C.call(this)),(M=this.keyframeResolver)==null||M.cancel()},this.createdAt=time.now();const E={autoplay:l,delay:u,type:d,repeat:f,repeatDelay:h,repeatType:m,name:v,motionValue:x,element:b,...S},w=(b==null?void 0:b.KeyframeResolver)||KeyframeResolver;this.keyframeResolver=new w(g,(C,M,A)=>this.onKeyframesResolved(C,M,E,!A),v,x,b),(T=this.keyframeResolver)==null||T.scheduleResolve()}onKeyframesResolved(l,u,d,f){this.keyframeResolver=void 0;const{name:h,type:m,velocity:g,delay:v,isHandoff:x,onUpdate:b}=d;this.resolvedAt=time.now(),canAnimate(l,h,m,g)||((MotionGlobalConfig.instantAnimations||!v)&&(b==null||b(getFinalKeyframe$1(l,d,u))),l[0]=l[l.length-1],makeAnimationInstant(d),d.repeat=0);const E={startTime:f?this.resolvedAt?this.resolvedAt-this.createdAt>MAX_RESOLVE_DELAY?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:u,...d,keyframes:l},w=!x&&supportsBrowserAnimation(E)?new NativeAnimationExtended({...E,element:E.motionValue.owner.current}):new JSAnimation(E);w.finished.then(()=>this.notifyFinished()).catch(noop$2),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(l,u){return this.finished.finally(l).then(()=>{})}get animation(){var l;return this._animation||((l=this.keyframeResolver)==null||l.resume(),flushKeyframeResolvers()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(l){this.animation.time=l}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(l){this.animation.speed=l}get startTime(){return this.animation.startTime}attachTimeline(l){return this._animation?this.stopTimeline=this.animation.attachTimeline(l):this.pendingTimeline=l,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var l;this._animation&&this.animation.cancel(),(l=this.keyframeResolver)==null||l.cancel()}}class GroupAnimation{constructor(l){this.stop=()=>this.runAll("stop"),this.animations=l.filter(Boolean)}get finished(){return Promise.all(this.animations.map(l=>l.finished))}getAll(l){return this.animations[0][l]}setAll(l,u){for(let d=0;d<this.animations.length;d++)this.animations[d][l]=u}attachTimeline(l){const u=this.animations.map(d=>d.attachTimeline(l));return()=>{u.forEach((d,f)=>{d&&d(),this.animations[f].stop()})}}get time(){return this.getAll("time")}set time(l){this.setAll("time",l)}get speed(){return this.getAll("speed")}set speed(l){this.setAll("speed",l)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return getMax(this.animations,"duration")}get iterationDuration(){return getMax(this.animations,"iterationDuration")}runAll(l){this.animations.forEach(u=>u[l]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function getMax(o,l){let u=0;for(let d=0;d<o.length;d++){const f=o[d][l];f!==null&&f>u&&(u=f)}return u}class GroupAnimationWithThen extends GroupAnimation{then(l,u){return this.finished.finally(l).then(()=>{})}}const splitCSSVariableRegex=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(o){const l=splitCSSVariableRegex.exec(o);if(!l)return[,];const[,u,d,f]=l;return[`--${u??d}`,f]}function getVariableValue(o,l,u=1){const[d,f]=parseCSSVariable(o);if(!d)return;const h=window.getComputedStyle(l).getPropertyValue(d);if(h){const m=h.trim();return isNumericalString(m)?parseFloat(m):m}return isCSSVariableToken(f)?getVariableValue(f,l,u+1):f}function getValueTransition$1(o,l){return(o==null?void 0:o[l])??(o==null?void 0:o.default)??o}const positionalKeys=new Set(["width","height","top","left","right","bottom",...transformPropOrder]),auto={test:o=>o==="auto",parse:o=>o},testValueType=o=>l=>l.test(o),dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=o=>dimensionValueTypes.find(testValueType(o));function isNone(o){return typeof o=="number"?o===0:o!==null?o==="none"||o==="0"||isZeroValueString(o):!0}const maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(o){const[l,u]=o.slice(0,-1).split("(");if(l==="drop-shadow")return o;const[d]=u.match(floatRegex)||[];if(!d)return o;const f=u.replace(d,"");let h=maxDefaults.has(l)?1:0;return d!==u&&(h*=100),l+"("+h+f+")"}const functionRegex=/\b([a-z-]*)\(.*?\)/gu,filter={...complex,getAnimatableNone:o=>{const l=o.match(functionRegex);return l?l.map(applyDefaultFilter).join(" "):o}},int={...number,transform:Math.round},transformValueTypes={rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px},numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,backgroundPositionX:px,backgroundPositionY:px,...transformValueTypes,zIndex:int,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=o=>defaultValueTypes[o];function getAnimatableNone(o,l){let u=getDefaultValueType(o);return u!==filter&&(u=complex),u.getAnimatableNone?u.getAnimatableNone(l):void 0}const invalidTemplates=new Set(["auto","none","0"]);function makeNoneKeyframesAnimatable(o,l,u){let d=0,f;for(;d<o.length&&!f;){const h=o[d];typeof h=="string"&&!invalidTemplates.has(h)&&analyseComplexValue(h).values.length&&(f=o[d]),d++}if(f&&u)for(const h of l)o[h]=getAnimatableNone(u,f)}class DOMKeyframesResolver extends KeyframeResolver{constructor(l,u,d,f,h){super(l,u,d,f,h,!0)}readKeyframes(){const{unresolvedKeyframes:l,element:u,name:d}=this;if(!u||!u.current)return;super.readKeyframes();for(let v=0;v<l.length;v++){let x=l[v];if(typeof x=="string"&&(x=x.trim(),isCSSVariableToken(x))){const b=getVariableValue(x,u.current);b!==void 0&&(l[v]=b),v===l.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!positionalKeys.has(d)||l.length!==2)return;const[f,h]=l,m=findDimensionValueType(f),g=findDimensionValueType(h);if(m!==g)if(isNumOrPxType(m)&&isNumOrPxType(g))for(let v=0;v<l.length;v++){const x=l[v];typeof x=="string"&&(l[v]=parseFloat(x))}else positionalValues[d]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:l,name:u}=this,d=[];for(let f=0;f<l.length;f++)(l[f]===null||isNone(l[f]))&&d.push(f);d.length&&makeNoneKeyframesAnimatable(l,d,u)}measureInitialState(){const{element:l,unresolvedKeyframes:u,name:d}=this;if(!l||!l.current)return;d==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=positionalValues[d](l.measureViewportBox(),window.getComputedStyle(l.current)),u[0]=this.measuredOrigin;const f=u[u.length-1];f!==void 0&&l.getValue(d,f).jump(f,!1)}measureEndState(){var g;const{element:l,name:u,unresolvedKeyframes:d}=this;if(!l||!l.current)return;const f=l.getValue(u);f&&f.jump(this.measuredOrigin,!1);const h=d.length-1,m=d[h];d[h]=positionalValues[u](l.measureViewportBox(),window.getComputedStyle(l.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),(g=this.removedTransforms)!=null&&g.length&&this.removedTransforms.forEach(([v,x])=>{l.getValue(v).set(x)}),this.resolveNoneKeyframes()}}function resolveElements(o,l,u){if(o instanceof EventTarget)return[o];if(typeof o=="string"){let d=document;l&&(d=l.current);const f=(u==null?void 0:u[o])??d.querySelectorAll(o);return f?Array.from(f):[]}return Array.from(o)}const getValueAsType=(o,l)=>l&&typeof o=="number"?l.transform(o):o;function isHTMLElement(o){return isObject$2(o)&&"offsetHeight"in o}const MAX_VELOCITY_DELTA=30,isFloat=o=>!isNaN(parseFloat(o));class MotionValue{constructor(l,u={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=d=>{var h;const f=time.now();if(this.updatedAt!==f&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(d),this.current!==this.prev&&((h=this.events.change)==null||h.notify(this.current),this.dependents))for(const m of this.dependents)m.dirty()},this.hasAnimated=!1,this.setCurrent(l),this.owner=u.owner}setCurrent(l){this.current=l,this.updatedAt=time.now(),this.canTrackVelocity===null&&l!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(l=this.current){this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt}onChange(l){return this.on("change",l)}on(l,u){this.events[l]||(this.events[l]=new SubscriptionManager);const d=this.events[l].add(u);return l==="change"?()=>{d(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:d}clearListeners(){for(const l in this.events)this.events[l].clear()}attach(l,u){this.passiveEffect=l,this.stopPassiveEffect=u}set(l){this.passiveEffect?this.passiveEffect(l,this.updateAndNotify):this.updateAndNotify(l)}setWithVelocity(l,u,d){this.set(u),this.prev=void 0,this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt-d}jump(l,u=!0){this.updateAndNotify(l),this.prev=l,this.prevUpdatedAt=this.prevFrameValue=void 0,u&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var l;(l=this.events.change)==null||l.notify(this.current)}addDependent(l){this.dependents||(this.dependents=new Set),this.dependents.add(l)}removeDependent(l){this.dependents&&this.dependents.delete(l)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const l=time.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||l-this.updatedAt>MAX_VELOCITY_DELTA)return 0;const u=Math.min(this.updatedAt-this.prevUpdatedAt,MAX_VELOCITY_DELTA);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),u)}start(l){return this.stop(),new Promise(u=>{this.hasAnimated=!0,this.animation=l(u),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var l,u;(l=this.dependents)==null||l.clear(),(u=this.events.destroy)==null||u.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(o,l){return new MotionValue(o,l)}const{schedule:microtask,cancel:cancelMicrotask}=createRenderBatcher(queueMicrotask,!1),isDragging={x:!1,y:!1};function isDragActive(){return isDragging.x||isDragging.y}function setDragLock(o){return o==="x"||o==="y"?isDragging[o]?null:(isDragging[o]=!0,()=>{isDragging[o]=!1}):isDragging.x||isDragging.y?null:(isDragging.x=isDragging.y=!0,()=>{isDragging.x=isDragging.y=!1})}function setupGesture(o,l){const u=resolveElements(o),d=new AbortController,f={passive:!0,...l,signal:d.signal};return[u,f,()=>d.abort()]}function isValidHover(o){return!(o.pointerType==="touch"||isDragActive())}function hover(o,l,u={}){const[d,f,h]=setupGesture(o,u),m=g=>{if(!isValidHover(g))return;const{target:v}=g,x=l(v,g);if(typeof x!="function"||!v)return;const b=S=>{isValidHover(S)&&(x(S),v.removeEventListener("pointerleave",b))};v.addEventListener("pointerleave",b,f)};return d.forEach(g=>{g.addEventListener("pointerenter",m,f)}),h}const isNodeOrChild=(o,l)=>l?o===l?!0:isNodeOrChild(o,l.parentElement):!1,isPrimaryPointer=o=>o.pointerType==="mouse"?typeof o.button!="number"||o.button<=0:o.isPrimary!==!1,focusableElements=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function isElementKeyboardAccessible(o){return focusableElements.has(o.tagName)||o.tabIndex!==-1}const isPressing=new WeakSet;function filterEvents(o){return l=>{l.key==="Enter"&&o(l)}}function firePointerEvent(o,l){o.dispatchEvent(new PointerEvent("pointer"+l,{isPrimary:!0,bubbles:!0}))}const enableKeyboardPress=(o,l)=>{const u=o.currentTarget;if(!u)return;const d=filterEvents(()=>{if(isPressing.has(u))return;firePointerEvent(u,"down");const f=filterEvents(()=>{firePointerEvent(u,"up")}),h=()=>firePointerEvent(u,"cancel");u.addEventListener("keyup",f,l),u.addEventListener("blur",h,l)});u.addEventListener("keydown",d,l),u.addEventListener("blur",()=>u.removeEventListener("keydown",d),l)};function isValidPressEvent(o){return isPrimaryPointer(o)&&!isDragActive()}function press(o,l,u={}){const[d,f,h]=setupGesture(o,u),m=g=>{const v=g.currentTarget;if(!isValidPressEvent(g))return;isPressing.add(v);const x=l(v,g),b=(w,T)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",E),isPressing.has(v)&&isPressing.delete(v),isValidPressEvent(w)&&typeof x=="function"&&x(w,{success:T})},S=w=>{b(w,v===window||v===document||u.useGlobalTarget||isNodeOrChild(v,w.target))},E=w=>{b(w,!1)};window.addEventListener("pointerup",S,f),window.addEventListener("pointercancel",E,f)};return d.forEach(g=>{(u.useGlobalTarget?window:g).addEventListener("pointerdown",m,f),isHTMLElement(g)&&(g.addEventListener("focus",x=>enableKeyboardPress(x,f)),!isElementKeyboardAccessible(g)&&!g.hasAttribute("tabindex")&&(g.tabIndex=0))}),h}function isSVGElement(o){return isObject$2(o)&&"ownerSVGElement"in o}function isSVGSVGElement(o){return isSVGElement(o)&&o.tagName==="svg"}const isMotionValue=o=>!!(o&&o.getVelocity),valueTypes=[...dimensionValueTypes,color,complex],findValueType=o=>valueTypes.find(testValueType(o)),MotionConfigContext=reactExports.createContext({transformPagePoint:o=>o,isStatic:!1,reducedMotion:"never"});function setRef(o,l){if(typeof o=="function")return o(l);o!=null&&(o.current=l)}function composeRefs(...o){return l=>{let u=!1;const d=o.map(f=>{const h=setRef(f,l);return!u&&typeof h=="function"&&(u=!0),h});if(u)return()=>{for(let f=0;f<d.length;f++){const h=d[f];typeof h=="function"?h():setRef(o[f],null)}}}}function useComposedRefs(...o){return reactExports.useCallback(composeRefs(...o),o)}class PopChildMeasure extends reactExports.Component{getSnapshotBeforeUpdate(l){const u=this.props.childRef.current;if(u&&l.isPresent&&!this.props.isPresent){const d=u.offsetParent,f=isHTMLElement(d)&&d.offsetWidth||0,h=this.props.sizeRef.current;h.height=u.offsetHeight||0,h.width=u.offsetWidth||0,h.top=u.offsetTop,h.left=u.offsetLeft,h.right=f-h.width-h.left}return null}componentDidUpdate(){}render(){return this.props.children}}function PopChild({children:o,isPresent:l,anchorX:u,root:d}){const f=reactExports.useId(),h=reactExports.useRef(null),m=reactExports.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:g}=reactExports.useContext(MotionConfigContext),v=useComposedRefs(h,o==null?void 0:o.ref);return reactExports.useInsertionEffect(()=>{const{width:x,height:b,top:S,left:E,right:w}=m.current;if(l||!h.current||!x||!b)return;const T=u==="left"?`left: ${E}`:`right: ${w}`;h.current.dataset.motionPopId=f;const C=document.createElement("style");g&&(C.nonce=g);const M=d??document.head;return M.appendChild(C),C.sheet&&C.sheet.insertRule(`
91
+ For more information, see https://radix-ui.com/primitives/docs/components/${l.docsSlug}`;return reactExports.useEffect(()=>{o&&(document.getElementById(o)||console.error(u))},[u,o]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:o,descriptionId:l})=>{const d=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return reactExports.useEffect(()=>{var h;const f=(h=o.current)==null?void 0:h.getAttribute("aria-describedby");l&&f&&(document.getElementById(l)||console.warn(d))},[d,o,l]),null},Root$1=Dialog,Trigger=DialogTrigger,Portal=DialogPortal,Overlay$1=DialogOverlay,Content$1=DialogContent,Title=DialogTitle,Description=DialogDescription,Close=DialogClose;function __insertCSS$1(o){if(typeof document>"u")return;let l=document.head||document.getElementsByTagName("head")[0],u=document.createElement("style");u.type="text/css",l.appendChild(u),u.styleSheet?u.styleSheet.cssText=o:u.appendChild(document.createTextNode(o))}const DrawerContext=React.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),useDrawerContext=()=>React.useContext(DrawerContext);__insertCSS$1("[vaul-drawer]{touch-action:none;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}");const useIsomorphicLayoutEffect$1=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function chain(...o){return(...l)=>{for(let u of o)typeof u=="function"&&u(...l)}}function isMac(){return testPlatform(/^Mac/)}function isIPhone(){return testPlatform(/^iPhone/)}function isIPad(){return testPlatform(/^iPad/)||isMac()&&navigator.maxTouchPoints>1}function isIOS(){return isIPhone()||isIPad()}function testPlatform(o){return typeof window<"u"&&window.navigator!=null?o.test(window.navigator.platform):void 0}const visualViewport=typeof document<"u"&&window.visualViewport;function isScrollable(o){let l=window.getComputedStyle(o);return/(auto|scroll)/.test(l.overflow+l.overflowX+l.overflowY)}function getScrollParent(o){for(isScrollable(o)&&(o=o.parentElement);o&&!isScrollable(o);)o=o.parentElement;return o||document.scrollingElement||document.documentElement}const nonTextInputTypes=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let preventScrollCount=0,restore;function usePreventScroll(o={}){let{isDisabled:l}=o;useIsomorphicLayoutEffect$1(()=>{if(!l)return preventScrollCount++,preventScrollCount===1&&(isIOS()?restore=preventScrollMobileSafari():restore=preventScrollStandard()),()=>{preventScrollCount--,preventScrollCount===0&&restore()}},[l])}function preventScrollStandard(){return chain(setStyle$1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`))}function preventScrollMobileSafari(){let o,l=0,u=v=>{o=getScrollParent(v.target),!(o===document.documentElement&&o===document.body)&&(l=v.changedTouches[0].pageY)},d=v=>{if(!o||o===document.documentElement||o===document.body){v.preventDefault();return}let x=v.changedTouches[0].pageY,b=o.scrollTop,S=o.scrollHeight-o.clientHeight;S!==0&&((b<=0&&x>l||b>=S&&x<l)&&v.preventDefault(),l=x)},f=v=>{let x=v.target;isInput(x)&&x!==document.activeElement&&(v.preventDefault(),x.style.transform="translateY(-2000px)",x.focus(),requestAnimationFrame(()=>{x.style.transform=""}))},h=v=>{let x=v.target;isInput(x)&&(x.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{x.style.transform="",visualViewport&&(visualViewport.height<window.innerHeight?requestAnimationFrame(()=>{scrollIntoView(x)}):visualViewport.addEventListener("resize",()=>scrollIntoView(x),{once:!0}))}))},m=chain(setStyle$1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`)),g=chain(addEvent(document,"touchstart",u,{passive:!1,capture:!0}),addEvent(document,"touchmove",d,{passive:!1,capture:!0}),addEvent(document,"touchend",f,{passive:!1,capture:!0}),addEvent(document,"focus",h,!0));return()=>{m(),g()}}function setStyle$1(o,l,u){let d=o.style[l];return o.style[l]=u,()=>{o.style[l]=d}}function addEvent(o,l,u,d){return o.addEventListener(l,u,d),()=>{o.removeEventListener(l,u,d)}}function scrollIntoView(o){let l=document.scrollingElement||document.documentElement;for(;o&&o!==l;){let u=getScrollParent(o);if(u!==document.documentElement&&u!==document.body&&u!==o){let d=u.getBoundingClientRect().top,f=o.getBoundingClientRect().top,h=o.getBoundingClientRect().bottom;const m=u.getBoundingClientRect().bottom;h>m&&(u.scrollTop+=f-d)}o=u.parentElement}}function isInput(o){return o instanceof HTMLInputElement&&!nonTextInputTypes.has(o.type)||o instanceof HTMLTextAreaElement||o instanceof HTMLElement&&o.isContentEditable}function setRef$1(o,l){typeof o=="function"?o(l):o!=null&&(o.current=l)}function composeRefs$1(...o){return l=>o.forEach(u=>setRef$1(u,l))}function useComposedRefs$1(...o){return reactExports.useCallback(composeRefs$1(...o),o)}let previousBodyPosition=null;function usePositionFixed({isOpen:o,modal:l,nested:u,hasBeenOpened:d,preventScrollRestoration:f}){const[h,m]=React.useState(typeof window<"u"?window.location.href:""),g=React.useRef(0),v=React.useCallback(()=>{if(previousBodyPosition===null&&o){previousBodyPosition={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};const{scrollX:b,innerHeight:S}=window;document.body.style.setProperty("position","fixed","important"),document.body.style.top=`${-g.current}px`,document.body.style.left=`${-b}px`,document.body.style.right="0px",document.body.style.height="auto",setTimeout(()=>requestAnimationFrame(()=>{console.log(["scrollPosition",g.current,S]),g.current>=S&&(document.body.style.top=`${-g.current}px`)}),300)}},[o]),x=React.useCallback(()=>{if(previousBodyPosition!==null){const b=-parseInt(document.body.style.top,10),S=-parseInt(document.body.style.left,10);document.body.style.position=previousBodyPosition.position,document.body.style.top=previousBodyPosition.top,document.body.style.left=previousBodyPosition.left,document.body.style.height=previousBodyPosition.height,document.body.style.right="unset",requestAnimationFrame(()=>{if(f&&h!==window.location.href){m(window.location.href);return}window.scrollTo(S,b)}),previousBodyPosition=null}},[h]);return React.useEffect(()=>{function b(){g.current=window.scrollY}return b(),window.addEventListener("scroll",b),()=>{window.removeEventListener("scroll",b)}},[]),React.useEffect(()=>{u||!d||(o?l||setTimeout(()=>{x()},500):x())},[o,d,h,l,u,v,x]),{restorePositionSetting:x}}const cache=new WeakMap;function set(o,l,u=!1){if(!o||!(o instanceof HTMLElement)||!l)return;let d={};Object.entries(l).forEach(([f,h])=>{if(f.startsWith("--")){o.style.setProperty(f,h);return}d[f]=o.style[f],o.style[f]=h}),!u&&cache.set(o,d)}function reset(o,l){if(!o||!(o instanceof HTMLElement))return;let u=cache.get(o);u&&(l?o.style[l]=u[l]:Object.entries(u).forEach(([d,f])=>{o.style[d]=f}))}const isVertical=o=>{switch(o){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return o}};function getTranslate(o,l){if(!o)return null;const u=window.getComputedStyle(o),d=u.transform||u.webkitTransform||u.mozTransform;let f=d.match(/^matrix3d\((.+)\)$/);return f?parseFloat(f[1].split(", ")[isVertical(l)?13:12]):(f=d.match(/^matrix\((.+)\)$/),f?parseFloat(f[1].split(", ")[isVertical(l)?5:4]):null)}function dampenValue(o){return 8*(Math.log(o+1)-2)}const TRANSITIONS={DURATION:.5,EASE:[.32,.72,0,1]},VELOCITY_THRESHOLD=.4;function useCallbackRef(o){const l=React.useRef(o);return React.useEffect(()=>{l.current=o}),React.useMemo(()=>(...u)=>l.current==null?void 0:l.current.call(l,...u),[])}function useUncontrolledState({defaultProp:o,onChange:l}){const u=React.useState(o),[d]=u,f=React.useRef(d),h=useCallbackRef(l);return React.useEffect(()=>{f.current!==d&&(h(d),f.current=d)},[d,f,h]),u}function useControllableState({prop:o,defaultProp:l,onChange:u=()=>{}}){const[d,f]=useUncontrolledState({defaultProp:l,onChange:u}),h=o!==void 0,m=h?o:d,g=useCallbackRef(u),v=React.useCallback(x=>{if(h){const S=typeof x=="function"?x(o):x;S!==o&&g(S)}else f(x)},[h,o,f,g]);return[m,v]}function useSnapPoints({activeSnapPointProp:o,setActiveSnapPointProp:l,snapPoints:u,drawerRef:d,overlayRef:f,fadeFromIndex:h,onSnapPointChange:m,direction:g="bottom"}){const[v,x]=useControllableState({prop:o,defaultProp:u==null?void 0:u[0],onChange:l}),b=React.useMemo(()=>v===(u==null?void 0:u[u.length-1])||null,[u,v]),S=u&&u.length>0&&(h||h===0)&&!Number.isNaN(h)&&u[h]===v||!u,E=React.useMemo(()=>u==null?void 0:u.findIndex(I=>I===v),[u,v]),w=React.useMemo(()=>{var I;return(I=u==null?void 0:u.map(O=>{const j=typeof window<"u",N=typeof O=="string";let V=0;if(N&&(V=parseInt(O,10)),isVertical(g)){const W=N?V:j?O*window.innerHeight:0;return j?g==="bottom"?window.innerHeight-W:-window.innerHeight+W:W}const z=N?V:j?O*window.innerWidth:0;return j?g==="right"?window.innerWidth-z:-window.innerWidth+z:z}))!=null?I:[]},[u]),T=React.useMemo(()=>E!==null?w==null?void 0:w[E]:null,[w,E]),C=React.useCallback(I=>{var O;const j=(O=w==null?void 0:w.findIndex(N=>N===I))!=null?O:null;m(j),set(d.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:isVertical(g)?`translate3d(0, ${I}px, 0)`:`translate3d(${I}px, 0, 0)`}),w&&j!==w.length-1&&j!==h?set(f.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"0"}):set(f.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"1"}),x(j!==null?u==null?void 0:u[j]:null)},[d.current,u,w,h,f,x]);React.useEffect(()=>{if(o){var I;const O=(I=u==null?void 0:u.findIndex(j=>j===o))!=null?I:-1;w&&O!==-1&&typeof w[O]=="number"&&C(w[O])}},[o,u,w,C]);function M({draggedDistance:I,closeDrawer:O,velocity:j,dismissible:N}){if(h===void 0)return;const V=g==="bottom"||g==="right"?(T??0)-I:(T??0)+I,z=E===h-1,W=E===0,X=I>0;if(z&&set(f.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),j>2&&!X){N?O():C(w[0]);return}if(j>2&&X&&w&&u){C(w[u.length-1]);return}const ie=w==null?void 0:w.reduce((le,Q)=>typeof le!="number"||typeof Q!="number"?le:Math.abs(Q-V)<Math.abs(le-V)?Q:le),oe=isVertical(g)?window.innerHeight:window.innerWidth;if(j>VELOCITY_THRESHOLD&&Math.abs(I)<oe*.4){const le=X?1:-1;if(le>0&&b){C(w[u.length-1]);return}if(W&&le<0&&N&&O(),E===null)return;C(w[E+le]);return}C(ie)}function A({draggedDistance:I}){if(T===null)return;const O=g==="bottom"||g==="right"?T-I:T+I;(g==="bottom"||g==="right")&&O<w[w.length-1]||(g==="top"||g==="left")&&O>w[w.length-1]||set(d.current,{transform:isVertical(g)?`translate3d(0, ${O}px, 0)`:`translate3d(${O}px, 0, 0)`})}function k(I,O){if(!u||typeof E!="number"||!w||h===void 0)return null;const j=E===h-1;if(E>=h&&O)return 0;if(j&&!O)return 1;if(!S&&!j)return null;const V=j?E+1:E-1,z=j?w[V]-w[V-1]:w[V+1]-w[V],W=I/Math.abs(z);return j?1-W:W}return{isLastSnapPoint:b,activeSnapPoint:v,shouldFade:S,getPercentageDragged:k,setActiveSnapPoint:x,activeSnapPointIndex:E,onRelease:M,onDrag:A,snapPointsOffset:w}}const CLOSE_THRESHOLD=.25,SCROLL_LOCK_TIMEOUT=100,BORDER_RADIUS=8,NESTED_DISPLACEMENT=16,WINDOW_TOP_OFFSET=26,DRAG_CLASS="vaul-dragging";function Root({open:o,onOpenChange:l,children:u,shouldScaleBackground:d,onDrag:f,onRelease:h,snapPoints:m,nested:g=!1,closeThreshold:v=CLOSE_THRESHOLD,scrollLockTimeout:x=SCROLL_LOCK_TIMEOUT,dismissible:b=!0,fadeFromIndex:S=m&&m.length-1,activeSnapPoint:E,setActiveSnapPoint:w,fixed:T,modal:C=!0,onClose:M,direction:A="bottom",preventScrollRestoration:k=!0,disablePreventScroll:I=!1}){var O;const[j=!1,N]=React.useState(!1),[V,z]=React.useState(!1),[W,X]=React.useState(!1),[ie,oe]=React.useState(!1),[le,Q]=React.useState(!1),[K,$]=React.useState(!1),G=React.useRef(null),L=React.useRef(null),B=React.useRef(null),q=React.useRef(null),U=React.useRef(null),Y=React.useRef(!1),te=React.useRef(null),ae=React.useRef(0),ue=React.useRef(!1),ve=React.useRef(0),fe=React.useRef(null),ee=React.useRef(((O=fe.current)==null?void 0:O.getBoundingClientRect().height)||0),de=React.useRef(0),ge=React.useCallback(Ae=>{m&&Ae===je.length-1&&(L.current=new Date)},[]),{activeSnapPoint:he,activeSnapPointIndex:Se,setActiveSnapPoint:be,onRelease:_e,snapPointsOffset:je,onDrag:He,shouldFade:Be,getPercentageDragged:rt}=useSnapPoints({snapPoints:m,activeSnapPointProp:E,setActiveSnapPointProp:w,drawerRef:fe,fadeFromIndex:S,overlayRef:G,onSnapPointChange:ge,direction:A});usePreventScroll({isDisabled:!j||le||!C||K||!V||I});const{restorePositionSetting:Ke}=usePositionFixed({isOpen:j,modal:C,nested:g,hasBeenOpened:V,preventScrollRestoration:k});function we(){return(window.innerWidth-WINDOW_TOP_OFFSET)/window.innerWidth}function Me(Ae){var Ie;!b&&!m||fe.current&&!fe.current.contains(Ae.target)||(ee.current=((Ie=fe.current)==null?void 0:Ie.getBoundingClientRect().height)||0,Q(!0),B.current=new Date,isIOS()&&window.addEventListener("touchend",()=>Y.current=!1,{once:!0}),Ae.target.setPointerCapture(Ae.pointerId),ae.current=isVertical(A)?Ae.clientY:Ae.clientX)}function $e(Ae,Ie){var Ge;let Ye=Ae;const st=(Ge=window.getSelection())==null?void 0:Ge.toString(),ze=fe.current?getTranslate(fe.current,A):null,Le=new Date;if(Ye.hasAttribute("data-vaul-no-drag")||Ye.closest("[data-vaul-no-drag]"))return!1;if(A==="right"||A==="left")return!0;if(L.current&&Le.getTime()-L.current.getTime()<500)return!1;if(ze!==null&&(A==="bottom"?ze>0:ze<0))return!0;if(st&&st.length>0)return!1;if(U.current&&Le.getTime()-U.current.getTime()<x&&ze===0||Ie)return U.current=Le,!1;for(;Ye;){if(Ye.scrollHeight>Ye.clientHeight){if(Ye.scrollTop!==0)return U.current=new Date,!1;if(Ye.getAttribute("role")==="dialog")return!0}Ye=Ye.parentNode}return!0}function Qe(Ae){if(fe.current&&le){const Ie=A==="bottom"||A==="right"?1:-1,Ge=(ae.current-(isVertical(A)?Ae.clientY:Ae.clientX))*Ie,Ye=Ge>0,st=m&&!b&&!Ye;if(st&&Se===0)return;const ze=Math.abs(Ge),Le=document.querySelector("[vaul-drawer-wrapper]");let at=ze/ee.current;const It=rt(ze,Ye);if(It!==null&&(at=It),st&&at>=1||!Y.current&&!$e(Ae.target,Ye))return;if(fe.current.classList.add(DRAG_CLASS),Y.current=!0,set(fe.current,{transition:"none"}),set(G.current,{transition:"none"}),m&&He({draggedDistance:Ge}),Ye&&!m){const kt=dampenValue(Ge),Qt=Math.min(kt*-1,0)*Ie;set(fe.current,{transform:isVertical(A)?`translate3d(0, ${Qt}px, 0)`:`translate3d(${Qt}px, 0, 0)`});return}const Ft=1-at;if((Be||S&&Se===S-1)&&(f==null||f(Ae,at),set(G.current,{opacity:`${Ft}`,transition:"none"},!0)),Le&&G.current&&d){const kt=Math.min(we()+at*(1-we()),1),Qt=8-at*8,Je=Math.max(0,14-at*14);set(Le,{borderRadius:`${Qt}px`,transform:isVertical(A)?`scale(${kt}) translate3d(0, ${Je}px, 0)`:`scale(${kt}) translate3d(${Je}px, 0, 0)`,transition:"none"},!0)}if(!m){const kt=ze*Ie;set(fe.current,{transform:isVertical(A)?`translate3d(0, ${kt}px, 0)`:`translate3d(${kt}px, 0, 0)`})}}}React.useEffect(()=>()=>{ut(!1),Ke()},[]),React.useEffect(()=>{var Ae;function Ie(){if(!fe.current)return;const Ge=document.activeElement;if(isInput(Ge)||ue.current){var Ye;const st=((Ye=window.visualViewport)==null?void 0:Ye.height)||0;let ze=window.innerHeight-st;const Le=fe.current.getBoundingClientRect().height||0;de.current||(de.current=Le);const at=fe.current.getBoundingClientRect().top;if(Math.abs(ve.current-ze)>60&&(ue.current=!ue.current),m&&m.length>0&&je&&Se){const It=je[Se]||0;ze+=It}if(ve.current=ze,Le>st||ue.current){const It=fe.current.getBoundingClientRect().height;let Ft=It;It>st&&(Ft=st-WINDOW_TOP_OFFSET),T?fe.current.style.height=`${It-Math.max(ze,0)}px`:fe.current.style.height=`${Math.max(Ft,st-at)}px`}else fe.current.style.height=`${de.current}px`;m&&m.length>0&&!ue.current?fe.current.style.bottom="0px":fe.current.style.bottom=`${Math.max(ze,0)}px`}}return(Ae=window.visualViewport)==null||Ae.addEventListener("resize",Ie),()=>{var Ge;return(Ge=window.visualViewport)==null?void 0:Ge.removeEventListener("resize",Ie)}},[Se,m,je]);function Oe(){fe.current&&(it(),M==null||M(),set(fe.current,{transform:isVertical(A)?`translate3d(0, ${A==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${A==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),set(G.current,{opacity:"0",transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),ut(!1),setTimeout(()=>{X(!1),N(!1)},300),setTimeout(()=>{m&&be(m[0])},TRANSITIONS.DURATION*1e3))}React.useEffect(()=>{if(!j&&d){const Ae=setTimeout(()=>{reset(document.body)},200);return()=>clearTimeout(Ae)}},[j,d]),React.useLayoutEffect(()=>{o?(N(!0),z(!0)):Oe()},[o]),React.useEffect(()=>{ie&&(l==null||l(j))},[j]),React.useEffect(()=>{oe(!0)},[]);function tt(){if(!fe.current)return;const Ae=document.querySelector("[vaul-drawer-wrapper]"),Ie=getTranslate(fe.current,A);set(fe.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`}),set(G.current,{transition:`opacity ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,opacity:"1"}),d&&Ie&&Ie>0&&j&&set(Ae,{borderRadius:`${BORDER_RADIUS}px`,overflow:"hidden",...isVertical(A)?{transform:`scale(${we()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${we()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${TRANSITIONS.DURATION}s`,transitionTimingFunction:`cubic-bezier(${TRANSITIONS.EASE.join(",")})`},!0)}function it(){!le||!fe.current||(fe.current.classList.remove(DRAG_CLASS),Y.current=!1,Q(!1),q.current=new Date)}function ft(Ae){if(!le||!fe.current)return;fe.current.classList.remove(DRAG_CLASS),Y.current=!1,Q(!1),q.current=new Date;const Ie=getTranslate(fe.current,A);if(!$e(Ae.target,!1)||!Ie||Number.isNaN(Ie)||B.current===null)return;const Ge=q.current.getTime()-B.current.getTime(),Ye=ae.current-(isVertical(A)?Ae.clientY:Ae.clientX),st=Math.abs(Ye)/Ge;if(st>.05&&($(!0),setTimeout(()=>{$(!1)},200)),m){_e({draggedDistance:Ye*(A==="bottom"||A==="right"?1:-1),closeDrawer:Oe,velocity:st,dismissible:b}),h==null||h(Ae,!0);return}if(A==="bottom"||A==="right"?Ye>0:Ye<0){tt(),h==null||h(Ae,!0);return}if(st>VELOCITY_THRESHOLD){Oe(),h==null||h(Ae,!1);return}var ze;const Le=Math.min((ze=fe.current.getBoundingClientRect().height)!=null?ze:0,window.innerHeight);if(Ie>=Le*v){Oe(),h==null||h(Ae,!1);return}h==null||h(Ae,!0),tt()}React.useEffect(()=>{j&&(set(document.documentElement,{scrollBehavior:"auto"}),L.current=new Date,ut(!0))},[j]),React.useEffect(()=>{if(fe.current&&W){var Ae;const Ie=fe==null||(Ae=fe.current)==null?void 0:Ae.querySelectorAll("*");Ie==null||Ie.forEach(Ge=>{const Ye=Ge;(Ye.scrollHeight>Ye.clientHeight||Ye.scrollWidth>Ye.clientWidth)&&Ye.classList.add("vaul-scrollable")})}},[W]);function ut(Ae){const Ie=document.querySelector("[vaul-drawer-wrapper]");!Ie||!d||(Ae?(set(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),set(document.body,{background:"black"},!0),set(Ie,{borderRadius:`${BORDER_RADIUS}px`,overflow:"hidden",...isVertical(A)?{transform:`scale(${we()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${we()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${TRANSITIONS.DURATION}s`,transitionTimingFunction:`cubic-bezier(${TRANSITIONS.EASE.join(",")})`})):(reset(Ie,"overflow"),reset(Ie,"transform"),reset(Ie,"borderRadius"),set(Ie,{transitionProperty:"transform, border-radius",transitionDuration:`${TRANSITIONS.DURATION}s`,transitionTimingFunction:`cubic-bezier(${TRANSITIONS.EASE.join(",")})`})))}function xt(Ae){const Ie=Ae?(window.innerWidth-NESTED_DISPLACEMENT)/window.innerWidth:1,Ge=Ae?-NESTED_DISPLACEMENT:0;te.current&&window.clearTimeout(te.current),set(fe.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:`scale(${Ie}) translate3d(0, ${Ge}px, 0)`}),!Ae&&fe.current&&(te.current=setTimeout(()=>{const Ye=getTranslate(fe.current,A);set(fe.current,{transition:"none",transform:isVertical(A)?`translate3d(0, ${Ye}px, 0)`:`translate3d(${Ye}px, 0, 0)`})},500))}function ct(Ae,Ie){if(Ie<0)return;const Ge=isVertical(A)?window.innerHeight:window.innerWidth,Ye=(Ge-NESTED_DISPLACEMENT)/Ge,st=Ye+Ie*(1-Ye),ze=-NESTED_DISPLACEMENT+Ie*NESTED_DISPLACEMENT;set(fe.current,{transform:isVertical(A)?`scale(${st}) translate3d(0, ${ze}px, 0)`:`scale(${st}) translate3d(${ze}px, 0, 0)`,transition:"none"})}function qe(Ae,Ie){const Ge=isVertical(A)?window.innerHeight:window.innerWidth,Ye=Ie?(Ge-NESTED_DISPLACEMENT)/Ge:1,st=Ie?-NESTED_DISPLACEMENT:0;Ie&&set(fe.current,{transition:`transform ${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(",")})`,transform:isVertical(A)?`scale(${Ye}) translate3d(0, ${st}px, 0)`:`scale(${Ye}) translate3d(${st}px, 0, 0)`})}return React.createElement(Root$1,{modal:C,onOpenChange:Ae=>{if(o!==void 0){l==null||l(Ae);return}Ae?(z(!0),N(Ae)):Oe()},open:j},React.createElement(DrawerContext.Provider,{value:{visible:W,activeSnapPoint:he,snapPoints:m,setActiveSnapPoint:be,drawerRef:fe,overlayRef:G,scaleBackground:ut,onOpenChange:l,onPress:Me,setVisible:X,onRelease:ft,onDrag:Qe,dismissible:b,isOpen:j,shouldFade:Be,closeDrawer:Oe,onNestedDrag:ct,onNestedOpenChange:xt,onNestedRelease:qe,keyboardIsOpen:ue,openProp:o,modal:C,snapPointsOffset:je,direction:A}},u))}const Overlay=React.forwardRef(function({children:o,...l},u){const{overlayRef:d,snapPoints:f,onRelease:h,shouldFade:m,isOpen:g,visible:v}=useDrawerContext(),x=useComposedRefs$1(u,d),b=f&&f.length>0;return React.createElement(Overlay$1,{onMouseUp:h,ref:x,"vaul-drawer-visible":v?"true":"false","vaul-overlay":"","vaul-snap-points":g&&b?"true":"false","vaul-snap-points-overlay":g&&m?"true":"false",...l})});Overlay.displayName="Drawer.Overlay";const Content=React.forwardRef(function({onOpenAutoFocus:o,onPointerDownOutside:l,onAnimationEnd:u,style:d,...f},h){const{drawerRef:m,onPress:g,onRelease:v,onDrag:x,dismissible:b,keyboardIsOpen:S,snapPointsOffset:E,visible:w,closeDrawer:T,modal:C,openProp:M,onOpenChange:A,setVisible:k,direction:I}=useDrawerContext(),O=useComposedRefs$1(h,m),j=React.useRef(null);React.useEffect(()=>{k(!0)},[]);const N=(V,z,W=0)=>{const X=Math.abs(V.x),ie=Math.abs(V.y),oe=X>ie;return z==="left"||z==="right"?oe&&X>W:!oe&&ie>W};return React.createElement(Content$1,{"vaul-drawer":"","vaul-drawer-direction":I,"vaul-drawer-visible":w?"true":"false",...f,ref:O,style:E&&E.length>0?{"--snap-point-height":`${E[0]}px`,...d}:d,onOpenAutoFocus:V=>{if(o)o(V);else{var z;V.preventDefault(),(z=m.current)==null||z.focus()}},onPointerDown:V=>{f.onPointerDown==null||f.onPointerDown.call(f,V),j.current={x:V.clientX,y:V.clientY},g(V)},onPointerDownOutside:V=>{if(l==null||l(V),!C||V.defaultPrevented){V.preventDefault();return}S.current&&(S.current=!1),V.preventDefault(),A==null||A(!1),!(!b||M!==void 0)&&T()},onPointerMove:V=>{if(f.onPointerMove==null||f.onPointerMove.call(f,V),!j.current)return null;const z=V.clientY-j.current.y,W=V.clientX-j.current.x,X=["left","right"].includes(I),ie=["left","top"].includes(I)?Math.min:Math.max,oe=X?ie(0,W):0,le=X?0:ie(0,z),Q=V.pointerType==="touch"?10:2;N({x:oe,y:le},I,Q)?x(V):(Math.abs(W)>Q||Math.abs(z)>Q)&&(j.current=null)},onPointerUp:V=>{f.onPointerUp==null||f.onPointerUp.call(f,V),j.current=null,v(V)}})});Content.displayName="Drawer.Content";function NestedRoot({onDrag:o,onOpenChange:l,...u}){const{onNestedDrag:d,onNestedOpenChange:f,onNestedRelease:h}=useDrawerContext();if(!d)throw new Error("Drawer.NestedRoot must be placed in another drawer");return React.createElement(Root,{nested:!0,onClose:()=>{f(!1)},onDrag:(m,g)=>{d(m,g),o==null||o(m,g)},onOpenChange:m=>{m&&f(m),l==null||l(m)},onRelease:h,...u})}const Drawer$1={Root,NestedRoot,Content,Overlay,Trigger,Portal,Close,Title,Description},ModalClose=o=>jsxRuntimeExports.jsx(Drawer$1.Close,_object_spread({asChild:!0},o)),ModalHeader=reactExports.forwardRef((o,l)=>{var{before:u,after:d,className:f,children:h}=o,m=_object_without_properties(o,["before","after","className","children"]);const g=usePlatform$1();return jsxRuntimeExports.jsxs("header",_object_spread_props(_object_spread({ref:l,className:classNames("tgui-f67c8fb3553eee55",f)},m),{children:[jsxRuntimeExports.jsx("div",{className:"tgui-09b5f6cfd7ba56ab",children:u}),g==="ios"&&jsxRuntimeExports.jsx(Text,{weight:"2",className:"tgui-7ce1022bfdcb0ae3",children:h}),jsxRuntimeExports.jsx("div",{className:"tgui-fe1d6742d85038d7",children:d})]}))}),hexToRGB=o=>{let l=o;o.length===4&&(l=o.replace(/([^#])/g,"$1$1"));const u=parseInt(l.replace("#",""),16),d=u>>16,f=u>>8;return[d&255,f&255,u&255]},getTelegramData=()=>{var o;if(canUseDOM$1)return(o=window.Telegram)===null||o===void 0?void 0:o.WebApp},DEFAULT_LIGHT_OVERLAY_RGB=[255,255,255],DEFAULT_DARK_OVERLAY_RGB=[33,33,33],ModalOverlay=reactExports.forwardRef((o,l)=>{var{className:u}=o,d=_object_without_properties(o,["className"]);const f=useAppRootContext(),[h,m,g]=reactExports.useMemo(()=>{const v=getTelegramData();return v&&v.themeParams.bg_color?hexToRGB(v.themeParams.bg_color):f.appearance==="light"?DEFAULT_LIGHT_OVERLAY_RGB:DEFAULT_DARK_OVERLAY_RGB},[f.appearance]);return jsxRuntimeExports.jsx(Drawer$1.Overlay,_object_spread({ref:l,style:{background:`rgba(${h}, ${m}, ${g}, .4)`},className:classNames("tgui-3197096cb603b35a",u)},d))}),Modal=reactExports.forwardRef((o,l)=>{var{overlayComponent:u=jsxRuntimeExports.jsx(ModalOverlay,{}),open:d,onOpenChange:f,header:h,className:m,children:g,nested:v,trigger:x,closeThreshold:b,scrollLockTimeout:S,snapPoints:E,fadeFromIndex:w,modal:T,preventScrollRestoration:C,dismissible:M}=o,A=_object_without_properties(o,["overlayComponent","open","onOpenChange","header","className","children","nested","trigger","closeThreshold","scrollLockTimeout","snapPoints","fadeFromIndex","modal","preventScrollRestoration","dismissible"]),k;const I=useAppRootContext(),[O,j]=reactExports.useState((k=I.portalContainer)===null||k===void 0?void 0:k.current);reactExports.useEffect(()=>{var V;j((V=I.portalContainer)===null||V===void 0?void 0:V.current)},[I.portalContainer]);const N=v?Drawer$1.NestedRoot:Drawer$1.Root;return jsxRuntimeExports.jsxs(N,{open:d,onOpenChange:f,closeThreshold:b,scrollLockTimeout:S,snapPoints:E,fadeFromIndex:w,modal:T,preventScrollRestoration:C,dismissible:M,children:[x&&jsxRuntimeExports.jsx(Drawer$1.Trigger,{asChild:!0,children:x}),jsxRuntimeExports.jsxs(Drawer$1.Portal,{container:O,children:[u,jsxRuntimeExports.jsxs(Drawer$1.Content,_object_spread_props(_object_spread({ref:l,className:classNames("tgui-cc76354712c6e8d9",m)},A),{children:[h,jsxRuntimeExports.jsx("div",{className:"tgui-5dc6ad1ca3ac3ed4",children:g})]}))]})]})});Modal.Header=ModalHeader,Modal.Overlay=ModalOverlay,Modal.Close=ModalClose;const getBrowserAppearanceSubscriber=o=>{if(!canUseDOM$1||!window.matchMedia)return()=>{};const l=window.matchMedia("(prefers-color-scheme: dark)"),u=()=>{o(l.matches?"dark":"light")};return l.addEventListener("change",u),()=>l.removeEventListener("change",u)},getInitialAppearance=()=>canUseDOM$1&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",useAppearance=o=>{const{appearance:l}=reactExports.useContext(AppRootContext),[u,d]=reactExports.useState(o||l||getInitialAppearance()),f=reactExports.useCallback(()=>{const h=getTelegramData();h&&d(h.colorScheme)},[]);return reactExports.useEffect(()=>{if(o!==void 0)return d(o),()=>{};const h=getTelegramData();return h?(h.onEvent("themeChanged",f),()=>h.offEvent("themeChanged",f)):getBrowserAppearanceSubscriber(d)},[o]),u},getInitialPlatform=()=>{const o=getTelegramData();return o&&["ios","macos"].includes(o.platform)?"ios":"base"},usePlatform=o=>{if(o!==void 0)return o;const l=reactExports.useContext(AppRootContext);return l.isRendered&&l.platform!==void 0?l.platform:getInitialPlatform()},usePortalContainer=o=>{if(o!==void 0)return o;const l=reactExports.useContext(AppRootContext);return l.isRendered&&l.portalContainer!==void 0?l.portalContainer:reactExports.useRef(null)},AppRoot=reactExports.forwardRef((o,l)=>{var{platform:u,appearance:d,portalContainer:f,children:h,className:m}=o,g=_object_without_properties(o,["platform","appearance","portalContainer","children","className"]);const v=useAppearance(d),x=usePortalContainer(f),b=usePlatform(u),S=useObjectMemo({platform:b,appearance:v,portalContainer:x,isRendered:!0});return jsxRuntimeExports.jsx("div",_object_spread_props(_object_spread({ref:multipleRef(l,x),className:classNames("tgui-6a12827a138e8827",b==="ios"&&"tgui-56dbb42c1dbd5e2b",v==="dark"&&"tgui-865b921add8ee075",m)},g),{children:jsxRuntimeExports.jsx(AppRootContext.Provider,{value:S,children:h})}))}),LayoutGroupContext=reactExports.createContext({});function useConstant(o){const l=reactExports.useRef(null);return l.current===null&&(l.current=o()),l.current}const isBrowser=typeof window<"u",useIsomorphicLayoutEffect=isBrowser?reactExports.useLayoutEffect:reactExports.useEffect,PresenceContext=reactExports.createContext(null);function addUniqueItem(o,l){o.indexOf(l)===-1&&o.push(l)}function removeItem(o,l){const u=o.indexOf(l);u>-1&&o.splice(u,1)}const clamp=(o,l,u)=>u>l?l:u<o?o:u;let invariant=()=>{};const MotionGlobalConfig={},isNumericalString=o=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(o);function isObject$2(o){return typeof o=="object"&&o!==null}const isZeroValueString=o=>/^0[^.\s]+$/u.test(o);function memo(o){let l;return()=>(l===void 0&&(l=o()),l)}const noop$2=o=>o,combineFunctions=(o,l)=>u=>l(o(u)),pipe=(...o)=>o.reduce(combineFunctions),progress=(o,l,u)=>{const d=l-o;return d===0?1:(u-o)/d};class SubscriptionManager{constructor(){this.subscriptions=[]}add(l){return addUniqueItem(this.subscriptions,l),()=>removeItem(this.subscriptions,l)}notify(l,u,d){const f=this.subscriptions.length;if(f)if(f===1)this.subscriptions[0](l,u,d);else for(let h=0;h<f;h++){const m=this.subscriptions[h];m&&m(l,u,d)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const secondsToMilliseconds=o=>o*1e3,millisecondsToSeconds=o=>o/1e3;function velocityPerSecond(o,l){return l?o*(1e3/l):0}const wrap$1=(o,l,u)=>{const d=l-o;return((u-o)%d+d)%d+o},calcBezier=(o,l,u)=>(((1-3*u+3*l)*o+(3*u-6*l))*o+3*l)*o,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(o,l,u,d,f){let h,m,g=0;do m=l+(u-l)/2,h=calcBezier(m,d,f)-o,h>0?u=m:l=m;while(Math.abs(h)>subdivisionPrecision&&++g<subdivisionMaxIterations);return m}function cubicBezier(o,l,u,d){if(o===l&&u===d)return noop$2;const f=h=>binarySubdivide(h,0,1,o,u);return h=>h===0||h===1?h:calcBezier(f(h),l,d)}const mirrorEasing=o=>l=>l<=.5?o(2*l)/2:(2-o(2*(1-l)))/2,reverseEasing=o=>l=>1-o(1-l),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=o=>(o*=2)<1?.5*backIn(o):.5*(2-Math.pow(2,-10*(o-1))),circIn=o=>1-Math.sin(Math.acos(o)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circIn),easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=o=>Array.isArray(o)&&typeof o[0]!="number";function getEasingForSegment(o,l){return isEasingArray(o)?o[wrap$1(0,o.length,l)]:o}const isBezierDefinition=o=>Array.isArray(o)&&typeof o[0]=="number",easingLookup={linear:noop$2,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},isValidEasing=o=>typeof o=="string",easingDefinitionToFunction=o=>{if(isBezierDefinition(o)){invariant(o.length===4);const[l,u,d,f]=o;return cubicBezier(l,u,d,f)}else if(isValidEasing(o))return invariant(easingLookup[o]!==void 0),easingLookup[o];return o},stepsOrder=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function createRenderStep(o,l){let u=new Set,d=new Set,f=!1,h=!1;const m=new WeakSet;let g={delta:0,timestamp:0,isProcessing:!1};function v(b){m.has(b)&&(x.schedule(b),o()),b(g)}const x={schedule:(b,S=!1,E=!1)=>{const T=E&&f?u:d;return S&&m.add(b),T.has(b)||T.add(b),b},cancel:b=>{d.delete(b),m.delete(b)},process:b=>{if(g=b,f){h=!0;return}f=!0,[u,d]=[d,u],u.forEach(v),u.clear(),f=!1,h&&(h=!1,x.process(b))}};return x}const maxElapsed=40;function createRenderBatcher(o,l){let u=!1,d=!0;const f={delta:0,timestamp:0,isProcessing:!1},h=()=>u=!0,m=stepsOrder.reduce((I,O)=>(I[O]=createRenderStep(h),I),{}),{setup:g,read:v,resolveKeyframes:x,preUpdate:b,update:S,preRender:E,render:w,postRender:T}=m,C=()=>{const I=MotionGlobalConfig.useManualTiming?f.timestamp:performance.now();u=!1,MotionGlobalConfig.useManualTiming||(f.delta=d?1e3/60:Math.max(Math.min(I-f.timestamp,maxElapsed),1)),f.timestamp=I,f.isProcessing=!0,g.process(f),v.process(f),x.process(f),b.process(f),S.process(f),E.process(f),w.process(f),T.process(f),f.isProcessing=!1,u&&l&&(d=!1,o(C))},M=()=>{u=!0,d=!0,f.isProcessing||o(C)};return{schedule:stepsOrder.reduce((I,O)=>{const j=m[O];return I[O]=(N,V=!1,z=!1)=>(u||M(),j.schedule(N,V,z)),I},{}),cancel:I=>{for(let O=0;O<stepsOrder.length;O++)m[stepsOrder[O]].cancel(I)},state:f,steps:m}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps:frameSteps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop$2,!0);let now;function clearTime(){now=void 0}const time={now:()=>(now===void 0&&time.set(frameData.isProcessing||MotionGlobalConfig.useManualTiming?frameData.timestamp:performance.now()),now),set:o=>{now=o,queueMicrotask(clearTime)}},checkStringStartsWith=o=>l=>typeof l=="string"&&l.startsWith(o),isCSSVariableName=checkStringStartsWith("--"),startsAsVariableToken=checkStringStartsWith("var(--"),isCSSVariableToken=o=>startsAsVariableToken(o)?singleCssVariableRegex.test(o.split("/*")[0].trim()):!1,singleCssVariableRegex=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,number={test:o=>typeof o=="number",parse:parseFloat,transform:o=>o},alpha={...number,transform:o=>clamp(0,1,o)},scale={...number,default:1},sanitize=o=>Math.round(o*1e5)/1e5,floatRegex=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function isNullish(o){return o==null}const singleColorRegex=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,isColorString=(o,l)=>u=>!!(typeof u=="string"&&singleColorRegex.test(u)&&u.startsWith(o)||l&&!isNullish(u)&&Object.prototype.hasOwnProperty.call(u,l)),splitColor=(o,l,u)=>d=>{if(typeof d!="string")return d;const[f,h,m,g]=d.match(floatRegex);return{[o]:parseFloat(f),[l]:parseFloat(h),[u]:parseFloat(m),alpha:g!==void 0?parseFloat(g):1}},clampRgbUnit=o=>clamp(0,255,o),rgbUnit={...number,transform:o=>Math.round(clampRgbUnit(o))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:o,green:l,blue:u,alpha:d=1})=>"rgba("+rgbUnit.transform(o)+", "+rgbUnit.transform(l)+", "+rgbUnit.transform(u)+", "+sanitize(alpha.transform(d))+")"};function parseHex(o){let l="",u="",d="",f="";return o.length>5?(l=o.substring(1,3),u=o.substring(3,5),d=o.substring(5,7),f=o.substring(7,9)):(l=o.substring(1,2),u=o.substring(2,3),d=o.substring(3,4),f=o.substring(4,5),l+=l,u+=u,d+=d,f+=f),{red:parseInt(l,16),green:parseInt(u,16),blue:parseInt(d,16),alpha:f?parseInt(f,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},createUnitType=o=>({test:l=>typeof l=="string"&&l.endsWith(o)&&l.split(" ").length===1,parse:parseFloat,transform:l=>`${l}${o}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:o=>percent.parse(o)/100,transform:o=>percent.transform(o*100)},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:o,saturation:l,lightness:u,alpha:d=1})=>"hsla("+Math.round(o)+", "+percent.transform(sanitize(l))+", "+percent.transform(sanitize(u))+", "+sanitize(alpha.transform(d))+")"},color={test:o=>rgba.test(o)||hex.test(o)||hsla.test(o),parse:o=>rgba.test(o)?rgba.parse(o):hsla.test(o)?hsla.parse(o):hex.parse(o),transform:o=>typeof o=="string"?o:o.hasOwnProperty("red")?rgba.transform(o):hsla.transform(o),getAnimatableNone:o=>{const l=color.parse(o);return l.alpha=0,color.transform(l)}},colorRegex=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function test(o){var l,u;return isNaN(o)&&typeof o=="string"&&(((l=o.match(floatRegex))==null?void 0:l.length)||0)+(((u=o.match(colorRegex))==null?void 0:u.length)||0)>0}const NUMBER_TOKEN="number",COLOR_TOKEN="color",VAR_TOKEN="var",VAR_FUNCTION_TOKEN="var(",SPLIT_TOKEN="${}",complexRegex=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function analyseComplexValue(o){const l=o.toString(),u=[],d={color:[],number:[],var:[]},f=[];let h=0;const g=l.replace(complexRegex,v=>(color.test(v)?(d.color.push(h),f.push(COLOR_TOKEN),u.push(color.parse(v))):v.startsWith(VAR_FUNCTION_TOKEN)?(d.var.push(h),f.push(VAR_TOKEN),u.push(v)):(d.number.push(h),f.push(NUMBER_TOKEN),u.push(parseFloat(v))),++h,SPLIT_TOKEN)).split(SPLIT_TOKEN);return{values:u,split:g,indexes:d,types:f}}function parseComplexValue(o){return analyseComplexValue(o).values}function createTransformer(o){const{split:l,types:u}=analyseComplexValue(o),d=l.length;return f=>{let h="";for(let m=0;m<d;m++)if(h+=l[m],f[m]!==void 0){const g=u[m];g===NUMBER_TOKEN?h+=sanitize(f[m]):g===COLOR_TOKEN?h+=color.transform(f[m]):h+=f[m]}return h}}const convertNumbersToZero=o=>typeof o=="number"?0:color.test(o)?color.getAnimatableNone(o):o;function getAnimatableNone$1(o){const l=parseComplexValue(o);return createTransformer(o)(l.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1};function hueToRgb(o,l,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?o+(l-o)*6*u:u<1/2?l:u<2/3?o+(l-o)*(2/3-u)*6:o}function hslaToRgba({hue:o,saturation:l,lightness:u,alpha:d}){o/=360,l/=100,u/=100;let f=0,h=0,m=0;if(!l)f=h=m=u;else{const g=u<.5?u*(1+l):u+l-u*l,v=2*u-g;f=hueToRgb(v,g,o+1/3),h=hueToRgb(v,g,o),m=hueToRgb(v,g,o-1/3)}return{red:Math.round(f*255),green:Math.round(h*255),blue:Math.round(m*255),alpha:d}}function mixImmediate(o,l){return u=>u>0?l:o}const mixNumber$1=(o,l,u)=>o+(l-o)*u,mixLinearColor=(o,l,u)=>{const d=o*o,f=u*(l*l-d)+d;return f<0?0:Math.sqrt(f)},colorTypes=[hex,rgba,hsla],getColorType=o=>colorTypes.find(l=>l.test(o));function asRGBA(o){const l=getColorType(o);if(!l)return!1;let u=l.parse(o);return l===hsla&&(u=hslaToRgba(u)),u}const mixColor=(o,l)=>{const u=asRGBA(o),d=asRGBA(l);if(!u||!d)return mixImmediate(o,l);const f={...u};return h=>(f.red=mixLinearColor(u.red,d.red,h),f.green=mixLinearColor(u.green,d.green,h),f.blue=mixLinearColor(u.blue,d.blue,h),f.alpha=mixNumber$1(u.alpha,d.alpha,h),rgba.transform(f))},invisibleValues=new Set(["none","hidden"]);function mixVisibility(o,l){return invisibleValues.has(o)?u=>u<=0?o:l:u=>u>=1?l:o}function mixNumber(o,l){return u=>mixNumber$1(o,l,u)}function getMixer(o){return typeof o=="number"?mixNumber:typeof o=="string"?isCSSVariableToken(o)?mixImmediate:color.test(o)?mixColor:mixComplex:Array.isArray(o)?mixArray:typeof o=="object"?color.test(o)?mixColor:mixObject:mixImmediate}function mixArray(o,l){const u=[...o],d=u.length,f=o.map((h,m)=>getMixer(h)(h,l[m]));return h=>{for(let m=0;m<d;m++)u[m]=f[m](h);return u}}function mixObject(o,l){const u={...o,...l},d={};for(const f in u)o[f]!==void 0&&l[f]!==void 0&&(d[f]=getMixer(o[f])(o[f],l[f]));return f=>{for(const h in d)u[h]=d[h](f);return u}}function matchOrder(o,l){const u=[],d={color:0,var:0,number:0};for(let f=0;f<l.values.length;f++){const h=l.types[f],m=o.indexes[h][d[h]],g=o.values[m]??0;u[f]=g,d[h]++}return u}const mixComplex=(o,l)=>{const u=complex.createTransformer(l),d=analyseComplexValue(o),f=analyseComplexValue(l);return d.indexes.var.length===f.indexes.var.length&&d.indexes.color.length===f.indexes.color.length&&d.indexes.number.length>=f.indexes.number.length?invisibleValues.has(o)&&!f.values.length||invisibleValues.has(l)&&!d.values.length?mixVisibility(o,l):pipe(mixArray(matchOrder(d,f),f.values),u):mixImmediate(o,l)};function mix(o,l,u){return typeof o=="number"&&typeof l=="number"&&typeof u=="number"?mixNumber$1(o,l,u):getMixer(o)(o,l)}const frameloopDriver=o=>{const l=({timestamp:u})=>o(u);return{start:(u=!0)=>frame.update(l,u),stop:()=>cancelFrame(l),now:()=>frameData.isProcessing?frameData.timestamp:time.now()}},generateLinearEasing=(o,l,u=10)=>{let d="";const f=Math.max(Math.round(l/u),2);for(let h=0;h<f;h++)d+=Math.round(o(h/(f-1))*1e4)/1e4+", ";return`linear(${d.substring(0,d.length-2)})`},maxGeneratorDuration=2e4;function calcGeneratorDuration(o){let l=0;const u=50;let d=o.next(l);for(;!d.done&&l<maxGeneratorDuration;)l+=u,d=o.next(l);return l>=maxGeneratorDuration?1/0:l}function createGeneratorEasing(o,l=100,u){const d=u({...o,keyframes:[0,l]}),f=Math.min(calcGeneratorDuration(d),maxGeneratorDuration);return{type:"keyframes",ease:h=>d.next(f*h).value/l,duration:millisecondsToSeconds(f)}}const velocitySampleDuration=5;function calcGeneratorVelocity(o,l,u){const d=Math.max(l-velocitySampleDuration,0);return velocityPerSecond(u-o(d),l-d)}const springDefaults={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},safeMin=.001;function findSpring({duration:o=springDefaults.duration,bounce:l=springDefaults.bounce,velocity:u=springDefaults.velocity,mass:d=springDefaults.mass}){let f,h,m=1-l;m=clamp(springDefaults.minDamping,springDefaults.maxDamping,m),o=clamp(springDefaults.minDuration,springDefaults.maxDuration,millisecondsToSeconds(o)),m<1?(f=x=>{const b=x*m,S=b*o,E=b-u,w=calcAngularFreq(x,m),T=Math.exp(-S);return safeMin-E/w*T},h=x=>{const S=x*m*o,E=S*u+u,w=Math.pow(m,2)*Math.pow(x,2)*o,T=Math.exp(-S),C=calcAngularFreq(Math.pow(x,2),m);return(-f(x)+safeMin>0?-1:1)*((E-w)*T)/C}):(f=x=>{const b=Math.exp(-x*o),S=(x-u)*o+1;return-safeMin+b*S},h=x=>{const b=Math.exp(-x*o),S=(u-x)*(o*o);return b*S});const g=5/o,v=approximateRoot(f,h,g);if(o=secondsToMilliseconds(o),isNaN(v))return{stiffness:springDefaults.stiffness,damping:springDefaults.damping,duration:o};{const x=Math.pow(v,2)*d;return{stiffness:x,damping:m*2*Math.sqrt(d*x),duration:o}}}const rootIterations=12;function approximateRoot(o,l,u){let d=u;for(let f=1;f<rootIterations;f++)d=d-o(d)/l(d);return d}function calcAngularFreq(o,l){return o*Math.sqrt(1-l*l)}const durationKeys=["duration","bounce"],physicsKeys=["stiffness","damping","mass"];function isSpringType(o,l){return l.some(u=>o[u]!==void 0)}function getSpringOptions(o){let l={velocity:springDefaults.velocity,stiffness:springDefaults.stiffness,damping:springDefaults.damping,mass:springDefaults.mass,isResolvedFromDuration:!1,...o};if(!isSpringType(o,physicsKeys)&&isSpringType(o,durationKeys))if(o.visualDuration){const u=o.visualDuration,d=2*Math.PI/(u*1.2),f=d*d,h=2*clamp(.05,1,1-(o.bounce||0))*Math.sqrt(f);l={...l,mass:springDefaults.mass,stiffness:f,damping:h}}else{const u=findSpring(o);l={...l,...u,mass:springDefaults.mass},l.isResolvedFromDuration=!0}return l}function spring(o=springDefaults.visualDuration,l=springDefaults.bounce){const u=typeof o!="object"?{visualDuration:o,keyframes:[0,1],bounce:l}:o;let{restSpeed:d,restDelta:f}=u;const h=u.keyframes[0],m=u.keyframes[u.keyframes.length-1],g={done:!1,value:h},{stiffness:v,damping:x,mass:b,duration:S,velocity:E,isResolvedFromDuration:w}=getSpringOptions({...u,velocity:-millisecondsToSeconds(u.velocity||0)}),T=E||0,C=x/(2*Math.sqrt(v*b)),M=m-h,A=millisecondsToSeconds(Math.sqrt(v/b)),k=Math.abs(M)<5;d||(d=k?springDefaults.restSpeed.granular:springDefaults.restSpeed.default),f||(f=k?springDefaults.restDelta.granular:springDefaults.restDelta.default);let I;if(C<1){const j=calcAngularFreq(A,C);I=N=>{const V=Math.exp(-C*A*N);return m-V*((T+C*A*M)/j*Math.sin(j*N)+M*Math.cos(j*N))}}else if(C===1)I=j=>m-Math.exp(-A*j)*(M+(T+A*M)*j);else{const j=A*Math.sqrt(C*C-1);I=N=>{const V=Math.exp(-C*A*N),z=Math.min(j*N,300);return m-V*((T+C*A*M)*Math.sinh(z)+j*M*Math.cosh(z))/j}}const O={calculatedDuration:w&&S||null,next:j=>{const N=I(j);if(w)g.done=j>=S;else{let V=j===0?T:0;C<1&&(V=j===0?secondsToMilliseconds(T):calcGeneratorVelocity(I,j,N));const z=Math.abs(V)<=d,W=Math.abs(m-N)<=f;g.done=z&&W}return g.value=g.done?m:N,g},toString:()=>{const j=Math.min(calcGeneratorDuration(O),maxGeneratorDuration),N=generateLinearEasing(V=>O.next(j*V).value,j,30);return j+"ms "+N},toTransition:()=>{}};return O}spring.applyToOptions=o=>{const l=createGeneratorEasing(o,100,spring);return o.ease=l.ease,o.duration=secondsToMilliseconds(l.duration),o.type="keyframes",o};function inertia({keyframes:o,velocity:l=0,power:u=.8,timeConstant:d=325,bounceDamping:f=10,bounceStiffness:h=500,modifyTarget:m,min:g,max:v,restDelta:x=.5,restSpeed:b}){const S=o[0],E={done:!1,value:S},w=z=>g!==void 0&&z<g||v!==void 0&&z>v,T=z=>g===void 0?v:v===void 0||Math.abs(g-z)<Math.abs(v-z)?g:v;let C=u*l;const M=S+C,A=m===void 0?M:m(M);A!==M&&(C=A-S);const k=z=>-C*Math.exp(-z/d),I=z=>A+k(z),O=z=>{const W=k(z),X=I(z);E.done=Math.abs(W)<=x,E.value=E.done?A:X};let j,N;const V=z=>{w(E.value)&&(j=z,N=spring({keyframes:[E.value,T(E.value)],velocity:calcGeneratorVelocity(I,z,E.value),damping:f,stiffness:h,restDelta:x,restSpeed:b}))};return V(0),{calculatedDuration:null,next:z=>{let W=!1;return!N&&j===void 0&&(W=!0,O(z),V(z)),j!==void 0&&z>=j?N.next(z-j):(!W&&O(z),E)}}}function createMixers(o,l,u){const d=[],f=u||MotionGlobalConfig.mix||mix,h=o.length-1;for(let m=0;m<h;m++){let g=f(o[m],o[m+1]);if(l){const v=Array.isArray(l)?l[m]||noop$2:l;g=pipe(v,g)}d.push(g)}return d}function interpolate(o,l,{clamp:u=!0,ease:d,mixer:f}={}){const h=o.length;if(invariant(h===l.length),h===1)return()=>l[0];if(h===2&&l[0]===l[1])return()=>l[1];const m=o[0]===o[1];o[0]>o[h-1]&&(o=[...o].reverse(),l=[...l].reverse());const g=createMixers(l,d,f),v=g.length,x=b=>{if(m&&b<o[0])return l[0];let S=0;if(v>1)for(;S<o.length-2&&!(b<o[S+1]);S++);const E=progress(o[S],o[S+1],b);return g[S](E)};return u?b=>x(clamp(o[0],o[h-1],b)):x}function fillOffset(o,l){const u=o[o.length-1];for(let d=1;d<=l;d++){const f=progress(0,l,d);o.push(mixNumber$1(u,1,f))}}function defaultOffset(o){const l=[0];return fillOffset(l,o.length-1),l}function convertOffsetToTimes(o,l){return o.map(u=>u*l)}function defaultEasing(o,l){return o.map(()=>l||easeInOut).splice(0,o.length-1)}function keyframes({duration:o=300,keyframes:l,times:u,ease:d="easeInOut"}){const f=isEasingArray(d)?d.map(easingDefinitionToFunction):easingDefinitionToFunction(d),h={done:!1,value:l[0]},m=convertOffsetToTimes(u&&u.length===l.length?u:defaultOffset(l),o),g=interpolate(m,l,{ease:Array.isArray(f)?f:defaultEasing(l,f)});return{calculatedDuration:o,next:v=>(h.value=g(v),h.done=v>=o,h)}}const isNotNull$1=o=>o!==null;function getFinalKeyframe$1(o,{repeat:l,repeatType:u="loop"},d,f=1){const h=o.filter(isNotNull$1),g=f<0||l&&u!=="loop"&&l%2===1?0:h.length-1;return!g||d===void 0?h[g]:d}const transitionTypeMap={decay:inertia,inertia,tween:keyframes,keyframes,spring};function replaceTransitionType(o){typeof o.type=="string"&&(o.type=transitionTypeMap[o.type])}class WithPromise{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(l=>{this.resolve=l})}notifyFinished(){this.resolve()}then(l,u){return this.finished.then(l,u)}}const percentToProgress=o=>o/100;class JSAnimation extends WithPromise{constructor(l){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var d,f;const{motionValue:u}=this.options;u&&u.updatedAt!==time.now()&&this.tick(time.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(f=(d=this.options).onStop)==null||f.call(d))},this.options=l,this.initAnimation(),this.play(),l.autoplay===!1&&this.pause()}initAnimation(){const{options:l}=this;replaceTransitionType(l);const{type:u=keyframes,repeat:d=0,repeatDelay:f=0,repeatType:h,velocity:m=0}=l;let{keyframes:g}=l;const v=u||keyframes;v!==keyframes&&typeof g[0]!="number"&&(this.mixKeyframes=pipe(percentToProgress,mix(g[0],g[1])),g=[0,100]);const x=v({...l,keyframes:g});h==="mirror"&&(this.mirroredGenerator=v({...l,keyframes:[...g].reverse(),velocity:-m})),x.calculatedDuration===null&&(x.calculatedDuration=calcGeneratorDuration(x));const{calculatedDuration:b}=x;this.calculatedDuration=b,this.resolvedDuration=b+f,this.totalDuration=this.resolvedDuration*(d+1)-f,this.generator=x}updateTime(l){const u=Math.round(l-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=u}tick(l,u=!1){const{generator:d,totalDuration:f,mixKeyframes:h,mirroredGenerator:m,resolvedDuration:g,calculatedDuration:v}=this;if(this.startTime===null)return d.next(0);const{delay:x=0,keyframes:b,repeat:S,repeatType:E,repeatDelay:w,type:T,onUpdate:C,finalKeyframe:M}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,l):this.speed<0&&(this.startTime=Math.min(l-f/this.speed,this.startTime)),u?this.currentTime=l:this.updateTime(l);const A=this.currentTime-x*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?A<0:A>f;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let I=this.currentTime,O=d;if(S){const z=Math.min(this.currentTime,f)/g;let W=Math.floor(z),X=z%1;!X&&z>=1&&(X=1),X===1&&W--,W=Math.min(W,S+1),!!(W%2)&&(E==="reverse"?(X=1-X,w&&(X-=w/g)):E==="mirror"&&(O=m)),I=clamp(0,1,X)*g}const j=k?{done:!1,value:b[0]}:O.next(I);h&&(j.value=h(j.value));let{done:N}=j;!k&&v!==null&&(N=this.playbackSpeed>=0?this.currentTime>=f:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return V&&T!==inertia&&(j.value=getFinalKeyframe$1(b,this.options,M,this.speed)),C&&C(j.value),V&&this.finish(),j}then(l,u){return this.finished.then(l,u)}get duration(){return millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){const{delay:l=0}=this.options||{};return this.duration+millisecondsToSeconds(l)}get time(){return millisecondsToSeconds(this.currentTime)}set time(l){var u;l=secondsToMilliseconds(l),this.currentTime=l,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=l:this.driver&&(this.startTime=this.driver.now()-l/this.playbackSpeed),(u=this.driver)==null||u.start(!1)}get speed(){return this.playbackSpeed}set speed(l){this.updateTime(time.now());const u=this.playbackSpeed!==l;this.playbackSpeed=l,u&&(this.time=millisecondsToSeconds(this.currentTime))}play(){var f,h;if(this.isStopped)return;const{driver:l=frameloopDriver,startTime:u}=this.options;this.driver||(this.driver=l(m=>this.tick(m))),(h=(f=this.options).onPlay)==null||h.call(f);const d=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=d):this.holdTime!==null?this.startTime=d-this.holdTime:this.startTime||(this.startTime=u??d),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(time.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var l,u;this.notifyFinished(),this.teardown(),this.state="finished",(u=(l=this.options).onComplete)==null||u.call(l)}cancel(){var l,u;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(u=(l=this.options).onCancel)==null||u.call(l)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(l){return this.startTime=0,this.tick(l,!0)}attachTimeline(l){var u;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(u=this.driver)==null||u.stop(),l.observe(this)}}function fillWildcards(o){for(let l=1;l<o.length;l++)o[l]??(o[l]=o[l-1])}const radToDeg=o=>o*180/Math.PI,rotate=o=>{const l=radToDeg(Math.atan2(o[1],o[0]));return rebaseAngle(l)},matrix2dParsers={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:o=>(Math.abs(o[0])+Math.abs(o[3]))/2,rotate,rotateZ:rotate,skewX:o=>radToDeg(Math.atan(o[1])),skewY:o=>radToDeg(Math.atan(o[2])),skew:o=>(Math.abs(o[1])+Math.abs(o[2]))/2},rebaseAngle=o=>(o=o%360,o<0&&(o+=360),o),rotateZ=rotate,scaleX=o=>Math.sqrt(o[0]*o[0]+o[1]*o[1]),scaleY=o=>Math.sqrt(o[4]*o[4]+o[5]*o[5]),matrix3dParsers={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX,scaleY,scale:o=>(scaleX(o)+scaleY(o))/2,rotateX:o=>rebaseAngle(radToDeg(Math.atan2(o[6],o[5]))),rotateY:o=>rebaseAngle(radToDeg(Math.atan2(-o[2],o[0]))),rotateZ,rotate:rotateZ,skewX:o=>radToDeg(Math.atan(o[4])),skewY:o=>radToDeg(Math.atan(o[1])),skew:o=>(Math.abs(o[1])+Math.abs(o[4]))/2};function defaultTransformValue(o){return o.includes("scale")?1:0}function parseValueFromTransform(o,l){if(!o||o==="none")return defaultTransformValue(l);const u=o.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let d,f;if(u)d=matrix3dParsers,f=u;else{const g=o.match(/^matrix\(([-\d.e\s,]+)\)$/u);d=matrix2dParsers,f=g}if(!f)return defaultTransformValue(l);const h=d[l],m=f[1].split(",").map(convertTransformToNumber);return typeof h=="function"?h(m):m[h]}const readTransformValue=(o,l)=>{const{transform:u="none"}=getComputedStyle(o);return parseValueFromTransform(u,l)};function convertTransformToNumber(o){return parseFloat(o.trim())}const transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder),isNumOrPxType=o=>o===number||o===px,transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(o=>!transformKeys.has(o));function removeNonTranslationalTransform(o){const l=[];return nonTranslationalTransformKeys.forEach(u=>{const d=o.getValue(u);d!==void 0&&(l.push([u,d.get()]),d.set(u.startsWith("scale")?1:0))}),l}const positionalValues={width:({x:o},{paddingLeft:l="0",paddingRight:u="0"})=>o.max-o.min-parseFloat(l)-parseFloat(u),height:({y:o},{paddingTop:l="0",paddingBottom:u="0"})=>o.max-o.min-parseFloat(l)-parseFloat(u),top:(o,{top:l})=>parseFloat(l),left:(o,{left:l})=>parseFloat(l),bottom:({y:o},{top:l})=>parseFloat(l)+(o.max-o.min),right:({x:o},{left:l})=>parseFloat(l)+(o.max-o.min),x:(o,{transform:l})=>parseValueFromTransform(l,"x"),y:(o,{transform:l})=>parseValueFromTransform(l,"y")};positionalValues.translateX=positionalValues.x,positionalValues.translateY=positionalValues.y;const toResolve=new Set;let isScheduled=!1,anyNeedsMeasurement=!1,isForced=!1;function measureAllKeyframes(){if(anyNeedsMeasurement){const o=Array.from(toResolve).filter(d=>d.needsMeasurement),l=new Set(o.map(d=>d.element)),u=new Map;l.forEach(d=>{const f=removeNonTranslationalTransform(d);f.length&&(u.set(d,f),d.render())}),o.forEach(d=>d.measureInitialState()),l.forEach(d=>{d.render();const f=u.get(d);f&&f.forEach(([h,m])=>{var g;(g=d.getValue(h))==null||g.set(m)})}),o.forEach(d=>d.measureEndState()),o.forEach(d=>{d.suspendedScrollY!==void 0&&window.scrollTo(0,d.suspendedScrollY)})}anyNeedsMeasurement=!1,isScheduled=!1,toResolve.forEach(o=>o.complete(isForced)),toResolve.clear()}function readAllKeyframes(){toResolve.forEach(o=>{o.readKeyframes(),o.needsMeasurement&&(anyNeedsMeasurement=!0)})}function flushKeyframeResolvers(){isForced=!0,readAllKeyframes(),measureAllKeyframes(),isForced=!1}class KeyframeResolver{constructor(l,u,d,f,h,m=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...l],this.onComplete=u,this.name=d,this.motionValue=f,this.element=h,this.isAsync=m}scheduleResolve(){this.state="scheduled",this.isAsync?(toResolve.add(this),isScheduled||(isScheduled=!0,frame.read(readAllKeyframes),frame.resolveKeyframes(measureAllKeyframes))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:l,name:u,element:d,motionValue:f}=this;if(l[0]===null){const h=f==null?void 0:f.get(),m=l[l.length-1];if(h!==void 0)l[0]=h;else if(d&&u){const g=d.readValue(u,m);g!=null&&(l[0]=g)}l[0]===void 0&&(l[0]=m),f&&h===void 0&&f.set(l[0])}fillWildcards(l)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(l=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,l),toResolve.delete(this)}cancel(){this.state==="scheduled"&&(toResolve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const isCSSVar=o=>o.startsWith("--");function setStyle(o,l,u){isCSSVar(l)?o.style.setProperty(l,u):o.style[l]=u}const supportsScrollTimeline=memo(()=>window.ScrollTimeline!==void 0),supportsFlags={};function memoSupports(o,l){const u=memo(o);return()=>supportsFlags[l]??u()}const supportsLinearEasing=memoSupports(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cubicBezierAsString=([o,l,u,d])=>`cubic-bezier(${o}, ${l}, ${u}, ${d})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(o,l){if(o)return typeof o=="function"?supportsLinearEasing()?generateLinearEasing(o,l):"ease-out":isBezierDefinition(o)?cubicBezierAsString(o):Array.isArray(o)?o.map(u=>mapEasingToNativeEasing(u,l)||supportedWaapiEasing.easeOut):supportedWaapiEasing[o]}function startWaapiAnimation(o,l,u,{delay:d=0,duration:f=300,repeat:h=0,repeatType:m="loop",ease:g="easeOut",times:v}={},x=void 0){const b={[l]:u};v&&(b.offset=v);const S=mapEasingToNativeEasing(g,f);Array.isArray(S)&&(b.easing=S);const E={delay:d,duration:f,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:h+1,direction:m==="reverse"?"alternate":"normal"};return x&&(E.pseudoElement=x),o.animate(b,E)}function isGenerator(o){return typeof o=="function"&&"applyToOptions"in o}function applyGeneratorOptions({type:o,...l}){return isGenerator(o)&&supportsLinearEasing()?o.applyToOptions(l):(l.duration??(l.duration=300),l.ease??(l.ease="easeOut"),l)}class NativeAnimation extends WithPromise{constructor(l){if(super(),this.finishedTime=null,this.isStopped=!1,!l)return;const{element:u,name:d,keyframes:f,pseudoElement:h,allowFlatten:m=!1,finalKeyframe:g,onComplete:v}=l;this.isPseudoElement=!!h,this.allowFlatten=m,this.options=l,invariant(typeof l.type!="string");const x=applyGeneratorOptions(l);this.animation=startWaapiAnimation(u,d,f,x,h),x.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!h){const b=getFinalKeyframe$1(f,this.options,g,this.speed);this.updateMotionValue?this.updateMotionValue(b):setStyle(u,d,b),this.animation.cancel()}v==null||v(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var l,u;(u=(l=this.animation).finish)==null||u.call(l)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:l}=this;l==="idle"||l==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var l,u;this.isPseudoElement||(u=(l=this.animation).commitStyles)==null||u.call(l)}get duration(){var u,d;const l=((d=(u=this.animation.effect)==null?void 0:u.getComputedTiming)==null?void 0:d.call(u).duration)||0;return millisecondsToSeconds(Number(l))}get iterationDuration(){const{delay:l=0}=this.options||{};return this.duration+millisecondsToSeconds(l)}get time(){return millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(l){this.finishedTime=null,this.animation.currentTime=secondsToMilliseconds(l)}get speed(){return this.animation.playbackRate}set speed(l){l<0&&(this.finishedTime=null),this.animation.playbackRate=l}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(l){this.animation.startTime=l}attachTimeline({timeline:l,observe:u}){var d;return this.allowFlatten&&((d=this.animation.effect)==null||d.updateTiming({easing:"linear"})),this.animation.onfinish=null,l&&supportsScrollTimeline()?(this.animation.timeline=l,noop$2):u(this)}}const unsupportedEasingFunctions={anticipate,backInOut,circInOut};function isUnsupportedEase(o){return o in unsupportedEasingFunctions}function replaceStringEasing(o){typeof o.ease=="string"&&isUnsupportedEase(o.ease)&&(o.ease=unsupportedEasingFunctions[o.ease])}const sampleDelta=10;class NativeAnimationExtended extends NativeAnimation{constructor(l){replaceStringEasing(l),replaceTransitionType(l),super(l),l.startTime&&(this.startTime=l.startTime),this.options=l}updateMotionValue(l){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...m}=this.options;if(!u)return;if(l!==void 0){u.set(l);return}const g=new JSAnimation({...m,autoplay:!1}),v=secondsToMilliseconds(this.finishedTime??this.time);u.setWithVelocity(g.sample(v-sampleDelta).value,g.sample(v).value,sampleDelta),g.stop()}}const isAnimatable=(o,l)=>l==="zIndex"?!1:!!(typeof o=="number"||Array.isArray(o)||typeof o=="string"&&(complex.test(o)||o==="0")&&!o.startsWith("url("));function hasKeyframesChanged(o){const l=o[0];if(o.length===1)return!0;for(let u=0;u<o.length;u++)if(o[u]!==l)return!0}function canAnimate(o,l,u,d){const f=o[0];if(f===null)return!1;if(l==="display"||l==="visibility")return!0;const h=o[o.length-1],m=isAnimatable(f,l),g=isAnimatable(h,l);return!m||!g?!1:hasKeyframesChanged(o)||(u==="spring"||isGenerator(u))&&d}function makeAnimationInstant(o){o.duration=0,o.type="keyframes"}const acceleratedValues=new Set(["opacity","clipPath","filter","transform"]),supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function supportsBrowserAnimation(o){var b;const{motionValue:l,name:u,repeatDelay:d,repeatType:f,damping:h,type:m}=o;if(!(((b=l==null?void 0:l.owner)==null?void 0:b.current)instanceof HTMLElement))return!1;const{onUpdate:v,transformTemplate:x}=l.owner.getProps();return supportsWaapi()&&u&&acceleratedValues.has(u)&&(u!=="transform"||!x)&&!v&&!d&&f!=="mirror"&&h!==0&&m!=="inertia"}const MAX_RESOLVE_DELAY=40;class AsyncMotionValueAnimation extends WithPromise{constructor({autoplay:l=!0,delay:u=0,type:d="keyframes",repeat:f=0,repeatDelay:h=0,repeatType:m="loop",keyframes:g,name:v,motionValue:x,element:b,...S}){var T;super(),this.stop=()=>{var C,M;this._animation&&(this._animation.stop(),(C=this.stopTimeline)==null||C.call(this)),(M=this.keyframeResolver)==null||M.cancel()},this.createdAt=time.now();const E={autoplay:l,delay:u,type:d,repeat:f,repeatDelay:h,repeatType:m,name:v,motionValue:x,element:b,...S},w=(b==null?void 0:b.KeyframeResolver)||KeyframeResolver;this.keyframeResolver=new w(g,(C,M,A)=>this.onKeyframesResolved(C,M,E,!A),v,x,b),(T=this.keyframeResolver)==null||T.scheduleResolve()}onKeyframesResolved(l,u,d,f){this.keyframeResolver=void 0;const{name:h,type:m,velocity:g,delay:v,isHandoff:x,onUpdate:b}=d;this.resolvedAt=time.now(),canAnimate(l,h,m,g)||((MotionGlobalConfig.instantAnimations||!v)&&(b==null||b(getFinalKeyframe$1(l,d,u))),l[0]=l[l.length-1],makeAnimationInstant(d),d.repeat=0);const E={startTime:f?this.resolvedAt?this.resolvedAt-this.createdAt>MAX_RESOLVE_DELAY?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:u,...d,keyframes:l},w=!x&&supportsBrowserAnimation(E)?new NativeAnimationExtended({...E,element:E.motionValue.owner.current}):new JSAnimation(E);w.finished.then(()=>this.notifyFinished()).catch(noop$2),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(l,u){return this.finished.finally(l).then(()=>{})}get animation(){var l;return this._animation||((l=this.keyframeResolver)==null||l.resume(),flushKeyframeResolvers()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(l){this.animation.time=l}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(l){this.animation.speed=l}get startTime(){return this.animation.startTime}attachTimeline(l){return this._animation?this.stopTimeline=this.animation.attachTimeline(l):this.pendingTimeline=l,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var l;this._animation&&this.animation.cancel(),(l=this.keyframeResolver)==null||l.cancel()}}class GroupAnimation{constructor(l){this.stop=()=>this.runAll("stop"),this.animations=l.filter(Boolean)}get finished(){return Promise.all(this.animations.map(l=>l.finished))}getAll(l){return this.animations[0][l]}setAll(l,u){for(let d=0;d<this.animations.length;d++)this.animations[d][l]=u}attachTimeline(l){const u=this.animations.map(d=>d.attachTimeline(l));return()=>{u.forEach((d,f)=>{d&&d(),this.animations[f].stop()})}}get time(){return this.getAll("time")}set time(l){this.setAll("time",l)}get speed(){return this.getAll("speed")}set speed(l){this.setAll("speed",l)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return getMax(this.animations,"duration")}get iterationDuration(){return getMax(this.animations,"iterationDuration")}runAll(l){this.animations.forEach(u=>u[l]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function getMax(o,l){let u=0;for(let d=0;d<o.length;d++){const f=o[d][l];f!==null&&f>u&&(u=f)}return u}class GroupAnimationWithThen extends GroupAnimation{then(l,u){return this.finished.finally(l).then(()=>{})}}const splitCSSVariableRegex=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function parseCSSVariable(o){const l=splitCSSVariableRegex.exec(o);if(!l)return[,];const[,u,d,f]=l;return[`--${u??d}`,f]}function getVariableValue(o,l,u=1){const[d,f]=parseCSSVariable(o);if(!d)return;const h=window.getComputedStyle(l).getPropertyValue(d);if(h){const m=h.trim();return isNumericalString(m)?parseFloat(m):m}return isCSSVariableToken(f)?getVariableValue(f,l,u+1):f}function getValueTransition$1(o,l){return(o==null?void 0:o[l])??(o==null?void 0:o.default)??o}const positionalKeys=new Set(["width","height","top","left","right","bottom",...transformPropOrder]),auto={test:o=>o==="auto",parse:o=>o},testValueType=o=>l=>l.test(o),dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=o=>dimensionValueTypes.find(testValueType(o));function isNone(o){return typeof o=="number"?o===0:o!==null?o==="none"||o==="0"||isZeroValueString(o):!0}const maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(o){const[l,u]=o.slice(0,-1).split("(");if(l==="drop-shadow")return o;const[d]=u.match(floatRegex)||[];if(!d)return o;const f=u.replace(d,"");let h=maxDefaults.has(l)?1:0;return d!==u&&(h*=100),l+"("+h+f+")"}const functionRegex=/\b([a-z-]*)\(.*?\)/gu,filter={...complex,getAnimatableNone:o=>{const l=o.match(functionRegex);return l?l.map(applyDefaultFilter).join(" "):o}},int={...number,transform:Math.round},transformValueTypes={rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px},numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,backgroundPositionX:px,backgroundPositionY:px,...transformValueTypes,zIndex:int,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=o=>defaultValueTypes[o];function getAnimatableNone(o,l){let u=getDefaultValueType(o);return u!==filter&&(u=complex),u.getAnimatableNone?u.getAnimatableNone(l):void 0}const invalidTemplates=new Set(["auto","none","0"]);function makeNoneKeyframesAnimatable(o,l,u){let d=0,f;for(;d<o.length&&!f;){const h=o[d];typeof h=="string"&&!invalidTemplates.has(h)&&analyseComplexValue(h).values.length&&(f=o[d]),d++}if(f&&u)for(const h of l)o[h]=getAnimatableNone(u,f)}class DOMKeyframesResolver extends KeyframeResolver{constructor(l,u,d,f,h){super(l,u,d,f,h,!0)}readKeyframes(){const{unresolvedKeyframes:l,element:u,name:d}=this;if(!u||!u.current)return;super.readKeyframes();for(let v=0;v<l.length;v++){let x=l[v];if(typeof x=="string"&&(x=x.trim(),isCSSVariableToken(x))){const b=getVariableValue(x,u.current);b!==void 0&&(l[v]=b),v===l.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!positionalKeys.has(d)||l.length!==2)return;const[f,h]=l,m=findDimensionValueType(f),g=findDimensionValueType(h);if(m!==g)if(isNumOrPxType(m)&&isNumOrPxType(g))for(let v=0;v<l.length;v++){const x=l[v];typeof x=="string"&&(l[v]=parseFloat(x))}else positionalValues[d]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:l,name:u}=this,d=[];for(let f=0;f<l.length;f++)(l[f]===null||isNone(l[f]))&&d.push(f);d.length&&makeNoneKeyframesAnimatable(l,d,u)}measureInitialState(){const{element:l,unresolvedKeyframes:u,name:d}=this;if(!l||!l.current)return;d==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=positionalValues[d](l.measureViewportBox(),window.getComputedStyle(l.current)),u[0]=this.measuredOrigin;const f=u[u.length-1];f!==void 0&&l.getValue(d,f).jump(f,!1)}measureEndState(){var g;const{element:l,name:u,unresolvedKeyframes:d}=this;if(!l||!l.current)return;const f=l.getValue(u);f&&f.jump(this.measuredOrigin,!1);const h=d.length-1,m=d[h];d[h]=positionalValues[u](l.measureViewportBox(),window.getComputedStyle(l.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),(g=this.removedTransforms)!=null&&g.length&&this.removedTransforms.forEach(([v,x])=>{l.getValue(v).set(x)}),this.resolveNoneKeyframes()}}function resolveElements(o,l,u){if(o instanceof EventTarget)return[o];if(typeof o=="string"){let d=document;l&&(d=l.current);const f=(u==null?void 0:u[o])??d.querySelectorAll(o);return f?Array.from(f):[]}return Array.from(o)}const getValueAsType=(o,l)=>l&&typeof o=="number"?l.transform(o):o;function isHTMLElement(o){return isObject$2(o)&&"offsetHeight"in o}const MAX_VELOCITY_DELTA=30,isFloat=o=>!isNaN(parseFloat(o));class MotionValue{constructor(l,u={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=d=>{var h;const f=time.now();if(this.updatedAt!==f&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(d),this.current!==this.prev&&((h=this.events.change)==null||h.notify(this.current),this.dependents))for(const m of this.dependents)m.dirty()},this.hasAnimated=!1,this.setCurrent(l),this.owner=u.owner}setCurrent(l){this.current=l,this.updatedAt=time.now(),this.canTrackVelocity===null&&l!==void 0&&(this.canTrackVelocity=isFloat(this.current))}setPrevFrameValue(l=this.current){this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt}onChange(l){return this.on("change",l)}on(l,u){this.events[l]||(this.events[l]=new SubscriptionManager);const d=this.events[l].add(u);return l==="change"?()=>{d(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:d}clearListeners(){for(const l in this.events)this.events[l].clear()}attach(l,u){this.passiveEffect=l,this.stopPassiveEffect=u}set(l){this.passiveEffect?this.passiveEffect(l,this.updateAndNotify):this.updateAndNotify(l)}setWithVelocity(l,u,d){this.set(u),this.prev=void 0,this.prevFrameValue=l,this.prevUpdatedAt=this.updatedAt-d}jump(l,u=!0){this.updateAndNotify(l),this.prev=l,this.prevUpdatedAt=this.prevFrameValue=void 0,u&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var l;(l=this.events.change)==null||l.notify(this.current)}addDependent(l){this.dependents||(this.dependents=new Set),this.dependents.add(l)}removeDependent(l){this.dependents&&this.dependents.delete(l)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const l=time.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||l-this.updatedAt>MAX_VELOCITY_DELTA)return 0;const u=Math.min(this.updatedAt-this.prevUpdatedAt,MAX_VELOCITY_DELTA);return velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),u)}start(l){return this.stop(),new Promise(u=>{this.hasAnimated=!0,this.animation=l(u),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var l,u;(l=this.dependents)==null||l.clear(),(u=this.events.destroy)==null||u.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function motionValue(o,l){return new MotionValue(o,l)}const{schedule:microtask,cancel:cancelMicrotask}=createRenderBatcher(queueMicrotask,!1),isDragging={x:!1,y:!1};function isDragActive(){return isDragging.x||isDragging.y}function setDragLock(o){return o==="x"||o==="y"?isDragging[o]?null:(isDragging[o]=!0,()=>{isDragging[o]=!1}):isDragging.x||isDragging.y?null:(isDragging.x=isDragging.y=!0,()=>{isDragging.x=isDragging.y=!1})}function setupGesture(o,l){const u=resolveElements(o),d=new AbortController,f={passive:!0,...l,signal:d.signal};return[u,f,()=>d.abort()]}function isValidHover(o){return!(o.pointerType==="touch"||isDragActive())}function hover(o,l,u={}){const[d,f,h]=setupGesture(o,u),m=g=>{if(!isValidHover(g))return;const{target:v}=g,x=l(v,g);if(typeof x!="function"||!v)return;const b=S=>{isValidHover(S)&&(x(S),v.removeEventListener("pointerleave",b))};v.addEventListener("pointerleave",b,f)};return d.forEach(g=>{g.addEventListener("pointerenter",m,f)}),h}const isNodeOrChild=(o,l)=>l?o===l?!0:isNodeOrChild(o,l.parentElement):!1,isPrimaryPointer=o=>o.pointerType==="mouse"?typeof o.button!="number"||o.button<=0:o.isPrimary!==!1,focusableElements=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function isElementKeyboardAccessible(o){return focusableElements.has(o.tagName)||o.tabIndex!==-1}const isPressing=new WeakSet;function filterEvents(o){return l=>{l.key==="Enter"&&o(l)}}function firePointerEvent(o,l){o.dispatchEvent(new PointerEvent("pointer"+l,{isPrimary:!0,bubbles:!0}))}const enableKeyboardPress=(o,l)=>{const u=o.currentTarget;if(!u)return;const d=filterEvents(()=>{if(isPressing.has(u))return;firePointerEvent(u,"down");const f=filterEvents(()=>{firePointerEvent(u,"up")}),h=()=>firePointerEvent(u,"cancel");u.addEventListener("keyup",f,l),u.addEventListener("blur",h,l)});u.addEventListener("keydown",d,l),u.addEventListener("blur",()=>u.removeEventListener("keydown",d),l)};function isValidPressEvent(o){return isPrimaryPointer(o)&&!isDragActive()}function press(o,l,u={}){const[d,f,h]=setupGesture(o,u),m=g=>{const v=g.currentTarget;if(!isValidPressEvent(g))return;isPressing.add(v);const x=l(v,g),b=(w,T)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",E),isPressing.has(v)&&isPressing.delete(v),isValidPressEvent(w)&&typeof x=="function"&&x(w,{success:T})},S=w=>{b(w,v===window||v===document||u.useGlobalTarget||isNodeOrChild(v,w.target))},E=w=>{b(w,!1)};window.addEventListener("pointerup",S,f),window.addEventListener("pointercancel",E,f)};return d.forEach(g=>{(u.useGlobalTarget?window:g).addEventListener("pointerdown",m,f),isHTMLElement(g)&&(g.addEventListener("focus",x=>enableKeyboardPress(x,f)),!isElementKeyboardAccessible(g)&&!g.hasAttribute("tabindex")&&(g.tabIndex=0))}),h}function isSVGElement(o){return isObject$2(o)&&"ownerSVGElement"in o}function isSVGSVGElement(o){return isSVGElement(o)&&o.tagName==="svg"}const isMotionValue=o=>!!(o&&o.getVelocity),valueTypes=[...dimensionValueTypes,color,complex],findValueType=o=>valueTypes.find(testValueType(o)),MotionConfigContext=reactExports.createContext({transformPagePoint:o=>o,isStatic:!1,reducedMotion:"never"});function setRef(o,l){if(typeof o=="function")return o(l);o!=null&&(o.current=l)}function composeRefs(...o){return l=>{let u=!1;const d=o.map(f=>{const h=setRef(f,l);return!u&&typeof h=="function"&&(u=!0),h});if(u)return()=>{for(let f=0;f<d.length;f++){const h=d[f];typeof h=="function"?h():setRef(o[f],null)}}}}function useComposedRefs(...o){return reactExports.useCallback(composeRefs(...o),o)}class PopChildMeasure extends reactExports.Component{getSnapshotBeforeUpdate(l){const u=this.props.childRef.current;if(u&&l.isPresent&&!this.props.isPresent){const d=u.offsetParent,f=isHTMLElement(d)&&d.offsetWidth||0,h=this.props.sizeRef.current;h.height=u.offsetHeight||0,h.width=u.offsetWidth||0,h.top=u.offsetTop,h.left=u.offsetLeft,h.right=f-h.width-h.left}return null}componentDidUpdate(){}render(){return this.props.children}}function PopChild({children:o,isPresent:l,anchorX:u,root:d}){const f=reactExports.useId(),h=reactExports.useRef(null),m=reactExports.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:g}=reactExports.useContext(MotionConfigContext),v=useComposedRefs(h,o==null?void 0:o.ref);return reactExports.useInsertionEffect(()=>{const{width:x,height:b,top:S,left:E,right:w}=m.current;if(l||!h.current||!x||!b)return;const T=u==="left"?`left: ${E}`:`right: ${w}`;h.current.dataset.motionPopId=f;const C=document.createElement("style");g&&(C.nonce=g);const M=d??document.head;return M.appendChild(C),C.sheet&&C.sheet.insertRule(`
92
92
  [data-motion-pop-id="${f}"] {
93
93
  position: absolute !important;
94
94
  width: ${x}px !important;
@@ -96,7 +96,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${l.do
96
96
  ${T}px !important;
97
97
  top: ${S}px !important;
98
98
  }
99
- `),()=>{M.contains(C)&&M.removeChild(C)}},[l]),jsxRuntimeExports.jsx(PopChildMeasure,{isPresent:l,childRef:h,sizeRef:m,children:reactExports.cloneElement(o,{ref:v})})}const PresenceChild=({children:o,initial:l,isPresent:u,onExitComplete:d,custom:f,presenceAffectsLayout:h,mode:m,anchorX:g,root:v})=>{const x=useConstant(newChildrenMap),b=reactExports.useId();let S=!0,E=reactExports.useMemo(()=>(S=!1,{id:b,initial:l,isPresent:u,custom:f,onExitComplete:w=>{x.set(w,!0);for(const T of x.values())if(!T)return;d&&d()},register:w=>(x.set(w,!1),()=>x.delete(w))}),[u,x,d]);return h&&S&&(E={...E}),reactExports.useMemo(()=>{x.forEach((w,T)=>x.set(T,!1))},[u]),reactExports.useEffect(()=>{!u&&!x.size&&d&&d()},[u]),m==="popLayout"&&(o=jsxRuntimeExports.jsx(PopChild,{isPresent:u,anchorX:g,root:v,children:o})),jsxRuntimeExports.jsx(PresenceContext.Provider,{value:E,children:o})};function newChildrenMap(){return new Map}function usePresence(o=!0){const l=reactExports.useContext(PresenceContext);if(l===null)return[!0,null];const{isPresent:u,onExitComplete:d,register:f}=l,h=reactExports.useId();reactExports.useEffect(()=>{if(o)return f(h)},[o]);const m=reactExports.useCallback(()=>o&&d&&d(h),[h,d,o]);return!u&&d?[!1,m]:[!0]}const getChildKey=o=>o.key||"";function onlyElements(o){const l=[];return reactExports.Children.forEach(o,u=>{reactExports.isValidElement(u)&&l.push(u)}),l}const AnimatePresence=({children:o,custom:l,initial:u=!0,onExitComplete:d,presenceAffectsLayout:f=!0,mode:h="sync",propagate:m=!1,anchorX:g="left",root:v})=>{const[x,b]=usePresence(m),S=reactExports.useMemo(()=>onlyElements(o),[o]),E=m&&!x?[]:S.map(getChildKey),w=reactExports.useRef(!0),T=reactExports.useRef(S),C=useConstant(()=>new Map),[M,A]=reactExports.useState(S),[k,I]=reactExports.useState(S);useIsomorphicLayoutEffect(()=>{w.current=!1,T.current=S;for(let N=0;N<k.length;N++){const V=getChildKey(k[N]);E.includes(V)?C.delete(V):C.get(V)!==!0&&C.set(V,!1)}},[k,E.length,E.join("-")]);const O=[];if(S!==M){let N=[...S];for(let V=0;V<k.length;V++){const z=k[V],W=getChildKey(z);E.includes(W)||(N.splice(V,0,z),O.push(z))}return h==="wait"&&O.length&&(N=O),I(onlyElements(N)),A(S),null}const{forceRender:j}=reactExports.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:k.map(N=>{const V=getChildKey(N),z=m&&!x?!1:S===k||E.includes(V),W=()=>{if(C.has(V))C.set(V,!0);else return;let X=!0;C.forEach(ie=>{ie||(X=!1)}),X&&(j==null||j(),I(T.current),m&&(b==null||b()),d&&d())};return jsxRuntimeExports.jsx(PresenceChild,{isPresent:z,initial:!w.current||u?void 0:!1,custom:l,presenceAffectsLayout:f,mode:h,root:v,onExitComplete:z?void 0:W,anchorX:g,children:N},V)})})},LazyContext=reactExports.createContext({strict:!1}),featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const o in featureProps)featureDefinitions[o]={isEnabled:l=>featureProps[o].some(u=>!!l[u])};function loadFeatures(o){for(const l in o)featureDefinitions[l]={...featureDefinitions[l],...o[l]}}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(o){return o.startsWith("while")||o.startsWith("drag")&&o!=="draggable"||o.startsWith("layout")||o.startsWith("onTap")||o.startsWith("onPan")||o.startsWith("onLayout")||validMotionProps.has(o)}let shouldForward=o=>!isValidMotionProp(o);function loadExternalIsValidProp(o){typeof o=="function"&&(shouldForward=l=>l.startsWith("on")?!isValidMotionProp(l):o(l))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(o,l,u){const d={};for(const f in o)f==="values"&&typeof o.values=="object"||(shouldForward(f)||u===!0&&isValidMotionProp(f)||!l&&!isValidMotionProp(f)||o.draggable&&f.startsWith("onDrag"))&&(d[f]=o[f]);return d}const MotionContext=reactExports.createContext({});function isAnimationControls(o){return o!==null&&typeof o=="object"&&typeof o.start=="function"}function isVariantLabel(o){return typeof o=="string"||Array.isArray(o)}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(o){return isAnimationControls(o.animate)||variantProps.some(l=>isVariantLabel(o[l]))}function isVariantNode(o){return!!(isControllingVariants(o)||o.variants)}function getCurrentTreeVariants(o,l){if(isControllingVariants(o)){const{initial:u,animate:d}=o;return{initial:u===!1||isVariantLabel(u)?u:void 0,animate:isVariantLabel(d)?d:void 0}}return o.inherit!==!1?l:{}}function useCreateMotionContext(o){const{initial:l,animate:u}=getCurrentTreeVariants(o,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:l,animate:u}),[variantLabelsAsDependency(l),variantLabelsAsDependency(u)])}function variantLabelsAsDependency(o){return Array.isArray(o)?o.join(" "):o}const scaleCorrectors={};function addScaleCorrector(o){for(const l in o)scaleCorrectors[l]=o[l],isCSSVariableName(l)&&(scaleCorrectors[l].isCSSVariable=!0)}function isForcedMotionValue(o,{layout:l,layoutId:u}){return transformProps.has(o)||o.startsWith("origin")||(l||u!==void 0)&&(!!scaleCorrectors[o]||o==="opacity")}const translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(o,l,u){let d="",f=!0;for(let h=0;h<numTransforms;h++){const m=transformPropOrder[h],g=o[m];if(g===void 0)continue;let v=!0;if(typeof g=="number"?v=g===(m.startsWith("scale")?1:0):v=parseFloat(g)===0,!v||u){const x=getValueAsType(g,numberValueTypes[m]);if(!v){f=!1;const b=translateAlias[m]||m;d+=`${b}(${x}) `}u&&(l[m]=x)}}return d=d.trim(),u?d=u(l,f?"":d):f&&(d="none"),d}function buildHTMLStyles(o,l,u){const{style:d,vars:f,transformOrigin:h}=o;let m=!1,g=!1;for(const v in l){const x=l[v];if(transformProps.has(v)){m=!0;continue}else if(isCSSVariableName(v)){f[v]=x;continue}else{const b=getValueAsType(x,numberValueTypes[v]);v.startsWith("origin")?(g=!0,h[v]=b):d[v]=b}}if(l.transform||(m||u?d.transform=buildTransform(l,o.transform,u):d.transform&&(d.transform="none")),g){const{originX:v="50%",originY:x="50%",originZ:b=0}=h;d.transformOrigin=`${v} ${x} ${b}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(o,l,u){for(const d in l)!isMotionValue(l[d])&&!isForcedMotionValue(d,u)&&(o[d]=l[d])}function useInitialMotionValues({transformTemplate:o},l){return reactExports.useMemo(()=>{const u=createHtmlRenderState();return buildHTMLStyles(u,l,o),Object.assign({},u.vars,u.style)},[l])}function useStyle(o,l){const u=o.style||{},d={};return copyRawValuesOnly(d,u,o),Object.assign(d,useInitialMotionValues(o,l)),d}function useHTMLProps(o,l){const u={},d=useStyle(o,l);return o.drag&&o.dragListener!==!1&&(u.draggable=!1,d.userSelect=d.WebkitUserSelect=d.WebkitTouchCallout="none",d.touchAction=o.drag===!0?"none":`pan-${o.drag==="x"?"y":"x"}`),o.tabIndex===void 0&&(o.onTap||o.onTapStart||o.whileTap)&&(u.tabIndex=0),u.style=d,u}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(o,l,u=1,d=0,f=!0){o.pathLength=1;const h=f?dashKeys:camelKeys;o[h.offset]=px.transform(-d);const m=px.transform(l),g=px.transform(u);o[h.array]=`${m} ${g}`}function buildSVGAttrs(o,{attrX:l,attrY:u,attrScale:d,pathLength:f,pathSpacing:h=1,pathOffset:m=0,...g},v,x,b){if(buildHTMLStyles(o,g,x),v){o.style.viewBox&&(o.attrs.viewBox=o.style.viewBox);return}o.attrs=o.style,o.style={};const{attrs:S,style:E}=o;S.transform&&(E.transform=S.transform,delete S.transform),(E.transform||S.transformOrigin)&&(E.transformOrigin=S.transformOrigin??"50% 50%",delete S.transformOrigin),E.transform&&(E.transformBox=(b==null?void 0:b.transformBox)??"fill-box",delete S.transformBox),l!==void 0&&(S.x=l),u!==void 0&&(S.y=u),d!==void 0&&(S.scale=d),f!==void 0&&buildSVGPath(S,f,h,m,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=o=>typeof o=="string"&&o.toLowerCase()==="svg";function useSVGProps(o,l,u,d){const f=reactExports.useMemo(()=>{const h=createSvgRenderState();return buildSVGAttrs(h,l,isSVGTag(d),o.transformTemplate,o.style),{...h.attrs,style:{...h.style}}},[l]);if(o.style){const h={};copyRawValuesOnly(h,o.style,o),f.style={...h,...f.style}}return f}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(o){return typeof o!="string"||o.includes("-")?!1:!!(lowercaseSVGElements.indexOf(o)>-1||/[A-Z]/u.test(o))}function useRender(o,l,u,{latestValues:d},f,h=!1){const g=(isSVGComponent(o)?useSVGProps:useHTMLProps)(l,d,f,o),v=filterProps(l,typeof o=="string",h),x=o!==reactExports.Fragment?{...v,...g,ref:u}:{},{children:b}=l,S=reactExports.useMemo(()=>isMotionValue(b)?b.get():b,[b]);return reactExports.createElement(o,{...x,children:S})}function getValueState(o){const l=[{},{}];return o==null||o.values.forEach((u,d)=>{l[0][d]=u.get(),l[1][d]=u.getVelocity()}),l}function resolveVariantFromProps(o,l,u,d){if(typeof l=="function"){const[f,h]=getValueState(d);l=l(u!==void 0?u:o.custom,f,h)}if(typeof l=="string"&&(l=o.variants&&o.variants[l]),typeof l=="function"){const[f,h]=getValueState(d);l=l(u!==void 0?u:o.custom,f,h)}return l}function resolveMotionValue(o){return isMotionValue(o)?o.get():o}function makeState({scrapeMotionValuesFromProps:o,createRenderState:l},u,d,f){return{latestValues:makeLatestValues(u,d,f,o),renderState:l()}}function makeLatestValues(o,l,u,d){const f={},h=d(o,{});for(const E in h)f[E]=resolveMotionValue(h[E]);let{initial:m,animate:g}=o;const v=isControllingVariants(o),x=isVariantNode(o);l&&x&&!v&&o.inherit!==!1&&(m===void 0&&(m=l.initial),g===void 0&&(g=l.animate));let b=u?u.initial===!1:!1;b=b||m===!1;const S=b?g:m;if(S&&typeof S!="boolean"&&!isAnimationControls(S)){const E=Array.isArray(S)?S:[S];for(let w=0;w<E.length;w++){const T=resolveVariantFromProps(o,E[w]);if(T){const{transitionEnd:C,transition:M,...A}=T;for(const k in A){let I=A[k];if(Array.isArray(I)){const O=b?I.length-1:0;I=I[O]}I!==null&&(f[k]=I)}for(const k in C)f[k]=C[k]}}}return f}const makeUseVisualState=o=>(l,u)=>{const d=reactExports.useContext(MotionContext),f=reactExports.useContext(PresenceContext),h=()=>makeState(o,l,d,f);return u?h():useConstant(h)};function scrapeMotionValuesFromProps$1(o,l,u){var h;const{style:d}=o,f={};for(const m in d)(isMotionValue(d[m])||l.style&&isMotionValue(l.style[m])||isForcedMotionValue(m,o)||((h=u==null?void 0:u.getValue(m))==null?void 0:h.liveStyle)!==void 0)&&(f[m]=d[m]);return f}const useHTMLVisualState=makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState});function scrapeMotionValuesFromProps(o,l,u){const d=scrapeMotionValuesFromProps$1(o,l,u);for(const f in o)if(isMotionValue(o[f])||isMotionValue(l[f])){const h=transformPropOrder.indexOf(f)!==-1?"attr"+f.charAt(0).toUpperCase()+f.substring(1):f;d[h]=o[f]}return d}const useSVGVisualState=makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState}),motionComponentSymbol=Symbol.for("motionComponentSymbol");function isRefObject(o){return o&&typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"current")}function useMotionRef(o,l,u){return reactExports.useCallback(d=>{d&&o.onMount&&o.onMount(d),l&&(d?l.mount(d):l.unmount()),u&&(typeof u=="function"?u(d):isRefObject(u)&&(u.current=d))},[l])}const camelToDash=o=>o.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),SwitchLayoutGroupContext=reactExports.createContext({});function useVisualElement(o,l,u,d,f){var C,M;const{visualElement:h}=reactExports.useContext(MotionContext),m=reactExports.useContext(LazyContext),g=reactExports.useContext(PresenceContext),v=reactExports.useContext(MotionConfigContext).reducedMotion,x=reactExports.useRef(null);d=d||m.renderer,!x.current&&d&&(x.current=d(o,{visualState:l,parent:h,props:u,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:v}));const b=x.current,S=reactExports.useContext(SwitchLayoutGroupContext);b&&!b.projection&&f&&(b.type==="html"||b.type==="svg")&&createProjectionNode$1(x.current,u,f,S);const E=reactExports.useRef(!1);reactExports.useInsertionEffect(()=>{b&&E.current&&b.update(u,g)});const w=u[optimizedAppearDataAttribute],T=reactExports.useRef(!!w&&!((C=window.MotionHandoffIsComplete)!=null&&C.call(window,w))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,w)));return useIsomorphicLayoutEffect(()=>{b&&(E.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),T.current&&b.animationState&&b.animationState.animateChanges())}),reactExports.useEffect(()=>{b&&(!T.current&&b.animationState&&b.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)==null||A.call(window,w)}),T.current=!1),b.enteringChildren=void 0)}),b}function createProjectionNode$1(o,l,u,d){const{layoutId:f,layout:h,drag:m,dragConstraints:g,layoutScroll:v,layoutRoot:x,layoutCrossfade:b}=l;o.projection=new u(o.latestValues,l["data-framer-portal-id"]?void 0:getClosestProjectingNode(o.parent)),o.projection.setOptions({layoutId:f,layout:h,alwaysMeasureLayout:!!m||g&&isRefObject(g),visualElement:o,animationType:typeof h=="string"?h:"both",initialPromotionConfig:d,crossfade:b,layoutScroll:v,layoutRoot:x})}function getClosestProjectingNode(o){if(o)return o.options.allowProjection!==!1?o.projection:getClosestProjectingNode(o.parent)}function createMotionComponent(o,{forwardMotionProps:l=!1}={},u,d){u&&loadFeatures(u);const f=isSVGComponent(o)?useSVGVisualState:useHTMLVisualState;function h(g,v){let x;const b={...reactExports.useContext(MotionConfigContext),...g,layoutId:useLayoutId(g)},{isStatic:S}=b,E=useCreateMotionContext(g),w=f(g,S);if(!S&&isBrowser){useStrictMode();const T=getProjectionFunctionality(b);x=T.MeasureLayout,E.visualElement=useVisualElement(o,w,b,d,T.ProjectionNode)}return jsxRuntimeExports.jsxs(MotionContext.Provider,{value:E,children:[x&&E.visualElement?jsxRuntimeExports.jsx(x,{visualElement:E.visualElement,...b}):null,useRender(o,g,useMotionRef(w,E.visualElement,v),w,S,l)]})}h.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const m=reactExports.forwardRef(h);return m[motionComponentSymbol]=o,m}function useLayoutId({layoutId:o}){const l=reactExports.useContext(LayoutGroupContext).id;return l&&o!==void 0?l+"-"+o:o}function useStrictMode(o,l){reactExports.useContext(LazyContext).strict}function getProjectionFunctionality(o){const{drag:l,layout:u}=featureDefinitions;if(!l&&!u)return{};const d={...l,...u};return{MeasureLayout:l!=null&&l.isEnabled(o)||u!=null&&u.isEnabled(o)?d.MeasureLayout:void 0,ProjectionNode:d.ProjectionNode}}function createMotionProxy(o,l){if(typeof Proxy>"u")return createMotionComponent;const u=new Map,d=(h,m)=>createMotionComponent(h,m,o,l),f=(h,m)=>d(h,m);return new Proxy(f,{get:(h,m)=>m==="create"?d:(u.has(m)||u.set(m,createMotionComponent(m,void 0,o,l)),u.get(m))})}function convertBoundingBoxToBox({top:o,left:l,right:u,bottom:d}){return{x:{min:l,max:u},y:{min:o,max:d}}}function convertBoxToBoundingBox({x:o,y:l}){return{top:l.min,right:o.max,bottom:l.max,left:o.min}}function transformBoxPoints(o,l){if(!l)return o;const u=l({x:o.left,y:o.top}),d=l({x:o.right,y:o.bottom});return{top:u.y,left:u.x,bottom:d.y,right:d.x}}function isIdentityScale(o){return o===void 0||o===1}function hasScale({scale:o,scaleX:l,scaleY:u}){return!isIdentityScale(o)||!isIdentityScale(l)||!isIdentityScale(u)}function hasTransform(o){return hasScale(o)||has2DTranslate(o)||o.z||o.rotate||o.rotateX||o.rotateY||o.skewX||o.skewY}function has2DTranslate(o){return is2DTranslate(o.x)||is2DTranslate(o.y)}function is2DTranslate(o){return o&&o!=="0%"}function scalePoint(o,l,u){const d=o-u,f=l*d;return u+f}function applyPointDelta(o,l,u,d,f){return f!==void 0&&(o=scalePoint(o,f,d)),scalePoint(o,u,d)+l}function applyAxisDelta(o,l=0,u=1,d,f){o.min=applyPointDelta(o.min,l,u,d,f),o.max=applyPointDelta(o.max,l,u,d,f)}function applyBoxDelta(o,{x:l,y:u}){applyAxisDelta(o.x,l.translate,l.scale,l.originPoint),applyAxisDelta(o.y,u.translate,u.scale,u.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(o,l,u,d=!1){const f=u.length;if(!f)return;l.x=l.y=1;let h,m;for(let g=0;g<f;g++){h=u[g],m=h.projectionDelta;const{visualElement:v}=h.options;v&&v.props.style&&v.props.style.display==="contents"||(d&&h.options.layoutScroll&&h.scroll&&h!==h.root&&transformBox(o,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),m&&(l.x*=m.x.scale,l.y*=m.y.scale,applyBoxDelta(o,m)),d&&hasTransform(h.latestValues)&&transformBox(o,h.latestValues))}l.x<TREE_SCALE_SNAP_MAX&&l.x>TREE_SCALE_SNAP_MIN&&(l.x=1),l.y<TREE_SCALE_SNAP_MAX&&l.y>TREE_SCALE_SNAP_MIN&&(l.y=1)}function translateAxis(o,l){o.min=o.min+l,o.max=o.max+l}function transformAxis(o,l,u,d,f=.5){const h=mixNumber$1(o.min,o.max,f);applyAxisDelta(o,l,u,h,d)}function transformBox(o,l){transformAxis(o.x,l.x,l.scaleX,l.scale,l.originX),transformAxis(o.y,l.y,l.scaleY,l.scale,l.originY)}function measureViewportBox(o,l){return convertBoundingBoxToBox(transformBoxPoints(o.getBoundingClientRect(),l))}function measurePageBox(o,l,u){const d=measureViewportBox(o,u),{scroll:f}=l;return f&&(translateAxis(d.x,f.offset.x),translateAxis(d.y,f.offset.y)),d}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()}),prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const o=window.matchMedia("(prefers-reduced-motion)"),l=()=>prefersReducedMotion.current=o.matches;o.addEventListener("change",l),l()}else prefersReducedMotion.current=!1}const visualElementStore=new WeakMap;function updateMotionValuesFromProps(o,l,u){for(const d in l){const f=l[d],h=u[d];if(isMotionValue(f))o.addValue(d,f);else if(isMotionValue(h))o.addValue(d,motionValue(f,{owner:o}));else if(h!==f)if(o.hasValue(d)){const m=o.getValue(d);m.liveStyle===!0?m.jump(f):m.hasAnimated||m.set(f)}else{const m=o.getStaticValue(d);o.addValue(d,motionValue(m!==void 0?m:f,{owner:o}))}}for(const d in u)l[d]===void 0&&o.removeValue(d);return l}const propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VisualElement{scrapeMotionValuesFromProps(l,u,d){return{}}constructor({parent:l,props:u,presenceContext:d,reducedMotionConfig:f,blockInitialAnimation:h,visualState:m},g={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=time.now();this.renderScheduledAt<E&&(this.renderScheduledAt=E,frame.render(this.render,!1,!0))};const{latestValues:v,renderState:x}=m;this.latestValues=v,this.baseTarget={...v},this.initialValues=u.initial?{...v}:{},this.renderState=x,this.parent=l,this.props=u,this.presenceContext=d,this.depth=l?l.depth+1:0,this.reducedMotionConfig=f,this.options=g,this.blockInitialAnimation=!!h,this.isControllingVariants=isControllingVariants(u),this.isVariantNode=isVariantNode(u),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(l&&l.current);const{willChange:b,...S}=this.scrapeMotionValuesFromProps(u,{},this);for(const E in S){const w=S[E];v[E]!==void 0&&isMotionValue(w)&&w.set(v[E])}}mount(l){var u;this.current=l,visualElementStore.set(l,this),this.projection&&!this.projection.instance&&this.projection.mount(l),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((d,f)=>this.bindToMotionValue(f,d)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,(u=this.parent)==null||u.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var l;this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(u=>u()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(l=this.parent)==null||l.removeChild(this);for(const u in this.events)this.events[u].clear();for(const u in this.features){const d=this.features[u];d&&(d.unmount(),d.isMounted=!1)}this.current=null}addChild(l){this.children.add(l),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(l)}removeChild(l){this.children.delete(l),this.enteringChildren&&this.enteringChildren.delete(l)}bindToMotionValue(l,u){this.valueSubscriptions.has(l)&&this.valueSubscriptions.get(l)();const d=transformProps.has(l);d&&this.onBindTransform&&this.onBindTransform();const f=u.on("change",m=>{this.latestValues[l]=m,this.props.onUpdate&&frame.preRender(this.notifyUpdate),d&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let h;window.MotionCheckAppearSync&&(h=window.MotionCheckAppearSync(this,l,u)),this.valueSubscriptions.set(l,()=>{f(),h&&h(),u.owner&&u.stop()})}sortNodePosition(l){return!this.current||!this.sortInstanceNodePosition||this.type!==l.type?0:this.sortInstanceNodePosition(this.current,l.current)}updateFeatures(){let l="animation";for(l in featureDefinitions){const u=featureDefinitions[l];if(!u)continue;const{isEnabled:d,Feature:f}=u;if(!this.features[l]&&f&&d(this.props)&&(this.features[l]=new f(this)),this.features[l]){const h=this.features[l];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(l){return this.latestValues[l]}setStaticValue(l,u){this.latestValues[l]=u}update(l,u){(l.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=l,this.prevPresenceContext=this.presenceContext,this.presenceContext=u;for(let d=0;d<propEventHandlers.length;d++){const f=propEventHandlers[d];this.propEventSubscriptions[f]&&(this.propEventSubscriptions[f](),delete this.propEventSubscriptions[f]);const h="on"+f,m=l[h];m&&(this.propEventSubscriptions[f]=this.on(f,m))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(l,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(l){return this.props.variants?this.props.variants[l]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(l){const u=this.getClosestVariantNode();if(u)return u.variantChildren&&u.variantChildren.add(l),()=>u.variantChildren.delete(l)}addValue(l,u){const d=this.values.get(l);u!==d&&(d&&this.removeValue(l),this.bindToMotionValue(l,u),this.values.set(l,u),this.latestValues[l]=u.get())}removeValue(l){this.values.delete(l);const u=this.valueSubscriptions.get(l);u&&(u(),this.valueSubscriptions.delete(l)),delete this.latestValues[l],this.removeValueFromRenderState(l,this.renderState)}hasValue(l){return this.values.has(l)}getValue(l,u){if(this.props.values&&this.props.values[l])return this.props.values[l];let d=this.values.get(l);return d===void 0&&u!==void 0&&(d=motionValue(u===null?void 0:u,{owner:this}),this.addValue(l,d)),d}readValue(l,u){let d=this.latestValues[l]!==void 0||!this.current?this.latestValues[l]:this.getBaseTargetFromProps(this.props,l)??this.readValueFromInstance(this.current,l,this.options);return d!=null&&(typeof d=="string"&&(isNumericalString(d)||isZeroValueString(d))?d=parseFloat(d):!findValueType(d)&&complex.test(u)&&(d=getAnimatableNone(l,u)),this.setBaseTarget(l,isMotionValue(d)?d.get():d)),isMotionValue(d)?d.get():d}setBaseTarget(l,u){this.baseTarget[l]=u}getBaseTarget(l){var h;const{initial:u}=this.props;let d;if(typeof u=="string"||typeof u=="object"){const m=resolveVariantFromProps(this.props,u,(h=this.presenceContext)==null?void 0:h.custom);m&&(d=m[l])}if(u&&d!==void 0)return d;const f=this.getBaseTargetFromProps(this.props,l);return f!==void 0&&!isMotionValue(f)?f:this.initialValues[l]!==void 0&&d===void 0?void 0:this.baseTarget[l]}on(l,u){return this.events[l]||(this.events[l]=new SubscriptionManager),this.events[l].add(u)}notify(l,...u){this.events[l]&&this.events[l].notify(...u)}scheduleRenderMicrotask(){microtask.render(this.render)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(l,u){return l.compareDocumentPosition(u)&2?1:-1}getBaseTargetFromProps(l,u){return l.style?l.style[u]:void 0}removeValueFromRenderState(l,{vars:u,style:d}){delete u[l],delete d[l]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:l}=this.props;isMotionValue(l)&&(this.childSubscription=l.on("change",u=>{this.current&&(this.current.textContent=`${u}`)}))}}function renderHTML(o,{style:l,vars:u},d,f){const h=o.style;let m;for(m in l)h[m]=l[m];f==null||f.applyProjectionStyles(h,d);for(m in u)h.setProperty(m,u[m])}function getComputedStyle$1(o){return window.getComputedStyle(o)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(l,u){var d;if(transformProps.has(u))return(d=this.projection)!=null&&d.isProjecting?defaultTransformValue(u):readTransformValue(l,u);{const f=getComputedStyle$1(l),h=(isCSSVariableName(u)?f.getPropertyValue(u):f[u])||0;return typeof h=="string"?h.trim():h}}measureInstanceViewportBox(l,{transformPagePoint:u}){return measureViewportBox(l,u)}build(l,u,d){buildHTMLStyles(l,u,d.transformTemplate)}scrapeMotionValuesFromProps(l,u,d){return scrapeMotionValuesFromProps$1(l,u,d)}}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(o,l,u,d){renderHTML(o,l,void 0,d);for(const f in l.attrs)o.setAttribute(camelCaseAttributes.has(f)?f:camelToDash(f),l.attrs[f])}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(l,u){return l[u]}readValueFromInstance(l,u){if(transformProps.has(u)){const d=getDefaultValueType(u);return d&&d.default||0}return u=camelCaseAttributes.has(u)?u:camelToDash(u),l.getAttribute(u)}scrapeMotionValuesFromProps(l,u,d){return scrapeMotionValuesFromProps(l,u,d)}build(l,u,d){buildSVGAttrs(l,u,this.isSVGTag,d.transformTemplate,d.style)}renderInstance(l,u,d,f){renderSVG(l,u,d,f)}mount(l){this.isSVGTag=isSVGTag(l.tagName),super.mount(l)}}const createDomVisualElement=(o,l)=>isSVGComponent(o)?new SVGVisualElement(l):new HTMLVisualElement(l,{allowProjection:o!==reactExports.Fragment});function resolveVariant(o,l,u){const d=o.getProps();return resolveVariantFromProps(d,l,u!==void 0?u:d.custom,o)}const isKeyframesTarget=o=>Array.isArray(o);function setMotionValue(o,l,u){o.hasValue(l)?o.getValue(l).set(u):o.addValue(l,motionValue(u))}function resolveFinalValueInKeyframes(o){return isKeyframesTarget(o)?o[o.length-1]||0:o}function setTarget(o,l){const u=resolveVariant(o,l);let{transitionEnd:d={},transition:f={},...h}=u||{};h={...h,...d};for(const m in h){const g=resolveFinalValueInKeyframes(h[m]);setMotionValue(o,m,g)}}function isWillChangeMotionValue(o){return!!(isMotionValue(o)&&o.add)}function addValueToWillChange(o,l){const u=o.getValue("willChange");if(isWillChangeMotionValue(u))return u.add(l);if(!u&&MotionGlobalConfig.WillChange){const d=new MotionGlobalConfig.WillChange("auto");o.addValue("willChange",d),d.add(l)}}function getOptimisedAppearId(o){return o.props[optimizedAppearDataAttribute]}const isNotNull=o=>o!==null;function getFinalKeyframe(o,{repeat:l,repeatType:u="loop"},d){const f=o.filter(isNotNull),h=l&&u!=="loop"&&l%2===1?0:f.length-1;return f[h]}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=o=>({type:"spring",stiffness:550,damping:o===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(o,{keyframes:l})=>l.length>2?keyframesTransition:transformProps.has(o)?o.startsWith("scale")?criticallyDampedSpring(l[1]):underDampedSpring:ease;function isTransitionDefined({when:o,delay:l,delayChildren:u,staggerChildren:d,staggerDirection:f,repeat:h,repeatType:m,repeatDelay:g,from:v,elapsed:x,...b}){return!!Object.keys(b).length}const animateMotionValue=(o,l,u,d={},f,h)=>m=>{const g=getValueTransition$1(d,o)||{},v=g.delay||d.delay||0;let{elapsed:x=0}=d;x=x-secondsToMilliseconds(v);const b={keyframes:Array.isArray(u)?u:[null,u],ease:"easeOut",velocity:l.getVelocity(),...g,delay:-x,onUpdate:E=>{l.set(E),g.onUpdate&&g.onUpdate(E)},onComplete:()=>{m(),g.onComplete&&g.onComplete()},name:o,motionValue:l,element:h?void 0:f};isTransitionDefined(g)||Object.assign(b,getDefaultTransition(o,b)),b.duration&&(b.duration=secondsToMilliseconds(b.duration)),b.repeatDelay&&(b.repeatDelay=secondsToMilliseconds(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(makeAnimationInstant(b),b.delay===0&&(S=!0)),(MotionGlobalConfig.instantAnimations||MotionGlobalConfig.skipAnimations)&&(S=!0,makeAnimationInstant(b),b.delay=0),b.allowFlatten=!g.type&&!g.ease,S&&!h&&l.get()!==void 0){const E=getFinalKeyframe(b.keyframes,g);if(E!==void 0){frame.update(()=>{b.onUpdate(E),b.onComplete()});return}}return g.isSync?new JSAnimation(b):new AsyncMotionValueAnimation(b)};function shouldBlockAnimation({protectedKeys:o,needsAnimating:l},u){const d=o.hasOwnProperty(u)&&l[u]!==!0;return l[u]=!1,d}function animateTarget(o,l,{delay:u=0,transitionOverride:d,type:f}={}){let{transition:h=o.getDefaultTransition(),transitionEnd:m,...g}=l;d&&(h=d);const v=[],x=f&&o.animationState&&o.animationState.getState()[f];for(const b in g){const S=o.getValue(b,o.latestValues[b]??null),E=g[b];if(E===void 0||x&&shouldBlockAnimation(x,b))continue;const w={delay:u,...getValueTransition$1(h||{},b)},T=S.get();if(T!==void 0&&!S.isAnimating&&!Array.isArray(E)&&E===T&&!w.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const A=getOptimisedAppearId(o);if(A){const k=window.MotionHandoffAnimation(A,b,frame);k!==null&&(w.startTime=k,C=!0)}}addValueToWillChange(o,b),S.start(animateMotionValue(b,S,E,o.shouldReduceMotion&&positionalKeys.has(b)?{type:!1}:w,o,C));const M=S.animation;M&&v.push(M)}return m&&Promise.all(v).then(()=>{frame.update(()=>{m&&setTarget(o,m)})}),v}function calcChildStagger(o,l,u,d=0,f=1){const h=Array.from(o).sort((x,b)=>x.sortNodePosition(b)).indexOf(l),m=o.size,g=(m-1)*d;return typeof u=="function"?u(h,m):f===1?h*d:g-h*d}function animateVariant(o,l,u={}){var v;const d=resolveVariant(o,l,u.type==="exit"?(v=o.presenceContext)==null?void 0:v.custom:void 0);let{transition:f=o.getDefaultTransition()||{}}=d||{};u.transitionOverride&&(f=u.transitionOverride);const h=d?()=>Promise.all(animateTarget(o,d,u)):()=>Promise.resolve(),m=o.variantChildren&&o.variantChildren.size?(x=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:E}=f;return animateChildren(o,l,x,b,S,E,u)}:()=>Promise.resolve(),{when:g}=f;if(g){const[x,b]=g==="beforeChildren"?[h,m]:[m,h];return x().then(()=>b())}else return Promise.all([h(),m(u.delay)])}function animateChildren(o,l,u=0,d=0,f=0,h=1,m){const g=[];for(const v of o.variantChildren)v.notify("AnimationStart",l),g.push(animateVariant(v,l,{...m,delay:u+(typeof d=="function"?0:d)+calcChildStagger(o.variantChildren,v,d,f,h)}).then(()=>v.notify("AnimationComplete",l)));return Promise.all(g)}function animateVisualElement(o,l,u={}){o.notify("AnimationStart",l);let d;if(Array.isArray(l)){const f=l.map(h=>animateVariant(o,h,u));d=Promise.all(f)}else if(typeof l=="string")d=animateVariant(o,l,u);else{const f=typeof l=="function"?resolveVariant(o,l,u.custom):l;d=Promise.all(animateTarget(o,f,u))}return d.then(()=>{o.notify("AnimationComplete",l)})}function shallowCompare(o,l){if(!Array.isArray(l))return!1;const u=l.length;if(u!==o.length)return!1;for(let d=0;d<u;d++)if(l[d]!==o[d])return!1;return!0}const numVariantProps=variantProps.length;function getVariantContext(o){if(!o)return;if(!o.isControllingVariants){const u=o.parent?getVariantContext(o.parent)||{}:{};return o.props.initial!==void 0&&(u.initial=o.props.initial),u}const l={};for(let u=0;u<numVariantProps;u++){const d=variantProps[u],f=o.props[d];(isVariantLabel(f)||f===!1)&&(l[d]=f)}return l}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(o){return l=>Promise.all(l.map(({animation:u,options:d})=>animateVisualElement(o,u,d)))}function createAnimationState(o){let l=animateList(o),u=createState(),d=!0;const f=v=>(x,b)=>{var E;const S=resolveVariant(o,b,v==="exit"?(E=o.presenceContext)==null?void 0:E.custom:void 0);if(S){const{transition:w,transitionEnd:T,...C}=S;x={...x,...C,...T}}return x};function h(v){l=v(o)}function m(v){const{props:x}=o,b=getVariantContext(o.parent)||{},S=[],E=new Set;let w={},T=1/0;for(let M=0;M<numAnimationTypes;M++){const A=reversePriorityOrder[M],k=u[A],I=x[A]!==void 0?x[A]:b[A],O=isVariantLabel(I),j=A===v?k.isActive:null;j===!1&&(T=M);let N=I===b[A]&&I!==x[A]&&O;if(N&&d&&o.manuallyAnimateOnMount&&(N=!1),k.protectedKeys={...w},!k.isActive&&j===null||!I&&!k.prevProp||isAnimationControls(I)||typeof I=="boolean")continue;const V=checkVariantsDidChange(k.prevProp,I);let z=V||A===v&&k.isActive&&!N&&O||M>T&&O,W=!1;const X=Array.isArray(I)?I:[I];let ie=X.reduce(f(A),{});j===!1&&(ie={});const{prevResolvedValues:oe={}}=k,le={...oe,...ie},Q=G=>{z=!0,E.has(G)&&(W=!0,E.delete(G)),k.needsAnimating[G]=!0;const L=o.getValue(G);L&&(L.liveStyle=!1)};for(const G in le){const L=ie[G],B=oe[G];if(w.hasOwnProperty(G))continue;let q=!1;isKeyframesTarget(L)&&isKeyframesTarget(B)?q=!shallowCompare(L,B):q=L!==B,q?L!=null?Q(G):E.add(G):L!==void 0&&E.has(G)?Q(G):k.protectedKeys[G]=!0}k.prevProp=I,k.prevResolvedValues=ie,k.isActive&&(w={...w,...ie}),d&&o.blockInitialAnimation&&(z=!1);const K=N&&V;z&&(!K||W)&&S.push(...X.map(G=>{const L={type:A};if(typeof G=="string"&&d&&!K&&o.manuallyAnimateOnMount&&o.parent){const{parent:B}=o,q=resolveVariant(B,G);if(B.enteringChildren&&q){const{delayChildren:U}=q.transition||{};L.delay=calcChildStagger(B.enteringChildren,o,U)}}return{animation:G,options:L}}))}if(E.size){const M={};if(typeof x.initial!="boolean"){const A=resolveVariant(o,Array.isArray(x.initial)?x.initial[0]:x.initial);A&&A.transition&&(M.transition=A.transition)}E.forEach(A=>{const k=o.getBaseTarget(A),I=o.getValue(A);I&&(I.liveStyle=!0),M[A]=k??null}),S.push({animation:M})}let C=!!S.length;return d&&(x.initial===!1||x.initial===x.animate)&&!o.manuallyAnimateOnMount&&(C=!1),d=!1,C?l(S):Promise.resolve()}function g(v,x){var S;if(u[v].isActive===x)return Promise.resolve();(S=o.variantChildren)==null||S.forEach(E=>{var w;return(w=E.animationState)==null?void 0:w.setActive(v,x)}),u[v].isActive=x;const b=m(v);for(const E in u)u[E].protectedKeys={};return b}return{animateChanges:m,setActive:g,setAnimateFunction:h,getState:()=>u,reset:()=>{u=createState(),d=!0}}}function checkVariantsDidChange(o,l){return typeof l=="string"?l!==o:Array.isArray(l)?!shallowCompare(l,o):!1}function createTypeState(o=!1){return{isActive:o,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class Feature{constructor(l){this.isMounted=!1,this.node=l}update(){}}class AnimationFeature extends Feature{constructor(l){super(l),l.animationState||(l.animationState=createAnimationState(l))}updateAnimationControlsSubscription(){const{animate:l}=this.node.getProps();isAnimationControls(l)&&(this.unmountControls=l.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:l}=this.node.getProps(),{animate:u}=this.node.prevProps||{};l!==u&&this.updateAnimationControlsSubscription()}unmount(){var l;this.node.animationState.reset(),(l=this.unmountControls)==null||l.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:l,onExitComplete:u}=this.node.presenceContext,{isPresent:d}=this.node.prevPresenceContext||{};if(!this.node.animationState||l===d)return;const f=this.node.animationState.setActive("exit",!l);u&&!l&&f.then(()=>{u(this.id)})}mount(){const{register:l,onExitComplete:u}=this.node.presenceContext||{};u&&u(this.id),l&&(this.unmount=l(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}};function addDomEvent(o,l,u,d={passive:!0}){return o.addEventListener(l,u,d),()=>o.removeEventListener(l,u)}function extractEventInfo(o){return{point:{x:o.pageX,y:o.pageY}}}const addPointerInfo=o=>l=>isPrimaryPointer(l)&&o(l,extractEventInfo(l));function addPointerEvent(o,l,u,d){return addDomEvent(o,l,addPointerInfo(u),d)}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(o){return o.max-o.min}function isNear(o,l,u){return Math.abs(o-l)<=u}function calcAxisDelta(o,l,u,d=.5){o.origin=d,o.originPoint=mixNumber$1(l.min,l.max,o.origin),o.scale=calcLength(u)/calcLength(l),o.translate=mixNumber$1(u.min,u.max,o.origin)-o.originPoint,(o.scale>=SCALE_MIN&&o.scale<=SCALE_MAX||isNaN(o.scale))&&(o.scale=1),(o.translate>=TRANSLATE_MIN&&o.translate<=TRANSLATE_MAX||isNaN(o.translate))&&(o.translate=0)}function calcBoxDelta(o,l,u,d){calcAxisDelta(o.x,l.x,u.x,d?d.originX:void 0),calcAxisDelta(o.y,l.y,u.y,d?d.originY:void 0)}function calcRelativeAxis(o,l,u){o.min=u.min+l.min,o.max=o.min+calcLength(l)}function calcRelativeBox(o,l,u){calcRelativeAxis(o.x,l.x,u.x),calcRelativeAxis(o.y,l.y,u.y)}function calcRelativeAxisPosition(o,l,u){o.min=l.min-u.min,o.max=o.min+calcLength(l)}function calcRelativePosition(o,l,u){calcRelativeAxisPosition(o.x,l.x,u.x),calcRelativeAxisPosition(o.y,l.y,u.y)}function eachAxis(o){return[o("x"),o("y")]}const getContextWindow=({current:o})=>o?o.ownerDocument.defaultView:null,distance=(o,l)=>Math.abs(o-l);function distance2D(o,l){const u=distance(o.x,l.x),d=distance(o.y,l.y);return Math.sqrt(u**2+d**2)}class PanSession{constructor(l,u,{transformPagePoint:d,contextWindow:f=window,dragSnapToOrigin:h=!1,distanceThreshold:m=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=getPanInfo(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,T=distance2D(E.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!T)return;const{point:C}=E,{timestamp:M}=frameData;this.history.push({...C,timestamp:M});const{onStart:A,onMove:k}=this.handlers;w||(A&&A(this.lastMoveEvent,E),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,E)},this.handlePointerMove=(E,w)=>{this.lastMoveEvent=E,this.lastMoveEventInfo=transformPoint(w,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(E,w)=>{this.end();const{onEnd:T,onSessionEnd:C,resumeAnimation:M}=this.handlers;if(this.dragSnapToOrigin&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=getPanInfo(E.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(w,this.transformPagePoint),this.history);this.startEvent&&T&&T(E,A),C&&C(E,A)},!isPrimaryPointer(l))return;this.dragSnapToOrigin=h,this.handlers=u,this.transformPagePoint=d,this.distanceThreshold=m,this.contextWindow=f||window;const g=extractEventInfo(l),v=transformPoint(g,this.transformPagePoint),{point:x}=v,{timestamp:b}=frameData;this.history=[{...x,timestamp:b}];const{onSessionStart:S}=u;S&&S(l,getPanInfo(v,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(l){this.handlers=l}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(o,l){return l?{point:l(o.point)}:o}function subtractPoint(o,l){return{x:o.x-l.x,y:o.y-l.y}}function getPanInfo({point:o},l){return{point:o,delta:subtractPoint(o,lastDevicePoint(l)),offset:subtractPoint(o,startDevicePoint(l)),velocity:getVelocity(l,.1)}}function startDevicePoint(o){return o[0]}function lastDevicePoint(o){return o[o.length-1]}function getVelocity(o,l){if(o.length<2)return{x:0,y:0};let u=o.length-1,d=null;const f=lastDevicePoint(o);for(;u>=0&&(d=o[u],!(f.timestamp-d.timestamp>secondsToMilliseconds(l)));)u--;if(!d)return{x:0,y:0};const h=millisecondsToSeconds(f.timestamp-d.timestamp);if(h===0)return{x:0,y:0};const m={x:(f.x-d.x)/h,y:(f.y-d.y)/h};return m.x===1/0&&(m.x=0),m.y===1/0&&(m.y=0),m}function applyConstraints(o,{min:l,max:u},d){return l!==void 0&&o<l?o=d?mixNumber$1(l,o,d.min):Math.max(o,l):u!==void 0&&o>u&&(o=d?mixNumber$1(u,o,d.max):Math.min(o,u)),o}function calcRelativeAxisConstraints(o,l,u){return{min:l!==void 0?o.min+l:void 0,max:u!==void 0?o.max+u-(o.max-o.min):void 0}}function calcRelativeConstraints(o,{top:l,left:u,bottom:d,right:f}){return{x:calcRelativeAxisConstraints(o.x,u,f),y:calcRelativeAxisConstraints(o.y,l,d)}}function calcViewportAxisConstraints(o,l){let u=l.min-o.min,d=l.max-o.max;return l.max-l.min<o.max-o.min&&([u,d]=[d,u]),{min:u,max:d}}function calcViewportConstraints(o,l){return{x:calcViewportAxisConstraints(o.x,l.x),y:calcViewportAxisConstraints(o.y,l.y)}}function calcOrigin(o,l){let u=.5;const d=calcLength(o),f=calcLength(l);return f>d?u=progress(l.min,l.max-d,o.min):d>f&&(u=progress(o.min,o.max-f,l.min)),clamp(0,1,u)}function rebaseAxisConstraints(o,l){const u={};return l.min!==void 0&&(u.min=l.min-o.min),l.max!==void 0&&(u.max=l.max-o.min),u}const defaultElastic=.35;function resolveDragElastic(o=defaultElastic){return o===!1?o=0:o===!0&&(o=defaultElastic),{x:resolveAxisElastic(o,"left","right"),y:resolveAxisElastic(o,"top","bottom")}}function resolveAxisElastic(o,l,u){return{min:resolvePointElastic(o,l),max:resolvePointElastic(o,u)}}function resolvePointElastic(o,l){return typeof o=="number"?o:o[l]||0}const elementDragControls=new WeakMap;class VisualElementDragControls{constructor(l){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=l}start(l,{snapToCursor:u=!1,distanceThreshold:d}={}){const{presenceContext:f}=this.visualElement;if(f&&f.isPresent===!1)return;const h=S=>{const{dragSnapToOrigin:E}=this.getProps();E?this.pauseAnimation():this.stopAnimation(),u&&this.snapToCursor(extractEventInfo(S).point)},m=(S,E)=>{const{drag:w,dragPropagation:T,onDragStart:C}=this.getProps();if(w&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=setDragLock(w),!this.openDragLock))return;this.latestPointerEvent=S,this.latestPanInfo=E,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(A=>{let k=this.getAxisMotionValue(A).get()||0;if(percent.test(k)){const{projection:I}=this.visualElement;if(I&&I.layout){const O=I.layout.layoutBox[A];O&&(k=calcLength(O)*(parseFloat(k)/100))}}this.originPoint[A]=k}),C&&frame.postRender(()=>C(S,E)),addValueToWillChange(this.visualElement,"transform");const{animationState:M}=this.visualElement;M&&M.setActive("whileDrag",!0)},g=(S,E)=>{this.latestPointerEvent=S,this.latestPanInfo=E;const{dragPropagation:w,dragDirectionLock:T,onDirectionLock:C,onDrag:M}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:A}=E;if(T&&this.currentDirection===null){this.currentDirection=getCurrentDirection(A),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",E.point,A),this.updateAxis("y",E.point,A),this.visualElement.render(),M&&M(S,E)},v=(S,E)=>{this.latestPointerEvent=S,this.latestPanInfo=E,this.stop(S,E),this.latestPointerEvent=null,this.latestPanInfo=null},x=()=>eachAxis(S=>{var E;return this.getAnimationState(S)==="paused"&&((E=this.getAxisMotionValue(S).animation)==null?void 0:E.play())}),{dragSnapToOrigin:b}=this.getProps();this.panSession=new PanSession(l,{onSessionStart:h,onStart:m,onMove:g,onSessionEnd:v,resumeAnimation:x},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:d,contextWindow:getContextWindow(this.visualElement)})}stop(l,u){const d=l||this.latestPointerEvent,f=u||this.latestPanInfo,h=this.isDragging;if(this.cancel(),!h||!f||!d)return;const{velocity:m}=f;this.startAnimation(m);const{onDragEnd:g}=this.getProps();g&&frame.postRender(()=>g(d,f))}cancel(){this.isDragging=!1;const{projection:l,animationState:u}=this.visualElement;l&&(l.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:d}=this.getProps();!d&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),u&&u.setActive("whileDrag",!1)}updateAxis(l,u,d){const{drag:f}=this.getProps();if(!d||!shouldDrag(l,f,this.currentDirection))return;const h=this.getAxisMotionValue(l);let m=this.originPoint[l]+d[l];this.constraints&&this.constraints[l]&&(m=applyConstraints(m,this.constraints[l],this.elastic[l])),h.set(m)}resolveConstraints(){var h;const{dragConstraints:l,dragElastic:u}=this.getProps(),d=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(h=this.visualElement.projection)==null?void 0:h.layout,f=this.constraints;l&&isRefObject(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&d?this.constraints=calcRelativeConstraints(d.layoutBox,l):this.constraints=!1,this.elastic=resolveDragElastic(u),f!==this.constraints&&d&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(m=>{this.constraints!==!1&&this.getAxisMotionValue(m)&&(this.constraints[m]=rebaseAxisConstraints(d.layoutBox[m],this.constraints[m]))})}resolveRefConstraints(){const{dragConstraints:l,onMeasureDragConstraints:u}=this.getProps();if(!l||!isRefObject(l))return!1;const d=l.current,{projection:f}=this.visualElement;if(!f||!f.layout)return!1;const h=measurePageBox(d,f.root,this.visualElement.getTransformPagePoint());let m=calcViewportConstraints(f.layout.layoutBox,h);if(u){const g=u(convertBoxToBoundingBox(m));this.hasMutatedConstraints=!!g,g&&(m=convertBoundingBoxToBox(g))}return m}startAnimation(l){const{drag:u,dragMomentum:d,dragElastic:f,dragTransition:h,dragSnapToOrigin:m,onDragTransitionEnd:g}=this.getProps(),v=this.constraints||{},x=eachAxis(b=>{if(!shouldDrag(b,u,this.currentDirection))return;let S=v[b]||{};m&&(S={min:0,max:0});const E=f?200:1e6,w=f?40:1e7,T={type:"inertia",velocity:d?l[b]:0,bounceStiffness:E,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(b,T)});return Promise.all(x).then(g)}startAxisValueAnimation(l,u){const d=this.getAxisMotionValue(l);return addValueToWillChange(this.visualElement,l),d.start(animateMotionValue(l,d,0,u,this.visualElement,!1))}stopAnimation(){eachAxis(l=>this.getAxisMotionValue(l).stop())}pauseAnimation(){eachAxis(l=>{var u;return(u=this.getAxisMotionValue(l).animation)==null?void 0:u.pause()})}getAnimationState(l){var u;return(u=this.getAxisMotionValue(l).animation)==null?void 0:u.state}getAxisMotionValue(l){const u=`_drag${l.toUpperCase()}`,d=this.visualElement.getProps(),f=d[u];return f||this.visualElement.getValue(l,(d.initial?d.initial[l]:void 0)||0)}snapToCursor(l){eachAxis(u=>{const{drag:d}=this.getProps();if(!shouldDrag(u,d,this.currentDirection))return;const{projection:f}=this.visualElement,h=this.getAxisMotionValue(u);if(f&&f.layout){const{min:m,max:g}=f.layout.layoutBox[u];h.set(l[u]-mixNumber$1(m,g,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:l,dragConstraints:u}=this.getProps(),{projection:d}=this.visualElement;if(!isRefObject(u)||!d||!this.constraints)return;this.stopAnimation();const f={x:0,y:0};eachAxis(m=>{const g=this.getAxisMotionValue(m);if(g&&this.constraints!==!1){const v=g.get();f[m]=calcOrigin({min:v,max:v},this.constraints[m])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",d.root&&d.root.updateScroll(),d.updateLayout(),this.resolveConstraints(),eachAxis(m=>{if(!shouldDrag(m,l,null))return;const g=this.getAxisMotionValue(m),{min:v,max:x}=this.constraints[m];g.set(mixNumber$1(v,x,f[m]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const l=this.visualElement.current,u=addPointerEvent(l,"pointerdown",v=>{const{drag:x,dragListener:b=!0}=this.getProps();x&&b&&this.start(v)}),d=()=>{const{dragConstraints:v}=this.getProps();isRefObject(v)&&v.current&&(this.constraints=this.resolveRefConstraints())},{projection:f}=this.visualElement,h=f.addEventListener("measure",d);f&&!f.layout&&(f.root&&f.root.updateScroll(),f.updateLayout()),frame.read(d);const m=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),g=f.addEventListener("didUpdate",({delta:v,hasLayoutChanged:x})=>{this.isDragging&&x&&(eachAxis(b=>{const S=this.getAxisMotionValue(b);S&&(this.originPoint[b]+=v[b].translate,S.set(S.get()+v[b].translate))}),this.visualElement.render())});return()=>{m(),u(),h(),g&&g()}}getProps(){const l=this.visualElement.getProps(),{drag:u=!1,dragDirectionLock:d=!1,dragPropagation:f=!1,dragConstraints:h=!1,dragElastic:m=defaultElastic,dragMomentum:g=!0}=l;return{...l,drag:u,dragDirectionLock:d,dragPropagation:f,dragConstraints:h,dragElastic:m,dragMomentum:g}}}function shouldDrag(o,l,u){return(l===!0||l===o)&&(u===null||u===o)}function getCurrentDirection(o,l=10){let u=null;return Math.abs(o.y)>l?u="y":Math.abs(o.x)>l&&(u="x"),u}class DragGesture extends Feature{constructor(l){super(l),this.removeGroupControls=noop$2,this.removeListeners=noop$2,this.controls=new VisualElementDragControls(l)}mount(){const{dragControls:l}=this.node.getProps();l&&(this.removeGroupControls=l.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop$2}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=o=>(l,u)=>{o&&frame.postRender(()=>o(l,u))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop$2}onPointerDown(l){this.session=new PanSession(l,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:l,onPanStart:u,onPan:d,onPanEnd:f}=this.node.getProps();return{onSessionStart:asyncHandler(l),onStart:asyncHandler(u),onMove:d,onEnd:(h,m)=>{delete this.session,f&&frame.postRender(()=>f(h,m))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",l=>this.onPointerDown(l))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(o,l){return l.max===l.min?0:o/(l.max-l.min)*100}const correctBorderRadius={correct:(o,l)=>{if(!l.target)return o;if(typeof o=="string")if(px.test(o))o=parseFloat(o);else return o;const u=pixelsToPercent(o,l.target.x),d=pixelsToPercent(o,l.target.y);return`${u}% ${d}%`}},correctBoxShadow={correct:(o,{treeScale:l,projectionDelta:u})=>{const d=o,f=complex.parse(o);if(f.length>5)return d;const h=complex.createTransformer(o),m=typeof f[0]!="number"?1:0,g=u.x.scale*l.x,v=u.y.scale*l.y;f[0+m]/=g,f[1+m]/=v;const x=mixNumber$1(g,v,.5);return typeof f[2+m]=="number"&&(f[2+m]/=x),typeof f[3+m]=="number"&&(f[3+m]/=x),h(f)}};let hasTakenAnySnapshot=!1;class MeasureLayoutWithContext extends reactExports.Component{componentDidMount(){const{visualElement:l,layoutGroup:u,switchLayoutGroup:d,layoutId:f}=this.props,{projection:h}=l;addScaleCorrector(defaultScaleCorrectors),h&&(u.group&&u.group.add(h),d&&d.register&&f&&d.register(h),hasTakenAnySnapshot&&h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(l){const{layoutDependency:u,visualElement:d,drag:f,isPresent:h}=this.props,{projection:m}=d;return m&&(m.isPresent=h,hasTakenAnySnapshot=!0,f||l.layoutDependency!==u||u===void 0||l.isPresent!==h?m.willUpdate():this.safeToRemove(),l.isPresent!==h&&(h?m.promote():m.relegate()||frame.postRender(()=>{const g=m.getStack();(!g||!g.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:l}=this.props.visualElement;l&&(l.root.didUpdate(),microtask.postRender(()=>{!l.currentAnimation&&l.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:l,layoutGroup:u,switchLayoutGroup:d}=this.props,{projection:f}=l;hasTakenAnySnapshot=!0,f&&(f.scheduleCheckAfterUnmount(),u&&u.group&&u.group.remove(f),d&&d.deregister&&d.deregister(f))}safeToRemove(){const{safeToRemove:l}=this.props;l&&l()}render(){return null}}function MeasureLayout(o){const[l,u]=usePresence(),d=reactExports.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(MeasureLayoutWithContext,{...o,layoutGroup:d,switchLayoutGroup:reactExports.useContext(SwitchLayoutGroupContext),isPresent:l,safeToRemove:u})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow};function animateSingleValue(o,l,u){const d=isMotionValue(o)?o:motionValue(o);return d.start(animateMotionValue("",d,l,u)),d.animation}const compareByDepth=(o,l)=>o.depth-l.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(l){addUniqueItem(this.children,l),this.isDirty=!0}remove(l){removeItem(this.children,l),this.isDirty=!0}forEach(l){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(l)}}function delay$1(o,l){const u=time.now(),d=({timestamp:f})=>{const h=f-u;h>=l&&(cancelFrame(d),o(h-l))};return frame.setup(d,!0),()=>cancelFrame(d)}const borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=o=>typeof o=="string"?parseFloat(o):o,isPx=o=>typeof o=="number"||px.test(o);function mixValues(o,l,u,d,f,h){f?(o.opacity=mixNumber$1(0,u.opacity??1,easeCrossfadeIn(d)),o.opacityExit=mixNumber$1(l.opacity??1,0,easeCrossfadeOut(d))):h&&(o.opacity=mixNumber$1(l.opacity??1,u.opacity??1,d));for(let m=0;m<numBorders;m++){const g=`border${borders[m]}Radius`;let v=getRadius(l,g),x=getRadius(u,g);if(v===void 0&&x===void 0)continue;v||(v=0),x||(x=0),v===0||x===0||isPx(v)===isPx(x)?(o[g]=Math.max(mixNumber$1(asNumber(v),asNumber(x),d),0),(percent.test(x)||percent.test(v))&&(o[g]+="%")):o[g]=x}(l.rotate||u.rotate)&&(o.rotate=mixNumber$1(l.rotate||0,u.rotate||0,d))}function getRadius(o,l){return o[l]!==void 0?o[l]:o.borderRadius}const easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,noop$2);function compress(o,l,u){return d=>d<o?0:d>l?1:u(progress(o,l,d))}function copyAxisInto(o,l){o.min=l.min,o.max=l.max}function copyBoxInto(o,l){copyAxisInto(o.x,l.x),copyAxisInto(o.y,l.y)}function copyAxisDeltaInto(o,l){o.translate=l.translate,o.scale=l.scale,o.originPoint=l.originPoint,o.origin=l.origin}function removePointDelta(o,l,u,d,f){return o-=l,o=scalePoint(o,1/u,d),f!==void 0&&(o=scalePoint(o,1/f,d)),o}function removeAxisDelta(o,l=0,u=1,d=.5,f,h=o,m=o){if(percent.test(l)&&(l=parseFloat(l),l=mixNumber$1(m.min,m.max,l/100)-m.min),typeof l!="number")return;let g=mixNumber$1(h.min,h.max,d);o===h&&(g-=l),o.min=removePointDelta(o.min,l,u,g,f),o.max=removePointDelta(o.max,l,u,g,f)}function removeAxisTransforms(o,l,[u,d,f],h,m){removeAxisDelta(o,l[u],l[d],l[f],l.scale,h,m)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(o,l,u,d){removeAxisTransforms(o.x,l,xKeys,u?u.x:void 0,d?d.x:void 0),removeAxisTransforms(o.y,l,yKeys,u?u.y:void 0,d?d.y:void 0)}function isAxisDeltaZero(o){return o.translate===0&&o.scale===1}function isDeltaZero(o){return isAxisDeltaZero(o.x)&&isAxisDeltaZero(o.y)}function axisEquals(o,l){return o.min===l.min&&o.max===l.max}function boxEquals(o,l){return axisEquals(o.x,l.x)&&axisEquals(o.y,l.y)}function axisEqualsRounded(o,l){return Math.round(o.min)===Math.round(l.min)&&Math.round(o.max)===Math.round(l.max)}function boxEqualsRounded(o,l){return axisEqualsRounded(o.x,l.x)&&axisEqualsRounded(o.y,l.y)}function aspectRatio(o){return calcLength(o.x)/calcLength(o.y)}function axisDeltaEquals(o,l){return o.translate===l.translate&&o.scale===l.scale&&o.originPoint===l.originPoint}class NodeStack{constructor(){this.members=[]}add(l){addUniqueItem(this.members,l),l.scheduleRender()}remove(l){if(removeItem(this.members,l),l===this.prevLead&&(this.prevLead=void 0),l===this.lead){const u=this.members[this.members.length-1];u&&this.promote(u)}}relegate(l){const u=this.members.findIndex(f=>l===f);if(u===0)return!1;let d;for(let f=u;f>=0;f--){const h=this.members[f];if(h.isPresent!==!1){d=h;break}}return d?(this.promote(d),!0):!1}promote(l,u){const d=this.lead;if(l!==d&&(this.prevLead=d,this.lead=l,l.show(),d)){d.instance&&d.scheduleRender(),l.scheduleRender(),l.resumeFrom=d,u&&(l.resumeFrom.preserveOpacity=!0),d.snapshot&&(l.snapshot=d.snapshot,l.snapshot.latestValues=d.animationValues||d.latestValues),l.root&&l.root.isUpdating&&(l.isLayoutDirty=!0);const{crossfade:f}=l.options;f===!1&&d.hide()}}exitAnimationComplete(){this.members.forEach(l=>{const{options:u,resumingFrom:d}=l;u.onExitComplete&&u.onExitComplete(),d&&d.options.onExitComplete&&d.options.onExitComplete()})}scheduleRender(){this.members.forEach(l=>{l.instance&&l.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(o,l,u){let d="";const f=o.x.translate/l.x,h=o.y.translate/l.y,m=(u==null?void 0:u.z)||0;if((f||h||m)&&(d=`translate3d(${f}px, ${h}px, ${m}px) `),(l.x!==1||l.y!==1)&&(d+=`scale(${1/l.x}, ${1/l.y}) `),u){const{transformPerspective:x,rotate:b,rotateX:S,rotateY:E,skewX:w,skewY:T}=u;x&&(d=`perspective(${x}px) ${d}`),b&&(d+=`rotate(${b}deg) `),S&&(d+=`rotateX(${S}deg) `),E&&(d+=`rotateY(${E}deg) `),w&&(d+=`skewX(${w}deg) `),T&&(d+=`skewY(${T}deg) `)}const g=o.x.scale*l.x,v=o.y.scale*l.y;return(g!==1||v!==1)&&(d+=`scale(${g}, ${v})`),d||"none"}const transformAxes=["","X","Y","Z"],animationTarget=1e3;let id=0;function resetDistortingTransform(o,l,u,d){const{latestValues:f}=l;f[o]&&(u[o]=f[o],l.setStaticValue(o,0),d&&(d[o]=0))}function cancelTreeOptimisedTransformAnimations(o){if(o.hasCheckedOptimisedAppear=!0,o.root===o)return;const{visualElement:l}=o.options;if(!l)return;const u=getOptimisedAppearId(l);if(window.MotionHasOptimisedAnimation(u,"transform")){const{layout:f,layoutId:h}=o.options;window.MotionCancelOptimisedAnimation(u,"transform",frame,!(f||h))}const{parent:d}=o;d&&!d.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(d)}function createProjectionNode({attachResizeListener:o,defaultParent:l,measureScroll:u,checkIsScrollRoot:d,resetTransform:f}){return class{constructor(m={},g=l==null?void 0:l()){this.id=id++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=m,this.root=g?g.root||g:this,this.path=g?[...g.path,g]:[],this.parent=g,this.depth=g?g.depth+1:0;for(let v=0;v<this.path.length;v++)this.path[v].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(m,g){return this.eventHandlers.has(m)||this.eventHandlers.set(m,new SubscriptionManager),this.eventHandlers.get(m).add(g)}notifyListeners(m,...g){const v=this.eventHandlers.get(m);v&&v.notify(...g)}hasListeners(m){return this.eventHandlers.has(m)}mount(m){if(this.instance)return;this.isSVG=isSVGElement(m)&&!isSVGSVGElement(m),this.instance=m;const{layoutId:g,layout:v,visualElement:x}=this.options;if(x&&!x.current&&x.mount(m),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(v||g)&&(this.isLayoutDirty=!0),o){let b,S=0;const E=()=>this.root.updateBlockedByResize=!1;frame.read(()=>{S=window.innerWidth}),o(m,()=>{const w=window.innerWidth;w!==S&&(S=w,this.root.updateBlockedByResize=!0,b&&b(),b=delay$1(E,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation)))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&x&&(g||v)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:S,hasRelativeLayoutChanged:E,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const T=this.options.transition||x.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:C,onLayoutAnimationComplete:M}=x.getProps(),A=!this.targetLayout||!boxEqualsRounded(this.targetLayout,w),k=!S&&E;if(this.options.layoutRoot||this.resumeFrom||k||S&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const I={...getValueTransition$1(T,"layout"),onPlay:C,onComplete:M};(x.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I),this.setAnimationOrigin(b,k)}else S||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const m=this.getStack();m&&m.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:m}=this.options;return m&&m.getProps().transformTemplate}willUpdate(m=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:g,layout:v}=this.options;if(g===void 0&&!v)return;const x=this.getTransformTemplate();this.prevTransformTemplateValue=x?x(this.latestValues,""):void 0,this.updateSnapshot(),m&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(clearIsLayoutDirty);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate)):this.nodes.forEach(clearIsLayoutDirty),this.clearAllSnapshots();const g=time.now();frameData.delta=clamp(0,1e3/60,g-frameData.timestamp),frameData.timestamp=g,frameData.isProcessing=!0,frameSteps.update.process(frameData),frameSteps.preRender.process(frameData),frameSteps.render.process(frameData),frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!calcLength(this.snapshot.measuredBox.x)&&!calcLength(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let v=0;v<this.path.length;v++)this.path[v].updateScroll();const m=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:g}=this.options;g&&g.notify("LayoutMeasure",this.layout.layoutBox,m?m.layoutBox:void 0)}updateScroll(m="measure"){let g=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===m&&(g=!1),g&&this.instance){const v=d(this.instance);this.scroll={animationId:this.root.animationId,phase:m,isRoot:v,offset:u(this.instance),wasRoot:this.scroll?this.scroll.isRoot:v}}}resetTransform(){if(!f)return;const m=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,g=this.projectionDelta&&!isDeltaZero(this.projectionDelta),v=this.getTransformTemplate(),x=v?v(this.latestValues,""):void 0,b=x!==this.prevTransformTemplateValue;m&&this.instance&&(g||hasTransform(this.latestValues)||b)&&(f(this.instance,x),this.shouldResetTransform=!1,this.scheduleRender())}measure(m=!0){const g=this.measurePageBox();let v=this.removeElementScroll(g);return m&&(v=this.removeTransform(v)),roundBox(v),{animationId:this.root.animationId,measuredBox:g,layoutBox:v,latestValues:{},source:this.id}}measurePageBox(){var x;const{visualElement:m}=this.options;if(!m)return createBox();const g=m.measureViewportBox();if(!(((x=this.scroll)==null?void 0:x.wasRoot)||this.path.some(checkNodeWasScrollRoot))){const{scroll:b}=this.root;b&&(translateAxis(g.x,b.offset.x),translateAxis(g.y,b.offset.y))}return g}removeElementScroll(m){var v;const g=createBox();if(copyBoxInto(g,m),(v=this.scroll)!=null&&v.wasRoot)return g;for(let x=0;x<this.path.length;x++){const b=this.path[x],{scroll:S,options:E}=b;b!==this.root&&S&&E.layoutScroll&&(S.wasRoot&&copyBoxInto(g,m),translateAxis(g.x,S.offset.x),translateAxis(g.y,S.offset.y))}return g}applyTransform(m,g=!1){const v=createBox();copyBoxInto(v,m);for(let x=0;x<this.path.length;x++){const b=this.path[x];!g&&b.options.layoutScroll&&b.scroll&&b!==b.root&&transformBox(v,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),hasTransform(b.latestValues)&&transformBox(v,b.latestValues)}return hasTransform(this.latestValues)&&transformBox(v,this.latestValues),v}removeTransform(m){const g=createBox();copyBoxInto(g,m);for(let v=0;v<this.path.length;v++){const x=this.path[v];if(!x.instance||!hasTransform(x.latestValues))continue;hasScale(x.latestValues)&&x.updateSnapshot();const b=createBox(),S=x.measurePageBox();copyBoxInto(b,S),removeBoxTransforms(g,x.latestValues,x.snapshot?x.snapshot.layoutBox:void 0,b)}return hasTransform(this.latestValues)&&removeBoxTransforms(g,this.latestValues),g}setTargetDelta(m){this.targetDelta=m,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(m){this.options={...this.options,...m,crossfade:m.crossfade!==void 0?m.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(m=!1){var E;const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const v=!!this.resumingFrom||this!==g;if(!(m||v&&this.isSharedProjectionDirty||this.isProjectionDirty||(E=this.parent)!=null&&E.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:S}=this.options;if(!(!this.layout||!(b||S))){if(this.resolvedRelativeTargetAt=frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const w=this.getClosestProjectingParent();w&&w.layout&&this.animationProgress!==1?(this.relativeParent=w,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,w.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const w=this.getClosestProjectingParent();w&&!!w.resumingFrom==!!this.resumingFrom&&!w.options.layoutScroll&&w.target&&this.animationProgress!==1?(this.relativeParent=w,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,w.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var T;const m=this.getLead(),g=!!this.resumingFrom||this!==m;let v=!0;if((this.isProjectionDirty||(T=this.parent)!=null&&T.isProjectionDirty)&&(v=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(v=!1),this.resolvedRelativeTargetAt===frameData.timestamp&&(v=!1),v)return;const{layout:x,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(x||b))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const S=this.treeScale.x,E=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,g),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=createBox());const{target:w}=m;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==S||this.treeScale.y!==E||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(m=!0){var g;if((g=this.options.visualElement)==null||g.scheduleRender(),m){const v=this.getStack();v&&v.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(m,g=!1){const v=this.snapshot,x=v?v.latestValues:{},b={...this.latestValues},S=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!g;const E=createBox(),w=v?v.source:void 0,T=this.layout?this.layout.source:void 0,C=w!==T,M=this.getStack(),A=!M||M.members.length<=1,k=!!(C&&!A&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let I;this.mixTargetDelta=O=>{const j=O/1e3;mixAxisDelta(S.x,m.x,j),mixAxisDelta(S.y,m.y,j),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(E,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,E,j),I&&boxEquals(this.relativeTarget,I)&&(this.isProjectionDirty=!1),I||(I=createBox()),copyBoxInto(I,this.relativeTarget)),C&&(this.animationValues=b,mixValues(b,x,this.latestValues,j,k,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(m){var g,v,x;this.notifyListeners("animationStart"),(g=this.currentAnimation)==null||g.stop(),(x=(v=this.resumingFrom)==null?void 0:v.currentAnimation)==null||x.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=motionValue(0)),this.currentAnimation=animateSingleValue(this.motionValue,[0,1e3],{...m,velocity:0,isSync:!0,onUpdate:b=>{this.mixTargetDelta(b),m.onUpdate&&m.onUpdate(b)},onStop:()=>{},onComplete:()=>{m.onComplete&&m.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const m=this.getStack();m&&m.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const m=this.getLead();let{targetWithTransforms:g,target:v,layout:x,latestValues:b}=m;if(!(!g||!v||!x)){if(this!==m&&this.layout&&x&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,x.layoutBox)){v=this.target||createBox();const S=calcLength(this.layout.layoutBox.x);v.x.min=m.target.x.min,v.x.max=v.x.min+S;const E=calcLength(this.layout.layoutBox.y);v.y.min=m.target.y.min,v.y.max=v.y.min+E}copyBoxInto(g,v),transformBox(g,b),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,g,b)}}registerSharedNode(m,g){this.sharedNodes.has(m)||this.sharedNodes.set(m,new NodeStack),this.sharedNodes.get(m).add(g);const x=g.options.initialPromotionConfig;g.promote({transition:x?x.transition:void 0,preserveFollowOpacity:x&&x.shouldPreserveFollowOpacity?x.shouldPreserveFollowOpacity(g):void 0})}isLead(){const m=this.getStack();return m?m.lead===this:!0}getLead(){var g;const{layoutId:m}=this.options;return m?((g=this.getStack())==null?void 0:g.lead)||this:this}getPrevLead(){var g;const{layoutId:m}=this.options;return m?(g=this.getStack())==null?void 0:g.prevLead:void 0}getStack(){const{layoutId:m}=this.options;if(m)return this.root.sharedNodes.get(m)}promote({needsReset:m,transition:g,preserveFollowOpacity:v}={}){const x=this.getStack();x&&x.promote(this,v),m&&(this.projectionDelta=void 0,this.needsReset=!0),g&&this.setOptions({transition:g})}relegate(){const m=this.getStack();return m?m.relegate(this):!1}resetSkewAndRotation(){const{visualElement:m}=this.options;if(!m)return;let g=!1;const{latestValues:v}=m;if((v.z||v.rotate||v.rotateX||v.rotateY||v.rotateZ||v.skewX||v.skewY)&&(g=!0),!g)return;const x={};v.z&&resetDistortingTransform("z",m,x,this.animationValues);for(let b=0;b<transformAxes.length;b++)resetDistortingTransform(`rotate${transformAxes[b]}`,m,x,this.animationValues),resetDistortingTransform(`skew${transformAxes[b]}`,m,x,this.animationValues);m.render();for(const b in x)m.setStaticValue(b,x[b]),this.animationValues&&(this.animationValues[b]=x[b]);m.scheduleRender()}applyProjectionStyles(m,g){if(!this.instance||this.isSVG)return;if(!this.isVisible){m.visibility="hidden";return}const v=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,m.visibility="",m.opacity="",m.pointerEvents=resolveMotionValue(g==null?void 0:g.pointerEvents)||"",m.transform=v?v(this.latestValues,""):"none";return}const x=this.getLead();if(!this.projectionDelta||!this.layout||!x.target){this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=resolveMotionValue(g==null?void 0:g.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(m.transform=v?v({},""):"none",this.hasProjected=!1);return}m.visibility="";const b=x.animationValues||x.latestValues;this.applyTransformsToTarget();let S=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,b);v&&(S=v(b,S)),m.transform=S;const{x:E,y:w}=this.projectionDelta;m.transformOrigin=`${E.origin*100}% ${w.origin*100}% 0`,x.animationValues?m.opacity=x===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:m.opacity=x===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const T in scaleCorrectors){if(b[T]===void 0)continue;const{correct:C,applyTo:M,isCSSVariable:A}=scaleCorrectors[T],k=S==="none"?b[T]:C(b[T],x);if(M){const I=M.length;for(let O=0;O<I;O++)m[M[O]]=k}else A?this.options.visualElement.renderState.vars[T]=k:m[T]=k}this.options.layoutId&&(m.pointerEvents=x===this?resolveMotionValue(g==null?void 0:g.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(m=>{var g;return(g=m.currentAnimation)==null?void 0:g.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(o){o.updateLayout()}function notifyLayoutUpdate(o){var u;const l=((u=o.resumeFrom)==null?void 0:u.snapshot)||o.snapshot;if(o.isLead()&&o.layout&&l&&o.hasListeners("didUpdate")){const{layoutBox:d,measuredBox:f}=o.layout,{animationType:h}=o.options,m=l.source!==o.layout.source;h==="size"?eachAxis(S=>{const E=m?l.measuredBox[S]:l.layoutBox[S],w=calcLength(E);E.min=d[S].min,E.max=E.min+w}):shouldAnimatePositionOnly(h,l.layoutBox,d)&&eachAxis(S=>{const E=m?l.measuredBox[S]:l.layoutBox[S],w=calcLength(d[S]);E.max=E.min+w,o.relativeTarget&&!o.currentAnimation&&(o.isProjectionDirty=!0,o.relativeTarget[S].max=o.relativeTarget[S].min+w)});const g=createDelta();calcBoxDelta(g,d,l.layoutBox);const v=createDelta();m?calcBoxDelta(v,o.applyTransform(f,!0),l.measuredBox):calcBoxDelta(v,d,l.layoutBox);const x=!isDeltaZero(g);let b=!1;if(!o.resumeFrom){const S=o.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:E,layout:w}=S;if(E&&w){const T=createBox();calcRelativePosition(T,l.layoutBox,E.layoutBox);const C=createBox();calcRelativePosition(C,d,w.layoutBox),boxEqualsRounded(T,C)||(b=!0),S.options.layoutRoot&&(o.relativeTarget=C,o.relativeTargetOrigin=T,o.relativeParent=S)}}}o.notifyListeners("didUpdate",{layout:d,snapshot:l,delta:v,layoutDelta:g,hasLayoutChanged:x,hasRelativeLayoutChanged:b})}else if(o.isLead()){const{onExitComplete:d}=o.options;d&&d()}o.options.transition=void 0}function propagateDirtyNodes(o){o.parent&&(o.isProjecting()||(o.isProjectionDirty=o.parent.isProjectionDirty),o.isSharedProjectionDirty||(o.isSharedProjectionDirty=!!(o.isProjectionDirty||o.parent.isProjectionDirty||o.parent.isSharedProjectionDirty)),o.isTransformDirty||(o.isTransformDirty=o.parent.isTransformDirty))}function cleanDirtyNodes(o){o.isProjectionDirty=o.isSharedProjectionDirty=o.isTransformDirty=!1}function clearSnapshot(o){o.clearSnapshot()}function clearMeasurements(o){o.clearMeasurements()}function clearIsLayoutDirty(o){o.isLayoutDirty=!1}function resetTransformStyle(o){const{visualElement:l}=o.options;l&&l.getProps().onBeforeLayoutMeasure&&l.notify("BeforeLayoutMeasure"),o.resetTransform()}function finishAnimation(o){o.finishAnimation(),o.targetDelta=o.relativeTarget=o.target=void 0,o.isProjectionDirty=!0}function resolveTargetDelta(o){o.resolveTargetDelta()}function calcProjection(o){o.calcProjection()}function resetSkewAndRotation(o){o.resetSkewAndRotation()}function removeLeadSnapshots(o){o.removeLeadSnapshot()}function mixAxisDelta(o,l,u){o.translate=mixNumber$1(l.translate,0,u),o.scale=mixNumber$1(l.scale,1,u),o.origin=l.origin,o.originPoint=l.originPoint}function mixAxis(o,l,u,d){o.min=mixNumber$1(l.min,u.min,d),o.max=mixNumber$1(l.max,u.max,d)}function mixBox(o,l,u,d){mixAxis(o.x,l.x,u.x,d),mixAxis(o.y,l.y,u.y,d)}function hasOpacityCrossfade(o){return o.animationValues&&o.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=o=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(o),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop$2;function roundAxis(o){o.min=roundPoint(o.min),o.max=roundPoint(o.max)}function roundBox(o){roundAxis(o.x),roundAxis(o.y)}function shouldAnimatePositionOnly(o,l,u){return o==="position"||o==="preserve-aspect"&&!isNear(aspectRatio(l),aspectRatio(u),.2)}function checkNodeWasScrollRoot(o){var l;return o!==o.root&&((l=o.scroll)==null?void 0:l.wasRoot)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(o,l)=>addDomEvent(o,"resize",l),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:o=>({x:o.scrollLeft,y:o.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const o=new DocumentProjectionNode({});o.mount(window),o.setOptions({layoutScroll:!0}),rootProjectionNode.current=o}return rootProjectionNode.current},resetTransform:(o,l)=>{o.style.transform=l!==void 0?l:"none"},checkIsScrollRoot:o=>window.getComputedStyle(o).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}};function handleHoverEvent(o,l,u){const{props:d}=o;o.animationState&&d.whileHover&&o.animationState.setActive("whileHover",u==="Start");const f="onHover"+u,h=d[f];h&&frame.postRender(()=>h(l,extractEventInfo(l)))}class HoverGesture extends Feature{mount(){const{current:l}=this.node;l&&(this.unmount=hover(l,(u,d)=>(handleHoverEvent(this.node,d,"Start"),f=>handleHoverEvent(this.node,f,"End"))))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let l=!1;try{l=this.node.current.matches(":focus-visible")}catch{l=!0}!l||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function handlePressEvent(o,l,u){const{props:d}=o;if(o.current instanceof HTMLButtonElement&&o.current.disabled)return;o.animationState&&d.whileTap&&o.animationState.setActive("whileTap",u==="Start");const f="onTap"+(u==="End"?"":u),h=d[f];h&&frame.postRender(()=>h(l,extractEventInfo(l)))}class PressGesture extends Feature{mount(){const{current:l}=this.node;l&&(this.unmount=press(l,(u,d)=>(handlePressEvent(this.node,d,"Start"),(f,{success:h})=>handlePressEvent(this.node,f,h?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=o=>{const l=observerCallbacks.get(o.target);l&&l(o)},fireAllObserverCallbacks=o=>{o.forEach(fireObserverCallback)};function initIntersectionObserver({root:o,...l}){const u=o||document;observers.has(u)||observers.set(u,{});const d=observers.get(u),f=JSON.stringify(l);return d[f]||(d[f]=new IntersectionObserver(fireAllObserverCallbacks,{root:o,...l})),d[f]}function observeIntersection(o,l,u){const d=initIntersectionObserver(l);return observerCallbacks.set(o,u),d.observe(o),()=>{observerCallbacks.delete(o),d.unobserve(o)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:l={}}=this.node.getProps(),{root:u,margin:d,amount:f="some",once:h}=l,m={root:u?u.current:void 0,rootMargin:d,threshold:typeof f=="number"?f:thresholdNames[f]},g=v=>{const{isIntersecting:x}=v;if(this.isInView===x||(this.isInView=x,h&&!x&&this.hasEnteredView))return;x&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",x);const{onViewportEnter:b,onViewportLeave:S}=this.node.getProps(),E=x?b:S;E&&E(v)};return observeIntersection(this.node.current,m,g)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:l,prevProps:u}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(l,u))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:o={}},{viewport:l={}}={}){return u=>o[u]!==l[u]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},featureBundle={...animations,...gestureAnimations,...drag,...layout},motion=createMotionProxy(featureBundle,createDomVisualElement);function useUnmountEffect(o){return reactExports.useEffect(()=>()=>o(),[])}function useMotionValue(o){const l=useConstant(()=>motionValue(o)),{isStatic:u}=reactExports.useContext(MotionConfigContext);if(u){const[,d]=reactExports.useState(o);reactExports.useEffect(()=>l.on("change",d),[])}return l}function isDOMKeyframes(o){return typeof o=="object"&&!Array.isArray(o)}function resolveSubjects(o,l,u,d){return typeof o=="string"&&isDOMKeyframes(l)?resolveElements(o,u,d):o instanceof NodeList?Array.from(o):Array.isArray(o)?o:[o]}function calculateRepeatDuration(o,l,u){return o*(l+1)}function calcNextTime(o,l,u,d){return typeof l=="number"?l:l.startsWith("-")||l.startsWith("+")?Math.max(0,o+parseFloat(l)):l==="<"?u:l.startsWith("<")?Math.max(0,u+parseFloat(l.slice(1))):d.get(l)??o}function eraseKeyframes(o,l,u){for(let d=0;d<o.length;d++){const f=o[d];f.at>l&&f.at<u&&(removeItem(o,f),d--)}}function addKeyframes(o,l,u,d,f,h){eraseKeyframes(o,f,h);for(let m=0;m<l.length;m++)o.push({value:l[m],at:mixNumber$1(f,h,d[m]),easing:getEasingForSegment(u,m)})}function normalizeTimes(o,l){for(let u=0;u<o.length;u++)o[u]=o[u]/(l+1)}function compareByTime(o,l){return o.at===l.at?o.value===null?1:l.value===null?-1:0:o.at-l.at}const defaultSegmentEasing="easeInOut";function createAnimationsFromSequence(o,{defaultTransition:l={},...u}={},d,f){const h=l.duration||.3,m=new Map,g=new Map,v={},x=new Map;let b=0,S=0,E=0;for(let w=0;w<o.length;w++){const T=o[w];if(typeof T=="string"){x.set(T,S);continue}else if(!Array.isArray(T)){x.set(T.name,calcNextTime(S,T.at,b,x));continue}let[C,M,A={}]=T;A.at!==void 0&&(S=calcNextTime(S,A.at,b,x));let k=0;const I=(O,j,N,V=0,z=0)=>{const W=keyframesAsList(O),{delay:X=0,times:ie=defaultOffset(W),type:oe="keyframes",repeat:le,repeatType:Q,repeatDelay:K=0,...$}=j;let{ease:G=l.ease||"easeOut",duration:L}=j;const B=typeof X=="function"?X(V,z):X,q=W.length,U=isGenerator(oe)?oe:f==null?void 0:f[oe||"keyframes"];if(q<=2&&U){let ue=100;if(q===2&&isNumberKeyframesArray(W)){const ee=W[1]-W[0];ue=Math.abs(ee)}const ve={...$};L!==void 0&&(ve.duration=secondsToMilliseconds(L));const fe=createGeneratorEasing(ve,ue,U);G=fe.ease,L=fe.duration}L??(L=h);const Y=S+B;ie.length===1&&ie[0]===0&&(ie[1]=1);const te=ie.length-W.length;if(te>0&&fillOffset(ie,te),W.length===1&&W.unshift(null),le){L=calculateRepeatDuration(L,le);const ue=[...W],ve=[...ie];G=Array.isArray(G)?[...G]:[G];const fe=[...G];for(let ee=0;ee<le;ee++){W.push(...ue);for(let de=0;de<ue.length;de++)ie.push(ve[de]+(ee+1)),G.push(de===0?"linear":getEasingForSegment(fe,de-1))}normalizeTimes(ie,le)}const ae=Y+L;addKeyframes(N,W,G,ie,Y,ae),k=Math.max(B+L,k),E=Math.max(ae,E)};if(isMotionValue(C)){const O=getSubjectSequence(C,g);I(M,A,getValueSequence("default",O))}else{const O=resolveSubjects(C,M,d,v),j=O.length;for(let N=0;N<j;N++){M=M,A=A;const V=O[N],z=getSubjectSequence(V,g);for(const W in M)I(M[W],getValueTransition(A,W),getValueSequence(W,z),N,j)}}b=S,S+=k}return g.forEach((w,T)=>{for(const C in w){const M=w[C];M.sort(compareByTime);const A=[],k=[],I=[];for(let j=0;j<M.length;j++){const{at:N,value:V,easing:z}=M[j];A.push(V),k.push(progress(0,E,N)),I.push(z||"easeOut")}k[0]!==0&&(k.unshift(0),A.unshift(A[0]),I.unshift(defaultSegmentEasing)),k[k.length-1]!==1&&(k.push(1),A.push(null)),m.has(T)||m.set(T,{keyframes:{},transition:{}});const O=m.get(T);O.keyframes[C]=A,O.transition[C]={...l,duration:E,ease:I,times:k,...u}}}),m}function getSubjectSequence(o,l){return!l.has(o)&&l.set(o,{}),l.get(o)}function getValueSequence(o,l){return l[o]||(l[o]=[]),l[o]}function keyframesAsList(o){return Array.isArray(o)?o:[o]}function getValueTransition(o,l){return o&&o[l]?{...o,...o[l]}:{...o}}const isNumber$2=o=>typeof o=="number",isNumberKeyframesArray=o=>o.every(isNumber$2);function isObjectKey(o,l){return o in l}class ObjectVisualElement extends VisualElement{constructor(){super(...arguments),this.type="object"}readValueFromInstance(l,u){if(isObjectKey(u,l)){const d=l[u];if(typeof d=="string"||typeof d=="number")return d}}getBaseTargetFromProps(){}removeValueFromRenderState(l,u){delete u.output[l]}measureInstanceViewportBox(){return createBox()}build(l,u){Object.assign(l.output,u)}renderInstance(l,{output:u}){Object.assign(l,u)}sortInstanceNodePosition(){return 0}}function createDOMVisualElement(o){const l={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},u=isSVGElement(o)&&!isSVGSVGElement(o)?new SVGVisualElement(l):new HTMLVisualElement(l);u.mount(o),visualElementStore.set(o,u)}function createObjectVisualElement(o){const l={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},u=new ObjectVisualElement(l);u.mount(o),visualElementStore.set(o,u)}function isSingleValue(o,l){return isMotionValue(o)||typeof o=="number"||typeof o=="string"&&!isDOMKeyframes(l)}function animateSubject(o,l,u,d){const f=[];if(isSingleValue(o,l))f.push(animateSingleValue(o,isDOMKeyframes(l)&&l.default||l,u&&(u.default||u)));else{const h=resolveSubjects(o,l,d),m=h.length;for(let g=0;g<m;g++){const v=h[g],x=v instanceof Element?createDOMVisualElement:createObjectVisualElement;visualElementStore.has(v)||x(v);const b=visualElementStore.get(v),S={...u};"delay"in S&&typeof S.delay=="function"&&(S.delay=S.delay(g,m)),f.push(...animateTarget(b,{...l,transition:S},{}))}}return f}function animateSequence(o,l,u){const d=[];return createAnimationsFromSequence(o,l,u,{spring}).forEach(({keyframes:h,transition:m},g)=>{d.push(...animateSubject(g,h,m))}),d}function isSequence(o){return Array.isArray(o)&&o.some(Array.isArray)}function createScopedAnimate(o){function l(u,d,f){let h=[],m;if(isSequence(u))h=animateSequence(u,d,o);else{const{onComplete:v,...x}=f||{};typeof v=="function"&&(m=v),h=animateSubject(u,d,x,o)}const g=new GroupAnimationWithThen(h);return m&&g.finished.then(m),o&&(o.animations.push(g),g.finished.then(()=>{removeItem(o.animations,g)})),g}return l}function useAnimate(){const o=useConstant(()=>({current:null,animations:[]})),l=useConstant(()=>createScopedAnimate(o));return useUnmountEffect(()=>{o.animations.forEach(u=>u.stop()),o.animations.length=0}),[o,l]}var define_process_env_default$6={NODE_ENV:"production",version:"1.94.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const ASSETS_BASE_URL=define_process_env_default$6.ASSETS_BASE_URL;function assetUrl(o){return`${ASSETS_BASE_URL}/${o}`}const image$1=assetUrl("icon_diamond.webp"),IconBalanceGems=({style:o,...l})=>jsxRuntimeExports.jsx("img",{src:image$1,style:{aspectRatio:"1/1",...o},...l,alt:""});function r(o){var l,u,d="";if(typeof o=="string"||typeof o=="number")d+=o;else if(typeof o=="object")if(Array.isArray(o)){var f=o.length;for(l=0;l<f;l++)o[l]&&(u=r(o[l]))&&(d&&(d+=" "),d+=u)}else for(u in o)o[u]&&(d&&(d+=" "),d+=u);return d}function clsx(){for(var o,l,u=0,d="",f=arguments.length;u<f;u++)(o=arguments[u])&&(l=r(o))&&(d&&(d+=" "),d+=l);return d}const CLASS_PART_SEPARATOR="-",createClassGroupUtils=o=>{const l=createClassMap(o),{conflictingClassGroups:u,conflictingClassGroupModifiers:d}=o;return{getClassGroupId:m=>{const g=m.split(CLASS_PART_SEPARATOR);return g[0]===""&&g.length!==1&&g.shift(),getGroupRecursive(g,l)||getGroupIdForArbitraryProperty(m)},getConflictingClassGroupIds:(m,g)=>{const v=u[m]||[];return g&&d[m]?[...v,...d[m]]:v}}},getGroupRecursive=(o,l)=>{var m;if(o.length===0)return l.classGroupId;const u=o[0],d=l.nextPart.get(u),f=d?getGroupRecursive(o.slice(1),d):void 0;if(f)return f;if(l.validators.length===0)return;const h=o.join(CLASS_PART_SEPARATOR);return(m=l.validators.find(({validator:g})=>g(h)))==null?void 0:m.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=o=>{if(arbitraryPropertyRegex.test(o)){const l=arbitraryPropertyRegex.exec(o)[1],u=l==null?void 0:l.substring(0,l.indexOf(":"));if(u)return"arbitrary.."+u}},createClassMap=o=>{const{theme:l,classGroups:u}=o,d={nextPart:new Map,validators:[]};for(const f in u)processClassesRecursively(u[f],d,f,l);return d},processClassesRecursively=(o,l,u,d)=>{o.forEach(f=>{if(typeof f=="string"){const h=f===""?l:getPart(l,f);h.classGroupId=u;return}if(typeof f=="function"){if(isThemeGetter(f)){processClassesRecursively(f(d),l,u,d);return}l.validators.push({validator:f,classGroupId:u});return}Object.entries(f).forEach(([h,m])=>{processClassesRecursively(m,getPart(l,h),u,d)})})},getPart=(o,l)=>{let u=o;return l.split(CLASS_PART_SEPARATOR).forEach(d=>{u.nextPart.has(d)||u.nextPart.set(d,{nextPart:new Map,validators:[]}),u=u.nextPart.get(d)}),u},isThemeGetter=o=>o.isThemeGetter,createLruCache=o=>{if(o<1)return{get:()=>{},set:()=>{}};let l=0,u=new Map,d=new Map;const f=(h,m)=>{u.set(h,m),l++,l>o&&(l=0,d=u,u=new Map)};return{get(h){let m=u.get(h);if(m!==void 0)return m;if((m=d.get(h))!==void 0)return f(h,m),m},set(h,m){u.has(h)?u.set(h,m):f(h,m)}}},IMPORTANT_MODIFIER="!",MODIFIER_SEPARATOR=":",MODIFIER_SEPARATOR_LENGTH=MODIFIER_SEPARATOR.length,createParseClassName=o=>{const{prefix:l,experimentalParseClassName:u}=o;let d=f=>{const h=[];let m=0,g=0,v=0,x;for(let T=0;T<f.length;T++){let C=f[T];if(m===0&&g===0){if(C===MODIFIER_SEPARATOR){h.push(f.slice(v,T)),v=T+MODIFIER_SEPARATOR_LENGTH;continue}if(C==="/"){x=T;continue}}C==="["?m++:C==="]"?m--:C==="("?g++:C===")"&&g--}const b=h.length===0?f:f.substring(v),S=stripImportantModifier(b),E=S!==b,w=x&&x>v?x-v:void 0;return{modifiers:h,hasImportantModifier:E,baseClassName:S,maybePostfixModifierPosition:w}};if(l){const f=l+MODIFIER_SEPARATOR,h=d;d=m=>m.startsWith(f)?h(m.substring(f.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:m,maybePostfixModifierPosition:void 0}}if(u){const f=d;d=h=>u({className:h,parseClassName:f})}return d},stripImportantModifier=o=>o.endsWith(IMPORTANT_MODIFIER)?o.substring(0,o.length-1):o.startsWith(IMPORTANT_MODIFIER)?o.substring(1):o,createSortModifiers=o=>{const l=Object.fromEntries(o.orderSensitiveModifiers.map(d=>[d,!0]));return d=>{if(d.length<=1)return d;const f=[];let h=[];return d.forEach(m=>{m[0]==="["||l[m]?(f.push(...h.sort(),m),h=[]):h.push(m)}),f.push(...h.sort()),f}},createConfigUtils=o=>({cache:createLruCache(o.cacheSize),parseClassName:createParseClassName(o),sortModifiers:createSortModifiers(o),...createClassGroupUtils(o)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(o,l)=>{const{parseClassName:u,getClassGroupId:d,getConflictingClassGroupIds:f,sortModifiers:h}=l,m=[],g=o.trim().split(SPLIT_CLASSES_REGEX);let v="";for(let x=g.length-1;x>=0;x-=1){const b=g[x],{isExternal:S,modifiers:E,hasImportantModifier:w,baseClassName:T,maybePostfixModifierPosition:C}=u(b);if(S){v=b+(v.length>0?" "+v:v);continue}let M=!!C,A=d(M?T.substring(0,C):T);if(!A){if(!M){v=b+(v.length>0?" "+v:v);continue}if(A=d(T),!A){v=b+(v.length>0?" "+v:v);continue}M=!1}const k=h(E).join(":"),I=w?k+IMPORTANT_MODIFIER:k,O=I+A;if(m.includes(O))continue;m.push(O);const j=f(A,M);for(let N=0;N<j.length;++N){const V=j[N];m.push(I+V)}v=b+(v.length>0?" "+v:v)}return v};function twJoin(){let o=0,l,u,d="";for(;o<arguments.length;)(l=arguments[o++])&&(u=toValue(l))&&(d&&(d+=" "),d+=u);return d}const toValue=o=>{if(typeof o=="string")return o;let l,u="";for(let d=0;d<o.length;d++)o[d]&&(l=toValue(o[d]))&&(u&&(u+=" "),u+=l);return u};function createTailwindMerge(o,...l){let u,d,f,h=m;function m(v){const x=l.reduce((b,S)=>S(b),o());return u=createConfigUtils(x),d=u.cache.get,f=u.cache.set,h=g,g(v)}function g(v){const x=d(v);if(x)return x;const b=mergeClassList(v,u);return f(v,b),b}return function(){return h(twJoin.apply(null,arguments))}}const fromTheme=o=>{const l=u=>u[o]||[];return l.isThemeGetter=!0,l},arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fractionRegex=/^\d+\/\d+$/,tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isFraction=o=>fractionRegex.test(o),isNumber$1=o=>!!o&&!Number.isNaN(Number(o)),isInteger=o=>!!o&&Number.isInteger(Number(o)),isPercent=o=>o.endsWith("%")&&isNumber$1(o.slice(0,-1)),isTshirtSize=o=>tshirtUnitRegex.test(o),isAny=()=>!0,isLengthOnly=o=>lengthUnitRegex.test(o)&&!colorFunctionRegex.test(o),isNever=()=>!1,isShadow=o=>shadowRegex.test(o),isImage=o=>imageRegex.test(o),isAnyNonArbitrary=o=>!isArbitraryValue(o)&&!isArbitraryVariable(o),isArbitrarySize=o=>getIsArbitraryValue(o,isLabelSize,isNever),isArbitraryValue=o=>arbitraryValueRegex.test(o),isArbitraryLength=o=>getIsArbitraryValue(o,isLabelLength,isLengthOnly),isArbitraryNumber=o=>getIsArbitraryValue(o,isLabelNumber,isNumber$1),isArbitraryPosition=o=>getIsArbitraryValue(o,isLabelPosition,isNever),isArbitraryImage=o=>getIsArbitraryValue(o,isLabelImage,isImage),isArbitraryShadow=o=>getIsArbitraryValue(o,isLabelShadow,isShadow),isArbitraryVariable=o=>arbitraryVariableRegex.test(o),isArbitraryVariableLength=o=>getIsArbitraryVariable(o,isLabelLength),isArbitraryVariableFamilyName=o=>getIsArbitraryVariable(o,isLabelFamilyName),isArbitraryVariablePosition=o=>getIsArbitraryVariable(o,isLabelPosition),isArbitraryVariableSize=o=>getIsArbitraryVariable(o,isLabelSize),isArbitraryVariableImage=o=>getIsArbitraryVariable(o,isLabelImage),isArbitraryVariableShadow=o=>getIsArbitraryVariable(o,isLabelShadow,!0),getIsArbitraryValue=(o,l,u)=>{const d=arbitraryValueRegex.exec(o);return d?d[1]?l(d[1]):u(d[2]):!1},getIsArbitraryVariable=(o,l,u=!1)=>{const d=arbitraryVariableRegex.exec(o);return d?d[1]?l(d[1]):u:!1},isLabelPosition=o=>o==="position"||o==="percentage",isLabelImage=o=>o==="image"||o==="url",isLabelSize=o=>o==="length"||o==="size"||o==="bg-size",isLabelLength=o=>o==="length",isLabelNumber=o=>o==="number",isLabelFamilyName=o=>o==="family-name",isLabelShadow=o=>o==="shadow",getDefaultConfig=()=>{const o=fromTheme("color"),l=fromTheme("font"),u=fromTheme("text"),d=fromTheme("font-weight"),f=fromTheme("tracking"),h=fromTheme("leading"),m=fromTheme("breakpoint"),g=fromTheme("container"),v=fromTheme("spacing"),x=fromTheme("radius"),b=fromTheme("shadow"),S=fromTheme("inset-shadow"),E=fromTheme("text-shadow"),w=fromTheme("drop-shadow"),T=fromTheme("blur"),C=fromTheme("perspective"),M=fromTheme("aspect"),A=fromTheme("ease"),k=fromTheme("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...O(),isArbitraryVariable,isArbitraryValue],N=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],z=()=>[isArbitraryVariable,isArbitraryValue,v],W=()=>[isFraction,"full","auto",...z()],X=()=>[isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue],ie=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue],oe=()=>[isInteger,"auto",isArbitraryVariable,isArbitraryValue],le=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...z()],G=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],L=()=>[o,isArbitraryVariable,isArbitraryValue],B=()=>[...O(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}],Y=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength],te=()=>["","none","full",x,isArbitraryVariable,isArbitraryValue],ae=()=>["",isNumber$1,isArbitraryVariableLength,isArbitraryLength],ue=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[isNumber$1,isPercent,isArbitraryVariablePosition,isArbitraryPosition],ee=()=>["","none",T,isArbitraryVariable,isArbitraryValue],de=()=>["none",isNumber$1,isArbitraryVariable,isArbitraryValue],ge=()=>["none",isNumber$1,isArbitraryVariable,isArbitraryValue],he=()=>[isNumber$1,isArbitraryVariable,isArbitraryValue],Se=()=>[isFraction,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber$1],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,M]}],container:["container"],columns:[{columns:[isNumber$1,isArbitraryValue,isArbitraryVariable,g]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",g,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[isNumber$1,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],order:[{order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[g,"screen",...G()]}],"min-w":[{"min-w":[g,"screen","none",...G()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[m]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",u,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[d,isArbitraryVariable,isArbitraryNumber]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[{font:[isArbitraryVariableFamilyName,isArbitraryValue,l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[f,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber$1,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[h,...z()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber$1,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[isNumber$1,"auto",isArbitraryVariable,isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage,isArbitraryImage]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber$1,isArbitraryVariableLength,isArbitraryLength]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",b,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",S,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[isNumber$1,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",E,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[isNumber$1]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[isNumber$1]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[{filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:ee()}],brightness:[{brightness:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",w,isArbitraryVariableShadow,isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],invert:[{invert:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-sepia":[{"backdrop-sepia":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber$1,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",A,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",k,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,isArbitraryVariable,isArbitraryValue]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[isNumber$1,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},twMerge=createTailwindMerge(getDefaultConfig);function cn$1(...o){return twMerge(clsx(o))}function Drawer({children:o,headerOptions:l,closeButtonStyles:u,className:d,variant:f="default",style:h,...m}){return jsxRuntimeExports.jsx(Modal,{header:jsxRuntimeExports.jsx(Modal.Header,{after:jsxRuntimeExports.jsx(Modal.Close,{children:jsxRuntimeExports.jsx(Icon28Close,{style:{color:"var(--tgui--secondary_color)",...u}})}),style:{zIndex:1,position:"absolute",top:0,left:0,right:0,backgroundColor:"transparent",borderRadius:"inherit",overflow:"hidden",...l==null?void 0:l.style},className:cn$1("before:hidden",l==null?void 0:l.className),...l}),className:cn$1("pb-0",d),style:f==="secondary"?{backgroundColor:"var(--tgui--secondary_bg_color)",...h}:h,...m,children:o})}const DrawerContent=reactExports.forwardRef(({children:o,className:l,...u},d)=>jsxRuntimeExports.jsx("div",{ref:d,className:cn$1("flex flex-col text-center px-4 pt-7.5 gap-6 pb-[calc(var(--tg-safe-area-inset-bottom)+6px)]",l),...u,children:o})),useAnimateNumber=(o,l=!0,u=!1)=>{const[,d]=useAnimate(),[f,h]=React.useState(l?0:o),m=useMotionValue(l?0:o),g=React.useRef(o);return m.on("change",x=>{const S=Math.abs(x-g.current)<.001;h(S?u?g.current:Math.round(g.current):u?x:Math.round(x))}),reactExports.useEffect(()=>{g.current=o;const x=d(m,o,{ease:"easeOut",duration:.1});return()=>x.stop()},[m,o,d]),[f,x=>{g.current=x;const b=d(m,x,{ease:"easeOut",duration:.1});return()=>b.stop()}]},XpProgress=({level:o,experience:l,xpNeeded:u,className:d,size:f=40,levelFontSize:h})=>{const[m]=useAnimateNumber(l),[g]=useAnimateNumber(o),v=4,x=Math.round(m/u*100)/100,b=f,S=b/2-v/2,E=2*Math.PI*S,w=formatCompactNumber(g),T=h||`${b*.6/(1+.4*(w.length-1))}px`;return jsxRuntimeExports.jsxs("div",{className:cn$1("relative flex justify-center items-center overflow-hidden",d),style:{width:f,height:f},children:[jsxRuntimeExports.jsx(Text,{className:"text-rounded",style:{fontSize:T,lineHeight:`${f||b}px`,fontWeight:800},children:w}),jsxRuntimeExports.jsxs(motion.svg,{width:b,height:b,viewBox:`0 0 ${b} ${b}`,className:"absolute inset-0 text-inherit",children:[jsxRuntimeExports.jsx("title",{children:"Xp progress background"}),jsxRuntimeExports.jsx(motion.circle,{cx:b/2,cy:b/2,r:S,opacity:.2,stroke:"currentColor",fill:"none",strokeWidth:v})]},"bg"),jsxRuntimeExports.jsxs(motion.svg,{width:b,height:b,viewBox:`0 0 ${b} ${b}`,className:"absolute inset-0 -rotate-90",children:[jsxRuntimeExports.jsx("title",{children:"Xp progress"}),jsxRuntimeExports.jsx(motion.circle,{cx:b/2,cy:b/2,r:S,fill:"none",stroke:"currentColor",strokeWidth:v,strokeLinecap:"round",initial:{strokeDasharray:E,strokeDashoffset:E},animate:{strokeDashoffset:(1-x)*E},transition:{strokeDashoffset:{ease:"easeOut",duration:2}}})]},"fg")]})},dividePriceResponse=o=>o/100,DEBUG_BUILD$2=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,GLOBAL_OBJ=globalThis,SDK_VERSION="10.18.0";function getMainCarrier(){return getSentryCarrier(GLOBAL_OBJ),GLOBAL_OBJ}function getSentryCarrier(o){const l=o.__SENTRY__=o.__SENTRY__||{};return l.version=l.version||SDK_VERSION,l[SDK_VERSION]=l[SDK_VERSION]||{}}function getGlobalSingleton(o,l,u=GLOBAL_OBJ){const d=u.__SENTRY__=u.__SENTRY__||{},f=d[SDK_VERSION]=d[SDK_VERSION]||{};return f[o]||(f[o]=l())}const CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],PREFIX="Sentry Logger ",originalConsoleMethods={};function consoleSandbox(o){if(!("console"in GLOBAL_OBJ))return o();const l=GLOBAL_OBJ.console,u={},d=Object.keys(originalConsoleMethods);d.forEach(f=>{const h=originalConsoleMethods[f];u[f]=l[f],l[f]=h});try{return o()}finally{d.forEach(f=>{l[f]=u[f]})}}function enable(){_getLoggerSettings().enabled=!0}function disable(){_getLoggerSettings().enabled=!1}function isEnabled(){return _getLoggerSettings().enabled}function log$6(...o){_maybeLog("log",...o)}function warn(...o){_maybeLog("warn",...o)}function error(...o){_maybeLog("error",...o)}function _maybeLog(o,...l){DEBUG_BUILD$2&&isEnabled()&&consoleSandbox(()=>{GLOBAL_OBJ.console[o](`${PREFIX}[${o}]:`,...l)})}function _getLoggerSettings(){return DEBUG_BUILD$2?getGlobalSingleton("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const debug={enable,disable,isEnabled,log:log$6,warn,error},STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...o){const l=o.sort((u,d)=>u[0]-d[0]).map(u=>u[1]);return(u,d=0,f=0)=>{const h=[],m=u.split(`
99
+ `),()=>{M.contains(C)&&M.removeChild(C)}},[l]),jsxRuntimeExports.jsx(PopChildMeasure,{isPresent:l,childRef:h,sizeRef:m,children:reactExports.cloneElement(o,{ref:v})})}const PresenceChild=({children:o,initial:l,isPresent:u,onExitComplete:d,custom:f,presenceAffectsLayout:h,mode:m,anchorX:g,root:v})=>{const x=useConstant(newChildrenMap),b=reactExports.useId();let S=!0,E=reactExports.useMemo(()=>(S=!1,{id:b,initial:l,isPresent:u,custom:f,onExitComplete:w=>{x.set(w,!0);for(const T of x.values())if(!T)return;d&&d()},register:w=>(x.set(w,!1),()=>x.delete(w))}),[u,x,d]);return h&&S&&(E={...E}),reactExports.useMemo(()=>{x.forEach((w,T)=>x.set(T,!1))},[u]),reactExports.useEffect(()=>{!u&&!x.size&&d&&d()},[u]),m==="popLayout"&&(o=jsxRuntimeExports.jsx(PopChild,{isPresent:u,anchorX:g,root:v,children:o})),jsxRuntimeExports.jsx(PresenceContext.Provider,{value:E,children:o})};function newChildrenMap(){return new Map}function usePresence(o=!0){const l=reactExports.useContext(PresenceContext);if(l===null)return[!0,null];const{isPresent:u,onExitComplete:d,register:f}=l,h=reactExports.useId();reactExports.useEffect(()=>{if(o)return f(h)},[o]);const m=reactExports.useCallback(()=>o&&d&&d(h),[h,d,o]);return!u&&d?[!1,m]:[!0]}const getChildKey=o=>o.key||"";function onlyElements(o){const l=[];return reactExports.Children.forEach(o,u=>{reactExports.isValidElement(u)&&l.push(u)}),l}const AnimatePresence=({children:o,custom:l,initial:u=!0,onExitComplete:d,presenceAffectsLayout:f=!0,mode:h="sync",propagate:m=!1,anchorX:g="left",root:v})=>{const[x,b]=usePresence(m),S=reactExports.useMemo(()=>onlyElements(o),[o]),E=m&&!x?[]:S.map(getChildKey),w=reactExports.useRef(!0),T=reactExports.useRef(S),C=useConstant(()=>new Map),[M,A]=reactExports.useState(S),[k,I]=reactExports.useState(S);useIsomorphicLayoutEffect(()=>{w.current=!1,T.current=S;for(let N=0;N<k.length;N++){const V=getChildKey(k[N]);E.includes(V)?C.delete(V):C.get(V)!==!0&&C.set(V,!1)}},[k,E.length,E.join("-")]);const O=[];if(S!==M){let N=[...S];for(let V=0;V<k.length;V++){const z=k[V],W=getChildKey(z);E.includes(W)||(N.splice(V,0,z),O.push(z))}return h==="wait"&&O.length&&(N=O),I(onlyElements(N)),A(S),null}const{forceRender:j}=reactExports.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:k.map(N=>{const V=getChildKey(N),z=m&&!x?!1:S===k||E.includes(V),W=()=>{if(C.has(V))C.set(V,!0);else return;let X=!0;C.forEach(ie=>{ie||(X=!1)}),X&&(j==null||j(),I(T.current),m&&(b==null||b()),d&&d())};return jsxRuntimeExports.jsx(PresenceChild,{isPresent:z,initial:!w.current||u?void 0:!1,custom:l,presenceAffectsLayout:f,mode:h,root:v,onExitComplete:z?void 0:W,anchorX:g,children:N},V)})})},LazyContext=reactExports.createContext({strict:!1}),featureProps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},featureDefinitions={};for(const o in featureProps)featureDefinitions[o]={isEnabled:l=>featureProps[o].some(u=>!!l[u])};function loadFeatures(o){for(const l in o)featureDefinitions[l]={...featureDefinitions[l],...o[l]}}const validMotionProps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function isValidMotionProp(o){return o.startsWith("while")||o.startsWith("drag")&&o!=="draggable"||o.startsWith("layout")||o.startsWith("onTap")||o.startsWith("onPan")||o.startsWith("onLayout")||validMotionProps.has(o)}let shouldForward=o=>!isValidMotionProp(o);function loadExternalIsValidProp(o){typeof o=="function"&&(shouldForward=l=>l.startsWith("on")?!isValidMotionProp(l):o(l))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(o,l,u){const d={};for(const f in o)f==="values"&&typeof o.values=="object"||(shouldForward(f)||u===!0&&isValidMotionProp(f)||!l&&!isValidMotionProp(f)||o.draggable&&f.startsWith("onDrag"))&&(d[f]=o[f]);return d}const MotionContext=reactExports.createContext({});function isAnimationControls(o){return o!==null&&typeof o=="object"&&typeof o.start=="function"}function isVariantLabel(o){return typeof o=="string"||Array.isArray(o)}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(o){return isAnimationControls(o.animate)||variantProps.some(l=>isVariantLabel(o[l]))}function isVariantNode(o){return!!(isControllingVariants(o)||o.variants)}function getCurrentTreeVariants(o,l){if(isControllingVariants(o)){const{initial:u,animate:d}=o;return{initial:u===!1||isVariantLabel(u)?u:void 0,animate:isVariantLabel(d)?d:void 0}}return o.inherit!==!1?l:{}}function useCreateMotionContext(o){const{initial:l,animate:u}=getCurrentTreeVariants(o,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:l,animate:u}),[variantLabelsAsDependency(l),variantLabelsAsDependency(u)])}function variantLabelsAsDependency(o){return Array.isArray(o)?o.join(" "):o}const scaleCorrectors={};function addScaleCorrector(o){for(const l in o)scaleCorrectors[l]=o[l],isCSSVariableName(l)&&(scaleCorrectors[l].isCSSVariable=!0)}function isForcedMotionValue(o,{layout:l,layoutId:u}){return transformProps.has(o)||o.startsWith("origin")||(l||u!==void 0)&&(!!scaleCorrectors[o]||o==="opacity")}const translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(o,l,u){let d="",f=!0;for(let h=0;h<numTransforms;h++){const m=transformPropOrder[h],g=o[m];if(g===void 0)continue;let v=!0;if(typeof g=="number"?v=g===(m.startsWith("scale")?1:0):v=parseFloat(g)===0,!v||u){const x=getValueAsType(g,numberValueTypes[m]);if(!v){f=!1;const b=translateAlias[m]||m;d+=`${b}(${x}) `}u&&(l[m]=x)}}return d=d.trim(),u?d=u(l,f?"":d):f&&(d="none"),d}function buildHTMLStyles(o,l,u){const{style:d,vars:f,transformOrigin:h}=o;let m=!1,g=!1;for(const v in l){const x=l[v];if(transformProps.has(v)){m=!0;continue}else if(isCSSVariableName(v)){f[v]=x;continue}else{const b=getValueAsType(x,numberValueTypes[v]);v.startsWith("origin")?(g=!0,h[v]=b):d[v]=b}}if(l.transform||(m||u?d.transform=buildTransform(l,o.transform,u):d.transform&&(d.transform="none")),g){const{originX:v="50%",originY:x="50%",originZ:b=0}=h;d.transformOrigin=`${v} ${x} ${b}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(o,l,u){for(const d in l)!isMotionValue(l[d])&&!isForcedMotionValue(d,u)&&(o[d]=l[d])}function useInitialMotionValues({transformTemplate:o},l){return reactExports.useMemo(()=>{const u=createHtmlRenderState();return buildHTMLStyles(u,l,o),Object.assign({},u.vars,u.style)},[l])}function useStyle(o,l){const u=o.style||{},d={};return copyRawValuesOnly(d,u,o),Object.assign(d,useInitialMotionValues(o,l)),d}function useHTMLProps(o,l){const u={},d=useStyle(o,l);return o.drag&&o.dragListener!==!1&&(u.draggable=!1,d.userSelect=d.WebkitUserSelect=d.WebkitTouchCallout="none",d.touchAction=o.drag===!0?"none":`pan-${o.drag==="x"?"y":"x"}`),o.tabIndex===void 0&&(o.onTap||o.onTapStart||o.whileTap)&&(u.tabIndex=0),u.style=d,u}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(o,l,u=1,d=0,f=!0){o.pathLength=1;const h=f?dashKeys:camelKeys;o[h.offset]=px.transform(-d);const m=px.transform(l),g=px.transform(u);o[h.array]=`${m} ${g}`}function buildSVGAttrs(o,{attrX:l,attrY:u,attrScale:d,pathLength:f,pathSpacing:h=1,pathOffset:m=0,...g},v,x,b){if(buildHTMLStyles(o,g,x),v){o.style.viewBox&&(o.attrs.viewBox=o.style.viewBox);return}o.attrs=o.style,o.style={};const{attrs:S,style:E}=o;S.transform&&(E.transform=S.transform,delete S.transform),(E.transform||S.transformOrigin)&&(E.transformOrigin=S.transformOrigin??"50% 50%",delete S.transformOrigin),E.transform&&(E.transformBox=(b==null?void 0:b.transformBox)??"fill-box",delete S.transformBox),l!==void 0&&(S.x=l),u!==void 0&&(S.y=u),d!==void 0&&(S.scale=d),f!==void 0&&buildSVGPath(S,f,h,m,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=o=>typeof o=="string"&&o.toLowerCase()==="svg";function useSVGProps(o,l,u,d){const f=reactExports.useMemo(()=>{const h=createSvgRenderState();return buildSVGAttrs(h,l,isSVGTag(d),o.transformTemplate,o.style),{...h.attrs,style:{...h.style}}},[l]);if(o.style){const h={};copyRawValuesOnly(h,o.style,o),f.style={...h,...f.style}}return f}const lowercaseSVGElements=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function isSVGComponent(o){return typeof o!="string"||o.includes("-")?!1:!!(lowercaseSVGElements.indexOf(o)>-1||/[A-Z]/u.test(o))}function useRender(o,l,u,{latestValues:d},f,h=!1){const g=(isSVGComponent(o)?useSVGProps:useHTMLProps)(l,d,f,o),v=filterProps(l,typeof o=="string",h),x=o!==reactExports.Fragment?{...v,...g,ref:u}:{},{children:b}=l,S=reactExports.useMemo(()=>isMotionValue(b)?b.get():b,[b]);return reactExports.createElement(o,{...x,children:S})}function getValueState(o){const l=[{},{}];return o==null||o.values.forEach((u,d)=>{l[0][d]=u.get(),l[1][d]=u.getVelocity()}),l}function resolveVariantFromProps(o,l,u,d){if(typeof l=="function"){const[f,h]=getValueState(d);l=l(u!==void 0?u:o.custom,f,h)}if(typeof l=="string"&&(l=o.variants&&o.variants[l]),typeof l=="function"){const[f,h]=getValueState(d);l=l(u!==void 0?u:o.custom,f,h)}return l}function resolveMotionValue(o){return isMotionValue(o)?o.get():o}function makeState({scrapeMotionValuesFromProps:o,createRenderState:l},u,d,f){return{latestValues:makeLatestValues(u,d,f,o),renderState:l()}}function makeLatestValues(o,l,u,d){const f={},h=d(o,{});for(const E in h)f[E]=resolveMotionValue(h[E]);let{initial:m,animate:g}=o;const v=isControllingVariants(o),x=isVariantNode(o);l&&x&&!v&&o.inherit!==!1&&(m===void 0&&(m=l.initial),g===void 0&&(g=l.animate));let b=u?u.initial===!1:!1;b=b||m===!1;const S=b?g:m;if(S&&typeof S!="boolean"&&!isAnimationControls(S)){const E=Array.isArray(S)?S:[S];for(let w=0;w<E.length;w++){const T=resolveVariantFromProps(o,E[w]);if(T){const{transitionEnd:C,transition:M,...A}=T;for(const k in A){let I=A[k];if(Array.isArray(I)){const O=b?I.length-1:0;I=I[O]}I!==null&&(f[k]=I)}for(const k in C)f[k]=C[k]}}}return f}const makeUseVisualState=o=>(l,u)=>{const d=reactExports.useContext(MotionContext),f=reactExports.useContext(PresenceContext),h=()=>makeState(o,l,d,f);return u?h():useConstant(h)};function scrapeMotionValuesFromProps$1(o,l,u){var h;const{style:d}=o,f={};for(const m in d)(isMotionValue(d[m])||l.style&&isMotionValue(l.style[m])||isForcedMotionValue(m,o)||((h=u==null?void 0:u.getValue(m))==null?void 0:h.liveStyle)!==void 0)&&(f[m]=d[m]);return f}const useHTMLVisualState=makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState});function scrapeMotionValuesFromProps(o,l,u){const d=scrapeMotionValuesFromProps$1(o,l,u);for(const f in o)if(isMotionValue(o[f])||isMotionValue(l[f])){const h=transformPropOrder.indexOf(f)!==-1?"attr"+f.charAt(0).toUpperCase()+f.substring(1):f;d[h]=o[f]}return d}const useSVGVisualState=makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState}),motionComponentSymbol=Symbol.for("motionComponentSymbol");function isRefObject(o){return o&&typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"current")}function useMotionRef(o,l,u){return reactExports.useCallback(d=>{d&&o.onMount&&o.onMount(d),l&&(d?l.mount(d):l.unmount()),u&&(typeof u=="function"?u(d):isRefObject(u)&&(u.current=d))},[l])}const camelToDash=o=>o.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId),SwitchLayoutGroupContext=reactExports.createContext({});function useVisualElement(o,l,u,d,f){var C,M;const{visualElement:h}=reactExports.useContext(MotionContext),m=reactExports.useContext(LazyContext),g=reactExports.useContext(PresenceContext),v=reactExports.useContext(MotionConfigContext).reducedMotion,x=reactExports.useRef(null);d=d||m.renderer,!x.current&&d&&(x.current=d(o,{visualState:l,parent:h,props:u,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:v}));const b=x.current,S=reactExports.useContext(SwitchLayoutGroupContext);b&&!b.projection&&f&&(b.type==="html"||b.type==="svg")&&createProjectionNode$1(x.current,u,f,S);const E=reactExports.useRef(!1);reactExports.useInsertionEffect(()=>{b&&E.current&&b.update(u,g)});const w=u[optimizedAppearDataAttribute],T=reactExports.useRef(!!w&&!((C=window.MotionHandoffIsComplete)!=null&&C.call(window,w))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,w)));return useIsomorphicLayoutEffect(()=>{b&&(E.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),T.current&&b.animationState&&b.animationState.animateChanges())}),reactExports.useEffect(()=>{b&&(!T.current&&b.animationState&&b.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)==null||A.call(window,w)}),T.current=!1),b.enteringChildren=void 0)}),b}function createProjectionNode$1(o,l,u,d){const{layoutId:f,layout:h,drag:m,dragConstraints:g,layoutScroll:v,layoutRoot:x,layoutCrossfade:b}=l;o.projection=new u(o.latestValues,l["data-framer-portal-id"]?void 0:getClosestProjectingNode(o.parent)),o.projection.setOptions({layoutId:f,layout:h,alwaysMeasureLayout:!!m||g&&isRefObject(g),visualElement:o,animationType:typeof h=="string"?h:"both",initialPromotionConfig:d,crossfade:b,layoutScroll:v,layoutRoot:x})}function getClosestProjectingNode(o){if(o)return o.options.allowProjection!==!1?o.projection:getClosestProjectingNode(o.parent)}function createMotionComponent(o,{forwardMotionProps:l=!1}={},u,d){u&&loadFeatures(u);const f=isSVGComponent(o)?useSVGVisualState:useHTMLVisualState;function h(g,v){let x;const b={...reactExports.useContext(MotionConfigContext),...g,layoutId:useLayoutId(g)},{isStatic:S}=b,E=useCreateMotionContext(g),w=f(g,S);if(!S&&isBrowser){useStrictMode();const T=getProjectionFunctionality(b);x=T.MeasureLayout,E.visualElement=useVisualElement(o,w,b,d,T.ProjectionNode)}return jsxRuntimeExports.jsxs(MotionContext.Provider,{value:E,children:[x&&E.visualElement?jsxRuntimeExports.jsx(x,{visualElement:E.visualElement,...b}):null,useRender(o,g,useMotionRef(w,E.visualElement,v),w,S,l)]})}h.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const m=reactExports.forwardRef(h);return m[motionComponentSymbol]=o,m}function useLayoutId({layoutId:o}){const l=reactExports.useContext(LayoutGroupContext).id;return l&&o!==void 0?l+"-"+o:o}function useStrictMode(o,l){reactExports.useContext(LazyContext).strict}function getProjectionFunctionality(o){const{drag:l,layout:u}=featureDefinitions;if(!l&&!u)return{};const d={...l,...u};return{MeasureLayout:l!=null&&l.isEnabled(o)||u!=null&&u.isEnabled(o)?d.MeasureLayout:void 0,ProjectionNode:d.ProjectionNode}}function createMotionProxy(o,l){if(typeof Proxy>"u")return createMotionComponent;const u=new Map,d=(h,m)=>createMotionComponent(h,m,o,l),f=(h,m)=>d(h,m);return new Proxy(f,{get:(h,m)=>m==="create"?d:(u.has(m)||u.set(m,createMotionComponent(m,void 0,o,l)),u.get(m))})}function convertBoundingBoxToBox({top:o,left:l,right:u,bottom:d}){return{x:{min:l,max:u},y:{min:o,max:d}}}function convertBoxToBoundingBox({x:o,y:l}){return{top:l.min,right:o.max,bottom:l.max,left:o.min}}function transformBoxPoints(o,l){if(!l)return o;const u=l({x:o.left,y:o.top}),d=l({x:o.right,y:o.bottom});return{top:u.y,left:u.x,bottom:d.y,right:d.x}}function isIdentityScale(o){return o===void 0||o===1}function hasScale({scale:o,scaleX:l,scaleY:u}){return!isIdentityScale(o)||!isIdentityScale(l)||!isIdentityScale(u)}function hasTransform(o){return hasScale(o)||has2DTranslate(o)||o.z||o.rotate||o.rotateX||o.rotateY||o.skewX||o.skewY}function has2DTranslate(o){return is2DTranslate(o.x)||is2DTranslate(o.y)}function is2DTranslate(o){return o&&o!=="0%"}function scalePoint(o,l,u){const d=o-u,f=l*d;return u+f}function applyPointDelta(o,l,u,d,f){return f!==void 0&&(o=scalePoint(o,f,d)),scalePoint(o,u,d)+l}function applyAxisDelta(o,l=0,u=1,d,f){o.min=applyPointDelta(o.min,l,u,d,f),o.max=applyPointDelta(o.max,l,u,d,f)}function applyBoxDelta(o,{x:l,y:u}){applyAxisDelta(o.x,l.translate,l.scale,l.originPoint),applyAxisDelta(o.y,u.translate,u.scale,u.originPoint)}const TREE_SCALE_SNAP_MIN=.999999999999,TREE_SCALE_SNAP_MAX=1.0000000000001;function applyTreeDeltas(o,l,u,d=!1){const f=u.length;if(!f)return;l.x=l.y=1;let h,m;for(let g=0;g<f;g++){h=u[g],m=h.projectionDelta;const{visualElement:v}=h.options;v&&v.props.style&&v.props.style.display==="contents"||(d&&h.options.layoutScroll&&h.scroll&&h!==h.root&&transformBox(o,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),m&&(l.x*=m.x.scale,l.y*=m.y.scale,applyBoxDelta(o,m)),d&&hasTransform(h.latestValues)&&transformBox(o,h.latestValues))}l.x<TREE_SCALE_SNAP_MAX&&l.x>TREE_SCALE_SNAP_MIN&&(l.x=1),l.y<TREE_SCALE_SNAP_MAX&&l.y>TREE_SCALE_SNAP_MIN&&(l.y=1)}function translateAxis(o,l){o.min=o.min+l,o.max=o.max+l}function transformAxis(o,l,u,d,f=.5){const h=mixNumber$1(o.min,o.max,f);applyAxisDelta(o,l,u,h,d)}function transformBox(o,l){transformAxis(o.x,l.x,l.scaleX,l.scale,l.originX),transformAxis(o.y,l.y,l.scaleY,l.scale,l.originY)}function measureViewportBox(o,l){return convertBoundingBoxToBox(transformBoxPoints(o.getBoundingClientRect(),l))}function measurePageBox(o,l,u){const d=measureViewportBox(o,u),{scroll:f}=l;return f&&(translateAxis(d.x,f.offset.x),translateAxis(d.y,f.offset.y)),d}const createAxisDelta=()=>({translate:0,scale:1,origin:0,originPoint:0}),createDelta=()=>({x:createAxisDelta(),y:createAxisDelta()}),createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()}),prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser)if(window.matchMedia){const o=window.matchMedia("(prefers-reduced-motion)"),l=()=>prefersReducedMotion.current=o.matches;o.addEventListener("change",l),l()}else prefersReducedMotion.current=!1}const visualElementStore=new WeakMap;function updateMotionValuesFromProps(o,l,u){for(const d in l){const f=l[d],h=u[d];if(isMotionValue(f))o.addValue(d,f);else if(isMotionValue(h))o.addValue(d,motionValue(f,{owner:o}));else if(h!==f)if(o.hasValue(d)){const m=o.getValue(d);m.liveStyle===!0?m.jump(f):m.hasAnimated||m.set(f)}else{const m=o.getStaticValue(d);o.addValue(d,motionValue(m!==void 0?m:f,{owner:o}))}}for(const d in u)l[d]===void 0&&o.removeValue(d);return l}const propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class VisualElement{scrapeMotionValuesFromProps(l,u,d){return{}}constructor({parent:l,props:u,presenceContext:d,reducedMotionConfig:f,blockInitialAnimation:h,visualState:m},g={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=time.now();this.renderScheduledAt<E&&(this.renderScheduledAt=E,frame.render(this.render,!1,!0))};const{latestValues:v,renderState:x}=m;this.latestValues=v,this.baseTarget={...v},this.initialValues=u.initial?{...v}:{},this.renderState=x,this.parent=l,this.props=u,this.presenceContext=d,this.depth=l?l.depth+1:0,this.reducedMotionConfig=f,this.options=g,this.blockInitialAnimation=!!h,this.isControllingVariants=isControllingVariants(u),this.isVariantNode=isVariantNode(u),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(l&&l.current);const{willChange:b,...S}=this.scrapeMotionValuesFromProps(u,{},this);for(const E in S){const w=S[E];v[E]!==void 0&&isMotionValue(w)&&w.set(v[E])}}mount(l){var u;this.current=l,visualElementStore.set(l,this),this.projection&&!this.projection.instance&&this.projection.mount(l),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((d,f)=>this.bindToMotionValue(f,d)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,(u=this.parent)==null||u.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var l;this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(u=>u()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(l=this.parent)==null||l.removeChild(this);for(const u in this.events)this.events[u].clear();for(const u in this.features){const d=this.features[u];d&&(d.unmount(),d.isMounted=!1)}this.current=null}addChild(l){this.children.add(l),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(l)}removeChild(l){this.children.delete(l),this.enteringChildren&&this.enteringChildren.delete(l)}bindToMotionValue(l,u){this.valueSubscriptions.has(l)&&this.valueSubscriptions.get(l)();const d=transformProps.has(l);d&&this.onBindTransform&&this.onBindTransform();const f=u.on("change",m=>{this.latestValues[l]=m,this.props.onUpdate&&frame.preRender(this.notifyUpdate),d&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let h;window.MotionCheckAppearSync&&(h=window.MotionCheckAppearSync(this,l,u)),this.valueSubscriptions.set(l,()=>{f(),h&&h(),u.owner&&u.stop()})}sortNodePosition(l){return!this.current||!this.sortInstanceNodePosition||this.type!==l.type?0:this.sortInstanceNodePosition(this.current,l.current)}updateFeatures(){let l="animation";for(l in featureDefinitions){const u=featureDefinitions[l];if(!u)continue;const{isEnabled:d,Feature:f}=u;if(!this.features[l]&&f&&d(this.props)&&(this.features[l]=new f(this)),this.features[l]){const h=this.features[l];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(l){return this.latestValues[l]}setStaticValue(l,u){this.latestValues[l]=u}update(l,u){(l.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=l,this.prevPresenceContext=this.presenceContext,this.presenceContext=u;for(let d=0;d<propEventHandlers.length;d++){const f=propEventHandlers[d];this.propEventSubscriptions[f]&&(this.propEventSubscriptions[f](),delete this.propEventSubscriptions[f]);const h="on"+f,m=l[h];m&&(this.propEventSubscriptions[f]=this.on(f,m))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(l,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(l){return this.props.variants?this.props.variants[l]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(l){const u=this.getClosestVariantNode();if(u)return u.variantChildren&&u.variantChildren.add(l),()=>u.variantChildren.delete(l)}addValue(l,u){const d=this.values.get(l);u!==d&&(d&&this.removeValue(l),this.bindToMotionValue(l,u),this.values.set(l,u),this.latestValues[l]=u.get())}removeValue(l){this.values.delete(l);const u=this.valueSubscriptions.get(l);u&&(u(),this.valueSubscriptions.delete(l)),delete this.latestValues[l],this.removeValueFromRenderState(l,this.renderState)}hasValue(l){return this.values.has(l)}getValue(l,u){if(this.props.values&&this.props.values[l])return this.props.values[l];let d=this.values.get(l);return d===void 0&&u!==void 0&&(d=motionValue(u===null?void 0:u,{owner:this}),this.addValue(l,d)),d}readValue(l,u){let d=this.latestValues[l]!==void 0||!this.current?this.latestValues[l]:this.getBaseTargetFromProps(this.props,l)??this.readValueFromInstance(this.current,l,this.options);return d!=null&&(typeof d=="string"&&(isNumericalString(d)||isZeroValueString(d))?d=parseFloat(d):!findValueType(d)&&complex.test(u)&&(d=getAnimatableNone(l,u)),this.setBaseTarget(l,isMotionValue(d)?d.get():d)),isMotionValue(d)?d.get():d}setBaseTarget(l,u){this.baseTarget[l]=u}getBaseTarget(l){var h;const{initial:u}=this.props;let d;if(typeof u=="string"||typeof u=="object"){const m=resolveVariantFromProps(this.props,u,(h=this.presenceContext)==null?void 0:h.custom);m&&(d=m[l])}if(u&&d!==void 0)return d;const f=this.getBaseTargetFromProps(this.props,l);return f!==void 0&&!isMotionValue(f)?f:this.initialValues[l]!==void 0&&d===void 0?void 0:this.baseTarget[l]}on(l,u){return this.events[l]||(this.events[l]=new SubscriptionManager),this.events[l].add(u)}notify(l,...u){this.events[l]&&this.events[l].notify(...u)}scheduleRenderMicrotask(){microtask.render(this.render)}}class DOMVisualElement extends VisualElement{constructor(){super(...arguments),this.KeyframeResolver=DOMKeyframesResolver}sortInstanceNodePosition(l,u){return l.compareDocumentPosition(u)&2?1:-1}getBaseTargetFromProps(l,u){return l.style?l.style[u]:void 0}removeValueFromRenderState(l,{vars:u,style:d}){delete u[l],delete d[l]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:l}=this.props;isMotionValue(l)&&(this.childSubscription=l.on("change",u=>{this.current&&(this.current.textContent=`${u}`)}))}}function renderHTML(o,{style:l,vars:u},d,f){const h=o.style;let m;for(m in l)h[m]=l[m];f==null||f.applyProjectionStyles(h,d);for(m in u)h.setProperty(m,u[m])}function getComputedStyle$1(o){return window.getComputedStyle(o)}class HTMLVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=renderHTML}readValueFromInstance(l,u){var d;if(transformProps.has(u))return(d=this.projection)!=null&&d.isProjecting?defaultTransformValue(u):readTransformValue(l,u);{const f=getComputedStyle$1(l),h=(isCSSVariableName(u)?f.getPropertyValue(u):f[u])||0;return typeof h=="string"?h.trim():h}}measureInstanceViewportBox(l,{transformPagePoint:u}){return measureViewportBox(l,u)}build(l,u,d){buildHTMLStyles(l,u,d.transformTemplate)}scrapeMotionValuesFromProps(l,u,d){return scrapeMotionValuesFromProps$1(l,u,d)}}const camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function renderSVG(o,l,u,d){renderHTML(o,l,void 0,d);for(const f in l.attrs)o.setAttribute(camelCaseAttributes.has(f)?f:camelToDash(f),l.attrs[f])}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=createBox}getBaseTargetFromProps(l,u){return l[u]}readValueFromInstance(l,u){if(transformProps.has(u)){const d=getDefaultValueType(u);return d&&d.default||0}return u=camelCaseAttributes.has(u)?u:camelToDash(u),l.getAttribute(u)}scrapeMotionValuesFromProps(l,u,d){return scrapeMotionValuesFromProps(l,u,d)}build(l,u,d){buildSVGAttrs(l,u,this.isSVGTag,d.transformTemplate,d.style)}renderInstance(l,u,d,f){renderSVG(l,u,d,f)}mount(l){this.isSVGTag=isSVGTag(l.tagName),super.mount(l)}}const createDomVisualElement=(o,l)=>isSVGComponent(o)?new SVGVisualElement(l):new HTMLVisualElement(l,{allowProjection:o!==reactExports.Fragment});function resolveVariant(o,l,u){const d=o.getProps();return resolveVariantFromProps(d,l,u!==void 0?u:d.custom,o)}const isKeyframesTarget=o=>Array.isArray(o);function setMotionValue(o,l,u){o.hasValue(l)?o.getValue(l).set(u):o.addValue(l,motionValue(u))}function resolveFinalValueInKeyframes(o){return isKeyframesTarget(o)?o[o.length-1]||0:o}function setTarget(o,l){const u=resolveVariant(o,l);let{transitionEnd:d={},transition:f={},...h}=u||{};h={...h,...d};for(const m in h){const g=resolveFinalValueInKeyframes(h[m]);setMotionValue(o,m,g)}}function isWillChangeMotionValue(o){return!!(isMotionValue(o)&&o.add)}function addValueToWillChange(o,l){const u=o.getValue("willChange");if(isWillChangeMotionValue(u))return u.add(l);if(!u&&MotionGlobalConfig.WillChange){const d=new MotionGlobalConfig.WillChange("auto");o.addValue("willChange",d),d.add(l)}}function getOptimisedAppearId(o){return o.props[optimizedAppearDataAttribute]}const isNotNull=o=>o!==null;function getFinalKeyframe(o,{repeat:l,repeatType:u="loop"},d){const f=o.filter(isNotNull),h=l&&u!=="loop"&&l%2===1?0:f.length-1;return f[h]}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=o=>({type:"spring",stiffness:550,damping:o===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(o,{keyframes:l})=>l.length>2?keyframesTransition:transformProps.has(o)?o.startsWith("scale")?criticallyDampedSpring(l[1]):underDampedSpring:ease;function isTransitionDefined({when:o,delay:l,delayChildren:u,staggerChildren:d,staggerDirection:f,repeat:h,repeatType:m,repeatDelay:g,from:v,elapsed:x,...b}){return!!Object.keys(b).length}const animateMotionValue=(o,l,u,d={},f,h)=>m=>{const g=getValueTransition$1(d,o)||{},v=g.delay||d.delay||0;let{elapsed:x=0}=d;x=x-secondsToMilliseconds(v);const b={keyframes:Array.isArray(u)?u:[null,u],ease:"easeOut",velocity:l.getVelocity(),...g,delay:-x,onUpdate:E=>{l.set(E),g.onUpdate&&g.onUpdate(E)},onComplete:()=>{m(),g.onComplete&&g.onComplete()},name:o,motionValue:l,element:h?void 0:f};isTransitionDefined(g)||Object.assign(b,getDefaultTransition(o,b)),b.duration&&(b.duration=secondsToMilliseconds(b.duration)),b.repeatDelay&&(b.repeatDelay=secondsToMilliseconds(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(makeAnimationInstant(b),b.delay===0&&(S=!0)),(MotionGlobalConfig.instantAnimations||MotionGlobalConfig.skipAnimations)&&(S=!0,makeAnimationInstant(b),b.delay=0),b.allowFlatten=!g.type&&!g.ease,S&&!h&&l.get()!==void 0){const E=getFinalKeyframe(b.keyframes,g);if(E!==void 0){frame.update(()=>{b.onUpdate(E),b.onComplete()});return}}return g.isSync?new JSAnimation(b):new AsyncMotionValueAnimation(b)};function shouldBlockAnimation({protectedKeys:o,needsAnimating:l},u){const d=o.hasOwnProperty(u)&&l[u]!==!0;return l[u]=!1,d}function animateTarget(o,l,{delay:u=0,transitionOverride:d,type:f}={}){let{transition:h=o.getDefaultTransition(),transitionEnd:m,...g}=l;d&&(h=d);const v=[],x=f&&o.animationState&&o.animationState.getState()[f];for(const b in g){const S=o.getValue(b,o.latestValues[b]??null),E=g[b];if(E===void 0||x&&shouldBlockAnimation(x,b))continue;const w={delay:u,...getValueTransition$1(h||{},b)},T=S.get();if(T!==void 0&&!S.isAnimating&&!Array.isArray(E)&&E===T&&!w.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const A=getOptimisedAppearId(o);if(A){const k=window.MotionHandoffAnimation(A,b,frame);k!==null&&(w.startTime=k,C=!0)}}addValueToWillChange(o,b),S.start(animateMotionValue(b,S,E,o.shouldReduceMotion&&positionalKeys.has(b)?{type:!1}:w,o,C));const M=S.animation;M&&v.push(M)}return m&&Promise.all(v).then(()=>{frame.update(()=>{m&&setTarget(o,m)})}),v}function calcChildStagger(o,l,u,d=0,f=1){const h=Array.from(o).sort((x,b)=>x.sortNodePosition(b)).indexOf(l),m=o.size,g=(m-1)*d;return typeof u=="function"?u(h,m):f===1?h*d:g-h*d}function animateVariant(o,l,u={}){var v;const d=resolveVariant(o,l,u.type==="exit"?(v=o.presenceContext)==null?void 0:v.custom:void 0);let{transition:f=o.getDefaultTransition()||{}}=d||{};u.transitionOverride&&(f=u.transitionOverride);const h=d?()=>Promise.all(animateTarget(o,d,u)):()=>Promise.resolve(),m=o.variantChildren&&o.variantChildren.size?(x=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:E}=f;return animateChildren(o,l,x,b,S,E,u)}:()=>Promise.resolve(),{when:g}=f;if(g){const[x,b]=g==="beforeChildren"?[h,m]:[m,h];return x().then(()=>b())}else return Promise.all([h(),m(u.delay)])}function animateChildren(o,l,u=0,d=0,f=0,h=1,m){const g=[];for(const v of o.variantChildren)v.notify("AnimationStart",l),g.push(animateVariant(v,l,{...m,delay:u+(typeof d=="function"?0:d)+calcChildStagger(o.variantChildren,v,d,f,h)}).then(()=>v.notify("AnimationComplete",l)));return Promise.all(g)}function animateVisualElement(o,l,u={}){o.notify("AnimationStart",l);let d;if(Array.isArray(l)){const f=l.map(h=>animateVariant(o,h,u));d=Promise.all(f)}else if(typeof l=="string")d=animateVariant(o,l,u);else{const f=typeof l=="function"?resolveVariant(o,l,u.custom):l;d=Promise.all(animateTarget(o,f,u))}return d.then(()=>{o.notify("AnimationComplete",l)})}function shallowCompare(o,l){if(!Array.isArray(l))return!1;const u=l.length;if(u!==o.length)return!1;for(let d=0;d<u;d++)if(l[d]!==o[d])return!1;return!0}const numVariantProps=variantProps.length;function getVariantContext(o){if(!o)return;if(!o.isControllingVariants){const u=o.parent?getVariantContext(o.parent)||{}:{};return o.props.initial!==void 0&&(u.initial=o.props.initial),u}const l={};for(let u=0;u<numVariantProps;u++){const d=variantProps[u],f=o.props[d];(isVariantLabel(f)||f===!1)&&(l[d]=f)}return l}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(o){return l=>Promise.all(l.map(({animation:u,options:d})=>animateVisualElement(o,u,d)))}function createAnimationState(o){let l=animateList(o),u=createState(),d=!0;const f=v=>(x,b)=>{var E;const S=resolveVariant(o,b,v==="exit"?(E=o.presenceContext)==null?void 0:E.custom:void 0);if(S){const{transition:w,transitionEnd:T,...C}=S;x={...x,...C,...T}}return x};function h(v){l=v(o)}function m(v){const{props:x}=o,b=getVariantContext(o.parent)||{},S=[],E=new Set;let w={},T=1/0;for(let M=0;M<numAnimationTypes;M++){const A=reversePriorityOrder[M],k=u[A],I=x[A]!==void 0?x[A]:b[A],O=isVariantLabel(I),j=A===v?k.isActive:null;j===!1&&(T=M);let N=I===b[A]&&I!==x[A]&&O;if(N&&d&&o.manuallyAnimateOnMount&&(N=!1),k.protectedKeys={...w},!k.isActive&&j===null||!I&&!k.prevProp||isAnimationControls(I)||typeof I=="boolean")continue;const V=checkVariantsDidChange(k.prevProp,I);let z=V||A===v&&k.isActive&&!N&&O||M>T&&O,W=!1;const X=Array.isArray(I)?I:[I];let ie=X.reduce(f(A),{});j===!1&&(ie={});const{prevResolvedValues:oe={}}=k,le={...oe,...ie},Q=G=>{z=!0,E.has(G)&&(W=!0,E.delete(G)),k.needsAnimating[G]=!0;const L=o.getValue(G);L&&(L.liveStyle=!1)};for(const G in le){const L=ie[G],B=oe[G];if(w.hasOwnProperty(G))continue;let q=!1;isKeyframesTarget(L)&&isKeyframesTarget(B)?q=!shallowCompare(L,B):q=L!==B,q?L!=null?Q(G):E.add(G):L!==void 0&&E.has(G)?Q(G):k.protectedKeys[G]=!0}k.prevProp=I,k.prevResolvedValues=ie,k.isActive&&(w={...w,...ie}),d&&o.blockInitialAnimation&&(z=!1);const K=N&&V;z&&(!K||W)&&S.push(...X.map(G=>{const L={type:A};if(typeof G=="string"&&d&&!K&&o.manuallyAnimateOnMount&&o.parent){const{parent:B}=o,q=resolveVariant(B,G);if(B.enteringChildren&&q){const{delayChildren:U}=q.transition||{};L.delay=calcChildStagger(B.enteringChildren,o,U)}}return{animation:G,options:L}}))}if(E.size){const M={};if(typeof x.initial!="boolean"){const A=resolveVariant(o,Array.isArray(x.initial)?x.initial[0]:x.initial);A&&A.transition&&(M.transition=A.transition)}E.forEach(A=>{const k=o.getBaseTarget(A),I=o.getValue(A);I&&(I.liveStyle=!0),M[A]=k??null}),S.push({animation:M})}let C=!!S.length;return d&&(x.initial===!1||x.initial===x.animate)&&!o.manuallyAnimateOnMount&&(C=!1),d=!1,C?l(S):Promise.resolve()}function g(v,x){var S;if(u[v].isActive===x)return Promise.resolve();(S=o.variantChildren)==null||S.forEach(E=>{var w;return(w=E.animationState)==null?void 0:w.setActive(v,x)}),u[v].isActive=x;const b=m(v);for(const E in u)u[E].protectedKeys={};return b}return{animateChanges:m,setActive:g,setAnimateFunction:h,getState:()=>u,reset:()=>{u=createState(),d=!0}}}function checkVariantsDidChange(o,l){return typeof l=="string"?l!==o:Array.isArray(l)?!shallowCompare(l,o):!1}function createTypeState(o=!1){return{isActive:o,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class Feature{constructor(l){this.isMounted=!1,this.node=l}update(){}}class AnimationFeature extends Feature{constructor(l){super(l),l.animationState||(l.animationState=createAnimationState(l))}updateAnimationControlsSubscription(){const{animate:l}=this.node.getProps();isAnimationControls(l)&&(this.unmountControls=l.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:l}=this.node.getProps(),{animate:u}=this.node.prevProps||{};l!==u&&this.updateAnimationControlsSubscription()}unmount(){var l;this.node.animationState.reset(),(l=this.unmountControls)==null||l.call(this)}}let id$1=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id$1++}update(){if(!this.node.presenceContext)return;const{isPresent:l,onExitComplete:u}=this.node.presenceContext,{isPresent:d}=this.node.prevPresenceContext||{};if(!this.node.animationState||l===d)return;const f=this.node.animationState.setActive("exit",!l);u&&!l&&f.then(()=>{u(this.id)})}mount(){const{register:l,onExitComplete:u}=this.node.presenceContext||{};u&&u(this.id),l&&(this.unmount=l(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}};function addDomEvent(o,l,u,d={passive:!0}){return o.addEventListener(l,u,d),()=>o.removeEventListener(l,u)}function extractEventInfo(o){return{point:{x:o.pageX,y:o.pageY}}}const addPointerInfo=o=>l=>isPrimaryPointer(l)&&o(l,extractEventInfo(l));function addPointerEvent(o,l,u,d){return addDomEvent(o,l,addPointerInfo(u),d)}const SCALE_PRECISION=1e-4,SCALE_MIN=1-SCALE_PRECISION,SCALE_MAX=1+SCALE_PRECISION,TRANSLATE_PRECISION=.01,TRANSLATE_MIN=0-TRANSLATE_PRECISION,TRANSLATE_MAX=0+TRANSLATE_PRECISION;function calcLength(o){return o.max-o.min}function isNear(o,l,u){return Math.abs(o-l)<=u}function calcAxisDelta(o,l,u,d=.5){o.origin=d,o.originPoint=mixNumber$1(l.min,l.max,o.origin),o.scale=calcLength(u)/calcLength(l),o.translate=mixNumber$1(u.min,u.max,o.origin)-o.originPoint,(o.scale>=SCALE_MIN&&o.scale<=SCALE_MAX||isNaN(o.scale))&&(o.scale=1),(o.translate>=TRANSLATE_MIN&&o.translate<=TRANSLATE_MAX||isNaN(o.translate))&&(o.translate=0)}function calcBoxDelta(o,l,u,d){calcAxisDelta(o.x,l.x,u.x,d?d.originX:void 0),calcAxisDelta(o.y,l.y,u.y,d?d.originY:void 0)}function calcRelativeAxis(o,l,u){o.min=u.min+l.min,o.max=o.min+calcLength(l)}function calcRelativeBox(o,l,u){calcRelativeAxis(o.x,l.x,u.x),calcRelativeAxis(o.y,l.y,u.y)}function calcRelativeAxisPosition(o,l,u){o.min=l.min-u.min,o.max=o.min+calcLength(l)}function calcRelativePosition(o,l,u){calcRelativeAxisPosition(o.x,l.x,u.x),calcRelativeAxisPosition(o.y,l.y,u.y)}function eachAxis(o){return[o("x"),o("y")]}const getContextWindow=({current:o})=>o?o.ownerDocument.defaultView:null,distance=(o,l)=>Math.abs(o-l);function distance2D(o,l){const u=distance(o.x,l.x),d=distance(o.y,l.y);return Math.sqrt(u**2+d**2)}class PanSession{constructor(l,u,{transformPagePoint:d,contextWindow:f=window,dragSnapToOrigin:h=!1,distanceThreshold:m=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=getPanInfo(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,T=distance2D(E.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!T)return;const{point:C}=E,{timestamp:M}=frameData;this.history.push({...C,timestamp:M});const{onStart:A,onMove:k}=this.handlers;w||(A&&A(this.lastMoveEvent,E),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,E)},this.handlePointerMove=(E,w)=>{this.lastMoveEvent=E,this.lastMoveEventInfo=transformPoint(w,this.transformPagePoint),frame.update(this.updatePoint,!0)},this.handlePointerUp=(E,w)=>{this.end();const{onEnd:T,onSessionEnd:C,resumeAnimation:M}=this.handlers;if(this.dragSnapToOrigin&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=getPanInfo(E.type==="pointercancel"?this.lastMoveEventInfo:transformPoint(w,this.transformPagePoint),this.history);this.startEvent&&T&&T(E,A),C&&C(E,A)},!isPrimaryPointer(l))return;this.dragSnapToOrigin=h,this.handlers=u,this.transformPagePoint=d,this.distanceThreshold=m,this.contextWindow=f||window;const g=extractEventInfo(l),v=transformPoint(g,this.transformPagePoint),{point:x}=v,{timestamp:b}=frameData;this.history=[{...x,timestamp:b}];const{onSessionStart:S}=u;S&&S(l,getPanInfo(v,this.history)),this.removeListeners=pipe(addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(l){this.handlers=l}end(){this.removeListeners&&this.removeListeners(),cancelFrame(this.updatePoint)}}function transformPoint(o,l){return l?{point:l(o.point)}:o}function subtractPoint(o,l){return{x:o.x-l.x,y:o.y-l.y}}function getPanInfo({point:o},l){return{point:o,delta:subtractPoint(o,lastDevicePoint(l)),offset:subtractPoint(o,startDevicePoint(l)),velocity:getVelocity(l,.1)}}function startDevicePoint(o){return o[0]}function lastDevicePoint(o){return o[o.length-1]}function getVelocity(o,l){if(o.length<2)return{x:0,y:0};let u=o.length-1,d=null;const f=lastDevicePoint(o);for(;u>=0&&(d=o[u],!(f.timestamp-d.timestamp>secondsToMilliseconds(l)));)u--;if(!d)return{x:0,y:0};const h=millisecondsToSeconds(f.timestamp-d.timestamp);if(h===0)return{x:0,y:0};const m={x:(f.x-d.x)/h,y:(f.y-d.y)/h};return m.x===1/0&&(m.x=0),m.y===1/0&&(m.y=0),m}function applyConstraints(o,{min:l,max:u},d){return l!==void 0&&o<l?o=d?mixNumber$1(l,o,d.min):Math.max(o,l):u!==void 0&&o>u&&(o=d?mixNumber$1(u,o,d.max):Math.min(o,u)),o}function calcRelativeAxisConstraints(o,l,u){return{min:l!==void 0?o.min+l:void 0,max:u!==void 0?o.max+u-(o.max-o.min):void 0}}function calcRelativeConstraints(o,{top:l,left:u,bottom:d,right:f}){return{x:calcRelativeAxisConstraints(o.x,u,f),y:calcRelativeAxisConstraints(o.y,l,d)}}function calcViewportAxisConstraints(o,l){let u=l.min-o.min,d=l.max-o.max;return l.max-l.min<o.max-o.min&&([u,d]=[d,u]),{min:u,max:d}}function calcViewportConstraints(o,l){return{x:calcViewportAxisConstraints(o.x,l.x),y:calcViewportAxisConstraints(o.y,l.y)}}function calcOrigin(o,l){let u=.5;const d=calcLength(o),f=calcLength(l);return f>d?u=progress(l.min,l.max-d,o.min):d>f&&(u=progress(o.min,o.max-f,l.min)),clamp(0,1,u)}function rebaseAxisConstraints(o,l){const u={};return l.min!==void 0&&(u.min=l.min-o.min),l.max!==void 0&&(u.max=l.max-o.min),u}const defaultElastic=.35;function resolveDragElastic(o=defaultElastic){return o===!1?o=0:o===!0&&(o=defaultElastic),{x:resolveAxisElastic(o,"left","right"),y:resolveAxisElastic(o,"top","bottom")}}function resolveAxisElastic(o,l,u){return{min:resolvePointElastic(o,l),max:resolvePointElastic(o,u)}}function resolvePointElastic(o,l){return typeof o=="number"?o:o[l]||0}const elementDragControls=new WeakMap;class VisualElementDragControls{constructor(l){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=l}start(l,{snapToCursor:u=!1,distanceThreshold:d}={}){const{presenceContext:f}=this.visualElement;if(f&&f.isPresent===!1)return;const h=S=>{const{dragSnapToOrigin:E}=this.getProps();E?this.pauseAnimation():this.stopAnimation(),u&&this.snapToCursor(extractEventInfo(S).point)},m=(S,E)=>{const{drag:w,dragPropagation:T,onDragStart:C}=this.getProps();if(w&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=setDragLock(w),!this.openDragLock))return;this.latestPointerEvent=S,this.latestPanInfo=E,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),eachAxis(A=>{let k=this.getAxisMotionValue(A).get()||0;if(percent.test(k)){const{projection:I}=this.visualElement;if(I&&I.layout){const O=I.layout.layoutBox[A];O&&(k=calcLength(O)*(parseFloat(k)/100))}}this.originPoint[A]=k}),C&&frame.postRender(()=>C(S,E)),addValueToWillChange(this.visualElement,"transform");const{animationState:M}=this.visualElement;M&&M.setActive("whileDrag",!0)},g=(S,E)=>{this.latestPointerEvent=S,this.latestPanInfo=E;const{dragPropagation:w,dragDirectionLock:T,onDirectionLock:C,onDrag:M}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:A}=E;if(T&&this.currentDirection===null){this.currentDirection=getCurrentDirection(A),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",E.point,A),this.updateAxis("y",E.point,A),this.visualElement.render(),M&&M(S,E)},v=(S,E)=>{this.latestPointerEvent=S,this.latestPanInfo=E,this.stop(S,E),this.latestPointerEvent=null,this.latestPanInfo=null},x=()=>eachAxis(S=>{var E;return this.getAnimationState(S)==="paused"&&((E=this.getAxisMotionValue(S).animation)==null?void 0:E.play())}),{dragSnapToOrigin:b}=this.getProps();this.panSession=new PanSession(l,{onSessionStart:h,onStart:m,onMove:g,onSessionEnd:v,resumeAnimation:x},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:d,contextWindow:getContextWindow(this.visualElement)})}stop(l,u){const d=l||this.latestPointerEvent,f=u||this.latestPanInfo,h=this.isDragging;if(this.cancel(),!h||!f||!d)return;const{velocity:m}=f;this.startAnimation(m);const{onDragEnd:g}=this.getProps();g&&frame.postRender(()=>g(d,f))}cancel(){this.isDragging=!1;const{projection:l,animationState:u}=this.visualElement;l&&(l.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:d}=this.getProps();!d&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),u&&u.setActive("whileDrag",!1)}updateAxis(l,u,d){const{drag:f}=this.getProps();if(!d||!shouldDrag(l,f,this.currentDirection))return;const h=this.getAxisMotionValue(l);let m=this.originPoint[l]+d[l];this.constraints&&this.constraints[l]&&(m=applyConstraints(m,this.constraints[l],this.elastic[l])),h.set(m)}resolveConstraints(){var h;const{dragConstraints:l,dragElastic:u}=this.getProps(),d=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(h=this.visualElement.projection)==null?void 0:h.layout,f=this.constraints;l&&isRefObject(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&d?this.constraints=calcRelativeConstraints(d.layoutBox,l):this.constraints=!1,this.elastic=resolveDragElastic(u),f!==this.constraints&&d&&this.constraints&&!this.hasMutatedConstraints&&eachAxis(m=>{this.constraints!==!1&&this.getAxisMotionValue(m)&&(this.constraints[m]=rebaseAxisConstraints(d.layoutBox[m],this.constraints[m]))})}resolveRefConstraints(){const{dragConstraints:l,onMeasureDragConstraints:u}=this.getProps();if(!l||!isRefObject(l))return!1;const d=l.current,{projection:f}=this.visualElement;if(!f||!f.layout)return!1;const h=measurePageBox(d,f.root,this.visualElement.getTransformPagePoint());let m=calcViewportConstraints(f.layout.layoutBox,h);if(u){const g=u(convertBoxToBoundingBox(m));this.hasMutatedConstraints=!!g,g&&(m=convertBoundingBoxToBox(g))}return m}startAnimation(l){const{drag:u,dragMomentum:d,dragElastic:f,dragTransition:h,dragSnapToOrigin:m,onDragTransitionEnd:g}=this.getProps(),v=this.constraints||{},x=eachAxis(b=>{if(!shouldDrag(b,u,this.currentDirection))return;let S=v[b]||{};m&&(S={min:0,max:0});const E=f?200:1e6,w=f?40:1e7,T={type:"inertia",velocity:d?l[b]:0,bounceStiffness:E,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(b,T)});return Promise.all(x).then(g)}startAxisValueAnimation(l,u){const d=this.getAxisMotionValue(l);return addValueToWillChange(this.visualElement,l),d.start(animateMotionValue(l,d,0,u,this.visualElement,!1))}stopAnimation(){eachAxis(l=>this.getAxisMotionValue(l).stop())}pauseAnimation(){eachAxis(l=>{var u;return(u=this.getAxisMotionValue(l).animation)==null?void 0:u.pause()})}getAnimationState(l){var u;return(u=this.getAxisMotionValue(l).animation)==null?void 0:u.state}getAxisMotionValue(l){const u=`_drag${l.toUpperCase()}`,d=this.visualElement.getProps(),f=d[u];return f||this.visualElement.getValue(l,(d.initial?d.initial[l]:void 0)||0)}snapToCursor(l){eachAxis(u=>{const{drag:d}=this.getProps();if(!shouldDrag(u,d,this.currentDirection))return;const{projection:f}=this.visualElement,h=this.getAxisMotionValue(u);if(f&&f.layout){const{min:m,max:g}=f.layout.layoutBox[u];h.set(l[u]-mixNumber$1(m,g,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:l,dragConstraints:u}=this.getProps(),{projection:d}=this.visualElement;if(!isRefObject(u)||!d||!this.constraints)return;this.stopAnimation();const f={x:0,y:0};eachAxis(m=>{const g=this.getAxisMotionValue(m);if(g&&this.constraints!==!1){const v=g.get();f[m]=calcOrigin({min:v,max:v},this.constraints[m])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",d.root&&d.root.updateScroll(),d.updateLayout(),this.resolveConstraints(),eachAxis(m=>{if(!shouldDrag(m,l,null))return;const g=this.getAxisMotionValue(m),{min:v,max:x}=this.constraints[m];g.set(mixNumber$1(v,x,f[m]))})}addListeners(){if(!this.visualElement.current)return;elementDragControls.set(this.visualElement,this);const l=this.visualElement.current,u=addPointerEvent(l,"pointerdown",v=>{const{drag:x,dragListener:b=!0}=this.getProps();x&&b&&this.start(v)}),d=()=>{const{dragConstraints:v}=this.getProps();isRefObject(v)&&v.current&&(this.constraints=this.resolveRefConstraints())},{projection:f}=this.visualElement,h=f.addEventListener("measure",d);f&&!f.layout&&(f.root&&f.root.updateScroll(),f.updateLayout()),frame.read(d);const m=addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),g=f.addEventListener("didUpdate",({delta:v,hasLayoutChanged:x})=>{this.isDragging&&x&&(eachAxis(b=>{const S=this.getAxisMotionValue(b);S&&(this.originPoint[b]+=v[b].translate,S.set(S.get()+v[b].translate))}),this.visualElement.render())});return()=>{m(),u(),h(),g&&g()}}getProps(){const l=this.visualElement.getProps(),{drag:u=!1,dragDirectionLock:d=!1,dragPropagation:f=!1,dragConstraints:h=!1,dragElastic:m=defaultElastic,dragMomentum:g=!0}=l;return{...l,drag:u,dragDirectionLock:d,dragPropagation:f,dragConstraints:h,dragElastic:m,dragMomentum:g}}}function shouldDrag(o,l,u){return(l===!0||l===o)&&(u===null||u===o)}function getCurrentDirection(o,l=10){let u=null;return Math.abs(o.y)>l?u="y":Math.abs(o.x)>l&&(u="x"),u}class DragGesture extends Feature{constructor(l){super(l),this.removeGroupControls=noop$2,this.removeListeners=noop$2,this.controls=new VisualElementDragControls(l)}mount(){const{dragControls:l}=this.node.getProps();l&&(this.removeGroupControls=l.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||noop$2}unmount(){this.removeGroupControls(),this.removeListeners()}}const asyncHandler=o=>(l,u)=>{o&&frame.postRender(()=>o(l,u))};class PanGesture extends Feature{constructor(){super(...arguments),this.removePointerDownListener=noop$2}onPointerDown(l){this.session=new PanSession(l,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:l,onPanStart:u,onPan:d,onPanEnd:f}=this.node.getProps();return{onSessionStart:asyncHandler(l),onStart:asyncHandler(u),onMove:d,onEnd:(h,m)=>{delete this.session,f&&frame.postRender(()=>f(h,m))}}}mount(){this.removePointerDownListener=addPointerEvent(this.node.current,"pointerdown",l=>this.onPointerDown(l))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const globalProjectionState={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pixelsToPercent(o,l){return l.max===l.min?0:o/(l.max-l.min)*100}const correctBorderRadius={correct:(o,l)=>{if(!l.target)return o;if(typeof o=="string")if(px.test(o))o=parseFloat(o);else return o;const u=pixelsToPercent(o,l.target.x),d=pixelsToPercent(o,l.target.y);return`${u}% ${d}%`}},correctBoxShadow={correct:(o,{treeScale:l,projectionDelta:u})=>{const d=o,f=complex.parse(o);if(f.length>5)return d;const h=complex.createTransformer(o),m=typeof f[0]!="number"?1:0,g=u.x.scale*l.x,v=u.y.scale*l.y;f[0+m]/=g,f[1+m]/=v;const x=mixNumber$1(g,v,.5);return typeof f[2+m]=="number"&&(f[2+m]/=x),typeof f[3+m]=="number"&&(f[3+m]/=x),h(f)}};let hasTakenAnySnapshot=!1;class MeasureLayoutWithContext extends reactExports.Component{componentDidMount(){const{visualElement:l,layoutGroup:u,switchLayoutGroup:d,layoutId:f}=this.props,{projection:h}=l;addScaleCorrector(defaultScaleCorrectors),h&&(u.group&&u.group.add(h),d&&d.register&&f&&d.register(h),hasTakenAnySnapshot&&h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(l){const{layoutDependency:u,visualElement:d,drag:f,isPresent:h}=this.props,{projection:m}=d;return m&&(m.isPresent=h,hasTakenAnySnapshot=!0,f||l.layoutDependency!==u||u===void 0||l.isPresent!==h?m.willUpdate():this.safeToRemove(),l.isPresent!==h&&(h?m.promote():m.relegate()||frame.postRender(()=>{const g=m.getStack();(!g||!g.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:l}=this.props.visualElement;l&&(l.root.didUpdate(),microtask.postRender(()=>{!l.currentAnimation&&l.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:l,layoutGroup:u,switchLayoutGroup:d}=this.props,{projection:f}=l;hasTakenAnySnapshot=!0,f&&(f.scheduleCheckAfterUnmount(),u&&u.group&&u.group.remove(f),d&&d.deregister&&d.deregister(f))}safeToRemove(){const{safeToRemove:l}=this.props;l&&l()}render(){return null}}function MeasureLayout(o){const[l,u]=usePresence(),d=reactExports.useContext(LayoutGroupContext);return jsxRuntimeExports.jsx(MeasureLayoutWithContext,{...o,layoutGroup:d,switchLayoutGroup:reactExports.useContext(SwitchLayoutGroupContext),isPresent:l,safeToRemove:u})}const defaultScaleCorrectors={borderRadius:{...correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:correctBorderRadius,borderTopRightRadius:correctBorderRadius,borderBottomLeftRadius:correctBorderRadius,borderBottomRightRadius:correctBorderRadius,boxShadow:correctBoxShadow};function animateSingleValue(o,l,u){const d=isMotionValue(o)?o:motionValue(o);return d.start(animateMotionValue("",d,l,u)),d.animation}const compareByDepth=(o,l)=>o.depth-l.depth;class FlatTree{constructor(){this.children=[],this.isDirty=!1}add(l){addUniqueItem(this.children,l),this.isDirty=!0}remove(l){removeItem(this.children,l),this.isDirty=!0}forEach(l){this.isDirty&&this.children.sort(compareByDepth),this.isDirty=!1,this.children.forEach(l)}}function delay$1(o,l){const u=time.now(),d=({timestamp:f})=>{const h=f-u;h>=l&&(cancelFrame(d),o(h-l))};return frame.setup(d,!0),()=>cancelFrame(d)}const borders=["TopLeft","TopRight","BottomLeft","BottomRight"],numBorders=borders.length,asNumber=o=>typeof o=="string"?parseFloat(o):o,isPx=o=>typeof o=="number"||px.test(o);function mixValues(o,l,u,d,f,h){f?(o.opacity=mixNumber$1(0,u.opacity??1,easeCrossfadeIn(d)),o.opacityExit=mixNumber$1(l.opacity??1,0,easeCrossfadeOut(d))):h&&(o.opacity=mixNumber$1(l.opacity??1,u.opacity??1,d));for(let m=0;m<numBorders;m++){const g=`border${borders[m]}Radius`;let v=getRadius(l,g),x=getRadius(u,g);if(v===void 0&&x===void 0)continue;v||(v=0),x||(x=0),v===0||x===0||isPx(v)===isPx(x)?(o[g]=Math.max(mixNumber$1(asNumber(v),asNumber(x),d),0),(percent.test(x)||percent.test(v))&&(o[g]+="%")):o[g]=x}(l.rotate||u.rotate)&&(o.rotate=mixNumber$1(l.rotate||0,u.rotate||0,d))}function getRadius(o,l){return o[l]!==void 0?o[l]:o.borderRadius}const easeCrossfadeIn=compress(0,.5,circOut),easeCrossfadeOut=compress(.5,.95,noop$2);function compress(o,l,u){return d=>d<o?0:d>l?1:u(progress(o,l,d))}function copyAxisInto(o,l){o.min=l.min,o.max=l.max}function copyBoxInto(o,l){copyAxisInto(o.x,l.x),copyAxisInto(o.y,l.y)}function copyAxisDeltaInto(o,l){o.translate=l.translate,o.scale=l.scale,o.originPoint=l.originPoint,o.origin=l.origin}function removePointDelta(o,l,u,d,f){return o-=l,o=scalePoint(o,1/u,d),f!==void 0&&(o=scalePoint(o,1/f,d)),o}function removeAxisDelta(o,l=0,u=1,d=.5,f,h=o,m=o){if(percent.test(l)&&(l=parseFloat(l),l=mixNumber$1(m.min,m.max,l/100)-m.min),typeof l!="number")return;let g=mixNumber$1(h.min,h.max,d);o===h&&(g-=l),o.min=removePointDelta(o.min,l,u,g,f),o.max=removePointDelta(o.max,l,u,g,f)}function removeAxisTransforms(o,l,[u,d,f],h,m){removeAxisDelta(o,l[u],l[d],l[f],l.scale,h,m)}const xKeys=["x","scaleX","originX"],yKeys=["y","scaleY","originY"];function removeBoxTransforms(o,l,u,d){removeAxisTransforms(o.x,l,xKeys,u?u.x:void 0,d?d.x:void 0),removeAxisTransforms(o.y,l,yKeys,u?u.y:void 0,d?d.y:void 0)}function isAxisDeltaZero(o){return o.translate===0&&o.scale===1}function isDeltaZero(o){return isAxisDeltaZero(o.x)&&isAxisDeltaZero(o.y)}function axisEquals(o,l){return o.min===l.min&&o.max===l.max}function boxEquals(o,l){return axisEquals(o.x,l.x)&&axisEquals(o.y,l.y)}function axisEqualsRounded(o,l){return Math.round(o.min)===Math.round(l.min)&&Math.round(o.max)===Math.round(l.max)}function boxEqualsRounded(o,l){return axisEqualsRounded(o.x,l.x)&&axisEqualsRounded(o.y,l.y)}function aspectRatio(o){return calcLength(o.x)/calcLength(o.y)}function axisDeltaEquals(o,l){return o.translate===l.translate&&o.scale===l.scale&&o.originPoint===l.originPoint}class NodeStack{constructor(){this.members=[]}add(l){addUniqueItem(this.members,l),l.scheduleRender()}remove(l){if(removeItem(this.members,l),l===this.prevLead&&(this.prevLead=void 0),l===this.lead){const u=this.members[this.members.length-1];u&&this.promote(u)}}relegate(l){const u=this.members.findIndex(f=>l===f);if(u===0)return!1;let d;for(let f=u;f>=0;f--){const h=this.members[f];if(h.isPresent!==!1){d=h;break}}return d?(this.promote(d),!0):!1}promote(l,u){const d=this.lead;if(l!==d&&(this.prevLead=d,this.lead=l,l.show(),d)){d.instance&&d.scheduleRender(),l.scheduleRender(),l.resumeFrom=d,u&&(l.resumeFrom.preserveOpacity=!0),d.snapshot&&(l.snapshot=d.snapshot,l.snapshot.latestValues=d.animationValues||d.latestValues),l.root&&l.root.isUpdating&&(l.isLayoutDirty=!0);const{crossfade:f}=l.options;f===!1&&d.hide()}}exitAnimationComplete(){this.members.forEach(l=>{const{options:u,resumingFrom:d}=l;u.onExitComplete&&u.onExitComplete(),d&&d.options.onExitComplete&&d.options.onExitComplete()})}scheduleRender(){this.members.forEach(l=>{l.instance&&l.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function buildProjectionTransform(o,l,u){let d="";const f=o.x.translate/l.x,h=o.y.translate/l.y,m=(u==null?void 0:u.z)||0;if((f||h||m)&&(d=`translate3d(${f}px, ${h}px, ${m}px) `),(l.x!==1||l.y!==1)&&(d+=`scale(${1/l.x}, ${1/l.y}) `),u){const{transformPerspective:x,rotate:b,rotateX:S,rotateY:E,skewX:w,skewY:T}=u;x&&(d=`perspective(${x}px) ${d}`),b&&(d+=`rotate(${b}deg) `),S&&(d+=`rotateX(${S}deg) `),E&&(d+=`rotateY(${E}deg) `),w&&(d+=`skewX(${w}deg) `),T&&(d+=`skewY(${T}deg) `)}const g=o.x.scale*l.x,v=o.y.scale*l.y;return(g!==1||v!==1)&&(d+=`scale(${g}, ${v})`),d||"none"}const transformAxes=["","X","Y","Z"],animationTarget=1e3;let id=0;function resetDistortingTransform(o,l,u,d){const{latestValues:f}=l;f[o]&&(u[o]=f[o],l.setStaticValue(o,0),d&&(d[o]=0))}function cancelTreeOptimisedTransformAnimations(o){if(o.hasCheckedOptimisedAppear=!0,o.root===o)return;const{visualElement:l}=o.options;if(!l)return;const u=getOptimisedAppearId(l);if(window.MotionHasOptimisedAnimation(u,"transform")){const{layout:f,layoutId:h}=o.options;window.MotionCancelOptimisedAnimation(u,"transform",frame,!(f||h))}const{parent:d}=o;d&&!d.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(d)}function createProjectionNode({attachResizeListener:o,defaultParent:l,measureScroll:u,checkIsScrollRoot:d,resetTransform:f}){return class{constructor(m={},g=l==null?void 0:l()){this.id=id++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(propagateDirtyNodes),this.nodes.forEach(resolveTargetDelta),this.nodes.forEach(calcProjection),this.nodes.forEach(cleanDirtyNodes)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=m,this.root=g?g.root||g:this,this.path=g?[...g.path,g]:[],this.parent=g,this.depth=g?g.depth+1:0;for(let v=0;v<this.path.length;v++)this.path[v].shouldResetTransform=!0;this.root===this&&(this.nodes=new FlatTree)}addEventListener(m,g){return this.eventHandlers.has(m)||this.eventHandlers.set(m,new SubscriptionManager),this.eventHandlers.get(m).add(g)}notifyListeners(m,...g){const v=this.eventHandlers.get(m);v&&v.notify(...g)}hasListeners(m){return this.eventHandlers.has(m)}mount(m){if(this.instance)return;this.isSVG=isSVGElement(m)&&!isSVGSVGElement(m),this.instance=m;const{layoutId:g,layout:v,visualElement:x}=this.options;if(x&&!x.current&&x.mount(m),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(v||g)&&(this.isLayoutDirty=!0),o){let b,S=0;const E=()=>this.root.updateBlockedByResize=!1;frame.read(()=>{S=window.innerWidth}),o(m,()=>{const w=window.innerWidth;w!==S&&(S=w,this.root.updateBlockedByResize=!0,b&&b(),b=delay$1(E,250),globalProjectionState.hasAnimatedSinceResize&&(globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(finishAnimation)))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&x&&(g||v)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:S,hasRelativeLayoutChanged:E,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const T=this.options.transition||x.getDefaultTransition()||defaultLayoutTransition,{onLayoutAnimationStart:C,onLayoutAnimationComplete:M}=x.getProps(),A=!this.targetLayout||!boxEqualsRounded(this.targetLayout,w),k=!S&&E;if(this.options.layoutRoot||this.resumeFrom||k||S&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const I={...getValueTransition$1(T,"layout"),onPlay:C,onComplete:M};(x.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I),this.setAnimationOrigin(b,k)}else S||finishAnimation(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const m=this.getStack();m&&m.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(resetSkewAndRotation),this.animationId++)}getTransformTemplate(){const{visualElement:m}=this.options;return m&&m.getProps().transformTemplate}willUpdate(m=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cancelTreeOptimisedTransformAnimations(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:g,layout:v}=this.options;if(g===void 0&&!v)return;const x=this.getTransformTemplate();this.prevTransformTemplateValue=x?x(this.latestValues,""):void 0,this.updateSnapshot(),m&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(clearMeasurements);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(clearIsLayoutDirty);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(resetTransformStyle),this.nodes.forEach(updateLayout),this.nodes.forEach(notifyLayoutUpdate)):this.nodes.forEach(clearIsLayoutDirty),this.clearAllSnapshots();const g=time.now();frameData.delta=clamp(0,1e3/60,g-frameData.timestamp),frameData.timestamp=g,frameData.isProcessing=!0,frameSteps.update.process(frameData),frameSteps.preRender.process(frameData),frameSteps.render.process(frameData),frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(clearSnapshot),this.sharedNodes.forEach(removeLeadSnapshots)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!calcLength(this.snapshot.measuredBox.x)&&!calcLength(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let v=0;v<this.path.length;v++)this.path[v].updateScroll();const m=this.layout;this.layout=this.measure(!1),this.layoutCorrected=createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:g}=this.options;g&&g.notify("LayoutMeasure",this.layout.layoutBox,m?m.layoutBox:void 0)}updateScroll(m="measure"){let g=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===m&&(g=!1),g&&this.instance){const v=d(this.instance);this.scroll={animationId:this.root.animationId,phase:m,isRoot:v,offset:u(this.instance),wasRoot:this.scroll?this.scroll.isRoot:v}}}resetTransform(){if(!f)return;const m=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,g=this.projectionDelta&&!isDeltaZero(this.projectionDelta),v=this.getTransformTemplate(),x=v?v(this.latestValues,""):void 0,b=x!==this.prevTransformTemplateValue;m&&this.instance&&(g||hasTransform(this.latestValues)||b)&&(f(this.instance,x),this.shouldResetTransform=!1,this.scheduleRender())}measure(m=!0){const g=this.measurePageBox();let v=this.removeElementScroll(g);return m&&(v=this.removeTransform(v)),roundBox(v),{animationId:this.root.animationId,measuredBox:g,layoutBox:v,latestValues:{},source:this.id}}measurePageBox(){var x;const{visualElement:m}=this.options;if(!m)return createBox();const g=m.measureViewportBox();if(!(((x=this.scroll)==null?void 0:x.wasRoot)||this.path.some(checkNodeWasScrollRoot))){const{scroll:b}=this.root;b&&(translateAxis(g.x,b.offset.x),translateAxis(g.y,b.offset.y))}return g}removeElementScroll(m){var v;const g=createBox();if(copyBoxInto(g,m),(v=this.scroll)!=null&&v.wasRoot)return g;for(let x=0;x<this.path.length;x++){const b=this.path[x],{scroll:S,options:E}=b;b!==this.root&&S&&E.layoutScroll&&(S.wasRoot&&copyBoxInto(g,m),translateAxis(g.x,S.offset.x),translateAxis(g.y,S.offset.y))}return g}applyTransform(m,g=!1){const v=createBox();copyBoxInto(v,m);for(let x=0;x<this.path.length;x++){const b=this.path[x];!g&&b.options.layoutScroll&&b.scroll&&b!==b.root&&transformBox(v,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),hasTransform(b.latestValues)&&transformBox(v,b.latestValues)}return hasTransform(this.latestValues)&&transformBox(v,this.latestValues),v}removeTransform(m){const g=createBox();copyBoxInto(g,m);for(let v=0;v<this.path.length;v++){const x=this.path[v];if(!x.instance||!hasTransform(x.latestValues))continue;hasScale(x.latestValues)&&x.updateSnapshot();const b=createBox(),S=x.measurePageBox();copyBoxInto(b,S),removeBoxTransforms(g,x.latestValues,x.snapshot?x.snapshot.layoutBox:void 0,b)}return hasTransform(this.latestValues)&&removeBoxTransforms(g,this.latestValues),g}setTargetDelta(m){this.targetDelta=m,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(m){this.options={...this.options,...m,crossfade:m.crossfade!==void 0?m.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(m=!1){var E;const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const v=!!this.resumingFrom||this!==g;if(!(m||v&&this.isSharedProjectionDirty||this.isProjectionDirty||(E=this.parent)!=null&&E.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:S}=this.options;if(!(!this.layout||!(b||S))){if(this.resolvedRelativeTargetAt=frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const w=this.getClosestProjectingParent();w&&w.layout&&this.animationProgress!==1?(this.relativeParent=w,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.layout.layoutBox,w.layout.layoutBox),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=createBox(),this.targetWithTransforms=createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):copyBoxInto(this.target,this.layout.layoutBox),applyBoxDelta(this.target,this.targetDelta)):copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const w=this.getClosestProjectingParent();w&&!!w.resumingFrom==!!this.resumingFrom&&!w.options.layoutScroll&&w.target&&this.animationProgress!==1?(this.relativeParent=w,this.forceRelativeParentToResolveTarget(),this.relativeTarget=createBox(),this.relativeTargetOrigin=createBox(),calcRelativePosition(this.relativeTargetOrigin,this.target,w.target),copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||hasScale(this.parent.latestValues)||has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var T;const m=this.getLead(),g=!!this.resumingFrom||this!==m;let v=!0;if((this.isProjectionDirty||(T=this.parent)!=null&&T.isProjectionDirty)&&(v=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(v=!1),this.resolvedRelativeTargetAt===frameData.timestamp&&(v=!1),v)return;const{layout:x,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(x||b))return;copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const S=this.treeScale.x,E=this.treeScale.y;applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,g),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=createBox());const{target:w}=m;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)),calcBoxDelta(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==S||this.treeScale.y!==E||!axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)||!axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(m=!0){var g;if((g=this.options.visualElement)==null||g.scheduleRender(),m){const v=this.getStack();v&&v.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=createDelta(),this.projectionDelta=createDelta(),this.projectionDeltaWithTransform=createDelta()}setAnimationOrigin(m,g=!1){const v=this.snapshot,x=v?v.latestValues:{},b={...this.latestValues},S=createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!g;const E=createBox(),w=v?v.source:void 0,T=this.layout?this.layout.source:void 0,C=w!==T,M=this.getStack(),A=!M||M.members.length<=1,k=!!(C&&!A&&this.options.crossfade===!0&&!this.path.some(hasOpacityCrossfade));this.animationProgress=0;let I;this.mixTargetDelta=O=>{const j=O/1e3;mixAxisDelta(S.x,m.x,j),mixAxisDelta(S.y,m.y,j),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(calcRelativePosition(E,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mixBox(this.relativeTarget,this.relativeTargetOrigin,E,j),I&&boxEquals(this.relativeTarget,I)&&(this.isProjectionDirty=!1),I||(I=createBox()),copyBoxInto(I,this.relativeTarget)),C&&(this.animationValues=b,mixValues(b,x,this.latestValues,j,k,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(m){var g,v,x;this.notifyListeners("animationStart"),(g=this.currentAnimation)==null||g.stop(),(x=(v=this.resumingFrom)==null?void 0:v.currentAnimation)==null||x.stop(),this.pendingAnimation&&(cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=frame.update(()=>{globalProjectionState.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=motionValue(0)),this.currentAnimation=animateSingleValue(this.motionValue,[0,1e3],{...m,velocity:0,isSync:!0,onUpdate:b=>{this.mixTargetDelta(b),m.onUpdate&&m.onUpdate(b)},onStop:()=>{},onComplete:()=>{m.onComplete&&m.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const m=this.getStack();m&&m.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(animationTarget),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const m=this.getLead();let{targetWithTransforms:g,target:v,layout:x,latestValues:b}=m;if(!(!g||!v||!x)){if(this!==m&&this.layout&&x&&shouldAnimatePositionOnly(this.options.animationType,this.layout.layoutBox,x.layoutBox)){v=this.target||createBox();const S=calcLength(this.layout.layoutBox.x);v.x.min=m.target.x.min,v.x.max=v.x.min+S;const E=calcLength(this.layout.layoutBox.y);v.y.min=m.target.y.min,v.y.max=v.y.min+E}copyBoxInto(g,v),transformBox(g,b),calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,g,b)}}registerSharedNode(m,g){this.sharedNodes.has(m)||this.sharedNodes.set(m,new NodeStack),this.sharedNodes.get(m).add(g);const x=g.options.initialPromotionConfig;g.promote({transition:x?x.transition:void 0,preserveFollowOpacity:x&&x.shouldPreserveFollowOpacity?x.shouldPreserveFollowOpacity(g):void 0})}isLead(){const m=this.getStack();return m?m.lead===this:!0}getLead(){var g;const{layoutId:m}=this.options;return m?((g=this.getStack())==null?void 0:g.lead)||this:this}getPrevLead(){var g;const{layoutId:m}=this.options;return m?(g=this.getStack())==null?void 0:g.prevLead:void 0}getStack(){const{layoutId:m}=this.options;if(m)return this.root.sharedNodes.get(m)}promote({needsReset:m,transition:g,preserveFollowOpacity:v}={}){const x=this.getStack();x&&x.promote(this,v),m&&(this.projectionDelta=void 0,this.needsReset=!0),g&&this.setOptions({transition:g})}relegate(){const m=this.getStack();return m?m.relegate(this):!1}resetSkewAndRotation(){const{visualElement:m}=this.options;if(!m)return;let g=!1;const{latestValues:v}=m;if((v.z||v.rotate||v.rotateX||v.rotateY||v.rotateZ||v.skewX||v.skewY)&&(g=!0),!g)return;const x={};v.z&&resetDistortingTransform("z",m,x,this.animationValues);for(let b=0;b<transformAxes.length;b++)resetDistortingTransform(`rotate${transformAxes[b]}`,m,x,this.animationValues),resetDistortingTransform(`skew${transformAxes[b]}`,m,x,this.animationValues);m.render();for(const b in x)m.setStaticValue(b,x[b]),this.animationValues&&(this.animationValues[b]=x[b]);m.scheduleRender()}applyProjectionStyles(m,g){if(!this.instance||this.isSVG)return;if(!this.isVisible){m.visibility="hidden";return}const v=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,m.visibility="",m.opacity="",m.pointerEvents=resolveMotionValue(g==null?void 0:g.pointerEvents)||"",m.transform=v?v(this.latestValues,""):"none";return}const x=this.getLead();if(!this.projectionDelta||!this.layout||!x.target){this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=resolveMotionValue(g==null?void 0:g.pointerEvents)||""),this.hasProjected&&!hasTransform(this.latestValues)&&(m.transform=v?v({},""):"none",this.hasProjected=!1);return}m.visibility="";const b=x.animationValues||x.latestValues;this.applyTransformsToTarget();let S=buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,b);v&&(S=v(b,S)),m.transform=S;const{x:E,y:w}=this.projectionDelta;m.transformOrigin=`${E.origin*100}% ${w.origin*100}% 0`,x.animationValues?m.opacity=x===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:m.opacity=x===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const T in scaleCorrectors){if(b[T]===void 0)continue;const{correct:C,applyTo:M,isCSSVariable:A}=scaleCorrectors[T],k=S==="none"?b[T]:C(b[T],x);if(M){const I=M.length;for(let O=0;O<I;O++)m[M[O]]=k}else A?this.options.visualElement.renderState.vars[T]=k:m[T]=k}this.options.layoutId&&(m.pointerEvents=x===this?resolveMotionValue(g==null?void 0:g.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(m=>{var g;return(g=m.currentAnimation)==null?void 0:g.stop()}),this.root.nodes.forEach(clearMeasurements),this.root.sharedNodes.clear()}}}function updateLayout(o){o.updateLayout()}function notifyLayoutUpdate(o){var u;const l=((u=o.resumeFrom)==null?void 0:u.snapshot)||o.snapshot;if(o.isLead()&&o.layout&&l&&o.hasListeners("didUpdate")){const{layoutBox:d,measuredBox:f}=o.layout,{animationType:h}=o.options,m=l.source!==o.layout.source;h==="size"?eachAxis(S=>{const E=m?l.measuredBox[S]:l.layoutBox[S],w=calcLength(E);E.min=d[S].min,E.max=E.min+w}):shouldAnimatePositionOnly(h,l.layoutBox,d)&&eachAxis(S=>{const E=m?l.measuredBox[S]:l.layoutBox[S],w=calcLength(d[S]);E.max=E.min+w,o.relativeTarget&&!o.currentAnimation&&(o.isProjectionDirty=!0,o.relativeTarget[S].max=o.relativeTarget[S].min+w)});const g=createDelta();calcBoxDelta(g,d,l.layoutBox);const v=createDelta();m?calcBoxDelta(v,o.applyTransform(f,!0),l.measuredBox):calcBoxDelta(v,d,l.layoutBox);const x=!isDeltaZero(g);let b=!1;if(!o.resumeFrom){const S=o.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:E,layout:w}=S;if(E&&w){const T=createBox();calcRelativePosition(T,l.layoutBox,E.layoutBox);const C=createBox();calcRelativePosition(C,d,w.layoutBox),boxEqualsRounded(T,C)||(b=!0),S.options.layoutRoot&&(o.relativeTarget=C,o.relativeTargetOrigin=T,o.relativeParent=S)}}}o.notifyListeners("didUpdate",{layout:d,snapshot:l,delta:v,layoutDelta:g,hasLayoutChanged:x,hasRelativeLayoutChanged:b})}else if(o.isLead()){const{onExitComplete:d}=o.options;d&&d()}o.options.transition=void 0}function propagateDirtyNodes(o){o.parent&&(o.isProjecting()||(o.isProjectionDirty=o.parent.isProjectionDirty),o.isSharedProjectionDirty||(o.isSharedProjectionDirty=!!(o.isProjectionDirty||o.parent.isProjectionDirty||o.parent.isSharedProjectionDirty)),o.isTransformDirty||(o.isTransformDirty=o.parent.isTransformDirty))}function cleanDirtyNodes(o){o.isProjectionDirty=o.isSharedProjectionDirty=o.isTransformDirty=!1}function clearSnapshot(o){o.clearSnapshot()}function clearMeasurements(o){o.clearMeasurements()}function clearIsLayoutDirty(o){o.isLayoutDirty=!1}function resetTransformStyle(o){const{visualElement:l}=o.options;l&&l.getProps().onBeforeLayoutMeasure&&l.notify("BeforeLayoutMeasure"),o.resetTransform()}function finishAnimation(o){o.finishAnimation(),o.targetDelta=o.relativeTarget=o.target=void 0,o.isProjectionDirty=!0}function resolveTargetDelta(o){o.resolveTargetDelta()}function calcProjection(o){o.calcProjection()}function resetSkewAndRotation(o){o.resetSkewAndRotation()}function removeLeadSnapshots(o){o.removeLeadSnapshot()}function mixAxisDelta(o,l,u){o.translate=mixNumber$1(l.translate,0,u),o.scale=mixNumber$1(l.scale,1,u),o.origin=l.origin,o.originPoint=l.originPoint}function mixAxis(o,l,u,d){o.min=mixNumber$1(l.min,u.min,d),o.max=mixNumber$1(l.max,u.max,d)}function mixBox(o,l,u,d){mixAxis(o.x,l.x,u.x,d),mixAxis(o.y,l.y,u.y,d)}function hasOpacityCrossfade(o){return o.animationValues&&o.animationValues.opacityExit!==void 0}const defaultLayoutTransition={duration:.45,ease:[.4,0,.1,1]},userAgentContains=o=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(o),roundPoint=userAgentContains("applewebkit/")&&!userAgentContains("chrome/")?Math.round:noop$2;function roundAxis(o){o.min=roundPoint(o.min),o.max=roundPoint(o.max)}function roundBox(o){roundAxis(o.x),roundAxis(o.y)}function shouldAnimatePositionOnly(o,l,u){return o==="position"||o==="preserve-aspect"&&!isNear(aspectRatio(l),aspectRatio(u),.2)}function checkNodeWasScrollRoot(o){var l;return o!==o.root&&((l=o.scroll)==null?void 0:l.wasRoot)}const DocumentProjectionNode=createProjectionNode({attachResizeListener:(o,l)=>addDomEvent(o,"resize",l),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rootProjectionNode={current:void 0},HTMLProjectionNode=createProjectionNode({measureScroll:o=>({x:o.scrollLeft,y:o.scrollTop}),defaultParent:()=>{if(!rootProjectionNode.current){const o=new DocumentProjectionNode({});o.mount(window),o.setOptions({layoutScroll:!0}),rootProjectionNode.current=o}return rootProjectionNode.current},resetTransform:(o,l)=>{o.style.transform=l!==void 0?l:"none"},checkIsScrollRoot:o=>window.getComputedStyle(o).position==="fixed"}),drag={pan:{Feature:PanGesture},drag:{Feature:DragGesture,ProjectionNode:HTMLProjectionNode,MeasureLayout}};function handleHoverEvent(o,l,u){const{props:d}=o;o.animationState&&d.whileHover&&o.animationState.setActive("whileHover",u==="Start");const f="onHover"+u,h=d[f];h&&frame.postRender(()=>h(l,extractEventInfo(l)))}class HoverGesture extends Feature{mount(){const{current:l}=this.node;l&&(this.unmount=hover(l,(u,d)=>(handleHoverEvent(this.node,d,"Start"),f=>handleHoverEvent(this.node,f,"End"))))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let l=!1;try{l=this.node.current.matches(":focus-visible")}catch{l=!0}!l||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function handlePressEvent(o,l,u){const{props:d}=o;if(o.current instanceof HTMLButtonElement&&o.current.disabled)return;o.animationState&&d.whileTap&&o.animationState.setActive("whileTap",u==="Start");const f="onTap"+(u==="End"?"":u),h=d[f];h&&frame.postRender(()=>h(l,extractEventInfo(l)))}class PressGesture extends Feature{mount(){const{current:l}=this.node;l&&(this.unmount=press(l,(u,d)=>(handlePressEvent(this.node,d,"Start"),(f,{success:h})=>handlePressEvent(this.node,f,h?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=o=>{const l=observerCallbacks.get(o.target);l&&l(o)},fireAllObserverCallbacks=o=>{o.forEach(fireObserverCallback)};function initIntersectionObserver({root:o,...l}){const u=o||document;observers.has(u)||observers.set(u,{});const d=observers.get(u),f=JSON.stringify(l);return d[f]||(d[f]=new IntersectionObserver(fireAllObserverCallbacks,{root:o,...l})),d[f]}function observeIntersection(o,l,u){const d=initIntersectionObserver(l);return observerCallbacks.set(o,u),d.observe(o),()=>{observerCallbacks.delete(o),d.unobserve(o)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:l={}}=this.node.getProps(),{root:u,margin:d,amount:f="some",once:h}=l,m={root:u?u.current:void 0,rootMargin:d,threshold:typeof f=="number"?f:thresholdNames[f]},g=v=>{const{isIntersecting:x}=v;if(this.isInView===x||(this.isInView=x,h&&!x&&this.hasEnteredView))return;x&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",x);const{onViewportEnter:b,onViewportLeave:S}=this.node.getProps(),E=x?b:S;E&&E(v)};return observeIntersection(this.node.current,m,g)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:l,prevProps:u}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(l,u))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:o={}},{viewport:l={}}={}){return u=>o[u]!==l[u]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}},layout={layout:{ProjectionNode:HTMLProjectionNode,MeasureLayout}},featureBundle={...animations,...gestureAnimations,...drag,...layout},motion=createMotionProxy(featureBundle,createDomVisualElement);function useUnmountEffect(o){return reactExports.useEffect(()=>()=>o(),[])}function useMotionValue(o){const l=useConstant(()=>motionValue(o)),{isStatic:u}=reactExports.useContext(MotionConfigContext);if(u){const[,d]=reactExports.useState(o);reactExports.useEffect(()=>l.on("change",d),[])}return l}function isDOMKeyframes(o){return typeof o=="object"&&!Array.isArray(o)}function resolveSubjects(o,l,u,d){return typeof o=="string"&&isDOMKeyframes(l)?resolveElements(o,u,d):o instanceof NodeList?Array.from(o):Array.isArray(o)?o:[o]}function calculateRepeatDuration(o,l,u){return o*(l+1)}function calcNextTime(o,l,u,d){return typeof l=="number"?l:l.startsWith("-")||l.startsWith("+")?Math.max(0,o+parseFloat(l)):l==="<"?u:l.startsWith("<")?Math.max(0,u+parseFloat(l.slice(1))):d.get(l)??o}function eraseKeyframes(o,l,u){for(let d=0;d<o.length;d++){const f=o[d];f.at>l&&f.at<u&&(removeItem(o,f),d--)}}function addKeyframes(o,l,u,d,f,h){eraseKeyframes(o,f,h);for(let m=0;m<l.length;m++)o.push({value:l[m],at:mixNumber$1(f,h,d[m]),easing:getEasingForSegment(u,m)})}function normalizeTimes(o,l){for(let u=0;u<o.length;u++)o[u]=o[u]/(l+1)}function compareByTime(o,l){return o.at===l.at?o.value===null?1:l.value===null?-1:0:o.at-l.at}const defaultSegmentEasing="easeInOut";function createAnimationsFromSequence(o,{defaultTransition:l={},...u}={},d,f){const h=l.duration||.3,m=new Map,g=new Map,v={},x=new Map;let b=0,S=0,E=0;for(let w=0;w<o.length;w++){const T=o[w];if(typeof T=="string"){x.set(T,S);continue}else if(!Array.isArray(T)){x.set(T.name,calcNextTime(S,T.at,b,x));continue}let[C,M,A={}]=T;A.at!==void 0&&(S=calcNextTime(S,A.at,b,x));let k=0;const I=(O,j,N,V=0,z=0)=>{const W=keyframesAsList(O),{delay:X=0,times:ie=defaultOffset(W),type:oe="keyframes",repeat:le,repeatType:Q,repeatDelay:K=0,...$}=j;let{ease:G=l.ease||"easeOut",duration:L}=j;const B=typeof X=="function"?X(V,z):X,q=W.length,U=isGenerator(oe)?oe:f==null?void 0:f[oe||"keyframes"];if(q<=2&&U){let ue=100;if(q===2&&isNumberKeyframesArray(W)){const ee=W[1]-W[0];ue=Math.abs(ee)}const ve={...$};L!==void 0&&(ve.duration=secondsToMilliseconds(L));const fe=createGeneratorEasing(ve,ue,U);G=fe.ease,L=fe.duration}L??(L=h);const Y=S+B;ie.length===1&&ie[0]===0&&(ie[1]=1);const te=ie.length-W.length;if(te>0&&fillOffset(ie,te),W.length===1&&W.unshift(null),le){L=calculateRepeatDuration(L,le);const ue=[...W],ve=[...ie];G=Array.isArray(G)?[...G]:[G];const fe=[...G];for(let ee=0;ee<le;ee++){W.push(...ue);for(let de=0;de<ue.length;de++)ie.push(ve[de]+(ee+1)),G.push(de===0?"linear":getEasingForSegment(fe,de-1))}normalizeTimes(ie,le)}const ae=Y+L;addKeyframes(N,W,G,ie,Y,ae),k=Math.max(B+L,k),E=Math.max(ae,E)};if(isMotionValue(C)){const O=getSubjectSequence(C,g);I(M,A,getValueSequence("default",O))}else{const O=resolveSubjects(C,M,d,v),j=O.length;for(let N=0;N<j;N++){M=M,A=A;const V=O[N],z=getSubjectSequence(V,g);for(const W in M)I(M[W],getValueTransition(A,W),getValueSequence(W,z),N,j)}}b=S,S+=k}return g.forEach((w,T)=>{for(const C in w){const M=w[C];M.sort(compareByTime);const A=[],k=[],I=[];for(let j=0;j<M.length;j++){const{at:N,value:V,easing:z}=M[j];A.push(V),k.push(progress(0,E,N)),I.push(z||"easeOut")}k[0]!==0&&(k.unshift(0),A.unshift(A[0]),I.unshift(defaultSegmentEasing)),k[k.length-1]!==1&&(k.push(1),A.push(null)),m.has(T)||m.set(T,{keyframes:{},transition:{}});const O=m.get(T);O.keyframes[C]=A,O.transition[C]={...l,duration:E,ease:I,times:k,...u}}}),m}function getSubjectSequence(o,l){return!l.has(o)&&l.set(o,{}),l.get(o)}function getValueSequence(o,l){return l[o]||(l[o]=[]),l[o]}function keyframesAsList(o){return Array.isArray(o)?o:[o]}function getValueTransition(o,l){return o&&o[l]?{...o,...o[l]}:{...o}}const isNumber$2=o=>typeof o=="number",isNumberKeyframesArray=o=>o.every(isNumber$2);function isObjectKey(o,l){return o in l}class ObjectVisualElement extends VisualElement{constructor(){super(...arguments),this.type="object"}readValueFromInstance(l,u){if(isObjectKey(u,l)){const d=l[u];if(typeof d=="string"||typeof d=="number")return d}}getBaseTargetFromProps(){}removeValueFromRenderState(l,u){delete u.output[l]}measureInstanceViewportBox(){return createBox()}build(l,u){Object.assign(l.output,u)}renderInstance(l,{output:u}){Object.assign(l,u)}sortInstanceNodePosition(){return 0}}function createDOMVisualElement(o){const l={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},u=isSVGElement(o)&&!isSVGSVGElement(o)?new SVGVisualElement(l):new HTMLVisualElement(l);u.mount(o),visualElementStore.set(o,u)}function createObjectVisualElement(o){const l={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},u=new ObjectVisualElement(l);u.mount(o),visualElementStore.set(o,u)}function isSingleValue(o,l){return isMotionValue(o)||typeof o=="number"||typeof o=="string"&&!isDOMKeyframes(l)}function animateSubject(o,l,u,d){const f=[];if(isSingleValue(o,l))f.push(animateSingleValue(o,isDOMKeyframes(l)&&l.default||l,u&&(u.default||u)));else{const h=resolveSubjects(o,l,d),m=h.length;for(let g=0;g<m;g++){const v=h[g],x=v instanceof Element?createDOMVisualElement:createObjectVisualElement;visualElementStore.has(v)||x(v);const b=visualElementStore.get(v),S={...u};"delay"in S&&typeof S.delay=="function"&&(S.delay=S.delay(g,m)),f.push(...animateTarget(b,{...l,transition:S},{}))}}return f}function animateSequence(o,l,u){const d=[];return createAnimationsFromSequence(o,l,u,{spring}).forEach(({keyframes:h,transition:m},g)=>{d.push(...animateSubject(g,h,m))}),d}function isSequence(o){return Array.isArray(o)&&o.some(Array.isArray)}function createScopedAnimate(o){function l(u,d,f){let h=[],m;if(isSequence(u))h=animateSequence(u,d,o);else{const{onComplete:v,...x}=f||{};typeof v=="function"&&(m=v),h=animateSubject(u,d,x,o)}const g=new GroupAnimationWithThen(h);return m&&g.finished.then(m),o&&(o.animations.push(g),g.finished.then(()=>{removeItem(o.animations,g)})),g}return l}function useAnimate(){const o=useConstant(()=>({current:null,animations:[]})),l=useConstant(()=>createScopedAnimate(o));return useUnmountEffect(()=>{o.animations.forEach(u=>u.stop()),o.animations.length=0}),[o,l]}var define_process_env_default$6={NODE_ENV:"production",version:"1.94.2",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const ASSETS_BASE_URL=define_process_env_default$6.ASSETS_BASE_URL;function assetUrl(o){return`${ASSETS_BASE_URL}/${o}`}const image$1=assetUrl("icon_diamond.webp"),IconBalanceGems=({style:o,...l})=>jsxRuntimeExports.jsx("img",{src:image$1,style:{aspectRatio:"1/1",...o},...l,alt:""});function r(o){var l,u,d="";if(typeof o=="string"||typeof o=="number")d+=o;else if(typeof o=="object")if(Array.isArray(o)){var f=o.length;for(l=0;l<f;l++)o[l]&&(u=r(o[l]))&&(d&&(d+=" "),d+=u)}else for(u in o)o[u]&&(d&&(d+=" "),d+=u);return d}function clsx(){for(var o,l,u=0,d="",f=arguments.length;u<f;u++)(o=arguments[u])&&(l=r(o))&&(d&&(d+=" "),d+=l);return d}const CLASS_PART_SEPARATOR="-",createClassGroupUtils=o=>{const l=createClassMap(o),{conflictingClassGroups:u,conflictingClassGroupModifiers:d}=o;return{getClassGroupId:m=>{const g=m.split(CLASS_PART_SEPARATOR);return g[0]===""&&g.length!==1&&g.shift(),getGroupRecursive(g,l)||getGroupIdForArbitraryProperty(m)},getConflictingClassGroupIds:(m,g)=>{const v=u[m]||[];return g&&d[m]?[...v,...d[m]]:v}}},getGroupRecursive=(o,l)=>{var m;if(o.length===0)return l.classGroupId;const u=o[0],d=l.nextPart.get(u),f=d?getGroupRecursive(o.slice(1),d):void 0;if(f)return f;if(l.validators.length===0)return;const h=o.join(CLASS_PART_SEPARATOR);return(m=l.validators.find(({validator:g})=>g(h)))==null?void 0:m.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=o=>{if(arbitraryPropertyRegex.test(o)){const l=arbitraryPropertyRegex.exec(o)[1],u=l==null?void 0:l.substring(0,l.indexOf(":"));if(u)return"arbitrary.."+u}},createClassMap=o=>{const{theme:l,classGroups:u}=o,d={nextPart:new Map,validators:[]};for(const f in u)processClassesRecursively(u[f],d,f,l);return d},processClassesRecursively=(o,l,u,d)=>{o.forEach(f=>{if(typeof f=="string"){const h=f===""?l:getPart(l,f);h.classGroupId=u;return}if(typeof f=="function"){if(isThemeGetter(f)){processClassesRecursively(f(d),l,u,d);return}l.validators.push({validator:f,classGroupId:u});return}Object.entries(f).forEach(([h,m])=>{processClassesRecursively(m,getPart(l,h),u,d)})})},getPart=(o,l)=>{let u=o;return l.split(CLASS_PART_SEPARATOR).forEach(d=>{u.nextPart.has(d)||u.nextPart.set(d,{nextPart:new Map,validators:[]}),u=u.nextPart.get(d)}),u},isThemeGetter=o=>o.isThemeGetter,createLruCache=o=>{if(o<1)return{get:()=>{},set:()=>{}};let l=0,u=new Map,d=new Map;const f=(h,m)=>{u.set(h,m),l++,l>o&&(l=0,d=u,u=new Map)};return{get(h){let m=u.get(h);if(m!==void 0)return m;if((m=d.get(h))!==void 0)return f(h,m),m},set(h,m){u.has(h)?u.set(h,m):f(h,m)}}},IMPORTANT_MODIFIER="!",MODIFIER_SEPARATOR=":",MODIFIER_SEPARATOR_LENGTH=MODIFIER_SEPARATOR.length,createParseClassName=o=>{const{prefix:l,experimentalParseClassName:u}=o;let d=f=>{const h=[];let m=0,g=0,v=0,x;for(let T=0;T<f.length;T++){let C=f[T];if(m===0&&g===0){if(C===MODIFIER_SEPARATOR){h.push(f.slice(v,T)),v=T+MODIFIER_SEPARATOR_LENGTH;continue}if(C==="/"){x=T;continue}}C==="["?m++:C==="]"?m--:C==="("?g++:C===")"&&g--}const b=h.length===0?f:f.substring(v),S=stripImportantModifier(b),E=S!==b,w=x&&x>v?x-v:void 0;return{modifiers:h,hasImportantModifier:E,baseClassName:S,maybePostfixModifierPosition:w}};if(l){const f=l+MODIFIER_SEPARATOR,h=d;d=m=>m.startsWith(f)?h(m.substring(f.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:m,maybePostfixModifierPosition:void 0}}if(u){const f=d;d=h=>u({className:h,parseClassName:f})}return d},stripImportantModifier=o=>o.endsWith(IMPORTANT_MODIFIER)?o.substring(0,o.length-1):o.startsWith(IMPORTANT_MODIFIER)?o.substring(1):o,createSortModifiers=o=>{const l=Object.fromEntries(o.orderSensitiveModifiers.map(d=>[d,!0]));return d=>{if(d.length<=1)return d;const f=[];let h=[];return d.forEach(m=>{m[0]==="["||l[m]?(f.push(...h.sort(),m),h=[]):h.push(m)}),f.push(...h.sort()),f}},createConfigUtils=o=>({cache:createLruCache(o.cacheSize),parseClassName:createParseClassName(o),sortModifiers:createSortModifiers(o),...createClassGroupUtils(o)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(o,l)=>{const{parseClassName:u,getClassGroupId:d,getConflictingClassGroupIds:f,sortModifiers:h}=l,m=[],g=o.trim().split(SPLIT_CLASSES_REGEX);let v="";for(let x=g.length-1;x>=0;x-=1){const b=g[x],{isExternal:S,modifiers:E,hasImportantModifier:w,baseClassName:T,maybePostfixModifierPosition:C}=u(b);if(S){v=b+(v.length>0?" "+v:v);continue}let M=!!C,A=d(M?T.substring(0,C):T);if(!A){if(!M){v=b+(v.length>0?" "+v:v);continue}if(A=d(T),!A){v=b+(v.length>0?" "+v:v);continue}M=!1}const k=h(E).join(":"),I=w?k+IMPORTANT_MODIFIER:k,O=I+A;if(m.includes(O))continue;m.push(O);const j=f(A,M);for(let N=0;N<j.length;++N){const V=j[N];m.push(I+V)}v=b+(v.length>0?" "+v:v)}return v};function twJoin(){let o=0,l,u,d="";for(;o<arguments.length;)(l=arguments[o++])&&(u=toValue(l))&&(d&&(d+=" "),d+=u);return d}const toValue=o=>{if(typeof o=="string")return o;let l,u="";for(let d=0;d<o.length;d++)o[d]&&(l=toValue(o[d]))&&(u&&(u+=" "),u+=l);return u};function createTailwindMerge(o,...l){let u,d,f,h=m;function m(v){const x=l.reduce((b,S)=>S(b),o());return u=createConfigUtils(x),d=u.cache.get,f=u.cache.set,h=g,g(v)}function g(v){const x=d(v);if(x)return x;const b=mergeClassList(v,u);return f(v,b),b}return function(){return h(twJoin.apply(null,arguments))}}const fromTheme=o=>{const l=u=>u[o]||[];return l.isThemeGetter=!0,l},arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fractionRegex=/^\d+\/\d+$/,tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isFraction=o=>fractionRegex.test(o),isNumber$1=o=>!!o&&!Number.isNaN(Number(o)),isInteger=o=>!!o&&Number.isInteger(Number(o)),isPercent=o=>o.endsWith("%")&&isNumber$1(o.slice(0,-1)),isTshirtSize=o=>tshirtUnitRegex.test(o),isAny=()=>!0,isLengthOnly=o=>lengthUnitRegex.test(o)&&!colorFunctionRegex.test(o),isNever=()=>!1,isShadow=o=>shadowRegex.test(o),isImage=o=>imageRegex.test(o),isAnyNonArbitrary=o=>!isArbitraryValue(o)&&!isArbitraryVariable(o),isArbitrarySize=o=>getIsArbitraryValue(o,isLabelSize,isNever),isArbitraryValue=o=>arbitraryValueRegex.test(o),isArbitraryLength=o=>getIsArbitraryValue(o,isLabelLength,isLengthOnly),isArbitraryNumber=o=>getIsArbitraryValue(o,isLabelNumber,isNumber$1),isArbitraryPosition=o=>getIsArbitraryValue(o,isLabelPosition,isNever),isArbitraryImage=o=>getIsArbitraryValue(o,isLabelImage,isImage),isArbitraryShadow=o=>getIsArbitraryValue(o,isLabelShadow,isShadow),isArbitraryVariable=o=>arbitraryVariableRegex.test(o),isArbitraryVariableLength=o=>getIsArbitraryVariable(o,isLabelLength),isArbitraryVariableFamilyName=o=>getIsArbitraryVariable(o,isLabelFamilyName),isArbitraryVariablePosition=o=>getIsArbitraryVariable(o,isLabelPosition),isArbitraryVariableSize=o=>getIsArbitraryVariable(o,isLabelSize),isArbitraryVariableImage=o=>getIsArbitraryVariable(o,isLabelImage),isArbitraryVariableShadow=o=>getIsArbitraryVariable(o,isLabelShadow,!0),getIsArbitraryValue=(o,l,u)=>{const d=arbitraryValueRegex.exec(o);return d?d[1]?l(d[1]):u(d[2]):!1},getIsArbitraryVariable=(o,l,u=!1)=>{const d=arbitraryVariableRegex.exec(o);return d?d[1]?l(d[1]):u:!1},isLabelPosition=o=>o==="position"||o==="percentage",isLabelImage=o=>o==="image"||o==="url",isLabelSize=o=>o==="length"||o==="size"||o==="bg-size",isLabelLength=o=>o==="length",isLabelNumber=o=>o==="number",isLabelFamilyName=o=>o==="family-name",isLabelShadow=o=>o==="shadow",getDefaultConfig=()=>{const o=fromTheme("color"),l=fromTheme("font"),u=fromTheme("text"),d=fromTheme("font-weight"),f=fromTheme("tracking"),h=fromTheme("leading"),m=fromTheme("breakpoint"),g=fromTheme("container"),v=fromTheme("spacing"),x=fromTheme("radius"),b=fromTheme("shadow"),S=fromTheme("inset-shadow"),E=fromTheme("text-shadow"),w=fromTheme("drop-shadow"),T=fromTheme("blur"),C=fromTheme("perspective"),M=fromTheme("aspect"),A=fromTheme("ease"),k=fromTheme("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...O(),isArbitraryVariable,isArbitraryValue],N=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],z=()=>[isArbitraryVariable,isArbitraryValue,v],W=()=>[isFraction,"full","auto",...z()],X=()=>[isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue],ie=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue],oe=()=>[isInteger,"auto",isArbitraryVariable,isArbitraryValue],le=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...z()],G=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],L=()=>[o,isArbitraryVariable,isArbitraryValue],B=()=>[...O(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}],Y=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength],te=()=>["","none","full",x,isArbitraryVariable,isArbitraryValue],ae=()=>["",isNumber$1,isArbitraryVariableLength,isArbitraryLength],ue=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[isNumber$1,isPercent,isArbitraryVariablePosition,isArbitraryPosition],ee=()=>["","none",T,isArbitraryVariable,isArbitraryValue],de=()=>["none",isNumber$1,isArbitraryVariable,isArbitraryValue],ge=()=>["none",isNumber$1,isArbitraryVariable,isArbitraryValue],he=()=>[isNumber$1,isArbitraryVariable,isArbitraryValue],Se=()=>[isFraction,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber$1],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,M]}],container:["container"],columns:[{columns:[isNumber$1,isArbitraryValue,isArbitraryVariable,g]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",g,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[isNumber$1,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],order:[{order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[g,"screen",...G()]}],"min-w":[{"min-w":[g,"screen","none",...G()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[m]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",u,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[d,isArbitraryVariable,isArbitraryNumber]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[{font:[isArbitraryVariableFamilyName,isArbitraryValue,l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[f,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber$1,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[h,...z()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber$1,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[isNumber$1,"auto",isArbitraryVariable,isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage,isArbitraryImage]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber$1,isArbitraryVariableLength,isArbitraryLength]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",b,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",S,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[isNumber$1,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",E,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[isNumber$1]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[isNumber$1]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[{filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:ee()}],brightness:[{brightness:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",w,isArbitraryVariableShadow,isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],invert:[{invert:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber$1,isArbitraryVariable,isArbitraryValue]}],"backdrop-sepia":[{"backdrop-sepia":["",isNumber$1,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber$1,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",A,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[isNumber$1,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",k,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,isArbitraryVariable,isArbitraryValue]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[isNumber$1,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},twMerge=createTailwindMerge(getDefaultConfig);function cn$1(...o){return twMerge(clsx(o))}function Drawer({children:o,headerOptions:l,closeButtonStyles:u,className:d,variant:f="default",style:h,...m}){return jsxRuntimeExports.jsx(Modal,{header:jsxRuntimeExports.jsx(Modal.Header,{after:jsxRuntimeExports.jsx(Modal.Close,{children:jsxRuntimeExports.jsx(Icon28Close,{style:{color:"var(--tgui--secondary_color)",...u}})}),style:{zIndex:1,position:"absolute",top:0,left:0,right:0,backgroundColor:"transparent",borderRadius:"inherit",overflow:"hidden",...l==null?void 0:l.style},className:cn$1("before:hidden",l==null?void 0:l.className),...l}),className:cn$1("pb-0",d),style:f==="secondary"?{backgroundColor:"var(--tgui--secondary_bg_color)",...h}:h,...m,children:o})}const DrawerContent=reactExports.forwardRef(({children:o,className:l,...u},d)=>jsxRuntimeExports.jsx("div",{ref:d,className:cn$1("flex flex-col text-center px-4 pt-7.5 gap-6 pb-[calc(var(--tg-safe-area-inset-bottom)+6px)]",l),...u,children:o})),useAnimateNumber=(o,l=!0,u=!1)=>{const[,d]=useAnimate(),[f,h]=React.useState(l?0:o),m=useMotionValue(l?0:o),g=React.useRef(o);return m.on("change",x=>{const S=Math.abs(x-g.current)<.001;h(S?u?g.current:Math.round(g.current):u?x:Math.round(x))}),reactExports.useEffect(()=>{g.current=o;const x=d(m,o,{ease:"easeOut",duration:.1});return()=>x.stop()},[m,o,d]),[f,x=>{g.current=x;const b=d(m,x,{ease:"easeOut",duration:.1});return()=>b.stop()}]},XpProgress=({level:o,experience:l,xpNeeded:u,className:d,size:f=40,levelFontSize:h})=>{const[m]=useAnimateNumber(l),[g]=useAnimateNumber(o),v=4,x=Math.round(m/u*100)/100,b=f,S=b/2-v/2,E=2*Math.PI*S,w=formatCompactNumber(g),T=h||`${b*.6/(1+.4*(w.length-1))}px`;return jsxRuntimeExports.jsxs("div",{className:cn$1("relative flex justify-center items-center overflow-hidden",d),style:{width:f,height:f},children:[jsxRuntimeExports.jsx(Text,{className:"text-rounded",style:{fontSize:T,lineHeight:`${f||b}px`,fontWeight:800},children:w}),jsxRuntimeExports.jsxs(motion.svg,{width:b,height:b,viewBox:`0 0 ${b} ${b}`,className:"absolute inset-0 text-inherit",children:[jsxRuntimeExports.jsx("title",{children:"Xp progress background"}),jsxRuntimeExports.jsx(motion.circle,{cx:b/2,cy:b/2,r:S,opacity:.2,stroke:"currentColor",fill:"none",strokeWidth:v})]},"bg"),jsxRuntimeExports.jsxs(motion.svg,{width:b,height:b,viewBox:`0 0 ${b} ${b}`,className:"absolute inset-0 -rotate-90",children:[jsxRuntimeExports.jsx("title",{children:"Xp progress"}),jsxRuntimeExports.jsx(motion.circle,{cx:b/2,cy:b/2,r:S,fill:"none",stroke:"currentColor",strokeWidth:v,strokeLinecap:"round",initial:{strokeDasharray:E,strokeDashoffset:E},animate:{strokeDashoffset:(1-x)*E},transition:{strokeDashoffset:{ease:"easeOut",duration:2}}})]},"fg")]})},dividePriceResponse=o=>o/100,DEBUG_BUILD$2=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,GLOBAL_OBJ=globalThis,SDK_VERSION="10.18.0";function getMainCarrier(){return getSentryCarrier(GLOBAL_OBJ),GLOBAL_OBJ}function getSentryCarrier(o){const l=o.__SENTRY__=o.__SENTRY__||{};return l.version=l.version||SDK_VERSION,l[SDK_VERSION]=l[SDK_VERSION]||{}}function getGlobalSingleton(o,l,u=GLOBAL_OBJ){const d=u.__SENTRY__=u.__SENTRY__||{},f=d[SDK_VERSION]=d[SDK_VERSION]||{};return f[o]||(f[o]=l())}const CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],PREFIX="Sentry Logger ",originalConsoleMethods={};function consoleSandbox(o){if(!("console"in GLOBAL_OBJ))return o();const l=GLOBAL_OBJ.console,u={},d=Object.keys(originalConsoleMethods);d.forEach(f=>{const h=originalConsoleMethods[f];u[f]=l[f],l[f]=h});try{return o()}finally{d.forEach(f=>{l[f]=u[f]})}}function enable(){_getLoggerSettings().enabled=!0}function disable(){_getLoggerSettings().enabled=!1}function isEnabled(){return _getLoggerSettings().enabled}function log$6(...o){_maybeLog("log",...o)}function warn(...o){_maybeLog("warn",...o)}function error(...o){_maybeLog("error",...o)}function _maybeLog(o,...l){DEBUG_BUILD$2&&isEnabled()&&consoleSandbox(()=>{GLOBAL_OBJ.console[o](`${PREFIX}[${o}]:`,...l)})}function _getLoggerSettings(){return DEBUG_BUILD$2?getGlobalSingleton("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const debug={enable,disable,isEnabled,log:log$6,warn,error},STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...o){const l=o.sort((u,d)=>u[0]-d[0]).map(u=>u[1]);return(u,d=0,f=0)=>{const h=[],m=u.split(`
100
100
  `);for(let g=d;g<m.length;g++){let v=m[g];v.length>1024&&(v=v.slice(0,1024));const x=WEBPACK_ERROR_REGEXP.test(v)?v.replace(WEBPACK_ERROR_REGEXP,"$1"):v;if(!x.match(/\S*Error: /)){for(const b of l){const S=b(x);if(S){h.push(S);break}}if(h.length>=STACKTRACE_FRAME_LIMIT+f)break}}return stripSentryFramesAndReverse(h.slice(f))}}function stackParserFromStackParserOptions(o){return Array.isArray(o)?createStackParser(...o):o}function stripSentryFramesAndReverse(o){if(!o.length)return[];const l=Array.from(o);return/sentryWrapped/.test(getLastStackFrame(l).function||"")&&l.pop(),l.reverse(),STRIP_FRAME_REGEXP.test(getLastStackFrame(l).function||"")&&(l.pop(),STRIP_FRAME_REGEXP.test(getLastStackFrame(l).function||"")&&l.pop()),l.slice(0,STACKTRACE_FRAME_LIMIT).map(u=>({...u,filename:u.filename||getLastStackFrame(l).filename,function:u.function||UNKNOWN_FUNCTION}))}function getLastStackFrame(o){return o[o.length-1]||{}}const defaultFunctionName="<anonymous>";function getFunctionName(o){try{return!o||typeof o!="function"?defaultFunctionName:o.name||defaultFunctionName}catch{return defaultFunctionName}}function getFramesFromEvent(o){const l=o.exception;if(l){const u=[];try{return l.values.forEach(d=>{d.stacktrace.frames&&u.push(...d.stacktrace.frames)}),u}catch{return}}}const handlers={},instrumented={};function addHandler(o,l){handlers[o]=handlers[o]||[],handlers[o].push(l)}function maybeInstrument(o,l){if(!instrumented[o]){instrumented[o]=!0;try{l()}catch(u){DEBUG_BUILD$2&&debug.error(`Error while instrumenting ${o}`,u)}}}function triggerHandlers(o,l){const u=o&&handlers[o];if(u)for(const d of u)try{d(l)}catch(f){DEBUG_BUILD$2&&debug.error(`Error while triggering instrumentation handler.
101
101
  Type: ${o}
102
102
  Name: ${getFunctionName(d)}
@@ -110,7 +110,7 @@ Event: ${getEventDescription(o)}`),!0;if(_isDeniedUrl(o,l.denyUrls))return DEBUG
110
110
  Event: ${getEventDescription(o)}.
111
111
  Url: ${_getEventFilterUrl(o)}`),!0;if(!_isAllowedUrl(o,l.allowUrls))return DEBUG_BUILD$2&&debug.warn(`Event dropped due to not being matched by \`allowUrls\` option.
112
112
  Event: ${getEventDescription(o)}.
113
- Url: ${_getEventFilterUrl(o)}`),!0}return!1}function _isIgnoredError(o,l){return l!=null&&l.length?getPossibleEventMessages(o).some(u=>stringMatchesSomePattern(u,l)):!1}function _isIgnoredTransaction(o,l){if(!(l!=null&&l.length))return!1;const u=o.transaction;return u?stringMatchesSomePattern(u,l):!1}function _isDeniedUrl(o,l){if(!(l!=null&&l.length))return!1;const u=_getEventFilterUrl(o);return u?stringMatchesSomePattern(u,l):!1}function _isAllowedUrl(o,l){if(!(l!=null&&l.length))return!0;const u=_getEventFilterUrl(o);return u?stringMatchesSomePattern(u,l):!0}function _getLastValidUrl(o=[]){for(let l=o.length-1;l>=0;l--){const u=o[l];if(u&&u.filename!=="<anonymous>"&&u.filename!=="[native code]")return u.filename||null}return null}function _getEventFilterUrl(o){var l,u;try{const d=[...((l=o.exception)==null?void 0:l.values)??[]].reverse().find(h=>{var m,g,v;return((m=h.mechanism)==null?void 0:m.parent_id)===void 0&&((v=(g=h.stacktrace)==null?void 0:g.frames)==null?void 0:v.length)}),f=(u=d==null?void 0:d.stacktrace)==null?void 0:u.frames;return f?_getLastValidUrl(f):null}catch{return DEBUG_BUILD$2&&debug.error(`Cannot extract url for event ${getEventDescription(o)}`),null}}function _isUselessError(o){var l,u;return(u=(l=o.exception)==null?void 0:l.values)!=null&&u.length?!o.message&&!o.exception.values.some(d=>d.stacktrace||d.type&&d.type!=="Error"||d.value):!1}function applyAggregateErrorsToEvent(o,l,u,d,f,h){var g;if(!((g=f.exception)!=null&&g.values)||!h||!isInstanceOf(h.originalException,Error))return;const m=f.exception.values.length>0?f.exception.values[f.exception.values.length-1]:void 0;m&&(f.exception.values=aggregateExceptionsFromError(o,l,d,h.originalException,u,f.exception.values,m,0))}function aggregateExceptionsFromError(o,l,u,d,f,h,m,g){if(h.length>=u+1)return h;let v=[...h];if(isInstanceOf(d[f],Error)){applyExceptionGroupFieldsForParentException(m,g);const x=o(l,d[f]),b=v.length;applyExceptionGroupFieldsForChildException(x,f,b,g),v=aggregateExceptionsFromError(o,l,u,d[f],f,[x,...v],x,b)}return Array.isArray(d.errors)&&d.errors.forEach((x,b)=>{if(isInstanceOf(x,Error)){applyExceptionGroupFieldsForParentException(m,g);const S=o(l,x),E=v.length;applyExceptionGroupFieldsForChildException(S,`errors[${b}]`,E,g),v=aggregateExceptionsFromError(o,l,u,x,f,[S,...v],S,E)}}),v}function applyExceptionGroupFieldsForParentException(o,l){o.mechanism={handled:!0,type:"auto.core.linked_errors",...o.mechanism,...o.type==="AggregateError"&&{is_exception_group:!0},exception_id:l}}function applyExceptionGroupFieldsForChildException(o,l,u,d){o.mechanism={handled:!0,...o.mechanism,type:"chained",source:l,exception_id:u,parent_id:d}}function addConsoleInstrumentationHandler(o){const l="console";addHandler(l,o),maybeInstrument(l,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(o){o in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,o,function(l){return originalConsoleMethods[o]=l,function(...u){triggerHandlers("console",{args:u,level:o});const f=originalConsoleMethods[o];f==null||f.apply(GLOBAL_OBJ.console,u)}})})}function severityLevelFromString(o){return o==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(o)?o:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let o;return{name:INTEGRATION_NAME$4,processEvent(l){if(l.type)return l;try{if(_shouldDropEvent(l,o))return DEBUG_BUILD$2&&debug.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return o=l}}},dedupeIntegration=_dedupeIntegration;function _shouldDropEvent(o,l){return l?!!(_isSameMessageEvent(o,l)||_isSameExceptionEvent(o,l)):!1}function _isSameMessageEvent(o,l){const u=o.message,d=l.message;return!(!u&&!d||u&&!d||!u&&d||u!==d||!_isSameFingerprint(o,l)||!_isSameStacktrace(o,l))}function _isSameExceptionEvent(o,l){const u=_getExceptionFromEvent(l),d=_getExceptionFromEvent(o);return!(!u||!d||u.type!==d.type||u.value!==d.value||!_isSameFingerprint(o,l)||!_isSameStacktrace(o,l))}function _isSameStacktrace(o,l){let u=getFramesFromEvent(o),d=getFramesFromEvent(l);if(!u&&!d)return!0;if(u&&!d||!u&&d||(u=u,d=d,d.length!==u.length))return!1;for(let f=0;f<d.length;f++){const h=d[f],m=u[f];if(h.filename!==m.filename||h.lineno!==m.lineno||h.colno!==m.colno||h.function!==m.function)return!1}return!0}function _isSameFingerprint(o,l){let u=o.fingerprint,d=l.fingerprint;if(!u&&!d)return!0;if(u&&!d||!u&&d)return!1;u=u,d=d;try{return u.join("")===d.join("")}catch{return!1}}function _getExceptionFromEvent(o){var l,u;return(u=(l=o.exception)==null?void 0:l.values)==null?void 0:u[0]}function getBreadcrumbLogLevelFromHttpStatusCode(o){if(o!==void 0)return o>=400&&o<500?"warning":o>=500?"error":void 0}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){return"history"in WINDOW$2&&!!WINDOW$2.history}function _isFetchSupported(){if(!("fetch"in WINDOW$2))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFunction(o){return o&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(o.toString())}function supportsNativeFetch(){var u;if(typeof EdgeRuntime=="string")return!0;if(!_isFetchSupported())return!1;if(isNativeFunction(WINDOW$2.fetch))return!0;let o=!1;const l=WINDOW$2.document;if(l&&typeof l.createElement=="function")try{const d=l.createElement("iframe");d.hidden=!0,l.head.appendChild(d),(u=d.contentWindow)!=null&&u.fetch&&(o=isNativeFunction(d.contentWindow.fetch)),l.head.removeChild(d)}catch(d){DEBUG_BUILD$2&&debug.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",d)}return o}function addFetchInstrumentationHandler(o,l){const u="fetch";addHandler(u,o),maybeInstrument(u,()=>instrumentFetch(void 0,l))}function instrumentFetch(o,l=!1){l&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",function(u){return function(...d){const f=new Error,{method:h,url:m}=parseFetchArgs(d),g={args:d,fetchData:{method:h,url:m},startTimestamp:timestampInSeconds()*1e3,virtualError:f,headers:getHeadersFromFetchArgs(d)};return triggerHandlers("fetch",{...g}),u.apply(GLOBAL_OBJ,d).then(async v=>(triggerHandlers("fetch",{...g,endTimestamp:timestampInSeconds()*1e3,response:v}),v),v=>{if(triggerHandlers("fetch",{...g,endTimestamp:timestampInSeconds()*1e3,error:v}),isError(v)&&v.stack===void 0&&(v.stack=f.stack,addNonEnumerableProperty(v,"framesToPop",1)),v instanceof TypeError&&(v.message==="Failed to fetch"||v.message==="Load failed"||v.message==="NetworkError when attempting to fetch resource."))try{const x=new URL(g.fetchData.url);v.message=`${v.message} (${x.host})`}catch{}throw v})}})}function hasProp(o,l){return!!o&&typeof o=="object"&&!!o[l]}function getUrlFromResource(o){return typeof o=="string"?o:o?hasProp(o,"url")?o.url:o.toString?o.toString():"":""}function parseFetchArgs(o){if(o.length===0)return{method:"GET",url:""};if(o.length===2){const[u,d]=o;return{url:getUrlFromResource(u),method:hasProp(d,"method")?String(d.method).toUpperCase():"GET"}}const l=o[0];return{url:getUrlFromResource(l),method:hasProp(l,"method")?String(l.method).toUpperCase():"GET"}}function getHeadersFromFetchArgs(o){const[l,u]=o;try{if(typeof u=="object"&&u!==null&&"headers"in u&&u.headers)return new Headers(u.headers);if(isRequest(l))return new Headers(l.headers)}catch{}}function getSDKSource(){return"npm"}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap(o,l={}){function u(f){return typeof f=="function"}if(!u(o))return o;try{const f=o.__sentry_wrapped__;if(f)return typeof f=="function"?f:o;if(getOriginalFunction(o))return o}catch{return o}const d=function(...f){try{const h=f.map(m=>wrap(m,l));return o.apply(this,h)}catch(h){throw ignoreNextOnError(),withScope(m=>{m.addEventProcessor(g=>(l.mechanism&&(addExceptionTypeValue(g,void 0),addExceptionMechanism(g,l.mechanism)),g.extra={...g.extra,arguments:f},g)),captureException(h)}),h}};try{for(const f in o)Object.prototype.hasOwnProperty.call(o,f)&&(d[f]=o[f])}catch{}markFunctionWrapped(d,o),addNonEnumerableProperty(o,"__sentry_wrapped__",d);try{Object.getOwnPropertyDescriptor(d,"name").configurable&&Object.defineProperty(d,"name",{get(){return o.name}})}catch{}return d}function getHttpRequestData(){const o=getLocationHref(),{referrer:l}=WINDOW$1.document||{},{userAgent:u}=WINDOW$1.navigator||{},d={...l&&{Referer:l},...u&&{"User-Agent":u}};return{url:o,headers:d}}function exceptionFromError(o,l){const u=parseStackFrames(o,l),d={type:extractType(l),value:extractMessage(l)};return u.length&&(d.stacktrace={frames:u}),d.type===void 0&&d.value===""&&(d.value="Unrecoverable error caught"),d}function eventFromPlainObject(o,l,u,d){const f=getClient(),h=f==null?void 0:f.getOptions().normalizeDepth,m=getErrorPropertyFromObject(l),g={__serialized__:normalizeToSize(l,h)};if(m)return{exception:{values:[exceptionFromError(o,m)]},extra:g};const v={exception:{values:[{type:isEvent(l)?l.constructor.name:d?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(l,{isUnhandledRejection:d})}]},extra:g};if(u){const x=parseStackFrames(o,u);x.length&&(v.exception.values[0].stacktrace={frames:x})}return v}function eventFromError(o,l){return{exception:{values:[exceptionFromError(o,l)]}}}function parseStackFrames(o,l){const u=l.stacktrace||l.stack||"",d=getSkipFirstStackStringLines(l),f=getPopFirstTopFrames(l);try{return o(u,d,f)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(o){return o&&reactMinifiedRegexp.test(o.message)?1:0}function getPopFirstTopFrames(o){return typeof o.framesToPop=="number"?o.framesToPop:0}function isWebAssemblyException(o){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?o instanceof WebAssembly.Exception:!1}function extractType(o){const l=o==null?void 0:o.name;return!l&&isWebAssemblyException(o)?o.message&&Array.isArray(o.message)&&o.message.length==2?o.message[0]:"WebAssembly.Exception":l}function extractMessage(o){const l=o==null?void 0:o.message;return isWebAssemblyException(o)?Array.isArray(o.message)&&o.message.length==2?o.message[1]:"wasm exception":l?l.error&&typeof l.error.message=="string"?l.error.message:l:"No error message"}function eventFromException(o,l,u,d){const f=(u==null?void 0:u.syntheticException)||void 0,h=eventFromUnknownInput(o,l,f,d);return addExceptionMechanism(h),h.level="error",u!=null&&u.event_id&&(h.event_id=u.event_id),resolvedSyncPromise(h)}function eventFromMessage(o,l,u="info",d,f){const h=(d==null?void 0:d.syntheticException)||void 0,m=eventFromString(o,l,h,f);return m.level=u,d!=null&&d.event_id&&(m.event_id=d.event_id),resolvedSyncPromise(m)}function eventFromUnknownInput(o,l,u,d,f){let h;if(isErrorEvent$1(l)&&l.error)return eventFromError(o,l.error);if(isDOMError(l)||isDOMException(l)){const m=l;if("stack"in l)h=eventFromError(o,l);else{const g=m.name||(isDOMError(m)?"DOMError":"DOMException"),v=m.message?`${g}: ${m.message}`:g;h=eventFromString(o,v,u,d),addExceptionTypeValue(h,v)}return"code"in m&&(h.tags={...h.tags,"DOMException.code":`${m.code}`}),h}return isError(l)?eventFromError(o,l):isPlainObject$1(l)||isEvent(l)?(h=eventFromPlainObject(o,l,u,f),addExceptionMechanism(h,{synthetic:!0}),h):(h=eventFromString(o,l,u,d),addExceptionTypeValue(h,`${l}`),addExceptionMechanism(h,{synthetic:!0}),h)}function eventFromString(o,l,u,d){const f={};if(d&&u){const h=parseStackFrames(o,u);h.length&&(f.exception={values:[{value:l,stacktrace:{frames:h}}]}),addExceptionMechanism(f,{synthetic:!0})}if(isParameterizedString(l)){const{__sentry_template_string__:h,__sentry_template_values__:m}=l;return f.logentry={message:h,params:m},f}return f.message=l,f}function getNonErrorObjectExceptionValue(o,{isUnhandledRejection:l}){const u=extractExceptionKeysForMessage(o),d=l?"promise rejection":"exception";return isErrorEvent$1(o)?`Event \`ErrorEvent\` captured as ${d} with message \`${o.message}\``:isEvent(o)?`Event \`${getObjectClassName(o)}\` (type=${o.type}) captured as ${d}`:`Object captured as ${d} with keys: ${u}`}function getObjectClassName(o){try{const l=Object.getPrototypeOf(o);return l?l.constructor.name:void 0}catch{}}function getErrorPropertyFromObject(o){for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const u=o[l];if(u instanceof Error)return u}}const DEFAULT_FLUSH_INTERVAL=5e3;class BrowserClient extends Client{constructor(l){var g;const u=applyDefaultOptions(l),d=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(u,"browser",["browser"],d),(g=u._metadata)!=null&&g.sdk&&(u._metadata.sdk.settings={infer_ip:u.sendDefaultPii?"auto":"never",...u._metadata.sdk.settings}),super(u);const{sendDefaultPii:f,sendClientReports:h,enableLogs:m}=this._options;WINDOW$1.document&&(h||m)&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&(h&&this._flushOutcomes(),m&&_INTERNAL_flushLogsBuffer(this))}),m&&(this.on("flush",()=>{_INTERNAL_flushLogsBuffer(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{_INTERNAL_flushLogsBuffer(this)},DEFAULT_FLUSH_INTERVAL)})),f&&this.on("beforeSendSession",addAutoIpAddressToSession)}eventFromException(l,u){return eventFromException(this._options.stackParser,l,u,this._options.attachStacktrace)}eventFromMessage(l,u="info",d){return eventFromMessage(this._options.stackParser,l,u,d,this._options.attachStacktrace)}_prepareEvent(l,u,d,f){return l.platform=l.platform||"javascript",super._prepareEvent(l,u,d,f)}}function applyDefaultOptions(o){var l;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(l=WINDOW$1.SENTRY_RELEASE)==null?void 0:l.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...o}}const DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function addClickKeypressInstrumentationHandler(o){const l="dom";addHandler(l,o),maybeInstrument(l,instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const o=triggerHandlers.bind(null,"dom"),l=makeDOMEventHandler(o,!0);WINDOW.document.addEventListener("click",l,!1),WINDOW.document.addEventListener("keypress",l,!1),["EventTarget","Node"].forEach(u=>{var h,m;const f=(h=WINDOW[u])==null?void 0:h.prototype;(m=f==null?void 0:f.hasOwnProperty)!=null&&m.call(f,"addEventListener")&&(fill(f,"addEventListener",function(g){return function(v,x,b){if(v==="click"||v=="keypress")try{const S=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},E=S[v]=S[v]||{refCount:0};if(!E.handler){const w=makeDOMEventHandler(o);E.handler=w,g.call(this,v,w,b)}E.refCount++}catch{}return g.call(this,v,x,b)}}),fill(f,"removeEventListener",function(g){return function(v,x,b){if(v==="click"||v=="keypress")try{const S=this.__sentry_instrumentation_handlers__||{},E=S[v];E&&(E.refCount--,E.refCount<=0&&(g.call(this,v,E.handler,b),E.handler=void 0,delete S[v]),Object.keys(S).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return g.call(this,v,x,b)}}))})}function isSimilarToLastCapturedEvent(o){if(o.type!==lastCapturedEventType)return!1;try{if(!o.target||o.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(o,l){return o!=="keypress"?!1:l!=null&&l.tagName?!(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable):!0}function makeDOMEventHandler(o,l=!1){return u=>{if(!u||u._sentryCaptured)return;const d=getEventTarget(u);if(shouldSkipDOMEvent(u.type,d))return;addNonEnumerableProperty(u,"_sentryCaptured",!0),d&&!d._sentryId&&addNonEnumerableProperty(d,"_sentryId",uuid4());const f=u.type==="keypress"?"input":u.type;isSimilarToLastCapturedEvent(u)||(o({event:u,name:f,global:l}),lastCapturedEventType=u.type,lastCapturedEventTargetId=d?d._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function getEventTarget(o){try{return o.target}catch{return null}}let lastHref;function addHistoryInstrumentationHandler(o){const l="history";addHandler(l,o),maybeInstrument(l,instrumentHistory)}function instrumentHistory(){if(WINDOW.addEventListener("popstate",()=>{const l=WINDOW.location.href,u=lastHref;if(lastHref=l,u===l)return;triggerHandlers("history",{from:u,to:l})}),!supportsHistory())return;function o(l){return function(...u){const d=u.length>2?u[2]:void 0;if(d){const f=lastHref,h=getAbsoluteUrl(String(d));if(lastHref=h,f===h)return l.apply(this,u);triggerHandlers("history",{from:f,to:h})}return l.apply(this,u)}}fill(WINDOW.history,"pushState",o),fill(WINDOW.history,"replaceState",o)}function getAbsoluteUrl(o){try{return new URL(o,WINDOW.location.origin).toString()}catch{return o}}const cachedImplementations={};function getNativeImplementation(o){const l=cachedImplementations[o];if(l)return l;let u=WINDOW[o];if(isNativeFunction(u))return cachedImplementations[o]=u.bind(WINDOW);const d=WINDOW.document;if(d&&typeof d.createElement=="function")try{const f=d.createElement("iframe");f.hidden=!0,d.head.appendChild(f);const h=f.contentWindow;h!=null&&h[o]&&(u=h[o]),d.head.removeChild(f)}catch(f){DEBUG_BUILD$1&&debug.warn(`Could not create sandbox iframe for ${o} check, bailing to window.${o}: `,f)}return u&&(cachedImplementations[o]=u.bind(WINDOW))}function clearCachedImplementation(o){cachedImplementations[o]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(o){const l="xhr";addHandler(l,o),maybeInstrument(l,instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const o=XMLHttpRequest.prototype;o.open=new Proxy(o.open,{apply(l,u,d){const f=new Error,h=timestampInSeconds()*1e3,m=isString$2(d[0])?d[0].toUpperCase():void 0,g=parseXhrUrlArg(d[1]);if(!m||!g)return l.apply(u,d);u[SENTRY_XHR_DATA_KEY]={method:m,url:g,request_headers:{}},m==="POST"&&g.match(/sentry_key/)&&(u.__sentry_own_request__=!0);const v=()=>{const x=u[SENTRY_XHR_DATA_KEY];if(x&&u.readyState===4){try{x.status_code=u.status}catch{}const b={endTimestamp:timestampInSeconds()*1e3,startTimestamp:h,xhr:u,virtualError:f};triggerHandlers("xhr",b)}};return"onreadystatechange"in u&&typeof u.onreadystatechange=="function"?u.onreadystatechange=new Proxy(u.onreadystatechange,{apply(x,b,S){return v(),x.apply(b,S)}}):u.addEventListener("readystatechange",v),u.setRequestHeader=new Proxy(u.setRequestHeader,{apply(x,b,S){const[E,w]=S,T=b[SENTRY_XHR_DATA_KEY];return T&&isString$2(E)&&isString$2(w)&&(T.request_headers[E.toLowerCase()]=w),x.apply(b,S)}}),l.apply(u,d)}}),o.send=new Proxy(o.send,{apply(l,u,d){const f=u[SENTRY_XHR_DATA_KEY];if(!f)return l.apply(u,d);d[0]!==void 0&&(f.body=d[0]);const h={startTimestamp:timestampInSeconds()*1e3,xhr:u};return triggerHandlers("xhr",h),l.apply(u,d)}})}function parseXhrUrlArg(o){if(isString$2(o))return o;try{return o.toString()}catch{}}function makeFetchTransport(o,l=getNativeImplementation("fetch")){let u=0,d=0;async function f(h){const m=h.body.length;u+=m,d++;const g={body:h.body,method:"POST",referrerPolicy:"strict-origin",headers:o.headers,keepalive:u<=6e4&&d<15,...o.fetchOptions};try{const v=await l(o.url,g);return{statusCode:v.status,headers:{"x-sentry-rate-limits":v.headers.get("X-Sentry-Rate-Limits"),"retry-after":v.headers.get("Retry-After")}}}catch(v){throw clearCachedImplementation("fetch"),v}finally{u-=m,d--}}return createTransport(o,f)}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(o,l,u,d){const f={filename:o,function:l==="<anonymous>"?UNKNOWN_FUNCTION:l,in_app:!0};return u!==void 0&&(f.lineno=u),d!==void 0&&(f.colno=d),f}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeDataUriRegex=/at (.+?) ?\(data:(.+?),/,chromeStackParserFn=o=>{const l=o.match(chromeDataUriRegex);if(l)return{filename:`<data:${l[2]}>`,function:l[1]};const u=chromeRegexNoFnName.exec(o);if(u){const[,f,h,m]=u;return createFrame(f,UNKNOWN_FUNCTION,+h,+m)}const d=chromeRegex.exec(o);if(d){if(d[2]&&d[2].indexOf("eval")===0){const g=chromeEvalRegex.exec(d[2]);g&&(d[2]=g[1],d[3]=g[2],d[4]=g[3])}const[h,m]=extractSafariExtensionDetails(d[1]||UNKNOWN_FUNCTION,d[2]);return createFrame(m,h,d[3]?+d[3]:void 0,d[4]?+d[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=o=>{const l=geckoREgex.exec(o);if(l){if(l[3]&&l[3].indexOf(" > eval")>-1){const h=geckoEvalRegex.exec(l[3]);h&&(l[1]=l[1]||"eval",l[3]=h[1],l[4]=h[2],l[5]="")}let d=l[3],f=l[1]||UNKNOWN_FUNCTION;return[f,d]=extractSafariExtensionDetails(f,d),createFrame(d,f,l[4]?+l[4]:void 0,l[5]?+l[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(o,l)=>{const u=o.indexOf("safari-extension")!==-1,d=o.indexOf("safari-web-extension")!==-1;return u||d?[o.indexOf("@")!==-1?o.split("@")[0]:UNKNOWN_FUNCTION,u?`safari-extension:${l}`:`safari-web-extension:${l}`]:[o,l]},DEBUG_BUILD=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(o={})=>{const l={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...o};return{name:INTEGRATION_NAME$3,setup(u){l.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(u)),l.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(u,l.dom)),l.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(u)),l.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(u)),l.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(u)),l.sentry&&u.on("beforeSendEvent",_getSentryBreadcrumbHandler(u))}}},breadcrumbsIntegration=_breadcrumbsIntegration;function _getSentryBreadcrumbHandler(o){return function(u){getClient()===o&&addBreadcrumb({category:`sentry.${u.type==="transaction"?"transaction":"event"}`,event_id:u.event_id,level:u.level,message:getEventDescription(u)},{event:u})}}function _getDomBreadcrumbHandler(o,l){return function(d){if(getClient()!==o)return;let f,h,m=typeof l=="object"?l.serializeAttribute:void 0,g=typeof l=="object"&&typeof l.maxStringLength=="number"?l.maxStringLength:void 0;g&&g>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD&&debug.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${g} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),g=MAX_ALLOWED_STRING_LENGTH),typeof m=="string"&&(m=[m]);try{const x=d.event,b=_isEvent(x)?x.target:x;f=htmlTreeAsString(b,{keyAttrs:m,maxStringLength:g}),h=getComponentName(b)}catch{f="<unknown>"}if(f.length===0)return;const v={category:`ui.${d.name}`,message:f};h&&(v.data={"ui.component_name":h}),addBreadcrumb(v,{event:d.event,name:d.name,global:d.global})}}function _getConsoleBreadcrumbHandler(o){return function(u){if(getClient()!==o)return;const d={category:"console",data:{arguments:u.args,logger:"console"},level:severityLevelFromString(u.level),message:safeJoin(u.args," ")};if(u.level==="assert")if(u.args[0]===!1)d.message=`Assertion failed: ${safeJoin(u.args.slice(1)," ")||"console.assert"}`,d.data.arguments=u.args.slice(1);else return;addBreadcrumb(d,{input:u.args,level:u.level})}}function _getXhrBreadcrumbHandler(o){return function(u){if(getClient()!==o)return;const{startTimestamp:d,endTimestamp:f}=u,h=u.xhr[SENTRY_XHR_DATA_KEY];if(!d||!f||!h)return;const{method:m,url:g,status_code:v,body:x}=h,b={method:m,url:g,status_code:v},S={xhr:u.xhr,input:x,startTimestamp:d,endTimestamp:f},E={category:"xhr",data:b,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(v)};o.emit("beforeOutgoingRequestBreadcrumb",E,S),addBreadcrumb(E,S)}}function _getFetchBreadcrumbHandler(o){return function(u){if(getClient()!==o)return;const{startTimestamp:d,endTimestamp:f}=u;if(f&&!(u.fetchData.url.match(/sentry_key/)&&u.fetchData.method==="POST"))if(u.fetchData.method,u.fetchData.url,u.error){const h=u.fetchData,m={data:u.error,input:u.args,startTimestamp:d,endTimestamp:f},g={category:"fetch",data:h,level:"error",type:"http"};o.emit("beforeOutgoingRequestBreadcrumb",g,m),addBreadcrumb(g,m)}else{const h=u.response,m={...u.fetchData,status_code:h==null?void 0:h.status};u.fetchData.request_body_size,u.fetchData.response_body_size,h==null||h.status;const g={input:u.args,response:h,startTimestamp:d,endTimestamp:f},v={category:"fetch",data:m,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(m.status_code)};o.emit("beforeOutgoingRequestBreadcrumb",v,g),addBreadcrumb(v,g)}}}function _getHistoryBreadcrumbHandler(o){return function(u){if(getClient()!==o)return;let d=u.from,f=u.to;const h=parseUrl(WINDOW$1.location.href);let m=d?parseUrl(d):void 0;const g=parseUrl(f);m!=null&&m.path||(m=h),h.protocol===g.protocol&&h.host===g.host&&(f=g.relative),h.protocol===m.protocol&&h.host===m.host&&(d=m.relative),addBreadcrumb({category:"navigation",data:{from:d,to:f}})}}function _isEvent(o){return!!o&&!!o.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(o={})=>{const l={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...o};return{name:INTEGRATION_NAME$2,setupOnce(){l.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),l.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),l.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),l.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const u=l.eventTarget;u&&(Array.isArray(u)?u:DEFAULT_EVENT_TARGET).forEach(f=>_wrapEventTarget(f,l))}}},browserApiErrorsIntegration=_browserApiErrorsIntegration;function _wrapTimeFunction(o){return function(...l){const u=l[0];return l[0]=wrap(u,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${getFunctionName(o)}`}}),o.apply(this,l)}}function _wrapRAF(o){return function(l){return o.apply(this,[wrap(l,{mechanism:{data:{handler:getFunctionName(o)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function _wrapXHR(o){return function(...l){const u=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(f=>{f in u&&typeof u[f]=="function"&&fill(u,f,function(h){const m={mechanism:{data:{handler:getFunctionName(h)},handled:!1,type:`auto.browser.browserapierrors.xhr.${f}`}},g=getOriginalFunction(h);return g&&(m.mechanism.data.handler=getFunctionName(g)),wrap(h,m)})}),o.apply(this,l)}}function _wrapEventTarget(o,l){var f,h;const d=(f=WINDOW$1[o])==null?void 0:f.prototype;(h=d==null?void 0:d.hasOwnProperty)!=null&&h.call(d,"addEventListener")&&(fill(d,"addEventListener",function(m){return function(g,v,x){try{isEventListenerObject(v)&&(v.handleEvent=wrap(v.handleEvent,{mechanism:{data:{handler:getFunctionName(v),target:o},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return l.unregisterOriginalCallbacks&&unregisterOriginalCallback(this,g,v),m.apply(this,[g,wrap(v,{mechanism:{data:{handler:getFunctionName(v),target:o},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),x])}}),fill(d,"removeEventListener",function(m){return function(g,v,x){try{const b=v.__sentry_wrapped__;b&&m.call(this,g,b,x)}catch{}return m.call(this,g,v,x)}}))}function isEventListenerObject(o){return typeof o.handleEvent=="function"}function unregisterOriginalCallback(o,l,u){o&&typeof o=="object"&&"removeEventListener"in o&&typeof o.removeEventListener=="function"&&o.removeEventListener(l,u)}const browserSessionIntegration=()=>({name:"BrowserSession",setupOnce(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD&&debug.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler(({from:o,to:l})=>{o!==void 0&&o!==l&&(startSession({ignoreDuration:!0}),captureSession())})}}),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(o={})=>{const l={onerror:!0,onunhandledrejection:!0,...o};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(u){l.onerror&&(_installGlobalOnErrorHandler(u),globalHandlerLog("onerror")),l.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(u),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=_globalHandlersIntegration;function _installGlobalOnErrorHandler(o){addGlobalErrorInstrumentationHandler(l=>{const{stackParser:u,attachStacktrace:d}=getOptions();if(getClient()!==o||shouldIgnoreOnError())return;const{msg:f,url:h,line:m,column:g,error:v}=l,x=_enhanceEventWithInitialFrame(eventFromUnknownInput(u,v||f,void 0,d,!1),h,m,g);x.level="error",captureEvent(x,{originalException:v,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(o){addGlobalUnhandledRejectionInstrumentationHandler(l=>{const{stackParser:u,attachStacktrace:d}=getOptions();if(getClient()!==o||shouldIgnoreOnError())return;const f=_getUnhandledRejectionError(l),h=isPrimitive(f)?_eventFromRejectionWithPrimitive(f):eventFromUnknownInput(u,f,void 0,d,!0);h.level="error",captureEvent(h,{originalException:f,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function _getUnhandledRejectionError(o){if(isPrimitive(o))return o;try{if("reason"in o)return o.reason;if("detail"in o&&"reason"in o.detail)return o.detail.reason}catch{}return o}function _eventFromRejectionWithPrimitive(o){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}}function _enhanceEventWithInitialFrame(o,l,u,d){const f=o.exception=o.exception||{},h=f.values=f.values||[],m=h[0]=h[0]||{},g=m.stacktrace=m.stacktrace||{},v=g.frames=g.frames||[],x=d,b=u,S=getFilenameFromUrl(l)??getLocationHref();return v.length===0&&v.push({colno:x,filename:S,function:UNKNOWN_FUNCTION,in_app:!0,lineno:b}),o}function globalHandlerLog(o){DEBUG_BUILD&&debug.log(`Global Handler attached: ${o}`)}function getOptions(){const o=getClient();return(o==null?void 0:o.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function getFilenameFromUrl(o){if(!(!isString$2(o)||o.length===0)){if(o.startsWith("data:")){const l=o.match(/^data:([^;]+)/),u=l?l[1]:"text/javascript",d=o.includes("base64,");return`<data:${u}${d?",base64":""}>`}return o.slice(0,1024)}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(o){var d;if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const l=getHttpRequestData(),u={...l.headers,...(d=o.request)==null?void 0:d.headers};o.request={...l,...o.request,headers:u}}}),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(o={})=>{const l=o.limit||DEFAULT_LIMIT,u=o.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(d,f,h){const m=h.getOptions();applyAggregateErrorsToEvent(exceptionFromError,m.stackParser,u,l,d,f)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function checkAndWarnIfIsEmbeddedBrowserExtension(){return _isEmbeddedBrowserExtension()?(DEBUG_BUILD&&consoleSandbox(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function _isEmbeddedBrowserExtension(){var h;if(typeof WINDOW$1.window>"u")return!1;const o=WINDOW$1;if(o.nw)return!1;const l=o.chrome||o.browser;if(!((h=l==null?void 0:l.runtime)!=null&&h.id))return!1;const u=getLocationHref(),d=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(WINDOW$1===WINDOW$1.top&&d.some(m=>u.startsWith(`${m}://`)))}function getDefaultIntegrations(o){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),browserSessionIntegration()]}function init$1(o={}){const l=!o.skipBrowserExtensionCheck&&checkAndWarnIfIsEmbeddedBrowserExtension(),u={...o,enabled:l?!1:o.enabled,stackParser:stackParserFromStackParserOptions(o.stackParser||defaultStackParser),integrations:getIntegrationsToSetup({integrations:o.integrations,defaultIntegrations:o.defaultIntegrations==null?getDefaultIntegrations():o.defaultIntegrations}),transport:o.transport||makeFetchTransport};return initAndBind(BrowserClient,u)}function init(o){const l={...o};return applySdkMetadata(l,"react"),setContext("react",{version:reactExports.version}),init$1(l)}var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(o){return this.listeners.add(o),this.onSubscribe(),()=>{this.listeners.delete(o),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},defaultTimeoutProvider={setTimeout:(o,l)=>setTimeout(o,l),clearTimeout:o=>clearTimeout(o),setInterval:(o,l)=>setInterval(o,l),clearInterval:o=>clearInterval(o)},TimeoutManager=(Kt=class{constructor(){Xe(this,ht,defaultTimeoutProvider);Xe(this,St,!1)}setTimeoutProvider(o){De(this,ht,o)}setTimeout(o,l){return ne(this,ht).setTimeout(o,l)}clearTimeout(o){ne(this,ht).clearTimeout(o)}setInterval(o,l){return ne(this,ht).setInterval(o,l)}clearInterval(o){ne(this,ht).clearInterval(o)}},ht=new WeakMap,St=new WeakMap,Kt),timeoutManager=new TimeoutManager;function systemSetTimeoutZero(o){setTimeout(o,0)}var isServer=typeof window>"u"||"Deno"in globalThis;function noop$1(){}function functionalUpdate(o,l){return typeof o=="function"?o(l):o}function isValidTimeout(o){return typeof o=="number"&&o>=0&&o!==1/0}function timeUntilStale(o,l){return Math.max(o+(l||0)-Date.now(),0)}function resolveStaleTime(o,l){return typeof o=="function"?o(l):o}function resolveEnabled(o,l){return typeof o=="function"?o(l):o}function matchQuery(o,l){const{type:u="all",exact:d,fetchStatus:f,predicate:h,queryKey:m,stale:g}=o;if(m){if(d){if(l.queryHash!==hashQueryKeyByOptions(m,l.options))return!1}else if(!partialMatchKey(l.queryKey,m))return!1}if(u!=="all"){const v=l.isActive();if(u==="active"&&!v||u==="inactive"&&v)return!1}return!(typeof g=="boolean"&&l.isStale()!==g||f&&f!==l.state.fetchStatus||h&&!h(l))}function matchMutation(o,l){const{exact:u,status:d,predicate:f,mutationKey:h}=o;if(h){if(!l.options.mutationKey)return!1;if(u){if(hashKey(l.options.mutationKey)!==hashKey(h))return!1}else if(!partialMatchKey(l.options.mutationKey,h))return!1}return!(d&&l.state.status!==d||f&&!f(l))}function hashQueryKeyByOptions(o,l){return((l==null?void 0:l.queryKeyHashFn)||hashKey)(o)}function hashKey(o){return JSON.stringify(o,(l,u)=>isPlainObject(u)?Object.keys(u).sort().reduce((d,f)=>(d[f]=u[f],d),{}):u)}function partialMatchKey(o,l){return o===l?!0:typeof o!=typeof l?!1:o&&l&&typeof o=="object"&&typeof l=="object"?Object.keys(l).every(u=>partialMatchKey(o[u],l[u])):!1}var hasOwn=Object.prototype.hasOwnProperty;function replaceEqualDeep(o,l){if(o===l)return o;const u=isPlainArray(o)&&isPlainArray(l);if(!u&&!(isPlainObject(o)&&isPlainObject(l)))return l;const f=(u?o:Object.keys(o)).length,h=u?l:Object.keys(l),m=h.length,g=u?new Array(m):{};let v=0;for(let x=0;x<m;x++){const b=u?x:h[x],S=o[b],E=l[b];if(S===E){g[b]=S,(u?x<f:hasOwn.call(o,b))&&v++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){g[b]=E;continue}const w=replaceEqualDeep(S,E);g[b]=w,w===S&&v++}return f===m&&v===f?o:g}function shallowEqualObjects(o,l){if(!l||Object.keys(o).length!==Object.keys(l).length)return!1;for(const u in o)if(o[u]!==l[u])return!1;return!0}function isPlainArray(o){return Array.isArray(o)&&o.length===Object.keys(o).length}function isPlainObject(o){if(!hasObjectPrototype(o))return!1;const l=o.constructor;if(l===void 0)return!0;const u=l.prototype;return!(!hasObjectPrototype(u)||!u.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(o)!==Object.prototype)}function hasObjectPrototype(o){return Object.prototype.toString.call(o)==="[object Object]"}function sleep(o){return new Promise(l=>{timeoutManager.setTimeout(l,o)})}function replaceData(o,l,u){return typeof u.structuralSharing=="function"?u.structuralSharing(o,l):u.structuralSharing!==!1?replaceEqualDeep(o,l):l}function addToEnd(o,l,u=0){const d=[...o,l];return u&&d.length>u?d.slice(1):d}function addToStart(o,l,u=0){const d=[l,...o];return u&&d.length>u?d.slice(0,-1):d}var skipToken=Symbol();function ensureQueryFn(o,l){return!o.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!o.queryFn||o.queryFn===skipToken?()=>Promise.reject(new Error(`Missing queryFn: '${o.queryHash}'`)):o.queryFn}function shouldThrowError(o,l){return typeof o=="function"?o(...l):!!o}var FocusManager=(rc=class extends Subscribable{constructor(){super();Xe(this,_r);Xe(this,zr);Xe(this,mi);De(this,mi,l=>{if(!isServer&&window.addEventListener){const u=()=>l();return window.addEventListener("visibilitychange",u,!1),()=>{window.removeEventListener("visibilitychange",u)}}})}onSubscribe(){ne(this,zr)||this.setEventListener(ne(this,mi))}onUnsubscribe(){var l;this.hasListeners()||((l=ne(this,zr))==null||l.call(this),De(this,zr,void 0))}setEventListener(l){var u;De(this,mi,l),(u=ne(this,zr))==null||u.call(this),De(this,zr,l(d=>{typeof d=="boolean"?this.setFocused(d):this.onFocus()}))}setFocused(l){ne(this,_r)!==l&&(De(this,_r,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(u=>{u(l)})}isFocused(){var l;return typeof ne(this,_r)=="boolean"?ne(this,_r):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},_r=new WeakMap,zr=new WeakMap,mi=new WeakMap,rc),focusManager=new FocusManager;function pendingThenable(){let o,l;const u=new Promise((f,h)=>{o=f,l=h});u.status="pending",u.catch(()=>{});function d(f){Object.assign(u,f),delete u.resolve,delete u.reject}return u.resolve=f=>{d({status:"fulfilled",value:f}),o(f)},u.reject=f=>{d({status:"rejected",reason:f}),l(f)},u}var defaultScheduler=systemSetTimeoutZero;function createNotifyManager(){let o=[],l=0,u=g=>{g()},d=g=>{g()},f=defaultScheduler;const h=g=>{l?o.push(g):f(()=>{u(g)})},m=()=>{const g=o;o=[],g.length&&f(()=>{d(()=>{g.forEach(v=>{u(v)})})})};return{batch:g=>{let v;l++;try{v=g()}finally{l--,l||m()}return v},batchCalls:g=>(...v)=>{h(()=>{g(...v)})},schedule:h,setNotifyFunction:g=>{u=g},setBatchNotifyFunction:g=>{d=g},setScheduler:g=>{f=g}}}var notifyManager=createNotifyManager(),OnlineManager=(nc=class extends Subscribable{constructor(){super();Xe(this,gi,!0);Xe(this,vn);Xe(this,yi);De(this,yi,l=>{if(!isServer&&window.addEventListener){const u=()=>l(!0),d=()=>l(!1);return window.addEventListener("online",u,!1),window.addEventListener("offline",d,!1),()=>{window.removeEventListener("online",u),window.removeEventListener("offline",d)}}})}onSubscribe(){ne(this,vn)||this.setEventListener(ne(this,yi))}onUnsubscribe(){var l;this.hasListeners()||((l=ne(this,vn))==null||l.call(this),De(this,vn,void 0))}setEventListener(l){var u;De(this,yi,l),(u=ne(this,vn))==null||u.call(this),De(this,vn,l(this.setOnline.bind(this)))}setOnline(l){ne(this,gi)!==l&&(De(this,gi,l),this.listeners.forEach(d=>{d(l)}))}isOnline(){return ne(this,gi)}},gi=new WeakMap,vn=new WeakMap,yi=new WeakMap,nc),onlineManager=new OnlineManager;function defaultRetryDelay(o){return Math.min(1e3*2**o,3e4)}function canFetch(o){return(o??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class extends Error{constructor(o){super("CancelledError"),this.revert=o==null?void 0:o.revert,this.silent=o==null?void 0:o.silent}};function createRetryer(o){let l=!1,u=0,d;const f=pendingThenable(),h=()=>f.status!=="pending",m=C=>{var M;if(!h()){const A=new CancelledError(C);E(A),(M=o.onCancel)==null||M.call(o,A)}},g=()=>{l=!0},v=()=>{l=!1},x=()=>focusManager.isFocused()&&(o.networkMode==="always"||onlineManager.isOnline())&&o.canRun(),b=()=>canFetch(o.networkMode)&&o.canRun(),S=C=>{h()||(d==null||d(),f.resolve(C))},E=C=>{h()||(d==null||d(),f.reject(C))},w=()=>new Promise(C=>{var M;d=A=>{(h()||x())&&C(A)},(M=o.onPause)==null||M.call(o)}).then(()=>{var C;d=void 0,h()||(C=o.onContinue)==null||C.call(o)}),T=()=>{if(h())return;let C;const M=u===0?o.initialPromise:void 0;try{C=M??o.fn()}catch(A){C=Promise.reject(A)}Promise.resolve(C).then(S).catch(A=>{var N;if(h())return;const k=o.retry??(isServer?0:3),I=o.retryDelay??defaultRetryDelay,O=typeof I=="function"?I(u,A):I,j=k===!0||typeof k=="number"&&u<k||typeof k=="function"&&k(u,A);if(l||!j){E(A);return}u++,(N=o.onFail)==null||N.call(o,u,A),sleep(O).then(()=>x()?void 0:w()).then(()=>{l?E(A):T()})})};return{promise:f,status:()=>f.status,cancel:m,continue:()=>(d==null||d(),f),cancelRetry:g,continueRetry:v,canStart:b,start:()=>(b()?T():w().then(T),f)}}var Removable=(ic=class{constructor(){Xe(this,$n)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&De(this,$n,timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(o){this.gcTime=Math.max(this.gcTime||0,o??(isServer?1/0:5*60*1e3))}clearGcTimeout(){ne(this,$n)&&(timeoutManager.clearTimeout(ne(this,$n)),De(this,$n,void 0))}},$n=new WeakMap,ic),define_process_env_default$5={NODE_ENV:"production",version:"1.94.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"},Query=(sc=class extends Removable{constructor(l){super();Xe(this,Ir);Xe(this,zn);Xe(this,vi);Xe(this,Er);Xe(this,Un);Xe(this,Gt);Xe(this,ss);Xe(this,Gn);De(this,Gn,!1),De(this,ss,l.defaultOptions),this.setOptions(l.options),this.observers=[],De(this,Un,l.client),De(this,Er,ne(this,Un).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,De(this,zn,getDefaultState$1(this.options)),this.state=l.state??ne(this,zn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=ne(this,Gt))==null?void 0:l.promise}setOptions(l){if(this.options={...ne(this,ss),...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const u=getDefaultState$1(this.options);u.data!==void 0&&(this.setData(u.data,{updatedAt:u.dataUpdatedAt,manual:!0}),De(this,zn,u))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ne(this,Er).remove(this)}setData(l,u){const d=replaceData(this.state.data,l,this.options);return lt(this,Ir,yn).call(this,{data:d,type:"success",dataUpdatedAt:u==null?void 0:u.updatedAt,manual:u==null?void 0:u.manual}),d}setState(l,u){lt(this,Ir,yn).call(this,{type:"setState",state:l,setStateOptions:u})}cancel(l){var d,f;const u=(d=ne(this,Gt))==null?void 0:d.promise;return(f=ne(this,Gt))==null||f.cancel(l),u?u.then(noop$1).catch(noop$1):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ne(this,zn))}isActive(){return this.observers.some(l=>resolveEnabled(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>resolveStaleTime(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!timeUntilStale(this.state.dataUpdatedAt,l)}onFocus(){var u;const l=this.observers.find(d=>d.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(u=ne(this,Gt))==null||u.continue()}onOnline(){var u;const l=this.observers.find(d=>d.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(u=ne(this,Gt))==null||u.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),ne(this,Er).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(u=>u!==l),this.observers.length||(ne(this,Gt)&&(ne(this,Gn)?ne(this,Gt).cancel({revert:!0}):ne(this,Gt).cancelRetry()),this.scheduleGc()),ne(this,Er).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lt(this,Ir,yn).call(this,{type:"invalidate"})}async fetch(l,u){var v,x,b,S,E,w,T,C,M,A,k,I;if(this.state.fetchStatus!=="idle"&&((v=ne(this,Gt))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(u!=null&&u.cancelRefetch))this.cancel({silent:!0});else if(ne(this,Gt))return ne(this,Gt).continueRetry(),ne(this,Gt).promise}if(l&&this.setOptions(l),!this.options.queryFn){const O=this.observers.find(j=>j.options.queryFn);O&&this.setOptions(O.options)}const d=new AbortController,f=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(De(this,Gn,!0),d.signal)})},h=()=>{const O=ensureQueryFn(this.options,u),N=(()=>{const V={client:ne(this,Un),queryKey:this.queryKey,meta:this.meta};return f(V),V})();return De(this,Gn,!1),this.options.persister?this.options.persister(O,N,this):O(N)},g=(()=>{const O={fetchOptions:u,options:this.options,queryKey:this.queryKey,client:ne(this,Un),state:this.state,fetchFn:h};return f(O),O})();(x=this.options.behavior)==null||x.onFetch(g,this),De(this,vi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=g.fetchOptions)==null?void 0:b.meta))&&lt(this,Ir,yn).call(this,{type:"fetch",meta:(S=g.fetchOptions)==null?void 0:S.meta}),De(this,Gt,createRetryer({initialPromise:u==null?void 0:u.initialPromise,fn:g.fetchFn,onCancel:O=>{O instanceof CancelledError&&O.revert&&this.setState({...ne(this,vi),fetchStatus:"idle"}),d.abort()},onFail:(O,j)=>{lt(this,Ir,yn).call(this,{type:"failed",failureCount:O,error:j})},onPause:()=>{lt(this,Ir,yn).call(this,{type:"pause"})},onContinue:()=>{lt(this,Ir,yn).call(this,{type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode,canRun:()=>!0}));try{const O=await ne(this,Gt).start();if(O===void 0)throw define_process_env_default$5.NODE_ENV,new Error(`${this.queryHash} data is undefined`);return this.setData(O),(w=(E=ne(this,Er).config).onSuccess)==null||w.call(E,O,this),(C=(T=ne(this,Er).config).onSettled)==null||C.call(T,O,this.state.error,this),O}catch(O){if(O instanceof CancelledError){if(O.silent)return ne(this,Gt).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw lt(this,Ir,yn).call(this,{type:"error",error:O}),(A=(M=ne(this,Er).config).onError)==null||A.call(M,O,this),(I=(k=ne(this,Er).config).onSettled)==null||I.call(k,this.state.data,O,this),O}finally{this.scheduleGc()}}},zn=new WeakMap,vi=new WeakMap,Er=new WeakMap,Un=new WeakMap,Gt=new WeakMap,ss=new WeakMap,Gn=new WeakMap,Ir=new WeakSet,yn=function(l){const u=d=>{switch(l.type){case"failed":return{...d,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...d,fetchStatus:"paused"};case"continue":return{...d,fetchStatus:"fetching"};case"fetch":return{...d,...fetchState(d.data,this.options),fetchMeta:l.meta??null};case"success":const f={...d,data:l.data,dataUpdateCount:d.dataUpdateCount+1,dataUpdatedAt:l.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,vi,l.manual?f:void 0),f;case"error":const h=l.error;return{...d,error:h,errorUpdateCount:d.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:d.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error"};case"invalidate":return{...d,isInvalidated:!0};case"setState":return{...d,...l.state}}};this.state=u(this.state),notifyManager.batch(()=>{this.observers.forEach(d=>{d.onQueryUpdate()}),ne(this,Er).notify({query:this,type:"updated",action:l})})},sc);function fetchState(o,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(l.networkMode)?"fetching":"paused",...o===void 0&&{error:null,status:"pending"}}}function getDefaultState$1(o){const l=typeof o.initialData=="function"?o.initialData():o.initialData,u=l!==void 0,d=u?typeof o.initialDataUpdatedAt=="function"?o.initialDataUpdatedAt():o.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:u?d??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:u?"success":"pending",fetchStatus:"idle"}}var QueryObserver=(oc=class extends Subscribable{constructor(l,u){super();Xe(this,vt);Xe(this,cr);Xe(this,dt);Xe(this,os);Xe(this,ir);Xe(this,Hn);Xe(this,xi);Xe(this,tn);Xe(this,xn);Xe(this,as);Xe(this,bi);Xe(this,_i);Xe(this,Wn);Xe(this,qn);Xe(this,bn);Xe(this,Ei,new Set);this.options=u,De(this,cr,l),De(this,xn,null),De(this,tn,pendingThenable()),this.bindMethods(),this.setOptions(u)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ne(this,dt).addObserver(this),shouldFetchOnMount(ne(this,dt),this.options)?lt(this,vt,qs).call(this):this.updateResult(),lt(this,vt,Ql).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(ne(this,dt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(ne(this,dt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,lt(this,vt,Jl).call(this),lt(this,vt,Zl).call(this),ne(this,dt).removeObserver(this)}setOptions(l){const u=this.options,d=ne(this,dt);if(this.options=ne(this,cr).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof resolveEnabled(this.options.enabled,ne(this,dt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");lt(this,vt,ec).call(this),ne(this,dt).setOptions(this.options),u._defaulted&&!shallowEqualObjects(this.options,u)&&ne(this,cr).getQueryCache().notify({type:"observerOptionsUpdated",query:ne(this,dt),observer:this});const f=this.hasListeners();f&&shouldFetchOptionally(ne(this,dt),d,this.options,u)&&lt(this,vt,qs).call(this),this.updateResult(),f&&(ne(this,dt)!==d||resolveEnabled(this.options.enabled,ne(this,dt))!==resolveEnabled(u.enabled,ne(this,dt))||resolveStaleTime(this.options.staleTime,ne(this,dt))!==resolveStaleTime(u.staleTime,ne(this,dt)))&&lt(this,vt,Kl).call(this);const h=lt(this,vt,Yl).call(this);f&&(ne(this,dt)!==d||resolveEnabled(this.options.enabled,ne(this,dt))!==resolveEnabled(u.enabled,ne(this,dt))||h!==ne(this,bn))&&lt(this,vt,Xl).call(this,h)}getOptimisticResult(l){const u=ne(this,cr).getQueryCache().build(ne(this,cr),l),d=this.createResult(u,l);return shouldAssignObserverCurrentProperties(this,d)&&(De(this,ir,d),De(this,xi,this.options),De(this,Hn,ne(this,dt).state)),d}getCurrentResult(){return ne(this,ir)}trackResult(l,u){return new Proxy(l,{get:(d,f)=>(this.trackProp(f),u==null||u(f),f==="promise"&&!this.options.experimental_prefetchInRender&&ne(this,tn).status==="pending"&&ne(this,tn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(d,f))})}trackProp(l){ne(this,Ei).add(l)}getCurrentQuery(){return ne(this,dt)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const u=ne(this,cr).defaultQueryOptions(l),d=ne(this,cr).getQueryCache().build(ne(this,cr),u);return d.fetch().then(()=>this.createResult(d,u))}fetch(l){return lt(this,vt,qs).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),ne(this,ir)))}createResult(l,u){var W;const d=ne(this,dt),f=this.options,h=ne(this,ir),m=ne(this,Hn),g=ne(this,xi),x=l!==d?l.state:ne(this,os),{state:b}=l;let S={...b},E=!1,w;if(u._optimisticResults){const X=this.hasListeners(),ie=!X&&shouldFetchOnMount(l,u),oe=X&&shouldFetchOptionally(l,d,u,f);(ie||oe)&&(S={...S,...fetchState(b.data,l.options)}),u._optimisticResults==="isRestoring"&&(S.fetchStatus="idle")}let{error:T,errorUpdatedAt:C,status:M}=S;w=S.data;let A=!1;if(u.placeholderData!==void 0&&w===void 0&&M==="pending"){let X;h!=null&&h.isPlaceholderData&&u.placeholderData===(g==null?void 0:g.placeholderData)?(X=h.data,A=!0):X=typeof u.placeholderData=="function"?u.placeholderData((W=ne(this,_i))==null?void 0:W.state.data,ne(this,_i)):u.placeholderData,X!==void 0&&(M="success",w=replaceData(h==null?void 0:h.data,X,u),E=!0)}if(u.select&&w!==void 0&&!A)if(h&&w===(m==null?void 0:m.data)&&u.select===ne(this,as))w=ne(this,bi);else try{De(this,as,u.select),w=u.select(w),w=replaceData(h==null?void 0:h.data,w,u),De(this,bi,w),De(this,xn,null)}catch(X){De(this,xn,X)}ne(this,xn)&&(T=ne(this,xn),w=ne(this,bi),C=Date.now(),M="error");const k=S.fetchStatus==="fetching",I=M==="pending",O=M==="error",j=I&&k,N=w!==void 0,z={status:M,fetchStatus:S.fetchStatus,isPending:I,isSuccess:M==="success",isError:O,isInitialLoading:j,isLoading:j,data:w,dataUpdatedAt:S.dataUpdatedAt,error:T,errorUpdatedAt:C,failureCount:S.fetchFailureCount,failureReason:S.fetchFailureReason,errorUpdateCount:S.errorUpdateCount,isFetched:S.dataUpdateCount>0||S.errorUpdateCount>0,isFetchedAfterMount:S.dataUpdateCount>x.dataUpdateCount||S.errorUpdateCount>x.errorUpdateCount,isFetching:k,isRefetching:k&&!I,isLoadingError:O&&!N,isPaused:S.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:O&&N,isStale:isStale(l,u),refetch:this.refetch,promise:ne(this,tn),isEnabled:resolveEnabled(u.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const X=le=>{z.status==="error"?le.reject(z.error):z.data!==void 0&&le.resolve(z.data)},ie=()=>{const le=De(this,tn,z.promise=pendingThenable());X(le)},oe=ne(this,tn);switch(oe.status){case"pending":l.queryHash===d.queryHash&&X(oe);break;case"fulfilled":(z.status==="error"||z.data!==oe.value)&&ie();break;case"rejected":(z.status!=="error"||z.error!==oe.reason)&&ie();break}}return z}updateResult(){const l=ne(this,ir),u=this.createResult(ne(this,dt),this.options);if(De(this,Hn,ne(this,dt).state),De(this,xi,this.options),ne(this,Hn).data!==void 0&&De(this,_i,ne(this,dt)),shallowEqualObjects(u,l))return;De(this,ir,u);const d=()=>{if(!l)return!0;const{notifyOnChangeProps:f}=this.options,h=typeof f=="function"?f():f;if(h==="all"||!h&&!ne(this,Ei).size)return!0;const m=new Set(h??ne(this,Ei));return this.options.throwOnError&&m.add("error"),Object.keys(ne(this,ir)).some(g=>{const v=g;return ne(this,ir)[v]!==l[v]&&m.has(v)})};lt(this,vt,Id).call(this,{listeners:d()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&lt(this,vt,Ql).call(this)}},cr=new WeakMap,dt=new WeakMap,os=new WeakMap,ir=new WeakMap,Hn=new WeakMap,xi=new WeakMap,tn=new WeakMap,xn=new WeakMap,as=new WeakMap,bi=new WeakMap,_i=new WeakMap,Wn=new WeakMap,qn=new WeakMap,bn=new WeakMap,Ei=new WeakMap,vt=new WeakSet,qs=function(l){lt(this,vt,ec).call(this);let u=ne(this,dt).fetch(this.options,l);return l!=null&&l.throwOnError||(u=u.catch(noop$1)),u},Kl=function(){lt(this,vt,Jl).call(this);const l=resolveStaleTime(this.options.staleTime,ne(this,dt));if(isServer||ne(this,ir).isStale||!isValidTimeout(l))return;const d=timeUntilStale(ne(this,ir).dataUpdatedAt,l)+1;De(this,Wn,timeoutManager.setTimeout(()=>{ne(this,ir).isStale||this.updateResult()},d))},Yl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ne(this,dt)):this.options.refetchInterval)??!1},Xl=function(l){lt(this,vt,Zl).call(this),De(this,bn,l),!(isServer||resolveEnabled(this.options.enabled,ne(this,dt))===!1||!isValidTimeout(ne(this,bn))||ne(this,bn)===0)&&De(this,qn,timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&lt(this,vt,qs).call(this)},ne(this,bn)))},Ql=function(){lt(this,vt,Kl).call(this),lt(this,vt,Xl).call(this,lt(this,vt,Yl).call(this))},Jl=function(){ne(this,Wn)&&(timeoutManager.clearTimeout(ne(this,Wn)),De(this,Wn,void 0))},Zl=function(){ne(this,qn)&&(timeoutManager.clearInterval(ne(this,qn)),De(this,qn,void 0))},ec=function(){const l=ne(this,cr).getQueryCache().build(ne(this,cr),this.options);if(l===ne(this,dt))return;const u=ne(this,dt);De(this,dt,l),De(this,os,l.state),this.hasListeners()&&(u==null||u.removeObserver(this),l.addObserver(this))},Id=function(l){notifyManager.batch(()=>{l.listeners&&this.listeners.forEach(u=>{u(ne(this,ir))}),ne(this,cr).getQueryCache().notify({query:ne(this,dt),type:"observerResultsUpdated"})})},oc);function shouldLoadOnMount(o,l){return resolveEnabled(l.enabled,o)!==!1&&o.state.data===void 0&&!(o.state.status==="error"&&l.retryOnMount===!1)}function shouldFetchOnMount(o,l){return shouldLoadOnMount(o,l)||o.state.data!==void 0&&shouldFetchOn(o,l,l.refetchOnMount)}function shouldFetchOn(o,l,u){if(resolveEnabled(l.enabled,o)!==!1&&resolveStaleTime(l.staleTime,o)!=="static"){const d=typeof u=="function"?u(o):u;return d==="always"||d!==!1&&isStale(o,l)}return!1}function shouldFetchOptionally(o,l,u,d){return(o!==l||resolveEnabled(d.enabled,o)===!1)&&(!u.suspense||o.state.status!=="error")&&isStale(o,u)}function isStale(o,l){return resolveEnabled(l.enabled,o)!==!1&&o.isStaleByTime(resolveStaleTime(l.staleTime,o))}function shouldAssignObserverCurrentProperties(o,l){return!shallowEqualObjects(o.getCurrentResult(),l)}function infiniteQueryBehavior(o){return{onFetch:(l,u)=>{var b,S,E,w,T;const d=l.options,f=(E=(S=(b=l.fetchOptions)==null?void 0:b.meta)==null?void 0:S.fetchMore)==null?void 0:E.direction,h=((w=l.state.data)==null?void 0:w.pages)||[],m=((T=l.state.data)==null?void 0:T.pageParams)||[];let g={pages:[],pageParams:[]},v=0;const x=async()=>{let C=!1;const M=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(l.signal.aborted?C=!0:l.signal.addEventListener("abort",()=>{C=!0}),l.signal)})},A=ensureQueryFn(l.options,l.fetchOptions),k=async(I,O,j)=>{if(C)return Promise.reject();if(O==null&&I.pages.length)return Promise.resolve(I);const V=(()=>{const ie={client:l.client,queryKey:l.queryKey,pageParam:O,direction:j?"backward":"forward",meta:l.options.meta};return M(ie),ie})(),z=await A(V),{maxPages:W}=l.options,X=j?addToStart:addToEnd;return{pages:X(I.pages,z,W),pageParams:X(I.pageParams,O,W)}};if(f&&h.length){const I=f==="backward",O=I?getPreviousPageParam:getNextPageParam,j={pages:h,pageParams:m},N=O(d,j);g=await k(j,N,I)}else{const I=o??h.length;do{const O=v===0?m[0]??d.initialPageParam:getNextPageParam(d,g);if(v>0&&O==null)break;g=await k(g,O),v++}while(v<I)}return g};l.options.persister?l.fetchFn=()=>{var C,M;return(M=(C=l.options).persister)==null?void 0:M.call(C,x,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},u)}:l.fetchFn=x}}}function getNextPageParam(o,{pages:l,pageParams:u}){const d=l.length-1;return l.length>0?o.getNextPageParam(l[d],l,u[d],u):void 0}function getPreviousPageParam(o,{pages:l,pageParams:u}){var d;return l.length>0?(d=o.getPreviousPageParam)==null?void 0:d.call(o,l[0],l,u[0],u):void 0}var Mutation=(ac=class extends Removable{constructor(l){super();Xe(this,Gr);Xe(this,ls);Xe(this,Ur);Xe(this,sr);Xe(this,Kn);De(this,ls,l.client),this.mutationId=l.mutationId,De(this,sr,l.mutationCache),De(this,Ur,[]),this.state=l.state||getDefaultState(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){ne(this,Ur).includes(l)||(ne(this,Ur).push(l),this.clearGcTimeout(),ne(this,sr).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){De(this,Ur,ne(this,Ur).filter(u=>u!==l)),this.scheduleGc(),ne(this,sr).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){ne(this,Ur).length||(this.state.status==="pending"?this.scheduleGc():ne(this,sr).remove(this))}continue(){var l;return((l=ne(this,Kn))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var m,g,v,x,b,S,E,w,T,C,M,A,k,I,O,j,N,V,z,W;const u=()=>{lt(this,Gr,Vn).call(this,{type:"continue"})},d={client:ne(this,ls),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,Kn,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(l,d):Promise.reject(new Error("No mutationFn found")),onFail:(X,ie)=>{lt(this,Gr,Vn).call(this,{type:"failed",failureCount:X,error:ie})},onPause:()=>{lt(this,Gr,Vn).call(this,{type:"pause"})},onContinue:u,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ne(this,sr).canRun(this)}));const f=this.state.status==="pending",h=!ne(this,Kn).canStart();try{if(f)u();else{lt(this,Gr,Vn).call(this,{type:"pending",variables:l,isPaused:h}),await((g=(m=ne(this,sr).config).onMutate)==null?void 0:g.call(m,l,this,d));const ie=await((x=(v=this.options).onMutate)==null?void 0:x.call(v,l,d));ie!==this.state.context&&lt(this,Gr,Vn).call(this,{type:"pending",context:ie,variables:l,isPaused:h})}const X=await ne(this,Kn).start();return await((S=(b=ne(this,sr).config).onSuccess)==null?void 0:S.call(b,X,l,this.state.context,this,d)),await((w=(E=this.options).onSuccess)==null?void 0:w.call(E,X,l,this.state.context,d)),await((C=(T=ne(this,sr).config).onSettled)==null?void 0:C.call(T,X,null,this.state.variables,this.state.context,this,d)),await((A=(M=this.options).onSettled)==null?void 0:A.call(M,X,null,l,this.state.context,d)),lt(this,Gr,Vn).call(this,{type:"success",data:X}),X}catch(X){try{throw await((I=(k=ne(this,sr).config).onError)==null?void 0:I.call(k,X,l,this.state.context,this,d)),await((j=(O=this.options).onError)==null?void 0:j.call(O,X,l,this.state.context,d)),await((V=(N=ne(this,sr).config).onSettled)==null?void 0:V.call(N,void 0,X,this.state.variables,this.state.context,this,d)),await((W=(z=this.options).onSettled)==null?void 0:W.call(z,void 0,X,l,this.state.context,d)),X}finally{lt(this,Gr,Vn).call(this,{type:"error",error:X})}}finally{ne(this,sr).runNext(this)}}},ls=new WeakMap,Ur=new WeakMap,sr=new WeakMap,Kn=new WeakMap,Gr=new WeakSet,Vn=function(l){const u=d=>{switch(l.type){case"failed":return{...d,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...d,isPaused:!0};case"continue":return{...d,isPaused:!1};case"pending":return{...d,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...d,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...d,data:void 0,error:l.error,failureCount:d.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=u(this.state),notifyManager.batch(()=>{ne(this,Ur).forEach(d=>{d.onMutationUpdate(l)}),ne(this,sr).notify({mutation:this,type:"updated",action:l})})},ac);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var MutationCache=(lc=class extends Subscribable{constructor(l={}){super();Xe(this,rn);Xe(this,kr);Xe(this,cs);this.config=l,De(this,rn,new Set),De(this,kr,new Map),De(this,cs,0)}build(l,u,d){const f=new Mutation({client:l,mutationCache:this,mutationId:++ca(this,cs)._,options:l.defaultMutationOptions(u),state:d});return this.add(f),f}add(l){ne(this,rn).add(l);const u=scopeFor(l);if(typeof u=="string"){const d=ne(this,kr).get(u);d?d.push(l):ne(this,kr).set(u,[l])}this.notify({type:"added",mutation:l})}remove(l){if(ne(this,rn).delete(l)){const u=scopeFor(l);if(typeof u=="string"){const d=ne(this,kr).get(u);if(d)if(d.length>1){const f=d.indexOf(l);f!==-1&&d.splice(f,1)}else d[0]===l&&ne(this,kr).delete(u)}}this.notify({type:"removed",mutation:l})}canRun(l){const u=scopeFor(l);if(typeof u=="string"){const d=ne(this,kr).get(u),f=d==null?void 0:d.find(h=>h.state.status==="pending");return!f||f===l}else return!0}runNext(l){var d;const u=scopeFor(l);if(typeof u=="string"){const f=(d=ne(this,kr).get(u))==null?void 0:d.find(h=>h!==l&&h.state.isPaused);return(f==null?void 0:f.continue())??Promise.resolve()}else return Promise.resolve()}clear(){notifyManager.batch(()=>{ne(this,rn).forEach(l=>{this.notify({type:"removed",mutation:l})}),ne(this,rn).clear(),ne(this,kr).clear()})}getAll(){return Array.from(ne(this,rn))}find(l){const u={exact:!0,...l};return this.getAll().find(d=>matchMutation(u,d))}findAll(l={}){return this.getAll().filter(u=>matchMutation(l,u))}notify(l){notifyManager.batch(()=>{this.listeners.forEach(u=>{u(l)})})}resumePausedMutations(){const l=this.getAll().filter(u=>u.state.isPaused);return notifyManager.batch(()=>Promise.all(l.map(u=>u.continue().catch(noop$1))))}},rn=new WeakMap,kr=new WeakMap,cs=new WeakMap,lc);function scopeFor(o){var l;return(l=o.options.scope)==null?void 0:l.id}var MutationObserver$1=(cc=class extends Subscribable{constructor(u,d){super();Xe(this,on);Xe(this,nn);Xe(this,_n);Xe(this,ur);Xe(this,sn);De(this,nn,u),this.setOptions(d),this.bindMethods(),lt(this,on,ua).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(u){var f;const d=this.options;this.options=ne(this,nn).defaultMutationOptions(u),shallowEqualObjects(this.options,d)||ne(this,nn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ne(this,ur),observer:this}),d!=null&&d.mutationKey&&this.options.mutationKey&&hashKey(d.mutationKey)!==hashKey(this.options.mutationKey)?this.reset():((f=ne(this,ur))==null?void 0:f.state.status)==="pending"&&ne(this,ur).setOptions(this.options)}onUnsubscribe(){var u;this.hasListeners()||(u=ne(this,ur))==null||u.removeObserver(this)}onMutationUpdate(u){lt(this,on,ua).call(this),lt(this,on,tc).call(this,u)}getCurrentResult(){return ne(this,_n)}reset(){var u;(u=ne(this,ur))==null||u.removeObserver(this),De(this,ur,void 0),lt(this,on,ua).call(this),lt(this,on,tc).call(this)}mutate(u,d){var f;return De(this,sn,d),(f=ne(this,ur))==null||f.removeObserver(this),De(this,ur,ne(this,nn).getMutationCache().build(ne(this,nn),this.options)),ne(this,ur).addObserver(this),ne(this,ur).execute(u)}},nn=new WeakMap,_n=new WeakMap,ur=new WeakMap,sn=new WeakMap,on=new WeakSet,ua=function(){var d;const u=((d=ne(this,ur))==null?void 0:d.state)??getDefaultState();De(this,_n,{...u,isPending:u.status==="pending",isSuccess:u.status==="success",isError:u.status==="error",isIdle:u.status==="idle",mutate:this.mutate,reset:this.reset})},tc=function(u){notifyManager.batch(()=>{var d,f,h,m,g,v,x,b;if(ne(this,sn)&&this.hasListeners()){const S=ne(this,_n).variables,E=ne(this,_n).context,w={client:ne(this,nn),meta:this.options.meta,mutationKey:this.options.mutationKey};(u==null?void 0:u.type)==="success"?((f=(d=ne(this,sn)).onSuccess)==null||f.call(d,u.data,S,E,w),(m=(h=ne(this,sn)).onSettled)==null||m.call(h,u.data,null,S,E,w)):(u==null?void 0:u.type)==="error"&&((v=(g=ne(this,sn)).onError)==null||v.call(g,u.error,S,E,w),(b=(x=ne(this,sn)).onSettled)==null||b.call(x,void 0,u.error,S,E,w))}this.listeners.forEach(S=>{S(ne(this,_n))})})},cc),QueryCache=(uc=class extends Subscribable{constructor(l={}){super();Xe(this,Hr);this.config=l,De(this,Hr,new Map)}build(l,u,d){const f=u.queryKey,h=u.queryHash??hashQueryKeyByOptions(f,u);let m=this.get(h);return m||(m=new Query({client:l,queryKey:f,queryHash:h,options:l.defaultQueryOptions(u),state:d,defaultOptions:l.getQueryDefaults(f)}),this.add(m)),m}add(l){ne(this,Hr).has(l.queryHash)||(ne(this,Hr).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const u=ne(this,Hr).get(l.queryHash);u&&(l.destroy(),u===l&&ne(this,Hr).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return ne(this,Hr).get(l)}getAll(){return[...ne(this,Hr).values()]}find(l){const u={exact:!0,...l};return this.getAll().find(d=>matchQuery(u,d))}findAll(l={}){const u=this.getAll();return Object.keys(l).length>0?u.filter(d=>matchQuery(l,d)):u}notify(l){notifyManager.batch(()=>{this.listeners.forEach(u=>{u(l)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},Hr=new WeakMap,uc),QueryClient=(dc=class{constructor(o={}){Xe(this,jt);Xe(this,En);Xe(this,Sn);Xe(this,Si);Xe(this,wi);Xe(this,wn);Xe(this,Ti);Xe(this,Ci);De(this,jt,o.queryCache||new QueryCache),De(this,En,o.mutationCache||new MutationCache),De(this,Sn,o.defaultOptions||{}),De(this,Si,new Map),De(this,wi,new Map),De(this,wn,0)}mount(){ca(this,wn)._++,ne(this,wn)===1&&(De(this,Ti,focusManager.subscribe(async o=>{o&&(await this.resumePausedMutations(),ne(this,jt).onFocus())})),De(this,Ci,onlineManager.subscribe(async o=>{o&&(await this.resumePausedMutations(),ne(this,jt).onOnline())})))}unmount(){var o,l;ca(this,wn)._--,ne(this,wn)===0&&((o=ne(this,Ti))==null||o.call(this),De(this,Ti,void 0),(l=ne(this,Ci))==null||l.call(this),De(this,Ci,void 0))}isFetching(o){return ne(this,jt).findAll({...o,fetchStatus:"fetching"}).length}isMutating(o){return ne(this,En).findAll({...o,status:"pending"}).length}getQueryData(o){var u;const l=this.defaultQueryOptions({queryKey:o});return(u=ne(this,jt).get(l.queryHash))==null?void 0:u.state.data}ensureQueryData(o){const l=this.defaultQueryOptions(o),u=ne(this,jt).build(this,l),d=u.state.data;return d===void 0?this.fetchQuery(o):(o.revalidateIfStale&&u.isStaleByTime(resolveStaleTime(l.staleTime,u))&&this.prefetchQuery(l),Promise.resolve(d))}getQueriesData(o){return ne(this,jt).findAll(o).map(({queryKey:l,state:u})=>{const d=u.data;return[l,d]})}setQueryData(o,l,u){const d=this.defaultQueryOptions({queryKey:o}),f=ne(this,jt).get(d.queryHash),h=f==null?void 0:f.state.data,m=functionalUpdate(l,h);if(m!==void 0)return ne(this,jt).build(this,d).setData(m,{...u,manual:!0})}setQueriesData(o,l,u){return notifyManager.batch(()=>ne(this,jt).findAll(o).map(({queryKey:d})=>[d,this.setQueryData(d,l,u)]))}getQueryState(o){var u;const l=this.defaultQueryOptions({queryKey:o});return(u=ne(this,jt).get(l.queryHash))==null?void 0:u.state}removeQueries(o){const l=ne(this,jt);notifyManager.batch(()=>{l.findAll(o).forEach(u=>{l.remove(u)})})}resetQueries(o,l){const u=ne(this,jt);return notifyManager.batch(()=>(u.findAll(o).forEach(d=>{d.reset()}),this.refetchQueries({type:"active",...o},l)))}cancelQueries(o,l={}){const u={revert:!0,...l},d=notifyManager.batch(()=>ne(this,jt).findAll(o).map(f=>f.cancel(u)));return Promise.all(d).then(noop$1).catch(noop$1)}invalidateQueries(o,l={}){return notifyManager.batch(()=>(ne(this,jt).findAll(o).forEach(u=>{u.invalidate()}),(o==null?void 0:o.refetchType)==="none"?Promise.resolve():this.refetchQueries({...o,type:(o==null?void 0:o.refetchType)??(o==null?void 0:o.type)??"active"},l)))}refetchQueries(o,l={}){const u={...l,cancelRefetch:l.cancelRefetch??!0},d=notifyManager.batch(()=>ne(this,jt).findAll(o).filter(f=>!f.isDisabled()&&!f.isStatic()).map(f=>{let h=f.fetch(void 0,u);return u.throwOnError||(h=h.catch(noop$1)),f.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(d).then(noop$1)}fetchQuery(o){const l=this.defaultQueryOptions(o);l.retry===void 0&&(l.retry=!1);const u=ne(this,jt).build(this,l);return u.isStaleByTime(resolveStaleTime(l.staleTime,u))?u.fetch(l):Promise.resolve(u.state.data)}prefetchQuery(o){return this.fetchQuery(o).then(noop$1).catch(noop$1)}fetchInfiniteQuery(o){return o.behavior=infiniteQueryBehavior(o.pages),this.fetchQuery(o)}prefetchInfiniteQuery(o){return this.fetchInfiniteQuery(o).then(noop$1).catch(noop$1)}ensureInfiniteQueryData(o){return o.behavior=infiniteQueryBehavior(o.pages),this.ensureQueryData(o)}resumePausedMutations(){return onlineManager.isOnline()?ne(this,En).resumePausedMutations():Promise.resolve()}getQueryCache(){return ne(this,jt)}getMutationCache(){return ne(this,En)}getDefaultOptions(){return ne(this,Sn)}setDefaultOptions(o){De(this,Sn,o)}setQueryDefaults(o,l){ne(this,Si).set(hashKey(o),{queryKey:o,defaultOptions:l})}getQueryDefaults(o){const l=[...ne(this,Si).values()],u={};return l.forEach(d=>{partialMatchKey(o,d.queryKey)&&Object.assign(u,d.defaultOptions)}),u}setMutationDefaults(o,l){ne(this,wi).set(hashKey(o),{mutationKey:o,defaultOptions:l})}getMutationDefaults(o){const l=[...ne(this,wi).values()],u={};return l.forEach(d=>{partialMatchKey(o,d.mutationKey)&&Object.assign(u,d.defaultOptions)}),u}defaultQueryOptions(o){if(o._defaulted)return o;const l={...ne(this,Sn).queries,...this.getQueryDefaults(o.queryKey),...o,_defaulted:!0};return l.queryHash||(l.queryHash=hashQueryKeyByOptions(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===skipToken&&(l.enabled=!1),l}defaultMutationOptions(o){return o!=null&&o._defaulted?o:{...ne(this,Sn).mutations,...(o==null?void 0:o.mutationKey)&&this.getMutationDefaults(o.mutationKey),...o,_defaulted:!0}}clear(){ne(this,jt).clear(),ne(this,En).clear()}},jt=new WeakMap,En=new WeakMap,Sn=new WeakMap,Si=new WeakMap,wi=new WeakMap,wn=new WeakMap,Ti=new WeakMap,Ci=new WeakMap,dc),QueryClientContext=reactExports.createContext(void 0),useQueryClient=o=>{const l=reactExports.useContext(QueryClientContext);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},QueryClientProvider=({client:o,children:l})=>(reactExports.useEffect(()=>(o.mount(),()=>{o.unmount()}),[o]),jsxRuntimeExports.jsx(QueryClientContext.Provider,{value:o,children:l})),IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let o=!1;return{clearReset:()=>{o=!1},reset:()=>{o=!0},isReset:()=>o}}var QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext),ensurePreventErrorBoundaryRetry=(o,l)=>{(o.suspense||o.throwOnError||o.experimental_prefetchInRender)&&(l.isReset()||(o.retryOnMount=!1))},useClearResetErrorBoundary=o=>{reactExports.useEffect(()=>{o.clearReset()},[o])},getHasError=({result:o,errorResetBoundary:l,throwOnError:u,query:d,suspense:f})=>o.isError&&!l.isReset()&&!o.isFetching&&d&&(f&&o.data===void 0||shouldThrowError(u,[o.error,d])),defaultThrowOnError=(o,l)=>l.state.data===void 0,ensureSuspenseTimers=o=>{if(o.suspense){const u=f=>f==="static"?f:Math.max(f??1e3,1e3),d=o.staleTime;o.staleTime=typeof d=="function"?(...f)=>u(d(...f)):u(d),typeof o.gcTime=="number"&&(o.gcTime=Math.max(o.gcTime,1e3))}},willFetch=(o,l)=>o.isLoading&&o.isFetching&&!l,shouldSuspend=(o,l)=>(o==null?void 0:o.suspense)&&l.isPending,fetchOptimistic=(o,l,u)=>l.fetchOptimistic(o).catch(()=>{u.clearReset()});function useBaseQuery(o,l,u){var S,E,w,T,C;const d=useIsRestoring(),f=useQueryErrorResetBoundary(),h=useQueryClient(),m=h.defaultQueryOptions(o);(E=(S=h.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||E.call(S,m),m._optimisticResults=d?"isRestoring":"optimistic",ensureSuspenseTimers(m),ensurePreventErrorBoundaryRetry(m,f),useClearResetErrorBoundary(f);const g=!h.getQueryCache().get(m.queryHash),[v]=reactExports.useState(()=>new l(h,m)),x=v.getOptimisticResult(m),b=!d&&o.subscribed!==!1;if(reactExports.useSyncExternalStore(reactExports.useCallback(M=>{const A=b?v.subscribe(notifyManager.batchCalls(M)):noop$1;return v.updateResult(),A},[v,b]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),reactExports.useEffect(()=>{v.setOptions(m)},[m,v]),shouldSuspend(m,x))throw fetchOptimistic(m,v,f);if(getHasError({result:x,errorResetBoundary:f,throwOnError:m.throwOnError,query:h.getQueryCache().get(m.queryHash),suspense:m.suspense}))throw x.error;if((T=(w=h.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||T.call(w,m,x),m.experimental_prefetchInRender&&!isServer&&willFetch(x,d)){const M=g?fetchOptimistic(m,v,f):(C=h.getQueryCache().get(m.queryHash))==null?void 0:C.promise;M==null||M.catch(noop$1).finally(()=>{v.updateResult()})}return m.notifyOnChangeProps?x:v.trackResult(x)}function useQuery(o,l){return useBaseQuery(o,QueryObserver)}function useSuspenseQuery(o,l){return useBaseQuery({...o,enabled:!0,suspense:!0,throwOnError:defaultThrowOnError,placeholderData:void 0},QueryObserver)}function useMutation(o,l){const u=useQueryClient(),[d]=reactExports.useState(()=>new MutationObserver$1(u,o));reactExports.useEffect(()=>{d.setOptions(o)},[d,o]);const f=reactExports.useSyncExternalStore(reactExports.useCallback(m=>d.subscribe(notifyManager.batchCalls(m)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),h=reactExports.useCallback((m,g)=>{d.mutate(m,g).catch(noop$1)},[d]);if(f.error&&shouldThrowError(d.options.throwOnError,[f.error]))throw f.error;return{...f,mutate:h,mutateAsync:f.mutate}}const PROFILE_TAG="profile";function useProfile(o){return useSuspenseQuery({queryKey:[PROFILE_TAG],queryFn:async()=>{const l=await window.CryptoSteamSDK.getProfile();return setUser({id:String(l.id)}),l},select:l=>({...l,inventory:l.inventory||[],balance_usdt:dividePriceResponse(l.balance_usdt),balances:{...l.balances,usdt:dividePriceResponse(l.balance_usdt)}}),...o})}const LevelInfoModal=({children:o})=>{const{t:l}=useTranslation(),[u,d]=reactExports.useState(!1),{data:{level_up_exp:f,experience:h,level:m,current_level_exp:g}}=useProfile(),[v]=useAnimateNumber(h);return jsxRuntimeExports.jsx(Drawer,{trigger:o,open:u,onOpenChange:d,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-16 h-18 flex items-center justify-center",children:jsxRuntimeExports.jsx(XpProgress,{experience:h-g,xpNeeded:f-g,level:m,size:64,className:"text-[var(--tgui--button_color)]"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:l("levelInfoModal.title")}),jsxRuntimeExports.jsxs(Caption,{level:"1",weight:"2",className:"text-center",children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--tgui--text_color)"},children:v.toLocaleString()}),jsxRuntimeExports.jsxs("span",{style:{color:"var(--tgui--subtitle_text_color)"},children:[" / ",f.toLocaleString()," XP"]})]})]})]}),jsxRuntimeExports.jsx("div",{className:"-mt-1.5 text-center",children:jsxRuntimeExports.jsx(Subheadline,{level:"2",weight:"3",children:l("levelInfoModal.description")})}),jsxRuntimeExports.jsx(Button,{size:"s",stretched:!0,onClick:()=>d(!1),mode:"filled",style:{height:42},children:l("levelInfoModal.action")})]})})};function AnimatedBalance({value:o,style:l,className:u,colorText:d="",noRounding:f}){const[h,m]=useAnimateNumber(0,!1,f),[g,v]=reactExports.useState(d),x=reactExports.useRef(0),b=reactExports.useRef();reactExports.useEffect(()=>{const E=o,w=x.current;return b.current&&clearTimeout(b.current),w!==0&&(E>w?v("#22C55E"):E<w&&v("#FF7700")),m(E),b.current=setTimeout(()=>{v(d)},300),x.current=E,()=>{b.current&&clearTimeout(b.current)}},[o,m,d]);const S=f?Math.trunc((h??0)*100)/100:Math.round(h??0);return jsxRuntimeExports.jsx(Text,{weight:"1",className:cn$1("text-rounded",u),style:{color:g||"inherit",transition:"color 0.3s ease",...l},children:formatter.format(S)})}const Icons={thumbsDownOutlined:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m15.5 15.16-.61.53a.45.45 0 0 0-.15.24l-.92 4.36a3.1 3.1 0 0 1-4.37 2.24 3.24 3.24 0 0 1-1.8-2.93v-2.18c-1.82-.01-3.42-.47-4.57-1.6-1.17-1.14-1.7-2.8-1.7-4.88V9.77c0-2.07.53-3.74 1.7-4.87 1.16-1.12 2.78-1.57 4.6-1.57h7.87c.41-.53 1-.91 1.68-1.04.24-.04.5-.04.8-.04h.14A2.79 2.79 0 0 1 21.2 4.6c.04.24.04.52.04.83v7.72c0 .32 0 .6-.04.84a2.79 2.79 0 0 1-2.22 2.3c-.24.04-.5.04-.8.04h-.14c-.3 0-.57 0-.8-.04a2.73 2.73 0 0 1-1.75-1.13Zm-3.52 4.71a1.23 1.23 0 0 1-1.73.89 1.29 1.29 0 0 1-.72-1.16v-3.16a.96.96 0 0 0-.94-.97h-.9c-1.56 0-2.63-.4-3.32-1.06-.67-.66-1.12-1.74-1.12-3.47V9.77c0-1.73.45-2.8 1.12-3.44.68-.66 1.75-1.05 3.32-1.05h7.28V13.1a.96.96 0 0 0-.08.06l-1.21 1.04c-.4.34-.67.8-.78 1.33l-.92 4.35Zm6.67-5.5-.54.01-.55-.01a.87.87 0 0 1-.7-.72V4.93a.87.87 0 0 1 .7-.72l.55-.01.54.01c.36.07.64.36.7.72l.01.57v7.58l-.01.57a.87.87 0 0 1-.7.72Z",clipRule:"evenodd"})}),thumbsUpOutlined:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m8.2 8.97.6-.63c.05-.05.1-.12.11-.2l1.02-4.56a3.03 3.03 0 0 1 3.55-2.36 3.11 3.11 0 0 1 2.43 3.07v2.4h.1c1.94 0 3.55.43 4.66 1.57 1.1 1.15 1.52 2.81 1.52 4.82v1.09c0 2.08-.58 3.73-1.74 4.84A6.2 6.2 0 0 1 16 20.56h-7.9c-.33.48-.81.84-1.38 1-.33.08-.69.08-1.08.08h-.19c-.39 0-.75 0-1.08-.09a2.56 2.56 0 0 1-1.77-1.84 4.54 4.54 0 0 1-.09-1.11v-7.78c0-.4 0-.78.09-1.12.23-.9.9-1.6 1.77-1.84.33-.09.7-.09 1.08-.09h.19c.39 0 .75 0 1.08.1.61.16 1.13.56 1.46 1.1Zm3.57-4.95c.14-.62.73-1.02 1.34-.9.53.12.92.6.92 1.17v3.38c0 .54.42.97.94.97H16c1.73 0 2.73.39 3.33 1 .6.62.96 1.66.96 3.44v1.09c0 1.7-.46 2.77-1.13 3.41-.69.66-1.73 1.03-3.16 1.03L8.6 18.6v-7.28l1.54-1.6c.3-.31.52-.7.61-1.14l1.03-4.56Zm-5.06 6.9v7.58c0 .57-.01.66-.03.71a.64.64 0 0 1-.44.46c-.05.01-.14.02-.68.02-.55 0-.64 0-.69-.02a.64.64 0 0 1-.44-.46 4.12 4.12 0 0 1-.02-.71v-7.58c0-.57 0-.66.02-.71.05-.23.22-.4.44-.46.05-.02.14-.03.69-.03.54 0 .63.01.68.03.22.06.39.23.44.46.02.05.02.15.03.71Z",clipRule:"evenodd"})}),thumbsDownFilled:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"m21.32 13.75.01-.58V5l-.01-.59a2 2 0 0 0-1.74-1.73L19 2.67l-.59.01a2 2 0 0 0-1.73 1.73l-.01.59v8.17l.01.58a2 2 0 0 0 1.73 1.73c.13.02.28.02.59.02.3 0 .46 0 .58-.02a2 2 0 0 0 1.74-1.73ZM7.5 3.83c-3.79 0-6 1.79-6 5.89v1.26c0 4.1 2.21 5.69 6 5.69h1v3.65a2.18 2.18 0 0 0 4.26.63l1.73-5.52c.05-.17.08-.34.08-.5V5.7c0-.65 0-.98-.13-1.23-.11-.22-.3-.4-.51-.51-.25-.13-.58-.13-1.23-.13H7.5Z"})}),thumbsUpFilled:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"m2.68 10.24-.01.59v8.16l.01.59a2 2 0 0 0 1.73 1.73c.13.02.29.02.59.02s.46 0 .59-.02a2 2 0 0 0 1.73-1.73l.01-.59v-8.16l-.01-.59a2 2 0 0 0-1.73-1.73C5.46 8.5 5.3 8.5 5 8.5s-.46 0-.59.02a2 2 0 0 0-1.73 1.73ZM16.5 20.16c3.79 0 6-1.78 6-5.88v-1.26c0-4.1-2.21-5.7-6-5.7h-1V3.69a2.18 2.18 0 0 0-4.26-.63L9.51 8.57c-.05.16-.08.33-.08.5v9.22c0 .66 0 .98.13 1.23.11.22.29.4.51.51.25.13.58.13 1.23.13h5.2Z"})}),star:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M11.17 2.49a.87.87 0 0 1 1.66 0L13.9 5.7c.16.5.74.74 1.21.5l3.03-1.51a.87.87 0 0 1 1.17 1.17L17.8 8.9a.87.87 0 0 0 .5 1.21l3.21 1.07c.8.27.8 1.4 0 1.66L18.3 13.9a.87.87 0 0 0-.5 1.21l1.51 3.03a.87.87 0 0 1-1.17 1.17L15.1 17.8a.87.87 0 0 0-1.21.5l-1.07 3.21c-.27.8-1.4.8-1.66 0L10.1 18.3a.87.87 0 0 0-1.21-.5L5.86 19.3a.87.87 0 0 1-1.17-1.17L6.2 15.1a.87.87 0 0 0-.5-1.21l-3.21-1.07a.87.87 0 0 1 0-1.66L5.7 10.1c.5-.16.74-.74.5-1.21L4.7 5.86A.87.87 0 0 1 5.86 4.7L8.9 6.2a.87.87 0 0 0 1.21-.5l1.07-3.21Z"})}),smile:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.987 14c0-4.953 4.024-8.991 9.015-8.991S23.017 9.047 23.017 14s-4.024 8.991-9.015 8.991S4.987 18.953 4.987 14m9.015-11c-6.063 0-11 4.912-11 11s4.937 11 11 11 11-4.912 11-11-4.937-11-11-11m4.438 13.835a1.01 1.01 0 0 0-.604-1.283.99.99 0 0 0-1.27.616 1 1 0 0 1-.069.132 2.1 2.1 0 0 1-.372.466c-.348.331-.983.728-2.123.728s-1.775-.397-2.123-.727a2.1 2.1 0 0 1-.372-.467 1 1 0 0 1-.07-.132l-.005-.013-.003-.007a.99.99 0 0 0-1.261-.596c-.517.186-.787.76-.604 1.283l.89-.32-.89.32v.002l.002.003.002.006.005.013a2 2 0 0 0 .059.142c.038.084.092.194.166.321.148.254.38.582.722.908.704.67 1.82 1.272 3.482 1.272s2.778-.602 3.482-1.272a4.2 4.2 0 0 0 .722-.908 3.5 3.5 0 0 0 .225-.463l.005-.014.002-.005.001-.003v-.001l-.886-.32zM11.007 12.8c.688 0 1.247-.66 1.247-1.476s-.559-1.477-1.247-1.477c-.69 0-1.247.661-1.247 1.477 0 .815.558 1.476 1.247 1.476m5.986 0c.688 0 1.247-.66 1.247-1.476s-.559-1.477-1.247-1.477c-.69 0-1.247.661-1.247 1.477 0 .815.558 1.476 1.246 1.476Z",clipRule:"evenodd"})}),discountOutline:o=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.04 2.57a2.81 2.81 0 0 0-4.05 0l-.65.68a1.1 1.1 0 0 1-.9.33l-.94-.1a2.81 2.81 0 0 0-3.1 2.6L4.35 7c-.02.34-.2.65-.48.84l-.78.52a2.81 2.81 0 0 0-.7 3.98l.55.76c.2.28.26.63.17.95l-.26.9a2.81 2.81 0 0 0 2.02 3.5l.91.23c.33.08.6.31.74.62l.38.86a2.81 2.81 0 0 0 3.8 1.38l.84-.41c.3-.15.66-.15.97 0l.84.41c1.43.7 3.15.07 3.8-1.38l.38-.86c.14-.3.41-.54.74-.62l.9-.23a2.81 2.81 0 0 0 2.03-3.5l-.26-.9a1.1 1.1 0 0 1 .17-.95l.55-.76c.93-1.28.62-3.09-.7-3.98l-.78-.52a1.1 1.1 0 0 1-.48-.84l-.07-.93a2.81 2.81 0 0 0-3.1-2.6l-.93.1a1.1 1.1 0 0 1-.9-.33l-.65-.68Zm-2.81 1.2a1.1 1.1 0 0 1 1.57 0l.66.67c.6.62 1.45.93 2.31.84l.93-.1a1.1 1.1 0 0 1 1.21 1.02l.07.93c.06.87.51 1.65 1.23 2.14l.78.52c.51.35.64 1.05.27 1.56l-.55.76c-.5.7-.66 1.6-.43 2.42l.26.9a1.1 1.1 0 0 1-.79 1.37l-.9.23c-.85.2-1.54.8-1.9 1.58l-.38.86a1.1 1.1 0 0 1-1.48.54l-.84-.41a2.81 2.81 0 0 0-2.47 0l-.84.4a1.1 1.1 0 0 1-1.48-.53l-.38-.86a2.81 2.81 0 0 0-1.9-1.58l-.9-.23a1.1 1.1 0 0 1-.8-1.37l.27-.9c.24-.83.08-1.72-.43-2.42l-.55-.76a1.1 1.1 0 0 1 .27-1.56l.78-.52a2.81 2.81 0 0 0 1.23-2.14l.07-.93a1.1 1.1 0 0 1 1.2-1.02l.94.1c.86.1 1.71-.22 2.31-.84l.66-.68Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 6c.36 0 .64.29.64.64v.68c1.66.17 2.8.98 3.17 1.86a.64.64 0 1 1-1.19.5c-.12-.3-.73-.9-1.98-1.07v2.82c1.22.19 2.02.53 2.52 1 .62.59.7 1.26.7 1.71 0 .84-.54 1.5-1.22 1.91-.55.34-1.24.55-2 .63v.68a.64.64 0 0 1-1.28 0v-.68c-1.66-.17-2.8-.98-3.17-1.86a.64.64 0 0 1 1.19-.5c.12.3.73.9 1.98 1.07v-2.82a4.62 4.62 0 0 1-2.52-1 2.21 2.21 0 0 1-.7-1.71c0-.84.54-1.5 1.23-1.91a4.78 4.78 0 0 1 1.99-.63v-.68c0-.35.29-.64.64-.64Zm-.64 2.61c-.54.07-1 .23-1.33.43-.45.28-.6.59-.6.82 0 .3.04.54.29.77.23.2.7.47 1.64.63V8.61Zm1.28 4.13v2.65c.54-.07 1-.23 1.33-.43.45-.28.6-.59.6-.82 0-.3-.04-.54-.29-.77-.22-.2-.7-.47-1.64-.63Z",clipRule:"evenodd"})]}),cup:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.6 1.71H9.4c-.57 0-1.05 0-1.45.04a3 3 0 0 0-1.2.33c-.57.3-1.06.85-1.32 1.44a3.57 3.57 0 0 0-.21 1.67c-.54-.1-1.1-.04-1.59.12A2.76 2.76 0 0 0 1.71 8c0 1.34.8 2.57 1.85 3.41a6.47 6.47 0 0 0 3.21 1.4c.15.35.3.67.47.98a6.82 6.82 0 0 0 2.39 2.7c-.03.47-.1.8-.18 1.02-.1.28-.21.44-.34.59l-.15.16-.1.1a2.28 2.28 0 0 0-.71 1.74v1.33c0 .47.38.86.85.86h6c.47 0 .86-.39.86-.86V20.1a2.28 2.28 0 0 0-.72-1.74l-.1-.1-.15-.16c-.13-.15-.25-.31-.34-.59a3.9 3.9 0 0 1-.18-1.02 6.82 6.82 0 0 0 2.39-2.7c.16-.3.32-.63.47-.98a6.47 6.47 0 0 0 3.21-1.4A4.57 4.57 0 0 0 22.3 8c0-1.42-.9-2.34-1.92-2.69a3.22 3.22 0 0 0-1.59-.12c.04-.62.01-1.16-.21-1.67a3.11 3.11 0 0 0-1.32-1.44 3 3 0 0 0-1.2-.33c-.4-.04-.88-.04-1.44-.04ZM12.7 17.1a4.72 4.72 0 0 1-1.4 0c-.05.37-.13.7-.22.97-.19.55-.45.9-.7 1.18l-.23.25-.06.06c-.08.08-.12.13-.15.18-.03.05-.08.13-.08.37v.47h4.28v-.47c0-.24-.05-.32-.08-.37a1.42 1.42 0 0 0-.17-.2l-.04-.04-.24-.25a3.3 3.3 0 0 1-.69-1.18c-.1-.28-.17-.6-.21-.97Zm6.66-7c-.43.35-.94.63-1.48.81.33-1.15.56-2.43.73-3.8.21-.2.7-.34 1.2-.16.44.15.76.48.76 1.06 0 .66-.41 1.43-1.21 2.09Zm-13.24.81a25.2 25.2 0 0 1-.73-3.8c-.21-.2-.7-.34-1.2-.16-.44.15-.76.48-.76 1.06 0 .66.41 1.43 1.21 2.09.43.35.94.63 1.48.81Zm1.45-7.32c.1-.05.24-.1.53-.12.31-.03.72-.03 1.33-.03h5.14c.61 0 1.02 0 1.33.03.3.02.43.07.53.12.23.13.46.38.57.62.1.25.1.54 0 1.72-.25 2.94-.85 5.39-1.75 7.06-.9 1.68-2 2.45-3.25 2.45s-2.35-.77-3.25-2.45c-.9-1.67-1.5-4.12-1.75-7.06-.1-1.18-.1-1.47 0-1.72.1-.24.34-.5.57-.62Z",clipRule:"evenodd"})}),games:o=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.82 3.86h.36c1.38 0 2.46 0 3.33.06.9.07 1.65.22 2.34.54a6.37 6.37 0 0 1 2.74 2.43c.4.64.62 1.35.78 2.22.17.85.29 1.91.44 3.27l.46 4.06c.05.45 0 .9-.13 1.34a3.4 3.4 0 0 1-6.17.7l-1.39-2.33a.22.22 0 0 0-.19-.11H9.61a.22.22 0 0 0-.19.1l-1.4 2.35a3.4 3.4 0 0 1-6.16-.7 3.3 3.3 0 0 1-.13-1.35l.46-4.06c.15-1.36.27-2.42.44-3.27.16-.87.39-1.58.78-2.22a6.37 6.37 0 0 1 2.74-2.43 6.6 6.6 0 0 1 2.34-.54c.87-.06 1.95-.06 3.33-.06Zm-3.2 1.7c-.79.07-1.3.18-1.73.38a4.7 4.7 0 0 0-2.02 1.8c-.25.4-.43.9-.57 1.67a45.2 45.2 0 0 0-.43 3.18l-.45 4.02a1.7 1.7 0 0 0 3.14 1.06l1.39-2.35c.34-.57.97-.93 1.66-.93h4.78c.7 0 1.32.36 1.66.93l1.4 2.35a1.69 1.69 0 0 0 3.13-1.06l-.45-4.02c-.16-1.4-.27-2.4-.43-3.18a4.83 4.83 0 0 0-.57-1.68 4.69 4.69 0 0 0-2.02-1.79 4.9 4.9 0 0 0-1.73-.37c-.8-.07-1.82-.07-3.23-.07h-.3c-1.41 0-2.43 0-3.23.07Zm-.09 2.42c.47 0 .85.37.85.82v.55h.54c.47 0 .85.37.85.83 0 .45-.38.82-.85.82h-.54v.55c0 .45-.38.82-.85.82a.84.84 0 0 1-.85-.82V11h-.54a.84.84 0 0 1-.84-.82c0-.46.38-.83.84-.83h.54V8.8c0-.45.38-.82.85-.82Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M16.62 8.3c0 .47-.4.86-.9.86-.49 0-.89-.39-.89-.87s.4-.86.9-.86.9.38.9.86ZM18.51 10.12c0 .48-.4.87-.9.87-.49 0-.9-.39-.9-.87s.41-.86.9-.86c.5 0 .9.38.9.86ZM14.74 10.12c0 .48-.4.87-.9.87s-.9-.39-.9-.87.4-.86.9-.86.9.38.9.86ZM16.62 11.95c0 .48-.4.87-.9.87-.49 0-.89-.39-.89-.87s.4-.87.9-.87.9.4.9.87Z"})]}),download:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M19.14 19c.53 0 .96.45.96 1s-.43 1-.96 1H4.86a.98.98 0 0 1-.96-1c0-.55.43-1 .96-1h14.28ZM12 2c.53 0 .95.45.95 1v10.34l4.57-4.8a.91.91 0 0 1 1.34 0c.38.4.38 1.03 0 1.42l-6.19 6.5a.91.91 0 0 1-1.34 0l-6.2-6.5a1.04 1.04 0 0 1 0-1.42.93.93 0 0 1 1.35 0l4.57 4.8V3c0-.55.42-1 .95-1Z"})}),checkThin:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M24.66 6.21c.4.38.4 1 .03 1.4l-13.3 13.78a.99.99 0 0 1-1.43 0L3.31 14.5a.99.99 0 1 1 1.43-1.37l5.93 6.15 12.6-13.05a1 1 0 0 1 1.4-.02Z",clipRule:"evenodd"})}),addCircle:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.06 18.58a8.65 8.65 0 0 1-8.57-8.57c0-1.18.22-2.28.67-3.32a8.73 8.73 0 0 1 7.9-5.26c1.17 0 2.28.23 3.31.67a8.76 8.76 0 0 1 4.6 4.6c.45 1.03.67 2.13.67 3.3 0 1.18-.22 2.28-.67 3.32a8.76 8.76 0 0 1-4.6 4.59 8.24 8.24 0 0 1-3.31.67Zm0-1.7a6.76 6.76 0 0 0 4.87-2 6.9 6.9 0 1 0-4.87 2ZM10 5.5a.75.75 0 0 0-.75.75v3h-3a.75.75 0 0 0 0 1.5h3v3a.75.75 0 0 0 1.5 0v-3h3a.75.75 0 0 0 0-1.5h-3v-3A.75.75 0 0 0 10 5.5Z",clipRule:"evenodd"})}),search:o=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:[jsxRuntimeExports.jsx("circle",{cx:"9",cy:"10",r:"6",stroke:"currentColor",strokeWidth:"2"}),jsxRuntimeExports.jsx("rect",{width:"8",height:"2",x:"13.88",y:"13.46",fill:"currentColor",rx:"1",transform:"rotate(45 13.88 13.46)"})]}),chevronLeft:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 12",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M.72 6a.88.88 0 0 1 .25-.63L5.06.97a.66.66 0 0 1 .86-.13c.11.07.2.17.27.29a.84.84 0 0 1-.13.97L2.42 6l3.64 3.9c.15.17.22.36.22.58a.8.8 0 0 1-.36.68.66.66 0 0 1-.86-.12L.97 6.63c-.08-.1-.15-.2-.19-.3A.86.86 0 0 1 .72 6Z"})}),chevronRight:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 12",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M6.42 5.77c0 .12-.02.23-.07.33a.9.9 0 0 1-.21.3l-4.5 4.4a.77.77 0 0 1-.56.23.77.77 0 0 1-.4-.1.76.76 0 0 1-.4-.68c0-.22.09-.41.25-.58l4.01-3.9-4-3.9A.79.79 0 0 1 1.07.5c.21 0 .4.07.55.22l4.5 4.41c.1.1.17.2.22.3.05.1.07.2.07.33Z"})}),close:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor","fill-opacity":".8",d:"M7.86 17.14a1 1 0 0 1-1-1.02c0-.27.1-.52.3-.7L10.54 12l-3.4-3.4a.98.98 0 0 1-.3-.71c0-.58.45-1 1.01-1 .28 0 .5.09.7.27l3.42 3.42 3.45-3.43a1 1 0 0 1 1.72.71c0 .29-.1.5-.31.73L13.43 12l3.4 3.4c.2.18.3.44.3.72 0 .57-.45 1.02-1.03 1.02a.97.97 0 0 1-.72-.3l-3.4-3.4-3.38 3.4c-.2.2-.46.3-.74.3Z",opacity:".5"})})};function Icon({name:o,size:l=24,className:u,title:d,"aria-label":f,...h}){const m=Icons[o],g=!!(d||f);return jsxRuntimeExports.jsx(m,{className:cn$1("aspect-square",u),width:l,height:l,role:"img","aria-hidden":!g,"aria-label":f,...h,children:d?jsxRuntimeExports.jsx("title",{children:d}):null})}const useForceRerender=()=>{const[,o]=reactExports.useState(0);return()=>o(l=>l+1)},useMiniApp=()=>{const o=useForceRerender();return reactExports.useEffect(()=>{var u;const l=["viewportChanged","themeChanged","safeAreaChanged","contentSafeAreaChanged","fullscreenChanged"];for(const d of l)(u=window.Telegram.WebApp)==null||u.onEvent(d,o);return window.screen.orientation.addEventListener("change",o),()=>{var d;window.screen.orientation.removeEventListener("change",o);for(const f of l)(d=window.Telegram.WebApp)==null||d.offEvent(f,o)}},[o]),{miniApp:window.Telegram.WebApp}};function useThrottle(o,l=500){const[u,d]=React.useState(o),f=React.useRef(null);return React.useEffect(()=>{const h=Date.now();if(f.current&&h>=f.current+l)f.current=h,d(o);else{const m=window.setTimeout(()=>{f.current=h,d(o)},l);return()=>window.clearTimeout(m)}},[o,l]),u}const createStoreImpl=o=>{let l;const u=new Set,d=(x,b)=>{const S=typeof x=="function"?x(l):x;if(!Object.is(S,l)){const E=l;l=b??(typeof S!="object"||S===null)?S:Object.assign({},l,S),u.forEach(w=>w(l,E))}},f=()=>l,g={setState:d,getState:f,getInitialState:()=>v,subscribe:x=>(u.add(x),()=>u.delete(x))},v=l=o(d,f,g);return g},createStore=o=>o?createStoreImpl(o):createStoreImpl,identity=o=>o;function useStore(o,l=identity){const u=React.useSyncExternalStore(o.subscribe,()=>l(o.getState()),()=>l(o.getInitialState()));return React.useDebugValue(u),u}const createImpl=o=>{const l=createStore(o),u=d=>useStore(l,d);return Object.assign(u,l),u},create=o=>o?createImpl(o):createImpl,useInventoryModalStore=create(o=>({isOpen:!1,setIsOpen:l=>o({isOpen:l})})),useTopUpModalStore=create(o=>({isOpen:!1,setIsOpen:l=>o({isOpen:l})})),IconTelegramStar=o=>jsxRuntimeExports.jsxs("svg",{width:"15",height:"16",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[jsxRuntimeExports.jsx("title",{children:"Telegram star"}),jsxRuntimeExports.jsx("path",{d:"M5.04458 4.95162L6.76524 1.50401C6.96358 1.10625 7.44349 0.946501 7.83713 1.14722C7.99146 1.22591 8.11654 1.35336 8.19305 1.51008L9.81812 4.835C9.95078 5.10661 10.2102 5.29194 10.5079 5.32792L13.9104 5.73869C14.3723 5.79439 14.7022 6.21816 14.6469 6.68507C14.6242 6.87734 14.5373 7.05617 14.4007 7.19164L11.7111 9.85999C11.6025 9.96772 11.5501 10.1203 11.5689 10.2729L12.0159 13.8751C12.0798 14.3908 11.718 14.8614 11.208 14.9259C11.0147 14.9504 10.8185 14.9132 10.6472 14.8191L7.80591 13.2571C7.60021 13.1442 7.35288 13.1409 7.14436 13.2484L4.20051 14.7679C3.78627 14.9819 3.27883 14.8156 3.06727 14.3968C2.98815 14.2401 2.95889 14.0626 2.9836 13.8883L3.219 12.2357C3.33411 11.4274 3.83114 10.7262 4.55123 10.3562L7.82109 8.67603C7.90844 8.63116 7.94313 8.52343 7.89869 8.43521C7.86444 8.36671 7.79074 8.32813 7.71574 8.33897L3.71669 8.91512C3.10542 9.00334 2.48548 8.82972 2.00622 8.43608L0.67443 7.34251C0.294229 7.03037 0.236353 6.46592 0.54524 6.08182C0.688736 5.90321 0.894877 5.78724 1.12074 5.75798L4.5354 5.31578C4.75433 5.28739 4.9453 5.15104 5.04458 4.95162Z",fill:"url(#paint0_linear_13203_44637)"}),jsxRuntimeExports.jsx("path",{d:"M8.14979 9.42368C8.22479 9.41285 8.29849 9.45143 8.33273 9.51993C8.37717 9.60815 8.34249 9.71588 8.25513 9.76075L4.98527 11.4409C4.26519 11.8109 3.76815 12.5121 3.65305 13.3204L3.44604 14.7745C3.28846 14.6964 3.15363 14.5679 3.06779 14.3977C2.98867 14.241 2.95941 14.0635 2.98412 13.8892L3.21952 12.2366C3.33463 11.4283 3.83166 10.7271 4.55175 10.3571L5.67393 9.78026L8.14979 9.42368Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M7.83713 1.14722C7.99146 1.22591 8.11654 1.35336 8.19305 1.51008L9.81812 4.835C9.95078 5.10661 10.2102 5.29194 10.5079 5.32792L13.9104 5.73869C14.3723 5.79439 14.7022 6.21816 14.6469 6.68507C14.6385 6.75704 14.6209 6.82705 14.5954 6.89381C14.5175 6.85783 14.4332 6.83334 14.3439 6.8225L10.9414 6.41173C10.6438 6.37575 10.3843 6.19042 10.2516 5.91881L8.62658 2.5939C8.55006 2.43718 8.42499 2.30972 8.27065 2.23103C7.87701 2.03031 7.3971 2.19007 7.19876 2.58783L5.4781 6.03543C5.37883 6.23485 5.18786 6.3712 4.96893 6.39959L1.55427 6.84179C1.3284 6.87105 1.12226 6.98702 0.978764 7.16563C0.905716 7.25646 0.853259 7.35747 0.820528 7.4626L0.67443 7.34251C0.294229 7.03037 0.236353 6.46592 0.54524 6.08182C0.688736 5.90321 0.894877 5.78724 1.12074 5.75798L4.5354 5.31578C4.75433 5.28739 4.9453 5.15104 5.04458 4.95162L6.76524 1.50401C6.96358 1.10625 7.44349 0.946501 7.83713 1.14722Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M6.45499 1.35048C6.73938 0.780608 7.42912 0.551056 7.99466 0.83935C8.2164 0.952283 8.39523 1.1348 8.50491 1.35893L10.1298 4.68385C10.2111 4.85011 10.3691 4.96304 10.5496 4.98493L13.9522 5.39548C14.6048 5.47438 15.0691 6.07091 14.9915 6.72705C14.9597 6.99692 14.8376 7.24815 14.6451 7.43912L11.9556 10.1072C11.9235 10.1393 11.9074 10.1853 11.9133 10.2315L12.3603 13.8336C12.4476 14.5383 11.9523 15.1825 11.2517 15.2714C10.9855 15.305 10.7159 15.2536 10.4805 15.1242L7.63895 13.5624C7.53468 13.505 7.4094 13.5033 7.30362 13.5579L4.35977 15.0774C3.77364 15.3798 3.05616 15.1448 2.75789 14.5546C2.64669 14.3343 2.60572 14.0851 2.64041 13.8408L2.87581 12.1879C3.00673 11.2687 3.57248 10.4705 4.39293 10.0489L6.7719 8.8264L3.76649 9.2597C3.0839 9.35811 2.392 9.17452 1.8464 8.75313L1.78636 8.70544L0.454356 7.61166C-0.0728106 7.179 -0.152796 6.39801 0.275093 5.86564C0.474515 5.61744 0.761508 5.45596 1.07625 5.41521L4.49091 4.97301C4.59517 4.95957 4.68643 4.89433 4.73455 4.79808L6.45499 1.35048ZM7.6797 1.45734C7.45838 1.34441 7.1883 1.43436 7.07558 1.66023L5.35514 5.10784C5.20427 5.41022 4.91403 5.61766 4.58 5.6608L1.16534 6.10299C1.02856 6.12077 0.903271 6.19122 0.815699 6.30025C0.625815 6.5363 0.661581 6.88442 0.8946 7.07561L2.22661 8.16939C2.63065 8.50104 3.15262 8.64735 3.66743 8.57322L7.66626 7.99685C7.88952 7.96477 8.10759 8.07922 8.20882 8.28059C8.33844 8.53832 8.23678 8.85371 7.9797 8.98593L4.71005 10.6658C4.09011 10.9843 3.66179 11.5886 3.56251 12.2859L3.32711 13.9385C3.31237 14.0424 3.32993 14.1483 3.37696 14.2418C3.50182 14.4889 3.799 14.5862 4.04156 14.4609L6.98563 12.9416C7.29646 12.781 7.66626 12.7858 7.9732 12.9544L10.8145 14.5162C10.9216 14.5752 11.0439 14.5983 11.1646 14.5832C11.4841 14.5426 11.7123 14.2459 11.6718 13.919L11.2248 10.3169C11.1928 10.0578 11.2821 9.79836 11.4672 9.61498L14.1566 6.94663C14.2374 6.86643 14.2892 6.76022 14.3027 6.64555C14.3356 6.36766 14.1403 6.11708 13.8691 6.08413L10.4664 5.67359C10.0517 5.62351 9.69082 5.36557 9.50657 4.9884L7.88172 1.66348C7.83794 1.57417 7.76705 1.50178 7.6797 1.45734Z",fill:"url(#paint1_linear_13203_44637)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear_13203_44637",x1:"5.54898",y1:"4.31195",x2:"11.4016",y2:"14.7166",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFCE00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFAD00"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear_13203_44637",x1:"7.50002",y1:"1.06175",x2:"7.50002",y2:"14.7178",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#F28B00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FA7400"})]})]})]}),coinImage=assetUrl("cs-coin.webp"),IconBalanceCoins=({style:o,...l})=>jsxRuntimeExports.jsx("img",{src:coinImage,style:{aspectRatio:"1/1",...o},...l,alt:""}),image=assetUrl("icon_usdt.webp"),IconUsdt=({style:o,...l})=>jsxRuntimeExports.jsx("img",{src:image,style:{aspectRatio:"1/1",height:32,...o},...l,alt:""});reactExports.memo(()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"h-[var(--tabbar-current-height)] shrink-0"}),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]}));function BottomSentinelSafeArea(){return jsxRuntimeExports.jsx("div",{className:"h-[var(--tg-safe-area-inset-bottom)] shrink-0"})}const boxRegularIcon=assetUrl("boxes/rewards/box_regular.webp"),SnackbarContext=reactExports.createContext({showSnackbar:()=>{}}),useSnackbar=()=>reactExports.useContext(SnackbarContext),CustomSnackbar=({id:o,before:l,after:u,className:d,children:f})=>jsxRuntimeExports.jsx("div",{id:o,className:d,children:jsxRuntimeExports.jsxs("div",{children:[l&&jsxRuntimeExports.jsx("div",{className:"before",children:l}),jsxRuntimeExports.jsx("div",{className:"content",children:f}),u&&jsxRuntimeExports.jsx("div",{className:"after",children:u})]})}),SnackbarProvider=({children:o})=>{const[l,u]=reactExports.useState([]),[d,f]=reactExports.useState([]),h=React.useRef(0),m=React.useRef(new Map),g=reactExports.useCallback(E=>{u(w=>w.map(T=>T.id===E?{...T,animationState:"exit"}:T)),m.current.set(E,setTimeout(()=>{u(w=>w.filter(T=>T.id!==E)),m.current.delete(E)},300))},[]),v=reactExports.useCallback(E=>{f(w=>w.map(T=>T.id===E?{...T,animationState:"exit"}:T)),m.current.set(E,setTimeout(()=>{f(w=>w.filter(T=>T.id!==E)),m.current.delete(E)},300))},[]),x=reactExports.useCallback((E,w={})=>{const T=++h.current,C={id:T,message:E,before:w.before||b(w.type),after:w.after||null,coins:w.coins||null,gems:w.gems||null,usdt:w.usdt||null,isSpentCoins:w.isSpentCoins||!1,boxes:w.boxes||null,type:w.type||null,animationState:"enter"};w.type==="warning"||w.type==="error"?(f(A=>[...A,C]),m.current.set(T,setTimeout(()=>v(T),3e3))):(u(A=>[...A,C]),m.current.set(T,setTimeout(()=>g(T),3e3)))},[v,g]);React.useEffect(()=>{const E=m.current;return()=>{E.forEach(w=>clearTimeout(w)),E.clear()}},[]);const b=E=>{switch(E){case"success":return jsxRuntimeExports.jsx(Icon,{name:"checkThin",size:28,className:"text-button-foreground"});case"success_top":return jsxRuntimeExports.jsx(Icon,{name:"checkThin",size:28,className:"text-button-foreground"});case"warning":return null;case"error":return null;default:return null}},S=E=>jsxRuntimeExports.jsx(CustomSnackbar,{id:"snackbar",onClose:()=>E.type==="warning"||E.type==="error"?v(E.id):g(E.id),before:E.before,after:E.after,className:`ui-snackbar ${E.type?`ui-snackbar--${E.type}`:""} ${E.animationState||""}`,children:jsxRuntimeExports.jsxs(Text,{style:{fontSize:13,lineHeight:"16px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:4},children:[jsxRuntimeExports.jsx("span",{children:E.message}),jsxRuntimeExports.jsxs("div",{className:"grid grid-flow-col auto-cols-max gap-2 items-center",children:[!!E.coins&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[E.isSpentCoins?"-":"+",E.coins]}),jsxRuntimeExports.jsx(IconBalanceCoins,{style:{height:14,marginBottom:-2}})]}),!!E.gems&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[E.isSpentCoins?"-":"+",E.gems]}),jsxRuntimeExports.jsx(IconBalanceGems,{style:{height:14,marginBottom:-2}})]}),!!E.usdt&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[E.isSpentCoins?"-":"+",E.usdt]}),jsxRuntimeExports.jsx(IconUsdt,{style:{height:14,marginBottom:-2}})]}),!!E.boxes&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:["+",E.boxes]}),jsxRuntimeExports.jsx("img",{src:boxRegularIcon,alt:"Box",style:{height:14,width:14,transform:"translateY(10%)"}})]})]})]})},E.id);return jsxRuntimeExports.jsxs(SnackbarContext.Provider,{value:{showSnackbar:x},children:[o,l.map(S),d.map(S),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]})};var lottie$2={exports:{}},lottie$1=lottie$2.exports,hasRequiredLottie;function requireLottie(){return hasRequiredLottie||(hasRequiredLottie=1,function(module,exports){typeof document<"u"&&typeof navigator<"u"&&function(o,l){module.exports=l()}(lottie$1,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(l){_useWebWorker=!!l},getWebWorker=function(){return _useWebWorker},setLocationHref=function(l){locationHref=l},getLocationHref=function(){return locationHref};function createTag(o){return document.createElement(o)}function extendPrototype(o,l){var u,d=o.length,f;for(u=0;u<d;u+=1){f=o[u].prototype;for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(l.prototype[h]=f[h])}}function getDescriptor(o,l){return Object.getOwnPropertyDescriptor(o,l)}function createProxyFunction(o){function l(){}return l.prototype=o,l}var audioControllerFactory=function(){function o(l){this.audios=[],this.audioFactory=l,this._volume=1,this._isMuted=!1}return o.prototype={addAudio:function(u){this.audios.push(u)},pause:function(){var u,d=this.audios.length;for(u=0;u<d;u+=1)this.audios[u].pause()},resume:function(){var u,d=this.audios.length;for(u=0;u<d;u+=1)this.audios[u].resume()},setRate:function(u){var d,f=this.audios.length;for(d=0;d<f;d+=1)this.audios[d].setRate(u)},createAudio:function(u){return this.audioFactory?this.audioFactory(u):window.Howl?new window.Howl({src:[u]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(u){this.audioFactory=u},setVolume:function(u){this._volume=u,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var u,d=this.audios.length;for(u=0;u<d;u+=1)this.audios[u].volume(this._volume*(this._isMuted?0:1))}},function(){return new o}}(),createTypedArray=function(){function o(u,d){var f=0,h=[],m;switch(u){case"int16":case"uint8c":m=1;break;default:m=1.1;break}for(f=0;f<d;f+=1)h.push(m);return h}function l(u,d){return u==="float32"?new Float32Array(d):u==="int16"?new Int16Array(d):u==="uint8c"?new Uint8ClampedArray(d):o(u,d)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?l:o}();function createSizedArray(o){return Array.apply(null,{length:o})}function _typeof$6(o){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_typeof$6(o)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var o=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],l,u=o.length;for(l=0;l<u;l+=1)BMMath[o[l]]=Math[o[l]]})(),BMMath.random=Math.random,BMMath.abs=function(o){var l=_typeof$6(o);if(l==="object"&&o.length){var u=createSizedArray(o.length),d,f=o.length;for(d=0;d<f;d+=1)u[d]=Math.abs(o[d]);return u}return Math.abs(o)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(o){o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.display="block",o.style.transformOrigin="0 0",o.style.webkitTransformOrigin="0 0",o.style.backfaceVisibility="visible",o.style.webkitBackfaceVisibility="visible",o.style.transformStyle="preserve-3d",o.style.webkitTransformStyle="preserve-3d",o.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(o,l,u,d){this.type=o,this.currentTime=l,this.totalTime=u,this.direction=d<0?-1:1}function BMCompleteEvent(o,l){this.type=o,this.direction=l<0?-1:1}function BMCompleteLoopEvent(o,l,u,d){this.type=o,this.currentLoop=u,this.totalLoops=l,this.direction=d<0?-1:1}function BMSegmentStartEvent(o,l,u){this.type=o,this.firstFrame=l,this.totalFrames=u}function BMDestroyEvent(o,l){this.type=o,this.target=l}function BMRenderFrameErrorEvent(o,l){this.type="renderFrameError",this.nativeError=o,this.currentTime=l}function BMConfigErrorEvent(o){this.type="configError",this.nativeError=o}var createElementID=function(){var o=0;return function(){return o+=1,idPrefix$1+"__lottie_element_"+o}}();function HSVtoRGB(o,l,u){var d,f,h,m,g,v,x,b;switch(m=Math.floor(o*6),g=o*6-m,v=u*(1-l),x=u*(1-g*l),b=u*(1-(1-g)*l),m%6){case 0:d=u,f=b,h=v;break;case 1:d=x,f=u,h=v;break;case 2:d=v,f=u,h=b;break;case 3:d=v,f=x,h=u;break;case 4:d=b,f=v,h=u;break;case 5:d=u,f=v,h=x;break}return[d,f,h]}function RGBtoHSV(o,l,u){var d=Math.max(o,l,u),f=Math.min(o,l,u),h=d-f,m,g=d===0?0:h/d,v=d/255;switch(d){case f:m=0;break;case o:m=l-u+h*(l<u?6:0),m/=6*h;break;case l:m=u-o+h*2,m/=6*h;break;case u:m=o-l+h*4,m/=6*h;break}return[m,g,v]}function addSaturationToRGB(o,l){var u=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);return u[1]+=l,u[1]>1?u[1]=1:u[1]<=0&&(u[1]=0),HSVtoRGB(u[0],u[1],u[2])}function addBrightnessToRGB(o,l){var u=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);return u[2]+=l,u[2]>1?u[2]=1:u[2]<0&&(u[2]=0),HSVtoRGB(u[0],u[1],u[2])}function addHueToRGB(o,l){var u=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);return u[0]+=l/360,u[0]>1?u[0]-=1:u[0]<0&&(u[0]+=1),HSVtoRGB(u[0],u[1],u[2])}var rgbToHex=function(){var o=[],l,u;for(l=0;l<256;l+=1)u=l.toString(16),o[l]=u.length===1?"0"+u:u;return function(d,f,h){return d<0&&(d=0),f<0&&(f=0),h<0&&(h=0),"#"+o[d]+o[f]+o[h]}}(),setSubframeEnabled=function(l){subframeEnabled=!!l},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(l){expressionsPlugin=l},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(l){expressionsInterfaces=l},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(l){defaultCurveSegments=l},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(l){idPrefix$1=l};function createNS(o){return document.createElementNS(svgNS,o)}function _typeof$5(o){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_typeof$5(o)}var dataManager=function(){var o=1,l=[],u,d,f={onmessage:function(){},postMessage:function(w){u({data:w})}},h={postMessage:function(w){f.onmessage({data:w})}};function m(E){if(window.Worker&&window.Blob&&getWebWorker()){var w=new Blob(["var _workerSelf = self; self.onmessage = ",E.toString()],{type:"text/javascript"}),T=URL.createObjectURL(w);return new Worker(T)}return u=E,f}function g(){d||(d=m(function(w){function T(){function M(K,$){var G,L,B=K.length,q,U,Y,te;for(L=0;L<B;L+=1)if(G=K[L],"ks"in G&&!G.completed){if(G.completed=!0,G.hasMask){var ae=G.masksProperties;for(U=ae.length,q=0;q<U;q+=1)if(ae[q].pt.k.i)j(ae[q].pt.k);else for(te=ae[q].pt.k.length,Y=0;Y<te;Y+=1)ae[q].pt.k[Y].s&&j(ae[q].pt.k[Y].s[0]),ae[q].pt.k[Y].e&&j(ae[q].pt.k[Y].e[0])}G.ty===0?(G.layers=I(G.refId,$),M(G.layers,$)):G.ty===4?O(G.shapes):G.ty===5&&le(G)}}function A(K,$){if(K){var G=0,L=K.length;for(G=0;G<L;G+=1)K[G].t===1&&(K[G].data.layers=I(K[G].data.refId,$),M(K[G].data.layers,$))}}function k(K,$){for(var G=0,L=$.length;G<L;){if($[G].id===K)return $[G];G+=1}return null}function I(K,$){var G=k(K,$);return G?G.layers.__used?JSON.parse(JSON.stringify(G.layers)):(G.layers.__used=!0,G.layers):null}function O(K){var $,G=K.length,L,B;for($=G-1;$>=0;$-=1)if(K[$].ty==="sh")if(K[$].ks.k.i)j(K[$].ks.k);else for(B=K[$].ks.k.length,L=0;L<B;L+=1)K[$].ks.k[L].s&&j(K[$].ks.k[L].s[0]),K[$].ks.k[L].e&&j(K[$].ks.k[L].e[0]);else K[$].ty==="gr"&&O(K[$].it)}function j(K){var $,G=K.i.length;for($=0;$<G;$+=1)K.i[$][0]+=K.v[$][0],K.i[$][1]+=K.v[$][1],K.o[$][0]+=K.v[$][0],K.o[$][1]+=K.v[$][1]}function N(K,$){var G=$?$.split("."):[100,100,100];return K[0]>G[0]?!0:G[0]>K[0]?!1:K[1]>G[1]?!0:G[1]>K[1]?!1:K[2]>G[2]?!0:G[2]>K[2]?!1:null}var V=function(){var K=[4,4,14];function $(L){var B=L.t.d;L.t.d={k:[{s:B,t:0}]}}function G(L){var B,q=L.length;for(B=0;B<q;B+=1)L[B].ty===5&&$(L[B])}return function(L){if(N(K,L.v)&&(G(L.layers),L.assets)){var B,q=L.assets.length;for(B=0;B<q;B+=1)L.assets[B].layers&&G(L.assets[B].layers)}}}(),z=function(){var K=[4,7,99];return function($){if($.chars&&!N(K,$.v)){var G,L=$.chars.length;for(G=0;G<L;G+=1){var B=$.chars[G];B.data&&B.data.shapes&&(O(B.data.shapes),B.data.ip=0,B.data.op=99999,B.data.st=0,B.data.sr=1,B.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},$.chars[G].t||(B.data.shapes.push({ty:"no"}),B.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),W=function(){var K=[5,7,15];function $(L){var B=L.t.p;typeof B.a=="number"&&(B.a={a:0,k:B.a}),typeof B.p=="number"&&(B.p={a:0,k:B.p}),typeof B.r=="number"&&(B.r={a:0,k:B.r})}function G(L){var B,q=L.length;for(B=0;B<q;B+=1)L[B].ty===5&&$(L[B])}return function(L){if(N(K,L.v)&&(G(L.layers),L.assets)){var B,q=L.assets.length;for(B=0;B<q;B+=1)L.assets[B].layers&&G(L.assets[B].layers)}}}(),X=function(){var K=[4,1,9];function $(L){var B,q=L.length,U,Y;for(B=0;B<q;B+=1)if(L[B].ty==="gr")$(L[B].it);else if(L[B].ty==="fl"||L[B].ty==="st")if(L[B].c.k&&L[B].c.k[0].i)for(Y=L[B].c.k.length,U=0;U<Y;U+=1)L[B].c.k[U].s&&(L[B].c.k[U].s[0]/=255,L[B].c.k[U].s[1]/=255,L[B].c.k[U].s[2]/=255,L[B].c.k[U].s[3]/=255),L[B].c.k[U].e&&(L[B].c.k[U].e[0]/=255,L[B].c.k[U].e[1]/=255,L[B].c.k[U].e[2]/=255,L[B].c.k[U].e[3]/=255);else L[B].c.k[0]/=255,L[B].c.k[1]/=255,L[B].c.k[2]/=255,L[B].c.k[3]/=255}function G(L){var B,q=L.length;for(B=0;B<q;B+=1)L[B].ty===4&&$(L[B].shapes)}return function(L){if(N(K,L.v)&&(G(L.layers),L.assets)){var B,q=L.assets.length;for(B=0;B<q;B+=1)L.assets[B].layers&&G(L.assets[B].layers)}}}(),ie=function(){var K=[4,4,18];function $(L){var B,q=L.length,U,Y;for(B=q-1;B>=0;B-=1)if(L[B].ty==="sh")if(L[B].ks.k.i)L[B].ks.k.c=L[B].closed;else for(Y=L[B].ks.k.length,U=0;U<Y;U+=1)L[B].ks.k[U].s&&(L[B].ks.k[U].s[0].c=L[B].closed),L[B].ks.k[U].e&&(L[B].ks.k[U].e[0].c=L[B].closed);else L[B].ty==="gr"&&$(L[B].it)}function G(L){var B,q,U=L.length,Y,te,ae,ue;for(q=0;q<U;q+=1){if(B=L[q],B.hasMask){var ve=B.masksProperties;for(te=ve.length,Y=0;Y<te;Y+=1)if(ve[Y].pt.k.i)ve[Y].pt.k.c=ve[Y].cl;else for(ue=ve[Y].pt.k.length,ae=0;ae<ue;ae+=1)ve[Y].pt.k[ae].s&&(ve[Y].pt.k[ae].s[0].c=ve[Y].cl),ve[Y].pt.k[ae].e&&(ve[Y].pt.k[ae].e[0].c=ve[Y].cl)}B.ty===4&&$(B.shapes)}}return function(L){if(N(K,L.v)&&(G(L.layers),L.assets)){var B,q=L.assets.length;for(B=0;B<q;B+=1)L.assets[B].layers&&G(L.assets[B].layers)}}}();function oe(K){K.__complete||(X(K),V(K),z(K),W(K),ie(K),M(K.layers,K.assets),A(K.chars,K.assets),K.__complete=!0)}function le(K){K.t.a.length===0&&"m"in K.t.p}var Q={};return Q.completeData=oe,Q.checkColors=X,Q.checkChars=z,Q.checkPathProperties=W,Q.checkShapes=ie,Q.completeLayers=M,Q}if(h.dataManager||(h.dataManager=T()),h.assetLoader||(h.assetLoader=function(){function M(k){var I=k.getResponseHeader("content-type");return I&&k.responseType==="json"&&I.indexOf("json")!==-1||k.response&&_typeof$5(k.response)==="object"?k.response:k.response&&typeof k.response=="string"?JSON.parse(k.response):k.responseText?JSON.parse(k.responseText):null}function A(k,I,O,j){var N,V=new XMLHttpRequest;try{V.responseType="json"}catch{}V.onreadystatechange=function(){if(V.readyState===4)if(V.status===200)N=M(V),O(N);else try{N=M(V),O(N)}catch(z){j&&j(z)}};try{V.open(["G","E","T"].join(""),k,!0)}catch{V.open(["G","E","T"].join(""),I+"/"+k,!0)}V.send()}return{load:A}}()),w.data.type==="loadAnimation")h.assetLoader.load(w.data.path,w.data.fullPath,function(M){h.dataManager.completeData(M),h.postMessage({id:w.data.id,payload:M,status:"success"})},function(){h.postMessage({id:w.data.id,status:"error"})});else if(w.data.type==="complete"){var C=w.data.animation;h.dataManager.completeData(C),h.postMessage({id:w.data.id,payload:C,status:"success"})}else w.data.type==="loadData"&&h.assetLoader.load(w.data.path,w.data.fullPath,function(M){h.postMessage({id:w.data.id,payload:M,status:"success"})},function(){h.postMessage({id:w.data.id,status:"error"})})}),d.onmessage=function(E){var w=E.data,T=w.id,C=l[T];l[T]=null,w.status==="success"?C.onComplete(w.payload):C.onError&&C.onError()})}function v(E,w){o+=1;var T="processId_"+o;return l[T]={onComplete:E,onError:w},T}function x(E,w,T){g();var C=v(w,T);d.postMessage({type:"loadAnimation",path:E,fullPath:window.location.origin+window.location.pathname,id:C})}function b(E,w,T){g();var C=v(w,T);d.postMessage({type:"loadData",path:E,fullPath:window.location.origin+window.location.pathname,id:C})}function S(E,w,T){g();var C=v(w,T);d.postMessage({type:"complete",animation:E,id:C})}return{loadAnimation:x,loadData:b,completeAnimation:S}}(),ImagePreloader=function(){var o=function(){var A=createTag("canvas");A.width=1,A.height=1;var k=A.getContext("2d");return k.fillStyle="rgba(0,0,0,0)",k.fillRect(0,0,1,1),A}();function l(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function u(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function d(A,k,I){var O="";if(A.e)O=A.p;else if(k){var j=A.p;j.indexOf("images/")!==-1&&(j=j.split("/")[1]),O=k+j}else O=I,O+=A.u?A.u:"",O+=A.p;return O}function f(A){var k=0,I=setInterval((function(){var O=A.getBBox();(O.width||k>500)&&(this._imageLoaded(),clearInterval(I)),k+=1}).bind(this),50)}function h(A){var k=d(A,this.assetsPath,this.path),I=createNS("image");isSafari?this.testImageLoaded(I):I.addEventListener("load",this._imageLoaded,!1),I.addEventListener("error",(function(){O.img=o,this._imageLoaded()}).bind(this),!1),I.setAttributeNS("http://www.w3.org/1999/xlink","href",k),this._elementHelper.append?this._elementHelper.append(I):this._elementHelper.appendChild(I);var O={img:I,assetData:A};return O}function m(A){var k=d(A,this.assetsPath,this.path),I=createTag("img");I.crossOrigin="anonymous",I.addEventListener("load",this._imageLoaded,!1),I.addEventListener("error",(function(){O.img=o,this._imageLoaded()}).bind(this),!1),I.src=k;var O={img:I,assetData:A};return O}function g(A){var k={assetData:A},I=d(A,this.assetsPath,this.path);return dataManager.loadData(I,(function(O){k.img=O,this._footageLoaded()}).bind(this),(function(){k.img={},this._footageLoaded()}).bind(this)),k}function v(A,k){this.imagesLoadedCb=k;var I,O=A.length;for(I=0;I<O;I+=1)A[I].layers||(!A[I].t||A[I].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(A[I]))):A[I].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(A[I]))))}function x(A){this.path=A||""}function b(A){this.assetsPath=A||""}function S(A){for(var k=0,I=this.images.length;k<I;){if(this.images[k].assetData===A)return this.images[k].img;k+=1}return null}function E(){this.imagesLoadedCb=null,this.images.length=0}function w(){return this.totalImages===this.loadedAssets}function T(){return this.totalFootages===this.loadedFootagesCount}function C(A,k){A==="svg"?(this._elementHelper=k,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function M(){this._imageLoaded=l.bind(this),this._footageLoaded=u.bind(this),this.testImageLoaded=f.bind(this),this.createFootageData=g.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return M.prototype={loadAssets:v,setAssetsPath:b,setPath:x,loadedImages:w,loadedFootages:T,destroy:E,getAsset:S,createImgData:m,createImageData:h,imageLoaded:l,footageLoaded:u,setCacheType:C},M}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(l,u){if(this._cbs[l])for(var d=this._cbs[l],f=0;f<d.length;f+=1)d[f](u)},addEventListener:function(l,u){return this._cbs[l]||(this._cbs[l]=[]),this._cbs[l].push(u),(function(){this.removeEventListener(l,u)}).bind(this)},removeEventListener:function(l,u){if(!u)this._cbs[l]=null;else if(this._cbs[l]){for(var d=0,f=this._cbs[l].length;d<f;)this._cbs[l][d]===u&&(this._cbs[l].splice(d,1),d-=1,f-=1),d+=1;this._cbs[l].length||(this._cbs[l]=null)}}};var markerParser=function(){function o(l){for(var u=l.split(`\r
113
+ Url: ${_getEventFilterUrl(o)}`),!0}return!1}function _isIgnoredError(o,l){return l!=null&&l.length?getPossibleEventMessages(o).some(u=>stringMatchesSomePattern(u,l)):!1}function _isIgnoredTransaction(o,l){if(!(l!=null&&l.length))return!1;const u=o.transaction;return u?stringMatchesSomePattern(u,l):!1}function _isDeniedUrl(o,l){if(!(l!=null&&l.length))return!1;const u=_getEventFilterUrl(o);return u?stringMatchesSomePattern(u,l):!1}function _isAllowedUrl(o,l){if(!(l!=null&&l.length))return!0;const u=_getEventFilterUrl(o);return u?stringMatchesSomePattern(u,l):!0}function _getLastValidUrl(o=[]){for(let l=o.length-1;l>=0;l--){const u=o[l];if(u&&u.filename!=="<anonymous>"&&u.filename!=="[native code]")return u.filename||null}return null}function _getEventFilterUrl(o){var l,u;try{const d=[...((l=o.exception)==null?void 0:l.values)??[]].reverse().find(h=>{var m,g,v;return((m=h.mechanism)==null?void 0:m.parent_id)===void 0&&((v=(g=h.stacktrace)==null?void 0:g.frames)==null?void 0:v.length)}),f=(u=d==null?void 0:d.stacktrace)==null?void 0:u.frames;return f?_getLastValidUrl(f):null}catch{return DEBUG_BUILD$2&&debug.error(`Cannot extract url for event ${getEventDescription(o)}`),null}}function _isUselessError(o){var l,u;return(u=(l=o.exception)==null?void 0:l.values)!=null&&u.length?!o.message&&!o.exception.values.some(d=>d.stacktrace||d.type&&d.type!=="Error"||d.value):!1}function applyAggregateErrorsToEvent(o,l,u,d,f,h){var g;if(!((g=f.exception)!=null&&g.values)||!h||!isInstanceOf(h.originalException,Error))return;const m=f.exception.values.length>0?f.exception.values[f.exception.values.length-1]:void 0;m&&(f.exception.values=aggregateExceptionsFromError(o,l,d,h.originalException,u,f.exception.values,m,0))}function aggregateExceptionsFromError(o,l,u,d,f,h,m,g){if(h.length>=u+1)return h;let v=[...h];if(isInstanceOf(d[f],Error)){applyExceptionGroupFieldsForParentException(m,g);const x=o(l,d[f]),b=v.length;applyExceptionGroupFieldsForChildException(x,f,b,g),v=aggregateExceptionsFromError(o,l,u,d[f],f,[x,...v],x,b)}return Array.isArray(d.errors)&&d.errors.forEach((x,b)=>{if(isInstanceOf(x,Error)){applyExceptionGroupFieldsForParentException(m,g);const S=o(l,x),E=v.length;applyExceptionGroupFieldsForChildException(S,`errors[${b}]`,E,g),v=aggregateExceptionsFromError(o,l,u,x,f,[S,...v],S,E)}}),v}function applyExceptionGroupFieldsForParentException(o,l){o.mechanism={handled:!0,type:"auto.core.linked_errors",...o.mechanism,...o.type==="AggregateError"&&{is_exception_group:!0},exception_id:l}}function applyExceptionGroupFieldsForChildException(o,l,u,d){o.mechanism={handled:!0,...o.mechanism,type:"chained",source:l,exception_id:u,parent_id:d}}function addConsoleInstrumentationHandler(o){const l="console";addHandler(l,o),maybeInstrument(l,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(o){o in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,o,function(l){return originalConsoleMethods[o]=l,function(...u){triggerHandlers("console",{args:u,level:o});const f=originalConsoleMethods[o];f==null||f.apply(GLOBAL_OBJ.console,u)}})})}function severityLevelFromString(o){return o==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(o)?o:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let o;return{name:INTEGRATION_NAME$4,processEvent(l){if(l.type)return l;try{if(_shouldDropEvent(l,o))return DEBUG_BUILD$2&&debug.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return o=l}}},dedupeIntegration=_dedupeIntegration;function _shouldDropEvent(o,l){return l?!!(_isSameMessageEvent(o,l)||_isSameExceptionEvent(o,l)):!1}function _isSameMessageEvent(o,l){const u=o.message,d=l.message;return!(!u&&!d||u&&!d||!u&&d||u!==d||!_isSameFingerprint(o,l)||!_isSameStacktrace(o,l))}function _isSameExceptionEvent(o,l){const u=_getExceptionFromEvent(l),d=_getExceptionFromEvent(o);return!(!u||!d||u.type!==d.type||u.value!==d.value||!_isSameFingerprint(o,l)||!_isSameStacktrace(o,l))}function _isSameStacktrace(o,l){let u=getFramesFromEvent(o),d=getFramesFromEvent(l);if(!u&&!d)return!0;if(u&&!d||!u&&d||(u=u,d=d,d.length!==u.length))return!1;for(let f=0;f<d.length;f++){const h=d[f],m=u[f];if(h.filename!==m.filename||h.lineno!==m.lineno||h.colno!==m.colno||h.function!==m.function)return!1}return!0}function _isSameFingerprint(o,l){let u=o.fingerprint,d=l.fingerprint;if(!u&&!d)return!0;if(u&&!d||!u&&d)return!1;u=u,d=d;try{return u.join("")===d.join("")}catch{return!1}}function _getExceptionFromEvent(o){var l,u;return(u=(l=o.exception)==null?void 0:l.values)==null?void 0:u[0]}function getBreadcrumbLogLevelFromHttpStatusCode(o){if(o!==void 0)return o>=400&&o<500?"warning":o>=500?"error":void 0}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){return"history"in WINDOW$2&&!!WINDOW$2.history}function _isFetchSupported(){if(!("fetch"in WINDOW$2))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFunction(o){return o&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(o.toString())}function supportsNativeFetch(){var u;if(typeof EdgeRuntime=="string")return!0;if(!_isFetchSupported())return!1;if(isNativeFunction(WINDOW$2.fetch))return!0;let o=!1;const l=WINDOW$2.document;if(l&&typeof l.createElement=="function")try{const d=l.createElement("iframe");d.hidden=!0,l.head.appendChild(d),(u=d.contentWindow)!=null&&u.fetch&&(o=isNativeFunction(d.contentWindow.fetch)),l.head.removeChild(d)}catch(d){DEBUG_BUILD$2&&debug.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",d)}return o}function addFetchInstrumentationHandler(o,l){const u="fetch";addHandler(u,o),maybeInstrument(u,()=>instrumentFetch(void 0,l))}function instrumentFetch(o,l=!1){l&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",function(u){return function(...d){const f=new Error,{method:h,url:m}=parseFetchArgs(d),g={args:d,fetchData:{method:h,url:m},startTimestamp:timestampInSeconds()*1e3,virtualError:f,headers:getHeadersFromFetchArgs(d)};return triggerHandlers("fetch",{...g}),u.apply(GLOBAL_OBJ,d).then(async v=>(triggerHandlers("fetch",{...g,endTimestamp:timestampInSeconds()*1e3,response:v}),v),v=>{if(triggerHandlers("fetch",{...g,endTimestamp:timestampInSeconds()*1e3,error:v}),isError(v)&&v.stack===void 0&&(v.stack=f.stack,addNonEnumerableProperty(v,"framesToPop",1)),v instanceof TypeError&&(v.message==="Failed to fetch"||v.message==="Load failed"||v.message==="NetworkError when attempting to fetch resource."))try{const x=new URL(g.fetchData.url);v.message=`${v.message} (${x.host})`}catch{}throw v})}})}function hasProp(o,l){return!!o&&typeof o=="object"&&!!o[l]}function getUrlFromResource(o){return typeof o=="string"?o:o?hasProp(o,"url")?o.url:o.toString?o.toString():"":""}function parseFetchArgs(o){if(o.length===0)return{method:"GET",url:""};if(o.length===2){const[u,d]=o;return{url:getUrlFromResource(u),method:hasProp(d,"method")?String(d.method).toUpperCase():"GET"}}const l=o[0];return{url:getUrlFromResource(l),method:hasProp(l,"method")?String(l.method).toUpperCase():"GET"}}function getHeadersFromFetchArgs(o){const[l,u]=o;try{if(typeof u=="object"&&u!==null&&"headers"in u&&u.headers)return new Headers(u.headers);if(isRequest(l))return new Headers(l.headers)}catch{}}function getSDKSource(){return"npm"}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap(o,l={}){function u(f){return typeof f=="function"}if(!u(o))return o;try{const f=o.__sentry_wrapped__;if(f)return typeof f=="function"?f:o;if(getOriginalFunction(o))return o}catch{return o}const d=function(...f){try{const h=f.map(m=>wrap(m,l));return o.apply(this,h)}catch(h){throw ignoreNextOnError(),withScope(m=>{m.addEventProcessor(g=>(l.mechanism&&(addExceptionTypeValue(g,void 0),addExceptionMechanism(g,l.mechanism)),g.extra={...g.extra,arguments:f},g)),captureException(h)}),h}};try{for(const f in o)Object.prototype.hasOwnProperty.call(o,f)&&(d[f]=o[f])}catch{}markFunctionWrapped(d,o),addNonEnumerableProperty(o,"__sentry_wrapped__",d);try{Object.getOwnPropertyDescriptor(d,"name").configurable&&Object.defineProperty(d,"name",{get(){return o.name}})}catch{}return d}function getHttpRequestData(){const o=getLocationHref(),{referrer:l}=WINDOW$1.document||{},{userAgent:u}=WINDOW$1.navigator||{},d={...l&&{Referer:l},...u&&{"User-Agent":u}};return{url:o,headers:d}}function exceptionFromError(o,l){const u=parseStackFrames(o,l),d={type:extractType(l),value:extractMessage(l)};return u.length&&(d.stacktrace={frames:u}),d.type===void 0&&d.value===""&&(d.value="Unrecoverable error caught"),d}function eventFromPlainObject(o,l,u,d){const f=getClient(),h=f==null?void 0:f.getOptions().normalizeDepth,m=getErrorPropertyFromObject(l),g={__serialized__:normalizeToSize(l,h)};if(m)return{exception:{values:[exceptionFromError(o,m)]},extra:g};const v={exception:{values:[{type:isEvent(l)?l.constructor.name:d?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(l,{isUnhandledRejection:d})}]},extra:g};if(u){const x=parseStackFrames(o,u);x.length&&(v.exception.values[0].stacktrace={frames:x})}return v}function eventFromError(o,l){return{exception:{values:[exceptionFromError(o,l)]}}}function parseStackFrames(o,l){const u=l.stacktrace||l.stack||"",d=getSkipFirstStackStringLines(l),f=getPopFirstTopFrames(l);try{return o(u,d,f)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(o){return o&&reactMinifiedRegexp.test(o.message)?1:0}function getPopFirstTopFrames(o){return typeof o.framesToPop=="number"?o.framesToPop:0}function isWebAssemblyException(o){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?o instanceof WebAssembly.Exception:!1}function extractType(o){const l=o==null?void 0:o.name;return!l&&isWebAssemblyException(o)?o.message&&Array.isArray(o.message)&&o.message.length==2?o.message[0]:"WebAssembly.Exception":l}function extractMessage(o){const l=o==null?void 0:o.message;return isWebAssemblyException(o)?Array.isArray(o.message)&&o.message.length==2?o.message[1]:"wasm exception":l?l.error&&typeof l.error.message=="string"?l.error.message:l:"No error message"}function eventFromException(o,l,u,d){const f=(u==null?void 0:u.syntheticException)||void 0,h=eventFromUnknownInput(o,l,f,d);return addExceptionMechanism(h),h.level="error",u!=null&&u.event_id&&(h.event_id=u.event_id),resolvedSyncPromise(h)}function eventFromMessage(o,l,u="info",d,f){const h=(d==null?void 0:d.syntheticException)||void 0,m=eventFromString(o,l,h,f);return m.level=u,d!=null&&d.event_id&&(m.event_id=d.event_id),resolvedSyncPromise(m)}function eventFromUnknownInput(o,l,u,d,f){let h;if(isErrorEvent$1(l)&&l.error)return eventFromError(o,l.error);if(isDOMError(l)||isDOMException(l)){const m=l;if("stack"in l)h=eventFromError(o,l);else{const g=m.name||(isDOMError(m)?"DOMError":"DOMException"),v=m.message?`${g}: ${m.message}`:g;h=eventFromString(o,v,u,d),addExceptionTypeValue(h,v)}return"code"in m&&(h.tags={...h.tags,"DOMException.code":`${m.code}`}),h}return isError(l)?eventFromError(o,l):isPlainObject$1(l)||isEvent(l)?(h=eventFromPlainObject(o,l,u,f),addExceptionMechanism(h,{synthetic:!0}),h):(h=eventFromString(o,l,u,d),addExceptionTypeValue(h,`${l}`),addExceptionMechanism(h,{synthetic:!0}),h)}function eventFromString(o,l,u,d){const f={};if(d&&u){const h=parseStackFrames(o,u);h.length&&(f.exception={values:[{value:l,stacktrace:{frames:h}}]}),addExceptionMechanism(f,{synthetic:!0})}if(isParameterizedString(l)){const{__sentry_template_string__:h,__sentry_template_values__:m}=l;return f.logentry={message:h,params:m},f}return f.message=l,f}function getNonErrorObjectExceptionValue(o,{isUnhandledRejection:l}){const u=extractExceptionKeysForMessage(o),d=l?"promise rejection":"exception";return isErrorEvent$1(o)?`Event \`ErrorEvent\` captured as ${d} with message \`${o.message}\``:isEvent(o)?`Event \`${getObjectClassName(o)}\` (type=${o.type}) captured as ${d}`:`Object captured as ${d} with keys: ${u}`}function getObjectClassName(o){try{const l=Object.getPrototypeOf(o);return l?l.constructor.name:void 0}catch{}}function getErrorPropertyFromObject(o){for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const u=o[l];if(u instanceof Error)return u}}const DEFAULT_FLUSH_INTERVAL=5e3;class BrowserClient extends Client{constructor(l){var g;const u=applyDefaultOptions(l),d=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(u,"browser",["browser"],d),(g=u._metadata)!=null&&g.sdk&&(u._metadata.sdk.settings={infer_ip:u.sendDefaultPii?"auto":"never",...u._metadata.sdk.settings}),super(u);const{sendDefaultPii:f,sendClientReports:h,enableLogs:m}=this._options;WINDOW$1.document&&(h||m)&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&(h&&this._flushOutcomes(),m&&_INTERNAL_flushLogsBuffer(this))}),m&&(this.on("flush",()=>{_INTERNAL_flushLogsBuffer(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{_INTERNAL_flushLogsBuffer(this)},DEFAULT_FLUSH_INTERVAL)})),f&&this.on("beforeSendSession",addAutoIpAddressToSession)}eventFromException(l,u){return eventFromException(this._options.stackParser,l,u,this._options.attachStacktrace)}eventFromMessage(l,u="info",d){return eventFromMessage(this._options.stackParser,l,u,d,this._options.attachStacktrace)}_prepareEvent(l,u,d,f){return l.platform=l.platform||"javascript",super._prepareEvent(l,u,d,f)}}function applyDefaultOptions(o){var l;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(l=WINDOW$1.SENTRY_RELEASE)==null?void 0:l.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...o}}const DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function addClickKeypressInstrumentationHandler(o){const l="dom";addHandler(l,o),maybeInstrument(l,instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const o=triggerHandlers.bind(null,"dom"),l=makeDOMEventHandler(o,!0);WINDOW.document.addEventListener("click",l,!1),WINDOW.document.addEventListener("keypress",l,!1),["EventTarget","Node"].forEach(u=>{var h,m;const f=(h=WINDOW[u])==null?void 0:h.prototype;(m=f==null?void 0:f.hasOwnProperty)!=null&&m.call(f,"addEventListener")&&(fill(f,"addEventListener",function(g){return function(v,x,b){if(v==="click"||v=="keypress")try{const S=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},E=S[v]=S[v]||{refCount:0};if(!E.handler){const w=makeDOMEventHandler(o);E.handler=w,g.call(this,v,w,b)}E.refCount++}catch{}return g.call(this,v,x,b)}}),fill(f,"removeEventListener",function(g){return function(v,x,b){if(v==="click"||v=="keypress")try{const S=this.__sentry_instrumentation_handlers__||{},E=S[v];E&&(E.refCount--,E.refCount<=0&&(g.call(this,v,E.handler,b),E.handler=void 0,delete S[v]),Object.keys(S).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return g.call(this,v,x,b)}}))})}function isSimilarToLastCapturedEvent(o){if(o.type!==lastCapturedEventType)return!1;try{if(!o.target||o.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(o,l){return o!=="keypress"?!1:l!=null&&l.tagName?!(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable):!0}function makeDOMEventHandler(o,l=!1){return u=>{if(!u||u._sentryCaptured)return;const d=getEventTarget(u);if(shouldSkipDOMEvent(u.type,d))return;addNonEnumerableProperty(u,"_sentryCaptured",!0),d&&!d._sentryId&&addNonEnumerableProperty(d,"_sentryId",uuid4());const f=u.type==="keypress"?"input":u.type;isSimilarToLastCapturedEvent(u)||(o({event:u,name:f,global:l}),lastCapturedEventType=u.type,lastCapturedEventTargetId=d?d._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function getEventTarget(o){try{return o.target}catch{return null}}let lastHref;function addHistoryInstrumentationHandler(o){const l="history";addHandler(l,o),maybeInstrument(l,instrumentHistory)}function instrumentHistory(){if(WINDOW.addEventListener("popstate",()=>{const l=WINDOW.location.href,u=lastHref;if(lastHref=l,u===l)return;triggerHandlers("history",{from:u,to:l})}),!supportsHistory())return;function o(l){return function(...u){const d=u.length>2?u[2]:void 0;if(d){const f=lastHref,h=getAbsoluteUrl(String(d));if(lastHref=h,f===h)return l.apply(this,u);triggerHandlers("history",{from:f,to:h})}return l.apply(this,u)}}fill(WINDOW.history,"pushState",o),fill(WINDOW.history,"replaceState",o)}function getAbsoluteUrl(o){try{return new URL(o,WINDOW.location.origin).toString()}catch{return o}}const cachedImplementations={};function getNativeImplementation(o){const l=cachedImplementations[o];if(l)return l;let u=WINDOW[o];if(isNativeFunction(u))return cachedImplementations[o]=u.bind(WINDOW);const d=WINDOW.document;if(d&&typeof d.createElement=="function")try{const f=d.createElement("iframe");f.hidden=!0,d.head.appendChild(f);const h=f.contentWindow;h!=null&&h[o]&&(u=h[o]),d.head.removeChild(f)}catch(f){DEBUG_BUILD$1&&debug.warn(`Could not create sandbox iframe for ${o} check, bailing to window.${o}: `,f)}return u&&(cachedImplementations[o]=u.bind(WINDOW))}function clearCachedImplementation(o){cachedImplementations[o]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(o){const l="xhr";addHandler(l,o),maybeInstrument(l,instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const o=XMLHttpRequest.prototype;o.open=new Proxy(o.open,{apply(l,u,d){const f=new Error,h=timestampInSeconds()*1e3,m=isString$2(d[0])?d[0].toUpperCase():void 0,g=parseXhrUrlArg(d[1]);if(!m||!g)return l.apply(u,d);u[SENTRY_XHR_DATA_KEY]={method:m,url:g,request_headers:{}},m==="POST"&&g.match(/sentry_key/)&&(u.__sentry_own_request__=!0);const v=()=>{const x=u[SENTRY_XHR_DATA_KEY];if(x&&u.readyState===4){try{x.status_code=u.status}catch{}const b={endTimestamp:timestampInSeconds()*1e3,startTimestamp:h,xhr:u,virtualError:f};triggerHandlers("xhr",b)}};return"onreadystatechange"in u&&typeof u.onreadystatechange=="function"?u.onreadystatechange=new Proxy(u.onreadystatechange,{apply(x,b,S){return v(),x.apply(b,S)}}):u.addEventListener("readystatechange",v),u.setRequestHeader=new Proxy(u.setRequestHeader,{apply(x,b,S){const[E,w]=S,T=b[SENTRY_XHR_DATA_KEY];return T&&isString$2(E)&&isString$2(w)&&(T.request_headers[E.toLowerCase()]=w),x.apply(b,S)}}),l.apply(u,d)}}),o.send=new Proxy(o.send,{apply(l,u,d){const f=u[SENTRY_XHR_DATA_KEY];if(!f)return l.apply(u,d);d[0]!==void 0&&(f.body=d[0]);const h={startTimestamp:timestampInSeconds()*1e3,xhr:u};return triggerHandlers("xhr",h),l.apply(u,d)}})}function parseXhrUrlArg(o){if(isString$2(o))return o;try{return o.toString()}catch{}}function makeFetchTransport(o,l=getNativeImplementation("fetch")){let u=0,d=0;async function f(h){const m=h.body.length;u+=m,d++;const g={body:h.body,method:"POST",referrerPolicy:"strict-origin",headers:o.headers,keepalive:u<=6e4&&d<15,...o.fetchOptions};try{const v=await l(o.url,g);return{statusCode:v.status,headers:{"x-sentry-rate-limits":v.headers.get("X-Sentry-Rate-Limits"),"retry-after":v.headers.get("Retry-After")}}}catch(v){throw clearCachedImplementation("fetch"),v}finally{u-=m,d--}}return createTransport(o,f)}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(o,l,u,d){const f={filename:o,function:l==="<anonymous>"?UNKNOWN_FUNCTION:l,in_app:!0};return u!==void 0&&(f.lineno=u),d!==void 0&&(f.colno=d),f}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeDataUriRegex=/at (.+?) ?\(data:(.+?),/,chromeStackParserFn=o=>{const l=o.match(chromeDataUriRegex);if(l)return{filename:`<data:${l[2]}>`,function:l[1]};const u=chromeRegexNoFnName.exec(o);if(u){const[,f,h,m]=u;return createFrame(f,UNKNOWN_FUNCTION,+h,+m)}const d=chromeRegex.exec(o);if(d){if(d[2]&&d[2].indexOf("eval")===0){const g=chromeEvalRegex.exec(d[2]);g&&(d[2]=g[1],d[3]=g[2],d[4]=g[3])}const[h,m]=extractSafariExtensionDetails(d[1]||UNKNOWN_FUNCTION,d[2]);return createFrame(m,h,d[3]?+d[3]:void 0,d[4]?+d[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=o=>{const l=geckoREgex.exec(o);if(l){if(l[3]&&l[3].indexOf(" > eval")>-1){const h=geckoEvalRegex.exec(l[3]);h&&(l[1]=l[1]||"eval",l[3]=h[1],l[4]=h[2],l[5]="")}let d=l[3],f=l[1]||UNKNOWN_FUNCTION;return[f,d]=extractSafariExtensionDetails(f,d),createFrame(d,f,l[4]?+l[4]:void 0,l[5]?+l[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(o,l)=>{const u=o.indexOf("safari-extension")!==-1,d=o.indexOf("safari-web-extension")!==-1;return u||d?[o.indexOf("@")!==-1?o.split("@")[0]:UNKNOWN_FUNCTION,u?`safari-extension:${l}`:`safari-web-extension:${l}`]:[o,l]},DEBUG_BUILD=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(o={})=>{const l={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...o};return{name:INTEGRATION_NAME$3,setup(u){l.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(u)),l.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(u,l.dom)),l.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(u)),l.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(u)),l.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(u)),l.sentry&&u.on("beforeSendEvent",_getSentryBreadcrumbHandler(u))}}},breadcrumbsIntegration=_breadcrumbsIntegration;function _getSentryBreadcrumbHandler(o){return function(u){getClient()===o&&addBreadcrumb({category:`sentry.${u.type==="transaction"?"transaction":"event"}`,event_id:u.event_id,level:u.level,message:getEventDescription(u)},{event:u})}}function _getDomBreadcrumbHandler(o,l){return function(d){if(getClient()!==o)return;let f,h,m=typeof l=="object"?l.serializeAttribute:void 0,g=typeof l=="object"&&typeof l.maxStringLength=="number"?l.maxStringLength:void 0;g&&g>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD&&debug.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${g} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),g=MAX_ALLOWED_STRING_LENGTH),typeof m=="string"&&(m=[m]);try{const x=d.event,b=_isEvent(x)?x.target:x;f=htmlTreeAsString(b,{keyAttrs:m,maxStringLength:g}),h=getComponentName(b)}catch{f="<unknown>"}if(f.length===0)return;const v={category:`ui.${d.name}`,message:f};h&&(v.data={"ui.component_name":h}),addBreadcrumb(v,{event:d.event,name:d.name,global:d.global})}}function _getConsoleBreadcrumbHandler(o){return function(u){if(getClient()!==o)return;const d={category:"console",data:{arguments:u.args,logger:"console"},level:severityLevelFromString(u.level),message:safeJoin(u.args," ")};if(u.level==="assert")if(u.args[0]===!1)d.message=`Assertion failed: ${safeJoin(u.args.slice(1)," ")||"console.assert"}`,d.data.arguments=u.args.slice(1);else return;addBreadcrumb(d,{input:u.args,level:u.level})}}function _getXhrBreadcrumbHandler(o){return function(u){if(getClient()!==o)return;const{startTimestamp:d,endTimestamp:f}=u,h=u.xhr[SENTRY_XHR_DATA_KEY];if(!d||!f||!h)return;const{method:m,url:g,status_code:v,body:x}=h,b={method:m,url:g,status_code:v},S={xhr:u.xhr,input:x,startTimestamp:d,endTimestamp:f},E={category:"xhr",data:b,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(v)};o.emit("beforeOutgoingRequestBreadcrumb",E,S),addBreadcrumb(E,S)}}function _getFetchBreadcrumbHandler(o){return function(u){if(getClient()!==o)return;const{startTimestamp:d,endTimestamp:f}=u;if(f&&!(u.fetchData.url.match(/sentry_key/)&&u.fetchData.method==="POST"))if(u.fetchData.method,u.fetchData.url,u.error){const h=u.fetchData,m={data:u.error,input:u.args,startTimestamp:d,endTimestamp:f},g={category:"fetch",data:h,level:"error",type:"http"};o.emit("beforeOutgoingRequestBreadcrumb",g,m),addBreadcrumb(g,m)}else{const h=u.response,m={...u.fetchData,status_code:h==null?void 0:h.status};u.fetchData.request_body_size,u.fetchData.response_body_size,h==null||h.status;const g={input:u.args,response:h,startTimestamp:d,endTimestamp:f},v={category:"fetch",data:m,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(m.status_code)};o.emit("beforeOutgoingRequestBreadcrumb",v,g),addBreadcrumb(v,g)}}}function _getHistoryBreadcrumbHandler(o){return function(u){if(getClient()!==o)return;let d=u.from,f=u.to;const h=parseUrl(WINDOW$1.location.href);let m=d?parseUrl(d):void 0;const g=parseUrl(f);m!=null&&m.path||(m=h),h.protocol===g.protocol&&h.host===g.host&&(f=g.relative),h.protocol===m.protocol&&h.host===m.host&&(d=m.relative),addBreadcrumb({category:"navigation",data:{from:d,to:f}})}}function _isEvent(o){return!!o&&!!o.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(o={})=>{const l={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...o};return{name:INTEGRATION_NAME$2,setupOnce(){l.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),l.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),l.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),l.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const u=l.eventTarget;u&&(Array.isArray(u)?u:DEFAULT_EVENT_TARGET).forEach(f=>_wrapEventTarget(f,l))}}},browserApiErrorsIntegration=_browserApiErrorsIntegration;function _wrapTimeFunction(o){return function(...l){const u=l[0];return l[0]=wrap(u,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${getFunctionName(o)}`}}),o.apply(this,l)}}function _wrapRAF(o){return function(l){return o.apply(this,[wrap(l,{mechanism:{data:{handler:getFunctionName(o)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function _wrapXHR(o){return function(...l){const u=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(f=>{f in u&&typeof u[f]=="function"&&fill(u,f,function(h){const m={mechanism:{data:{handler:getFunctionName(h)},handled:!1,type:`auto.browser.browserapierrors.xhr.${f}`}},g=getOriginalFunction(h);return g&&(m.mechanism.data.handler=getFunctionName(g)),wrap(h,m)})}),o.apply(this,l)}}function _wrapEventTarget(o,l){var f,h;const d=(f=WINDOW$1[o])==null?void 0:f.prototype;(h=d==null?void 0:d.hasOwnProperty)!=null&&h.call(d,"addEventListener")&&(fill(d,"addEventListener",function(m){return function(g,v,x){try{isEventListenerObject(v)&&(v.handleEvent=wrap(v.handleEvent,{mechanism:{data:{handler:getFunctionName(v),target:o},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return l.unregisterOriginalCallbacks&&unregisterOriginalCallback(this,g,v),m.apply(this,[g,wrap(v,{mechanism:{data:{handler:getFunctionName(v),target:o},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),x])}}),fill(d,"removeEventListener",function(m){return function(g,v,x){try{const b=v.__sentry_wrapped__;b&&m.call(this,g,b,x)}catch{}return m.call(this,g,v,x)}}))}function isEventListenerObject(o){return typeof o.handleEvent=="function"}function unregisterOriginalCallback(o,l,u){o&&typeof o=="object"&&"removeEventListener"in o&&typeof o.removeEventListener=="function"&&o.removeEventListener(l,u)}const browserSessionIntegration=()=>({name:"BrowserSession",setupOnce(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD&&debug.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler(({from:o,to:l})=>{o!==void 0&&o!==l&&(startSession({ignoreDuration:!0}),captureSession())})}}),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(o={})=>{const l={onerror:!0,onunhandledrejection:!0,...o};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(u){l.onerror&&(_installGlobalOnErrorHandler(u),globalHandlerLog("onerror")),l.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(u),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=_globalHandlersIntegration;function _installGlobalOnErrorHandler(o){addGlobalErrorInstrumentationHandler(l=>{const{stackParser:u,attachStacktrace:d}=getOptions();if(getClient()!==o||shouldIgnoreOnError())return;const{msg:f,url:h,line:m,column:g,error:v}=l,x=_enhanceEventWithInitialFrame(eventFromUnknownInput(u,v||f,void 0,d,!1),h,m,g);x.level="error",captureEvent(x,{originalException:v,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(o){addGlobalUnhandledRejectionInstrumentationHandler(l=>{const{stackParser:u,attachStacktrace:d}=getOptions();if(getClient()!==o||shouldIgnoreOnError())return;const f=_getUnhandledRejectionError(l),h=isPrimitive(f)?_eventFromRejectionWithPrimitive(f):eventFromUnknownInput(u,f,void 0,d,!0);h.level="error",captureEvent(h,{originalException:f,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function _getUnhandledRejectionError(o){if(isPrimitive(o))return o;try{if("reason"in o)return o.reason;if("detail"in o&&"reason"in o.detail)return o.detail.reason}catch{}return o}function _eventFromRejectionWithPrimitive(o){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}}function _enhanceEventWithInitialFrame(o,l,u,d){const f=o.exception=o.exception||{},h=f.values=f.values||[],m=h[0]=h[0]||{},g=m.stacktrace=m.stacktrace||{},v=g.frames=g.frames||[],x=d,b=u,S=getFilenameFromUrl(l)??getLocationHref();return v.length===0&&v.push({colno:x,filename:S,function:UNKNOWN_FUNCTION,in_app:!0,lineno:b}),o}function globalHandlerLog(o){DEBUG_BUILD&&debug.log(`Global Handler attached: ${o}`)}function getOptions(){const o=getClient();return(o==null?void 0:o.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function getFilenameFromUrl(o){if(!(!isString$2(o)||o.length===0)){if(o.startsWith("data:")){const l=o.match(/^data:([^;]+)/),u=l?l[1]:"text/javascript",d=o.includes("base64,");return`<data:${u}${d?",base64":""}>`}return o.slice(0,1024)}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(o){var d;if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const l=getHttpRequestData(),u={...l.headers,...(d=o.request)==null?void 0:d.headers};o.request={...l,...o.request,headers:u}}}),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(o={})=>{const l=o.limit||DEFAULT_LIMIT,u=o.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(d,f,h){const m=h.getOptions();applyAggregateErrorsToEvent(exceptionFromError,m.stackParser,u,l,d,f)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function checkAndWarnIfIsEmbeddedBrowserExtension(){return _isEmbeddedBrowserExtension()?(DEBUG_BUILD&&consoleSandbox(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function _isEmbeddedBrowserExtension(){var h;if(typeof WINDOW$1.window>"u")return!1;const o=WINDOW$1;if(o.nw)return!1;const l=o.chrome||o.browser;if(!((h=l==null?void 0:l.runtime)!=null&&h.id))return!1;const u=getLocationHref(),d=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(WINDOW$1===WINDOW$1.top&&d.some(m=>u.startsWith(`${m}://`)))}function getDefaultIntegrations(o){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),browserSessionIntegration()]}function init$1(o={}){const l=!o.skipBrowserExtensionCheck&&checkAndWarnIfIsEmbeddedBrowserExtension(),u={...o,enabled:l?!1:o.enabled,stackParser:stackParserFromStackParserOptions(o.stackParser||defaultStackParser),integrations:getIntegrationsToSetup({integrations:o.integrations,defaultIntegrations:o.defaultIntegrations==null?getDefaultIntegrations():o.defaultIntegrations}),transport:o.transport||makeFetchTransport};return initAndBind(BrowserClient,u)}function init(o){const l={...o};return applySdkMetadata(l,"react"),setContext("react",{version:reactExports.version}),init$1(l)}var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(o){return this.listeners.add(o),this.onSubscribe(),()=>{this.listeners.delete(o),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},defaultTimeoutProvider={setTimeout:(o,l)=>setTimeout(o,l),clearTimeout:o=>clearTimeout(o),setInterval:(o,l)=>setInterval(o,l),clearInterval:o=>clearInterval(o)},TimeoutManager=(Kt=class{constructor(){Xe(this,ht,defaultTimeoutProvider);Xe(this,St,!1)}setTimeoutProvider(o){De(this,ht,o)}setTimeout(o,l){return ne(this,ht).setTimeout(o,l)}clearTimeout(o){ne(this,ht).clearTimeout(o)}setInterval(o,l){return ne(this,ht).setInterval(o,l)}clearInterval(o){ne(this,ht).clearInterval(o)}},ht=new WeakMap,St=new WeakMap,Kt),timeoutManager=new TimeoutManager;function systemSetTimeoutZero(o){setTimeout(o,0)}var isServer=typeof window>"u"||"Deno"in globalThis;function noop$1(){}function functionalUpdate(o,l){return typeof o=="function"?o(l):o}function isValidTimeout(o){return typeof o=="number"&&o>=0&&o!==1/0}function timeUntilStale(o,l){return Math.max(o+(l||0)-Date.now(),0)}function resolveStaleTime(o,l){return typeof o=="function"?o(l):o}function resolveEnabled(o,l){return typeof o=="function"?o(l):o}function matchQuery(o,l){const{type:u="all",exact:d,fetchStatus:f,predicate:h,queryKey:m,stale:g}=o;if(m){if(d){if(l.queryHash!==hashQueryKeyByOptions(m,l.options))return!1}else if(!partialMatchKey(l.queryKey,m))return!1}if(u!=="all"){const v=l.isActive();if(u==="active"&&!v||u==="inactive"&&v)return!1}return!(typeof g=="boolean"&&l.isStale()!==g||f&&f!==l.state.fetchStatus||h&&!h(l))}function matchMutation(o,l){const{exact:u,status:d,predicate:f,mutationKey:h}=o;if(h){if(!l.options.mutationKey)return!1;if(u){if(hashKey(l.options.mutationKey)!==hashKey(h))return!1}else if(!partialMatchKey(l.options.mutationKey,h))return!1}return!(d&&l.state.status!==d||f&&!f(l))}function hashQueryKeyByOptions(o,l){return((l==null?void 0:l.queryKeyHashFn)||hashKey)(o)}function hashKey(o){return JSON.stringify(o,(l,u)=>isPlainObject(u)?Object.keys(u).sort().reduce((d,f)=>(d[f]=u[f],d),{}):u)}function partialMatchKey(o,l){return o===l?!0:typeof o!=typeof l?!1:o&&l&&typeof o=="object"&&typeof l=="object"?Object.keys(l).every(u=>partialMatchKey(o[u],l[u])):!1}var hasOwn=Object.prototype.hasOwnProperty;function replaceEqualDeep(o,l){if(o===l)return o;const u=isPlainArray(o)&&isPlainArray(l);if(!u&&!(isPlainObject(o)&&isPlainObject(l)))return l;const f=(u?o:Object.keys(o)).length,h=u?l:Object.keys(l),m=h.length,g=u?new Array(m):{};let v=0;for(let x=0;x<m;x++){const b=u?x:h[x],S=o[b],E=l[b];if(S===E){g[b]=S,(u?x<f:hasOwn.call(o,b))&&v++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){g[b]=E;continue}const w=replaceEqualDeep(S,E);g[b]=w,w===S&&v++}return f===m&&v===f?o:g}function shallowEqualObjects(o,l){if(!l||Object.keys(o).length!==Object.keys(l).length)return!1;for(const u in o)if(o[u]!==l[u])return!1;return!0}function isPlainArray(o){return Array.isArray(o)&&o.length===Object.keys(o).length}function isPlainObject(o){if(!hasObjectPrototype(o))return!1;const l=o.constructor;if(l===void 0)return!0;const u=l.prototype;return!(!hasObjectPrototype(u)||!u.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(o)!==Object.prototype)}function hasObjectPrototype(o){return Object.prototype.toString.call(o)==="[object Object]"}function sleep(o){return new Promise(l=>{timeoutManager.setTimeout(l,o)})}function replaceData(o,l,u){return typeof u.structuralSharing=="function"?u.structuralSharing(o,l):u.structuralSharing!==!1?replaceEqualDeep(o,l):l}function addToEnd(o,l,u=0){const d=[...o,l];return u&&d.length>u?d.slice(1):d}function addToStart(o,l,u=0){const d=[l,...o];return u&&d.length>u?d.slice(0,-1):d}var skipToken=Symbol();function ensureQueryFn(o,l){return!o.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!o.queryFn||o.queryFn===skipToken?()=>Promise.reject(new Error(`Missing queryFn: '${o.queryHash}'`)):o.queryFn}function shouldThrowError(o,l){return typeof o=="function"?o(...l):!!o}var FocusManager=(rc=class extends Subscribable{constructor(){super();Xe(this,_r);Xe(this,zr);Xe(this,mi);De(this,mi,l=>{if(!isServer&&window.addEventListener){const u=()=>l();return window.addEventListener("visibilitychange",u,!1),()=>{window.removeEventListener("visibilitychange",u)}}})}onSubscribe(){ne(this,zr)||this.setEventListener(ne(this,mi))}onUnsubscribe(){var l;this.hasListeners()||((l=ne(this,zr))==null||l.call(this),De(this,zr,void 0))}setEventListener(l){var u;De(this,mi,l),(u=ne(this,zr))==null||u.call(this),De(this,zr,l(d=>{typeof d=="boolean"?this.setFocused(d):this.onFocus()}))}setFocused(l){ne(this,_r)!==l&&(De(this,_r,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(u=>{u(l)})}isFocused(){var l;return typeof ne(this,_r)=="boolean"?ne(this,_r):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},_r=new WeakMap,zr=new WeakMap,mi=new WeakMap,rc),focusManager=new FocusManager;function pendingThenable(){let o,l;const u=new Promise((f,h)=>{o=f,l=h});u.status="pending",u.catch(()=>{});function d(f){Object.assign(u,f),delete u.resolve,delete u.reject}return u.resolve=f=>{d({status:"fulfilled",value:f}),o(f)},u.reject=f=>{d({status:"rejected",reason:f}),l(f)},u}var defaultScheduler=systemSetTimeoutZero;function createNotifyManager(){let o=[],l=0,u=g=>{g()},d=g=>{g()},f=defaultScheduler;const h=g=>{l?o.push(g):f(()=>{u(g)})},m=()=>{const g=o;o=[],g.length&&f(()=>{d(()=>{g.forEach(v=>{u(v)})})})};return{batch:g=>{let v;l++;try{v=g()}finally{l--,l||m()}return v},batchCalls:g=>(...v)=>{h(()=>{g(...v)})},schedule:h,setNotifyFunction:g=>{u=g},setBatchNotifyFunction:g=>{d=g},setScheduler:g=>{f=g}}}var notifyManager=createNotifyManager(),OnlineManager=(nc=class extends Subscribable{constructor(){super();Xe(this,gi,!0);Xe(this,vn);Xe(this,yi);De(this,yi,l=>{if(!isServer&&window.addEventListener){const u=()=>l(!0),d=()=>l(!1);return window.addEventListener("online",u,!1),window.addEventListener("offline",d,!1),()=>{window.removeEventListener("online",u),window.removeEventListener("offline",d)}}})}onSubscribe(){ne(this,vn)||this.setEventListener(ne(this,yi))}onUnsubscribe(){var l;this.hasListeners()||((l=ne(this,vn))==null||l.call(this),De(this,vn,void 0))}setEventListener(l){var u;De(this,yi,l),(u=ne(this,vn))==null||u.call(this),De(this,vn,l(this.setOnline.bind(this)))}setOnline(l){ne(this,gi)!==l&&(De(this,gi,l),this.listeners.forEach(d=>{d(l)}))}isOnline(){return ne(this,gi)}},gi=new WeakMap,vn=new WeakMap,yi=new WeakMap,nc),onlineManager=new OnlineManager;function defaultRetryDelay(o){return Math.min(1e3*2**o,3e4)}function canFetch(o){return(o??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class extends Error{constructor(o){super("CancelledError"),this.revert=o==null?void 0:o.revert,this.silent=o==null?void 0:o.silent}};function createRetryer(o){let l=!1,u=0,d;const f=pendingThenable(),h=()=>f.status!=="pending",m=C=>{var M;if(!h()){const A=new CancelledError(C);E(A),(M=o.onCancel)==null||M.call(o,A)}},g=()=>{l=!0},v=()=>{l=!1},x=()=>focusManager.isFocused()&&(o.networkMode==="always"||onlineManager.isOnline())&&o.canRun(),b=()=>canFetch(o.networkMode)&&o.canRun(),S=C=>{h()||(d==null||d(),f.resolve(C))},E=C=>{h()||(d==null||d(),f.reject(C))},w=()=>new Promise(C=>{var M;d=A=>{(h()||x())&&C(A)},(M=o.onPause)==null||M.call(o)}).then(()=>{var C;d=void 0,h()||(C=o.onContinue)==null||C.call(o)}),T=()=>{if(h())return;let C;const M=u===0?o.initialPromise:void 0;try{C=M??o.fn()}catch(A){C=Promise.reject(A)}Promise.resolve(C).then(S).catch(A=>{var N;if(h())return;const k=o.retry??(isServer?0:3),I=o.retryDelay??defaultRetryDelay,O=typeof I=="function"?I(u,A):I,j=k===!0||typeof k=="number"&&u<k||typeof k=="function"&&k(u,A);if(l||!j){E(A);return}u++,(N=o.onFail)==null||N.call(o,u,A),sleep(O).then(()=>x()?void 0:w()).then(()=>{l?E(A):T()})})};return{promise:f,status:()=>f.status,cancel:m,continue:()=>(d==null||d(),f),cancelRetry:g,continueRetry:v,canStart:b,start:()=>(b()?T():w().then(T),f)}}var Removable=(ic=class{constructor(){Xe(this,$n)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&De(this,$n,timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(o){this.gcTime=Math.max(this.gcTime||0,o??(isServer?1/0:5*60*1e3))}clearGcTimeout(){ne(this,$n)&&(timeoutManager.clearTimeout(ne(this,$n)),De(this,$n,void 0))}},$n=new WeakMap,ic),define_process_env_default$5={NODE_ENV:"production",version:"1.94.2",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"},Query=(sc=class extends Removable{constructor(l){super();Xe(this,Ir);Xe(this,zn);Xe(this,vi);Xe(this,Er);Xe(this,Un);Xe(this,Gt);Xe(this,ss);Xe(this,Gn);De(this,Gn,!1),De(this,ss,l.defaultOptions),this.setOptions(l.options),this.observers=[],De(this,Un,l.client),De(this,Er,ne(this,Un).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,De(this,zn,getDefaultState$1(this.options)),this.state=l.state??ne(this,zn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=ne(this,Gt))==null?void 0:l.promise}setOptions(l){if(this.options={...ne(this,ss),...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const u=getDefaultState$1(this.options);u.data!==void 0&&(this.setData(u.data,{updatedAt:u.dataUpdatedAt,manual:!0}),De(this,zn,u))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ne(this,Er).remove(this)}setData(l,u){const d=replaceData(this.state.data,l,this.options);return lt(this,Ir,yn).call(this,{data:d,type:"success",dataUpdatedAt:u==null?void 0:u.updatedAt,manual:u==null?void 0:u.manual}),d}setState(l,u){lt(this,Ir,yn).call(this,{type:"setState",state:l,setStateOptions:u})}cancel(l){var d,f;const u=(d=ne(this,Gt))==null?void 0:d.promise;return(f=ne(this,Gt))==null||f.cancel(l),u?u.then(noop$1).catch(noop$1):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ne(this,zn))}isActive(){return this.observers.some(l=>resolveEnabled(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>resolveStaleTime(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!timeUntilStale(this.state.dataUpdatedAt,l)}onFocus(){var u;const l=this.observers.find(d=>d.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(u=ne(this,Gt))==null||u.continue()}onOnline(){var u;const l=this.observers.find(d=>d.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(u=ne(this,Gt))==null||u.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),ne(this,Er).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(u=>u!==l),this.observers.length||(ne(this,Gt)&&(ne(this,Gn)?ne(this,Gt).cancel({revert:!0}):ne(this,Gt).cancelRetry()),this.scheduleGc()),ne(this,Er).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lt(this,Ir,yn).call(this,{type:"invalidate"})}async fetch(l,u){var v,x,b,S,E,w,T,C,M,A,k,I;if(this.state.fetchStatus!=="idle"&&((v=ne(this,Gt))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(u!=null&&u.cancelRefetch))this.cancel({silent:!0});else if(ne(this,Gt))return ne(this,Gt).continueRetry(),ne(this,Gt).promise}if(l&&this.setOptions(l),!this.options.queryFn){const O=this.observers.find(j=>j.options.queryFn);O&&this.setOptions(O.options)}const d=new AbortController,f=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(De(this,Gn,!0),d.signal)})},h=()=>{const O=ensureQueryFn(this.options,u),N=(()=>{const V={client:ne(this,Un),queryKey:this.queryKey,meta:this.meta};return f(V),V})();return De(this,Gn,!1),this.options.persister?this.options.persister(O,N,this):O(N)},g=(()=>{const O={fetchOptions:u,options:this.options,queryKey:this.queryKey,client:ne(this,Un),state:this.state,fetchFn:h};return f(O),O})();(x=this.options.behavior)==null||x.onFetch(g,this),De(this,vi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=g.fetchOptions)==null?void 0:b.meta))&&lt(this,Ir,yn).call(this,{type:"fetch",meta:(S=g.fetchOptions)==null?void 0:S.meta}),De(this,Gt,createRetryer({initialPromise:u==null?void 0:u.initialPromise,fn:g.fetchFn,onCancel:O=>{O instanceof CancelledError&&O.revert&&this.setState({...ne(this,vi),fetchStatus:"idle"}),d.abort()},onFail:(O,j)=>{lt(this,Ir,yn).call(this,{type:"failed",failureCount:O,error:j})},onPause:()=>{lt(this,Ir,yn).call(this,{type:"pause"})},onContinue:()=>{lt(this,Ir,yn).call(this,{type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode,canRun:()=>!0}));try{const O=await ne(this,Gt).start();if(O===void 0)throw define_process_env_default$5.NODE_ENV,new Error(`${this.queryHash} data is undefined`);return this.setData(O),(w=(E=ne(this,Er).config).onSuccess)==null||w.call(E,O,this),(C=(T=ne(this,Er).config).onSettled)==null||C.call(T,O,this.state.error,this),O}catch(O){if(O instanceof CancelledError){if(O.silent)return ne(this,Gt).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw lt(this,Ir,yn).call(this,{type:"error",error:O}),(A=(M=ne(this,Er).config).onError)==null||A.call(M,O,this),(I=(k=ne(this,Er).config).onSettled)==null||I.call(k,this.state.data,O,this),O}finally{this.scheduleGc()}}},zn=new WeakMap,vi=new WeakMap,Er=new WeakMap,Un=new WeakMap,Gt=new WeakMap,ss=new WeakMap,Gn=new WeakMap,Ir=new WeakSet,yn=function(l){const u=d=>{switch(l.type){case"failed":return{...d,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...d,fetchStatus:"paused"};case"continue":return{...d,fetchStatus:"fetching"};case"fetch":return{...d,...fetchState(d.data,this.options),fetchMeta:l.meta??null};case"success":const f={...d,data:l.data,dataUpdateCount:d.dataUpdateCount+1,dataUpdatedAt:l.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,vi,l.manual?f:void 0),f;case"error":const h=l.error;return{...d,error:h,errorUpdateCount:d.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:d.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error"};case"invalidate":return{...d,isInvalidated:!0};case"setState":return{...d,...l.state}}};this.state=u(this.state),notifyManager.batch(()=>{this.observers.forEach(d=>{d.onQueryUpdate()}),ne(this,Er).notify({query:this,type:"updated",action:l})})},sc);function fetchState(o,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(l.networkMode)?"fetching":"paused",...o===void 0&&{error:null,status:"pending"}}}function getDefaultState$1(o){const l=typeof o.initialData=="function"?o.initialData():o.initialData,u=l!==void 0,d=u?typeof o.initialDataUpdatedAt=="function"?o.initialDataUpdatedAt():o.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:u?d??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:u?"success":"pending",fetchStatus:"idle"}}var QueryObserver=(oc=class extends Subscribable{constructor(l,u){super();Xe(this,vt);Xe(this,cr);Xe(this,dt);Xe(this,os);Xe(this,ir);Xe(this,Hn);Xe(this,xi);Xe(this,tn);Xe(this,xn);Xe(this,as);Xe(this,bi);Xe(this,_i);Xe(this,Wn);Xe(this,qn);Xe(this,bn);Xe(this,Ei,new Set);this.options=u,De(this,cr,l),De(this,xn,null),De(this,tn,pendingThenable()),this.bindMethods(),this.setOptions(u)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ne(this,dt).addObserver(this),shouldFetchOnMount(ne(this,dt),this.options)?lt(this,vt,qs).call(this):this.updateResult(),lt(this,vt,Ql).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(ne(this,dt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(ne(this,dt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,lt(this,vt,Jl).call(this),lt(this,vt,Zl).call(this),ne(this,dt).removeObserver(this)}setOptions(l){const u=this.options,d=ne(this,dt);if(this.options=ne(this,cr).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof resolveEnabled(this.options.enabled,ne(this,dt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");lt(this,vt,ec).call(this),ne(this,dt).setOptions(this.options),u._defaulted&&!shallowEqualObjects(this.options,u)&&ne(this,cr).getQueryCache().notify({type:"observerOptionsUpdated",query:ne(this,dt),observer:this});const f=this.hasListeners();f&&shouldFetchOptionally(ne(this,dt),d,this.options,u)&&lt(this,vt,qs).call(this),this.updateResult(),f&&(ne(this,dt)!==d||resolveEnabled(this.options.enabled,ne(this,dt))!==resolveEnabled(u.enabled,ne(this,dt))||resolveStaleTime(this.options.staleTime,ne(this,dt))!==resolveStaleTime(u.staleTime,ne(this,dt)))&&lt(this,vt,Kl).call(this);const h=lt(this,vt,Yl).call(this);f&&(ne(this,dt)!==d||resolveEnabled(this.options.enabled,ne(this,dt))!==resolveEnabled(u.enabled,ne(this,dt))||h!==ne(this,bn))&&lt(this,vt,Xl).call(this,h)}getOptimisticResult(l){const u=ne(this,cr).getQueryCache().build(ne(this,cr),l),d=this.createResult(u,l);return shouldAssignObserverCurrentProperties(this,d)&&(De(this,ir,d),De(this,xi,this.options),De(this,Hn,ne(this,dt).state)),d}getCurrentResult(){return ne(this,ir)}trackResult(l,u){return new Proxy(l,{get:(d,f)=>(this.trackProp(f),u==null||u(f),f==="promise"&&!this.options.experimental_prefetchInRender&&ne(this,tn).status==="pending"&&ne(this,tn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(d,f))})}trackProp(l){ne(this,Ei).add(l)}getCurrentQuery(){return ne(this,dt)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const u=ne(this,cr).defaultQueryOptions(l),d=ne(this,cr).getQueryCache().build(ne(this,cr),u);return d.fetch().then(()=>this.createResult(d,u))}fetch(l){return lt(this,vt,qs).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),ne(this,ir)))}createResult(l,u){var W;const d=ne(this,dt),f=this.options,h=ne(this,ir),m=ne(this,Hn),g=ne(this,xi),x=l!==d?l.state:ne(this,os),{state:b}=l;let S={...b},E=!1,w;if(u._optimisticResults){const X=this.hasListeners(),ie=!X&&shouldFetchOnMount(l,u),oe=X&&shouldFetchOptionally(l,d,u,f);(ie||oe)&&(S={...S,...fetchState(b.data,l.options)}),u._optimisticResults==="isRestoring"&&(S.fetchStatus="idle")}let{error:T,errorUpdatedAt:C,status:M}=S;w=S.data;let A=!1;if(u.placeholderData!==void 0&&w===void 0&&M==="pending"){let X;h!=null&&h.isPlaceholderData&&u.placeholderData===(g==null?void 0:g.placeholderData)?(X=h.data,A=!0):X=typeof u.placeholderData=="function"?u.placeholderData((W=ne(this,_i))==null?void 0:W.state.data,ne(this,_i)):u.placeholderData,X!==void 0&&(M="success",w=replaceData(h==null?void 0:h.data,X,u),E=!0)}if(u.select&&w!==void 0&&!A)if(h&&w===(m==null?void 0:m.data)&&u.select===ne(this,as))w=ne(this,bi);else try{De(this,as,u.select),w=u.select(w),w=replaceData(h==null?void 0:h.data,w,u),De(this,bi,w),De(this,xn,null)}catch(X){De(this,xn,X)}ne(this,xn)&&(T=ne(this,xn),w=ne(this,bi),C=Date.now(),M="error");const k=S.fetchStatus==="fetching",I=M==="pending",O=M==="error",j=I&&k,N=w!==void 0,z={status:M,fetchStatus:S.fetchStatus,isPending:I,isSuccess:M==="success",isError:O,isInitialLoading:j,isLoading:j,data:w,dataUpdatedAt:S.dataUpdatedAt,error:T,errorUpdatedAt:C,failureCount:S.fetchFailureCount,failureReason:S.fetchFailureReason,errorUpdateCount:S.errorUpdateCount,isFetched:S.dataUpdateCount>0||S.errorUpdateCount>0,isFetchedAfterMount:S.dataUpdateCount>x.dataUpdateCount||S.errorUpdateCount>x.errorUpdateCount,isFetching:k,isRefetching:k&&!I,isLoadingError:O&&!N,isPaused:S.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:O&&N,isStale:isStale(l,u),refetch:this.refetch,promise:ne(this,tn),isEnabled:resolveEnabled(u.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const X=le=>{z.status==="error"?le.reject(z.error):z.data!==void 0&&le.resolve(z.data)},ie=()=>{const le=De(this,tn,z.promise=pendingThenable());X(le)},oe=ne(this,tn);switch(oe.status){case"pending":l.queryHash===d.queryHash&&X(oe);break;case"fulfilled":(z.status==="error"||z.data!==oe.value)&&ie();break;case"rejected":(z.status!=="error"||z.error!==oe.reason)&&ie();break}}return z}updateResult(){const l=ne(this,ir),u=this.createResult(ne(this,dt),this.options);if(De(this,Hn,ne(this,dt).state),De(this,xi,this.options),ne(this,Hn).data!==void 0&&De(this,_i,ne(this,dt)),shallowEqualObjects(u,l))return;De(this,ir,u);const d=()=>{if(!l)return!0;const{notifyOnChangeProps:f}=this.options,h=typeof f=="function"?f():f;if(h==="all"||!h&&!ne(this,Ei).size)return!0;const m=new Set(h??ne(this,Ei));return this.options.throwOnError&&m.add("error"),Object.keys(ne(this,ir)).some(g=>{const v=g;return ne(this,ir)[v]!==l[v]&&m.has(v)})};lt(this,vt,Id).call(this,{listeners:d()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&lt(this,vt,Ql).call(this)}},cr=new WeakMap,dt=new WeakMap,os=new WeakMap,ir=new WeakMap,Hn=new WeakMap,xi=new WeakMap,tn=new WeakMap,xn=new WeakMap,as=new WeakMap,bi=new WeakMap,_i=new WeakMap,Wn=new WeakMap,qn=new WeakMap,bn=new WeakMap,Ei=new WeakMap,vt=new WeakSet,qs=function(l){lt(this,vt,ec).call(this);let u=ne(this,dt).fetch(this.options,l);return l!=null&&l.throwOnError||(u=u.catch(noop$1)),u},Kl=function(){lt(this,vt,Jl).call(this);const l=resolveStaleTime(this.options.staleTime,ne(this,dt));if(isServer||ne(this,ir).isStale||!isValidTimeout(l))return;const d=timeUntilStale(ne(this,ir).dataUpdatedAt,l)+1;De(this,Wn,timeoutManager.setTimeout(()=>{ne(this,ir).isStale||this.updateResult()},d))},Yl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ne(this,dt)):this.options.refetchInterval)??!1},Xl=function(l){lt(this,vt,Zl).call(this),De(this,bn,l),!(isServer||resolveEnabled(this.options.enabled,ne(this,dt))===!1||!isValidTimeout(ne(this,bn))||ne(this,bn)===0)&&De(this,qn,timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&lt(this,vt,qs).call(this)},ne(this,bn)))},Ql=function(){lt(this,vt,Kl).call(this),lt(this,vt,Xl).call(this,lt(this,vt,Yl).call(this))},Jl=function(){ne(this,Wn)&&(timeoutManager.clearTimeout(ne(this,Wn)),De(this,Wn,void 0))},Zl=function(){ne(this,qn)&&(timeoutManager.clearInterval(ne(this,qn)),De(this,qn,void 0))},ec=function(){const l=ne(this,cr).getQueryCache().build(ne(this,cr),this.options);if(l===ne(this,dt))return;const u=ne(this,dt);De(this,dt,l),De(this,os,l.state),this.hasListeners()&&(u==null||u.removeObserver(this),l.addObserver(this))},Id=function(l){notifyManager.batch(()=>{l.listeners&&this.listeners.forEach(u=>{u(ne(this,ir))}),ne(this,cr).getQueryCache().notify({query:ne(this,dt),type:"observerResultsUpdated"})})},oc);function shouldLoadOnMount(o,l){return resolveEnabled(l.enabled,o)!==!1&&o.state.data===void 0&&!(o.state.status==="error"&&l.retryOnMount===!1)}function shouldFetchOnMount(o,l){return shouldLoadOnMount(o,l)||o.state.data!==void 0&&shouldFetchOn(o,l,l.refetchOnMount)}function shouldFetchOn(o,l,u){if(resolveEnabled(l.enabled,o)!==!1&&resolveStaleTime(l.staleTime,o)!=="static"){const d=typeof u=="function"?u(o):u;return d==="always"||d!==!1&&isStale(o,l)}return!1}function shouldFetchOptionally(o,l,u,d){return(o!==l||resolveEnabled(d.enabled,o)===!1)&&(!u.suspense||o.state.status!=="error")&&isStale(o,u)}function isStale(o,l){return resolveEnabled(l.enabled,o)!==!1&&o.isStaleByTime(resolveStaleTime(l.staleTime,o))}function shouldAssignObserverCurrentProperties(o,l){return!shallowEqualObjects(o.getCurrentResult(),l)}function infiniteQueryBehavior(o){return{onFetch:(l,u)=>{var b,S,E,w,T;const d=l.options,f=(E=(S=(b=l.fetchOptions)==null?void 0:b.meta)==null?void 0:S.fetchMore)==null?void 0:E.direction,h=((w=l.state.data)==null?void 0:w.pages)||[],m=((T=l.state.data)==null?void 0:T.pageParams)||[];let g={pages:[],pageParams:[]},v=0;const x=async()=>{let C=!1;const M=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(l.signal.aborted?C=!0:l.signal.addEventListener("abort",()=>{C=!0}),l.signal)})},A=ensureQueryFn(l.options,l.fetchOptions),k=async(I,O,j)=>{if(C)return Promise.reject();if(O==null&&I.pages.length)return Promise.resolve(I);const V=(()=>{const ie={client:l.client,queryKey:l.queryKey,pageParam:O,direction:j?"backward":"forward",meta:l.options.meta};return M(ie),ie})(),z=await A(V),{maxPages:W}=l.options,X=j?addToStart:addToEnd;return{pages:X(I.pages,z,W),pageParams:X(I.pageParams,O,W)}};if(f&&h.length){const I=f==="backward",O=I?getPreviousPageParam:getNextPageParam,j={pages:h,pageParams:m},N=O(d,j);g=await k(j,N,I)}else{const I=o??h.length;do{const O=v===0?m[0]??d.initialPageParam:getNextPageParam(d,g);if(v>0&&O==null)break;g=await k(g,O),v++}while(v<I)}return g};l.options.persister?l.fetchFn=()=>{var C,M;return(M=(C=l.options).persister)==null?void 0:M.call(C,x,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},u)}:l.fetchFn=x}}}function getNextPageParam(o,{pages:l,pageParams:u}){const d=l.length-1;return l.length>0?o.getNextPageParam(l[d],l,u[d],u):void 0}function getPreviousPageParam(o,{pages:l,pageParams:u}){var d;return l.length>0?(d=o.getPreviousPageParam)==null?void 0:d.call(o,l[0],l,u[0],u):void 0}var Mutation=(ac=class extends Removable{constructor(l){super();Xe(this,Gr);Xe(this,ls);Xe(this,Ur);Xe(this,sr);Xe(this,Kn);De(this,ls,l.client),this.mutationId=l.mutationId,De(this,sr,l.mutationCache),De(this,Ur,[]),this.state=l.state||getDefaultState(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){ne(this,Ur).includes(l)||(ne(this,Ur).push(l),this.clearGcTimeout(),ne(this,sr).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){De(this,Ur,ne(this,Ur).filter(u=>u!==l)),this.scheduleGc(),ne(this,sr).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){ne(this,Ur).length||(this.state.status==="pending"?this.scheduleGc():ne(this,sr).remove(this))}continue(){var l;return((l=ne(this,Kn))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var m,g,v,x,b,S,E,w,T,C,M,A,k,I,O,j,N,V,z,W;const u=()=>{lt(this,Gr,Vn).call(this,{type:"continue"})},d={client:ne(this,ls),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,Kn,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(l,d):Promise.reject(new Error("No mutationFn found")),onFail:(X,ie)=>{lt(this,Gr,Vn).call(this,{type:"failed",failureCount:X,error:ie})},onPause:()=>{lt(this,Gr,Vn).call(this,{type:"pause"})},onContinue:u,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ne(this,sr).canRun(this)}));const f=this.state.status==="pending",h=!ne(this,Kn).canStart();try{if(f)u();else{lt(this,Gr,Vn).call(this,{type:"pending",variables:l,isPaused:h}),await((g=(m=ne(this,sr).config).onMutate)==null?void 0:g.call(m,l,this,d));const ie=await((x=(v=this.options).onMutate)==null?void 0:x.call(v,l,d));ie!==this.state.context&&lt(this,Gr,Vn).call(this,{type:"pending",context:ie,variables:l,isPaused:h})}const X=await ne(this,Kn).start();return await((S=(b=ne(this,sr).config).onSuccess)==null?void 0:S.call(b,X,l,this.state.context,this,d)),await((w=(E=this.options).onSuccess)==null?void 0:w.call(E,X,l,this.state.context,d)),await((C=(T=ne(this,sr).config).onSettled)==null?void 0:C.call(T,X,null,this.state.variables,this.state.context,this,d)),await((A=(M=this.options).onSettled)==null?void 0:A.call(M,X,null,l,this.state.context,d)),lt(this,Gr,Vn).call(this,{type:"success",data:X}),X}catch(X){try{throw await((I=(k=ne(this,sr).config).onError)==null?void 0:I.call(k,X,l,this.state.context,this,d)),await((j=(O=this.options).onError)==null?void 0:j.call(O,X,l,this.state.context,d)),await((V=(N=ne(this,sr).config).onSettled)==null?void 0:V.call(N,void 0,X,this.state.variables,this.state.context,this,d)),await((W=(z=this.options).onSettled)==null?void 0:W.call(z,void 0,X,l,this.state.context,d)),X}finally{lt(this,Gr,Vn).call(this,{type:"error",error:X})}}finally{ne(this,sr).runNext(this)}}},ls=new WeakMap,Ur=new WeakMap,sr=new WeakMap,Kn=new WeakMap,Gr=new WeakSet,Vn=function(l){const u=d=>{switch(l.type){case"failed":return{...d,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...d,isPaused:!0};case"continue":return{...d,isPaused:!1};case"pending":return{...d,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...d,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...d,data:void 0,error:l.error,failureCount:d.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=u(this.state),notifyManager.batch(()=>{ne(this,Ur).forEach(d=>{d.onMutationUpdate(l)}),ne(this,sr).notify({mutation:this,type:"updated",action:l})})},ac);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var MutationCache=(lc=class extends Subscribable{constructor(l={}){super();Xe(this,rn);Xe(this,kr);Xe(this,cs);this.config=l,De(this,rn,new Set),De(this,kr,new Map),De(this,cs,0)}build(l,u,d){const f=new Mutation({client:l,mutationCache:this,mutationId:++ca(this,cs)._,options:l.defaultMutationOptions(u),state:d});return this.add(f),f}add(l){ne(this,rn).add(l);const u=scopeFor(l);if(typeof u=="string"){const d=ne(this,kr).get(u);d?d.push(l):ne(this,kr).set(u,[l])}this.notify({type:"added",mutation:l})}remove(l){if(ne(this,rn).delete(l)){const u=scopeFor(l);if(typeof u=="string"){const d=ne(this,kr).get(u);if(d)if(d.length>1){const f=d.indexOf(l);f!==-1&&d.splice(f,1)}else d[0]===l&&ne(this,kr).delete(u)}}this.notify({type:"removed",mutation:l})}canRun(l){const u=scopeFor(l);if(typeof u=="string"){const d=ne(this,kr).get(u),f=d==null?void 0:d.find(h=>h.state.status==="pending");return!f||f===l}else return!0}runNext(l){var d;const u=scopeFor(l);if(typeof u=="string"){const f=(d=ne(this,kr).get(u))==null?void 0:d.find(h=>h!==l&&h.state.isPaused);return(f==null?void 0:f.continue())??Promise.resolve()}else return Promise.resolve()}clear(){notifyManager.batch(()=>{ne(this,rn).forEach(l=>{this.notify({type:"removed",mutation:l})}),ne(this,rn).clear(),ne(this,kr).clear()})}getAll(){return Array.from(ne(this,rn))}find(l){const u={exact:!0,...l};return this.getAll().find(d=>matchMutation(u,d))}findAll(l={}){return this.getAll().filter(u=>matchMutation(l,u))}notify(l){notifyManager.batch(()=>{this.listeners.forEach(u=>{u(l)})})}resumePausedMutations(){const l=this.getAll().filter(u=>u.state.isPaused);return notifyManager.batch(()=>Promise.all(l.map(u=>u.continue().catch(noop$1))))}},rn=new WeakMap,kr=new WeakMap,cs=new WeakMap,lc);function scopeFor(o){var l;return(l=o.options.scope)==null?void 0:l.id}var MutationObserver$1=(cc=class extends Subscribable{constructor(u,d){super();Xe(this,on);Xe(this,nn);Xe(this,_n);Xe(this,ur);Xe(this,sn);De(this,nn,u),this.setOptions(d),this.bindMethods(),lt(this,on,ua).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(u){var f;const d=this.options;this.options=ne(this,nn).defaultMutationOptions(u),shallowEqualObjects(this.options,d)||ne(this,nn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ne(this,ur),observer:this}),d!=null&&d.mutationKey&&this.options.mutationKey&&hashKey(d.mutationKey)!==hashKey(this.options.mutationKey)?this.reset():((f=ne(this,ur))==null?void 0:f.state.status)==="pending"&&ne(this,ur).setOptions(this.options)}onUnsubscribe(){var u;this.hasListeners()||(u=ne(this,ur))==null||u.removeObserver(this)}onMutationUpdate(u){lt(this,on,ua).call(this),lt(this,on,tc).call(this,u)}getCurrentResult(){return ne(this,_n)}reset(){var u;(u=ne(this,ur))==null||u.removeObserver(this),De(this,ur,void 0),lt(this,on,ua).call(this),lt(this,on,tc).call(this)}mutate(u,d){var f;return De(this,sn,d),(f=ne(this,ur))==null||f.removeObserver(this),De(this,ur,ne(this,nn).getMutationCache().build(ne(this,nn),this.options)),ne(this,ur).addObserver(this),ne(this,ur).execute(u)}},nn=new WeakMap,_n=new WeakMap,ur=new WeakMap,sn=new WeakMap,on=new WeakSet,ua=function(){var d;const u=((d=ne(this,ur))==null?void 0:d.state)??getDefaultState();De(this,_n,{...u,isPending:u.status==="pending",isSuccess:u.status==="success",isError:u.status==="error",isIdle:u.status==="idle",mutate:this.mutate,reset:this.reset})},tc=function(u){notifyManager.batch(()=>{var d,f,h,m,g,v,x,b;if(ne(this,sn)&&this.hasListeners()){const S=ne(this,_n).variables,E=ne(this,_n).context,w={client:ne(this,nn),meta:this.options.meta,mutationKey:this.options.mutationKey};(u==null?void 0:u.type)==="success"?((f=(d=ne(this,sn)).onSuccess)==null||f.call(d,u.data,S,E,w),(m=(h=ne(this,sn)).onSettled)==null||m.call(h,u.data,null,S,E,w)):(u==null?void 0:u.type)==="error"&&((v=(g=ne(this,sn)).onError)==null||v.call(g,u.error,S,E,w),(b=(x=ne(this,sn)).onSettled)==null||b.call(x,void 0,u.error,S,E,w))}this.listeners.forEach(S=>{S(ne(this,_n))})})},cc),QueryCache=(uc=class extends Subscribable{constructor(l={}){super();Xe(this,Hr);this.config=l,De(this,Hr,new Map)}build(l,u,d){const f=u.queryKey,h=u.queryHash??hashQueryKeyByOptions(f,u);let m=this.get(h);return m||(m=new Query({client:l,queryKey:f,queryHash:h,options:l.defaultQueryOptions(u),state:d,defaultOptions:l.getQueryDefaults(f)}),this.add(m)),m}add(l){ne(this,Hr).has(l.queryHash)||(ne(this,Hr).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const u=ne(this,Hr).get(l.queryHash);u&&(l.destroy(),u===l&&ne(this,Hr).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return ne(this,Hr).get(l)}getAll(){return[...ne(this,Hr).values()]}find(l){const u={exact:!0,...l};return this.getAll().find(d=>matchQuery(u,d))}findAll(l={}){const u=this.getAll();return Object.keys(l).length>0?u.filter(d=>matchQuery(l,d)):u}notify(l){notifyManager.batch(()=>{this.listeners.forEach(u=>{u(l)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},Hr=new WeakMap,uc),QueryClient=(dc=class{constructor(o={}){Xe(this,jt);Xe(this,En);Xe(this,Sn);Xe(this,Si);Xe(this,wi);Xe(this,wn);Xe(this,Ti);Xe(this,Ci);De(this,jt,o.queryCache||new QueryCache),De(this,En,o.mutationCache||new MutationCache),De(this,Sn,o.defaultOptions||{}),De(this,Si,new Map),De(this,wi,new Map),De(this,wn,0)}mount(){ca(this,wn)._++,ne(this,wn)===1&&(De(this,Ti,focusManager.subscribe(async o=>{o&&(await this.resumePausedMutations(),ne(this,jt).onFocus())})),De(this,Ci,onlineManager.subscribe(async o=>{o&&(await this.resumePausedMutations(),ne(this,jt).onOnline())})))}unmount(){var o,l;ca(this,wn)._--,ne(this,wn)===0&&((o=ne(this,Ti))==null||o.call(this),De(this,Ti,void 0),(l=ne(this,Ci))==null||l.call(this),De(this,Ci,void 0))}isFetching(o){return ne(this,jt).findAll({...o,fetchStatus:"fetching"}).length}isMutating(o){return ne(this,En).findAll({...o,status:"pending"}).length}getQueryData(o){var u;const l=this.defaultQueryOptions({queryKey:o});return(u=ne(this,jt).get(l.queryHash))==null?void 0:u.state.data}ensureQueryData(o){const l=this.defaultQueryOptions(o),u=ne(this,jt).build(this,l),d=u.state.data;return d===void 0?this.fetchQuery(o):(o.revalidateIfStale&&u.isStaleByTime(resolveStaleTime(l.staleTime,u))&&this.prefetchQuery(l),Promise.resolve(d))}getQueriesData(o){return ne(this,jt).findAll(o).map(({queryKey:l,state:u})=>{const d=u.data;return[l,d]})}setQueryData(o,l,u){const d=this.defaultQueryOptions({queryKey:o}),f=ne(this,jt).get(d.queryHash),h=f==null?void 0:f.state.data,m=functionalUpdate(l,h);if(m!==void 0)return ne(this,jt).build(this,d).setData(m,{...u,manual:!0})}setQueriesData(o,l,u){return notifyManager.batch(()=>ne(this,jt).findAll(o).map(({queryKey:d})=>[d,this.setQueryData(d,l,u)]))}getQueryState(o){var u;const l=this.defaultQueryOptions({queryKey:o});return(u=ne(this,jt).get(l.queryHash))==null?void 0:u.state}removeQueries(o){const l=ne(this,jt);notifyManager.batch(()=>{l.findAll(o).forEach(u=>{l.remove(u)})})}resetQueries(o,l){const u=ne(this,jt);return notifyManager.batch(()=>(u.findAll(o).forEach(d=>{d.reset()}),this.refetchQueries({type:"active",...o},l)))}cancelQueries(o,l={}){const u={revert:!0,...l},d=notifyManager.batch(()=>ne(this,jt).findAll(o).map(f=>f.cancel(u)));return Promise.all(d).then(noop$1).catch(noop$1)}invalidateQueries(o,l={}){return notifyManager.batch(()=>(ne(this,jt).findAll(o).forEach(u=>{u.invalidate()}),(o==null?void 0:o.refetchType)==="none"?Promise.resolve():this.refetchQueries({...o,type:(o==null?void 0:o.refetchType)??(o==null?void 0:o.type)??"active"},l)))}refetchQueries(o,l={}){const u={...l,cancelRefetch:l.cancelRefetch??!0},d=notifyManager.batch(()=>ne(this,jt).findAll(o).filter(f=>!f.isDisabled()&&!f.isStatic()).map(f=>{let h=f.fetch(void 0,u);return u.throwOnError||(h=h.catch(noop$1)),f.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(d).then(noop$1)}fetchQuery(o){const l=this.defaultQueryOptions(o);l.retry===void 0&&(l.retry=!1);const u=ne(this,jt).build(this,l);return u.isStaleByTime(resolveStaleTime(l.staleTime,u))?u.fetch(l):Promise.resolve(u.state.data)}prefetchQuery(o){return this.fetchQuery(o).then(noop$1).catch(noop$1)}fetchInfiniteQuery(o){return o.behavior=infiniteQueryBehavior(o.pages),this.fetchQuery(o)}prefetchInfiniteQuery(o){return this.fetchInfiniteQuery(o).then(noop$1).catch(noop$1)}ensureInfiniteQueryData(o){return o.behavior=infiniteQueryBehavior(o.pages),this.ensureQueryData(o)}resumePausedMutations(){return onlineManager.isOnline()?ne(this,En).resumePausedMutations():Promise.resolve()}getQueryCache(){return ne(this,jt)}getMutationCache(){return ne(this,En)}getDefaultOptions(){return ne(this,Sn)}setDefaultOptions(o){De(this,Sn,o)}setQueryDefaults(o,l){ne(this,Si).set(hashKey(o),{queryKey:o,defaultOptions:l})}getQueryDefaults(o){const l=[...ne(this,Si).values()],u={};return l.forEach(d=>{partialMatchKey(o,d.queryKey)&&Object.assign(u,d.defaultOptions)}),u}setMutationDefaults(o,l){ne(this,wi).set(hashKey(o),{mutationKey:o,defaultOptions:l})}getMutationDefaults(o){const l=[...ne(this,wi).values()],u={};return l.forEach(d=>{partialMatchKey(o,d.mutationKey)&&Object.assign(u,d.defaultOptions)}),u}defaultQueryOptions(o){if(o._defaulted)return o;const l={...ne(this,Sn).queries,...this.getQueryDefaults(o.queryKey),...o,_defaulted:!0};return l.queryHash||(l.queryHash=hashQueryKeyByOptions(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===skipToken&&(l.enabled=!1),l}defaultMutationOptions(o){return o!=null&&o._defaulted?o:{...ne(this,Sn).mutations,...(o==null?void 0:o.mutationKey)&&this.getMutationDefaults(o.mutationKey),...o,_defaulted:!0}}clear(){ne(this,jt).clear(),ne(this,En).clear()}},jt=new WeakMap,En=new WeakMap,Sn=new WeakMap,Si=new WeakMap,wi=new WeakMap,wn=new WeakMap,Ti=new WeakMap,Ci=new WeakMap,dc),QueryClientContext=reactExports.createContext(void 0),useQueryClient=o=>{const l=reactExports.useContext(QueryClientContext);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},QueryClientProvider=({client:o,children:l})=>(reactExports.useEffect(()=>(o.mount(),()=>{o.unmount()}),[o]),jsxRuntimeExports.jsx(QueryClientContext.Provider,{value:o,children:l})),IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let o=!1;return{clearReset:()=>{o=!1},reset:()=>{o=!0},isReset:()=>o}}var QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext),ensurePreventErrorBoundaryRetry=(o,l)=>{(o.suspense||o.throwOnError||o.experimental_prefetchInRender)&&(l.isReset()||(o.retryOnMount=!1))},useClearResetErrorBoundary=o=>{reactExports.useEffect(()=>{o.clearReset()},[o])},getHasError=({result:o,errorResetBoundary:l,throwOnError:u,query:d,suspense:f})=>o.isError&&!l.isReset()&&!o.isFetching&&d&&(f&&o.data===void 0||shouldThrowError(u,[o.error,d])),defaultThrowOnError=(o,l)=>l.state.data===void 0,ensureSuspenseTimers=o=>{if(o.suspense){const u=f=>f==="static"?f:Math.max(f??1e3,1e3),d=o.staleTime;o.staleTime=typeof d=="function"?(...f)=>u(d(...f)):u(d),typeof o.gcTime=="number"&&(o.gcTime=Math.max(o.gcTime,1e3))}},willFetch=(o,l)=>o.isLoading&&o.isFetching&&!l,shouldSuspend=(o,l)=>(o==null?void 0:o.suspense)&&l.isPending,fetchOptimistic=(o,l,u)=>l.fetchOptimistic(o).catch(()=>{u.clearReset()});function useBaseQuery(o,l,u){var S,E,w,T,C;const d=useIsRestoring(),f=useQueryErrorResetBoundary(),h=useQueryClient(),m=h.defaultQueryOptions(o);(E=(S=h.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||E.call(S,m),m._optimisticResults=d?"isRestoring":"optimistic",ensureSuspenseTimers(m),ensurePreventErrorBoundaryRetry(m,f),useClearResetErrorBoundary(f);const g=!h.getQueryCache().get(m.queryHash),[v]=reactExports.useState(()=>new l(h,m)),x=v.getOptimisticResult(m),b=!d&&o.subscribed!==!1;if(reactExports.useSyncExternalStore(reactExports.useCallback(M=>{const A=b?v.subscribe(notifyManager.batchCalls(M)):noop$1;return v.updateResult(),A},[v,b]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),reactExports.useEffect(()=>{v.setOptions(m)},[m,v]),shouldSuspend(m,x))throw fetchOptimistic(m,v,f);if(getHasError({result:x,errorResetBoundary:f,throwOnError:m.throwOnError,query:h.getQueryCache().get(m.queryHash),suspense:m.suspense}))throw x.error;if((T=(w=h.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||T.call(w,m,x),m.experimental_prefetchInRender&&!isServer&&willFetch(x,d)){const M=g?fetchOptimistic(m,v,f):(C=h.getQueryCache().get(m.queryHash))==null?void 0:C.promise;M==null||M.catch(noop$1).finally(()=>{v.updateResult()})}return m.notifyOnChangeProps?x:v.trackResult(x)}function useQuery(o,l){return useBaseQuery(o,QueryObserver)}function useSuspenseQuery(o,l){return useBaseQuery({...o,enabled:!0,suspense:!0,throwOnError:defaultThrowOnError,placeholderData:void 0},QueryObserver)}function useMutation(o,l){const u=useQueryClient(),[d]=reactExports.useState(()=>new MutationObserver$1(u,o));reactExports.useEffect(()=>{d.setOptions(o)},[d,o]);const f=reactExports.useSyncExternalStore(reactExports.useCallback(m=>d.subscribe(notifyManager.batchCalls(m)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),h=reactExports.useCallback((m,g)=>{d.mutate(m,g).catch(noop$1)},[d]);if(f.error&&shouldThrowError(d.options.throwOnError,[f.error]))throw f.error;return{...f,mutate:h,mutateAsync:f.mutate}}const PROFILE_TAG="profile";function useProfile(o){return useSuspenseQuery({queryKey:[PROFILE_TAG],queryFn:async()=>{const l=await window.CryptoSteamSDK.getProfile();return setUser({id:String(l.id)}),l},select:l=>({...l,inventory:l.inventory||[],balance_usdt:dividePriceResponse(l.balance_usdt),balances:{...l.balances,usdt:dividePriceResponse(l.balance_usdt)}}),...o})}const LevelInfoModal=({children:o})=>{const{t:l}=useTranslation(),[u,d]=reactExports.useState(!1),{data:{level_up_exp:f,experience:h,level:m,current_level_exp:g}}=useProfile(),[v]=useAnimateNumber(h);return jsxRuntimeExports.jsx(Drawer,{trigger:o,open:u,onOpenChange:d,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-16 h-18 flex items-center justify-center",children:jsxRuntimeExports.jsx(XpProgress,{experience:h-g,xpNeeded:f-g,level:m,size:64,className:"text-[var(--tgui--button_color)]"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:l("levelInfoModal.title")}),jsxRuntimeExports.jsxs(Caption,{level:"1",weight:"2",className:"text-center",children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--tgui--text_color)"},children:v.toLocaleString()}),jsxRuntimeExports.jsxs("span",{style:{color:"var(--tgui--subtitle_text_color)"},children:[" / ",f.toLocaleString()," XP"]})]})]})]}),jsxRuntimeExports.jsx("div",{className:"-mt-1.5 text-center",children:jsxRuntimeExports.jsx(Subheadline,{level:"2",weight:"3",children:l("levelInfoModal.description")})}),jsxRuntimeExports.jsx(Button,{size:"s",stretched:!0,onClick:()=>d(!1),mode:"filled",style:{height:42},children:l("levelInfoModal.action")})]})})};function AnimatedBalance({value:o,style:l,className:u,colorText:d="",noRounding:f}){const[h,m]=useAnimateNumber(0,!1,f),[g,v]=reactExports.useState(d),x=reactExports.useRef(0),b=reactExports.useRef();reactExports.useEffect(()=>{const E=o,w=x.current;return b.current&&clearTimeout(b.current),w!==0&&(E>w?v("#22C55E"):E<w&&v("#FF7700")),m(E),b.current=setTimeout(()=>{v(d)},300),x.current=E,()=>{b.current&&clearTimeout(b.current)}},[o,m,d]);const S=f?Math.trunc((h??0)*100)/100:Math.round(h??0);return jsxRuntimeExports.jsx(Text,{weight:"1",className:cn$1("text-rounded",u),style:{color:g||"inherit",transition:"color 0.3s ease",...l},children:formatter.format(S)})}const Icons={thumbsDownOutlined:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m15.5 15.16-.61.53a.45.45 0 0 0-.15.24l-.92 4.36a3.1 3.1 0 0 1-4.37 2.24 3.24 3.24 0 0 1-1.8-2.93v-2.18c-1.82-.01-3.42-.47-4.57-1.6-1.17-1.14-1.7-2.8-1.7-4.88V9.77c0-2.07.53-3.74 1.7-4.87 1.16-1.12 2.78-1.57 4.6-1.57h7.87c.41-.53 1-.91 1.68-1.04.24-.04.5-.04.8-.04h.14A2.79 2.79 0 0 1 21.2 4.6c.04.24.04.52.04.83v7.72c0 .32 0 .6-.04.84a2.79 2.79 0 0 1-2.22 2.3c-.24.04-.5.04-.8.04h-.14c-.3 0-.57 0-.8-.04a2.73 2.73 0 0 1-1.75-1.13Zm-3.52 4.71a1.23 1.23 0 0 1-1.73.89 1.29 1.29 0 0 1-.72-1.16v-3.16a.96.96 0 0 0-.94-.97h-.9c-1.56 0-2.63-.4-3.32-1.06-.67-.66-1.12-1.74-1.12-3.47V9.77c0-1.73.45-2.8 1.12-3.44.68-.66 1.75-1.05 3.32-1.05h7.28V13.1a.96.96 0 0 0-.08.06l-1.21 1.04c-.4.34-.67.8-.78 1.33l-.92 4.35Zm6.67-5.5-.54.01-.55-.01a.87.87 0 0 1-.7-.72V4.93a.87.87 0 0 1 .7-.72l.55-.01.54.01c.36.07.64.36.7.72l.01.57v7.58l-.01.57a.87.87 0 0 1-.7.72Z",clipRule:"evenodd"})}),thumbsUpOutlined:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m8.2 8.97.6-.63c.05-.05.1-.12.11-.2l1.02-4.56a3.03 3.03 0 0 1 3.55-2.36 3.11 3.11 0 0 1 2.43 3.07v2.4h.1c1.94 0 3.55.43 4.66 1.57 1.1 1.15 1.52 2.81 1.52 4.82v1.09c0 2.08-.58 3.73-1.74 4.84A6.2 6.2 0 0 1 16 20.56h-7.9c-.33.48-.81.84-1.38 1-.33.08-.69.08-1.08.08h-.19c-.39 0-.75 0-1.08-.09a2.56 2.56 0 0 1-1.77-1.84 4.54 4.54 0 0 1-.09-1.11v-7.78c0-.4 0-.78.09-1.12.23-.9.9-1.6 1.77-1.84.33-.09.7-.09 1.08-.09h.19c.39 0 .75 0 1.08.1.61.16 1.13.56 1.46 1.1Zm3.57-4.95c.14-.62.73-1.02 1.34-.9.53.12.92.6.92 1.17v3.38c0 .54.42.97.94.97H16c1.73 0 2.73.39 3.33 1 .6.62.96 1.66.96 3.44v1.09c0 1.7-.46 2.77-1.13 3.41-.69.66-1.73 1.03-3.16 1.03L8.6 18.6v-7.28l1.54-1.6c.3-.31.52-.7.61-1.14l1.03-4.56Zm-5.06 6.9v7.58c0 .57-.01.66-.03.71a.64.64 0 0 1-.44.46c-.05.01-.14.02-.68.02-.55 0-.64 0-.69-.02a.64.64 0 0 1-.44-.46 4.12 4.12 0 0 1-.02-.71v-7.58c0-.57 0-.66.02-.71.05-.23.22-.4.44-.46.05-.02.14-.03.69-.03.54 0 .63.01.68.03.22.06.39.23.44.46.02.05.02.15.03.71Z",clipRule:"evenodd"})}),thumbsDownFilled:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"m21.32 13.75.01-.58V5l-.01-.59a2 2 0 0 0-1.74-1.73L19 2.67l-.59.01a2 2 0 0 0-1.73 1.73l-.01.59v8.17l.01.58a2 2 0 0 0 1.73 1.73c.13.02.28.02.59.02.3 0 .46 0 .58-.02a2 2 0 0 0 1.74-1.73ZM7.5 3.83c-3.79 0-6 1.79-6 5.89v1.26c0 4.1 2.21 5.69 6 5.69h1v3.65a2.18 2.18 0 0 0 4.26.63l1.73-5.52c.05-.17.08-.34.08-.5V5.7c0-.65 0-.98-.13-1.23-.11-.22-.3-.4-.51-.51-.25-.13-.58-.13-1.23-.13H7.5Z"})}),thumbsUpFilled:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"m2.68 10.24-.01.59v8.16l.01.59a2 2 0 0 0 1.73 1.73c.13.02.29.02.59.02s.46 0 .59-.02a2 2 0 0 0 1.73-1.73l.01-.59v-8.16l-.01-.59a2 2 0 0 0-1.73-1.73C5.46 8.5 5.3 8.5 5 8.5s-.46 0-.59.02a2 2 0 0 0-1.73 1.73ZM16.5 20.16c3.79 0 6-1.78 6-5.88v-1.26c0-4.1-2.21-5.7-6-5.7h-1V3.69a2.18 2.18 0 0 0-4.26-.63L9.51 8.57c-.05.16-.08.33-.08.5v9.22c0 .66 0 .98.13 1.23.11.22.29.4.51.51.25.13.58.13 1.23.13h5.2Z"})}),star:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M11.17 2.49a.87.87 0 0 1 1.66 0L13.9 5.7c.16.5.74.74 1.21.5l3.03-1.51a.87.87 0 0 1 1.17 1.17L17.8 8.9a.87.87 0 0 0 .5 1.21l3.21 1.07c.8.27.8 1.4 0 1.66L18.3 13.9a.87.87 0 0 0-.5 1.21l1.51 3.03a.87.87 0 0 1-1.17 1.17L15.1 17.8a.87.87 0 0 0-1.21.5l-1.07 3.21c-.27.8-1.4.8-1.66 0L10.1 18.3a.87.87 0 0 0-1.21-.5L5.86 19.3a.87.87 0 0 1-1.17-1.17L6.2 15.1a.87.87 0 0 0-.5-1.21l-3.21-1.07a.87.87 0 0 1 0-1.66L5.7 10.1c.5-.16.74-.74.5-1.21L4.7 5.86A.87.87 0 0 1 5.86 4.7L8.9 6.2a.87.87 0 0 0 1.21-.5l1.07-3.21Z"})}),smile:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.987 14c0-4.953 4.024-8.991 9.015-8.991S23.017 9.047 23.017 14s-4.024 8.991-9.015 8.991S4.987 18.953 4.987 14m9.015-11c-6.063 0-11 4.912-11 11s4.937 11 11 11 11-4.912 11-11-4.937-11-11-11m4.438 13.835a1.01 1.01 0 0 0-.604-1.283.99.99 0 0 0-1.27.616 1 1 0 0 1-.069.132 2.1 2.1 0 0 1-.372.466c-.348.331-.983.728-2.123.728s-1.775-.397-2.123-.727a2.1 2.1 0 0 1-.372-.467 1 1 0 0 1-.07-.132l-.005-.013-.003-.007a.99.99 0 0 0-1.261-.596c-.517.186-.787.76-.604 1.283l.89-.32-.89.32v.002l.002.003.002.006.005.013a2 2 0 0 0 .059.142c.038.084.092.194.166.321.148.254.38.582.722.908.704.67 1.82 1.272 3.482 1.272s2.778-.602 3.482-1.272a4.2 4.2 0 0 0 .722-.908 3.5 3.5 0 0 0 .225-.463l.005-.014.002-.005.001-.003v-.001l-.886-.32zM11.007 12.8c.688 0 1.247-.66 1.247-1.476s-.559-1.477-1.247-1.477c-.69 0-1.247.661-1.247 1.477 0 .815.558 1.476 1.247 1.476m5.986 0c.688 0 1.247-.66 1.247-1.476s-.559-1.477-1.247-1.477c-.69 0-1.247.661-1.247 1.477 0 .815.558 1.476 1.246 1.476Z",clipRule:"evenodd"})}),discountOutline:o=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.04 2.57a2.81 2.81 0 0 0-4.05 0l-.65.68a1.1 1.1 0 0 1-.9.33l-.94-.1a2.81 2.81 0 0 0-3.1 2.6L4.35 7c-.02.34-.2.65-.48.84l-.78.52a2.81 2.81 0 0 0-.7 3.98l.55.76c.2.28.26.63.17.95l-.26.9a2.81 2.81 0 0 0 2.02 3.5l.91.23c.33.08.6.31.74.62l.38.86a2.81 2.81 0 0 0 3.8 1.38l.84-.41c.3-.15.66-.15.97 0l.84.41c1.43.7 3.15.07 3.8-1.38l.38-.86c.14-.3.41-.54.74-.62l.9-.23a2.81 2.81 0 0 0 2.03-3.5l-.26-.9a1.1 1.1 0 0 1 .17-.95l.55-.76c.93-1.28.62-3.09-.7-3.98l-.78-.52a1.1 1.1 0 0 1-.48-.84l-.07-.93a2.81 2.81 0 0 0-3.1-2.6l-.93.1a1.1 1.1 0 0 1-.9-.33l-.65-.68Zm-2.81 1.2a1.1 1.1 0 0 1 1.57 0l.66.67c.6.62 1.45.93 2.31.84l.93-.1a1.1 1.1 0 0 1 1.21 1.02l.07.93c.06.87.51 1.65 1.23 2.14l.78.52c.51.35.64 1.05.27 1.56l-.55.76c-.5.7-.66 1.6-.43 2.42l.26.9a1.1 1.1 0 0 1-.79 1.37l-.9.23c-.85.2-1.54.8-1.9 1.58l-.38.86a1.1 1.1 0 0 1-1.48.54l-.84-.41a2.81 2.81 0 0 0-2.47 0l-.84.4a1.1 1.1 0 0 1-1.48-.53l-.38-.86a2.81 2.81 0 0 0-1.9-1.58l-.9-.23a1.1 1.1 0 0 1-.8-1.37l.27-.9c.24-.83.08-1.72-.43-2.42l-.55-.76a1.1 1.1 0 0 1 .27-1.56l.78-.52a2.81 2.81 0 0 0 1.23-2.14l.07-.93a1.1 1.1 0 0 1 1.2-1.02l.94.1c.86.1 1.71-.22 2.31-.84l.66-.68Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 6c.36 0 .64.29.64.64v.68c1.66.17 2.8.98 3.17 1.86a.64.64 0 1 1-1.19.5c-.12-.3-.73-.9-1.98-1.07v2.82c1.22.19 2.02.53 2.52 1 .62.59.7 1.26.7 1.71 0 .84-.54 1.5-1.22 1.91-.55.34-1.24.55-2 .63v.68a.64.64 0 0 1-1.28 0v-.68c-1.66-.17-2.8-.98-3.17-1.86a.64.64 0 0 1 1.19-.5c.12.3.73.9 1.98 1.07v-2.82a4.62 4.62 0 0 1-2.52-1 2.21 2.21 0 0 1-.7-1.71c0-.84.54-1.5 1.23-1.91a4.78 4.78 0 0 1 1.99-.63v-.68c0-.35.29-.64.64-.64Zm-.64 2.61c-.54.07-1 .23-1.33.43-.45.28-.6.59-.6.82 0 .3.04.54.29.77.23.2.7.47 1.64.63V8.61Zm1.28 4.13v2.65c.54-.07 1-.23 1.33-.43.45-.28.6-.59.6-.82 0-.3-.04-.54-.29-.77-.22-.2-.7-.47-1.64-.63Z",clipRule:"evenodd"})]}),cup:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.6 1.71H9.4c-.57 0-1.05 0-1.45.04a3 3 0 0 0-1.2.33c-.57.3-1.06.85-1.32 1.44a3.57 3.57 0 0 0-.21 1.67c-.54-.1-1.1-.04-1.59.12A2.76 2.76 0 0 0 1.71 8c0 1.34.8 2.57 1.85 3.41a6.47 6.47 0 0 0 3.21 1.4c.15.35.3.67.47.98a6.82 6.82 0 0 0 2.39 2.7c-.03.47-.1.8-.18 1.02-.1.28-.21.44-.34.59l-.15.16-.1.1a2.28 2.28 0 0 0-.71 1.74v1.33c0 .47.38.86.85.86h6c.47 0 .86-.39.86-.86V20.1a2.28 2.28 0 0 0-.72-1.74l-.1-.1-.15-.16c-.13-.15-.25-.31-.34-.59a3.9 3.9 0 0 1-.18-1.02 6.82 6.82 0 0 0 2.39-2.7c.16-.3.32-.63.47-.98a6.47 6.47 0 0 0 3.21-1.4A4.57 4.57 0 0 0 22.3 8c0-1.42-.9-2.34-1.92-2.69a3.22 3.22 0 0 0-1.59-.12c.04-.62.01-1.16-.21-1.67a3.11 3.11 0 0 0-1.32-1.44 3 3 0 0 0-1.2-.33c-.4-.04-.88-.04-1.44-.04ZM12.7 17.1a4.72 4.72 0 0 1-1.4 0c-.05.37-.13.7-.22.97-.19.55-.45.9-.7 1.18l-.23.25-.06.06c-.08.08-.12.13-.15.18-.03.05-.08.13-.08.37v.47h4.28v-.47c0-.24-.05-.32-.08-.37a1.42 1.42 0 0 0-.17-.2l-.04-.04-.24-.25a3.3 3.3 0 0 1-.69-1.18c-.1-.28-.17-.6-.21-.97Zm6.66-7c-.43.35-.94.63-1.48.81.33-1.15.56-2.43.73-3.8.21-.2.7-.34 1.2-.16.44.15.76.48.76 1.06 0 .66-.41 1.43-1.21 2.09Zm-13.24.81a25.2 25.2 0 0 1-.73-3.8c-.21-.2-.7-.34-1.2-.16-.44.15-.76.48-.76 1.06 0 .66.41 1.43 1.21 2.09.43.35.94.63 1.48.81Zm1.45-7.32c.1-.05.24-.1.53-.12.31-.03.72-.03 1.33-.03h5.14c.61 0 1.02 0 1.33.03.3.02.43.07.53.12.23.13.46.38.57.62.1.25.1.54 0 1.72-.25 2.94-.85 5.39-1.75 7.06-.9 1.68-2 2.45-3.25 2.45s-2.35-.77-3.25-2.45c-.9-1.67-1.5-4.12-1.75-7.06-.1-1.18-.1-1.47 0-1.72.1-.24.34-.5.57-.62Z",clipRule:"evenodd"})}),games:o=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.82 3.86h.36c1.38 0 2.46 0 3.33.06.9.07 1.65.22 2.34.54a6.37 6.37 0 0 1 2.74 2.43c.4.64.62 1.35.78 2.22.17.85.29 1.91.44 3.27l.46 4.06c.05.45 0 .9-.13 1.34a3.4 3.4 0 0 1-6.17.7l-1.39-2.33a.22.22 0 0 0-.19-.11H9.61a.22.22 0 0 0-.19.1l-1.4 2.35a3.4 3.4 0 0 1-6.16-.7 3.3 3.3 0 0 1-.13-1.35l.46-4.06c.15-1.36.27-2.42.44-3.27.16-.87.39-1.58.78-2.22a6.37 6.37 0 0 1 2.74-2.43 6.6 6.6 0 0 1 2.34-.54c.87-.06 1.95-.06 3.33-.06Zm-3.2 1.7c-.79.07-1.3.18-1.73.38a4.7 4.7 0 0 0-2.02 1.8c-.25.4-.43.9-.57 1.67a45.2 45.2 0 0 0-.43 3.18l-.45 4.02a1.7 1.7 0 0 0 3.14 1.06l1.39-2.35c.34-.57.97-.93 1.66-.93h4.78c.7 0 1.32.36 1.66.93l1.4 2.35a1.69 1.69 0 0 0 3.13-1.06l-.45-4.02c-.16-1.4-.27-2.4-.43-3.18a4.83 4.83 0 0 0-.57-1.68 4.69 4.69 0 0 0-2.02-1.79 4.9 4.9 0 0 0-1.73-.37c-.8-.07-1.82-.07-3.23-.07h-.3c-1.41 0-2.43 0-3.23.07Zm-.09 2.42c.47 0 .85.37.85.82v.55h.54c.47 0 .85.37.85.83 0 .45-.38.82-.85.82h-.54v.55c0 .45-.38.82-.85.82a.84.84 0 0 1-.85-.82V11h-.54a.84.84 0 0 1-.84-.82c0-.46.38-.83.84-.83h.54V8.8c0-.45.38-.82.85-.82Z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M16.62 8.3c0 .47-.4.86-.9.86-.49 0-.89-.39-.89-.87s.4-.86.9-.86.9.38.9.86ZM18.51 10.12c0 .48-.4.87-.9.87-.49 0-.9-.39-.9-.87s.41-.86.9-.86c.5 0 .9.38.9.86ZM14.74 10.12c0 .48-.4.87-.9.87s-.9-.39-.9-.87.4-.86.9-.86.9.38.9.86ZM16.62 11.95c0 .48-.4.87-.9.87-.49 0-.89-.39-.89-.87s.4-.87.9-.87.9.4.9.87Z"})]}),download:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M19.14 19c.53 0 .96.45.96 1s-.43 1-.96 1H4.86a.98.98 0 0 1-.96-1c0-.55.43-1 .96-1h14.28ZM12 2c.53 0 .95.45.95 1v10.34l4.57-4.8a.91.91 0 0 1 1.34 0c.38.4.38 1.03 0 1.42l-6.19 6.5a.91.91 0 0 1-1.34 0l-6.2-6.5a1.04 1.04 0 0 1 0-1.42.93.93 0 0 1 1.35 0l4.57 4.8V3c0-.55.42-1 .95-1Z"})}),checkThin:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M24.66 6.21c.4.38.4 1 .03 1.4l-13.3 13.78a.99.99 0 0 1-1.43 0L3.31 14.5a.99.99 0 1 1 1.43-1.37l5.93 6.15 12.6-13.05a1 1 0 0 1 1.4-.02Z",clipRule:"evenodd"})}),addCircle:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.06 18.58a8.65 8.65 0 0 1-8.57-8.57c0-1.18.22-2.28.67-3.32a8.73 8.73 0 0 1 7.9-5.26c1.17 0 2.28.23 3.31.67a8.76 8.76 0 0 1 4.6 4.6c.45 1.03.67 2.13.67 3.3 0 1.18-.22 2.28-.67 3.32a8.76 8.76 0 0 1-4.6 4.59 8.24 8.24 0 0 1-3.31.67Zm0-1.7a6.76 6.76 0 0 0 4.87-2 6.9 6.9 0 1 0-4.87 2ZM10 5.5a.75.75 0 0 0-.75.75v3h-3a.75.75 0 0 0 0 1.5h3v3a.75.75 0 0 0 1.5 0v-3h3a.75.75 0 0 0 0-1.5h-3v-3A.75.75 0 0 0 10 5.5Z",clipRule:"evenodd"})}),search:o=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:[jsxRuntimeExports.jsx("circle",{cx:"9",cy:"10",r:"6",stroke:"currentColor",strokeWidth:"2"}),jsxRuntimeExports.jsx("rect",{width:"8",height:"2",x:"13.88",y:"13.46",fill:"currentColor",rx:"1",transform:"rotate(45 13.88 13.46)"})]}),chevronLeft:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 12",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M.72 6a.88.88 0 0 1 .25-.63L5.06.97a.66.66 0 0 1 .86-.13c.11.07.2.17.27.29a.84.84 0 0 1-.13.97L2.42 6l3.64 3.9c.15.17.22.36.22.58a.8.8 0 0 1-.36.68.66.66 0 0 1-.86-.12L.97 6.63c-.08-.1-.15-.2-.19-.3A.86.86 0 0 1 .72 6Z"})}),chevronRight:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 12",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M6.42 5.77c0 .12-.02.23-.07.33a.9.9 0 0 1-.21.3l-4.5 4.4a.77.77 0 0 1-.56.23.77.77 0 0 1-.4-.1.76.76 0 0 1-.4-.68c0-.22.09-.41.25-.58l4.01-3.9-4-3.9A.79.79 0 0 1 1.07.5c.21 0 .4.07.55.22l4.5 4.41c.1.1.17.2.22.3.05.1.07.2.07.33Z"})}),close:o=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...o,children:jsxRuntimeExports.jsx("path",{fill:"currentColor","fill-opacity":".8",d:"M7.86 17.14a1 1 0 0 1-1-1.02c0-.27.1-.52.3-.7L10.54 12l-3.4-3.4a.98.98 0 0 1-.3-.71c0-.58.45-1 1.01-1 .28 0 .5.09.7.27l3.42 3.42 3.45-3.43a1 1 0 0 1 1.72.71c0 .29-.1.5-.31.73L13.43 12l3.4 3.4c.2.18.3.44.3.72 0 .57-.45 1.02-1.03 1.02a.97.97 0 0 1-.72-.3l-3.4-3.4-3.38 3.4c-.2.2-.46.3-.74.3Z",opacity:".5"})})};function Icon({name:o,size:l=24,className:u,title:d,"aria-label":f,...h}){const m=Icons[o],g=!!(d||f);return jsxRuntimeExports.jsx(m,{className:cn$1("aspect-square",u),width:l,height:l,role:"img","aria-hidden":!g,"aria-label":f,...h,children:d?jsxRuntimeExports.jsx("title",{children:d}):null})}const useForceRerender=()=>{const[,o]=reactExports.useState(0);return()=>o(l=>l+1)},useMiniApp=()=>{const o=useForceRerender();return reactExports.useEffect(()=>{var u;const l=["viewportChanged","themeChanged","safeAreaChanged","contentSafeAreaChanged","fullscreenChanged"];for(const d of l)(u=window.Telegram.WebApp)==null||u.onEvent(d,o);return window.screen.orientation.addEventListener("change",o),()=>{var d;window.screen.orientation.removeEventListener("change",o);for(const f of l)(d=window.Telegram.WebApp)==null||d.offEvent(f,o)}},[o]),{miniApp:window.Telegram.WebApp}};function useThrottle(o,l=500){const[u,d]=React.useState(o),f=React.useRef(null);return React.useEffect(()=>{const h=Date.now();if(f.current&&h>=f.current+l)f.current=h,d(o);else{const m=window.setTimeout(()=>{f.current=h,d(o)},l);return()=>window.clearTimeout(m)}},[o,l]),u}const createStoreImpl=o=>{let l;const u=new Set,d=(x,b)=>{const S=typeof x=="function"?x(l):x;if(!Object.is(S,l)){const E=l;l=b??(typeof S!="object"||S===null)?S:Object.assign({},l,S),u.forEach(w=>w(l,E))}},f=()=>l,g={setState:d,getState:f,getInitialState:()=>v,subscribe:x=>(u.add(x),()=>u.delete(x))},v=l=o(d,f,g);return g},createStore=o=>o?createStoreImpl(o):createStoreImpl,identity=o=>o;function useStore(o,l=identity){const u=React.useSyncExternalStore(o.subscribe,()=>l(o.getState()),()=>l(o.getInitialState()));return React.useDebugValue(u),u}const createImpl=o=>{const l=createStore(o),u=d=>useStore(l,d);return Object.assign(u,l),u},create=o=>o?createImpl(o):createImpl,useInventoryModalStore=create(o=>({isOpen:!1,setIsOpen:l=>o({isOpen:l})})),useTopUpModalStore=create(o=>({isOpen:!1,setIsOpen:l=>o({isOpen:l})})),IconTelegramStar=o=>jsxRuntimeExports.jsxs("svg",{width:"15",height:"16",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[jsxRuntimeExports.jsx("title",{children:"Telegram star"}),jsxRuntimeExports.jsx("path",{d:"M5.04458 4.95162L6.76524 1.50401C6.96358 1.10625 7.44349 0.946501 7.83713 1.14722C7.99146 1.22591 8.11654 1.35336 8.19305 1.51008L9.81812 4.835C9.95078 5.10661 10.2102 5.29194 10.5079 5.32792L13.9104 5.73869C14.3723 5.79439 14.7022 6.21816 14.6469 6.68507C14.6242 6.87734 14.5373 7.05617 14.4007 7.19164L11.7111 9.85999C11.6025 9.96772 11.5501 10.1203 11.5689 10.2729L12.0159 13.8751C12.0798 14.3908 11.718 14.8614 11.208 14.9259C11.0147 14.9504 10.8185 14.9132 10.6472 14.8191L7.80591 13.2571C7.60021 13.1442 7.35288 13.1409 7.14436 13.2484L4.20051 14.7679C3.78627 14.9819 3.27883 14.8156 3.06727 14.3968C2.98815 14.2401 2.95889 14.0626 2.9836 13.8883L3.219 12.2357C3.33411 11.4274 3.83114 10.7262 4.55123 10.3562L7.82109 8.67603C7.90844 8.63116 7.94313 8.52343 7.89869 8.43521C7.86444 8.36671 7.79074 8.32813 7.71574 8.33897L3.71669 8.91512C3.10542 9.00334 2.48548 8.82972 2.00622 8.43608L0.67443 7.34251C0.294229 7.03037 0.236353 6.46592 0.54524 6.08182C0.688736 5.90321 0.894877 5.78724 1.12074 5.75798L4.5354 5.31578C4.75433 5.28739 4.9453 5.15104 5.04458 4.95162Z",fill:"url(#paint0_linear_13203_44637)"}),jsxRuntimeExports.jsx("path",{d:"M8.14979 9.42368C8.22479 9.41285 8.29849 9.45143 8.33273 9.51993C8.37717 9.60815 8.34249 9.71588 8.25513 9.76075L4.98527 11.4409C4.26519 11.8109 3.76815 12.5121 3.65305 13.3204L3.44604 14.7745C3.28846 14.6964 3.15363 14.5679 3.06779 14.3977C2.98867 14.241 2.95941 14.0635 2.98412 13.8892L3.21952 12.2366C3.33463 11.4283 3.83166 10.7271 4.55175 10.3571L5.67393 9.78026L8.14979 9.42368Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M7.83713 1.14722C7.99146 1.22591 8.11654 1.35336 8.19305 1.51008L9.81812 4.835C9.95078 5.10661 10.2102 5.29194 10.5079 5.32792L13.9104 5.73869C14.3723 5.79439 14.7022 6.21816 14.6469 6.68507C14.6385 6.75704 14.6209 6.82705 14.5954 6.89381C14.5175 6.85783 14.4332 6.83334 14.3439 6.8225L10.9414 6.41173C10.6438 6.37575 10.3843 6.19042 10.2516 5.91881L8.62658 2.5939C8.55006 2.43718 8.42499 2.30972 8.27065 2.23103C7.87701 2.03031 7.3971 2.19007 7.19876 2.58783L5.4781 6.03543C5.37883 6.23485 5.18786 6.3712 4.96893 6.39959L1.55427 6.84179C1.3284 6.87105 1.12226 6.98702 0.978764 7.16563C0.905716 7.25646 0.853259 7.35747 0.820528 7.4626L0.67443 7.34251C0.294229 7.03037 0.236353 6.46592 0.54524 6.08182C0.688736 5.90321 0.894877 5.78724 1.12074 5.75798L4.5354 5.31578C4.75433 5.28739 4.9453 5.15104 5.04458 4.95162L6.76524 1.50401C6.96358 1.10625 7.44349 0.946501 7.83713 1.14722Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M6.45499 1.35048C6.73938 0.780608 7.42912 0.551056 7.99466 0.83935C8.2164 0.952283 8.39523 1.1348 8.50491 1.35893L10.1298 4.68385C10.2111 4.85011 10.3691 4.96304 10.5496 4.98493L13.9522 5.39548C14.6048 5.47438 15.0691 6.07091 14.9915 6.72705C14.9597 6.99692 14.8376 7.24815 14.6451 7.43912L11.9556 10.1072C11.9235 10.1393 11.9074 10.1853 11.9133 10.2315L12.3603 13.8336C12.4476 14.5383 11.9523 15.1825 11.2517 15.2714C10.9855 15.305 10.7159 15.2536 10.4805 15.1242L7.63895 13.5624C7.53468 13.505 7.4094 13.5033 7.30362 13.5579L4.35977 15.0774C3.77364 15.3798 3.05616 15.1448 2.75789 14.5546C2.64669 14.3343 2.60572 14.0851 2.64041 13.8408L2.87581 12.1879C3.00673 11.2687 3.57248 10.4705 4.39293 10.0489L6.7719 8.8264L3.76649 9.2597C3.0839 9.35811 2.392 9.17452 1.8464 8.75313L1.78636 8.70544L0.454356 7.61166C-0.0728106 7.179 -0.152796 6.39801 0.275093 5.86564C0.474515 5.61744 0.761508 5.45596 1.07625 5.41521L4.49091 4.97301C4.59517 4.95957 4.68643 4.89433 4.73455 4.79808L6.45499 1.35048ZM7.6797 1.45734C7.45838 1.34441 7.1883 1.43436 7.07558 1.66023L5.35514 5.10784C5.20427 5.41022 4.91403 5.61766 4.58 5.6608L1.16534 6.10299C1.02856 6.12077 0.903271 6.19122 0.815699 6.30025C0.625815 6.5363 0.661581 6.88442 0.8946 7.07561L2.22661 8.16939C2.63065 8.50104 3.15262 8.64735 3.66743 8.57322L7.66626 7.99685C7.88952 7.96477 8.10759 8.07922 8.20882 8.28059C8.33844 8.53832 8.23678 8.85371 7.9797 8.98593L4.71005 10.6658C4.09011 10.9843 3.66179 11.5886 3.56251 12.2859L3.32711 13.9385C3.31237 14.0424 3.32993 14.1483 3.37696 14.2418C3.50182 14.4889 3.799 14.5862 4.04156 14.4609L6.98563 12.9416C7.29646 12.781 7.66626 12.7858 7.9732 12.9544L10.8145 14.5162C10.9216 14.5752 11.0439 14.5983 11.1646 14.5832C11.4841 14.5426 11.7123 14.2459 11.6718 13.919L11.2248 10.3169C11.1928 10.0578 11.2821 9.79836 11.4672 9.61498L14.1566 6.94663C14.2374 6.86643 14.2892 6.76022 14.3027 6.64555C14.3356 6.36766 14.1403 6.11708 13.8691 6.08413L10.4664 5.67359C10.0517 5.62351 9.69082 5.36557 9.50657 4.9884L7.88172 1.66348C7.83794 1.57417 7.76705 1.50178 7.6797 1.45734Z",fill:"url(#paint1_linear_13203_44637)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear_13203_44637",x1:"5.54898",y1:"4.31195",x2:"11.4016",y2:"14.7166",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFCE00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFAD00"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear_13203_44637",x1:"7.50002",y1:"1.06175",x2:"7.50002",y2:"14.7178",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#F28B00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FA7400"})]})]})]}),coinImage=assetUrl("cs-coin.webp"),IconBalanceCoins=({style:o,...l})=>jsxRuntimeExports.jsx("img",{src:coinImage,style:{aspectRatio:"1/1",...o},...l,alt:""}),image=assetUrl("icon_usdt.webp"),IconUsdt=({style:o,...l})=>jsxRuntimeExports.jsx("img",{src:image,style:{aspectRatio:"1/1",height:32,...o},...l,alt:""});reactExports.memo(()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"h-[var(--tabbar-current-height)] shrink-0"}),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]}));function BottomSentinelSafeArea(){return jsxRuntimeExports.jsx("div",{className:"h-[var(--tg-safe-area-inset-bottom)] shrink-0"})}const boxRegularIcon=assetUrl("boxes/rewards/box_regular.webp"),SnackbarContext=reactExports.createContext({showSnackbar:()=>{}}),useSnackbar=()=>reactExports.useContext(SnackbarContext),CustomSnackbar=({id:o,before:l,after:u,className:d,children:f})=>jsxRuntimeExports.jsx("div",{id:o,className:d,children:jsxRuntimeExports.jsxs("div",{children:[l&&jsxRuntimeExports.jsx("div",{className:"before",children:l}),jsxRuntimeExports.jsx("div",{className:"content",children:f}),u&&jsxRuntimeExports.jsx("div",{className:"after",children:u})]})}),SnackbarProvider=({children:o})=>{const[l,u]=reactExports.useState([]),[d,f]=reactExports.useState([]),h=React.useRef(0),m=React.useRef(new Map),g=reactExports.useCallback(E=>{u(w=>w.map(T=>T.id===E?{...T,animationState:"exit"}:T)),m.current.set(E,setTimeout(()=>{u(w=>w.filter(T=>T.id!==E)),m.current.delete(E)},300))},[]),v=reactExports.useCallback(E=>{f(w=>w.map(T=>T.id===E?{...T,animationState:"exit"}:T)),m.current.set(E,setTimeout(()=>{f(w=>w.filter(T=>T.id!==E)),m.current.delete(E)},300))},[]),x=reactExports.useCallback((E,w={})=>{const T=++h.current,C={id:T,message:E,before:w.before||b(w.type),after:w.after||null,coins:w.coins||null,gems:w.gems||null,usdt:w.usdt||null,isSpentCoins:w.isSpentCoins||!1,boxes:w.boxes||null,type:w.type||null,animationState:"enter"};w.type==="warning"||w.type==="error"?(f(A=>[...A,C]),m.current.set(T,setTimeout(()=>v(T),3e3))):(u(A=>[...A,C]),m.current.set(T,setTimeout(()=>g(T),3e3)))},[v,g]);React.useEffect(()=>{const E=m.current;return()=>{E.forEach(w=>clearTimeout(w)),E.clear()}},[]);const b=E=>{switch(E){case"success":return jsxRuntimeExports.jsx(Icon,{name:"checkThin",size:28,className:"text-button-foreground"});case"success_top":return jsxRuntimeExports.jsx(Icon,{name:"checkThin",size:28,className:"text-button-foreground"});case"warning":return null;case"error":return null;default:return null}},S=E=>jsxRuntimeExports.jsx(CustomSnackbar,{id:"snackbar",onClose:()=>E.type==="warning"||E.type==="error"?v(E.id):g(E.id),before:E.before,after:E.after,className:`ui-snackbar ${E.type?`ui-snackbar--${E.type}`:""} ${E.animationState||""}`,children:jsxRuntimeExports.jsxs(Text,{style:{fontSize:13,lineHeight:"16px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:4},children:[jsxRuntimeExports.jsx("span",{children:E.message}),jsxRuntimeExports.jsxs("div",{className:"grid grid-flow-col auto-cols-max gap-2 items-center",children:[!!E.coins&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[E.isSpentCoins?"-":"+",E.coins]}),jsxRuntimeExports.jsx(IconBalanceCoins,{style:{height:14,marginBottom:-2}})]}),!!E.gems&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[E.isSpentCoins?"-":"+",E.gems]}),jsxRuntimeExports.jsx(IconBalanceGems,{style:{height:14,marginBottom:-2}})]}),!!E.usdt&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:[E.isSpentCoins?"-":"+",E.usdt]}),jsxRuntimeExports.jsx(IconUsdt,{style:{height:14,marginBottom:-2}})]}),!!E.boxes&&jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:2},children:[jsxRuntimeExports.jsxs(Text,{weight:"1",style:{fontSize:17,lineHeight:"22px"},children:["+",E.boxes]}),jsxRuntimeExports.jsx("img",{src:boxRegularIcon,alt:"Box",style:{height:14,width:14,transform:"translateY(10%)"}})]})]})]})},E.id);return jsxRuntimeExports.jsxs(SnackbarContext.Provider,{value:{showSnackbar:x},children:[o,l.map(S),d.map(S),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]})};var lottie$2={exports:{}},lottie$1=lottie$2.exports,hasRequiredLottie;function requireLottie(){return hasRequiredLottie||(hasRequiredLottie=1,function(module,exports){typeof document<"u"&&typeof navigator<"u"&&function(o,l){module.exports=l()}(lottie$1,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(l){_useWebWorker=!!l},getWebWorker=function(){return _useWebWorker},setLocationHref=function(l){locationHref=l},getLocationHref=function(){return locationHref};function createTag(o){return document.createElement(o)}function extendPrototype(o,l){var u,d=o.length,f;for(u=0;u<d;u+=1){f=o[u].prototype;for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(l.prototype[h]=f[h])}}function getDescriptor(o,l){return Object.getOwnPropertyDescriptor(o,l)}function createProxyFunction(o){function l(){}return l.prototype=o,l}var audioControllerFactory=function(){function o(l){this.audios=[],this.audioFactory=l,this._volume=1,this._isMuted=!1}return o.prototype={addAudio:function(u){this.audios.push(u)},pause:function(){var u,d=this.audios.length;for(u=0;u<d;u+=1)this.audios[u].pause()},resume:function(){var u,d=this.audios.length;for(u=0;u<d;u+=1)this.audios[u].resume()},setRate:function(u){var d,f=this.audios.length;for(d=0;d<f;d+=1)this.audios[d].setRate(u)},createAudio:function(u){return this.audioFactory?this.audioFactory(u):window.Howl?new window.Howl({src:[u]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(u){this.audioFactory=u},setVolume:function(u){this._volume=u,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var u,d=this.audios.length;for(u=0;u<d;u+=1)this.audios[u].volume(this._volume*(this._isMuted?0:1))}},function(){return new o}}(),createTypedArray=function(){function o(u,d){var f=0,h=[],m;switch(u){case"int16":case"uint8c":m=1;break;default:m=1.1;break}for(f=0;f<d;f+=1)h.push(m);return h}function l(u,d){return u==="float32"?new Float32Array(d):u==="int16"?new Int16Array(d):u==="uint8c"?new Uint8ClampedArray(d):o(u,d)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?l:o}();function createSizedArray(o){return Array.apply(null,{length:o})}function _typeof$6(o){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_typeof$6(o)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var o=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],l,u=o.length;for(l=0;l<u;l+=1)BMMath[o[l]]=Math[o[l]]})(),BMMath.random=Math.random,BMMath.abs=function(o){var l=_typeof$6(o);if(l==="object"&&o.length){var u=createSizedArray(o.length),d,f=o.length;for(d=0;d<f;d+=1)u[d]=Math.abs(o[d]);return u}return Math.abs(o)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(o){o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.display="block",o.style.transformOrigin="0 0",o.style.webkitTransformOrigin="0 0",o.style.backfaceVisibility="visible",o.style.webkitBackfaceVisibility="visible",o.style.transformStyle="preserve-3d",o.style.webkitTransformStyle="preserve-3d",o.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(o,l,u,d){this.type=o,this.currentTime=l,this.totalTime=u,this.direction=d<0?-1:1}function BMCompleteEvent(o,l){this.type=o,this.direction=l<0?-1:1}function BMCompleteLoopEvent(o,l,u,d){this.type=o,this.currentLoop=u,this.totalLoops=l,this.direction=d<0?-1:1}function BMSegmentStartEvent(o,l,u){this.type=o,this.firstFrame=l,this.totalFrames=u}function BMDestroyEvent(o,l){this.type=o,this.target=l}function BMRenderFrameErrorEvent(o,l){this.type="renderFrameError",this.nativeError=o,this.currentTime=l}function BMConfigErrorEvent(o){this.type="configError",this.nativeError=o}var createElementID=function(){var o=0;return function(){return o+=1,idPrefix$1+"__lottie_element_"+o}}();function HSVtoRGB(o,l,u){var d,f,h,m,g,v,x,b;switch(m=Math.floor(o*6),g=o*6-m,v=u*(1-l),x=u*(1-g*l),b=u*(1-(1-g)*l),m%6){case 0:d=u,f=b,h=v;break;case 1:d=x,f=u,h=v;break;case 2:d=v,f=u,h=b;break;case 3:d=v,f=x,h=u;break;case 4:d=b,f=v,h=u;break;case 5:d=u,f=v,h=x;break}return[d,f,h]}function RGBtoHSV(o,l,u){var d=Math.max(o,l,u),f=Math.min(o,l,u),h=d-f,m,g=d===0?0:h/d,v=d/255;switch(d){case f:m=0;break;case o:m=l-u+h*(l<u?6:0),m/=6*h;break;case l:m=u-o+h*2,m/=6*h;break;case u:m=o-l+h*4,m/=6*h;break}return[m,g,v]}function addSaturationToRGB(o,l){var u=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);return u[1]+=l,u[1]>1?u[1]=1:u[1]<=0&&(u[1]=0),HSVtoRGB(u[0],u[1],u[2])}function addBrightnessToRGB(o,l){var u=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);return u[2]+=l,u[2]>1?u[2]=1:u[2]<0&&(u[2]=0),HSVtoRGB(u[0],u[1],u[2])}function addHueToRGB(o,l){var u=RGBtoHSV(o[0]*255,o[1]*255,o[2]*255);return u[0]+=l/360,u[0]>1?u[0]-=1:u[0]<0&&(u[0]+=1),HSVtoRGB(u[0],u[1],u[2])}var rgbToHex=function(){var o=[],l,u;for(l=0;l<256;l+=1)u=l.toString(16),o[l]=u.length===1?"0"+u:u;return function(d,f,h){return d<0&&(d=0),f<0&&(f=0),h<0&&(h=0),"#"+o[d]+o[f]+o[h]}}(),setSubframeEnabled=function(l){subframeEnabled=!!l},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(l){expressionsPlugin=l},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(l){expressionsInterfaces=l},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(l){defaultCurveSegments=l},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(l){idPrefix$1=l};function createNS(o){return document.createElementNS(svgNS,o)}function _typeof$5(o){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_typeof$5(o)}var dataManager=function(){var o=1,l=[],u,d,f={onmessage:function(){},postMessage:function(w){u({data:w})}},h={postMessage:function(w){f.onmessage({data:w})}};function m(E){if(window.Worker&&window.Blob&&getWebWorker()){var w=new Blob(["var _workerSelf = self; self.onmessage = ",E.toString()],{type:"text/javascript"}),T=URL.createObjectURL(w);return new Worker(T)}return u=E,f}function g(){d||(d=m(function(w){function T(){function M(K,$){var G,L,B=K.length,q,U,Y,te;for(L=0;L<B;L+=1)if(G=K[L],"ks"in G&&!G.completed){if(G.completed=!0,G.hasMask){var ae=G.masksProperties;for(U=ae.length,q=0;q<U;q+=1)if(ae[q].pt.k.i)j(ae[q].pt.k);else for(te=ae[q].pt.k.length,Y=0;Y<te;Y+=1)ae[q].pt.k[Y].s&&j(ae[q].pt.k[Y].s[0]),ae[q].pt.k[Y].e&&j(ae[q].pt.k[Y].e[0])}G.ty===0?(G.layers=I(G.refId,$),M(G.layers,$)):G.ty===4?O(G.shapes):G.ty===5&&le(G)}}function A(K,$){if(K){var G=0,L=K.length;for(G=0;G<L;G+=1)K[G].t===1&&(K[G].data.layers=I(K[G].data.refId,$),M(K[G].data.layers,$))}}function k(K,$){for(var G=0,L=$.length;G<L;){if($[G].id===K)return $[G];G+=1}return null}function I(K,$){var G=k(K,$);return G?G.layers.__used?JSON.parse(JSON.stringify(G.layers)):(G.layers.__used=!0,G.layers):null}function O(K){var $,G=K.length,L,B;for($=G-1;$>=0;$-=1)if(K[$].ty==="sh")if(K[$].ks.k.i)j(K[$].ks.k);else for(B=K[$].ks.k.length,L=0;L<B;L+=1)K[$].ks.k[L].s&&j(K[$].ks.k[L].s[0]),K[$].ks.k[L].e&&j(K[$].ks.k[L].e[0]);else K[$].ty==="gr"&&O(K[$].it)}function j(K){var $,G=K.i.length;for($=0;$<G;$+=1)K.i[$][0]+=K.v[$][0],K.i[$][1]+=K.v[$][1],K.o[$][0]+=K.v[$][0],K.o[$][1]+=K.v[$][1]}function N(K,$){var G=$?$.split("."):[100,100,100];return K[0]>G[0]?!0:G[0]>K[0]?!1:K[1]>G[1]?!0:G[1]>K[1]?!1:K[2]>G[2]?!0:G[2]>K[2]?!1:null}var V=function(){var K=[4,4,14];function $(L){var B=L.t.d;L.t.d={k:[{s:B,t:0}]}}function G(L){var B,q=L.length;for(B=0;B<q;B+=1)L[B].ty===5&&$(L[B])}return function(L){if(N(K,L.v)&&(G(L.layers),L.assets)){var B,q=L.assets.length;for(B=0;B<q;B+=1)L.assets[B].layers&&G(L.assets[B].layers)}}}(),z=function(){var K=[4,7,99];return function($){if($.chars&&!N(K,$.v)){var G,L=$.chars.length;for(G=0;G<L;G+=1){var B=$.chars[G];B.data&&B.data.shapes&&(O(B.data.shapes),B.data.ip=0,B.data.op=99999,B.data.st=0,B.data.sr=1,B.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},$.chars[G].t||(B.data.shapes.push({ty:"no"}),B.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),W=function(){var K=[5,7,15];function $(L){var B=L.t.p;typeof B.a=="number"&&(B.a={a:0,k:B.a}),typeof B.p=="number"&&(B.p={a:0,k:B.p}),typeof B.r=="number"&&(B.r={a:0,k:B.r})}function G(L){var B,q=L.length;for(B=0;B<q;B+=1)L[B].ty===5&&$(L[B])}return function(L){if(N(K,L.v)&&(G(L.layers),L.assets)){var B,q=L.assets.length;for(B=0;B<q;B+=1)L.assets[B].layers&&G(L.assets[B].layers)}}}(),X=function(){var K=[4,1,9];function $(L){var B,q=L.length,U,Y;for(B=0;B<q;B+=1)if(L[B].ty==="gr")$(L[B].it);else if(L[B].ty==="fl"||L[B].ty==="st")if(L[B].c.k&&L[B].c.k[0].i)for(Y=L[B].c.k.length,U=0;U<Y;U+=1)L[B].c.k[U].s&&(L[B].c.k[U].s[0]/=255,L[B].c.k[U].s[1]/=255,L[B].c.k[U].s[2]/=255,L[B].c.k[U].s[3]/=255),L[B].c.k[U].e&&(L[B].c.k[U].e[0]/=255,L[B].c.k[U].e[1]/=255,L[B].c.k[U].e[2]/=255,L[B].c.k[U].e[3]/=255);else L[B].c.k[0]/=255,L[B].c.k[1]/=255,L[B].c.k[2]/=255,L[B].c.k[3]/=255}function G(L){var B,q=L.length;for(B=0;B<q;B+=1)L[B].ty===4&&$(L[B].shapes)}return function(L){if(N(K,L.v)&&(G(L.layers),L.assets)){var B,q=L.assets.length;for(B=0;B<q;B+=1)L.assets[B].layers&&G(L.assets[B].layers)}}}(),ie=function(){var K=[4,4,18];function $(L){var B,q=L.length,U,Y;for(B=q-1;B>=0;B-=1)if(L[B].ty==="sh")if(L[B].ks.k.i)L[B].ks.k.c=L[B].closed;else for(Y=L[B].ks.k.length,U=0;U<Y;U+=1)L[B].ks.k[U].s&&(L[B].ks.k[U].s[0].c=L[B].closed),L[B].ks.k[U].e&&(L[B].ks.k[U].e[0].c=L[B].closed);else L[B].ty==="gr"&&$(L[B].it)}function G(L){var B,q,U=L.length,Y,te,ae,ue;for(q=0;q<U;q+=1){if(B=L[q],B.hasMask){var ve=B.masksProperties;for(te=ve.length,Y=0;Y<te;Y+=1)if(ve[Y].pt.k.i)ve[Y].pt.k.c=ve[Y].cl;else for(ue=ve[Y].pt.k.length,ae=0;ae<ue;ae+=1)ve[Y].pt.k[ae].s&&(ve[Y].pt.k[ae].s[0].c=ve[Y].cl),ve[Y].pt.k[ae].e&&(ve[Y].pt.k[ae].e[0].c=ve[Y].cl)}B.ty===4&&$(B.shapes)}}return function(L){if(N(K,L.v)&&(G(L.layers),L.assets)){var B,q=L.assets.length;for(B=0;B<q;B+=1)L.assets[B].layers&&G(L.assets[B].layers)}}}();function oe(K){K.__complete||(X(K),V(K),z(K),W(K),ie(K),M(K.layers,K.assets),A(K.chars,K.assets),K.__complete=!0)}function le(K){K.t.a.length===0&&"m"in K.t.p}var Q={};return Q.completeData=oe,Q.checkColors=X,Q.checkChars=z,Q.checkPathProperties=W,Q.checkShapes=ie,Q.completeLayers=M,Q}if(h.dataManager||(h.dataManager=T()),h.assetLoader||(h.assetLoader=function(){function M(k){var I=k.getResponseHeader("content-type");return I&&k.responseType==="json"&&I.indexOf("json")!==-1||k.response&&_typeof$5(k.response)==="object"?k.response:k.response&&typeof k.response=="string"?JSON.parse(k.response):k.responseText?JSON.parse(k.responseText):null}function A(k,I,O,j){var N,V=new XMLHttpRequest;try{V.responseType="json"}catch{}V.onreadystatechange=function(){if(V.readyState===4)if(V.status===200)N=M(V),O(N);else try{N=M(V),O(N)}catch(z){j&&j(z)}};try{V.open(["G","E","T"].join(""),k,!0)}catch{V.open(["G","E","T"].join(""),I+"/"+k,!0)}V.send()}return{load:A}}()),w.data.type==="loadAnimation")h.assetLoader.load(w.data.path,w.data.fullPath,function(M){h.dataManager.completeData(M),h.postMessage({id:w.data.id,payload:M,status:"success"})},function(){h.postMessage({id:w.data.id,status:"error"})});else if(w.data.type==="complete"){var C=w.data.animation;h.dataManager.completeData(C),h.postMessage({id:w.data.id,payload:C,status:"success"})}else w.data.type==="loadData"&&h.assetLoader.load(w.data.path,w.data.fullPath,function(M){h.postMessage({id:w.data.id,payload:M,status:"success"})},function(){h.postMessage({id:w.data.id,status:"error"})})}),d.onmessage=function(E){var w=E.data,T=w.id,C=l[T];l[T]=null,w.status==="success"?C.onComplete(w.payload):C.onError&&C.onError()})}function v(E,w){o+=1;var T="processId_"+o;return l[T]={onComplete:E,onError:w},T}function x(E,w,T){g();var C=v(w,T);d.postMessage({type:"loadAnimation",path:E,fullPath:window.location.origin+window.location.pathname,id:C})}function b(E,w,T){g();var C=v(w,T);d.postMessage({type:"loadData",path:E,fullPath:window.location.origin+window.location.pathname,id:C})}function S(E,w,T){g();var C=v(w,T);d.postMessage({type:"complete",animation:E,id:C})}return{loadAnimation:x,loadData:b,completeAnimation:S}}(),ImagePreloader=function(){var o=function(){var A=createTag("canvas");A.width=1,A.height=1;var k=A.getContext("2d");return k.fillStyle="rgba(0,0,0,0)",k.fillRect(0,0,1,1),A}();function l(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function u(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function d(A,k,I){var O="";if(A.e)O=A.p;else if(k){var j=A.p;j.indexOf("images/")!==-1&&(j=j.split("/")[1]),O=k+j}else O=I,O+=A.u?A.u:"",O+=A.p;return O}function f(A){var k=0,I=setInterval((function(){var O=A.getBBox();(O.width||k>500)&&(this._imageLoaded(),clearInterval(I)),k+=1}).bind(this),50)}function h(A){var k=d(A,this.assetsPath,this.path),I=createNS("image");isSafari?this.testImageLoaded(I):I.addEventListener("load",this._imageLoaded,!1),I.addEventListener("error",(function(){O.img=o,this._imageLoaded()}).bind(this),!1),I.setAttributeNS("http://www.w3.org/1999/xlink","href",k),this._elementHelper.append?this._elementHelper.append(I):this._elementHelper.appendChild(I);var O={img:I,assetData:A};return O}function m(A){var k=d(A,this.assetsPath,this.path),I=createTag("img");I.crossOrigin="anonymous",I.addEventListener("load",this._imageLoaded,!1),I.addEventListener("error",(function(){O.img=o,this._imageLoaded()}).bind(this),!1),I.src=k;var O={img:I,assetData:A};return O}function g(A){var k={assetData:A},I=d(A,this.assetsPath,this.path);return dataManager.loadData(I,(function(O){k.img=O,this._footageLoaded()}).bind(this),(function(){k.img={},this._footageLoaded()}).bind(this)),k}function v(A,k){this.imagesLoadedCb=k;var I,O=A.length;for(I=0;I<O;I+=1)A[I].layers||(!A[I].t||A[I].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(A[I]))):A[I].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(A[I]))))}function x(A){this.path=A||""}function b(A){this.assetsPath=A||""}function S(A){for(var k=0,I=this.images.length;k<I;){if(this.images[k].assetData===A)return this.images[k].img;k+=1}return null}function E(){this.imagesLoadedCb=null,this.images.length=0}function w(){return this.totalImages===this.loadedAssets}function T(){return this.totalFootages===this.loadedFootagesCount}function C(A,k){A==="svg"?(this._elementHelper=k,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function M(){this._imageLoaded=l.bind(this),this._footageLoaded=u.bind(this),this.testImageLoaded=f.bind(this),this.createFootageData=g.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return M.prototype={loadAssets:v,setAssetsPath:b,setPath:x,loadedImages:w,loadedFootages:T,destroy:E,getAsset:S,createImgData:m,createImageData:h,imageLoaded:l,footageLoaded:u,setCacheType:C},M}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(l,u){if(this._cbs[l])for(var d=this._cbs[l],f=0;f<d.length;f+=1)d[f](u)},addEventListener:function(l,u){return this._cbs[l]||(this._cbs[l]=[]),this._cbs[l].push(u),(function(){this.removeEventListener(l,u)}).bind(this)},removeEventListener:function(l,u){if(!u)this._cbs[l]=null;else if(this._cbs[l]){for(var d=0,f=this._cbs[l].length;d<f;)this._cbs[l][d]===u&&(this._cbs[l].splice(d,1),d-=1,f-=1),d+=1;this._cbs[l].length||(this._cbs[l]=null)}}};var markerParser=function(){function o(l){for(var u=l.split(`\r
114
114
  `),d={},f,h=0,m=0;m<u.length;m+=1)f=u[m].split(":"),f.length===2&&(d[f[0]]=f[1].trim(),h+=1);if(h===0)throw new Error;return d}return function(l){for(var u=[],d=0;d<l.length;d+=1){var f=l[d],h={time:f.tm,duration:f.dr};try{h.payload=JSON.parse(l[d].cm)}catch{try{h.payload=o(l[d].cm)}catch{h.payload={name:l[d].cm}}}u.push(h)}return u}}(),ProjectInterface=function(){function o(l){this.compositions.push(l)}return function(){function l(u){for(var d=0,f=this.compositions.length;d<f;){if(this.compositions[d].data&&this.compositions[d].data.nm===u)return this.compositions[d].prepareFrame&&this.compositions[d].data.xt&&this.compositions[d].prepareFrame(this.currentFrame),this.compositions[d].compInterface;d+=1}return null}return l.compositions=[],l.currentFrame=0,l.registerComposition=o,l}}(),renderers={},registerRenderer=function(l,u){renderers[l]=u};function getRenderer(o){return renderers[o]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var o in renderers)if(renderers[o])return o;return""}function _typeof$4(o){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_typeof$4(o)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(o){(o.wrapper||o.container)&&(this.wrapper=o.wrapper||o.container);var l="svg";o.animType?l=o.animType:o.renderer&&(l=o.renderer);var u=getRenderer(l);this.renderer=new u(this,o.rendererSettings),this.imagePreloader.setCacheType(l,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=l,o.loop===""||o.loop===null||o.loop===void 0||o.loop===!0?this.loop=!0:o.loop===!1?this.loop=!1:this.loop=parseInt(o.loop,10),this.autoplay="autoplay"in o?o.autoplay:!0,this.name=o.name?o.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(o,"autoloadSegments")?o.autoloadSegments:!0,this.assetsPath=o.assetsPath,this.initialSegment=o.initialSegment,o.audioFactory&&this.audioController.setAudioFactory(o.audioFactory),o.animationData?this.setupAnimation(o.animationData):o.path&&(o.path.lastIndexOf("\\")!==-1?this.path=o.path.substr(0,o.path.lastIndexOf("\\")+1):this.path=o.path.substr(0,o.path.lastIndexOf("/")+1),this.fileName=o.path.substr(o.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(o.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(o){dataManager.completeAnimation(o,this.configAnimation)},AnimationItem.prototype.setData=function(o,l){l&&_typeof$4(l)!=="object"&&(l=JSON.parse(l));var u={wrapper:o,animationData:l},d=o.attributes;u.path=d.getNamedItem("data-animation-path")?d.getNamedItem("data-animation-path").value:d.getNamedItem("data-bm-path")?d.getNamedItem("data-bm-path").value:d.getNamedItem("bm-path")?d.getNamedItem("bm-path").value:"",u.animType=d.getNamedItem("data-anim-type")?d.getNamedItem("data-anim-type").value:d.getNamedItem("data-bm-type")?d.getNamedItem("data-bm-type").value:d.getNamedItem("bm-type")?d.getNamedItem("bm-type").value:d.getNamedItem("data-bm-renderer")?d.getNamedItem("data-bm-renderer").value:d.getNamedItem("bm-renderer")?d.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var f=d.getNamedItem("data-anim-loop")?d.getNamedItem("data-anim-loop").value:d.getNamedItem("data-bm-loop")?d.getNamedItem("data-bm-loop").value:d.getNamedItem("bm-loop")?d.getNamedItem("bm-loop").value:"";f==="false"?u.loop=!1:f==="true"?u.loop=!0:f!==""&&(u.loop=parseInt(f,10));var h=d.getNamedItem("data-anim-autoplay")?d.getNamedItem("data-anim-autoplay").value:d.getNamedItem("data-bm-autoplay")?d.getNamedItem("data-bm-autoplay").value:d.getNamedItem("bm-autoplay")?d.getNamedItem("bm-autoplay").value:!0;u.autoplay=h!=="false",u.name=d.getNamedItem("data-name")?d.getNamedItem("data-name").value:d.getNamedItem("data-bm-name")?d.getNamedItem("data-bm-name").value:d.getNamedItem("bm-name")?d.getNamedItem("bm-name").value:"";var m=d.getNamedItem("data-anim-prerender")?d.getNamedItem("data-anim-prerender").value:d.getNamedItem("data-bm-prerender")?d.getNamedItem("data-bm-prerender").value:d.getNamedItem("bm-prerender")?d.getNamedItem("bm-prerender").value:"";m==="false"&&(u.prerender=!1),u.path?this.setParams(u):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(o){o.op>this.animationData.op&&(this.animationData.op=o.op,this.totalFrames=Math.floor(o.op-this.animationData.ip));var l=this.animationData.layers,u,d=l.length,f=o.layers,h,m=f.length;for(h=0;h<m;h+=1)for(u=0;u<d;){if(l[u].id===f[h].id){l[u]=f[h];break}u+=1}if((o.chars||o.fonts)&&(this.renderer.globalData.fontManager.addChars(o.chars),this.renderer.globalData.fontManager.addFonts(o.fonts,this.renderer.globalData.defs)),o.assets)for(d=o.assets.length,u=0;u<d;u+=1)this.animationData.assets.push(o.assets[u]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(o){this.animationData=o;var l=getExpressionsPlugin();l&&l.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var o=this.animationData.segments;if(!o||o.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var l=o.shift();this.timeCompleted=l.time*this.frameRate;var u=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(u,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var o=this.animationData.segments;o||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(o){if(this.renderer)try{this.animationData=o,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(o),o.assets||(o.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(o.assets),this.markers=markerParser(o.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(l){this.triggerConfigError(l)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var o=getExpressionsPlugin();o&&o.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(o,l){var u=typeof o=="number"?o:void 0,d=typeof l=="number"?l:void 0;this.renderer.updateContainerSize(u,d)},AnimationItem.prototype.setSubframe=function(o){this.isSubframeEnabled=!!o},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(o){this.triggerRenderFrameError(o)}},AnimationItem.prototype.play=function(o){o&&this.name!==o||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(o){o&&this.name!==o||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(o){o&&this.name!==o||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(o){o&&this.name!==o||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(o){for(var l,u=0;u<this.markers.length;u+=1)if(l=this.markers[u],l.payload&&l.payload.name===o)return l;return null},AnimationItem.prototype.goToAndStop=function(o,l,u){if(!(u&&this.name!==u)){var d=Number(o);if(isNaN(d)){var f=this.getMarkerData(o);f&&this.goToAndStop(f.time,!0)}else l?this.setCurrentRawFrameValue(o):this.setCurrentRawFrameValue(o*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(o,l,u){if(!(u&&this.name!==u)){var d=Number(o);if(isNaN(d)){var f=this.getMarkerData(o);f&&(f.duration?this.playSegments([f.time,f.time+f.duration],!0):this.goToAndStop(f.time,!0))}else this.goToAndStop(d,l,u);this.play()}},AnimationItem.prototype.advanceTime=function(o){if(!(this.isPaused===!0||this.isLoaded===!1)){var l=this.currentRawFrame+o*this.frameModifier,u=!1;l>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(l>this.totalFrames?l%this.totalFrames:0)||(u=!0,l=this.totalFrames-1):l>=this.totalFrames?(this.playCount+=1,this.checkSegments(l%this.totalFrames)||(this.setCurrentRawFrameValue(l%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(l):l<0?this.checkSegments(l%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+l%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(u=!0,l=0)):this.setCurrentRawFrameValue(l),u&&(this.setCurrentRawFrameValue(l),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(o,l){this.playCount=0,o[1]<o[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=o[0]-o[1],this.timeCompleted=this.totalFrames,this.firstFrame=o[1],this.setCurrentRawFrameValue(this.totalFrames-.001-l)):o[1]>o[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=o[1]-o[0],this.timeCompleted=this.totalFrames,this.firstFrame=o[0],this.setCurrentRawFrameValue(.001+l)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(o,l){var u=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<o?u=o:this.currentRawFrame+this.firstFrame>l&&(u=l-o)),this.firstFrame=o,this.totalFrames=l-o,this.timeCompleted=this.totalFrames,u!==-1&&this.goToAndStop(u,!0)},AnimationItem.prototype.playSegments=function(o,l){if(l&&(this.segments.length=0),_typeof$4(o[0])==="object"){var u,d=o.length;for(u=0;u<d;u+=1)this.segments.push(o[u])}else this.segments.push(o);this.segments.length&&l&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(o){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),o&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(o){return this.segments.length?(this.adjustSegment(this.segments.shift(),o),!0):!1},AnimationItem.prototype.destroy=function(o){o&&this.name!==o||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(o){this.currentRawFrame=o,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(o){this.playSpeed=o,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(o){this.playDirection=o<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(o){this.loop=o},AnimationItem.prototype.setVolume=function(o,l){l&&this.name!==l||this.audioController.setVolume(o)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(o){o&&this.name!==o||this.audioController.mute()},AnimationItem.prototype.unmute=function(o){o&&this.name!==o||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(o){var l="";if(o.e)l=o.p;else if(this.assetsPath){var u=o.p;u.indexOf("images/")!==-1&&(u=u.split("/")[1]),l=this.assetsPath+u}else l=this.path,l+=o.u?o.u:"",l+=o.p;return l},AnimationItem.prototype.getAssetData=function(o){for(var l=0,u=this.assets.length;l<u;){if(o===this.assets[l].id)return this.assets[l];l+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(o){return o?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(o,l,u){try{var d=this.renderer.getElementByPath(o);d.updateDocumentData(l,u)}catch{}},AnimationItem.prototype.trigger=function(o){if(this._cbs&&this._cbs[o])switch(o){case"enterFrame":this.triggerEvent(o,new BMEnterFrameEvent(o,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(o,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(o,new BMCompleteLoopEvent(o,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(o,new BMCompleteEvent(o,this.frameMult));break;case"segmentStart":this.triggerEvent(o,new BMSegmentStartEvent(o,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(o,new BMDestroyEvent(o,this));break;default:this.triggerEvent(o)}o==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(o,this.currentFrame,this.totalFrames,this.frameMult)),o==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(o,this.loop,this.playCount,this.frameMult)),o==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(o,this.frameMult)),o==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(o,this.firstFrame,this.totalFrames)),o==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(o,this))},AnimationItem.prototype.triggerRenderFrameError=function(o){var l=new BMRenderFrameErrorEvent(o,this.currentFrame);this.triggerEvent("error",l),this.onError&&this.onError.call(this,l)},AnimationItem.prototype.triggerConfigError=function(o){var l=new BMConfigErrorEvent(o,this.currentFrame);this.triggerEvent("error",l),this.onError&&this.onError.call(this,l)};var animationManager=function(){var o={},l=[],u=0,d=0,f=0,h=!0,m=!1;function g($){for(var G=0,L=$.target;G<d;)l[G].animation===L&&(l.splice(G,1),G-=1,d-=1,L.isPaused||S()),G+=1}function v($,G){if(!$)return null;for(var L=0;L<d;){if(l[L].elem===$&&l[L].elem!==null)return l[L].animation;L+=1}var B=new AnimationItem;return E(B,$),B.setData($,G),B}function x(){var $,G=l.length,L=[];for($=0;$<G;$+=1)L.push(l[$].animation);return L}function b(){f+=1,X()}function S(){f-=1}function E($,G){$.addEventListener("destroy",g),$.addEventListener("_active",b),$.addEventListener("_idle",S),l.push({elem:G,animation:$}),d+=1}function w($){var G=new AnimationItem;return E(G,null),G.setParams($),G}function T($,G){var L;for(L=0;L<d;L+=1)l[L].animation.setSpeed($,G)}function C($,G){var L;for(L=0;L<d;L+=1)l[L].animation.setDirection($,G)}function M($){var G;for(G=0;G<d;G+=1)l[G].animation.play($)}function A($){var G=$-u,L;for(L=0;L<d;L+=1)l[L].animation.advanceTime(G);u=$,f&&!m?window.requestAnimationFrame(A):h=!0}function k($){u=$,window.requestAnimationFrame(A)}function I($){var G;for(G=0;G<d;G+=1)l[G].animation.pause($)}function O($,G,L){var B;for(B=0;B<d;B+=1)l[B].animation.goToAndStop($,G,L)}function j($){var G;for(G=0;G<d;G+=1)l[G].animation.stop($)}function N($){var G;for(G=0;G<d;G+=1)l[G].animation.togglePause($)}function V($){var G;for(G=d-1;G>=0;G-=1)l[G].animation.destroy($)}function z($,G,L){var B=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),q,U=B.length;for(q=0;q<U;q+=1)L&&B[q].setAttribute("data-bm-type",L),v(B[q],$);if(G&&U===0){L||(L="svg");var Y=document.getElementsByTagName("body")[0];Y.innerText="";var te=createTag("div");te.style.width="100%",te.style.height="100%",te.setAttribute("data-bm-type",L),Y.appendChild(te),v(te,$)}}function W(){var $;for($=0;$<d;$+=1)l[$].animation.resize()}function X(){!m&&f&&h&&(window.requestAnimationFrame(k),h=!1)}function ie(){m=!0}function oe(){m=!1,X()}function le($,G){var L;for(L=0;L<d;L+=1)l[L].animation.setVolume($,G)}function Q($){var G;for(G=0;G<d;G+=1)l[G].animation.mute($)}function K($){var G;for(G=0;G<d;G+=1)l[G].animation.unmute($)}return o.registerAnimation=v,o.loadAnimation=w,o.setSpeed=T,o.setDirection=C,o.play=M,o.pause=I,o.stop=j,o.togglePause=N,o.searchAnimations=z,o.resize=W,o.goToAndStop=O,o.destroy=V,o.freeze=ie,o.unfreeze=oe,o.setVolume=le,o.mute=Q,o.unmute=K,o.getRegisteredAnimations=x,o}(),BezierFactory=function(){var o={};o.getBezierEasing=u;var l={};function u(k,I,O,j,N){var V=N||("bez_"+k+"_"+I+"_"+O+"_"+j).replace(/\./g,"p");if(l[V])return l[V];var z=new A([k,I,O,j]);return l[V]=z,z}var d=4,f=.001,h=1e-7,m=10,g=11,v=1/(g-1),x=typeof Float32Array=="function";function b(k,I){return 1-3*I+3*k}function S(k,I){return 3*I-6*k}function E(k){return 3*k}function w(k,I,O){return((b(I,O)*k+S(I,O))*k+E(I))*k}function T(k,I,O){return 3*b(I,O)*k*k+2*S(I,O)*k+E(I)}function C(k,I,O,j,N){var V,z,W=0;do z=I+(O-I)/2,V=w(z,j,N)-k,V>0?O=z:I=z;while(Math.abs(V)>h&&++W<m);return z}function M(k,I,O,j){for(var N=0;N<d;++N){var V=T(I,O,j);if(V===0)return I;var z=w(I,O,j)-k;I-=z/V}return I}function A(k){this._p=k,this._mSampleValues=x?new Float32Array(g):new Array(g),this._precomputed=!1,this.get=this.get.bind(this)}return A.prototype={get:function(I){var O=this._p[0],j=this._p[1],N=this._p[2],V=this._p[3];return this._precomputed||this._precompute(),O===j&&N===V?I:I===0?0:I===1?1:w(this._getTForX(I),j,V)},_precompute:function(){var I=this._p[0],O=this._p[1],j=this._p[2],N=this._p[3];this._precomputed=!0,(I!==O||j!==N)&&this._calcSampleValues()},_calcSampleValues:function(){for(var I=this._p[0],O=this._p[2],j=0;j<g;++j)this._mSampleValues[j]=w(j*v,I,O)},_getTForX:function(I){for(var O=this._p[0],j=this._p[2],N=this._mSampleValues,V=0,z=1,W=g-1;z!==W&&N[z]<=I;++z)V+=v;--z;var X=(I-N[z])/(N[z+1]-N[z]),ie=V+X*v,oe=T(ie,O,j);return oe>=f?M(I,ie,O,j):oe===0?ie:C(I,V,V+v,O,j)}},o}(),pooling=function(){function o(l){return l.concat(createSizedArray(l.length))}return{double:o}}(),poolFactory=function(){return function(o,l,u){var d=0,f=o,h=createSizedArray(f),m={newElement:g,release:v};function g(){var x;return d?(d-=1,x=h[d]):x=l(),x}function v(x){d===f&&(h=pooling.double(h),f*=2),u&&u(x),h[d]=x,d+=1}return m}}(),bezierLengthPool=function(){function o(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,o)}(),segmentsLengthPool=function(){function o(){return{lengths:[],totalLength:0}}function l(u){var d,f=u.lengths.length;for(d=0;d<f;d+=1)bezierLengthPool.release(u.lengths[d]);u.lengths.length=0}return poolFactory(8,o,l)}();function bezFunction(){var o=Math;function l(E,w,T,C,M,A){var k=E*C+w*M+T*A-M*C-A*E-T*w;return k>-.001&&k<.001}function u(E,w,T,C,M,A,k,I,O){if(T===0&&A===0&&O===0)return l(E,w,C,M,k,I);var j=o.sqrt(o.pow(C-E,2)+o.pow(M-w,2)+o.pow(A-T,2)),N=o.sqrt(o.pow(k-E,2)+o.pow(I-w,2)+o.pow(O-T,2)),V=o.sqrt(o.pow(k-C,2)+o.pow(I-M,2)+o.pow(O-A,2)),z;return j>N?j>V?z=j-N-V:z=V-N-j:V>N?z=V-N-j:z=N-j-V,z>-1e-4&&z<1e-4}var d=function(){return function(E,w,T,C){var M=getDefaultCurveSegments(),A,k,I,O,j,N=0,V,z=[],W=[],X=bezierLengthPool.newElement();for(I=T.length,A=0;A<M;A+=1){for(j=A/(M-1),V=0,k=0;k<I;k+=1)O=bmPow(1-j,3)*E[k]+3*bmPow(1-j,2)*j*T[k]+3*(1-j)*bmPow(j,2)*C[k]+bmPow(j,3)*w[k],z[k]=O,W[k]!==null&&(V+=bmPow(z[k]-W[k],2)),W[k]=z[k];V&&(V=bmSqrt(V),N+=V),X.percents[A]=j,X.lengths[A]=N}return X.addedLength=N,X}}();function f(E){var w=segmentsLengthPool.newElement(),T=E.c,C=E.v,M=E.o,A=E.i,k,I=E._length,O=w.lengths,j=0;for(k=0;k<I-1;k+=1)O[k]=d(C[k],C[k+1],M[k],A[k+1]),j+=O[k].addedLength;return T&&I&&(O[k]=d(C[k],C[0],M[k],A[0]),j+=O[k].addedLength),w.totalLength=j,w}function h(E){this.segmentLength=0,this.points=new Array(E)}function m(E,w){this.partialLength=E,this.point=w}var g=function(){var E={};return function(w,T,C,M){var A=(w[0]+"_"+w[1]+"_"+T[0]+"_"+T[1]+"_"+C[0]+"_"+C[1]+"_"+M[0]+"_"+M[1]).replace(/\./g,"p");if(!E[A]){var k=getDefaultCurveSegments(),I,O,j,N,V,z=0,W,X,ie=null;w.length===2&&(w[0]!==T[0]||w[1]!==T[1])&&l(w[0],w[1],T[0],T[1],w[0]+C[0],w[1]+C[1])&&l(w[0],w[1],T[0],T[1],T[0]+M[0],T[1]+M[1])&&(k=2);var oe=new h(k);for(j=C.length,I=0;I<k;I+=1){for(X=createSizedArray(j),V=I/(k-1),W=0,O=0;O<j;O+=1)N=bmPow(1-V,3)*w[O]+3*bmPow(1-V,2)*V*(w[O]+C[O])+3*(1-V)*bmPow(V,2)*(T[O]+M[O])+bmPow(V,3)*T[O],X[O]=N,ie!==null&&(W+=bmPow(X[O]-ie[O],2));W=bmSqrt(W),z+=W,oe.points[I]=new m(W,X),ie=X}oe.segmentLength=z,E[A]=oe}return E[A]}}();function v(E,w){var T=w.percents,C=w.lengths,M=T.length,A=bmFloor((M-1)*E),k=E*w.addedLength,I=0;if(A===M-1||A===0||k===C[A])return T[A];for(var O=C[A]>k?-1:1,j=!0;j;)if(C[A]<=k&&C[A+1]>k?(I=(k-C[A])/(C[A+1]-C[A]),j=!1):A+=O,A<0||A>=M-1){if(A===M-1)return T[A];j=!1}return T[A]+(T[A+1]-T[A])*I}function x(E,w,T,C,M,A){var k=v(M,A),I=1-k,O=o.round((I*I*I*E[0]+(k*I*I+I*k*I+I*I*k)*T[0]+(k*k*I+I*k*k+k*I*k)*C[0]+k*k*k*w[0])*1e3)/1e3,j=o.round((I*I*I*E[1]+(k*I*I+I*k*I+I*I*k)*T[1]+(k*k*I+I*k*k+k*I*k)*C[1]+k*k*k*w[1])*1e3)/1e3;return[O,j]}var b=createTypedArray("float32",8);function S(E,w,T,C,M,A,k){M<0?M=0:M>1&&(M=1);var I=v(M,k);A=A>1?1:A;var O=v(A,k),j,N=E.length,V=1-I,z=1-O,W=V*V*V,X=I*V*V*3,ie=I*I*V*3,oe=I*I*I,le=V*V*z,Q=I*V*z+V*I*z+V*V*O,K=I*I*z+V*I*O+I*V*O,$=I*I*O,G=V*z*z,L=I*z*z+V*O*z+V*z*O,B=I*O*z+V*O*O+I*z*O,q=I*O*O,U=z*z*z,Y=O*z*z+z*O*z+z*z*O,te=O*O*z+z*O*O+O*z*O,ae=O*O*O;for(j=0;j<N;j+=1)b[j*4]=o.round((W*E[j]+X*T[j]+ie*C[j]+oe*w[j])*1e3)/1e3,b[j*4+1]=o.round((le*E[j]+Q*T[j]+K*C[j]+$*w[j])*1e3)/1e3,b[j*4+2]=o.round((G*E[j]+L*T[j]+B*C[j]+q*w[j])*1e3)/1e3,b[j*4+3]=o.round((U*E[j]+Y*T[j]+te*C[j]+ae*w[j])*1e3)/1e3;return b}return{getSegmentsLength:f,getNewSegment:S,getPointInSegment:x,buildBezierData:g,pointOnLine2D:l,pointOnLine3D:u}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(o,l){var u=this.offsetTime,d;this.propType==="multidimensional"&&(d=createTypedArray("float32",this.pv.length));for(var f=l.lastIndex,h=f,m=this.keyframes.length-1,g=!0,v,x,b;g;){if(v=this.keyframes[h],x=this.keyframes[h+1],h===m-1&&o>=x.t-u){v.h&&(v=x),f=0;break}if(x.t-u>o){f=h;break}h<m-1?h+=1:(f=0,g=!1)}b=this.keyframesMetadata[h]||{};var S,E,w,T,C,M,A=x.t-u,k=v.t-u,I;if(v.to){b.bezierData||(b.bezierData=bez.buildBezierData(v.s,x.s||v.e,v.to,v.ti));var O=b.bezierData;if(o>=A||o<k){var j=o>=A?O.points.length-1:0;for(E=O.points[j].point.length,S=0;S<E;S+=1)d[S]=O.points[j].point[S]}else{b.__fnct?M=b.__fnct:(M=BezierFactory.getBezierEasing(v.o.x,v.o.y,v.i.x,v.i.y,v.n).get,b.__fnct=M),w=M((o-k)/(A-k));var N=O.segmentLength*w,V,z=l.lastFrame<o&&l._lastKeyframeIndex===h?l._lastAddedLength:0;for(C=l.lastFrame<o&&l._lastKeyframeIndex===h?l._lastPoint:0,g=!0,T=O.points.length;g;){if(z+=O.points[C].partialLength,N===0||w===0||C===O.points.length-1){for(E=O.points[C].point.length,S=0;S<E;S+=1)d[S]=O.points[C].point[S];break}else if(N>=z&&N<z+O.points[C+1].partialLength){for(V=(N-z)/O.points[C+1].partialLength,E=O.points[C].point.length,S=0;S<E;S+=1)d[S]=O.points[C].point[S]+(O.points[C+1].point[S]-O.points[C].point[S])*V;break}C<T-1?C+=1:g=!1}l._lastPoint=C,l._lastAddedLength=z-O.points[C].partialLength,l._lastKeyframeIndex=h}}else{var W,X,ie,oe,le;if(m=v.s.length,I=x.s||v.e,this.sh&&v.h!==1)if(o>=A)d[0]=I[0],d[1]=I[1],d[2]=I[2];else if(o<=k)d[0]=v.s[0],d[1]=v.s[1],d[2]=v.s[2];else{var Q=createQuaternion(v.s),K=createQuaternion(I),$=(o-k)/(A-k);quaternionToEuler(d,slerp(Q,K,$))}else for(h=0;h<m;h+=1)v.h!==1&&(o>=A?w=1:o<k?w=0:(v.o.x.constructor===Array?(b.__fnct||(b.__fnct=[]),b.__fnct[h]?M=b.__fnct[h]:(W=v.o.x[h]===void 0?v.o.x[0]:v.o.x[h],X=v.o.y[h]===void 0?v.o.y[0]:v.o.y[h],ie=v.i.x[h]===void 0?v.i.x[0]:v.i.x[h],oe=v.i.y[h]===void 0?v.i.y[0]:v.i.y[h],M=BezierFactory.getBezierEasing(W,X,ie,oe).get,b.__fnct[h]=M)):b.__fnct?M=b.__fnct:(W=v.o.x,X=v.o.y,ie=v.i.x,oe=v.i.y,M=BezierFactory.getBezierEasing(W,X,ie,oe).get,v.keyframeMetadata=M),w=M((o-k)/(A-k)))),I=x.s||v.e,le=v.h===1?v.s[h]:v.s[h]+(I[h]-v.s[h])*w,this.propType==="multidimensional"?d[h]=le:d=le}return l.lastIndex=f,d}function slerp(o,l,u){var d=[],f=o[0],h=o[1],m=o[2],g=o[3],v=l[0],x=l[1],b=l[2],S=l[3],E,w,T,C,M;return w=f*v+h*x+m*b+g*S,w<0&&(w=-w,v=-v,x=-x,b=-b,S=-S),1-w>1e-6?(E=Math.acos(w),T=Math.sin(E),C=Math.sin((1-u)*E)/T,M=Math.sin(u*E)/T):(C=1-u,M=u),d[0]=C*f+M*v,d[1]=C*h+M*x,d[2]=C*m+M*b,d[3]=C*g+M*S,d}function quaternionToEuler(o,l){var u=l[0],d=l[1],f=l[2],h=l[3],m=Math.atan2(2*d*h-2*u*f,1-2*d*d-2*f*f),g=Math.asin(2*u*d+2*f*h),v=Math.atan2(2*u*h-2*d*f,1-2*u*u-2*f*f);o[0]=m/degToRads,o[1]=g/degToRads,o[2]=v/degToRads}function createQuaternion(o){var l=o[0]*degToRads,u=o[1]*degToRads,d=o[2]*degToRads,f=Math.cos(l/2),h=Math.cos(u/2),m=Math.cos(d/2),g=Math.sin(l/2),v=Math.sin(u/2),x=Math.sin(d/2),b=f*h*m-g*v*x,S=g*v*m+f*h*x,E=g*h*m+f*v*x,w=f*v*m-g*h*x;return[S,E,w,b]}function getValueAtCurrentTime(){var o=this.comp.renderedFrame-this.offsetTime,l=this.keyframes[0].t-this.offsetTime,u=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(o===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=u&&o>=u||this._caching.lastFrame<l&&o<l))){this._caching.lastFrame>=o&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var d=this.interpolateValue(o,this._caching);this.pv=d}return this._caching.lastFrame=o,this.pv}function setVValue(o){var l;if(this.propType==="unidimensional")l=o*this.mult,mathAbs(this.v-l)>1e-5&&(this.v=l,this._mdf=!0);else for(var u=0,d=this.v.length;u<d;)l=o[u]*this.mult,mathAbs(this.v[u]-l)>1e-5&&(this.v[u]=l,this._mdf=!0),u+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var o,l=this.effectsSequence.length,u=this.kf?this.pv:this.data.k;for(o=0;o<l;o+=1)u=this.effectsSequence[o](u);this.setVValue(u),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(o){this.effectsSequence.push(o),this.container.addDynamicProperty(this)}function ValueProperty(o,l,u,d){this.propType="unidimensional",this.mult=u||1,this.data=l,this.v=u?l.k*u:l.k,this.pv=l.k,this._mdf=!1,this.elem=o,this.container=d,this.comp=o.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(o,l,u,d){this.propType="multidimensional",this.mult=u||1,this.data=l,this._mdf=!1,this.elem=o,this.container=d,this.comp=o.comp,this.k=!1,this.kf=!1,this.frameId=-1;var f,h=l.k.length;for(this.v=createTypedArray("float32",h),this.pv=createTypedArray("float32",h),this.vel=createTypedArray("float32",h),f=0;f<h;f+=1)this.v[f]=l.k[f]*this.mult,this.pv[f]=l.k[f];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(o,l,u,d){this.propType="unidimensional",this.keyframes=l.k,this.keyframesMetadata=[],this.offsetTime=o.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=l,this.mult=u||1,this.elem=o,this.container=d,this.comp=o.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(o,l,u,d){this.propType="multidimensional";var f,h=l.k.length,m,g,v,x;for(f=0;f<h-1;f+=1)l.k[f].to&&l.k[f].s&&l.k[f+1]&&l.k[f+1].s&&(m=l.k[f].s,g=l.k[f+1].s,v=l.k[f].to,x=l.k[f].ti,(m.length===2&&!(m[0]===g[0]&&m[1]===g[1])&&bez.pointOnLine2D(m[0],m[1],g[0],g[1],m[0]+v[0],m[1]+v[1])&&bez.pointOnLine2D(m[0],m[1],g[0],g[1],g[0]+x[0],g[1]+x[1])||m.length===3&&!(m[0]===g[0]&&m[1]===g[1]&&m[2]===g[2])&&bez.pointOnLine3D(m[0],m[1],m[2],g[0],g[1],g[2],m[0]+v[0],m[1]+v[1],m[2]+v[2])&&bez.pointOnLine3D(m[0],m[1],m[2],g[0],g[1],g[2],g[0]+x[0],g[1]+x[1],g[2]+x[2]))&&(l.k[f].to=null,l.k[f].ti=null),m[0]===g[0]&&m[1]===g[1]&&v[0]===0&&v[1]===0&&x[0]===0&&x[1]===0&&(m.length===2||m[2]===g[2]&&v[2]===0&&x[2]===0)&&(l.k[f].to=null,l.k[f].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=l,this.keyframes=l.k,this.keyframesMetadata=[],this.offsetTime=o.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=u||1,this.elem=o,this.container=d,this.comp=o.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var b=l.k[0].s.length;for(this.v=createTypedArray("float32",b),this.pv=createTypedArray("float32",b),f=0;f<b;f+=1)this.v[f]=initFrame,this.pv[f]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",b)},this.addEffect=addEffect}var PropertyFactory=function(){function o(u,d,f,h,m){d.sid&&(d=u.globalData.slotManager.getProp(d));var g;if(!d.k.length)g=new ValueProperty(u,d,h,m);else if(typeof d.k[0]=="number")g=new MultiDimensionalProperty(u,d,h,m);else switch(f){case 0:g=new KeyframedValueProperty(u,d,h,m);break;case 1:g=new KeyframedMultidimensionalProperty(u,d,h,m);break}return g.effectsSequence.length&&m.addDynamicProperty(g),g}var l={getProp:o};return l}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(l){this.dynamicProperties.indexOf(l)===-1&&(this.dynamicProperties.push(l),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var l,u=this.dynamicProperties.length;for(l=0;l<u;l+=1)this.dynamicProperties[l].getValue(),this.dynamicProperties[l]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(l){this.container=l,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function o(){return createTypedArray("float32",2)}return poolFactory(8,o)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(o,l){this.c=o,this.setLength(l);for(var u=0;u<l;)this.v[u]=pointPool.newElement(),this.o[u]=pointPool.newElement(),this.i[u]=pointPool.newElement(),u+=1},ShapePath.prototype.setLength=function(o){for(;this._maxLength<o;)this.doubleArrayLength();this._length=o},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(o,l,u,d,f){var h;switch(this._length=Math.max(this._length,d+1),this._length>=this._maxLength&&this.doubleArrayLength(),u){case"v":h=this.v;break;case"i":h=this.i;break;case"o":h=this.o;break;default:h=[];break}(!h[d]||h[d]&&!f)&&(h[d]=pointPool.newElement()),h[d][0]=o,h[d][1]=l},ShapePath.prototype.setTripleAt=function(o,l,u,d,f,h,m,g){this.setXYAt(o,l,"v",m,g),this.setXYAt(u,d,"o",m,g),this.setXYAt(f,h,"i",m,g)},ShapePath.prototype.reverse=function(){var o=new ShapePath;o.setPathData(this.c,this._length);var l=this.v,u=this.o,d=this.i,f=0;this.c&&(o.setTripleAt(l[0][0],l[0][1],d[0][0],d[0][1],u[0][0],u[0][1],0,!1),f=1);var h=this._length-1,m=this._length,g;for(g=f;g<m;g+=1)o.setTripleAt(l[h][0],l[h][1],d[h][0],d[h][1],u[h][0],u[h][1],g,!1),h-=1;return o},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function o(){return new ShapePath}function l(f){var h=f._length,m;for(m=0;m<h;m+=1)pointPool.release(f.v[m]),pointPool.release(f.i[m]),pointPool.release(f.o[m]),f.v[m]=null,f.i[m]=null,f.o[m]=null;f._length=0,f.c=!1}function u(f){var h=d.newElement(),m,g=f._length===void 0?f.v.length:f._length;for(h.setLength(g),h.c=f.c,m=0;m<g;m+=1)h.setTripleAt(f.v[m][0],f.v[m][1],f.o[m][0],f.o[m][1],f.i[m][0],f.i[m][1],m);return h}var d=poolFactory(4,o,l);return d.clone=u,d}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(o){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=o,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var o;for(o=0;o<this._length;o+=1)shapePool.release(this.shapes[o]);this._length=0};var shapeCollectionPool=function(){var o={newShapeCollection:f,release:h},l=0,u=4,d=createSizedArray(u);function f(){var m;return l?(l-=1,m=d[l]):m=new ShapeCollection,m}function h(m){var g,v=m._length;for(g=0;g<v;g+=1)shapePool.release(m.shapes[g]);m._length=0,l===u&&(d=pooling.double(d),u*=2),d[l]=m,l+=1}return o}(),ShapePropertyFactory=function(){var o=-999999;function l(A,k,I){var O=I.lastIndex,j,N,V,z,W,X,ie,oe,le,Q=this.keyframes;if(A<Q[0].t-this.offsetTime)j=Q[0].s[0],V=!0,O=0;else if(A>=Q[Q.length-1].t-this.offsetTime)j=Q[Q.length-1].s?Q[Q.length-1].s[0]:Q[Q.length-2].e[0],V=!0;else{for(var K=O,$=Q.length-1,G=!0,L,B,q;G&&(L=Q[K],B=Q[K+1],!(B.t-this.offsetTime>A));)K<$-1?K+=1:G=!1;if(q=this.keyframesMetadata[K]||{},V=L.h===1,O=K,!V){if(A>=B.t-this.offsetTime)oe=1;else if(A<L.t-this.offsetTime)oe=0;else{var U;q.__fnct?U=q.__fnct:(U=BezierFactory.getBezierEasing(L.o.x,L.o.y,L.i.x,L.i.y).get,q.__fnct=U),oe=U((A-(L.t-this.offsetTime))/(B.t-this.offsetTime-(L.t-this.offsetTime)))}N=B.s?B.s[0]:L.e[0]}j=L.s[0]}for(X=k._length,ie=j.i[0].length,I.lastIndex=O,z=0;z<X;z+=1)for(W=0;W<ie;W+=1)le=V?j.i[z][W]:j.i[z][W]+(N.i[z][W]-j.i[z][W])*oe,k.i[z][W]=le,le=V?j.o[z][W]:j.o[z][W]+(N.o[z][W]-j.o[z][W])*oe,k.o[z][W]=le,le=V?j.v[z][W]:j.v[z][W]+(N.v[z][W]-j.v[z][W])*oe,k.v[z][W]=le}function u(){var A=this.comp.renderedFrame-this.offsetTime,k=this.keyframes[0].t-this.offsetTime,I=this.keyframes[this.keyframes.length-1].t-this.offsetTime,O=this._caching.lastFrame;return O!==o&&(O<k&&A<k||O>I&&A>I)||(this._caching.lastIndex=O<A?this._caching.lastIndex:0,this.interpolateShape(A,this.pv,this._caching)),this._caching.lastFrame=A,this.pv}function d(){this.paths=this.localShapeCollection}function f(A,k){if(A._length!==k._length||A.c!==k.c)return!1;var I,O=A._length;for(I=0;I<O;I+=1)if(A.v[I][0]!==k.v[I][0]||A.v[I][1]!==k.v[I][1]||A.o[I][0]!==k.o[I][0]||A.o[I][1]!==k.o[I][1]||A.i[I][0]!==k.i[I][0]||A.i[I][1]!==k.i[I][1])return!1;return!0}function h(A){f(this.v,A)||(this.v=shapePool.clone(A),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function m(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var A;this.kf?A=this.pv:this.data.ks?A=this.data.ks.k:A=this.data.pt.k;var k,I=this.effectsSequence.length;for(k=0;k<I;k+=1)A=this.effectsSequence[k](A);this.setVValue(A),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function g(A,k,I){this.propType="shape",this.comp=A.comp,this.container=A,this.elem=A,this.data=k,this.k=!1,this.kf=!1,this._mdf=!1;var O=I===3?k.pt.k:k.ks.k;this.v=shapePool.clone(O),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=d,this.effectsSequence=[]}function v(A){this.effectsSequence.push(A),this.container.addDynamicProperty(this)}g.prototype.interpolateShape=l,g.prototype.getValue=m,g.prototype.setVValue=h,g.prototype.addEffect=v;function x(A,k,I){this.propType="shape",this.comp=A.comp,this.elem=A,this.container=A,this.offsetTime=A.data.st,this.keyframes=I===3?k.pt.k:k.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var O=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,O),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=o,this.reset=d,this._caching={lastFrame:o,lastIndex:0},this.effectsSequence=[u.bind(this)]}x.prototype.getValue=m,x.prototype.interpolateShape=l,x.prototype.setVValue=h,x.prototype.addEffect=v;var b=function(){var A=roundCorner;function k(I,O){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=O.d,this.elem=I,this.comp=I.comp,this.frameId=-1,this.initDynamicPropertyContainer(I),this.p=PropertyFactory.getProp(I,O.p,1,0,this),this.s=PropertyFactory.getProp(I,O.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return k.prototype={reset:d,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var O=this.p.v[0],j=this.p.v[1],N=this.s.v[0]/2,V=this.s.v[1]/2,z=this.d!==3,W=this.v;W.v[0][0]=O,W.v[0][1]=j-V,W.v[1][0]=z?O+N:O-N,W.v[1][1]=j,W.v[2][0]=O,W.v[2][1]=j+V,W.v[3][0]=z?O-N:O+N,W.v[3][1]=j,W.i[0][0]=z?O-N*A:O+N*A,W.i[0][1]=j-V,W.i[1][0]=z?O+N:O-N,W.i[1][1]=j-V*A,W.i[2][0]=z?O+N*A:O-N*A,W.i[2][1]=j+V,W.i[3][0]=z?O-N:O+N,W.i[3][1]=j+V*A,W.o[0][0]=z?O+N*A:O-N*A,W.o[0][1]=j-V,W.o[1][0]=z?O+N:O-N,W.o[1][1]=j+V*A,W.o[2][0]=z?O-N*A:O+N*A,W.o[2][1]=j+V,W.o[3][0]=z?O-N:O+N,W.o[3][1]=j-V*A}},extendPrototype([DynamicPropertyContainer],k),k}(),S=function(){function A(k,I){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=k,this.comp=k.comp,this.data=I,this.frameId=-1,this.d=I.d,this.initDynamicPropertyContainer(k),I.sy===1?(this.ir=PropertyFactory.getProp(k,I.ir,0,0,this),this.is=PropertyFactory.getProp(k,I.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(k,I.pt,0,0,this),this.p=PropertyFactory.getProp(k,I.p,1,0,this),this.r=PropertyFactory.getProp(k,I.r,0,degToRads,this),this.or=PropertyFactory.getProp(k,I.or,0,0,this),this.os=PropertyFactory.getProp(k,I.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return A.prototype={reset:d,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var I=Math.floor(this.pt.v)*2,O=Math.PI*2/I,j=!0,N=this.or.v,V=this.ir.v,z=this.os.v,W=this.is.v,X=2*Math.PI*N/(I*2),ie=2*Math.PI*V/(I*2),oe,le,Q,K,$=-Math.PI/2;$+=this.r.v;var G=this.data.d===3?-1:1;for(this.v._length=0,oe=0;oe<I;oe+=1){le=j?N:V,Q=j?z:W,K=j?X:ie;var L=le*Math.cos($),B=le*Math.sin($),q=L===0&&B===0?0:B/Math.sqrt(L*L+B*B),U=L===0&&B===0?0:-L/Math.sqrt(L*L+B*B);L+=+this.p.v[0],B+=+this.p.v[1],this.v.setTripleAt(L,B,L-q*K*Q*G,B-U*K*Q*G,L+q*K*Q*G,B+U*K*Q*G,oe,!0),j=!j,$+=O*G}},convertPolygonToPath:function(){var I=Math.floor(this.pt.v),O=Math.PI*2/I,j=this.or.v,N=this.os.v,V=2*Math.PI*j/(I*4),z,W=-Math.PI*.5,X=this.data.d===3?-1:1;for(W+=this.r.v,this.v._length=0,z=0;z<I;z+=1){var ie=j*Math.cos(W),oe=j*Math.sin(W),le=ie===0&&oe===0?0:oe/Math.sqrt(ie*ie+oe*oe),Q=ie===0&&oe===0?0:-ie/Math.sqrt(ie*ie+oe*oe);ie+=+this.p.v[0],oe+=+this.p.v[1],this.v.setTripleAt(ie,oe,ie-le*V*N*X,oe-Q*V*N*X,ie+le*V*N*X,oe+Q*V*N*X,z,!0),W+=O*X}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],A),A}(),E=function(){function A(k,I){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=k,this.comp=k.comp,this.frameId=-1,this.d=I.d,this.initDynamicPropertyContainer(k),this.p=PropertyFactory.getProp(k,I.p,1,0,this),this.s=PropertyFactory.getProp(k,I.s,1,0,this),this.r=PropertyFactory.getProp(k,I.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return A.prototype={convertRectToPath:function(){var I=this.p.v[0],O=this.p.v[1],j=this.s.v[0]/2,N=this.s.v[1]/2,V=bmMin(j,N,this.r.v),z=V*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(I+j,O-N+V,I+j,O-N+V,I+j,O-N+z,0,!0),this.v.setTripleAt(I+j,O+N-V,I+j,O+N-z,I+j,O+N-V,1,!0),V!==0?(this.v.setTripleAt(I+j-V,O+N,I+j-V,O+N,I+j-z,O+N,2,!0),this.v.setTripleAt(I-j+V,O+N,I-j+z,O+N,I-j+V,O+N,3,!0),this.v.setTripleAt(I-j,O+N-V,I-j,O+N-V,I-j,O+N-z,4,!0),this.v.setTripleAt(I-j,O-N+V,I-j,O-N+z,I-j,O-N+V,5,!0),this.v.setTripleAt(I-j+V,O-N,I-j+V,O-N,I-j+z,O-N,6,!0),this.v.setTripleAt(I+j-V,O-N,I+j-z,O-N,I+j-V,O-N,7,!0)):(this.v.setTripleAt(I-j,O+N,I-j+z,O+N,I-j,O+N,2),this.v.setTripleAt(I-j,O-N,I-j,O-N+z,I-j,O-N,3))):(this.v.setTripleAt(I+j,O-N+V,I+j,O-N+z,I+j,O-N+V,0,!0),V!==0?(this.v.setTripleAt(I+j-V,O-N,I+j-V,O-N,I+j-z,O-N,1,!0),this.v.setTripleAt(I-j+V,O-N,I-j+z,O-N,I-j+V,O-N,2,!0),this.v.setTripleAt(I-j,O-N+V,I-j,O-N+V,I-j,O-N+z,3,!0),this.v.setTripleAt(I-j,O+N-V,I-j,O+N-z,I-j,O+N-V,4,!0),this.v.setTripleAt(I-j+V,O+N,I-j+V,O+N,I-j+z,O+N,5,!0),this.v.setTripleAt(I+j-V,O+N,I+j-z,O+N,I+j-V,O+N,6,!0),this.v.setTripleAt(I+j,O+N-V,I+j,O+N-V,I+j,O+N-z,7,!0)):(this.v.setTripleAt(I-j,O-N,I-j+z,O-N,I-j,O-N,1,!0),this.v.setTripleAt(I-j,O+N,I-j,O+N-z,I-j,O+N,2,!0),this.v.setTripleAt(I+j,O+N,I+j-z,O+N,I+j,O+N,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:d},extendPrototype([DynamicPropertyContainer],A),A}();function w(A,k,I){var O;if(I===3||I===4){var j=I===3?k.pt:k.ks,N=j.k;N.length?O=new x(A,k,I):O=new g(A,k,I)}else I===5?O=new E(A,k):I===6?O=new b(A,k):I===7&&(O=new S(A,k));return O.k&&A.addDynamicProperty(O),O}function T(){return g}function C(){return x}var M={};return M.getShapeProp=w,M.getConstructorFunction=T,M.getKeyframedConstructorFunction=C,M}();/*!
115
115
  Transformation Matrix v2.0
116
116
  (c) Epistemex 2014-2015
@@ -129,10 +129,10 @@ d.goToAndStop(C-d.firstFrame-1,!0)}T.type==="loop"&&(b===null||b!==T.frames||d.i
129
129
  -3px -2px 0 #FFFFFF,
130
130
  `,WebkitBackgroundClip:"text",WebkitTextFillColor:"#FFFFFF",backgroundClip:"text",paddingRight:"0.28em",zIndex:0},children:o.reward_value}),jsxRuntimeExports.jsx("div",{className:cn$1("absolute text-rounded-num-fill font-[800] whitespace-nowrap",m(o.reward_type,o.reward_value)),style:{background:f(o.reward_type),WebkitBackgroundClip:"text",WebkitTextFillColor:o.reward_type==="usdt"?"transparent":"#FFFFFF",backgroundClip:"text",fontSize:Number(m(o.reward_type,o.reward_value).replace("text-[","").replace("em]",""))+.3+"em",zIndex:2,paddingRight:"0.3em"},children:o.reward_value}),jsxRuntimeExports.jsx("div",{className:cn$1("absolute text-rounded-num font-[800] whitespace-nowrap",m(o.reward_type,o.reward_value)),style:{background:d(o.reward_type),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",fontSize:Number(m(o.reward_type,o.reward_value).replace("text-[","").replace("em]",""))+.3+"em",textShadow:`0.1em 0.1em 0 ${h(o.reward_type)}`,paddingRight:"0.3em",zIndex:1},children:o.reward_value})]})}const getRewardIcon=o=>{switch(o.reward_type){case"coins":return{icon:o.reward_value>=1e3?coin_1000_icon:o.reward_value>=300?coin_300_icon:o.reward_value>=100?coin_100_icon:(o.reward_value>=50,coin_50_icon),sPosition:o.reward_value>=100&&o.reward_value<300?"-rotate-15 -right-8 bottom-6":o.reward_value<100?"-rotate-15 -right-4 bottom-4":"-rotate-12 -right-8 -bottom"};case"usdt":return{icon:o.reward_value>=50?usdt_50_icon:o.reward_value>=20?usdt_20_icon:usdt_1_icon,sPosition:o.reward_value>=50?"-rotate-8 -left-6 bottom-13":"-rotate-6 right-2 -bottom-2"};case"gems":return{icon:o.reward_value>=1e3?gems_1000_icon:o.reward_value>=300?gems_300_icon:o.reward_value>=30?gems_30_icon:o.reward_value>=20?gems_20_icon:gems_10_icon,sPosition:"-rotate-12 -right-8 -bottom"};case"ton":case"telegram_premium":return{icon:telegram_icon,sPosition:"rotate-3 left-0 bottom-2"};case"double_balance":return{icon:question_icon,sPosition:"-rotate-5 right-0 bottom-0"};case"box":return{icon:o.reward_value===12?box_rare_icon:o.reward_value===13?box_epic_icon:o.reward_value===14?box_legend_icon:box_regular_icon,sPosition:"-rotate-4 -right-4 -bottom-2"};default:return{icon:"",sPosition:""}}},RewardTypeImage=reactExports.memo(({reward:o,className:l,badgeSize:u,wheelSpinState:d,shouldShake:f=!1})=>{const{icon:h,sPosition:m}=getRewardIcon(o);return reactExports.useEffect(()=>{var v,x,b;if(!f)return;(b=(x=(v=window.Telegram)==null?void 0:v.WebApp)==null?void 0:x.HapticFeedback)==null||b.impactOccurred("soft");const g=setInterval(()=>{var S,E,w;(w=(E=(S=window.Telegram)==null?void 0:S.WebApp)==null?void 0:E.HapticFeedback)==null||w.impactOccurred("soft")},2300);return()=>{clearInterval(g)}},[f]),jsxRuntimeExports.jsxs("div",{className:cn$1("relative",l),children:[u!==null&&d!=="SPINNING"&&jsxRuntimeExports.jsx(RewardTypeBadge,{reward:o,size:u??"s",className:cn$1(u==="s"&&`absolute bottom-0 ${m}`,u==="m"&&"mt-5 absolute -bottom-15 left-1/2 transform -translate-x-1/2",(o.reward_type==="coins"||o.reward_type==="usdt"||o.reward_type==="gems")&&"mb-2")}),jsxRuntimeExports.jsx(motion.img,{src:h,alt:"",className:cn$1("w-full h-full",o.reward_type==="box"&&"py-1.5 px-1.5",(o.reward_type==="coins"||o.reward_type==="usdt"||o.reward_type==="gems")&&"pb-3 px-1.5"),animate:{rotate:f?[0,-10,10,-10,10,-6,6,0]:0,scale:f?[1,1.08,1,1.08,1,1.05,1,1]:1,y:f?[0,-8,0,-8,0,-4,0,0]:0,x:f?[0,-2,2,-2,2,-1,1,0]:0},transition:f?{rotate:{duration:.9,repeat:Number.POSITIVE_INFINITY,repeatDelay:1.4,ease:"easeInOut"},scale:{duration:.9,repeat:Number.POSITIVE_INFINITY,repeatDelay:1.4,ease:[.34,1.56,.64,1]},y:{duration:.9,repeat:Number.POSITIVE_INFINITY,repeatDelay:1.4,ease:[.34,1.56,.64,1]},x:{duration:.9,repeat:Number.POSITIVE_INFINITY,repeatDelay:1.4,ease:"easeInOut"}}:{duration:0}}),jsxRuntimeExports.jsx(RewardBoxRareBadge,{reward:o}),(o.reward_type==="coins"||o.reward_type==="usdt"||o.reward_type==="gems")&&jsxRuntimeExports.jsx(RewardNumericOverlay,{reward:o,badgeSize:u})]})});function findPrizeIndex({prizes:o,targetReward:l,currentIndex:u}){const d=o.reduce((h,m,g)=>(l.reward_type==="coins"?m.reward_type==="coins"&&h.push(g):m.reward_type===l.reward_type&&m.reward_value===l.reward_value&&h.push(g),h),[]);if(d.length===0)return null;if(l.reward_type==="coins"){const h=l.reward_value,m=d.reduce((b,S)=>{const E=Math.abs(o[S].reward_value-h),w=Math.abs(o[b].reward_value-h);return E<w?S:b},d[0]),g=o[m].reward_value,v=d.filter(b=>o[b].reward_value===g);return v.find(b=>b>u)??v[0]}return d.find(h=>h>u)??d[0]}function getDistance(o,l,u){const d=Math.abs(o-l);return Math.min(d,u-d)}const PrizeCarousel=reactExports.memo(({prizes:o,wheelSpinState:l,actualReward:u,setSpinState:d,isSkipped:f=!1,animationPhase:h="carousel",isOpeningAnimationComplete:m=!0,onCarouselClick:g,viewMode:v="wheel"})=>{const[x,b]=useEmblaCarousel({axis:"y",loop:!0,dragFree:!1,align:"center",startIndex:Math.floor(o.length/4),watchDrag:!1,skipSnaps:!1,containScroll:!1}),[S,E]=reactExports.useState(0),w=reactExports.useRef(),T=reactExports.useRef(),C=reactExports.useRef(),M=reactExports.useRef(),A=reactExports.useCallback(()=>{var I,O,j,N,V,z;if(!b)return;const k=b.selectedScrollSnap();E(k),k!==S&&(l==="IDLE"?(j=(O=(I=window.Telegram)==null?void 0:I.WebApp)==null?void 0:O.HapticFeedback)==null||j.impactOccurred("soft"):l==="SPINNING"&&((z=(V=(N=window.Telegram)==null?void 0:N.WebApp)==null?void 0:V.HapticFeedback)==null||z.impactOccurred("light")))},[b,S,l]);return reactExports.useEffect(()=>{if(b)return A(),b.on("select",A),()=>{b.off("select",A)}},[b,A]),reactExports.useEffect(()=>{const k=()=>{T.current&&cancelAnimationFrame(T.current),w.current&&clearInterval(w.current)};if(!b)return k;if(l==="IDLE")return w.current=window.setInterval(()=>{b.scrollPrev()},2e3),k;if(l==="SPINNING"&&u){k();const I=findPrizeIndex({prizes:o,targetReward:u,currentIndex:b.selectedScrollSnap()});if(I===null)return d("STOPPED"),k;M.current=I,C.current=Date.now();const O=b.selectedScrollSnap(),j=o.length,z=(O-I+j)%j+(f?0:1)*j,W=()=>f?BOX_OPENING_SKIPPED_ANIMATION_DURATION_MS:BOX_OPENING_ANIMATION_DURATION_MS;let X=0;const ie=le=>{const K=L=>{const B=1-L;return 1-B*B*B};if(le<=.7)return K(le);const $=K(.7),G=(le-.7)/(1-.7);return $+G*(1-$)},oe=()=>{const le=Date.now(),Q=Math.max(1,W()),K=le-(C.current||le),$=Math.min(K/Q,1),L=ie($)*z,q=Math.min(z,Math.ceil(L-1e-6)),U=q-X;if(U>0){for(let te=0;te<U;te++)b.scrollPrev();X=q}if($<1){T.current=requestAnimationFrame(oe);return}const Y=()=>{var te,ae,ue;b.off("settle",Y),d("STOPPED"),(ue=(ae=(te=window.Telegram)==null?void 0:te.WebApp)==null?void 0:ae.HapticFeedback)==null||ue.impactOccurred("medium")};b.on("settle",Y)};T.current=requestAnimationFrame(oe)}return k},[b,l,u,d,o,f]),jsxRuntimeExports.jsx("button",{type:"button",className:"absolute inset-0 flex items-center justify-center overflow-hidden cursor-pointer",style:{"--slide-size":"max(160px, min(200px, 25vh))"},onClick:g,onKeyDown:g,onKeyUp:g,children:jsxRuntimeExports.jsxs("div",{className:"overflow-hidden h-full w-full",ref:x,children:[jsxRuntimeExports.jsx("div",{className:"flex h-full flex-col will-change-transform",children:o.map((k,I)=>{const O=getDistance(I,S,o.length),j=O===0,N=I===S,V=l==="IDLE"&&O===1?1:l==="IDLE"&&O>1?.6:l==="IDLE"&&O===0?1:l==="STOPPED"&&!j?0:1,z=l==="IDLE"&&j?.95:l==="IDLE"&&O===1||l==="IDLE"&&O>1?.65:l==="IDLE"&&O===0?.95:l==="STOPPED"&&j?1:l==="STOPPED"&&!j?0:.75,W=(I-S+o.length)%o.length,X=O!==0&&W>o.length/2,ie=O!==0&&!X,le=k.reward_type==="box"&&l==="STOPPED"&&h==="final"&&m,Q=l==="IDLE"?j||N?5:ie?15:-15:0,$=v==="result"||l==="STOPPED"&&(j||N)&&h==="final"&&!(k.reward_type==="coins"||k.reward_type==="usdt"||k.reward_type==="gems");return jsxRuntimeExports.jsx("div",{className:"flex min-h-0 items-center justify-center",style:{flex:"0 0 var(--slide-size)"},"data-prize-index":I,children:jsxRuntimeExports.jsxs(motion.div,{className:"relative will-change-transform will-change-opacity h-full aspect-square origin-center",initial:{scale:1.4,opacity:0,rotate:5},animate:{scale:z,opacity:V,rotate:Q},transition:{type:"spring",stiffness:500,damping:35,mass:2},children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-[-1]",style:{transform:"translate(0%, 2%)"},children:jsxRuntimeExports.jsx("div",{className:"rounded-full bg-white aspect-square",style:{width:l==="IDLE"&&j?"130%":"50%",height:l==="IDLE"&&j?"130%":"50%",opacity:l==="IDLE"&&j?.5:0,transition:"opacity 0.3s ease, width 0.3s ease, height 0.3s ease",mixBlendMode:"overlay"}})}),jsxRuntimeExports.jsx(RewardTypeImage,{reward:k,className:"w-full aspect-square",badgeSize:$?"m":"s",wheelSpinState:l,shouldShake:le})]})},`${k.reward_type}-${k.reward_value}-${I}`)})}),jsxRuntimeExports.jsx(Pointers,{wheelSpinState:l})]})})}),Pointers=reactExports.memo(({wheelSpinState:o})=>{const l=o==="SPINNING"?1:0,u=o==="SPINNING"?"200px":"10px";return jsxRuntimeExports.jsxs(motion.div,{className:"pointer-events-none absolute inset-0 flex items-center justify-center z-[-2]",initial:{gap:u,opacity:0},animate:{gap:u,opacity:l},transition:{duration:.4,ease:"easeInOut"},children:[jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",width:"20",height:"24",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:jsxRuntimeExports.jsx("path",{d:"M0 20.535V3.46502C0 1.09775 2.61346 -0.336891 4.61063 0.934038L18.0227 9.46902C19.8752 10.6479 19.8752 13.3521 18.0227 14.531L4.61063 23.066C2.61345 24.3369 0 22.9023 0 20.535Z",fill:"black"})}),jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",width:"20",height:"24",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:jsxRuntimeExports.jsx("path",{d:"M20 20.535V3.46502C20 1.09775 17.3865 -0.336891 15.3894 0.934038L1.97726 9.46902C0.124763 10.6479 0.124767 13.3521 1.97726 14.531L15.3894 23.066C17.3865 24.3369 20 22.9023 20 20.535Z",fill:"black"})})]})});function RaysAnimation({className:o,style:l}){return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1728 996",preserveAspectRatio:"xMidYMid slice",className:o,style:{...l},children:jsxRuntimeExports.jsxs("g",{"data-idx":"1",children:[jsxRuntimeExports.jsx("g",{transform:"matrix(1,0,0,1,864,498)","data-idx":"2",children:jsxRuntimeExports.jsxs("g",{"data-idx":"3",transform:"scale(1.2)",children:[jsxRuntimeExports.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 0 0",to:"360 0 0",dur:"18s",repeatCount:"indefinite",additive:"sum"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L1296 0 L1167.6556528015353 562.3133258963553 Z","data-idx":"4"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L808.0427832089188 1013.2536012785666 L288.38713040738355 1263.5065741876433 Z","data-idx":"5"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L-288.3871304073834 1263.5065741876433 L-808.0427832089186 1013.2536012785667 Z","data-idx":"6"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L-1167.655652801535 562.3133258963554 L-1296 1.5871422516949698e-13 Z","data-idx":"7"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L-1167.6556528015353 -562.3133258963552 L-808.0427832089189 -1013.2536012785665 Z","data-idx":"8"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L-288.3871304073837 -1263.5065741876433 L288.3871304073821 -1263.5065741876438 Z","data-idx":"9"}),jsxRuntimeExports.jsx("path",{fill:"#ffffff",d:"M0 0L808.0427832089184 -1013.2536012785667 L1167.6556528015356 -562.3133258963545 Z","data-idx":"10"}),jsxRuntimeExports.jsx("path",{strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#000000",fill:"#ffffff",d:"M0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0A0 0 0 0 0 0 0","data-idx":"11"})]})}),jsxRuntimeExports.jsx("g",{"data-idx":"13"})]})})}const DEFAULT_CONFIG$1={excitementChance:.4,excitementDistance:3,excitementMultiplier:3,mode:"progressive"},isExcitingPrize=o=>o.reward_type==="usdt"||o.reward_type==="coins"&&o.reward_value>=1e3||o.reward_type==="box"&&o.reward_value>=12;function generateExcitingPrizes(o,l,u={}){const d={...DEFAULT_CONFIG$1,...u};if(Math.random()>d.excitementChance)return o;const f=[...o],h=f.findIndex(v=>v.reward_type===l.reward_type&&v.reward_value===l.reward_value);if(h===-1)return o;const m=isExcitingPrize(l),g=v=>{const x=["coins","usdt","box"],b=x[Math.floor(Math.random()*x.length)],S=h-v,E=Math.max(1,3-S);switch(b){case"coins":return{reward_type:"coins",reward_value:500*E+Math.floor(Math.random()*500*E),extra:""};case"usdt":return{reward_type:"usdt",reward_value:.5*E+Math.floor(Math.random()*2*E),extra:""};case"box":{const T={1:[11,12,13],2:[11,12,13],3:[14]}[E];return{reward_type:"box",reward_value:T[Math.floor(Math.random()*T.length)],extra:""}}default:return{reward_type:"coins",reward_value:1e3,extra:""}}};if(d.mode==="dramatic"){const x=Math.max(0,h-3);for(let b=x;b<h;b++)b>=0&&b<f.length&&(f[b]=g(b))}else{const v=Math.min(3,h);for(let x=0;x<v;x++){const b=h-v+x;b>=0&&b<f.length&&(f[b]=g(b))}if(!m){const x=d.excitementDistance;if(x<f.length){const b=Math.random();b<.4?f[x]={reward_type:"usdt",reward_value:25+Math.floor(Math.random()*25),extra:""}:b<.7?f[x]={reward_type:"box",reward_value:14,extra:""}:f[x]={reward_type:"coins",reward_value:3e3+Math.floor(Math.random()*2e3),extra:""}}}}return f}function shuffleArray(o){const l=[...o];for(let u=l.length-1;u>0;u--){const d=Math.floor(Math.random()*(u+1));[l[u],l[d]]=[l[d],l[u]]}return l}const sortPrizesDistributed=o=>{const l=o.filter(S=>S.reward_type==="box"),u=o.filter(S=>S.reward_type!=="box");if(l.length===0)return shuffleArray(u);if(u.length===0)return l;const d=[],f=o.length,h=shuffleArray([...u]),m=Math.floor(f/l.length),g=S=>{const E=Math.floor(S*.3);return Math.max(1,S+(Math.random()>.5?1:-1)*Math.floor(Math.random()*E))};let v=0,x=0,b=Math.floor(Math.random()*Math.min(m,f/2));for(let S=0;S<f;S++)if(S===b&&v<l.length){if(d.push(l[v]),v++,v<l.length){const w=g(m);b=S+w,b>=f&&(b=f-1)}}else x<h.length&&(d.push(h[x]),x++);for(;v<l.length;)d.push(l[v]),v++;for(;x<h.length;)d.push(h[x]),x++;return d},boxOpenBg=assetUrl("boxes/boxOpenBg_2.webp"),overlayImage=assetUrl("boxes/overlay.webp"),COMMON_BOX={reward_type:"box",reward_value:11},BoxOpeningModal=()=>{const{t:o}=useTranslation(),{data:{inventory:l}}=useProfile(),{viewMode:u,isBoxOpeningModalOpen:d,closeBoxModal:f,openBoxModal:h,currentBoxId:m,wheelSpinState:g,animationPhase:v,isSkipped:x,setWheelSpinState:b,setAnimationPhase:S,setSkipped:E}=useBoxOpening(),{showSnackbar:w}=useSnackbar(),T=reactExports.useRef(!1),C=useFireConfetti(),[M,A]=reactExports.useState([]),[k,I]=reactExports.useState(null),[O,j]=reactExports.useState([]),N=reactExports.useRef(null),V=reactExports.useRef(0),[z,W]=reactExports.useState(!1),{setIsOpen:X}=useInventoryModalStore(),[ie,oe]=reactExports.useState(!1),{mutate:le,isPending:Q}=useBoxRewards({onSuccess(ve){const{rewards:fe,recent_rewards:ee}=ve,de=[...fe,...fe,...fe,...fe],ge=sortPrizesDistributed(de);A(ge),j(Array.isArray(ee)?ee:[])},onError(){w(o("common.error"),{type:"error"}),f()}}),{mutateAsync:K,isPending:$}=useRevealReward({onError(){w(o("common.error"),{type:"error"}),f()}});reactExports.useEffect(()=>{if(m&&u==="wheel"){if(I(null),!m)return;le({boxId:m})}m&&u==="result"&&(I({...COMMON_BOX,extra:`:${m}`}),A([COMMON_BOX]))},[m,u,le]),reactExports.useEffect(()=>{if(d){oe(!1);const ve=setTimeout(()=>{oe(!0)},1700);return()=>clearTimeout(ve)}oe(!1)},[d]),reactExports.useEffect(()=>{if(g==="STOPPED"&&v==="carousel"){const ve=setTimeout(()=>{S("transition")},150);return()=>clearTimeout(ve)}},[g,v,S]),reactExports.useEffect(()=>{if(v==="transition"){const ve=setTimeout(()=>{var fe,ee,de;S("final"),(de=(ee=(fe=window.Telegram)==null?void 0:fe.WebApp)==null?void 0:ee.HapticFeedback)==null||de.impactOccurred("medium")},330);return()=>clearTimeout(ve)}},[v,S]),reactExports.useEffect(()=>{function ve(){N.current!==null&&(clearInterval(N.current),N.current=null)}if(d&&u==="wheel"&&g==="IDLE"&&O.length>0){const ee=()=>{const de=V.current%O.length,ge=O[de];toast.custom(()=>jsxRuntimeExports.jsx(EventToast,{recentReward:ge})),V.current=(V.current+1)%O.length};ee(),ee(),ve(),N.current=window.setInterval(()=>{ee()},3e3)}else ve(),V.current=0,toast.dismiss();return()=>{ve(),V.current=0,toast.dismiss()}},[d,u,g,O]),reactExports.useEffect(()=>{d&&(T.current||g==="STOPPED"&&v==="final"&&k&&u==="wheel"&&((k==null?void 0:k.reward_type)==="box"&&C(),(k.reward_type==="coins"||k.reward_type==="usdt"||k.reward_type==="gems")&&(T.current=!0)))},[u,g,v,k,d,C]);const G=reactExports.useCallback(async()=>{var ve,fe,ee;try{if(!m||$)return;T.current=!1;const de=await K({boxId:m});I(de);const ge=Math.random()<.2,he=generateExcitingPrizes([de,...M],de,{mode:ge?"dramatic":"progressive",excitementChance:ge?1:.45,excitementDistance:ge?1:3,excitementMultiplier:ge?4:3});A(he),b("SPINNING"),(ee=(fe=(ve=window.Telegram)==null?void 0:ve.WebApp)==null?void 0:fe.HapticFeedback)==null||ee.impactOccurred("light")}catch(de){console.error(de),w(o("common.error"),{type:"error"}),f()}},[m,$,K,M,b,f,w,o]),L=()=>{f()},B=reactExports.useCallback(()=>{var ve;if(k){const fe=(ve=k.extra)==null?void 0:ve.match(/:(\d+)/);fe&&h(Number(fe[1]))}else f()},[k,h,f]),q=()=>{var ve,fe;(fe=(ve=window.Telegram)==null?void 0:ve.WebApp)==null||fe.HapticFeedback.impactOccurred("soft"),W(!0),f()},U=reactExports.useCallback(()=>{var ve,fe;if(!Y){G();return}(fe=(ve=window.Telegram)==null?void 0:ve.WebApp)==null||fe.HapticFeedback.impactOccurred("soft"),(k==null?void 0:k.reward_type)==="usdt"||(k==null?void 0:k.reward_type)==="coins"?f():(k==null?void 0:k.reward_type)==="box"&&B()},[B,G,k,f]);reactExports.useEffect(()=>{if(!d&&z){const ve=setTimeout(()=>{X(!0),W(!1)},100);return()=>clearTimeout(ve)}},[d,z,X]);const Y=g==="STOPPED"&&v==="final",te=k?k.reward_type==="box":!1,ae=reactExports.useMemo(()=>g==="SPINNING"?`linear-gradient(rgba(187, 255, 255, 0), rgba(168, 255, 157, 0.9)), url(${boxOpenBg})`:k&&k.reward_type==="box"&&k.reward_value===12?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #1AF3FB 36.93%, #1D82FF 100%), url(${boxOpenBg})`:k&&k.reward_type==="box"&&k.reward_value===13?`linear-gradient(rgba(238, 86, 255, 0.6), rgba(238, 206, 243, 0.5)), url(${boxOpenBg})`:k&&k.reward_type==="box"&&k.reward_value===14?`linear-gradient(rgba(255, 206, 133, 0.6), rgba(239, 255, 151, 0.5)), url(${boxOpenBg})`:k&&k.reward_type==="box"&&k.reward_value===11?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #9FFAFC 36.93%, #01DEF6 100%), url(${boxOpenBg})`:k&&k.reward_type==="coins"?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #FF4 36.93%, #F4AB00 100%), url(${boxOpenBg})`:k&&k.reward_type==="usdt"?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #D5FF79 36.93%, #00CA07 100%), url(${boxOpenBg})`:k&&k.reward_type==="gems"?`radial-gradient(95.44% 55.12% at 50.13% 55.12%, #78E6FF 36.93%, #1D82FF 100%), url(${boxOpenBg})`:`linear-gradient(rgba(187, 255, 255, 0.9), rgba(168, 255, 157, 0.9)), url(${boxOpenBg})`,[k,g]),ue=Q||$;return jsxRuntimeExports.jsxs(Drawer,{open:d,onOpenChange:ve=>{ve||f()},headerOptions:{before:!x&&g==="SPINNING"&&jsxRuntimeExports.jsx(Button,{size:"s",mode:"white",className:"!h-7 text-tgui-button animate-in fade-in duration-300",onClick:()=>{E(!0)},children:o("box_open.skip")})},style:{backgroundPosition:"50%",backgroundSize:"cover",backgroundRepeat:"no-repeat",maxHeight:"100dvh",borderTopLeftRadius:0,borderTopRightRadius:0,zIndex:11e3},className:"pb-0 box-opening-modal-drawer",closeButtonStyles:{color:"#000"},children:[jsxRuntimeExports.jsx(AnimatedFullscreen,{isOpen:d,backgroundImage:ae,animationType:"scale",overlayImage,showOverlay:g==="SPINNING",children:jsxRuntimeExports.jsxs("div",{className:"relative flex flex-col h-[100dvh] overflow-hidden",children:[jsxRuntimeExports.jsxs(motion.div,{className:cn$1("absolute inset-0"),initial:{y:"-100vh"},animate:{y:0},transition:{type:"spring",stiffness:200,damping:20,mass:1.2},children:[Q?jsxRuntimeExports.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsxRuntimeExports.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-tgui-button"})}):jsxRuntimeExports.jsx(PrizeCarousel,{prizes:M,wheelSpinState:g,setSpinState:b,actualReward:k,isSkipped:x,animationPhase:v,isOpeningAnimationComplete:ie,viewMode:u,onCarouselClick:g==="IDLE"||g==="STOPPED"&&v==="final"?U:void 0}),jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0 flex items-center justify-center",initial:{opacity:0,scale:1.3,y:100},animate:{opacity:Y?1:0,scale:Y?1:1.3,y:Y?-0:100},transition:{duration:.6,ease:[.34,1.56,.64,1]},style:{pointerEvents:Y?"auto":"none",zIndex:-1},children:jsxRuntimeExports.jsx("div",{className:"text-center flex flex-col items-center",children:jsxRuntimeExports.jsx("div",{className:"will-change-transform will-change-opacity",children:jsxRuntimeExports.jsx(Title$1,{style:{fontSize:36,lineHeight:"41px",color:"#000",fontWeight:700,zIndex:1,marginBottom:te?"40vh":"32vh"},children:o("box_open.you_ve_got")})})})}),jsxRuntimeExports.jsx(motion.div,{className:"absolute left-1/2 top-1/2 pointer-events-none",style:{width:"110vw",height:"110vh",maxWidth:"110vw",maxHeight:"110vh",zIndex:-2,x:"-50%",y:"-50%"},initial:{opacity:0,scale:1},animate:{opacity:Y&&d?.4:0},transition:{opacity:{duration:.6,ease:"easeOut",delay:Y&&d?.3:1}},children:jsxRuntimeExports.jsx(RaysAnimation,{className:"w-full h-full",style:{mixBlendMode:"overlay"}})})]}),jsxRuntimeExports.jsxs("div",{className:"fixed bottom-0 left-0 right-0 w-full",children:[jsxRuntimeExports.jsx(motion.div,{className:"pb-6",style:{paddingLeft:10,paddingRight:10},initial:{y:0},animate:{y:Q||g==="SPINNING"||g==="STOPPED"&&v!=="final"?200:0},transition:{type:"spring",stiffness:300,damping:30},children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxRuntimeExports.jsx(AnimatePresence,{children:(l==null?void 0:l.length)&&l.length>1&&Y&&g==="STOPPED"&&v==="final"&&jsxRuntimeExports.jsx(motion.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},transition:{duration:.3,ease:"easeOut"},children:jsxRuntimeExports.jsx(Button,{size:"s",mode:"white",onClick:q,className:"text-black",style:{height:42,outline:"1px solid rgba(0, 0, 0, 0.1)",boxShadow:"0px 2px 6px 0px rgba(0, 0, 0, 0.1)",paddingLeft:"5px"},loading:ue,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-0 w-full",children:[jsxRuntimeExports.jsx(Badge,{type:"number",mode:"primary",large:!0,children:l.length}),jsxRuntimeExports.jsx(Subheadline,{weight:"2",className:"text-black whitespace-nowrap",children:o("box_open.button_unopened_boxes")}),jsxRuntimeExports.jsx("div",{className:"flex items-center overflow-hidden px-1.5",children:l.slice(0,3).map((ve,fe)=>jsxRuntimeExports.jsx("div",{className:cn$1("flex items-center justify-center flex-shrink-0",fe!==0&&"-ml-3"),children:jsxRuntimeExports.jsx("img",{src:getLootboxImage(ve),alt:"",className:"size-7 object-contain"})},`inventory-preview-${ve.id}`))}),jsxRuntimeExports.jsx(Icon,{name:"chevronRight",size:14,className:"opacity-40 flex-shrink-0"})]})})})}),jsxRuntimeExports.jsx(motion.div,{layout:!0,transition:{duration:.3,ease:"easeOut"},className:"w-full flex items-start justify-between gap-2.5",children:jsxRuntimeExports.jsxs(motion.div,{layout:!0,className:"flex-1",style:{paddingLeft:Y&&((k==null?void 0:k.reward_type)==="coins"||(k==null?void 0:k.reward_type)==="usdt")?0:20,paddingRight:Y&&((k==null?void 0:k.reward_type)==="coins"||(k==null?void 0:k.reward_type)==="usdt")?0:20},transition:{duration:.3,ease:"easeOut"},children:[(!Y||te)&&jsxRuntimeExports.jsx(ConfettiParticles,{count:40,margin:8,padding:8}),jsxRuntimeExports.jsx(Button,{size:"l",stretched:!0,mode:Y?"white":"filled",onClick:te?B:Y?L:G,style:{borderRadius:"25px",background:Y?"#FFFFFF":"var(--tgui--button_color)",outline:Y?"var(--retina-separator-width) solid rgba(0, 0, 0, 0.15)":"var(--retina-separator-width) solid rgba(0,0,0,0)",color:Y?"#000":"var(--tgui--button_text_color)",boxShadow:Y?"0 10px 20px 0 rgba(0, 0, 0, 0.40)":"none",transition:"background 0.3s ease, outline 0.3s ease, color 0.3s ease, box-shadow 0.3s ease"},loading:ue,children:o(te&&Y?"box_open.button_open_now":Y?"common.ok":"box_open.button_reveal_reward")})]})})]})}),jsxRuntimeExports.jsx(BottomSentinelSafeArea,{})]})]})}),jsxRuntimeExports.jsx(AnimatePresence,{children:d&&u==="wheel"&&g==="IDLE"&&O.length>0&&jsxRuntimeExports.jsx(motion.div,{className:"absolute w-[130px] pl-2.5 text-left",style:{bottom:getEventsBottomOffset()+94,right:16,zIndex:12001},initial:{y:40,opacity:0},animate:{y:0,opacity:1},exit:{y:60,opacity:0},transition:{duration:.25,ease:"easeInOut"},children:jsxRuntimeExports.jsx(Caption,{weight:"2",className:"!text-black whitespace-nowrap",children:o("box_open.recent_rewards")})},"recent-rewards-label")})]})};var reactConfetti_min$1={exports:{}},reactConfetti_min=reactConfetti_min$1.exports,hasRequiredReactConfetti_min;function requireReactConfetti_min(){return hasRequiredReactConfetti_min||(hasRequiredReactConfetti_min=1,function(o,l){(function(u,d){o.exports=d(requireReact())})(typeof self<"u"?self:reactConfetti_min,function(u){return function(d){var f={};function h(m){if(f[m])return f[m].exports;var g=f[m]={i:m,l:!1,exports:{}};return d[m].call(g.exports,g,g.exports,h),g.l=!0,g.exports}return h.m=d,h.c=f,h.d=function(m,g,v){h.o(m,g)||Object.defineProperty(m,g,{enumerable:!0,get:v})},h.r=function(m){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},h.t=function(m,g){if(1&g&&(m=h(m)),8&g||4&g&&typeof m=="object"&&m&&m.__esModule)return m;var v=Object.create(null);if(h.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:m}),2&g&&typeof m!="string")for(var x in m)h.d(v,x,(function(b){return m[b]}).bind(null,x));return v},h.n=function(m){var g=m&&m.__esModule?function(){return m.default}:function(){return m};return h.d(g,"a",g),g},h.o=function(m,g){return Object.prototype.hasOwnProperty.call(m,g)},h.p="",h(h.s=2)}([function(d,f){d.exports=u},function(d,f,h){var m={linear:function(g,v,x,b){return(x-v)*g/b+v},easeInQuad:function(g,v,x,b){return(x-v)*(g/=b)*g+v},easeOutQuad:function(g,v,x,b){return-(x-v)*(g/=b)*(g-2)+v},easeInOutQuad:function(g,v,x,b){var S=x-v;return(g/=b/2)<1?S/2*g*g+v:-S/2*(--g*(g-2)-1)+v},easeInCubic:function(g,v,x,b){return(x-v)*(g/=b)*g*g+v},easeOutCubic:function(g,v,x,b){return(x-v)*((g=g/b-1)*g*g+1)+v},easeInOutCubic:function(g,v,x,b){var S=x-v;return(g/=b/2)<1?S/2*g*g*g+v:S/2*((g-=2)*g*g+2)+v},easeInQuart:function(g,v,x,b){return(x-v)*(g/=b)*g*g*g+v},easeOutQuart:function(g,v,x,b){return-(x-v)*((g=g/b-1)*g*g*g-1)+v},easeInOutQuart:function(g,v,x,b){var S=x-v;return(g/=b/2)<1?S/2*g*g*g*g+v:-S/2*((g-=2)*g*g*g-2)+v},easeInQuint:function(g,v,x,b){return(x-v)*(g/=b)*g*g*g*g+v},easeOutQuint:function(g,v,x,b){return(x-v)*((g=g/b-1)*g*g*g*g+1)+v},easeInOutQuint:function(g,v,x,b){var S=x-v;return(g/=b/2)<1?S/2*g*g*g*g*g+v:S/2*((g-=2)*g*g*g*g+2)+v},easeInSine:function(g,v,x,b){var S=x-v;return-S*Math.cos(g/b*(Math.PI/2))+S+v},easeOutSine:function(g,v,x,b){return(x-v)*Math.sin(g/b*(Math.PI/2))+v},easeInOutSine:function(g,v,x,b){return-(x-v)/2*(Math.cos(Math.PI*g/b)-1)+v},easeInExpo:function(g,v,x,b){return g==0?v:(x-v)*Math.pow(2,10*(g/b-1))+v},easeOutExpo:function(g,v,x,b){var S=x-v;return g==b?v+S:S*(1-Math.pow(2,-10*g/b))+v},easeInOutExpo:function(g,v,x,b){var S=x-v;return g===0?v:g===b?v+S:(g/=b/2)<1?S/2*Math.pow(2,10*(g-1))+v:S/2*(2-Math.pow(2,-10*--g))+v},easeInCirc:function(g,v,x,b){return-(x-v)*(Math.sqrt(1-(g/=b)*g)-1)+v},easeOutCirc:function(g,v,x,b){return(x-v)*Math.sqrt(1-(g=g/b-1)*g)+v},easeInOutCirc:function(g,v,x,b){var S=x-v;return(g/=b/2)<1?-S/2*(Math.sqrt(1-g*g)-1)+v:S/2*(Math.sqrt(1-(g-=2)*g)+1)+v},easeInElastic:function(g,v,x,b){var S,E,w,T=x-v;return w=1.70158,g===0?v:(g/=b)==1?v+T:((E=0)||(E=.3*b),(S=T)<Math.abs(T)?(S=T,w=E/4):w=E/(2*Math.PI)*Math.asin(T/S),-S*Math.pow(2,10*(g-=1))*Math.sin((g*b-w)*(2*Math.PI)/E)+v)},easeOutElastic:function(g,v,x,b){var S,E,w,T=x-v;return w=1.70158,g===0?v:(g/=b)==1?v+T:((E=0)||(E=.3*b),(S=T)<Math.abs(T)?(S=T,w=E/4):w=E/(2*Math.PI)*Math.asin(T/S),S*Math.pow(2,-10*g)*Math.sin((g*b-w)*(2*Math.PI)/E)+T+v)},easeInOutElastic:function(g,v,x,b){var S,E,w,T=x-v;return w=1.70158,g===0?v:(g/=b/2)==2?v+T:((E=0)||(E=b*.44999999999999996),(S=T)<Math.abs(T)?(S=T,w=E/4):w=E/(2*Math.PI)*Math.asin(T/S),g<1?S*Math.pow(2,10*(g-=1))*Math.sin((g*b-w)*(2*Math.PI)/E)*-.5+v:S*Math.pow(2,-10*(g-=1))*Math.sin((g*b-w)*(2*Math.PI)/E)*.5+T+v)},easeInBack:function(g,v,x,b,S){return S===void 0&&(S=1.70158),(x-v)*(g/=b)*g*((S+1)*g-S)+v},easeOutBack:function(g,v,x,b,S){return S===void 0&&(S=1.70158),(x-v)*((g=g/b-1)*g*((S+1)*g+S)+1)+v},easeInOutBack:function(g,v,x,b,S){var E=x-v;return S===void 0&&(S=1.70158),(g/=b/2)<1?E/2*(g*g*((1+(S*=1.525))*g-S))+v:E/2*((g-=2)*g*((1+(S*=1.525))*g+S)+2)+v},easeInBounce:function(g,v,x,b){var S=x-v;return S-m.easeOutBounce(b-g,0,S,b)+v},easeOutBounce:function(g,v,x,b){var S=x-v;return(g/=b)<.36363636363636365?S*(7.5625*g*g)+v:g<.7272727272727273?S*(7.5625*(g-=.5454545454545454)*g+.75)+v:g<.9090909090909091?S*(7.5625*(g-=.8181818181818182)*g+.9375)+v:S*(7.5625*(g-=.9545454545454546)*g+.984375)+v},easeInOutBounce:function(g,v,x,b){var S=x-v;return g<b/2?.5*m.easeInBounce(2*g,0,S,b)+v:.5*m.easeOutBounce(2*g-b,0,S,b)+.5*S+v}};d.exports=m},function(d,f,h){d.exports=h(3)},function(d,f,h){h.r(f),h.d(f,"ReactConfetti",function(){return fe});var m,g,v=h(0),x=h.n(v),b=h(1),S=h.n(b);function E(ee,de){return ee+Math.random()*(de-ee)}function w(ee,de){for(var ge=0;ge<de.length;ge++){var he=de[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ee,he.key,he)}}function T(ee,de,ge){return de in ee?Object.defineProperty(ee,de,{value:ge,enumerable:!0,configurable:!0,writable:!0}):ee[de]=ge,ee}(function(ee){ee[ee.Circle=0]="Circle",ee[ee.Square=1]="Square",ee[ee.Strip=2]="Strip"})(m||(m={})),function(ee){ee[ee.Positive=1]="Positive",ee[ee.Negative=-1]="Negative"}(g||(g={}));var C=function(){function ee(he,Se,be,_e){(function(Me,$e){if(!(Me instanceof $e))throw new TypeError("Cannot call a class as a function")})(this,ee),T(this,"context",void 0),T(this,"radius",void 0),T(this,"x",void 0),T(this,"y",void 0),T(this,"w",void 0),T(this,"h",void 0),T(this,"vx",void 0),T(this,"vy",void 0),T(this,"shape",void 0),T(this,"angle",void 0),T(this,"angularSpin",void 0),T(this,"color",void 0),T(this,"rotateY",void 0),T(this,"rotationDirection",void 0),T(this,"getOptions",void 0),this.getOptions=Se;var je,He,Be=this.getOptions(),rt=Be.colors,Ke=Be.initialVelocityX,we=Be.initialVelocityY;this.context=he,this.x=be,this.y=_e,this.w=E(5,20),this.h=E(5,20),this.radius=E(5,10),this.vx=typeof Ke=="number"?E(-Ke,Ke):E(Ke.min,Ke.max),this.vy=typeof we=="number"?E(-we,0):E(we.min,we.max),this.shape=(je=0,He=2,Math.floor(je+Math.random()*(He-je+1))),this.angle=E(0,360)*Math.PI/180,this.angularSpin=E(-.2,.2),this.color=rt[Math.floor(Math.random()*rt.length)],this.rotateY=E(0,1),this.rotationDirection=E(0,1)?g.Positive:g.Negative}var de,ge;return de=ee,(ge=[{key:"update",value:function(){var he=this.getOptions(),Se=he.gravity,be=he.wind,_e=he.friction,je=he.opacity,He=he.drawShape;this.x+=this.vx,this.y+=this.vy,this.vy+=Se,this.vx+=be,this.vx*=_e,this.vy*=_e,this.rotateY>=1&&this.rotationDirection===g.Positive?this.rotationDirection=g.Negative:this.rotateY<=-1&&this.rotationDirection===g.Negative&&(this.rotationDirection=g.Positive);var Be=.1*this.rotationDirection;if(this.rotateY+=Be,this.angle+=this.angularSpin,this.context.save(),this.context.translate(this.x,this.y),this.context.rotate(this.angle),this.context.scale(1,this.rotateY),this.context.rotate(this.angle),this.context.beginPath(),this.context.fillStyle=this.color,this.context.strokeStyle=this.color,this.context.globalAlpha=je,this.context.lineCap="round",this.context.lineWidth=2,He&&typeof He=="function")He.call(this,this.context);else switch(this.shape){case m.Circle:this.context.beginPath(),this.context.arc(0,0,this.radius,0,2*Math.PI),this.context.fill();break;case m.Square:this.context.fillRect(-this.w/2,-this.h/2,this.w,this.h);break;case m.Strip:this.context.fillRect(-this.w/6,-this.h/2,this.w/3,this.h)}this.context.closePath(),this.context.restore()}}])&&w(de.prototype,ge),ee}();function M(ee,de,ge){return de in ee?Object.defineProperty(ee,de,{value:ge,enumerable:!0,configurable:!0,writable:!0}):ee[de]=ge,ee}var A=function ee(de,ge){var he=this;(function(be,_e){if(!(be instanceof _e))throw new TypeError("Cannot call a class as a function")})(this,ee),M(this,"canvas",void 0),M(this,"context",void 0),M(this,"getOptions",void 0),M(this,"x",0),M(this,"y",0),M(this,"w",0),M(this,"h",0),M(this,"lastNumberOfPieces",0),M(this,"tweenInitTime",Date.now()),M(this,"particles",[]),M(this,"particlesGenerated",0),M(this,"removeParticleAt",function(be){he.particles.splice(be,1)}),M(this,"getParticle",function(){var be=E(he.x,he.w+he.x),_e=E(he.y,he.h+he.y);return new C(he.context,he.getOptions,be,_e)}),M(this,"animate",function(){var be=he.canvas,_e=he.context,je=he.particlesGenerated,He=he.lastNumberOfPieces,Be=he.getOptions(),rt=Be.run,Ke=Be.recycle,we=Be.numberOfPieces,Me=Be.debug,$e=Be.tweenFunction,Qe=Be.tweenDuration;if(!rt)return!1;var Oe=he.particles.length,tt=Ke?Oe:je,it=Date.now();if(tt<we){He!==we&&(he.tweenInitTime=it,he.lastNumberOfPieces=we);for(var ft=he.tweenInitTime,ut=$e(it-ft>Qe?Qe:Math.max(0,it-ft),tt,we,Qe),xt=Math.round(ut-tt),ct=0;ct<xt;ct++)he.particles.push(he.getParticle());he.particlesGenerated+=xt}return Me&&(_e.font="12px sans-serif",_e.fillStyle="#333",_e.textAlign="right",_e.fillText("Particles: ".concat(Oe),be.width-10,be.height-20)),he.particles.forEach(function(qe,Ae){qe.update(),(qe.y>be.height||qe.y<-100||qe.x>be.width+100||qe.x<-100)&&(Ke&&tt<=we?he.particles[Ae]=he.getParticle():he.removeParticleAt(Ae))}),Oe>0||tt<we}),this.canvas=de;var Se=this.canvas.getContext("2d");if(!Se)throw new Error("Could not get canvas context");this.context=Se,this.getOptions=ge};function k(ee,de){var ge=Object.keys(ee);if(Object.getOwnPropertySymbols){var he=Object.getOwnPropertySymbols(ee);de&&(he=he.filter(function(Se){return Object.getOwnPropertyDescriptor(ee,Se).enumerable})),ge.push.apply(ge,he)}return ge}function I(ee){for(var de=1;de<arguments.length;de++){var ge=arguments[de]!=null?arguments[de]:{};de%2?k(Object(ge),!0).forEach(function(he){j(ee,he,ge[he])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ee,Object.getOwnPropertyDescriptors(ge)):k(Object(ge)).forEach(function(he){Object.defineProperty(ee,he,Object.getOwnPropertyDescriptor(ge,he))})}return ee}function O(ee,de){for(var ge=0;ge<de.length;ge++){var he=de[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ee,he.key,he)}}function j(ee,de,ge){return de in ee?Object.defineProperty(ee,de,{value:ge,enumerable:!0,configurable:!0,writable:!0}):ee[de]=ge,ee}var N={width:typeof window<"u"?window.innerWidth:300,height:typeof window<"u"?window.innerHeight:200,numberOfPieces:200,friction:.99,wind:0,gravity:.1,initialVelocityX:4,initialVelocityY:10,colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548"],opacity:1,debug:!1,tweenFunction:S.a.easeInOutQuad,tweenDuration:5e3,recycle:!0,run:!0},V=function(){function ee(he,Se){var be=this;(function(je,He){if(!(je instanceof He))throw new TypeError("Cannot call a class as a function")})(this,ee),j(this,"canvas",void 0),j(this,"context",void 0),j(this,"_options",void 0),j(this,"generator",void 0),j(this,"rafId",void 0),j(this,"setOptionsWithDefaults",function(je){var He={confettiSource:{x:0,y:0,w:be.canvas.width,h:0}};be._options=I(I(I({},He),N),je),Object.assign(be,je.confettiSource)}),j(this,"update",function(){var je=be.options,He=je.run,Be=je.onConfettiComplete,rt=be.canvas,Ke=be.context;He&&(Ke.fillStyle="white",Ke.clearRect(0,0,rt.width,rt.height)),be.generator.animate()?be.rafId=requestAnimationFrame(be.update):(Be&&typeof Be=="function"&&be.generator.particlesGenerated>0&&Be.call(be,be),be._options.run=!1)}),j(this,"reset",function(){be.generator&&be.generator.particlesGenerated>0&&(be.generator.particlesGenerated=0,be.generator.particles=[],be.generator.lastNumberOfPieces=0)}),j(this,"stop",function(){be.options={run:!1},be.rafId&&(cancelAnimationFrame(be.rafId),be.rafId=void 0)}),this.canvas=he;var _e=this.canvas.getContext("2d");if(!_e)throw new Error("Could not get canvas context");this.context=_e,this.generator=new A(this.canvas,function(){return be.options}),this.options=Se,this.update()}var de,ge;return de=ee,(ge=[{key:"options",get:function(){return this._options},set:function(he){var Se=this._options&&this._options.run,be=this._options&&this._options.recycle;this.setOptionsWithDefaults(he),this.generator&&(Object.assign(this.generator,this.options.confettiSource),typeof he.recycle=="boolean"&&he.recycle&&be===!1&&(this.generator.lastNumberOfPieces=this.generator.particles.length)),typeof he.run=="boolean"&&he.run&&Se===!1&&this.update()}}])&&O(de.prototype,ge),ee}();function z(ee){return function(de){if(Array.isArray(de))return K(de)}(ee)||function(de){if(typeof Symbol<"u"&&Symbol.iterator in Object(de))return Array.from(de)}(ee)||Q(ee)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
131
131
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W(ee){return(W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(de){return typeof de}:function(de){return de&&typeof Symbol=="function"&&de.constructor===Symbol&&de!==Symbol.prototype?"symbol":typeof de})(ee)}function X(){return(X=Object.assign||function(ee){for(var de=1;de<arguments.length;de++){var ge=arguments[de];for(var he in ge)Object.prototype.hasOwnProperty.call(ge,he)&&(ee[he]=ge[he])}return ee}).apply(this,arguments)}function ie(ee,de){var ge=Object.keys(ee);if(Object.getOwnPropertySymbols){var he=Object.getOwnPropertySymbols(ee);de&&(he=he.filter(function(Se){return Object.getOwnPropertyDescriptor(ee,Se).enumerable})),ge.push.apply(ge,he)}return ge}function oe(ee){for(var de=1;de<arguments.length;de++){var ge=arguments[de]!=null?arguments[de]:{};de%2?ie(Object(ge),!0).forEach(function(he){te(ee,he,ge[he])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ee,Object.getOwnPropertyDescriptors(ge)):ie(Object(ge)).forEach(function(he){Object.defineProperty(ee,he,Object.getOwnPropertyDescriptor(ge,he))})}return ee}function le(ee,de){return function(ge){if(Array.isArray(ge))return ge}(ee)||function(ge,he){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(ge)))){var Se=[],be=!0,_e=!1,je=void 0;try{for(var He,Be=ge[Symbol.iterator]();!(be=(He=Be.next()).done)&&(Se.push(He.value),!he||Se.length!==he);be=!0);}catch(rt){_e=!0,je=rt}finally{try{be||Be.return==null||Be.return()}finally{if(_e)throw je}}return Se}}(ee,de)||Q(ee,de)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
132
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Q(ee,de){if(ee){if(typeof ee=="string")return K(ee,de);var ge=Object.prototype.toString.call(ee).slice(8,-1);return ge==="Object"&&ee.constructor&&(ge=ee.constructor.name),ge==="Map"||ge==="Set"?Array.from(ee):ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ge)?K(ee,de):void 0}}function K(ee,de){(de==null||de>ee.length)&&(de=ee.length);for(var ge=0,he=new Array(de);ge<de;ge++)he[ge]=ee[ge];return he}function $(ee,de){if(!(ee instanceof de))throw new TypeError("Cannot call a class as a function")}function G(ee,de){for(var ge=0;ge<de.length;ge++){var he=de[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ee,he.key,he)}}function L(ee,de){return(L=Object.setPrototypeOf||function(ge,he){return ge.__proto__=he,ge})(ee,de)}function B(ee){var de=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var ge,he=Y(ee);if(de){var Se=Y(this).constructor;ge=Reflect.construct(he,arguments,Se)}else ge=he.apply(this,arguments);return q(this,ge)}}function q(ee,de){return!de||W(de)!=="object"&&typeof de!="function"?U(ee):de}function U(ee){if(ee===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee}function Y(ee){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(de){return de.__proto__||Object.getPrototypeOf(de)})(ee)}function te(ee,de,ge){return de in ee?Object.defineProperty(ee,de,{value:ge,enumerable:!0,configurable:!0,writable:!0}):ee[de]=ge,ee}var ae=x.a.createRef(),ue=function(ee){(function(be,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Super expression must either be null or a function");be.prototype=Object.create(_e&&_e.prototype,{constructor:{value:be,writable:!0,configurable:!0}}),_e&&L(be,_e)})(Se,ee);var de,ge,he=B(Se);function Se(be){var _e;$(this,Se);for(var je=arguments.length,He=new Array(je>1?je-1:0),Be=1;Be<je;Be++)He[Be-1]=arguments[Be];return te(U(_e=he.call.apply(he,[this,be].concat(He))),"canvas",x.a.createRef()),te(U(_e),"confetti",void 0),_e.canvas=be.canvasRef||ae,_e}return de=Se,(ge=[{key:"componentDidMount",value:function(){if(this.canvas.current){var be=ve(this.props)[0];this.confetti=new V(this.canvas.current,be)}}},{key:"componentDidUpdate",value:function(){var be=ve(this.props)[0];this.confetti&&(this.confetti.options=be)}},{key:"componentWillUnmount",value:function(){this.confetti&&this.confetti.stop(),this.confetti=void 0}},{key:"render",value:function(){var be=le(ve(this.props),2),_e=be[0],je=be[1],He=oe({zIndex:2,position:"absolute",pointerEvents:"none",top:0,left:0,bottom:0,right:0},je.style);return x.a.createElement("canvas",X({width:_e.width,height:_e.height,ref:this.canvas},je,{style:He}))}}])&&G(de.prototype,ge),Se}(v.Component);function ve(ee){var de={},ge={},he=[].concat(z(Object.keys(N)),["confettiSource","drawShape","onConfettiComplete"]),Se=["canvasRef"];for(var be in ee){var _e=ee[be];he.includes(be)?de[be]=_e:Se.includes(be)?Se[be]=_e:ge[be]=_e}return[de,ge,{}]}te(ue,"defaultProps",oe({},N)),te(ue,"displayName","ReactConfetti");var fe=x.a.forwardRef(function(ee,de){return x.a.createElement(ue,X({canvasRef:de},ee))});f.default=fe}]).default})}(reactConfetti_min$1)),reactConfetti_min$1.exports}var reactConfetti_minExports=requireReactConfetti_min();const Confetti=getDefaultExportFromCjs$1(reactConfetti_minExports),ConfettiProvider=({children:o})=>{const{isVisible:l,stopConfetti:u}=useConfettiStore(d=>d);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[o,l&&reactDomExports.createPortal(jsxRuntimeExports.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:999999},children:jsxRuntimeExports.jsx(Confetti,{recycle:!1,onConfettiComplete:()=>u()})}),document.body)]})},formatDate=(o,l)=>{const u=new Date,d=new Date(o);if(u.getDate()===d.getDate()&&u.getMonth()===d.getMonth()&&u.getFullYear()===d.getFullYear())return l("dates.today");const f=new Date(u);if(f.setDate(u.getDate()-1),f.getDate()===d.getDate()&&f.getMonth()===d.getMonth()&&f.getFullYear()===d.getFullYear())return l("dates.yesterday");const h=d.getDate(),g=["january","february","march","april","may","june","july","august","september","october","november","december"][d.getMonth()],v=l(`months.${g}`);return d.getFullYear()!==u.getFullYear()?`${v} ${h}, ${d.getFullYear()}`:`${v} ${h}`},sizeClasses={sm:"text-[8px] px-0.75 py-px",md:"text-[10px] px-1.5 py-[2px]",lg:"text-[14px] px-2 py-[2.5px]"},GradientBadge=({children:o,size:l="sm",className:u,style:d,...f})=>jsxRuntimeExports.jsx("div",{className:cn$1("text-rounded uppercase rounded-full font-extrabold tracking-tight",sizeClasses[l],u),style:{background:"linear-gradient(180deg, #FBFBFB 0%, #797979 100%)",...d,color:(d==null?void 0:d.color)||"black"},...f,children:o});function ProfileInventoryModal({children:o,...l}){const{t:u}=useTranslation(),{isOpen:d,setIsOpen:f}=useInventoryModalStore(),{data:{inventory:h}}=useProfile(),{openBoxModal:m}=useBoxOpening(),g=E=>{var w,T;(T=(w=window.Telegram)==null?void 0:w.WebApp)==null||T.HapticFeedback.impactOccurred("soft"),m(E)},v=h.filter(E=>E.type==="box"),x=v.length===0,b=E=>{const w=getLootboxRarityByBoxId(E.box_id),T=u("unopenedLootBox");return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:getLootboxImage(E),alt:T,width:96,height:96,className:"size-24 object-contain scale-110"}),w&&jsxRuntimeExports.jsx(GradientBadge,{size:"lg",className:"absolute right-0 top-18",style:{background:LOOTBOX_RARITY_GRADIENT[w],color:LOOTBOX_RARITY_TEXT_COLOR[w],boxShadow:"0px 0px 16px rgba(0, 0, 0, 0.2)"},children:u(LOOTBOX_RARITY_LABEL_KEY[w])}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[jsxRuntimeExports.jsx(Text,{weight:"2",children:T}),jsxRuntimeExports.jsx(Caption,{weight:"3",className:"text-tgui-subtitle-text",children:formatDate(E.acquired_at,u)})]})]})},S=jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center gap-6",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs(Title$1,{level:"2",weight:"1",children:[u("inventory"),!x&&jsxRuntimeExports.jsx("span",{className:"text-tgui-hint ml-1",children:v.length})]}),jsxRuntimeExports.jsx(Subheadline,{weight:"3",level:"2",children:u(x?"inventoryDescriptionEmpty":"inventoryDescription")}),x&&jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-5",children:jsxRuntimeExports.jsx(Subheadline,{weight:"3",level:"2",className:"text-tgui-subtitle-text !mt-6.5",children:jsxRuntimeExports.jsx(Trans,{i18nKey:"inventoryDescriptionEmptyButton"})})})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 xl:grid-cols-5 gap-x-2.5 gap-y-[30px] justify-items-center",children:v.map(E=>jsxRuntimeExports.jsx(motion.button,{type:"button",className:"min-w-[96px] min-h-[96px] rounded-full flex flex-col items-center justify-center gap-2.5 relative cursor-pointer bg-transparent border-0 p-0",onClick:()=>g(E.id),"aria-label":`${u("openItem")} ${u("unopenedLootBox")}`,whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:30},children:b(E)},`inventory-slot-${E.id}`))})})]});return jsxRuntimeExports.jsx(Drawer,{open:d,onOpenChange:f,...l,children:jsxRuntimeExports.jsx(DrawerContent,{className:"min-h-[100dvh]",children:S})})}function BalanceHeader({type:o,balanceId:l}){const{t:u}=useTranslation(),{data:d}=useProfile();return jsxRuntimeExports.jsxs("div",{className:"absolute top-3 left-4 z-1 flex flex-col items-start",children:[jsxRuntimeExports.jsx(Caption,{weight:"3",children:u("topUpModal.balance")}),jsxRuntimeExports.jsxs("div",{id:l,className:"flex flex-row gap-0.5 items-center justify-center",children:[jsxRuntimeExports.jsx("div",{className:"size-5 flex items-center justify-center",children:o==="coins"?jsxRuntimeExports.jsx(IconBalanceCoins,{style:{height:18}}):o==="gems"?jsxRuntimeExports.jsx(IconBalanceGems,{width:18,height:18}):jsxRuntimeExports.jsx(IconUsdt,{style:{height:18,width:19}})}),jsxRuntimeExports.jsx(AnimatedBalance,{className:"text-rounded",style:{fontSize:"17px",lineHeight:"22px"},value:o==="coins"?d.balance_coins:o==="gems"?d.balance_gems:d.balance_usdt,noRounding:o==="usdt"})]})]})}const StarParticles=({count:o=50,width:l,height:u,style:d,delay:f=0})=>{const[h,m]=reactExports.useState(!1),g=reactExports.useRef(null),v=reactExports.useRef([]),x=reactExports.useRef();return reactExports.useEffect(()=>{const b=setTimeout(()=>{m(!0)},f);return()=>clearTimeout(b)},[f]),reactExports.useEffect(()=>{const b=()=>({x:Math.random()*l,y:Math.random()*u,scale:.6+Math.random()*.9,rotation:Math.random()*360,opacity:.3+Math.random()*.7,velocity:{x:(Math.random()-.5)*.24,y:(Math.random()-.5)*.24},fadeOut:!1});v.current=Array(o).fill(null).map(b);let S=performance.now();const E=w=>{const T=g.current;if(!T)return;const C=(w-S)/16.67;S=w;const M=window.devicePixelRatio||1;T.width=l*M,T.height=u*M;const A=T.getContext("2d",{alpha:!0});A&&(A.scale(M,M),A.clearRect(0,0,l,u),A.imageSmoothingEnabled=!1,v.current.forEach(k=>{!k.fadeOut&&(k.x<10||k.x>l-10||k.y<10||k.y>u-10)&&(k.fadeOut=!0),k.fadeOut&&(k.opacity=Math.max(0,k.opacity-.03*C)),A.save(),A.translate(k.x,k.y),A.rotate(k.rotation*Math.PI/180),A.scale(k.scale,k.scale),A.globalAlpha=k.opacity,A.beginPath(),A.moveTo(3,0),A.lineTo(2.635,2.635),A.lineTo(0,3),A.lineTo(2.635,3.365),A.lineTo(3,6),A.lineTo(3.365,3.365),A.lineTo(6,3),A.lineTo(3.365,2.635),A.closePath(),A.fillStyle="#FFB700",A.fill(),A.restore(),k.x+=k.velocity.x*C,k.y+=k.velocity.y*C,k.rotation+=.24*C,k.opacity<=0&&Object.assign(k,b())}),x.current=requestAnimationFrame(E))};return x.current=requestAnimationFrame(E),()=>{x.current&&cancelAnimationFrame(x.current)}},[l,u,o]),jsxRuntimeExports.jsx("canvas",{ref:g,width:l,height:u,style:{position:"absolute",pointerEvents:"none",zIndex:2,width:`${l}px`,height:`${u}px`,opacity:h?1:0,transform:`scale(${h?1:.9})`,transition:"opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",...d}})},PRICES_TAG="prices";function usePrices(){return useQuery({queryKey:[PRICES_TAG],queryFn:async()=>await makeRequest("prices","GET")})}const IconCurrencyStar=o=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...o,children:[jsxRuntimeExports.jsx("title",{children:"Currency star"}),jsxRuntimeExports.jsx("path",{d:"M5.87807 4.95235L7.59874 1.50475C7.79707 1.10699 8.27698 0.947233 8.67063 1.14796C8.82496 1.22664 8.95003 1.3541 9.02655 1.51082L10.6516 4.83573C10.7843 5.10734 11.0437 5.29267 11.3414 5.32865L14.7439 5.73942C15.2058 5.79513 15.5357 6.2189 15.4804 6.6858C15.4577 6.87807 15.3708 7.0569 15.2342 7.19238L12.5446 9.86072C12.436 9.96845 12.3835 10.1211 12.4024 10.2737L12.8494 13.8758C12.9133 14.3915 12.5515 14.8621 12.0415 14.9267C11.8481 14.9512 11.652 14.9139 11.4807 14.8198L8.63941 13.2578C8.4337 13.1449 8.18638 13.1416 7.97785 13.2492L5.034 14.7687C4.61977 14.9826 4.11233 14.8163 3.90077 14.3976C3.82165 14.2408 3.79239 14.0633 3.8171 13.889L4.0525 12.2364C4.1676 11.4281 4.66464 10.7269 5.38472 10.3569L8.65458 8.67676C8.74194 8.6319 8.77662 8.52416 8.73219 8.43594C8.69794 8.36744 8.62424 8.32886 8.54924 8.3397L4.55019 8.91585C3.93892 9.00408 3.31898 8.83045 2.83971 8.43681L1.50793 7.34324C1.12772 7.0311 1.06985 6.46666 1.37874 6.08255C1.52223 5.90394 1.72837 5.78797 1.95424 5.75871L5.3689 5.31651C5.58783 5.28812 5.7788 5.15177 5.87807 4.95235Z",fill:"url(#paint0_linear_4259_226)"}),jsxRuntimeExports.jsx("path",{d:"M8.98273 9.42344C9.05773 9.4126 9.13143 9.45119 9.16568 9.51968C9.21012 9.6079 9.17544 9.71564 9.08808 9.76051L5.81822 11.4406C5.09813 11.8106 4.6011 12.5119 4.486 13.3202L4.27899 14.7742C4.1214 14.6962 3.98658 14.5676 3.90074 14.3975C3.82162 14.2408 3.79236 14.0632 3.81707 13.889L4.05247 12.2364C4.16757 11.4281 4.66461 10.7268 5.38469 10.3568L6.50687 9.78001L8.98273 9.42344Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M8.67063 1.14796C8.82496 1.22664 8.95003 1.3541 9.02655 1.51082L10.6516 4.83573C10.7843 5.10734 11.0437 5.29267 11.3414 5.32865L14.7439 5.73942C15.2058 5.79513 15.5357 6.2189 15.4804 6.6858C15.472 6.75777 15.4544 6.82778 15.4288 6.89454C15.351 6.85856 15.2667 6.83407 15.1774 6.82323L11.7749 6.41246C11.4773 6.37648 11.2178 6.19115 11.0851 5.91955L9.46007 2.59463C9.38356 2.43791 9.25848 2.31045 9.10415 2.23177C8.71051 2.03105 8.2306 2.1908 8.03226 2.58856L6.3116 6.03617C6.21232 6.23559 6.02135 6.37193 5.80242 6.40033L2.38776 6.84252C2.1619 6.87178 1.95576 6.98775 1.81226 7.16636C1.73921 7.25719 1.68675 7.3582 1.65402 7.46333L1.50793 7.34324C1.12772 7.0311 1.06985 6.46666 1.37874 6.08255C1.52223 5.90394 1.72837 5.78797 1.95424 5.75871L5.3689 5.31651C5.58783 5.28812 5.7788 5.15177 5.87807 4.95235L7.59874 1.50475C7.79707 1.10699 8.27698 0.947233 8.67063 1.14796Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M7.2883 1.34987C7.5727 0.779997 8.26244 0.550446 8.82797 0.83874C9.04972 0.951673 9.22855 1.13419 9.33823 1.35832L10.9631 4.68324C11.0444 4.8495 11.2024 4.96243 11.3829 4.98432L14.7855 5.39487C15.4381 5.47377 15.9024 6.0703 15.8248 6.72644C15.793 6.99631 15.6709 7.24754 15.4785 7.43851L12.7889 10.1066C12.7568 10.1387 12.7407 10.1847 12.7466 10.2308L13.1936 13.833C13.2809 14.5377 12.7856 15.1819 12.085 15.2708C11.8189 15.3044 11.5492 15.253 11.3138 15.1236L8.47226 13.5618C8.368 13.5044 8.24271 13.5027 8.13693 13.5573L5.19308 15.0768C4.60695 15.3792 3.88947 15.1442 3.5912 14.554C3.48 14.3337 3.43904 14.0844 3.47372 13.8402L3.70912 12.1873C3.84005 11.268 4.4058 10.4699 5.22624 10.0483L7.60521 8.82579L4.5998 9.25909C3.91721 9.3575 3.22531 9.17391 2.67972 8.75252L2.61967 8.70483L1.28767 7.61105C0.760502 7.17839 0.680517 6.3974 1.10841 5.86503C1.30783 5.61683 1.59482 5.45535 1.90956 5.4146L5.32422 4.9724C5.42848 4.95896 5.51974 4.89371 5.56786 4.79747L7.2883 1.34987ZM8.51301 1.45673C8.2917 1.3438 8.02161 1.43375 7.9089 1.65962L6.18845 5.10723C6.03758 5.40961 5.74734 5.61705 5.41331 5.66019L1.99865 6.10238C1.86187 6.12016 1.73658 6.1906 1.64901 6.29964C1.45913 6.53569 1.49489 6.88381 1.72791 7.075L3.05992 8.16878C3.46396 8.50043 3.98593 8.64674 4.50074 8.57261L8.49957 7.99624C8.72284 7.96416 8.9409 8.07861 9.04213 8.27998C9.17175 8.53771 9.07009 8.8531 8.81301 8.98532L5.54337 10.6652C4.92343 10.9837 4.4951 11.588 4.39583 12.2853L4.16042 13.9379C4.14568 14.0417 4.16324 14.1477 4.21028 14.2412C4.33513 14.4883 4.63231 14.5856 4.87487 14.4603L7.81894 12.941C8.12978 12.7804 8.49957 12.7852 8.80651 12.9538L11.6478 14.5156C11.7549 14.5745 11.8772 14.5977 11.9979 14.5826C12.3174 14.542 12.5457 14.2453 12.5051 13.9184L12.0582 10.3162C12.0261 10.0572 12.1154 9.79775 12.3005 9.61437L14.9899 6.94602C15.0707 6.86582 15.1225 6.75961 15.136 6.64494C15.1689 6.36705 14.9736 6.11647 14.7024 6.08352L11.2997 5.67298C10.885 5.6229 10.5241 5.36496 10.3399 4.98779L8.71504 1.66287C8.67125 1.57356 8.60037 1.50117 8.51301 1.45673Z",fill:"url(#paint1_linear_4259_226)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear_4259_226",x1:"6.38247",y1:"4.31269",x2:"12.2351",y2:"14.7173",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFCE00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFAD00"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear_4259_226",x1:"8.33333",y1:"1.06114",x2:"8.33333",y2:"14.7172",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#F28B00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FA7400"})]})]})]}),XsButton=reactExports.forwardRef(({className:o,children:l,...u},d)=>jsxRuntimeExports.jsx(Button,{...u,ref:d,className:`xs-button ${o||""}`,size:"s",children:l}));XsButton.displayName="XsButton";const Ribbon=({text:o})=>jsxRuntimeExports.jsxs("svg",{style:{position:"absolute",top:-2,right:-2,width:48,height:48,overflow:"visible"},children:[jsxRuntimeExports.jsx("title",{children:"Ribbon"}),jsxRuntimeExports.jsx("path",{d:"M46.83 24.5L23.5 1.17C22.75 0.42 21.73 0 20.68 0C19.62 0 2.73 0.05 1.55 0.05C0.36 0.05 -0.23 1.4885 0.6 2.32L45.72 47.44C46.56 48.28 48 47.68 48 46.5C48 45.31 48 28.38 48 27.32C48 26.26 47.5 25.24 46.82 24.5Z",fill:"#1EC948"}),jsxRuntimeExports.jsx("text",{x:"21",y:"21",textAnchor:"middle",transform:"rotate(45 24 24)",style:{fill:"white",fontSize:"13px",fontWeight:700,fontFamily:"-apple-system, system-ui, sans-serif"},children:o})]}),BuyOption=({amount:o,price:l,onClick:u,loading:d,discount:f,optionIcon:h})=>{const{t:m}=useTranslation();return jsxRuntimeExports.jsxs(motion.button,{whileTap:{scale:.95},className:"relative flex flex-col items-center bg-tgui-section-bg cursor-pointer rounded-lg w-full px-1 pb-2.5 pt-1",onClick:u,type:"button",children:[f&&jsxRuntimeExports.jsx(Ribbon,{text:f}),jsxRuntimeExports.jsx("div",{className:"h-12.5 flex justify-center items-center",children:jsxRuntimeExports.jsx("img",{className:"max-w-20 max-h-12.5 object-cover",src:h,alt:"Option icon"})}),jsxRuntimeExports.jsx(Text,{weight:"1",className:"text-rounded",style:{fontSize:"20px",lineHeight:"25px"},children:formatter.format(o)}),jsxRuntimeExports.jsx(Text,{weight:"3",style:{fontSize:"10px",lineHeight:"13px"},children:m("topUpModal.gems")}),jsxRuntimeExports.jsx(XsButton,{onClick:g=>{g.stopPropagation(),u()},mode:"bezeled",style:{color:"#F36200",backgroundColor:"rgba(255, 190, 0, 0.20)",marginTop:10},before:jsxRuntimeExports.jsx(IconCurrencyStar,{style:{width:16,height:16}}),loading:d,children:jsxRuntimeExports.jsx(Text,{weight:"2",style:{fontSize:"10px",lineHeight:"13px"},children:formatter.format(l)})})]})},optionIcon1=assetUrl("buyOptions/buyOption1.webp"),optionIcon2=assetUrl("buyOptions/buyOption2.webp"),optionIcon3=assetUrl("buyOptions/buyOption3.webp"),optionIcon4=assetUrl("buyOptions/buyOption4.webp"),optionIcon5=assetUrl("buyOptions/buyOption5.webp"),optionIcon6=assetUrl("buyOptions/buyOption6.webp"),icons=[optionIcon1,optionIcon2,optionIcon3,optionIcon4,optionIcon5,optionIcon6],getIconByIndex=o=>icons[o%icons.length],TopUpModal=({...o})=>{const{t:l}=useTranslation(),{isOpen:u,setIsOpen:d}=useTopUpModalStore(),{showSnackbar:f}=useSnackbar(),h=useQueryClient(),m=useFireConfetti(),[g,v]=reactExports.useState(null),{data:x,isLoading:b,error:S}=usePrices(),E=async(w,T)=>{var C,M;v(1),(M=(C=window.Telegram)==null?void 0:C.WebApp)==null||M.openInvoice(w,A=>{A==="paid"&&(h.invalidateQueries({queryKey:[PROFILE_TAG]}),d(!1),m(),f(l("snackbar.purchase.walletPurchaseGems"),{type:"success_top",gems:T.toString()}))}),v(null)};return jsxRuntimeExports.jsx(Drawer,{open:u,onOpenChange:d,headerOptions:{before:jsxRuntimeExports.jsx(BalanceHeader,{type:"gems"})},variant:"secondary",...o,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 items-center",children:[jsxRuntimeExports.jsx(LazyLottie,{asset:"lottie/moneyTongue.json",className:"size-18",height:72,width:72}),jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:l("topUpModal.topUpBalance")})]}),b?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center w-full",style:{height:282},children:jsxRuntimeExports.jsx(Spinner,{size:"m"})}):S?jsxRuntimeExports.jsx("div",{className:"text-red-500 text-center p-4",children:l("common.error")}):x!=null&&x.items?jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-1.5 w-full",children:x.items.map((w,T)=>jsxRuntimeExports.jsxs("div",{className:"relative z-1 overflow-visible",children:[T>=x.items.length-2&&jsxRuntimeExports.jsx(StarParticles,{width:100,height:58,count:30,delay:300,style:{bottom:0,left:"50%",transform:"translateX(-50%) scale(1)"}}),jsxRuntimeExports.jsx(BuyOption,{amount:w.gems,price:w.stars,onClick:()=>E(w.invoice_url,w.gems),loading:g===w.gems,discount:w.discount?`–${w.discount}%`:void 0,optionIcon:getIconByIndex(T)},w.gems)]},w.invoice_url))}):null]})})},supportedLanguages=["en","ru","hi","es","pt"];function mapTelegramLanguageToSupported(o){return{"pt-br":"pt","pt-pt":"pt"}[o]||o}const getTelegramLanguage=()=>{var d,f,h;const o=(h=(f=(d=window.Telegram)==null?void 0:d.WebApp)==null?void 0:f.initDataUnsafe.user)==null?void 0:h.language_code,l=o?mapTelegramLanguageToSupported(o):null;return l&&supportedLanguages.includes(l)?l:"en"};function I18nBackendLanguageProvider({children:o}){const{i18n:l}=useTranslation(),{data:u}=useProfile(),d=reactExports.useRef(!1),f=reactExports.useRef(null),h=getTelegramLanguage(),m=u.language===l.language,g=u.language===null&&l.language===h;if(reactExports.useEffect(()=>{!d.current&&(m||g)&&(d.current=!0)},[m,g]),!d.current&&!m&&!g){if(f.current)throw f.current;const v=u.language===null?h:u.language;throw f.current=l.changeLanguage(v),f.current}return f.current=null,o}const SESSION_HEADER$1="X-Session-Id";async function sendBatch(o,{events:l,sessionId:u},d={}){const f=JSON.stringify({events:l}),h={"Content-Type":"application/json",[SESSION_HEADER$1]:u},m=o.getHeaders();m&&Object.assign(h,m);const g=d.fireAndForget?1:2;for(let v=0;v<g;v++)try{const x=await fetch(o.endpoint,{method:"POST",headers:h,body:f,keepalive:!0});if(x.ok)return!0;if(x.status<500)return o.debug&&console.warn("[analytics] drop batch, status",x.status),!1}catch(x){o.debug&&console.warn("[analytics] send failed, attempt",v,x)}return!1}class Batcher{constructor(l,u){this.config=l,this.session=u,this.queue=[],this.firstEnqueuedAt=null,this.timer=null,this.inFlight=null,this.timer=setInterval(()=>{this.flush()},l.flushIntervalMs)}enqueue(l){this.queue.push(l),this.firstEnqueuedAt===null&&(this.firstEnqueuedAt=Date.now()),this.queue.length>=this.config.batchSize&&this.flush()}async flush(){if(this.inFlight)return this.inFlight;if(this.queue.length===0)return;if(!(this.config.getHeaders()!==null)){this.firstEnqueuedAt!==null&&Date.now()-this.firstEnqueuedAt>this.config.authWaitTimeoutMs&&(this.config.debug&&console.warn("[analytics] dropping batch: auth not ready within timeout"),this.queue=[],this.firstEnqueuedAt=null);return}const u=this.queue.splice(0,this.config.batchSize);return this.firstEnqueuedAt=this.queue.length>0?Date.now():null,this.inFlight=sendBatch(this.config,{events:u,sessionId:this.session.getSessionId()}).then(()=>{}).finally(()=>{this.inFlight=null}),this.inFlight}flushOnHide(){if(this.queue.length===0)return;if(this.config.getHeaders()===null){this.queue=[],this.firstEnqueuedAt=null;return}const l=this.queue.splice(0,this.config.batchSize);this.firstEnqueuedAt=this.queue.length>0?Date.now():null,sendBatch(this.config,{events:l,sessionId:this.session.getSessionId()},{fireAndForget:!0})}stop(){this.timer!==null&&(clearInterval(this.timer),this.timer=null)}}function detectPlatform(){var l,u;const o=typeof window<"u"?(u=(l=window.Telegram)==null?void 0:l.WebApp)==null?void 0:u.platform:void 0;return o==="ios"?"ios":o==="android"||o==="android_x"?"android":"web"}const STORAGE_KEY="__orbit_analytics_session__";function generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,o=>{const l=Math.random()*16|0;return(o==="x"?l:l&3|8).toString(16)})}function readStorage(){try{const o=sessionStorage.getItem(STORAGE_KEY);if(!o)return null;const l=JSON.parse(o);return typeof(l==null?void 0:l.sessionId)!="string"?null:l}catch{return null}}function writeStorage(o){try{sessionStorage.setItem(STORAGE_KEY,JSON.stringify(o))}catch{}}class SessionManager{constructor(l){this.inactivityTimeoutMs=l;const u=readStorage();if(u)this.state=u;else{const d=Date.now();this.state={sessionId:generateId(),startedAt:d,lastActivityAt:d,hiddenAt:null},writeStorage(this.state)}}getSessionId(){return this.state.sessionId}onHidden(){this.state.hiddenAt===null&&(this.state.hiddenAt=Date.now(),writeStorage(this.state))}onActive(){const l=Date.now();this.state.hiddenAt!==null&&(l-this.state.hiddenAt>this.inactivityTimeoutMs&&this.rotate(l),this.state.hiddenAt=null),this.state.lastActivityAt=l,writeStorage(this.state)}rotate(l){this.state={sessionId:generateId(),startedAt:l,lastActivityAt:l,hiddenAt:null}}}function bindVisibility(o,l){var f;const u=[],d=typeof window<"u"?(f=window.Telegram)==null?void 0:f.WebApp:void 0;if(d&&typeof d.onEvent=="function"&&typeof d.offEvent=="function"&&(d.onEvent("activated",o),d.onEvent("deactivated",l),u.push(()=>{d.offEvent("activated",o),d.offEvent("deactivated",l)})),typeof document<"u"){const h=()=>{document.visibilityState==="visible"?o():l()};document.addEventListener("visibilitychange",h),u.push(()=>document.removeEventListener("visibilitychange",h))}return typeof window<"u"&&(window.addEventListener("pagehide",l),u.push(()=>window.removeEventListener("pagehide",l))),()=>{for(const h of u)h()}}const KEY="__orbitAnalyticsInstance__",DEFAULTS={endpoint:"https://app.portalapp.games/api/analytics/events",inactivityTimeoutMs:5*60*1e3,batchSize:50,flushIntervalMs:5e3,authWaitTimeoutMs:30*1e3,debug:!1};function resolveConfig(o){return{endpoint:o.endpoint??DEFAULTS.endpoint,getHeaders:o.getHeaders??(()=>({})),inactivityTimeoutMs:o.inactivityTimeoutMs??DEFAULTS.inactivityTimeoutMs,batchSize:o.batchSize??DEFAULTS.batchSize,flushIntervalMs:o.flushIntervalMs??DEFAULTS.flushIntervalMs,authWaitTimeoutMs:o.authWaitTimeoutMs??DEFAULTS.authWaitTimeoutMs,debug:o.debug??DEFAULTS.debug,platform:o.platform??detectPlatform()}}function warnOnMismatch(o,l){const u=[];o.endpoint!==l.endpoint&&u.push("endpoint"),o.inactivityTimeoutMs!==l.inactivityTimeoutMs&&u.push("inactivityTimeoutMs"),o.batchSize!==l.batchSize&&u.push("batchSize"),u.length>0&&console.warn(`[analytics] second getAnalytics() call with differing config (${u.join(", ")}); first-call config wins.`)}function createInstance(o){const l=new SessionManager(o.inactivityTimeoutMs),u=new Batcher(o,l);bindVisibility(()=>l.onActive(),()=>{l.onHidden(),u.flushOnHide()});let d;return{track:(h,m={})=>{const g={...m};d!==void 0&&(g.user_id=d),g.platform===void 0&&(g.platform=o.platform);const v={name:h,extra:g,ts_client:Date.now()};u.enqueue(v),o.debug&&console.debug("[analytics] track",h,g)},flush:()=>u.flush(),identify:h=>{d=h},getSessionId:()=>l.getSessionId()}}function getAnalytics(o){const l=globalThis,u=l[KEY];if(u)return u.config.debug&&warnOnMismatch(u.config,resolveConfig(o)),u.instance;const d=resolveConfig(o),f=createInstance(d);return l[KEY]={instance:f,config:d},f}var define_process_env_default$4={NODE_ENV:"production",version:"1.94.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const BASE_URL=define_process_env_default$4.BASE_URL;var define_process_env_default$3={NODE_ENV:"production",version:"1.94.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const ANALYTICS_ENDPOINT=`${BASE_URL.replace(/\/sdk\/?$/,"")}/api/analytics/events`;function getBaseAnalyticsParams(){return{game_id:window.game_id,game_title:window.game_title,game_url:window.location.origin+window.location.pathname}}let biAnalytics=null;function initAnalytics(){return biAnalytics||(biAnalytics=getAnalytics({endpoint:ANALYTICS_ENDPOINT,getHeaders:()=>{var u,d;const o=(d=(u=window.Telegram)==null?void 0:u.WebApp)==null?void 0:d.initData,l={};return o&&(l["X-Auth"]=o),window.game_id&&(l["X-Game-Id"]=window.game_id),Object.keys(l).length?l:null},debug:define_process_env_default$3.NODE_ENV!=="production"}),biAnalytics)}function getBiSessionId(){return initAnalytics().getSessionId()}class AnalyticsServiceImpl{identify(l){initAnalytics().identify(Number(l))}track(l,u={}){initAnalytics().track(l,u)}}const analytics=new AnalyticsServiceImpl,SESSION_HEADER="X-Session-Id";class APIRequestError extends Error{constructor({message:l,status:u,responseText:d}){super(l),this.status=u,this.responseText=d}}function createMakeRequest(o){return async function(u,d,f){o.waitUntilReady&&await o.waitUntilReady();const h=`${o.baseUrl}/${u}`;try{const m=o.getAuthData(),g=o.getBotId(),v={"X-Auth":m||o.getInitData(),"Content-Type":"application/json",[SESSION_HEADER]:getBiSessionId()};if(g&&(v["X-Bot-ID"]=g),m){console.warn("WARNING: AUTH_DATA is used for requests!!!"),console.log("=== API Request Debug ==="),console.log("externalAuthData:",m),console.log("externalAuthData type:",typeof m),console.log("externalAuthData truthy?",!!m),console.log("externalAuthData length:",m==null?void 0:m.length),console.log("config.getInitData():",o.getInitData()),console.log("config.getInitData() type:",typeof o.getInitData()),console.log("config.getInitData() truthy?",!!o.getInitData());const b=m||o.getInitData();console.log("X-Auth value (before headers):",b),console.log("X-Auth value type:",typeof b),console.log("X-Auth value truthy?",!!b),console.log("X-Auth value length:",b==null?void 0:b.length),v["a-deb"]=m,v["a-deb-string"]=String(m),console.log("Final headers object:",v),v["X-Auth"]||(v["X-Auth"]=m),console.log("Final X-Auth header:",v["X-Auth"])}const x=await fetch(h,{method:d,headers:v,body:f?JSON.stringify(f):null});if(!x.ok)throw new APIRequestError({message:`Request to ${u} failed with status ${x.status}`,status:x.status,responseText:await(async()=>{try{return await x.text()}catch{return}})()});return x.json()}catch(m){throw m instanceof APIRequestError||console.error(`Error during request to ${u}:`,m),m}}}const queryClient=new QueryClient({mutationCache:new MutationCache({onError:o=>{captureException(o)}}),queryCache:new QueryCache({onError:o=>{captureException(o)}}),defaultOptions:{queries:{staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!0,retry:(o,l)=>{if(l instanceof APIRequestError&&l.status===401)return o<3;if(l instanceof Error&&"status"in l){const u=l.status;if(u&&u>=400&&u<500)return!1}return o<3},retryDelay:(o,l)=>l instanceof APIRequestError&&l.status===401?Math.min(1e3*2**o,4e3):Math.min(1e3*2**o,3e4)},mutations:{retry:1,retryDelay:1e3}}});function createOverlay(o){let l=document.getElementById("overlay-root");l=document.createElement("div"),l.id="overlay-root",document.body.appendChild(l),clientExports.createRoot(l).render(jsxRuntimeExports.jsx(OverlayManager,{options:o}))}const OverlayManager=({options:o})=>{const l=reactExports.useCallback(()=>{var u;(u=window.Telegram.WebApp)==null||u.openTelegramLink("https://t.me/orbit_portal_bot/app?startapp=profile")},[]);return reactExports.useEffect(()=>{const u=d=>{d.shiftKey&&d.key==="Tab"&&(d.preventDefault(),l())};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[l]),jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsxs(AppRoot,{children:[jsxRuntimeExports.jsx(OrientationCheck,{}),jsxRuntimeExports.jsx("div",{id:"overlay-banner-top",className:"cssdk-banner-container cssdk-banner-top"}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsxs(I18nBackendLanguageProvider,{children:[jsxRuntimeExports.jsx(SnackbarProvider,{children:jsxRuntimeExports.jsx(BoxOpeningProvider,{children:jsxRuntimeExports.jsxs(ConfettiProvider,{children:[jsxRuntimeExports.jsx(OverlayProfile,{variant:(o==null?void 0:o.variant)||"translucent",onOpenProfile:()=>l(),initialPosition:o==null?void 0:o.initialPosition,initialCoordinates:o==null?void 0:o.initialCoordinates}),jsxRuntimeExports.jsx(TopUpModal,{}),jsxRuntimeExports.jsx(BoxOpeningModal,{}),jsxRuntimeExports.jsx(ProfileInventoryModal,{})]})})}),jsxRuntimeExports.jsx(EventsStack,{})]})}),jsxRuntimeExports.jsx("div",{id:"overlay-banner-bottom",className:"cssdk-banner-container cssdk-banner-bottom"})]})})};class AbortError extends Error{constructor(l="The operation was aborted"){super(l),this.name="AbortError"}}function delay(o,{signal:l}={}){return new Promise((u,d)=>{const f=()=>{d(new AbortError)},h=()=>{clearTimeout(m),f()};if(l!=null&&l.aborted)return f();const m=setTimeout(()=>{l==null||l.removeEventListener("abort",h),u()},o);l==null||l.addEventListener("abort",h,{once:!0})})}var lib={},uaParser_min$1={exports:{}},uaParser_min=uaParser_min$1.exports,hasRequiredUaParser_min;function requireUaParser_min(){return hasRequiredUaParser_min||(hasRequiredUaParser_min=1,function(o,l){(function(u,d){var f="1.0.41",h="",m="?",g="function",v="undefined",x="object",b="string",S="major",E="model",w="name",T="type",C="vendor",M="version",A="architecture",k="console",I="mobile",O="tablet",j="smarttv",N="wearable",V="embedded",z=500,W="Amazon",X="Apple",ie="ASUS",oe="BlackBerry",le="Browser",Q="Chrome",K="Edge",$="Firefox",G="Google",L="Honor",B="Huawei",q="Lenovo",U="LG",Y="Microsoft",te="Motorola",ae="Nvidia",ue="OnePlus",ve="Opera",fe="OPPO",ee="Samsung",de="Sharp",ge="Sony",he="Xiaomi",Se="Zebra",be="Facebook",_e="Chromium OS",je="Mac OS",He=" Browser",Be=function(qe,Ae){var Ie={};for(var Ge in qe)Ae[Ge]&&Ae[Ge].length%2===0?Ie[Ge]=Ae[Ge].concat(qe[Ge]):Ie[Ge]=qe[Ge];return Ie},rt=function(qe){for(var Ae={},Ie=0;Ie<qe.length;Ie++)Ae[qe[Ie].toUpperCase()]=qe[Ie];return Ae},Ke=function(qe,Ae){return typeof qe===b?we(Ae).indexOf(we(qe))!==-1:!1},we=function(qe){return qe.toLowerCase()},Me=function(qe){return typeof qe===b?qe.replace(/[^\d\.]/g,h).split(".")[0]:d},$e=function(qe,Ae){if(typeof qe===b)return qe=qe.replace(/^\s\s*/,h),typeof Ae===v?qe:qe.substring(0,z)},Qe=function(qe,Ae){for(var Ie=0,Ge,Ye,st,ze,Le,at;Ie<Ae.length&&!Le;){var It=Ae[Ie],Ft=Ae[Ie+1];for(Ge=Ye=0;Ge<It.length&&!Le&&It[Ge];)if(Le=It[Ge++].exec(qe),Le)for(st=0;st<Ft.length;st++)at=Le[++Ye],ze=Ft[st],typeof ze===x&&ze.length>0?ze.length===2?typeof ze[1]==g?this[ze[0]]=ze[1].call(this,at):this[ze[0]]=ze[1]:ze.length===3?typeof ze[1]===g&&!(ze[1].exec&&ze[1].test)?this[ze[0]]=at?ze[1].call(this,at,ze[2]):d:this[ze[0]]=at?at.replace(ze[1],ze[2]):d:ze.length===4&&(this[ze[0]]=at?ze[3].call(this,at.replace(ze[1],ze[2])):d):this[ze]=at||d;Ie+=2}},Oe=function(qe,Ae){for(var Ie in Ae)if(typeof Ae[Ie]===x&&Ae[Ie].length>0){for(var Ge=0;Ge<Ae[Ie].length;Ge++)if(Ke(Ae[Ie][Ge],qe))return Ie===m?d:Ie}else if(Ke(Ae[Ie],qe))return Ie===m?d:Ie;return Ae.hasOwnProperty("*")?Ae["*"]:qe},tt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},it={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ft={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[M,[w,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[M,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,M],[/opios[\/ ]+([\w\.]+)/i],[M,[w,ve+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[M,[w,ve+" GX"]],[/\bopr\/([\w\.]+)/i],[M,[w,ve]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[M,[w,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[M,[w,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[w,M],[/quark(?:pc)?\/([-\w\.]+)/i],[M,[w,"Quark"]],[/\bddg\/([\w\.]+)/i],[M,[w,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[M,[w,"UC"+le]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[M,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[M,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[M,[w,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[M,[w,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[M,[w,"Smart Lenovo "+le]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure "+le],M],[/\bfocus\/([\w\.]+)/i],[M,[w,$+" Focus"]],[/\bopt\/([\w\.]+)/i],[M,[w,ve+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[M,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[M,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[M,[w,ve+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[M,[w,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[M,[w,$]],[/\bqihoobrowser\/?([\w\.]*)/i],[M,[w,"360"]],[/\b(qq)\/([\w\.]+)/i],[[w,/(.+)/,"$1Browser"],M],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1"+He],M],[/samsungbrowser\/([\w\.]+)/i],[M,[w,ee+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[M,[w,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[w,"Sogou Mobile"],M],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[w,M],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[w],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[M,w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,be],M],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[w,M],[/\bgsa\/([\w\.]+) .*safari\//i],[M,[w,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[M,[w,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[M,[w,Q+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,Q+" WebView"],M],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[M,[w,"Android "+le]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,M],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[M,[w,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[M,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[M,Oe,tt]],[/(webkit|khtml)\/([\w\.]+)/i],[w,M],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],M],[/(wolvic|librewolf)\/([\w\.]+)/i],[w,M],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[M,[w,$+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[w,[M,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[w,[M,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[A,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[A,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[A,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[A,/ower/,h,we]],[/ sun4\w[;\)]/i],[[A,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[A,we]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[E,[C,ee],[T,O]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[E,[C,ee],[T,I]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[E,[C,X],[T,I]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[E,[C,X],[T,O]],[/(macintosh);/i],[E,[C,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[E,[C,de],[T,I]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[E,[C,L],[T,O]],[/honor([-\w ]+)[;\)]/i],[E,[C,L],[T,I]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[E,[C,B],[T,O]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[E,[C,B],[T,I]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[E,/_/g," "],[C,he],[T,O]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[E,/_/g," "],[C,he],[T,I]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[E,[C,fe],[T,I]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[E,[C,Oe,{OnePlus:["304","403","203"],"*":fe}],[T,O]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[E,[C,"Vivo"],[T,I]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[E,[C,"Realme"],[T,I]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[E,[C,te],[T,I]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[E,[C,te],[T,O]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[E,[C,U],[T,O]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[E,[C,U],[T,I]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[E,[C,q],[T,O]],[/(nokia) (t[12][01])/i],[C,E,[T,O]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[E,/_/g," "],[T,I],[C,"Nokia"]],[/(pixel (c|tablet))\b/i],[E,[C,G],[T,O]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[E,[C,G],[T,I]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[C,ge],[T,I]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[E,"Xperia Tablet"],[C,ge],[T,O]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[E,[C,ue],[T,I]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[E,[C,W],[T,O]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[E,/(.+)/g,"Fire Phone $1"],[C,W],[T,I]],[/(playbook);[-\w\),; ]+(rim)/i],[E,C,[T,O]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[E,[C,oe],[T,I]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[E,[C,ie],[T,O]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[E,[C,ie],[T,I]],[/(nexus 9)/i],[E,[C,"HTC"],[T,O]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[C,[E,/_/g," "],[T,I]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[E,[C,"TCL"],[T,O]],[/(itel) ((\w+))/i],[[C,we],E,[T,Oe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[E,[C,"Acer"],[T,O]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[E,[C,"Meizu"],[T,I]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[E,[C,"Ulefone"],[T,I]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[E,[C,"Energizer"],[T,I]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[E,[C,"Cat"],[T,I]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[E,[C,"Smartfren"],[T,I]],[/droid.+; (a(?:015|06[35]|142p?))/i],[E,[C,"Nothing"],[T,I]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[E,[C,"Archos"],[T,O]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[E,[C,"Archos"],[T,I]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[C,E,[T,O]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[C,E,[T,I]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[C,E,[T,O]],[/(surface duo)/i],[E,[C,Y],[T,O]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[E,[C,"Fairphone"],[T,I]],[/(u304aa)/i],[E,[C,"AT&T"],[T,I]],[/\bsie-(\w*)/i],[E,[C,"Siemens"],[T,I]],[/\b(rct\w+) b/i],[E,[C,"RCA"],[T,O]],[/\b(venue[\d ]{2,7}) b/i],[E,[C,"Dell"],[T,O]],[/\b(q(?:mv|ta)\w+) b/i],[E,[C,"Verizon"],[T,O]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[E,[C,"Barnes & Noble"],[T,O]],[/\b(tm\d{3}\w+) b/i],[E,[C,"NuVision"],[T,O]],[/\b(k88) b/i],[E,[C,"ZTE"],[T,O]],[/\b(nx\d{3}j) b/i],[E,[C,"ZTE"],[T,I]],[/\b(gen\d{3}) b.+49h/i],[E,[C,"Swiss"],[T,I]],[/\b(zur\d{3}) b/i],[E,[C,"Swiss"],[T,O]],[/\b((zeki)?tb.*\b) b/i],[E,[C,"Zeki"],[T,O]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[C,"Dragon Touch"],E,[T,O]],[/\b(ns-?\w{0,9}) b/i],[E,[C,"Insignia"],[T,O]],[/\b((nxa|next)-?\w{0,9}) b/i],[E,[C,"NextBook"],[T,O]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[C,"Voice"],E,[T,I]],[/\b(lvtel\-)?(v1[12]) b/i],[[C,"LvTel"],E,[T,I]],[/\b(ph-1) /i],[E,[C,"Essential"],[T,I]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[E,[C,"Envizen"],[T,O]],[/\b(trio[-\w\. ]+) b/i],[E,[C,"MachSpeed"],[T,O]],[/\btu_(1491) b/i],[E,[C,"Rotor"],[T,O]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[E,[C,ae],[T,O]],[/(sprint) (\w+)/i],[C,E,[T,I]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[C,Y],[T,I]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[E,[C,Se],[T,O]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[E,[C,Se],[T,I]],[/smart-tv.+(samsung)/i],[C,[T,j]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[C,ee],[T,j]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[C,U],[T,j]],[/(apple) ?tv/i],[C,[E,X+" TV"],[T,j]],[/crkey/i],[[E,Q+"cast"],[C,G],[T,j]],[/droid.+aft(\w+)( bui|\))/i],[E,[C,W],[T,j]],[/(shield \w+ tv)/i],[E,[C,ae],[T,j]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[E,[C,de],[T,j]],[/(bravia[\w ]+)( bui|\))/i],[E,[C,ge],[T,j]],[/(mi(tv|box)-?\w+) bui/i],[E,[C,he],[T,j]],[/Hbbtv.*(technisat) (.*);/i],[C,E,[T,j]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[C,$e],[E,$e],[T,j]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[E,[T,j]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[T,j]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[C,E,[T,k]],[/droid.+; (shield)( bui|\))/i],[E,[C,ae],[T,k]],[/(playstation \w+)/i],[E,[C,ge],[T,k]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[E,[C,Y],[T,k]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[E,[C,ee],[T,N]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[C,E,[T,N]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[E,[C,fe],[T,N]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[E,[C,X],[T,N]],[/(opwwe\d{3})/i],[E,[C,ue],[T,N]],[/(moto 360)/i],[E,[C,te],[T,N]],[/(smartwatch 3)/i],[E,[C,ge],[T,N]],[/(g watch r)/i],[E,[C,U],[T,N]],[/droid.+; (wt63?0{2,3})\)/i],[E,[C,Se],[T,N]],[/droid.+; (glass) \d/i],[E,[C,G],[T,N]],[/(pico) (4|neo3(?: link|pro)?)/i],[C,E,[T,N]],[/; (quest( \d| pro)?)/i],[E,[C,be],[T,N]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[C,[T,V]],[/(aeobc)\b/i],[E,[C,W],[T,V]],[/(homepod).+mac os/i],[E,[C,X],[T,V]],[/windows iot/i],[[T,V]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[E,[T,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[E,[T,O]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[T,O]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[T,I]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[E,[C,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[M,[w,K+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[w,M],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[M,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[w,M],[/ladybird\//i],[[w,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[M,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,M],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[w,[M,Oe,it]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[M,Oe,it],[w,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[M,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,je],[M,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[M,w],[/(ubuntu) ([\w\.]+) like android/i],[[w,/(.+)/,"$1 Touch"],M],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[w,M],[/\(bb(10);/i],[M,[w,oe]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[M,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[M,[w,$+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[M,[w,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[M,[w,"watchOS"]],[/crkey\/([\d\.]+)/i],[M,[w,Q+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[w,_e],M],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,M],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],M],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[w,M]]},ut=function(qe,Ae){if(typeof qe===x&&(Ae=qe,qe=d),!(this instanceof ut))return new ut(qe,Ae).getResult();var Ie=typeof u!==v&&u.navigator?u.navigator:d,Ge=qe||(Ie&&Ie.userAgent?Ie.userAgent:h),Ye=Ie&&Ie.userAgentData?Ie.userAgentData:d,st=Ae?Be(ft,Ae):ft,ze=Ie&&Ie.userAgent==Ge;return this.getBrowser=function(){var Le={};return Le[w]=d,Le[M]=d,Qe.call(Le,Ge,st.browser),Le[S]=Me(Le[M]),ze&&Ie&&Ie.brave&&typeof Ie.brave.isBrave==g&&(Le[w]="Brave"),Le},this.getCPU=function(){var Le={};return Le[A]=d,Qe.call(Le,Ge,st.cpu),Le},this.getDevice=function(){var Le={};return Le[C]=d,Le[E]=d,Le[T]=d,Qe.call(Le,Ge,st.device),ze&&!Le[T]&&Ye&&Ye.mobile&&(Le[T]=I),ze&&Le[E]=="Macintosh"&&Ie&&typeof Ie.standalone!==v&&Ie.maxTouchPoints&&Ie.maxTouchPoints>2&&(Le[E]="iPad",Le[T]=O),Le},this.getEngine=function(){var Le={};return Le[w]=d,Le[M]=d,Qe.call(Le,Ge,st.engine),Le},this.getOS=function(){var Le={};return Le[w]=d,Le[M]=d,Qe.call(Le,Ge,st.os),ze&&!Le[w]&&Ye&&Ye.platform&&Ye.platform!="Unknown"&&(Le[w]=Ye.platform.replace(/chrome os/i,_e).replace(/macos/i,je)),Le},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ge},this.setUA=function(Le){return Ge=typeof Le===b&&Le.length>z?$e(Le,z):Le,this},this.setUA(Ge),this};ut.VERSION=f,ut.BROWSER=rt([w,M,S]),ut.CPU=rt([A]),ut.DEVICE=rt([E,C,T,k,I,j,O,N,V]),ut.ENGINE=ut.OS=rt([w,M]),o.exports&&(l=o.exports=ut),l.UAParser=ut;var xt=typeof u!==v&&(u.jQuery||u.Zepto);if(xt&&!xt.ua){var ct=new ut;xt.ua=ct.getResult(),xt.ua.get=function(){return ct.getUA()},xt.ua.set=function(qe){ct.setUA(qe);var Ae=ct.getResult();for(var Ie in Ae)xt.ua[Ie]=Ae[Ie]}}})(typeof window=="object"?window:uaParser_min)}(uaParser_min$1,uaParser_min$1.exports)),uaParser_min$1.exports}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1,Object.defineProperty(lib,"__esModule",{value:!0});function o(pe){return pe&&typeof pe=="object"&&"default"in pe?pe.default:pe}var l=requireReact(),u=o(l),d=requireUaParser_min(),f=new d,h=f.getBrowser(),m=f.getCPU(),g=f.getDevice(),v=f.getEngine(),x=f.getOS(),b=f.getUA(),S=function(J){return f.setUA(J)},E=function(J){if(!J){console.error("No userAgent string was provided");return}var re=new d(J);return{UA:re,browser:re.getBrowser(),cpu:re.getCPU(),device:re.getDevice(),engine:re.getEngine(),os:re.getOS(),ua:re.getUA(),setUserAgent:function(Te){return re.setUA(Te)}}},w=Object.freeze({ClientUAInstance:f,browser:h,cpu:m,device:g,engine:v,os:x,ua:b,setUa:S,parseUserAgent:E});function T(pe,J){var re=Object.keys(pe);if(Object.getOwnPropertySymbols){var Ee=Object.getOwnPropertySymbols(pe);J&&(Ee=Ee.filter(function(Te){return Object.getOwnPropertyDescriptor(pe,Te).enumerable})),re.push.apply(re,Ee)}return re}function C(pe){for(var J=1;J<arguments.length;J++){var re=arguments[J]!=null?arguments[J]:{};J%2?T(Object(re),!0).forEach(function(Ee){O(pe,Ee,re[Ee])}):Object.getOwnPropertyDescriptors?Object.defineProperties(pe,Object.getOwnPropertyDescriptors(re)):T(Object(re)).forEach(function(Ee){Object.defineProperty(pe,Ee,Object.getOwnPropertyDescriptor(re,Ee))})}return pe}function M(pe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(J){return typeof J}:M=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},M(pe)}function A(pe,J){if(!(pe instanceof J))throw new TypeError("Cannot call a class as a function")}function k(pe,J){for(var re=0;re<J.length;re++){var Ee=J[re];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(pe,Ee.key,Ee)}}function I(pe,J,re){return k(pe.prototype,J),pe}function O(pe,J,re){return J in pe?Object.defineProperty(pe,J,{value:re,enumerable:!0,configurable:!0,writable:!0}):pe[J]=re,pe}function j(){return j=Object.assign||function(pe){for(var J=1;J<arguments.length;J++){var re=arguments[J];for(var Ee in re)Object.prototype.hasOwnProperty.call(re,Ee)&&(pe[Ee]=re[Ee])}return pe},j.apply(this,arguments)}function N(pe,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");pe.prototype=Object.create(J&&J.prototype,{constructor:{value:pe,writable:!0,configurable:!0}}),J&&z(pe,J)}function V(pe){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(re){return re.__proto__||Object.getPrototypeOf(re)},V(pe)}function z(pe,J){return z=Object.setPrototypeOf||function(Ee,Te){return Ee.__proto__=Te,Ee},z(pe,J)}function W(pe,J){if(pe==null)return{};var re={},Ee=Object.keys(pe),Te,ot;for(ot=0;ot<Ee.length;ot++)Te=Ee[ot],!(J.indexOf(Te)>=0)&&(re[Te]=pe[Te]);return re}function X(pe,J){if(pe==null)return{};var re=W(pe,J),Ee,Te;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(pe);for(Te=0;Te<ot.length;Te++)Ee=ot[Te],!(J.indexOf(Ee)>=0)&&Object.prototype.propertyIsEnumerable.call(pe,Ee)&&(re[Ee]=pe[Ee])}return re}function ie(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function oe(pe,J){if(J&&(typeof J=="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(pe)}function le(pe,J){return Q(pe)||K(pe,J)||$(pe,J)||L()}function Q(pe){if(Array.isArray(pe))return pe}function K(pe,J){var re=pe==null?null:typeof Symbol<"u"&&pe[Symbol.iterator]||pe["@@iterator"];if(re!=null){var Ee=[],Te=!0,ot=!1,Ct,Zt;try{for(re=re.call(pe);!(Te=(Ct=re.next()).done)&&(Ee.push(Ct.value),!(J&&Ee.length===J));Te=!0);}catch(Oi){ot=!0,Zt=Oi}finally{try{!Te&&re.return!=null&&re.return()}finally{if(ot)throw Zt}}return Ee}}function $(pe,J){if(pe){if(typeof pe=="string")return G(pe,J);var re=Object.prototype.toString.call(pe).slice(8,-1);if(re==="Object"&&pe.constructor&&(re=pe.constructor.name),re==="Map"||re==="Set")return Array.from(pe);if(re==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(re))return G(pe,J)}}function G(pe,J){(J==null||J>pe.length)&&(J=pe.length);for(var re=0,Ee=new Array(J);re<J;re++)Ee[re]=pe[re];return Ee}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
132
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Q(ee,de){if(ee){if(typeof ee=="string")return K(ee,de);var ge=Object.prototype.toString.call(ee).slice(8,-1);return ge==="Object"&&ee.constructor&&(ge=ee.constructor.name),ge==="Map"||ge==="Set"?Array.from(ee):ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ge)?K(ee,de):void 0}}function K(ee,de){(de==null||de>ee.length)&&(de=ee.length);for(var ge=0,he=new Array(de);ge<de;ge++)he[ge]=ee[ge];return he}function $(ee,de){if(!(ee instanceof de))throw new TypeError("Cannot call a class as a function")}function G(ee,de){for(var ge=0;ge<de.length;ge++){var he=de[ge];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ee,he.key,he)}}function L(ee,de){return(L=Object.setPrototypeOf||function(ge,he){return ge.__proto__=he,ge})(ee,de)}function B(ee){var de=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var ge,he=Y(ee);if(de){var Se=Y(this).constructor;ge=Reflect.construct(he,arguments,Se)}else ge=he.apply(this,arguments);return q(this,ge)}}function q(ee,de){return!de||W(de)!=="object"&&typeof de!="function"?U(ee):de}function U(ee){if(ee===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ee}function Y(ee){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(de){return de.__proto__||Object.getPrototypeOf(de)})(ee)}function te(ee,de,ge){return de in ee?Object.defineProperty(ee,de,{value:ge,enumerable:!0,configurable:!0,writable:!0}):ee[de]=ge,ee}var ae=x.a.createRef(),ue=function(ee){(function(be,_e){if(typeof _e!="function"&&_e!==null)throw new TypeError("Super expression must either be null or a function");be.prototype=Object.create(_e&&_e.prototype,{constructor:{value:be,writable:!0,configurable:!0}}),_e&&L(be,_e)})(Se,ee);var de,ge,he=B(Se);function Se(be){var _e;$(this,Se);for(var je=arguments.length,He=new Array(je>1?je-1:0),Be=1;Be<je;Be++)He[Be-1]=arguments[Be];return te(U(_e=he.call.apply(he,[this,be].concat(He))),"canvas",x.a.createRef()),te(U(_e),"confetti",void 0),_e.canvas=be.canvasRef||ae,_e}return de=Se,(ge=[{key:"componentDidMount",value:function(){if(this.canvas.current){var be=ve(this.props)[0];this.confetti=new V(this.canvas.current,be)}}},{key:"componentDidUpdate",value:function(){var be=ve(this.props)[0];this.confetti&&(this.confetti.options=be)}},{key:"componentWillUnmount",value:function(){this.confetti&&this.confetti.stop(),this.confetti=void 0}},{key:"render",value:function(){var be=le(ve(this.props),2),_e=be[0],je=be[1],He=oe({zIndex:2,position:"absolute",pointerEvents:"none",top:0,left:0,bottom:0,right:0},je.style);return x.a.createElement("canvas",X({width:_e.width,height:_e.height,ref:this.canvas},je,{style:He}))}}])&&G(de.prototype,ge),Se}(v.Component);function ve(ee){var de={},ge={},he=[].concat(z(Object.keys(N)),["confettiSource","drawShape","onConfettiComplete"]),Se=["canvasRef"];for(var be in ee){var _e=ee[be];he.includes(be)?de[be]=_e:Se.includes(be)?Se[be]=_e:ge[be]=_e}return[de,ge,{}]}te(ue,"defaultProps",oe({},N)),te(ue,"displayName","ReactConfetti");var fe=x.a.forwardRef(function(ee,de){return x.a.createElement(ue,X({canvasRef:de},ee))});f.default=fe}]).default})}(reactConfetti_min$1)),reactConfetti_min$1.exports}var reactConfetti_minExports=requireReactConfetti_min();const Confetti=getDefaultExportFromCjs$1(reactConfetti_minExports),ConfettiProvider=({children:o})=>{const{isVisible:l,stopConfetti:u}=useConfettiStore(d=>d);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[o,l&&reactDomExports.createPortal(jsxRuntimeExports.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:999999},children:jsxRuntimeExports.jsx(Confetti,{recycle:!1,onConfettiComplete:()=>u()})}),document.body)]})},formatDate=(o,l)=>{const u=new Date,d=new Date(o);if(u.getDate()===d.getDate()&&u.getMonth()===d.getMonth()&&u.getFullYear()===d.getFullYear())return l("dates.today");const f=new Date(u);if(f.setDate(u.getDate()-1),f.getDate()===d.getDate()&&f.getMonth()===d.getMonth()&&f.getFullYear()===d.getFullYear())return l("dates.yesterday");const h=d.getDate(),g=["january","february","march","april","may","june","july","august","september","october","november","december"][d.getMonth()],v=l(`months.${g}`);return d.getFullYear()!==u.getFullYear()?`${v} ${h}, ${d.getFullYear()}`:`${v} ${h}`},sizeClasses={sm:"text-[8px] px-0.75 py-px",md:"text-[10px] px-1.5 py-[2px]",lg:"text-[14px] px-2 py-[2.5px]"},GradientBadge=({children:o,size:l="sm",className:u,style:d,...f})=>jsxRuntimeExports.jsx("div",{className:cn$1("text-rounded uppercase rounded-full font-extrabold tracking-tight",sizeClasses[l],u),style:{background:"linear-gradient(180deg, #FBFBFB 0%, #797979 100%)",...d,color:(d==null?void 0:d.color)||"black"},...f,children:o});function ProfileInventoryModal({children:o,...l}){const{t:u}=useTranslation(),{isOpen:d,setIsOpen:f}=useInventoryModalStore(),{data:{inventory:h}}=useProfile(),{openBoxModal:m}=useBoxOpening(),g=E=>{var w,T;(T=(w=window.Telegram)==null?void 0:w.WebApp)==null||T.HapticFeedback.impactOccurred("soft"),m(E)},v=h.filter(E=>E.type==="box"),x=v.length===0,b=E=>{const w=getLootboxRarityByBoxId(E.box_id),T=u("unopenedLootBox");return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:getLootboxImage(E),alt:T,width:96,height:96,className:"size-24 object-contain scale-110"}),w&&jsxRuntimeExports.jsx(GradientBadge,{size:"lg",className:"absolute right-0 top-18",style:{background:LOOTBOX_RARITY_GRADIENT[w],color:LOOTBOX_RARITY_TEXT_COLOR[w],boxShadow:"0px 0px 16px rgba(0, 0, 0, 0.2)"},children:u(LOOTBOX_RARITY_LABEL_KEY[w])}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[jsxRuntimeExports.jsx(Text,{weight:"2",children:T}),jsxRuntimeExports.jsx(Caption,{weight:"3",className:"text-tgui-subtitle-text",children:formatDate(E.acquired_at,u)})]})]})},S=jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center gap-6",children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-2",children:[jsxRuntimeExports.jsxs(Title$1,{level:"2",weight:"1",children:[u("inventory"),!x&&jsxRuntimeExports.jsx("span",{className:"text-tgui-hint ml-1",children:v.length})]}),jsxRuntimeExports.jsx(Subheadline,{weight:"3",level:"2",children:u(x?"inventoryDescriptionEmpty":"inventoryDescription")}),x&&jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-5",children:jsxRuntimeExports.jsx(Subheadline,{weight:"3",level:"2",className:"text-tgui-subtitle-text !mt-6.5",children:jsxRuntimeExports.jsx(Trans,{i18nKey:"inventoryDescriptionEmptyButton"})})})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 xl:grid-cols-5 gap-x-2.5 gap-y-[30px] justify-items-center",children:v.map(E=>jsxRuntimeExports.jsx(motion.button,{type:"button",className:"min-w-[96px] min-h-[96px] rounded-full flex flex-col items-center justify-center gap-2.5 relative cursor-pointer bg-transparent border-0 p-0",onClick:()=>g(E.id),"aria-label":`${u("openItem")} ${u("unopenedLootBox")}`,whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:30},children:b(E)},`inventory-slot-${E.id}`))})})]});return jsxRuntimeExports.jsx(Drawer,{open:d,onOpenChange:f,...l,children:jsxRuntimeExports.jsx(DrawerContent,{className:"min-h-[100dvh]",children:S})})}function BalanceHeader({type:o,balanceId:l}){const{t:u}=useTranslation(),{data:d}=useProfile();return jsxRuntimeExports.jsxs("div",{className:"absolute top-3 left-4 z-1 flex flex-col items-start",children:[jsxRuntimeExports.jsx(Caption,{weight:"3",children:u("topUpModal.balance")}),jsxRuntimeExports.jsxs("div",{id:l,className:"flex flex-row gap-0.5 items-center justify-center",children:[jsxRuntimeExports.jsx("div",{className:"size-5 flex items-center justify-center",children:o==="coins"?jsxRuntimeExports.jsx(IconBalanceCoins,{style:{height:18}}):o==="gems"?jsxRuntimeExports.jsx(IconBalanceGems,{width:18,height:18}):jsxRuntimeExports.jsx(IconUsdt,{style:{height:18,width:19}})}),jsxRuntimeExports.jsx(AnimatedBalance,{className:"text-rounded",style:{fontSize:"17px",lineHeight:"22px"},value:o==="coins"?d.balance_coins:o==="gems"?d.balance_gems:d.balance_usdt,noRounding:o==="usdt"})]})]})}const StarParticles=({count:o=50,width:l,height:u,style:d,delay:f=0})=>{const[h,m]=reactExports.useState(!1),g=reactExports.useRef(null),v=reactExports.useRef([]),x=reactExports.useRef();return reactExports.useEffect(()=>{const b=setTimeout(()=>{m(!0)},f);return()=>clearTimeout(b)},[f]),reactExports.useEffect(()=>{const b=()=>({x:Math.random()*l,y:Math.random()*u,scale:.6+Math.random()*.9,rotation:Math.random()*360,opacity:.3+Math.random()*.7,velocity:{x:(Math.random()-.5)*.24,y:(Math.random()-.5)*.24},fadeOut:!1});v.current=Array(o).fill(null).map(b);let S=performance.now();const E=w=>{const T=g.current;if(!T)return;const C=(w-S)/16.67;S=w;const M=window.devicePixelRatio||1;T.width=l*M,T.height=u*M;const A=T.getContext("2d",{alpha:!0});A&&(A.scale(M,M),A.clearRect(0,0,l,u),A.imageSmoothingEnabled=!1,v.current.forEach(k=>{!k.fadeOut&&(k.x<10||k.x>l-10||k.y<10||k.y>u-10)&&(k.fadeOut=!0),k.fadeOut&&(k.opacity=Math.max(0,k.opacity-.03*C)),A.save(),A.translate(k.x,k.y),A.rotate(k.rotation*Math.PI/180),A.scale(k.scale,k.scale),A.globalAlpha=k.opacity,A.beginPath(),A.moveTo(3,0),A.lineTo(2.635,2.635),A.lineTo(0,3),A.lineTo(2.635,3.365),A.lineTo(3,6),A.lineTo(3.365,3.365),A.lineTo(6,3),A.lineTo(3.365,2.635),A.closePath(),A.fillStyle="#FFB700",A.fill(),A.restore(),k.x+=k.velocity.x*C,k.y+=k.velocity.y*C,k.rotation+=.24*C,k.opacity<=0&&Object.assign(k,b())}),x.current=requestAnimationFrame(E))};return x.current=requestAnimationFrame(E),()=>{x.current&&cancelAnimationFrame(x.current)}},[l,u,o]),jsxRuntimeExports.jsx("canvas",{ref:g,width:l,height:u,style:{position:"absolute",pointerEvents:"none",zIndex:2,width:`${l}px`,height:`${u}px`,opacity:h?1:0,transform:`scale(${h?1:.9})`,transition:"opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",...d}})},PRICES_TAG="prices";function usePrices(){return useQuery({queryKey:[PRICES_TAG],queryFn:async()=>await makeRequest("prices","GET")})}const IconCurrencyStar=o=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...o,children:[jsxRuntimeExports.jsx("title",{children:"Currency star"}),jsxRuntimeExports.jsx("path",{d:"M5.87807 4.95235L7.59874 1.50475C7.79707 1.10699 8.27698 0.947233 8.67063 1.14796C8.82496 1.22664 8.95003 1.3541 9.02655 1.51082L10.6516 4.83573C10.7843 5.10734 11.0437 5.29267 11.3414 5.32865L14.7439 5.73942C15.2058 5.79513 15.5357 6.2189 15.4804 6.6858C15.4577 6.87807 15.3708 7.0569 15.2342 7.19238L12.5446 9.86072C12.436 9.96845 12.3835 10.1211 12.4024 10.2737L12.8494 13.8758C12.9133 14.3915 12.5515 14.8621 12.0415 14.9267C11.8481 14.9512 11.652 14.9139 11.4807 14.8198L8.63941 13.2578C8.4337 13.1449 8.18638 13.1416 7.97785 13.2492L5.034 14.7687C4.61977 14.9826 4.11233 14.8163 3.90077 14.3976C3.82165 14.2408 3.79239 14.0633 3.8171 13.889L4.0525 12.2364C4.1676 11.4281 4.66464 10.7269 5.38472 10.3569L8.65458 8.67676C8.74194 8.6319 8.77662 8.52416 8.73219 8.43594C8.69794 8.36744 8.62424 8.32886 8.54924 8.3397L4.55019 8.91585C3.93892 9.00408 3.31898 8.83045 2.83971 8.43681L1.50793 7.34324C1.12772 7.0311 1.06985 6.46666 1.37874 6.08255C1.52223 5.90394 1.72837 5.78797 1.95424 5.75871L5.3689 5.31651C5.58783 5.28812 5.7788 5.15177 5.87807 4.95235Z",fill:"url(#paint0_linear_4259_226)"}),jsxRuntimeExports.jsx("path",{d:"M8.98273 9.42344C9.05773 9.4126 9.13143 9.45119 9.16568 9.51968C9.21012 9.6079 9.17544 9.71564 9.08808 9.76051L5.81822 11.4406C5.09813 11.8106 4.6011 12.5119 4.486 13.3202L4.27899 14.7742C4.1214 14.6962 3.98658 14.5676 3.90074 14.3975C3.82162 14.2408 3.79236 14.0632 3.81707 13.889L4.05247 12.2364C4.16757 11.4281 4.66461 10.7268 5.38469 10.3568L6.50687 9.78001L8.98273 9.42344Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M8.67063 1.14796C8.82496 1.22664 8.95003 1.3541 9.02655 1.51082L10.6516 4.83573C10.7843 5.10734 11.0437 5.29267 11.3414 5.32865L14.7439 5.73942C15.2058 5.79513 15.5357 6.2189 15.4804 6.6858C15.472 6.75777 15.4544 6.82778 15.4288 6.89454C15.351 6.85856 15.2667 6.83407 15.1774 6.82323L11.7749 6.41246C11.4773 6.37648 11.2178 6.19115 11.0851 5.91955L9.46007 2.59463C9.38356 2.43791 9.25848 2.31045 9.10415 2.23177C8.71051 2.03105 8.2306 2.1908 8.03226 2.58856L6.3116 6.03617C6.21232 6.23559 6.02135 6.37193 5.80242 6.40033L2.38776 6.84252C2.1619 6.87178 1.95576 6.98775 1.81226 7.16636C1.73921 7.25719 1.68675 7.3582 1.65402 7.46333L1.50793 7.34324C1.12772 7.0311 1.06985 6.46666 1.37874 6.08255C1.52223 5.90394 1.72837 5.78797 1.95424 5.75871L5.3689 5.31651C5.58783 5.28812 5.7788 5.15177 5.87807 4.95235L7.59874 1.50475C7.79707 1.10699 8.27698 0.947233 8.67063 1.14796Z",fill:"white",fillOpacity:"0.660262"}),jsxRuntimeExports.jsx("path",{d:"M7.2883 1.34987C7.5727 0.779997 8.26244 0.550446 8.82797 0.83874C9.04972 0.951673 9.22855 1.13419 9.33823 1.35832L10.9631 4.68324C11.0444 4.8495 11.2024 4.96243 11.3829 4.98432L14.7855 5.39487C15.4381 5.47377 15.9024 6.0703 15.8248 6.72644C15.793 6.99631 15.6709 7.24754 15.4785 7.43851L12.7889 10.1066C12.7568 10.1387 12.7407 10.1847 12.7466 10.2308L13.1936 13.833C13.2809 14.5377 12.7856 15.1819 12.085 15.2708C11.8189 15.3044 11.5492 15.253 11.3138 15.1236L8.47226 13.5618C8.368 13.5044 8.24271 13.5027 8.13693 13.5573L5.19308 15.0768C4.60695 15.3792 3.88947 15.1442 3.5912 14.554C3.48 14.3337 3.43904 14.0844 3.47372 13.8402L3.70912 12.1873C3.84005 11.268 4.4058 10.4699 5.22624 10.0483L7.60521 8.82579L4.5998 9.25909C3.91721 9.3575 3.22531 9.17391 2.67972 8.75252L2.61967 8.70483L1.28767 7.61105C0.760502 7.17839 0.680517 6.3974 1.10841 5.86503C1.30783 5.61683 1.59482 5.45535 1.90956 5.4146L5.32422 4.9724C5.42848 4.95896 5.51974 4.89371 5.56786 4.79747L7.2883 1.34987ZM8.51301 1.45673C8.2917 1.3438 8.02161 1.43375 7.9089 1.65962L6.18845 5.10723C6.03758 5.40961 5.74734 5.61705 5.41331 5.66019L1.99865 6.10238C1.86187 6.12016 1.73658 6.1906 1.64901 6.29964C1.45913 6.53569 1.49489 6.88381 1.72791 7.075L3.05992 8.16878C3.46396 8.50043 3.98593 8.64674 4.50074 8.57261L8.49957 7.99624C8.72284 7.96416 8.9409 8.07861 9.04213 8.27998C9.17175 8.53771 9.07009 8.8531 8.81301 8.98532L5.54337 10.6652C4.92343 10.9837 4.4951 11.588 4.39583 12.2853L4.16042 13.9379C4.14568 14.0417 4.16324 14.1477 4.21028 14.2412C4.33513 14.4883 4.63231 14.5856 4.87487 14.4603L7.81894 12.941C8.12978 12.7804 8.49957 12.7852 8.80651 12.9538L11.6478 14.5156C11.7549 14.5745 11.8772 14.5977 11.9979 14.5826C12.3174 14.542 12.5457 14.2453 12.5051 13.9184L12.0582 10.3162C12.0261 10.0572 12.1154 9.79775 12.3005 9.61437L14.9899 6.94602C15.0707 6.86582 15.1225 6.75961 15.136 6.64494C15.1689 6.36705 14.9736 6.11647 14.7024 6.08352L11.2997 5.67298C10.885 5.6229 10.5241 5.36496 10.3399 4.98779L8.71504 1.66287C8.67125 1.57356 8.60037 1.50117 8.51301 1.45673Z",fill:"url(#paint1_linear_4259_226)"}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"paint0_linear_4259_226",x1:"6.38247",y1:"4.31269",x2:"12.2351",y2:"14.7173",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#FFCE00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FFAD00"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"paint1_linear_4259_226",x1:"8.33333",y1:"1.06114",x2:"8.33333",y2:"14.7172",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{stopColor:"#F28B00"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#FA7400"})]})]})]}),XsButton=reactExports.forwardRef(({className:o,children:l,...u},d)=>jsxRuntimeExports.jsx(Button,{...u,ref:d,className:`xs-button ${o||""}`,size:"s",children:l}));XsButton.displayName="XsButton";const Ribbon=({text:o})=>jsxRuntimeExports.jsxs("svg",{style:{position:"absolute",top:-2,right:-2,width:48,height:48,overflow:"visible"},children:[jsxRuntimeExports.jsx("title",{children:"Ribbon"}),jsxRuntimeExports.jsx("path",{d:"M46.83 24.5L23.5 1.17C22.75 0.42 21.73 0 20.68 0C19.62 0 2.73 0.05 1.55 0.05C0.36 0.05 -0.23 1.4885 0.6 2.32L45.72 47.44C46.56 48.28 48 47.68 48 46.5C48 45.31 48 28.38 48 27.32C48 26.26 47.5 25.24 46.82 24.5Z",fill:"#1EC948"}),jsxRuntimeExports.jsx("text",{x:"21",y:"21",textAnchor:"middle",transform:"rotate(45 24 24)",style:{fill:"white",fontSize:"13px",fontWeight:700,fontFamily:"-apple-system, system-ui, sans-serif"},children:o})]}),BuyOption=({amount:o,price:l,onClick:u,loading:d,discount:f,optionIcon:h})=>{const{t:m}=useTranslation();return jsxRuntimeExports.jsxs(motion.button,{whileTap:{scale:.95},className:"relative flex flex-col items-center bg-tgui-section-bg cursor-pointer rounded-lg w-full px-1 pb-2.5 pt-1",onClick:u,type:"button",children:[f&&jsxRuntimeExports.jsx(Ribbon,{text:f}),jsxRuntimeExports.jsx("div",{className:"h-12.5 flex justify-center items-center",children:jsxRuntimeExports.jsx("img",{className:"max-w-20 max-h-12.5 object-cover",src:h,alt:"Option icon"})}),jsxRuntimeExports.jsx(Text,{weight:"1",className:"text-rounded",style:{fontSize:"20px",lineHeight:"25px"},children:formatter.format(o)}),jsxRuntimeExports.jsx(Text,{weight:"3",style:{fontSize:"10px",lineHeight:"13px"},children:m("topUpModal.gems")}),jsxRuntimeExports.jsx(XsButton,{onClick:g=>{g.stopPropagation(),u()},mode:"bezeled",style:{color:"#F36200",backgroundColor:"rgba(255, 190, 0, 0.20)",marginTop:10},before:jsxRuntimeExports.jsx(IconCurrencyStar,{style:{width:16,height:16}}),loading:d,children:jsxRuntimeExports.jsx(Text,{weight:"2",style:{fontSize:"10px",lineHeight:"13px"},children:formatter.format(l)})})]})},optionIcon1=assetUrl("buyOptions/buyOption1.webp"),optionIcon2=assetUrl("buyOptions/buyOption2.webp"),optionIcon3=assetUrl("buyOptions/buyOption3.webp"),optionIcon4=assetUrl("buyOptions/buyOption4.webp"),optionIcon5=assetUrl("buyOptions/buyOption5.webp"),optionIcon6=assetUrl("buyOptions/buyOption6.webp"),icons=[optionIcon1,optionIcon2,optionIcon3,optionIcon4,optionIcon5,optionIcon6],getIconByIndex=o=>icons[o%icons.length],TopUpModal=({...o})=>{const{t:l}=useTranslation(),{isOpen:u,setIsOpen:d}=useTopUpModalStore(),{showSnackbar:f}=useSnackbar(),h=useQueryClient(),m=useFireConfetti(),[g,v]=reactExports.useState(null),{data:x,isLoading:b,error:S}=usePrices(),E=async(w,T)=>{var C,M;v(1),(M=(C=window.Telegram)==null?void 0:C.WebApp)==null||M.openInvoice(w,A=>{A==="paid"&&(h.invalidateQueries({queryKey:[PROFILE_TAG]}),d(!1),m(),f(l("snackbar.purchase.walletPurchaseGems"),{type:"success_top",gems:T.toString()}))}),v(null)};return jsxRuntimeExports.jsx(Drawer,{open:u,onOpenChange:d,headerOptions:{before:jsxRuntimeExports.jsx(BalanceHeader,{type:"gems"})},variant:"secondary",...o,children:jsxRuntimeExports.jsxs(DrawerContent,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 items-center",children:[jsxRuntimeExports.jsx(LazyLottie,{asset:"lottie/moneyTongue.json",className:"size-18",height:72,width:72}),jsxRuntimeExports.jsx(Title$1,{level:"2",weight:"1",children:l("topUpModal.topUpBalance")})]}),b?jsxRuntimeExports.jsx("div",{className:"flex justify-center items-center w-full",style:{height:282},children:jsxRuntimeExports.jsx(Spinner,{size:"m"})}):S?jsxRuntimeExports.jsx("div",{className:"text-red-500 text-center p-4",children:l("common.error")}):x!=null&&x.items?jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-1.5 w-full",children:x.items.map((w,T)=>jsxRuntimeExports.jsxs("div",{className:"relative z-1 overflow-visible",children:[T>=x.items.length-2&&jsxRuntimeExports.jsx(StarParticles,{width:100,height:58,count:30,delay:300,style:{bottom:0,left:"50%",transform:"translateX(-50%) scale(1)"}}),jsxRuntimeExports.jsx(BuyOption,{amount:w.gems,price:w.stars,onClick:()=>E(w.invoice_url,w.gems),loading:g===w.gems,discount:w.discount?`–${w.discount}%`:void 0,optionIcon:getIconByIndex(T)},w.gems)]},w.invoice_url))}):null]})})},supportedLanguages=["en","ru","hi","es","pt"];function mapTelegramLanguageToSupported(o){return{"pt-br":"pt","pt-pt":"pt"}[o]||o}const getTelegramLanguage=()=>{var d,f,h;const o=(h=(f=(d=window.Telegram)==null?void 0:d.WebApp)==null?void 0:f.initDataUnsafe.user)==null?void 0:h.language_code,l=o?mapTelegramLanguageToSupported(o):null;return l&&supportedLanguages.includes(l)?l:"en"};function I18nBackendLanguageProvider({children:o}){const{i18n:l}=useTranslation(),{data:u}=useProfile(),d=reactExports.useRef(!1),f=reactExports.useRef(null),h=getTelegramLanguage(),m=u.language===l.language,g=u.language===null&&l.language===h;if(reactExports.useEffect(()=>{!d.current&&(m||g)&&(d.current=!0)},[m,g]),!d.current&&!m&&!g){if(f.current)throw f.current;const v=u.language===null?h:u.language;throw f.current=l.changeLanguage(v),f.current}return f.current=null,o}const SESSION_HEADER$1="X-Session-Id";async function sendBatch(o,{events:l,sessionId:u},d={}){const f=JSON.stringify({events:l}),h={"Content-Type":"application/json",[SESSION_HEADER$1]:u},m=o.getHeaders();m&&Object.assign(h,m);const g=d.fireAndForget?1:2;for(let v=0;v<g;v++)try{const x=await fetch(o.endpoint,{method:"POST",headers:h,body:f,keepalive:!0});if(x.ok)return!0;if(x.status<500)return o.debug&&console.warn("[analytics] drop batch, status",x.status),!1}catch(x){o.debug&&console.warn("[analytics] send failed, attempt",v,x)}return!1}class Batcher{constructor(l,u){this.config=l,this.session=u,this.queue=[],this.firstEnqueuedAt=null,this.timer=null,this.inFlight=null,this.timer=setInterval(()=>{this.flush()},l.flushIntervalMs)}enqueue(l){this.queue.push(l),this.firstEnqueuedAt===null&&(this.firstEnqueuedAt=Date.now()),this.queue.length>=this.config.batchSize&&this.flush()}async flush(){if(this.inFlight)return this.inFlight;if(this.queue.length===0)return;if(!(this.config.getHeaders()!==null)){this.firstEnqueuedAt!==null&&Date.now()-this.firstEnqueuedAt>this.config.authWaitTimeoutMs&&(this.config.debug&&console.warn("[analytics] dropping batch: auth not ready within timeout"),this.queue=[],this.firstEnqueuedAt=null);return}const u=this.queue.splice(0,this.config.batchSize);return this.firstEnqueuedAt=this.queue.length>0?Date.now():null,this.inFlight=sendBatch(this.config,{events:u,sessionId:this.session.getSessionId()}).then(()=>{}).finally(()=>{this.inFlight=null}),this.inFlight}flushOnHide(){if(this.queue.length===0)return;if(this.config.getHeaders()===null){this.queue=[],this.firstEnqueuedAt=null;return}const l=this.queue.splice(0,this.config.batchSize);this.firstEnqueuedAt=this.queue.length>0?Date.now():null,sendBatch(this.config,{events:l,sessionId:this.session.getSessionId()},{fireAndForget:!0})}stop(){this.timer!==null&&(clearInterval(this.timer),this.timer=null)}}function detectPlatform(){var l,u;const o=typeof window<"u"?(u=(l=window.Telegram)==null?void 0:l.WebApp)==null?void 0:u.platform:void 0;return o==="ios"?"ios":o==="android"||o==="android_x"?"android":"web"}const STORAGE_KEY="__orbit_analytics_session__";function generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,o=>{const l=Math.random()*16|0;return(o==="x"?l:l&3|8).toString(16)})}function readStorage(){try{const o=sessionStorage.getItem(STORAGE_KEY);if(!o)return null;const l=JSON.parse(o);return typeof(l==null?void 0:l.sessionId)!="string"?null:l}catch{return null}}function writeStorage(o){try{sessionStorage.setItem(STORAGE_KEY,JSON.stringify(o))}catch{}}class SessionManager{constructor(l){this.inactivityTimeoutMs=l;const u=readStorage();if(u)this.state=u;else{const d=Date.now();this.state={sessionId:generateId(),startedAt:d,lastActivityAt:d,hiddenAt:null},writeStorage(this.state)}}getSessionId(){return this.state.sessionId}onHidden(){this.state.hiddenAt===null&&(this.state.hiddenAt=Date.now(),writeStorage(this.state))}onActive(){const l=Date.now();this.state.hiddenAt!==null&&(l-this.state.hiddenAt>this.inactivityTimeoutMs&&this.rotate(l),this.state.hiddenAt=null),this.state.lastActivityAt=l,writeStorage(this.state)}rotate(l){this.state={sessionId:generateId(),startedAt:l,lastActivityAt:l,hiddenAt:null}}}function bindVisibility(o,l){var f;const u=[],d=typeof window<"u"?(f=window.Telegram)==null?void 0:f.WebApp:void 0;if(d&&typeof d.onEvent=="function"&&typeof d.offEvent=="function"&&(d.onEvent("activated",o),d.onEvent("deactivated",l),u.push(()=>{d.offEvent("activated",o),d.offEvent("deactivated",l)})),typeof document<"u"){const h=()=>{document.visibilityState==="visible"?o():l()};document.addEventListener("visibilitychange",h),u.push(()=>document.removeEventListener("visibilitychange",h))}return typeof window<"u"&&(window.addEventListener("pagehide",l),u.push(()=>window.removeEventListener("pagehide",l))),()=>{for(const h of u)h()}}const KEY="__orbitAnalyticsInstance__",DEFAULTS={endpoint:"https://app.portalapp.games/api/analytics/events",inactivityTimeoutMs:5*60*1e3,batchSize:50,flushIntervalMs:5e3,authWaitTimeoutMs:30*1e3,debug:!1};function resolveConfig(o){return{endpoint:o.endpoint??DEFAULTS.endpoint,getHeaders:o.getHeaders??(()=>({})),inactivityTimeoutMs:o.inactivityTimeoutMs??DEFAULTS.inactivityTimeoutMs,batchSize:o.batchSize??DEFAULTS.batchSize,flushIntervalMs:o.flushIntervalMs??DEFAULTS.flushIntervalMs,authWaitTimeoutMs:o.authWaitTimeoutMs??DEFAULTS.authWaitTimeoutMs,debug:o.debug??DEFAULTS.debug,platform:o.platform??detectPlatform()}}function warnOnMismatch(o,l){const u=[];o.endpoint!==l.endpoint&&u.push("endpoint"),o.inactivityTimeoutMs!==l.inactivityTimeoutMs&&u.push("inactivityTimeoutMs"),o.batchSize!==l.batchSize&&u.push("batchSize"),u.length>0&&console.warn(`[analytics] second getAnalytics() call with differing config (${u.join(", ")}); first-call config wins.`)}function createInstance(o){const l=new SessionManager(o.inactivityTimeoutMs),u=new Batcher(o,l);bindVisibility(()=>l.onActive(),()=>{l.onHidden(),u.flushOnHide()});let d;return{track:(h,m={})=>{const g={...m};d!==void 0&&(g.user_id=d),g.platform===void 0&&(g.platform=o.platform);const v={name:h,extra:g,ts_client:Date.now()};u.enqueue(v),o.debug&&console.debug("[analytics] track",h,g)},flush:()=>u.flush(),identify:h=>{d=h},getSessionId:()=>l.getSessionId()}}function getAnalytics(o){const l=globalThis,u=l[KEY];if(u)return u.config.debug&&warnOnMismatch(u.config,resolveConfig(o)),u.instance;const d=resolveConfig(o),f=createInstance(d);return l[KEY]={instance:f,config:d},f}var define_process_env_default$4={NODE_ENV:"production",version:"1.94.2",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const BASE_URL=define_process_env_default$4.BASE_URL;var define_process_env_default$3={NODE_ENV:"production",version:"1.94.2",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const ANALYTICS_ENDPOINT=`${BASE_URL.replace(/\/sdk\/?$/,"")}/api/analytics/events`;function getBaseAnalyticsParams(){return{game_id:window.game_id,game_title:window.game_title,game_url:window.location.origin+window.location.pathname}}let biAnalytics=null;function initAnalytics(){return biAnalytics||(biAnalytics=getAnalytics({endpoint:ANALYTICS_ENDPOINT,getHeaders:()=>{var u,d;const o=(d=(u=window.Telegram)==null?void 0:u.WebApp)==null?void 0:d.initData,l={};return o&&(l["X-Auth"]=o),window.game_id&&(l["X-Game-Id"]=window.game_id),Object.keys(l).length?l:null},debug:define_process_env_default$3.NODE_ENV!=="production"}),biAnalytics)}function getBiSessionId(){return initAnalytics().getSessionId()}class AnalyticsServiceImpl{identify(l){initAnalytics().identify(Number(l))}track(l,u={}){initAnalytics().track(l,u)}}const analytics=new AnalyticsServiceImpl,SESSION_HEADER="X-Session-Id";class APIRequestError extends Error{constructor({message:l,status:u,responseText:d}){super(l),this.status=u,this.responseText=d}}function createMakeRequest(o){return async function(u,d,f){o.waitUntilReady&&await o.waitUntilReady();const h=`${o.baseUrl}/${u}`;try{const m=o.getAuthData(),g=o.getBotId(),v={"X-Auth":m||o.getInitData(),"Content-Type":"application/json",[SESSION_HEADER]:getBiSessionId()};if(g&&(v["X-Bot-ID"]=g),m){console.warn("WARNING: AUTH_DATA is used for requests!!!"),console.log("=== API Request Debug ==="),console.log("externalAuthData:",m),console.log("externalAuthData type:",typeof m),console.log("externalAuthData truthy?",!!m),console.log("externalAuthData length:",m==null?void 0:m.length),console.log("config.getInitData():",o.getInitData()),console.log("config.getInitData() type:",typeof o.getInitData()),console.log("config.getInitData() truthy?",!!o.getInitData());const b=m||o.getInitData();console.log("X-Auth value (before headers):",b),console.log("X-Auth value type:",typeof b),console.log("X-Auth value truthy?",!!b),console.log("X-Auth value length:",b==null?void 0:b.length),v["a-deb"]=m,v["a-deb-string"]=String(m),console.log("Final headers object:",v),v["X-Auth"]||(v["X-Auth"]=m),console.log("Final X-Auth header:",v["X-Auth"])}const x=await fetch(h,{method:d,headers:v,body:f?JSON.stringify(f):null});if(!x.ok)throw new APIRequestError({message:`Request to ${u} failed with status ${x.status}`,status:x.status,responseText:await(async()=>{try{return await x.text()}catch{return}})()});return x.json()}catch(m){throw m instanceof APIRequestError||console.error(`Error during request to ${u}:`,m),m}}}const queryClient=new QueryClient({mutationCache:new MutationCache({onError:o=>{captureException(o)}}),queryCache:new QueryCache({onError:o=>{captureException(o)}}),defaultOptions:{queries:{staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!0,retry:(o,l)=>{if(l instanceof APIRequestError&&l.status===401)return o<3;if(l instanceof Error&&"status"in l){const u=l.status;if(u&&u>=400&&u<500)return!1}return o<3},retryDelay:(o,l)=>l instanceof APIRequestError&&l.status===401?Math.min(1e3*2**o,4e3):Math.min(1e3*2**o,3e4)},mutations:{retry:1,retryDelay:1e3}}});function createOverlay(o){let l=document.getElementById("overlay-root");l=document.createElement("div"),l.id="overlay-root",document.body.appendChild(l),clientExports.createRoot(l).render(jsxRuntimeExports.jsx(OverlayManager,{options:o}))}const OverlayManager=({options:o})=>{const l=reactExports.useCallback(()=>{var u;(u=window.Telegram.WebApp)==null||u.openTelegramLink("https://t.me/orbit_portal_bot/app?startapp=profile")},[]);return reactExports.useEffect(()=>{const u=d=>{d.shiftKey&&d.key==="Tab"&&(d.preventDefault(),l())};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[l]),jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsxs(AppRoot,{children:[jsxRuntimeExports.jsx(OrientationCheck,{}),jsxRuntimeExports.jsx("div",{id:"overlay-banner-top",className:"cssdk-banner-container cssdk-banner-top"}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsxs(I18nBackendLanguageProvider,{children:[jsxRuntimeExports.jsx(SnackbarProvider,{children:jsxRuntimeExports.jsx(BoxOpeningProvider,{children:jsxRuntimeExports.jsxs(ConfettiProvider,{children:[jsxRuntimeExports.jsx(OverlayProfile,{variant:(o==null?void 0:o.variant)||"translucent",onOpenProfile:()=>l(),initialPosition:o==null?void 0:o.initialPosition,initialCoordinates:o==null?void 0:o.initialCoordinates}),jsxRuntimeExports.jsx(TopUpModal,{}),jsxRuntimeExports.jsx(BoxOpeningModal,{}),jsxRuntimeExports.jsx(ProfileInventoryModal,{})]})})}),jsxRuntimeExports.jsx(EventsStack,{})]})}),jsxRuntimeExports.jsx("div",{id:"overlay-banner-bottom",className:"cssdk-banner-container cssdk-banner-bottom"})]})})};class AbortError extends Error{constructor(l="The operation was aborted"){super(l),this.name="AbortError"}}function delay(o,{signal:l}={}){return new Promise((u,d)=>{const f=()=>{d(new AbortError)},h=()=>{clearTimeout(m),f()};if(l!=null&&l.aborted)return f();const m=setTimeout(()=>{l==null||l.removeEventListener("abort",h),u()},o);l==null||l.addEventListener("abort",h,{once:!0})})}var lib={},uaParser_min$1={exports:{}},uaParser_min=uaParser_min$1.exports,hasRequiredUaParser_min;function requireUaParser_min(){return hasRequiredUaParser_min||(hasRequiredUaParser_min=1,function(o,l){(function(u,d){var f="1.0.41",h="",m="?",g="function",v="undefined",x="object",b="string",S="major",E="model",w="name",T="type",C="vendor",M="version",A="architecture",k="console",I="mobile",O="tablet",j="smarttv",N="wearable",V="embedded",z=500,W="Amazon",X="Apple",ie="ASUS",oe="BlackBerry",le="Browser",Q="Chrome",K="Edge",$="Firefox",G="Google",L="Honor",B="Huawei",q="Lenovo",U="LG",Y="Microsoft",te="Motorola",ae="Nvidia",ue="OnePlus",ve="Opera",fe="OPPO",ee="Samsung",de="Sharp",ge="Sony",he="Xiaomi",Se="Zebra",be="Facebook",_e="Chromium OS",je="Mac OS",He=" Browser",Be=function(qe,Ae){var Ie={};for(var Ge in qe)Ae[Ge]&&Ae[Ge].length%2===0?Ie[Ge]=Ae[Ge].concat(qe[Ge]):Ie[Ge]=qe[Ge];return Ie},rt=function(qe){for(var Ae={},Ie=0;Ie<qe.length;Ie++)Ae[qe[Ie].toUpperCase()]=qe[Ie];return Ae},Ke=function(qe,Ae){return typeof qe===b?we(Ae).indexOf(we(qe))!==-1:!1},we=function(qe){return qe.toLowerCase()},Me=function(qe){return typeof qe===b?qe.replace(/[^\d\.]/g,h).split(".")[0]:d},$e=function(qe,Ae){if(typeof qe===b)return qe=qe.replace(/^\s\s*/,h),typeof Ae===v?qe:qe.substring(0,z)},Qe=function(qe,Ae){for(var Ie=0,Ge,Ye,st,ze,Le,at;Ie<Ae.length&&!Le;){var It=Ae[Ie],Ft=Ae[Ie+1];for(Ge=Ye=0;Ge<It.length&&!Le&&It[Ge];)if(Le=It[Ge++].exec(qe),Le)for(st=0;st<Ft.length;st++)at=Le[++Ye],ze=Ft[st],typeof ze===x&&ze.length>0?ze.length===2?typeof ze[1]==g?this[ze[0]]=ze[1].call(this,at):this[ze[0]]=ze[1]:ze.length===3?typeof ze[1]===g&&!(ze[1].exec&&ze[1].test)?this[ze[0]]=at?ze[1].call(this,at,ze[2]):d:this[ze[0]]=at?at.replace(ze[1],ze[2]):d:ze.length===4&&(this[ze[0]]=at?ze[3].call(this,at.replace(ze[1],ze[2])):d):this[ze]=at||d;Ie+=2}},Oe=function(qe,Ae){for(var Ie in Ae)if(typeof Ae[Ie]===x&&Ae[Ie].length>0){for(var Ge=0;Ge<Ae[Ie].length;Ge++)if(Ke(Ae[Ie][Ge],qe))return Ie===m?d:Ie}else if(Ke(Ae[Ie],qe))return Ie===m?d:Ie;return Ae.hasOwnProperty("*")?Ae["*"]:qe},tt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},it={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ft={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[M,[w,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[M,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,M],[/opios[\/ ]+([\w\.]+)/i],[M,[w,ve+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[M,[w,ve+" GX"]],[/\bopr\/([\w\.]+)/i],[M,[w,ve]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[M,[w,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[M,[w,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[w,M],[/quark(?:pc)?\/([-\w\.]+)/i],[M,[w,"Quark"]],[/\bddg\/([\w\.]+)/i],[M,[w,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[M,[w,"UC"+le]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[M,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[M,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[M,[w,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[M,[w,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[M,[w,"Smart Lenovo "+le]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure "+le],M],[/\bfocus\/([\w\.]+)/i],[M,[w,$+" Focus"]],[/\bopt\/([\w\.]+)/i],[M,[w,ve+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[M,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[M,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[M,[w,ve+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[M,[w,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[M,[w,$]],[/\bqihoobrowser\/?([\w\.]*)/i],[M,[w,"360"]],[/\b(qq)\/([\w\.]+)/i],[[w,/(.+)/,"$1Browser"],M],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1"+He],M],[/samsungbrowser\/([\w\.]+)/i],[M,[w,ee+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[M,[w,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[w,"Sogou Mobile"],M],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[w,M],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[w],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[M,w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,be],M],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[w,M],[/\bgsa\/([\w\.]+) .*safari\//i],[M,[w,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[M,[w,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[M,[w,Q+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,Q+" WebView"],M],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[M,[w,"Android "+le]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,M],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[M,[w,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[M,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[M,Oe,tt]],[/(webkit|khtml)\/([\w\.]+)/i],[w,M],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],M],[/(wolvic|librewolf)\/([\w\.]+)/i],[w,M],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[M,[w,$+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[w,[M,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[w,[M,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[A,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[A,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[A,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[A,/ower/,h,we]],[/ sun4\w[;\)]/i],[[A,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[A,we]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[E,[C,ee],[T,O]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[E,[C,ee],[T,I]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[E,[C,X],[T,I]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[E,[C,X],[T,O]],[/(macintosh);/i],[E,[C,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[E,[C,de],[T,I]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[E,[C,L],[T,O]],[/honor([-\w ]+)[;\)]/i],[E,[C,L],[T,I]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[E,[C,B],[T,O]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[E,[C,B],[T,I]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[E,/_/g," "],[C,he],[T,O]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[E,/_/g," "],[C,he],[T,I]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[E,[C,fe],[T,I]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[E,[C,Oe,{OnePlus:["304","403","203"],"*":fe}],[T,O]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[E,[C,"Vivo"],[T,I]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[E,[C,"Realme"],[T,I]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[E,[C,te],[T,I]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[E,[C,te],[T,O]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[E,[C,U],[T,O]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[E,[C,U],[T,I]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[E,[C,q],[T,O]],[/(nokia) (t[12][01])/i],[C,E,[T,O]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[E,/_/g," "],[T,I],[C,"Nokia"]],[/(pixel (c|tablet))\b/i],[E,[C,G],[T,O]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[E,[C,G],[T,I]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[C,ge],[T,I]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[E,"Xperia Tablet"],[C,ge],[T,O]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[E,[C,ue],[T,I]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[E,[C,W],[T,O]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[E,/(.+)/g,"Fire Phone $1"],[C,W],[T,I]],[/(playbook);[-\w\),; ]+(rim)/i],[E,C,[T,O]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[E,[C,oe],[T,I]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[E,[C,ie],[T,O]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[E,[C,ie],[T,I]],[/(nexus 9)/i],[E,[C,"HTC"],[T,O]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[C,[E,/_/g," "],[T,I]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[E,[C,"TCL"],[T,O]],[/(itel) ((\w+))/i],[[C,we],E,[T,Oe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[E,[C,"Acer"],[T,O]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[E,[C,"Meizu"],[T,I]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[E,[C,"Ulefone"],[T,I]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[E,[C,"Energizer"],[T,I]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[E,[C,"Cat"],[T,I]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[E,[C,"Smartfren"],[T,I]],[/droid.+; (a(?:015|06[35]|142p?))/i],[E,[C,"Nothing"],[T,I]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[E,[C,"Archos"],[T,O]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[E,[C,"Archos"],[T,I]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[C,E,[T,O]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[C,E,[T,I]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[C,E,[T,O]],[/(surface duo)/i],[E,[C,Y],[T,O]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[E,[C,"Fairphone"],[T,I]],[/(u304aa)/i],[E,[C,"AT&T"],[T,I]],[/\bsie-(\w*)/i],[E,[C,"Siemens"],[T,I]],[/\b(rct\w+) b/i],[E,[C,"RCA"],[T,O]],[/\b(venue[\d ]{2,7}) b/i],[E,[C,"Dell"],[T,O]],[/\b(q(?:mv|ta)\w+) b/i],[E,[C,"Verizon"],[T,O]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[E,[C,"Barnes & Noble"],[T,O]],[/\b(tm\d{3}\w+) b/i],[E,[C,"NuVision"],[T,O]],[/\b(k88) b/i],[E,[C,"ZTE"],[T,O]],[/\b(nx\d{3}j) b/i],[E,[C,"ZTE"],[T,I]],[/\b(gen\d{3}) b.+49h/i],[E,[C,"Swiss"],[T,I]],[/\b(zur\d{3}) b/i],[E,[C,"Swiss"],[T,O]],[/\b((zeki)?tb.*\b) b/i],[E,[C,"Zeki"],[T,O]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[C,"Dragon Touch"],E,[T,O]],[/\b(ns-?\w{0,9}) b/i],[E,[C,"Insignia"],[T,O]],[/\b((nxa|next)-?\w{0,9}) b/i],[E,[C,"NextBook"],[T,O]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[C,"Voice"],E,[T,I]],[/\b(lvtel\-)?(v1[12]) b/i],[[C,"LvTel"],E,[T,I]],[/\b(ph-1) /i],[E,[C,"Essential"],[T,I]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[E,[C,"Envizen"],[T,O]],[/\b(trio[-\w\. ]+) b/i],[E,[C,"MachSpeed"],[T,O]],[/\btu_(1491) b/i],[E,[C,"Rotor"],[T,O]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[E,[C,ae],[T,O]],[/(sprint) (\w+)/i],[C,E,[T,I]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[C,Y],[T,I]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[E,[C,Se],[T,O]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[E,[C,Se],[T,I]],[/smart-tv.+(samsung)/i],[C,[T,j]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[C,ee],[T,j]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[C,U],[T,j]],[/(apple) ?tv/i],[C,[E,X+" TV"],[T,j]],[/crkey/i],[[E,Q+"cast"],[C,G],[T,j]],[/droid.+aft(\w+)( bui|\))/i],[E,[C,W],[T,j]],[/(shield \w+ tv)/i],[E,[C,ae],[T,j]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[E,[C,de],[T,j]],[/(bravia[\w ]+)( bui|\))/i],[E,[C,ge],[T,j]],[/(mi(tv|box)-?\w+) bui/i],[E,[C,he],[T,j]],[/Hbbtv.*(technisat) (.*);/i],[C,E,[T,j]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[C,$e],[E,$e],[T,j]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[E,[T,j]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[T,j]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[C,E,[T,k]],[/droid.+; (shield)( bui|\))/i],[E,[C,ae],[T,k]],[/(playstation \w+)/i],[E,[C,ge],[T,k]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[E,[C,Y],[T,k]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[E,[C,ee],[T,N]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[C,E,[T,N]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[E,[C,fe],[T,N]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[E,[C,X],[T,N]],[/(opwwe\d{3})/i],[E,[C,ue],[T,N]],[/(moto 360)/i],[E,[C,te],[T,N]],[/(smartwatch 3)/i],[E,[C,ge],[T,N]],[/(g watch r)/i],[E,[C,U],[T,N]],[/droid.+; (wt63?0{2,3})\)/i],[E,[C,Se],[T,N]],[/droid.+; (glass) \d/i],[E,[C,G],[T,N]],[/(pico) (4|neo3(?: link|pro)?)/i],[C,E,[T,N]],[/; (quest( \d| pro)?)/i],[E,[C,be],[T,N]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[C,[T,V]],[/(aeobc)\b/i],[E,[C,W],[T,V]],[/(homepod).+mac os/i],[E,[C,X],[T,V]],[/windows iot/i],[[T,V]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[E,[T,I]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[E,[T,O]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[T,O]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[T,I]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[E,[C,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[M,[w,K+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[w,M],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[M,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[w,M],[/ladybird\//i],[[w,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[M,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,M],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[w,[M,Oe,it]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[M,Oe,it],[w,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[M,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,je],[M,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[M,w],[/(ubuntu) ([\w\.]+) like android/i],[[w,/(.+)/,"$1 Touch"],M],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[w,M],[/\(bb(10);/i],[M,[w,oe]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[M,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[M,[w,$+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[M,[w,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[M,[w,"watchOS"]],[/crkey\/([\d\.]+)/i],[M,[w,Q+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[w,_e],M],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,M],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],M],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[w,M]]},ut=function(qe,Ae){if(typeof qe===x&&(Ae=qe,qe=d),!(this instanceof ut))return new ut(qe,Ae).getResult();var Ie=typeof u!==v&&u.navigator?u.navigator:d,Ge=qe||(Ie&&Ie.userAgent?Ie.userAgent:h),Ye=Ie&&Ie.userAgentData?Ie.userAgentData:d,st=Ae?Be(ft,Ae):ft,ze=Ie&&Ie.userAgent==Ge;return this.getBrowser=function(){var Le={};return Le[w]=d,Le[M]=d,Qe.call(Le,Ge,st.browser),Le[S]=Me(Le[M]),ze&&Ie&&Ie.brave&&typeof Ie.brave.isBrave==g&&(Le[w]="Brave"),Le},this.getCPU=function(){var Le={};return Le[A]=d,Qe.call(Le,Ge,st.cpu),Le},this.getDevice=function(){var Le={};return Le[C]=d,Le[E]=d,Le[T]=d,Qe.call(Le,Ge,st.device),ze&&!Le[T]&&Ye&&Ye.mobile&&(Le[T]=I),ze&&Le[E]=="Macintosh"&&Ie&&typeof Ie.standalone!==v&&Ie.maxTouchPoints&&Ie.maxTouchPoints>2&&(Le[E]="iPad",Le[T]=O),Le},this.getEngine=function(){var Le={};return Le[w]=d,Le[M]=d,Qe.call(Le,Ge,st.engine),Le},this.getOS=function(){var Le={};return Le[w]=d,Le[M]=d,Qe.call(Le,Ge,st.os),ze&&!Le[w]&&Ye&&Ye.platform&&Ye.platform!="Unknown"&&(Le[w]=Ye.platform.replace(/chrome os/i,_e).replace(/macos/i,je)),Le},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ge},this.setUA=function(Le){return Ge=typeof Le===b&&Le.length>z?$e(Le,z):Le,this},this.setUA(Ge),this};ut.VERSION=f,ut.BROWSER=rt([w,M,S]),ut.CPU=rt([A]),ut.DEVICE=rt([E,C,T,k,I,j,O,N,V]),ut.ENGINE=ut.OS=rt([w,M]),o.exports&&(l=o.exports=ut),l.UAParser=ut;var xt=typeof u!==v&&(u.jQuery||u.Zepto);if(xt&&!xt.ua){var ct=new ut;xt.ua=ct.getResult(),xt.ua.get=function(){return ct.getUA()},xt.ua.set=function(qe){ct.setUA(qe);var Ae=ct.getResult();for(var Ie in Ae)xt.ua[Ie]=Ae[Ie]}}})(typeof window=="object"?window:uaParser_min)}(uaParser_min$1,uaParser_min$1.exports)),uaParser_min$1.exports}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1,Object.defineProperty(lib,"__esModule",{value:!0});function o(pe){return pe&&typeof pe=="object"&&"default"in pe?pe.default:pe}var l=requireReact(),u=o(l),d=requireUaParser_min(),f=new d,h=f.getBrowser(),m=f.getCPU(),g=f.getDevice(),v=f.getEngine(),x=f.getOS(),b=f.getUA(),S=function(J){return f.setUA(J)},E=function(J){if(!J){console.error("No userAgent string was provided");return}var re=new d(J);return{UA:re,browser:re.getBrowser(),cpu:re.getCPU(),device:re.getDevice(),engine:re.getEngine(),os:re.getOS(),ua:re.getUA(),setUserAgent:function(Te){return re.setUA(Te)}}},w=Object.freeze({ClientUAInstance:f,browser:h,cpu:m,device:g,engine:v,os:x,ua:b,setUa:S,parseUserAgent:E});function T(pe,J){var re=Object.keys(pe);if(Object.getOwnPropertySymbols){var Ee=Object.getOwnPropertySymbols(pe);J&&(Ee=Ee.filter(function(Te){return Object.getOwnPropertyDescriptor(pe,Te).enumerable})),re.push.apply(re,Ee)}return re}function C(pe){for(var J=1;J<arguments.length;J++){var re=arguments[J]!=null?arguments[J]:{};J%2?T(Object(re),!0).forEach(function(Ee){O(pe,Ee,re[Ee])}):Object.getOwnPropertyDescriptors?Object.defineProperties(pe,Object.getOwnPropertyDescriptors(re)):T(Object(re)).forEach(function(Ee){Object.defineProperty(pe,Ee,Object.getOwnPropertyDescriptor(re,Ee))})}return pe}function M(pe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(J){return typeof J}:M=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},M(pe)}function A(pe,J){if(!(pe instanceof J))throw new TypeError("Cannot call a class as a function")}function k(pe,J){for(var re=0;re<J.length;re++){var Ee=J[re];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(pe,Ee.key,Ee)}}function I(pe,J,re){return k(pe.prototype,J),pe}function O(pe,J,re){return J in pe?Object.defineProperty(pe,J,{value:re,enumerable:!0,configurable:!0,writable:!0}):pe[J]=re,pe}function j(){return j=Object.assign||function(pe){for(var J=1;J<arguments.length;J++){var re=arguments[J];for(var Ee in re)Object.prototype.hasOwnProperty.call(re,Ee)&&(pe[Ee]=re[Ee])}return pe},j.apply(this,arguments)}function N(pe,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");pe.prototype=Object.create(J&&J.prototype,{constructor:{value:pe,writable:!0,configurable:!0}}),J&&z(pe,J)}function V(pe){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(re){return re.__proto__||Object.getPrototypeOf(re)},V(pe)}function z(pe,J){return z=Object.setPrototypeOf||function(Ee,Te){return Ee.__proto__=Te,Ee},z(pe,J)}function W(pe,J){if(pe==null)return{};var re={},Ee=Object.keys(pe),Te,ot;for(ot=0;ot<Ee.length;ot++)Te=Ee[ot],!(J.indexOf(Te)>=0)&&(re[Te]=pe[Te]);return re}function X(pe,J){if(pe==null)return{};var re=W(pe,J),Ee,Te;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(pe);for(Te=0;Te<ot.length;Te++)Ee=ot[Te],!(J.indexOf(Ee)>=0)&&Object.prototype.propertyIsEnumerable.call(pe,Ee)&&(re[Ee]=pe[Ee])}return re}function ie(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function oe(pe,J){if(J&&(typeof J=="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(pe)}function le(pe,J){return Q(pe)||K(pe,J)||$(pe,J)||L()}function Q(pe){if(Array.isArray(pe))return pe}function K(pe,J){var re=pe==null?null:typeof Symbol<"u"&&pe[Symbol.iterator]||pe["@@iterator"];if(re!=null){var Ee=[],Te=!0,ot=!1,Ct,Zt;try{for(re=re.call(pe);!(Te=(Ct=re.next()).done)&&(Ee.push(Ct.value),!(J&&Ee.length===J));Te=!0);}catch(Oi){ot=!0,Zt=Oi}finally{try{!Te&&re.return!=null&&re.return()}finally{if(ot)throw Zt}}return Ee}}function $(pe,J){if(pe){if(typeof pe=="string")return G(pe,J);var re=Object.prototype.toString.call(pe).slice(8,-1);if(re==="Object"&&pe.constructor&&(re=pe.constructor.name),re==="Map"||re==="Set")return Array.from(pe);if(re==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(re))return G(pe,J)}}function G(pe,J){(J==null||J>pe.length)&&(J=pe.length);for(var re=0,Ee=new Array(J);re<J;re++)Ee[re]=pe[re];return Ee}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
133
133
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var B={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},q={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},U={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},Y={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},te=function(J){switch(J){case B.Mobile:return{isMobile:!0};case B.Tablet:return{isTablet:!0};case B.SmartTv:return{isSmartTV:!0};case B.Console:return{isConsole:!0};case B.Wearable:return{isWearable:!0};case B.Browser:return{isBrowser:!0};case B.Embedded:return{isEmbedded:!0};default:return Y}},ae=function(J){return S(J)},ue=function(J){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return J||re},ve=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},fe=function(J){var re=ve();return re&&re.platform&&(re.platform.indexOf(J)!==-1||re.platform==="MacIntel"&&re.maxTouchPoints>1&&!window.MSStream)},ee=function(J,re,Ee,Te,ot){return{isBrowser:J,browserMajorVersion:ue(re.major),browserFullVersion:ue(re.version),browserName:ue(re.name),engineName:ue(Ee.name),engineVersion:ue(Ee.version),osName:ue(Te.name),osVersion:ue(Te.version),userAgent:ue(ot)}},de=function(J,re,Ee,Te){return C({},J,{vendor:ue(re.vendor),model:ue(re.model),os:ue(Ee.name),osVersion:ue(Ee.version),ua:ue(Te)})},ge=function(J,re,Ee,Te){return{isSmartTV:J,engineName:ue(re.name),engineVersion:ue(re.version),osName:ue(Ee.name),osVersion:ue(Ee.version),userAgent:ue(Te)}},he=function(J,re,Ee,Te){return{isConsole:J,engineName:ue(re.name),engineVersion:ue(re.version),osName:ue(Ee.name),osVersion:ue(Ee.version),userAgent:ue(Te)}},Se=function(J,re,Ee,Te){return{isWearable:J,engineName:ue(re.name),engineVersion:ue(re.version),osName:ue(Ee.name),osVersion:ue(Ee.version),userAgent:ue(Te)}},be=function(J,re,Ee,Te,ot){return{isEmbedded:J,vendor:ue(re.vendor),model:ue(re.model),engineName:ue(Ee.name),engineVersion:ue(Ee.version),osName:ue(Te.name),osVersion:ue(Te.version),userAgent:ue(ot)}};function _e(pe){var J=pe?E(pe):w,re=J.device,Ee=J.browser,Te=J.engine,ot=J.os,Ct=J.ua,Zt=te(re.type),Oi=Zt.isBrowser,xs=Zt.isMobile,Di=Zt.isTablet,Li=Zt.isSmartTV,bs=Zt.isConsole,Lr=Zt.isWearable,ji=Zt.isEmbedded;if(Oi)return ee(Oi,Ee,Te,ot,Ct);if(Li)return ge(Li,Te,ot,Ct);if(bs)return he(bs,Te,ot,Ct);if(xs||Di)return de(Zt,re,ot,Ct);if(Lr)return Se(Lr,Te,ot,Ct);if(ji)return be(ji,re,Te,ot,Ct)}var je=function(J){var re=J.type;return re===B.Mobile},He=function(J){var re=J.type;return re===B.Tablet},Be=function(J){var re=J.type;return re===B.Mobile||re===B.Tablet},rt=function(J){var re=J.type;return re===B.SmartTv},Ke=function(J){var re=J.type;return re===B.Browser},we=function(J){var re=J.type;return re===B.Wearable},Me=function(J){var re=J.type;return re===B.Console},$e=function(J){var re=J.type;return re===B.Embedded},Qe=function(J){var re=J.vendor;return ue(re)},Oe=function(J){var re=J.model;return ue(re)},tt=function(J){var re=J.type;return ue(re,"browser")},it=function(J){var re=J.name;return re===U.Android},ft=function(J){var re=J.name;return re===U.Windows},ut=function(J){var re=J.name;return re===U.MAC_OS},xt=function(J){var re=J.name;return re===U.WindowsPhone},ct=function(J){var re=J.name;return re===U.IOS},qe=function(J){var re=J.version;return ue(re)},Ae=function(J){var re=J.name;return ue(re)},Ie=function(J){var re=J.name;return re===q.Chrome},Ge=function(J){var re=J.name;return re===q.Firefox},Ye=function(J){var re=J.name;return re===q.Chromium},st=function(J){var re=J.name;return re===q.Edge},ze=function(J){var re=J.name;return re===q.Yandex},Le=function(J){var re=J.name;return re===q.Safari||re===q.MobileSafari},at=function(J){var re=J.name;return re===q.MobileSafari},It=function(J){var re=J.name;return re===q.Opera},Ft=function(J){var re=J.name;return re===q.InternetExplorer||re===q.Ie},kt=function(J){var re=J.name;return re===q.MIUI},Qt=function(J){var re=J.name;return re===q.SamsungBrowser},Je=function(J){var re=J.version;return ue(re)},_t=function(J){var re=J.major;return ue(re)},wt=function(J){var re=J.name;return ue(re)},Bt=function(J){var re=J.name;return ue(re)},Mr=function(J){var re=J.version;return ue(re)},Mt=function(){var J=ve(),re=J&&J.userAgent&&J.userAgent.toLowerCase();return typeof re=="string"?/electron/.test(re):!1},Tt=function(J){return typeof J=="string"&&J.indexOf("Edg/")!==-1},Or=function(){var J=ve();return J&&(/iPad|iPhone|iPod/.test(J.platform)||J.platform==="MacIntel"&&J.maxTouchPoints>1)&&!window.MSStream},bt=function(){return fe("iPad")},Jt=function(){return fe("iPhone")},Dr=function(){return fe("iPod")},or=function(J){return ue(J)};function Tn(pe){var J=pe||w,re=J.device,Ee=J.browser,Te=J.os,ot=J.engine,Ct=J.ua;return{isSmartTV:rt(re),isConsole:Me(re),isWearable:we(re),isEmbedded:$e(re),isMobileSafari:at(Ee)||bt(),isChromium:Ye(Ee),isMobile:Be(re)||bt(),isMobileOnly:je(re),isTablet:He(re)||bt(),isBrowser:Ke(re),isDesktop:Ke(re),isAndroid:it(Te),isWinPhone:xt(Te),isIOS:ct(Te)||bt(),isChrome:Ie(Ee),isFirefox:Ge(Ee),isSafari:Le(Ee),isOpera:It(Ee),isIE:Ft(Ee),osVersion:qe(Te),osName:Ae(Te),fullBrowserVersion:Je(Ee),browserVersion:_t(Ee),browserName:wt(Ee),mobileVendor:Qe(re),mobileModel:Oe(re),engineName:Bt(ot),engineVersion:Mr(ot),getUA:or(Ct),isEdge:st(Ee)||Tt(Ct),isYandex:ze(Ee),deviceType:tt(re),isIOS13:Or(),isIPad13:bt(),isIPhone13:Jt(),isIPod13:Dr(),isElectron:Mt(),isEdgeChromium:Tt(Ct),isLegacyEdge:st(Ee)&&!Tt(Ct),isWindows:ft(Te),isMacOs:ut(Te),isMIUI:kt(Ee),isSamsungBrowser:Qt(Ee)}}var Pi=rt(g),Ks=Me(g),Ys=we(g),da=$e(g),an=at(h)||bt(),Xs=Ye(h),Yn=Be(g)||bt(),Qs=je(g),us=He(g)||bt(),ds=Ke(g),Js=Ke(g),fs=it(x),Zs=xt(x),eo=ct(x)||bt(),Ot=Ie(h),fa=Ge(h),hs=Le(h),to=It(h),Xn=Ft(h),ha=qe(x),ro=Ae(x),Ai=Je(h),Sr=_t(h),pa=wt(h),gr=Qe(g),ma=Oe(g),ga=Bt(v),ya=Mr(v),Ri=or(b),Ii=st(h)||Tt(b),Qn=ze(h),ki=tt(g),va=Or(),xa=bt(),ps=Jt(),no=Dr(),ms=Mt(),Jn=Tt(b),ba=st(h)&&!Tt(b),gs=ft(x),yt=ut(x),io=kt(h),so=Qt(h),ys=function(J){if(!J||typeof J!="string"){console.error("No valid user agent string was provided");return}var re=E(J),Ee=re.device,Te=re.browser,ot=re.os,Ct=re.engine,Zt=re.ua;return Tn({device:Ee,browser:Te,os:ot,engine:Ct,ua:Zt})},oo=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return fs?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},ao=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return ds?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},lo=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return Xn?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},vs=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return eo?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},Mi=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return Yn?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},Wr=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return us?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},qr=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return Zs?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},Kr=function(J){var re=J.renderWithFragment,Ee=J.children;J.viewClassName,J.style;var Te=X(J,["renderWithFragment","children","viewClassName","style"]);return Qs?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},Zn=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return Pi?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},ei=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return Ks?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},Yr=function(J){var re=J.renderWithFragment,Ee=J.children,Te=X(J,["renderWithFragment","children"]);return Ys?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",Te,Ee):null},_a=function(J){var re=J.renderWithFragment,Ee=J.children;J.viewClassName,J.style;var Te=J.condition,ot=X(J,["renderWithFragment","children","viewClassName","style","condition"]);return Te?re?u.createElement(l.Fragment,null,Ee):u.createElement("div",ot,Ee):null};function co(pe){return function(J){N(re,J);function re(Ee){var Te;return A(this,re),Te=oe(this,V(re).call(this,Ee)),Te.isEventListenerAdded=!1,Te.handleOrientationChange=Te.handleOrientationChange.bind(ie(Te)),Te.onOrientationChange=Te.onOrientationChange.bind(ie(Te)),Te.onPageLoad=Te.onPageLoad.bind(ie(Te)),Te.state={isLandscape:!1,isPortrait:!1},Te}return I(re,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var Te=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:Te===0,isLandscape:Te===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":M(window))!==void 0&&Yn&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return u.createElement(pe,j({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),re}(u.Component)}function ti(){var pe=l.useState(function(){var ot=window.innerWidth>window.innerHeight?90:0;return{isPortrait:ot===0,isLandscape:ot===90,orientation:ot===0?"portrait":"landscape"}}),J=le(pe,2),re=J[0],Ee=J[1],Te=l.useCallback(function(){var ot=window.innerWidth>window.innerHeight?90:0,Ct={isPortrait:ot===0,isLandscape:ot===90,orientation:ot===0?"portrait":"landscape"};re.orientation!==Ct.orientation&&Ee(Ct)},[re.orientation]);return l.useEffect(function(){return(typeof window>"u"?"undefined":M(window))!==void 0&&Yn&&(Te(),window.addEventListener("load",Te,!1),window.addEventListener("resize",Te,!1)),function(){window.removeEventListener("resize",Te,!1),window.removeEventListener("load",Te,!1)}},[Te]),re}function uo(pe){var J=pe||window.navigator.userAgent;return E(J)}function fo(pe){var J=pe||window.navigator.userAgent,re=uo(J),Ee=Tn(re);return[Ee,re]}return lib.AndroidView=oo,lib.BrowserTypes=q,lib.BrowserView=ao,lib.ConsoleView=ei,lib.CustomView=_a,lib.IEView=lo,lib.IOSView=vs,lib.MobileOnlyView=Kr,lib.MobileView=Mi,lib.OsTypes=U,lib.SmartTVView=Zn,lib.TabletView=Wr,lib.WearableView=Yr,lib.WinPhoneView=qr,lib.browserName=pa,lib.browserVersion=Sr,lib.deviceDetect=_e,lib.deviceType=ki,lib.engineName=ga,lib.engineVersion=ya,lib.fullBrowserVersion=Ai,lib.getSelectorsByUserAgent=ys,lib.getUA=Ri,lib.isAndroid=fs,lib.isBrowser=ds,lib.isChrome=Ot,lib.isChromium=Xs,lib.isConsole=Ks,lib.isDesktop=Js,lib.isEdge=Ii,lib.isEdgeChromium=Jn,lib.isElectron=ms,lib.isEmbedded=da,lib.isFirefox=fa,lib.isIE=Xn,lib.isIOS=eo,lib.isIOS13=va,lib.isIPad13=xa,lib.isIPhone13=ps,lib.isIPod13=no,lib.isLegacyEdge=ba,lib.isMIUI=io,lib.isMacOs=yt,lib.isMobile=Yn,lib.isMobileOnly=Qs,lib.isMobileSafari=an,lib.isOpera=to,lib.isSafari=hs,lib.isSamsungBrowser=so,lib.isSmartTV=Pi,lib.isTablet=us,lib.isWearable=Ys,lib.isWinPhone=Zs,lib.isWindows=gs,lib.isYandex=Qn,lib.mobileModel=ma,lib.mobileVendor=gr,lib.osName=ro,lib.osVersion=ha,lib.parseUserAgent=E,lib.setUserAgent=ae,lib.useDeviceData=uo,lib.useDeviceSelectors=fo,lib.useMobileOrientation=ti,lib.withOrientationChange=co,lib}var libExports=requireLib(),dist={},ga4={},gtag={},hasRequiredGtag;function requireGtag(){return hasRequiredGtag||(hasRequiredGtag=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=function(){for(var f=arguments.length,h=new Array(f),m=0;m<f;m++)h[m]=arguments[m];if(typeof window<"u"){var g;typeof window.gtag>"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(g=window).gtag.apply(g,h)}},u=l;o.default=u}(gtag)),gtag}var format={},hasRequiredFormat;function requireFormat(){return hasRequiredFormat||(hasRequiredFormat=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=m;var l=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function u(g){return g.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(v,x,b){return x>0&&x+v.length!==b.length&&v.search(l)>-1&&b.charAt(x-2)!==":"&&(b.charAt(x+v.length)!=="-"||b.charAt(x-1)==="-")&&b.charAt(x-1).search(/[^\s-]/)<0?v.toLowerCase():v.substr(1).search(/[A-Z]|\../)>-1?v:v.charAt(0).toUpperCase()+v.substr(1)})}function d(g){return typeof g=="string"&&g.indexOf("@")!==-1}var f="REDACTED (Potential Email Address)";function h(g){return d(g)?(console.warn("This arg looks like an email address, redacting."),f):g}function m(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,b=g||"";return v&&(b=u(g)),x&&(b=h(b)),b}}(format)),format}var hasRequiredGa4;function requireGa4(){return hasRequiredGa4||(hasRequiredGa4=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=o.GA4=void 0;var l=m(requireGtag()),u=m(requireFormat()),d=["eventCategory","eventAction","eventLabel","eventValue","hitType"],f=["title","location"],h=["page","hitType"];function m(Q){return Q&&Q.__esModule?Q:{default:Q}}function g(Q,K){if(Q==null)return{};var $=v(Q,K),G,L;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(Q);for(L=0;L<B.length;L++)G=B[L],!(K.indexOf(G)>=0)&&Object.prototype.propertyIsEnumerable.call(Q,G)&&($[G]=Q[G])}return $}function v(Q,K){if(Q==null)return{};var $={},G=Object.keys(Q),L,B;for(B=0;B<G.length;B++)L=G[B],!(K.indexOf(L)>=0)&&($[L]=Q[L]);return $}function x(Q){"@babel/helpers - typeof";return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},x(Q)}function b(Q){return w(Q)||E(Q)||k(Q)||S()}function S(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
134
134
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E(Q){if(typeof Symbol<"u"&&Q[Symbol.iterator]!=null||Q["@@iterator"]!=null)return Array.from(Q)}function w(Q){if(Array.isArray(Q))return I(Q)}function T(Q,K){var $=Object.keys(Q);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(Q);K&&(G=G.filter(function(L){return Object.getOwnPropertyDescriptor(Q,L).enumerable})),$.push.apply($,G)}return $}function C(Q){for(var K=1;K<arguments.length;K++){var $=arguments[K]!=null?arguments[K]:{};K%2?T(Object($),!0).forEach(function(G){W(Q,G,$[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Q,Object.getOwnPropertyDescriptors($)):T(Object($)).forEach(function(G){Object.defineProperty(Q,G,Object.getOwnPropertyDescriptor($,G))})}return Q}function M(Q,K){return j(Q)||O(Q,K)||k(Q,K)||A()}function A(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
135
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k(Q,K){if(Q){if(typeof Q=="string")return I(Q,K);var $=Object.prototype.toString.call(Q).slice(8,-1);if($==="Object"&&Q.constructor&&($=Q.constructor.name),$==="Map"||$==="Set")return Array.from(Q);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return I(Q,K)}}function I(Q,K){(K==null||K>Q.length)&&(K=Q.length);for(var $=0,G=new Array(K);$<K;$++)G[$]=Q[$];return G}function O(Q,K){var $=Q==null?null:typeof Symbol<"u"&&Q[Symbol.iterator]||Q["@@iterator"];if($!=null){var G,L,B,q,U=[],Y=!0,te=!1;try{if(B=($=$.call(Q)).next,K!==0)for(;!(Y=(G=B.call($)).done)&&(U.push(G.value),U.length!==K);Y=!0);}catch(ae){te=!0,L=ae}finally{try{if(!Y&&$.return!=null&&(q=$.return(),Object(q)!==q))return}finally{if(te)throw L}}return U}}function j(Q){if(Array.isArray(Q))return Q}function N(Q,K){if(!(Q instanceof K))throw new TypeError("Cannot call a class as a function")}function V(Q,K){for(var $=0;$<K.length;$++){var G=K[$];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(Q,X(G.key),G)}}function z(Q,K,$){return V(Q.prototype,K),Object.defineProperty(Q,"prototype",{writable:!1}),Q}function W(Q,K,$){return K=X(K),K in Q?Object.defineProperty(Q,K,{value:$,enumerable:!0,configurable:!0,writable:!0}):Q[K]=$,Q}function X(Q){var K=ie(Q,"string");return x(K)==="symbol"?K:String(K)}function ie(Q,K){if(x(Q)!=="object"||Q===null)return Q;var $=Q[Symbol.toPrimitive];if($!==void 0){var G=$.call(Q,K||"default");if(x(G)!=="object")return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return(K==="string"?String:Number)(Q)}var oe=function(){function Q(){var K=this;N(this,Q),W(this,"reset",function(){K.isInitialized=!1,K._testMode=!1,K._currentMeasurementId,K._hasLoadedGA=!1,K._isQueuing=!1,K._queueGtag=[]}),W(this,"_gtag",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];K._testMode||K._isQueuing?K._queueGtag.push(G):l.default.apply(void 0,G)}),W(this,"_loadGA",function($,G){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!K._hasLoadedGA){var B=document.createElement("script");B.async=!0,B.src="".concat(L,"?id=").concat($),G&&B.setAttribute("nonce",G),document.body.appendChild(B),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},K._hasLoadedGA=!0}}),W(this,"_toGtagOptions",function($){if($){var G={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},L=Object.entries($).reduce(function(B,q){var U=M(q,2),Y=U[0],te=U[1];return G[Y]?B[G[Y]]=te:B[Y]=te,B},{});return L}}),W(this,"initialize",function($){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!$)throw new Error("Require GA_MEASUREMENT_ID");var L=typeof $=="string"?[{trackingId:$}]:$;K._currentMeasurementId=L[0].trackingId;var B=G.gaOptions,q=G.gtagOptions,U=G.nonce,Y=G.testMode,te=Y===void 0?!1:Y,ae=G.gtagUrl;if(K._testMode=te,te||K._loadGA(K._currentMeasurementId,U,ae),K.isInitialized||(K._gtag("js",new Date),L.forEach(function(fe){var ee=C(C(C({},K._toGtagOptions(C(C({},B),fe.gaOptions))),q),fe.gtagOptions);Object.keys(ee).length?K._gtag("config",fe.trackingId,ee):K._gtag("config",fe.trackingId)})),K.isInitialized=!0,!te){var ue=b(K._queueGtag);for(K._queueGtag=[],K._isQueuing=!1;ue.length;){var ve=ue.shift();K._gtag.apply(K,b(ve)),ve[0]==="get"&&(K._isQueuing=!0)}}}),W(this,"set",function($){if(!$){console.warn("`fieldsObject` is required in .set()");return}if(x($)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys($).length===0&&console.warn("empty `fieldsObject` given to .set()"),K._gaCommand("set",$)}),W(this,"_gaCommandSendEvent",function($,G,L,B,q){K._gtag("event",G,C(C({event_category:$,event_label:L,value:B},q&&{non_interaction:q.nonInteraction}),K._toGtagOptions(q)))}),W(this,"_gaCommandSendEventParameters",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];if(typeof G[0]=="string")K._gaCommandSendEvent.apply(K,b(G.slice(1)));else{var B=G[0],q=B.eventCategory,U=B.eventAction,Y=B.eventLabel,te=B.eventValue;B.hitType;var ae=g(B,d);K._gaCommandSendEvent(q,U,Y,te,ae)}}),W(this,"_gaCommandSendTiming",function($,G,L,B){K._gtag("event","timing_complete",{name:G,value:L,event_category:$,event_label:B})}),W(this,"_gaCommandSendPageview",function($,G){if(G&&Object.keys(G).length){var L=K._toGtagOptions(G),B=L.title,q=L.location,U=g(L,f);K._gtag("event","page_view",C(C(C(C({},$&&{page_path:$}),B&&{page_title:B}),q&&{page_location:q}),U))}else $?K._gtag("event","page_view",{page_path:$}):K._gtag("event","page_view")}),W(this,"_gaCommandSendPageviewParameters",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];if(typeof G[0]=="string")K._gaCommandSendPageview.apply(K,b(G.slice(1)));else{var B=G[0],q=B.page;B.hitType;var U=g(B,h);K._gaCommandSendPageview(q,U)}}),W(this,"_gaCommandSend",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];var B=typeof G[0]=="string"?G[0]:G[0].hitType;switch(B){case"event":K._gaCommandSendEventParameters.apply(K,G);break;case"pageview":K._gaCommandSendPageviewParameters.apply(K,G);break;case"timing":K._gaCommandSendTiming.apply(K,b(G.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(B));break;default:console.warn("Send command doesn't exist: ".concat(B))}}),W(this,"_gaCommandSet",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];typeof G[0]=="string"&&(G[0]=W({},G[0],G[1])),K._gtag("set",K._toGtagOptions(G[0]))}),W(this,"_gaCommand",function($){for(var G=arguments.length,L=new Array(G>1?G-1:0),B=1;B<G;B++)L[B-1]=arguments[B];switch($){case"send":K._gaCommandSend.apply(K,L);break;case"set":K._gaCommandSet.apply(K,L);break;default:console.warn("Command doesn't exist: ".concat($))}}),W(this,"ga",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];if(typeof G[0]=="string")K._gaCommand.apply(K,G);else{var B=G[0];K._gtag("get",K._currentMeasurementId,"client_id",function(q){K._isQueuing=!1;var U=K._queueGtag;for(B({get:function(ae){return ae==="clientId"?q:ae==="trackingId"?K._currentMeasurementId:ae==="apiVersion"?"1":void 0}});U.length;){var Y=U.shift();K._gtag.apply(K,b(Y))}}),K._isQueuing=!0}return K.ga}),W(this,"event",function($,G){if(typeof $=="string")K._gtag("event",$,K._toGtagOptions(G));else{var L=$.action,B=$.category,q=$.label,U=$.value,Y=$.nonInteraction,te=$.transport;if(!B||!L){console.warn("args.category AND args.action are required in event()");return}var ae={hitType:"event",eventCategory:(0,u.default)(B),eventAction:(0,u.default)(L)};q&&(ae.eventLabel=(0,u.default)(q)),typeof U<"u"&&(typeof U!="number"?console.warn("Expected `args.value` arg to be a Number."):ae.eventValue=U),typeof Y<"u"&&(typeof Y!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):ae.nonInteraction=Y),typeof te<"u"&&(typeof te!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(te)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),ae.transport=te)),K._gaCommand("send",ae)}}),W(this,"send",function($){K._gaCommand("send",$)}),this.reset()}return z(Q,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),Q}();o.GA4=oe;var le=new oe;o.default=le}(ga4)),ga4}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(o){function l(g){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},l(g)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=o.ReactGAImplementation=void 0;var u=f(requireGa4());function d(g){if(typeof WeakMap!="function")return null;var v=new WeakMap,x=new WeakMap;return(d=function(S){return S?x:v})(g)}function f(g,v){if(g&&g.__esModule)return g;if(g===null||l(g)!=="object"&&typeof g!="function")return{default:g};var x=d(v);if(x&&x.has(g))return x.get(g);var b={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in g)if(E!=="default"&&Object.prototype.hasOwnProperty.call(g,E)){var w=S?Object.getOwnPropertyDescriptor(g,E):null;w&&(w.get||w.set)?Object.defineProperty(b,E,w):b[E]=g[E]}return b.default=g,x&&x.set(g,b),b}var h=u.GA4;o.ReactGAImplementation=h;var m=u.default;o.default=m}(dist)),dist}var distExports=requireDist();const ReactGA=getDefaultExportFromCjs$1(distExports),isString=o=>typeof o=="string",defer=()=>{let o,l;const u=new Promise((d,f)=>{o=d,l=f});return u.resolve=o,u.reject=l,u},makeString=o=>o==null?"":""+o,copy=(o,l,u)=>{o.forEach(d=>{l[d]&&(u[d]=l[d])})},lastOfPathSeparatorRegExp=/###/g,cleanKey=o=>o&&o.indexOf("###")>-1?o.replace(lastOfPathSeparatorRegExp,"."):o,canNotTraverseDeeper=o=>!o||isString(o),getLastOfPath=(o,l,u)=>{const d=isString(l)?l.split("."):l;let f=0;for(;f<d.length-1;){if(canNotTraverseDeeper(o))return{};const h=cleanKey(d[f]);!o[h]&&u&&(o[h]=new u),Object.prototype.hasOwnProperty.call(o,h)?o=o[h]:o={},++f}return canNotTraverseDeeper(o)?{}:{obj:o,k:cleanKey(d[f])}},setPath=(o,l,u)=>{const{obj:d,k:f}=getLastOfPath(o,l,Object);if(d!==void 0||l.length===1){d[f]=u;return}let h=l[l.length-1],m=l.slice(0,l.length-1),g=getLastOfPath(o,m,Object);for(;g.obj===void 0&&m.length;)h=`${m[m.length-1]}.${h}`,m=m.slice(0,m.length-1),g=getLastOfPath(o,m,Object),g!=null&&g.obj&&typeof g.obj[`${g.k}.${h}`]<"u"&&(g.obj=void 0);g.obj[`${g.k}.${h}`]=u},pushPath=(o,l,u,d)=>{const{obj:f,k:h}=getLastOfPath(o,l,Object);f[h]=f[h]||[],f[h].push(u)},getPath=(o,l)=>{const{obj:u,k:d}=getLastOfPath(o,l);if(u&&Object.prototype.hasOwnProperty.call(u,d))return u[d]},getPathWithDefaults=(o,l,u)=>{const d=getPath(o,u);return d!==void 0?d:getPath(l,u)},deepExtend=(o,l,u)=>{for(const d in l)d!=="__proto__"&&d!=="constructor"&&(d in o?isString(o[d])||o[d]instanceof String||isString(l[d])||l[d]instanceof String?u&&(o[d]=l[d]):deepExtend(o[d],l[d],u):o[d]=l[d]);return o},regexEscape=o=>o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const escape=o=>isString(o)?o.replace(/[&<>"'\/]/g,l=>_entityMap[l]):o;class RegExpCache{constructor(l){this.capacity=l,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(l){const u=this.regExpMap.get(l);if(u!==void 0)return u;const d=new RegExp(l);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(l,d),this.regExpQueue.push(l),d}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(o,l,u)=>{l=l||"",u=u||"";const d=chars.filter(m=>l.indexOf(m)<0&&u.indexOf(m)<0);if(d.length===0)return!0;const f=looksLikeObjectPathRegExpCache.getRegExp(`(${d.map(m=>m==="?"?"\\?":m).join("|")})`);let h=!f.test(o);if(!h){const m=o.indexOf(u);m>0&&!f.test(o.substring(0,m))&&(h=!0)}return h},deepFind=(o,l,u=".")=>{if(!o)return;if(o[l])return Object.prototype.hasOwnProperty.call(o,l)?o[l]:void 0;const d=l.split(u);let f=o;for(let h=0;h<d.length;){if(!f||typeof f!="object")return;let m,g="";for(let v=h;v<d.length;++v)if(v!==h&&(g+=u),g+=d[v],m=f[g],m!==void 0){if(["string","number","boolean"].indexOf(typeof m)>-1&&v<d.length-1)continue;h+=v-h+1;break}f=m}return f},getCleanedCode=o=>o==null?void 0:o.replace("_","-"),consoleLogger={type:"logger",log(o){this.output("log",o)},warn(o){this.output("warn",o)},error(o){this.output("error",o)},output(o,l){var u,d;(d=(u=console==null?void 0:console[o])==null?void 0:u.apply)==null||d.call(u,console,l)}};class Logger{constructor(l,u={}){this.init(l,u)}init(l,u={}){this.prefix=u.prefix||"i18next:",this.logger=l||consoleLogger,this.options=u,this.debug=u.debug}log(...l){return this.forward(l,"log","",!0)}warn(...l){return this.forward(l,"warn","",!0)}error(...l){return this.forward(l,"error","")}deprecate(...l){return this.forward(l,"warn","WARNING DEPRECATED: ",!0)}forward(l,u,d,f){return f&&!this.debug?null:(isString(l[0])&&(l[0]=`${d}${this.prefix} ${l[0]}`),this.logger[u](l))}create(l){return new Logger(this.logger,{prefix:`${this.prefix}:${l}:`,...this.options})}clone(l){return l=l||this.options,l.prefix=l.prefix||this.prefix,new Logger(this.logger,l)}}var baseLogger=new Logger;class EventEmitter{constructor(){this.observers={}}on(l,u){return l.split(" ").forEach(d=>{this.observers[d]||(this.observers[d]=new Map);const f=this.observers[d].get(u)||0;this.observers[d].set(u,f+1)}),this}off(l,u){if(this.observers[l]){if(!u){delete this.observers[l];return}this.observers[l].delete(u)}}emit(l,...u){this.observers[l]&&Array.from(this.observers[l].entries()).forEach(([f,h])=>{for(let m=0;m<h;m++)f(...u)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([f,h])=>{for(let m=0;m<h;m++)f.apply(f,[l,...u])})}}class ResourceStore extends EventEmitter{constructor(l,u={ns:["translation"],defaultNS:"translation"}){super(),this.data=l||{},this.options=u,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(l){this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}removeNamespaces(l){const u=this.options.ns.indexOf(l);u>-1&&this.options.ns.splice(u,1)}getResource(l,u,d,f={}){var x,b;const h=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,m=f.ignoreJSONStructure!==void 0?f.ignoreJSONStructure:this.options.ignoreJSONStructure;let g;l.indexOf(".")>-1?g=l.split("."):(g=[l,u],d&&(Array.isArray(d)?g.push(...d):isString(d)&&h?g.push(...d.split(h)):g.push(d)));const v=getPath(this.data,g);return!v&&!u&&!d&&l.indexOf(".")>-1&&(l=g[0],u=g[1],d=g.slice(2).join(".")),v||!m||!isString(d)?v:deepFind((b=(x=this.data)==null?void 0:x[l])==null?void 0:b[u],d,h)}addResource(l,u,d,f,h={silent:!1}){const m=h.keySeparator!==void 0?h.keySeparator:this.options.keySeparator;let g=[l,u];d&&(g=g.concat(m?d.split(m):d)),l.indexOf(".")>-1&&(g=l.split("."),f=u,u=g[1]),this.addNamespaces(u),setPath(this.data,g,f),h.silent||this.emit("added",l,u,d,f)}addResources(l,u,d,f={silent:!1}){for(const h in d)(isString(d[h])||Array.isArray(d[h]))&&this.addResource(l,u,h,d[h],{silent:!0});f.silent||this.emit("added",l,u,d)}addResourceBundle(l,u,d,f,h,m={silent:!1,skipCopy:!1}){let g=[l,u];l.indexOf(".")>-1&&(g=l.split("."),f=d,d=u,u=g[1]),this.addNamespaces(u);let v=getPath(this.data,g)||{};m.skipCopy||(d=JSON.parse(JSON.stringify(d))),f?deepExtend(v,d,h):v={...v,...d},setPath(this.data,g,v),m.silent||this.emit("added",l,u,d)}removeResourceBundle(l,u){this.hasResourceBundle(l,u)&&delete this.data[l][u],this.removeNamespaces(u),this.emit("removed",l,u)}hasResourceBundle(l,u){return this.getResource(l,u)!==void 0}getResourceBundle(l,u){return u||(u=this.options.defaultNS),this.getResource(l,u)}getDataByLanguage(l){return this.data[l]}hasLanguageSomeTranslations(l){const u=this.getDataByLanguage(l);return!!(u&&Object.keys(u)||[]).find(f=>u[f]&&Object.keys(u[f]).length>0)}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(o){this.processors[o.name]=o},handle(o,l,u,d,f){return o.forEach(h=>{var m;l=((m=this.processors[h])==null?void 0:m.process(l,u,d,f))??l}),l}};const PATH_KEY=Symbol("i18next/PATH_KEY");function createProxy(){const o=[],l=Object.create(null);let u;return l.get=(d,f)=>{var h;return(h=u==null?void 0:u.revoke)==null||h.call(u),f===PATH_KEY?o:(o.push(f),u=Proxy.revocable(d,l),u.proxy)},Proxy.revocable(Object.create(null),l).proxy}function keysFromSelector(o,l){const{[PATH_KEY]:u}=o(createProxy());return u.join((l==null?void 0:l.keySeparator)??".")}const checkedLoadedFor={},shouldHandleAsObject=o=>!isString(o)&&typeof o!="boolean"&&typeof o!="number";class Translator extends EventEmitter{constructor(l,u={}){super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],l,this),this.options=u,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(l){l&&(this.language=l)}exists(l,u={interpolation:{}}){const d={...u};if(l==null)return!1;const f=this.resolve(l,d);return(f==null?void 0:f.res)!==void 0}extractFromKey(l,u){let d=u.nsSeparator!==void 0?u.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let h=u.ns||this.options.defaultNS||[];const m=d&&l.indexOf(d)>-1,g=!this.options.userDefinedKeySeparator&&!u.keySeparator&&!this.options.userDefinedNsSeparator&&!u.nsSeparator&&!looksLikeObjectPath(l,d,f);if(m&&!g){const v=l.match(this.interpolator.nestingRegexp);if(v&&v.length>0)return{key:l,namespaces:isString(h)?[h]:h};const x=l.split(d);(d!==f||d===f&&this.options.ns.indexOf(x[0])>-1)&&(h=x.shift()),l=x.join(f)}return{key:l,namespaces:isString(h)?[h]:h}}translate(l,u,d){let f=typeof u=="object"?{...u}:u;if(typeof f!="object"&&this.options.overloadTranslationOptionHandler&&(f=this.options.overloadTranslationOptionHandler(arguments)),typeof f=="object"&&(f={...f}),f||(f={}),l==null)return"";typeof l=="function"&&(l=keysFromSelector(l,{...this.options,...f})),Array.isArray(l)||(l=[String(l)]);const h=f.returnDetails!==void 0?f.returnDetails:this.options.returnDetails,m=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,{key:g,namespaces:v}=this.extractFromKey(l[l.length-1],f),x=v[v.length-1];let b=f.nsSeparator!==void 0?f.nsSeparator:this.options.nsSeparator;b===void 0&&(b=":");const S=f.lng||this.language,E=f.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((S==null?void 0:S.toLowerCase())==="cimode")return E?h?{res:`${x}${b}${g}`,usedKey:g,exactUsedKey:g,usedLng:S,usedNS:x,usedParams:this.getUsedParamsDetails(f)}:`${x}${b}${g}`:h?{res:g,usedKey:g,exactUsedKey:g,usedLng:S,usedNS:x,usedParams:this.getUsedParamsDetails(f)}:g;const w=this.resolve(l,f);let T=w==null?void 0:w.res;const C=(w==null?void 0:w.usedKey)||g,M=(w==null?void 0:w.exactUsedKey)||g,A=["[object Number]","[object Function]","[object RegExp]"],k=f.joinArrays!==void 0?f.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,O=f.count!==void 0&&!isString(f.count),j=Translator.hasDefaultValue(f),N=O?this.pluralResolver.getSuffix(S,f.count,f):"",V=f.ordinal&&O?this.pluralResolver.getSuffix(S,f.count,{ordinal:!1}):"",z=O&&!f.ordinal&&f.count===0,W=z&&f[`defaultValue${this.options.pluralSeparator}zero`]||f[`defaultValue${N}`]||f[`defaultValue${V}`]||f.defaultValue;let X=T;I&&!T&&j&&(X=W);const ie=shouldHandleAsObject(X),oe=Object.prototype.toString.apply(X);if(I&&X&&ie&&A.indexOf(oe)<0&&!(isString(k)&&Array.isArray(X))){if(!f.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const le=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,X,{...f,ns:v}):`key '${g} (${this.language})' returned an object instead of string.`;return h?(w.res=le,w.usedParams=this.getUsedParamsDetails(f),w):le}if(m){const le=Array.isArray(X),Q=le?[]:{},K=le?M:C;for(const $ in X)if(Object.prototype.hasOwnProperty.call(X,$)){const G=`${K}${m}${$}`;j&&!T?Q[$]=this.translate(G,{...f,defaultValue:shouldHandleAsObject(W)?W[$]:void 0,joinArrays:!1,ns:v}):Q[$]=this.translate(G,{...f,joinArrays:!1,ns:v}),Q[$]===G&&(Q[$]=X[$])}T=Q}}else if(I&&isString(k)&&Array.isArray(T))T=T.join(k),T&&(T=this.extendTranslation(T,l,f,d));else{let le=!1,Q=!1;!this.isValidLookup(T)&&j&&(le=!0,T=W),this.isValidLookup(T)||(Q=!0,T=g);const $=(f.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Q?void 0:T,G=j&&W!==T&&this.options.updateMissing;if(Q||le||G){if(this.logger.log(G?"updateKey":"missingKey",S,x,g,G?W:T),m){const U=this.resolve(g,{...f,keySeparator:!1});U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,f.lng||this.language);if(this.options.saveMissingTo==="fallback"&&B&&B[0])for(let U=0;U<B.length;U++)L.push(B[U]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(f.lng||this.language):L.push(f.lng||this.language);const q=(U,Y,te)=>{var ue;const ae=j&&te!==T?te:$;this.options.missingKeyHandler?this.options.missingKeyHandler(U,x,Y,ae,G,f):(ue=this.backendConnector)!=null&&ue.saveMissing&&this.backendConnector.saveMissing(U,x,Y,ae,G,f),this.emit("missingKey",U,x,Y,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?L.forEach(U=>{const Y=this.pluralResolver.getSuffixes(U,f);z&&f[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(te=>{q([U],g+te,f[`defaultValue${te}`]||W)})}):q(L,g,W))}T=this.extendTranslation(T,l,f,w,d),Q&&T===g&&this.options.appendNamespaceToMissingKey&&(T=`${x}${b}${g}`),(Q||le)&&this.options.parseMissingKeyHandler&&(T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${x}${b}${g}`:g,le?T:void 0,f))}return h?(w.res=T,w.usedParams=this.getUsedParamsDetails(f),w):T}extendTranslation(l,u,d,f,h){var v,x;if((v=this.i18nFormat)!=null&&v.parse)l=this.i18nFormat.parse(l,{...this.options.interpolation.defaultVariables,...d},d.lng||this.language||f.usedLng,f.usedNS,f.usedKey,{resolved:f});else if(!d.skipInterpolation){d.interpolation&&this.interpolator.init({...d,interpolation:{...this.options.interpolation,...d.interpolation}});const b=isString(l)&&(((x=d==null?void 0:d.interpolation)==null?void 0:x.skipOnVariables)!==void 0?d.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let S;if(b){const w=l.match(this.interpolator.nestingRegexp);S=w&&w.length}let E=d.replace&&!isString(d.replace)?d.replace:d;if(this.options.interpolation.defaultVariables&&(E={...this.options.interpolation.defaultVariables,...E}),l=this.interpolator.interpolate(l,E,d.lng||this.language||f.usedLng,d),b){const w=l.match(this.interpolator.nestingRegexp),T=w&&w.length;S<T&&(d.nest=!1)}!d.lng&&f&&f.res&&(d.lng=this.language||f.usedLng),d.nest!==!1&&(l=this.interpolator.nest(l,(...w)=>(h==null?void 0:h[0])===w[0]&&!d.context?(this.logger.warn(`It seems you are nesting recursively key: ${w[0]} in key: ${u[0]}`),null):this.translate(...w,u),d)),d.interpolation&&this.interpolator.reset()}const m=d.postProcess||this.options.postProcess,g=isString(m)?[m]:m;return l!=null&&(g!=null&&g.length)&&d.applyPostProcessor!==!1&&(l=postProcessor.handle(g,l,u,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...f,usedParams:this.getUsedParamsDetails(d)},...d}:d,this)),l}resolve(l,u={}){let d,f,h,m,g;return isString(l)&&(l=[l]),l.forEach(v=>{if(this.isValidLookup(d))return;const x=this.extractFromKey(v,u),b=x.key;f=b;let S=x.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const E=u.count!==void 0&&!isString(u.count),w=E&&!u.ordinal&&u.count===0,T=u.context!==void 0&&(isString(u.context)||typeof u.context=="number")&&u.context!=="",C=u.lngs?u.lngs:this.languageUtils.toResolveHierarchy(u.lng||this.language,u.fallbackLng);S.forEach(M=>{var A,k;this.isValidLookup(d)||(g=M,!checkedLoadedFor[`${C[0]}-${M}`]&&((A=this.utils)!=null&&A.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(g))&&(checkedLoadedFor[`${C[0]}-${M}`]=!0,this.logger.warn(`key "${f}" for languages "${C.join(", ")}" won't get resolved as namespace "${g}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(I=>{var N;if(this.isValidLookup(d))return;m=I;const O=[b];if((N=this.i18nFormat)!=null&&N.addLookupKeys)this.i18nFormat.addLookupKeys(O,b,I,M,u);else{let V;E&&(V=this.pluralResolver.getSuffix(I,u.count,u));const z=`${this.options.pluralSeparator}zero`,W=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(u.ordinal&&V.indexOf(W)===0&&O.push(b+V.replace(W,this.options.pluralSeparator)),O.push(b+V),w&&O.push(b+z)),T){const X=`${b}${this.options.contextSeparator||"_"}${u.context}`;O.push(X),E&&(u.ordinal&&V.indexOf(W)===0&&O.push(X+V.replace(W,this.options.pluralSeparator)),O.push(X+V),w&&O.push(X+z))}}let j;for(;j=O.pop();)this.isValidLookup(d)||(h=j,d=this.getResource(I,M,j,u))}))})}),{res:d,usedKey:f,exactUsedKey:h,usedLng:m,usedNS:g}}isValidLookup(l){return l!==void 0&&!(!this.options.returnNull&&l===null)&&!(!this.options.returnEmptyString&&l==="")}getResource(l,u,d,f={}){var h;return(h=this.i18nFormat)!=null&&h.getResource?this.i18nFormat.getResource(l,u,d,f):this.resourceStore.getResource(l,u,d,f)}getUsedParamsDetails(l={}){const u=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],d=l.replace&&!isString(l.replace);let f=d?l.replace:l;if(d&&typeof l.count<"u"&&(f.count=l.count),this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),!d){f={...f};for(const h of u)delete f[h]}return f}static hasDefaultValue(l){const u="defaultValue";for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&u===d.substring(0,u.length)&&l[d]!==void 0)return!0;return!1}}class LanguageUtil{constructor(l){this.options=l,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(l){if(l=getCleanedCode(l),!l||l.indexOf("-")<0)return null;const u=l.split("-");return u.length===2||(u.pop(),u[u.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(u.join("-"))}getLanguagePartFromCode(l){if(l=getCleanedCode(l),!l||l.indexOf("-")<0)return l;const u=l.split("-");return this.formatLanguageCode(u[0])}formatLanguageCode(l){if(isString(l)&&l.indexOf("-")>-1){let u;try{u=Intl.getCanonicalLocales(l)[0]}catch{}return u&&this.options.lowerCaseLng&&(u=u.toLowerCase()),u||(this.options.lowerCaseLng?l.toLowerCase():l)}return this.options.cleanCode||this.options.lowerCaseLng?l.toLowerCase():l}isSupportedCode(l){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(l=this.getLanguagePartFromCode(l)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(l)>-1}getBestMatchFromCodes(l){if(!l)return null;let u;return l.forEach(d=>{if(u)return;const f=this.formatLanguageCode(d);(!this.options.supportedLngs||this.isSupportedCode(f))&&(u=f)}),!u&&this.options.supportedLngs&&l.forEach(d=>{if(u)return;const f=this.getScriptPartFromCode(d);if(this.isSupportedCode(f))return u=f;const h=this.getLanguagePartFromCode(d);if(this.isSupportedCode(h))return u=h;u=this.options.supportedLngs.find(m=>{if(m===h)return m;if(!(m.indexOf("-")<0&&h.indexOf("-")<0)&&(m.indexOf("-")>0&&h.indexOf("-")<0&&m.substring(0,m.indexOf("-"))===h||m.indexOf(h)===0&&h.length>1))return m})}),u||(u=this.getFallbackCodes(this.options.fallbackLng)[0]),u}getFallbackCodes(l,u){if(!l)return[];if(typeof l=="function"&&(l=l(u)),isString(l)&&(l=[l]),Array.isArray(l))return l;if(!u)return l.default||[];let d=l[u];return d||(d=l[this.getScriptPartFromCode(u)]),d||(d=l[this.formatLanguageCode(u)]),d||(d=l[this.getLanguagePartFromCode(u)]),d||(d=l.default),d||[]}toResolveHierarchy(l,u){const d=this.getFallbackCodes((u===!1?[]:u)||this.options.fallbackLng||[],l),f=[],h=m=>{m&&(this.isSupportedCode(m)?f.push(m):this.logger.warn(`rejecting language code not found in supportedLngs: ${m}`))};return isString(l)&&(l.indexOf("-")>-1||l.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(l)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(l)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(l))):isString(l)&&h(this.formatLanguageCode(l)),d.forEach(m=>{f.indexOf(m)<0&&h(this.formatLanguageCode(m))}),f}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:o=>o===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(l,u={}){this.languageUtils=l,this.options=u,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(l,u){this.rules[l]=u}clearCache(){this.pluralRulesCache={}}getRule(l,u={}){const d=getCleanedCode(l==="dev"?"en":l),f=u.ordinal?"ordinal":"cardinal",h=JSON.stringify({cleanedCode:d,type:f});if(h in this.pluralRulesCache)return this.pluralRulesCache[h];let m;try{m=new Intl.PluralRules(d,{type:f})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!l.match(/-|_/))return dummyRule;const v=this.languageUtils.getLanguagePartFromCode(l);m=this.getRule(v,u)}return this.pluralRulesCache[h]=m,m}needsPlural(l,u={}){let d=this.getRule(l,u);return d||(d=this.getRule("dev",u)),(d==null?void 0:d.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(l,u,d={}){return this.getSuffixes(l,d).map(f=>`${u}${f}`)}getSuffixes(l,u={}){let d=this.getRule(l,u);return d||(d=this.getRule("dev",u)),d?d.resolvedOptions().pluralCategories.sort((f,h)=>suffixesOrder[f]-suffixesOrder[h]).map(f=>`${this.options.prepend}${u.ordinal?`ordinal${this.options.prepend}`:""}${f}`):[]}getSuffix(l,u,d={}){const f=this.getRule(l,d);return f?`${this.options.prepend}${d.ordinal?`ordinal${this.options.prepend}`:""}${f.select(u)}`:(this.logger.warn(`no plural rule found for: ${l}`),this.getSuffix("dev",u,d))}}const deepFindWithDefaults=(o,l,u,d=".",f=!0)=>{let h=getPathWithDefaults(o,l,u);return!h&&f&&isString(u)&&(h=deepFind(o,u,d),h===void 0&&(h=deepFind(l,u,d))),h},regexSafe=o=>o.replace(/\$/g,"$$$$");class Interpolator{constructor(l={}){var u;this.logger=baseLogger.create("interpolator"),this.options=l,this.format=((u=l==null?void 0:l.interpolation)==null?void 0:u.format)||(d=>d),this.init(l)}init(l={}){l.interpolation||(l.interpolation={escapeValue:!0});const{escape:u,escapeValue:d,useRawValueToEscape:f,prefix:h,prefixEscaped:m,suffix:g,suffixEscaped:v,formatSeparator:x,unescapeSuffix:b,unescapePrefix:S,nestingPrefix:E,nestingPrefixEscaped:w,nestingSuffix:T,nestingSuffixEscaped:C,nestingOptionsSeparator:M,maxReplaces:A,alwaysFormat:k}=l.interpolation;this.escape=u!==void 0?u:escape,this.escapeValue=d!==void 0?d:!0,this.useRawValueToEscape=f!==void 0?f:!1,this.prefix=h?regexEscape(h):m||"{{",this.suffix=g?regexEscape(g):v||"}}",this.formatSeparator=x||",",this.unescapePrefix=b?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=E?regexEscape(E):w||regexEscape("$t("),this.nestingSuffix=T?regexEscape(T):C||regexEscape(")"),this.nestingOptionsSeparator=M||",",this.maxReplaces=A||1e3,this.alwaysFormat=k!==void 0?k:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const l=(u,d)=>(u==null?void 0:u.source)===d?(u.lastIndex=0,u):new RegExp(d,"g");this.regexp=l(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=l(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=l(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(l,u,d,f){var w;let h,m,g;const v=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},x=T=>{if(T.indexOf(this.formatSeparator)<0){const k=deepFindWithDefaults(u,v,T,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,d,{...f,...u,interpolationkey:T}):k}const C=T.split(this.formatSeparator),M=C.shift().trim(),A=C.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(u,v,M,this.options.keySeparator,this.options.ignoreJSONStructure),A,d,{...f,...u,interpolationkey:M})};this.resetRegExp();const b=(f==null?void 0:f.missingInterpolationHandler)||this.options.missingInterpolationHandler,S=((w=f==null?void 0:f.interpolation)==null?void 0:w.skipOnVariables)!==void 0?f.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:T=>regexSafe(T)},{regex:this.regexp,safeValue:T=>this.escapeValue?regexSafe(this.escape(T)):regexSafe(T)}].forEach(T=>{for(g=0;h=T.regex.exec(l);){const C=h[1].trim();if(m=x(C),m===void 0)if(typeof b=="function"){const A=b(l,h,f);m=isString(A)?A:""}else if(f&&Object.prototype.hasOwnProperty.call(f,C))m="";else if(S){m=h[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${l}`),m="";else!isString(m)&&!this.useRawValueToEscape&&(m=makeString(m));const M=T.safeValue(m);if(l=l.replace(h[0],M),S?(T.regex.lastIndex+=m.length,T.regex.lastIndex-=h[0].length):T.regex.lastIndex=0,g++,g>=this.maxReplaces)break}}),l}nest(l,u,d={}){let f,h,m;const g=(v,x)=>{const b=this.nestingOptionsSeparator;if(v.indexOf(b)<0)return v;const S=v.split(new RegExp(`${b}[ ]*{`));let E=`{${S[1]}`;v=S[0],E=this.interpolate(E,m);const w=E.match(/'/g),T=E.match(/"/g);(((w==null?void 0:w.length)??0)%2===0&&!T||T.length%2!==0)&&(E=E.replace(/'/g,'"'));try{m=JSON.parse(E),x&&(m={...x,...m})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${v}`,C),`${v}${b}${E}`}return m.defaultValue&&m.defaultValue.indexOf(this.prefix)>-1&&delete m.defaultValue,v};for(;f=this.nestingRegexp.exec(l);){let v=[];m={...d},m=m.replace&&!isString(m.replace)?m.replace:m,m.applyPostProcessor=!1,delete m.defaultValue;const x=/{.*}/.test(f[1])?f[1].lastIndexOf("}")+1:f[1].indexOf(this.formatSeparator);if(x!==-1&&(v=f[1].slice(x).split(this.formatSeparator).map(b=>b.trim()).filter(Boolean),f[1]=f[1].slice(0,x)),h=u(g.call(this,f[1].trim(),m),m),h&&f[0]===l&&!isString(h))return h;isString(h)||(h=makeString(h)),h||(this.logger.warn(`missed to resolve ${f[1]} for nesting ${l}`),h=""),v.length&&(h=v.reduce((b,S)=>this.format(b,S,d.lng,{...d,interpolationkey:f[1].trim()}),h.trim())),l=l.replace(f[0],h),this.regexp.lastIndex=0}return l}}const parseFormatStr=o=>{let l=o.toLowerCase().trim();const u={};if(o.indexOf("(")>-1){const d=o.split("(");l=d[0].toLowerCase().trim();const f=d[1].substring(0,d[1].length-1);l==="currency"&&f.indexOf(":")<0?u.currency||(u.currency=f.trim()):l==="relativetime"&&f.indexOf(":")<0?u.range||(u.range=f.trim()):f.split(";").forEach(m=>{if(m){const[g,...v]=m.split(":"),x=v.join(":").trim().replace(/^'+|'+$/g,""),b=g.trim();u[b]||(u[b]=x),x==="false"&&(u[b]=!1),x==="true"&&(u[b]=!0),isNaN(x)||(u[b]=parseInt(x,10))}})}return{formatName:l,formatOptions:u}},createCachedFormatter=o=>{const l={};return(u,d,f)=>{let h=f;f&&f.interpolationkey&&f.formatParams&&f.formatParams[f.interpolationkey]&&f[f.interpolationkey]&&(h={...h,[f.interpolationkey]:void 0});const m=d+JSON.stringify(h);let g=l[m];return g||(g=o(getCleanedCode(d),f),l[m]=g),g(u)}},createNonCachedFormatter=o=>(l,u,d)=>o(getCleanedCode(u),d)(l);class Formatter{constructor(l={}){this.logger=baseLogger.create("formatter"),this.options=l,this.init(l)}init(l,u={interpolation:{}}){this.formatSeparator=u.interpolation.formatSeparator||",";const d=u.cacheInBuiltFormats?createCachedFormatter:createNonCachedFormatter;this.formats={number:d((f,h)=>{const m=new Intl.NumberFormat(f,{...h});return g=>m.format(g)}),currency:d((f,h)=>{const m=new Intl.NumberFormat(f,{...h,style:"currency"});return g=>m.format(g)}),datetime:d((f,h)=>{const m=new Intl.DateTimeFormat(f,{...h});return g=>m.format(g)}),relativetime:d((f,h)=>{const m=new Intl.RelativeTimeFormat(f,{...h});return g=>m.format(g,h.range||"day")}),list:d((f,h)=>{const m=new Intl.ListFormat(f,{...h});return g=>m.format(g)})}}add(l,u){this.formats[l.toLowerCase().trim()]=u}addCached(l,u){this.formats[l.toLowerCase().trim()]=createCachedFormatter(u)}format(l,u,d,f={}){const h=u.split(this.formatSeparator);if(h.length>1&&h[0].indexOf("(")>1&&h[0].indexOf(")")<0&&h.find(g=>g.indexOf(")")>-1)){const g=h.findIndex(v=>v.indexOf(")")>-1);h[0]=[h[0],...h.splice(1,g)].join(this.formatSeparator)}return h.reduce((g,v)=>{var S;const{formatName:x,formatOptions:b}=parseFormatStr(v);if(this.formats[x]){let E=g;try{const w=((S=f==null?void 0:f.formatParams)==null?void 0:S[f.interpolationkey])||{},T=w.locale||w.lng||f.locale||f.lng||d;E=this.formats[x](g,T,{...b,...f,...w})}catch(w){this.logger.warn(w)}return E}else this.logger.warn(`there was no format function for ${x}`);return g},l)}}const removePending=(o,l)=>{o.pending[l]!==void 0&&(delete o.pending[l],o.pendingCount--)};class Connector extends EventEmitter{constructor(l,u,d,f={}){var h,m;super(),this.backend=l,this.store=u,this.services=d,this.languageUtils=d.languageUtils,this.options=f,this.logger=baseLogger.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=f.maxParallelReads||10,this.readingCalls=0,this.maxRetries=f.maxRetries>=0?f.maxRetries:5,this.retryTimeout=f.retryTimeout>=1?f.retryTimeout:350,this.state={},this.queue=[],(m=(h=this.backend)==null?void 0:h.init)==null||m.call(h,d,f.backend,f)}queueLoad(l,u,d,f){const h={},m={},g={},v={};return l.forEach(x=>{let b=!0;u.forEach(S=>{const E=`${x}|${S}`;!d.reload&&this.store.hasResourceBundle(x,S)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?m[E]===void 0&&(m[E]=!0):(this.state[E]=1,b=!1,m[E]===void 0&&(m[E]=!0),h[E]===void 0&&(h[E]=!0),v[S]===void 0&&(v[S]=!0)))}),b||(g[x]=!0)}),(Object.keys(h).length||Object.keys(m).length)&&this.queue.push({pending:m,pendingCount:Object.keys(m).length,loaded:{},errors:[],callback:f}),{toLoad:Object.keys(h),pending:Object.keys(m),toLoadLanguages:Object.keys(g),toLoadNamespaces:Object.keys(v)}}loaded(l,u,d){const f=l.split("|"),h=f[0],m=f[1];u&&this.emit("failedLoading",h,m,u),!u&&d&&this.store.addResourceBundle(h,m,d,void 0,void 0,{skipCopy:!0}),this.state[l]=u?-1:2,u&&d&&(this.state[l]=0);const g={};this.queue.forEach(v=>{pushPath(v.loaded,[h],m),removePending(v,l),u&&v.errors.push(u),v.pendingCount===0&&!v.done&&(Object.keys(v.loaded).forEach(x=>{g[x]||(g[x]={});const b=v.loaded[x];b.length&&b.forEach(S=>{g[x][S]===void 0&&(g[x][S]=!0)})}),v.done=!0,v.errors.length?v.callback(v.errors):v.callback())}),this.emit("loaded",g),this.queue=this.queue.filter(v=>!v.done)}read(l,u,d,f=0,h=this.retryTimeout,m){if(!l.length)return m(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:l,ns:u,fcName:d,tried:f,wait:h,callback:m});return}this.readingCalls++;const g=(x,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(x&&b&&f<this.maxRetries){setTimeout(()=>{this.read.call(this,l,u,d,f+1,h*2,m)},h);return}m(x,b)},v=this.backend[d].bind(this.backend);if(v.length===2){try{const x=v(l,u);x&&typeof x.then=="function"?x.then(b=>g(null,b)).catch(g):g(null,x)}catch(x){g(x)}return}return v(l,u,g)}prepareLoading(l,u,d={},f){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),f&&f();isString(l)&&(l=this.languageUtils.toResolveHierarchy(l)),isString(u)&&(u=[u]);const h=this.queueLoad(l,u,d,f);if(!h.toLoad.length)return h.pending.length||f(),null;h.toLoad.forEach(m=>{this.loadOne(m)})}load(l,u,d){this.prepareLoading(l,u,{},d)}reload(l,u,d){this.prepareLoading(l,u,{reload:!0},d)}loadOne(l,u=""){const d=l.split("|"),f=d[0],h=d[1];this.read(f,h,"read",void 0,void 0,(m,g)=>{m&&this.logger.warn(`${u}loading namespace ${h} for language ${f} failed`,m),!m&&g&&this.logger.log(`${u}loaded namespace ${h} for language ${f}`,g),this.loaded(l,m,g)})}saveMissing(l,u,d,f,h,m={},g=()=>{}){var v,x,b,S,E;if((x=(v=this.services)==null?void 0:v.utils)!=null&&x.hasLoadedNamespace&&!((S=(b=this.services)==null?void 0:b.utils)!=null&&S.hasLoadedNamespace(u))){this.logger.warn(`did not save key "${d}" as the namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(d==null||d==="")){if((E=this.backend)!=null&&E.create){const w={...m,isUpdate:h},T=this.backend.create.bind(this.backend);if(T.length<6)try{let C;T.length===5?C=T(l,u,d,f,w):C=T(l,u,d,f),C&&typeof C.then=="function"?C.then(M=>g(null,M)).catch(g):g(null,C)}catch(C){g(C)}else T(l,u,d,f,g,w)}!l||!l[0]||this.store.addResource(l[0],u,d,f)}}}const get=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:o=>{let l={};if(typeof o[1]=="object"&&(l=o[1]),isString(o[1])&&(l.defaultValue=o[1]),isString(o[2])&&(l.tDescription=o[2]),typeof o[2]=="object"||typeof o[3]=="object"){const u=o[3]||o[2];Object.keys(u).forEach(d=>{l[d]=u[d]})}return l},interpolation:{escapeValue:!0,format:o=>o,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),transformOptions=o=>{var l,u;return isString(o.ns)&&(o.ns=[o.ns]),isString(o.fallbackLng)&&(o.fallbackLng=[o.fallbackLng]),isString(o.fallbackNS)&&(o.fallbackNS=[o.fallbackNS]),((u=(l=o.supportedLngs)==null?void 0:l.indexOf)==null?void 0:u.call(l,"cimode"))<0&&(o.supportedLngs=o.supportedLngs.concat(["cimode"])),typeof o.initImmediate=="boolean"&&(o.initAsync=o.initImmediate),o},noop=()=>{},bindMemberFunctions=o=>{Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach(u=>{typeof o[u]=="function"&&(o[u]=o[u].bind(o))})};class I18n extends EventEmitter{constructor(l={},u){if(super(),this.options=transformOptions(l),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),u&&!this.isInitialized&&!l.isClone){if(!this.options.initAsync)return this.init(l,u),this;setTimeout(()=>{this.init(l,u)},0)}}init(l={},u){this.isInitializing=!0,typeof l=="function"&&(u=l,l={}),l.defaultNS==null&&l.ns&&(isString(l.ns)?l.defaultNS=l.ns:l.ns.indexOf("translation")<0&&(l.defaultNS=l.ns[0]));const d=get();this.options={...d,...this.options,...transformOptions(l)},this.options.interpolation={...d.interpolation,...this.options.interpolation},l.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=l.keySeparator),l.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=l.nsSeparator);const f=x=>x?typeof x=="function"?new x:x:null;if(!this.options.isClone){this.modules.logger?baseLogger.init(f(this.modules.logger),this.options):baseLogger.init(null,this.options);let x;this.modules.formatter?x=this.modules.formatter:x=Formatter;const b=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const S=this.services;S.logger=baseLogger,S.resourceStore=this.store,S.languageUtils=b,S.pluralResolver=new PluralResolver(b,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==d.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),x&&(!this.options.interpolation.format||this.options.interpolation.format===d.interpolation.format)&&(S.formatter=f(x),S.formatter.init&&S.formatter.init(S,this.options),this.options.interpolation.format=S.formatter.format.bind(S.formatter)),S.interpolator=new Interpolator(this.options),S.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},S.backendConnector=new Connector(f(this.modules.backend),S.resourceStore,S,this.options),S.backendConnector.on("*",(w,...T)=>{this.emit(w,...T)}),this.modules.languageDetector&&(S.languageDetector=f(this.modules.languageDetector),S.languageDetector.init&&S.languageDetector.init(S,this.options.detection,this.options)),this.modules.i18nFormat&&(S.i18nFormat=f(this.modules.i18nFormat),S.i18nFormat.init&&S.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(w,...T)=>{this.emit(w,...T)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,u||(u=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const x=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);x.length>0&&x[0]!=="dev"&&(this.options.lng=x[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(x=>{this[x]=(...b)=>this.store[x](...b)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(x=>{this[x]=(...b)=>(this.store[x](...b),this)});const g=defer(),v=()=>{const x=(b,S)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),g.resolve(S),u(b,S)};if(this.languages&&!this.isInitialized)return x(null,this.t.bind(this));this.changeLanguage(this.options.lng,x)};return this.options.resources||!this.options.initAsync?v():setTimeout(v,0),g}loadResources(l,u=noop){var h,m;let d=u;const f=isString(l)?l:this.language;if(typeof l=="function"&&(d=l),!this.options.resources||this.options.partialBundledLanguages){if((f==null?void 0:f.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return d();const g=[],v=x=>{if(!x||x==="cimode")return;this.services.languageUtils.toResolveHierarchy(x).forEach(S=>{S!=="cimode"&&g.indexOf(S)<0&&g.push(S)})};f?v(f):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(b=>v(b)),(m=(h=this.options.preload)==null?void 0:h.forEach)==null||m.call(h,x=>v(x)),this.services.backendConnector.load(g,this.options.ns,x=>{!x&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),d(x)})}else d(null)}reloadResources(l,u,d){const f=defer();return typeof l=="function"&&(d=l,l=void 0),typeof u=="function"&&(d=u,u=void 0),l||(l=this.languages),u||(u=this.options.ns),d||(d=noop),this.services.backendConnector.reload(l,u,h=>{f.resolve(),d(h)}),f}use(l){if(!l)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!l.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return l.type==="backend"&&(this.modules.backend=l),(l.type==="logger"||l.log&&l.warn&&l.error)&&(this.modules.logger=l),l.type==="languageDetector"&&(this.modules.languageDetector=l),l.type==="i18nFormat"&&(this.modules.i18nFormat=l),l.type==="postProcessor"&&postProcessor.addPostProcessor(l),l.type==="formatter"&&(this.modules.formatter=l),l.type==="3rdParty"&&this.modules.external.push(l),this}setResolvedLanguage(l){if(!(!l||!this.languages)&&!(["cimode","dev"].indexOf(l)>-1)){for(let u=0;u<this.languages.length;u++){const d=this.languages[u];if(!(["cimode","dev"].indexOf(d)>-1)&&this.store.hasLanguageSomeTranslations(d)){this.resolvedLanguage=d;break}}!this.resolvedLanguage&&this.languages.indexOf(l)<0&&this.store.hasLanguageSomeTranslations(l)&&(this.resolvedLanguage=l,this.languages.unshift(l))}}changeLanguage(l,u){this.isLanguageChangingTo=l;const d=defer();this.emit("languageChanging",l);const f=g=>{this.language=g,this.languages=this.services.languageUtils.toResolveHierarchy(g),this.resolvedLanguage=void 0,this.setResolvedLanguage(g)},h=(g,v)=>{v?this.isLanguageChangingTo===l&&(f(v),this.translator.changeLanguage(v),this.isLanguageChangingTo=void 0,this.emit("languageChanged",v),this.logger.log("languageChanged",v)):this.isLanguageChangingTo=void 0,d.resolve((...x)=>this.t(...x)),u&&u(g,(...x)=>this.t(...x))},m=g=>{var b,S;!l&&!g&&this.services.languageDetector&&(g=[]);const v=isString(g)?g:g&&g[0],x=this.store.hasLanguageSomeTranslations(v)?v:this.services.languageUtils.getBestMatchFromCodes(isString(g)?[g]:g);x&&(this.language||f(x),this.translator.language||this.translator.changeLanguage(x),(S=(b=this.services.languageDetector)==null?void 0:b.cacheUserLanguage)==null||S.call(b,x)),this.loadResources(x,E=>{h(E,x)})};return!l&&this.services.languageDetector&&!this.services.languageDetector.async?m(this.services.languageDetector.detect()):!l&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(m):this.services.languageDetector.detect(m):m(l),d}getFixedT(l,u,d){const f=(h,m,...g)=>{let v;typeof m!="object"?v=this.options.overloadTranslationOptionHandler([h,m].concat(g)):v={...m},v.lng=v.lng||f.lng,v.lngs=v.lngs||f.lngs,v.ns=v.ns||f.ns,v.keyPrefix!==""&&(v.keyPrefix=v.keyPrefix||d||f.keyPrefix);const x=this.options.keySeparator||".";let b;return v.keyPrefix&&Array.isArray(h)?b=h.map(S=>(typeof S=="function"&&(S=keysFromSelector(S,{...this.options,...m})),`${v.keyPrefix}${x}${S}`)):(typeof h=="function"&&(h=keysFromSelector(h,{...this.options,...m})),b=v.keyPrefix?`${v.keyPrefix}${x}${h}`:h),this.t(b,v)};return isString(l)?f.lng=l:f.lngs=l,f.ns=u,f.keyPrefix=d,f}t(...l){var u;return(u=this.translator)==null?void 0:u.translate(...l)}exists(...l){var u;return(u=this.translator)==null?void 0:u.exists(...l)}setDefaultNamespace(l){this.options.defaultNS=l}hasLoadedNamespace(l,u={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const d=u.lng||this.resolvedLanguage||this.languages[0],f=this.options?this.options.fallbackLng:!1,h=this.languages[this.languages.length-1];if(d.toLowerCase()==="cimode")return!0;const m=(g,v)=>{const x=this.services.backendConnector.state[`${g}|${v}`];return x===-1||x===0||x===2};if(u.precheck){const g=u.precheck(this,m);if(g!==void 0)return g}return!!(this.hasResourceBundle(d,l)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||m(d,l)&&(!f||m(h,l)))}loadNamespaces(l,u){const d=defer();return this.options.ns?(isString(l)&&(l=[l]),l.forEach(f=>{this.options.ns.indexOf(f)<0&&this.options.ns.push(f)}),this.loadResources(f=>{d.resolve(),u&&u(f)}),d):(u&&u(),Promise.resolve())}loadLanguages(l,u){const d=defer();isString(l)&&(l=[l]);const f=this.options.preload||[],h=l.filter(m=>f.indexOf(m)<0&&this.services.languageUtils.isSupportedCode(m));return h.length?(this.options.preload=f.concat(h),this.loadResources(m=>{d.resolve(),u&&u(m)}),d):(u&&u(),Promise.resolve())}dir(l){var f,h;if(l||(l=this.resolvedLanguage||(((f=this.languages)==null?void 0:f.length)>0?this.languages[0]:this.language)),!l)return"rtl";try{const m=new Intl.Locale(l);if(m&&m.getTextInfo){const g=m.getTextInfo();if(g&&g.direction)return g.direction}}catch{}const u=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],d=((h=this.services)==null?void 0:h.languageUtils)||new LanguageUtil(get());return l.toLowerCase().indexOf("-latn")>1?"ltr":u.indexOf(d.getLanguagePartFromCode(l))>-1||l.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(l={},u){return new I18n(l,u)}cloneInstance(l={},u=noop){const d=l.forkResourceStore;d&&delete l.forkResourceStore;const f={...this.options,...l,isClone:!0},h=new I18n(f);if((l.debug!==void 0||l.prefix!==void 0)&&(h.logger=h.logger.clone(l)),["store","services","language"].forEach(g=>{h[g]=this[g]}),h.services={...this.services},h.services.utils={hasLoadedNamespace:h.hasLoadedNamespace.bind(h)},d){const g=Object.keys(this.store.data).reduce((v,x)=>(v[x]={...this.store.data[x]},v[x]=Object.keys(v[x]).reduce((b,S)=>(b[S]={...v[x][S]},b),v[x]),v),{});h.store=new ResourceStore(g,f),h.services.resourceStore=h.store}return h.translator=new Translator(h.services,f),h.translator.on("*",(g,...v)=>{h.emit(g,...v)}),h.init(f,u),h.translator.options=f,h.translator.backendConnector.services.utils={hasLoadedNamespace:h.hasLoadedNamespace.bind(h)},h}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const instance=I18n.createInstance();instance.createInstance=I18n.createInstance,instance.createInstance,instance.dir,instance.init,instance.loadResources,instance.reloadResources,instance.use,instance.changeLanguage,instance.getFixedT,instance.t,instance.exists,instance.setDefaultNamespace,instance.hasLoadedNamespace,instance.loadNamespaces,instance.loadLanguages;const balance$4="Balance",topUp$4="Top Up",ads$4="Ads",adsOn$4="On",adsOff$4="Off",level$4="Level",toLevelUp$4="to lvl up",xpCounter$4="/ {{total}} XP",lootBox$4="Loot Box",forLevel$4="for level {{level}}",unopenedLootBox$4="Unopened Loot Box",inventory$4="Inventory",inventoryDescription$4="You can find all your unopened loot boxes here. Tap the image to try your luck with rewards: you may find USDT, coins, or another box inside!",inventoryDescriptionEmpty$4="Unopened loot boxes will be kept here. Inside of each one you may find USDT, coins, or another loot box. Better rewards based on a box rarity!",inventoryDescriptionEmptyButton$4="You don’t have loot boxes yet, <br/> but you can buy one",emptyBox$4="Empty Box",openItem$4="Open Item",reward_type$4={coins:"{{count}} coin",coins_one:"{{count}} coin",coins_few:"{{count}} coins",coins_many:"{{count}} coins",usdt_no_amount:"USDT",coins_no_amount:"Coins",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} gem",gems_one:"{{count}} gem",gems_few:"{{count}} gems",gems_many:"{{count}} gems",gems_no_amount:"Gems",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Double Balance",box:"LOOT BOX",box_common:"BASIC",box_rare:"RARE",box_epic:"EPIC",box_legend:"LEGEND"},dates$4={today:"Today",yesterday:"Yest"},confirmIframe$4={pay:"Pay",cancel:"Cancel"},months$4={january:"Jan",february:"Feb",march:"Mar",april:"Apr",may:"May",june:"Jun",july:"Jul",august:"Aug",september:"Sep",october:"Oct",november:"Nov",december:"Dec"},box_open$4={skip:"Skip",you_ve_got:"You’ve got",button_reveal_reward:"Reveal Reward",button_open_now:"Open Now",button_save_inventory:"Save to Inventory",button_unopened_boxes:"Unopened Loot Boxes",recent_rewards:"Recent rewards",later_open_later_inventory:"You can open it later in inventory"},common$4={error:"Oops! Something went wrong. Please try again later.",continue:"Continue",ok:"OK",timeAgo:{sec_zero:"{{count}} seconds ago",sec_one:"{{count}} second ago",sec_two:"{{count}} seconds ago",sec_few:"{{count}} seconds ago",sec_many:"{{count}} seconds ago",sec_other:"{{count}} seconds ago",now:"Just now",min_zero:"{{count}} minutes ago",min_one:"{{count}} minute ago",min_two:"{{count}} minutes ago",min_few:"{{count}} minutes ago",min_many:"{{count}} minutes ago",min_other:"{{count}} minutes ago",h_zero:"{{count}} hours ago",h_one:"{{count}} hour ago",h_two:"{{count}} hours ago",h_few:"{{count}} hours ago",h_many:"{{count}} hours ago",h_other:"{{count}} hours ago",d_zero:"{{count}} days ago",d_one:"{{count}} day ago",d_two:"{{count}} days ago",d_few:"{{count}} days ago",d_many:"{{count}} days ago",d_other:"{{count}} days ago"}},snackbar$4={purchase:{blackHolePurchaseChest:"Purchase",blackHolePurchaseLevel:"Purchase",blackHolePurchaseAutoBurn:"Purchase",walletPurchaseGems:"Purchase",blackHoleBurnCoins:"Burned",error:"Failed to make a purchase"},receiving:{claimedTask:"Received"}},purchaseAdsFreeModal$4={title:"Remove Ads",disableAllInterruptions:"Disable all interruptions in games with a recurring monthly subscription. No worries, you will also have the option to turn ads on back if you want anytime!",noInterruptionsInGames:"No interruptions in games with a recurring subscription.",activeRecurring:"Active recurring payments at {{price}}",aMonth:" a month.",nextPayment:"Next payment {{date}}",activeUntil:"Active until {{date}}",subscriptionPaused:"Subscription is Paused",resumeSubscription:"Resume Subscription",cancelSubscription:"Cancel Subscription",continue:"Continue",month:"{{price}} / month",errorCancelSubscription:"Failed to cancel subscription. Please try again"},levelInfoModal$4={title:"Your Level",description:"Gain experience by playing games. For leveling up you get loot boxes, which may contain USDT, coins or better loot boxes. Compete with other players to win real USDT every week.",action:"Got It"},topUpModal$4={balance:"Balance",topUpBalance:"Top Up Gems",coins:"coins",gems:"gems",topUp:"Top Up"},inventoryModal$4={title:"Inventory",description:"It's your personal storage space for all unopened loot boxes. Tap each image to reveal reward inside!"},en={balance:balance$4,topUp:topUp$4,ads:ads$4,adsOn:adsOn$4,adsOff:adsOff$4,level:level$4,toLevelUp:toLevelUp$4,xpCounter:xpCounter$4,lootBox:lootBox$4,forLevel:forLevel$4,unopenedLootBox:unopenedLootBox$4,inventory:inventory$4,inventoryDescription:inventoryDescription$4,inventoryDescriptionEmpty:inventoryDescriptionEmpty$4,inventoryDescriptionEmptyButton:inventoryDescriptionEmptyButton$4,emptyBox:emptyBox$4,openItem:openItem$4,reward_type:reward_type$4,dates:dates$4,confirmIframe:confirmIframe$4,months:months$4,box_open:box_open$4,common:common$4,snackbar:snackbar$4,purchaseAdsFreeModal:purchaseAdsFreeModal$4,levelInfoModal:levelInfoModal$4,topUpModal:topUpModal$4,inventoryModal:inventoryModal$4},balance$3="Saldo",topUp$3="Recargar",ads$3="Anuncios",adsOn$3="On",adsOff$3="Off",level$3="Nivel",toLevelUp$3="para subir de nivel",xpCounter$3="/ {{total}} XP",lootBox$3="Caja de botín",forLevel$3="para el nivel {{level}}",unopenedLootBox$3="Caja de botín sin abrir",inventory$3="Inventario",inventoryDescription$3="Aqui puedes encontrar todas tus cajas de botin sin abrir. Toca la imagen para probar tu suerte: puedes encontrar USDT, monedas u otra caja dentro.",inventoryDescriptionEmpty$3="Las cajas de botin sin abrir se guardaran aqui. Dentro de cada una puedes encontrar USDT, monedas u otra caja de botin. Mejores recompensas segun la rareza de la caja.",inventoryDescriptionEmptyButton$3="Aun no tienes cajas de botin, <br/> pero puedes comprar una",emptyBox$3="Caja vacía",openItem$3="Abrir objeto",reward_type$3={coins:"{{count}} moneda",coins_one:"{{count}} moneda",coins_few:"{{count}} monedas",coins_many:"{{count}} monedas",usdt_no_amount:"USDT",coins_no_amount:"Monedas",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} gema",gems_one:"{{count}} gema",gems_few:"{{count}} gemas",gems_many:"{{count}} gemas",gems_no_amount:"Gemas",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Doble saldo",box:"CAJA DE BOTÍN",box_common:"BÁSICA",box_rare:"RARA",box_epic:"ÉPICA",box_legend:"LEGENDARIA"},dates$3={today:"Hoy",yesterday:"Ayer"},confirmIframe$3={pay:"Pagar",cancel:"Cancelar"},months$3={january:"Ene",february:"Feb",march:"Mar",april:"Abr",may:"May",june:"Jun",july:"Jul",august:"Ago",september:"Sep",october:"Oct",november:"Nov",december:"Dic"},box_open$3={skip:"Omitir",you_ve_got:"Obtuviste",button_reveal_reward:"Revelar recompensa",button_open_now:"Abrir ahora",button_save_inventory:"Guardar en inventario",button_unopened_boxes:"Inventario",recent_rewards:"Recientes",later_open_later_inventory:"Puedes abrirla más tarde en el inventario"},common$3={error:"¡Ups! Algo salió mal. Inténtalo de nuevo más tarde.",continue:"Continuar",ok:"OK",timeAgo:{sec_zero:"hace {{count}} segundos",sec_one:"hace {{count}} segundo",sec_two:"hace {{count}} segundos",sec_few:"hace {{count}} segundos",sec_many:"hace {{count}} segundos",sec_other:"hace {{count}} segundos",now:"Justo ahora",min_zero:"hace {{count}} minutos",min_one:"hace {{count}} minuto",min_two:"hace {{count}} minutos",min_few:"hace {{count}} minutos",min_many:"hace {{count}} minutos",min_other:"hace {{count}} minutos",h_zero:"hace {{count}} horas",h_one:"hace {{count}} hora",h_two:"hace {{count}} horas",h_few:"hace {{count}} horas",h_many:"hace {{count}} horas",h_other:"hace {{count}} horas",d_zero:"hace {{count}} días",d_one:"hace {{count}} día",d_two:"hace {{count}} días",d_few:"hace {{count}} días",d_many:"hace {{count}} días",d_other:"hace {{count}} días"}},snackbar$3={purchase:{blackHolePurchaseChest:"Compra",blackHolePurchaseLevel:"Compra",blackHolePurchaseAutoBurn:"Compra",walletPurchaseGems:"Compra",blackHoleBurnCoins:"Quemado",error:"No se pudo realizar la compra"},receiving:{claimedTask:"Recibido"}},purchaseAdsFreeModal$3={title:"Eliminar anuncios",disableAllInterruptions:"Desactiva todas las interrupciones en los juegos con una suscripción mensual recurrente. No te preocupes, ¡también tendrás la opción de activar los anuncios cuando quieras!",noInterruptionsInGames:"Sin interrupciones en los juegos con una suscripción recurrente.",activeRecurring:"Pagos recurrentes activos a {{price}}",aMonth:" al mes.",nextPayment:"Próximo pago {{date}}",activeUntil:"Activo hasta {{date}}",subscriptionPaused:"La suscripción está en pausa",resumeSubscription:"Reanudar suscripción",cancelSubscription:"Cancelar suscripción",continue:"Continuar",month:"{{price}} / mes",errorCancelSubscription:"No se pudo cancelar la suscripción. Inténtalo de nuevo"},levelInfoModal$3={title:"Tu nivel",description:"Gana experiencia jugando. Al subir de nivel obtienes cajas de botín, que pueden contener USDT, monedas o mejores cajas. Compite con otros jugadores para ganar USDT real cada semana.",action:"Entendido"},topUpModal$3={balance:"Saldo",topUpBalance:"Recargar gemas",coins:"monedas",gems:"gemas",topUp:"Recargar"},inventoryModal$3={title:"Inventario",description:"Es tu espacio de almacenamiento personal para todas las cajas de botín sin abrir. Toca cada imagen para revelar la recompensa dentro."},es={balance:balance$3,topUp:topUp$3,ads:ads$3,adsOn:adsOn$3,adsOff:adsOff$3,level:level$3,toLevelUp:toLevelUp$3,xpCounter:xpCounter$3,lootBox:lootBox$3,forLevel:forLevel$3,unopenedLootBox:unopenedLootBox$3,inventory:inventory$3,inventoryDescription:inventoryDescription$3,inventoryDescriptionEmpty:inventoryDescriptionEmpty$3,inventoryDescriptionEmptyButton:inventoryDescriptionEmptyButton$3,emptyBox:emptyBox$3,openItem:openItem$3,reward_type:reward_type$3,dates:dates$3,confirmIframe:confirmIframe$3,months:months$3,box_open:box_open$3,common:common$3,snackbar:snackbar$3,purchaseAdsFreeModal:purchaseAdsFreeModal$3,levelInfoModal:levelInfoModal$3,topUpModal:topUpModal$3,inventoryModal:inventoryModal$3},balance$2="बैलेंस",topUp$2="रिचार्ज",ads$2="विज्ञापन",adsOn$2="चालू",adsOff$2="बंद",level$2="स्तर",toLevelUp$2="लेवल अप तक",xpCounter$2="/ {{total}} XP",lootBox$2="लूट बॉक्स",forLevel$2="स्तर {{level}} के लिए",unopenedLootBox$2="बिना खोले गए लूट बॉक्स",inventory$2="इन्वेंटरी",inventoryDescription$2="यहां आपके सभी बिना खुले लूट बॉक्स मिलेंगे। इनाम पाने के लिए इमेज पर टैप करें: अंदर USDT, कॉइन्स या कोई दूसरा बॉक्स हो सकता है!",inventoryDescriptionEmpty$2="बिना खुले लूट बॉक्स यहां रखे जाएंगे। हर बॉक्स के अंदर USDT, कॉइन्स या कोई दूसरा लूट बॉक्स मिल सकता है। बॉक्स की रेयरिटी के आधार पर बेहतर इनाम मिलता है!",inventoryDescriptionEmptyButton$2="आपके पास अभी लूट बॉक्स नहीं हैं, <br/> लेकिन आप एक खरीद सकते हैं",emptyBox$2="खाली बॉक्स",openItem$2="आइटम खोलें",reward_type$2={coins:"{{count}} सिक्के",coins_one:"{{count}} सिक्का",coins_few:"{{count}} सिक्के",coins_many:"{{count}} सिक्के",coins_no_amount:"सिक्के",usdt_no_amount:"USDT",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} जेम",gems_one:"{{count}} जेम",gems_few:"{{count}} जेम्स",gems_many:"{{count}} जेम्स",gems_no_amount:"जेम्स",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"टेलीग्राम प्रीमियम",double_balance:"दोगुनी शेष राशि",box:"लूट बॉक्स",box_common:"बुनियादी",box_rare:"दुर्लभ",box_epic:"महाकाव्य",box_legend:"दंतकथा"},dates$2={today:"आज",yesterday:"कल"},confirmIframe$2={pay:"भुगतान करें",cancel:"रद्द करें"},months$2={january:"जन",february:"फ़र",march:"मार्च",april:"अप्रै",may:"मई",june:"जून",july:"जुला",august:"अग",september:"सितं",october:"अक्टू",november:"नवं",december:"दिसं"},box_open$2={skip:"छोड़ें",you_ve_got:"आपको मिला",button_reveal_reward:"पुरस्कार प्रकट करें",button_open_now:"अभी खोलें",button_save_inventory:"इन्वेंटरी में सहेजें",button_unopened_boxes:"अनपेट लूट बॉक्स",recent_rewards:"हाल के पुरस्कार",later_open_later_inventory:"आप इसे बाद में इन्वेंटरी में खोल सकते हैं"},common$2={error:"उफ़! कुछ गलत हो गया। कृपया बाद में फिर प्रयास करें।",continue:"जारी रखें",ok:"ठीक है",timeAgo:{sec_zero:"{{count}} सेकंड पहले",sec_one:"{{count}} सेकंड पहले",sec_two:"{{count}} सेकंड पहले",sec_few:"{{count}} सेकंड पहले",sec_many:"{{count}} सेकंड पहले",sec_other:"{{count}} सेकंड पहले",now:"अभी",min_zero:"{{count}} मिनट पहले",min_one:"{{count}} मिनट पहले",min_two:"{{count}} मिनट पहले",min_few:"{{count}} मिनट पहले",min_many:"{{count}} मिनट पहले",min_other:"{{count}} मिनट पहले",h_zero:"{{count}} घंटे पहले",h_one:"{{count}} घंटा पहले",h_two:"{{count}} घंटे पहले",h_few:"{{count}} घंटे पहले",h_many:"{{count}} घंटे पहले",h_other:"{{count}} घंटे पहले",d_zero:"{{count}} दिन पहले",d_one:"{{count}} दिन पहले",d_two:"{{count}} दिन पहले",d_few:"{{count}} दिन पहले",d_many:"{{count}} दिन पहले",d_other:"{{count}} दिन पहले"}},snackbar$2={purchase:{blackHolePurchaseChest:"खरीद",blackHolePurchaseLevel:"खरीद",blackHolePurchaseAutoBurn:"खरीद",walletPurchaseGems:"खरीद",blackHoleBurnCoins:"जलाया गया",error:"खरीदारी विफल रही"},receiving:{claimedTask:"प्राप्त"}},purchaseAdsFreeModal$2={title:"विज्ञापन हटाएँ",disableAllInterruptions:"मासिक आवर्ती सदस्यता के साथ खेलों में सभी बाधाएँ बंद करें। चिंता न करें, आप चाहें तो किसी भी समय विज्ञापन फिर से चालू कर सकते हैं!",noInterruptionsInGames:"आवर्ती सदस्यता के साथ खेलों में कोई व्यवधान नहीं।",activeRecurring:"सक्रिय आवर्ती भुगतान {{price}} पर",aMonth:" प्रति माह.",nextPayment:"अगला भुगतान {{date}}",activeUntil:"{{date}} तक सक्रिय",subscriptionPaused:"सदस्यता रोकी गई है",resumeSubscription:"सदस्यता फिर शुरू करें",cancelSubscription:"सदस्यता रद्द करें",continue:"जारी रखें",month:"{{price}} / माह",errorCancelSubscription:"सदस्यता रद्द नहीं हो सकी। कृपया पुनः प्रयास करें"},levelInfoModal$2={title:"आपका स्तर",description:"गेम खेलकर अनुभव अर्जित करें। लेवल बढ़ाने पर आपको लूट बॉक्स मिलते हैं जिनमें USDT, कॉइन्स या बेहतर लूट बॉक्स हो सकते हैं। हर सप्ताह वास्तविक USDT जीतने के लिए अन्य खिलाड़ियों से प्रतिस्पर्धा करें।",action:"समझ गया"},topUpModal$2={balance:"बैलेंस",topUpBalance:"जेम्स रिचार्ज करें",coins:"कॉइन्स",gems:"जेम्स",topUp:"रिचार्ज"},inventoryModal$2={title:"इन्वेंटरी",description:"यह आपके सभी बिना खुले लूट बॉक्स के लिए आपका व्यक्तिगत स्टोरेज स्पेस है। अंदर का इनाम प्रकट करने के लिए हर छवि पर टैप करें!"},hi={balance:balance$2,topUp:topUp$2,ads:ads$2,adsOn:adsOn$2,adsOff:adsOff$2,level:level$2,toLevelUp:toLevelUp$2,xpCounter:xpCounter$2,lootBox:lootBox$2,forLevel:forLevel$2,unopenedLootBox:unopenedLootBox$2,inventory:inventory$2,inventoryDescription:inventoryDescription$2,inventoryDescriptionEmpty:inventoryDescriptionEmpty$2,inventoryDescriptionEmptyButton:inventoryDescriptionEmptyButton$2,emptyBox:emptyBox$2,openItem:openItem$2,reward_type:reward_type$2,dates:dates$2,confirmIframe:confirmIframe$2,months:months$2,box_open:box_open$2,common:common$2,snackbar:snackbar$2,purchaseAdsFreeModal:purchaseAdsFreeModal$2,levelInfoModal:levelInfoModal$2,topUpModal:topUpModal$2,inventoryModal:inventoryModal$2},balance$1="Saldo",topUp$1="Recarregar",ads$1="Anúncios",adsOn$1="On",adsOff$1="Off",level$1="Nível",toLevelUp$1="para subir de nível",xpCounter$1="/ {{total}} XP",lootBox$1="Caixa de loot",forLevel$1="para o nível {{level}}",unopenedLootBox$1="Caixa de Loot Não Aberta",inventory$1="Inventário",inventoryDescription$1="Aqui voce encontra todas as suas caixas de loot nao abertas. Toque na imagem para tentar a sorte: voce pode encontrar USDT, moedas ou outra caixa dentro.",inventoryDescriptionEmpty$1="As caixas de loot nao abertas ficarao aqui. Dentro de cada uma voce pode encontrar USDT, moedas ou outra caixa de loot. Recompensas melhores conforme a raridade da caixa.",inventoryDescriptionEmptyButton$1="Voce ainda nao tem caixas de loot, <br/> mas pode comprar uma",emptyBox$1="Caixa vazia",openItem$1="Abrir item",reward_type$1={coins:"{{count}} moeda",coins_one:"{{count}} moeda",coins_few:"{{count}} moedas",coins_many:"{{count}} moedas",usdt_no_amount:"USDT",coins_no_amount:"Moedas",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} gema",gems_one:"{{count}} gema",gems_few:"{{count}} gemas",gems_many:"{{count}} gemas",gems_no_amount:"Gemas",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Saldo Duplo",box:"CAIXA DE LOOT",box_common:"BÁSICA",box_rare:"RARA",box_epic:"ÉPICA",box_legend:"LENDÁRIA"},dates$1={today:"Hoje",yesterday:"Ontem"},confirmIframe$1={pay:"Pagar",cancel:"Cancelar"},months$1={january:"Jan",february:"Fev",march:"Mar",april:"Abr",may:"Mai",june:"Jun",july:"Jul",august:"Ago",september:"Set",october:"Out",november:"Nov",december:"Dez"},box_open$1={skip:"Pular",you_ve_got:"Você recebeu",button_reveal_reward:"Revelar Recompensa",button_open_now:"Abrir Agora",button_save_inventory:"Salvar no Inventário",button_unopened_boxes:"Inventário",recent_rewards:"Recentes",later_open_later_inventory:"Você pode abrir mais tarde no inventário"},common$1={error:"Ops! Algo deu errado. Tente novamente mais tarde.",continue:"Continuar",ok:"OK",timeAgo:{sec_zero:"há {{count}} segundos",sec_one:"há {{count}} segundo",sec_two:"há {{count}} segundos",sec_few:"há {{count}} segundos",sec_many:"há {{count}} segundos",sec_other:"há {{count}} segundos",now:"Agora mesmo",min_zero:"há {{count}} minutos",min_one:"há {{count}} minuto",min_two:"há {{count}} minutos",min_few:"há {{count}} minutos",min_many:"há {{count}} minutos",min_other:"há {{count}} minutos",h_zero:"há {{count}} horas",h_one:"há {{count}} hora",h_two:"há {{count}} horas",h_few:"há {{count}} horas",h_many:"há {{count}} horas",h_other:"há {{count}} horas",d_zero:"há {{count}} dias",d_one:"há {{count}} dia",d_two:"há {{count}} dias",d_few:"há {{count}} dias",d_many:"há {{count}} dias",d_other:"há {{count}} dias"}},snackbar$1={purchase:{blackHolePurchaseChest:"Compra",blackHolePurchaseLevel:"Compra",blackHolePurchaseAutoBurn:"Compra",walletPurchaseGems:"Compra",blackHoleBurnCoins:"Queimado",error:"Falha ao realizar a compra"},receiving:{claimedTask:"Recebido"}},purchaseAdsFreeModal$1={title:"Remover anúncios",disableAllInterruptions:"Desative todas as interrupções nos jogos com uma assinatura mensal recorrente. Sem preocupações, você também poderá ligar os anúncios quando quiser!",noInterruptionsInGames:"Sem interrupções nos jogos com uma assinatura recorrente.",activeRecurring:"Pagamentos recorrentes ativos em {{price}}",aMonth:" por mês.",nextPayment:"Próximo pagamento {{date}}",activeUntil:"Ativo até {{date}}",subscriptionPaused:"A assinatura está em pausa",resumeSubscription:"Retomar assinatura",cancelSubscription:"Cancelar assinatura",continue:"Continuar",month:"{{price}} / mês",errorCancelSubscription:"Falha ao cancelar a assinatura. Tente novamente"},levelInfoModal$1={title:"Seu nível",description:"Ganhe experiência jogando. Ao subir de nível você recebe caixas de loot, que podem conter USDT, moedas ou caixas melhores. Compita com outros jogadores para ganhar USDT real toda semana.",action:"Entendi"},topUpModal$1={balance:"Saldo",topUpBalance:"Recarregar gemas",coins:"moedas",gems:"gemas",topUp:"Recarregar"},inventoryModal$1={title:"Inventário",description:"É o seu espaço pessoal de armazenamento para todas as caixas de loot não abertas. Toque em cada imagem para revelar a recompensa dentro!"},pt={balance:balance$1,topUp:topUp$1,ads:ads$1,adsOn:adsOn$1,adsOff:adsOff$1,level:level$1,toLevelUp:toLevelUp$1,xpCounter:xpCounter$1,lootBox:lootBox$1,forLevel:forLevel$1,unopenedLootBox:unopenedLootBox$1,inventory:inventory$1,inventoryDescription:inventoryDescription$1,inventoryDescriptionEmpty:inventoryDescriptionEmpty$1,inventoryDescriptionEmptyButton:inventoryDescriptionEmptyButton$1,emptyBox:emptyBox$1,openItem:openItem$1,reward_type:reward_type$1,dates:dates$1,confirmIframe:confirmIframe$1,months:months$1,box_open:box_open$1,common:common$1,snackbar:snackbar$1,purchaseAdsFreeModal:purchaseAdsFreeModal$1,levelInfoModal:levelInfoModal$1,topUpModal:topUpModal$1,inventoryModal:inventoryModal$1},balance="Баланс",topUp="Пополнить",ads="Реклама",adsOn="Вкл.",adsOff="Выкл.",level="Уровень",toLevelUp="до повышения уровня",xpCounter="/ {{total}} XP",lootBox="Лутбокс",forLevel="для уровня {{level}}",unopenedLootBox="Неоткрытый лутбокс",inventory="Инвентарь",inventoryDescription="Здесь находятся все ваши неоткрытые лутбоксы. Нажмите на изображение, чтобы испытать удачу: внутри может быть USDT, монеты или другой бокс!",inventoryDescriptionEmpty="Неоткрытые лутбоксы будут храниться здесь. Внутри каждого из них могут быть USDT, монеты или другой лутбокс. Чем выше редкость бокса, тем лучше награда!",inventoryDescriptionEmptyButton="У вас пока нет лутбоксов, <br/> но вы можете купить один",emptyBox="Пустой бокс",openItem="Открыть предмет",reward_type={coins:"{{count}} монета",coins_one:"{{count}} монета",coins_few:"{{count}} монеты",coins_many:"{{count}} монет",usdt_no_amount:"USDT",coins_no_amount:"Монеты",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} алмаз",gems_one:"{{count}} алмаз",gems_few:"{{count}} алмаза",gems_many:"{{count}} алмазов",gems_no_amount:"Алмазы",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Телеграм Премиум",double_balance:"Двойной баланс",box:"ЛУТ БОКС",box_common:"ОБЫЧНЫЙ",box_rare:"РЕДКИЙ",box_epic:"ЭПИК",box_legend:"ЛЕГЕНДАРНЫЙ"},dates={today:"Сегодня",yesterday:"Вчера"},confirmIframe={pay:"Оплатить",cancel:"Отменить"},months={january:"янв",february:"фев",march:"мар",april:"апр",may:"май",june:"июн",july:"июл",august:"авг",september:"сен",october:"окт",november:"ноя",december:"дек"},box_open={skip:"Пропустить",you_ve_got:"Получено",button_reveal_reward:"Узнать награду",button_open_now:"Открыть",button_save_inventory:"Оставить в инвентаре",button_unopened_boxes:"Неоткрытые лутбоксы",recent_rewards:"Недавние",later_open_later_inventory:"Можно открыть его позже в инвентаре"},common={error:"Упс! Что-то пошло не так. Попробуй позже.",continue:"Продолжить",ok:"OK",timeAgo:{sec_zero:"{{count}} секунд назад",sec_one:"{{count}} секунду назад",sec_two:"{{count}} секунды назад",sec_few:"{{count}} секунды назад",sec_many:"{{count}} секунд назад",sec_other:"{{count}} секунд назад",now:"Только что",min_zero:"{{count}} минут назад",min_one:"{{count}} минуту назад",min_two:"{{count}} минуты назад",min_few:"{{count}} минуты назад",min_many:"{{count}} минут назад",min_other:"{{count}} минут назад",h_zero:"{{count}} часов назад",h_one:"{{count}} час назад",h_two:"{{count}} часа назад",h_few:"{{count}} часа назад",h_many:"{{count}} часов назад",h_other:"{{count}} часов назад",d_zero:"{{count}} дней назад",d_one:"{{count}} день назад",d_two:"{{count}} дня назад",d_few:"{{count}} дня назад",d_many:"{{count}} дней назад",d_other:"{{count}} дней назад"}},snackbar={purchase:{blackHolePurchaseChest:"Покупка",blackHolePurchaseLevel:"Покупка",blackHolePurchaseAutoBurn:"Покупка",walletPurchaseGems:"Покупка",blackHoleBurnCoins:"Сожжено",error:"Не удалось совершить покупку"},receiving:{claimedTask:"Получено"}},purchaseAdsFreeModal={title:"Удалить рекламу",disableAllInterruptions:"Отключите все прерывания в играх с ежемесячной подпиской. Не волнуйтесь, при желании вы всегда сможете снова включить рекламу!",noInterruptionsInGames:"Без прерываний в играх при оформленной подписке.",activeRecurring:"Активные регулярные платежи по цене {{price}}",aMonth:" в месяц.",nextPayment:"Следующий платеж {{date}}",activeUntil:"Активна до {{date}}",subscriptionPaused:"Подписка приостановлена",resumeSubscription:"Возобновить подписку",cancelSubscription:"Отменить подписку",continue:"Продолжить",month:"{{price}} / месяц",errorCancelSubscription:"Не удалось отменить подписку. Пожалуйста, попробуйте еще раз"},levelInfoModal={title:"Ваш уровень",description:"Получайте опыт, играя в игры. За повышение уровня вы получаете лутбоксы, в которых могут быть USDT, монеты или более ценные лутбоксы. Соревнуйтесь с другими игроками, чтобы выигрывать реальные USDT каждую неделю.",action:"Понял"},topUpModal={balance:"Баланс",topUpBalance:"Пополнить баланс",coins:"монет",gems:"алмазов",topUp:"Пополнить"},inventoryModal={title:"Инвентарь",description:"Это твоё персональное хранилище для неоткрытых лутбоксов. Нажми на каждый, чтобы узнать, какая внутри награда!"},ru={balance,topUp,ads,adsOn,adsOff,level,toLevelUp,xpCounter,lootBox,forLevel,unopenedLootBox,inventory,inventoryDescription,inventoryDescriptionEmpty,inventoryDescriptionEmptyButton,emptyBox,openItem,reward_type,dates,confirmIframe,months,box_open,common,snackbar,purchaseAdsFreeModal,levelInfoModal,topUpModal,inventoryModal};var define_process_env_default$2={NODE_ENV:"production",version:"1.94.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const resources={en:{translation:en},ru:{translation:ru},hi:{translation:hi},es:{translation:es},pt:{translation:pt}};instance.use(initReactI18next).init({resources,fallbackLng:"en",supportedLngs:supportedLanguages,debug:define_process_env_default$2.NODE_ENV==="development",interpolation:{escapeValue:!1}});const translationsTyped=(o,l)=>instance.t(o,l),PROVIDER_COLORS={Orbit:"#3b82f6",TMA:"#22c55e",Monetag:"#f97316",Adsgram:"#a855f7",Gigapub:"#14b8a6",Banner:"#ec4899",SDK:"#6366f1"},ADS_BADGE_STYLE="background:#1e293b;color:#38bdf8;padding:2px 6px;border-radius:3px;font-weight:bold";function getProviderStyle(o){return`background:${PROVIDER_COLORS[o]||"#94a3b8"};color:#fff;padding:2px 6px;border-radius:3px;font-weight:bold`}function formatTimestamp(){return`${(performance.now()/1e3).toFixed(2)}s`}function makeFlowId(){return Math.random().toString(36).slice(2,6)}function createAdLogger(o){const l=getProviderStyle(o);function u(d,f,h,m){const g=d==="warn"?"color:#f59e0b;font-weight:bold":d==="error"?"color:#ef4444;font-weight:bold":"color:inherit",v=d==="info"?console.log:d==="warn"?console.warn:console.error,x=`%c ADS %c ${o} %c ${m}${f} [${formatTimestamp()}]`;h!==void 0?v(x,ADS_BADGE_STYLE,l,g,h):v(x,ADS_BADGE_STYLE,l,g)}return{info(d,f){u("info",d,f,"")},warn(d,f){u("warn",d,f,"")},error(d,f){u("error",d,f,"")},flow(d){const f=makeFlowId(),h=`${d}#${f}`,m=`[${h}] `,g=performance.now();let v=!1;return u("info","started",void 0,m),{tag:h,info(x,b){v||u("info",x,b,m)},warn(x,b){v||u("warn",x,b,m)},error(x,b){v||u("error",x,b,m)},end(x){if(v)return;v=!0;const b=Math.round(performance.now()-g),S=(x==null?void 0:x.status)??"ok";u(S==="fail"?"warn":"info",`${S} — ${b}ms`,x==null?void 0:x.data,m)}}}}}const log$5=createAdLogger("Banner");class BannerManager{constructor(l){this.containerId=(l==null?void 0:l.containerId)||"overlay-banner-bottom",this.bannerHeight=(l==null?void 0:l.height)||60,this.animationDuration=(l==null?void 0:l.animationDuration)||300}async checkBannerPermission(l){try{const u=await l();return u.ads_free?(log$5.info("Banner disabled: user has ads_free flag"),!1):Array.isArray(u==null?void 0:u.audiences)&&u.audiences.includes("banner_test")?!0:(log$5.info("Banner test flag not found in user profile audiences"),!1)}catch(u){return log$5.error("Error checking banner permission",u),!1}}async setBanner(l,u){try{if(!await this.checkBannerPermission(u))return;const f=document.getElementById(this.containerId);if(!f){log$5.warn(`Banner container with id "${this.containerId}" not found`);return}f.classList.remove("cssdk-banner-hide"),typeof l=="string"?f.innerHTML=l:(f.innerHTML="",f.appendChild(l)),document.documentElement.style.setProperty("--banner-bottom-height",`${this.bannerHeight}px`),requestAnimationFrame(()=>{f.classList.add("cssdk-banner-show")})}catch(d){log$5.error("setBanner error",d)}}createDefaultContent(){return`
135
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k(Q,K){if(Q){if(typeof Q=="string")return I(Q,K);var $=Object.prototype.toString.call(Q).slice(8,-1);if($==="Object"&&Q.constructor&&($=Q.constructor.name),$==="Map"||$==="Set")return Array.from(Q);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return I(Q,K)}}function I(Q,K){(K==null||K>Q.length)&&(K=Q.length);for(var $=0,G=new Array(K);$<K;$++)G[$]=Q[$];return G}function O(Q,K){var $=Q==null?null:typeof Symbol<"u"&&Q[Symbol.iterator]||Q["@@iterator"];if($!=null){var G,L,B,q,U=[],Y=!0,te=!1;try{if(B=($=$.call(Q)).next,K!==0)for(;!(Y=(G=B.call($)).done)&&(U.push(G.value),U.length!==K);Y=!0);}catch(ae){te=!0,L=ae}finally{try{if(!Y&&$.return!=null&&(q=$.return(),Object(q)!==q))return}finally{if(te)throw L}}return U}}function j(Q){if(Array.isArray(Q))return Q}function N(Q,K){if(!(Q instanceof K))throw new TypeError("Cannot call a class as a function")}function V(Q,K){for(var $=0;$<K.length;$++){var G=K[$];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(Q,X(G.key),G)}}function z(Q,K,$){return V(Q.prototype,K),Object.defineProperty(Q,"prototype",{writable:!1}),Q}function W(Q,K,$){return K=X(K),K in Q?Object.defineProperty(Q,K,{value:$,enumerable:!0,configurable:!0,writable:!0}):Q[K]=$,Q}function X(Q){var K=ie(Q,"string");return x(K)==="symbol"?K:String(K)}function ie(Q,K){if(x(Q)!=="object"||Q===null)return Q;var $=Q[Symbol.toPrimitive];if($!==void 0){var G=$.call(Q,K||"default");if(x(G)!=="object")return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return(K==="string"?String:Number)(Q)}var oe=function(){function Q(){var K=this;N(this,Q),W(this,"reset",function(){K.isInitialized=!1,K._testMode=!1,K._currentMeasurementId,K._hasLoadedGA=!1,K._isQueuing=!1,K._queueGtag=[]}),W(this,"_gtag",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];K._testMode||K._isQueuing?K._queueGtag.push(G):l.default.apply(void 0,G)}),W(this,"_loadGA",function($,G){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!K._hasLoadedGA){var B=document.createElement("script");B.async=!0,B.src="".concat(L,"?id=").concat($),G&&B.setAttribute("nonce",G),document.body.appendChild(B),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},K._hasLoadedGA=!0}}),W(this,"_toGtagOptions",function($){if($){var G={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},L=Object.entries($).reduce(function(B,q){var U=M(q,2),Y=U[0],te=U[1];return G[Y]?B[G[Y]]=te:B[Y]=te,B},{});return L}}),W(this,"initialize",function($){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!$)throw new Error("Require GA_MEASUREMENT_ID");var L=typeof $=="string"?[{trackingId:$}]:$;K._currentMeasurementId=L[0].trackingId;var B=G.gaOptions,q=G.gtagOptions,U=G.nonce,Y=G.testMode,te=Y===void 0?!1:Y,ae=G.gtagUrl;if(K._testMode=te,te||K._loadGA(K._currentMeasurementId,U,ae),K.isInitialized||(K._gtag("js",new Date),L.forEach(function(fe){var ee=C(C(C({},K._toGtagOptions(C(C({},B),fe.gaOptions))),q),fe.gtagOptions);Object.keys(ee).length?K._gtag("config",fe.trackingId,ee):K._gtag("config",fe.trackingId)})),K.isInitialized=!0,!te){var ue=b(K._queueGtag);for(K._queueGtag=[],K._isQueuing=!1;ue.length;){var ve=ue.shift();K._gtag.apply(K,b(ve)),ve[0]==="get"&&(K._isQueuing=!0)}}}),W(this,"set",function($){if(!$){console.warn("`fieldsObject` is required in .set()");return}if(x($)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys($).length===0&&console.warn("empty `fieldsObject` given to .set()"),K._gaCommand("set",$)}),W(this,"_gaCommandSendEvent",function($,G,L,B,q){K._gtag("event",G,C(C({event_category:$,event_label:L,value:B},q&&{non_interaction:q.nonInteraction}),K._toGtagOptions(q)))}),W(this,"_gaCommandSendEventParameters",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];if(typeof G[0]=="string")K._gaCommandSendEvent.apply(K,b(G.slice(1)));else{var B=G[0],q=B.eventCategory,U=B.eventAction,Y=B.eventLabel,te=B.eventValue;B.hitType;var ae=g(B,d);K._gaCommandSendEvent(q,U,Y,te,ae)}}),W(this,"_gaCommandSendTiming",function($,G,L,B){K._gtag("event","timing_complete",{name:G,value:L,event_category:$,event_label:B})}),W(this,"_gaCommandSendPageview",function($,G){if(G&&Object.keys(G).length){var L=K._toGtagOptions(G),B=L.title,q=L.location,U=g(L,f);K._gtag("event","page_view",C(C(C(C({},$&&{page_path:$}),B&&{page_title:B}),q&&{page_location:q}),U))}else $?K._gtag("event","page_view",{page_path:$}):K._gtag("event","page_view")}),W(this,"_gaCommandSendPageviewParameters",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];if(typeof G[0]=="string")K._gaCommandSendPageview.apply(K,b(G.slice(1)));else{var B=G[0],q=B.page;B.hitType;var U=g(B,h);K._gaCommandSendPageview(q,U)}}),W(this,"_gaCommandSend",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];var B=typeof G[0]=="string"?G[0]:G[0].hitType;switch(B){case"event":K._gaCommandSendEventParameters.apply(K,G);break;case"pageview":K._gaCommandSendPageviewParameters.apply(K,G);break;case"timing":K._gaCommandSendTiming.apply(K,b(G.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(B));break;default:console.warn("Send command doesn't exist: ".concat(B))}}),W(this,"_gaCommandSet",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];typeof G[0]=="string"&&(G[0]=W({},G[0],G[1])),K._gtag("set",K._toGtagOptions(G[0]))}),W(this,"_gaCommand",function($){for(var G=arguments.length,L=new Array(G>1?G-1:0),B=1;B<G;B++)L[B-1]=arguments[B];switch($){case"send":K._gaCommandSend.apply(K,L);break;case"set":K._gaCommandSet.apply(K,L);break;default:console.warn("Command doesn't exist: ".concat($))}}),W(this,"ga",function(){for(var $=arguments.length,G=new Array($),L=0;L<$;L++)G[L]=arguments[L];if(typeof G[0]=="string")K._gaCommand.apply(K,G);else{var B=G[0];K._gtag("get",K._currentMeasurementId,"client_id",function(q){K._isQueuing=!1;var U=K._queueGtag;for(B({get:function(ae){return ae==="clientId"?q:ae==="trackingId"?K._currentMeasurementId:ae==="apiVersion"?"1":void 0}});U.length;){var Y=U.shift();K._gtag.apply(K,b(Y))}}),K._isQueuing=!0}return K.ga}),W(this,"event",function($,G){if(typeof $=="string")K._gtag("event",$,K._toGtagOptions(G));else{var L=$.action,B=$.category,q=$.label,U=$.value,Y=$.nonInteraction,te=$.transport;if(!B||!L){console.warn("args.category AND args.action are required in event()");return}var ae={hitType:"event",eventCategory:(0,u.default)(B),eventAction:(0,u.default)(L)};q&&(ae.eventLabel=(0,u.default)(q)),typeof U<"u"&&(typeof U!="number"?console.warn("Expected `args.value` arg to be a Number."):ae.eventValue=U),typeof Y<"u"&&(typeof Y!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):ae.nonInteraction=Y),typeof te<"u"&&(typeof te!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(te)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),ae.transport=te)),K._gaCommand("send",ae)}}),W(this,"send",function($){K._gaCommand("send",$)}),this.reset()}return z(Q,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),Q}();o.GA4=oe;var le=new oe;o.default=le}(ga4)),ga4}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(o){function l(g){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},l(g)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=o.ReactGAImplementation=void 0;var u=f(requireGa4());function d(g){if(typeof WeakMap!="function")return null;var v=new WeakMap,x=new WeakMap;return(d=function(S){return S?x:v})(g)}function f(g,v){if(g&&g.__esModule)return g;if(g===null||l(g)!=="object"&&typeof g!="function")return{default:g};var x=d(v);if(x&&x.has(g))return x.get(g);var b={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var E in g)if(E!=="default"&&Object.prototype.hasOwnProperty.call(g,E)){var w=S?Object.getOwnPropertyDescriptor(g,E):null;w&&(w.get||w.set)?Object.defineProperty(b,E,w):b[E]=g[E]}return b.default=g,x&&x.set(g,b),b}var h=u.GA4;o.ReactGAImplementation=h;var m=u.default;o.default=m}(dist)),dist}var distExports=requireDist();const ReactGA=getDefaultExportFromCjs$1(distExports),isString=o=>typeof o=="string",defer=()=>{let o,l;const u=new Promise((d,f)=>{o=d,l=f});return u.resolve=o,u.reject=l,u},makeString=o=>o==null?"":""+o,copy=(o,l,u)=>{o.forEach(d=>{l[d]&&(u[d]=l[d])})},lastOfPathSeparatorRegExp=/###/g,cleanKey=o=>o&&o.indexOf("###")>-1?o.replace(lastOfPathSeparatorRegExp,"."):o,canNotTraverseDeeper=o=>!o||isString(o),getLastOfPath=(o,l,u)=>{const d=isString(l)?l.split("."):l;let f=0;for(;f<d.length-1;){if(canNotTraverseDeeper(o))return{};const h=cleanKey(d[f]);!o[h]&&u&&(o[h]=new u),Object.prototype.hasOwnProperty.call(o,h)?o=o[h]:o={},++f}return canNotTraverseDeeper(o)?{}:{obj:o,k:cleanKey(d[f])}},setPath=(o,l,u)=>{const{obj:d,k:f}=getLastOfPath(o,l,Object);if(d!==void 0||l.length===1){d[f]=u;return}let h=l[l.length-1],m=l.slice(0,l.length-1),g=getLastOfPath(o,m,Object);for(;g.obj===void 0&&m.length;)h=`${m[m.length-1]}.${h}`,m=m.slice(0,m.length-1),g=getLastOfPath(o,m,Object),g!=null&&g.obj&&typeof g.obj[`${g.k}.${h}`]<"u"&&(g.obj=void 0);g.obj[`${g.k}.${h}`]=u},pushPath=(o,l,u,d)=>{const{obj:f,k:h}=getLastOfPath(o,l,Object);f[h]=f[h]||[],f[h].push(u)},getPath=(o,l)=>{const{obj:u,k:d}=getLastOfPath(o,l);if(u&&Object.prototype.hasOwnProperty.call(u,d))return u[d]},getPathWithDefaults=(o,l,u)=>{const d=getPath(o,u);return d!==void 0?d:getPath(l,u)},deepExtend=(o,l,u)=>{for(const d in l)d!=="__proto__"&&d!=="constructor"&&(d in o?isString(o[d])||o[d]instanceof String||isString(l[d])||l[d]instanceof String?u&&(o[d]=l[d]):deepExtend(o[d],l[d],u):o[d]=l[d]);return o},regexEscape=o=>o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const escape=o=>isString(o)?o.replace(/[&<>"'\/]/g,l=>_entityMap[l]):o;class RegExpCache{constructor(l){this.capacity=l,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(l){const u=this.regExpMap.get(l);if(u!==void 0)return u;const d=new RegExp(l);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(l,d),this.regExpQueue.push(l),d}}const chars=[" ",",","?","!",";"],looksLikeObjectPathRegExpCache=new RegExpCache(20),looksLikeObjectPath=(o,l,u)=>{l=l||"",u=u||"";const d=chars.filter(m=>l.indexOf(m)<0&&u.indexOf(m)<0);if(d.length===0)return!0;const f=looksLikeObjectPathRegExpCache.getRegExp(`(${d.map(m=>m==="?"?"\\?":m).join("|")})`);let h=!f.test(o);if(!h){const m=o.indexOf(u);m>0&&!f.test(o.substring(0,m))&&(h=!0)}return h},deepFind=(o,l,u=".")=>{if(!o)return;if(o[l])return Object.prototype.hasOwnProperty.call(o,l)?o[l]:void 0;const d=l.split(u);let f=o;for(let h=0;h<d.length;){if(!f||typeof f!="object")return;let m,g="";for(let v=h;v<d.length;++v)if(v!==h&&(g+=u),g+=d[v],m=f[g],m!==void 0){if(["string","number","boolean"].indexOf(typeof m)>-1&&v<d.length-1)continue;h+=v-h+1;break}f=m}return f},getCleanedCode=o=>o==null?void 0:o.replace("_","-"),consoleLogger={type:"logger",log(o){this.output("log",o)},warn(o){this.output("warn",o)},error(o){this.output("error",o)},output(o,l){var u,d;(d=(u=console==null?void 0:console[o])==null?void 0:u.apply)==null||d.call(u,console,l)}};class Logger{constructor(l,u={}){this.init(l,u)}init(l,u={}){this.prefix=u.prefix||"i18next:",this.logger=l||consoleLogger,this.options=u,this.debug=u.debug}log(...l){return this.forward(l,"log","",!0)}warn(...l){return this.forward(l,"warn","",!0)}error(...l){return this.forward(l,"error","")}deprecate(...l){return this.forward(l,"warn","WARNING DEPRECATED: ",!0)}forward(l,u,d,f){return f&&!this.debug?null:(isString(l[0])&&(l[0]=`${d}${this.prefix} ${l[0]}`),this.logger[u](l))}create(l){return new Logger(this.logger,{prefix:`${this.prefix}:${l}:`,...this.options})}clone(l){return l=l||this.options,l.prefix=l.prefix||this.prefix,new Logger(this.logger,l)}}var baseLogger=new Logger;class EventEmitter{constructor(){this.observers={}}on(l,u){return l.split(" ").forEach(d=>{this.observers[d]||(this.observers[d]=new Map);const f=this.observers[d].get(u)||0;this.observers[d].set(u,f+1)}),this}off(l,u){if(this.observers[l]){if(!u){delete this.observers[l];return}this.observers[l].delete(u)}}emit(l,...u){this.observers[l]&&Array.from(this.observers[l].entries()).forEach(([f,h])=>{for(let m=0;m<h;m++)f(...u)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([f,h])=>{for(let m=0;m<h;m++)f.apply(f,[l,...u])})}}class ResourceStore extends EventEmitter{constructor(l,u={ns:["translation"],defaultNS:"translation"}){super(),this.data=l||{},this.options=u,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(l){this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}removeNamespaces(l){const u=this.options.ns.indexOf(l);u>-1&&this.options.ns.splice(u,1)}getResource(l,u,d,f={}){var x,b;const h=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,m=f.ignoreJSONStructure!==void 0?f.ignoreJSONStructure:this.options.ignoreJSONStructure;let g;l.indexOf(".")>-1?g=l.split("."):(g=[l,u],d&&(Array.isArray(d)?g.push(...d):isString(d)&&h?g.push(...d.split(h)):g.push(d)));const v=getPath(this.data,g);return!v&&!u&&!d&&l.indexOf(".")>-1&&(l=g[0],u=g[1],d=g.slice(2).join(".")),v||!m||!isString(d)?v:deepFind((b=(x=this.data)==null?void 0:x[l])==null?void 0:b[u],d,h)}addResource(l,u,d,f,h={silent:!1}){const m=h.keySeparator!==void 0?h.keySeparator:this.options.keySeparator;let g=[l,u];d&&(g=g.concat(m?d.split(m):d)),l.indexOf(".")>-1&&(g=l.split("."),f=u,u=g[1]),this.addNamespaces(u),setPath(this.data,g,f),h.silent||this.emit("added",l,u,d,f)}addResources(l,u,d,f={silent:!1}){for(const h in d)(isString(d[h])||Array.isArray(d[h]))&&this.addResource(l,u,h,d[h],{silent:!0});f.silent||this.emit("added",l,u,d)}addResourceBundle(l,u,d,f,h,m={silent:!1,skipCopy:!1}){let g=[l,u];l.indexOf(".")>-1&&(g=l.split("."),f=d,d=u,u=g[1]),this.addNamespaces(u);let v=getPath(this.data,g)||{};m.skipCopy||(d=JSON.parse(JSON.stringify(d))),f?deepExtend(v,d,h):v={...v,...d},setPath(this.data,g,v),m.silent||this.emit("added",l,u,d)}removeResourceBundle(l,u){this.hasResourceBundle(l,u)&&delete this.data[l][u],this.removeNamespaces(u),this.emit("removed",l,u)}hasResourceBundle(l,u){return this.getResource(l,u)!==void 0}getResourceBundle(l,u){return u||(u=this.options.defaultNS),this.getResource(l,u)}getDataByLanguage(l){return this.data[l]}hasLanguageSomeTranslations(l){const u=this.getDataByLanguage(l);return!!(u&&Object.keys(u)||[]).find(f=>u[f]&&Object.keys(u[f]).length>0)}toJSON(){return this.data}}var postProcessor={processors:{},addPostProcessor(o){this.processors[o.name]=o},handle(o,l,u,d,f){return o.forEach(h=>{var m;l=((m=this.processors[h])==null?void 0:m.process(l,u,d,f))??l}),l}};const PATH_KEY=Symbol("i18next/PATH_KEY");function createProxy(){const o=[],l=Object.create(null);let u;return l.get=(d,f)=>{var h;return(h=u==null?void 0:u.revoke)==null||h.call(u),f===PATH_KEY?o:(o.push(f),u=Proxy.revocable(d,l),u.proxy)},Proxy.revocable(Object.create(null),l).proxy}function keysFromSelector(o,l){const{[PATH_KEY]:u}=o(createProxy());return u.join((l==null?void 0:l.keySeparator)??".")}const checkedLoadedFor={},shouldHandleAsObject=o=>!isString(o)&&typeof o!="boolean"&&typeof o!="number";class Translator extends EventEmitter{constructor(l,u={}){super(),copy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],l,this),this.options=u,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=baseLogger.create("translator")}changeLanguage(l){l&&(this.language=l)}exists(l,u={interpolation:{}}){const d={...u};if(l==null)return!1;const f=this.resolve(l,d);return(f==null?void 0:f.res)!==void 0}extractFromKey(l,u){let d=u.nsSeparator!==void 0?u.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let h=u.ns||this.options.defaultNS||[];const m=d&&l.indexOf(d)>-1,g=!this.options.userDefinedKeySeparator&&!u.keySeparator&&!this.options.userDefinedNsSeparator&&!u.nsSeparator&&!looksLikeObjectPath(l,d,f);if(m&&!g){const v=l.match(this.interpolator.nestingRegexp);if(v&&v.length>0)return{key:l,namespaces:isString(h)?[h]:h};const x=l.split(d);(d!==f||d===f&&this.options.ns.indexOf(x[0])>-1)&&(h=x.shift()),l=x.join(f)}return{key:l,namespaces:isString(h)?[h]:h}}translate(l,u,d){let f=typeof u=="object"?{...u}:u;if(typeof f!="object"&&this.options.overloadTranslationOptionHandler&&(f=this.options.overloadTranslationOptionHandler(arguments)),typeof f=="object"&&(f={...f}),f||(f={}),l==null)return"";typeof l=="function"&&(l=keysFromSelector(l,{...this.options,...f})),Array.isArray(l)||(l=[String(l)]);const h=f.returnDetails!==void 0?f.returnDetails:this.options.returnDetails,m=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,{key:g,namespaces:v}=this.extractFromKey(l[l.length-1],f),x=v[v.length-1];let b=f.nsSeparator!==void 0?f.nsSeparator:this.options.nsSeparator;b===void 0&&(b=":");const S=f.lng||this.language,E=f.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((S==null?void 0:S.toLowerCase())==="cimode")return E?h?{res:`${x}${b}${g}`,usedKey:g,exactUsedKey:g,usedLng:S,usedNS:x,usedParams:this.getUsedParamsDetails(f)}:`${x}${b}${g}`:h?{res:g,usedKey:g,exactUsedKey:g,usedLng:S,usedNS:x,usedParams:this.getUsedParamsDetails(f)}:g;const w=this.resolve(l,f);let T=w==null?void 0:w.res;const C=(w==null?void 0:w.usedKey)||g,M=(w==null?void 0:w.exactUsedKey)||g,A=["[object Number]","[object Function]","[object RegExp]"],k=f.joinArrays!==void 0?f.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,O=f.count!==void 0&&!isString(f.count),j=Translator.hasDefaultValue(f),N=O?this.pluralResolver.getSuffix(S,f.count,f):"",V=f.ordinal&&O?this.pluralResolver.getSuffix(S,f.count,{ordinal:!1}):"",z=O&&!f.ordinal&&f.count===0,W=z&&f[`defaultValue${this.options.pluralSeparator}zero`]||f[`defaultValue${N}`]||f[`defaultValue${V}`]||f.defaultValue;let X=T;I&&!T&&j&&(X=W);const ie=shouldHandleAsObject(X),oe=Object.prototype.toString.apply(X);if(I&&X&&ie&&A.indexOf(oe)<0&&!(isString(k)&&Array.isArray(X))){if(!f.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const le=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,X,{...f,ns:v}):`key '${g} (${this.language})' returned an object instead of string.`;return h?(w.res=le,w.usedParams=this.getUsedParamsDetails(f),w):le}if(m){const le=Array.isArray(X),Q=le?[]:{},K=le?M:C;for(const $ in X)if(Object.prototype.hasOwnProperty.call(X,$)){const G=`${K}${m}${$}`;j&&!T?Q[$]=this.translate(G,{...f,defaultValue:shouldHandleAsObject(W)?W[$]:void 0,joinArrays:!1,ns:v}):Q[$]=this.translate(G,{...f,joinArrays:!1,ns:v}),Q[$]===G&&(Q[$]=X[$])}T=Q}}else if(I&&isString(k)&&Array.isArray(T))T=T.join(k),T&&(T=this.extendTranslation(T,l,f,d));else{let le=!1,Q=!1;!this.isValidLookup(T)&&j&&(le=!0,T=W),this.isValidLookup(T)||(Q=!0,T=g);const $=(f.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Q?void 0:T,G=j&&W!==T&&this.options.updateMissing;if(Q||le||G){if(this.logger.log(G?"updateKey":"missingKey",S,x,g,G?W:T),m){const U=this.resolve(g,{...f,keySeparator:!1});U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,f.lng||this.language);if(this.options.saveMissingTo==="fallback"&&B&&B[0])for(let U=0;U<B.length;U++)L.push(B[U]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(f.lng||this.language):L.push(f.lng||this.language);const q=(U,Y,te)=>{var ue;const ae=j&&te!==T?te:$;this.options.missingKeyHandler?this.options.missingKeyHandler(U,x,Y,ae,G,f):(ue=this.backendConnector)!=null&&ue.saveMissing&&this.backendConnector.saveMissing(U,x,Y,ae,G,f),this.emit("missingKey",U,x,Y,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?L.forEach(U=>{const Y=this.pluralResolver.getSuffixes(U,f);z&&f[`defaultValue${this.options.pluralSeparator}zero`]&&Y.indexOf(`${this.options.pluralSeparator}zero`)<0&&Y.push(`${this.options.pluralSeparator}zero`),Y.forEach(te=>{q([U],g+te,f[`defaultValue${te}`]||W)})}):q(L,g,W))}T=this.extendTranslation(T,l,f,w,d),Q&&T===g&&this.options.appendNamespaceToMissingKey&&(T=`${x}${b}${g}`),(Q||le)&&this.options.parseMissingKeyHandler&&(T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${x}${b}${g}`:g,le?T:void 0,f))}return h?(w.res=T,w.usedParams=this.getUsedParamsDetails(f),w):T}extendTranslation(l,u,d,f,h){var v,x;if((v=this.i18nFormat)!=null&&v.parse)l=this.i18nFormat.parse(l,{...this.options.interpolation.defaultVariables,...d},d.lng||this.language||f.usedLng,f.usedNS,f.usedKey,{resolved:f});else if(!d.skipInterpolation){d.interpolation&&this.interpolator.init({...d,interpolation:{...this.options.interpolation,...d.interpolation}});const b=isString(l)&&(((x=d==null?void 0:d.interpolation)==null?void 0:x.skipOnVariables)!==void 0?d.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let S;if(b){const w=l.match(this.interpolator.nestingRegexp);S=w&&w.length}let E=d.replace&&!isString(d.replace)?d.replace:d;if(this.options.interpolation.defaultVariables&&(E={...this.options.interpolation.defaultVariables,...E}),l=this.interpolator.interpolate(l,E,d.lng||this.language||f.usedLng,d),b){const w=l.match(this.interpolator.nestingRegexp),T=w&&w.length;S<T&&(d.nest=!1)}!d.lng&&f&&f.res&&(d.lng=this.language||f.usedLng),d.nest!==!1&&(l=this.interpolator.nest(l,(...w)=>(h==null?void 0:h[0])===w[0]&&!d.context?(this.logger.warn(`It seems you are nesting recursively key: ${w[0]} in key: ${u[0]}`),null):this.translate(...w,u),d)),d.interpolation&&this.interpolator.reset()}const m=d.postProcess||this.options.postProcess,g=isString(m)?[m]:m;return l!=null&&(g!=null&&g.length)&&d.applyPostProcessor!==!1&&(l=postProcessor.handle(g,l,u,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...f,usedParams:this.getUsedParamsDetails(d)},...d}:d,this)),l}resolve(l,u={}){let d,f,h,m,g;return isString(l)&&(l=[l]),l.forEach(v=>{if(this.isValidLookup(d))return;const x=this.extractFromKey(v,u),b=x.key;f=b;let S=x.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const E=u.count!==void 0&&!isString(u.count),w=E&&!u.ordinal&&u.count===0,T=u.context!==void 0&&(isString(u.context)||typeof u.context=="number")&&u.context!=="",C=u.lngs?u.lngs:this.languageUtils.toResolveHierarchy(u.lng||this.language,u.fallbackLng);S.forEach(M=>{var A,k;this.isValidLookup(d)||(g=M,!checkedLoadedFor[`${C[0]}-${M}`]&&((A=this.utils)!=null&&A.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(g))&&(checkedLoadedFor[`${C[0]}-${M}`]=!0,this.logger.warn(`key "${f}" for languages "${C.join(", ")}" won't get resolved as namespace "${g}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(I=>{var N;if(this.isValidLookup(d))return;m=I;const O=[b];if((N=this.i18nFormat)!=null&&N.addLookupKeys)this.i18nFormat.addLookupKeys(O,b,I,M,u);else{let V;E&&(V=this.pluralResolver.getSuffix(I,u.count,u));const z=`${this.options.pluralSeparator}zero`,W=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(u.ordinal&&V.indexOf(W)===0&&O.push(b+V.replace(W,this.options.pluralSeparator)),O.push(b+V),w&&O.push(b+z)),T){const X=`${b}${this.options.contextSeparator||"_"}${u.context}`;O.push(X),E&&(u.ordinal&&V.indexOf(W)===0&&O.push(X+V.replace(W,this.options.pluralSeparator)),O.push(X+V),w&&O.push(X+z))}}let j;for(;j=O.pop();)this.isValidLookup(d)||(h=j,d=this.getResource(I,M,j,u))}))})}),{res:d,usedKey:f,exactUsedKey:h,usedLng:m,usedNS:g}}isValidLookup(l){return l!==void 0&&!(!this.options.returnNull&&l===null)&&!(!this.options.returnEmptyString&&l==="")}getResource(l,u,d,f={}){var h;return(h=this.i18nFormat)!=null&&h.getResource?this.i18nFormat.getResource(l,u,d,f):this.resourceStore.getResource(l,u,d,f)}getUsedParamsDetails(l={}){const u=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],d=l.replace&&!isString(l.replace);let f=d?l.replace:l;if(d&&typeof l.count<"u"&&(f.count=l.count),this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),!d){f={...f};for(const h of u)delete f[h]}return f}static hasDefaultValue(l){const u="defaultValue";for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&u===d.substring(0,u.length)&&l[d]!==void 0)return!0;return!1}}class LanguageUtil{constructor(l){this.options=l,this.supportedLngs=this.options.supportedLngs||!1,this.logger=baseLogger.create("languageUtils")}getScriptPartFromCode(l){if(l=getCleanedCode(l),!l||l.indexOf("-")<0)return null;const u=l.split("-");return u.length===2||(u.pop(),u[u.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(u.join("-"))}getLanguagePartFromCode(l){if(l=getCleanedCode(l),!l||l.indexOf("-")<0)return l;const u=l.split("-");return this.formatLanguageCode(u[0])}formatLanguageCode(l){if(isString(l)&&l.indexOf("-")>-1){let u;try{u=Intl.getCanonicalLocales(l)[0]}catch{}return u&&this.options.lowerCaseLng&&(u=u.toLowerCase()),u||(this.options.lowerCaseLng?l.toLowerCase():l)}return this.options.cleanCode||this.options.lowerCaseLng?l.toLowerCase():l}isSupportedCode(l){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(l=this.getLanguagePartFromCode(l)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(l)>-1}getBestMatchFromCodes(l){if(!l)return null;let u;return l.forEach(d=>{if(u)return;const f=this.formatLanguageCode(d);(!this.options.supportedLngs||this.isSupportedCode(f))&&(u=f)}),!u&&this.options.supportedLngs&&l.forEach(d=>{if(u)return;const f=this.getScriptPartFromCode(d);if(this.isSupportedCode(f))return u=f;const h=this.getLanguagePartFromCode(d);if(this.isSupportedCode(h))return u=h;u=this.options.supportedLngs.find(m=>{if(m===h)return m;if(!(m.indexOf("-")<0&&h.indexOf("-")<0)&&(m.indexOf("-")>0&&h.indexOf("-")<0&&m.substring(0,m.indexOf("-"))===h||m.indexOf(h)===0&&h.length>1))return m})}),u||(u=this.getFallbackCodes(this.options.fallbackLng)[0]),u}getFallbackCodes(l,u){if(!l)return[];if(typeof l=="function"&&(l=l(u)),isString(l)&&(l=[l]),Array.isArray(l))return l;if(!u)return l.default||[];let d=l[u];return d||(d=l[this.getScriptPartFromCode(u)]),d||(d=l[this.formatLanguageCode(u)]),d||(d=l[this.getLanguagePartFromCode(u)]),d||(d=l.default),d||[]}toResolveHierarchy(l,u){const d=this.getFallbackCodes((u===!1?[]:u)||this.options.fallbackLng||[],l),f=[],h=m=>{m&&(this.isSupportedCode(m)?f.push(m):this.logger.warn(`rejecting language code not found in supportedLngs: ${m}`))};return isString(l)&&(l.indexOf("-")>-1||l.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(l)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(l)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(l))):isString(l)&&h(this.formatLanguageCode(l)),d.forEach(m=>{f.indexOf(m)<0&&h(this.formatLanguageCode(m))}),f}}const suffixesOrder={zero:0,one:1,two:2,few:3,many:4,other:5},dummyRule={select:o=>o===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(l,u={}){this.languageUtils=l,this.options=u,this.logger=baseLogger.create("pluralResolver"),this.pluralRulesCache={}}addRule(l,u){this.rules[l]=u}clearCache(){this.pluralRulesCache={}}getRule(l,u={}){const d=getCleanedCode(l==="dev"?"en":l),f=u.ordinal?"ordinal":"cardinal",h=JSON.stringify({cleanedCode:d,type:f});if(h in this.pluralRulesCache)return this.pluralRulesCache[h];let m;try{m=new Intl.PluralRules(d,{type:f})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dummyRule;if(!l.match(/-|_/))return dummyRule;const v=this.languageUtils.getLanguagePartFromCode(l);m=this.getRule(v,u)}return this.pluralRulesCache[h]=m,m}needsPlural(l,u={}){let d=this.getRule(l,u);return d||(d=this.getRule("dev",u)),(d==null?void 0:d.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(l,u,d={}){return this.getSuffixes(l,d).map(f=>`${u}${f}`)}getSuffixes(l,u={}){let d=this.getRule(l,u);return d||(d=this.getRule("dev",u)),d?d.resolvedOptions().pluralCategories.sort((f,h)=>suffixesOrder[f]-suffixesOrder[h]).map(f=>`${this.options.prepend}${u.ordinal?`ordinal${this.options.prepend}`:""}${f}`):[]}getSuffix(l,u,d={}){const f=this.getRule(l,d);return f?`${this.options.prepend}${d.ordinal?`ordinal${this.options.prepend}`:""}${f.select(u)}`:(this.logger.warn(`no plural rule found for: ${l}`),this.getSuffix("dev",u,d))}}const deepFindWithDefaults=(o,l,u,d=".",f=!0)=>{let h=getPathWithDefaults(o,l,u);return!h&&f&&isString(u)&&(h=deepFind(o,u,d),h===void 0&&(h=deepFind(l,u,d))),h},regexSafe=o=>o.replace(/\$/g,"$$$$");class Interpolator{constructor(l={}){var u;this.logger=baseLogger.create("interpolator"),this.options=l,this.format=((u=l==null?void 0:l.interpolation)==null?void 0:u.format)||(d=>d),this.init(l)}init(l={}){l.interpolation||(l.interpolation={escapeValue:!0});const{escape:u,escapeValue:d,useRawValueToEscape:f,prefix:h,prefixEscaped:m,suffix:g,suffixEscaped:v,formatSeparator:x,unescapeSuffix:b,unescapePrefix:S,nestingPrefix:E,nestingPrefixEscaped:w,nestingSuffix:T,nestingSuffixEscaped:C,nestingOptionsSeparator:M,maxReplaces:A,alwaysFormat:k}=l.interpolation;this.escape=u!==void 0?u:escape,this.escapeValue=d!==void 0?d:!0,this.useRawValueToEscape=f!==void 0?f:!1,this.prefix=h?regexEscape(h):m||"{{",this.suffix=g?regexEscape(g):v||"}}",this.formatSeparator=x||",",this.unescapePrefix=b?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=E?regexEscape(E):w||regexEscape("$t("),this.nestingSuffix=T?regexEscape(T):C||regexEscape(")"),this.nestingOptionsSeparator=M||",",this.maxReplaces=A||1e3,this.alwaysFormat=k!==void 0?k:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const l=(u,d)=>(u==null?void 0:u.source)===d?(u.lastIndex=0,u):new RegExp(d,"g");this.regexp=l(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=l(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=l(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(l,u,d,f){var w;let h,m,g;const v=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},x=T=>{if(T.indexOf(this.formatSeparator)<0){const k=deepFindWithDefaults(u,v,T,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,d,{...f,...u,interpolationkey:T}):k}const C=T.split(this.formatSeparator),M=C.shift().trim(),A=C.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(u,v,M,this.options.keySeparator,this.options.ignoreJSONStructure),A,d,{...f,...u,interpolationkey:M})};this.resetRegExp();const b=(f==null?void 0:f.missingInterpolationHandler)||this.options.missingInterpolationHandler,S=((w=f==null?void 0:f.interpolation)==null?void 0:w.skipOnVariables)!==void 0?f.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:T=>regexSafe(T)},{regex:this.regexp,safeValue:T=>this.escapeValue?regexSafe(this.escape(T)):regexSafe(T)}].forEach(T=>{for(g=0;h=T.regex.exec(l);){const C=h[1].trim();if(m=x(C),m===void 0)if(typeof b=="function"){const A=b(l,h,f);m=isString(A)?A:""}else if(f&&Object.prototype.hasOwnProperty.call(f,C))m="";else if(S){m=h[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${l}`),m="";else!isString(m)&&!this.useRawValueToEscape&&(m=makeString(m));const M=T.safeValue(m);if(l=l.replace(h[0],M),S?(T.regex.lastIndex+=m.length,T.regex.lastIndex-=h[0].length):T.regex.lastIndex=0,g++,g>=this.maxReplaces)break}}),l}nest(l,u,d={}){let f,h,m;const g=(v,x)=>{const b=this.nestingOptionsSeparator;if(v.indexOf(b)<0)return v;const S=v.split(new RegExp(`${b}[ ]*{`));let E=`{${S[1]}`;v=S[0],E=this.interpolate(E,m);const w=E.match(/'/g),T=E.match(/"/g);(((w==null?void 0:w.length)??0)%2===0&&!T||T.length%2!==0)&&(E=E.replace(/'/g,'"'));try{m=JSON.parse(E),x&&(m={...x,...m})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${v}`,C),`${v}${b}${E}`}return m.defaultValue&&m.defaultValue.indexOf(this.prefix)>-1&&delete m.defaultValue,v};for(;f=this.nestingRegexp.exec(l);){let v=[];m={...d},m=m.replace&&!isString(m.replace)?m.replace:m,m.applyPostProcessor=!1,delete m.defaultValue;const x=/{.*}/.test(f[1])?f[1].lastIndexOf("}")+1:f[1].indexOf(this.formatSeparator);if(x!==-1&&(v=f[1].slice(x).split(this.formatSeparator).map(b=>b.trim()).filter(Boolean),f[1]=f[1].slice(0,x)),h=u(g.call(this,f[1].trim(),m),m),h&&f[0]===l&&!isString(h))return h;isString(h)||(h=makeString(h)),h||(this.logger.warn(`missed to resolve ${f[1]} for nesting ${l}`),h=""),v.length&&(h=v.reduce((b,S)=>this.format(b,S,d.lng,{...d,interpolationkey:f[1].trim()}),h.trim())),l=l.replace(f[0],h),this.regexp.lastIndex=0}return l}}const parseFormatStr=o=>{let l=o.toLowerCase().trim();const u={};if(o.indexOf("(")>-1){const d=o.split("(");l=d[0].toLowerCase().trim();const f=d[1].substring(0,d[1].length-1);l==="currency"&&f.indexOf(":")<0?u.currency||(u.currency=f.trim()):l==="relativetime"&&f.indexOf(":")<0?u.range||(u.range=f.trim()):f.split(";").forEach(m=>{if(m){const[g,...v]=m.split(":"),x=v.join(":").trim().replace(/^'+|'+$/g,""),b=g.trim();u[b]||(u[b]=x),x==="false"&&(u[b]=!1),x==="true"&&(u[b]=!0),isNaN(x)||(u[b]=parseInt(x,10))}})}return{formatName:l,formatOptions:u}},createCachedFormatter=o=>{const l={};return(u,d,f)=>{let h=f;f&&f.interpolationkey&&f.formatParams&&f.formatParams[f.interpolationkey]&&f[f.interpolationkey]&&(h={...h,[f.interpolationkey]:void 0});const m=d+JSON.stringify(h);let g=l[m];return g||(g=o(getCleanedCode(d),f),l[m]=g),g(u)}},createNonCachedFormatter=o=>(l,u,d)=>o(getCleanedCode(u),d)(l);class Formatter{constructor(l={}){this.logger=baseLogger.create("formatter"),this.options=l,this.init(l)}init(l,u={interpolation:{}}){this.formatSeparator=u.interpolation.formatSeparator||",";const d=u.cacheInBuiltFormats?createCachedFormatter:createNonCachedFormatter;this.formats={number:d((f,h)=>{const m=new Intl.NumberFormat(f,{...h});return g=>m.format(g)}),currency:d((f,h)=>{const m=new Intl.NumberFormat(f,{...h,style:"currency"});return g=>m.format(g)}),datetime:d((f,h)=>{const m=new Intl.DateTimeFormat(f,{...h});return g=>m.format(g)}),relativetime:d((f,h)=>{const m=new Intl.RelativeTimeFormat(f,{...h});return g=>m.format(g,h.range||"day")}),list:d((f,h)=>{const m=new Intl.ListFormat(f,{...h});return g=>m.format(g)})}}add(l,u){this.formats[l.toLowerCase().trim()]=u}addCached(l,u){this.formats[l.toLowerCase().trim()]=createCachedFormatter(u)}format(l,u,d,f={}){const h=u.split(this.formatSeparator);if(h.length>1&&h[0].indexOf("(")>1&&h[0].indexOf(")")<0&&h.find(g=>g.indexOf(")")>-1)){const g=h.findIndex(v=>v.indexOf(")")>-1);h[0]=[h[0],...h.splice(1,g)].join(this.formatSeparator)}return h.reduce((g,v)=>{var S;const{formatName:x,formatOptions:b}=parseFormatStr(v);if(this.formats[x]){let E=g;try{const w=((S=f==null?void 0:f.formatParams)==null?void 0:S[f.interpolationkey])||{},T=w.locale||w.lng||f.locale||f.lng||d;E=this.formats[x](g,T,{...b,...f,...w})}catch(w){this.logger.warn(w)}return E}else this.logger.warn(`there was no format function for ${x}`);return g},l)}}const removePending=(o,l)=>{o.pending[l]!==void 0&&(delete o.pending[l],o.pendingCount--)};class Connector extends EventEmitter{constructor(l,u,d,f={}){var h,m;super(),this.backend=l,this.store=u,this.services=d,this.languageUtils=d.languageUtils,this.options=f,this.logger=baseLogger.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=f.maxParallelReads||10,this.readingCalls=0,this.maxRetries=f.maxRetries>=0?f.maxRetries:5,this.retryTimeout=f.retryTimeout>=1?f.retryTimeout:350,this.state={},this.queue=[],(m=(h=this.backend)==null?void 0:h.init)==null||m.call(h,d,f.backend,f)}queueLoad(l,u,d,f){const h={},m={},g={},v={};return l.forEach(x=>{let b=!0;u.forEach(S=>{const E=`${x}|${S}`;!d.reload&&this.store.hasResourceBundle(x,S)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?m[E]===void 0&&(m[E]=!0):(this.state[E]=1,b=!1,m[E]===void 0&&(m[E]=!0),h[E]===void 0&&(h[E]=!0),v[S]===void 0&&(v[S]=!0)))}),b||(g[x]=!0)}),(Object.keys(h).length||Object.keys(m).length)&&this.queue.push({pending:m,pendingCount:Object.keys(m).length,loaded:{},errors:[],callback:f}),{toLoad:Object.keys(h),pending:Object.keys(m),toLoadLanguages:Object.keys(g),toLoadNamespaces:Object.keys(v)}}loaded(l,u,d){const f=l.split("|"),h=f[0],m=f[1];u&&this.emit("failedLoading",h,m,u),!u&&d&&this.store.addResourceBundle(h,m,d,void 0,void 0,{skipCopy:!0}),this.state[l]=u?-1:2,u&&d&&(this.state[l]=0);const g={};this.queue.forEach(v=>{pushPath(v.loaded,[h],m),removePending(v,l),u&&v.errors.push(u),v.pendingCount===0&&!v.done&&(Object.keys(v.loaded).forEach(x=>{g[x]||(g[x]={});const b=v.loaded[x];b.length&&b.forEach(S=>{g[x][S]===void 0&&(g[x][S]=!0)})}),v.done=!0,v.errors.length?v.callback(v.errors):v.callback())}),this.emit("loaded",g),this.queue=this.queue.filter(v=>!v.done)}read(l,u,d,f=0,h=this.retryTimeout,m){if(!l.length)return m(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:l,ns:u,fcName:d,tried:f,wait:h,callback:m});return}this.readingCalls++;const g=(x,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(x&&b&&f<this.maxRetries){setTimeout(()=>{this.read.call(this,l,u,d,f+1,h*2,m)},h);return}m(x,b)},v=this.backend[d].bind(this.backend);if(v.length===2){try{const x=v(l,u);x&&typeof x.then=="function"?x.then(b=>g(null,b)).catch(g):g(null,x)}catch(x){g(x)}return}return v(l,u,g)}prepareLoading(l,u,d={},f){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),f&&f();isString(l)&&(l=this.languageUtils.toResolveHierarchy(l)),isString(u)&&(u=[u]);const h=this.queueLoad(l,u,d,f);if(!h.toLoad.length)return h.pending.length||f(),null;h.toLoad.forEach(m=>{this.loadOne(m)})}load(l,u,d){this.prepareLoading(l,u,{},d)}reload(l,u,d){this.prepareLoading(l,u,{reload:!0},d)}loadOne(l,u=""){const d=l.split("|"),f=d[0],h=d[1];this.read(f,h,"read",void 0,void 0,(m,g)=>{m&&this.logger.warn(`${u}loading namespace ${h} for language ${f} failed`,m),!m&&g&&this.logger.log(`${u}loaded namespace ${h} for language ${f}`,g),this.loaded(l,m,g)})}saveMissing(l,u,d,f,h,m={},g=()=>{}){var v,x,b,S,E;if((x=(v=this.services)==null?void 0:v.utils)!=null&&x.hasLoadedNamespace&&!((S=(b=this.services)==null?void 0:b.utils)!=null&&S.hasLoadedNamespace(u))){this.logger.warn(`did not save key "${d}" as the namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(d==null||d==="")){if((E=this.backend)!=null&&E.create){const w={...m,isUpdate:h},T=this.backend.create.bind(this.backend);if(T.length<6)try{let C;T.length===5?C=T(l,u,d,f,w):C=T(l,u,d,f),C&&typeof C.then=="function"?C.then(M=>g(null,M)).catch(g):g(null,C)}catch(C){g(C)}else T(l,u,d,f,g,w)}!l||!l[0]||this.store.addResource(l[0],u,d,f)}}}const get=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:o=>{let l={};if(typeof o[1]=="object"&&(l=o[1]),isString(o[1])&&(l.defaultValue=o[1]),isString(o[2])&&(l.tDescription=o[2]),typeof o[2]=="object"||typeof o[3]=="object"){const u=o[3]||o[2];Object.keys(u).forEach(d=>{l[d]=u[d]})}return l},interpolation:{escapeValue:!0,format:o=>o,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),transformOptions=o=>{var l,u;return isString(o.ns)&&(o.ns=[o.ns]),isString(o.fallbackLng)&&(o.fallbackLng=[o.fallbackLng]),isString(o.fallbackNS)&&(o.fallbackNS=[o.fallbackNS]),((u=(l=o.supportedLngs)==null?void 0:l.indexOf)==null?void 0:u.call(l,"cimode"))<0&&(o.supportedLngs=o.supportedLngs.concat(["cimode"])),typeof o.initImmediate=="boolean"&&(o.initAsync=o.initImmediate),o},noop=()=>{},bindMemberFunctions=o=>{Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach(u=>{typeof o[u]=="function"&&(o[u]=o[u].bind(o))})};class I18n extends EventEmitter{constructor(l={},u){if(super(),this.options=transformOptions(l),this.services={},this.logger=baseLogger,this.modules={external:[]},bindMemberFunctions(this),u&&!this.isInitialized&&!l.isClone){if(!this.options.initAsync)return this.init(l,u),this;setTimeout(()=>{this.init(l,u)},0)}}init(l={},u){this.isInitializing=!0,typeof l=="function"&&(u=l,l={}),l.defaultNS==null&&l.ns&&(isString(l.ns)?l.defaultNS=l.ns:l.ns.indexOf("translation")<0&&(l.defaultNS=l.ns[0]));const d=get();this.options={...d,...this.options,...transformOptions(l)},this.options.interpolation={...d.interpolation,...this.options.interpolation},l.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=l.keySeparator),l.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=l.nsSeparator);const f=x=>x?typeof x=="function"?new x:x:null;if(!this.options.isClone){this.modules.logger?baseLogger.init(f(this.modules.logger),this.options):baseLogger.init(null,this.options);let x;this.modules.formatter?x=this.modules.formatter:x=Formatter;const b=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const S=this.services;S.logger=baseLogger,S.resourceStore=this.store,S.languageUtils=b,S.pluralResolver=new PluralResolver(b,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==d.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),x&&(!this.options.interpolation.format||this.options.interpolation.format===d.interpolation.format)&&(S.formatter=f(x),S.formatter.init&&S.formatter.init(S,this.options),this.options.interpolation.format=S.formatter.format.bind(S.formatter)),S.interpolator=new Interpolator(this.options),S.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},S.backendConnector=new Connector(f(this.modules.backend),S.resourceStore,S,this.options),S.backendConnector.on("*",(w,...T)=>{this.emit(w,...T)}),this.modules.languageDetector&&(S.languageDetector=f(this.modules.languageDetector),S.languageDetector.init&&S.languageDetector.init(S,this.options.detection,this.options)),this.modules.i18nFormat&&(S.i18nFormat=f(this.modules.i18nFormat),S.i18nFormat.init&&S.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(w,...T)=>{this.emit(w,...T)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,u||(u=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const x=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);x.length>0&&x[0]!=="dev"&&(this.options.lng=x[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(x=>{this[x]=(...b)=>this.store[x](...b)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(x=>{this[x]=(...b)=>(this.store[x](...b),this)});const g=defer(),v=()=>{const x=(b,S)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),g.resolve(S),u(b,S)};if(this.languages&&!this.isInitialized)return x(null,this.t.bind(this));this.changeLanguage(this.options.lng,x)};return this.options.resources||!this.options.initAsync?v():setTimeout(v,0),g}loadResources(l,u=noop){var h,m;let d=u;const f=isString(l)?l:this.language;if(typeof l=="function"&&(d=l),!this.options.resources||this.options.partialBundledLanguages){if((f==null?void 0:f.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return d();const g=[],v=x=>{if(!x||x==="cimode")return;this.services.languageUtils.toResolveHierarchy(x).forEach(S=>{S!=="cimode"&&g.indexOf(S)<0&&g.push(S)})};f?v(f):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(b=>v(b)),(m=(h=this.options.preload)==null?void 0:h.forEach)==null||m.call(h,x=>v(x)),this.services.backendConnector.load(g,this.options.ns,x=>{!x&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),d(x)})}else d(null)}reloadResources(l,u,d){const f=defer();return typeof l=="function"&&(d=l,l=void 0),typeof u=="function"&&(d=u,u=void 0),l||(l=this.languages),u||(u=this.options.ns),d||(d=noop),this.services.backendConnector.reload(l,u,h=>{f.resolve(),d(h)}),f}use(l){if(!l)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!l.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return l.type==="backend"&&(this.modules.backend=l),(l.type==="logger"||l.log&&l.warn&&l.error)&&(this.modules.logger=l),l.type==="languageDetector"&&(this.modules.languageDetector=l),l.type==="i18nFormat"&&(this.modules.i18nFormat=l),l.type==="postProcessor"&&postProcessor.addPostProcessor(l),l.type==="formatter"&&(this.modules.formatter=l),l.type==="3rdParty"&&this.modules.external.push(l),this}setResolvedLanguage(l){if(!(!l||!this.languages)&&!(["cimode","dev"].indexOf(l)>-1)){for(let u=0;u<this.languages.length;u++){const d=this.languages[u];if(!(["cimode","dev"].indexOf(d)>-1)&&this.store.hasLanguageSomeTranslations(d)){this.resolvedLanguage=d;break}}!this.resolvedLanguage&&this.languages.indexOf(l)<0&&this.store.hasLanguageSomeTranslations(l)&&(this.resolvedLanguage=l,this.languages.unshift(l))}}changeLanguage(l,u){this.isLanguageChangingTo=l;const d=defer();this.emit("languageChanging",l);const f=g=>{this.language=g,this.languages=this.services.languageUtils.toResolveHierarchy(g),this.resolvedLanguage=void 0,this.setResolvedLanguage(g)},h=(g,v)=>{v?this.isLanguageChangingTo===l&&(f(v),this.translator.changeLanguage(v),this.isLanguageChangingTo=void 0,this.emit("languageChanged",v),this.logger.log("languageChanged",v)):this.isLanguageChangingTo=void 0,d.resolve((...x)=>this.t(...x)),u&&u(g,(...x)=>this.t(...x))},m=g=>{var b,S;!l&&!g&&this.services.languageDetector&&(g=[]);const v=isString(g)?g:g&&g[0],x=this.store.hasLanguageSomeTranslations(v)?v:this.services.languageUtils.getBestMatchFromCodes(isString(g)?[g]:g);x&&(this.language||f(x),this.translator.language||this.translator.changeLanguage(x),(S=(b=this.services.languageDetector)==null?void 0:b.cacheUserLanguage)==null||S.call(b,x)),this.loadResources(x,E=>{h(E,x)})};return!l&&this.services.languageDetector&&!this.services.languageDetector.async?m(this.services.languageDetector.detect()):!l&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(m):this.services.languageDetector.detect(m):m(l),d}getFixedT(l,u,d){const f=(h,m,...g)=>{let v;typeof m!="object"?v=this.options.overloadTranslationOptionHandler([h,m].concat(g)):v={...m},v.lng=v.lng||f.lng,v.lngs=v.lngs||f.lngs,v.ns=v.ns||f.ns,v.keyPrefix!==""&&(v.keyPrefix=v.keyPrefix||d||f.keyPrefix);const x=this.options.keySeparator||".";let b;return v.keyPrefix&&Array.isArray(h)?b=h.map(S=>(typeof S=="function"&&(S=keysFromSelector(S,{...this.options,...m})),`${v.keyPrefix}${x}${S}`)):(typeof h=="function"&&(h=keysFromSelector(h,{...this.options,...m})),b=v.keyPrefix?`${v.keyPrefix}${x}${h}`:h),this.t(b,v)};return isString(l)?f.lng=l:f.lngs=l,f.ns=u,f.keyPrefix=d,f}t(...l){var u;return(u=this.translator)==null?void 0:u.translate(...l)}exists(...l){var u;return(u=this.translator)==null?void 0:u.exists(...l)}setDefaultNamespace(l){this.options.defaultNS=l}hasLoadedNamespace(l,u={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const d=u.lng||this.resolvedLanguage||this.languages[0],f=this.options?this.options.fallbackLng:!1,h=this.languages[this.languages.length-1];if(d.toLowerCase()==="cimode")return!0;const m=(g,v)=>{const x=this.services.backendConnector.state[`${g}|${v}`];return x===-1||x===0||x===2};if(u.precheck){const g=u.precheck(this,m);if(g!==void 0)return g}return!!(this.hasResourceBundle(d,l)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||m(d,l)&&(!f||m(h,l)))}loadNamespaces(l,u){const d=defer();return this.options.ns?(isString(l)&&(l=[l]),l.forEach(f=>{this.options.ns.indexOf(f)<0&&this.options.ns.push(f)}),this.loadResources(f=>{d.resolve(),u&&u(f)}),d):(u&&u(),Promise.resolve())}loadLanguages(l,u){const d=defer();isString(l)&&(l=[l]);const f=this.options.preload||[],h=l.filter(m=>f.indexOf(m)<0&&this.services.languageUtils.isSupportedCode(m));return h.length?(this.options.preload=f.concat(h),this.loadResources(m=>{d.resolve(),u&&u(m)}),d):(u&&u(),Promise.resolve())}dir(l){var f,h;if(l||(l=this.resolvedLanguage||(((f=this.languages)==null?void 0:f.length)>0?this.languages[0]:this.language)),!l)return"rtl";try{const m=new Intl.Locale(l);if(m&&m.getTextInfo){const g=m.getTextInfo();if(g&&g.direction)return g.direction}}catch{}const u=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],d=((h=this.services)==null?void 0:h.languageUtils)||new LanguageUtil(get());return l.toLowerCase().indexOf("-latn")>1?"ltr":u.indexOf(d.getLanguagePartFromCode(l))>-1||l.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(l={},u){return new I18n(l,u)}cloneInstance(l={},u=noop){const d=l.forkResourceStore;d&&delete l.forkResourceStore;const f={...this.options,...l,isClone:!0},h=new I18n(f);if((l.debug!==void 0||l.prefix!==void 0)&&(h.logger=h.logger.clone(l)),["store","services","language"].forEach(g=>{h[g]=this[g]}),h.services={...this.services},h.services.utils={hasLoadedNamespace:h.hasLoadedNamespace.bind(h)},d){const g=Object.keys(this.store.data).reduce((v,x)=>(v[x]={...this.store.data[x]},v[x]=Object.keys(v[x]).reduce((b,S)=>(b[S]={...v[x][S]},b),v[x]),v),{});h.store=new ResourceStore(g,f),h.services.resourceStore=h.store}return h.translator=new Translator(h.services,f),h.translator.on("*",(g,...v)=>{h.emit(g,...v)}),h.init(f,u),h.translator.options=f,h.translator.backendConnector.services.utils={hasLoadedNamespace:h.hasLoadedNamespace.bind(h)},h}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const instance=I18n.createInstance();instance.createInstance=I18n.createInstance,instance.createInstance,instance.dir,instance.init,instance.loadResources,instance.reloadResources,instance.use,instance.changeLanguage,instance.getFixedT,instance.t,instance.exists,instance.setDefaultNamespace,instance.hasLoadedNamespace,instance.loadNamespaces,instance.loadLanguages;const balance$4="Balance",topUp$4="Top Up",ads$4="Ads",adsOn$4="On",adsOff$4="Off",level$4="Level",toLevelUp$4="to lvl up",xpCounter$4="/ {{total}} XP",lootBox$4="Loot Box",forLevel$4="for level {{level}}",unopenedLootBox$4="Unopened Loot Box",inventory$4="Inventory",inventoryDescription$4="You can find all your unopened loot boxes here. Tap the image to try your luck with rewards: you may find USDT, coins, or another box inside!",inventoryDescriptionEmpty$4="Unopened loot boxes will be kept here. Inside of each one you may find USDT, coins, or another loot box. Better rewards based on a box rarity!",inventoryDescriptionEmptyButton$4="You don’t have loot boxes yet, <br/> but you can buy one",emptyBox$4="Empty Box",openItem$4="Open Item",reward_type$4={coins:"{{count}} coin",coins_one:"{{count}} coin",coins_few:"{{count}} coins",coins_many:"{{count}} coins",usdt_no_amount:"USDT",coins_no_amount:"Coins",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} gem",gems_one:"{{count}} gem",gems_few:"{{count}} gems",gems_many:"{{count}} gems",gems_no_amount:"Gems",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Double Balance",box:"LOOT BOX",box_common:"BASIC",box_rare:"RARE",box_epic:"EPIC",box_legend:"LEGEND"},dates$4={today:"Today",yesterday:"Yest"},confirmIframe$4={pay:"Pay",cancel:"Cancel"},months$4={january:"Jan",february:"Feb",march:"Mar",april:"Apr",may:"May",june:"Jun",july:"Jul",august:"Aug",september:"Sep",october:"Oct",november:"Nov",december:"Dec"},box_open$4={skip:"Skip",you_ve_got:"You’ve got",button_reveal_reward:"Reveal Reward",button_open_now:"Open Now",button_save_inventory:"Save to Inventory",button_unopened_boxes:"Unopened Loot Boxes",recent_rewards:"Recent rewards",later_open_later_inventory:"You can open it later in inventory"},common$4={error:"Oops! Something went wrong. Please try again later.",continue:"Continue",ok:"OK",timeAgo:{sec_zero:"{{count}} seconds ago",sec_one:"{{count}} second ago",sec_two:"{{count}} seconds ago",sec_few:"{{count}} seconds ago",sec_many:"{{count}} seconds ago",sec_other:"{{count}} seconds ago",now:"Just now",min_zero:"{{count}} minutes ago",min_one:"{{count}} minute ago",min_two:"{{count}} minutes ago",min_few:"{{count}} minutes ago",min_many:"{{count}} minutes ago",min_other:"{{count}} minutes ago",h_zero:"{{count}} hours ago",h_one:"{{count}} hour ago",h_two:"{{count}} hours ago",h_few:"{{count}} hours ago",h_many:"{{count}} hours ago",h_other:"{{count}} hours ago",d_zero:"{{count}} days ago",d_one:"{{count}} day ago",d_two:"{{count}} days ago",d_few:"{{count}} days ago",d_many:"{{count}} days ago",d_other:"{{count}} days ago"}},snackbar$4={purchase:{blackHolePurchaseChest:"Purchase",blackHolePurchaseLevel:"Purchase",blackHolePurchaseAutoBurn:"Purchase",walletPurchaseGems:"Purchase",blackHoleBurnCoins:"Burned",error:"Failed to make a purchase"},receiving:{claimedTask:"Received"}},purchaseAdsFreeModal$4={title:"Remove Ads",disableAllInterruptions:"Disable all interruptions in games with a recurring monthly subscription. No worries, you will also have the option to turn ads on back if you want anytime!",noInterruptionsInGames:"No interruptions in games with a recurring subscription.",activeRecurring:"Active recurring payments at {{price}}",aMonth:" a month.",nextPayment:"Next payment {{date}}",activeUntil:"Active until {{date}}",subscriptionPaused:"Subscription is Paused",resumeSubscription:"Resume Subscription",cancelSubscription:"Cancel Subscription",continue:"Continue",month:"{{price}} / month",errorCancelSubscription:"Failed to cancel subscription. Please try again"},levelInfoModal$4={title:"Your Level",description:"Gain experience by playing games. For leveling up you get loot boxes, which may contain USDT, coins or better loot boxes. Compete with other players to win real USDT every week.",action:"Got It"},topUpModal$4={balance:"Balance",topUpBalance:"Top Up Gems",coins:"coins",gems:"gems",topUp:"Top Up"},inventoryModal$4={title:"Inventory",description:"It's your personal storage space for all unopened loot boxes. Tap each image to reveal reward inside!"},en={balance:balance$4,topUp:topUp$4,ads:ads$4,adsOn:adsOn$4,adsOff:adsOff$4,level:level$4,toLevelUp:toLevelUp$4,xpCounter:xpCounter$4,lootBox:lootBox$4,forLevel:forLevel$4,unopenedLootBox:unopenedLootBox$4,inventory:inventory$4,inventoryDescription:inventoryDescription$4,inventoryDescriptionEmpty:inventoryDescriptionEmpty$4,inventoryDescriptionEmptyButton:inventoryDescriptionEmptyButton$4,emptyBox:emptyBox$4,openItem:openItem$4,reward_type:reward_type$4,dates:dates$4,confirmIframe:confirmIframe$4,months:months$4,box_open:box_open$4,common:common$4,snackbar:snackbar$4,purchaseAdsFreeModal:purchaseAdsFreeModal$4,levelInfoModal:levelInfoModal$4,topUpModal:topUpModal$4,inventoryModal:inventoryModal$4},balance$3="Saldo",topUp$3="Recargar",ads$3="Anuncios",adsOn$3="On",adsOff$3="Off",level$3="Nivel",toLevelUp$3="para subir de nivel",xpCounter$3="/ {{total}} XP",lootBox$3="Caja de botín",forLevel$3="para el nivel {{level}}",unopenedLootBox$3="Caja de botín sin abrir",inventory$3="Inventario",inventoryDescription$3="Aqui puedes encontrar todas tus cajas de botin sin abrir. Toca la imagen para probar tu suerte: puedes encontrar USDT, monedas u otra caja dentro.",inventoryDescriptionEmpty$3="Las cajas de botin sin abrir se guardaran aqui. Dentro de cada una puedes encontrar USDT, monedas u otra caja de botin. Mejores recompensas segun la rareza de la caja.",inventoryDescriptionEmptyButton$3="Aun no tienes cajas de botin, <br/> pero puedes comprar una",emptyBox$3="Caja vacía",openItem$3="Abrir objeto",reward_type$3={coins:"{{count}} moneda",coins_one:"{{count}} moneda",coins_few:"{{count}} monedas",coins_many:"{{count}} monedas",usdt_no_amount:"USDT",coins_no_amount:"Monedas",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} gema",gems_one:"{{count}} gema",gems_few:"{{count}} gemas",gems_many:"{{count}} gemas",gems_no_amount:"Gemas",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Doble saldo",box:"CAJA DE BOTÍN",box_common:"BÁSICA",box_rare:"RARA",box_epic:"ÉPICA",box_legend:"LEGENDARIA"},dates$3={today:"Hoy",yesterday:"Ayer"},confirmIframe$3={pay:"Pagar",cancel:"Cancelar"},months$3={january:"Ene",february:"Feb",march:"Mar",april:"Abr",may:"May",june:"Jun",july:"Jul",august:"Ago",september:"Sep",october:"Oct",november:"Nov",december:"Dic"},box_open$3={skip:"Omitir",you_ve_got:"Obtuviste",button_reveal_reward:"Revelar recompensa",button_open_now:"Abrir ahora",button_save_inventory:"Guardar en inventario",button_unopened_boxes:"Inventario",recent_rewards:"Recientes",later_open_later_inventory:"Puedes abrirla más tarde en el inventario"},common$3={error:"¡Ups! Algo salió mal. Inténtalo de nuevo más tarde.",continue:"Continuar",ok:"OK",timeAgo:{sec_zero:"hace {{count}} segundos",sec_one:"hace {{count}} segundo",sec_two:"hace {{count}} segundos",sec_few:"hace {{count}} segundos",sec_many:"hace {{count}} segundos",sec_other:"hace {{count}} segundos",now:"Justo ahora",min_zero:"hace {{count}} minutos",min_one:"hace {{count}} minuto",min_two:"hace {{count}} minutos",min_few:"hace {{count}} minutos",min_many:"hace {{count}} minutos",min_other:"hace {{count}} minutos",h_zero:"hace {{count}} horas",h_one:"hace {{count}} hora",h_two:"hace {{count}} horas",h_few:"hace {{count}} horas",h_many:"hace {{count}} horas",h_other:"hace {{count}} horas",d_zero:"hace {{count}} días",d_one:"hace {{count}} día",d_two:"hace {{count}} días",d_few:"hace {{count}} días",d_many:"hace {{count}} días",d_other:"hace {{count}} días"}},snackbar$3={purchase:{blackHolePurchaseChest:"Compra",blackHolePurchaseLevel:"Compra",blackHolePurchaseAutoBurn:"Compra",walletPurchaseGems:"Compra",blackHoleBurnCoins:"Quemado",error:"No se pudo realizar la compra"},receiving:{claimedTask:"Recibido"}},purchaseAdsFreeModal$3={title:"Eliminar anuncios",disableAllInterruptions:"Desactiva todas las interrupciones en los juegos con una suscripción mensual recurrente. No te preocupes, ¡también tendrás la opción de activar los anuncios cuando quieras!",noInterruptionsInGames:"Sin interrupciones en los juegos con una suscripción recurrente.",activeRecurring:"Pagos recurrentes activos a {{price}}",aMonth:" al mes.",nextPayment:"Próximo pago {{date}}",activeUntil:"Activo hasta {{date}}",subscriptionPaused:"La suscripción está en pausa",resumeSubscription:"Reanudar suscripción",cancelSubscription:"Cancelar suscripción",continue:"Continuar",month:"{{price}} / mes",errorCancelSubscription:"No se pudo cancelar la suscripción. Inténtalo de nuevo"},levelInfoModal$3={title:"Tu nivel",description:"Gana experiencia jugando. Al subir de nivel obtienes cajas de botín, que pueden contener USDT, monedas o mejores cajas. Compite con otros jugadores para ganar USDT real cada semana.",action:"Entendido"},topUpModal$3={balance:"Saldo",topUpBalance:"Recargar gemas",coins:"monedas",gems:"gemas",topUp:"Recargar"},inventoryModal$3={title:"Inventario",description:"Es tu espacio de almacenamiento personal para todas las cajas de botín sin abrir. Toca cada imagen para revelar la recompensa dentro."},es={balance:balance$3,topUp:topUp$3,ads:ads$3,adsOn:adsOn$3,adsOff:adsOff$3,level:level$3,toLevelUp:toLevelUp$3,xpCounter:xpCounter$3,lootBox:lootBox$3,forLevel:forLevel$3,unopenedLootBox:unopenedLootBox$3,inventory:inventory$3,inventoryDescription:inventoryDescription$3,inventoryDescriptionEmpty:inventoryDescriptionEmpty$3,inventoryDescriptionEmptyButton:inventoryDescriptionEmptyButton$3,emptyBox:emptyBox$3,openItem:openItem$3,reward_type:reward_type$3,dates:dates$3,confirmIframe:confirmIframe$3,months:months$3,box_open:box_open$3,common:common$3,snackbar:snackbar$3,purchaseAdsFreeModal:purchaseAdsFreeModal$3,levelInfoModal:levelInfoModal$3,topUpModal:topUpModal$3,inventoryModal:inventoryModal$3},balance$2="बैलेंस",topUp$2="रिचार्ज",ads$2="विज्ञापन",adsOn$2="चालू",adsOff$2="बंद",level$2="स्तर",toLevelUp$2="लेवल अप तक",xpCounter$2="/ {{total}} XP",lootBox$2="लूट बॉक्स",forLevel$2="स्तर {{level}} के लिए",unopenedLootBox$2="बिना खोले गए लूट बॉक्स",inventory$2="इन्वेंटरी",inventoryDescription$2="यहां आपके सभी बिना खुले लूट बॉक्स मिलेंगे। इनाम पाने के लिए इमेज पर टैप करें: अंदर USDT, कॉइन्स या कोई दूसरा बॉक्स हो सकता है!",inventoryDescriptionEmpty$2="बिना खुले लूट बॉक्स यहां रखे जाएंगे। हर बॉक्स के अंदर USDT, कॉइन्स या कोई दूसरा लूट बॉक्स मिल सकता है। बॉक्स की रेयरिटी के आधार पर बेहतर इनाम मिलता है!",inventoryDescriptionEmptyButton$2="आपके पास अभी लूट बॉक्स नहीं हैं, <br/> लेकिन आप एक खरीद सकते हैं",emptyBox$2="खाली बॉक्स",openItem$2="आइटम खोलें",reward_type$2={coins:"{{count}} सिक्के",coins_one:"{{count}} सिक्का",coins_few:"{{count}} सिक्के",coins_many:"{{count}} सिक्के",coins_no_amount:"सिक्के",usdt_no_amount:"USDT",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} जेम",gems_one:"{{count}} जेम",gems_few:"{{count}} जेम्स",gems_many:"{{count}} जेम्स",gems_no_amount:"जेम्स",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"टेलीग्राम प्रीमियम",double_balance:"दोगुनी शेष राशि",box:"लूट बॉक्स",box_common:"बुनियादी",box_rare:"दुर्लभ",box_epic:"महाकाव्य",box_legend:"दंतकथा"},dates$2={today:"आज",yesterday:"कल"},confirmIframe$2={pay:"भुगतान करें",cancel:"रद्द करें"},months$2={january:"जन",february:"फ़र",march:"मार्च",april:"अप्रै",may:"मई",june:"जून",july:"जुला",august:"अग",september:"सितं",october:"अक्टू",november:"नवं",december:"दिसं"},box_open$2={skip:"छोड़ें",you_ve_got:"आपको मिला",button_reveal_reward:"पुरस्कार प्रकट करें",button_open_now:"अभी खोलें",button_save_inventory:"इन्वेंटरी में सहेजें",button_unopened_boxes:"अनपेट लूट बॉक्स",recent_rewards:"हाल के पुरस्कार",later_open_later_inventory:"आप इसे बाद में इन्वेंटरी में खोल सकते हैं"},common$2={error:"उफ़! कुछ गलत हो गया। कृपया बाद में फिर प्रयास करें।",continue:"जारी रखें",ok:"ठीक है",timeAgo:{sec_zero:"{{count}} सेकंड पहले",sec_one:"{{count}} सेकंड पहले",sec_two:"{{count}} सेकंड पहले",sec_few:"{{count}} सेकंड पहले",sec_many:"{{count}} सेकंड पहले",sec_other:"{{count}} सेकंड पहले",now:"अभी",min_zero:"{{count}} मिनट पहले",min_one:"{{count}} मिनट पहले",min_two:"{{count}} मिनट पहले",min_few:"{{count}} मिनट पहले",min_many:"{{count}} मिनट पहले",min_other:"{{count}} मिनट पहले",h_zero:"{{count}} घंटे पहले",h_one:"{{count}} घंटा पहले",h_two:"{{count}} घंटे पहले",h_few:"{{count}} घंटे पहले",h_many:"{{count}} घंटे पहले",h_other:"{{count}} घंटे पहले",d_zero:"{{count}} दिन पहले",d_one:"{{count}} दिन पहले",d_two:"{{count}} दिन पहले",d_few:"{{count}} दिन पहले",d_many:"{{count}} दिन पहले",d_other:"{{count}} दिन पहले"}},snackbar$2={purchase:{blackHolePurchaseChest:"खरीद",blackHolePurchaseLevel:"खरीद",blackHolePurchaseAutoBurn:"खरीद",walletPurchaseGems:"खरीद",blackHoleBurnCoins:"जलाया गया",error:"खरीदारी विफल रही"},receiving:{claimedTask:"प्राप्त"}},purchaseAdsFreeModal$2={title:"विज्ञापन हटाएँ",disableAllInterruptions:"मासिक आवर्ती सदस्यता के साथ खेलों में सभी बाधाएँ बंद करें। चिंता न करें, आप चाहें तो किसी भी समय विज्ञापन फिर से चालू कर सकते हैं!",noInterruptionsInGames:"आवर्ती सदस्यता के साथ खेलों में कोई व्यवधान नहीं।",activeRecurring:"सक्रिय आवर्ती भुगतान {{price}} पर",aMonth:" प्रति माह.",nextPayment:"अगला भुगतान {{date}}",activeUntil:"{{date}} तक सक्रिय",subscriptionPaused:"सदस्यता रोकी गई है",resumeSubscription:"सदस्यता फिर शुरू करें",cancelSubscription:"सदस्यता रद्द करें",continue:"जारी रखें",month:"{{price}} / माह",errorCancelSubscription:"सदस्यता रद्द नहीं हो सकी। कृपया पुनः प्रयास करें"},levelInfoModal$2={title:"आपका स्तर",description:"गेम खेलकर अनुभव अर्जित करें। लेवल बढ़ाने पर आपको लूट बॉक्स मिलते हैं जिनमें USDT, कॉइन्स या बेहतर लूट बॉक्स हो सकते हैं। हर सप्ताह वास्तविक USDT जीतने के लिए अन्य खिलाड़ियों से प्रतिस्पर्धा करें।",action:"समझ गया"},topUpModal$2={balance:"बैलेंस",topUpBalance:"जेम्स रिचार्ज करें",coins:"कॉइन्स",gems:"जेम्स",topUp:"रिचार्ज"},inventoryModal$2={title:"इन्वेंटरी",description:"यह आपके सभी बिना खुले लूट बॉक्स के लिए आपका व्यक्तिगत स्टोरेज स्पेस है। अंदर का इनाम प्रकट करने के लिए हर छवि पर टैप करें!"},hi={balance:balance$2,topUp:topUp$2,ads:ads$2,adsOn:adsOn$2,adsOff:adsOff$2,level:level$2,toLevelUp:toLevelUp$2,xpCounter:xpCounter$2,lootBox:lootBox$2,forLevel:forLevel$2,unopenedLootBox:unopenedLootBox$2,inventory:inventory$2,inventoryDescription:inventoryDescription$2,inventoryDescriptionEmpty:inventoryDescriptionEmpty$2,inventoryDescriptionEmptyButton:inventoryDescriptionEmptyButton$2,emptyBox:emptyBox$2,openItem:openItem$2,reward_type:reward_type$2,dates:dates$2,confirmIframe:confirmIframe$2,months:months$2,box_open:box_open$2,common:common$2,snackbar:snackbar$2,purchaseAdsFreeModal:purchaseAdsFreeModal$2,levelInfoModal:levelInfoModal$2,topUpModal:topUpModal$2,inventoryModal:inventoryModal$2},balance$1="Saldo",topUp$1="Recarregar",ads$1="Anúncios",adsOn$1="On",adsOff$1="Off",level$1="Nível",toLevelUp$1="para subir de nível",xpCounter$1="/ {{total}} XP",lootBox$1="Caixa de loot",forLevel$1="para o nível {{level}}",unopenedLootBox$1="Caixa de Loot Não Aberta",inventory$1="Inventário",inventoryDescription$1="Aqui voce encontra todas as suas caixas de loot nao abertas. Toque na imagem para tentar a sorte: voce pode encontrar USDT, moedas ou outra caixa dentro.",inventoryDescriptionEmpty$1="As caixas de loot nao abertas ficarao aqui. Dentro de cada uma voce pode encontrar USDT, moedas ou outra caixa de loot. Recompensas melhores conforme a raridade da caixa.",inventoryDescriptionEmptyButton$1="Voce ainda nao tem caixas de loot, <br/> mas pode comprar uma",emptyBox$1="Caixa vazia",openItem$1="Abrir item",reward_type$1={coins:"{{count}} moeda",coins_one:"{{count}} moeda",coins_few:"{{count}} moedas",coins_many:"{{count}} moedas",usdt_no_amount:"USDT",coins_no_amount:"Moedas",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} gema",gems_one:"{{count}} gema",gems_few:"{{count}} gemas",gems_many:"{{count}} gemas",gems_no_amount:"Gemas",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Telegram Premium",double_balance:"Saldo Duplo",box:"CAIXA DE LOOT",box_common:"BÁSICA",box_rare:"RARA",box_epic:"ÉPICA",box_legend:"LENDÁRIA"},dates$1={today:"Hoje",yesterday:"Ontem"},confirmIframe$1={pay:"Pagar",cancel:"Cancelar"},months$1={january:"Jan",february:"Fev",march:"Mar",april:"Abr",may:"Mai",june:"Jun",july:"Jul",august:"Ago",september:"Set",october:"Out",november:"Nov",december:"Dez"},box_open$1={skip:"Pular",you_ve_got:"Você recebeu",button_reveal_reward:"Revelar Recompensa",button_open_now:"Abrir Agora",button_save_inventory:"Salvar no Inventário",button_unopened_boxes:"Inventário",recent_rewards:"Recentes",later_open_later_inventory:"Você pode abrir mais tarde no inventário"},common$1={error:"Ops! Algo deu errado. Tente novamente mais tarde.",continue:"Continuar",ok:"OK",timeAgo:{sec_zero:"há {{count}} segundos",sec_one:"há {{count}} segundo",sec_two:"há {{count}} segundos",sec_few:"há {{count}} segundos",sec_many:"há {{count}} segundos",sec_other:"há {{count}} segundos",now:"Agora mesmo",min_zero:"há {{count}} minutos",min_one:"há {{count}} minuto",min_two:"há {{count}} minutos",min_few:"há {{count}} minutos",min_many:"há {{count}} minutos",min_other:"há {{count}} minutos",h_zero:"há {{count}} horas",h_one:"há {{count}} hora",h_two:"há {{count}} horas",h_few:"há {{count}} horas",h_many:"há {{count}} horas",h_other:"há {{count}} horas",d_zero:"há {{count}} dias",d_one:"há {{count}} dia",d_two:"há {{count}} dias",d_few:"há {{count}} dias",d_many:"há {{count}} dias",d_other:"há {{count}} dias"}},snackbar$1={purchase:{blackHolePurchaseChest:"Compra",blackHolePurchaseLevel:"Compra",blackHolePurchaseAutoBurn:"Compra",walletPurchaseGems:"Compra",blackHoleBurnCoins:"Queimado",error:"Falha ao realizar a compra"},receiving:{claimedTask:"Recebido"}},purchaseAdsFreeModal$1={title:"Remover anúncios",disableAllInterruptions:"Desative todas as interrupções nos jogos com uma assinatura mensal recorrente. Sem preocupações, você também poderá ligar os anúncios quando quiser!",noInterruptionsInGames:"Sem interrupções nos jogos com uma assinatura recorrente.",activeRecurring:"Pagamentos recorrentes ativos em {{price}}",aMonth:" por mês.",nextPayment:"Próximo pagamento {{date}}",activeUntil:"Ativo até {{date}}",subscriptionPaused:"A assinatura está em pausa",resumeSubscription:"Retomar assinatura",cancelSubscription:"Cancelar assinatura",continue:"Continuar",month:"{{price}} / mês",errorCancelSubscription:"Falha ao cancelar a assinatura. Tente novamente"},levelInfoModal$1={title:"Seu nível",description:"Ganhe experiência jogando. Ao subir de nível você recebe caixas de loot, que podem conter USDT, moedas ou caixas melhores. Compita com outros jogadores para ganhar USDT real toda semana.",action:"Entendi"},topUpModal$1={balance:"Saldo",topUpBalance:"Recarregar gemas",coins:"moedas",gems:"gemas",topUp:"Recarregar"},inventoryModal$1={title:"Inventário",description:"É o seu espaço pessoal de armazenamento para todas as caixas de loot não abertas. Toque em cada imagem para revelar a recompensa dentro!"},pt={balance:balance$1,topUp:topUp$1,ads:ads$1,adsOn:adsOn$1,adsOff:adsOff$1,level:level$1,toLevelUp:toLevelUp$1,xpCounter:xpCounter$1,lootBox:lootBox$1,forLevel:forLevel$1,unopenedLootBox:unopenedLootBox$1,inventory:inventory$1,inventoryDescription:inventoryDescription$1,inventoryDescriptionEmpty:inventoryDescriptionEmpty$1,inventoryDescriptionEmptyButton:inventoryDescriptionEmptyButton$1,emptyBox:emptyBox$1,openItem:openItem$1,reward_type:reward_type$1,dates:dates$1,confirmIframe:confirmIframe$1,months:months$1,box_open:box_open$1,common:common$1,snackbar:snackbar$1,purchaseAdsFreeModal:purchaseAdsFreeModal$1,levelInfoModal:levelInfoModal$1,topUpModal:topUpModal$1,inventoryModal:inventoryModal$1},balance="Баланс",topUp="Пополнить",ads="Реклама",adsOn="Вкл.",adsOff="Выкл.",level="Уровень",toLevelUp="до повышения уровня",xpCounter="/ {{total}} XP",lootBox="Лутбокс",forLevel="для уровня {{level}}",unopenedLootBox="Неоткрытый лутбокс",inventory="Инвентарь",inventoryDescription="Здесь находятся все ваши неоткрытые лутбоксы. Нажмите на изображение, чтобы испытать удачу: внутри может быть USDT, монеты или другой бокс!",inventoryDescriptionEmpty="Неоткрытые лутбоксы будут храниться здесь. Внутри каждого из них могут быть USDT, монеты или другой лутбокс. Чем выше редкость бокса, тем лучше награда!",inventoryDescriptionEmptyButton="У вас пока нет лутбоксов, <br/> но вы можете купить один",emptyBox="Пустой бокс",openItem="Открыть предмет",reward_type={coins:"{{count}} монета",coins_one:"{{count}} монета",coins_few:"{{count}} монеты",coins_many:"{{count}} монет",usdt_no_amount:"USDT",coins_no_amount:"Монеты",usdt:"{{count}} USDT",usdt_one:"{{count}} USDT",usdt_few:"{{count}} USDT",usdt_many:"{{count}} USDT",gems:"{{count}} алмаз",gems_one:"{{count}} алмаз",gems_few:"{{count}} алмаза",gems_many:"{{count}} алмазов",gems_no_amount:"Алмазы",ton:"{{count}} TON",ton_one:"{{count}} TON",ton_few:"{{count}} TON",ton_many:"{{count}} TON",telegram_premium:"Телеграм Премиум",double_balance:"Двойной баланс",box:"ЛУТ БОКС",box_common:"ОБЫЧНЫЙ",box_rare:"РЕДКИЙ",box_epic:"ЭПИК",box_legend:"ЛЕГЕНДАРНЫЙ"},dates={today:"Сегодня",yesterday:"Вчера"},confirmIframe={pay:"Оплатить",cancel:"Отменить"},months={january:"янв",february:"фев",march:"мар",april:"апр",may:"май",june:"июн",july:"июл",august:"авг",september:"сен",october:"окт",november:"ноя",december:"дек"},box_open={skip:"Пропустить",you_ve_got:"Получено",button_reveal_reward:"Узнать награду",button_open_now:"Открыть",button_save_inventory:"Оставить в инвентаре",button_unopened_boxes:"Неоткрытые лутбоксы",recent_rewards:"Недавние",later_open_later_inventory:"Можно открыть его позже в инвентаре"},common={error:"Упс! Что-то пошло не так. Попробуй позже.",continue:"Продолжить",ok:"OK",timeAgo:{sec_zero:"{{count}} секунд назад",sec_one:"{{count}} секунду назад",sec_two:"{{count}} секунды назад",sec_few:"{{count}} секунды назад",sec_many:"{{count}} секунд назад",sec_other:"{{count}} секунд назад",now:"Только что",min_zero:"{{count}} минут назад",min_one:"{{count}} минуту назад",min_two:"{{count}} минуты назад",min_few:"{{count}} минуты назад",min_many:"{{count}} минут назад",min_other:"{{count}} минут назад",h_zero:"{{count}} часов назад",h_one:"{{count}} час назад",h_two:"{{count}} часа назад",h_few:"{{count}} часа назад",h_many:"{{count}} часов назад",h_other:"{{count}} часов назад",d_zero:"{{count}} дней назад",d_one:"{{count}} день назад",d_two:"{{count}} дня назад",d_few:"{{count}} дня назад",d_many:"{{count}} дней назад",d_other:"{{count}} дней назад"}},snackbar={purchase:{blackHolePurchaseChest:"Покупка",blackHolePurchaseLevel:"Покупка",blackHolePurchaseAutoBurn:"Покупка",walletPurchaseGems:"Покупка",blackHoleBurnCoins:"Сожжено",error:"Не удалось совершить покупку"},receiving:{claimedTask:"Получено"}},purchaseAdsFreeModal={title:"Удалить рекламу",disableAllInterruptions:"Отключите все прерывания в играх с ежемесячной подпиской. Не волнуйтесь, при желании вы всегда сможете снова включить рекламу!",noInterruptionsInGames:"Без прерываний в играх при оформленной подписке.",activeRecurring:"Активные регулярные платежи по цене {{price}}",aMonth:" в месяц.",nextPayment:"Следующий платеж {{date}}",activeUntil:"Активна до {{date}}",subscriptionPaused:"Подписка приостановлена",resumeSubscription:"Возобновить подписку",cancelSubscription:"Отменить подписку",continue:"Продолжить",month:"{{price}} / месяц",errorCancelSubscription:"Не удалось отменить подписку. Пожалуйста, попробуйте еще раз"},levelInfoModal={title:"Ваш уровень",description:"Получайте опыт, играя в игры. За повышение уровня вы получаете лутбоксы, в которых могут быть USDT, монеты или более ценные лутбоксы. Соревнуйтесь с другими игроками, чтобы выигрывать реальные USDT каждую неделю.",action:"Понял"},topUpModal={balance:"Баланс",topUpBalance:"Пополнить баланс",coins:"монет",gems:"алмазов",topUp:"Пополнить"},inventoryModal={title:"Инвентарь",description:"Это твоё персональное хранилище для неоткрытых лутбоксов. Нажми на каждый, чтобы узнать, какая внутри награда!"},ru={balance,topUp,ads,adsOn,adsOff,level,toLevelUp,xpCounter,lootBox,forLevel,unopenedLootBox,inventory,inventoryDescription,inventoryDescriptionEmpty,inventoryDescriptionEmptyButton,emptyBox,openItem,reward_type,dates,confirmIframe,months,box_open,common,snackbar,purchaseAdsFreeModal,levelInfoModal,topUpModal,inventoryModal};var define_process_env_default$2={NODE_ENV:"production",version:"1.94.2",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const resources={en:{translation:en},ru:{translation:ru},hi:{translation:hi},es:{translation:es},pt:{translation:pt}};instance.use(initReactI18next).init({resources,fallbackLng:"en",supportedLngs:supportedLanguages,debug:define_process_env_default$2.NODE_ENV==="development",interpolation:{escapeValue:!1}});const translationsTyped=(o,l)=>instance.t(o,l),PROVIDER_COLORS={Orbit:"#3b82f6",TMA:"#22c55e",Monetag:"#f97316",Adsgram:"#a855f7",Gigapub:"#14b8a6",Banner:"#ec4899",SDK:"#6366f1"},ADS_BADGE_STYLE="background:#1e293b;color:#38bdf8;padding:2px 6px;border-radius:3px;font-weight:bold";function getProviderStyle(o){return`background:${PROVIDER_COLORS[o]||"#94a3b8"};color:#fff;padding:2px 6px;border-radius:3px;font-weight:bold`}function formatTimestamp(){return`${(performance.now()/1e3).toFixed(2)}s`}function makeFlowId(){return Math.random().toString(36).slice(2,6)}function createAdLogger(o){const l=getProviderStyle(o);function u(d,f,h,m){const g=d==="warn"?"color:#f59e0b;font-weight:bold":d==="error"?"color:#ef4444;font-weight:bold":"color:inherit",v=d==="info"?console.log:d==="warn"?console.warn:console.error,x=`%c ADS %c ${o} %c ${m}${f} [${formatTimestamp()}]`;h!==void 0?v(x,ADS_BADGE_STYLE,l,g,h):v(x,ADS_BADGE_STYLE,l,g)}return{info(d,f){u("info",d,f,"")},warn(d,f){u("warn",d,f,"")},error(d,f){u("error",d,f,"")},flow(d){const f=makeFlowId(),h=`${d}#${f}`,m=`[${h}] `,g=performance.now();let v=!1;return u("info","started",void 0,m),{tag:h,info(x,b){v||u("info",x,b,m)},warn(x,b){v||u("warn",x,b,m)},error(x,b){v||u("error",x,b,m)},end(x){if(v)return;v=!0;const b=Math.round(performance.now()-g),S=(x==null?void 0:x.status)??"ok";u(S==="fail"?"warn":"info",`${S} — ${b}ms`,x==null?void 0:x.data,m)}}}}}const log$5=createAdLogger("Banner");class BannerManager{constructor(l){this.containerId=(l==null?void 0:l.containerId)||"overlay-banner-bottom",this.bannerHeight=(l==null?void 0:l.height)||60,this.animationDuration=(l==null?void 0:l.animationDuration)||300}async checkBannerPermission(l){try{const u=await l();return u.ads_free?(log$5.info("Banner disabled: user has ads_free flag"),!1):Array.isArray(u==null?void 0:u.audiences)&&u.audiences.includes("banner_test")?!0:(log$5.info("Banner test flag not found in user profile audiences"),!1)}catch(u){return log$5.error("Error checking banner permission",u),!1}}async setBanner(l,u){try{if(!await this.checkBannerPermission(u))return;const f=document.getElementById(this.containerId);if(!f){log$5.warn(`Banner container with id "${this.containerId}" not found`);return}f.classList.remove("cssdk-banner-hide"),typeof l=="string"?f.innerHTML=l:(f.innerHTML="",f.appendChild(l)),document.documentElement.style.setProperty("--banner-bottom-height",`${this.bannerHeight}px`),requestAnimationFrame(()=>{f.classList.add("cssdk-banner-show")})}catch(d){log$5.error("setBanner error",d)}}createDefaultContent(){return`
136
136
  <div style="
137
137
  display: flex;
138
138
  align-items: center;
@@ -152,4 +152,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
152
152
  <div>Реклама</div>
153
153
  </div>
154
154
  </div>
155
- `}clearBanner(){const l=document.getElementById(this.containerId);if(!l){log$5.warn(`Banner container with id "${this.containerId}" not found`);return}l.classList.add("cssdk-banner-hide"),l.classList.remove("cssdk-banner-show"),setTimeout(()=>{l.innerHTML="",document.documentElement.style.setProperty("--banner-bottom-height","0px")},this.animationDuration)}getHeight(){return this.bannerHeight}isVisible(){const l=document.getElementById(this.containerId);return(l==null?void 0:l.classList.contains("cssdk-banner-show"))||!1}}const TELEGRAM_SCRIPT_URL="https://telegram.org/js/telegram-web-app.js?59";async function ensureTelegramWebApp(){var o;return(o=window.Telegram)!=null&&o.WebApp?window.Telegram.WebApp:new Promise((l,u)=>{const d=document.querySelector('script[src*="telegram-web-app.js"]');if(d){d.addEventListener("load",()=>{var h;(h=window.Telegram)!=null&&h.WebApp?l(window.Telegram.WebApp):u(new Error("Telegram WebApp not available after script load"))}),d.addEventListener("error",()=>u(new Error("Failed to load Telegram WebApp script")));return}const f=document.createElement("script");f.src=TELEGRAM_SCRIPT_URL,f.async=!1,f.onload=()=>{var h;(h=window.Telegram)!=null&&h.WebApp?l(window.Telegram.WebApp):u(new Error("Telegram WebApp not available after script load"))},f.onerror=()=>u(new Error("Failed to load Telegram WebApp script")),document.head.appendChild(f)})}function getTelegramWebApp(){var l;const o=(l=window.Telegram)==null?void 0:l.WebApp;if(!o)throw new Error("Telegram WebApp is not available. Ensure ensureTelegramWebApp() was awaited before calling this.");return o}const DEFAULT_CONFIG={inactivityTimeout:15e3,activityScoreThreshold:10,motionThreshold:.05,gyroscopeThreshold:.05,checkInterval:1e3,maxActivityScore:15,scoreDecayRate:.95,autoclickerDetection:{enabled:!0,maxIdenticalIntervals:5,minTimingVariation:10,maxIdenticalPositions:3,requiredMotionThreshold:.5}};class ActivityDetector{constructor(l={}){this.listeners=new Set,this.checkInterval=null,this.domEventListeners=[],this.lastMotionData=null,this.lastGyroscopeData=null,this.config={...DEFAULT_CONFIG,...l};try{this.isTelegramAvailable=!!getTelegramWebApp().platform}catch{this.isTelegramAvailable=!1}this.state=this.initializeState(),this.setupActivityDetection()}initializeState(){const l=this.detectPlatform(),u=this.checkMotionSupport(),d=this.checkGyroscopeSupport();return{isActive:!0,lastActivityTime:Date.now(),activityScore:100,platform:l,hasMotionSupport:u,hasGyroscopeSupport:d,autoclickerDetected:!1,clickPattern:{lastClickTime:0,lastClickPosition:{x:0,y:0},timingHistory:[],positionHistory:[]}}}detectPlatform(){if(this.isTelegramAvailable){const u=getTelegramWebApp().platform;return u==="android"||u==="ios"?"mobile":"desktop"}const l=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipad|phone/i.test(l)?"mobile":"desktop"}checkMotionSupport(){return this.isTelegramAvailable?!!getTelegramWebApp().isVersionAtLeast("6.1"):!1}checkGyroscopeSupport(){return this.isTelegramAvailable?!!getTelegramWebApp().isVersionAtLeast("6.1"):!1}setupActivityDetection(){this.setupDOMEvents(),this.setupTelegramSensors(),this.startPeriodicCheck()}setupDOMEvents(){["mousedown","mousemove","click","touchstart","touchmove","touchend","keydown","keyup","scroll","wheel","focus","blur"].forEach(u=>{const d=this.createActivityListener();document.addEventListener(u,d,{passive:!0}),this.domEventListeners.push({event:u,listener:d})})}createActivityListener(){return l=>{if(this.config.autoclickerDetection.enabled&&this.detectAutoclicker(l)){this.state={...this.state,autoclickerDetected:!0};return}this.updateActivity(5)}}detectAutoclicker(l){const u=Date.now(),d=this.getEventPosition(l),f=u-this.state.clickPattern.lastClickTime,h=[...this.state.clickPattern.timingHistory,f],m=this.countIdenticalIntervals(h),g=this.countIdenticalPositions(d),v=this.state.motionData&&Math.abs(this.state.motionData.x)+Math.abs(this.state.motionData.y)+Math.abs(this.state.motionData.z)>this.config.autoclickerDetection.requiredMotionThreshold,x=m>this.config.autoclickerDetection.maxIdenticalIntervals||g>this.config.autoclickerDetection.maxIdenticalPositions||this.state.platform==="mobile"&&!v;return this.state.clickPattern={lastClickTime:u,lastClickPosition:d,timingHistory:h.slice(-10),positionHistory:[...this.state.clickPattern.positionHistory,{...d,time:u}].slice(-10)},x}countIdenticalIntervals(l){if(l.length<2)return 0;let u=0;for(let d=1;d<l.length;d++)if(Math.abs(l[d]-l[d-1])<this.config.autoclickerDetection.minTimingVariation?u++:u=0,u>=this.config.autoclickerDetection.maxIdenticalIntervals)return u;return u}countIdenticalPositions(l){const u=this.state.clickPattern.positionHistory;if(u.length===0)return 0;let d=0;for(let f=u.length-1;f>=0;f--){const h=u[f];if(Math.abs(l.x-h.x)<2&&Math.abs(l.y-h.y)<2)d++;else break;if(d>=this.config.autoclickerDetection.maxIdenticalPositions)return d}return d}getEventPosition(l){if(l.type.includes("touch")){const u=l;if(u.touches.length>0)return{x:u.touches[0].clientX,y:u.touches[0].clientY}}else if(l.type.includes("mouse")){const u=l;return{x:u.clientX,y:u.clientY}}return{x:0,y:0}}setupTelegramSensors(){if(!this.isTelegramAvailable){console.warn("Activity Detection: Telegram WebApp not available. Motion and gyroscope sensors will not work.");return}const l=getTelegramWebApp();this.state.hasMotionSupport&&l.Accelerometer&&l.Accelerometer.start({refresh_rate:1e3},u=>{u&&l.onEvent("accelerometerChanged",()=>{const d=l.Accelerometer;d&&d.isStarted&&this.handleMotionData(d.x,d.y,d.z)})}),this.state.hasGyroscopeSupport&&l.DeviceOrientation&&l.DeviceOrientation.start({refresh_rate:1e3,need_absolute:!1},u=>{u&&l.onEvent("deviceOrientationChanged",()=>{const d=l.DeviceOrientation;d&&d.isStarted&&this.handleGyroscopeData(d.alpha,d.beta,d.gamma)})})}handleMotionData(l,u,d){if(this.lastMotionData){const f=Math.abs(l-this.lastMotionData.x),h=Math.abs(u-this.lastMotionData.y),m=Math.abs(d-this.lastMotionData.z),g=f+h+m;if(g>this.config.motionThreshold){const v=Math.min(this.config.maxActivityScore,g*10);this.updateActivity(v)}}this.lastMotionData={x:l,y:u,z:d},this.state={...this.state,motionData:{x:l,y:u,z:d}},this.state.autoclickerDetected&&this.config.autoclickerDetection.enabled&&Math.abs(l)+Math.abs(u)+Math.abs(d)>this.config.autoclickerDetection.requiredMotionThreshold&&(this.state={...this.state,autoclickerDetected:!1})}handleGyroscopeData(l,u,d){if(this.lastGyroscopeData){const f=Math.abs(l-this.lastGyroscopeData.alpha),h=Math.abs(u-this.lastGyroscopeData.beta),m=Math.abs(d-this.lastGyroscopeData.gamma),g=f+h+m;if(g>this.config.gyroscopeThreshold){const v=Math.min(this.config.maxActivityScore,g*5);this.updateActivity(v)}}this.lastGyroscopeData={alpha:l,beta:u,gamma:d},this.state={...this.state,gyroscopeData:{alpha:l,beta:u,gamma:d}}}updateActivity(l){const u=Date.now(),d=u-this.state.lastActivityTime,f=Math.max(0,1-d/this.config.inactivityTimeout),h=this.state.activityScore*f,m=Math.min(100,h+l);this.state={...this.state,isActive:m>=this.config.activityScoreThreshold,lastActivityTime:u,activityScore:m},this.notifyListeners()}startPeriodicCheck(){this.checkInterval=setInterval(()=>{const u=Date.now()-this.state.lastActivityTime,d=Math.max(0,1-u/this.config.inactivityTimeout),f=this.state.activityScore*d*this.config.scoreDecayRate,h=f>=this.config.activityScoreThreshold;(this.state.isActive!==h||Math.abs(this.state.activityScore-f)>1)&&(this.state={...this.state,isActive:h,activityScore:Math.max(0,f)},this.notifyListeners())},this.config.checkInterval)}notifyListeners(){this.listeners.forEach(l=>{try{l(this.state)}catch(u){console.error("Error in activity listener:",u)}})}subscribe(l){return this.listeners.add(l),()=>{this.listeners.delete(l)}}getState(){return{...this.state}}resetAutoclickerDetection(){this.state={...this.state,autoclickerDetected:!1,clickPattern:{lastClickTime:0,lastClickPosition:{x:0,y:0},timingHistory:[],positionHistory:[]}}}updateConfig(l){this.config={...this.config,...l}}destroy(){if(this.checkInterval&&(clearInterval(this.checkInterval),this.checkInterval=null),this.domEventListeners.forEach(({event:l,listener:u})=>{document.removeEventListener(l,u)}),this.domEventListeners=[],this.isTelegramAvailable){const l=getTelegramWebApp();l.Accelerometer&&l.Accelerometer.isStarted&&l.Accelerometer.stop(),l.DeviceOrientation&&l.DeviceOrientation.isStarted&&l.DeviceOrientation.stop()}this.listeners.clear()}}let activityDetectorInstance=null;function getActivityDetector(o){return activityDetectorInstance||(activityDetectorInstance=new ActivityDetector(o)),activityDetectorInstance}const log$4=createAdLogger("Adsgram");async function showAdsgramAdWithTimeout(o){if(!o)return log$4.error("Ad controller not available"),analytics.track("ad_show_error",{message:"Adsgram Ad Controller not available",error_type:"controller_unavailable",error_code:"controller_unavailable",...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram"}),!1;const l=o,u=log$4.flow("Showing Ad");return new Promise(d=>{const f=setTimeout(()=>{u.error("Ad request timed out after 5s"),u.end({status:"fail"}),analytics.track("ad_show_error",{message:"Adsgram ad request timed out after 5 seconds",error_type:"timeout",error_code:"timeout",timeout_duration:5e3,...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram"}),d(!1)},5e3),h=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram"}),u.info("Starting ad display..."),l.show().then(m=>{clearTimeout(f),m.done?(u.info("Ad finished successfully",{state:m.state,description:m.description}),u.end({status:"ok"}),analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram",duration_ms:Math.round(performance.now()-h)}),d(!0)):(u.warn("Ad was not completed",{state:m.state,description:m.description}),u.end({status:"fail"}),analytics.track("ad_show_error",{message:"Adsgram ad was not completed.",error_type:"not_completed",error_code:"not_completed",result:m,...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram"}),d(!1))}).catch(m=>{clearTimeout(f),u.error("Ad error",{error:m==null?void 0:m.error,state:m==null?void 0:m.state,description:m==null?void 0:m.description}),u.end({status:"fail"}),analytics.track("ad_show_error",{message:"Adsgram ad threw an error",error_type:"exception",error_code:"exception",error:(m==null?void 0:m.error)||String(m),...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram"}),d(!1)})})}const SERVE_PATH="/api/v1/exchange/serve",CLIENT_EVENT_PATH="/api/v1/exchange/client-event",defaultConfig={baseUrl:"",getInitData:()=>{var o,l;return typeof window<"u"&&((l=(o=window.Telegram)==null?void 0:o.WebApp)==null?void 0:l.initData)||""},getAuthData:()=>null,getBotId:()=>null};let config={...defaultConfig};function configureExchangeClient(o){config={baseUrl:o.baseUrl??defaultConfig.baseUrl,getInitData:o.getInitData??defaultConfig.getInitData,getAuthData:o.getAuthData??defaultConfig.getAuthData,getBotId:o.getBotId??defaultConfig.getBotId}}function buildHeaders(){var h,m;const o={"content-type":"application/json"},l=((h=config.getAuthData)==null?void 0:h.call(config))??null,u=config.getInitData(),d=l||u;d&&(o["X-Auth"]=d);const f=((m=config.getBotId)==null?void 0:m.call(config))??null;return f&&(o["X-Bot-ID"]=f),o}function buildUrl(o){if(!config.baseUrl)return o;const l=config.baseUrl.replace(/\/+$/,""),u=o.startsWith("/")?o:`/${o}`;return`${l}${u}`}async function exchangeServe(o){const l=await fetch(buildUrl(SERVE_PATH),{method:"POST",headers:buildHeaders(),body:JSON.stringify(o)});if(!l.ok){const u=await l.text().catch(()=>"");throw new Error(`exchange serve ${l.status}: ${u}`)}return l.json()}async function postClientEvents(o){o.length!==0&&await fetch(buildUrl(CLIENT_EVENT_PATH),{method:"POST",headers:buildHeaders(),keepalive:!0,body:JSON.stringify({events:o})})}const cache=new Map;function loadAdapter(o){let l=cache.get(o);return l||(l=importAdapter(o),cache.set(o,l)),l}async function importAdapter(o){switch(o){case"monetag":return(await Promise.resolve().then(()=>monetag)).default;case"gigapub":return(await Promise.resolve().then(()=>gigapub)).default;case"own_video":return(await Promise.resolve().then(()=>own_video)).default;default:throw new Error(`unknown provider ${String(o)}`)}}const FLUSH_INTERVAL_MS=5e3,BATCH_SIZE=20,MAX_QUEUE=100;class ExchangeTelemetryBatcher{constructor(){this.queue=[],this.timer=null,this.inFlight=null,this.started=!1,this.flushOnHide=()=>{if(this.queue.length===0)return;const l=this.queue.splice(0,BATCH_SIZE);postClientEvents(l).catch(()=>{})},this.onVisibilityChange=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&this.flushOnHide()}}start(){this.started||(this.started=!0,typeof window<"u"&&(this.timer=setInterval(()=>{this.flush()},FLUSH_INTERVAL_MS),window.addEventListener("pagehide",this.flushOnHide)),typeof document<"u"&&document.addEventListener("visibilitychange",this.onVisibilityChange))}stop(){this.started&&(this.started=!1,this.timer!==null&&(clearInterval(this.timer),this.timer=null),typeof document<"u"&&document.removeEventListener("visibilitychange",this.onVisibilityChange),typeof window<"u"&&window.removeEventListener("pagehide",this.flushOnHide))}track(l){const u={...l,ts:l.ts??new Date().toISOString()};for(this.queue.push(u);this.queue.length>MAX_QUEUE;)this.queue.shift();this.queue.length>=BATCH_SIZE&&this.flush()}async flush(){if(this.inFlight)return this.inFlight;if(this.queue.length===0)return;const l=this.queue.splice(0,BATCH_SIZE);return this.inFlight=postClientEvents(l).catch(()=>{}).finally(()=>{this.inFlight=null}),this.inFlight}_resetForTesting(){this.queue=[],this.inFlight=null,this.stop()}}const telemetry=new ExchangeTelemetryBatcher;class FallbackToHardcoded extends Error{constructor(){super("exchange returned use_hardcoded fallback"),this.name="FallbackToHardcoded"}}async function exchangeDispatch(o,l){var h;telemetry.start();let u;try{u=await exchangeServe(o)}catch(m){return telemetry.track({kind:"client_failure",reason:m instanceof Error?`serve_request_failed: ${m.message}`:"serve_request_failed"}),!1}if(!u.fill)return telemetry.track({kind:"client_failure",reason:u.reason||"no_fill"}),!1;if(telemetry.track({kind:"decision_received",impression_id:u.impression_id,provider:u.provider}),((h=u.payload)==null?void 0:h.use_hardcoded)===!0)throw new FallbackToHardcoded;telemetry.track({kind:"provider_load_start",provider:u.provider});let d;try{d=await loadAdapter(u.provider),telemetry.track({kind:"provider_load_ok",provider:u.provider})}catch(m){return telemetry.track({kind:"provider_load_fail",provider:u.provider,reason:m instanceof Error?m.message:String(m)}),!1}const f=await d.show(u.impression_id,u.payload,l);if(f.ok)return telemetry.track({kind:"client_completion",impression_id:u.impression_id,mint_token:u.mint_token,provider:u.provider,duration_ms:Math.round(f.durationMs)}),!0;if(u.fallback){telemetry.track({kind:"fallback_attempted",provider:u.fallback.provider});let m;try{m=await loadAdapter(u.fallback.provider)}catch(v){return telemetry.track({kind:"provider_load_fail",provider:u.fallback.provider,reason:v instanceof Error?v.message:String(v)}),telemetry.track({kind:"client_failure",impression_id:u.impression_id,provider:u.provider,reason:f.reason}),!1}const g=await m.show(u.impression_id,u.fallback.payload,l);return g.ok?(telemetry.track({kind:"client_completion",impression_id:u.impression_id,mint_token:u.fallback.mint_token,provider:u.fallback.provider,duration_ms:Math.round(g.durationMs)}),!0):(telemetry.track({kind:"client_failure",impression_id:u.impression_id,provider:u.fallback.provider,reason:g.reason}),!1)}return telemetry.track({kind:"client_failure",impression_id:u.impression_id,provider:u.provider,reason:f.reason}),!1}const log$3=createAdLogger("Gigapub");function parseProjectId(o){const l=document.createElement("div");l.innerHTML=o;const u=l.querySelector("script");if(!u)throw new Error("Gigapub: no script tag found in gigapub configuration.");const f=(u.getAttribute("src")||"").match(/[?&]id=([^&]+)/);if(f)return f[1];const h=u.getAttribute("data-project-id");if(h)return h;throw new Error("Gigapub: could not parse project id from script.")}async function initGigapubAds(o){const l=log$3.flow("Initialization"),u=parseProjectId(o);l.info("Parsed project ID",{projectId:u});const d=document.createElement("script");return d.setAttribute("data-project-id",u),d.text="!function(){var s=document.currentScript,p=s.getAttribute('data-project-id')||'default';var d=['https://ad.gigapub.tech','https://ru-ad.gigapub.tech'],i=0,t,sc;function l(){sc=document.createElement('script');sc.async=true;sc.src=d[i]+'/script?id='+p;clearTimeout(t);t=setTimeout(function(){sc.onload=sc.onerror=null;sc.src='';if(++i<d.length)l()},15000);sc.onload=function(){clearTimeout(t)};sc.onerror=function(){clearTimeout(t);if(++i<d.length)l()};document.head.appendChild(sc)}l()}()",new Promise((f,h)=>{document.head.appendChild(d),l.info("Multi-CDN script appended to head");const m=Date.now(),g=setInterval(()=>{if(window.showGiga&&typeof window.showGiga=="function")clearInterval(g),l.end({status:"ok",data:{reason:"showGiga found"}}),f();else if(Date.now()-m>35e3){clearInterval(g);const v=new Error("Gigapub: showGiga function did not appear on window object within timeout.");l.error("Init timeout — showGiga not found after 35s"),l.end({status:"fail"}),h(v)}},100)})}async function showGigapubAd(o,l,u,d){const f=u??crypto.randomUUID(),h=d??l;if(!window.showGiga||typeof window.showGiga!="function")return o?(log$3.warn("showGiga not available, using fallback",{transactionId:f}),analytics.track("ad_show_fallback",{message:"Gigapub showGiga function not available, using fallback.",...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:f,placement_id:l}),await o()):(analytics.track("ad_show_error",{message:"Gigapub showGiga function not available",error_type:"function_unavailable",error_code:"function_unavailable",...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:f,placement_id:l}),!1);const m=log$3.flow("Showing Ad");return m.info("Starting ad display",{transactionId:f,placementId:l}),new Promise(g=>{const v=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:f,placement_id:l}),window.showGiga({transactionId:f,showTag:h}).then(()=>{m.info("Ad finished successfully",{transactionId:f,placementId:l}),m.end({status:"ok"}),analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:f,placement_id:l,duration_ms:Math.round(performance.now()-v)}),g(!0)}).catch(x=>{m.error("Ad error",{error:x,transactionId:f,placementId:l}),m.end({status:"fail"}),analytics.track("ad_show_error",{message:"Gigapub ad failed or was skipped",error_type:"exception",error_code:"exception",error:x==null?void 0:x.toString(),error_message:(x==null?void 0:x.message)||"Unknown error",...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:f,placement_id:l}),g(!1)})})}const log$2=createAdLogger("Monetag");async function initMonetagAds(o){const l=log$2.flow("Initialization");try{const u=document.createElement("div");u.innerHTML=o;const d=u.firstElementChild;if(d){const f=d.dataset.sdk||null,h=document.createElement("script");for(let m=0;m<d.attributes.length;m++){const g=d.attributes[m];h.setAttribute(g.name,g.value)}return d.text&&(h.text=d.text),await new Promise((m,g)=>{if(!f){const x=new Error("Monetag: ad function name not found in script tag");return l.error("Ad function name not found in script tag"),l.end({status:"fail"}),g(x)}const v=f;l.info("Ad function name found",{fnName:v}),h.onload=()=>{l.info("Script loaded, waiting for function on window...");const x=Date.now(),b=setInterval(()=>{if(typeof window[v]=="function")clearInterval(b),l.end({status:"ok",data:{fnName:v}}),m();else if(Date.now()-x>5e3){clearInterval(b);const S=new Error(`Monetag: function ${v} did not appear on window object within 5 seconds.`);l.error("Init timeout — function not found after 5s",{fnName:v}),l.end({status:"fail"}),g(S)}},100)},h.onerror=x=>{l.error("Script failed to load",x),l.end({status:"fail"}),g(new Error("Monetag: script failed to load."))},document.head.appendChild(h),l.info("Script appended to head")}),f}return l.error("No script tag found in monetag configuration"),l.end({status:"fail"}),null}catch(u){return l.error("Failed to initialize",u),l.end({status:"fail"}),null}}function createMonetagFallbackFunction(o,l){return async()=>{const u=window.game_id?String(window.game_id):"0";return await showMonetagAd(o,u,l)}}async function showMonetagAd(o,l,u){const d=log$2.flow("Showing Ad");if(d.info("Starting ad display",{fnName:o,ymid:l,placementId:u}),!o)return d.error("Ad function name not found"),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Monetag ad function name not found",error_type:"function_name_missing",error_code:"function_name_missing",...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u}),!1;const f=window[o];if(typeof f!="function")return d.error("Ad function not found on window",{fnName:o}),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Monetag ad function not found on window object",error_type:"function_unavailable",error_code:"function_unavailable",function_name:o,...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u}),!1;const h=u?`orbit-${u}`:"orbit";return new Promise(m=>{const g=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u}),f({ymid:l,requestVar:h,timeout:5}).then(()=>{d.info("Ad watched successfully",{placementId:u}),d.end({status:"ok"}),analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u,duration_ms:Math.round(performance.now()-g)}),m(!0)}).catch(v=>{d.error("Ad failed or was skipped",{error:v,placementId:u}),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Monetag ad failed or was skipped",error_type:"ad_failed",error_code:"ad_failed",error:String(v),...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u}),m(!1)})})}var define_process_env_default$1={NODE_ENV:"production",version:"1.94.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const log$1=createAdLogger("Orbit");async function initOrbitAds(){const o=log$1.flow("Initialization");o.info("Loading script...");const l=define_process_env_default$1.ADS_SCRIPT_URL,u=document.createElement("script");return u.src=l,u.async=!0,new Promise((d,f)=>{u.onload=()=>{o.info("Script loaded, waiting for showOrbitAds function...");const h=Date.now(),m=setInterval(()=>{if(window.showOrbitAds&&typeof window.showOrbitAds=="function")clearInterval(m),o.end({status:"ok"}),d();else if(Date.now()-h>5e3){clearInterval(m);const g=new Error("Orbit: showOrbitAds function did not appear on window object within 5 seconds.");o.error("Init timeout — showOrbitAds not found after 5s",g),o.end({status:"fail"}),f(g)}},100)},u.onerror=h=>{o.error("Script failed to load",h),o.end({status:"fail"}),f(new Error("Orbit: script failed to load."))},document.head.appendChild(u),o.info("Script appended to head")})}async function showOrbitAd(o,l){const u=crypto.randomUUID();if(!window.showOrbitAds||typeof window.showOrbitAds!="function")return o?(log$1.warn("showOrbitAds not available, using fallback",{transactionId:u}),analytics.track("ad_show_fallback",{message:"Orbit showOrbitAds function not available, using fallback.",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u}),await o()):(analytics.track("ad_show_error",{message:"Orbit showOrbitAds function not available",error_type:"function_unavailable",error_code:"function_unavailable",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u}),!1);const d=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u});const f=log$1.flow("Showing Ad");f.info("Starting ad display",{transactionId:u,...l});try{const h=await window.showOrbitAds(l);if(f.info("showOrbitAds resolved",{response:h,transactionId:u}),h.is_direct_sales)return analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u,duration_ms:Math.round(performance.now()-d)}),f.end({status:"ok",data:{reason:"internal ad"}}),!0;if(f.warn("is_direct_sales=false, falling back to provider",{transactionId:u}),analytics.track("ad_show_fallback",{message:"Orbit has no ad available, falling back to provider network.",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u}),o){const m=await o();return f.end({status:m?"ok":"fail",data:{via:"fallback",result:m}}),m}return f.end({status:"fail",data:{reason:"no fallback"}}),!1}catch(h){if(f.error("Ad error",{error:h,transactionId:u}),analytics.track("ad_show_error",{message:"Orbit ad failed or was skipped",error_type:"exception",error_code:"exception",error:h instanceof Error?h.toString():String(h),error_message:h instanceof Error?h.message:"Unknown error",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u}),o){f.warn("Error occurred, using fallback provider",{transactionId:u}),analytics.track("ad_show_fallback",{message:"Orbit ad errored, falling back to provider network.",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u});const m=await o();return f.end({status:m?"ok":"fail",data:{via:"fallback after error",result:m}}),m}return f.end({status:"fail"}),!1}}const log=createAdLogger("TMA");async function checkAdStatus(o){try{log.info("Checking ad status",{adId:o});const l=await fetch(`https://sp.tmanetwork.tech/bid_info?id=${o}`);if(l.status===204)return log.info("Ad status: NOT_SHOWED (204)",{adId:o}),analytics.track("ad_status_not_showed",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma"}),"NOT_SHOWED";if(!l.ok)throw new Error(`Failed to check ad status: ${l.status}`);const u=await l.json();return u.click_created?(log.info("Ad status: CLICKED",{adId:o}),analytics.track("ad_status_clicked",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma"}),"CLICKED"):u.imp_created?(log.info("Ad status: SHOWED",{adId:o}),analytics.track("ad_status_showed",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma"}),"SHOWED"):(log.info("Ad status: NOT_SHOWED (no imp/click)",{adId:o}),analytics.track("ad_status_not_showed",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma"}),"NOT_SHOWED")}catch(l){throw log.error("Error checking ad status",{adId:o,error:l}),analytics.track("ad_status_error",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma"}),l}}async function showAd(o={}){if(!window.TMANetwork){const l=new Error("TMANetwork is not available");throw log.error("TMANetwork not available on window"),analytics.track("ad_show_error",{message:"TMANetwork is not available",error_type:"sdk_unavailable",error_code:"sdk_unavailable",...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma"}),l}if(window.TMANetwork.hasInterstitialAd()){log.info("Ad already loaded, showing immediately"),o.onStart&&o.onStart();try{const l=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma"});const u=await window.TMANetwork.showInterstitialAd();return log.info("Ad shown successfully",{adId:u.id}),analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",ad_id:u.id,duration_ms:Math.round(performance.now()-l)}),window.TMANetwork.reloadAd(),u}catch(l){throw log.error("Error showing preloaded ad",l),analytics.track("ad_show_error",{message:l instanceof Error?l.message:"Unknown error showing TMA ad",error_type:"exception",error_code:"exception",error:l instanceof Error?l.toString():String(l),...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma"}),l}}return log.info("Waiting for ad to load (10s timeout)..."),new Promise((l,u)=>{let d=!1;const f=async()=>{if(!d){d=!0;try{log.info("onAdLoaded event received"),analytics.track("ad_load_event_received",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma"}),o.onStart&&o.onStart(),analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma"});const h=await window.TMANetwork.showInterstitialAd();log.info("Ad shown successfully after load",{adId:h.id}),analytics.track("ad_load_success",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",ad_id:h.id}),window.TMANetwork.reloadAd(),l(h)}catch(h){log.error("Error showing ad after load event",h),analytics.track("ad_load_error",{message:h instanceof Error?h.message:"Unknown error loading TMA ad",error_type:"load_exception",error_code:"load_exception",error:h instanceof Error?h.toString():String(h),...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma"}),u(h)}}};setTimeout(()=>{if(!d){d=!0;const h=new Error("Ad load timeout");log.error("Ad load timeout after 10s"),analytics.track("ad_load_timeout",{message:"Ad load timeout after 10 seconds",error_type:"timeout",error_code:"timeout",timeout_duration:1e4,...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma"}),u(h)}},1e4),window.TMANetwork.addEventListener("onAdLoaded",f)})}function loadTMANetworkScript(){return new Promise((o,l)=>{const u=log.flow("Script Load");if(analytics.track("tma_script_load_requested",getBaseAnalyticsParams()),document.querySelector('script[src="https://files.tmanetwork.tech/tmanetwork.min.js"]')){u.info("Script already loaded (skipping)"),u.end({status:"ok",data:{reason:"already loaded"}}),o();return}const d=document.createElement("script");d.src="https://files.tmanetwork.tech/tmanetwork.min.js",d.async=!0,d.onload=()=>{u.info("Script loaded successfully"),u.end({status:"ok"}),analytics.track("tma_script_load_success",getBaseAnalyticsParams()),o()},d.onerror=f=>{u.error("Failed to load script",f),u.end({status:"fail"}),analytics.track("tma_script_load_error",{message:"Failed to load TMANetwork script",error_type:"script_load_failed",error_code:"script_load_failed",error:String(f),...getBaseAnalyticsParams()}),captureException(f),l(new Error("Failed to load TMANetwork script"))},document.head.appendChild(d)})}const TUTORIAL_PLACEMENT_CONSUMED_KEY="cs_tutorial_placement_consumed";function consumeTutorialPlacement(){var o,l,u;try{return((u=(l=(o=window.Telegram)==null?void 0:o.WebApp)==null?void 0:l.initDataUnsafe)==null?void 0:u.start_param)!=="tutorial"||window.localStorage.getItem(TUTORIAL_PLACEMENT_CONSUMED_KEY)?void 0:(window.localStorage.setItem(TUTORIAL_PLACEMENT_CONSUMED_KEY,"1"),"tutorial")}catch{return}}function initSentry(){init({dsn:"https://15f2f3a80cbbee5f94c302756f8595d5@o4509677809172480.ingest.de.sentry.io/4509677817364560",sendDefaultPii:!0,sampleRate:.01,integrations:[dedupeIntegration()],maxBreadcrumbs:50,beforeBreadcrumb(o){return o.category==="console"&&o.level!=="error"?null:o}})}function validateCloudStorageValue(o){if(o==null)return{isValid:!1,error:"Value cannot be null or undefined"};const l=o.length;let u;try{u=new TextEncoder().encode(o)}catch{return{isValid:!1,error:"Value cannot be encoded as UTF-8",characterCount:l}}const d=u.length;if(d>4096)return{isValid:!1,error:`Value exceeds maximum size: ${d} bytes (limit: 4096 bytes)`,byteSize:d,characterCount:l};if(o.includes("\0"))return{isValid:!1,error:"Value contains null bytes (\\0) which are not allowed",byteSize:d,characterCount:l};if(/[\x01-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/.test(o))return{isValid:!1,error:"Value contains invalid control characters",byteSize:d,characterCount:l};try{if(new TextDecoder("utf-8",{fatal:!0}).decode(u)!==o)return{isValid:!1,error:"Value encoding/decoding mismatch",byteSize:d,characterCount:l}}catch{return{isValid:!1,error:"Value contains invalid UTF-8 sequences",byteSize:d,characterCount:l}}return{isValid:!0,byteSize:d,characterCount:l}}function ensureViewportMetaTag(){if(typeof document>"u")return;const o=document.head||document.getElementsByTagName("head")[0];if(!o)return;const l=document.querySelector('meta[name="viewport"]'),u=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);if(!l&&u){const d=document.createElement("meta");d.name="viewport",d.content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no",o.appendChild(d)}}const getGlobalObj=()=>{if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;throw new Error("No global object found")},GAME_INITIALIZED_LAUNCH_KEY="cs_game_initialized_launch",GAME_READY_LAUNCH_KEY="cs_game_ready_launch";function getLaunchId(){var l,u,d;const o=(u=(l=window.Telegram)==null?void 0:l.WebApp)==null?void 0:u.initDataUnsafe;return(o==null?void 0:o.hash)||((d=o==null?void 0:o.auth_date)==null?void 0:d.toString())||""}function shouldTrackOncePerLaunch(o){const l=getLaunchId();if(!l)return!0;try{return sessionStorage.getItem(o)===l?!1:(sessionStorage.setItem(o,l),!0)}catch{return!0}}function throttleLeading(o,l){let u=0;return function(...d){const f=Date.now();return f-u>=l?(u=f,o.apply(this,d)):(console.log(`Function is throttled. Next call available in ${l-(f-u)}ms`),Promise.resolve(!1))}}const RPC_REQUEST="orbit-sdk:rpc-request",RPC_RESPONSE="orbit-sdk:rpc-response",RPC_EVENT="orbit-sdk:rpc-event",RPC_TIMEOUT_MS=3e4;function isInIframe(){var o,l;return window.parent!==window&&!((l=(o=window.Telegram)==null?void 0:o.WebApp)!=null&&l.initData)}function callParent(o,...l){const u=crypto.randomUUID();return new Promise((d,f)=>{const h=setTimeout(()=>{window.removeEventListener("message",m),f(new Error(`SDK RPC call "${o}" timed out after ${RPC_TIMEOUT_MS}ms`))},RPC_TIMEOUT_MS);function m(g){const v=g.data;(v==null?void 0:v.type)!==RPC_RESPONSE||v.id!==u||(clearTimeout(h),window.removeEventListener("message",m),v.error?f(new Error(v.error)):d(v.result))}window.addEventListener("message",m),window.parent.postMessage({type:RPC_REQUEST,id:u,method:o,args:l},"*")})}function createIframeSdk(){let o=null,l=null;return window.addEventListener("message",u=>{var h;if(((h=u.data)==null?void 0:h.type)!==RPC_EVENT)return;const{event:d,args:f}=u.data;d==="onAdStart"&&o?o():d==="onAdEnd"&&l&&l(f[0])}),new Proxy({},{get(u,d){return d==="onAdStart"?o:d==="onAdEnd"?l:d==="version"?"__IFRAME_RPC__":d==="getAdsgramController"?()=>null:d==="telegramCloudStorage"?null:(...f)=>callParent(d,...f)},set(u,d,f){return d==="onAdStart"?(o=f,!0):(d==="onAdEnd"&&(l=f),!0)}})}var define_process_env_default={NODE_ENV:"production",version:"1.94.1",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const _isThirdPartyIframe=window.parent!==window&&!((hc=(fc=window.Telegram)==null?void 0:fc.WebApp)!=null&&hc.initData);_isThirdPartyIframe||(ensureViewportMetaTag(),initSentry());const adLog=createAdLogger("SDK");let gameInitializedAt=null;const CloudStorageGetItem=o=>new Promise((l,u)=>{getTelegramWebApp().CloudStorage.getItem(o,(d,f)=>{d?u(new Error(d)):l(f??null)})}),CloudStorageSetItem=(o,l)=>new Promise((u,d)=>{getTelegramWebApp().CloudStorage.setItem(o,l,(f,h)=>{f?d(new Error(f)):u(h??null)})}),CloudStorageRemoveItem=o=>new Promise((l,u)=>{getTelegramWebApp().CloudStorage.removeItem(o,(d,f)=>{d?u(new Error(d)):l(f??null)})}),G_MEASUREMENT_ID="G-4RMXVE2K75",BANNER_HEIGHT=60,bannerManager=new BannerManager({height:BANNER_HEIGHT});let timer=null;const pending={};let state={};const CLOUD_STORAGE_PREFIX="sdk_pending_",LOCAL_STORAGE_PREFIX="portal_sdk_pending_";function setValueSync(o,l){let u;if(typeof l=="object"&&l!==null)try{u=JSON.stringify(l)}catch(h){console.error(`Failed to serialize value for ${o}:`,h),u=String(l)}else u=String(l);state[o]=pending[o]=u;try{localStorage.setItem(`${LOCAL_STORAGE_PREFIX}${o}`,u)}catch(h){console.error(`Failed to save ${o} to localStorage:`,h)}const{isValid:d,error:f}=validateCloudStorageValue(u);if(!d){console.warn(`Value for ${o} cannot be saved to CloudStorage:`,f);return}CloudStorageSetItem(`${CLOUD_STORAGE_PREFIX}${o}`,u).catch(h=>{console.error(`Failed to save ${o} to CloudStorage:`,h)})}function removeValueSync(o){delete state[o],delete pending[o];try{localStorage.removeItem(`${LOCAL_STORAGE_PREFIX}${o}`)}catch(l){console.error(`Failed to remove ${o} from localStorage:`,l)}CloudStorageRemoveItem(`${CLOUD_STORAGE_PREFIX}${o}`).catch(console.error),makeRequest(`storage/${o}`,"DELETE").catch(console.error)}function getValueSync(o){return state[o]}async function loadAll(){const o={};try{for(let h=0;h<localStorage.length;h++){const m=localStorage.key(h);if(m&&m.startsWith(LOCAL_STORAGE_PREFIX)){const g=localStorage.getItem(m);if(g){const v=m.replace(LOCAL_STORAGE_PREFIX,"");o[v]=g,console.log(`Loaded from localStorage: ${v}`)}}}}catch(h){console.error("Failed to load from localStorage:",h)}const l={};try{const h=await new Promise((m,g)=>{getTelegramWebApp().CloudStorage.getKeys((v,x)=>{v?g(new Error(v)):m(x??[])})});for(const m of h)if(m.startsWith(CLOUD_STORAGE_PREFIX))try{const g=await CloudStorageGetItem(m);if(g){const v=m.replace(CLOUD_STORAGE_PREFIX,"");l[v]=g,console.log(`Loaded from CloudStorage: ${v}`)}}catch(g){console.error(`Failed to load ${m} from CloudStorage:`,g)}}catch(h){console.error("Failed to load keys from CloudStorage:",h)}const u={...l,...o},d=[500,500,1e3];let f=0;for(;;)try{const h=await makeRequest("storage/","GET");state={...h.data,...u};for(const m of Object.keys(u))pending[m]=u[m];console.log(`Loaded state from backend (${Object.keys(h.data).length} keys), localStorage (${Object.keys(o).length} keys) and CloudStorage (${Object.keys(l).length} keys)`);return}catch(h){if(f>=d.length){console.error("Failed to load all storage values:",h),state=u;for(const m of Object.keys(u))pending[m]=u[m];return}await delay(d[f]),f+=1}}function startSaveTick(){timer&&clearInterval(timer),loadAll(),timer=setInterval(async()=>{await savePendingChanges()},5*1e3)}async function savePendingChanges(){const o={...pending};console.log("save pending changes "+Object.keys(o).length),console.log(pending);for(const l of Object.keys(o)){const u=o[l],d=[500,500,1e3];let f=0,h=!1;for(;!h;)try{if(await makeRequest(`storage/${l}`,"PUT",{value:u}),pending[l]===u){delete pending[l];try{localStorage.removeItem(`${LOCAL_STORAGE_PREFIX}${l}`),console.log(`Removed ${l} from localStorage after successful sync`)}catch(m){console.error(`Failed to remove ${l} from localStorage:`,m)}try{await CloudStorageRemoveItem(`${CLOUD_STORAGE_PREFIX}${l}`),console.log(`Removed ${l} from CloudStorage after successful sync`)}catch(m){console.error(`Failed to remove ${l} from CloudStorage:`,m)}}else console.log(`Value for ${l} changed during save, keeping in pending and local storages`);h=!0}catch(m){if(f>=d.length){console.error(`Failed to save key ${l}:`,m);break}await delay(d[f]),f+=1}}}let configCache=null;const CACHE_DURATION_MS=5*60*1e3;let adType=null,legacyHardcodedAdType=null,shadowEnabled=!1,orbitInitialized=!1,monetagShowAdFnName=null,adsgramAdController=null,countRequestAd=1,externalBotId=null,externalAuthData=null,isPortal=!1,launchResponseCache=null;const telegramReady=ensureTelegramWebApp(),makeRequest=createMakeRequest({baseUrl:BASE_URL,getAuthData:()=>externalAuthData,getBotId:()=>externalBotId,getInitData:()=>{var o,l;return((l=(o=window.Telegram)==null?void 0:o.WebApp)==null?void 0:l.initData)??""},waitUntilReady:()=>telegramReady});function getStartupConfig(){return window==null?void 0:window.startupConfig}let intervalId;const trackTimeEveryS=20;function startGameTimeTrack(){intervalId&&clearInterval(intervalId),CryptoSteamSDK.trackGameTimeTick(),intervalId=setInterval(()=>{CryptoSteamSDK.trackGameTimeTick()},trackTimeEveryS*1e3)}const CryptoSteamSDK={version:define_process_env_default.version,onAdStart:null,onAdEnd:null,initialize:async(o,l)=>{var f,h,m,g;const u=await ensureTelegramWebApp();initAnalytics(),isPortal=(l==null?void 0:l.mode)==="portal";const d=adLog.flow("SDK & Ads Initialization");try{const v=(h=(f=u==null?void 0:u.initDataUnsafe)==null?void 0:f.user)==null?void 0:h.id;v&&analytics.identify(v),analytics.track("sdk_initialized",getBaseAnalyticsParams()),l!=null&&l.authData&&(console.error("USE AUTH_DATA FOR REQUESTS!!!"),console.log("options.authData",l.authData),externalAuthData=l.authData),o&&(externalBotId=o,queryClient.invalidateQueries({queryKey:[PROFILE_TAG]}),queryClient.invalidateQueries({queryKey:[PRICES_TAG]})),isPortal||startSaveTick();const x=await CryptoSteamSDK.getProfile(),b=await CryptoSteamSDK.getConfig();libExports.isMobile&&b.supported_screen_formats.includes("fullscreen")||!libExports.isMobile&&b.supported_screen_formats.includes("fullscreen-desktop")?(u==null||u.setHeaderColor("#000"),u==null||u.setBackgroundColor("#000"),u==null||u.requestFullscreen()):u==null||u.exitFullscreen(),d.info("Starting initialization",{version:define_process_env_default.version});const S=await makeRequest("launch","POST");launchResponseCache=S,await new Promise(w=>{document.readyState==="complete"?w():window.addEventListener("load",()=>w())});const{ads:E}=S;try{await initOrbitAds(),orbitInitialized=!0}catch(w){d.error("Orbit failed to initialize",w)}if((E==null?void 0:E.type)==="tma"&&E.tmaAdsKey)if(adType="tma",await loadTMANetworkScript(),window.TMANetwork)await window.TMANetwork.init(S.tma_ads_key),d.info("TMANetwork initialized successfully");else throw new Error("TMANetwork object not found.");else if((E==null?void 0:E.type)==="monetag"&&E.monetag)adType="monetag",monetagShowAdFnName=await initMonetagAds(E.monetag);else if((E==null?void 0:E.type)==="adsgram"&&E.adsgram){adType="adsgram",d.info("Adsgram: initialization started");try{const w=document.createElement("script");w.src="https://sad.adsgram.ai/js/sad.min.js",w.async=!0,await new Promise((T,C)=>{w.onload=()=>{d.info("Adsgram: script loaded, waiting for window.Adsgram...");const M=Date.now(),A=setInterval(()=>{if(window.Adsgram&&typeof window.Adsgram.init=="function")if(clearInterval(A),d.info("Adsgram: window.Adsgram found, initializing..."),adsgramAdController=window.Adsgram.init({blockId:E.adsgram}),adsgramAdController)d.info("Adsgram: initialized successfully"),T();else{const k=new Error("Adsgram: init returned null or undefined.");d.error("Adsgram: init returned null",k),C(k)}else if(Date.now()-M>5e3){clearInterval(A);const k=new Error("Adsgram: window.Adsgram did not appear within 5 seconds.");d.error("Adsgram: init timeout after 5s",k),C(k)}},100)},w.onerror=M=>{d.error("Adsgram: script failed to load",M),C(new Error("Adsgram: script failed to load."))},document.head.appendChild(w),d.info("Adsgram: script appended to head")})}catch(w){d.error("Adsgram: failed to initialize",w)}}else if((E==null?void 0:E.type)==="gigapub"&&E.gigapub){adType="gigapub";try{await initGigapubAds(E.gigapub)}catch(w){d.error("Gigapub: failed to initialize",w)}if(E.monetag)try{monetagShowAdFnName=await initMonetagAds(E.monetag),d.info("Monetag fallback initialized for Gigapub")}catch(w){d.error("Monetag fallback: failed to initialize",w)}}if((adType==="tma"||adType==="monetag"||adType==="adsgram"||adType==="gigapub")&&(legacyHardcodedAdType=adType),shadowEnabled=(E==null?void 0:E.shadowEnabled)===!0,(E==null?void 0:E.useExchange)===!0||shadowEnabled){const w=BASE_URL.replace(/\/sdk\/?$/,"");configureExchangeClient({baseUrl:w,getAuthData:()=>externalAuthData,getBotId:()=>externalBotId,getInitData:()=>{var T,C;return((C=(T=window.Telegram)==null?void 0:T.WebApp)==null?void 0:C.initData)??""}})}(E==null?void 0:E.useExchange)===!0?(adType="exchange",d.info("Exchange dispatcher enabled",{legacyHardcodedAdType})):shadowEnabled&&d.info("Exchange shadow mode enabled",{adType}),d.end({status:"ok",data:{provider:adType,orbitInitialized}}),(m=x==null?void 0:x.audiences)!=null&&m[0]&&analytics.track("$experiment_started",{"Experiment name":"start_page_ab","Variant name":(g=x==null?void 0:x.audiences)==null?void 0:g[0]})}catch(v){d.error("Error during ads initialization",v),d.end({status:"fail"})}try{const v=await CryptoSteamSDK.getProfile(),x=await CryptoSteamSDK.getConfig();if(l!=null&&l.authData&&console.log("externalAuthData",externalAuthData),!v){console.error("Profile not found");return}if(!x){console.error("Config not found");return}analytics.identify(String(v.id)),window.game_id=v.game_id,window.game_title=x.title,ReactGA.initialize(G_MEASUREMENT_ID,{gaOptions:{userId:v.id,gameId:v.game_id}}),ReactGA.event("init",{gameId:v.game_id}),shouldTrackOncePerLaunch(GAME_INITIALIZED_LAUNCH_KEY)&&(gameInitializedAt=performance.now(),analytics.track("game_initialized",{game_id:v.game_id,game_title:x.title})),!isPortal&&!(l!=null&&l.disable_startup_ads)&&CryptoSteamSDK.requestAd().catch(b=>{adLog.error("Error requesting initial ad",b)})}catch(v){console.error("Error during GA initialization:",v)}},getLaunchResponse:()=>launchResponseCache,isLaunchedFromPortal:()=>{var o,l,u;return((u=(l=(o=window==null?void 0:window.Telegram)==null?void 0:o.WebApp)==null?void 0:l.initDataUnsafe)==null?void 0:u.start_param)==="orbit_launcher"},getConfig:async()=>{const o=Date.now();if(configCache&&configCache.expiresAt>o)return configCache.config;const l=await makeRequest("config","GET");return configCache={config:l,expiresAt:o+CACHE_DURATION_MS},l},isAdEnabled:async()=>!0,requestAd:async(o={})=>{var u,d,f,h,m;const l=adLog.flow("requestAd");(u=CryptoSteamSDK.onAdStart)==null||u.call(CryptoSteamSDK);try{const g=await CryptoSteamSDK.getProfile(),v=CryptoSteamSDK.getLaunchResponse();if(countRequestAd===1&&!isPortal&&(l.info("First request — checking launch rules",{is_ad_cooldown:v==null?void 0:v.is_ad_cooldown}),v&&v.is_ad_cooldown))return countRequestAd++,l.warn("Skipped: ad is in cooldown",{is_ad_cooldown:v.is_ad_cooldown}),(d=CryptoSteamSDK.onAdEnd)==null||d.call(CryptoSteamSDK,!1),l.end({status:"fail",data:{reason:"cooldown"}}),!1;if(g.ads_free&&!isPortal)return l.warn("Skipped: profile has ads_free flag"),(f=CryptoSteamSDK.onAdEnd)==null||f.call(CryptoSteamSDK,!1),l.end({status:"fail",data:{reason:"ads_free"}}),!1;const b=o.placementId??consumeTutorialPlacement();analytics.track("ad_show_requested",{...getBaseAnalyticsParams(),ad_type:orbitInitialized?"orbit":adType,provider:orbitInitialized?"orbit":adType,placement_id:b});const S=async()=>{if(adType==="tma")try{return await showAd(o),!0}catch(w){return l.error("Error showing TMA ad",w),!1}if(adType==="monetag"){const T=`${(await CryptoSteamSDK.getProfile()).game_id}`;return await showMonetagAd(monetagShowAdFnName,T,b)}if(adType==="adsgram")return await showAdsgramAdWithTimeout(adsgramAdController);if(adType==="gigapub"){const w=createMonetagFallbackFunction(monetagShowAdFnName,b);return await showGigapubAd(w,b)}return l.error("Ad network not initialized or not supported",{adType}),analytics.track("ad_show_error",{...getBaseAnalyticsParams(),message:"Ad network not initialized or not supported",ad_type:adType,provider:adType,error_type:"unsupported_network",error_code:"unsupported_network",placement_id:b}),!1};countRequestAd=++countRequestAd;let E;if(l.info("Dispatching ad request",{orbitInitialized,adType,placementId:b}),orbitInitialized){const w=g.game_id?Number(g.game_id):void 0;E=await showOrbitAd(S,{zoneId:w,placementId:b})}else E=await S();return l.end({status:E?"ok":"fail",data:{result:E}}),(h=CryptoSteamSDK.onAdEnd)==null||h.call(CryptoSteamSDK,E),E}catch(g){return l.error("Error in requestAd",g),l.end({status:"fail"}),analytics.track("ad_show_error",{...getBaseAnalyticsParams(),message:g instanceof Error?g.message:"Unknown error in requestAd",error_type:"sdk_exception",error_code:"sdk_exception",ad_type:adType,provider:adType,error:g instanceof Error?g.toString():String(g),placement_id:o.placementId}),(m=CryptoSteamSDK.onAdEnd)==null||m.call(CryptoSteamSDK,!1),!1}},requestRewardAd:async(o={})=>{var u,d,f,h,m;const l=adLog.flow("requestRewardAd");(u=CryptoSteamSDK.onAdStart)==null||u.call(CryptoSteamSDK);try{if((await CryptoSteamSDK.getProfile()).ads_free)return l.warn("Skipped: profile has ads_free flag"),(d=CryptoSteamSDK.onAdEnd)==null||d.call(CryptoSteamSDK,!0),l.end({status:"ok",data:{reason:"ads_free"}}),!0;const v=o.placementId??consumeTutorialPlacement();if(analytics.track("ad_show_requested",{...getBaseAnalyticsParams(),ad_type:orbitInitialized?"orbit":adType,provider:orbitInitialized?"orbit":adType,placement_id:v}),shadowEnabled&&adType!=="exchange"&&exchangeServe({placement_id:v??"",ad_format:"rewarded",supported_providers:["monetag","gigapub","own_video"],request_id:crypto.randomUUID(),shadow:!0}).catch(()=>{}),adType==="exchange")try{const E=await exchangeDispatch({placement_id:v??"",ad_format:"rewarded",supported_providers:["monetag","gigapub","own_video"],request_id:crypto.randomUUID()},v);return l.end({status:E?"ok":"fail",data:{result:E,via:"exchange"}}),(f=CryptoSteamSDK.onAdEnd)==null||f.call(CryptoSteamSDK,E),E}catch(E){if(E instanceof FallbackToHardcoded)l.info("Exchange returned use_hardcoded sentinel — falling back to legacy path");else throw E}const x=adType==="exchange"?legacyHardcodedAdType:adType,b=async()=>{if(x==="tma")try{const E=await showAd(o);await delay(1e3);const w=await checkAdStatus(E.id);return w==="SHOWED"||w==="CLICKED"}catch(E){return l.error("Error showing TMA reward ad",E),!1}if(x==="monetag"){const w=`${(await CryptoSteamSDK.getProfile()).game_id}`;return await showMonetagAd(monetagShowAdFnName,w,v)}if(x==="adsgram")return await showAdsgramAdWithTimeout(adsgramAdController);if(x==="gigapub"){const E=createMonetagFallbackFunction(monetagShowAdFnName,v),w=await showGigapubAd(E,v);return await delay(2e3),w}return l.error("Ad network not initialized or not supported",{adType,effectiveAdType:x}),analytics.track("ad_show_error",{...getBaseAnalyticsParams(),message:"Ad network not initialized or not supported",ad_type:x,provider:x,error_type:"unsupported_network",error_code:"unsupported_network",placement_id:v}),!1};let S;if(l.info("Dispatching reward ad request",{orbitInitialized,adType,placementId:v}),orbitInitialized){const E=window.game_id?Number(window.game_id):void 0;S=await showOrbitAd(b,{zoneId:E,placementId:v})}else S=await b();return l.end({status:S?"ok":"fail",data:{result:S}}),(h=CryptoSteamSDK.onAdEnd)==null||h.call(CryptoSteamSDK,S),S}catch(g){return l.error("Error in requestRewardAd",g),l.end({status:"fail"}),analytics.track("ad_show_error",{...getBaseAnalyticsParams(),message:g instanceof Error?g.message:"Unknown error in requestRewardAd",error_type:"sdk_exception",error_code:"sdk_exception",ad_type:adType,provider:adType,error:g instanceof Error?g.toString():String(g),placement_id:o.placementId}),(m=CryptoSteamSDK.onAdEnd)==null||m.call(CryptoSteamSDK,!1),!1}},getProfile:async()=>await makeRequest("profile","GET"),getBalance:async()=>await makeRequest("balance","GET"),trackGameTimeTick:()=>{getActivityDetector().getState().isActive&&makeRequest("ping","POST")},getVersion:()=>version,initializeOverlay:async o=>{await telegramReady,o!=null&&o.authData&&(console.error("USE AUTH_DATA FOR REQUESTS!!!"),externalAuthData=o.authData),startGameTimeTrack(),o!=null&&o.botId&&(externalBotId=o.botId,queryClient.invalidateQueries({queryKey:[PROFILE_TAG]}),queryClient.invalidateQueries({queryKey:[PRICES_TAG]}));const l=getStartupConfig(),u={...o,initialPosition:(o==null?void 0:o.initialPosition)??(l==null?void 0:l.overlayPosition)??"topLeft"};if(document.getElementById("overlay-root")){console.log("Overlay root already exists");return}if(createOverlay(u),!((o==null?void 0:o.visible)!==!1)){const h=document.getElementById("overlay-root");h&&h.classList.add("cssdk-overlay-hidden")}window.runGame&&window.runGame()},getShopItems:async()=>(await makeRequest("shop/items","GET")).items,getPurchasedShopItem:async o=>await makeRequest(`shop/purchases/${o}`,"GET"),getPurchasedShopItems:async()=>await makeRequest("shop/purchases","GET"),buyShopItem:async o=>{const l=await CryptoSteamSDK.getBalance(),d=(await CryptoSteamSDK.getShopItems()).find(f=>f.id===o);if(d||console.warn(`Not found shop item with id ${o}`),d&&l.balance_gems>=d.price)return await makeRequest(`shop/items/${o}/buy`,"POST");useTopUpModalStore.getState().setIsOpen(!0)},openPurchaseConfirmModal:async(o,l)=>{const u=await ensureTelegramWebApp(),d=await CryptoSteamSDK.getBalance();return new Promise((f,h)=>{if(d.balance_gems<o.price){useTopUpModalStore.getState().setIsOpen(!0),h(new Error("insufficient funds"));return}const m=document.createElement("div");m.style.position="fixed",m.style.top="0",m.style.left="0",m.style.width="100%",m.style.height="100%",m.style.backgroundColor="transparent",m.style.zIndex="9999";const g=document.createElement("iframe");if(g.style.position="fixed",l){let C=l.x+(l.width-210)/2,M=l.y-108-20;M<8&&(M=l.y+l.height+20),C+210>window.innerWidth-8&&(C=window.innerWidth-8-210),C<8&&(C=8),(M+108>window.innerHeight-8||M<8)&&(M=(window.innerHeight-108)/2,C=(window.innerWidth-210)/2),g.style.left=`${C}px`,g.style.top=`${M}px`}else g.style.left="50%",g.style.top="50%",g.style.transform="translate(-50%, -50%)";g.style.boxShadow="0px 0px 2px 1px rgba(0, 0, 0, 0.22), 0px 32px 64px rgba(0, 0, 0, 0.34)",g.style.borderRadius="24px",g.style.border="none",g.style.zIndex="10000",g.referrerPolicy="origin",g.style.width="210px",g.style.height="108px",g.style.backgroundColor="white";const v=new URLSearchParams;v.set("itemId",o.id.toString()),v.set("price",o.price.toString()),v.set("__tg_x_auth",u==null?void 0:u.initData);const x={confirm:{pay:translationsTyped("confirmIframe.pay"),cancel:translationsTyped("confirmIframe.cancel")}};v.set("translations",JSON.stringify(x)),g.src=`${BASE_URL}/shop/payment_iframe?${v.toString()}`;const b=S=>{S.data.type==="confirm"?(window.removeEventListener("message",b),document.body.removeChild(m),document.body.removeChild(g),f({status:"success"})):S.data.type==="cancel"?(window.removeEventListener("message",b),document.body.removeChild(m),document.body.removeChild(g),f({status:"error"})):S.data.type==="error"&&(window.removeEventListener("message",b),document.body.removeChild(m),document.body.removeChild(g),h(new Error(S.data.message)))};window.addEventListener("message",b),m.onclick=()=>{window.removeEventListener("message",b),document.body.removeChild(m),document.body.removeChild(g),f({status:"error"})},document.body.appendChild(m),document.body.appendChild(g)})},createInvoice:async(o,l,u,d)=>await makeRequest("invoices","POST",{title:o,description:l,to_user_id:u,amount:d}),getAllKeyValues:async()=>{const o=await CryptoSteamSDK.getProfile();return Array.isArray(o==null?void 0:o.audiences)&&o.audiences.includes("banner_test")?(console.log("getAllKeyValuesSync"),Promise.resolve(state)):(await makeRequest("storage/","GET")).data},getValue:async o=>{const l=await CryptoSteamSDK.getProfile();return Array.isArray(l==null?void 0:l.audiences)&&l.audiences.includes("banner_test")?(console.log("getValueSync",o),Promise.resolve(getValueSync(o))):(await makeRequest(`storage/${o}`,"GET")).value},setValue:async(o,l)=>{const u=await CryptoSteamSDK.getProfile();if(Array.isArray(u==null?void 0:u.audiences)&&u.audiences.includes("banner_test"))return console.log("setValueSync",o,l),setValueSync(o,l),Promise.resolve();await makeRequest(`storage/${o}`,"PUT",{value:l})},removeValue:async o=>{const l=await CryptoSteamSDK.getProfile();if(Array.isArray(l==null?void 0:l.audiences)&&l.audiences.includes("banner_test"))return console.log("removeValueSync",o),removeValueSync(o),Promise.resolve();await makeRequest(`storage/${o}`,"DELETE")},getData:async o=>(console.warn("[DEPRECATED] Use PortalSDK.getValue instead"),(await makeRequest(`storage/${o}`,"GET")).value),setData:async(o,l)=>{console.warn("[DEPRECATED] Use PortalSDK.setValue instead"),await makeRequest(`storage/${o}`,"PUT",{value:l})},getLocale:()=>{var o,l;return((l=(o=window.Telegram.WebApp)==null?void 0:o.initDataUnsafe.user)==null?void 0:l.language_code)||"en"},showSharing:(o,l)=>{var d;const u=`https://t.me/share/url?text=${encodeURIComponent(l||"")}&url=${encodeURIComponent(o)}`;(d=window.Telegram.WebApp)==null||d.openTelegramLink(u)},telegramCloudStorage:{getValue:async o=>CloudStorageGetItem(o),setValue:async(o,l)=>CloudStorageSetItem(o,l),removeValue:async o=>CloudStorageRemoveItem(o)},gameReady:async()=>{console.log("CryptoSteamSDK: gameReady received");const o=await CryptoSteamSDK.getProfile(),l=await CryptoSteamSDK.getConfig();if(!o){console.error("Profile not found");return}if(!l){console.error("Config not found");return}shouldTrackOncePerLaunch(GAME_READY_LAUNCH_KEY)&&(analytics.track("game_ready",{game_id:o.game_id,game_title:l.title,time_to_load_ms:gameInitializedAt!==null?Math.round(performance.now()-gameInitializedAt):void 0}),ReactGA.event("game_loaded",{gameId:o.game_id}))},getWages:async()=>await makeRequest("v1/wages","GET"),claimWage:async o=>await makeRequest(`v1/wages/${o}/claim`,"POST"),startWage:async o=>await makeRequest(`v1/wages/${o}/start`,"POST"),setValueWage:async({wageId:o,value:l})=>await makeRequest(`v1/wages/${o}`,"PUT",{value:l}),getAdsgramController:()=>adsgramAdController,setBottomBanner:async()=>{const o=bannerManager.createDefaultContent();await bannerManager.setBanner(o,CryptoSteamSDK.getProfile)},clearBottomBanner:()=>{bannerManager.clearBanner()},showOverlay:()=>{const o=document.getElementById("overlay-root");o&&o.classList.remove("cssdk-overlay-hidden")},hideOverlay:()=>{const o=document.getElementById("overlay-root");o&&o.classList.add("cssdk-overlay-hidden")},isOverlayVisible:()=>{const o=document.getElementById("overlay-root");return o?!o.classList.contains("cssdk-overlay-hidden"):!1}};CryptoSteamSDK.requestAd=throttleLeading(CryptoSteamSDK.requestAd.bind(CryptoSteamSDK),1e4);const resolvedSDK=isInIframe()?createIframeSdk():CryptoSteamSDK,globalObj=getGlobalObj();globalObj.CryptoSteamSDK=resolvedSDK,globalObj.PortalSDK=resolvedSDK;const PortalEmuSDK={isAdRunning:()=>!1,getValueSync:o=>getValueSync(o),setValueSync:(o,l)=>{setValueSync(o,l)},removeValueSync:async o=>{removeValueSync(o)},reloadAd:()=>{},getStartParam:()=>{var l;const o=(l=window.Telegram.WebApp)==null?void 0:l.initDataUnsafe.start_param;return o||""},requestAd:async()=>{await CryptoSteamSDK.requestAd()}};globalObj.PortalEmuSDK=PortalEmuSDK;const monetagAdapter={async ensureReady(o){},async show(o,l,u){const d=performance.now();try{const f=l,h=f.fn_name??f.zone_id;return h?{ok:await showMonetagAd(h,o,u),durationMs:performance.now()-d}:{ok:!1,reason:"monetag payload missing fn_name/zone_id",durationMs:performance.now()-d}}catch(f){return{ok:!1,reason:f instanceof Error?f.message:String(f),durationMs:performance.now()-d}}}},monetag=Object.freeze(Object.defineProperty({__proto__:null,default:monetagAdapter},Symbol.toStringTag,{value:"Module"})),gigapubAdapter={async show(o,l,u){const d=performance.now();try{return{ok:await showGigapubAd(void 0,u,o,o),durationMs:performance.now()-d}}catch(f){return{ok:!1,reason:f instanceof Error?f.message:String(f),durationMs:performance.now()-d}}}},gigapub=Object.freeze(Object.defineProperty({__proto__:null,default:gigapubAdapter},Symbol.toStringTag,{value:"Module"})),ownVideoAdapter={async show(o,l,u){const d=performance.now();try{const f=l,h=typeof f.zone_id=="number"?f.zone_id:typeof f.zoneId=="number"?f.zoneId:void 0;return{ok:await showOrbitAd(void 0,{zoneId:h,placementId:u}),durationMs:performance.now()-d}}catch(f){return{ok:!1,reason:f instanceof Error?f.message:String(f),durationMs:performance.now()-d}}}},own_video=Object.freeze(Object.defineProperty({__proto__:null,default:ownVideoAdapter},Symbol.toStringTag,{value:"Module"}));exports.PortalSDK=resolvedSDK,exports.default=resolvedSDK,exports.makeRequest=makeRequest,exports.startGameTimeTrack=startGameTimeTrack,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
155
+ `}clearBanner(){const l=document.getElementById(this.containerId);if(!l){log$5.warn(`Banner container with id "${this.containerId}" not found`);return}l.classList.add("cssdk-banner-hide"),l.classList.remove("cssdk-banner-show"),setTimeout(()=>{l.innerHTML="",document.documentElement.style.setProperty("--banner-bottom-height","0px")},this.animationDuration)}getHeight(){return this.bannerHeight}isVisible(){const l=document.getElementById(this.containerId);return(l==null?void 0:l.classList.contains("cssdk-banner-show"))||!1}}const TELEGRAM_SCRIPT_URL="https://telegram.org/js/telegram-web-app.js?59";async function ensureTelegramWebApp(){var o;return(o=window.Telegram)!=null&&o.WebApp?window.Telegram.WebApp:new Promise((l,u)=>{const d=document.querySelector('script[src*="telegram-web-app.js"]');if(d){d.addEventListener("load",()=>{var h;(h=window.Telegram)!=null&&h.WebApp?l(window.Telegram.WebApp):u(new Error("Telegram WebApp not available after script load"))}),d.addEventListener("error",()=>u(new Error("Failed to load Telegram WebApp script")));return}const f=document.createElement("script");f.src=TELEGRAM_SCRIPT_URL,f.async=!1,f.onload=()=>{var h;(h=window.Telegram)!=null&&h.WebApp?l(window.Telegram.WebApp):u(new Error("Telegram WebApp not available after script load"))},f.onerror=()=>u(new Error("Failed to load Telegram WebApp script")),document.head.appendChild(f)})}function getTelegramWebApp(){var l;const o=(l=window.Telegram)==null?void 0:l.WebApp;if(!o)throw new Error("Telegram WebApp is not available. Ensure ensureTelegramWebApp() was awaited before calling this.");return o}const DEFAULT_CONFIG={inactivityTimeout:15e3,activityScoreThreshold:10,motionThreshold:.05,gyroscopeThreshold:.05,checkInterval:1e3,maxActivityScore:15,scoreDecayRate:.95,autoclickerDetection:{enabled:!0,maxIdenticalIntervals:5,minTimingVariation:10,maxIdenticalPositions:3,requiredMotionThreshold:.5}};class ActivityDetector{constructor(l={}){this.listeners=new Set,this.checkInterval=null,this.domEventListeners=[],this.lastMotionData=null,this.lastGyroscopeData=null,this.config={...DEFAULT_CONFIG,...l};try{this.isTelegramAvailable=!!getTelegramWebApp().platform}catch{this.isTelegramAvailable=!1}this.state=this.initializeState(),this.setupActivityDetection()}initializeState(){const l=this.detectPlatform(),u=this.checkMotionSupport(),d=this.checkGyroscopeSupport();return{isActive:!0,lastActivityTime:Date.now(),activityScore:100,platform:l,hasMotionSupport:u,hasGyroscopeSupport:d,autoclickerDetected:!1,clickPattern:{lastClickTime:0,lastClickPosition:{x:0,y:0},timingHistory:[],positionHistory:[]}}}detectPlatform(){if(this.isTelegramAvailable){const u=getTelegramWebApp().platform;return u==="android"||u==="ios"?"mobile":"desktop"}const l=navigator.userAgent.toLowerCase();return/mobile|android|iphone|ipad|phone/i.test(l)?"mobile":"desktop"}checkMotionSupport(){return this.isTelegramAvailable?!!getTelegramWebApp().isVersionAtLeast("6.1"):!1}checkGyroscopeSupport(){return this.isTelegramAvailable?!!getTelegramWebApp().isVersionAtLeast("6.1"):!1}setupActivityDetection(){this.setupDOMEvents(),this.setupTelegramSensors(),this.startPeriodicCheck()}setupDOMEvents(){["mousedown","mousemove","click","touchstart","touchmove","touchend","keydown","keyup","scroll","wheel","focus","blur"].forEach(u=>{const d=this.createActivityListener();document.addEventListener(u,d,{passive:!0}),this.domEventListeners.push({event:u,listener:d})})}createActivityListener(){return l=>{if(this.config.autoclickerDetection.enabled&&this.detectAutoclicker(l)){this.state={...this.state,autoclickerDetected:!0};return}this.updateActivity(5)}}detectAutoclicker(l){const u=Date.now(),d=this.getEventPosition(l),f=u-this.state.clickPattern.lastClickTime,h=[...this.state.clickPattern.timingHistory,f],m=this.countIdenticalIntervals(h),g=this.countIdenticalPositions(d),v=this.state.motionData&&Math.abs(this.state.motionData.x)+Math.abs(this.state.motionData.y)+Math.abs(this.state.motionData.z)>this.config.autoclickerDetection.requiredMotionThreshold,x=m>this.config.autoclickerDetection.maxIdenticalIntervals||g>this.config.autoclickerDetection.maxIdenticalPositions||this.state.platform==="mobile"&&!v;return this.state.clickPattern={lastClickTime:u,lastClickPosition:d,timingHistory:h.slice(-10),positionHistory:[...this.state.clickPattern.positionHistory,{...d,time:u}].slice(-10)},x}countIdenticalIntervals(l){if(l.length<2)return 0;let u=0;for(let d=1;d<l.length;d++)if(Math.abs(l[d]-l[d-1])<this.config.autoclickerDetection.minTimingVariation?u++:u=0,u>=this.config.autoclickerDetection.maxIdenticalIntervals)return u;return u}countIdenticalPositions(l){const u=this.state.clickPattern.positionHistory;if(u.length===0)return 0;let d=0;for(let f=u.length-1;f>=0;f--){const h=u[f];if(Math.abs(l.x-h.x)<2&&Math.abs(l.y-h.y)<2)d++;else break;if(d>=this.config.autoclickerDetection.maxIdenticalPositions)return d}return d}getEventPosition(l){if(l.type.includes("touch")){const u=l;if(u.touches.length>0)return{x:u.touches[0].clientX,y:u.touches[0].clientY}}else if(l.type.includes("mouse")){const u=l;return{x:u.clientX,y:u.clientY}}return{x:0,y:0}}setupTelegramSensors(){if(!this.isTelegramAvailable){console.warn("Activity Detection: Telegram WebApp not available. Motion and gyroscope sensors will not work.");return}const l=getTelegramWebApp();this.state.hasMotionSupport&&l.Accelerometer&&l.Accelerometer.start({refresh_rate:1e3},u=>{u&&l.onEvent("accelerometerChanged",()=>{const d=l.Accelerometer;d&&d.isStarted&&this.handleMotionData(d.x,d.y,d.z)})}),this.state.hasGyroscopeSupport&&l.DeviceOrientation&&l.DeviceOrientation.start({refresh_rate:1e3,need_absolute:!1},u=>{u&&l.onEvent("deviceOrientationChanged",()=>{const d=l.DeviceOrientation;d&&d.isStarted&&this.handleGyroscopeData(d.alpha,d.beta,d.gamma)})})}handleMotionData(l,u,d){if(this.lastMotionData){const f=Math.abs(l-this.lastMotionData.x),h=Math.abs(u-this.lastMotionData.y),m=Math.abs(d-this.lastMotionData.z),g=f+h+m;if(g>this.config.motionThreshold){const v=Math.min(this.config.maxActivityScore,g*10);this.updateActivity(v)}}this.lastMotionData={x:l,y:u,z:d},this.state={...this.state,motionData:{x:l,y:u,z:d}},this.state.autoclickerDetected&&this.config.autoclickerDetection.enabled&&Math.abs(l)+Math.abs(u)+Math.abs(d)>this.config.autoclickerDetection.requiredMotionThreshold&&(this.state={...this.state,autoclickerDetected:!1})}handleGyroscopeData(l,u,d){if(this.lastGyroscopeData){const f=Math.abs(l-this.lastGyroscopeData.alpha),h=Math.abs(u-this.lastGyroscopeData.beta),m=Math.abs(d-this.lastGyroscopeData.gamma),g=f+h+m;if(g>this.config.gyroscopeThreshold){const v=Math.min(this.config.maxActivityScore,g*5);this.updateActivity(v)}}this.lastGyroscopeData={alpha:l,beta:u,gamma:d},this.state={...this.state,gyroscopeData:{alpha:l,beta:u,gamma:d}}}updateActivity(l){const u=Date.now(),d=u-this.state.lastActivityTime,f=Math.max(0,1-d/this.config.inactivityTimeout),h=this.state.activityScore*f,m=Math.min(100,h+l);this.state={...this.state,isActive:m>=this.config.activityScoreThreshold,lastActivityTime:u,activityScore:m},this.notifyListeners()}startPeriodicCheck(){this.checkInterval=setInterval(()=>{const u=Date.now()-this.state.lastActivityTime,d=Math.max(0,1-u/this.config.inactivityTimeout),f=this.state.activityScore*d*this.config.scoreDecayRate,h=f>=this.config.activityScoreThreshold;(this.state.isActive!==h||Math.abs(this.state.activityScore-f)>1)&&(this.state={...this.state,isActive:h,activityScore:Math.max(0,f)},this.notifyListeners())},this.config.checkInterval)}notifyListeners(){this.listeners.forEach(l=>{try{l(this.state)}catch(u){console.error("Error in activity listener:",u)}})}subscribe(l){return this.listeners.add(l),()=>{this.listeners.delete(l)}}getState(){return{...this.state}}resetAutoclickerDetection(){this.state={...this.state,autoclickerDetected:!1,clickPattern:{lastClickTime:0,lastClickPosition:{x:0,y:0},timingHistory:[],positionHistory:[]}}}updateConfig(l){this.config={...this.config,...l}}destroy(){if(this.checkInterval&&(clearInterval(this.checkInterval),this.checkInterval=null),this.domEventListeners.forEach(({event:l,listener:u})=>{document.removeEventListener(l,u)}),this.domEventListeners=[],this.isTelegramAvailable){const l=getTelegramWebApp();l.Accelerometer&&l.Accelerometer.isStarted&&l.Accelerometer.stop(),l.DeviceOrientation&&l.DeviceOrientation.isStarted&&l.DeviceOrientation.stop()}this.listeners.clear()}}let activityDetectorInstance=null;function getActivityDetector(o){return activityDetectorInstance||(activityDetectorInstance=new ActivityDetector(o)),activityDetectorInstance}const log$4=createAdLogger("Adsgram");async function showAdsgramAdWithTimeout(o,l){if(!o)return log$4.error("Ad controller not available"),analytics.track("ad_show_error",{message:"Adsgram Ad Controller not available",error_type:"controller_unavailable",error_code:"controller_unavailable",...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram",placement_id:l}),!1;const u=o,d=log$4.flow("Showing Ad");return new Promise(f=>{const h=setTimeout(()=>{d.error("Ad request timed out after 5s"),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Adsgram ad request timed out after 5 seconds",error_type:"timeout",error_code:"timeout",timeout_duration:5e3,...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram",placement_id:l}),f(!1)},5e3),m=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram",placement_id:l}),d.info("Starting ad display..."),u.show().then(g=>{clearTimeout(h),g.done?(d.info("Ad finished successfully",{state:g.state,description:g.description}),d.end({status:"ok"}),analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram",placement_id:l,duration_ms:Math.round(performance.now()-m)}),f(!0)):(d.warn("Ad was not completed",{state:g.state,description:g.description}),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Adsgram ad was not completed.",error_type:"not_completed",error_code:"not_completed",result:g,...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram",placement_id:l}),f(!1))}).catch(g=>{clearTimeout(h),d.error("Ad error",{error:g==null?void 0:g.error,state:g==null?void 0:g.state,description:g==null?void 0:g.description}),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Adsgram ad threw an error",error_type:"exception",error_code:"exception",error:(g==null?void 0:g.error)||String(g),...getBaseAnalyticsParams(),ad_type:"adsgram",provider:"adsgram",placement_id:l}),f(!1)})})}const log$3=createAdLogger("Gigapub");function parseProjectId(o){const l=document.createElement("div");l.innerHTML=o;const u=l.querySelector("script");if(!u)throw new Error("Gigapub: no script tag found in gigapub configuration.");const f=(u.getAttribute("src")||"").match(/[?&]id=([^&]+)/);if(f)return f[1];const h=u.getAttribute("data-project-id");if(h)return h;throw new Error("Gigapub: could not parse project id from script.")}async function initGigapubAds(o){const l=log$3.flow("Initialization"),u=parseProjectId(o);l.info("Parsed project ID",{projectId:u});const d=document.createElement("script");return d.setAttribute("data-project-id",u),d.text="!function(){var s=document.currentScript,p=s.getAttribute('data-project-id')||'default';var d=['https://ad.gigapub.tech','https://ru-ad.gigapub.tech'],i=0,t,sc;function l(){sc=document.createElement('script');sc.async=true;sc.src=d[i]+'/script?id='+p;clearTimeout(t);t=setTimeout(function(){sc.onload=sc.onerror=null;sc.src='';if(++i<d.length)l()},15000);sc.onload=function(){clearTimeout(t)};sc.onerror=function(){clearTimeout(t);if(++i<d.length)l()};document.head.appendChild(sc)}l()}()",new Promise((f,h)=>{document.head.appendChild(d),l.info("Multi-CDN script appended to head");const m=Date.now(),g=setInterval(()=>{if(window.showGiga&&typeof window.showGiga=="function")clearInterval(g),l.end({status:"ok",data:{reason:"showGiga found"}}),f();else if(Date.now()-m>35e3){clearInterval(g);const v=new Error("Gigapub: showGiga function did not appear on window object within timeout.");l.error("Init timeout — showGiga not found after 35s"),l.end({status:"fail"}),h(v)}},100)})}async function showGigapubAd(o,l){const u=crypto.randomUUID();if(!window.showGiga||typeof window.showGiga!="function")return o?(log$3.warn("showGiga not available, using fallback",{transactionId:u}),analytics.track("ad_show_fallback",{message:"Gigapub showGiga function not available, using fallback.",...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:u,placement_id:l}),await o()):(analytics.track("ad_show_error",{message:"Gigapub showGiga function not available",error_type:"function_unavailable",error_code:"function_unavailable",...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:u,placement_id:l}),!1);const d=log$3.flow("Showing Ad");return d.info("Starting ad display",{transactionId:u,placementId:l}),new Promise(f=>{const h=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:u,placement_id:l}),window.showGiga({transactionId:u,showTag:l}).then(()=>{d.info("Ad finished successfully",{transactionId:u,placementId:l}),d.end({status:"ok"}),analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:u,placement_id:l,duration_ms:Math.round(performance.now()-h)}),f(!0)}).catch(m=>{d.error("Ad error",{error:m,transactionId:u,placementId:l}),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Gigapub ad failed or was skipped",error_type:"exception",error_code:"exception",error:m==null?void 0:m.toString(),error_message:(m==null?void 0:m.message)||"Unknown error",...getBaseAnalyticsParams(),ad_type:"gigapub",provider:"gigapub",transaction_id:u,placement_id:l}),f(!1)})})}const log$2=createAdLogger("Monetag");async function initMonetagAds(o){const l=log$2.flow("Initialization");try{const u=document.createElement("div");u.innerHTML=o;const d=u.firstElementChild;if(d){const f=d.dataset.sdk||null,h=document.createElement("script");for(let m=0;m<d.attributes.length;m++){const g=d.attributes[m];h.setAttribute(g.name,g.value)}return d.text&&(h.text=d.text),await new Promise((m,g)=>{if(!f){const x=new Error("Monetag: ad function name not found in script tag");return l.error("Ad function name not found in script tag"),l.end({status:"fail"}),g(x)}const v=f;l.info("Ad function name found",{fnName:v}),h.onload=()=>{l.info("Script loaded, waiting for function on window...");const x=Date.now(),b=setInterval(()=>{if(typeof window[v]=="function")clearInterval(b),l.end({status:"ok",data:{fnName:v}}),m();else if(Date.now()-x>5e3){clearInterval(b);const S=new Error(`Monetag: function ${v} did not appear on window object within 5 seconds.`);l.error("Init timeout — function not found after 5s",{fnName:v}),l.end({status:"fail"}),g(S)}},100)},h.onerror=x=>{l.error("Script failed to load",x),l.end({status:"fail"}),g(new Error("Monetag: script failed to load."))},document.head.appendChild(h),l.info("Script appended to head")}),f}return l.error("No script tag found in monetag configuration"),l.end({status:"fail"}),null}catch(u){return l.error("Failed to initialize",u),l.end({status:"fail"}),null}}function createMonetagFallbackFunction(o,l){return async()=>{const u=window.game_id?String(window.game_id):"0";return await showMonetagAd(o,u,l)}}async function showMonetagAd(o,l,u){const d=log$2.flow("Showing Ad");if(d.info("Starting ad display",{fnName:o,ymid:l,placementId:u}),!o)return d.error("Ad function name not found"),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Monetag ad function name not found",error_type:"function_name_missing",error_code:"function_name_missing",...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u}),!1;const f=window[o];if(typeof f!="function")return d.error("Ad function not found on window",{fnName:o}),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Monetag ad function not found on window object",error_type:"function_unavailable",error_code:"function_unavailable",function_name:o,...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u}),!1;const h=u?`orbit-${u}`:"orbit";return new Promise(m=>{const g=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u}),f({ymid:l,requestVar:h,timeout:5}).then(()=>{d.info("Ad watched successfully",{placementId:u}),d.end({status:"ok"}),analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u,duration_ms:Math.round(performance.now()-g)}),m(!0)}).catch(v=>{d.error("Ad failed or was skipped",{error:v,placementId:u}),d.end({status:"fail"}),analytics.track("ad_show_error",{message:"Monetag ad failed or was skipped",error_type:"ad_failed",error_code:"ad_failed",error:String(v),...getBaseAnalyticsParams(),ad_type:"monetag",provider:"monetag",placement_id:u}),m(!1)})})}var define_process_env_default$1={NODE_ENV:"production",version:"1.94.2",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const log$1=createAdLogger("Orbit");async function initOrbitAds(){const o=log$1.flow("Initialization");o.info("Loading script...");const l=define_process_env_default$1.ADS_SCRIPT_URL,u=document.createElement("script");return u.src=l,u.async=!0,new Promise((d,f)=>{u.onload=()=>{o.info("Script loaded, waiting for showOrbitAds function...");const h=Date.now(),m=setInterval(()=>{if(window.showOrbitAds&&typeof window.showOrbitAds=="function")clearInterval(m),o.end({status:"ok"}),d();else if(Date.now()-h>5e3){clearInterval(m);const g=new Error("Orbit: showOrbitAds function did not appear on window object within 5 seconds.");o.error("Init timeout — showOrbitAds not found after 5s",g),o.end({status:"fail"}),f(g)}},100)},u.onerror=h=>{o.error("Script failed to load",h),o.end({status:"fail"}),f(new Error("Orbit: script failed to load."))},document.head.appendChild(u),o.info("Script appended to head")})}async function showOrbitAd(o,l){const u=crypto.randomUUID(),d=l==null?void 0:l.placementId;if(!window.showOrbitAds||typeof window.showOrbitAds!="function")return o?(log$1.warn("showOrbitAds not available, using fallback",{transactionId:u}),analytics.track("ad_show_fallback",{message:"Orbit showOrbitAds function not available, using fallback.",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u,placement_id:d}),await o()):(analytics.track("ad_show_error",{message:"Orbit showOrbitAds function not available",error_type:"function_unavailable",error_code:"function_unavailable",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u,placement_id:d}),!1);const f=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u,placement_id:d});const h=log$1.flow("Showing Ad");h.info("Starting ad display",{transactionId:u,...l});try{const m=await window.showOrbitAds(l);if(h.info("showOrbitAds resolved",{response:m,transactionId:u}),m.is_direct_sales)return analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u,placement_id:d,duration_ms:Math.round(performance.now()-f)}),h.end({status:"ok",data:{reason:"internal ad"}}),!0;if(h.warn("is_direct_sales=false, falling back to provider",{transactionId:u}),analytics.track("ad_show_fallback",{message:"Orbit has no ad available, falling back to provider network.",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u,placement_id:d}),o){const g=await o();return h.end({status:g?"ok":"fail",data:{via:"fallback",result:g}}),g}return h.end({status:"fail",data:{reason:"no fallback"}}),!1}catch(m){if(h.error("Ad error",{error:m,transactionId:u}),analytics.track("ad_show_error",{message:"Orbit ad failed or was skipped",error_type:"exception",error_code:"exception",error:m instanceof Error?m.toString():String(m),error_message:m instanceof Error?m.message:"Unknown error",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u,placement_id:d}),o){h.warn("Error occurred, using fallback provider",{transactionId:u}),analytics.track("ad_show_fallback",{message:"Orbit ad errored, falling back to provider network.",...getBaseAnalyticsParams(),ad_type:"orbit",provider:"orbit",transaction_id:u,placement_id:d});const g=await o();return h.end({status:g?"ok":"fail",data:{via:"fallback after error",result:g}}),g}return h.end({status:"fail"}),!1}}const log=createAdLogger("TMA");async function checkAdStatus(o,l){try{log.info("Checking ad status",{adId:o});const u=await fetch(`https://sp.tmanetwork.tech/bid_info?id=${o}`);if(u.status===204)return log.info("Ad status: NOT_SHOWED (204)",{adId:o}),analytics.track("ad_status_not_showed",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma",placement_id:l}),"NOT_SHOWED";if(!u.ok)throw new Error(`Failed to check ad status: ${u.status}`);const d=await u.json();return d.click_created?(log.info("Ad status: CLICKED",{adId:o}),analytics.track("ad_status_clicked",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma",placement_id:l}),"CLICKED"):d.imp_created?(log.info("Ad status: SHOWED",{adId:o}),analytics.track("ad_status_showed",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma",placement_id:l}),"SHOWED"):(log.info("Ad status: NOT_SHOWED (no imp/click)",{adId:o}),analytics.track("ad_status_not_showed",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma",placement_id:l}),"NOT_SHOWED")}catch(u){throw log.error("Error checking ad status",{adId:o,error:u}),analytics.track("ad_status_error",{...getBaseAnalyticsParams(),ad_id:o,ad_type:"tma",provider:"tma",placement_id:l}),u}}async function showAd(o={},l){if(!window.TMANetwork){const u=new Error("TMANetwork is not available");throw log.error("TMANetwork not available on window"),analytics.track("ad_show_error",{message:"TMANetwork is not available",error_type:"sdk_unavailable",error_code:"sdk_unavailable",...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",placement_id:l}),u}if(window.TMANetwork.hasInterstitialAd()){log.info("Ad already loaded, showing immediately"),o.onStart&&o.onStart();try{const u=performance.now();analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",placement_id:l});const d=await window.TMANetwork.showInterstitialAd();return log.info("Ad shown successfully",{adId:d.id}),analytics.track("ad_show_success",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",ad_id:d.id,placement_id:l,duration_ms:Math.round(performance.now()-u)}),window.TMANetwork.reloadAd(),d}catch(u){throw log.error("Error showing preloaded ad",u),analytics.track("ad_show_error",{message:u instanceof Error?u.message:"Unknown error showing TMA ad",error_type:"exception",error_code:"exception",error:u instanceof Error?u.toString():String(u),...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",placement_id:l}),u}}return log.info("Waiting for ad to load (10s timeout)..."),new Promise((u,d)=>{let f=!1;const h=async()=>{if(!f){f=!0;try{log.info("onAdLoaded event received"),analytics.track("ad_load_event_received",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",placement_id:l}),o.onStart&&o.onStart(),analytics.track("ad_show_started",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",placement_id:l});const m=await window.TMANetwork.showInterstitialAd();log.info("Ad shown successfully after load",{adId:m.id}),analytics.track("ad_load_success",{...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",ad_id:m.id,placement_id:l}),window.TMANetwork.reloadAd(),u(m)}catch(m){log.error("Error showing ad after load event",m),analytics.track("ad_load_error",{message:m instanceof Error?m.message:"Unknown error loading TMA ad",error_type:"load_exception",error_code:"load_exception",error:m instanceof Error?m.toString():String(m),...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",placement_id:l}),d(m)}}};setTimeout(()=>{if(!f){f=!0;const m=new Error("Ad load timeout");log.error("Ad load timeout after 10s"),analytics.track("ad_load_timeout",{message:"Ad load timeout after 10 seconds",error_type:"timeout",error_code:"timeout",timeout_duration:1e4,...getBaseAnalyticsParams(),ad_type:"tma",provider:"tma",placement_id:l}),d(m)}},1e4),window.TMANetwork.addEventListener("onAdLoaded",h)})}function loadTMANetworkScript(){return new Promise((o,l)=>{const u=log.flow("Script Load");if(analytics.track("tma_script_load_requested",getBaseAnalyticsParams()),document.querySelector('script[src="https://files.tmanetwork.tech/tmanetwork.min.js"]')){u.info("Script already loaded (skipping)"),u.end({status:"ok",data:{reason:"already loaded"}}),o();return}const d=document.createElement("script");d.src="https://files.tmanetwork.tech/tmanetwork.min.js",d.async=!0,d.onload=()=>{u.info("Script loaded successfully"),u.end({status:"ok"}),analytics.track("tma_script_load_success",getBaseAnalyticsParams()),o()},d.onerror=f=>{u.error("Failed to load script",f),u.end({status:"fail"}),analytics.track("tma_script_load_error",{message:"Failed to load TMANetwork script",error_type:"script_load_failed",error_code:"script_load_failed",error:String(f),...getBaseAnalyticsParams()}),captureException(f),l(new Error("Failed to load TMANetwork script"))},document.head.appendChild(d)})}const TUTORIAL_PLACEMENT_CONSUMED_KEY="cs_tutorial_placement_consumed";function consumeTutorialPlacement(){var o,l,u;try{return((u=(l=(o=window.Telegram)==null?void 0:o.WebApp)==null?void 0:l.initDataUnsafe)==null?void 0:u.start_param)!=="tutorial"||window.localStorage.getItem(TUTORIAL_PLACEMENT_CONSUMED_KEY)?void 0:(window.localStorage.setItem(TUTORIAL_PLACEMENT_CONSUMED_KEY,"1"),"tutorial")}catch{return}}function initSentry(){init({dsn:"https://15f2f3a80cbbee5f94c302756f8595d5@o4509677809172480.ingest.de.sentry.io/4509677817364560",sendDefaultPii:!0,sampleRate:.01,integrations:[dedupeIntegration()],maxBreadcrumbs:50,beforeBreadcrumb(o){return o.category==="console"&&o.level!=="error"?null:o}})}function validateCloudStorageValue(o){if(o==null)return{isValid:!1,error:"Value cannot be null or undefined"};const l=o.length;let u;try{u=new TextEncoder().encode(o)}catch{return{isValid:!1,error:"Value cannot be encoded as UTF-8",characterCount:l}}const d=u.length;if(d>4096)return{isValid:!1,error:`Value exceeds maximum size: ${d} bytes (limit: 4096 bytes)`,byteSize:d,characterCount:l};if(o.includes("\0"))return{isValid:!1,error:"Value contains null bytes (\\0) which are not allowed",byteSize:d,characterCount:l};if(/[\x01-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/.test(o))return{isValid:!1,error:"Value contains invalid control characters",byteSize:d,characterCount:l};try{if(new TextDecoder("utf-8",{fatal:!0}).decode(u)!==o)return{isValid:!1,error:"Value encoding/decoding mismatch",byteSize:d,characterCount:l}}catch{return{isValid:!1,error:"Value contains invalid UTF-8 sequences",byteSize:d,characterCount:l}}return{isValid:!0,byteSize:d,characterCount:l}}function ensureViewportMetaTag(){if(typeof document>"u")return;const o=document.head||document.getElementsByTagName("head")[0];if(!o)return;const l=document.querySelector('meta[name="viewport"]'),u=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);if(!l&&u){const d=document.createElement("meta");d.name="viewport",d.content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no",o.appendChild(d)}}const getGlobalObj=()=>{if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;throw new Error("No global object found")},GAME_INITIALIZED_LAUNCH_KEY="cs_game_initialized_launch",GAME_READY_LAUNCH_KEY="cs_game_ready_launch";function getLaunchId(){var l,u,d;const o=(u=(l=window.Telegram)==null?void 0:l.WebApp)==null?void 0:u.initDataUnsafe;return(o==null?void 0:o.hash)||((d=o==null?void 0:o.auth_date)==null?void 0:d.toString())||""}function shouldTrackOncePerLaunch(o){const l=getLaunchId();if(!l)return!0;try{return sessionStorage.getItem(o)===l?!1:(sessionStorage.setItem(o,l),!0)}catch{return!0}}function throttleLeading(o,l){let u=0;return function(...d){const f=Date.now();return f-u>=l?(u=f,o.apply(this,d)):(console.log(`Function is throttled. Next call available in ${l-(f-u)}ms`),Promise.resolve(!1))}}const RPC_REQUEST="orbit-sdk:rpc-request",RPC_RESPONSE="orbit-sdk:rpc-response",RPC_EVENT="orbit-sdk:rpc-event",RPC_TIMEOUT_MS=3e4;function isInIframe(){var o,l;return window.parent!==window&&!((l=(o=window.Telegram)==null?void 0:o.WebApp)!=null&&l.initData)}function callParent(o,...l){const u=crypto.randomUUID();return new Promise((d,f)=>{const h=setTimeout(()=>{window.removeEventListener("message",m),f(new Error(`SDK RPC call "${o}" timed out after ${RPC_TIMEOUT_MS}ms`))},RPC_TIMEOUT_MS);function m(g){const v=g.data;(v==null?void 0:v.type)!==RPC_RESPONSE||v.id!==u||(clearTimeout(h),window.removeEventListener("message",m),v.error?f(new Error(v.error)):d(v.result))}window.addEventListener("message",m),window.parent.postMessage({type:RPC_REQUEST,id:u,method:o,args:l},"*")})}function createIframeSdk(){let o=null,l=null;return window.addEventListener("message",u=>{var h;if(((h=u.data)==null?void 0:h.type)!==RPC_EVENT)return;const{event:d,args:f}=u.data;d==="onAdStart"&&o?o():d==="onAdEnd"&&l&&l(f[0])}),new Proxy({},{get(u,d){return d==="onAdStart"?o:d==="onAdEnd"?l:d==="version"?"__IFRAME_RPC__":d==="getAdsgramController"?()=>null:d==="telegramCloudStorage"?null:(...f)=>callParent(d,...f)},set(u,d,f){return d==="onAdStart"?(o=f,!0):(d==="onAdEnd"&&(l=f),!0)}})}var define_process_env_default={NODE_ENV:"production",version:"1.94.2",BASE_URL:"https://app.portalapp.games/sdk",ADS_SCRIPT_URL:"https://ads-sdk.portalapp.games/script.js",ASSETS_BASE_URL:"https://sdk.portalapp.games/assets"};const _isThirdPartyIframe=window.parent!==window&&!((hc=(fc=window.Telegram)==null?void 0:fc.WebApp)!=null&&hc.initData);_isThirdPartyIframe||(ensureViewportMetaTag(),initSentry());const adLog=createAdLogger("SDK");let gameInitializedAt=null;const CloudStorageGetItem=o=>new Promise((l,u)=>{getTelegramWebApp().CloudStorage.getItem(o,(d,f)=>{d?u(new Error(d)):l(f??null)})}),CloudStorageSetItem=(o,l)=>new Promise((u,d)=>{getTelegramWebApp().CloudStorage.setItem(o,l,(f,h)=>{f?d(new Error(f)):u(h??null)})}),CloudStorageRemoveItem=o=>new Promise((l,u)=>{getTelegramWebApp().CloudStorage.removeItem(o,(d,f)=>{d?u(new Error(d)):l(f??null)})}),G_MEASUREMENT_ID="G-4RMXVE2K75",BANNER_HEIGHT=60,bannerManager=new BannerManager({height:BANNER_HEIGHT});let timer=null;const pending={};let state={};const CLOUD_STORAGE_PREFIX="sdk_pending_",LOCAL_STORAGE_PREFIX="portal_sdk_pending_";function setValueSync(o,l){let u;if(typeof l=="object"&&l!==null)try{u=JSON.stringify(l)}catch(h){console.error(`Failed to serialize value for ${o}:`,h),u=String(l)}else u=String(l);state[o]=pending[o]=u;try{localStorage.setItem(`${LOCAL_STORAGE_PREFIX}${o}`,u)}catch(h){console.error(`Failed to save ${o} to localStorage:`,h)}const{isValid:d,error:f}=validateCloudStorageValue(u);if(!d){console.warn(`Value for ${o} cannot be saved to CloudStorage:`,f);return}CloudStorageSetItem(`${CLOUD_STORAGE_PREFIX}${o}`,u).catch(h=>{console.error(`Failed to save ${o} to CloudStorage:`,h)})}function removeValueSync(o){delete state[o],delete pending[o];try{localStorage.removeItem(`${LOCAL_STORAGE_PREFIX}${o}`)}catch(l){console.error(`Failed to remove ${o} from localStorage:`,l)}CloudStorageRemoveItem(`${CLOUD_STORAGE_PREFIX}${o}`).catch(console.error),makeRequest(`storage/${o}`,"DELETE").catch(console.error)}function getValueSync(o){return state[o]}async function loadAll(){const o={};try{for(let h=0;h<localStorage.length;h++){const m=localStorage.key(h);if(m&&m.startsWith(LOCAL_STORAGE_PREFIX)){const g=localStorage.getItem(m);if(g){const v=m.replace(LOCAL_STORAGE_PREFIX,"");o[v]=g,console.log(`Loaded from localStorage: ${v}`)}}}}catch(h){console.error("Failed to load from localStorage:",h)}const l={};try{const h=await new Promise((m,g)=>{getTelegramWebApp().CloudStorage.getKeys((v,x)=>{v?g(new Error(v)):m(x??[])})});for(const m of h)if(m.startsWith(CLOUD_STORAGE_PREFIX))try{const g=await CloudStorageGetItem(m);if(g){const v=m.replace(CLOUD_STORAGE_PREFIX,"");l[v]=g,console.log(`Loaded from CloudStorage: ${v}`)}}catch(g){console.error(`Failed to load ${m} from CloudStorage:`,g)}}catch(h){console.error("Failed to load keys from CloudStorage:",h)}const u={...l,...o},d=[500,500,1e3];let f=0;for(;;)try{const h=await makeRequest("storage/","GET");state={...h.data,...u};for(const m of Object.keys(u))pending[m]=u[m];console.log(`Loaded state from backend (${Object.keys(h.data).length} keys), localStorage (${Object.keys(o).length} keys) and CloudStorage (${Object.keys(l).length} keys)`);return}catch(h){if(f>=d.length){console.error("Failed to load all storage values:",h),state=u;for(const m of Object.keys(u))pending[m]=u[m];return}await delay(d[f]),f+=1}}function startSaveTick(){timer&&clearInterval(timer),loadAll(),timer=setInterval(async()=>{await savePendingChanges()},5*1e3)}async function savePendingChanges(){const o={...pending};console.log("save pending changes "+Object.keys(o).length),console.log(pending);for(const l of Object.keys(o)){const u=o[l],d=[500,500,1e3];let f=0,h=!1;for(;!h;)try{if(await makeRequest(`storage/${l}`,"PUT",{value:u}),pending[l]===u){delete pending[l];try{localStorage.removeItem(`${LOCAL_STORAGE_PREFIX}${l}`),console.log(`Removed ${l} from localStorage after successful sync`)}catch(m){console.error(`Failed to remove ${l} from localStorage:`,m)}try{await CloudStorageRemoveItem(`${CLOUD_STORAGE_PREFIX}${l}`),console.log(`Removed ${l} from CloudStorage after successful sync`)}catch(m){console.error(`Failed to remove ${l} from CloudStorage:`,m)}}else console.log(`Value for ${l} changed during save, keeping in pending and local storages`);h=!0}catch(m){if(f>=d.length){console.error(`Failed to save key ${l}:`,m);break}await delay(d[f]),f+=1}}}let configCache=null;const CACHE_DURATION_MS=5*60*1e3;let adType=null,orbitInitialized=!1,monetagShowAdFnName=null,adsgramAdController=null,countRequestAd=1,externalBotId=null,externalAuthData=null,isPortal=!1,launchResponseCache=null;const telegramReady=ensureTelegramWebApp(),makeRequest=createMakeRequest({baseUrl:BASE_URL,getAuthData:()=>externalAuthData,getBotId:()=>externalBotId,getInitData:()=>{var o,l;return((l=(o=window.Telegram)==null?void 0:o.WebApp)==null?void 0:l.initData)??""},waitUntilReady:()=>telegramReady});function getStartupConfig(){return window==null?void 0:window.startupConfig}let intervalId;const trackTimeEveryS=20;function startGameTimeTrack(){intervalId&&clearInterval(intervalId),CryptoSteamSDK.trackGameTimeTick(),intervalId=setInterval(()=>{CryptoSteamSDK.trackGameTimeTick()},trackTimeEveryS*1e3)}const CryptoSteamSDK={version:define_process_env_default.version,onAdStart:null,onAdEnd:null,initialize:async(o,l)=>{var f,h,m,g;const u=await ensureTelegramWebApp();initAnalytics(),isPortal=(l==null?void 0:l.mode)==="portal";const d=adLog.flow("SDK & Ads Initialization");try{const v=(h=(f=u==null?void 0:u.initDataUnsafe)==null?void 0:f.user)==null?void 0:h.id;v&&analytics.identify(v),analytics.track("sdk_initialized",getBaseAnalyticsParams()),l!=null&&l.authData&&(console.error("USE AUTH_DATA FOR REQUESTS!!!"),console.log("options.authData",l.authData),externalAuthData=l.authData),o&&(externalBotId=o,queryClient.invalidateQueries({queryKey:[PROFILE_TAG]}),queryClient.invalidateQueries({queryKey:[PRICES_TAG]})),isPortal||startSaveTick();const x=await CryptoSteamSDK.getProfile(),b=await CryptoSteamSDK.getConfig();libExports.isMobile&&b.supported_screen_formats.includes("fullscreen")||!libExports.isMobile&&b.supported_screen_formats.includes("fullscreen-desktop")?(u==null||u.setHeaderColor("#000"),u==null||u.setBackgroundColor("#000"),u==null||u.requestFullscreen()):u==null||u.exitFullscreen(),d.info("Starting initialization",{version:define_process_env_default.version});const S=await makeRequest("launch","POST");launchResponseCache=S,await new Promise(w=>{document.readyState==="complete"?w():window.addEventListener("load",()=>w())});const{ads:E}=S;try{await initOrbitAds(),orbitInitialized=!0}catch(w){d.error("Orbit failed to initialize",w)}if((E==null?void 0:E.type)==="tma"&&E.tmaAdsKey)if(adType="tma",await loadTMANetworkScript(),window.TMANetwork)await window.TMANetwork.init(S.tma_ads_key),d.info("TMANetwork initialized successfully");else throw new Error("TMANetwork object not found.");else if((E==null?void 0:E.type)==="monetag"&&E.monetag)adType="monetag",monetagShowAdFnName=await initMonetagAds(E.monetag);else if((E==null?void 0:E.type)==="adsgram"&&E.adsgram){adType="adsgram",d.info("Adsgram: initialization started");try{const w=document.createElement("script");w.src="https://sad.adsgram.ai/js/sad.min.js",w.async=!0,await new Promise((T,C)=>{w.onload=()=>{d.info("Adsgram: script loaded, waiting for window.Adsgram...");const M=Date.now(),A=setInterval(()=>{if(window.Adsgram&&typeof window.Adsgram.init=="function")if(clearInterval(A),d.info("Adsgram: window.Adsgram found, initializing..."),adsgramAdController=window.Adsgram.init({blockId:E.adsgram}),adsgramAdController)d.info("Adsgram: initialized successfully"),T();else{const k=new Error("Adsgram: init returned null or undefined.");d.error("Adsgram: init returned null",k),C(k)}else if(Date.now()-M>5e3){clearInterval(A);const k=new Error("Adsgram: window.Adsgram did not appear within 5 seconds.");d.error("Adsgram: init timeout after 5s",k),C(k)}},100)},w.onerror=M=>{d.error("Adsgram: script failed to load",M),C(new Error("Adsgram: script failed to load."))},document.head.appendChild(w),d.info("Adsgram: script appended to head")})}catch(w){d.error("Adsgram: failed to initialize",w)}}else if((E==null?void 0:E.type)==="gigapub"&&E.gigapub){adType="gigapub";try{await initGigapubAds(E.gigapub)}catch(w){d.error("Gigapub: failed to initialize",w)}if(E.monetag)try{monetagShowAdFnName=await initMonetagAds(E.monetag),d.info("Monetag fallback initialized for Gigapub")}catch(w){d.error("Monetag fallback: failed to initialize",w)}}d.end({status:"ok",data:{provider:adType,orbitInitialized}}),(m=x==null?void 0:x.audiences)!=null&&m[0]&&analytics.track("$experiment_started",{"Experiment name":"start_page_ab","Variant name":(g=x==null?void 0:x.audiences)==null?void 0:g[0]})}catch(v){d.error("Error during ads initialization",v),d.end({status:"fail"})}try{const v=await CryptoSteamSDK.getProfile(),x=await CryptoSteamSDK.getConfig();if(l!=null&&l.authData&&console.log("externalAuthData",externalAuthData),!v){console.error("Profile not found");return}if(!x){console.error("Config not found");return}analytics.identify(String(v.id)),window.game_id=v.game_id,window.game_title=x.title,ReactGA.initialize(G_MEASUREMENT_ID,{gaOptions:{userId:v.id,gameId:v.game_id}}),ReactGA.event("init",{gameId:v.game_id}),shouldTrackOncePerLaunch(GAME_INITIALIZED_LAUNCH_KEY)&&(gameInitializedAt=performance.now(),analytics.track("game_initialized",{game_id:v.game_id,game_title:x.title})),!isPortal&&!(l!=null&&l.disable_startup_ads)&&CryptoSteamSDK.requestAd().catch(b=>{adLog.error("Error requesting initial ad",b)})}catch(v){console.error("Error during GA initialization:",v)}},getLaunchResponse:()=>launchResponseCache,isLaunchedFromPortal:()=>{var o,l,u;return((u=(l=(o=window==null?void 0:window.Telegram)==null?void 0:o.WebApp)==null?void 0:l.initDataUnsafe)==null?void 0:u.start_param)==="orbit_launcher"},getConfig:async()=>{const o=Date.now();if(configCache&&configCache.expiresAt>o)return configCache.config;const l=await makeRequest("config","GET");return configCache={config:l,expiresAt:o+CACHE_DURATION_MS},l},isAdEnabled:async()=>!0,requestAd:async(o={})=>{var u,d,f,h,m;const l=adLog.flow("requestAd");(u=CryptoSteamSDK.onAdStart)==null||u.call(CryptoSteamSDK);try{const g=await CryptoSteamSDK.getProfile(),v=CryptoSteamSDK.getLaunchResponse();if(countRequestAd===1&&!isPortal&&(l.info("First request — checking launch rules",{is_ad_cooldown:v==null?void 0:v.is_ad_cooldown}),v&&v.is_ad_cooldown))return countRequestAd++,l.warn("Skipped: ad is in cooldown",{is_ad_cooldown:v.is_ad_cooldown}),(d=CryptoSteamSDK.onAdEnd)==null||d.call(CryptoSteamSDK,!1),l.end({status:"fail",data:{reason:"cooldown"}}),!1;if(g.ads_free&&!isPortal)return l.warn("Skipped: profile has ads_free flag"),(f=CryptoSteamSDK.onAdEnd)==null||f.call(CryptoSteamSDK,!1),l.end({status:"fail",data:{reason:"ads_free"}}),!1;const b=o.placementId??consumeTutorialPlacement()??"none";analytics.track("ad_show_requested",{...getBaseAnalyticsParams(),ad_type:orbitInitialized?"orbit":adType,provider:orbitInitialized?"orbit":adType,placement_id:b});const S=async()=>{if(adType==="tma")try{return await showAd(o,b),!0}catch(w){return l.error("Error showing TMA ad",w),!1}if(adType==="monetag"){const T=`${(await CryptoSteamSDK.getProfile()).game_id}`;return await showMonetagAd(monetagShowAdFnName,T,b)}if(adType==="adsgram")return await showAdsgramAdWithTimeout(adsgramAdController,b);if(adType==="gigapub"){const w=createMonetagFallbackFunction(monetagShowAdFnName,b);return await showGigapubAd(w,b)}return l.error("Ad network not initialized or not supported",{adType}),analytics.track("ad_show_error",{...getBaseAnalyticsParams(),message:"Ad network not initialized or not supported",ad_type:adType,provider:adType,error_type:"unsupported_network",error_code:"unsupported_network",placement_id:b}),!1};countRequestAd=++countRequestAd;let E;if(l.info("Dispatching ad request",{orbitInitialized,adType,placementId:b}),orbitInitialized){const w=g.game_id?Number(g.game_id):void 0;E=await showOrbitAd(S,{zoneId:w,placementId:b})}else E=await S();return l.end({status:E?"ok":"fail",data:{result:E}}),(h=CryptoSteamSDK.onAdEnd)==null||h.call(CryptoSteamSDK,E),E}catch(g){return l.error("Error in requestAd",g),l.end({status:"fail"}),analytics.track("ad_show_error",{...getBaseAnalyticsParams(),message:g instanceof Error?g.message:"Unknown error in requestAd",error_type:"sdk_exception",error_code:"sdk_exception",ad_type:adType,provider:adType,error:g instanceof Error?g.toString():String(g),placement_id:o.placementId??"none"}),(m=CryptoSteamSDK.onAdEnd)==null||m.call(CryptoSteamSDK,!1),!1}},requestRewardAd:async(o={})=>{var u,d,f,h;const l=adLog.flow("requestRewardAd");(u=CryptoSteamSDK.onAdStart)==null||u.call(CryptoSteamSDK);try{if((await CryptoSteamSDK.getProfile()).ads_free)return l.warn("Skipped: profile has ads_free flag"),(d=CryptoSteamSDK.onAdEnd)==null||d.call(CryptoSteamSDK,!0),l.end({status:"ok",data:{reason:"ads_free"}}),!0;const g=o.placementId??consumeTutorialPlacement()??"none";analytics.track("ad_show_requested",{...getBaseAnalyticsParams(),ad_type:orbitInitialized?"orbit":adType,provider:orbitInitialized?"orbit":adType,placement_id:g});const v=async()=>{if(adType==="tma")try{const b=await showAd(o,g);await delay(1e3);const S=await checkAdStatus(b.id,g);return S==="SHOWED"||S==="CLICKED"}catch(b){return l.error("Error showing TMA reward ad",b),!1}if(adType==="monetag"){const S=`${(await CryptoSteamSDK.getProfile()).game_id}`;return await showMonetagAd(monetagShowAdFnName,S,g)}if(adType==="adsgram")return await showAdsgramAdWithTimeout(adsgramAdController,g);if(adType==="gigapub"){const b=createMonetagFallbackFunction(monetagShowAdFnName,g),S=await showGigapubAd(b,g);return await delay(2e3),S}return l.error("Ad network not initialized or not supported",{adType}),analytics.track("ad_show_error",{...getBaseAnalyticsParams(),message:"Ad network not initialized or not supported",ad_type:adType,provider:adType,error_type:"unsupported_network",error_code:"unsupported_network",placement_id:g}),!1};let x;if(l.info("Dispatching reward ad request",{orbitInitialized,adType,placementId:g}),orbitInitialized){const b=window.game_id?Number(window.game_id):void 0;x=await showOrbitAd(v,{zoneId:b,placementId:g})}else x=await v();return l.end({status:x?"ok":"fail",data:{result:x}}),(f=CryptoSteamSDK.onAdEnd)==null||f.call(CryptoSteamSDK,x),x}catch(m){return l.error("Error in requestRewardAd",m),l.end({status:"fail"}),analytics.track("ad_show_error",{...getBaseAnalyticsParams(),message:m instanceof Error?m.message:"Unknown error in requestRewardAd",error_type:"sdk_exception",error_code:"sdk_exception",ad_type:adType,provider:adType,error:m instanceof Error?m.toString():String(m),placement_id:o.placementId??"none"}),(h=CryptoSteamSDK.onAdEnd)==null||h.call(CryptoSteamSDK,!1),!1}},getProfile:async()=>await makeRequest("profile","GET"),getBalance:async()=>await makeRequest("balance","GET"),trackGameTimeTick:()=>{getActivityDetector().getState().isActive&&makeRequest("ping","POST")},getVersion:()=>version,initializeOverlay:async o=>{await telegramReady,o!=null&&o.authData&&(console.error("USE AUTH_DATA FOR REQUESTS!!!"),externalAuthData=o.authData),startGameTimeTrack(),o!=null&&o.botId&&(externalBotId=o.botId,queryClient.invalidateQueries({queryKey:[PROFILE_TAG]}),queryClient.invalidateQueries({queryKey:[PRICES_TAG]}));const l=getStartupConfig(),u={...o,initialPosition:(o==null?void 0:o.initialPosition)??(l==null?void 0:l.overlayPosition)??"topLeft"};if(document.getElementById("overlay-root")){console.log("Overlay root already exists");return}if(createOverlay(u),!((o==null?void 0:o.visible)!==!1)){const h=document.getElementById("overlay-root");h&&h.classList.add("cssdk-overlay-hidden")}window.runGame&&window.runGame()},getShopItems:async()=>(await makeRequest("shop/items","GET")).items,getPurchasedShopItem:async o=>await makeRequest(`shop/purchases/${o}`,"GET"),getPurchasedShopItems:async()=>await makeRequest("shop/purchases","GET"),buyShopItem:async o=>{const l=await CryptoSteamSDK.getBalance(),d=(await CryptoSteamSDK.getShopItems()).find(f=>f.id===o);if(d||console.warn(`Not found shop item with id ${o}`),d&&l.balance_gems>=d.price)return await makeRequest(`shop/items/${o}/buy`,"POST");useTopUpModalStore.getState().setIsOpen(!0)},openPurchaseConfirmModal:async(o,l)=>{const u=await ensureTelegramWebApp(),d=await CryptoSteamSDK.getBalance();return new Promise((f,h)=>{if(d.balance_gems<o.price){useTopUpModalStore.getState().setIsOpen(!0),h(new Error("insufficient funds"));return}const m=document.createElement("div");m.style.position="fixed",m.style.top="0",m.style.left="0",m.style.width="100%",m.style.height="100%",m.style.backgroundColor="transparent",m.style.zIndex="9999";const g=document.createElement("iframe");if(g.style.position="fixed",l){let C=l.x+(l.width-210)/2,M=l.y-108-20;M<8&&(M=l.y+l.height+20),C+210>window.innerWidth-8&&(C=window.innerWidth-8-210),C<8&&(C=8),(M+108>window.innerHeight-8||M<8)&&(M=(window.innerHeight-108)/2,C=(window.innerWidth-210)/2),g.style.left=`${C}px`,g.style.top=`${M}px`}else g.style.left="50%",g.style.top="50%",g.style.transform="translate(-50%, -50%)";g.style.boxShadow="0px 0px 2px 1px rgba(0, 0, 0, 0.22), 0px 32px 64px rgba(0, 0, 0, 0.34)",g.style.borderRadius="24px",g.style.border="none",g.style.zIndex="10000",g.referrerPolicy="origin",g.style.width="210px",g.style.height="108px",g.style.backgroundColor="white";const v=new URLSearchParams;v.set("itemId",o.id.toString()),v.set("price",o.price.toString()),v.set("__tg_x_auth",u==null?void 0:u.initData);const x={confirm:{pay:translationsTyped("confirmIframe.pay"),cancel:translationsTyped("confirmIframe.cancel")}};v.set("translations",JSON.stringify(x)),g.src=`${BASE_URL}/shop/payment_iframe?${v.toString()}`;const b=S=>{S.data.type==="confirm"?(window.removeEventListener("message",b),document.body.removeChild(m),document.body.removeChild(g),f({status:"success"})):S.data.type==="cancel"?(window.removeEventListener("message",b),document.body.removeChild(m),document.body.removeChild(g),f({status:"error"})):S.data.type==="error"&&(window.removeEventListener("message",b),document.body.removeChild(m),document.body.removeChild(g),h(new Error(S.data.message)))};window.addEventListener("message",b),m.onclick=()=>{window.removeEventListener("message",b),document.body.removeChild(m),document.body.removeChild(g),f({status:"error"})},document.body.appendChild(m),document.body.appendChild(g)})},createInvoice:async(o,l,u,d)=>await makeRequest("invoices","POST",{title:o,description:l,to_user_id:u,amount:d}),getAllKeyValues:async()=>{const o=await CryptoSteamSDK.getProfile();return Array.isArray(o==null?void 0:o.audiences)&&o.audiences.includes("banner_test")?(console.log("getAllKeyValuesSync"),Promise.resolve(state)):(await makeRequest("storage/","GET")).data},getValue:async o=>{const l=await CryptoSteamSDK.getProfile();return Array.isArray(l==null?void 0:l.audiences)&&l.audiences.includes("banner_test")?(console.log("getValueSync",o),Promise.resolve(getValueSync(o))):(await makeRequest(`storage/${o}`,"GET")).value},setValue:async(o,l)=>{const u=await CryptoSteamSDK.getProfile();if(Array.isArray(u==null?void 0:u.audiences)&&u.audiences.includes("banner_test"))return console.log("setValueSync",o,l),setValueSync(o,l),Promise.resolve();await makeRequest(`storage/${o}`,"PUT",{value:l})},removeValue:async o=>{const l=await CryptoSteamSDK.getProfile();if(Array.isArray(l==null?void 0:l.audiences)&&l.audiences.includes("banner_test"))return console.log("removeValueSync",o),removeValueSync(o),Promise.resolve();await makeRequest(`storage/${o}`,"DELETE")},getData:async o=>(console.warn("[DEPRECATED] Use PortalSDK.getValue instead"),(await makeRequest(`storage/${o}`,"GET")).value),setData:async(o,l)=>{console.warn("[DEPRECATED] Use PortalSDK.setValue instead"),await makeRequest(`storage/${o}`,"PUT",{value:l})},getLocale:()=>{var o,l;return((l=(o=window.Telegram.WebApp)==null?void 0:o.initDataUnsafe.user)==null?void 0:l.language_code)||"en"},showSharing:(o,l)=>{var d;const u=`https://t.me/share/url?text=${encodeURIComponent(l||"")}&url=${encodeURIComponent(o)}`;(d=window.Telegram.WebApp)==null||d.openTelegramLink(u)},telegramCloudStorage:{getValue:async o=>CloudStorageGetItem(o),setValue:async(o,l)=>CloudStorageSetItem(o,l),removeValue:async o=>CloudStorageRemoveItem(o)},gameReady:async()=>{console.log("CryptoSteamSDK: gameReady received");const o=await CryptoSteamSDK.getProfile(),l=await CryptoSteamSDK.getConfig();if(!o){console.error("Profile not found");return}if(!l){console.error("Config not found");return}shouldTrackOncePerLaunch(GAME_READY_LAUNCH_KEY)&&(analytics.track("game_ready",{game_id:o.game_id,game_title:l.title,time_to_load_ms:gameInitializedAt!==null?Math.round(performance.now()-gameInitializedAt):void 0}),ReactGA.event("game_loaded",{gameId:o.game_id}))},getWages:async()=>await makeRequest("v1/wages","GET"),claimWage:async o=>await makeRequest(`v1/wages/${o}/claim`,"POST"),startWage:async o=>await makeRequest(`v1/wages/${o}/start`,"POST"),setValueWage:async({wageId:o,value:l})=>await makeRequest(`v1/wages/${o}`,"PUT",{value:l}),getAdsgramController:()=>adsgramAdController,setBottomBanner:async()=>{const o=bannerManager.createDefaultContent();await bannerManager.setBanner(o,CryptoSteamSDK.getProfile)},clearBottomBanner:()=>{bannerManager.clearBanner()},showOverlay:()=>{const o=document.getElementById("overlay-root");o&&o.classList.remove("cssdk-overlay-hidden")},hideOverlay:()=>{const o=document.getElementById("overlay-root");o&&o.classList.add("cssdk-overlay-hidden")},isOverlayVisible:()=>{const o=document.getElementById("overlay-root");return o?!o.classList.contains("cssdk-overlay-hidden"):!1}};CryptoSteamSDK.requestAd=throttleLeading(CryptoSteamSDK.requestAd.bind(CryptoSteamSDK),1e4);const resolvedSDK=isInIframe()?createIframeSdk():CryptoSteamSDK,globalObj=getGlobalObj();globalObj.CryptoSteamSDK=resolvedSDK,globalObj.PortalSDK=resolvedSDK;const PortalEmuSDK={isAdRunning:()=>!1,getValueSync:o=>getValueSync(o),setValueSync:(o,l)=>{setValueSync(o,l)},removeValueSync:async o=>{removeValueSync(o)},reloadAd:()=>{},getStartParam:()=>{var l;const o=(l=window.Telegram.WebApp)==null?void 0:l.initDataUnsafe.start_param;return o||""},requestAd:async()=>{await CryptoSteamSDK.requestAd()}};globalObj.PortalEmuSDK=PortalEmuSDK,exports.PortalSDK=resolvedSDK,exports.default=resolvedSDK,exports.makeRequest=makeRequest,exports.startGameTimeTrack=startGameTimeTrack,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});