@irshat/robot-ui 3.4.54 → 3.4.55

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.
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-amber-300:oklch(87.9% .169 91.605);--color-amber-600:oklch(66.6% .179 58.318);--color-lime-500:oklch(76.8% .233 130.85);--color-sky-500:oklch(68.5% .169 237.323);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-bold:700;--radius-lg:.5rem;--radius-4xl:2rem;--ease-out:cubic-bezier(0,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{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}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.right-0{right:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.z-20{z-index:20}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-3{margin:calc(var(--spacing)*3)}.mx-3{margin-inline:calc(var(--spacing)*3)}.my-0\.5{margin-block:calc(var(--spacing)*.5)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.ms-5{margin-inline-start:calc(var(--spacing)*5)}.me-1{margin-inline-end:calc(var(--spacing)*1)}.me-2{margin-inline-end:calc(var(--spacing)*2)}.me-3{margin-inline-end:calc(var(--spacing)*3)}.me-4{margin-inline-end:calc(var(--spacing)*4)}.me-5{margin-inline-end:calc(var(--spacing)*5)}.me-\[0\.75rem\]{margin-inline-end:.75rem}.mt-0\!{margin-top:calc(var(--spacing)*0)!important}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-2\.5{margin-top:calc(var(--spacing)*2.5)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-\[1rem\]{margin-top:1rem}.mb-0\!{margin-bottom:calc(var(--spacing)*0)!important}.mb-2{margin-bottom:calc(var(--spacing)*2)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-8{height:calc(var(--spacing)*8)}.h-\[1\.3rem\]{height:1.3rem}.h-\[16px\]{height:16px}.h-\[30px\]{height:30px}.h-\[var\(--input-height\)\]{height:var(--input-height)}.h-full{height:100%}.w-20{width:calc(var(--spacing)*20)}.w-50{width:calc(var(--spacing)*50)}.w-\[1\.3rem\]{width:1.3rem}.w-\[15\%\]{width:15%}.w-\[16px\]{width:16px}.w-\[20\%\]{width:20%}.w-\[30\%\]{width:30%}.w-\[35\%\]{width:35%}.w-\[200px\]{width:200px}.w-full{width:100%}.max-w-\[200px\]{max-width:200px}.flex-1{flex:1}.shrink{flex-shrink:1}.grow{flex-grow:1}.translate-y-3{--tw-translate-y:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-6px\]{--tw-translate-y:-6px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-4{gap:calc(var(--spacing)*4)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-4xl{border-radius:var(--radius-4xl)}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-\[var\(--color-primary\)\]{border-color:var(--color-primary)}.border-\[var\(--theme-border-color\)\]{border-color:var(--theme-border-color)}.bg-\[var\(--color-primary\)\]{background-color:var(--color-primary)}.bg-\[var\(--theme-bg-color\)\]{background-color:var(--theme-bg-color)}.bg-transparent{background-color:#0000}.bg-\[image\:var\(--btn-dropdown\)\]{background-image:var(--btn-dropdown)}.bg-\[length\:\.75em_auto\]{background-size:.75em}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.p-3{padding:calc(var(--spacing)*3)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.ps-2{padding-inline-start:calc(var(--spacing)*2)}.ps-4{padding-inline-start:calc(var(--spacing)*4)}.pe-2{padding-inline-end:calc(var(--spacing)*2)}.pe-3{padding-inline-end:calc(var(--spacing)*3)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[\.8125rem\]{font-size:.8125rem}.text-\[14px\]{font-size:14px}.text-\[14px\]\!{font-size:14px!important}.text-\[18px\]{font-size:18px}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.font-\[900\]{--tw-font-weight:900;font-weight:900}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\[var\(--theme-destructive-text-color\)\]{color:var(--theme-destructive-text-color)}.text-\[var\(--theme-negative-color\)\]{color:var(--theme-negative-color)}.text-\[var\(--theme-positive-color\)\]{color:var(--theme-positive-color)}.text-\[var\(--theme-subtitle-text-color\)\]{color:var(--theme-subtitle-text-color)}.text-\[var\(--theme-text-color\)\]{color:var(--theme-text-color)}.text-amber-300{color:var(--color-amber-300)}.text-amber-600{color:var(--color-amber-600)}.text-lime-500{color:var(--color-lime-500)}.text-sky-500{color:var(--color-sky-500)}.uppercase{text-transform:uppercase}.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,)}.opacity-50{opacity:.5}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[color\:var\(--theme-border-color\)\]{--tw-shadow-color:var(--theme-border-color)}@supports (color:color-mix(in lab,red,red)){.shadow-\[color\:var\(--theme-border-color\)\]{--tw-shadow-color:color-mix(in oklab,var(--theme-border-color)var(--tw-shadow-alpha),transparent)}}.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,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-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,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-250{--tw-duration:.25s;transition-duration:.25s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--color-primary\:var\(--theme-hint-color\)\]{--color-primary:var(--theme-hint-color)}.\[--color-primary\:var\(--theme-negative-color\)\]{--color-primary:var(--theme-negative-color)}.\[--color-primary\:var\(--theme-positive-color\)\]{--color-primary:var(--theme-positive-color)}.focus-within\:border-\[var\(--color-primary\)\]:focus-within{border-color:var(--color-primary)}.focus-within\:border-\[var\(--theme-destructive-text-color\)\]:focus-within{border-color:var(--theme-destructive-text-color)}@media(hover:hover){.hover\:bg-\[var\(--theme-secondary-bg-color\)\]:hover{background-color:var(--theme-secondary-bg-color)}}}@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-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{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-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<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-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@font-face{font-family:Montserrat;src:url(/Montserrat-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:Montserrat;src:url(/Montserrat-Bold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:Montserrat;src:url(/Montserrat-Italic.ttf) format("truetype");font-weight:400;font-style:italic}html,body{width:100%;height:100%}body{background:transparent!important;font-family:Montserrat,sans-serif!important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-height:auto;min-width:auto;overflow:hidden;padding:0;transition:none;animation:none}:root{--color-scheme: dark;--color-primary: #067deb;--theme-accent-text-color: #6ab2f2;--theme-bg-color: #17212b;--theme-border-color: #2c3f52;--theme-button-color: var(--color-primary);--theme-button-text-color: #ffffff;--theme-destructive-text-color: #ec3942;--theme-header-bg-color: #17212b;--theme-hint-color: #708499;--theme-link-color: #6ab3f3;--theme-secondary-bg-color: #232e3c;--theme-section-bg-color: #17212b;--theme-section-header-text-color: #6ab3f3;--theme-section-separator-color: #111921;--theme-subtitle-text-color: #708499;--theme-text-color: #f5f5f5;--theme-positive-color: #0dad68;--theme-negative-color: #ca3b1f;--alert-success-color: #75b798;--alert-warning-color: #ffda6a;--alert-error-color: #ea868f;--alert-info-color: #6ea8fe;--input-height: 2.5rem;--font-size: 1rem;--btn-padding-x: .75rem;--btn-padding-y: .375rem;--btn-font-size: 1rem;--btn-font-weight: 400;--btn-line-height: 1.5;--btn-color: #212529;--btn-bg: transparent;--btn-border-width: 1px;--btn-border-color: transparent;--btn-border-radius: .375rem;--btn-hover-border-color: transparent;--btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);--btn-disabled-opacity: .65;--btn-focus-box-shadow: 0 0 0 .25rem rgba(var(--btn-focus-shadow-rgb), .5);--btn-close: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z%27/%3E%3C/svg%3E");--btn-plus: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggNEM4LjI3NjE0IDQgOC41IDQuMjIzODYgOC41IDQuNVY3LjVIMTEuNUMxMS43NzYxIDcuNSAxMiA3LjcyMzg2IDEyIDhDMTIgOC4yNzYxNCAxMS43NzYxIDguNSAxMS41IDguNUg4LjVWMTEuNUM4LjUgMTEuNzc2MSA4LjI3NjE0IDEyIDggMTJDNy43MjM4NiAxMiA3LjUgMTEuNzc2MSA3LjUgMTEuNVY4LjVINC41QzQuMjIzODYgOC41IDQgOC4yNzYxNCA0IDhDNCA3LjcyMzg2IDQuMjIzODYgNy41IDQuNSA3LjVINy41VjQuNUM3LjUgNC4yMjM4NiA3LjcyMzg2IDQgOCA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==);--btn-minus: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQgOEM0IDcuNzIzODYgNC4yMjM4NiA3LjUgNC41IDcuNUgxMS41QzExLjc3NjEgNy41IDEyIDcuNzIzODYgMTIgOEMxMiA4LjI3NjE0IDExLjc3NjEgOC41IDExLjUgOC41SDQuNUM0LjIyMzg2IDguNSA0IDguMjc2MTQgNCA4WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==);--btn-dropdown: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 10 8%27%3e %3cpath d=%27M0.115385 4.4C0.0384615 4.32 0 4.2 0 4.12C0 4.04 0.0384615 3.92 0.115385 3.84L0.653846 3.28C0.807692 3.12 1.03846 3.12 1.19231 3.28L1.23077 3.32L3.34615 5.68C3.42308 5.76 3.53846 5.76 3.61538 5.68L8.76923 0.12H8.80769C8.96154 -0.04 9.19231 -0.04 9.34615 0.12L9.88461 0.68C10.0385 0.84 10.0385 1.08 9.88461 1.24L3.73077 7.88C3.65385 7.96 3.57692 8 3.46154 8C3.34615 8 3.26923 7.96 3.19231 7.88L0.192308 4.52L0.115385 4.4Z%27 fill=%27white%27/%3e %3c/svg%3e") }::-webkit-scrollbar{width:5px;height:8px}::-webkit-scrollbar-thumb{background-color:var(--theme-border-color);opacity:.1;border-radius:4px}::-webkit-scrollbar-track{background:var(--theme-bg-color);border-end-end-radius:.375rem;border-start-end-radius:.375rem}.btn{--btn-color: #fff;--btn-bg: var(--color-primary);--btn-border-color: var(--color-primary);--btn-hover-color: #fff;--btn-hover-bg: color-mix(in srgb, var(--color-primary) 87%, black);--btn-hover-border-color: color-mix(in srgb, var(--color-primary) 84%, black);--btn-focus-shadow-rgb: 49, 132, 253;--btn-active-color: #fff;--btn-active-bg: color-mix(in srgb, var(--color-primary) 75%, black);--btn-active-border-color: color-mix(in srgb, var(--color-primary) 72%, black);--btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);--btn-disabled-color: #fff;--btn-disabled-bg: color-mix(in srgb, var(--color-primary) 87%, black);--btn-disabled-border-color: color-mix(in srgb, var(--color-primary) 87%, black)}.alert{--alert-color: var(--alert-success-color);--alert-bg: color-mix(in srgb, var(--alert-color) 20%, black);--alert-border-color: color-mix(in srgb, var(--alert-color) 65%, black);--alert-link-color: var(--alert-color);--alert-btn-color: var(--alert-color);--alert-btn-bg-color:var(--alert-bg);--alert-btn-border-color: var(--alert-border-color);--alert-btn-hover-bg: color-mix(in srgb, var(--alert-color) 87%, black);--alert-btn-active-bg: color-mix(in srgb, var(--alert-color) 75%, black);--alert-border-radius: .375rem;background-color:var(--alert-bg);border:1px solid var(--alert-border-color);color:var(--alert-color);border-radius:var(--alert-border-radius)}.tabular-nums{font-variant-numeric:tabular-nums}
1
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-amber-300:oklch(87.9% .169 91.605);--color-amber-600:oklch(66.6% .179 58.318);--color-lime-500:oklch(76.8% .233 130.85);--color-sky-500:oklch(68.5% .169 237.323);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-bold:700;--radius-lg:.5rem;--radius-4xl:2rem;--ease-out:cubic-bezier(0,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{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}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.right-0{right:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.isolate{isolation:isolate}.z-20{z-index:20}.\!container{width:100%!important}@media(min-width:40rem){.\!container{max-width:40rem!important}}@media(min-width:48rem){.\!container{max-width:48rem!important}}@media(min-width:64rem){.\!container{max-width:64rem!important}}@media(min-width:80rem){.\!container{max-width:80rem!important}}@media(min-width:96rem){.\!container{max-width:96rem!important}}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-3{margin:calc(var(--spacing)*3)}.mx-3{margin-inline:calc(var(--spacing)*3)}.my-0\.5{margin-block:calc(var(--spacing)*.5)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.ms-5{margin-inline-start:calc(var(--spacing)*5)}.me-1{margin-inline-end:calc(var(--spacing)*1)}.me-2{margin-inline-end:calc(var(--spacing)*2)}.me-3{margin-inline-end:calc(var(--spacing)*3)}.me-4{margin-inline-end:calc(var(--spacing)*4)}.me-5{margin-inline-end:calc(var(--spacing)*5)}.me-\[0\.75rem\]{margin-inline-end:.75rem}.mt-0\!{margin-top:calc(var(--spacing)*0)!important}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-2\.5{margin-top:calc(var(--spacing)*2.5)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-\[1rem\]{margin-top:1rem}.mb-0\!{margin-bottom:calc(var(--spacing)*0)!important}.mb-2{margin-bottom:calc(var(--spacing)*2)}.\!hidden{display:none!important}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.h-8{height:calc(var(--spacing)*8)}.h-\[1\.3rem\]{height:1.3rem}.h-\[16px\]{height:16px}.h-\[30px\]{height:30px}.h-\[var\(--input-height\)\]{height:var(--input-height)}.h-full{height:100%}.w-20{width:calc(var(--spacing)*20)}.w-50{width:calc(var(--spacing)*50)}.w-\[1\.3rem\]{width:1.3rem}.w-\[15\%\]{width:15%}.w-\[16px\]{width:16px}.w-\[20\%\]{width:20%}.w-\[30\%\]{width:30%}.w-\[35\%\]{width:35%}.w-\[200px\]{width:200px}.w-full{width:100%}.max-w-\[200px\]{max-width:200px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.translate-y-3{--tw-translate-y:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-6px\]{--tw-translate-y:-6px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-4{gap:calc(var(--spacing)*4)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-4xl{border-radius:var(--radius-4xl)}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-\[var\(--color-primary\)\]{border-color:var(--color-primary)}.border-\[var\(--theme-border-color\)\]{border-color:var(--theme-border-color)}.bg-\[var\(--color-primary\)\]{background-color:var(--color-primary)}.bg-\[var\(--theme-bg-color\)\]{background-color:var(--theme-bg-color)}.bg-transparent{background-color:#0000}.bg-\[image\:var\(--btn-dropdown\)\]{background-image:var(--btn-dropdown)}.bg-\[length\:\.75em_auto\]{background-size:.75em}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.p-3{padding:calc(var(--spacing)*3)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.ps-2{padding-inline-start:calc(var(--spacing)*2)}.ps-4{padding-inline-start:calc(var(--spacing)*4)}.pe-2{padding-inline-end:calc(var(--spacing)*2)}.pe-3{padding-inline-end:calc(var(--spacing)*3)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[\.8125rem\]{font-size:.8125rem}.text-\[14px\]{font-size:14px}.text-\[14px\]\!{font-size:14px!important}.text-\[18px\]{font-size:18px}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.font-\[900\]{--tw-font-weight:900;font-weight:900}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\[var\(--theme-destructive-text-color\)\]{color:var(--theme-destructive-text-color)}.text-\[var\(--theme-negative-color\)\]{color:var(--theme-negative-color)}.text-\[var\(--theme-positive-color\)\]{color:var(--theme-positive-color)}.text-\[var\(--theme-subtitle-text-color\)\]{color:var(--theme-subtitle-text-color)}.text-\[var\(--theme-text-color\)\]{color:var(--theme-text-color)}.text-amber-300{color:var(--color-amber-300)}.text-amber-600{color:var(--color-amber-600)}.text-lime-500{color:var(--color-lime-500)}.text-sky-500{color:var(--color-sky-500)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.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,)}.opacity-50{opacity:.5}.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)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[color\:var\(--theme-border-color\)\]{--tw-shadow-color:var(--theme-border-color)}@supports (color:color-mix(in lab,red,red)){.shadow-\[color\:var\(--theme-border-color\)\]{--tw-shadow-color:color-mix(in oklab,var(--theme-border-color)var(--tw-shadow-alpha),transparent)}}.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,)}.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,)}.\!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,)!important}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-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,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-250{--tw-duration:.25s;transition-duration:.25s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--color-primary\:var\(--theme-hint-color\)\]{--color-primary:var(--theme-hint-color)}.\[--color-primary\:var\(--theme-negative-color\)\]{--color-primary:var(--theme-negative-color)}.\[--color-primary\:var\(--theme-positive-color\)\]{--color-primary:var(--theme-positive-color)}.focus-within\:border-\[var\(--color-primary\)\]:focus-within{border-color:var(--color-primary)}.focus-within\:border-\[var\(--theme-destructive-text-color\)\]:focus-within{border-color:var(--theme-destructive-text-color)}@media(hover:hover){.hover\:bg-\[var\(--theme-secondary-bg-color\)\]:hover{background-color:var(--theme-secondary-bg-color)}}}@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-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{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-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<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-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@font-face{font-family:Montserrat;src:url(/Montserrat-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:Montserrat;src:url(/Montserrat-Bold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:Montserrat;src:url(/Montserrat-Italic.ttf) format("truetype");font-weight:400;font-style:italic}html,body{width:100%;height:100%}body{background:transparent!important;font-family:Montserrat,sans-serif!important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-height:auto;min-width:auto;overflow:hidden;padding:0;transition:none;animation:none}:root{--color-scheme: dark;--color-primary: #067deb;--theme-accent-text-color: #6ab2f2;--theme-bg-color: #17212b;--theme-border-color: #2c3f52;--theme-button-color: var(--color-primary);--theme-button-text-color: #ffffff;--theme-destructive-text-color: #ec3942;--theme-header-bg-color: #17212b;--theme-hint-color: #708499;--theme-link-color: #6ab3f3;--theme-secondary-bg-color: #232e3c;--theme-section-bg-color: #17212b;--theme-section-header-text-color: #6ab3f3;--theme-section-separator-color: #111921;--theme-subtitle-text-color: #708499;--theme-text-color: #f5f5f5;--theme-positive-color: #0dad68;--theme-negative-color: #ca3b1f;--alert-success-color: #75b798;--alert-warning-color: #ffda6a;--alert-error-color: #ea868f;--alert-info-color: #6ea8fe;--input-height: 2.5rem;--font-size: 1rem;--btn-padding-x: .75rem;--btn-padding-y: .375rem;--btn-font-size: 1rem;--btn-font-weight: 400;--btn-line-height: 1.5;--btn-color: #212529;--btn-bg: transparent;--btn-border-width: 1px;--btn-border-color: transparent;--btn-border-radius: .375rem;--btn-hover-border-color: transparent;--btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);--btn-disabled-opacity: .65;--btn-focus-box-shadow: 0 0 0 .25rem rgba(var(--btn-focus-shadow-rgb), .5);--btn-close: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z%27/%3E%3C/svg%3E");--btn-plus: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggNEM4LjI3NjE0IDQgOC41IDQuMjIzODYgOC41IDQuNVY3LjVIMTEuNUMxMS43NzYxIDcuNSAxMiA3LjcyMzg2IDEyIDhDMTIgOC4yNzYxNCAxMS43NzYxIDguNSAxMS41IDguNUg4LjVWMTEuNUM4LjUgMTEuNzc2MSA4LjI3NjE0IDEyIDggMTJDNy43MjM4NiAxMiA3LjUgMTEuNzc2MSA3LjUgMTEuNVY4LjVINC41QzQuMjIzODYgOC41IDQgOC4yNzYxNCA0IDhDNCA3LjcyMzg2IDQuMjIzODYgNy41IDQuNSA3LjVINy41VjQuNUM3LjUgNC4yMjM4NiA3LjcyMzg2IDQgOCA0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==);--btn-minus: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQgOEM0IDcuNzIzODYgNC4yMjM4NiA3LjUgNC41IDcuNUgxMS41QzExLjc3NjEgNy41IDEyIDcuNzIzODYgMTIgOEMxMiA4LjI3NjE0IDExLjc3NjEgOC41IDExLjUgOC41SDQuNUM0LjIyMzg2IDguNSA0IDguMjc2MTQgNCA4WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==);--btn-dropdown: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 10 8%27%3e %3cpath d=%27M0.115385 4.4C0.0384615 4.32 0 4.2 0 4.12C0 4.04 0.0384615 3.92 0.115385 3.84L0.653846 3.28C0.807692 3.12 1.03846 3.12 1.19231 3.28L1.23077 3.32L3.34615 5.68C3.42308 5.76 3.53846 5.76 3.61538 5.68L8.76923 0.12H8.80769C8.96154 -0.04 9.19231 -0.04 9.34615 0.12L9.88461 0.68C10.0385 0.84 10.0385 1.08 9.88461 1.24L3.73077 7.88C3.65385 7.96 3.57692 8 3.46154 8C3.34615 8 3.26923 7.96 3.19231 7.88L0.192308 4.52L0.115385 4.4Z%27 fill=%27white%27/%3e %3c/svg%3e") }::-webkit-scrollbar{width:5px;height:8px}::-webkit-scrollbar-thumb{background-color:var(--theme-border-color);opacity:.1;border-radius:4px}::-webkit-scrollbar-track{background:var(--theme-bg-color);border-end-end-radius:.375rem;border-start-end-radius:.375rem}.btn{--btn-color: #fff;--btn-bg: var(--color-primary);--btn-border-color: var(--color-primary);--btn-hover-color: #fff;--btn-hover-bg: color-mix(in srgb, var(--color-primary) 87%, black);--btn-hover-border-color: color-mix(in srgb, var(--color-primary) 84%, black);--btn-focus-shadow-rgb: 49, 132, 253;--btn-active-color: #fff;--btn-active-bg: color-mix(in srgb, var(--color-primary) 75%, black);--btn-active-border-color: color-mix(in srgb, var(--color-primary) 72%, black);--btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);--btn-disabled-color: #fff;--btn-disabled-bg: color-mix(in srgb, var(--color-primary) 87%, black);--btn-disabled-border-color: color-mix(in srgb, var(--color-primary) 87%, black)}.alert{--alert-color: var(--alert-success-color);--alert-bg: color-mix(in srgb, var(--alert-color) 20%, black);--alert-border-color: color-mix(in srgb, var(--alert-color) 65%, black);--alert-link-color: var(--alert-color);--alert-btn-color: var(--alert-color);--alert-btn-bg-color:var(--alert-bg);--alert-btn-border-color: var(--alert-border-color);--alert-btn-hover-bg: color-mix(in srgb, var(--alert-color) 87%, black);--alert-btn-active-bg: color-mix(in srgb, var(--alert-color) 75%, black);--alert-border-radius: .375rem;background-color:var(--alert-bg);border:1px solid var(--alert-border-color);color:var(--alert-color);border-radius:var(--alert-border-radius)}.tabular-nums{font-variant-numeric:tabular-nums}
package/dist/index.js CHANGED
@@ -280,7 +280,7 @@ function e(e){return e&&e.i&&Object.prototype.hasOwnProperty.call(e,"default")?e
280
280
  font-size: .9rem;
281
281
  padding: .8rem;
282
282
  margin-bottom: .5rem;
283
- `,Ts=s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M0.666626 14.3334H15.3333L7.99996 1.66669L0.666626 14.3334ZM8.66663 12.3334H7.33329V11H8.66663V12.3334ZM8.66663 9.66669H7.33329V7.00002H8.66663V9.66669Z",fill:"currentcolor"})}),Es=s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM8.9307 6.58789L7.92875 11.293C7.85844 11.6328 7.95805 11.8262 8.23344 11.8262C8.4268 11.8262 8.71977 11.7559 8.91898 11.5801L8.83109 11.9961C8.54398 12.3418 7.91117 12.5938 7.36625 12.5938C6.66313 12.5938 6.3643 12.1719 6.55766 11.2754L7.29594 7.80664C7.36039 7.51367 7.3018 7.4082 7.00883 7.33789L6.55766 7.25586L6.63969 6.875L8.9307 6.58789ZM8 5.5C7.44772 5.5 7 5.05228 7 4.5C7 3.94772 7.44772 3.5 8 3.5C8.55229 3.5 9 3.94772 9 4.5C9 5.05228 8.55229 5.5 8 5.5Z",fill:"currentcolor"})}),As=s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM12.0303 4.96967C11.7374 4.67678 11.2626 4.67678 10.9697 4.96967C10.9626 4.97674 10.9559 4.98424 10.9498 4.9921L7.4774 9.41674L5.38388 7.32322C5.09098 7.03033 4.61611 7.03033 4.32322 7.32322C4.03032 7.61612 4.03032 8.09099 4.32322 8.38388L6.96966 11.0303C7.26256 11.3232 7.73743 11.3232 8.03032 11.0303C8.03685 11.0238 8.043 11.0169 8.04876 11.0097L12.041 6.01947C12.3232 5.72582 12.3196 5.25897 12.0303 4.96967Z",fill:"currentcolor"})});var Rs=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},Ms=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Ms||{}),$s="uninitialized",js="pending",Os="fulfilled",Ps="rejected";function Ls(e){return{status:e,isUninitialized:e===$s,isLoading:e===js,isSuccess:e===Os,isError:e===Ps}}var Fs=ue;function Is(e,t){if(e===t||!(Fs(e)&&Fs(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const a=Array.isArray(t)?[]:{};for(const o of n)a[o]=Is(e[o],t[o]),i&&(i=e[o]===a[o]);return i?e:a}function Ns(e,t,n){return e.reduce((e,r,i)=>(t(r,i)&&e.push(n(r,i)),e),[]).flat()}function Ds(e){return null!=e}function qs(e){return[...e?.values()??[]].filter(Ds)}function zs(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=(e=>e.replace(/\/$/,""))(e),`${e}${n}${t=(e=>e.replace(/^\//,""))(t)}`}function Bs(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Hs=()=>new Map,Ws=(...e)=>fetch(...e),Us=e=>e.status>=200&&e.status<=299,Qs=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Vs(e){if(!ue(e))return e;const t={...e};for(const[n,r]of Object.entries(t))void 0===r&&delete t[n];return t}var Ks=class{constructor(e,t=void 0){this.value=e,this.meta=t}},Gs="__rtkq/",Zs="focused",Xs=Dt(`${Gs}${Zs}`),Js=Dt(`${Gs}un${Zs}`),Ys=Dt(`${Gs}online`),el=Dt(`${Gs}offline`),tl="query",nl="mutation",rl="infinitequery";function il(e){return e.type===tl}function al(e){return e.type===rl}function ol(e){return il(e)||al(e)}function sl(e,t,n,r,i,a){const o="function"==typeof e?e(t,n,r,i):e;return o?Ns(o,Ds,e=>a(ll(e))):[]}function ll(e){return"string"==typeof e?{type:e}:e}var ul=(e,t)=>e.endpointDefinitions[t],cl=Symbol("forceQueryFn"),fl=e=>"function"==typeof e[cl];var dl=class extends Rs{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}},hl=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function pl(e,t,n,r){const i=await e["~standard"].validate(t);if(i.issues)throw new dl(i.issues,t,n,r);return i.value}function vl(e){return e}var ml=(e={})=>({...e,[Ht]:!0});function gl(e,{pages:t,pageParams:n},r){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n,r)}function bl(e,{pages:t,pageParams:n},r){return e.getPreviousPageParam?.(t[0],t,n[0],n,r)}function yl(e,t,n,r){return sl(n[e.meta.arg.endpointName][t],nn(e)?e.payload:void 0,tn(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function wl(e){return Te(e)?wt(e):e}function kl(e,t,n){const r=e[t];r&&n(r)}function xl(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function _l(e,t,n){const r=e[xl(t)];r&&n(r)}var Sl={};function Cl({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:s},assertTagType:l,config:u}){const c=Dt(`${e}/resetApiState`);function f(e,t,n,r){e[t.queryCacheKey]??={status:$s,endpointName:t.endpointName},kl(e,t.queryCacheKey,e=>{e.status=js,e.requestId=n&&e.requestId?e.requestId:r.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=r.startedTimeStamp;al(i[r.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function d(e,t,n,r){kl(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!r)return;const{merge:a}=i[t.arg.endpointName];if(e.status=Os,a)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:i,baseQueryMeta:o,requestId:s}=t;let l=St(e.data,e=>a(e,n,{arg:i.originalArgs,baseQueryMeta:o,fulfilledTimeStamp:r,requestId:s}));e.data=l}else e.data=n;else e.data=i[t.arg.endpointName].structuralSharing??1?Is(Te(e.data)?(o=e.data,Te(o)||ge(15),o[me].base_):e.data,n):n;var o;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}const h=gn({name:`${e}/queries`,initialState:Sl,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:Wt()},cacheEntriesUpserted:{reducer(e,t){for(const n of t.payload){const{queryDescription:r,value:i}=n;f(e,r,!0,{arg:r,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),d(e,{arg:r,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},i,!0)}},prepare:e=>({payload:e.map(e=>{const{endpointName:t,arg:n,value:a}=e,o=i[t];return{queryDescription:{type:tl,endpointName:t,originalArgs:e.arg,queryCacheKey:r({queryArgs:n,endpointDefinition:o,endpointName:t})},value:a}}),meta:{[Ht]:!0,requestId:an(),timestamp:Date.now()}})},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){kl(e,t,e=>{e.data=Tt(e.data,n.concat())})},prepare:Wt()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:n}})=>{f(e,n,fl(n),t)}).addCase(t.fulfilled,(e,{meta:t,payload:n})=>{d(e,t,n,fl(t.arg))}).addCase(t.rejected,(e,{meta:{condition:t,arg:n,requestId:r},error:i,payload:a})=>{kl(e,n.queryCacheKey,e=>{if(t);else{if(e.requestId!==r)return;e.status=Ps,e.error=a??i}})}).addMatcher(s,(e,t)=>{const{queries:n}=o(t);for(const[r,i]of Object.entries(n))i?.status!==Os&&i?.status!==Ps||(e[r]=i)})}}),p=gn({name:`${e}/mutations`,initialState:Sl,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=xl(t);n in e&&delete e[n]},prepare:Wt()}},extraReducers(e){e.addCase(n.pending,(e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:i}})=>{r.track&&(e[xl(t)]={requestId:n,status:js,endpointName:r.endpointName,startedTimeStamp:i})}).addCase(n.fulfilled,(e,{payload:t,meta:n})=>{n.arg.track&&_l(e,n,e=>{e.requestId===n.requestId&&(e.status=Os,e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)})}).addCase(n.rejected,(e,{payload:t,error:n,meta:r})=>{r.arg.track&&_l(e,r,e=>{e.requestId===r.requestId&&(e.status=Ps,e.error=t??n)})}).addMatcher(s,(e,t)=>{const{mutations:n}=o(t);for(const[r,i]of Object.entries(n))i?.status!==Os&&i?.status!==Ps||r===i?.requestId||(e[r]=i)})}}),v=gn({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(const{queryCacheKey:n,providedTags:r}of t.payload){m(e,n);for(const{type:t,id:i}of r){const r=(e.tags[t]??={})[i||"__internal_without_id"]??=[];r.includes(n)||r.push(n)}e.keys[n]=r}},prepare:Wt()}},extraReducers(e){e.addCase(h.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{m(e,t)}).addMatcher(s,(e,t)=>{const{provided:n}=o(t);for(const[r,i]of Object.entries(n.tags??{}))for(const[t,a]of Object.entries(i)){const i=(e.tags[r]??={})[t||"__internal_without_id"]??=[];for(const t of a){i.includes(t)||i.push(t),e.keys[t]=n.keys[t]}}}).addMatcher(Gt(nn(t),tn(t)),(e,t)=>{g(e,[t])}).addMatcher(h.actions.cacheEntriesUpserted.match,(e,t)=>{g(e,t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}})))})}});function m(e,t){const n=wl(e.keys[t]??[]);for(const r of n){const n=r.type,i=r.id??"__internal_without_id",a=e.tags[n]?.[i];a&&(e.tags[n][i]=wl(a).filter(e=>e!==t))}delete e.keys[t]}function g(e,t){const n=t.map(e=>{const t=yl(e,"providesTags",i,l),{queryCacheKey:n}=e.meta.arg;return{queryCacheKey:n,providedTags:t}});v.caseReducers.updateProvidedBy(e,v.actions.updateProvidedBy(n))}const b=gn({name:`${e}/subscriptions`,initialState:Sl,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),y=gn({name:`${e}/internalSubscriptions`,initialState:Sl,reducers:{subscriptionsUpdated:{reducer:(e,t)=>Tt(e,t.payload),prepare:Wt()}}}),w=gn({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(Ys,e=>{e.online=!0}).addCase(el,e=>{e.online=!1}).addCase(Xs,e=>{e.focused=!0}).addCase(Js,e=>{e.focused=!1}).addMatcher(s,e=>({...e}))}}),k=fe({queries:h.reducer,mutations:p.reducer,provided:v.reducer,subscriptions:y.reducer,config:w.reducer});return{reducer:(e,t)=>k(c.match(t)?void 0:e,t),actions:{...w.actions,...h.actions,...b.actions,...y.actions,...p.actions,...v.actions,resetApiState:c}}}var Tl=Symbol.for("RTKQ/skipToken"),El={status:$s},Al=St(El,()=>{}),Rl=St(El,()=>{});var Ml=WeakMap?new WeakMap:void 0,$l=({endpointName:e,queryArgs:t})=>{let n="";const r=Ml?.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,(e,t)=>t=ue(t="bigint"==typeof t?{$bigint:t.toString()}:t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t);ue(t)&&Ml?.set(t,e),n=e}return`${e}(${n})`};function jl(...e){return function(t){const n=$t(e=>t.extractRehydrationInfo?.(e,{reducerPath:t.reducerPath??"api"})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=$l;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:$l({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e()},apiUid:an(),extractRehydrationInfo:n,hasRehydrationInfo:$t(e=>null!=n(e))},a={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:tl}),mutation:e=>({...e,type:nl}),infiniteQuery:e=>({...e,type:rl})});for(const[n,r]of Object.entries(t))if(!0!==e.overrideExisting&&n in i.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(Zn(39))}else{i.endpointDefinitions[n]=r;for(const e of o)e.injectEndpoint(n,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const n of e)r.tagTypes.includes(n)||r.tagTypes.push(n);if(t)for(const[n,r]of Object.entries(t))"function"==typeof r?r(ul(i,n)):Object.assign(ul(i,n)||{},r);return a}},o=e.map(e=>e.init(a,r,i));return a.injectEndpoints({endpoints:t.endpoints})}}function Ol(e,...t){return Object.assign(e,...t)}var Pl=({api:e,queryThunk:t,internalState:n,mwApi:r})=>{const i=`${e.reducerPath}/subscriptions`;let a=null,o=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:l}=e.internalActions,u=()=>n.currentSubscriptions,c={getSubscriptions:u,getSubscriptionCount:e=>{const t=u().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{const n=u();return!!n?.get(e)?.get(t)}};function f(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(r,u)=>{if(a||(a=f(n.currentSubscriptions)),e.util.resetApiState.match(r))return a={},n.currentSubscriptions.clear(),o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(r))return[!1,c];const d=((n,r)=>{if(s.match(r)){const{queryCacheKey:e,requestId:t,options:i}=r.payload,a=n.get(e);return a?.has(t)&&a.set(t,i),!0}if(l.match(r)){const{queryCacheKey:e,requestId:t}=r.payload,i=n.get(e);return i&&i.delete(t),!0}if(e.internalActions.removeQueryResult.match(r))return n.delete(r.payload.queryCacheKey),!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r,i=Bs(n,e.queryCacheKey,Hs);return e.subscribe&&i.set(t,e.subscriptionOptions??i.get(t)??{}),!0}let i=!1;if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:a}}=r;if(e&&t.subscribe){const e=Bs(n,t.queryCacheKey,Hs);e.set(a,t.subscriptionOptions??e.get(a)??{}),i=!0}}return i})(n.currentSubscriptions,r);let h=!0;if(d){o||(o=setTimeout(()=>{const t=f(n.currentSubscriptions),[,r]=Ct(a,()=>t);u.next(e.internalActions.subscriptionsUpdated(r)),a=t,o=null},500));const s="string"==typeof r.type&&!!r.type.startsWith(i),l=t.rejected.match(r)&&r.meta.condition&&!!r.meta.arg.subscribe;h=!s&&!l}return[h,!1]}},Ll=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:a,selectConfig:o},getRunningQueryThunk:s,mwApi:l})=>{const{removeQueryResult:u,unsubscribeQueryResult:c,cacheEntriesUpserted:f}=t.internalActions,d=Gt(c.match,n.fulfilled,n.rejected,f.match);function h(e){const t=i.currentSubscriptions.get(e);if(!t)return!1;return t.size>0}const p={};function v(e){for(const t of e.values())t?.abort?.()}function m(e,t,n){const r=t.getState();for(const i of e){const e=a(r,i);e?.endpointName&&g(i,e.endpointName,t,n)}}function g(e,t,n,i){const o=ul(r,t),l=o?.keepUnusedDataFor??i.keepUnusedDataFor;if(l===1/0)return;const c=Math.max(0,Math.min(l,2147482.647));if(!h(e)){const t=p[e];t&&clearTimeout(t),p[e]=setTimeout(()=>{if(!h(e)){const t=a(n.getState(),e);if(t?.endpointName){const e=n.dispatch(s(t.endpointName,t.originalArgs));e?.abort()}n.dispatch(u({queryCacheKey:e}))}delete p[e]},1e3*c)}}return(e,n)=>{const a=n.getState(),s=o(a);if(d(e)){let t;if(f.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{const{queryCacheKey:n}=c.match(e)?e.payload:e.meta.arg;t=[n]}m(t,n,s)}if(t.util.resetApiState.match(e)){for(const[e,t]of Object.entries(p))t&&clearTimeout(t),delete p[e];v(i.runningQueries),v(i.runningMutations)}if(r.hasRehydrationInfo(e)){const{queries:t}=r.extractRehydrationInfo(e);m(Object.keys(t),n,s)}}},Fl=new Error("Promise never resolved before cacheEntryRemoved."),Il=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:a,selectors:{selectQueryEntry:o,selectApiState:s}})=>{const l=rn(r),u=rn(i),c=nn(r,i),f={},{removeQueryResult:d,removeMutationResult:h,cacheEntriesUpserted:p}=e.internalActions;function v(e,t,n){const r=f[e];r?.valueResolved&&(r.valueResolved({data:t,meta:n}),delete r.valueResolved)}function m(e){const t=f[e];t&&(delete f[e],t.cacheEntryRemoved())}function g(e){const{arg:t,requestId:n}=e.meta,{endpointName:r,originalArgs:i}=t;return[r,i,n]}function b(t,r,i,a,o){const s=ul(n,t),l=s?.onCacheEntryAdded;if(!l)return;const u={},c=new Promise(e=>{u.cacheEntryRemoved=e}),d=Promise.race([new Promise(e=>{u.valueResolved=e}),c.then(()=>{throw Fl})]);d.catch(()=>{}),f[i]=u;const h=e.endpoints[t].select(ol(s)?r:i),p=a.dispatch((e,t,n)=>n),v={...a,getCacheEntry:()=>h(a.getState()),requestId:o,extra:p,updateCachedData:ol(s)?n=>a.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:d,cacheEntryRemoved:c},m=l(r,v);Promise.resolve(m).catch(e=>{if(e!==Fl)throw e})}return(n,a,s)=>{const y=function(e){if(l(e))return e.meta.arg.queryCacheKey;if(u(e))return e.meta.arg.fixedCacheKey??e.meta.requestId;return d.match(e)?e.payload.queryCacheKey:h.match(e)?xl(e.payload):""}(n);function w(e,t,n,r){const i=o(s,t),l=o(a.getState(),t);!i&&l&&b(e,r,t,a,n)}if(r.pending.match(n)){const[e,t,r]=g(n);w(e,y,r,t)}else if(p.match(n))for(const{queryDescription:e,value:t}of n.payload){const{endpointName:r,originalArgs:i,queryCacheKey:a}=e;w(r,a,n.meta.requestId,i),v(a,t,{})}else if(i.pending.match(n)){if(a.getState()[t].mutations[y]){const[e,t,r]=g(n);b(e,t,y,a,r)}}else if(c(n))v(y,n.payload,n.meta.baseQueryMeta);else if(d.match(n)||h.match(n))m(y);else if(e.util.resetApiState.match(n))for(const e of Object.keys(f))m(e)}},Nl=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},Dl=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:a,assertTagType:o,refetchQuery:s,internalState:l})=>{const{removeQueryResult:u}=a.internalActions,c=Gt(nn(r),tn(r)),f=Gt(nn(i,r),en(i,r));let d=[],h=0;function p(n,r){const i=r.getState(),o=i[e];if(d.push(...n),"delayed"===o.config.invalidationBehavior&&h>0)return;const c=d;if(d=[],0===c.length)return;const f=a.util.selectInvalidatedBy(i,c);t.batch(()=>{const e=Array.from(f.values());for(const{queryCacheKey:t}of e){const e=o.queries[t],n=Bs(l.currentSubscriptions,t,Hs);e&&(0===n.size?r.dispatch(u({queryCacheKey:t})):e.status!==$s&&r.dispatch(s(e)))}})}return(e,t)=>{(i.pending.match(e)||r.pending.match(e))&&h++,f(e)&&(h=Math.max(0,h-1)),c(e)?p(yl(e,"invalidatesTags",n,o),t):f(e)?p([],t):a.util.invalidateTags.match(e)&&p(sl(e.payload,void 0,void 0,void 0,void 0,o),t)}},ql=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const{currentPolls:a,currentSubscriptions:o}=i,s=new Set;let l=null;function u(e,t){s.add(e),l||(l=setTimeout(()=>{for(const e of s)f({queryCacheKey:e},t);s.clear(),l=null},0))}function c({queryCacheKey:t},n){const i=n.getState()[e],s=i.queries[t],l=o.get(t);if(!s||s.status===$s)return;const{lowestPollingInterval:u,skipPollingIfUnfocused:f}=h(l);if(!Number.isFinite(u))return;const d=a.get(t);d?.timeout&&(clearTimeout(d.timeout),d.timeout=void 0);const p=Date.now()+u;a.set(t,{nextPollTimestamp:p,pollingInterval:u,timeout:setTimeout(()=>{!i.config.focused&&f||n.dispatch(r(s)),c({queryCacheKey:t},n)},u)})}function f({queryCacheKey:t},n){const r=n.getState()[e].queries[t],i=o.get(t);if(!r||r.status===$s)return;const{lowestPollingInterval:s}=h(i);if(!Number.isFinite(s))return void d(t);const l=a.get(t),u=Date.now()+s;(!l||u<l.nextPollTimestamp)&&c({queryCacheKey:t},n)}function d(e){const t=a.get(e);t?.timeout&&clearTimeout(t.timeout),a.delete(e)}function h(e=new Map){let t=!1,n=Number.POSITIVE_INFINITY;for(const r of e.values())r.pollingInterval&&(n=Math.min(r.pollingInterval,n),t=r.skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&u(e.payload.queryCacheKey,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&u(e.meta.arg.queryCacheKey,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&c(e.meta.arg,r),n.util.resetApiState.match(e)&&(!function(){for(const e of a.keys())d(e)}(),l&&(clearTimeout(l),l=null),s.clear())}},zl=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Yt(n,r),a=en(n,r),o=nn(n,r),s={};return(n,r)=>{if(i(n)){const{requestId:i,arg:{endpointName:a,originalArgs:o}}=n.meta,l=ul(t,a),u=l?.onQueryStarted;if(u){const t={},n=new Promise((e,n)=>{t.resolve=e,t.reject=n});n.catch(()=>{}),s[i]=t;const c=e.endpoints[a].select(ol(l)?o:i),f=r.dispatch((e,t,n)=>n),d={...r,getCacheEntry:()=>c(r.getState()),requestId:i,extra:f,updateCachedData:ol(l)?t=>r.dispatch(e.util.updateQueryData(a,o,t)):void 0,queryFulfilled:n};u(o,d)}}else if(o(n)){const{requestId:e,baseQueryMeta:t}=n.meta;s[e]?.resolve({data:n.payload,meta:t}),delete s[e]}else if(a(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;s[e]?.reject({error:n.payload??n.error,isUnhandledError:!t,meta:r}),delete s[e]}}};function Bl(e){const{reducerPath:t,queryThunk:n,api:r,context:i,getInternalState:a}=e,{apiUid:o}=i,s={invalidateTags:Dt(`${t}/invalidateTags`)},l=e=>e.type.startsWith(`${t}/`),u=[Nl,Ll,Dl,ql,Il,zl];return{middleware:n=>{let s=!1;const f=a(n.dispatch),d={...e,internalState:f,refetchQuery:c,isThisApiSliceAction:l,mwApi:n},h=u.map(e=>e(d)),p=Pl(d),v=(({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:a}=n.internalActions;function o(n,o){const s=n.getState()[e],l=s.queries,u=i.currentSubscriptions;t.batch(()=>{for(const e of u.keys()){const t=l[e],i=u.get(e);if(!i||!t)continue;const c=[...i.values()];(c.some(e=>!0===e[o])||c.every(e=>void 0===e[o])&&s.config[o])&&(0===i.size?n.dispatch(a({queryCacheKey:e})):t.status!==$s&&n.dispatch(r(t)))}})}return(e,t)=>{Xs.match(e)&&o(t,"refetchOnFocus"),Ys.match(e)&&o(t,"refetchOnReconnect")}})(d);return e=>a=>{if(!he(a))return e(a);s||(s=!0,n.dispatch(r.internalActions.middlewareRegistered(o)));const u={...n,next:e},c=n.getState(),[f,d]=p(a,u,c);let m;if(m=f?e(a):d,n.getState()[t]&&(v(a,u,c),l(a)||i.hasRehydrationInfo(a)))for(const e of h)e(a,u,c);return m}},actions:s};function c(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Hl=Symbol(),Wl=({createSelector:e=Ot}={})=>({name:Hl,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:a,keepUnusedDataFor:o,refetchOnMountOrArgChange:s,refetchOnFocus:l,refetchOnReconnect:u,invalidationBehavior:c,onSchemaFailure:f,catchSchemaFailure:d,skipSchemaValidation:h},p){xt();const v=e=>e;Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:Ys,onOffline:el,onFocus:Xs,onFocusLost:Js},util:{}});const m=function({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>Al,i=e=>Rl;return{buildQuerySelector:function(e,t){return u(e,t,a)},buildInfiniteQuerySelector:function(e,t){const{infiniteQueryOptions:n}=t;return u(e,t,function(e){const t={...e,...Ls(e.status)},{isLoading:r,isError:i,direction:a}=t,o="forward"===a,s="backward"===a;return{...t,hasNextPage:c(n,t.data,t.originalArgs),hasPreviousPage:f(n,t.data,t.originalArgs),isFetchingNextPage:r&&o,isFetchingPreviousPage:r&&s,isFetchNextPageError:i&&o,isFetchPreviousPageError:i&&s}})},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?xl(e)??Tl:e,n(t===Tl?i:e=>o(e)?.mutations?.[t]??Rl,a)}},selectInvalidatedBy:function(e,n){const r=e[t],i=new Set,a=Ns(n,Ds,ll);for(const t of a){const e=r.provided.tags[t.type];if(!e)continue;let n=(void 0!==t.id?e[t.id]:Object.values(e).flat())??[];for(const t of n)i.add(t)}return Array.from(i.values()).flatMap(e=>{const t=r.queries[e];return t?{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}:[]})},selectCachedArgsForQuery:function(e,t){return Ns(Object.values(s(e)),e=>e?.endpointName===t&&e.status!==$s,e=>e.originalArgs)},selectApiState:o,selectQueries:s,selectMutations:function(e){return o(e)?.mutations},selectQueryEntry:l,selectConfig:function(e){return o(e)?.config}};function a(e){return{...e,...Ls(e.status)}}function o(e){return e[t]}function s(e){return o(e)?.queries}function l(e,t){return s(e)?.[t]}function u(t,i,a){return o=>{if(o===Tl)return n(r,a);const s=e({queryArgs:o,endpointDefinition:i,endpointName:t});return n(e=>l(e,s)??Al,a)}}function c(e,t,n){return!!t&&null!=gl(e,t,n)}function f(e,t,n){return!(!t||!e.getPreviousPageParam)&&null!=bl(e,t,n)}}({serializeQueryArgs:a,reducerPath:i,createSelector:e}),{selectInvalidatedBy:g,selectCachedArgsForQuery:b,buildQuerySelector:y,buildInfiniteQuerySelector:w,buildMutationSelector:k}=m;Ol(t.util,{selectInvalidatedBy:g,selectCachedArgsForQuery:b});const{queryThunk:x,infiniteQueryThunk:_,mutationThunk:S,patchQueryData:C,updateQueryData:T,upsertQueryData:E,prefetch:A,buildMatchThunkActions:R}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i,assertTagType:a,selectors:o,onSchemaFailure:s,catchSchemaFailure:l,skipSchemaValidation:u}){function c(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}function f(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}const d=(e,t)=>e.query&&e[t]?e[t]:vl,h=async(e,{signal:r,abort:i,rejectWithValue:a,fulfillWithValue:h,dispatch:v,getState:m,extra:g})=>{const b=n[e.endpointName],{metaSchema:y,skipSchemaValidation:w=u}=b,k=e.type===tl;try{let S=vl;const C={signal:r,abort:i,dispatch:v,getState:m,extra:g,endpoint:e.endpointName,type:e.type,forced:k?p(e,m()):void 0,queryCacheKey:k?e.queryCacheKey:void 0},T=k?e[cl]:void 0;let E;const A=async(t,n,r,i)=>{if(null==n&&t.pages.length)return Promise.resolve({data:t});const a={queryArg:e.originalArgs,pageParam:n},o=await R(a),s=i?c:f;return{data:{pages:s(t.pages,o.data,r),pageParams:s(t.pageParams,n,r)},meta:o.meta}};async function R(e){let n;const{extraOptions:r,argSchema:i,rawResponseSchema:a,responseSchema:o}=b;if(i&&!hl(w,"arg")&&(e=await pl(i,e,"argSchema",{})),T?n=T():b.query?(S=d(b,"transformResponse"),n=await t(b.query(e),C,r)):n=await b.queryFn(e,C,r,e=>t(e,C,r)),n.error)throw new Ks(n.error,n.meta);let{data:s}=n;a&&!hl(w,"rawResponse")&&(s=await pl(a,n.data,"rawResponseSchema",n.meta));let l=await S(s,n.meta,e);return o&&!hl(w,"response")&&(l=await pl(o,l,"responseSchema",n.meta)),{...n,data:l}}if(k&&"infiniteQueryOptions"in b){const{infiniteQueryOptions:M}=b,{maxPages:$=1/0}=M,j=e.refetchCachedPages??M.refetchCachedPages??!0;let O;const P={pages:[],pageParams:[]},L=o.selectQueryEntry(m(),e.queryCacheKey)?.data,F=p(e,m())&&!e.direction||!L?P:L;if("direction"in e&&e.direction&&F.pages.length){const I="backward"===e.direction,N=(I?bl:gl)(M,F,e.originalArgs);O=await A(F,N,$,I)}else{const{initialPageParam:D=M.initialPageParam}=e,q=L?.pageParams??[],z=q[0]??D,B=q.length;if(O=await A(F,z,$),T&&(O={data:O.data.pages[0]}),j)for(let H=1;H<B;H++){const W=gl(M,O.data,e.originalArgs);O=await A(O.data,W,$)}}E=O}else E=await R(e.originalArgs);return y&&!hl(w,"meta")&&E.meta&&(E.meta=await pl(y,E.meta,"metaSchema",E.meta)),h(E.data,ml({fulfilledTimeStamp:Date.now(),baseQueryMeta:E.meta}))}catch(x){let U=x;if(U instanceof Ks){let Q=d(b,"transformErrorResponse");const{rawErrorResponseSchema:V,errorResponseSchema:K}=b;let{value:G,meta:Z}=U;try{V&&!hl(w,"rawErrorResponse")&&(G=await pl(V,G,"rawErrorResponseSchema",Z)),y&&!hl(w,"meta")&&(Z=await pl(y,Z,"metaSchema",Z));let X=await Q(G,Z,e.originalArgs);return K&&!hl(w,"errorResponse")&&(X=await pl(K,X,"errorResponseSchema",Z)),a(X,ml({baseQueryMeta:Z}))}catch(_){U=_}}try{if(U instanceof dl){const J={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:k?e.queryCacheKey:void 0};b.onSchemaFailure?.(U,J),s?.(U,J);const{catchSchemaFailure:Y=l}=b;if(Y)return a(Y(U,J),ml({baseQueryMeta:U._bqMeta}))}}catch(_){U=_}throw U}};function p(e,t){const n=o.selectQueryEntry(t,e.queryCacheKey),r=o.selectConfig(t).refetchOnMountOrArgChange,i=n?.fulfilledTimeStamp,a=e.forceRefetch??(e.subscribe&&r);return!!a&&(!0===a||(Number(new Date)-Number(i))/1e3>=a)}const v=()=>fn(`${e}/executeQuery`,h,{getPendingMeta({arg:e}){const t=n[e.endpointName];return ml({startedTimeStamp:Date.now(),...al(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){const r=t(),i=o.selectQueryEntry(r,e.queryCacheKey),a=i?.fulfilledTimeStamp,s=e.originalArgs,l=i?.originalArgs,u=n[e.endpointName],c=e.direction;return!(!fl(e)&&("pending"===i?.status||!p(e,r)&&(!il(u)||!u?.forceRefetch?.({currentArg:s,previousArg:l,endpointState:i,state:r}))&&a&&!c))},dispatchConditionRejection:!0}),m=v(),g=v(),b=fn(`${e}/executeMutation`,h,{getPendingMeta:()=>ml({startedTimeStamp:Date.now()})});function y(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:m,mutationThunk:b,infiniteQueryThunk:g,prefetch:(e,t,n={})=>(r,a)=>{const o=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,l=(n=!0)=>{const r={forceRefetch:n,subscribe:!1};return i.endpoints[e].initiate(t,r)},u=i.endpoints[e].select(t)(a());if(o)r(l());else if(s){const e=u?.fulfilledTimeStamp;if(!e)return void r(l());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(l())}else r(l(!1))},updateQueryData:(e,t,n,r=!0)=>(a,o)=>{const s=i.endpoints[e].select(t)(o()),l={patches:[],inversePatches:[],undo:()=>a(i.util.patchQueryData(e,t,l.inversePatches,r))};if(s.status===$s)return l;let u;if("data"in s)if(Ee(s.data)){const[e,t,r]=Ct(s.data,n);l.patches.push(...t),l.inversePatches.push(...r),u=e}else u=n(s.data),l.patches.push({op:"replace",path:[],value:u}),l.inversePatches.push({op:"replace",path:[],value:s.data});return 0===l.patches.length||a(i.util.patchQueryData(e,t,l.patches,r)),l},upsertQueryData:(e,t,n)=>r=>r(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[cl]:()=>({data:n})})),patchQueryData:(e,t,o,s)=>(l,u)=>{const c=n[e],f=r({queryArgs:t,endpointDefinition:c,endpointName:e});if(l(i.internalActions.queryResultPatched({queryCacheKey:f,patches:o})),!s)return;const d=i.endpoints[e].select(t)(u()),h=sl(c.providesTags,d.data,void 0,t,{},a);l(i.internalActions.updateProvidedBy([{queryCacheKey:f,providedTags:h}]))},buildMatchThunkActions:function(e,t){return{matchPending:Zt(Yt(e),y(t)),matchFulfilled:Zt(nn(e),y(t)),matchRejected:Zt(en(e),y(t))}}}}({baseQuery:n,reducerPath:i,context:p,api:t,serializeQueryArgs:a,assertTagType:v,selectors:m,onSchemaFailure:f,catchSchemaFailure:d,skipSchemaValidation:h}),{reducer:M,actions:$}=Cl({context:p,queryThunk:x,mutationThunk:S,serializeQueryArgs:a,reducerPath:i,assertTagType:v,config:{refetchOnFocus:l,refetchOnReconnect:u,refetchOnMountOrArgChange:s,keepUnusedDataFor:o,reducerPath:i,invalidationBehavior:c}});Ol(t.util,{patchQueryData:C,updateQueryData:T,upsertQueryData:E,prefetch:A,resetApiState:$.resetApiState,upsertQueryEntries:$.cacheEntriesUpserted}),Ol(t.internalActions,$);const j=new WeakMap,O=e=>Bs(j,e,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:P,buildInitiateInfiniteQuery:L,buildInitiateMutation:F,getRunningMutationThunk:I,getRunningMutationsThunk:N,getRunningQueriesThunk:D,getRunningQueryThunk:q}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:a,getInternalState:o}){const s=e=>o(e)?.runningQueries,l=e=>o(e)?.runningMutations,{unsubscribeQueryResult:u,removeMutationResult:c,updateSubscriptionOptions:f}=i.internalActions;return{buildInitiateQuery:function(e,t){return d(e,t)},buildInitiateInfiniteQuery:function(e,t){return d(e,t)},buildInitiateMutation:function(e){return(t,{track:n=!0,fixedCacheKey:i}={})=>(a,o)=>{const s=r({type:"mutation",endpointName:e,originalArgs:t,track:n,fixedCacheKey:i}),u=a(s),{requestId:f,abort:d,unwrap:h}=u,p=(v=e=>({error:e}),u.unwrap().then(e=>({data:e})).catch(v));var v;const m=Object.assign(p,{arg:u.arg,requestId:f,abort:d,unwrap:h,reset:()=>{a(c({requestId:f,fixedCacheKey:i}))}}),g=l(a);return g.set(f,m),m.then(()=>{g.delete(f)}),i&&(g.set(i,m),m.then(()=>{g.get(i)===m&&g.delete(i)})),m}},getRunningQueryThunk:function(t,n){return r=>{const i=ul(a,t),o=e({queryArgs:n,endpointDefinition:i,endpointName:t});return s(r)?.get(o)}},getRunningMutationThunk:function(e,t){return e=>l(e)?.get(t)},getRunningQueriesThunk:function(){return e=>qs(s(e))},getRunningMutationsThunk:function(){return e=>qs(l(e))}};function d(r,a){const o=(l,{subscribe:c=!0,forceRefetch:d,subscriptionOptions:h,[cl]:p,...v}={})=>(m,g)=>{const b=e({queryArgs:l,endpointDefinition:a,endpointName:r});let y;const w={...v,type:tl,subscribe:c,forceRefetch:d,subscriptionOptions:h,endpointName:r,originalArgs:l,queryCacheKey:b,[cl]:p};if(il(a))y=t(w);else{const{direction:e,initialPageParam:t,refetchCachedPages:r}=v;y=n({...w,direction:e,initialPageParam:t,refetchCachedPages:r})}const k=i.endpoints[r].select(l),x=m(y),_=k(g()),{requestId:S,abort:C}=x,T=_.requestId!==S,E=s(m)?.get(b),A=()=>k(g()),R=Object.assign(p?x.then(A):T&&!E?Promise.resolve(_):Promise.all([E,x]).then(A),{arg:l,requestId:S,subscriptionOptions:h,queryCacheKey:b,abort:C,async unwrap(){const e=await R;if(e.isError)throw e.error;return e.data},refetch:e=>m(o(l,{subscribe:!1,forceRefetch:!0,...e})),unsubscribe(){c&&m(u({queryCacheKey:b,requestId:S}))},updateSubscriptionOptions(e){R.subscriptionOptions=e,m(f({endpointName:r,requestId:S,queryCacheKey:b,options:e}))}});if(!E&&!T&&!p){const e=s(m);e.set(b,R),R.then(()=>{e.delete(b)})}return R};return o}}({queryThunk:x,mutationThunk:S,infiniteQueryThunk:_,api:t,serializeQueryArgs:a,context:p,getInternalState:O});Ol(t.util,{getRunningMutationThunk:I,getRunningMutationsThunk:N,getRunningQueryThunk:q,getRunningQueriesThunk:D});const{middleware:z,actions:B}=Bl({reducerPath:i,context:p,queryThunk:x,mutationThunk:S,infiniteQueryThunk:_,api:t,assertTagType:v,selectors:m,getRunningQueryThunk:q,getInternalState:O});return Ol(t.util,B),Ol(t,{reducer:M,middleware:z}),{name:Hl,injectEndpoint(e,n){const r=t,i=r.endpoints[e]??={};il(n)&&Ol(i,{name:e,select:y(e,n),initiate:P(e,n)},R(x,e)),n.type===nl&&Ol(i,{name:e,select:k(),initiate:F(e)},R(S,e)),al(n)&&Ol(i,{name:e,select:w(e,n),initiate:L(e,n)},R(x,e))}}}});function Ul(e){return e.replace(e[0],e[0].toUpperCase())}Wl();function Ql(e){return"infinitequery"===e.type}function Vl(e,...t){return Object.assign(e,...t)}var Kl=Symbol();function Gl(e){const t=d.useRef(e),n=d.useMemo(()=>Is(t.current,e),[e]);return d.useEffect(()=>{t.current!==n&&(t.current=n)},[n]),n}function Zl(e){const t=d.useRef(e);return d.useEffect(()=>{H(t.current,e)||(t.current=e)},[e]),H(t.current,e)?t.current:e}var Xl=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),Jl=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),Yl=(()=>Xl||Jl?d.useLayoutEffect:d.useEffect)(),eu=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:Ms.pending}:e;function tu(e,...t){const n={};return t.forEach(t=>{n[t]=e[t]}),n}var nu=["data","status","isLoading","isSuccess","isError","error"];function ru({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:a,createSelector:o},serializeQueryArgs:s,context:l}){const u=a?e=>e():d.useEffect,c=e=>e.current?.unsubscribe?.(),f=l.endpointDefinitions;return{buildQueryHooks:function(r){const i=(e,t={})=>{const[n]=v(r,e,t);return g(n),d.useMemo(()=>({refetch:()=>function(e){if(!e.current)throw new Error(Zn(38));return e.current.refetch()}(n)}),[n])},a=({refetchOnReconnect:i,refetchOnFocus:a,pollingInterval:o=0,skipPollingIfUnfocused:s=!1}={})=>{const{initiate:l}=e.endpoints[r],f=n(),[h,p]=d.useState(Kl),v=d.useRef(void 0),m=Zl({refetchOnReconnect:i,refetchOnFocus:a,pollingInterval:o,skipPollingIfUnfocused:s});u(()=>{const e=v.current?.subscriptionOptions;m!==e&&v.current?.updateSubscriptionOptions(m)},[m]);const g=d.useRef(m);u(()=>{g.current=m},[m]);const b=d.useCallback(function(e,n=!1){let r;return t(()=>{c(v),v.current=r=f(l(e,{subscriptionOptions:g.current,forceRefetch:!n})),p(e)}),r},[f,l]),y=d.useCallback(()=>{v.current?.queryCacheKey&&f(e.internalActions.removeQueryResult({queryCacheKey:v.current?.queryCacheKey}))},[f]);return d.useEffect(()=>()=>{c(v)},[]),d.useEffect(()=>{h===Kl||v.current||b(h,!0)},[h,b]),d.useMemo(()=>[b,h,{reset:y}],[b,h,y])},o=m(r,h);return{useQueryState:o,useQuerySubscription:i,useLazyQuerySubscription:a,useLazyQuery(e){const[t,n,{reset:r}]=a(e),i=o(n,{...e,skip:n===Kl}),s=d.useMemo(()=>({lastArg:n}),[n]);return d.useMemo(()=>[t,{...i,reset:r},s],[t,i,r,s])},useQuery(e,t){const n=i(e,t),r=o(e,{selectFromResult:e===Tl||t?.skip?void 0:eu,...t}),a=tu(r,...nu);return d.useDebugValue(a),d.useMemo(()=>({...r,...n}),[r,n])}}},buildInfiniteQueryHooks:function(e){const n=(n,r={})=>{const[i,a,o,s]=v(e,n,r),l=d.useRef(s);u(()=>{l.current=s},[s]);const f=Zl(r.refetchCachedPages),h=d.useCallback(function(e,n){let r;return t(()=>{c(i),i.current=r=a(o(e,{subscriptionOptions:l.current,direction:n}))}),r},[i,a,o]);g(i);const p=Gl(r.skip?Tl:n),m=d.useCallback(e=>{if(!i.current)throw new Error(Zn(38));const t={refetchCachedPages:e?.refetchCachedPages??f};return i.current.refetch(t)},[i,f]);return d.useMemo(()=>({trigger:h,refetch:m,fetchNextPage:()=>h(p,"forward"),fetchPreviousPage:()=>h(p,"backward")}),[m,h,p])},r=m(e,p);return{useInfiniteQueryState:r,useInfiniteQuerySubscription:n,useInfiniteQuery(e,t){const{refetch:i,fetchNextPage:a,fetchPreviousPage:o}=n(e,t),s=r(e,{selectFromResult:e===Tl||t?.skip?void 0:eu,...t}),l=tu(s,...nu,"hasNextPage","hasPreviousPage");return d.useDebugValue(l),d.useMemo(()=>({...s,fetchNextPage:a,fetchPreviousPage:o,refetch:i}),[s,a,o,i])}}},buildMutationHook:function(i){return({selectFromResult:a,fixedCacheKey:s}={})=>{const{select:l,initiate:u}=e.endpoints[i],c=n(),[f,h]=d.useState();d.useEffect(()=>()=>{f?.arg.fixedCacheKey||f?.reset()},[f]);const p=d.useCallback(function(e){const t=c(u(e,{fixedCacheKey:s}));return h(t),t},[c,u,s]),{requestId:v}=f||{},m=d.useMemo(()=>l({fixedCacheKey:s,requestId:f?.requestId}),[s,f,l]),g=d.useMemo(()=>a?o([m],a):m,[a,m]),b=r(g,H),y=null==s?f?.arg.originalArgs:void 0,w=d.useCallback(()=>{t(()=>{f&&h(void 0),s&&c(e.internalActions.removeMutationResult({requestId:v,fixedCacheKey:s}))})},[c,s,f,v]),k=tu(b,...nu,"endpointName");d.useDebugValue(k);const x=d.useMemo(()=>({...b,originalArgs:y,reset:w}),[b,y,w]);return d.useMemo(()=>[p,x],[p,x])}},usePrefetch:function(t,r){const i=n(),a=Zl(r);return d.useCallback((n,r)=>i(e.util.prefetch(t,n,{...a,...r})),[t,i,a])}};function h(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=f[e];n!==Tl&&s({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===s({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:t?.data;void 0===r&&(r=e.data);const i=void 0!==r,a=e.isLoading,o=(!t||t.isLoading||t.isUninitialized)&&!i&&a,l=e.isSuccess||i&&(a&&!t?.isError||e.isUninitialized);return{...e,data:r,currentData:e.data,isFetching:a,isLoading:o,isSuccess:l}}function p(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=f[e];n!==Tl&&s({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===s({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:t?.data;void 0===r&&(r=e.data);const i=void 0!==r,a=e.isLoading,o=(!t||t.isLoading||t.isUninitialized)&&!i&&a,l=e.isSuccess||a&&i;return{...e,data:r,currentData:e.data,isFetching:a,isLoading:o,isSuccess:l}}function v(t,r,{refetchOnReconnect:i,refetchOnFocus:a,refetchOnMountOrArgChange:o,skip:s=!1,pollingInterval:l=0,skipPollingIfUnfocused:c=!1,...h}={}){const{initiate:p}=e.endpoints[t],v=n(),m=d.useRef(void 0);if(!m.current){const t=v(e.internalActions.internal_getRTKQSubscriptions());m.current=t}const g=Gl(s?Tl:r),b=Zl({refetchOnReconnect:i,refetchOnFocus:a,pollingInterval:l,skipPollingIfUnfocused:c}),y=Zl(h.initialPageParam),w=Zl(h.refetchCachedPages),k=d.useRef(void 0);let{queryCacheKey:x,requestId:_}=k.current||{},S=!1;x&&_&&(S=m.current.isRequestSubscribed(x,_));const C=!S&&void 0!==k.current;return u(()=>{C&&(k.current=void 0)},[C]),u(()=>{const e=k.current;if(g===Tl)return e?.unsubscribe(),void(k.current=void 0);const n=k.current?.subscriptionOptions;if(e&&e.arg===g)b!==n&&e.updateSubscriptionOptions(b);else{e?.unsubscribe();const n=v(p(g,{subscriptionOptions:b,forceRefetch:o,...Ql(f[t])?{initialPageParam:y,refetchCachedPages:w}:{}}));k.current=n}},[v,p,o,g,b,C,y,w,t]),[k,v,p,b]}function m(t,n){return(a,{skip:s=!1,selectFromResult:l}={})=>{const{select:u}=e.endpoints[t],c=Gl(s?Tl:a),f=d.useRef(void 0),h=d.useMemo(()=>o([u(c),(e,t)=>t,e=>c],n,{memoizeOptions:{resultEqualityCheck:H}}),[u,c]),p=d.useMemo(()=>l?o([h],l,{devModeChecks:{identityFunctionCheck:"never"}}):h,[h,l]),v=r(e=>p(e,f.current),H),m=i(),g=h(m.getState(),f.current);return Yl(()=>{f.current=g},[g]),v}}function g(e){d.useEffect(()=>()=>{c(e),e.current=void 0},[e])}}var iu=Symbol(),au=jl(Wl(),(({batch:e=ie,hooks:t={useDispatch:ee,useSelector:re,useStore:J},createSelector:n=Ot,unstable__sideEffectsInRender:r=!1,...i}={})=>({name:iu,init(i,{serializeQueryArgs:a},o){const s=i,{buildQueryHooks:l,buildInfiniteQueryHooks:u,buildMutationHook:c,usePrefetch:f}=ru({api:i,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:a,context:o});return Vl(s,{usePrefetch:f}),Vl(o,{batch:e}),{injectEndpoint(e,t){if("query"===t.type){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:a,useQuerySubscription:o}=l(e);Vl(s.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:a,useQuerySubscription:o}),i[`use${Ul(e)}Query`]=t,i[`useLazy${Ul(e)}Query`]=n}if(function(e){return"mutation"===e.type}(t)){const t=c(e);Vl(s.endpoints[e],{useMutation:t}),i[`use${Ul(e)}Mutation`]=t}else if(Ql(t)){const{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:r}=u(e);Vl(s.endpoints[e],{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:r}),i[`use${Ul(e)}InfiniteQuery`]=t}}}}}))());const ou=await sr(),su=gn({name:"contentApi",initialState:{uid:void 0,accounts:[],isAccount:{},account_id:ou?.accountId||null,domain:null,assets:[],privacyPolicy:"",asset:!0},reducers:{setContentApi:(e,t)=>{Object.assign(e,t.payload)},setAccounts:(e,t)=>{e.accounts=t.payload;const n=e.isAccount.account_id,r=t.payload.find(e=>e.account_id===n);if(r)e.isAccount=r;else{const n=t.payload.find(t=>t.account_id===e.account_id);if(n)return void(e.isAccount=n);e.isAccount=t.payload.find(e=>"demo"===e.group)||{}}},setAccount:(e,t)=>{e.isAccount=t.payload,or("accountId",t.payload.account_id).then()},setUID:(e,t)=>{e.uid=t.payload},signupPartner:(e,t)=>{},setEndpoint:(e,t)=>{e.endpoint=t.payload}}}),lu=au({reducerPath:"serverApi",baseQuery:function({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=Ws,paramsSerializer:r,isJsonContentType:i=Qs,jsonContentType:a="application/json",jsonReplacer:o,timeout:s,responseHandler:l,validateStatus:u,...c}={}){return async(d,h,p)=>{const{getState:v,extra:m,endpoint:g,forced:b,type:y}=h;let w,k,{url:x,headers:_=new Headers(c.headers),params:S,responseHandler:C=l??"json",validateStatus:T=u??Us,timeout:E=s,...A}="string"==typeof d?{url:d}:d,R=h.signal;E&&(k=new AbortController,h.signal.addEventListener("abort",k.abort),R=k.signal);let M={...c,signal:R,...A};_=new Headers(Vs(_)),M.headers=await t(_,{getState:v,arg:d,extra:m,endpoint:g,forced:b,type:y,extraOptions:p})||_;const $="object"==typeof(j=M.body)&&(ue(j)||Array.isArray(j)||"function"==typeof j.toJSON);var j;if(null==M.body||$||"string"==typeof M.body||M.headers.delete("content-type"),!M.headers.has("content-type")&&$&&M.headers.set("content-type",a),$&&i(M.headers)&&(M.body=JSON.stringify(M.body,o)),M.headers.has("accept")||("json"===C?M.headers.set("accept","application/json"):"text"===C&&M.headers.set("accept","text/plain, text/html, */*")),S){const e=~x.indexOf("?")?"&":"?";x+=e+(r?r(S):new URLSearchParams(Vs(S)))}x=zs(e,x);const O=new Request(x,M);w={request:new Request(x,M)};let P,L=!1,F=k&&setTimeout(()=>{L=!0,k.abort()},E);try{P=await n(O)}catch(q){return{error:{status:L?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(q)},meta:w}}finally{F&&clearTimeout(F),k?.signal.removeEventListener("abort",k.abort)}const I=P.clone();let N;w.response=I;let D="";try{let e;if(await Promise.all([f(P,C).then(e=>N=e,t=>e=t),I.text().then(e=>D=e,()=>{})]),e)throw e}catch(q){return{error:{status:"PARSING_ERROR",originalStatus:P.status,data:D,error:String(q)},meta:w}}return T(P,N)?{data:N,meta:w}:{error:{status:P.status,data:N},meta:w}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=i(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}({baseUrl:To,credentials:"include",prepareHeaders:e=>(e.set("X-Extension-Id",rr()||""),e)}),endpoints:e=>({getData:e.query({query:({endpoint:e})=>({url:e})})})}),{useGetDataQuery:uu}=lu,{setContentApi:cu,setAccounts:fu,setAccount:du,setUID:hu,signupPartner:pu,setEndpoint:vu}=su.actions;const mu=new Set(["--color-primary","-theme-accent-text-color","--theme-bg-color","--theme-border-color","--theme-button-text-color","--theme-destructive-text-color","--theme-header-bg-color","--theme-hint-color","--theme-link-color","--theme-secondary-bg-color","--theme-section-bg-color","--theme-section-header-text-color","--theme-section-separator-color","--theme-subtitle-text-color","--theme-text-color","--theme-positive-color","--theme-negative-color"]);const gu=d.createContext(null);function bu({children:e}){const t=d.useMemo(()=>function(){const e=new URLSearchParams(window.location.search).get("mode");if(!e)return{};try{const t=JSON.parse(decodeURIComponent(e));return t?.endpoint?{endpoint:String(t.endpoint),theme:null!=t.theme?String(t.theme):void 0}:{}}catch{return{}}}(),[]),n=ee(),r=re(e=>Boolean(e.api.uid)),i=re(e=>Boolean(e.api.asset)),[a,o]=d.useState(null);d.useLayoutEffect(()=>{t?.theme&&function(e){const t=e.split(";").map(e=>e.trim()).filter(Boolean);for(const n of t){const[e,t]=n.split(":").map(e=>e.trim());e&&null!=t&&mu.has(e)&&document.documentElement.style.setProperty(e,t)}}(t.theme)},[t?.theme]),d.useEffect(()=>{if(!t?.endpoint)return;n(vu(t.endpoint));const e={endpoint:t.endpoint};o(e)},[t?.endpoint]);const l=uu(null!==a?a:Tl),u=d.useMemo(()=>({args:a,ready:!!a,data:l.data,isLoading:l.isLoading,isFetching:l.isFetching,error:l.error,refetch:l.refetch,isAuthenticated:r,isActivated:i}),[a,l.data,l.isLoading,l.isFetching,l.error,l.refetch,r,i]);return s.jsx(gu.Provider,{value:u,children:e})}function yu(){const e=d.useContext(gu);if(!e)throw new Error("useServerData must be used within <ServerDataProvider>");return e}function wu(){const e=ns(),t=re(e=>e.ws),{isActivated:n}=yu();return s.jsxs("div",{className:"bg-transparent border rounded-lg border-[var(--theme-border-color)] p-3",children:[s.jsxs("div",{className:"flex font-bold text-base",children:[s.jsx("div",{children:n&&t.status===Xn.CONNECT?s.jsx(ku,{}):s.jsx(xu,{})}),s.jsx("div",{className:"leading-[1.6] ms-3",children:n?e.t(`status_${t.status}`):e.t("ssa")})]}),n&&t.status===Xn.CONNECT&&s.jsx("div",{className:"text-[.8125rem]",children:e.t("ssd")})]})}const ku=()=>s.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx(_u,{className:"IOutaxLF",fillRule:"evenodd",clipRule:"evenodd",d:"M6.45185 6.3765C6.83678 6.77253 6.82779 7.40563 6.43176 7.79057C5.04368 9.13976 4.19922 10.9745 4.19922 12.9898C4.19922 15.005 5.04368 16.8398 6.43176 18.189C6.82779 18.5739 6.83678 19.207 6.45185 19.603C6.06691 19.9991 5.43381 20.0081 5.03777 19.6231C3.28898 17.9233 2.19922 15.5815 2.19922 12.9898C2.19922 10.398 3.28898 8.05621 5.03777 6.35641C5.43381 5.97147 6.06691 5.98046 6.45185 6.3765ZM18.0609 6.3765C18.4458 5.98046 19.0789 5.97147 19.475 6.35641C21.2238 8.05621 22.3135 10.398 22.3135 12.9898C22.3135 15.5815 21.2238 17.9233 19.475 19.6231C19.0789 20.0081 18.4458 19.9991 18.0609 19.603C17.676 19.207 17.685 18.5739 18.081 18.189C19.4691 16.8398 20.3135 15.005 20.3135 12.9898C20.3135 10.9745 19.4691 9.13976 18.081 7.79057C17.685 7.40563 17.676 6.77253 18.0609 6.3765Z"}),s.jsx(Su,{className:"EIk4rjHJ",fillRule:"evenodd",clipRule:"evenodd",d:"M9.08552 9.23879C9.43664 9.66509 9.37569 10.2953 8.94939 10.6464C8.18214 11.2784 7.75604 12.1127 7.75604 12.9897C7.75604 13.8667 8.18214 14.7011 8.94939 15.333C9.37569 15.6841 9.43664 16.3144 9.08552 16.7407C8.73441 17.167 8.10418 17.2279 7.67788 16.8768C6.52269 15.9253 5.75604 14.5532 5.75604 12.9897C5.75604 11.4262 6.52269 10.0541 7.67788 9.10265C8.10418 8.75153 8.73441 8.81248 9.08552 9.23879ZM15.4272 9.23879C15.7784 8.81248 16.4086 8.75153 16.8349 9.10265C17.9901 10.0541 18.7567 11.4262 18.7567 12.9897C18.7567 14.5532 17.9901 15.9253 16.8349 16.8768C16.4086 17.2279 15.7784 17.167 15.4272 16.7407C15.0761 16.3144 15.1371 15.6841 15.5634 15.333C16.3306 14.7011 16.7567 13.8667 16.7567 12.9897C16.7567 12.1127 16.3306 11.2784 15.5634 10.6464C15.1371 10.2953 15.0761 9.66509 15.4272 9.23879Z"}),s.jsx("path",{d:"M14.1991 12.9897C14.1991 14.0943 13.3037 14.9897 12.1991 14.9897C11.0945 14.9897 10.1991 14.0943 10.1991 12.9897C10.1991 11.8852 11.0945 10.9897 12.1991 10.9897C13.3037 10.9897 14.1991 11.8852 14.1991 12.9897Z"})]}),xu=()=>s.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.45185 6.3765C6.83678 6.77253 6.82779 7.40563 6.43176 7.79057C5.04368 9.13976 4.19922 10.9745 4.19922 12.9898C4.19922 15.005 5.04368 16.8398 6.43176 18.189C6.82779 18.5739 6.83678 19.207 6.45185 19.603C6.06691 19.9991 5.43381 20.0081 5.03777 19.6231C3.28898 17.9233 2.19922 15.5815 2.19922 12.9898C2.19922 10.398 3.28898 8.05621 5.03777 6.35641C5.43381 5.97147 6.06691 5.98046 6.45185 6.3765ZM18.0609 6.3765C18.4458 5.98046 19.0789 5.97147 19.475 6.35641C21.2238 8.05621 22.3135 10.398 22.3135 12.9898C22.3135 15.5815 21.2238 17.9233 19.475 19.6231C19.0789 20.0081 18.4458 19.9991 18.0609 19.603C17.676 19.207 17.685 18.5739 18.081 18.189C19.4691 16.8398 20.3135 15.005 20.3135 12.9898C20.3135 10.9745 19.4691 9.13976 18.081 7.79057C17.685 7.40563 17.676 6.77253 18.0609 6.3765Z"}),s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.08552 9.23879C9.43664 9.66509 9.37569 10.2953 8.94939 10.6464C8.18214 11.2784 7.75604 12.1127 7.75604 12.9897C7.75604 13.8667 8.18214 14.7011 8.94939 15.333C9.37569 15.6841 9.43664 16.3144 9.08552 16.7407C8.73441 17.167 8.10418 17.2279 7.67788 16.8768C6.52269 15.9253 5.75604 14.5532 5.75604 12.9897C5.75604 11.4262 6.52269 10.0541 7.67788 9.10265C8.10418 8.75153 8.73441 8.81248 9.08552 9.23879ZM15.4272 9.23879C15.7784 8.81248 16.4086 8.75153 16.8349 9.10265C17.9901 10.0541 18.7567 11.4262 18.7567 12.9897C18.7567 14.5532 17.9901 15.9253 16.8349 16.8768C16.4086 17.2279 15.7784 17.167 15.4272 16.7407C15.0761 16.3144 15.1371 15.6841 15.5634 15.333C16.3306 14.7011 16.7567 13.8667 16.7567 12.9897C16.7567 12.1127 16.3306 11.2784 15.5634 10.6464C15.1371 10.2953 15.0761 9.66509 15.4272 9.23879Z"}),s.jsx("circle",{cx:"12.2",cy:"12.99",r:"2"}),s.jsx("line",{x1:"4",y1:"21",x2:"21",y2:"4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),s.jsx("line",{x1:"7",y1:"21",x2:"24",y2:"4",stroke:"var(--theme-bg-color)",strokeWidth:"2",strokeLinecap:"round"})]}),_u=fo.path`
283
+ `,Ts=s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M0.666626 14.3334H15.3333L7.99996 1.66669L0.666626 14.3334ZM8.66663 12.3334H7.33329V11H8.66663V12.3334ZM8.66663 9.66669H7.33329V7.00002H8.66663V9.66669Z",fill:"currentcolor"})}),Es=s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM8.9307 6.58789L7.92875 11.293C7.85844 11.6328 7.95805 11.8262 8.23344 11.8262C8.4268 11.8262 8.71977 11.7559 8.91898 11.5801L8.83109 11.9961C8.54398 12.3418 7.91117 12.5938 7.36625 12.5938C6.66313 12.5938 6.3643 12.1719 6.55766 11.2754L7.29594 7.80664C7.36039 7.51367 7.3018 7.4082 7.00883 7.33789L6.55766 7.25586L6.63969 6.875L8.9307 6.58789ZM8 5.5C7.44772 5.5 7 5.05228 7 4.5C7 3.94772 7.44772 3.5 8 3.5C8.55229 3.5 9 3.94772 9 4.5C9 5.05228 8.55229 5.5 8 5.5Z",fill:"currentcolor"})}),As=s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM12.0303 4.96967C11.7374 4.67678 11.2626 4.67678 10.9697 4.96967C10.9626 4.97674 10.9559 4.98424 10.9498 4.9921L7.4774 9.41674L5.38388 7.32322C5.09098 7.03033 4.61611 7.03033 4.32322 7.32322C4.03032 7.61612 4.03032 8.09099 4.32322 8.38388L6.96966 11.0303C7.26256 11.3232 7.73743 11.3232 8.03032 11.0303C8.03685 11.0238 8.043 11.0169 8.04876 11.0097L12.041 6.01947C12.3232 5.72582 12.3196 5.25897 12.0303 4.96967Z",fill:"currentcolor"})});var Rs=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},Ms=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Ms||{}),$s="uninitialized",js="pending",Os="fulfilled",Ps="rejected";function Ls(e){return{status:e,isUninitialized:e===$s,isLoading:e===js,isSuccess:e===Os,isError:e===Ps}}var Fs=ue;function Is(e,t){if(e===t||!(Fs(e)&&Fs(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const a=Array.isArray(t)?[]:{};for(const o of n)a[o]=Is(e[o],t[o]),i&&(i=e[o]===a[o]);return i?e:a}function Ns(e,t,n){return e.reduce((e,r,i)=>(t(r,i)&&e.push(n(r,i)),e),[]).flat()}function Ds(e){return null!=e}function qs(e){return[...e?.values()??[]].filter(Ds)}function zs(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=(e=>e.replace(/\/$/,""))(e),`${e}${n}${t=(e=>e.replace(/^\//,""))(t)}`}function Bs(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Hs=()=>new Map,Ws=(...e)=>fetch(...e),Us=e=>e.status>=200&&e.status<=299,Qs=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Vs(e){if(!ue(e))return e;const t={...e};for(const[n,r]of Object.entries(t))void 0===r&&delete t[n];return t}var Ks=class{constructor(e,t=void 0){this.value=e,this.meta=t}},Gs="__rtkq/",Zs="focused",Xs=Dt(`${Gs}${Zs}`),Js=Dt(`${Gs}un${Zs}`),Ys=Dt(`${Gs}online`),el=Dt(`${Gs}offline`),tl="query",nl="mutation",rl="infinitequery";function il(e){return e.type===tl}function al(e){return e.type===rl}function ol(e){return il(e)||al(e)}function sl(e,t,n,r,i,a){const o="function"==typeof e?e(t,n,r,i):e;return o?Ns(o,Ds,e=>a(ll(e))):[]}function ll(e){return"string"==typeof e?{type:e}:e}var ul=(e,t)=>e.endpointDefinitions[t],cl=Symbol("forceQueryFn"),fl=e=>"function"==typeof e[cl];var dl=class extends Rs{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}},hl=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function pl(e,t,n,r){const i=await e["~standard"].validate(t);if(i.issues)throw new dl(i.issues,t,n,r);return i.value}function vl(e){return e}var ml=(e={})=>({...e,[Ht]:!0});function gl(e,{pages:t,pageParams:n},r){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n,r)}function bl(e,{pages:t,pageParams:n},r){return e.getPreviousPageParam?.(t[0],t,n[0],n,r)}function yl(e,t,n,r){return sl(n[e.meta.arg.endpointName][t],nn(e)?e.payload:void 0,tn(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function wl(e){return Te(e)?wt(e):e}function kl(e,t,n){const r=e[t];r&&n(r)}function xl(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function _l(e,t,n){const r=e[xl(t)];r&&n(r)}var Sl={};function Cl({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:s},assertTagType:l,config:u}){const c=Dt(`${e}/resetApiState`);function f(e,t,n,r){e[t.queryCacheKey]??={status:$s,endpointName:t.endpointName},kl(e,t.queryCacheKey,e=>{e.status=js,e.requestId=n&&e.requestId?e.requestId:r.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=r.startedTimeStamp;al(i[r.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function d(e,t,n,r){kl(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!r)return;const{merge:a}=i[t.arg.endpointName];if(e.status=Os,a)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:i,baseQueryMeta:o,requestId:s}=t;let l=St(e.data,e=>a(e,n,{arg:i.originalArgs,baseQueryMeta:o,fulfilledTimeStamp:r,requestId:s}));e.data=l}else e.data=n;else e.data=i[t.arg.endpointName].structuralSharing??1?Is(Te(e.data)?(o=e.data,Te(o)||ge(15),o[me].base_):e.data,n):n;var o;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}const h=gn({name:`${e}/queries`,initialState:Sl,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:Wt()},cacheEntriesUpserted:{reducer(e,t){for(const n of t.payload){const{queryDescription:r,value:i}=n;f(e,r,!0,{arg:r,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),d(e,{arg:r,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},i,!0)}},prepare:e=>({payload:e.map(e=>{const{endpointName:t,arg:n,value:a}=e,o=i[t];return{queryDescription:{type:tl,endpointName:t,originalArgs:e.arg,queryCacheKey:r({queryArgs:n,endpointDefinition:o,endpointName:t})},value:a}}),meta:{[Ht]:!0,requestId:an(),timestamp:Date.now()}})},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){kl(e,t,e=>{e.data=Tt(e.data,n.concat())})},prepare:Wt()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:n}})=>{f(e,n,fl(n),t)}).addCase(t.fulfilled,(e,{meta:t,payload:n})=>{d(e,t,n,fl(t.arg))}).addCase(t.rejected,(e,{meta:{condition:t,arg:n,requestId:r},error:i,payload:a})=>{kl(e,n.queryCacheKey,e=>{if(t);else{if(e.requestId!==r)return;e.status=Ps,e.error=a??i}})}).addMatcher(s,(e,t)=>{const{queries:n}=o(t);for(const[r,i]of Object.entries(n))i?.status!==Os&&i?.status!==Ps||(e[r]=i)})}}),p=gn({name:`${e}/mutations`,initialState:Sl,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=xl(t);n in e&&delete e[n]},prepare:Wt()}},extraReducers(e){e.addCase(n.pending,(e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:i}})=>{r.track&&(e[xl(t)]={requestId:n,status:js,endpointName:r.endpointName,startedTimeStamp:i})}).addCase(n.fulfilled,(e,{payload:t,meta:n})=>{n.arg.track&&_l(e,n,e=>{e.requestId===n.requestId&&(e.status=Os,e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)})}).addCase(n.rejected,(e,{payload:t,error:n,meta:r})=>{r.arg.track&&_l(e,r,e=>{e.requestId===r.requestId&&(e.status=Ps,e.error=t??n)})}).addMatcher(s,(e,t)=>{const{mutations:n}=o(t);for(const[r,i]of Object.entries(n))i?.status!==Os&&i?.status!==Ps||r===i?.requestId||(e[r]=i)})}}),v=gn({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(const{queryCacheKey:n,providedTags:r}of t.payload){m(e,n);for(const{type:t,id:i}of r){const r=(e.tags[t]??={})[i||"__internal_without_id"]??=[];r.includes(n)||r.push(n)}e.keys[n]=r}},prepare:Wt()}},extraReducers(e){e.addCase(h.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{m(e,t)}).addMatcher(s,(e,t)=>{const{provided:n}=o(t);for(const[r,i]of Object.entries(n.tags??{}))for(const[t,a]of Object.entries(i)){const i=(e.tags[r]??={})[t||"__internal_without_id"]??=[];for(const t of a){i.includes(t)||i.push(t),e.keys[t]=n.keys[t]}}}).addMatcher(Gt(nn(t),tn(t)),(e,t)=>{g(e,[t])}).addMatcher(h.actions.cacheEntriesUpserted.match,(e,t)=>{g(e,t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}})))})}});function m(e,t){const n=wl(e.keys[t]??[]);for(const r of n){const n=r.type,i=r.id??"__internal_without_id",a=e.tags[n]?.[i];a&&(e.tags[n][i]=wl(a).filter(e=>e!==t))}delete e.keys[t]}function g(e,t){const n=t.map(e=>{const t=yl(e,"providesTags",i,l),{queryCacheKey:n}=e.meta.arg;return{queryCacheKey:n,providedTags:t}});v.caseReducers.updateProvidedBy(e,v.actions.updateProvidedBy(n))}const b=gn({name:`${e}/subscriptions`,initialState:Sl,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),y=gn({name:`${e}/internalSubscriptions`,initialState:Sl,reducers:{subscriptionsUpdated:{reducer:(e,t)=>Tt(e,t.payload),prepare:Wt()}}}),w=gn({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(Ys,e=>{e.online=!0}).addCase(el,e=>{e.online=!1}).addCase(Xs,e=>{e.focused=!0}).addCase(Js,e=>{e.focused=!1}).addMatcher(s,e=>({...e}))}}),k=fe({queries:h.reducer,mutations:p.reducer,provided:v.reducer,subscriptions:y.reducer,config:w.reducer});return{reducer:(e,t)=>k(c.match(t)?void 0:e,t),actions:{...w.actions,...h.actions,...b.actions,...y.actions,...p.actions,...v.actions,resetApiState:c}}}var Tl=Symbol.for("RTKQ/skipToken"),El={status:$s},Al=St(El,()=>{}),Rl=St(El,()=>{});var Ml=WeakMap?new WeakMap:void 0,$l=({endpointName:e,queryArgs:t})=>{let n="";const r=Ml?.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,(e,t)=>t=ue(t="bigint"==typeof t?{$bigint:t.toString()}:t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t);ue(t)&&Ml?.set(t,e),n=e}return`${e}(${n})`};function jl(...e){return function(t){const n=$t(e=>t.extractRehydrationInfo?.(e,{reducerPath:t.reducerPath??"api"})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=$l;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:$l({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e()},apiUid:an(),extractRehydrationInfo:n,hasRehydrationInfo:$t(e=>null!=n(e))},a={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:tl}),mutation:e=>({...e,type:nl}),infiniteQuery:e=>({...e,type:rl})});for(const[n,r]of Object.entries(t))if(!0!==e.overrideExisting&&n in i.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(Zn(39))}else{i.endpointDefinitions[n]=r;for(const e of o)e.injectEndpoint(n,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const n of e)r.tagTypes.includes(n)||r.tagTypes.push(n);if(t)for(const[n,r]of Object.entries(t))"function"==typeof r?r(ul(i,n)):Object.assign(ul(i,n)||{},r);return a}},o=e.map(e=>e.init(a,r,i));return a.injectEndpoints({endpoints:t.endpoints})}}function Ol(e,...t){return Object.assign(e,...t)}var Pl=({api:e,queryThunk:t,internalState:n,mwApi:r})=>{const i=`${e.reducerPath}/subscriptions`;let a=null,o=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:l}=e.internalActions,u=()=>n.currentSubscriptions,c={getSubscriptions:u,getSubscriptionCount:e=>{const t=u().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{const n=u();return!!n?.get(e)?.get(t)}};function f(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(r,u)=>{if(a||(a=f(n.currentSubscriptions)),e.util.resetApiState.match(r))return a={},n.currentSubscriptions.clear(),o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(r))return[!1,c];const d=((n,r)=>{if(s.match(r)){const{queryCacheKey:e,requestId:t,options:i}=r.payload,a=n.get(e);return a?.has(t)&&a.set(t,i),!0}if(l.match(r)){const{queryCacheKey:e,requestId:t}=r.payload,i=n.get(e);return i&&i.delete(t),!0}if(e.internalActions.removeQueryResult.match(r))return n.delete(r.payload.queryCacheKey),!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r,i=Bs(n,e.queryCacheKey,Hs);return e.subscribe&&i.set(t,e.subscriptionOptions??i.get(t)??{}),!0}let i=!1;if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:a}}=r;if(e&&t.subscribe){const e=Bs(n,t.queryCacheKey,Hs);e.set(a,t.subscriptionOptions??e.get(a)??{}),i=!0}}return i})(n.currentSubscriptions,r);let h=!0;if(d){o||(o=setTimeout(()=>{const t=f(n.currentSubscriptions),[,r]=Ct(a,()=>t);u.next(e.internalActions.subscriptionsUpdated(r)),a=t,o=null},500));const s="string"==typeof r.type&&!!r.type.startsWith(i),l=t.rejected.match(r)&&r.meta.condition&&!!r.meta.arg.subscribe;h=!s&&!l}return[h,!1]}},Ll=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:a,selectConfig:o},getRunningQueryThunk:s,mwApi:l})=>{const{removeQueryResult:u,unsubscribeQueryResult:c,cacheEntriesUpserted:f}=t.internalActions,d=Gt(c.match,n.fulfilled,n.rejected,f.match);function h(e){const t=i.currentSubscriptions.get(e);if(!t)return!1;return t.size>0}const p={};function v(e){for(const t of e.values())t?.abort?.()}function m(e,t,n){const r=t.getState();for(const i of e){const e=a(r,i);e?.endpointName&&g(i,e.endpointName,t,n)}}function g(e,t,n,i){const o=ul(r,t),l=o?.keepUnusedDataFor??i.keepUnusedDataFor;if(l===1/0)return;const c=Math.max(0,Math.min(l,2147482.647));if(!h(e)){const t=p[e];t&&clearTimeout(t),p[e]=setTimeout(()=>{if(!h(e)){const t=a(n.getState(),e);if(t?.endpointName){const e=n.dispatch(s(t.endpointName,t.originalArgs));e?.abort()}n.dispatch(u({queryCacheKey:e}))}delete p[e]},1e3*c)}}return(e,n)=>{const a=n.getState(),s=o(a);if(d(e)){let t;if(f.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{const{queryCacheKey:n}=c.match(e)?e.payload:e.meta.arg;t=[n]}m(t,n,s)}if(t.util.resetApiState.match(e)){for(const[e,t]of Object.entries(p))t&&clearTimeout(t),delete p[e];v(i.runningQueries),v(i.runningMutations)}if(r.hasRehydrationInfo(e)){const{queries:t}=r.extractRehydrationInfo(e);m(Object.keys(t),n,s)}}},Fl=new Error("Promise never resolved before cacheEntryRemoved."),Il=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:a,selectors:{selectQueryEntry:o,selectApiState:s}})=>{const l=rn(r),u=rn(i),c=nn(r,i),f={},{removeQueryResult:d,removeMutationResult:h,cacheEntriesUpserted:p}=e.internalActions;function v(e,t,n){const r=f[e];r?.valueResolved&&(r.valueResolved({data:t,meta:n}),delete r.valueResolved)}function m(e){const t=f[e];t&&(delete f[e],t.cacheEntryRemoved())}function g(e){const{arg:t,requestId:n}=e.meta,{endpointName:r,originalArgs:i}=t;return[r,i,n]}function b(t,r,i,a,o){const s=ul(n,t),l=s?.onCacheEntryAdded;if(!l)return;const u={},c=new Promise(e=>{u.cacheEntryRemoved=e}),d=Promise.race([new Promise(e=>{u.valueResolved=e}),c.then(()=>{throw Fl})]);d.catch(()=>{}),f[i]=u;const h=e.endpoints[t].select(ol(s)?r:i),p=a.dispatch((e,t,n)=>n),v={...a,getCacheEntry:()=>h(a.getState()),requestId:o,extra:p,updateCachedData:ol(s)?n=>a.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:d,cacheEntryRemoved:c},m=l(r,v);Promise.resolve(m).catch(e=>{if(e!==Fl)throw e})}return(n,a,s)=>{const y=function(e){if(l(e))return e.meta.arg.queryCacheKey;if(u(e))return e.meta.arg.fixedCacheKey??e.meta.requestId;return d.match(e)?e.payload.queryCacheKey:h.match(e)?xl(e.payload):""}(n);function w(e,t,n,r){const i=o(s,t),l=o(a.getState(),t);!i&&l&&b(e,r,t,a,n)}if(r.pending.match(n)){const[e,t,r]=g(n);w(e,y,r,t)}else if(p.match(n))for(const{queryDescription:e,value:t}of n.payload){const{endpointName:r,originalArgs:i,queryCacheKey:a}=e;w(r,a,n.meta.requestId,i),v(a,t,{})}else if(i.pending.match(n)){if(a.getState()[t].mutations[y]){const[e,t,r]=g(n);b(e,t,y,a,r)}}else if(c(n))v(y,n.payload,n.meta.baseQueryMeta);else if(d.match(n)||h.match(n))m(y);else if(e.util.resetApiState.match(n))for(const e of Object.keys(f))m(e)}},Nl=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},Dl=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:a,assertTagType:o,refetchQuery:s,internalState:l})=>{const{removeQueryResult:u}=a.internalActions,c=Gt(nn(r),tn(r)),f=Gt(nn(i,r),en(i,r));let d=[],h=0;function p(n,r){const i=r.getState(),o=i[e];if(d.push(...n),"delayed"===o.config.invalidationBehavior&&h>0)return;const c=d;if(d=[],0===c.length)return;const f=a.util.selectInvalidatedBy(i,c);t.batch(()=>{const e=Array.from(f.values());for(const{queryCacheKey:t}of e){const e=o.queries[t],n=Bs(l.currentSubscriptions,t,Hs);e&&(0===n.size?r.dispatch(u({queryCacheKey:t})):e.status!==$s&&r.dispatch(s(e)))}})}return(e,t)=>{(i.pending.match(e)||r.pending.match(e))&&h++,f(e)&&(h=Math.max(0,h-1)),c(e)?p(yl(e,"invalidatesTags",n,o),t):f(e)?p([],t):a.util.invalidateTags.match(e)&&p(sl(e.payload,void 0,void 0,void 0,void 0,o),t)}},ql=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const{currentPolls:a,currentSubscriptions:o}=i,s=new Set;let l=null;function u(e,t){s.add(e),l||(l=setTimeout(()=>{for(const e of s)f({queryCacheKey:e},t);s.clear(),l=null},0))}function c({queryCacheKey:t},n){const i=n.getState()[e],s=i.queries[t],l=o.get(t);if(!s||s.status===$s)return;const{lowestPollingInterval:u,skipPollingIfUnfocused:f}=h(l);if(!Number.isFinite(u))return;const d=a.get(t);d?.timeout&&(clearTimeout(d.timeout),d.timeout=void 0);const p=Date.now()+u;a.set(t,{nextPollTimestamp:p,pollingInterval:u,timeout:setTimeout(()=>{!i.config.focused&&f||n.dispatch(r(s)),c({queryCacheKey:t},n)},u)})}function f({queryCacheKey:t},n){const r=n.getState()[e].queries[t],i=o.get(t);if(!r||r.status===$s)return;const{lowestPollingInterval:s}=h(i);if(!Number.isFinite(s))return void d(t);const l=a.get(t),u=Date.now()+s;(!l||u<l.nextPollTimestamp)&&c({queryCacheKey:t},n)}function d(e){const t=a.get(e);t?.timeout&&clearTimeout(t.timeout),a.delete(e)}function h(e=new Map){let t=!1,n=Number.POSITIVE_INFINITY;for(const r of e.values())r.pollingInterval&&(n=Math.min(r.pollingInterval,n),t=r.skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&u(e.payload.queryCacheKey,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&u(e.meta.arg.queryCacheKey,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&c(e.meta.arg,r),n.util.resetApiState.match(e)&&(!function(){for(const e of a.keys())d(e)}(),l&&(clearTimeout(l),l=null),s.clear())}},zl=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Yt(n,r),a=en(n,r),o=nn(n,r),s={};return(n,r)=>{if(i(n)){const{requestId:i,arg:{endpointName:a,originalArgs:o}}=n.meta,l=ul(t,a),u=l?.onQueryStarted;if(u){const t={},n=new Promise((e,n)=>{t.resolve=e,t.reject=n});n.catch(()=>{}),s[i]=t;const c=e.endpoints[a].select(ol(l)?o:i),f=r.dispatch((e,t,n)=>n),d={...r,getCacheEntry:()=>c(r.getState()),requestId:i,extra:f,updateCachedData:ol(l)?t=>r.dispatch(e.util.updateQueryData(a,o,t)):void 0,queryFulfilled:n};u(o,d)}}else if(o(n)){const{requestId:e,baseQueryMeta:t}=n.meta;s[e]?.resolve({data:n.payload,meta:t}),delete s[e]}else if(a(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;s[e]?.reject({error:n.payload??n.error,isUnhandledError:!t,meta:r}),delete s[e]}}};function Bl(e){const{reducerPath:t,queryThunk:n,api:r,context:i,getInternalState:a}=e,{apiUid:o}=i,s={invalidateTags:Dt(`${t}/invalidateTags`)},l=e=>e.type.startsWith(`${t}/`),u=[Nl,Ll,Dl,ql,Il,zl];return{middleware:n=>{let s=!1;const f=a(n.dispatch),d={...e,internalState:f,refetchQuery:c,isThisApiSliceAction:l,mwApi:n},h=u.map(e=>e(d)),p=Pl(d),v=(({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:a}=n.internalActions;function o(n,o){const s=n.getState()[e],l=s.queries,u=i.currentSubscriptions;t.batch(()=>{for(const e of u.keys()){const t=l[e],i=u.get(e);if(!i||!t)continue;const c=[...i.values()];(c.some(e=>!0===e[o])||c.every(e=>void 0===e[o])&&s.config[o])&&(0===i.size?n.dispatch(a({queryCacheKey:e})):t.status!==$s&&n.dispatch(r(t)))}})}return(e,t)=>{Xs.match(e)&&o(t,"refetchOnFocus"),Ys.match(e)&&o(t,"refetchOnReconnect")}})(d);return e=>a=>{if(!he(a))return e(a);s||(s=!0,n.dispatch(r.internalActions.middlewareRegistered(o)));const u={...n,next:e},c=n.getState(),[f,d]=p(a,u,c);let m;if(m=f?e(a):d,n.getState()[t]&&(v(a,u,c),l(a)||i.hasRehydrationInfo(a)))for(const e of h)e(a,u,c);return m}},actions:s};function c(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Hl=Symbol(),Wl=({createSelector:e=Ot}={})=>({name:Hl,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:a,keepUnusedDataFor:o,refetchOnMountOrArgChange:s,refetchOnFocus:l,refetchOnReconnect:u,invalidationBehavior:c,onSchemaFailure:f,catchSchemaFailure:d,skipSchemaValidation:h},p){xt();const v=e=>e;Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:Ys,onOffline:el,onFocus:Xs,onFocusLost:Js},util:{}});const m=function({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>Al,i=e=>Rl;return{buildQuerySelector:function(e,t){return u(e,t,a)},buildInfiniteQuerySelector:function(e,t){const{infiniteQueryOptions:n}=t;return u(e,t,function(e){const t={...e,...Ls(e.status)},{isLoading:r,isError:i,direction:a}=t,o="forward"===a,s="backward"===a;return{...t,hasNextPage:c(n,t.data,t.originalArgs),hasPreviousPage:f(n,t.data,t.originalArgs),isFetchingNextPage:r&&o,isFetchingPreviousPage:r&&s,isFetchNextPageError:i&&o,isFetchPreviousPageError:i&&s}})},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?xl(e)??Tl:e,n(t===Tl?i:e=>o(e)?.mutations?.[t]??Rl,a)}},selectInvalidatedBy:function(e,n){const r=e[t],i=new Set,a=Ns(n,Ds,ll);for(const t of a){const e=r.provided.tags[t.type];if(!e)continue;let n=(void 0!==t.id?e[t.id]:Object.values(e).flat())??[];for(const t of n)i.add(t)}return Array.from(i.values()).flatMap(e=>{const t=r.queries[e];return t?{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}:[]})},selectCachedArgsForQuery:function(e,t){return Ns(Object.values(s(e)),e=>e?.endpointName===t&&e.status!==$s,e=>e.originalArgs)},selectApiState:o,selectQueries:s,selectMutations:function(e){return o(e)?.mutations},selectQueryEntry:l,selectConfig:function(e){return o(e)?.config}};function a(e){return{...e,...Ls(e.status)}}function o(e){return e[t]}function s(e){return o(e)?.queries}function l(e,t){return s(e)?.[t]}function u(t,i,a){return o=>{if(o===Tl)return n(r,a);const s=e({queryArgs:o,endpointDefinition:i,endpointName:t});return n(e=>l(e,s)??Al,a)}}function c(e,t,n){return!!t&&null!=gl(e,t,n)}function f(e,t,n){return!(!t||!e.getPreviousPageParam)&&null!=bl(e,t,n)}}({serializeQueryArgs:a,reducerPath:i,createSelector:e}),{selectInvalidatedBy:g,selectCachedArgsForQuery:b,buildQuerySelector:y,buildInfiniteQuerySelector:w,buildMutationSelector:k}=m;Ol(t.util,{selectInvalidatedBy:g,selectCachedArgsForQuery:b});const{queryThunk:x,infiniteQueryThunk:_,mutationThunk:S,patchQueryData:C,updateQueryData:T,upsertQueryData:E,prefetch:A,buildMatchThunkActions:R}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i,assertTagType:a,selectors:o,onSchemaFailure:s,catchSchemaFailure:l,skipSchemaValidation:u}){function c(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}function f(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}const d=(e,t)=>e.query&&e[t]?e[t]:vl,h=async(e,{signal:r,abort:i,rejectWithValue:a,fulfillWithValue:h,dispatch:v,getState:m,extra:g})=>{const b=n[e.endpointName],{metaSchema:y,skipSchemaValidation:w=u}=b,k=e.type===tl;try{let S=vl;const C={signal:r,abort:i,dispatch:v,getState:m,extra:g,endpoint:e.endpointName,type:e.type,forced:k?p(e,m()):void 0,queryCacheKey:k?e.queryCacheKey:void 0},T=k?e[cl]:void 0;let E;const A=async(t,n,r,i)=>{if(null==n&&t.pages.length)return Promise.resolve({data:t});const a={queryArg:e.originalArgs,pageParam:n},o=await R(a),s=i?c:f;return{data:{pages:s(t.pages,o.data,r),pageParams:s(t.pageParams,n,r)},meta:o.meta}};async function R(e){let n;const{extraOptions:r,argSchema:i,rawResponseSchema:a,responseSchema:o}=b;if(i&&!hl(w,"arg")&&(e=await pl(i,e,"argSchema",{})),T?n=T():b.query?(S=d(b,"transformResponse"),n=await t(b.query(e),C,r)):n=await b.queryFn(e,C,r,e=>t(e,C,r)),n.error)throw new Ks(n.error,n.meta);let{data:s}=n;a&&!hl(w,"rawResponse")&&(s=await pl(a,n.data,"rawResponseSchema",n.meta));let l=await S(s,n.meta,e);return o&&!hl(w,"response")&&(l=await pl(o,l,"responseSchema",n.meta)),{...n,data:l}}if(k&&"infiniteQueryOptions"in b){const{infiniteQueryOptions:M}=b,{maxPages:$=1/0}=M,j=e.refetchCachedPages??M.refetchCachedPages??!0;let O;const P={pages:[],pageParams:[]},L=o.selectQueryEntry(m(),e.queryCacheKey)?.data,F=p(e,m())&&!e.direction||!L?P:L;if("direction"in e&&e.direction&&F.pages.length){const I="backward"===e.direction,N=(I?bl:gl)(M,F,e.originalArgs);O=await A(F,N,$,I)}else{const{initialPageParam:D=M.initialPageParam}=e,q=L?.pageParams??[],z=q[0]??D,B=q.length;if(O=await A(F,z,$),T&&(O={data:O.data.pages[0]}),j)for(let H=1;H<B;H++){const W=gl(M,O.data,e.originalArgs);O=await A(O.data,W,$)}}E=O}else E=await R(e.originalArgs);return y&&!hl(w,"meta")&&E.meta&&(E.meta=await pl(y,E.meta,"metaSchema",E.meta)),h(E.data,ml({fulfilledTimeStamp:Date.now(),baseQueryMeta:E.meta}))}catch(x){let U=x;if(U instanceof Ks){let Q=d(b,"transformErrorResponse");const{rawErrorResponseSchema:V,errorResponseSchema:K}=b;let{value:G,meta:Z}=U;try{V&&!hl(w,"rawErrorResponse")&&(G=await pl(V,G,"rawErrorResponseSchema",Z)),y&&!hl(w,"meta")&&(Z=await pl(y,Z,"metaSchema",Z));let X=await Q(G,Z,e.originalArgs);return K&&!hl(w,"errorResponse")&&(X=await pl(K,X,"errorResponseSchema",Z)),a(X,ml({baseQueryMeta:Z}))}catch(_){U=_}}try{if(U instanceof dl){const J={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:k?e.queryCacheKey:void 0};b.onSchemaFailure?.(U,J),s?.(U,J);const{catchSchemaFailure:Y=l}=b;if(Y)return a(Y(U,J),ml({baseQueryMeta:U._bqMeta}))}}catch(_){U=_}throw U}};function p(e,t){const n=o.selectQueryEntry(t,e.queryCacheKey),r=o.selectConfig(t).refetchOnMountOrArgChange,i=n?.fulfilledTimeStamp,a=e.forceRefetch??(e.subscribe&&r);return!!a&&(!0===a||(Number(new Date)-Number(i))/1e3>=a)}const v=()=>fn(`${e}/executeQuery`,h,{getPendingMeta({arg:e}){const t=n[e.endpointName];return ml({startedTimeStamp:Date.now(),...al(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){const r=t(),i=o.selectQueryEntry(r,e.queryCacheKey),a=i?.fulfilledTimeStamp,s=e.originalArgs,l=i?.originalArgs,u=n[e.endpointName],c=e.direction;return!(!fl(e)&&("pending"===i?.status||!p(e,r)&&(!il(u)||!u?.forceRefetch?.({currentArg:s,previousArg:l,endpointState:i,state:r}))&&a&&!c))},dispatchConditionRejection:!0}),m=v(),g=v(),b=fn(`${e}/executeMutation`,h,{getPendingMeta:()=>ml({startedTimeStamp:Date.now()})});function y(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:m,mutationThunk:b,infiniteQueryThunk:g,prefetch:(e,t,n={})=>(r,a)=>{const o=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,l=(n=!0)=>{const r={forceRefetch:n,subscribe:!1};return i.endpoints[e].initiate(t,r)},u=i.endpoints[e].select(t)(a());if(o)r(l());else if(s){const e=u?.fulfilledTimeStamp;if(!e)return void r(l());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(l())}else r(l(!1))},updateQueryData:(e,t,n,r=!0)=>(a,o)=>{const s=i.endpoints[e].select(t)(o()),l={patches:[],inversePatches:[],undo:()=>a(i.util.patchQueryData(e,t,l.inversePatches,r))};if(s.status===$s)return l;let u;if("data"in s)if(Ee(s.data)){const[e,t,r]=Ct(s.data,n);l.patches.push(...t),l.inversePatches.push(...r),u=e}else u=n(s.data),l.patches.push({op:"replace",path:[],value:u}),l.inversePatches.push({op:"replace",path:[],value:s.data});return 0===l.patches.length||a(i.util.patchQueryData(e,t,l.patches,r)),l},upsertQueryData:(e,t,n)=>r=>r(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[cl]:()=>({data:n})})),patchQueryData:(e,t,o,s)=>(l,u)=>{const c=n[e],f=r({queryArgs:t,endpointDefinition:c,endpointName:e});if(l(i.internalActions.queryResultPatched({queryCacheKey:f,patches:o})),!s)return;const d=i.endpoints[e].select(t)(u()),h=sl(c.providesTags,d.data,void 0,t,{},a);l(i.internalActions.updateProvidedBy([{queryCacheKey:f,providedTags:h}]))},buildMatchThunkActions:function(e,t){return{matchPending:Zt(Yt(e),y(t)),matchFulfilled:Zt(nn(e),y(t)),matchRejected:Zt(en(e),y(t))}}}}({baseQuery:n,reducerPath:i,context:p,api:t,serializeQueryArgs:a,assertTagType:v,selectors:m,onSchemaFailure:f,catchSchemaFailure:d,skipSchemaValidation:h}),{reducer:M,actions:$}=Cl({context:p,queryThunk:x,mutationThunk:S,serializeQueryArgs:a,reducerPath:i,assertTagType:v,config:{refetchOnFocus:l,refetchOnReconnect:u,refetchOnMountOrArgChange:s,keepUnusedDataFor:o,reducerPath:i,invalidationBehavior:c}});Ol(t.util,{patchQueryData:C,updateQueryData:T,upsertQueryData:E,prefetch:A,resetApiState:$.resetApiState,upsertQueryEntries:$.cacheEntriesUpserted}),Ol(t.internalActions,$);const j=new WeakMap,O=e=>Bs(j,e,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:P,buildInitiateInfiniteQuery:L,buildInitiateMutation:F,getRunningMutationThunk:I,getRunningMutationsThunk:N,getRunningQueriesThunk:D,getRunningQueryThunk:q}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:a,getInternalState:o}){const s=e=>o(e)?.runningQueries,l=e=>o(e)?.runningMutations,{unsubscribeQueryResult:u,removeMutationResult:c,updateSubscriptionOptions:f}=i.internalActions;return{buildInitiateQuery:function(e,t){return d(e,t)},buildInitiateInfiniteQuery:function(e,t){return d(e,t)},buildInitiateMutation:function(e){return(t,{track:n=!0,fixedCacheKey:i}={})=>(a,o)=>{const s=r({type:"mutation",endpointName:e,originalArgs:t,track:n,fixedCacheKey:i}),u=a(s),{requestId:f,abort:d,unwrap:h}=u,p=(v=e=>({error:e}),u.unwrap().then(e=>({data:e})).catch(v));var v;const m=Object.assign(p,{arg:u.arg,requestId:f,abort:d,unwrap:h,reset:()=>{a(c({requestId:f,fixedCacheKey:i}))}}),g=l(a);return g.set(f,m),m.then(()=>{g.delete(f)}),i&&(g.set(i,m),m.then(()=>{g.get(i)===m&&g.delete(i)})),m}},getRunningQueryThunk:function(t,n){return r=>{const i=ul(a,t),o=e({queryArgs:n,endpointDefinition:i,endpointName:t});return s(r)?.get(o)}},getRunningMutationThunk:function(e,t){return e=>l(e)?.get(t)},getRunningQueriesThunk:function(){return e=>qs(s(e))},getRunningMutationsThunk:function(){return e=>qs(l(e))}};function d(r,a){const o=(l,{subscribe:c=!0,forceRefetch:d,subscriptionOptions:h,[cl]:p,...v}={})=>(m,g)=>{const b=e({queryArgs:l,endpointDefinition:a,endpointName:r});let y;const w={...v,type:tl,subscribe:c,forceRefetch:d,subscriptionOptions:h,endpointName:r,originalArgs:l,queryCacheKey:b,[cl]:p};if(il(a))y=t(w);else{const{direction:e,initialPageParam:t,refetchCachedPages:r}=v;y=n({...w,direction:e,initialPageParam:t,refetchCachedPages:r})}const k=i.endpoints[r].select(l),x=m(y),_=k(g()),{requestId:S,abort:C}=x,T=_.requestId!==S,E=s(m)?.get(b),A=()=>k(g()),R=Object.assign(p?x.then(A):T&&!E?Promise.resolve(_):Promise.all([E,x]).then(A),{arg:l,requestId:S,subscriptionOptions:h,queryCacheKey:b,abort:C,async unwrap(){const e=await R;if(e.isError)throw e.error;return e.data},refetch:e=>m(o(l,{subscribe:!1,forceRefetch:!0,...e})),unsubscribe(){c&&m(u({queryCacheKey:b,requestId:S}))},updateSubscriptionOptions(e){R.subscriptionOptions=e,m(f({endpointName:r,requestId:S,queryCacheKey:b,options:e}))}});if(!E&&!T&&!p){const e=s(m);e.set(b,R),R.then(()=>{e.delete(b)})}return R};return o}}({queryThunk:x,mutationThunk:S,infiniteQueryThunk:_,api:t,serializeQueryArgs:a,context:p,getInternalState:O});Ol(t.util,{getRunningMutationThunk:I,getRunningMutationsThunk:N,getRunningQueryThunk:q,getRunningQueriesThunk:D});const{middleware:z,actions:B}=Bl({reducerPath:i,context:p,queryThunk:x,mutationThunk:S,infiniteQueryThunk:_,api:t,assertTagType:v,selectors:m,getRunningQueryThunk:q,getInternalState:O});return Ol(t.util,B),Ol(t,{reducer:M,middleware:z}),{name:Hl,injectEndpoint(e,n){const r=t,i=r.endpoints[e]??={};il(n)&&Ol(i,{name:e,select:y(e,n),initiate:P(e,n)},R(x,e)),n.type===nl&&Ol(i,{name:e,select:k(),initiate:F(e)},R(S,e)),al(n)&&Ol(i,{name:e,select:w(e,n),initiate:L(e,n)},R(x,e))}}}});function Ul(e){return e.replace(e[0],e[0].toUpperCase())}Wl();function Ql(e){return"infinitequery"===e.type}function Vl(e,...t){return Object.assign(e,...t)}var Kl=Symbol();function Gl(e){const t=d.useRef(e),n=d.useMemo(()=>Is(t.current,e),[e]);return d.useEffect(()=>{t.current!==n&&(t.current=n)},[n]),n}function Zl(e){const t=d.useRef(e);return d.useEffect(()=>{H(t.current,e)||(t.current=e)},[e]),H(t.current,e)?t.current:e}var Xl=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),Jl=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),Yl=(()=>Xl||Jl?d.useLayoutEffect:d.useEffect)(),eu=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:Ms.pending}:e;function tu(e,...t){const n={};return t.forEach(t=>{n[t]=e[t]}),n}var nu=["data","status","isLoading","isSuccess","isError","error"];function ru({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:a,createSelector:o},serializeQueryArgs:s,context:l}){const u=a?e=>e():d.useEffect,c=e=>e.current?.unsubscribe?.(),f=l.endpointDefinitions;return{buildQueryHooks:function(r){const i=(e,t={})=>{const[n]=v(r,e,t);return g(n),d.useMemo(()=>({refetch:()=>function(e){if(!e.current)throw new Error(Zn(38));return e.current.refetch()}(n)}),[n])},a=({refetchOnReconnect:i,refetchOnFocus:a,pollingInterval:o=0,skipPollingIfUnfocused:s=!1}={})=>{const{initiate:l}=e.endpoints[r],f=n(),[h,p]=d.useState(Kl),v=d.useRef(void 0),m=Zl({refetchOnReconnect:i,refetchOnFocus:a,pollingInterval:o,skipPollingIfUnfocused:s});u(()=>{const e=v.current?.subscriptionOptions;m!==e&&v.current?.updateSubscriptionOptions(m)},[m]);const g=d.useRef(m);u(()=>{g.current=m},[m]);const b=d.useCallback(function(e,n=!1){let r;return t(()=>{c(v),v.current=r=f(l(e,{subscriptionOptions:g.current,forceRefetch:!n})),p(e)}),r},[f,l]),y=d.useCallback(()=>{v.current?.queryCacheKey&&f(e.internalActions.removeQueryResult({queryCacheKey:v.current?.queryCacheKey}))},[f]);return d.useEffect(()=>()=>{c(v)},[]),d.useEffect(()=>{h===Kl||v.current||b(h,!0)},[h,b]),d.useMemo(()=>[b,h,{reset:y}],[b,h,y])},o=m(r,h);return{useQueryState:o,useQuerySubscription:i,useLazyQuerySubscription:a,useLazyQuery(e){const[t,n,{reset:r}]=a(e),i=o(n,{...e,skip:n===Kl}),s=d.useMemo(()=>({lastArg:n}),[n]);return d.useMemo(()=>[t,{...i,reset:r},s],[t,i,r,s])},useQuery(e,t){const n=i(e,t),r=o(e,{selectFromResult:e===Tl||t?.skip?void 0:eu,...t}),a=tu(r,...nu);return d.useDebugValue(a),d.useMemo(()=>({...r,...n}),[r,n])}}},buildInfiniteQueryHooks:function(e){const n=(n,r={})=>{const[i,a,o,s]=v(e,n,r),l=d.useRef(s);u(()=>{l.current=s},[s]);const f=Zl(r.refetchCachedPages),h=d.useCallback(function(e,n){let r;return t(()=>{c(i),i.current=r=a(o(e,{subscriptionOptions:l.current,direction:n}))}),r},[i,a,o]);g(i);const p=Gl(r.skip?Tl:n),m=d.useCallback(e=>{if(!i.current)throw new Error(Zn(38));const t={refetchCachedPages:e?.refetchCachedPages??f};return i.current.refetch(t)},[i,f]);return d.useMemo(()=>({trigger:h,refetch:m,fetchNextPage:()=>h(p,"forward"),fetchPreviousPage:()=>h(p,"backward")}),[m,h,p])},r=m(e,p);return{useInfiniteQueryState:r,useInfiniteQuerySubscription:n,useInfiniteQuery(e,t){const{refetch:i,fetchNextPage:a,fetchPreviousPage:o}=n(e,t),s=r(e,{selectFromResult:e===Tl||t?.skip?void 0:eu,...t}),l=tu(s,...nu,"hasNextPage","hasPreviousPage");return d.useDebugValue(l),d.useMemo(()=>({...s,fetchNextPage:a,fetchPreviousPage:o,refetch:i}),[s,a,o,i])}}},buildMutationHook:function(i){return({selectFromResult:a,fixedCacheKey:s}={})=>{const{select:l,initiate:u}=e.endpoints[i],c=n(),[f,h]=d.useState();d.useEffect(()=>()=>{f?.arg.fixedCacheKey||f?.reset()},[f]);const p=d.useCallback(function(e){const t=c(u(e,{fixedCacheKey:s}));return h(t),t},[c,u,s]),{requestId:v}=f||{},m=d.useMemo(()=>l({fixedCacheKey:s,requestId:f?.requestId}),[s,f,l]),g=d.useMemo(()=>a?o([m],a):m,[a,m]),b=r(g,H),y=null==s?f?.arg.originalArgs:void 0,w=d.useCallback(()=>{t(()=>{f&&h(void 0),s&&c(e.internalActions.removeMutationResult({requestId:v,fixedCacheKey:s}))})},[c,s,f,v]),k=tu(b,...nu,"endpointName");d.useDebugValue(k);const x=d.useMemo(()=>({...b,originalArgs:y,reset:w}),[b,y,w]);return d.useMemo(()=>[p,x],[p,x])}},usePrefetch:function(t,r){const i=n(),a=Zl(r);return d.useCallback((n,r)=>i(e.util.prefetch(t,n,{...a,...r})),[t,i,a])}};function h(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=f[e];n!==Tl&&s({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===s({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:t?.data;void 0===r&&(r=e.data);const i=void 0!==r,a=e.isLoading,o=(!t||t.isLoading||t.isUninitialized)&&!i&&a,l=e.isSuccess||i&&(a&&!t?.isError||e.isUninitialized);return{...e,data:r,currentData:e.data,isFetching:a,isLoading:o,isSuccess:l}}function p(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=f[e];n!==Tl&&s({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===s({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:t?.data;void 0===r&&(r=e.data);const i=void 0!==r,a=e.isLoading,o=(!t||t.isLoading||t.isUninitialized)&&!i&&a,l=e.isSuccess||a&&i;return{...e,data:r,currentData:e.data,isFetching:a,isLoading:o,isSuccess:l}}function v(t,r,{refetchOnReconnect:i,refetchOnFocus:a,refetchOnMountOrArgChange:o,skip:s=!1,pollingInterval:l=0,skipPollingIfUnfocused:c=!1,...h}={}){const{initiate:p}=e.endpoints[t],v=n(),m=d.useRef(void 0);if(!m.current){const t=v(e.internalActions.internal_getRTKQSubscriptions());m.current=t}const g=Gl(s?Tl:r),b=Zl({refetchOnReconnect:i,refetchOnFocus:a,pollingInterval:l,skipPollingIfUnfocused:c}),y=Zl(h.initialPageParam),w=Zl(h.refetchCachedPages),k=d.useRef(void 0);let{queryCacheKey:x,requestId:_}=k.current||{},S=!1;x&&_&&(S=m.current.isRequestSubscribed(x,_));const C=!S&&void 0!==k.current;return u(()=>{C&&(k.current=void 0)},[C]),u(()=>{const e=k.current;if(g===Tl)return e?.unsubscribe(),void(k.current=void 0);const n=k.current?.subscriptionOptions;if(e&&e.arg===g)b!==n&&e.updateSubscriptionOptions(b);else{e?.unsubscribe();const n=v(p(g,{subscriptionOptions:b,forceRefetch:o,...Ql(f[t])?{initialPageParam:y,refetchCachedPages:w}:{}}));k.current=n}},[v,p,o,g,b,C,y,w,t]),[k,v,p,b]}function m(t,n){return(a,{skip:s=!1,selectFromResult:l}={})=>{const{select:u}=e.endpoints[t],c=Gl(s?Tl:a),f=d.useRef(void 0),h=d.useMemo(()=>o([u(c),(e,t)=>t,e=>c],n,{memoizeOptions:{resultEqualityCheck:H}}),[u,c]),p=d.useMemo(()=>l?o([h],l,{devModeChecks:{identityFunctionCheck:"never"}}):h,[h,l]),v=r(e=>p(e,f.current),H),m=i(),g=h(m.getState(),f.current);return Yl(()=>{f.current=g},[g]),v}}function g(e){d.useEffect(()=>()=>{c(e),e.current=void 0},[e])}}var iu=Symbol(),au=jl(Wl(),(({batch:e=ie,hooks:t={useDispatch:ee,useSelector:re,useStore:J},createSelector:n=Ot,unstable__sideEffectsInRender:r=!1,...i}={})=>({name:iu,init(i,{serializeQueryArgs:a},o){const s=i,{buildQueryHooks:l,buildInfiniteQueryHooks:u,buildMutationHook:c,usePrefetch:f}=ru({api:i,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:a,context:o});return Vl(s,{usePrefetch:f}),Vl(o,{batch:e}),{injectEndpoint(e,t){if("query"===t.type){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:a,useQuerySubscription:o}=l(e);Vl(s.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:a,useQuerySubscription:o}),i[`use${Ul(e)}Query`]=t,i[`useLazy${Ul(e)}Query`]=n}if(function(e){return"mutation"===e.type}(t)){const t=c(e);Vl(s.endpoints[e],{useMutation:t}),i[`use${Ul(e)}Mutation`]=t}else if(Ql(t)){const{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:r}=u(e);Vl(s.endpoints[e],{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:r}),i[`use${Ul(e)}InfiniteQuery`]=t}}}}}))());const ou=await sr(),su=gn({name:"contentApi",initialState:{uid:void 0,accounts:[],isAccount:{},account_id:ou?.accountId||null,domain:null,assets:[],privacyPolicy:"",asset:!0},reducers:{setContentApi:(e,t)=>{Object.assign(e,t.payload)},setAccounts:(e,t)=>{e.accounts=t.payload;const n=e.isAccount.account_id,r=t.payload.find(e=>e.account_id===n);if(r)e.isAccount=r;else{const n=t.payload.find(t=>t.account_id===e.account_id);if(n)return void(e.isAccount=n);e.isAccount=t.payload.find(e=>"demo"===e.group)||{}}},setAccount:(e,t)=>{e.isAccount=t.payload,or("accountId",t.payload.account_id).then()},setUID:(e,t)=>{e.uid=t.payload},signupPartner:(e,t)=>{},setEndpoint:(e,t)=>{e.endpoint=t.payload}}}),lu=au({reducerPath:"serverApi",baseQuery:function({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=Ws,paramsSerializer:r,isJsonContentType:i=Qs,jsonContentType:a="application/json",jsonReplacer:o,timeout:s,responseHandler:l,validateStatus:u,...c}={}){return async(d,h,p)=>{const{getState:v,extra:m,endpoint:g,forced:b,type:y}=h;let w,k,{url:x,headers:_=new Headers(c.headers),params:S,responseHandler:C=l??"json",validateStatus:T=u??Us,timeout:E=s,...A}="string"==typeof d?{url:d}:d,R=h.signal;E&&(k=new AbortController,h.signal.addEventListener("abort",k.abort),R=k.signal);let M={...c,signal:R,...A};_=new Headers(Vs(_)),M.headers=await t(_,{getState:v,arg:d,extra:m,endpoint:g,forced:b,type:y,extraOptions:p})||_;const $="object"==typeof(j=M.body)&&(ue(j)||Array.isArray(j)||"function"==typeof j.toJSON);var j;if(null==M.body||$||"string"==typeof M.body||M.headers.delete("content-type"),!M.headers.has("content-type")&&$&&M.headers.set("content-type",a),$&&i(M.headers)&&(M.body=JSON.stringify(M.body,o)),M.headers.has("accept")||("json"===C?M.headers.set("accept","application/json"):"text"===C&&M.headers.set("accept","text/plain, text/html, */*")),S){const e=~x.indexOf("?")?"&":"?";x+=e+(r?r(S):new URLSearchParams(Vs(S)))}x=zs(e,x);const O=new Request(x,M);w={request:new Request(x,M)};let P,L=!1,F=k&&setTimeout(()=>{L=!0,k.abort()},E);try{P=await n(O)}catch(q){return{error:{status:L?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(q)},meta:w}}finally{F&&clearTimeout(F),k?.signal.removeEventListener("abort",k.abort)}const I=P.clone();let N;w.response=I;let D="";try{let e;if(await Promise.all([f(P,C).then(e=>N=e,t=>e=t),I.text().then(e=>D=e,()=>{})]),e)throw e}catch(q){return{error:{status:"PARSING_ERROR",originalStatus:P.status,data:D,error:String(q)},meta:w}}return T(P,N)?{data:N,meta:w}:{error:{status:P.status,data:N},meta:w}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=i(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}({baseUrl:To,credentials:"include",prepareHeaders:e=>(e.set("X-Extension-Id",rr()||""),e)}),endpoints:e=>({getData:e.query({query:({endpoint:e})=>({url:e})})})}),{useGetDataQuery:uu}=lu,{signupPartner:cu,setContentApi:fu,setAccounts:du,setAccount:hu,setUID:pu,setEndpoint:vu}=su.actions;const mu=new Set(["--color-primary","-theme-accent-text-color","--theme-bg-color","--theme-border-color","--theme-button-text-color","--theme-destructive-text-color","--theme-header-bg-color","--theme-hint-color","--theme-link-color","--theme-secondary-bg-color","--theme-section-bg-color","--theme-section-header-text-color","--theme-section-separator-color","--theme-subtitle-text-color","--theme-text-color","--theme-positive-color","--theme-negative-color"]);const gu=d.createContext(null);function bu({children:e}){const t=d.useMemo(()=>function(){const e=new URLSearchParams(window.location.search).get("mode");if(!e)return{};try{const t=JSON.parse(decodeURIComponent(e));return t?.endpoint?{endpoint:String(t.endpoint),theme:null!=t.theme?String(t.theme):void 0}:{}}catch{return{}}}(),[]),n=ee(),r=re(e=>Boolean(e.api.uid)),i=re(e=>Boolean(e.api.asset)),[a,o]=d.useState(null);d.useLayoutEffect(()=>{t?.theme&&function(e){const t=e.split(";").map(e=>e.trim()).filter(Boolean);for(const n of t){const[e,t]=n.split(":").map(e=>e.trim());e&&null!=t&&mu.has(e)&&document.documentElement.style.setProperty(e,t)}}(t.theme)},[t?.theme]),d.useEffect(()=>{if(!t?.endpoint)return;n(vu(t.endpoint));const e={endpoint:t.endpoint};o(e)},[t?.endpoint]);const l=uu(null!==a?a:Tl),u=d.useMemo(()=>({args:a,ready:!!a,data:l.data,isLoading:l.isLoading,isFetching:l.isFetching,error:l.error,refetch:l.refetch,isAuthenticated:r,isActivated:i}),[a,l.data,l.isLoading,l.isFetching,l.error,l.refetch,r,i]);return s.jsx(gu.Provider,{value:u,children:e})}function yu(){const e=d.useContext(gu);if(!e)throw new Error("useServerData must be used within <ServerDataProvider>");return e}function wu(){const e=ns(),t=re(e=>e.ws),{isActivated:n}=yu();return s.jsxs("div",{className:"bg-transparent border rounded-lg border-[var(--theme-border-color)] p-3",children:[s.jsxs("div",{className:"flex font-bold text-base",children:[s.jsx("div",{children:n&&t.status===Xn.CONNECT?s.jsx(ku,{}):s.jsx(xu,{})}),s.jsx("div",{className:"leading-[1.6] ms-3",children:n?e.t(`status_${t.status}`):e.t("ssa")})]}),n&&t.status===Xn.CONNECT&&s.jsx("div",{className:"text-[.8125rem]",children:e.t("ssd")})]})}const ku=()=>s.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx(_u,{className:"IOutaxLF",fillRule:"evenodd",clipRule:"evenodd",d:"M6.45185 6.3765C6.83678 6.77253 6.82779 7.40563 6.43176 7.79057C5.04368 9.13976 4.19922 10.9745 4.19922 12.9898C4.19922 15.005 5.04368 16.8398 6.43176 18.189C6.82779 18.5739 6.83678 19.207 6.45185 19.603C6.06691 19.9991 5.43381 20.0081 5.03777 19.6231C3.28898 17.9233 2.19922 15.5815 2.19922 12.9898C2.19922 10.398 3.28898 8.05621 5.03777 6.35641C5.43381 5.97147 6.06691 5.98046 6.45185 6.3765ZM18.0609 6.3765C18.4458 5.98046 19.0789 5.97147 19.475 6.35641C21.2238 8.05621 22.3135 10.398 22.3135 12.9898C22.3135 15.5815 21.2238 17.9233 19.475 19.6231C19.0789 20.0081 18.4458 19.9991 18.0609 19.603C17.676 19.207 17.685 18.5739 18.081 18.189C19.4691 16.8398 20.3135 15.005 20.3135 12.9898C20.3135 10.9745 19.4691 9.13976 18.081 7.79057C17.685 7.40563 17.676 6.77253 18.0609 6.3765Z"}),s.jsx(Su,{className:"EIk4rjHJ",fillRule:"evenodd",clipRule:"evenodd",d:"M9.08552 9.23879C9.43664 9.66509 9.37569 10.2953 8.94939 10.6464C8.18214 11.2784 7.75604 12.1127 7.75604 12.9897C7.75604 13.8667 8.18214 14.7011 8.94939 15.333C9.37569 15.6841 9.43664 16.3144 9.08552 16.7407C8.73441 17.167 8.10418 17.2279 7.67788 16.8768C6.52269 15.9253 5.75604 14.5532 5.75604 12.9897C5.75604 11.4262 6.52269 10.0541 7.67788 9.10265C8.10418 8.75153 8.73441 8.81248 9.08552 9.23879ZM15.4272 9.23879C15.7784 8.81248 16.4086 8.75153 16.8349 9.10265C17.9901 10.0541 18.7567 11.4262 18.7567 12.9897C18.7567 14.5532 17.9901 15.9253 16.8349 16.8768C16.4086 17.2279 15.7784 17.167 15.4272 16.7407C15.0761 16.3144 15.1371 15.6841 15.5634 15.333C16.3306 14.7011 16.7567 13.8667 16.7567 12.9897C16.7567 12.1127 16.3306 11.2784 15.5634 10.6464C15.1371 10.2953 15.0761 9.66509 15.4272 9.23879Z"}),s.jsx("path",{d:"M14.1991 12.9897C14.1991 14.0943 13.3037 14.9897 12.1991 14.9897C11.0945 14.9897 10.1991 14.0943 10.1991 12.9897C10.1991 11.8852 11.0945 10.9897 12.1991 10.9897C13.3037 10.9897 14.1991 11.8852 14.1991 12.9897Z"})]}),xu=()=>s.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.45185 6.3765C6.83678 6.77253 6.82779 7.40563 6.43176 7.79057C5.04368 9.13976 4.19922 10.9745 4.19922 12.9898C4.19922 15.005 5.04368 16.8398 6.43176 18.189C6.82779 18.5739 6.83678 19.207 6.45185 19.603C6.06691 19.9991 5.43381 20.0081 5.03777 19.6231C3.28898 17.9233 2.19922 15.5815 2.19922 12.9898C2.19922 10.398 3.28898 8.05621 5.03777 6.35641C5.43381 5.97147 6.06691 5.98046 6.45185 6.3765ZM18.0609 6.3765C18.4458 5.98046 19.0789 5.97147 19.475 6.35641C21.2238 8.05621 22.3135 10.398 22.3135 12.9898C22.3135 15.5815 21.2238 17.9233 19.475 19.6231C19.0789 20.0081 18.4458 19.9991 18.0609 19.603C17.676 19.207 17.685 18.5739 18.081 18.189C19.4691 16.8398 20.3135 15.005 20.3135 12.9898C20.3135 10.9745 19.4691 9.13976 18.081 7.79057C17.685 7.40563 17.676 6.77253 18.0609 6.3765Z"}),s.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.08552 9.23879C9.43664 9.66509 9.37569 10.2953 8.94939 10.6464C8.18214 11.2784 7.75604 12.1127 7.75604 12.9897C7.75604 13.8667 8.18214 14.7011 8.94939 15.333C9.37569 15.6841 9.43664 16.3144 9.08552 16.7407C8.73441 17.167 8.10418 17.2279 7.67788 16.8768C6.52269 15.9253 5.75604 14.5532 5.75604 12.9897C5.75604 11.4262 6.52269 10.0541 7.67788 9.10265C8.10418 8.75153 8.73441 8.81248 9.08552 9.23879ZM15.4272 9.23879C15.7784 8.81248 16.4086 8.75153 16.8349 9.10265C17.9901 10.0541 18.7567 11.4262 18.7567 12.9897C18.7567 14.5532 17.9901 15.9253 16.8349 16.8768C16.4086 17.2279 15.7784 17.167 15.4272 16.7407C15.0761 16.3144 15.1371 15.6841 15.5634 15.333C16.3306 14.7011 16.7567 13.8667 16.7567 12.9897C16.7567 12.1127 16.3306 11.2784 15.5634 10.6464C15.1371 10.2953 15.0761 9.66509 15.4272 9.23879Z"}),s.jsx("circle",{cx:"12.2",cy:"12.99",r:"2"}),s.jsx("line",{x1:"4",y1:"21",x2:"21",y2:"4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),s.jsx("line",{x1:"7",y1:"21",x2:"24",y2:"4",stroke:"var(--theme-bg-color)",strokeWidth:"2",strokeLinecap:"round"})]}),_u=fo.path`
284
284
  animation: IOutaxLF 1.21s ease-out infinite;
285
285
 
286
286
  @keyframes IOutaxLF {
@@ -391,7 +391,7 @@ function e(e){return e&&e.i&&Object.prototype.hasOwnProperty.call(e,"default")?e
391
391
  left: auto;
392
392
  right: ${({$checked:e})=>e?"1.2rem":"0.05rem"};
393
393
  }
394
- `;function Ku({value:e,onChange:t,checked:n,onChecked:r,disabled:i,label:a,symbolStart:o,symbolEnd:l,tooltipText:u,min:c=0,max:f=1/0,step:d=1,className:p,allowFloat:v}){const[m,g]=h.useState(!n),[b,y]=h.useState(!1);return s.jsx("div",{children:s.jsx(zu,{value:e,onChange:e=>t(e),disabled:m,label:a,symbolStart:o,symbolEnd:l,tooltipText:u,min:c,max:f,step:d,className:p,focus:b,allowFloat:v,children:s.jsx(Uu,{className:"border-s border-[var(--theme-border-color)] me-2",checked:n,onChange:e=>{r(e),g(!e),y(e)},disabled:i})})})}function Gu({className:e}){const t=ns(),n=re(e=>e.ui),r=re(e=>e.ws),i=ee(),{isAuthenticated:a,error:o}=yu(),[l,u]=d.useState(!1);d.useEffect(()=>{!a||o||n.runBtnDisabled||r.status===Xn.ERROR?(i(dr(!1)),u(!0)):u(!1)},[a,o,n.runBtnDisabled,r.status]);const c=n.runBtnDisabled?"[--color-primary:var(--theme-hint-color)]":""+(n.run?"[--color-primary:var(--theme-negative-color)]":"[--color-primary:var(--theme-positive-color)]");return s.jsx("div",{children:s.jsx(xs,{className:c+" "+e||"",onClick:()=>{n.run?i(dr(!1)):i(dr(!0))},disabled:l,children:n.run?t.t("stop_trading"):t.t("start_trading")})})}function Zu({account_id:e,onChange:t,disabled:n=!1,placeholder:r="Account...",options:i,className:a}){const o=ns(),[l,u]=h.useState(!1),[c,f]=h.useState(e),d=h.useRef(null);h.useEffect(()=>{f(e)},[e]),h.useEffect(()=>{const e=e=>{d.current?.contains(e.target)||u(!1)},t=e=>{"Escape"===e.key&&u(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[]);const p=i.find(e=>e.account_id===c)||null;return s.jsxs("div",{className:`${a||""} relative`,ref:d,children:[s.jsx(jc,{$disabled:n,children:s.jsxs("div",{className:"flex items-center bg-transparent cursor-pointer transition-colors w-50 h-[var(--input-height)] "+(n?"opacity-50 cursor-not-allowed":""),onClick:()=>{n||u(e=>!e)},children:[s.jsxs("div",{children:[s.jsx("label",{className:"uppercase font-[900] text-xs "+(p&&"demo"===p.group?"text-amber-600":"text-lime-500"),children:p?p.name:r}),s.jsx("div",{className:"pe-3 text-base text-[var(--theme-text-color)] select-none",children:p?`${p.symbol} ${Xu(p.balance,o.lang)}`:r})]}),s.jsx(Oc,{size:24,open:l})]})}),l&&!n&&s.jsx("div",{className:"absolute mt-1 z-20 border border-[var(--theme-border-color)] rounded-lg bg-[var(--theme-bg-color)] shadow-xs shadow-[color:var(--theme-border-color)] overflow-hidden animate-fadeIn",children:i.map(e=>s.jsx("div",{onClick:()=>(e=>{n||(t(e),f(e.account_id),u(!1))})(e),children:s.jsx(Ju,{opt:e,i18n:o,checked:c===e.account_id})},e.account_id))})]})}function Xu(e,t){return e.toLocaleString(t||"en",{minimumFractionDigits:2,maximumFractionDigits:2})}const Ju=({opt:e,checked:t,i18n:n})=>{const r=t?"bg-[var(--color-primary)] bg-[image:var(--btn-dropdown)] bg-no-repeat bg-[length:.75em_auto] bg-center":"bg-[var(--theme-bg-color)] border border-[var(--theme-border-color)]";return s.jsx("div",{className:"text-[var(--theme-text-color)] px-3 py-2 cursor-pointer hover:bg-[var(--theme-secondary-bg-color)] transition-colors",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:`${r} rounded-4xl w-[1.3rem] h-[1.3rem] me-2`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[14px] text-[var(--theme-subtitle-text-color)]",children:e.name}),s.jsxs("div",{className:" text-base",children:[e.symbol," ",Xu(e.balance,n.lang)]})]})]})})};function Yu(){const e=ns(),t=re(e=>e.ui),n=re(e=>e.api),r=n.isAccount,i=r.balance||0,a=r.deals&&r.deals.min||1,o=r.deals&&r.deals.max||2e3,l=r.symbol||"Q",u=ee(),c=d.useRef(null);return d.useEffect(()=>{const e=c.current;if(!e)return;const t=localStorage.getItem("scroll");t&&e.scrollTo(0,Number(t));const n=()=>{localStorage.setItem("scroll",e.scrollTop.toString())};return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}},[]),s.jsxs("div",{className:"contents",children:[s.jsx(Eu,{className:"me-1",ref:c,children:s.jsxs("div",{className:"m-3",children:[s.jsx(tc,{className:"mt-0!",children:e.t("setting")}),s.jsxs(nc,{children:[s.jsx(ec,{label:e.t("account"),children:s.jsx(Zu,{account_id:r.account_id||null,onChange:e=>u(du(e)),options:n.accounts,disabled:t.run})}),s.jsx(ec,{label:e.t("amount"),children:s.jsx(zu,{value:t.amount,onChange:e=>u(kr(e)),symbolStart:l,min:a,max:o,tooltipText:e.tooltip("amount"),disabled:t.run})}),s.jsx(ec,{label:e.t("duration"),children:s.jsx(Wu,{value:t.duration,onChange:e=>u(xr(e)),options:[{label:"1 minute",value:60},{label:"2 minute",value:120},{label:"3 minute",value:180},{label:"4 minute",value:240},{label:"5 minute",value:300}],tooltipText:e.tooltip("duration"),disabled:t.run})}),s.jsx(ec,{label:e.t("max_trades"),children:s.jsx(zu,{value:t.maxTrades,onChange:e=>u(Sr(e)),max:10,min:1,tooltipText:e.tooltip("max_trades"),disabled:t.run})}),s.jsx(ec,{label:e.t("min_payout"),children:s.jsx(zu,{value:t.minPayout,onChange:e=>u(Cr(e)),symbolStart:"%",max:100,min:1,tooltipText:e.tooltip("min_payout"),disabled:t.run})})]}),s.jsx(tc,{children:e.t("money_manage")}),s.jsxs(nc,{children:[s.jsx(ec,{label:e.t("increase_win"),children:s.jsx(Ku,{value:t.increaseWin,onChange:e=>u(Tr(e)),checked:t.isIncreaseWin,onChecked:e=>u(Ar(e)),symbolStart:"x",max:5,min:1,allowFloat:!0,tooltipText:e.tooltip("increase_win"),disabled:t.run})}),s.jsx(ec,{label:e.t("increase_loss"),children:s.jsx(Ku,{value:t.increaseLoss,onChange:e=>u(Er(e)),checked:t.isIncreaseLoss,onChecked:e=>u(Rr(e)),symbolStart:"x",max:5,min:1,allowFloat:!0,tooltipText:e.tooltip("increase_loss"),disabled:t.run})})]}),s.jsx(tc,{children:e.t("risk_manage")}),s.jsxs(nc,{children:[s.jsx(ec,{label:e.t("tp"),children:s.jsx(Ku,{value:t.tp,onChange:e=>u(Mr(e)),checked:t.isTp,onChecked:e=>{e&&u(Mr(rc("tp",i,a))),u($r(e))},symbolStart:l,max:1e6,min:1,tooltipText:e.tooltip("tp"),disabled:t.run})}),s.jsx(ec,{label:e.t("sl"),children:s.jsx(Ku,{value:t.sl,onChange:e=>u(jr(e)),checked:t.isSl,onChecked:e=>{e&&u(jr(rc("sl",i,a))),u(Or(e))},symbolStart:l,max:1e6,min:1,tooltipText:e.tooltip("sl"),disabled:t.run})})]})]})}),s.jsx("div",{className:"m-3 flex justify-center",children:s.jsx(Gu,{})})]})}const ec=({label:e,children:t})=>s.jsxs("div",{className:"flex justify-between mt-1.5 items-center",children:[s.jsx("div",{className:"text-base text-[var(--theme-subtitle-text-color)] whitespace-nowrap overflow-hidden text-ellipsis",children:e}),s.jsx(gs,{className:"translate-y-3"}),s.jsx("div",{className:"max-w-[200px] w-[200px]",children:t})]}),tc=fo.div`
394
+ `;function Ku({value:e,onChange:t,checked:n,onChecked:r,disabled:i,label:a,symbolStart:o,symbolEnd:l,tooltipText:u,min:c=0,max:f=1/0,step:d=1,className:p,allowFloat:v}){const[m,g]=h.useState(!n),[b,y]=h.useState(!1);return s.jsx("div",{children:s.jsx(zu,{value:e,onChange:e=>t(e),disabled:m,label:a,symbolStart:o,symbolEnd:l,tooltipText:u,min:c,max:f,step:d,className:p,focus:b,allowFloat:v,children:s.jsx(Uu,{className:"border-s border-[var(--theme-border-color)] me-2",checked:n,onChange:e=>{r(e),g(!e),y(e)},disabled:i})})})}function Gu({className:e}){const t=ns(),n=re(e=>e.ui),r=re(e=>e.ws),i=ee(),{isAuthenticated:a,error:o}=yu(),[l,u]=d.useState(!1);d.useEffect(()=>{!a||o||n.runBtnDisabled||r.status===Xn.ERROR?(i(dr(!1)),u(!0)):u(!1)},[a,o,n.runBtnDisabled,r.status]);const c=n.runBtnDisabled?"[--color-primary:var(--theme-hint-color)]":""+(n.run?"[--color-primary:var(--theme-negative-color)]":"[--color-primary:var(--theme-positive-color)]");return s.jsx("div",{children:s.jsx(xs,{className:c+" "+e||"",onClick:()=>{n.run?i(dr(!1)):i(dr(!0))},disabled:l,children:n.run?t.t("stop_trading"):t.t("start_trading")})})}function Zu({account_id:e,onChange:t,disabled:n=!1,placeholder:r="Account...",options:i,className:a}){const o=ns(),[l,u]=h.useState(!1),[c,f]=h.useState(e),d=h.useRef(null);h.useEffect(()=>{f(e)},[e]),h.useEffect(()=>{const e=e=>{d.current?.contains(e.target)||u(!1)},t=e=>{"Escape"===e.key&&u(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[]);const p=i.find(e=>e.account_id===c)||null;return s.jsxs("div",{className:`${a||""} relative`,ref:d,children:[s.jsx(jc,{$disabled:n,children:s.jsxs("div",{className:"flex items-center bg-transparent cursor-pointer transition-colors w-50 h-[var(--input-height)] "+(n?"opacity-50 cursor-not-allowed":""),onClick:()=>{n||u(e=>!e)},children:[s.jsxs("div",{children:[s.jsx("label",{className:"uppercase font-[900] text-xs "+(p&&"demo"===p.group?"text-amber-600":"text-lime-500"),children:p?p.name:r}),s.jsx("div",{className:"pe-3 text-base text-[var(--theme-text-color)] select-none",children:p?`${p.symbol} ${Xu(p.balance,o.lang)}`:r})]}),s.jsx(Oc,{size:24,open:l})]})}),l&&!n&&s.jsx("div",{className:"absolute mt-1 z-20 border border-[var(--theme-border-color)] rounded-lg bg-[var(--theme-bg-color)] shadow-xs shadow-[color:var(--theme-border-color)] overflow-hidden animate-fadeIn",children:i.map(e=>s.jsx("div",{onClick:()=>(e=>{n||(t(e),f(e.account_id),u(!1))})(e),children:s.jsx(Ju,{opt:e,i18n:o,checked:c===e.account_id})},e.account_id))})]})}function Xu(e,t){return e.toLocaleString(t||"en",{minimumFractionDigits:2,maximumFractionDigits:2})}const Ju=({opt:e,checked:t,i18n:n})=>{const r=t?"bg-[var(--color-primary)] bg-[image:var(--btn-dropdown)] bg-no-repeat bg-[length:.75em_auto] bg-center":"bg-[var(--theme-bg-color)] border border-[var(--theme-border-color)]";return s.jsx("div",{className:"text-[var(--theme-text-color)] px-3 py-2 cursor-pointer hover:bg-[var(--theme-secondary-bg-color)] transition-colors",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:`${r} rounded-4xl w-[1.3rem] h-[1.3rem] me-2`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[14px] text-[var(--theme-subtitle-text-color)]",children:e.name}),s.jsxs("div",{className:" text-base",children:[e.symbol," ",Xu(e.balance,n.lang)]})]})]})})};function Yu(){const e=ns(),t=re(e=>e.ui),n=re(e=>e.api),r=n.isAccount,i=r.balance||0,a=r.deals&&r.deals.min||1,o=r.deals&&r.deals.max||2e3,l=r.symbol||"Q",u=ee(),c=d.useRef(null);return d.useEffect(()=>{const e=c.current;if(!e)return;const t=localStorage.getItem("scroll");t&&e.scrollTo(0,Number(t));const n=()=>{localStorage.setItem("scroll",e.scrollTop.toString())};return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}},[]),s.jsxs("div",{className:"contents",children:[s.jsx(Eu,{className:"me-1",ref:c,children:s.jsxs("div",{className:"m-3",children:[s.jsx(tc,{className:"mt-0!",children:e.t("setting")}),s.jsxs(nc,{children:[s.jsx(ec,{label:e.t("account"),children:s.jsx(Zu,{account_id:r.account_id||null,onChange:e=>u(hu(e)),options:n.accounts,disabled:t.run})}),s.jsx(ec,{label:e.t("amount"),children:s.jsx(zu,{value:t.amount,onChange:e=>u(kr(e)),symbolStart:l,min:a,max:o,tooltipText:e.tooltip("amount"),disabled:t.run})}),s.jsx(ec,{label:e.t("duration"),children:s.jsx(Wu,{value:t.duration,onChange:e=>u(xr(e)),options:[{label:"1 minute",value:60},{label:"2 minute",value:120},{label:"3 minute",value:180},{label:"4 minute",value:240},{label:"5 minute",value:300}],tooltipText:e.tooltip("duration"),disabled:t.run})}),s.jsx(ec,{label:e.t("max_trades"),children:s.jsx(zu,{value:t.maxTrades,onChange:e=>u(Sr(e)),max:10,min:1,tooltipText:e.tooltip("max_trades"),disabled:t.run})}),s.jsx(ec,{label:e.t("min_payout"),children:s.jsx(zu,{value:t.minPayout,onChange:e=>u(Cr(e)),symbolStart:"%",max:100,min:1,tooltipText:e.tooltip("min_payout"),disabled:t.run})})]}),s.jsx(tc,{children:e.t("money_manage")}),s.jsxs(nc,{children:[s.jsx(ec,{label:e.t("increase_win"),children:s.jsx(Ku,{value:t.increaseWin,onChange:e=>u(Tr(e)),checked:t.isIncreaseWin,onChecked:e=>u(Ar(e)),symbolStart:"x",max:5,min:1,allowFloat:!0,tooltipText:e.tooltip("increase_win"),disabled:t.run})}),s.jsx(ec,{label:e.t("increase_loss"),children:s.jsx(Ku,{value:t.increaseLoss,onChange:e=>u(Er(e)),checked:t.isIncreaseLoss,onChecked:e=>u(Rr(e)),symbolStart:"x",max:5,min:1,allowFloat:!0,tooltipText:e.tooltip("increase_loss"),disabled:t.run})})]}),s.jsx(tc,{children:e.t("risk_manage")}),s.jsxs(nc,{children:[s.jsx(ec,{label:e.t("tp"),children:s.jsx(Ku,{value:t.tp,onChange:e=>u(Mr(e)),checked:t.isTp,onChecked:e=>{e&&u(Mr(rc("tp",i,a))),u($r(e))},symbolStart:l,max:1e6,min:1,tooltipText:e.tooltip("tp"),disabled:t.run})}),s.jsx(ec,{label:e.t("sl"),children:s.jsx(Ku,{value:t.sl,onChange:e=>u(jr(e)),checked:t.isSl,onChecked:e=>{e&&u(jr(rc("sl",i,a))),u(Or(e))},symbolStart:l,max:1e6,min:1,tooltipText:e.tooltip("sl"),disabled:t.run})})]})]})}),s.jsx("div",{className:"m-3 flex justify-center",children:s.jsx(Gu,{})})]})}const ec=({label:e,children:t})=>s.jsxs("div",{className:"flex justify-between mt-1.5 items-center",children:[s.jsx("div",{className:"text-base text-[var(--theme-subtitle-text-color)] whitespace-nowrap overflow-hidden text-ellipsis",children:e}),s.jsx(gs,{className:"translate-y-3"}),s.jsx("div",{className:"max-w-[200px] w-[200px]",children:t})]}),tc=fo.div`
395
395
  color: var(--theme-text-color);
396
396
  font-size: 1.1rem;
397
397
  margin-top: 1.5rem;
@@ -430,7 +430,7 @@ function e(e){return e&&e.i&&Object.prototype.hasOwnProperty.call(e,"default")?e
430
430
  > div {
431
431
  overflow: hidden;
432
432
  }
433
- `,bc=[{name:"Trading Signals",component:s.jsx(Cu,{}),type:"tr_sign"},{name:"Auto Trading",component:s.jsx(Yu,{}),type:"aut_tr"},{name:"History",component:s.jsx(lc,{}),type:"history"}];function yc(){const e=ee(),t=re(e=>e.ui),n=re(e=>e.ui.alert),r=ns(),{isAuthenticated:i,data:a,error:o,isActivated:l}=yu(),u=a?{text:r.t("btn_auth"),click:()=>{e(pu(a))}}:void 0,c=(e,t,n)=>s.jsx(mc,{type:"info",title:e,text:t,notice:n,onClickBtn:u});return s.jsx(wc,{children:s.jsxs("div",{className:"flex flex-col w-full overflow-y-auto",children:[!o&&(i?l?null:c(r.t("no_activated_title"),r.t("no_activated_text"),r.t("no_activated_notice")):c(r.t("no_auth_title"),r.t("no_auth_text"),r.t("no_auth_notice"))),n&&s.jsx(mc,{type:n.type,text:n.text}),bc[t.tabIndex].component]})})}const wc=fo.div`
433
+ `,bc=[{name:"Trading Signals",component:s.jsx(Cu,{}),type:"tr_sign"},{name:"Auto Trading",component:s.jsx(Yu,{}),type:"aut_tr"},{name:"History",component:s.jsx(lc,{}),type:"history"}];function yc(){const e=ee(),t=re(e=>e.ui),n=re(e=>e.ui.alert),r=ns(),{isAuthenticated:i,data:a,error:o,isActivated:l}=yu(),u=a?{text:r.t("btn_auth"),click:()=>{e(cu(a))}}:void 0,c=(e,t,n)=>s.jsx(mc,{type:"info",title:e,text:t,notice:n,onClickBtn:u});return s.jsx(wc,{children:s.jsxs("div",{className:"flex flex-col w-full overflow-y-auto",children:[!o&&(i?l?null:c(r.t("no_activated_title"),r.t("no_activated_text"),r.t("no_activated_notice")):c(r.t("no_auth_title"),r.t("no_auth_text"),r.t("no_auth_notice"))),n&&s.jsx(mc,{type:n.type,text:n.text}),bc[t.tabIndex].component]})})}const wc=fo.div`
434
434
  width: 100%;
435
435
  color: #fff;
436
436
  flex: 1 1 auto;
@@ -598,4 +598,4 @@ function e(e){return e&&e.i&&Object.prototype.hasOwnProperty.call(e,"default")?e
598
598
  background: rgba(0, 0, 0, 0);
599
599
  backdrop-filter: blur(0rem);
600
600
  }
601
- `;function qc(){const e=ee(),{data:t}=yu();return d.useEffect(()=>{t&&e(mr(t))},[t]),s.jsx(Lc,{})}const zc={status:Xn.NOT_CONNECT,signals:[],candles:{}},Bc=gn({name:"websocket",initialState:zc,reducers:{wsStatus:(e,t)=>{e.status=t.payload},pushSignal:(e,t)=>{e.signals.unshift(t.payload),e.signals.splice(30)},setSignalsHistory:(e,t)=>{e.signals=[...t.payload]},setCandles:(e,t)=>{e.candles=t.payload}}}),{wsStatus:Hc,pushSignal:Wc,setSignalsHistory:Uc,setCandles:Qc}=Bc.actions;var Vc,Kc={exports:{}};var Gc=function(){if(Vc)return Kc.exports;Vc=1;var e,t="object"==typeof Reflect?Reflect:null,n=t&&"function"==typeof t.apply?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}Kc.exports=i,Kc.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}p(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&p(e,"error",t,n)}(e,i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,l;if(o(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),l=a[t]),void 0===l)l=a[t]=n,++e._eventsCount;else if("function"==typeof l?l=a[t]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),(i=s(e))>0&&l.length>i&&!l.warned){l.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=l.length,console&&console.warn}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function p(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,c=h(l,u);for(r=0;r<u;++r)n(c[r],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,c(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,c(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},Kc.exports}();const Zc=e(Gc);const Xc=new class extends Zc{constructor(){super(),this._permit=!0,window.addEventListener("message",this._handleIframeMessage.bind(this),!1)}set lock(e){this._permit=e}j(e,t){try{const n=rr();n&&window.parent&&window.parent.postMessage({id:n,event:e,data:t},"*")}catch(n){}}_handleIframeMessage(e){try{if(!this._permit)return;const t=e.data;"object"==typeof t&&"id"in t&&t.id===rr()&&"event"in t&&"data"in t&&this.emit(t.event,t.data)}catch(t){}}};const Jc=((e={})=>{const t=new Map,n=new Map,{extra:r,onError:i=Gn}=e;En(i);const a=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Wn(e)}))(Hn(t,e)??Bn(e));Fn(a,{withTypes:()=>a});const o=e=>{const n=Hn(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Wn(n)),!!n};Fn(o,{withTypes:()=>o});const s=async(e,o,s,l)=>{const u=new AbortController,c=qn(a,u.signal),f=[];try{e.pending.add(u),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(o,Fn({},s,{getOriginalState:l,condition:(e,t)=>c(e,t).then(Boolean),take:c,delay:Ln(u.signal),pause:Pn(u.signal),extra:r,signal:u.signal,fork:Dn(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&($n(e,Sn),n.delete(e))})},cancel:()=>{$n(u,Sn),e.pending.delete(u)},throwIfCancelled:()=>{jn(u.signal)}})))}catch(d){d instanceof Tn||Un(i,d,{raisedBy:"effect"})}finally{await Promise.all(f),$n(u,Cn),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(u)}},l=((e,t)=>()=>{for(const e of t.keys())Wn(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!he(r))return n(r);if(Qn.match(r))return a(r.payload);if(Vn.match(r))return void l();if(Kn.match(r))return o(r.payload);let u=e.getState();const c=()=>{if(u===In)throw new Error(Zn(23));return u};let f;try{if(f=n(r),t.size>0){const n=e.getState(),a=Array.from(t.values());for(const t of a){let a=!1;try{a=t.predicate(r,n,u)}catch(d){a=!1,Un(i,d,{raisedBy:"predicate"})}a&&s(t,r,e,c)}}}finally{u=In}return f},startListening:a,stopListening:o,clearListeners:l}})();const Yc=new class{constructor(){}O(e,t){const n=e.api.assets.find(e=>e.symbol===t.symbol);if(!n)return!1;const r=e.ui.duration||60*t.duration;if(!n.duration.length)return!1;const i=Math.min(...n.duration),a=Math.max(...n.duration);if(r<i||r>a)return!1;if(!n.active)return!1;if(n.payout<e.ui.minPayout)return!1;return!(e.order.orders.filter(e=>"number"!=typeof e.profit).length>=e.ui.maxTrades)}P(e,t){const n=e.order.orders.filter(e=>"profit"in e)[0],r=e.ui,i=this.F;let a=r.amount;if(n){const e=n.profit;e>0&&r.isIncreaseWin?(a="loss"===i?r.amount:Math.floor(n.amount*r.increaseWin),this.F="win"):e<0&&r.isIncreaseLoss?(a="win"===i?r.amount:Math.floor(n.amount*r.increaseLoss),this.F="loss"):this.F=void 0}return a}I(e,t){const n=e.ui,r=e.api;return r.isAccount.balance&&n.isTp&&n.tp<=r.isAccount.balance&&Td.dispatch(vr({type:"warning",text:is(n.localCode||"en","tp_err")})),!0}N(e,t){const n=Td.getState(),r=n.api;if(!n.ui.run||!r.isAccount.account_id)return;if(!this.O(n,e))return;const i=this.P(n,e);t({account_id:r.isAccount.account_id,amount:i,asset:e.symbol,dir:e.dir,duration:n.ui.duration||60*e.duration})}};Jc.startListening({actionCreator:dr,effect:e=>{if(e.payload){const e=Td.getState(),t=e.ui,n=e.api;if(!n.isAccount||!n.isAccount?.deals||void 0===n.isAccount?.balance||!n.isAccount?.symbol)return void Td.dispatch(dr(!1));const r=n.isAccount.balance,i=n.isAccount.deals.min,a=n.isAccount.deals.max,o=n.isAccount.symbol;if(t.amount<i)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","check_minAmount")})),void Td.dispatch(dr(!1));if(t.amount>a)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","check_maxAmount")})),void Td.dispatch(dr(!1));if(0===r||r<i)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","no_balance",[o.concat(String(r))])})),void Td.dispatch(dr(!1));if(t.amount>r)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","insufficient_balance",[o.concat(String(t.amount))])})),void Td.dispatch(dr(!1));if(t.isTp&&t.tp<=r)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","tp_err")})),void Td.dispatch(dr(!1));if(t.isSl&&t.sl>=r)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","sl_err")})),void Td.dispatch(dr(!1));Td.dispatch(vr());if(e.order.orders.filter(e=>"number"!=typeof e.profit).length>0)return;const s=e.ws.signals.find(e=>e.closeTimestamp-Math.floor(Date.now()/1e3)>0);s&&Yc.N(s,e=>{Xc.j("26",e)})}}}),Jc.startListening({actionCreator:hr,effect:e=>{Td.getState()}}),Jc.startListening({actionCreator:gr,effect:e=>{Xc.j("23",e.payload)}}),Jc.startListening({actionCreator:br,effect:e=>{Xc.j("22",e.payload)}}),Jc.startListening({actionCreator:yr,effect:(e,t)=>{e.payload&&t.dispatch(dr(!1))}}),Jc.startListening({actionCreator:mr,effect:(e,t)=>{e.payload&&Xc.j("24",e.payload)}});const ef=Object.create(null);ef.open="0",ef.close="1",ef.ping="2",ef.pong="3",ef.message="4",ef.upgrade="5",ef.noop="6";const tf=Object.create(null);Object.keys(ef).forEach(e=>{tf[ef[e]]=e});const nf={type:"error",data:"parser error"},rf="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),af="function"==typeof ArrayBuffer,of=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sf=({type:e,data:t},n,r)=>rf&&t instanceof Blob?n?r(t):lf(t,r):af&&(t instanceof ArrayBuffer||of(t))?n?r(t):lf(new Blob([t]),r):r(ef[e]+(t||"")),lf=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function uf(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cf;const ff="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",df="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Md=0;Md<64;Md++)df[ff.charCodeAt(Md)]=Md;const hf="function"==typeof ArrayBuffer,pf=(e,t)=>{if("string"!=typeof e)return{type:"message",data:mf(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:vf(e.substring(1),t)};return tf[n]?e.length>1?{type:tf[n],data:e.substring(1)}:{type:tf[n]}:nf},vf=(e,t)=>{if(hf){const n=(e=>{let t,n,r,i,a,o=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);const u=new ArrayBuffer(o),c=new Uint8Array(u);for(t=0;t<s;t+=4)n=df[e.charCodeAt(t)],r=df[e.charCodeAt(t+1)],i=df[e.charCodeAt(t+2)],a=df[e.charCodeAt(t+3)],c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|i>>2,c[l++]=(3&i)<<6|63&a;return u})(e);return mf(n,t)}return{base64:!0,data:e}},mf=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,gf=String.fromCharCode(30);function bf(){return new TransformStream({transform(e,t){!function(e,t){rf&&e.data instanceof Blob?e.data.arrayBuffer().then(uf).then(t):af&&(e.data instanceof ArrayBuffer||of(e.data))?t(uf(e.data)):sf(e,!1,e=>{cf||(cf=new TextEncoder),t(cf.encode(e))})}(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);const e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let yf;function wf(e){return e.reduce((e,t)=>e+t.length,0)}function kf(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function xf(e){if(e)return function(e){for(var t in xf.prototype)e[t]=xf.prototype[t];return e}(e)}xf.prototype.on=xf.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},xf.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},xf.prototype.off=xf.prototype.removeListener=xf.prototype.removeAllListeners=xf.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},xf.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},xf.prototype.emitReserved=xf.prototype.emit,xf.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},xf.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _f="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Sf="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Cf(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const Tf=Sf.setTimeout,Ef=Sf.clearTimeout;function Af(e,t){t.useNativeTimers?(e.setTimeoutFn=Tf.bind(Sf),e.clearTimeoutFn=Ef.bind(Sf)):(e.setTimeoutFn=Sf.setTimeout.bind(Sf),e.clearTimeoutFn=Sf.clearTimeout.bind(Sf))}function Rf(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}function Mf(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class $f extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class jf extends xf{constructor(e){super(),this.writable=!1,Af(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new $f(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=pf(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class Of extends jf{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(gf),r=[];for(let i=0;i<n.length;i++){const e=pf(n[i],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((e,a)=>{sf(e,!1,e=>{r[a]=e,++i===n&&t(r.join(gf))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Mf()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let Pf=!1;try{Pf="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Rd){}const Lf=Pf;function Ff(){}class If extends Of{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}let Nf=class e extends xf{constructor(e,t,n){super(),this.createRequest=e,Af(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var t;const n=Cf(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(i){}if("POST"===this._method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}try{r.setRequestHeader("Accept","*/*")}catch(i){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;3===r.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(r.getResponseHeader("set-cookie"))),4===r.readyState&&(200===r.status||1223===r.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof r.status?r.status:0)},0))},r.send(this._data)}catch(i){return void this.setTimeoutFn(()=>{this._onError(i)},0)}"undefined"!=typeof document&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Ff,t)try{this._xhr.abort()}catch(n){}"undefined"!=typeof document&&delete e.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};if(Nf.requestsCount=0,Nf.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Df);else if("function"==typeof addEventListener){addEventListener("onpagehide"in Sf?"pagehide":"unload",Df,!1)}function Df(){for(let e in Nf.requests)Nf.requests.hasOwnProperty(e)&&Nf.requests[e].abort()}const qf=function(){const e=zf({xdomain:!1});return e&&null!==e.responseType}();function zf(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Lf))return new XMLHttpRequest}catch(n){}if(!t)try{return new(Sf[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(n){}}const Bf="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Hf extends jf{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=Bf?{}:Cf(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(Rd){return this.emitReserved("error",Rd)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;sf(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(t){}r&&_f(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Mf()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Wf=Sf.WebSocket||Sf.MozWebSocket;const Uf={websocket:class extends Hf{createSocket(e,t,n){return Bf?new Wf(e,t,n):t?new Wf(e,t):new Wf(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends jf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Rd){return this.emitReserved("error",Rd)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){yf||(yf=new TextDecoder);const n=[];let r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(0===r){if(wf(n)<1)break;const e=kf(n,1);a=!(128&~e[0]),i=127&e[0],r=i<126?3:126===i?1:2}else if(1===r){if(wf(n)<2)break;const e=kf(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(wf(n)<8)break;const e=kf(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>Math.pow(2,21)-1){s.enqueue(nf);break}i=a*Math.pow(2,32)+t.getUint32(4),r=3}else{if(wf(n)<i)break;const e=kf(n,i);s.enqueue(pf(a?e:yf.decode(e),t)),r=0}if(0===i||i>e){s.enqueue(nf);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=bf();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&_f(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends If{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=qf&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Nf(zf,this.uri(),e)}}},Qf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Vf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Kf(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Qf.exec(e||""),a={},o=14;for(;o--;)a[Vf[o]]=i[o]||"";return-1!=n&&-1!=r&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,a.path),a.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}(0,a.query),a}const Gf="function"==typeof addEventListener&&"function"==typeof removeEventListener,Zf=[];Gf&&addEventListener("offline",()=>{Zf.forEach(e=>e())},!1);class Xf extends xf{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const n=Kf(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Kf(t.host).host);Af(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let e=n[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),Gf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Zf.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&Xf.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",Xf.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=Rf(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,_f(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(Xf.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Gf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=Zf.indexOf(this._offlineEventListener);-1!==e&&Zf.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}Xf.protocol=4;class Jf extends Xf{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;Xf.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Xf.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function i(){n||(n=!0,u(),t.close(),t=null)}const a=e=>{const n=new Error("probe error: "+e);n.transport=t.name,i(),this.emitReserved("upgradeError",n)};function o(){a("transport closed")}function s(){a("socket closed")}function l(e){t&&e.name!==t.name&&i()}const u=()=>{t.removeListener("open",r),t.removeListener("error",a),t.removeListener("close",o),this.off("close",s),this.off("upgrading",l)};t.once("open",r),t.once("error",a),t.once("close",o),this.once("close",s),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let Yf=class extends Jf{constructor(e,t={}){const n="object"==typeof e?e:t;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(e=>Uf[e]).filter(e=>!!e)),super(e,n)}};const ed="function"==typeof ArrayBuffer,td=Object.prototype.toString,nd="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===td.call(Blob),rd="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===td.call(File);function id(e){return ed&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||nd&&e instanceof Blob||rd&&e instanceof File}function ad(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(ad(e[t]))return!0;return!1}if(id(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return ad(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ad(e[n]))return!0;return!1}function od(e){const t=[],n=e.data,r=e;return r.data=sd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function sd(e,t){if(!e)return e;if(id(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=sd(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=sd(e[r],t));return n}return e}function ld(e,t){return e.data=ud(e.data,t),delete e.attachments,e}function ud(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ud(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ud(e[n],t));return e}const cd=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var fd,dd;(dd=fd||(fd={}))[dd.CONNECT=0]="CONNECT",dd[dd.DISCONNECT=1]="DISCONNECT",dd[dd.EVENT=2]="EVENT",dd[dd.ACK=3]="ACK",dd[dd.CONNECT_ERROR=4]="CONNECT_ERROR",dd[dd.BINARY_EVENT=5]="BINARY_EVENT",dd[dd.BINARY_ACK=6]="BINARY_ACK";function hd(e){return"[object Object]"===Object.prototype.toString.call(e)}class pd extends xf{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===fd.BINARY_EVENT;n||t.type===fd.BINARY_ACK?(t.type=n?fd.EVENT:fd.ACK,this.reconstructor=new vd(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!id(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===fd[n.type])throw new Error("unknown packet type "+n.type);if(n.type===fd.BINARY_EVENT||n.type===fd.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!pd.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case fd.CONNECT:return hd(t);case fd.DISCONNECT:return void 0===t;case fd.CONNECT_ERROR:return"string"==typeof t||hd(t);case fd.EVENT:case fd.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===cd.indexOf(t[0]));case fd.ACK:case fd.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vd{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ld(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const md=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pd,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==fd.EVENT&&e.type!==fd.ACK||!ad(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===fd.EVENT?fd.BINARY_EVENT:fd.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==fd.BINARY_EVENT&&e.type!==fd.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=od(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return fd},protocol:5},Symbol.toStringTag,{value:"Module"}));function gd(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const bd=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class yd extends xf{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[gd(e,"open",this.onopen.bind(this)),gd(e,"packet",this.onpacket.bind(this)),gd(e,"error",this.onerror.bind(this)),gd(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,r,i;if(bd.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const a={type:fd.EVENT,data:t,options:{}};if(a.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,n=t.pop();this._registerAckCallback(e,n),a.id=e}const o=null===(r=null===(n=this.io.engine)||void 0===n?void 0:n.transport)||void 0===r?void 0:r.writable,s=this.connected&&!(null===(i=this.io.engine)||void 0===i?void 0:i._hasPingExpired());return this.flags.volatile&&!o||(s?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),a=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...t){return new Promise((n,r)=>{const i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:fd.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case fd.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case fd.EVENT:case fd.BINARY_EVENT:this.onevent(e);break;case fd.ACK:case fd.BINARY_ACK:this.onack(e);break;case fd.DISCONNECT:this.ondisconnect();break;case fd.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:fd.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:fd.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function wd(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}wd.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},wd.prototype.reset=function(){this.attempts=0},wd.prototype.setMin=function(e){this.ms=e},wd.prototype.setMax=function(e){this.max=e},wd.prototype.setJitter=function(e){this.jitter=e};class kd extends xf{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,Af(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new wd({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||md;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Yf(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=gd(t,"open",function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},a=gd(t,"error",i);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(gd(e,"ping",this.onping.bind(this)),gd(e,"data",this.ondata.bind(this)),gd(e,"error",this.onerror.bind(this)),gd(e,"close",this.onclose.bind(this)),gd(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){_f(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new yd(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t){if(this.nsps[n].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const xd={};function _d(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=Kf(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,i=n.id,a=n.path,o=xd[i]&&a in xd[i].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?s=new kd(r,t):(xd[i]||(xd[i]=new kd(r,t)),s=xd[i]),n.query&&!t.query&&(t.query=n.queryKey),s.socket(n.path,t)}Object.assign(_d,{Manager:kd,Socket:yd,io:_d,connect:_d});class Sd extends Gc.EventEmitter{constructor(){super(...arguments),this.q=null,this.B=null}connect(e,t){try{if(!this.B){if(this.B=e.server,!e.ac)return;this.q=_d(this.B,{transports:["websocket"],timeout:1e4,extraHeaders:{"X-Extension-Id":rr()||""},auth:{endpoint:t,ac:e.ac}}),this.q?.on(Jn,()=>{this.emit(Jn)}),this.q?.on(er,()=>this.emit(er)),this.q?.on(Yn,e=>this.emit(Yn,e)),this.q?.onAny((e,t)=>{this.emit(e,t)})}}catch(n){}}send(e,t){this.q?.emit(e,t)}disconnect(){this.q?.disconnect(),this.q=null,this.B=null}}const Cd=new Sd;Jc.startListening({matcher:lu.endpoints.getData.matchFulfilled,effect:async(e,t)=>{try{const t=e.payload,n=Td.getState().api.endpoint;t.server&&n&&(Cd.disconnect(),Cd.connect(t,n))}catch(n){}}}),Jc.startListening({matcher:lu.endpoints.getData.matchPending,effect:async(e,t)=>{}}),Jc.startListening({matcher:lu.endpoints.getData.matchRejected,effect:async(e,t)=>{t.dispatch(_r(0)),t.dispatch(dr(!1))}}),Jc.startListening({actionCreator:fu,effect:e=>{const t=Td.getState(),n=t.ui,r=t.api;r.isAccount?.balance&&(n.run&&n.isTp&&r.isAccount.balance>=n.tp&&(Td.dispatch(vr({type:"success",text:is(n.localCode||"en","tp_success")})),Td.dispatch(dr(!1))),n.run&&n.isSl&&r.isAccount.balance<=n.sl&&(Td.dispatch(vr({type:"success",text:is(n.localCode||"en","sl_success")})),Td.dispatch(dr(!1))))}}),Jc.startListening({actionCreator:hu,effect:e=>{const t=Td.getState();t.api?.endpoint&&Cd.send(t.api.endpoint.concat("/asset"),e.payload)}}),Jc.startListening({actionCreator:cu,effect:e=>{Td.getState().api.asset?Td.dispatch(yr(!1)):(Td.dispatch(dr(!1)),Td.dispatch(yr(!0)))}}),Jc.startListening({actionCreator:pu,effect:async e=>{Td.getState(),Td.dispatch(br(!1)),Xc.j("31",e.payload.url)}}),Jc.startListening({actionCreator:Hc,effect:(e,t)=>{const n=Td.getState();e.payload===Xn.ERROR&&t.dispatch(dr(!1)),e.payload===Xn.CONNECT&&n.api?.endpoint&&n.api.uid&&Cd.send(n.api.endpoint.concat("/asset"),n.api.uid)}}),Jc.startListening({actionCreator:Qc,effect:(e,t)=>{const n=Td.getState();n.ws.status===Xn.CONNECT&&n.api?.endpoint&&n.api.uid&&Cd.send(n.api.endpoint.concat("/candle"),e.payload)}}),Jc.startListening({actionCreator:Wc,effect:e=>{Yc.N(e.payload,e=>{Xc.j("26",e)})}}),Jc.startListening({actionCreator:oc,effect:e=>{}}),Jc.startListening({actionCreator:ac,effect:e=>{const t=Td.getState();t.ui,t.api;const n=t.order.orders.find(t=>t.id===e.payload.id);n&&"number"==typeof n.profit&&Td.dispatch(sc({stat_profit:n.profit>0?n.profit:0,stat_profit_count:n.profit>0?1:0,stat_loss:n.profit<0?n.profit:0,stat_loss_count:n.profit<0?1:0}))}});const Td=function(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{};let a=new qt;return t&&("boolean"==typeof t?a.push(Ft):a.push(It(t.extraArgument))),a},{reducer:n,middleware:r,devTools:i=!0,preloadedState:a,enhancers:o}=e||{};let s,l;if("function"==typeof n)s=n;else{if(!ue(n))throw new Error(Zn(1));s=fe(n)}l="function"==typeof r?r(t):t();let u=de;i&&(u=Nt({trace:!1,..."object"==typeof i&&i}));const c=function(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(ae(15))};const o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map(e=>e(o));return a=de(...s)(i.dispatch),{...i,dispatch:a}}}(...l),f=Qt(c);return ce(s,a,u(..."function"==typeof o?o(f):f()))}({reducer:{ui:fr.reducer,ws:Bc.reducer,api:su.reducer,order:ic.reducer,[lu.reducerPath]:lu.reducer},devTools:!1,middleware:e=>e({serializableCheck:{ignoredPaths:["ui.alerts","dataApi.queries"],ignoredActionPaths:["payload.0.props.button.click","meta.baseQueryMeta"]}}).concat(lu.middleware).concat(Jc.middleware)});var Ed;Ed=Td.dispatch,Xc.on("1",e=>{Ed(cu(e))}),Xc.on("2",e=>{Ed(hu(e))}),Xc.on("4",e=>{Ed(cu({domain:e}))}),Xc.on("3.1",e=>{Ed(fu(e))}),Xc.on("16",e=>{Ed(pr(e))}),Xc.on("30",e=>{Ed(cu({assets:e}))}),Xc.on("27",e=>{Ed(oc(e))}),Xc.on("28",e=>{Ed(ac(e))}),Xc.on("17",e=>{Ed(Qc(e))}),function(e){Cd.on(Jn,()=>e(Hc(Xn.CONNECT))),Cd.on(er,()=>e(Hc(Xn.DISCONNECT))),Cd.on(Yn,t=>e(Hc(Xn.ERROR))),Cd.on("signals",t=>e(Wc(t))),Cd.on("signals/history",t=>e(Uc(t))),Cd.on("asset",t=>e(cu({asset:t})))}(Td.dispatch);const Ad=document.createElement("div");document.body.appendChild(Ad),j.createRoot(Ad).render(s.jsx(d.StrictMode,{children:s.jsx(K,{store:Td,children:s.jsx(bu,{children:s.jsx(os,{children:s.jsx(ts,{children:s.jsx(qc,{})})})})})}));
601
+ `;function qc(){const e=ee(),{data:t}=yu();return d.useEffect(()=>{t&&e(mr(t))},[t]),s.jsx(Lc,{})}const zc={status:Xn.NOT_CONNECT,signals:[],candles:{}},Bc=gn({name:"websocket",initialState:zc,reducers:{wsStatus:(e,t)=>{e.status=t.payload},pushSignal:(e,t)=>{e.signals.unshift(t.payload),e.signals.splice(30)},setSignalsHistory:(e,t)=>{e.signals=[...t.payload]},setCandles:(e,t)=>{e.candles=t.payload}}}),{wsStatus:Hc,pushSignal:Wc,setSignalsHistory:Uc,setCandles:Qc}=Bc.actions;var Vc,Kc={exports:{}};var Gc=function(){if(Vc)return Kc.exports;Vc=1;var e,t="object"==typeof Reflect?Reflect:null,n=t&&"function"==typeof t.apply?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}Kc.exports=i,Kc.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}p(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&p(e,"error",t,n)}(e,i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,l;if(o(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),l=a[t]),void 0===l)l=a[t]=n,++e._eventsCount;else if("function"==typeof l?l=a[t]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),(i=s(e))>0&&l.length>i&&!l.warned){l.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=l.length,console&&console.warn}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function p(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var u=l.length,c=h(l,u);for(r=0;r<u;++r)n(c[r],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,c(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,c(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},Kc.exports}();const Zc=e(Gc);const Xc=new class extends Zc{constructor(){super(),this._permit=!0,window.addEventListener("message",this._handleIframeMessage.bind(this),!1)}set lock(e){this._permit=e}j(e,t){try{const n=rr();n&&window.parent&&window.parent.postMessage({id:n,event:e,data:t},"*")}catch(n){}}_handleIframeMessage(e){try{if(!this._permit)return;const t=e.data;"object"==typeof t&&"id"in t&&t.id===rr()&&"event"in t&&"data"in t&&this.emit(t.event,t.data)}catch(t){}}};const Jc=((e={})=>{const t=new Map,n=new Map,{extra:r,onError:i=Gn}=e;En(i);const a=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Wn(e)}))(Hn(t,e)??Bn(e));Fn(a,{withTypes:()=>a});const o=e=>{const n=Hn(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Wn(n)),!!n};Fn(o,{withTypes:()=>o});const s=async(e,o,s,l)=>{const u=new AbortController,c=qn(a,u.signal),f=[];try{e.pending.add(u),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(o,Fn({},s,{getOriginalState:l,condition:(e,t)=>c(e,t).then(Boolean),take:c,delay:Ln(u.signal),pause:Pn(u.signal),extra:r,signal:u.signal,fork:Dn(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&($n(e,Sn),n.delete(e))})},cancel:()=>{$n(u,Sn),e.pending.delete(u)},throwIfCancelled:()=>{jn(u.signal)}})))}catch(d){d instanceof Tn||Un(i,d,{raisedBy:"effect"})}finally{await Promise.all(f),$n(u,Cn),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(u)}},l=((e,t)=>()=>{for(const e of t.keys())Wn(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!he(r))return n(r);if(Qn.match(r))return a(r.payload);if(Vn.match(r))return void l();if(Kn.match(r))return o(r.payload);let u=e.getState();const c=()=>{if(u===In)throw new Error(Zn(23));return u};let f;try{if(f=n(r),t.size>0){const n=e.getState(),a=Array.from(t.values());for(const t of a){let a=!1;try{a=t.predicate(r,n,u)}catch(d){a=!1,Un(i,d,{raisedBy:"predicate"})}a&&s(t,r,e,c)}}}finally{u=In}return f},startListening:a,stopListening:o,clearListeners:l}})();const Yc=new class{constructor(){}O(e,t){const n=e.api.assets.find(e=>e.symbol===t.symbol);if(!n)return!1;const r=e.ui.duration||60*t.duration;if(!n.duration.length)return!1;const i=Math.min(...n.duration),a=Math.max(...n.duration);if(r<i||r>a)return!1;if(!n.active)return!1;if(n.payout<e.ui.minPayout)return!1;return!(e.order.orders.filter(e=>"number"!=typeof e.profit).length>=e.ui.maxTrades)}P(e,t){const n=e.order.orders.filter(e=>"profit"in e)[0],r=e.ui,i=this.F;let a=r.amount;if(n){const e=n.profit;e>0&&r.isIncreaseWin?(a="loss"===i?r.amount:Math.floor(n.amount*r.increaseWin),this.F="win"):e<0&&r.isIncreaseLoss?(a="win"===i?r.amount:Math.floor(n.amount*r.increaseLoss),this.F="loss"):this.F=void 0}return a}I(e,t){const n=e.ui,r=e.api;return r.isAccount.balance&&n.isTp&&n.tp<=r.isAccount.balance&&Td.dispatch(vr({type:"warning",text:is(n.localCode||"en","tp_err")})),!0}N(e,t){const n=Td.getState(),r=n.api;if(!n.ui.run||!r.isAccount.account_id)return;if(!this.O(n,e))return;const i=this.P(n,e);t({account_id:r.isAccount.account_id,amount:i,asset:e.symbol,dir:e.dir,duration:n.ui.duration||60*e.duration})}};Jc.startListening({actionCreator:dr,effect:e=>{if(e.payload){const e=Td.getState(),t=e.ui,n=e.api;if(!n.isAccount||!n.isAccount?.deals||void 0===n.isAccount?.balance||!n.isAccount?.symbol)return void Td.dispatch(dr(!1));const r=n.isAccount.balance,i=n.isAccount.deals.min,a=n.isAccount.deals.max,o=n.isAccount.symbol;if(t.amount<i)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","check_minAmount")})),void Td.dispatch(dr(!1));if(t.amount>a)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","check_maxAmount")})),void Td.dispatch(dr(!1));if(0===r||r<i)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","no_balance",[o.concat(String(r))])})),void Td.dispatch(dr(!1));if(t.amount>r)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","insufficient_balance",[o.concat(String(t.amount))])})),void Td.dispatch(dr(!1));if(t.isTp&&t.tp<=r)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","tp_err")})),void Td.dispatch(dr(!1));if(t.isSl&&t.sl>=r)return Td.dispatch(vr({type:"warning",text:is(t.localCode||"en","sl_err")})),void Td.dispatch(dr(!1));Td.dispatch(vr());if(e.order.orders.filter(e=>"number"!=typeof e.profit).length>0)return;const s=e.ws.signals.find(e=>e.closeTimestamp-Math.floor(Date.now()/1e3)>0);s&&Yc.N(s,e=>{Xc.j("26",e)})}}}),Jc.startListening({actionCreator:hr,effect:e=>{Td.getState()}}),Jc.startListening({actionCreator:gr,effect:e=>{Xc.j("23",e.payload)}}),Jc.startListening({actionCreator:br,effect:e=>{Xc.j("22",e.payload)}}),Jc.startListening({actionCreator:yr,effect:(e,t)=>{e.payload&&t.dispatch(dr(!1))}}),Jc.startListening({actionCreator:mr,effect:(e,t)=>{e.payload&&Xc.j("24",e.payload)}});const ef=Object.create(null);ef.open="0",ef.close="1",ef.ping="2",ef.pong="3",ef.message="4",ef.upgrade="5",ef.noop="6";const tf=Object.create(null);Object.keys(ef).forEach(e=>{tf[ef[e]]=e});const nf={type:"error",data:"parser error"},rf="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),af="function"==typeof ArrayBuffer,of=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sf=({type:e,data:t},n,r)=>rf&&t instanceof Blob?n?r(t):lf(t,r):af&&(t instanceof ArrayBuffer||of(t))?n?r(t):lf(new Blob([t]),r):r(ef[e]+(t||"")),lf=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function uf(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let cf;const ff="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",df="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Md=0;Md<64;Md++)df[ff.charCodeAt(Md)]=Md;const hf="function"==typeof ArrayBuffer,pf=(e,t)=>{if("string"!=typeof e)return{type:"message",data:mf(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:vf(e.substring(1),t)};return tf[n]?e.length>1?{type:tf[n],data:e.substring(1)}:{type:tf[n]}:nf},vf=(e,t)=>{if(hf){const n=(e=>{let t,n,r,i,a,o=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);const u=new ArrayBuffer(o),c=new Uint8Array(u);for(t=0;t<s;t+=4)n=df[e.charCodeAt(t)],r=df[e.charCodeAt(t+1)],i=df[e.charCodeAt(t+2)],a=df[e.charCodeAt(t+3)],c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|i>>2,c[l++]=(3&i)<<6|63&a;return u})(e);return mf(n,t)}return{base64:!0,data:e}},mf=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,gf=String.fromCharCode(30);function bf(){return new TransformStream({transform(e,t){!function(e,t){rf&&e.data instanceof Blob?e.data.arrayBuffer().then(uf).then(t):af&&(e.data instanceof ArrayBuffer||of(e.data))?t(uf(e.data)):sf(e,!1,e=>{cf||(cf=new TextEncoder),t(cf.encode(e))})}(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);const e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let yf;function wf(e){return e.reduce((e,t)=>e+t.length,0)}function kf(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function xf(e){if(e)return function(e){for(var t in xf.prototype)e[t]=xf.prototype[t];return e}(e)}xf.prototype.on=xf.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},xf.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},xf.prototype.off=xf.prototype.removeListener=xf.prototype.removeAllListeners=xf.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},xf.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},xf.prototype.emitReserved=xf.prototype.emit,xf.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},xf.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _f="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Sf="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Cf(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const Tf=Sf.setTimeout,Ef=Sf.clearTimeout;function Af(e,t){t.useNativeTimers?(e.setTimeoutFn=Tf.bind(Sf),e.clearTimeoutFn=Ef.bind(Sf)):(e.setTimeoutFn=Sf.setTimeout.bind(Sf),e.clearTimeoutFn=Sf.clearTimeout.bind(Sf))}function Rf(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}function Mf(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class $f extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class jf extends xf{constructor(e){super(),this.writable=!1,Af(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new $f(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=pf(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class Of extends jf{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(gf),r=[];for(let i=0;i<n.length;i++){const e=pf(n[i],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((e,a)=>{sf(e,!1,e=>{r[a]=e,++i===n&&t(r.join(gf))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Mf()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let Pf=!1;try{Pf="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Rd){}const Lf=Pf;function Ff(){}class If extends Of{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}let Nf=class e extends xf{constructor(e,t,n){super(),this.createRequest=e,Af(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var t;const n=Cf(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(i){}if("POST"===this._method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}try{r.setRequestHeader("Accept","*/*")}catch(i){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;3===r.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(r.getResponseHeader("set-cookie"))),4===r.readyState&&(200===r.status||1223===r.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof r.status?r.status:0)},0))},r.send(this._data)}catch(i){return void this.setTimeoutFn(()=>{this._onError(i)},0)}"undefined"!=typeof document&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Ff,t)try{this._xhr.abort()}catch(n){}"undefined"!=typeof document&&delete e.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};if(Nf.requestsCount=0,Nf.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Df);else if("function"==typeof addEventListener){addEventListener("onpagehide"in Sf?"pagehide":"unload",Df,!1)}function Df(){for(let e in Nf.requests)Nf.requests.hasOwnProperty(e)&&Nf.requests[e].abort()}const qf=function(){const e=zf({xdomain:!1});return e&&null!==e.responseType}();function zf(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Lf))return new XMLHttpRequest}catch(n){}if(!t)try{return new(Sf[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(n){}}const Bf="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Hf extends jf{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=Bf?{}:Cf(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(Rd){return this.emitReserved("error",Rd)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;sf(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(t){}r&&_f(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Mf()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Wf=Sf.WebSocket||Sf.MozWebSocket;const Uf={websocket:class extends Hf{createSocket(e,t,n){return Bf?new Wf(e,t,n):t?new Wf(e,t):new Wf(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends jf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Rd){return this.emitReserved("error",Rd)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){yf||(yf=new TextDecoder);const n=[];let r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(0===r){if(wf(n)<1)break;const e=kf(n,1);a=!(128&~e[0]),i=127&e[0],r=i<126?3:126===i?1:2}else if(1===r){if(wf(n)<2)break;const e=kf(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(wf(n)<8)break;const e=kf(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>Math.pow(2,21)-1){s.enqueue(nf);break}i=a*Math.pow(2,32)+t.getUint32(4),r=3}else{if(wf(n)<i)break;const e=kf(n,i);s.enqueue(pf(a?e:yf.decode(e),t)),r=0}if(0===i||i>e){s.enqueue(nf);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=bf();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&_f(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends If{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=qf&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Nf(zf,this.uri(),e)}}},Qf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Vf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Kf(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Qf.exec(e||""),a={},o=14;for(;o--;)a[Vf[o]]=i[o]||"";return-1!=n&&-1!=r&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,a.path),a.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}(0,a.query),a}const Gf="function"==typeof addEventListener&&"function"==typeof removeEventListener,Zf=[];Gf&&addEventListener("offline",()=>{Zf.forEach(e=>e())},!1);class Xf extends xf{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const n=Kf(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Kf(t.host).host);Af(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let e=n[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),Gf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Zf.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&Xf.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",Xf.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=Rf(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,_f(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(Xf.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Gf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=Zf.indexOf(this._offlineEventListener);-1!==e&&Zf.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}Xf.protocol=4;class Jf extends Xf{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;Xf.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Xf.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function i(){n||(n=!0,u(),t.close(),t=null)}const a=e=>{const n=new Error("probe error: "+e);n.transport=t.name,i(),this.emitReserved("upgradeError",n)};function o(){a("transport closed")}function s(){a("socket closed")}function l(e){t&&e.name!==t.name&&i()}const u=()=>{t.removeListener("open",r),t.removeListener("error",a),t.removeListener("close",o),this.off("close",s),this.off("upgrading",l)};t.once("open",r),t.once("error",a),t.once("close",o),this.once("close",s),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let Yf=class extends Jf{constructor(e,t={}){const n="object"==typeof e?e:t;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(e=>Uf[e]).filter(e=>!!e)),super(e,n)}};const ed="function"==typeof ArrayBuffer,td=Object.prototype.toString,nd="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===td.call(Blob),rd="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===td.call(File);function id(e){return ed&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||nd&&e instanceof Blob||rd&&e instanceof File}function ad(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(ad(e[t]))return!0;return!1}if(id(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return ad(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ad(e[n]))return!0;return!1}function od(e){const t=[],n=e.data,r=e;return r.data=sd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function sd(e,t){if(!e)return e;if(id(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=sd(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=sd(e[r],t));return n}return e}function ld(e,t){return e.data=ud(e.data,t),delete e.attachments,e}function ud(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ud(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ud(e[n],t));return e}const cd=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var fd,dd;(dd=fd||(fd={}))[dd.CONNECT=0]="CONNECT",dd[dd.DISCONNECT=1]="DISCONNECT",dd[dd.EVENT=2]="EVENT",dd[dd.ACK=3]="ACK",dd[dd.CONNECT_ERROR=4]="CONNECT_ERROR",dd[dd.BINARY_EVENT=5]="BINARY_EVENT",dd[dd.BINARY_ACK=6]="BINARY_ACK";function hd(e){return"[object Object]"===Object.prototype.toString.call(e)}class pd extends xf{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===fd.BINARY_EVENT;n||t.type===fd.BINARY_ACK?(t.type=n?fd.EVENT:fd.ACK,this.reconstructor=new vd(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!id(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===fd[n.type])throw new Error("unknown packet type "+n.type);if(n.type===fd.BINARY_EVENT||n.type===fd.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!pd.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case fd.CONNECT:return hd(t);case fd.DISCONNECT:return void 0===t;case fd.CONNECT_ERROR:return"string"==typeof t||hd(t);case fd.EVENT:case fd.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===cd.indexOf(t[0]));case fd.ACK:case fd.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vd{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ld(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const md=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pd,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==fd.EVENT&&e.type!==fd.ACK||!ad(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===fd.EVENT?fd.BINARY_EVENT:fd.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==fd.BINARY_EVENT&&e.type!==fd.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=od(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return fd},protocol:5},Symbol.toStringTag,{value:"Module"}));function gd(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const bd=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class yd extends xf{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[gd(e,"open",this.onopen.bind(this)),gd(e,"packet",this.onpacket.bind(this)),gd(e,"error",this.onerror.bind(this)),gd(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,r,i;if(bd.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const a={type:fd.EVENT,data:t,options:{}};if(a.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,n=t.pop();this._registerAckCallback(e,n),a.id=e}const o=null===(r=null===(n=this.io.engine)||void 0===n?void 0:n.transport)||void 0===r?void 0:r.writable,s=this.connected&&!(null===(i=this.io.engine)||void 0===i?void 0:i._hasPingExpired());return this.flags.volatile&&!o||(s?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),a=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...t){return new Promise((n,r)=>{const i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:fd.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case fd.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case fd.EVENT:case fd.BINARY_EVENT:this.onevent(e);break;case fd.ACK:case fd.BINARY_ACK:this.onack(e);break;case fd.DISCONNECT:this.ondisconnect();break;case fd.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:fd.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:fd.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function wd(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}wd.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},wd.prototype.reset=function(){this.attempts=0},wd.prototype.setMin=function(e){this.ms=e},wd.prototype.setMax=function(e){this.max=e},wd.prototype.setJitter=function(e){this.jitter=e};class kd extends xf{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,Af(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new wd({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||md;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Yf(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=gd(t,"open",function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},a=gd(t,"error",i);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(gd(e,"ping",this.onping.bind(this)),gd(e,"data",this.ondata.bind(this)),gd(e,"error",this.onerror.bind(this)),gd(e,"close",this.onclose.bind(this)),gd(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){_f(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new yd(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t){if(this.nsps[n].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const xd={};function _d(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=Kf(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,i=n.id,a=n.path,o=xd[i]&&a in xd[i].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?s=new kd(r,t):(xd[i]||(xd[i]=new kd(r,t)),s=xd[i]),n.query&&!t.query&&(t.query=n.queryKey),s.socket(n.path,t)}Object.assign(_d,{Manager:kd,Socket:yd,io:_d,connect:_d});class Sd extends Gc.EventEmitter{constructor(){super(...arguments),this.q=null,this.B=null}connect(e,t){try{if(!this.B){if(this.B=e.server,!e.ac)return;this.q=_d(this.B,{transports:["websocket"],timeout:1e4,extraHeaders:{"X-Extension-Id":rr()||""},auth:{endpoint:t,ac:e.ac}}),this.q?.on(Jn,()=>{this.emit(Jn)}),this.q?.on(er,()=>this.emit(er)),this.q?.on(Yn,e=>this.emit(Yn,e)),this.q?.onAny((e,t)=>{this.emit(e,t)})}}catch(n){}}send(e,t){this.q?.emit(e,t)}disconnect(){this.q?.disconnect(),this.q=null,this.B=null}}const Cd=new Sd;Jc.startListening({matcher:lu.endpoints.getData.matchFulfilled,effect:async(e,t)=>{try{const t=e.payload,n=Td.getState().api.endpoint;t.server&&n&&(Cd.disconnect(),Cd.connect(t,n))}catch(n){}}}),Jc.startListening({matcher:lu.endpoints.getData.matchPending,effect:async(e,t)=>{}}),Jc.startListening({matcher:lu.endpoints.getData.matchRejected,effect:async(e,t)=>{t.dispatch(_r(0)),t.dispatch(dr(!1))}}),Jc.startListening({actionCreator:du,effect:e=>{const t=Td.getState(),n=t.ui,r=t.api;r.isAccount?.balance&&(n.run&&n.isTp&&r.isAccount.balance>=n.tp&&(Td.dispatch(vr({type:"success",text:is(n.localCode||"en","tp_success")})),Td.dispatch(dr(!1))),n.run&&n.isSl&&r.isAccount.balance<=n.sl&&(Td.dispatch(vr({type:"success",text:is(n.localCode||"en","sl_success")})),Td.dispatch(dr(!1))))}}),Jc.startListening({actionCreator:pu,effect:e=>{const t=Td.getState();t.api?.endpoint&&Cd.send(t.api.endpoint.concat("/asset"),e.payload)}}),Jc.startListening({actionCreator:fu,effect:e=>{Td.getState().api.asset?Td.dispatch(yr(!1)):(Td.dispatch(dr(!1)),Td.dispatch(yr(!0)))}}),Jc.startListening({actionCreator:cu,effect:async e=>{Td.getState(),Td.dispatch(br(!1)),Xc.j("31",e.payload)}}),Jc.startListening({actionCreator:Hc,effect:(e,t)=>{const n=Td.getState();e.payload===Xn.ERROR&&t.dispatch(dr(!1)),e.payload===Xn.CONNECT&&n.api?.endpoint&&n.api.uid&&Cd.send(n.api.endpoint.concat("/asset"),n.api.uid)}}),Jc.startListening({actionCreator:Qc,effect:(e,t)=>{const n=Td.getState();n.ws.status===Xn.CONNECT&&n.api?.endpoint&&n.api.uid&&Cd.send(n.api.endpoint.concat("/candle"),e.payload)}}),Jc.startListening({actionCreator:Wc,effect:e=>{Yc.N(e.payload,e=>{Xc.j("26",e)})}}),Jc.startListening({actionCreator:oc,effect:e=>{}}),Jc.startListening({actionCreator:ac,effect:e=>{const t=Td.getState();t.ui,t.api;const n=t.order.orders.find(t=>t.id===e.payload.id);n&&"number"==typeof n.profit&&Td.dispatch(sc({stat_profit:n.profit>0?n.profit:0,stat_profit_count:n.profit>0?1:0,stat_loss:n.profit<0?n.profit:0,stat_loss_count:n.profit<0?1:0}))}});const Td=function(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{};let a=new qt;return t&&("boolean"==typeof t?a.push(Ft):a.push(It(t.extraArgument))),a},{reducer:n,middleware:r,devTools:i=!0,preloadedState:a,enhancers:o}=e||{};let s,l;if("function"==typeof n)s=n;else{if(!ue(n))throw new Error(Zn(1));s=fe(n)}l="function"==typeof r?r(t):t();let u=de;i&&(u=Nt({trace:!1,..."object"==typeof i&&i}));const c=function(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(ae(15))};const o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map(e=>e(o));return a=de(...s)(i.dispatch),{...i,dispatch:a}}}(...l),f=Qt(c);return ce(s,a,u(..."function"==typeof o?o(f):f()))}({reducer:{ui:fr.reducer,ws:Bc.reducer,api:su.reducer,order:ic.reducer,[lu.reducerPath]:lu.reducer},devTools:!1,middleware:e=>e({serializableCheck:{ignoredPaths:["ui.alerts","dataApi.queries"],ignoredActionPaths:["payload.0.props.button.click","meta.baseQueryMeta"]}}).concat(lu.middleware).concat(Jc.middleware)});var Ed;Ed=Td.dispatch,Xc.on("1",e=>{Ed(fu(e))}),Xc.on("2",e=>{Ed(pu(e))}),Xc.on("4",e=>{Ed(fu({domain:e}))}),Xc.on("3.1",e=>{Ed(du(e))}),Xc.on("16",e=>{Ed(pr(e))}),Xc.on("30",e=>{Ed(fu({assets:e}))}),Xc.on("27",e=>{Ed(oc(e))}),Xc.on("28",e=>{Ed(ac(e))}),Xc.on("17",e=>{Ed(Qc(e))}),function(e){Cd.on(Jn,()=>e(Hc(Xn.CONNECT))),Cd.on(er,()=>e(Hc(Xn.DISCONNECT))),Cd.on(Yn,t=>e(Hc(Xn.ERROR))),Cd.on("signals",t=>e(Wc(t))),Cd.on("signals/history",t=>e(Uc(t))),Cd.on("asset",t=>e(fu({asset:t})))}(Td.dispatch);const Ad=document.createElement("div");document.body.appendChild(Ad),j.createRoot(Ad).render(s.jsx(d.StrictMode,{children:s.jsx(K,{store:Td,children:s.jsx(bu,{children:s.jsx(os,{children:s.jsx(ts,{children:s.jsx(qc,{})})})})})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@irshat/robot-ui",
3
3
  "private": false,
4
- "version": "3.4.54",
4
+ "version": "3.4.55",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
7
  "dist"