@vervstack/chures 0.0.31 → 0.0.33

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/chures.js CHANGED
@@ -1,174 +1,174 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem;--chures-overlay: rgb(0 0 0 / 58%);--chures-side-drawer-size: 22rem}}@keyframes _spin_wa8op_1{to{transform:rotate(360deg)}}@keyframes _ripple_wa8op_1{0%{transform:scale(.08);opacity:.9}to{transform:scale(1);opacity:0}}@keyframes _dotPulse_wa8op_1{0%,to{transform:translate(-50%,-50%) scale(.55);opacity:.3}50%{transform:translate(-50%,calc(-50% - var(--sz) * .1)) scale(1);opacity:1}}@keyframes _waveBounce_wa8op_1{0%,55%,to{transform:translate(-50%,-50%) scale(.8);opacity:.4}27%{transform:translate(-50%,calc(-50% - var(--sz) * .28)) scale(1);opacity:1}}._LoaderContainer_wa8op_24{position:relative;flex-shrink:0}._sm_wa8op_31{width:1.5rem;height:1.5rem;--sz: 1.5rem;--arc-gap: .2rem;--arc-bw: .125rem}._md_wa8op_32{width:2.5rem;height:2.5rem;--sz: 2.5rem;--arc-gap: .35rem;--arc-bw: .1875rem}._lg_wa8op_33{width:4rem;height:4rem;--sz: 4rem;--arc-gap: .55rem;--arc-bw: .25rem}._Arc1_wa8op_37,._Arc2_wa8op_38,._Arc3_wa8op_39{position:absolute;border-radius:50%;border:var(--arc-bw) solid transparent}._Arc1_wa8op_37{inset:0;border-top-color:var(--chures-accent, #229ED9);border-left-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.2s linear infinite;filter:drop-shadow(0 0 .25rem var(--chures-accent, #229ED9))}._Arc2_wa8op_38{inset:var(--arc-gap);border-bottom-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.8s linear infinite reverse;opacity:.8}._Arc3_wa8op_39{inset:calc(var(--arc-gap) * 2);border-top-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 2.4s linear infinite;opacity:.6}._Ring1_wa8op_71,._Ring2_wa8op_72,._Ring3_wa8op_73{position:absolute;inset:0;border-radius:50%;border:var(--arc-bw) solid var(--chures-accent, #229ED9);animation:_ripple_wa8op_1 1.8s ease-out infinite both}._Ring2_wa8op_72{animation-delay:.6s}._Ring3_wa8op_73{animation-delay:1.2s}._Dot1_wa8op_86,._Dot2_wa8op_87,._Dot3_wa8op_88{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .2);height:calc(var(--sz) * .2);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .14) var(--chures-accent, #229ED9);animation:_dotPulse_wa8op_1 1.1s ease-in-out infinite both}._Dot1_wa8op_86{left:22%}._Dot2_wa8op_87{left:50%;animation-delay:.18s}._Dot3_wa8op_88{left:78%;animation-delay:.36s}._Wave1_wa8op_105,._Wave2_wa8op_106,._Wave3_wa8op_107,._Wave4_wa8op_108,._Wave5_wa8op_109{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .16);height:calc(var(--sz) * .16);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .1) var(--chures-accent, #229ED9);animation:_waveBounce_wa8op_1 1s ease-in-out infinite both}._Wave1_wa8op_105{left:10%}._Wave2_wa8op_106{left:28%;animation-delay:.12s}._Wave3_wa8op_107{left:46%;animation-delay:.24s}._Wave4_wa8op_108{left:64%;animation-delay:.36s}._Wave5_wa8op_109{left:82%;animation-delay:.48s}._LoadingWrapperContainer_1q0w7_1{display:flex;align-items:center;justify-content:center;width:100%;min-height:4rem}._SkeletonWrapper_1q0w7_9{width:100%}._TelegramSignInButtonContainer_10wun_1{display:inline-flex;align-items:center;justify-content:center;gap:.625rem;width:100%;padding:1rem 1.375rem;background:linear-gradient(180deg,var(--chures-btn-from, #2AABEE) 0%,var(--chures-btn-to, #229ED9) 100%);border:0;border-radius:.875rem;color:#fff;font-family:Comfortaa,sans-serif;font-weight:600;font-size:1rem;letter-spacing:-.005em;cursor:pointer;box-shadow:inset 0 .0625rem #ffffff26,0 .75rem 2rem -.75rem #2aabee8c;transition:transform .14s ease,box-shadow .2s ease,filter .16s ease}._TelegramSignInButtonContainer_10wun_1:hover{transform:translateY(-.0625rem);box-shadow:inset 0 .0625rem #ffffff2e,0 1.125rem 2.375rem -.75rem #2aabeea6;filter:brightness(1.05)}._TelegramSignInButtonContainer_10wun_1:active{transform:translateY(0);filter:brightness(.97)}._TelegramSignInButtonContainer_10wun_1:focus-visible{outline:.125rem solid rgba(255,255,255,.8);outline-offset:.125rem}._TelegramSignInButtonContainer_10wun_1:disabled{opacity:.6;cursor:not-allowed}._FullSize_10wun_46{height:100%}._Icon_10wun_50{flex-shrink:0}._ToastContainer_1tme2_1{position:fixed;right:1.5rem;top:1.5rem;width:clamp(25vw,24.5rem,95vw);display:flex;flex-direction:column;gap:1rem;z-index:9999}._Toast_1tme2_1{min-height:4rem;border:var(--chures-accent, #229ED9) 1px solid;border-radius:1rem;padding:1rem;box-sizing:border-box;position:relative;background:var(--chures-surface, #000000);display:flex;flex-direction:column}._Toast_1tme2_1>div:first-child{font-weight:700;font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff)}._Toast_1tme2_1._error_1tme2_33{border-color:var(--chures-error, #ef4444)}._Toast_1tme2_1._error_1tme2_33>div:first-child{color:var(--chures-error, #ef4444)}._Toast_1tme2_1._warn_1tme2_41{border-color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._warn_1tme2_41>div:first-child{color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._info_1tme2_49{border-color:var(--chures-accent, #229ED9)}._Toast_1tme2_1 ._Description_1tme2_53{color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-xs, .75rem);margin-top:.125rem}._Toast_1tme2_1 ._DismissButton_1tme2_59{position:absolute;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;top:0;right:1%;cursor:pointer;font-size:1.5rem;color:var(--chures-fg-muted, #9ca3af)}._slideIn_1tme2_79{animation:_slideIn_1tme2_79 .2s ease forwards}._slideOut_1tme2_83{animation:_slideOut_1tme2_83 .2s ease forwards}@keyframes _slideIn_1tme2_79{0%{opacity:0;transform:translate(2rem)}to{opacity:1;transform:translate(0)}}@keyframes _slideOut_1tme2_83{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(2rem)}}@keyframes _shimmer_1uu20_1{0%{background-position:-200% 0}to{background-position:200% 0}}:where(._InputContainer_1uu20_15){position:relative;width:100%;height:var(--chures-input-height, 3rem)}:where(._InputField_1uu20_21){width:100%;height:100%;background:var(--chures-input-bg, #111111);border:.0625rem solid rgb(255 255 255 / 13%);border-radius:var(--chures-input-radius, .75rem);color:var(--chures-fg, #ffffff);font-size:var(--chures-font-sm, .875rem);padding:0 .875rem;outline:none;transition:border-color .18s ease;box-sizing:border-box}:where(._InputField_1uu20_21._hasStartIcon_1uu20_35){padding-left:2.25rem}:where(._InputField_1uu20_21._hasEndIcon_1uu20_39){padding-right:2.25rem}:where(._StartIcon_1uu20_43){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._EndIcon_1uu20_54){position:absolute;right:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._InputField_1uu20_21):focus{border-color:#ffffff59}:where(._hasError_1uu20_69 ._InputField_1uu20_21),:where(._hasError_1uu20_69 ._InputField_1uu20_21):focus{border-color:var(--chures-error, #ef4444)}:where(._disabled_1uu20_74 ._InputField_1uu20_21){opacity:.45;cursor:not-allowed}:where(._Label_1uu20_79){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-sm, .875rem);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}:where(._Label_1uu20_79._lifted_1uu20_93){top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg, #111111);color:var(--chures-fg-muted, #9ca3af)}:where(._hasError_1uu20_69 ._Label_1uu20_79._lifted_1uu20_93){color:var(--chures-error, #ef4444)}:where(._ErrorText_1uu20_104){display:block;margin-top:.25rem;padding-left:.875rem;font-size:var(--chures-font-xs, .75rem);color:var(--chures-error, #ef4444)}:where(._Skeleton_1uu20_112){width:100%;height:var(--chures-input-height, 3rem);border-radius:var(--chures-input-radius, .75rem);background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1uu20_1 1.5s ease-in-out infinite}@keyframes _shimmer_1jetc_1{0%{background-position:-200% 0}to{background-position:200% 0}}._ToggleContainer_1jetc_6{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}._disabled_1jetc_13{opacity:.45;cursor:not-allowed}._Track_1jetc_18{position:relative;width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:var(--chures-toggle-bg-off, rgb(255 255 255 / 13%));border:none;padding:0;cursor:pointer;transition:background .2s ease;flex-shrink:0}._Track_1jetc_18._on_1jetc_31{background:var(--chures-toggle-bg-on, var(--chures-accent, #229ED9))}._disabled_1jetc_13 ._Track_1jetc_18{cursor:not-allowed}._Thumb_1jetc_39{position:absolute;top:0;bottom:0;margin:auto 0;left:.1875rem;width:var(--chures-toggle-thumb, 1.125rem);height:var(--chures-toggle-thumb, 1.125rem);border-radius:50%;background:var(--chures-toggle-thumb-color, #ffffff);transition:left .2s ease;pointer-events:none}._Track_1jetc_18._on_1jetc_31 ._Thumb_1jetc_39{left:calc(var(--chures-toggle-width, 2.75rem) - var(--chures-toggle-thumb, 1.125rem) - .1875rem)}._Label_1jetc_57{font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff);-webkit-user-select:none;user-select:none}._LabelSkeleton_1jetc_63{display:inline-block;width:var(--chures-toggle-label-skeleton-w, 5rem);height:var(--chures-font-sm, .875rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}._Skeleton_1jetc_78{width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem;--chures-overlay: rgb(0 0 0 / 58%);--chures-side-drawer-size: 22rem}}@keyframes _panelIn_1jz2j_1{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}@keyframes _shimmer_1jz2j_1{0%{background-position:-200% center}to{background-position:200% center}}._DropdownContainer_1jz2j_13{position:relative;width:100%}._PanelWrapper_1jz2j_20{position:absolute;top:calc(100% + var(--chures-dropdown-panel-gap));left:0;width:100%;animation:_panelIn_1jz2j_1 .14s ease}._PanelWrapper_1jz2j_20._Portal_1jz2j_34{position:fixed;width:auto;margin-top:var(--chures-dropdown-panel-gap)}._PanelContainer_1jz2j_18{background:var(--chures-dropdown-bg);border:1px solid var(--chures-dropdown-border);border-radius:var(--chures-dropdown-radius);overflow:hidden;box-shadow:0 1rem 3rem #000c}._PanelContainer_1jz2j_18._Glass_1jz2j_48{background:var(--chures-dropdown-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem))}._Label_1jz2j_54{position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted);font-size:var(--chures-font-sm);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}._Label_1jz2j_54._lifted_1jz2j_68{top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg);color:var(--chures-fg-muted)}._TriggerContainer_1jz2j_75{width:100%;height:var(--chures-input-height);background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-trigger-border);border-radius:var(--chures-input-radius);color:var(--chures-fg);font-size:var(--chures-font-sm);font-family:inherit;padding:0 .875rem;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:.5rem;text-align:left;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}._TriggerContainer_1jz2j_75:hover{border-color:var(--chures-dropdown-trigger-border-hover)}._TriggerContainer_1jz2j_75._Open_1jz2j_99{border-color:var(--chures-accent);box-shadow:0 0 0 .1875rem var(--chures-dropdown-trigger-focus-ring)}._TriggerPlaceholder_1jz2j_104{color:var(--chures-fg-muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerValue_1jz2j_112{color:var(--chures-fg);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerIcon_1jz2j_120{color:var(--chures-fg-muted);flex-shrink:0;display:flex;align-items:center}._ChipsWrapper_1jz2j_127{display:flex;flex-wrap:nowrap;gap:.25rem;flex:1;overflow-x:auto;overflow-y:hidden;min-width:0;align-items:center;margin:.375rem 0;scrollbar-width:none;-ms-overflow-style:none}._ChipsWrapper_1jz2j_127::-webkit-scrollbar{display:none}._ChipsWrapper_1jz2j_127._Expand_1jz2j_145{flex-wrap:wrap;overflow:visible;row-gap:.25rem}._TriggerContainer_1jz2j_75._MultiSelect_1jz2j_151 ._TriggerIcon_1jz2j_120{align-self:flex-start;height:var(--chures-input-height)}._TriggerContainer_1jz2j_75._ExpandHeight_1jz2j_156{height:auto;min-height:var(--chures-input-height)}._Chip_1jz2j_127{display:inline-flex;align-items:center;flex-shrink:0;background:var(--chures-dropdown-create-bg);border:1px solid var(--chures-dropdown-chip-border);border-radius:624.9375rem;padding:.15rem .5rem;font-size:var(--chures-font-xs);color:var(--chures-fg);white-space:nowrap;line-height:1.4}._SearchRow_1jz2j_175{padding:.5rem;border-bottom:1px solid var(--chures-dropdown-border-subtle)}._SearchBox_1jz2j_180{display:flex;align-items:center;gap:.5rem;background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-border-subtle);border-radius:var(--chures-dropdown-row-radius);padding:.4rem .625rem}._SearchIcon_1jz2j_190{display:flex;align-items:center;color:var(--chures-fg-muted);flex-shrink:0}._SearchInput_1jz2j_197{flex:1;background:transparent;border:none;outline:none;font-size:var(--chures-font-sm);color:var(--chures-fg);font-family:inherit}._SearchInput_1jz2j_197::placeholder{color:var(--chures-fg-muted)}._ResultsList_1jz2j_211{max-height:13rem;overflow-y:auto}._OptionRow_1jz2j_216{padding:.5625rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);cursor:pointer;transition:background .1s ease,color .1s ease;display:flex;align-items:center;gap:.5rem}._OptionRow_1jz2j_216:hover{background:var(--chures-dropdown-hover);color:var(--chures-fg)}._OptionRow_1jz2j_216._Selected_1jz2j_231{color:var(--chures-fg)}._OptionRow_1jz2j_216._Indented_1jz2j_235{padding-left:1.875rem}._GroupHeader_1jz2j_240{padding:.5625rem .875rem .25rem;font-size:var(--chures-font-xs);color:var(--chures-fg-muted);text-transform:uppercase;letter-spacing:.03em}._GroupHeader_1jz2j_240:not(:first-child){margin-top:.25rem;border-top:1px solid var(--chures-dropdown-border-subtle)}._Checkmark_1jz2j_253{color:var(--chures-accent);font-size:var(--chures-font-xs);flex-shrink:0}._CreateRow_1jz2j_259{display:flex;align-items:center;gap:.625rem;padding:.5625rem .875rem;cursor:pointer;background:var(--chures-dropdown-create-bg);transition:background .1s ease}._CreateRow_1jz2j_259:hover{background:var(--chures-dropdown-create-bg-hover)}._CreateRow_1jz2j_259._WithBorder_1jz2j_272{border-top:1px solid var(--chures-dropdown-border-subtle)}._CreateIcon_1jz2j_277{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:50%;background:var(--chures-accent);color:#fff;flex-shrink:0}._CreateLabel_1jz2j_289{font-size:var(--chures-font-sm);font-weight:600;color:var(--chures-fg)}._EmptyHint_1jz2j_295{padding:.75rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);font-style:italic}._SkeletonRow_1jz2j_302{height:2rem;margin:.375rem .875rem;border-radius:var(--chures-dropdown-row-radius);background:linear-gradient(90deg,var(--chures-dropdown-bg) 25%,var(--chures-skeleton-shine) 50%,var(--chures-dropdown-bg) 75%);background-size:200% 100%;animation:_shimmer_1jz2j_1 1.4s infinite linear}:where(._Btn_1tozl_10){display:inline-flex;align-items:center;justify-content:center;gap:.375rem;border-radius:.625rem;border:1px solid transparent;font-family:inherit;font-size:.8125rem;font-weight:500;cursor:pointer;padding:.625rem 1rem;transition:all .16s ease;white-space:nowrap;color:var(--chures-fg, #ffffff);background:var(--chures-button-bg)}:where(._Btn_1tozl_10):disabled{opacity:.4;cursor:not-allowed}:where(._Primary_1tozl_35){background:var(--chures-accent, #229ED9);border-color:var(--chures-accent, #229ED9);color:#fff;font-weight:600;padding:.625rem 1.125rem;box-shadow:0 10px 28px -12px var(--chures-accent-muted, rgb(34 158 217 / 50%));transition:filter .16s ease,opacity .16s ease}:where(._Primary_1tozl_35):hover:not(:disabled){filter:brightness(1.06)}:where(._Secondary_1tozl_50){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Secondary_1tozl_50):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._Ghost_1tozl_62){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Ghost_1tozl_62):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._IconDanger_1tozl_74){width:1.375rem;height:1.375rem;padding:0;border:0;border-radius:.375rem;background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:1rem;line-height:1;justify-content:center;flex-shrink:0;transition:background .14s ease,color .14s ease}:where(._IconDanger_1tozl_74):hover:not(:disabled){background:#ef44441f;color:var(--chures-error, #ef4444)}:where(._Danger_1tozl_95){background:transparent;border-color:#ef444466;color:var(--chures-error, #ef4444);transition:background .16s ease,border-color .16s ease}:where(._Danger_1tozl_95):hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._ConfirmWrapper_1tq4o_4{width:100%;max-width:24rem;animation:_confirmIn_1tq4o_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _confirmIn_1tq4o_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._ConfirmContainer_1tq4o_1{width:100%;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c}._Glass_1tq4o_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._ConfirmTitle_1tq4o_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._ConfirmMessage_1tq4o_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._ConfirmActions_1tq4o_45{display:flex;align-items:center;justify-content:flex-end;gap:.625rem;margin-top:1.5rem}._BtnCancel_1tq4o_53{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnCancel_1tq4o_53:hover:not(:disabled){background:#ffffff14;color:var(--chures-fg, #ffffff)}._BtnConfirm_1tq4o_73{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid var(--chures-accent, #229ED9);background:var(--chures-accent, #229ED9);color:#fff;font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:filter .16s ease,opacity .16s ease}._BtnConfirm_1tq4o_73:hover:not(:disabled){filter:brightness(1.06)}._BtnDanger_1tq4o_92{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(239 68 68 / 40%);background:transparent;color:var(--chures-error, #ef4444);font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .16s ease,border-color .16s ease}._BtnDanger_1tq4o_92:hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._BtnConfirm_1tq4o_73:disabled,._BtnDanger_1tq4o_92:disabled,._BtnCancel_1tq4o_53:disabled{opacity:.4;cursor:not-allowed}._InfoWrapper_cqv58_4{width:100%;max-width:24rem;animation:_infoIn_cqv58_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _infoIn_cqv58_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._InfoContainer_cqv58_1{width:100%;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c}._Glass_cqv58_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._InfoTitle_cqv58_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._InfoMessage_cqv58_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._InfoActions_cqv58_45{display:flex;align-items:center;justify-content:flex-end;margin-top:1.5rem}._BtnClose_cqv58_52{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnClose_cqv58_52:hover{background:#ffffff14;color:var(--chures-fg, #ffffff)}:where(._Backdrop_1w1e3_7){position:fixed;inset:0;background:var(--chures-overlay, rgb(0 0 0 / 58%));opacity:0;pointer-events:none;transition:opacity .26s ease}:where(._BackdropOpen_1w1e3_16){opacity:1;pointer-events:auto}:where(._Panel_1w1e3_21){position:fixed;display:flex;flex-direction:column;overflow:hidden;background:var(--chures-surface, #000000);box-shadow:0 0 3rem #00000059;transition:transform .28s cubic-bezier(.32,0,0,1)}:where(._Right_1w1e3_31){top:0;right:0;bottom:0;width:var(--chures-side-drawer-size, 22rem);max-width:100vw;transform:translate(100%)}:where(._Left_1w1e3_40){top:0;bottom:0;left:0;width:var(--chures-side-drawer-size, 22rem);max-width:100vw;transform:translate(-100%)}:where(._Top_1w1e3_49){top:0;left:0;right:0;height:var(--chures-side-drawer-size, 22rem);max-height:100vh;transform:translateY(-100%)}:where(._Bottom_1w1e3_58){left:0;right:0;bottom:0;height:var(--chures-side-drawer-size, 22rem);max-height:100vh;transform:translateY(100%)}:where(._PanelOpen_1w1e3_67){transform:translate(0)}")),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { jsx as t, jsxs as _, Fragment as B } from "react/jsx-runtime";
3
- import { createContext as Oe, useContext as Pe, useRef as G, useState as N, useEffect as b, forwardRef as xe, useCallback as Ce, useLayoutEffect as ke, Fragment as de } from "react";
4
- import { AnimatePresence as We, motion as ze } from "framer-motion";
5
- import { create as Me } from "zustand";
6
- import { createPortal as Le } from "react-dom";
7
- function Fe(e) {
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem;--chures-overlay: rgb(0 0 0 / 58%);--chures-side-drawer-size: 22rem;--chures-flyout-bg: #0d0d0d;--chures-flyout-min-width: 10rem;--chures-flyout-border: rgb(255 255 255 / 11%);--chures-flyout-radius: .5rem;--chures-flyout-shadow: rgb(0 0 0 / 80%);--chures-flyout-fg: rgb(255 255 255 / 55%);--chures-flyout-fg-strong: rgb(255 255 255 / 92%);--chures-flyout-fg-muted: rgb(255 255 255 / 32%);--chures-flyout-hover: rgb(255 255 255 / 4%);--chures-flyout-skeleton: rgb(255 255 255 / 7%);--chures-flyout-font: .8125rem;--chures-flyout-font-sm: .6875rem;--chures-flyout-font-md: .75rem;--chures-flyout-font-mono: "JetBrains Mono", ui-monospace, sfmono-regular, menlo, monospace}}@keyframes _spin_wa8op_1{to{transform:rotate(360deg)}}@keyframes _ripple_wa8op_1{0%{transform:scale(.08);opacity:.9}to{transform:scale(1);opacity:0}}@keyframes _dotPulse_wa8op_1{0%,to{transform:translate(-50%,-50%) scale(.55);opacity:.3}50%{transform:translate(-50%,calc(-50% - var(--sz) * .1)) scale(1);opacity:1}}@keyframes _waveBounce_wa8op_1{0%,55%,to{transform:translate(-50%,-50%) scale(.8);opacity:.4}27%{transform:translate(-50%,calc(-50% - var(--sz) * .28)) scale(1);opacity:1}}._LoaderContainer_wa8op_24{position:relative;flex-shrink:0}._sm_wa8op_31{width:1.5rem;height:1.5rem;--sz: 1.5rem;--arc-gap: .2rem;--arc-bw: .125rem}._md_wa8op_32{width:2.5rem;height:2.5rem;--sz: 2.5rem;--arc-gap: .35rem;--arc-bw: .1875rem}._lg_wa8op_33{width:4rem;height:4rem;--sz: 4rem;--arc-gap: .55rem;--arc-bw: .25rem}._Arc1_wa8op_37,._Arc2_wa8op_38,._Arc3_wa8op_39{position:absolute;border-radius:50%;border:var(--arc-bw) solid transparent}._Arc1_wa8op_37{inset:0;border-top-color:var(--chures-accent, #229ED9);border-left-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.2s linear infinite;filter:drop-shadow(0 0 .25rem var(--chures-accent, #229ED9))}._Arc2_wa8op_38{inset:var(--arc-gap);border-bottom-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 1.8s linear infinite reverse;opacity:.8}._Arc3_wa8op_39{inset:calc(var(--arc-gap) * 2);border-top-color:var(--chures-accent, #229ED9);border-right-color:var(--chures-accent, #229ED9);animation:_spin_wa8op_1 2.4s linear infinite;opacity:.6}._Ring1_wa8op_71,._Ring2_wa8op_72,._Ring3_wa8op_73{position:absolute;inset:0;border-radius:50%;border:var(--arc-bw) solid var(--chures-accent, #229ED9);animation:_ripple_wa8op_1 1.8s ease-out infinite both}._Ring2_wa8op_72{animation-delay:.6s}._Ring3_wa8op_73{animation-delay:1.2s}._Dot1_wa8op_86,._Dot2_wa8op_87,._Dot3_wa8op_88{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .2);height:calc(var(--sz) * .2);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .14) var(--chures-accent, #229ED9);animation:_dotPulse_wa8op_1 1.1s ease-in-out infinite both}._Dot1_wa8op_86{left:22%}._Dot2_wa8op_87{left:50%;animation-delay:.18s}._Dot3_wa8op_88{left:78%;animation-delay:.36s}._Wave1_wa8op_105,._Wave2_wa8op_106,._Wave3_wa8op_107,._Wave4_wa8op_108,._Wave5_wa8op_109{position:absolute;top:50%;border-radius:50%;width:calc(var(--sz) * .16);height:calc(var(--sz) * .16);background:var(--chures-accent, #229ED9);box-shadow:0 0 calc(var(--sz) * .1) var(--chures-accent, #229ED9);animation:_waveBounce_wa8op_1 1s ease-in-out infinite both}._Wave1_wa8op_105{left:10%}._Wave2_wa8op_106{left:28%;animation-delay:.12s}._Wave3_wa8op_107{left:46%;animation-delay:.24s}._Wave4_wa8op_108{left:64%;animation-delay:.36s}._Wave5_wa8op_109{left:82%;animation-delay:.48s}._LoadingWrapperContainer_1q0w7_1{display:flex;align-items:center;justify-content:center;width:100%;min-height:4rem}._SkeletonWrapper_1q0w7_9{width:100%}._TelegramSignInButtonContainer_10wun_1{display:inline-flex;align-items:center;justify-content:center;gap:.625rem;width:100%;padding:1rem 1.375rem;background:linear-gradient(180deg,var(--chures-btn-from, #2AABEE) 0%,var(--chures-btn-to, #229ED9) 100%);border:0;border-radius:.875rem;color:#fff;font-family:Comfortaa,sans-serif;font-weight:600;font-size:1rem;letter-spacing:-.005em;cursor:pointer;box-shadow:inset 0 .0625rem #ffffff26,0 .75rem 2rem -.75rem #2aabee8c;transition:transform .14s ease,box-shadow .2s ease,filter .16s ease}._TelegramSignInButtonContainer_10wun_1:hover{transform:translateY(-.0625rem);box-shadow:inset 0 .0625rem #ffffff2e,0 1.125rem 2.375rem -.75rem #2aabeea6;filter:brightness(1.05)}._TelegramSignInButtonContainer_10wun_1:active{transform:translateY(0);filter:brightness(.97)}._TelegramSignInButtonContainer_10wun_1:focus-visible{outline:.125rem solid rgba(255,255,255,.8);outline-offset:.125rem}._TelegramSignInButtonContainer_10wun_1:disabled{opacity:.6;cursor:not-allowed}._FullSize_10wun_46{height:100%}._Icon_10wun_50{flex-shrink:0}._ToastContainer_1tme2_1{position:fixed;right:1.5rem;top:1.5rem;width:clamp(25vw,24.5rem,95vw);display:flex;flex-direction:column;gap:1rem;z-index:9999}._Toast_1tme2_1{min-height:4rem;border:var(--chures-accent, #229ED9) 1px solid;border-radius:1rem;padding:1rem;box-sizing:border-box;position:relative;background:var(--chures-surface, #000000);display:flex;flex-direction:column}._Toast_1tme2_1>div:first-child{font-weight:700;font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff)}._Toast_1tme2_1._error_1tme2_33{border-color:var(--chures-error, #ef4444)}._Toast_1tme2_1._error_1tme2_33>div:first-child{color:var(--chures-error, #ef4444)}._Toast_1tme2_1._warn_1tme2_41{border-color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._warn_1tme2_41>div:first-child{color:var(--chures-warn, #f59e0b)}._Toast_1tme2_1._info_1tme2_49{border-color:var(--chures-accent, #229ED9)}._Toast_1tme2_1 ._Description_1tme2_53{color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-xs, .75rem);margin-top:.125rem}._Toast_1tme2_1 ._DismissButton_1tme2_59{position:absolute;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;top:0;right:1%;cursor:pointer;font-size:1.5rem;color:var(--chures-fg-muted, #9ca3af)}._slideIn_1tme2_79{animation:_slideIn_1tme2_79 .2s ease forwards}._slideOut_1tme2_83{animation:_slideOut_1tme2_83 .2s ease forwards}@keyframes _slideIn_1tme2_79{0%{opacity:0;transform:translate(2rem)}to{opacity:1;transform:translate(0)}}@keyframes _slideOut_1tme2_83{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(2rem)}}@keyframes _shimmer_1uu20_1{0%{background-position:-200% 0}to{background-position:200% 0}}:where(._InputContainer_1uu20_15){position:relative;width:100%;height:var(--chures-input-height, 3rem)}:where(._InputField_1uu20_21){width:100%;height:100%;background:var(--chures-input-bg, #111111);border:.0625rem solid rgb(255 255 255 / 13%);border-radius:var(--chures-input-radius, .75rem);color:var(--chures-fg, #ffffff);font-size:var(--chures-font-sm, .875rem);padding:0 .875rem;outline:none;transition:border-color .18s ease;box-sizing:border-box}:where(._InputField_1uu20_21._hasStartIcon_1uu20_35){padding-left:2.25rem}:where(._InputField_1uu20_21._hasEndIcon_1uu20_39){padding-right:2.25rem}:where(._StartIcon_1uu20_43){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._EndIcon_1uu20_54){position:absolute;right:.875rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:var(--chures-fg-muted, #9ca3af);pointer-events:none}:where(._InputField_1uu20_21):focus{border-color:#ffffff59}:where(._hasError_1uu20_69 ._InputField_1uu20_21),:where(._hasError_1uu20_69 ._InputField_1uu20_21):focus{border-color:var(--chures-error, #ef4444)}:where(._disabled_1uu20_74 ._InputField_1uu20_21){opacity:.45;cursor:not-allowed}:where(._Label_1uu20_79){position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted, #9ca3af);font-size:var(--chures-font-sm, .875rem);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}:where(._Label_1uu20_79._lifted_1uu20_93){top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg, #111111);color:var(--chures-fg-muted, #9ca3af)}:where(._hasError_1uu20_69 ._Label_1uu20_79._lifted_1uu20_93){color:var(--chures-error, #ef4444)}:where(._ErrorText_1uu20_104){display:block;margin-top:.25rem;padding-left:.875rem;font-size:var(--chures-font-xs, .75rem);color:var(--chures-error, #ef4444)}:where(._Skeleton_1uu20_112){width:100%;height:var(--chures-input-height, 3rem);border-radius:var(--chures-input-radius, .75rem);background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1uu20_1 1.5s ease-in-out infinite}@keyframes _shimmer_1jetc_1{0%{background-position:-200% 0}to{background-position:200% 0}}._ToggleContainer_1jetc_6{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}._disabled_1jetc_13{opacity:.45;cursor:not-allowed}._Track_1jetc_18{position:relative;width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:var(--chures-toggle-bg-off, rgb(255 255 255 / 13%));border:none;padding:0;cursor:pointer;transition:background .2s ease;flex-shrink:0}._Track_1jetc_18._on_1jetc_31{background:var(--chures-toggle-bg-on, var(--chures-accent, #229ED9))}._disabled_1jetc_13 ._Track_1jetc_18{cursor:not-allowed}._Thumb_1jetc_39{position:absolute;top:0;bottom:0;margin:auto 0;left:.1875rem;width:var(--chures-toggle-thumb, 1.125rem);height:var(--chures-toggle-thumb, 1.125rem);border-radius:50%;background:var(--chures-toggle-thumb-color, #ffffff);transition:left .2s ease;pointer-events:none}._Track_1jetc_18._on_1jetc_31 ._Thumb_1jetc_39{left:calc(var(--chures-toggle-width, 2.75rem) - var(--chures-toggle-thumb, 1.125rem) - .1875rem)}._Label_1jetc_57{font-size:var(--chures-font-sm, .875rem);color:var(--chures-fg, #ffffff);-webkit-user-select:none;user-select:none}._LabelSkeleton_1jetc_63{display:inline-block;width:var(--chures-toggle-label-skeleton-w, 5rem);height:var(--chures-font-sm, .875rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}._Skeleton_1jetc_78{width:var(--chures-toggle-width, 2.75rem);height:var(--chures-toggle-height, 1.5rem);border-radius:624.9375rem;background:linear-gradient(90deg,var(--chures-input-bg, #111111) 25%,var(--chures-skeleton-shine, #1e1e1e) 50%,var(--chures-input-bg, #111111) 75%);background-size:200% 100%;animation:_shimmer_1jetc_1 1.5s ease-in-out infinite}@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem;--chures-overlay: rgb(0 0 0 / 58%);--chures-side-drawer-size: 22rem;--chures-flyout-bg: #0d0d0d;--chures-flyout-min-width: 10rem;--chures-flyout-border: rgb(255 255 255 / 11%);--chures-flyout-radius: .5rem;--chures-flyout-shadow: rgb(0 0 0 / 80%);--chures-flyout-fg: rgb(255 255 255 / 55%);--chures-flyout-fg-strong: rgb(255 255 255 / 92%);--chures-flyout-fg-muted: rgb(255 255 255 / 32%);--chures-flyout-hover: rgb(255 255 255 / 4%);--chures-flyout-skeleton: rgb(255 255 255 / 7%);--chures-flyout-font: .8125rem;--chures-flyout-font-sm: .6875rem;--chures-flyout-font-md: .75rem;--chures-flyout-font-mono: "JetBrains Mono", ui-monospace, sfmono-regular, menlo, monospace}}@keyframes _panelIn_1jz2j_1{0%{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}@keyframes _shimmer_1jz2j_1{0%{background-position:-200% center}to{background-position:200% center}}._DropdownContainer_1jz2j_13{position:relative;width:100%}._PanelWrapper_1jz2j_20{position:absolute;top:calc(100% + var(--chures-dropdown-panel-gap));left:0;width:100%;animation:_panelIn_1jz2j_1 .14s ease}._PanelWrapper_1jz2j_20._Portal_1jz2j_34{position:fixed;width:auto;margin-top:var(--chures-dropdown-panel-gap)}._PanelContainer_1jz2j_18{background:var(--chures-dropdown-bg);border:1px solid var(--chures-dropdown-border);border-radius:var(--chures-dropdown-radius);overflow:hidden;box-shadow:0 1rem 3rem #000c}._PanelContainer_1jz2j_18._Glass_1jz2j_48{background:var(--chures-dropdown-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dropdown-glass-blur, 1.25rem))}._Label_1jz2j_54{position:absolute;left:.875rem;top:50%;transform:translateY(-50%);transform-origin:left center;color:var(--chures-fg-muted);font-size:var(--chures-font-sm);pointer-events:none;transition:all .18s ease;padding:0 .25rem;border-radius:.1875rem}._Label_1jz2j_54._lifted_1jz2j_68{top:0;transform:translateY(-50%) scale(.82);background:var(--chures-input-bg);color:var(--chures-fg-muted)}._TriggerContainer_1jz2j_75{width:100%;height:var(--chures-input-height);background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-trigger-border);border-radius:var(--chures-input-radius);color:var(--chures-fg);font-size:var(--chures-font-sm);font-family:inherit;padding:0 .875rem;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:.5rem;text-align:left;overflow:hidden;transition:border-color .15s ease,box-shadow .15s ease}._TriggerContainer_1jz2j_75:hover{border-color:var(--chures-dropdown-trigger-border-hover)}._TriggerContainer_1jz2j_75._Open_1jz2j_99{border-color:var(--chures-accent);box-shadow:0 0 0 .1875rem var(--chures-dropdown-trigger-focus-ring)}._TriggerPlaceholder_1jz2j_104{color:var(--chures-fg-muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerValue_1jz2j_112{color:var(--chures-fg);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._TriggerIcon_1jz2j_120{color:var(--chures-fg-muted);flex-shrink:0;display:flex;align-items:center}._ChipsWrapper_1jz2j_127{display:flex;flex-wrap:nowrap;gap:.25rem;flex:1;overflow-x:auto;overflow-y:hidden;min-width:0;align-items:center;margin:.375rem 0;scrollbar-width:none;-ms-overflow-style:none}._ChipsWrapper_1jz2j_127::-webkit-scrollbar{display:none}._ChipsWrapper_1jz2j_127._Expand_1jz2j_145{flex-wrap:wrap;overflow:visible;row-gap:.25rem}._TriggerContainer_1jz2j_75._MultiSelect_1jz2j_151 ._TriggerIcon_1jz2j_120{align-self:flex-start;height:var(--chures-input-height)}._TriggerContainer_1jz2j_75._ExpandHeight_1jz2j_156{height:auto;min-height:var(--chures-input-height)}._Chip_1jz2j_127{display:inline-flex;align-items:center;flex-shrink:0;background:var(--chures-dropdown-create-bg);border:1px solid var(--chures-dropdown-chip-border);border-radius:624.9375rem;padding:.15rem .5rem;font-size:var(--chures-font-xs);color:var(--chures-fg);white-space:nowrap;line-height:1.4}._SearchRow_1jz2j_175{padding:.5rem;border-bottom:1px solid var(--chures-dropdown-border-subtle)}._SearchBox_1jz2j_180{display:flex;align-items:center;gap:.5rem;background:var(--chures-input-bg);border:1px solid var(--chures-dropdown-border-subtle);border-radius:var(--chures-dropdown-row-radius);padding:.4rem .625rem}._SearchIcon_1jz2j_190{display:flex;align-items:center;color:var(--chures-fg-muted);flex-shrink:0}._SearchInput_1jz2j_197{flex:1;background:transparent;border:none;outline:none;font-size:var(--chures-font-sm);color:var(--chures-fg);font-family:inherit}._SearchInput_1jz2j_197::placeholder{color:var(--chures-fg-muted)}._ResultsList_1jz2j_211{max-height:13rem;overflow-y:auto}._OptionRow_1jz2j_216{padding:.5625rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);cursor:pointer;transition:background .1s ease,color .1s ease;display:flex;align-items:center;gap:.5rem}._OptionRow_1jz2j_216:hover{background:var(--chures-dropdown-hover);color:var(--chures-fg)}._OptionRow_1jz2j_216._Selected_1jz2j_231{color:var(--chures-fg)}._OptionRow_1jz2j_216._Indented_1jz2j_235{padding-left:1.875rem}._GroupHeader_1jz2j_240{padding:.5625rem .875rem .25rem;font-size:var(--chures-font-xs);color:var(--chures-fg-muted);text-transform:uppercase;letter-spacing:.03em}._GroupHeader_1jz2j_240:not(:first-child){margin-top:.25rem;border-top:1px solid var(--chures-dropdown-border-subtle)}._Checkmark_1jz2j_253{color:var(--chures-accent);font-size:var(--chures-font-xs);flex-shrink:0}._CreateRow_1jz2j_259{display:flex;align-items:center;gap:.625rem;padding:.5625rem .875rem;cursor:pointer;background:var(--chures-dropdown-create-bg);transition:background .1s ease}._CreateRow_1jz2j_259:hover{background:var(--chures-dropdown-create-bg-hover)}._CreateRow_1jz2j_259._WithBorder_1jz2j_272{border-top:1px solid var(--chures-dropdown-border-subtle)}._CreateIcon_1jz2j_277{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:50%;background:var(--chures-accent);color:#fff;flex-shrink:0}._CreateLabel_1jz2j_289{font-size:var(--chures-font-sm);font-weight:600;color:var(--chures-fg)}._EmptyHint_1jz2j_295{padding:.75rem .875rem;font-size:var(--chures-font-sm);color:var(--chures-fg-muted);font-style:italic}._SkeletonRow_1jz2j_302{height:2rem;margin:.375rem .875rem;border-radius:var(--chures-dropdown-row-radius);background:linear-gradient(90deg,var(--chures-dropdown-bg) 25%,var(--chures-skeleton-shine) 50%,var(--chures-dropdown-bg) 75%);background-size:200% 100%;animation:_shimmer_1jz2j_1 1.4s infinite linear}:where(._Btn_1tozl_10){display:inline-flex;align-items:center;justify-content:center;gap:.375rem;border-radius:.625rem;border:1px solid transparent;font-family:inherit;font-size:.8125rem;font-weight:500;cursor:pointer;padding:.625rem 1rem;transition:all .16s ease;white-space:nowrap;color:var(--chures-fg, #ffffff);background:var(--chures-button-bg)}:where(._Btn_1tozl_10):disabled{opacity:.4;cursor:not-allowed}:where(._Primary_1tozl_35){background:var(--chures-accent, #229ED9);border-color:var(--chures-accent, #229ED9);color:#fff;font-weight:600;padding:.625rem 1.125rem;box-shadow:0 10px 28px -12px var(--chures-accent-muted, rgb(34 158 217 / 50%));transition:filter .16s ease,opacity .16s ease}:where(._Primary_1tozl_35):hover:not(:disabled){filter:brightness(1.06)}:where(._Secondary_1tozl_50){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Secondary_1tozl_50):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._Ghost_1tozl_62){background:transparent;border-color:#ffffff24;color:var(--chures-fg-muted, #9ca3af)}:where(._Ghost_1tozl_62):hover:not(:disabled){color:var(--chures-fg, #ffffff);border-color:#ffffff47}:where(._IconDanger_1tozl_74){width:1.375rem;height:1.375rem;padding:0;border:0;border-radius:.375rem;background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:1rem;line-height:1;justify-content:center;flex-shrink:0;transition:background .14s ease,color .14s ease}:where(._IconDanger_1tozl_74):hover:not(:disabled){background:#ef44441f;color:var(--chures-error, #ef4444)}:where(._Danger_1tozl_95){background:transparent;border-color:#ef444466;color:var(--chures-error, #ef4444);transition:background .16s ease,border-color .16s ease}:where(._Danger_1tozl_95):hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._ConfirmWrapper_1tq4o_4{width:100%;max-width:24rem;animation:_confirmIn_1tq4o_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _confirmIn_1tq4o_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._ConfirmContainer_1tq4o_1{width:100%;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c}._Glass_1tq4o_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._ConfirmTitle_1tq4o_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._ConfirmMessage_1tq4o_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._ConfirmActions_1tq4o_45{display:flex;align-items:center;justify-content:flex-end;gap:.625rem;margin-top:1.5rem}._BtnCancel_1tq4o_53{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnCancel_1tq4o_53:hover:not(:disabled){background:#ffffff14;color:var(--chures-fg, #ffffff)}._BtnConfirm_1tq4o_73{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid var(--chures-accent, #229ED9);background:var(--chures-accent, #229ED9);color:#fff;font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:filter .16s ease,opacity .16s ease}._BtnConfirm_1tq4o_73:hover:not(:disabled){filter:brightness(1.06)}._BtnDanger_1tq4o_92{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(239 68 68 / 40%);background:transparent;color:var(--chures-error, #ef4444);font-size:.8125rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .16s ease,border-color .16s ease}._BtnDanger_1tq4o_92:hover:not(:disabled){background:#ef44441a;border-color:var(--chures-error, #ef4444)}._BtnConfirm_1tq4o_73:disabled,._BtnDanger_1tq4o_92:disabled,._BtnCancel_1tq4o_53:disabled{opacity:.4;cursor:not-allowed}._InfoWrapper_cqv58_4{width:100%;max-width:24rem;animation:_infoIn_cqv58_1 .28s cubic-bezier(.2,.7,.2,1) both}@keyframes _infoIn_cqv58_1{0%{opacity:0;transform:translateY(.75rem) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}._InfoContainer_cqv58_1{width:100%;background:var(--chures-surface, #000000);border:1px solid rgb(255 255 255 / 14%);border-radius:1.25rem;padding:1.75rem 1.75rem 1.5rem;box-shadow:0 32px 80px -20px #000c}._Glass_cqv58_24{background:var(--chures-dialog-glass-bg, rgb(255 255 255 / 6%));backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem));-webkit-backdrop-filter:blur(var(--chures-dialog-glass-blur, 1.25rem))}._InfoTitle_cqv58_30{font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:var(--chures-fg, #ffffff);margin-bottom:.75rem}._InfoMessage_cqv58_38{font-size:.875rem;color:var(--chures-fg-muted, #9ca3af);line-height:1.5;letter-spacing:-.005em}._InfoActions_cqv58_45{display:flex;align-items:center;justify-content:flex-end;margin-top:1.5rem}._BtnClose_cqv58_52{display:inline-flex;align-items:center;padding:.625rem 1.125rem;border-radius:.625rem;border:1px solid rgb(255 255 255 / 14%);background:transparent;color:var(--chures-fg-muted, #9ca3af);font-size:.8125rem;font-weight:500;font-family:inherit;cursor:pointer;transition:background .16s ease,color .16s ease}._BtnClose_cqv58_52:hover{background:#ffffff14;color:var(--chures-fg, #ffffff)}:where(._Backdrop_1w1e3_7){position:fixed;inset:0;background:var(--chures-overlay, rgb(0 0 0 / 58%));opacity:0;pointer-events:none;transition:opacity .26s ease}:where(._BackdropOpen_1w1e3_16){opacity:1;pointer-events:auto}:where(._Panel_1w1e3_21){position:fixed;display:flex;flex-direction:column;overflow:hidden;background:var(--chures-surface, #000000);box-shadow:0 0 3rem #00000059;transition:transform .28s cubic-bezier(.32,0,0,1)}:where(._Right_1w1e3_31){top:0;right:0;bottom:0;width:var(--chures-side-drawer-size, 22rem);max-width:100vw;transform:translate(100%)}:where(._Left_1w1e3_40){top:0;bottom:0;left:0;width:var(--chures-side-drawer-size, 22rem);max-width:100vw;transform:translate(-100%)}:where(._Top_1w1e3_49){top:0;left:0;right:0;height:var(--chures-side-drawer-size, 22rem);max-height:100vh;transform:translateY(-100%)}:where(._Bottom_1w1e3_58){left:0;right:0;bottom:0;height:var(--chures-side-drawer-size, 22rem);max-height:100vh;transform:translateY(100%)}:where(._PanelOpen_1w1e3_67){transform:translate(0)}@layer chures-defaults{:root{--chures-accent: #229ED9;--chures-accent-muted: rgb(34 158 217 / 50%);--chures-btn-from: #2AABEE;--chures-btn-to: #229ED9;--chures-button-bg: var(--chures-accent);--chures-error: #ef4444;--chures-warn: #f59e0b;--chures-bg: #000000;--chures-fg: #ffffff;--chures-fg-muted: #9ca3af;--chures-surface: #000000;--chures-font-sm: .875rem;--chures-font-xs: .75rem;--chures-input-bg: #111111;--chures-input-height: 3rem;--chures-input-radius: .75rem;--chures-skeleton-shine: #1e1e1e;--chures-toggle-width: 2.75rem;--chures-toggle-height: 1.5rem;--chures-toggle-thumb: 1.125rem;--chures-toggle-bg-off: rgb(255 255 255 / 13%);--chures-toggle-bg-on: var(--chures-accent);--chures-toggle-thumb-color: #ffffff;--chures-toggle-label-skeleton-w: 5rem;--chures-dropdown-bg: var(--chures-bg);--chures-dropdown-radius: .75rem;--chures-dropdown-row-radius: .375rem;--chures-dropdown-border: var(--chures-accent);--chures-dropdown-border-subtle: var(--chures-accent-muted);--chures-dropdown-hover: rgb(255 255 255 / 8%);--chures-dropdown-create-bg: rgb(34 158 217 / 12%);--chures-dropdown-create-bg-hover: rgb(34 158 217 / 20%);--chures-dropdown-trigger-border: rgb(255 255 255 / 22%);--chures-dropdown-trigger-border-hover: rgb(255 255 255 / 38%);--chures-dropdown-trigger-focus-ring: rgb(34 158 217 / 15%);--chures-dropdown-chip-border: rgb(34 158 217 / 30%);--chures-dropdown-panel-gap: .375rem;--chures-dropdown-glass-bg: rgb(255 255 255 / 6%);--chures-dropdown-glass-blur: 1.25rem;--chures-dialog-glass-bg: rgb(255 255 255 / 6%);--chures-dialog-glass-blur: 1.25rem;--chures-overlay: rgb(0 0 0 / 58%);--chures-side-drawer-size: 22rem;--chures-flyout-bg: #0d0d0d;--chures-flyout-min-width: 10rem;--chures-flyout-border: rgb(255 255 255 / 11%);--chures-flyout-radius: .5rem;--chures-flyout-shadow: rgb(0 0 0 / 80%);--chures-flyout-fg: rgb(255 255 255 / 55%);--chures-flyout-fg-strong: rgb(255 255 255 / 92%);--chures-flyout-fg-muted: rgb(255 255 255 / 32%);--chures-flyout-hover: rgb(255 255 255 / 4%);--chures-flyout-skeleton: rgb(255 255 255 / 7%);--chures-flyout-font: .8125rem;--chures-flyout-font-sm: .6875rem;--chures-flyout-font-md: .75rem;--chures-flyout-font-mono: "JetBrains Mono", ui-monospace, sfmono-regular, menlo, monospace}}._FlyoutMenuContainer_1q0ma_5{display:contents}._Backdrop_1q0ma_9{position:fixed;inset:0}._Panel_1q0ma_14{position:fixed;display:flex;flex-direction:column;min-width:var(--chures-flyout-min-width);padding:.35rem;background:var(--chures-flyout-bg);border:1px solid var(--chures-flyout-border);border-radius:var(--chures-flyout-radius);box-shadow:0 1rem 2.5rem -.75rem var(--chures-flyout-shadow);overflow-y:auto}._Submenu_1q0ma_27{position:fixed;display:flex;flex-direction:column;min-width:var(--chures-flyout-min-width);background:var(--chures-flyout-bg);border:1px solid var(--chures-flyout-border);border-radius:var(--chures-flyout-radius);box-shadow:0 1rem 2.5rem -.75rem var(--chures-flyout-shadow);overflow-y:auto}._FlyoutPanelContainer_1q0ma_41{display:flex;flex-direction:column;gap:.15rem}._Back_1q0ma_9{display:flex;align-items:center;justify-content:flex-start;gap:.4rem;padding:.4rem .55rem;border:1px solid transparent;border-radius:var(--chures-flyout-radius);background:transparent;color:var(--chures-flyout-fg);font-size:var(--chures-flyout-font);text-align:left;cursor:pointer;transition:background .14s ease,color .14s ease}._Back_1q0ma_9:hover{background:var(--chures-flyout-hover);color:var(--chures-flyout-fg-strong)}._Chevron_1q0ma_68{flex-shrink:0;color:var(--chures-flyout-fg-muted)}._MenuListContainer_1q0ma_75{display:flex;flex-direction:column;gap:.15rem}._Heading_1q0ma_81{padding:.35rem .55rem .25rem;color:var(--chures-flyout-fg-muted);font-family:var(--chures-flyout-font-mono);font-size:var(--chures-flyout-font-sm);letter-spacing:.06rem;text-transform:uppercase}._Divider_1q0ma_90{height:1px;margin:.3rem .2rem;background:var(--chures-flyout-border)}._MenuRowContainer_1q0ma_98{display:flex}._MenuRowContainer_1q0ma_98._Dim_1q0ma_102{opacity:.5}._Row_1q0ma_106{display:flex;flex:1;min-width:0;align-items:center;justify-content:flex-start;gap:.5rem;padding:.4rem .55rem;overflow:hidden;border:1px solid transparent;border-radius:var(--chures-flyout-radius);background:transparent;color:var(--chures-flyout-fg);font-size:var(--chures-flyout-font);text-align:left;cursor:pointer;transition:background .14s ease,color .14s ease}._Row_1q0ma_106:hover:not(:disabled){background:var(--chures-flyout-hover);color:var(--chures-flyout-fg-strong)}._Row_1q0ma_106:disabled{color:var(--chures-flyout-fg-muted);cursor:default}._Icon_1q0ma_135{display:flex;flex-shrink:0}._Label_1q0ma_140{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._Arrow_1q0ma_148{flex-shrink:0;color:var(--chures-flyout-fg-muted);font-size:var(--chures-flyout-font-md)}._MenuSkeletonContainer_1q0ma_156{display:flex;flex-direction:column;gap:.15rem;padding:.35rem .5rem}._MenuSkeletonRow_1q0ma_163{height:1.75rem;border-radius:var(--chures-flyout-radius);background:var(--chures-flyout-skeleton);animation:_churesFlyoutSkeletonPulse_1q0ma_1 1.5s ease-in-out infinite}._MenuSkeletonRow_1q0ma_163:nth-child(2){animation-delay:.15s}._MenuSkeletonRow_1q0ma_163:nth-child(3){animation-delay:.3s}@keyframes _churesFlyoutSkeletonPulse_1q0ma_1{0%,to{opacity:1}50%{opacity:.4}}._MenuSearchFieldContainer_1q0ma_191{overflow:hidden;padding-bottom:.35rem}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { jsx as o, jsxs as m, Fragment as H } from "react/jsx-runtime";
3
+ import { createContext as je, useContext as Pe, useRef as T, useState as S, useEffect as b, forwardRef as Je, useCallback as E, useLayoutEffect as Ne, Fragment as he, useMemo as Me } from "react";
4
+ import { AnimatePresence as le, motion as oe } from "framer-motion";
5
+ import { create as Ze } from "zustand";
6
+ import { createPortal as Ie } from "react-dom";
7
+ function en(e) {
8
8
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
9
9
  }
10
- var ue = { exports: {} };
11
- var ve;
12
- function Ue() {
13
- return ve || (ve = 1, (function(e) {
10
+ var me = { exports: {} };
11
+ var Re;
12
+ function nn() {
13
+ return Re || (Re = 1, (function(e) {
14
14
  (function() {
15
15
  var n = {}.hasOwnProperty;
16
- function o() {
16
+ function r() {
17
17
  for (var a = "", i = 0; i < arguments.length; i++) {
18
- var l = arguments[i];
19
- l && (a = s(a, r(l)));
18
+ var c = arguments[i];
19
+ c && (a = s(a, t(c)));
20
20
  }
21
21
  return a;
22
22
  }
23
- function r(a) {
23
+ function t(a) {
24
24
  if (typeof a == "string" || typeof a == "number")
25
25
  return a;
26
26
  if (typeof a != "object")
27
27
  return "";
28
28
  if (Array.isArray(a))
29
- return o.apply(null, a);
29
+ return r.apply(null, a);
30
30
  if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]"))
31
31
  return a.toString();
32
32
  var i = "";
33
- for (var l in a)
34
- n.call(a, l) && a[l] && (i = s(i, l));
33
+ for (var c in a)
34
+ n.call(a, c) && a[c] && (i = s(i, c));
35
35
  return i;
36
36
  }
37
37
  function s(a, i) {
38
38
  return i ? a ? a + " " + i : a + i : a;
39
39
  }
40
- e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
40
+ e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
41
41
  })();
42
- })(ue)), ue.exports;
43
- }
44
- var Ge = Ue();
45
- const p = /* @__PURE__ */ Fe(Ge), qe = "_LoaderContainer_wa8op_24", $e = "_sm_wa8op_31", He = "_md_wa8op_32", Ve = "_lg_wa8op_33", Ke = "_Arc1_wa8op_37", Xe = "_Arc2_wa8op_38", Ye = "_Arc3_wa8op_39", Qe = "_spin_wa8op_1", Je = "_Ring1_wa8op_71", Ze = "_Ring2_wa8op_72", en = "_Ring3_wa8op_73", nn = "_ripple_wa8op_1", tn = "_Dot1_wa8op_86", on = "_Dot2_wa8op_87", rn = "_Dot3_wa8op_88", sn = "_dotPulse_wa8op_1", an = "_Wave1_wa8op_105", cn = "_Wave2_wa8op_106", ln = "_Wave3_wa8op_107", dn = "_Wave4_wa8op_108", un = "_Wave5_wa8op_109", _n = "_waveBounce_wa8op_1", oe = {
46
- LoaderContainer: qe,
47
- sm: $e,
48
- md: He,
49
- lg: Ve,
50
- Arc1: Ke,
51
- Arc2: Xe,
52
- Arc3: Ye,
53
- spin: Qe,
54
- Ring1: Je,
55
- Ring2: Ze,
56
- Ring3: en,
57
- ripple: nn,
58
- Dot1: tn,
59
- Dot2: on,
60
- Dot3: rn,
61
- dotPulse: sn,
62
- Wave1: an,
63
- Wave2: cn,
64
- Wave3: ln,
65
- Wave4: dn,
66
- Wave5: un,
67
- waveBounce: _n
68
- }, Te = Oe({});
69
- function v(e, n) {
70
- const o = Pe(Te);
71
- return n ?? o[e];
72
- }
73
- function pn(e, n) {
42
+ })(me)), me.exports;
43
+ }
44
+ var tn = nn();
45
+ const g = /* @__PURE__ */ en(tn), on = "_LoaderContainer_wa8op_24", rn = "_sm_wa8op_31", sn = "_md_wa8op_32", an = "_lg_wa8op_33", cn = "_Arc1_wa8op_37", ln = "_Arc2_wa8op_38", un = "_Arc3_wa8op_39", dn = "_spin_wa8op_1", _n = "_Ring1_wa8op_71", fn = "_Ring2_wa8op_72", hn = "_Ring3_wa8op_73", mn = "_ripple_wa8op_1", pn = "_Dot1_wa8op_86", gn = "_Dot2_wa8op_87", Cn = "_Dot3_wa8op_88", vn = "_dotPulse_wa8op_1", wn = "_Wave1_wa8op_105", yn = "_Wave2_wa8op_106", Nn = "_Wave3_wa8op_107", In = "_Wave4_wa8op_108", Sn = "_Wave5_wa8op_109", kn = "_waveBounce_wa8op_1", ae = {
46
+ LoaderContainer: on,
47
+ sm: rn,
48
+ md: sn,
49
+ lg: an,
50
+ Arc1: cn,
51
+ Arc2: ln,
52
+ Arc3: un,
53
+ spin: dn,
54
+ Ring1: _n,
55
+ Ring2: fn,
56
+ Ring3: hn,
57
+ ripple: mn,
58
+ Dot1: pn,
59
+ Dot2: gn,
60
+ Dot3: Cn,
61
+ dotPulse: vn,
62
+ Wave1: wn,
63
+ Wave2: yn,
64
+ Wave3: Nn,
65
+ Wave4: In,
66
+ Wave5: Sn,
67
+ waveBounce: kn
68
+ }, Oe = je({});
69
+ function L(e, n) {
70
+ const r = Pe(Oe);
71
+ return n ?? r[e];
72
+ }
73
+ function Rn(e, n) {
74
74
  switch (e) {
75
75
  case "ripple":
76
- return /* @__PURE__ */ _(B, { children: [
77
- /* @__PURE__ */ t("div", { className: n.Ring1 }),
78
- /* @__PURE__ */ t("div", { className: n.Ring2 }),
79
- /* @__PURE__ */ t("div", { className: n.Ring3 })
76
+ return /* @__PURE__ */ m(H, { children: [
77
+ /* @__PURE__ */ o("div", { className: n.Ring1 }),
78
+ /* @__PURE__ */ o("div", { className: n.Ring2 }),
79
+ /* @__PURE__ */ o("div", { className: n.Ring3 })
80
80
  ] });
81
81
  case "dots":
82
- return /* @__PURE__ */ _(B, { children: [
83
- /* @__PURE__ */ t("div", { className: n.Dot1 }),
84
- /* @__PURE__ */ t("div", { className: n.Dot2 }),
85
- /* @__PURE__ */ t("div", { className: n.Dot3 })
82
+ return /* @__PURE__ */ m(H, { children: [
83
+ /* @__PURE__ */ o("div", { className: n.Dot1 }),
84
+ /* @__PURE__ */ o("div", { className: n.Dot2 }),
85
+ /* @__PURE__ */ o("div", { className: n.Dot3 })
86
86
  ] });
87
87
  case "wave":
88
- return /* @__PURE__ */ _(B, { children: [
89
- /* @__PURE__ */ t("div", { className: n.Wave1 }),
90
- /* @__PURE__ */ t("div", { className: n.Wave2 }),
91
- /* @__PURE__ */ t("div", { className: n.Wave3 }),
92
- /* @__PURE__ */ t("div", { className: n.Wave4 }),
93
- /* @__PURE__ */ t("div", { className: n.Wave5 })
88
+ return /* @__PURE__ */ m(H, { children: [
89
+ /* @__PURE__ */ o("div", { className: n.Wave1 }),
90
+ /* @__PURE__ */ o("div", { className: n.Wave2 }),
91
+ /* @__PURE__ */ o("div", { className: n.Wave3 }),
92
+ /* @__PURE__ */ o("div", { className: n.Wave4 }),
93
+ /* @__PURE__ */ o("div", { className: n.Wave5 })
94
94
  ] });
95
95
  default:
96
- return /* @__PURE__ */ _(B, { children: [
97
- /* @__PURE__ */ t("div", { className: n.Arc1 }),
98
- /* @__PURE__ */ t("div", { className: n.Arc2 }),
99
- /* @__PURE__ */ t("div", { className: n.Arc3 })
96
+ return /* @__PURE__ */ m(H, { children: [
97
+ /* @__PURE__ */ o("div", { className: n.Arc1 }),
98
+ /* @__PURE__ */ o("div", { className: n.Arc2 }),
99
+ /* @__PURE__ */ o("div", { className: n.Arc3 })
100
100
  ] });
101
101
  }
102
102
  }
103
- function fn({ variant: e = "arcs", size: n = "md", color: o, className: r }) {
104
- const s = v("Loader", r);
105
- return /* @__PURE__ */ t(
103
+ function Tn({ variant: e = "arcs", size: n = "md", color: r, className: t }) {
104
+ const s = L("Loader", t);
105
+ return /* @__PURE__ */ o(
106
106
  "div",
107
107
  {
108
- className: p(oe.LoaderContainer, oe[n], oe[e], s),
108
+ className: g(ae.LoaderContainer, ae[n], ae[e], s),
109
109
  role: "status",
110
110
  "aria-label": "Loading",
111
- style: o ? { "--chures-accent": o } : void 0,
112
- children: pn(e, oe)
111
+ style: r ? { "--chures-accent": r } : void 0,
112
+ children: Rn(e, ae)
113
113
  }
114
114
  );
115
115
  }
116
- const hn = "_LoadingWrapperContainer_1q0w7_1", mn = "_SkeletonWrapper_1q0w7_9", we = {
117
- LoadingWrapperContainer: hn,
118
- SkeletonWrapper: mn
116
+ const bn = "_LoadingWrapperContainer_1q0w7_1", Ln = "_SkeletonWrapper_1q0w7_9", Te = {
117
+ LoadingWrapperContainer: bn,
118
+ SkeletonWrapper: Ln
119
119
  };
120
- function Wo({ isLoading: e, children: n, skeleton: o, loaderProps: r, className: s }) {
121
- const a = v("LoadingWrapper", s);
122
- return e ? o ? /* @__PURE__ */ t("div", { className: p(we.SkeletonWrapper, a), children: o }) : /* @__PURE__ */ t("div", { className: p(we.LoadingWrapperContainer, a), children: /* @__PURE__ */ t(fn, { ...r }) }) : /* @__PURE__ */ t(B, { children: n });
120
+ function Mr({ isLoading: e, children: n, skeleton: r, loaderProps: t, className: s }) {
121
+ const a = L("LoadingWrapper", s);
122
+ return e ? r ? /* @__PURE__ */ o("div", { className: g(Te.SkeletonWrapper, a), children: r }) : /* @__PURE__ */ o("div", { className: g(Te.LoadingWrapperContainer, a), children: /* @__PURE__ */ o(Tn, { ...t }) }) : /* @__PURE__ */ o(H, { children: n });
123
123
  }
124
- const gn = "https://oauth.telegram.org/js/telegram-login.js?3";
125
- function Cn(e) {
126
- const { botId: n, redirectUri: o, requestAccess: r = "write" } = e, s = G(e.onSuccess);
124
+ const Dn = "https://oauth.telegram.org/js/telegram-login.js?3";
125
+ function En(e) {
126
+ const { botId: n, redirectUri: r, requestAccess: t = "write" } = e, s = T(e.onSuccess);
127
127
  s.current = e.onSuccess;
128
- const a = G(!1), [i, l] = N(!1), [f, d] = N(!1);
128
+ const a = T(!1), [i, c] = S(!1), [d, u] = S(!1);
129
129
  b(function() {
130
130
  if (!n) return;
131
- const m = o ?? window.location.origin;
132
- d(!0), l(!1);
133
- const g = document.createElement("script");
134
- return g.src = gn, g.async = !0, g.onload = function() {
135
- const y = window.Telegram;
136
- y && (y.Login.init(
137
- { client_id: n, redirect_uri: m },
138
- function(x) {
139
- a.current || (a.current = !0, s.current(x));
131
+ const _ = r ?? window.location.origin;
132
+ u(!0), c(!1);
133
+ const p = document.createElement("script");
134
+ return p.src = Dn, p.async = !0, p.onload = function() {
135
+ const C = window.Telegram;
136
+ C && (C.Login.init(
137
+ { client_id: n, redirect_uri: _ },
138
+ function(y) {
139
+ a.current || (a.current = !0, s.current(y));
140
140
  }
141
- ), l(!0)), d(!1);
142
- }, g.onerror = function() {
143
- d(!1);
144
- }, document.head.appendChild(g), function() {
145
- document.head.contains(g) && document.head.removeChild(g), l(!1), d(!1);
141
+ ), c(!0)), u(!1);
142
+ }, p.onerror = function() {
143
+ u(!1);
144
+ }, document.head.appendChild(p), function() {
145
+ document.head.contains(p) && document.head.removeChild(p), c(!1), u(!1);
146
146
  };
147
- }, [n, o]);
148
- function h() {
149
- const m = window.Telegram;
150
- if (!i || !m) return;
147
+ }, [n, r]);
148
+ function l() {
149
+ const _ = window.Telegram;
150
+ if (!i || !_) return;
151
151
  a.current = !1;
152
- const g = o ?? window.location.origin;
153
- m.Login.auth(
154
- { client_id: n, redirect_uri: g, request_access: r },
155
- function(y) {
156
- a.current || (a.current = !0, s.current(y));
152
+ const p = r ?? window.location.origin;
153
+ _.Login.auth(
154
+ { client_id: n, redirect_uri: p, request_access: t },
155
+ function(C) {
156
+ a.current || (a.current = !0, s.current(C));
157
157
  }
158
158
  );
159
159
  }
160
- return { login: h, isReady: i, isLoading: f };
160
+ return { login: l, isReady: i, isLoading: d };
161
161
  }
162
- const vn = "_TelegramSignInButtonContainer_10wun_1", wn = "_FullSize_10wun_46", In = "_Icon_10wun_50", pe = {
163
- TelegramSignInButtonContainer: vn,
164
- FullSize: wn,
165
- Icon: In
166
- }, Nn = {
162
+ const Bn = "_TelegramSignInButtonContainer_10wun_1", An = "_FullSize_10wun_46", xn = "_Icon_10wun_50", ge = {
163
+ TelegramSignInButtonContainer: Bn,
164
+ FullSize: An,
165
+ Icon: xn
166
+ }, jn = {
167
167
  en: "Continue with Telegram",
168
168
  ru: "Войти через Telegram"
169
169
  };
170
- function yn() {
171
- return /* @__PURE__ */ t(
170
+ function Pn() {
171
+ return /* @__PURE__ */ o(
172
172
  "svg",
173
173
  {
174
174
  viewBox: "0 0 24 24",
@@ -176,283 +176,283 @@ function yn() {
176
176
  height: "20",
177
177
  fill: "currentColor",
178
178
  "aria-hidden": "true",
179
- className: pe.Icon,
180
- children: /* @__PURE__ */ t("path", { d: "M22 3.5L2.5 11l5 1.7L18 6 9.7 14l-.4 5.5 3.4-3.2 5.5 4c.9.5 1.5.2 1.7-.8L22 4.3c.2-.7-.2-1.1-.9-.8z" })
179
+ className: ge.Icon,
180
+ children: /* @__PURE__ */ o("path", { d: "M22 3.5L2.5 11l5 1.7L18 6 9.7 14l-.4 5.5 3.4-3.2 5.5 4c.9.5 1.5.2 1.7-.8L22 4.3c.2-.7-.2-1.1-.9-.8z" })
181
181
  }
182
182
  );
183
183
  }
184
- function kn({
184
+ function Mn({
185
185
  onClick: e,
186
186
  disabled: n,
187
- lang: o = "en",
188
- title: r,
187
+ lang: r = "en",
188
+ title: t,
189
189
  label: s,
190
190
  fullSize: a,
191
191
  className: i
192
192
  }) {
193
193
  b(function() {
194
- const h = "comfortaa-font";
195
- if (document.getElementById(h)) return;
196
- const m = document.createElement("link");
197
- m.id = h, m.rel = "stylesheet", m.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(m);
194
+ const l = "comfortaa-font";
195
+ if (document.getElementById(l)) return;
196
+ const _ = document.createElement("link");
197
+ _.id = l, _.rel = "stylesheet", _.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(_);
198
198
  }, []);
199
- const l = s ?? r ?? Nn[o], f = v("TelegramSignInButton", i), d = p(pe.TelegramSignInButtonContainer, { [pe.FullSize]: a }, f);
200
- return /* @__PURE__ */ _("button", { type: "button", className: d, onClick: e, disabled: n, children: [
201
- /* @__PURE__ */ t(yn, {}),
202
- l
199
+ const c = s ?? t ?? jn[r], d = L("TelegramSignInButton", i), u = g(ge.TelegramSignInButtonContainer, { [ge.FullSize]: a }, d);
200
+ return /* @__PURE__ */ m("button", { type: "button", className: u, onClick: e, disabled: n, children: [
201
+ /* @__PURE__ */ o(Pn, {}),
202
+ c
203
203
  ] });
204
204
  }
205
- function zo({
205
+ function Or({
206
206
  botId: e,
207
207
  onSuccess: n,
208
- lang: o,
209
- title: r,
208
+ lang: r,
209
+ title: t,
210
210
  redirectUri: s,
211
211
  requestAccess: a,
212
212
  children: i,
213
- className: l
213
+ className: c
214
214
  }) {
215
- const { login: f, isReady: d } = Cn({ botId: e, onSuccess: n, redirectUri: s, requestAccess: a });
216
- return i ? /* @__PURE__ */ t(B, { children: i({ login: f, isReady: d }) }) : /* @__PURE__ */ t(
217
- kn,
215
+ const { login: d, isReady: u } = En({ botId: e, onSuccess: n, redirectUri: s, requestAccess: a });
216
+ return i ? /* @__PURE__ */ o(H, { children: i({ login: d, isReady: u }) }) : /* @__PURE__ */ o(
217
+ Mn,
218
218
  {
219
- onClick: f,
220
- disabled: !d,
221
- lang: o,
222
- title: r,
223
- className: l
219
+ onClick: d,
220
+ disabled: !u,
221
+ lang: r,
222
+ title: t,
223
+ className: c
224
224
  }
225
225
  );
226
226
  }
227
- let Ln = 0;
228
- const Re = Me((e, n) => ({
227
+ let On = 0;
228
+ const We = Ze((e, n) => ({
229
229
  toasts: [],
230
- bake: (o) => {
231
- const r = Ln++;
232
- e((s) => ({ toasts: [...s.toasts, { ...o, id: r }] })), setTimeout(() => {
233
- n().dismiss(r);
230
+ bake: (r) => {
231
+ const t = On++;
232
+ e((s) => ({ toasts: [...s.toasts, { ...r, id: t }] })), setTimeout(() => {
233
+ n().dismiss(t);
234
234
  }, 5e3);
235
235
  },
236
- dismiss: (o) => {
237
- e((r) => ({
238
- toasts: r.toasts.filter((s) => s.id !== o)
236
+ dismiss: (r) => {
237
+ e((t) => ({
238
+ toasts: t.toasts.filter((s) => s.id !== r)
239
239
  }));
240
240
  }
241
- })), Tn = "_ToastContainer_1tme2_1", Rn = "_Toast_1tme2_1", Sn = "_error_1tme2_33", Dn = "_warn_1tme2_41", En = "_info_1tme2_49", jn = "_Description_1tme2_53", Bn = "_DismissButton_1tme2_59", bn = "_slideIn_1tme2_79", An = "_slideOut_1tme2_83", j = {
242
- ToastContainer: Tn,
243
- Toast: Rn,
244
- error: Sn,
245
- warn: Dn,
246
- info: En,
247
- Description: jn,
248
- DismissButton: Bn,
249
- slideIn: bn,
250
- slideOut: An
241
+ })), Wn = "_ToastContainer_1tme2_1", Fn = "_Toast_1tme2_1", qn = "_error_1tme2_33", zn = "_warn_1tme2_41", Hn = "_info_1tme2_49", Un = "_Description_1tme2_53", Gn = "_DismissButton_1tme2_59", $n = "_slideIn_1tme2_79", Vn = "_slideOut_1tme2_83", z = {
242
+ ToastContainer: Wn,
243
+ Toast: Fn,
244
+ error: qn,
245
+ warn: zn,
246
+ info: Hn,
247
+ Description: Un,
248
+ DismissButton: Gn,
249
+ slideIn: $n,
250
+ slideOut: Vn
251
251
  };
252
- function Mo({ className: e } = {}) {
253
- const { toasts: n } = Re(), o = v("Toaster", e);
254
- return /* @__PURE__ */ t("div", { className: p(j.ToastContainer, o), children: /* @__PURE__ */ t(We, { children: n.map((r) => /* @__PURE__ */ t(
255
- ze.div,
252
+ function Wr({ className: e } = {}) {
253
+ const { toasts: n } = We(), r = L("Toaster", e);
254
+ return /* @__PURE__ */ o("div", { className: g(z.ToastContainer, r), children: /* @__PURE__ */ o(le, { children: n.map((t) => /* @__PURE__ */ o(
255
+ oe.div,
256
256
  {
257
257
  layout: !0,
258
258
  initial: { opacity: 0, x: 100, y: 50 },
259
259
  animate: { opacity: 1, x: 0, y: 0 },
260
260
  exit: { opacity: 0, y: -50 },
261
261
  transition: { type: "spring", stiffness: 300, damping: 20 },
262
- children: /* @__PURE__ */ t(On, { ...r })
262
+ children: /* @__PURE__ */ o(Kn, { ...t })
263
263
  },
264
- r.id
264
+ t.id
265
265
  )) }) });
266
266
  }
267
- function On({ id: e, title: n, description: o, level: r, isDismissable: s }) {
268
- const [a, i] = N(!1), l = Re();
267
+ function Kn({ id: e, title: n, description: r, level: t, isDismissable: s }) {
268
+ const [a, i] = S(!1), c = We();
269
269
  return b(() => () => {
270
270
  i(!0);
271
- }, []), /* @__PURE__ */ _(
271
+ }, []), /* @__PURE__ */ m(
272
272
  "div",
273
273
  {
274
- className: p(j.Toast, {
275
- [j.error]: r === "Error",
276
- [j.warn]: r === "Warn",
277
- [j.info]: r == null || r === "Info",
278
- [j.slideIn]: !a,
279
- [j.slideOut]: a
274
+ className: g(z.Toast, {
275
+ [z.error]: t === "Error",
276
+ [z.warn]: t === "Warn",
277
+ [z.info]: t == null || t === "Info",
278
+ [z.slideIn]: !a,
279
+ [z.slideOut]: a
280
280
  }),
281
281
  children: [
282
- /* @__PURE__ */ t("div", { children: n }),
283
- /* @__PURE__ */ t("div", { className: j.Description, children: o }),
284
- s && e !== void 0 && /* @__PURE__ */ t("div", { className: j.DismissButton, onClick: () => l.dismiss(e), children: "×" })
282
+ /* @__PURE__ */ o("div", { children: n }),
283
+ /* @__PURE__ */ o("div", { className: z.Description, children: r }),
284
+ s && e !== void 0 && /* @__PURE__ */ o("div", { className: z.DismissButton, onClick: () => c.dismiss(e), children: "×" })
285
285
  ]
286
286
  }
287
287
  );
288
288
  }
289
- const Pn = "_InputContainer_1uu20_15", xn = "_InputField_1uu20_21", Wn = "_hasStartIcon_1uu20_35", zn = "_hasEndIcon_1uu20_39", Mn = "_StartIcon_1uu20_43", Fn = "_EndIcon_1uu20_54", Un = "_hasError_1uu20_69", Gn = "_disabled_1uu20_74", qn = "_Label_1uu20_79", $n = "_lifted_1uu20_93", Hn = "_ErrorText_1uu20_104", Vn = "_Skeleton_1uu20_112", w = {
290
- InputContainer: Pn,
291
- InputField: xn,
292
- hasStartIcon: Wn,
293
- hasEndIcon: zn,
294
- StartIcon: Mn,
295
- EndIcon: Fn,
296
- hasError: Un,
297
- disabled: Gn,
298
- Label: qn,
299
- lifted: $n,
300
- ErrorText: Hn,
301
- Skeleton: Vn
302
- }, Fo = xe(function({ value: n, setValue: o, label: r, isLoader: s, type: a = "text", disabled: i, error: l, className: f, inputClassName: d, startIcon: h, endIcon: m, ...g }, y) {
303
- const [x, W] = N(!1), V = x || n.length > 0, T = v("Input", f), { onFocus: z, onBlur: K, ...q } = g;
304
- return s ? /* @__PURE__ */ t("div", { className: p(w.Skeleton, T), "aria-hidden": "true" }) : /* @__PURE__ */ _("div", { className: p(w.InputContainer, { [w.hasError]: !!l, [w.disabled]: i }, T), children: [
305
- h && /* @__PURE__ */ t("span", { className: w.StartIcon, children: h }),
306
- /* @__PURE__ */ t(
289
+ const Xn = "_InputContainer_1uu20_15", Qn = "_InputField_1uu20_21", Yn = "_hasStartIcon_1uu20_35", Jn = "_hasEndIcon_1uu20_39", Zn = "_StartIcon_1uu20_43", et = "_EndIcon_1uu20_54", nt = "_hasError_1uu20_69", tt = "_disabled_1uu20_74", ot = "_Label_1uu20_79", rt = "_lifted_1uu20_93", st = "_ErrorText_1uu20_104", at = "_Skeleton_1uu20_112", D = {
290
+ InputContainer: Xn,
291
+ InputField: Qn,
292
+ hasStartIcon: Yn,
293
+ hasEndIcon: Jn,
294
+ StartIcon: Zn,
295
+ EndIcon: et,
296
+ hasError: nt,
297
+ disabled: tt,
298
+ Label: ot,
299
+ lifted: rt,
300
+ ErrorText: st,
301
+ Skeleton: at
302
+ }, it = Je(function({ value: n, setValue: r, label: t, isLoader: s, type: a = "text", disabled: i, error: c, className: d, inputClassName: u, startIcon: l, endIcon: _, ...p }, C) {
303
+ const [y, k] = S(!1), x = y || n.length > 0, R = L("Input", d), { onFocus: M, onBlur: V, ...U } = p;
304
+ return s ? /* @__PURE__ */ o("div", { className: g(D.Skeleton, R), "aria-hidden": "true" }) : /* @__PURE__ */ m("div", { className: g(D.InputContainer, { [D.hasError]: !!c, [D.disabled]: i }, R), children: [
305
+ l && /* @__PURE__ */ o("span", { className: D.StartIcon, children: l }),
306
+ /* @__PURE__ */ o(
307
307
  "input",
308
308
  {
309
- ref: y,
310
- className: p(w.InputField, { [w.hasStartIcon]: !!h, [w.hasEndIcon]: !!m }, d),
309
+ ref: C,
310
+ className: g(D.InputField, { [D.hasStartIcon]: !!l, [D.hasEndIcon]: !!_ }, u),
311
311
  type: a,
312
312
  value: n,
313
- onChange: (C) => o(C.target.value),
314
- onFocus: (C) => {
315
- W(!0), z?.(C);
313
+ onChange: (v) => r(v.target.value),
314
+ onFocus: (v) => {
315
+ k(!0), M?.(v);
316
316
  },
317
- onBlur: (C) => {
318
- W(!1), K?.(C);
317
+ onBlur: (v) => {
318
+ k(!1), V?.(v);
319
319
  },
320
320
  disabled: i,
321
- ...q
321
+ ...U
322
322
  }
323
323
  ),
324
- r && /* @__PURE__ */ t("label", { className: p(w.Label, { [w.lifted]: V }), children: r }),
325
- m && /* @__PURE__ */ t("span", { className: w.EndIcon, children: m }),
326
- l && /* @__PURE__ */ t("span", { className: w.ErrorText, children: l })
324
+ t && /* @__PURE__ */ o("label", { className: g(D.Label, { [D.lifted]: x }), children: t }),
325
+ _ && /* @__PURE__ */ o("span", { className: D.EndIcon, children: _ }),
326
+ c && /* @__PURE__ */ o("span", { className: D.ErrorText, children: c })
327
327
  ] });
328
- }), Kn = "_ToggleContainer_1jetc_6", Xn = "_disabled_1jetc_13", Yn = "_Track_1jetc_18", Qn = "_on_1jetc_31", Jn = "_Thumb_1jetc_39", Zn = "_Label_1jetc_57", et = "_LabelSkeleton_1jetc_63", nt = "_Skeleton_1jetc_78", L = {
329
- ToggleContainer: Kn,
330
- disabled: Xn,
331
- Track: Yn,
332
- on: Qn,
333
- Thumb: Jn,
334
- Label: Zn,
335
- LabelSkeleton: et,
336
- Skeleton: nt
328
+ }), ct = "_ToggleContainer_1jetc_6", lt = "_disabled_1jetc_13", ut = "_Track_1jetc_18", dt = "_on_1jetc_31", _t = "_Thumb_1jetc_39", ft = "_Label_1jetc_57", ht = "_LabelSkeleton_1jetc_63", mt = "_Skeleton_1jetc_78", P = {
329
+ ToggleContainer: ct,
330
+ disabled: lt,
331
+ Track: ut,
332
+ on: dt,
333
+ Thumb: _t,
334
+ Label: ft,
335
+ LabelSkeleton: ht,
336
+ Skeleton: mt
337
337
  };
338
- function Uo({ checked: e, onChange: n, label: o, labelPosition: r = "right", disabled: s, isLoader: a, isLoadingLabel: i, className: l }) {
339
- const f = !!o || i, d = v("Toggle", l), h = i ? /* @__PURE__ */ t("span", { className: L.LabelSkeleton, "aria-hidden": "true" }) : o ? /* @__PURE__ */ t("span", { className: L.Label, children: o }) : null;
340
- return a ? f ? /* @__PURE__ */ _("div", { className: p(L.ToggleContainer, d), children: [
341
- r === "left" && h,
342
- /* @__PURE__ */ t("div", { className: L.Skeleton, "aria-hidden": "true" }),
343
- r === "right" && h
344
- ] }) : /* @__PURE__ */ t("div", { className: p(L.Skeleton, d), "aria-hidden": "true" }) : /* @__PURE__ */ _("label", { className: p(L.ToggleContainer, { [L.disabled]: s }, d), children: [
345
- r === "left" && h,
346
- /* @__PURE__ */ t(
338
+ function Fr({ checked: e, onChange: n, label: r, labelPosition: t = "right", disabled: s, isLoader: a, isLoadingLabel: i, className: c }) {
339
+ const d = !!r || i, u = L("Toggle", c), l = i ? /* @__PURE__ */ o("span", { className: P.LabelSkeleton, "aria-hidden": "true" }) : r ? /* @__PURE__ */ o("span", { className: P.Label, children: r }) : null;
340
+ return a ? d ? /* @__PURE__ */ m("div", { className: g(P.ToggleContainer, u), children: [
341
+ t === "left" && l,
342
+ /* @__PURE__ */ o("div", { className: P.Skeleton, "aria-hidden": "true" }),
343
+ t === "right" && l
344
+ ] }) : /* @__PURE__ */ o("div", { className: g(P.Skeleton, u), "aria-hidden": "true" }) : /* @__PURE__ */ m("label", { className: g(P.ToggleContainer, { [P.disabled]: s }, u), children: [
345
+ t === "left" && l,
346
+ /* @__PURE__ */ o(
347
347
  "button",
348
348
  {
349
349
  role: "switch",
350
350
  "aria-checked": e,
351
- className: p(L.Track, { [L.on]: e }),
351
+ className: g(P.Track, { [P.on]: e }),
352
352
  onClick: () => !s && n(!e),
353
353
  disabled: s,
354
354
  type: "button",
355
- children: /* @__PURE__ */ t("span", { className: L.Thumb })
355
+ children: /* @__PURE__ */ o("span", { className: P.Thumb })
356
356
  }
357
357
  ),
358
- r === "right" && h
358
+ t === "right" && l
359
359
  ] });
360
360
  }
361
- function tt() {
362
- const [e, n] = N(!1), o = G(null), r = Ce(() => n((a) => !a), []), s = Ce(() => n(!1), []);
363
- return { isOpen: e, triggerRef: o, toggleOpen: r, close: s };
361
+ function pt() {
362
+ const [e, n] = S(!1), r = T(null), t = E(() => n((a) => !a), []), s = E(() => n(!1), []);
363
+ return { isOpen: e, triggerRef: r, toggleOpen: t, close: s };
364
364
  }
365
- function ot(e, n, o) {
365
+ function gt(e, n, r) {
366
366
  b(() => {
367
- function r(a) {
367
+ function t(a) {
368
368
  const i = a.target;
369
- e.current?.contains(i) || o?.current?.contains(i) || n();
369
+ e.current?.contains(i) || r?.current?.contains(i) || n();
370
370
  }
371
371
  function s(a) {
372
372
  a.key === "Escape" && n();
373
373
  }
374
- return document.addEventListener("mousedown", r, !0), document.addEventListener("keydown", s), () => {
375
- document.removeEventListener("mousedown", r, !0), document.removeEventListener("keydown", s);
374
+ return document.addEventListener("mousedown", t, !0), document.addEventListener("keydown", s), () => {
375
+ document.removeEventListener("mousedown", t, !0), document.removeEventListener("keydown", s);
376
376
  };
377
- }, [n, e, o]);
377
+ }, [n, e, r]);
378
378
  }
379
- function rt(e, n) {
380
- const [o, r] = N([]);
379
+ function Ct(e, n) {
380
+ const [r, t] = S([]);
381
381
  return b(() => {
382
382
  if (!n) return;
383
383
  let s = !1;
384
384
  return n(e).then((a) => {
385
- s || r(a);
385
+ s || t(a);
386
386
  }), () => {
387
387
  s = !0;
388
388
  };
389
- }, [e, n]), o;
389
+ }, [e, n]), r;
390
390
  }
391
- function J(e) {
391
+ function te(e) {
392
392
  return typeof e == "object" && e !== null && "group" in e;
393
393
  }
394
- function Se(e) {
395
- return e.flatMap((n) => J(n) ? n.options : [n]);
394
+ function Fe(e) {
395
+ return e.flatMap((n) => te(n) ? n.options : [n]);
396
396
  }
397
- function I(e) {
397
+ function B(e) {
398
398
  return typeof e == "string" ? e : e.id;
399
399
  }
400
- function ae(e) {
400
+ function ue(e) {
401
401
  return typeof e == "string" ? e : e.name;
402
402
  }
403
- function st(e, n) {
404
- return e.map((o) => n.find((r) => I(r) === o) ?? o);
405
- }
406
- const at = "_DropdownContainer_1jz2j_13", it = "_PanelWrapper_1jz2j_20", ct = "_Portal_1jz2j_34", lt = "_PanelContainer_1jz2j_18", dt = "_Glass_1jz2j_48", ut = "_Label_1jz2j_54", _t = "_lifted_1jz2j_68", pt = "_TriggerContainer_1jz2j_75", ft = "_Open_1jz2j_99", ht = "_TriggerPlaceholder_1jz2j_104", mt = "_TriggerValue_1jz2j_112", gt = "_TriggerIcon_1jz2j_120", Ct = "_ChipsWrapper_1jz2j_127", vt = "_Expand_1jz2j_145", wt = "_MultiSelect_1jz2j_151", It = "_ExpandHeight_1jz2j_156", Nt = "_Chip_1jz2j_127", yt = "_SearchRow_1jz2j_175", kt = "_SearchBox_1jz2j_180", Lt = "_SearchIcon_1jz2j_190", Tt = "_SearchInput_1jz2j_197", Rt = "_ResultsList_1jz2j_211", St = "_OptionRow_1jz2j_216", Dt = "_Selected_1jz2j_231", Et = "_Indented_1jz2j_235", jt = "_GroupHeader_1jz2j_240", Bt = "_Checkmark_1jz2j_253", bt = "_CreateRow_1jz2j_259", At = "_WithBorder_1jz2j_272", Ot = "_CreateIcon_1jz2j_277", Pt = "_CreateLabel_1jz2j_289", xt = "_EmptyHint_1jz2j_295", Wt = "_SkeletonRow_1jz2j_302", u = {
407
- DropdownContainer: at,
408
- PanelWrapper: it,
409
- Portal: ct,
410
- PanelContainer: lt,
411
- Glass: dt,
412
- Label: ut,
413
- lifted: _t,
414
- TriggerContainer: pt,
415
- Open: ft,
416
- TriggerPlaceholder: ht,
417
- TriggerValue: mt,
418
- TriggerIcon: gt,
419
- ChipsWrapper: Ct,
420
- Expand: vt,
421
- MultiSelect: wt,
422
- ExpandHeight: It,
423
- Chip: Nt,
424
- SearchRow: yt,
425
- SearchBox: kt,
426
- SearchIcon: Lt,
427
- SearchInput: Tt,
428
- ResultsList: Rt,
429
- OptionRow: St,
430
- Selected: Dt,
431
- Indented: Et,
432
- GroupHeader: jt,
433
- Checkmark: Bt,
434
- CreateRow: bt,
435
- WithBorder: At,
436
- CreateIcon: Ot,
437
- CreateLabel: Pt,
438
- EmptyHint: xt,
439
- SkeletonRow: Wt
403
+ function vt(e, n) {
404
+ return e.map((r) => n.find((t) => B(t) === r) ?? r);
405
+ }
406
+ const wt = "_DropdownContainer_1jz2j_13", yt = "_PanelWrapper_1jz2j_20", Nt = "_Portal_1jz2j_34", It = "_PanelContainer_1jz2j_18", St = "_Glass_1jz2j_48", kt = "_Label_1jz2j_54", Rt = "_lifted_1jz2j_68", Tt = "_TriggerContainer_1jz2j_75", bt = "_Open_1jz2j_99", Lt = "_TriggerPlaceholder_1jz2j_104", Dt = "_TriggerValue_1jz2j_112", Et = "_TriggerIcon_1jz2j_120", Bt = "_ChipsWrapper_1jz2j_127", At = "_Expand_1jz2j_145", xt = "_MultiSelect_1jz2j_151", jt = "_ExpandHeight_1jz2j_156", Pt = "_Chip_1jz2j_127", Mt = "_SearchRow_1jz2j_175", Ot = "_SearchBox_1jz2j_180", Wt = "_SearchIcon_1jz2j_190", Ft = "_SearchInput_1jz2j_197", qt = "_ResultsList_1jz2j_211", zt = "_OptionRow_1jz2j_216", Ht = "_Selected_1jz2j_231", Ut = "_Indented_1jz2j_235", Gt = "_GroupHeader_1jz2j_240", $t = "_Checkmark_1jz2j_253", Vt = "_CreateRow_1jz2j_259", Kt = "_WithBorder_1jz2j_272", Xt = "_CreateIcon_1jz2j_277", Qt = "_CreateLabel_1jz2j_289", Yt = "_EmptyHint_1jz2j_295", Jt = "_SkeletonRow_1jz2j_302", h = {
407
+ DropdownContainer: wt,
408
+ PanelWrapper: yt,
409
+ Portal: Nt,
410
+ PanelContainer: It,
411
+ Glass: St,
412
+ Label: kt,
413
+ lifted: Rt,
414
+ TriggerContainer: Tt,
415
+ Open: bt,
416
+ TriggerPlaceholder: Lt,
417
+ TriggerValue: Dt,
418
+ TriggerIcon: Et,
419
+ ChipsWrapper: Bt,
420
+ Expand: At,
421
+ MultiSelect: xt,
422
+ ExpandHeight: jt,
423
+ Chip: Pt,
424
+ SearchRow: Mt,
425
+ SearchBox: Ot,
426
+ SearchIcon: Wt,
427
+ SearchInput: Ft,
428
+ ResultsList: qt,
429
+ OptionRow: zt,
430
+ Selected: Ht,
431
+ Indented: Ut,
432
+ GroupHeader: Gt,
433
+ Checkmark: $t,
434
+ CreateRow: Vt,
435
+ WithBorder: Kt,
436
+ CreateIcon: Xt,
437
+ CreateLabel: Qt,
438
+ EmptyHint: Yt,
439
+ SkeletonRow: Jt
440
440
  };
441
- function zt({ query: e, withBorder: n, onCreate: o }) {
442
- function r(s) {
443
- s.preventDefault(), o();
441
+ function Zt({ query: e, withBorder: n, onCreate: r }) {
442
+ function t(s) {
443
+ s.preventDefault(), r();
444
444
  }
445
- return /* @__PURE__ */ _(
445
+ return /* @__PURE__ */ m(
446
446
  "div",
447
447
  {
448
- className: p(u.CreateRow, n && u.WithBorder),
449
- onMouseDown: r,
448
+ className: g(h.CreateRow, n && h.WithBorder),
449
+ onMouseDown: t,
450
450
  children: [
451
- /* @__PURE__ */ t("span", { className: u.CreateIcon, children: /* @__PURE__ */ _("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", children: [
452
- /* @__PURE__ */ t("line", { x1: "5", y1: "1", x2: "5", y2: "9" }),
453
- /* @__PURE__ */ t("line", { x1: "1", y1: "5", x2: "9", y2: "5" })
451
+ /* @__PURE__ */ o("span", { className: h.CreateIcon, children: /* @__PURE__ */ m("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", children: [
452
+ /* @__PURE__ */ o("line", { x1: "5", y1: "1", x2: "5", y2: "9" }),
453
+ /* @__PURE__ */ o("line", { x1: "1", y1: "5", x2: "9", y2: "5" })
454
454
  ] }) }),
455
- /* @__PURE__ */ _("span", { className: u.CreateLabel, children: [
455
+ /* @__PURE__ */ m("span", { className: h.CreateLabel, children: [
456
456
  "create “",
457
457
  e,
458
458
  "”"
@@ -461,173 +461,173 @@ function zt({ query: e, withBorder: n, onCreate: o }) {
461
461
  }
462
462
  );
463
463
  }
464
- function Mt({ label: e }) {
465
- return /* @__PURE__ */ t("div", { className: u.GroupHeader, children: e });
464
+ function eo({ label: e }) {
465
+ return /* @__PURE__ */ o("div", { className: h.GroupHeader, children: e });
466
466
  }
467
- function Ie({ opt: e, isSelected: n, multiSelect: o, onPick: r, indented: s = !1 }) {
467
+ function be({ opt: e, isSelected: n, multiSelect: r, onPick: t, indented: s = !1 }) {
468
468
  function a(i) {
469
- i.preventDefault(), r(e);
469
+ i.preventDefault(), t(e);
470
470
  }
471
- return /* @__PURE__ */ _(
471
+ return /* @__PURE__ */ m(
472
472
  "div",
473
473
  {
474
- className: p(u.OptionRow, n && u.Selected, s && u.Indented),
474
+ className: g(h.OptionRow, n && h.Selected, s && h.Indented),
475
475
  onMouseDown: a,
476
476
  children: [
477
- o && n && /* @__PURE__ */ t("span", { className: u.Checkmark, children: "✓" }),
478
- ae(e)
477
+ r && n && /* @__PURE__ */ o("span", { className: h.Checkmark, children: "✓" }),
478
+ ue(e)
479
479
  ]
480
480
  }
481
481
  );
482
482
  }
483
- function Ft({ inputRef: e, query: n, onChange: o, onKeyDown: r, placeholder: s }) {
484
- return /* @__PURE__ */ t("div", { className: u.SearchRow, children: /* @__PURE__ */ _("div", { className: u.SearchBox, children: [
485
- /* @__PURE__ */ t("span", { className: u.SearchIcon, children: /* @__PURE__ */ _("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: [
486
- /* @__PURE__ */ t("circle", { cx: "5", cy: "5", r: "3.5" }),
487
- /* @__PURE__ */ t("line", { x1: "8", y1: "8", x2: "11", y2: "11" })
483
+ function no({ inputRef: e, query: n, onChange: r, onKeyDown: t, placeholder: s }) {
484
+ return /* @__PURE__ */ o("div", { className: h.SearchRow, children: /* @__PURE__ */ m("div", { className: h.SearchBox, children: [
485
+ /* @__PURE__ */ o("span", { className: h.SearchIcon, children: /* @__PURE__ */ m("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: [
486
+ /* @__PURE__ */ o("circle", { cx: "5", cy: "5", r: "3.5" }),
487
+ /* @__PURE__ */ o("line", { x1: "8", y1: "8", x2: "11", y2: "11" })
488
488
  ] }) }),
489
- /* @__PURE__ */ t(
489
+ /* @__PURE__ */ o(
490
490
  "input",
491
491
  {
492
492
  ref: e,
493
- className: u.SearchInput,
493
+ className: h.SearchInput,
494
494
  value: n,
495
- onChange: o,
496
- onKeyDown: r,
495
+ onChange: r,
496
+ onKeyDown: t,
497
497
  placeholder: s
498
498
  }
499
499
  )
500
500
  ] }) });
501
501
  }
502
- function Ut({ count: e }) {
503
- return /* @__PURE__ */ t(B, { children: Array.from({ length: e }).map((n, o) => /* @__PURE__ */ t("div", { className: u.SkeletonRow }, o)) });
502
+ function to({ count: e }) {
503
+ return /* @__PURE__ */ o(H, { children: Array.from({ length: e }).map((n, r) => /* @__PURE__ */ o("div", { className: h.SkeletonRow }, r)) });
504
504
  }
505
- function Gt({
505
+ function oo({
506
506
  onSearch: e,
507
507
  onCreate: n,
508
- onPick: o,
509
- onClose: r,
508
+ onPick: r,
509
+ onClose: t,
510
510
  anchorRef: s,
511
511
  placeholder: a,
512
512
  options: i = [],
513
- excluded: l = [],
514
- selected: f = [],
515
- multiSelect: d = !1,
516
- selectedAtTop: h = !1,
517
- isLoading: m = !1,
518
- emptyHint: g = "no results found",
519
- skeletonRowCount: y = 4,
520
- onError: x = console.error,
521
- glass: W = !1,
522
- portal: V = !1,
523
- renderOption: T
513
+ excluded: c = [],
514
+ selected: d = [],
515
+ multiSelect: u = !1,
516
+ selectedAtTop: l = !1,
517
+ isLoading: _ = !1,
518
+ emptyHint: p = "no results found",
519
+ skeletonRowCount: C = 4,
520
+ onError: y = console.error,
521
+ glass: k = !1,
522
+ portal: x = !1,
523
+ renderOption: R
524
524
  }) {
525
- const [z, K] = N(""), [q, C] = N(!1), [R, X] = N(null), Y = G(null), ee = G(null), M = !!e, ne = rt(z, e);
526
- ot(ee, r, s);
527
- const A = W || V;
528
- ke(() => {
529
- if (!A) return;
530
- function c() {
531
- s?.current && X(s.current.getBoundingClientRect());
525
+ const [M, V] = S(""), [U, v] = S(!1), [A, K] = S(null), X = T(null), Z = T(null), O = !!e, I = Ct(M, e);
526
+ gt(Z, t, s);
527
+ const w = k || x;
528
+ Ne(() => {
529
+ if (!w) return;
530
+ function f() {
531
+ s?.current && K(s.current.getBoundingClientRect());
532
532
  }
533
- return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
534
- window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
533
+ return f(), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
534
+ window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
535
535
  };
536
- }, [A, s]), b(() => {
537
- M && Y.current?.focus();
538
- }, [M]);
539
- const Q = (e ? ne : i).flatMap((c) => {
540
- if (J(c)) {
541
- const S = c.options.filter((Ae) => !l.includes(I(Ae)));
542
- return S.length > 0 ? [{ ...c, options: S }] : [];
536
+ }, [w, s]), b(() => {
537
+ O && X.current?.focus();
538
+ }, [O]);
539
+ const Q = (e ? I : i).flatMap((f) => {
540
+ if (te(f)) {
541
+ const W = f.options.filter((Ye) => !c.includes(B(Ye)));
542
+ return W.length > 0 ? [{ ...f, options: W }] : [];
543
543
  }
544
- return l.includes(I(c)) ? [] : [c];
545
- }), te = h ? [
546
- ...Q.filter((c) => !J(c) && f.includes(I(c))),
547
- ...Q.filter((c) => J(c) || !f.includes(I(c)))
548
- ] : Q, F = Se(te), k = z.trim(), ce = F.some(
549
- (c) => ae(c).toLowerCase() === k.toLowerCase()
550
- ), le = !!n && k.length > 0 && !ce;
551
- async function me() {
552
- !k || q || !n || (C(!0), n(k).then($).catch(x).finally(() => C(!1)));
544
+ return c.includes(B(f)) ? [] : [f];
545
+ }), se = l ? [
546
+ ...Q.filter((f) => !te(f) && d.includes(B(f))),
547
+ ...Q.filter((f) => te(f) || !d.includes(B(f)))
548
+ ] : Q, Y = Fe(se), j = M.trim(), _e = Y.some(
549
+ (f) => ue(f).toLowerCase() === j.toLowerCase()
550
+ ), fe = !!n && j.length > 0 && !_e;
551
+ async function Se() {
552
+ !j || U || !n || (v(!0), n(j).then(ee).catch(y).finally(() => v(!1)));
553
553
  }
554
- function $(c) {
555
- o(c), d || r();
554
+ function ee(f) {
555
+ r(f), u || t();
556
556
  }
557
- function je(c) {
558
- K(c.target.value);
557
+ function Ke(f) {
558
+ V(f.target.value);
559
559
  }
560
- function Be(c) {
561
- c.key === "Enter" && (c.preventDefault(), F.length > 0 ? $(F[0]) : le && me());
560
+ function Xe(f) {
561
+ f.key === "Enter" && (f.preventDefault(), Y.length > 0 ? ee(Y[0]) : fe && Se());
562
562
  }
563
- const be = a ?? (n ? "search or add new…" : "search…");
564
- if (A && !R) return null;
565
- const ge = /* @__PURE__ */ t(
563
+ const Qe = a ?? (n ? "search or add new…" : "search…");
564
+ if (w && !A) return null;
565
+ const ke = /* @__PURE__ */ o(
566
566
  "div",
567
567
  {
568
- ref: ee,
569
- className: p(u.PanelWrapper, { [u.Portal]: A }),
570
- style: A && R ? { top: R.bottom, left: R.left, width: R.width } : void 0,
571
- children: /* @__PURE__ */ _("div", { className: p(u.PanelContainer, { [u.Glass]: W }), children: [
572
- M && /* @__PURE__ */ t(
573
- Ft,
568
+ ref: Z,
569
+ className: g(h.PanelWrapper, { [h.Portal]: w }),
570
+ style: w && A ? { top: A.bottom, left: A.left, width: A.width } : void 0,
571
+ children: /* @__PURE__ */ m("div", { className: g(h.PanelContainer, { [h.Glass]: k }), children: [
572
+ O && /* @__PURE__ */ o(
573
+ no,
574
574
  {
575
- inputRef: Y,
576
- query: z,
577
- onChange: je,
578
- onKeyDown: Be,
579
- placeholder: be
575
+ inputRef: X,
576
+ query: M,
577
+ onChange: Ke,
578
+ onKeyDown: Xe,
579
+ placeholder: Qe
580
580
  }
581
581
  ),
582
- /* @__PURE__ */ t("div", { className: u.ResultsList, children: m ? /* @__PURE__ */ t(Ut, { count: y }) : /* @__PURE__ */ _(B, { children: [
583
- te.map((c) => J(c) ? /* @__PURE__ */ _(de, { children: [
584
- /* @__PURE__ */ t(Mt, { label: c.group }),
585
- c.options.map((S) => /* @__PURE__ */ t(de, { children: T ? T(S, {
586
- isSelected: f.includes(I(S)),
587
- multiSelect: d,
582
+ /* @__PURE__ */ o("div", { className: h.ResultsList, children: _ ? /* @__PURE__ */ o(to, { count: C }) : /* @__PURE__ */ m(H, { children: [
583
+ se.map((f) => te(f) ? /* @__PURE__ */ m(he, { children: [
584
+ /* @__PURE__ */ o(eo, { label: f.group }),
585
+ f.options.map((W) => /* @__PURE__ */ o(he, { children: R ? R(W, {
586
+ isSelected: d.includes(B(W)),
587
+ multiSelect: u,
588
588
  indented: !0,
589
- onPick: () => $(S)
590
- }) : /* @__PURE__ */ t(
591
- Ie,
589
+ onPick: () => ee(W)
590
+ }) : /* @__PURE__ */ o(
591
+ be,
592
592
  {
593
- opt: S,
594
- isSelected: f.includes(I(S)),
595
- multiSelect: d,
596
- onPick: $,
593
+ opt: W,
594
+ isSelected: d.includes(B(W)),
595
+ multiSelect: u,
596
+ onPick: ee,
597
597
  indented: !0
598
598
  }
599
- ) }, I(S)))
600
- ] }, `group:${c.group}`) : /* @__PURE__ */ t(de, { children: T ? T(c, {
601
- isSelected: f.includes(I(c)),
602
- multiSelect: d,
599
+ ) }, B(W)))
600
+ ] }, `group:${f.group}`) : /* @__PURE__ */ o(he, { children: R ? R(f, {
601
+ isSelected: d.includes(B(f)),
602
+ multiSelect: u,
603
603
  indented: !1,
604
- onPick: () => $(c)
605
- }) : /* @__PURE__ */ t(
606
- Ie,
604
+ onPick: () => ee(f)
605
+ }) : /* @__PURE__ */ o(
606
+ be,
607
607
  {
608
- opt: c,
609
- isSelected: f.includes(I(c)),
610
- multiSelect: d,
611
- onPick: $
608
+ opt: f,
609
+ isSelected: d.includes(B(f)),
610
+ multiSelect: u,
611
+ onPick: ee
612
612
  }
613
- ) }, I(c))),
614
- le && /* @__PURE__ */ t(
615
- zt,
613
+ ) }, B(f))),
614
+ fe && /* @__PURE__ */ o(
615
+ Zt,
616
616
  {
617
- query: k,
618
- withBorder: F.length > 0,
619
- onCreate: me
617
+ query: j,
618
+ withBorder: Y.length > 0,
619
+ onCreate: Se
620
620
  }
621
621
  ),
622
- F.length === 0 && !le && /* @__PURE__ */ t("div", { className: u.EmptyHint, children: g })
622
+ Y.length === 0 && !fe && /* @__PURE__ */ o("div", { className: h.EmptyHint, children: p })
623
623
  ] }) })
624
624
  ] })
625
625
  }
626
626
  );
627
- return A ? Le(ge, document.body) : ge;
627
+ return w ? Ie(ke, document.body) : ke;
628
628
  }
629
- function qt({ size: e = 14, strokeWidth: n = 2, className: o }) {
630
- return /* @__PURE__ */ t(
629
+ function ro({ size: e = 14, strokeWidth: n = 2, className: r }) {
630
+ return /* @__PURE__ */ o(
631
631
  "svg",
632
632
  {
633
633
  viewBox: "0 0 24 24",
@@ -638,13 +638,13 @@ function qt({ size: e = 14, strokeWidth: n = 2, className: o }) {
638
638
  strokeWidth: n,
639
639
  strokeLinecap: "round",
640
640
  strokeLinejoin: "round",
641
- className: o,
642
- children: /* @__PURE__ */ t("polyline", { points: "6 9 12 15 18 9" })
641
+ className: r,
642
+ children: /* @__PURE__ */ o("polyline", { points: "6 9 12 15 18 9" })
643
643
  }
644
644
  );
645
645
  }
646
- function Go({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
647
- return /* @__PURE__ */ t(
646
+ function qr({ size: e = 18, strokeWidth: n = 2.5, shrink: r = !0 }) {
647
+ return /* @__PURE__ */ o(
648
648
  "svg",
649
649
  {
650
650
  viewBox: "0 0 24 24",
@@ -655,13 +655,13 @@ function Go({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
655
655
  strokeWidth: n,
656
656
  strokeLinecap: "round",
657
657
  strokeLinejoin: "round",
658
- style: o ? { flexShrink: 0 } : void 0,
659
- children: /* @__PURE__ */ t("polyline", { points: "20 6 9 17 4 12" })
658
+ style: r ? { flexShrink: 0 } : void 0,
659
+ children: /* @__PURE__ */ o("polyline", { points: "20 6 9 17 4 12" })
660
660
  }
661
661
  );
662
662
  }
663
- function qo() {
664
- return /* @__PURE__ */ _(
663
+ function zr() {
664
+ return /* @__PURE__ */ m(
665
665
  "svg",
666
666
  {
667
667
  viewBox: "0 0 24 24",
@@ -673,14 +673,14 @@ function qo() {
673
673
  strokeLinecap: "round",
674
674
  strokeLinejoin: "round",
675
675
  children: [
676
- /* @__PURE__ */ t("path", { d: "M12 20h9" }),
677
- /* @__PURE__ */ t("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z" })
676
+ /* @__PURE__ */ o("path", { d: "M12 20h9" }),
677
+ /* @__PURE__ */ o("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z" })
678
678
  ]
679
679
  }
680
680
  );
681
681
  }
682
- function $o() {
683
- return /* @__PURE__ */ _(
682
+ function Hr() {
683
+ return /* @__PURE__ */ m(
684
684
  "svg",
685
685
  {
686
686
  viewBox: "0 0 24 24",
@@ -692,14 +692,14 @@ function $o() {
692
692
  strokeLinecap: "round",
693
693
  strokeLinejoin: "round",
694
694
  children: [
695
- /* @__PURE__ */ t("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
696
- /* @__PURE__ */ t("circle", { cx: "12", cy: "7", r: "4" })
695
+ /* @__PURE__ */ o("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
696
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "7", r: "4" })
697
697
  ]
698
698
  }
699
699
  );
700
700
  }
701
- function Ho({ size: e = 14, strokeWidth: n = 2, className: o }) {
702
- return /* @__PURE__ */ _(
701
+ function so({ size: e = 14, strokeWidth: n = 2, className: r }) {
702
+ return /* @__PURE__ */ m(
703
703
  "svg",
704
704
  {
705
705
  viewBox: "0 0 24 24",
@@ -710,226 +710,226 @@ function Ho({ size: e = 14, strokeWidth: n = 2, className: o }) {
710
710
  strokeWidth: n,
711
711
  strokeLinecap: "round",
712
712
  strokeLinejoin: "round",
713
- className: o,
713
+ className: r,
714
714
  children: [
715
- /* @__PURE__ */ t("circle", { cx: "11", cy: "11", r: "7" }),
716
- /* @__PURE__ */ t("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
715
+ /* @__PURE__ */ o("circle", { cx: "11", cy: "11", r: "7" }),
716
+ /* @__PURE__ */ o("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
717
717
  ]
718
718
  }
719
719
  );
720
720
  }
721
- function $t({ triggerRef: e, isOpen: n, onClick: o, selectedOptions: r, multiSelect: s, placeholder: a, onOverflow: i = "scroll" }) {
722
- const l = i === "expand";
723
- return /* @__PURE__ */ _(
721
+ function ao({ triggerRef: e, isOpen: n, onClick: r, selectedOptions: t, multiSelect: s, placeholder: a, onOverflow: i = "scroll" }) {
722
+ const c = i === "expand";
723
+ return /* @__PURE__ */ m(
724
724
  "button",
725
725
  {
726
726
  type: "button",
727
727
  ref: e,
728
- className: p(
729
- u.TriggerContainer,
730
- n && u.Open,
731
- s && u.MultiSelect,
732
- l && u.ExpandHeight
728
+ className: g(
729
+ h.TriggerContainer,
730
+ n && h.Open,
731
+ s && h.MultiSelect,
732
+ c && h.ExpandHeight
733
733
  ),
734
- onClick: o,
734
+ onClick: r,
735
735
  "aria-expanded": n,
736
736
  "aria-haspopup": "listbox",
737
737
  children: [
738
- s && r.length > 0 ? /* @__PURE__ */ t("div", { className: p(u.ChipsWrapper, l && u.Expand), children: r.map((f, d) => /* @__PURE__ */ t("span", { className: u.Chip, children: ae(f) }, d)) }) : /* @__PURE__ */ t("span", { className: r.length === 0 ? u.TriggerPlaceholder : u.TriggerValue, children: r.length === 0 ? a : r.map(ae).join(", ") }),
739
- /* @__PURE__ */ t("span", { className: u.TriggerIcon, children: /* @__PURE__ */ t(qt, { size: 12 }) })
738
+ s && t.length > 0 ? /* @__PURE__ */ o("div", { className: g(h.ChipsWrapper, c && h.Expand), children: t.map((d, u) => /* @__PURE__ */ o("span", { className: h.Chip, children: ue(d) }, u)) }) : /* @__PURE__ */ o("span", { className: t.length === 0 ? h.TriggerPlaceholder : h.TriggerValue, children: t.length === 0 ? a : t.map(ue).join(", ") }),
739
+ /* @__PURE__ */ o("span", { className: h.TriggerIcon, children: /* @__PURE__ */ o(ro, { size: 12 }) })
740
740
  ]
741
741
  }
742
742
  );
743
743
  }
744
- function Vo({
744
+ function Ur({
745
745
  options: e = [],
746
746
  value: n,
747
- onChange: o,
748
- onSearch: r,
747
+ onChange: r,
748
+ onSearch: t,
749
749
  onCreate: s,
750
750
  excluded: a,
751
751
  multiSelect: i = !1,
752
- selectedAtTop: l = !1,
753
- onOverflow: f = "scroll",
754
- label: d,
755
- placeholder: h = "select…",
756
- searchPlaceholder: m,
757
- emptyHint: g,
758
- isLoading: y,
759
- skeletonRowCount: x,
760
- onError: W,
761
- className: V,
762
- glass: T = !1,
763
- portal: z = !1,
764
- renderOption: K,
765
- children: q
752
+ selectedAtTop: c = !1,
753
+ onOverflow: d = "scroll",
754
+ label: u,
755
+ placeholder: l = "select…",
756
+ searchPlaceholder: _,
757
+ emptyHint: p,
758
+ isLoading: C,
759
+ skeletonRowCount: y,
760
+ onError: k,
761
+ className: x,
762
+ glass: R = !1,
763
+ portal: M = !1,
764
+ renderOption: V,
765
+ children: U
766
766
  }) {
767
- const { isOpen: C, triggerRef: R, toggleOpen: X, close: Y } = tt(), ee = v("Dropdown", V), M = st(n, Se(e)), ne = C || M.length > 0, A = d && !ne ? "" : h;
768
- function Q(F) {
769
- const k = I(F);
770
- o(
771
- i ? n.includes(k) ? n.filter((ce) => ce !== k) : [...n, k] : [k]
767
+ const { isOpen: v, triggerRef: A, toggleOpen: K, close: X } = pt(), Z = L("Dropdown", x), O = vt(n, Fe(e)), I = v || O.length > 0, w = u && !I ? "" : l;
768
+ function Q(Y) {
769
+ const j = B(Y);
770
+ r(
771
+ i ? n.includes(j) ? n.filter((_e) => _e !== j) : [...n, j] : [j]
772
772
  );
773
773
  }
774
- const te = {
775
- ref: R,
776
- onClick: X,
777
- "aria-expanded": C,
774
+ const se = {
775
+ ref: A,
776
+ onClick: K,
777
+ "aria-expanded": v,
778
778
  "aria-haspopup": "listbox"
779
779
  };
780
- return /* @__PURE__ */ _("div", { className: p(u.DropdownContainer, ee), children: [
781
- d && /* @__PURE__ */ t("label", { className: p(u.Label, { [u.lifted]: ne }), children: d }),
782
- q ? q({ selectedOptions: M, isOpen: C, toggleOpen: X, close: Y, triggerProps: te }) : /* @__PURE__ */ t(
783
- $t,
780
+ return /* @__PURE__ */ m("div", { className: g(h.DropdownContainer, Z), children: [
781
+ u && /* @__PURE__ */ o("label", { className: g(h.Label, { [h.lifted]: I }), children: u }),
782
+ U ? U({ selectedOptions: O, isOpen: v, toggleOpen: K, close: X, triggerProps: se }) : /* @__PURE__ */ o(
783
+ ao,
784
784
  {
785
- triggerRef: R,
786
- isOpen: C,
787
- onClick: X,
788
- selectedOptions: M,
785
+ triggerRef: A,
786
+ isOpen: v,
787
+ onClick: K,
788
+ selectedOptions: O,
789
789
  multiSelect: i,
790
- onOverflow: f,
791
- placeholder: A
790
+ onOverflow: d,
791
+ placeholder: w
792
792
  }
793
793
  ),
794
- C && /* @__PURE__ */ t(
795
- Gt,
794
+ v && /* @__PURE__ */ o(
795
+ oo,
796
796
  {
797
797
  options: e,
798
- onSearch: r,
798
+ onSearch: t,
799
799
  onCreate: s,
800
800
  onPick: Q,
801
- onClose: Y,
802
- anchorRef: R,
801
+ onClose: X,
802
+ anchorRef: A,
803
803
  excluded: a,
804
804
  multiSelect: i,
805
- selectedAtTop: l,
805
+ selectedAtTop: c,
806
806
  selected: n,
807
- placeholder: m,
808
- emptyHint: g,
809
- isLoading: y,
810
- skeletonRowCount: x,
811
- onError: W,
812
- glass: T,
813
- portal: z,
814
- renderOption: K
807
+ placeholder: _,
808
+ emptyHint: p,
809
+ isLoading: C,
810
+ skeletonRowCount: y,
811
+ onError: k,
812
+ glass: R,
813
+ portal: M,
814
+ renderOption: V
815
815
  }
816
816
  )
817
817
  ] });
818
818
  }
819
- const Ht = "_Btn_1tozl_10", Vt = "_Primary_1tozl_35", Kt = "_Secondary_1tozl_50", Xt = "_Ghost_1tozl_62", Yt = "_IconDanger_1tozl_74", Qt = "_Danger_1tozl_95", H = {
820
- Btn: Ht,
821
- Primary: Vt,
822
- Secondary: Kt,
823
- Ghost: Xt,
824
- IconDanger: Yt,
825
- Danger: Qt
826
- }, Jt = {
827
- primary: H.Primary,
828
- secondary: H.Secondary,
829
- danger: H.Danger,
830
- ghost: H.Ghost,
831
- iconDanger: H.IconDanger
819
+ const io = "_Btn_1tozl_10", co = "_Primary_1tozl_35", lo = "_Secondary_1tozl_50", uo = "_Ghost_1tozl_62", _o = "_IconDanger_1tozl_74", fo = "_Danger_1tozl_95", ne = {
820
+ Btn: io,
821
+ Primary: co,
822
+ Secondary: lo,
823
+ Ghost: uo,
824
+ IconDanger: _o,
825
+ Danger: fo
826
+ }, ho = {
827
+ primary: ne.Primary,
828
+ secondary: ne.Secondary,
829
+ danger: ne.Danger,
830
+ ghost: ne.Ghost,
831
+ iconDanger: ne.IconDanger
832
832
  };
833
- function Ko({ variant: e = "default", className: n, children: o, ...r }) {
834
- const s = v("Button", n), a = e === "unstyled";
835
- return /* @__PURE__ */ t(
833
+ function qe({ variant: e = "default", className: n, children: r, ...t }) {
834
+ const s = L("Button", n), a = e === "unstyled";
835
+ return /* @__PURE__ */ o(
836
836
  "button",
837
837
  {
838
838
  type: "button",
839
- ...r,
840
- className: p(!a && H.Btn, !a && Jt[e], s),
841
- children: o
839
+ ...t,
840
+ className: g(!a && ne.Btn, !a && ho[e], s),
841
+ children: r
842
842
  }
843
843
  );
844
844
  }
845
- const Zt = "_ConfirmWrapper_1tq4o_4", eo = "_ConfirmContainer_1tq4o_1", no = "_Glass_1tq4o_24", to = "_ConfirmTitle_1tq4o_30", oo = "_ConfirmMessage_1tq4o_38", ro = "_ConfirmActions_1tq4o_45", so = "_BtnCancel_1tq4o_53", ao = "_BtnConfirm_1tq4o_73", io = "_BtnDanger_1tq4o_92", D = {
846
- ConfirmWrapper: Zt,
847
- ConfirmContainer: eo,
848
- Glass: no,
849
- ConfirmTitle: to,
850
- ConfirmMessage: oo,
851
- ConfirmActions: ro,
852
- BtnCancel: so,
853
- BtnConfirm: ao,
854
- BtnDanger: io
845
+ const mo = "_ConfirmWrapper_1tq4o_4", po = "_ConfirmContainer_1tq4o_1", go = "_Glass_1tq4o_24", Co = "_ConfirmTitle_1tq4o_30", vo = "_ConfirmMessage_1tq4o_38", wo = "_ConfirmActions_1tq4o_45", yo = "_BtnCancel_1tq4o_53", No = "_BtnConfirm_1tq4o_73", Io = "_BtnDanger_1tq4o_92", F = {
846
+ ConfirmWrapper: mo,
847
+ ConfirmContainer: po,
848
+ Glass: go,
849
+ ConfirmTitle: Co,
850
+ ConfirmMessage: vo,
851
+ ConfirmActions: wo,
852
+ BtnCancel: yo,
853
+ BtnConfirm: No,
854
+ BtnDanger: Io
855
855
  };
856
- function Xo({
856
+ function Gr({
857
857
  title: e,
858
858
  message: n,
859
- confirmLabel: o = "Confirm",
860
- cancelLabel: r = "Cancel",
859
+ confirmLabel: r = "Confirm",
860
+ cancelLabel: t = "Cancel",
861
861
  danger: s = !1,
862
862
  onConfirm: a,
863
863
  onClose: i,
864
- className: l,
865
- glass: f = !1
864
+ className: c,
865
+ glass: d = !1
866
866
  }) {
867
- const [d, h] = N(!1), m = v("ConfirmDialog", l);
868
- function g() {
869
- h(!0), Promise.resolve(a()).finally(() => {
870
- h(!1), i();
867
+ const [u, l] = S(!1), _ = L("ConfirmDialog", c);
868
+ function p() {
869
+ l(!0), Promise.resolve(a()).finally(() => {
870
+ l(!1), i();
871
871
  });
872
872
  }
873
- return /* @__PURE__ */ t("div", { className: D.ConfirmWrapper, children: /* @__PURE__ */ _("div", { className: p(D.ConfirmContainer, { [D.Glass]: f }, m), role: "dialog", "aria-modal": "true", children: [
874
- /* @__PURE__ */ t("h2", { className: D.ConfirmTitle, children: e }),
875
- /* @__PURE__ */ t("p", { className: D.ConfirmMessage, children: n }),
876
- /* @__PURE__ */ _("div", { className: D.ConfirmActions, children: [
877
- /* @__PURE__ */ t("button", { className: D.BtnCancel, type: "button", onClick: i, disabled: d, children: r }),
878
- /* @__PURE__ */ t(
873
+ return /* @__PURE__ */ o("div", { className: F.ConfirmWrapper, children: /* @__PURE__ */ m("div", { className: g(F.ConfirmContainer, { [F.Glass]: d }, _), role: "dialog", "aria-modal": "true", children: [
874
+ /* @__PURE__ */ o("h2", { className: F.ConfirmTitle, children: e }),
875
+ /* @__PURE__ */ o("p", { className: F.ConfirmMessage, children: n }),
876
+ /* @__PURE__ */ m("div", { className: F.ConfirmActions, children: [
877
+ /* @__PURE__ */ o("button", { className: F.BtnCancel, type: "button", onClick: i, disabled: u, children: t }),
878
+ /* @__PURE__ */ o(
879
879
  "button",
880
880
  {
881
- className: p(s ? D.BtnDanger : D.BtnConfirm),
881
+ className: g(s ? F.BtnDanger : F.BtnConfirm),
882
882
  type: "button",
883
- onClick: g,
884
- disabled: d,
885
- children: d ? "…" : o
883
+ onClick: p,
884
+ disabled: u,
885
+ children: u ? "…" : r
886
886
  }
887
887
  )
888
888
  ] })
889
889
  ] }) });
890
890
  }
891
- const co = "_InfoWrapper_cqv58_4", lo = "_InfoContainer_cqv58_1", uo = "_Glass_cqv58_24", _o = "_InfoTitle_cqv58_30", po = "_InfoMessage_cqv58_38", fo = "_InfoActions_cqv58_45", ho = "_BtnClose_cqv58_52", U = {
892
- InfoWrapper: co,
893
- InfoContainer: lo,
894
- Glass: uo,
895
- InfoTitle: _o,
896
- InfoMessage: po,
897
- InfoActions: fo,
898
- BtnClose: ho
891
+ const So = "_InfoWrapper_cqv58_4", ko = "_InfoContainer_cqv58_1", Ro = "_Glass_cqv58_24", To = "_InfoTitle_cqv58_30", bo = "_InfoMessage_cqv58_38", Lo = "_InfoActions_cqv58_45", Do = "_BtnClose_cqv58_52", J = {
892
+ InfoWrapper: So,
893
+ InfoContainer: ko,
894
+ Glass: Ro,
895
+ InfoTitle: To,
896
+ InfoMessage: bo,
897
+ InfoActions: Lo,
898
+ BtnClose: Do
899
899
  };
900
- function Yo({ title: e, message: n, onClose: o, className: r, glass: s = !1 }) {
901
- const a = v("InfoDialog", r);
902
- return /* @__PURE__ */ t("div", { className: U.InfoWrapper, children: /* @__PURE__ */ _("div", { className: p(U.InfoContainer, { [U.Glass]: s }, a), role: "dialog", "aria-modal": "true", children: [
903
- /* @__PURE__ */ t("h2", { className: U.InfoTitle, children: e }),
904
- /* @__PURE__ */ t("p", { className: U.InfoMessage, children: n }),
905
- /* @__PURE__ */ t("div", { className: U.InfoActions, children: /* @__PURE__ */ t("button", { className: U.BtnClose, type: "button", onClick: o, children: "Got it" }) })
900
+ function $r({ title: e, message: n, onClose: r, className: t, glass: s = !1 }) {
901
+ const a = L("InfoDialog", t);
902
+ return /* @__PURE__ */ o("div", { className: J.InfoWrapper, children: /* @__PURE__ */ m("div", { className: g(J.InfoContainer, { [J.Glass]: s }, a), role: "dialog", "aria-modal": "true", children: [
903
+ /* @__PURE__ */ o("h2", { className: J.InfoTitle, children: e }),
904
+ /* @__PURE__ */ o("p", { className: J.InfoMessage, children: n }),
905
+ /* @__PURE__ */ o("div", { className: J.InfoActions, children: /* @__PURE__ */ o("button", { className: J.BtnClose, type: "button", onClick: r, children: "Got it" }) })
906
906
  ] }) });
907
907
  }
908
- function Qo({ buttons: e, containerClassName: n }) {
909
- const o = v("ModalActions", n);
910
- return /* @__PURE__ */ t("div", { className: o, children: e.map((r, s) => /* @__PURE__ */ t(
908
+ function Vr({ buttons: e, containerClassName: n }) {
909
+ const r = L("ModalActions", n);
910
+ return /* @__PURE__ */ o("div", { className: r, children: e.map((t, s) => /* @__PURE__ */ o(
911
911
  "button",
912
912
  {
913
- className: r.className,
913
+ className: t.className,
914
914
  type: "button",
915
- onClick: r.onClick,
916
- disabled: r.disabled,
917
- children: r.label
915
+ onClick: t.onClick,
916
+ disabled: t.disabled,
917
+ children: t.label
918
918
  },
919
919
  s
920
920
  )) });
921
921
  }
922
- function Jo({ onClick: e, disabled: n, className: o }) {
923
- const r = v("ModalClose", o);
924
- return /* @__PURE__ */ t(
922
+ function Kr({ onClick: e, disabled: n, className: r }) {
923
+ const t = L("ModalClose", r);
924
+ return /* @__PURE__ */ o(
925
925
  "button",
926
926
  {
927
- className: r,
927
+ className: t,
928
928
  type: "button",
929
929
  onClick: e,
930
930
  disabled: n,
931
931
  "aria-label": "Close",
932
- children: /* @__PURE__ */ _(
932
+ children: /* @__PURE__ */ m(
933
933
  "svg",
934
934
  {
935
935
  viewBox: "0 0 24 24",
@@ -940,211 +940,550 @@ function Jo({ onClick: e, disabled: n, className: o }) {
940
940
  strokeWidth: "1.8",
941
941
  strokeLinecap: "round",
942
942
  children: [
943
- /* @__PURE__ */ t("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
944
- /* @__PURE__ */ t("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
943
+ /* @__PURE__ */ o("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
944
+ /* @__PURE__ */ o("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
945
945
  ]
946
946
  }
947
947
  )
948
948
  }
949
949
  );
950
950
  }
951
- const mo = "_Backdrop_1w1e3_7", go = "_BackdropOpen_1w1e3_16", Co = "_Panel_1w1e3_21", vo = "_Right_1w1e3_31", wo = "_Left_1w1e3_40", Io = "_Top_1w1e3_49", No = "_Bottom_1w1e3_58", yo = "_PanelOpen_1w1e3_67", P = {
952
- Backdrop: mo,
953
- BackdropOpen: go,
954
- Panel: Co,
955
- Right: vo,
956
- Left: wo,
957
- Top: Io,
958
- Bottom: No,
959
- PanelOpen: yo
960
- }, Z = [];
961
- let ko = 1, ie = !1, fe = 0;
962
- function De() {
963
- if (fe > 0) {
964
- fe -= 1;
951
+ const Eo = "_Backdrop_1w1e3_7", Bo = "_BackdropOpen_1w1e3_16", Ao = "_Panel_1w1e3_21", xo = "_Right_1w1e3_31", jo = "_Left_1w1e3_40", Po = "_Top_1w1e3_49", Mo = "_Bottom_1w1e3_58", Oo = "_PanelOpen_1w1e3_67", $ = {
952
+ Backdrop: Eo,
953
+ BackdropOpen: Bo,
954
+ Panel: Ao,
955
+ Right: xo,
956
+ Left: jo,
957
+ Top: Po,
958
+ Bottom: Mo,
959
+ PanelOpen: Oo
960
+ }, re = [];
961
+ let Wo = 1, de = !1, Ce = 0;
962
+ function ze() {
963
+ if (Ce > 0) {
964
+ Ce -= 1;
965
965
  return;
966
966
  }
967
- const e = Z.pop();
968
- Ee(), e && e.onBack();
967
+ const e = re.pop();
968
+ He(), e && e.onBack();
969
969
  }
970
- function Lo() {
971
- ie || (ie = !0, window.addEventListener("popstate", De));
970
+ function Fo() {
971
+ de || (de = !0, window.addEventListener("popstate", ze));
972
972
  }
973
- function Ee() {
974
- Z.length > 0 || !ie || (ie = !1, window.removeEventListener("popstate", De));
973
+ function He() {
974
+ re.length > 0 || !de || (de = !1, window.removeEventListener("popstate", ze));
975
975
  }
976
- function To(e) {
977
- const n = ko++;
978
- return Z.push({ handle: n, onBack: e }), Lo(), window.history.pushState({ churesOverlayBackHandle: n }, ""), n;
976
+ function qo(e) {
977
+ const n = Wo++;
978
+ return re.push({ handle: n, onBack: e }), Fo(), window.history.pushState({ churesOverlayBackHandle: n }, ""), n;
979
979
  }
980
- function Ne(e) {
981
- const n = Z.findIndex((o) => o.handle === e);
982
- n !== -1 && (Z.splice(n, 1), Ee(), fe += 1, window.history.back());
980
+ function Le(e) {
981
+ const n = re.findIndex((t) => t.handle === e);
982
+ n === -1 || (re.splice(n, 1), He(), window.history.state?.churesOverlayBackHandle !== e) || (Ce += 1, window.history.back());
983
983
  }
984
- function Ro(e, n) {
985
- const o = G([]), r = G(n);
986
- r.current = n, b(() => {
987
- const s = o.current;
984
+ function zo(e, n) {
985
+ const r = T([]), t = T(n);
986
+ t.current = n, b(() => {
987
+ const s = r.current;
988
988
  for (; s.length < e; )
989
- s.push(To(() => r.current()));
989
+ s.push(qo(() => t.current()));
990
990
  for (; s.length > e; ) {
991
991
  const a = s.pop();
992
- a !== void 0 && Ne(a);
992
+ a !== void 0 && Le(a);
993
993
  }
994
994
  }, [e]), b(() => () => {
995
- const s = o.current;
995
+ const s = r.current;
996
996
  for (; s.length > 0; ) {
997
997
  const a = s.pop();
998
- a !== void 0 && Ne(a);
998
+ a !== void 0 && Le(a);
999
999
  }
1000
1000
  }, []);
1001
1001
  }
1002
- const So = {
1003
- top: P.Top,
1004
- right: P.Right,
1005
- bottom: P.Bottom,
1006
- left: P.Left
1002
+ const Ho = {
1003
+ top: $.Top,
1004
+ right: $.Right,
1005
+ bottom: $.Bottom,
1006
+ left: $.Left
1007
1007
  };
1008
- let O = null, _e = 0;
1009
- function ye() {
1010
- return O || (O = document.createElement("div"), O.setAttribute("data-chures-side-drawer-root", ""), document.body.appendChild(O)), O;
1008
+ let G = null, pe = 0;
1009
+ function De() {
1010
+ return G || (G = document.createElement("div"), G.setAttribute("data-chures-side-drawer-root", ""), document.body.appendChild(G)), G;
1011
1011
  }
1012
- function Zo({ open: e, onClose: n, children: o, side: r = "right", backdropBlur: s = 0, className: a }) {
1013
- const [i, l] = N(!1), f = v("SideDrawer", a);
1014
- Ro(e ? 1 : 0, n), ke(() => {
1012
+ function Xr({ open: e, onClose: n, children: r, side: t = "right", backdropBlur: s = 0, className: a }) {
1013
+ const [i, c] = S(!1), d = L("SideDrawer", a);
1014
+ zo(e ? 1 : 0, n), Ne(() => {
1015
1015
  if (!e) {
1016
- l(!1);
1016
+ c(!1);
1017
1017
  return;
1018
1018
  }
1019
- document.body.appendChild(ye());
1020
- const h = requestAnimationFrame(() => l(!0));
1021
- return () => cancelAnimationFrame(h);
1022
- }, [e]), b(() => (_e += 1, () => {
1023
- _e -= 1, _e === 0 && O && (O.remove(), O = null);
1019
+ document.body.appendChild(De());
1020
+ const l = requestAnimationFrame(() => c(!0));
1021
+ return () => cancelAnimationFrame(l);
1022
+ }, [e]), b(() => (pe += 1, () => {
1023
+ pe -= 1, pe === 0 && G && (G.remove(), G = null);
1024
1024
  }), []);
1025
- const d = s > 0 ? { backdropFilter: `blur(${s}rem)`, WebkitBackdropFilter: `blur(${s}rem)` } : void 0;
1026
- return Le(
1027
- /* @__PURE__ */ _(B, { children: [
1028
- /* @__PURE__ */ t(
1025
+ const u = s > 0 ? { backdropFilter: `blur(${s}rem)`, WebkitBackdropFilter: `blur(${s}rem)` } : void 0;
1026
+ return Ie(
1027
+ /* @__PURE__ */ m(H, { children: [
1028
+ /* @__PURE__ */ o(
1029
1029
  "div",
1030
1030
  {
1031
- className: p(P.Backdrop, i && P.BackdropOpen),
1032
- style: d,
1031
+ className: g($.Backdrop, i && $.BackdropOpen),
1032
+ style: u,
1033
1033
  onClick: n
1034
1034
  }
1035
1035
  ),
1036
- /* @__PURE__ */ t("div", { className: p(P.Panel, So[r], i && P.PanelOpen, f), children: o })
1036
+ /* @__PURE__ */ o("div", { className: g($.Panel, Ho[t], i && $.PanelOpen, d), children: r })
1037
+ ] }),
1038
+ De()
1039
+ );
1040
+ }
1041
+ const ve = je(!0);
1042
+ function Uo() {
1043
+ return Pe(ve);
1044
+ }
1045
+ const Go = "_FlyoutMenuContainer_1q0ma_5", $o = "_Backdrop_1q0ma_9", Vo = "_Panel_1q0ma_14", Ko = "_Submenu_1q0ma_27", Xo = "_FlyoutPanelContainer_1q0ma_41", Qo = "_Back_1q0ma_9", Yo = "_Chevron_1q0ma_68", Jo = "_MenuListContainer_1q0ma_75", Zo = "_Heading_1q0ma_81", er = "_Divider_1q0ma_90", nr = "_MenuRowContainer_1q0ma_98", tr = "_Dim_1q0ma_102", or = "_Row_1q0ma_106", rr = "_Icon_1q0ma_135", sr = "_Label_1q0ma_140", ar = "_Arrow_1q0ma_148", ir = "_MenuSkeletonContainer_1q0ma_156", cr = "_MenuSkeletonRow_1q0ma_163", lr = "_MenuSearchFieldContainer_1q0ma_191", N = {
1046
+ FlyoutMenuContainer: Go,
1047
+ Backdrop: $o,
1048
+ Panel: Vo,
1049
+ Submenu: Ko,
1050
+ FlyoutPanelContainer: Xo,
1051
+ Back: Qo,
1052
+ Chevron: Yo,
1053
+ MenuListContainer: Jo,
1054
+ Heading: Zo,
1055
+ Divider: er,
1056
+ MenuRowContainer: nr,
1057
+ Dim: tr,
1058
+ Row: or,
1059
+ Icon: rr,
1060
+ Label: sr,
1061
+ Arrow: ar,
1062
+ MenuSkeletonContainer: ir,
1063
+ MenuSkeletonRow: cr,
1064
+ MenuSearchFieldContainer: lr
1065
+ }, ur = { duration: 0.15, ease: [0.2, 0.7, 0.2, 1] };
1066
+ function Ee({ item: e, menu: n, dim: r }) {
1067
+ const t = Uo(), s = e.submenu;
1068
+ function a(i) {
1069
+ if (s) {
1070
+ n.toggleSubmenuFrom(i.currentTarget, s);
1071
+ return;
1072
+ }
1073
+ e.disabled || n.selectItem(e);
1074
+ }
1075
+ return /* @__PURE__ */ o(oe.div, { layout: t, transition: ur, className: g(N.MenuRowContainer, r && N.Dim), children: /* @__PURE__ */ m(
1076
+ qe,
1077
+ {
1078
+ variant: "unstyled",
1079
+ className: N.Row,
1080
+ disabled: e.disabled,
1081
+ "aria-haspopup": s ? "menu" : void 0,
1082
+ onClick: a,
1083
+ onMouseEnter: s ? (i) => n.openSubmenuFrom(i.currentTarget, s) : void 0,
1084
+ onMouseLeave: s ? n.closeSubmenuSoon : void 0,
1085
+ children: [
1086
+ e.icon && /* @__PURE__ */ o("span", { className: N.Icon, children: e.icon }),
1087
+ /* @__PURE__ */ o("span", { className: N.Label, children: e.label }),
1088
+ s && /* @__PURE__ */ o("span", { className: N.Arrow, children: "▸" })
1089
+ ]
1090
+ }
1091
+ ) });
1092
+ }
1093
+ function Be({ items: e, menu: n, heading: r, rest: t }) {
1094
+ const s = !!t && t.length > 0;
1095
+ return /* @__PURE__ */ m("div", { className: N.MenuListContainer, children: [
1096
+ r && /* @__PURE__ */ o("span", { className: N.Heading, children: r }),
1097
+ e.map((a) => /* @__PURE__ */ o(Ee, { item: a, menu: n }, a.key)),
1098
+ s && /* @__PURE__ */ o("div", { className: N.Divider }),
1099
+ t?.map((a) => /* @__PURE__ */ o(Ee, { item: a, menu: n, dim: !0 }, a.key))
1100
+ ] });
1101
+ }
1102
+ function dr({ count: e = 3 }) {
1103
+ const n = Me(() => Array.from({ length: Math.max(0, e) }, (r, t) => t), [e]);
1104
+ return /* @__PURE__ */ o("div", { className: N.MenuSkeletonContainer, children: n.map((r) => /* @__PURE__ */ o("div", { className: N.MenuSkeletonRow, role: "presentation" }, r)) });
1105
+ }
1106
+ const _r = { duration: 0.15, ease: [0.2, 0.7, 0.2, 1] };
1107
+ function fr({ value: e, onChange: n, placeholder: r }) {
1108
+ function t(s) {
1109
+ s.key === "Escape" && n("");
1110
+ }
1111
+ return /* @__PURE__ */ o(
1112
+ oe.div,
1113
+ {
1114
+ className: N.MenuSearchFieldContainer,
1115
+ initial: { opacity: 0, height: 0 },
1116
+ animate: { opacity: 1, height: "auto" },
1117
+ exit: { opacity: 0, height: 0 },
1118
+ transition: _r,
1119
+ children: /* @__PURE__ */ o(
1120
+ it,
1121
+ {
1122
+ value: e,
1123
+ setValue: n,
1124
+ placeholder: r ?? "Search",
1125
+ autoFocus: !0,
1126
+ onKeyDown: t,
1127
+ startIcon: /* @__PURE__ */ o(so, { size: 14 })
1128
+ }
1129
+ )
1130
+ }
1131
+ );
1132
+ }
1133
+ function hr(e, n, r) {
1134
+ const t = n.trim().toLowerCase();
1135
+ if (!t) return { matches: e, rest: [] };
1136
+ const s = [], a = [];
1137
+ for (const i of e)
1138
+ r(i).toLowerCase().includes(t) ? s.push(i) : a.push(i);
1139
+ return { matches: s, rest: a };
1140
+ }
1141
+ function mr(e) {
1142
+ return e instanceof HTMLElement ? e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable : !1;
1143
+ }
1144
+ function pr(e) {
1145
+ const [n, r] = S("");
1146
+ return b(() => {
1147
+ if (!e) return;
1148
+ function t(s) {
1149
+ if (!mr(document.activeElement)) {
1150
+ if (s.key === "Backspace") {
1151
+ r((a) => a.slice(0, -1));
1152
+ return;
1153
+ }
1154
+ s.key.length === 1 && !s.ctrlKey && !s.metaKey && !s.altKey && (r((a) => a + s.key), s.preventDefault());
1155
+ }
1156
+ }
1157
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
1158
+ }, [e]), { query: n, setQuery: r };
1159
+ }
1160
+ function gr(e) {
1161
+ return e.searchText !== void 0 ? e.searchText : typeof e.label == "string" ? e.label : "";
1162
+ }
1163
+ function Ae({ section: e, menu: n, onBack: r, skeletonCount: t, active: s }) {
1164
+ const a = !!e.searchable && !!e.items, { query: i, setQuery: c } = pr(!!s && a);
1165
+ b(() => c(""), [e, c]);
1166
+ const { matches: d, rest: u } = Me(
1167
+ () => hr(e.items ?? [], i, gr),
1168
+ [e.items, i]
1169
+ ), l = r ? void 0 : e.title;
1170
+ let _;
1171
+ return e.loading ? _ = /* @__PURE__ */ o(dr, { count: t }) : e.renderPanel ? _ = e.renderPanel() : a ? _ = /* @__PURE__ */ o(Be, { items: d, rest: u, menu: n, heading: l }) : _ = /* @__PURE__ */ o(Be, { items: e.items ?? [], menu: n, heading: l }), /* @__PURE__ */ m("div", { className: N.FlyoutPanelContainer, children: [
1172
+ r && /* @__PURE__ */ m(qe, { variant: "unstyled", className: N.Back, onClick: r, children: [
1173
+ /* @__PURE__ */ o("span", { className: N.Chevron, children: "‹" }),
1174
+ e.title ?? "Back"
1175
+ ] }),
1176
+ a && /* @__PURE__ */ o(le, { children: i !== "" && /* @__PURE__ */ o(fr, { value: i, onChange: c }) }),
1177
+ _
1178
+ ] });
1179
+ }
1180
+ function Cr(e, n, r, t, s) {
1181
+ const a = r.width - 2 * t, i = Math.max(t, r.width - t - n.width), c = Math.min(Math.max(e.right - n.width, t), i), d = e.top - s - t, u = r.height - t - e.bottom - s;
1182
+ if (n.height > d && u > d)
1183
+ return { top: e.bottom + s, left: c, maxHeight: u, maxWidth: a };
1184
+ const l = e.top - s - n.height;
1185
+ return { top: l < t ? t : l, left: c, maxHeight: d, maxWidth: a };
1186
+ }
1187
+ function vr(e, n, r, t, s) {
1188
+ if (s) return { side: "collapse" };
1189
+ const a = e.right + n.width <= r.width - t, i = e.left - n.width, c = a ? "right" : i >= t ? "left" : null;
1190
+ if (!c) return { side: "collapse" };
1191
+ const d = c === "right" ? e.right : i, u = r.height - t - e.top, l = e.bottom - t;
1192
+ if (u >= n.height || u >= l)
1193
+ return { side: c, left: d, top: e.top, maxHeight: u };
1194
+ const _ = Math.max(e.bottom - n.height, t);
1195
+ return { side: c, left: d, top: _, maxHeight: l };
1196
+ }
1197
+ function Ue(e, n, r) {
1198
+ const [t, s] = S(null), a = T(n), i = T(r);
1199
+ a.current = n, i.current = r;
1200
+ const c = T(null);
1201
+ return Ne(() => {
1202
+ if (!e) {
1203
+ c.current = null, s(null);
1204
+ return;
1205
+ }
1206
+ let d = 0;
1207
+ function u() {
1208
+ const l = a.current();
1209
+ if (l !== null) {
1210
+ const _ = c.current;
1211
+ (_ === null || !i.current(_, l)) && (c.current = l, s(l));
1212
+ }
1213
+ d = requestAnimationFrame(u);
1214
+ }
1215
+ return u(), () => {
1216
+ cancelAnimationFrame(d), c.current = null, s(null);
1217
+ };
1218
+ }, [e]), t;
1219
+ }
1220
+ const Ge = 8, wr = 8, yr = 150, Nr = 3;
1221
+ function $e() {
1222
+ return { width: window.innerWidth, height: window.innerHeight };
1223
+ }
1224
+ function we() {
1225
+ return window.matchMedia("(orientation: portrait)").matches;
1226
+ }
1227
+ function Ve(e) {
1228
+ return { width: e.scrollWidth || e.offsetWidth, height: e.scrollHeight || e.offsetHeight };
1229
+ }
1230
+ function Ir(e, n) {
1231
+ return e.top === n.top && e.left === n.left && e.maxHeight === n.maxHeight && e.maxWidth === n.maxWidth;
1232
+ }
1233
+ function Sr(e, n) {
1234
+ return e === "collapse" || n === "collapse" ? e === n : e.side === n.side && e.top === n.top && e.left === n.left && e.maxHeight === n.maxHeight;
1235
+ }
1236
+ function kr(e, n, r) {
1237
+ return Ue(
1238
+ e,
1239
+ () => {
1240
+ const t = n.current, s = r.current;
1241
+ return !t || !s ? null : Cr(t.getBoundingClientRect(), Ve(s), $e(), Ge, wr);
1242
+ },
1243
+ Ir
1244
+ );
1245
+ }
1246
+ function Rr(e, n, r) {
1247
+ return Ue(
1248
+ e,
1249
+ () => {
1250
+ const t = n.current, s = r.current;
1251
+ if (!t || !s) return null;
1252
+ const a = vr(s.getBoundingClientRect(), Ve(t), $e(), Ge, we());
1253
+ return a.side === "collapse" ? "collapse" : a;
1254
+ },
1255
+ Sr
1256
+ );
1257
+ }
1258
+ function Tr(e) {
1259
+ const { anchorRef: n, panelRef: r, submenuRef: t, open: s, onOpenChange: a } = e, [i, c] = S(!1), d = s ?? i, [u, l] = S([]), [_, p] = S(null), C = T(null), y = T(void 0), k = E((I) => {
1260
+ c(I), a?.(I);
1261
+ }, [a]), x = E((I) => {
1262
+ p(null), l((w) => w.length >= Nr ? w : [...w, I]);
1263
+ }, []);
1264
+ b(() => {
1265
+ d || (l([]), p(null), C.current = null, y.current && clearTimeout(y.current));
1266
+ }, [d]);
1267
+ const R = E((I, w) => {
1268
+ if (y.current && clearTimeout(y.current), C.current = I, we()) {
1269
+ x(w);
1270
+ return;
1271
+ }
1272
+ p({ section: w, placement: null });
1273
+ }, [x]), M = E((I, w) => {
1274
+ if (we()) {
1275
+ u[u.length - 1] === w ? l((Q) => Q.slice(0, -1)) : R(I, w);
1276
+ return;
1277
+ }
1278
+ _ && _.section === w ? p(null) : R(I, w);
1279
+ }, [u, _, R]), V = E(() => {
1280
+ y.current && clearTimeout(y.current), y.current = setTimeout(() => p(null), yr);
1281
+ }, []), U = E(() => {
1282
+ y.current && clearTimeout(y.current);
1283
+ }, []), v = Rr(!!_, t, C), A = kr(d, n, r);
1284
+ b(() => {
1285
+ if (!(!_ || !v)) {
1286
+ if (v === "collapse") {
1287
+ x(_.section);
1288
+ return;
1289
+ }
1290
+ _.placement !== v && p({ section: _.section, placement: v });
1291
+ }
1292
+ }, [v, _, x]);
1293
+ const K = E(() => l((I) => I.slice(0, -1)), []), X = E(() => k(!1), [k]), Z = E(() => k(!d), [k, d]), O = E((I) => {
1294
+ I.onSelect?.(), k(!1);
1295
+ }, [k]);
1296
+ return {
1297
+ open: d,
1298
+ toggle: Z,
1299
+ close: X,
1300
+ back: K,
1301
+ selectItem: O,
1302
+ openSubmenuFrom: R,
1303
+ toggleSubmenuFrom: M,
1304
+ closeSubmenuSoon: V,
1305
+ holdSubmenu: U,
1306
+ frame: u[u.length - 1] ?? null,
1307
+ menuPlacement: A,
1308
+ submenu: _
1309
+ };
1310
+ }
1311
+ const xe = { duration: 0.15, ease: [0.2, 0.7, 0.2, 1] };
1312
+ function Qr(e) {
1313
+ const { anchorRef: n, open: r, onClose: t, items: s, rootTitle: a, skeletonCount: i } = e, c = T(null), d = T(null);
1314
+ function u(y) {
1315
+ y || t();
1316
+ }
1317
+ const l = Tr({ anchorRef: n, panelRef: c, submenuRef: d, open: r, onOpenChange: u }), _ = l.frame ?? { title: a, items: s, searchable: e.searchable }, p = l.menuPlacement, C = l.submenu?.placement ?? null;
1318
+ return Ie(
1319
+ /* @__PURE__ */ m("div", { className: N.FlyoutMenuContainer, children: [
1320
+ r && /* @__PURE__ */ o("div", { className: N.Backdrop, onClick: t }),
1321
+ /* @__PURE__ */ o(le, { children: r && /* @__PURE__ */ o(
1322
+ oe.div,
1323
+ {
1324
+ ref: c,
1325
+ className: N.Panel,
1326
+ style: p ? { top: p.top, left: p.left, maxHeight: p.maxHeight, maxWidth: p.maxWidth } : { visibility: "hidden" },
1327
+ initial: { opacity: 0, scale: 0.94, y: 6 },
1328
+ animate: { opacity: 1, scale: 1, y: 0 },
1329
+ exit: { opacity: 0, scale: 0.94, y: 6 },
1330
+ transition: xe,
1331
+ children: /* @__PURE__ */ o(ve.Provider, { value: !!p, children: /* @__PURE__ */ o(
1332
+ Ae,
1333
+ {
1334
+ section: _,
1335
+ menu: l,
1336
+ onBack: l.frame ? l.back : void 0,
1337
+ skeletonCount: i,
1338
+ active: !l.submenu
1339
+ }
1340
+ ) })
1341
+ },
1342
+ "flyout-panel"
1343
+ ) }),
1344
+ /* @__PURE__ */ o(le, { children: r && l.submenu && /* @__PURE__ */ o(
1345
+ oe.div,
1346
+ {
1347
+ ref: d,
1348
+ className: N.Submenu,
1349
+ style: C ? { top: C.top, left: C.left, maxHeight: C.maxHeight } : { visibility: "hidden" },
1350
+ onMouseEnter: l.holdSubmenu,
1351
+ onMouseLeave: l.closeSubmenuSoon,
1352
+ initial: { opacity: 0, scale: 0.94, x: 6 },
1353
+ animate: { opacity: 1, scale: 1, x: 0 },
1354
+ exit: { opacity: 0, scale: 0.94, x: 6 },
1355
+ transition: xe,
1356
+ children: /* @__PURE__ */ o(ve.Provider, { value: !!C, children: /* @__PURE__ */ o(
1357
+ Ae,
1358
+ {
1359
+ section: l.submenu.section,
1360
+ menu: l,
1361
+ skeletonCount: i,
1362
+ active: !0
1363
+ }
1364
+ ) })
1365
+ },
1366
+ "flyout-submenu"
1367
+ ) })
1037
1368
  ] }),
1038
- ye()
1369
+ document.body
1039
1370
  );
1040
1371
  }
1041
- function er({ classNames: e, children: n }) {
1042
- return /* @__PURE__ */ t(Te.Provider, { value: e, children: n });
1372
+ function Yr({ classNames: e, children: n }) {
1373
+ return /* @__PURE__ */ o(Oe.Provider, { value: e, children: n });
1043
1374
  }
1044
- var he = /* @__PURE__ */ ((e) => (e[e.OK = 0] = "OK", e[e.CANCELLED = 1] = "CANCELLED", e[e.UNKNOWN = 2] = "UNKNOWN", e[e.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", e[e.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", e[e.NOT_FOUND = 5] = "NOT_FOUND", e[e.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", e[e.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", e[e.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", e[e.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", e[e.ABORTED = 10] = "ABORTED", e[e.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", e[e.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", e[e.INTERNAL = 13] = "INTERNAL", e[e.UNAVAILABLE = 14] = "UNAVAILABLE", e[e.DATA_LOSS = 15] = "DATA_LOSS", e[e.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", e))(he || {});
1045
- const Do = "type.googleapis.com/google.rpc.ErrorInfo", Eo = "type.googleapis.com/google.rpc.BadRequest", jo = "type.googleapis.com/google.rpc.PreconditionFailure";
1046
- function re(e) {
1375
+ var ye = /* @__PURE__ */ ((e) => (e[e.OK = 0] = "OK", e[e.CANCELLED = 1] = "CANCELLED", e[e.UNKNOWN = 2] = "UNKNOWN", e[e.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", e[e.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", e[e.NOT_FOUND = 5] = "NOT_FOUND", e[e.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", e[e.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", e[e.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", e[e.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", e[e.ABORTED = 10] = "ABORTED", e[e.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", e[e.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", e[e.INTERNAL = 13] = "INTERNAL", e[e.UNAVAILABLE = 14] = "UNAVAILABLE", e[e.DATA_LOSS = 15] = "DATA_LOSS", e[e.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", e))(ye || {});
1376
+ const br = "type.googleapis.com/google.rpc.ErrorInfo", Lr = "type.googleapis.com/google.rpc.BadRequest", Dr = "type.googleapis.com/google.rpc.PreconditionFailure";
1377
+ function ie(e) {
1047
1378
  return typeof e == "object" && e !== null;
1048
1379
  }
1049
- function E(e) {
1380
+ function q(e) {
1050
1381
  return typeof e == "string" ? e : "";
1051
1382
  }
1052
- function Bo(e) {
1053
- if (!re(e))
1383
+ function Er(e) {
1384
+ if (!ie(e))
1054
1385
  return { kind: "Unknown", typeUrl: "", raw: e };
1055
- const n = E(e["@type"]);
1386
+ const n = q(e["@type"]);
1056
1387
  switch (n) {
1057
- case Do: {
1058
- const o = re(e.metadata) ? e.metadata : {}, r = {};
1059
- for (const s of Object.keys(o))
1060
- r[s] = E(o[s]);
1388
+ case br: {
1389
+ const r = ie(e.metadata) ? e.metadata : {}, t = {};
1390
+ for (const s of Object.keys(r))
1391
+ t[s] = q(r[s]);
1061
1392
  return {
1062
1393
  kind: "ErrorInfo",
1063
- reason: E(e.reason),
1064
- domain: E(e.domain),
1065
- metadata: r
1394
+ reason: q(e.reason),
1395
+ domain: q(e.domain),
1396
+ metadata: t
1066
1397
  };
1067
1398
  }
1068
- case Eo:
1399
+ case Lr:
1069
1400
  return { kind: "BadRequest", fieldViolations: (Array.isArray(e.fieldViolations) ? e.fieldViolations : []).map((s) => {
1070
- const a = re(s) ? s : {};
1401
+ const a = ie(s) ? s : {};
1071
1402
  return {
1072
- field: E(a.field),
1073
- description: E(a.description)
1403
+ field: q(a.field),
1404
+ description: q(a.description)
1074
1405
  };
1075
1406
  }) };
1076
- case jo:
1407
+ case Dr:
1077
1408
  return { kind: "PreconditionFailure", violations: (Array.isArray(e.violations) ? e.violations : []).map((s) => {
1078
- const a = re(s) ? s : {};
1409
+ const a = ie(s) ? s : {};
1079
1410
  return {
1080
- type: E(a.type),
1081
- subject: E(a.subject),
1082
- description: E(a.description)
1411
+ type: q(a.type),
1412
+ subject: q(a.subject),
1413
+ description: q(a.description)
1083
1414
  };
1084
1415
  }) };
1085
1416
  default:
1086
1417
  return { kind: "Unknown", typeUrl: n, raw: e };
1087
1418
  }
1088
1419
  }
1089
- function nr(e) {
1420
+ function Jr(e) {
1090
1421
  return e.kind === "ErrorInfo";
1091
1422
  }
1092
- function tr(e) {
1423
+ function Zr(e) {
1093
1424
  return e.kind === "BadRequest";
1094
1425
  }
1095
- function or(e) {
1426
+ function es(e) {
1096
1427
  return e.kind === "PreconditionFailure";
1097
1428
  }
1098
- class se extends Error {
1429
+ class ce extends Error {
1099
1430
  constructor(n) {
1100
1431
  super(n.title), this.isRetryable = n.isRetryable ?? !1, this.grpcCode = n.grpcCode, this.details = n.details ?? [];
1101
1432
  }
1102
1433
  }
1103
- function rr(e) {
1104
- if (e instanceof se) return e;
1434
+ function ns(e) {
1435
+ if (e instanceof ce) return e;
1105
1436
  if (e instanceof Error && e.message === "Failed to fetch")
1106
- return new se({ title: "Server unavailable. Try again later", isRetryable: !0 });
1437
+ return new ce({ title: "Server unavailable. Try again later", isRetryable: !0 });
1107
1438
  if (typeof e == "object" && e !== null && "code" in e) {
1108
- const n = e, o = n.code === he.UNAVAILABLE || n.code === he.INTERNAL, r = (n.details ?? []).map(Bo);
1109
- return new se({ title: n.message, isRetryable: o, grpcCode: n.code, details: r });
1439
+ const n = e, r = n.code === ye.UNAVAILABLE || n.code === ye.INTERNAL, t = (n.details ?? []).map(Er);
1440
+ return new ce({ title: n.message, isRetryable: r, grpcCode: n.code, details: t });
1110
1441
  }
1111
- return new se({ title: String(e), isRetryable: !1 });
1442
+ return new ce({ title: String(e), isRetryable: !1 });
1112
1443
  }
1113
1444
  export {
1114
- $o as AvatarFallbackIcon,
1115
- Eo as BAD_REQUEST_TYPE_URL,
1116
- Ko as Button,
1117
- Go as CheckmarkIcon,
1118
- qt as ChevronDownIcon,
1119
- er as ChuresConfigProvider,
1120
- Xo as ConfirmDialog,
1121
- Vo as Dropdown,
1122
- Do as ERROR_INFO_TYPE_URL,
1123
- qo as EditPencilIcon,
1124
- he as Errors,
1125
- Yo as InfoDialog,
1126
- Fo as Input,
1127
- fn as Loader,
1128
- Wo as LoadingWrapper,
1129
- Qo as ModalActions,
1130
- Jo as ModalClose,
1131
- jo as PRECONDITION_FAILURE_TYPE_URL,
1132
- Ho as SearchIcon,
1133
- se as ServiceError,
1134
- Zo as SideDrawer,
1135
- zo as TelegramAuth,
1136
- kn as TelegramSignInButton,
1137
- Mo as Toaster,
1138
- Uo as Toggle,
1139
- tr as isBadRequest,
1140
- nr as isErrorInfo,
1141
- or as isPreconditionFailure,
1142
- Bo as parseErrorDetail,
1143
- rr as parseGrpcError,
1144
- Ne as popOverlayBack,
1145
- To as pushOverlayBack,
1146
- Ro as useBackableOverlay,
1147
- v as useComponentClassName,
1148
- Cn as useTelegramLogin,
1149
- Re as useToaster
1445
+ Hr as AvatarFallbackIcon,
1446
+ Lr as BAD_REQUEST_TYPE_URL,
1447
+ qe as Button,
1448
+ qr as CheckmarkIcon,
1449
+ ro as ChevronDownIcon,
1450
+ Yr as ChuresConfigProvider,
1451
+ Gr as ConfirmDialog,
1452
+ Ur as Dropdown,
1453
+ br as ERROR_INFO_TYPE_URL,
1454
+ zr as EditPencilIcon,
1455
+ ye as Errors,
1456
+ Qr as FlyoutMenu,
1457
+ $r as InfoDialog,
1458
+ it as Input,
1459
+ Tn as Loader,
1460
+ Mr as LoadingWrapper,
1461
+ ve as MenuMeasuredContext,
1462
+ fr as MenuSearchField,
1463
+ dr as MenuSkeleton,
1464
+ Vr as ModalActions,
1465
+ Kr as ModalClose,
1466
+ Dr as PRECONDITION_FAILURE_TYPE_URL,
1467
+ so as SearchIcon,
1468
+ ce as ServiceError,
1469
+ Xr as SideDrawer,
1470
+ Or as TelegramAuth,
1471
+ Mn as TelegramSignInButton,
1472
+ Wr as Toaster,
1473
+ Fr as Toggle,
1474
+ Zr as isBadRequest,
1475
+ Jr as isErrorInfo,
1476
+ es as isPreconditionFailure,
1477
+ gr as menuItemText,
1478
+ Er as parseErrorDetail,
1479
+ ns as parseGrpcError,
1480
+ hr as partitionBySubstring,
1481
+ Le as popOverlayBack,
1482
+ qo as pushOverlayBack,
1483
+ zo as useBackableOverlay,
1484
+ L as useComponentClassName,
1485
+ Uo as useMenuMeasured,
1486
+ En as useTelegramLogin,
1487
+ We as useToaster,
1488
+ pr as useTypeToSearch
1150
1489
  };