@vervstack/chures 0.0.27 → 0.0.31
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 +630 -525
- package/dist/chures.umd.cjs +2 -2
- package/dist/components/Dropdown/Dropdown.d.ts +4 -3
- package/dist/components/Dropdown/Dropdown.types.d.ts +6 -0
- package/dist/components/Dropdown/DropdownPanel.d.ts +4 -2
- package/dist/components/Dropdown/index.d.ts +1 -1
- package/dist/components/SideDrawer/SideDrawer.d.ts +13 -0
- package/dist/components/SideDrawer/index.d.ts +2 -0
- package/dist/hooks/overlayBack/overlayBackStack.d.ts +3 -0
- package/dist/hooks/overlayBack/useBackableOverlay.d.ts +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/theme/ComponentClassNamesContext.d.ts +1 -1
- package/package.json +1 -1
package/dist/chures.js
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
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}}@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}}@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)}")),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { jsx as t, jsxs as _, Fragment as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { AnimatePresence as
|
|
5
|
-
import { create as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
function
|
|
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) {
|
|
8
8
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
9
9
|
}
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
return
|
|
10
|
+
var ue = { exports: {} };
|
|
11
|
+
var ve;
|
|
12
|
+
function Ue() {
|
|
13
|
+
return ve || (ve = 1, (function(e) {
|
|
14
14
|
(function() {
|
|
15
15
|
var n = {}.hasOwnProperty;
|
|
16
16
|
function o() {
|
|
17
|
-
for (var
|
|
18
|
-
var
|
|
19
|
-
|
|
17
|
+
for (var a = "", i = 0; i < arguments.length; i++) {
|
|
18
|
+
var l = arguments[i];
|
|
19
|
+
l && (a = s(a, r(l)));
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return a;
|
|
22
22
|
}
|
|
23
|
-
function r(
|
|
24
|
-
if (typeof
|
|
25
|
-
return
|
|
26
|
-
if (typeof
|
|
23
|
+
function r(a) {
|
|
24
|
+
if (typeof a == "string" || typeof a == "number")
|
|
25
|
+
return a;
|
|
26
|
+
if (typeof a != "object")
|
|
27
27
|
return "";
|
|
28
|
-
if (Array.isArray(
|
|
29
|
-
return o.apply(null,
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
28
|
+
if (Array.isArray(a))
|
|
29
|
+
return o.apply(null, a);
|
|
30
|
+
if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]"))
|
|
31
|
+
return a.toString();
|
|
32
32
|
var i = "";
|
|
33
|
-
for (var
|
|
34
|
-
n.call(
|
|
33
|
+
for (var l in a)
|
|
34
|
+
n.call(a, l) && a[l] && (i = s(i, l));
|
|
35
35
|
return i;
|
|
36
36
|
}
|
|
37
|
-
function a
|
|
38
|
-
return i ?
|
|
37
|
+
function s(a, i) {
|
|
38
|
+
return i ? a ? a + " " + i : a + i : a;
|
|
39
39
|
}
|
|
40
40
|
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
41
41
|
})();
|
|
42
|
-
})(
|
|
42
|
+
})(ue)), ue.exports;
|
|
43
43
|
}
|
|
44
|
-
var
|
|
45
|
-
const p = /* @__PURE__ */
|
|
46
|
-
LoaderContainer:
|
|
47
|
-
sm:
|
|
48
|
-
md:
|
|
49
|
-
lg:
|
|
50
|
-
Arc1:
|
|
51
|
-
Arc2:
|
|
52
|
-
Arc3:
|
|
53
|
-
spin:
|
|
54
|
-
Ring1:
|
|
55
|
-
Ring2:
|
|
56
|
-
Ring3:
|
|
57
|
-
ripple:
|
|
58
|
-
Dot1:
|
|
59
|
-
Dot2:
|
|
60
|
-
Dot3:
|
|
61
|
-
dotPulse:
|
|
62
|
-
Wave1:
|
|
63
|
-
Wave2:
|
|
64
|
-
Wave3:
|
|
65
|
-
Wave4:
|
|
66
|
-
Wave5:
|
|
67
|
-
waveBounce:
|
|
68
|
-
},
|
|
69
|
-
function
|
|
70
|
-
const o =
|
|
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
71
|
return n ?? o[e];
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function pn(e, n) {
|
|
74
74
|
switch (e) {
|
|
75
75
|
case "ripple":
|
|
76
|
-
return /* @__PURE__ */ _(
|
|
76
|
+
return /* @__PURE__ */ _(B, { children: [
|
|
77
77
|
/* @__PURE__ */ t("div", { className: n.Ring1 }),
|
|
78
78
|
/* @__PURE__ */ t("div", { className: n.Ring2 }),
|
|
79
79
|
/* @__PURE__ */ t("div", { className: n.Ring3 })
|
|
80
80
|
] });
|
|
81
81
|
case "dots":
|
|
82
|
-
return /* @__PURE__ */ _(
|
|
82
|
+
return /* @__PURE__ */ _(B, { children: [
|
|
83
83
|
/* @__PURE__ */ t("div", { className: n.Dot1 }),
|
|
84
84
|
/* @__PURE__ */ t("div", { className: n.Dot2 }),
|
|
85
85
|
/* @__PURE__ */ t("div", { className: n.Dot3 })
|
|
86
86
|
] });
|
|
87
87
|
case "wave":
|
|
88
|
-
return /* @__PURE__ */ _(
|
|
88
|
+
return /* @__PURE__ */ _(B, { children: [
|
|
89
89
|
/* @__PURE__ */ t("div", { className: n.Wave1 }),
|
|
90
90
|
/* @__PURE__ */ t("div", { className: n.Wave2 }),
|
|
91
91
|
/* @__PURE__ */ t("div", { className: n.Wave3 }),
|
|
@@ -93,81 +93,81 @@ function nn(e, n) {
|
|
|
93
93
|
/* @__PURE__ */ t("div", { className: n.Wave5 })
|
|
94
94
|
] });
|
|
95
95
|
default:
|
|
96
|
-
return /* @__PURE__ */ _(
|
|
96
|
+
return /* @__PURE__ */ _(B, { children: [
|
|
97
97
|
/* @__PURE__ */ t("div", { className: n.Arc1 }),
|
|
98
98
|
/* @__PURE__ */ t("div", { className: n.Arc2 }),
|
|
99
99
|
/* @__PURE__ */ t("div", { className: n.Arc3 })
|
|
100
100
|
] });
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
const
|
|
103
|
+
function fn({ variant: e = "arcs", size: n = "md", color: o, className: r }) {
|
|
104
|
+
const s = v("Loader", r);
|
|
105
105
|
return /* @__PURE__ */ t(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
|
-
className: p(
|
|
108
|
+
className: p(oe.LoaderContainer, oe[n], oe[e], s),
|
|
109
109
|
role: "status",
|
|
110
110
|
"aria-label": "Loading",
|
|
111
111
|
style: o ? { "--chures-accent": o } : void 0,
|
|
112
|
-
children:
|
|
112
|
+
children: pn(e, oe)
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
LoadingWrapperContainer:
|
|
118
|
-
SkeletonWrapper:
|
|
116
|
+
const hn = "_LoadingWrapperContainer_1q0w7_1", mn = "_SkeletonWrapper_1q0w7_9", we = {
|
|
117
|
+
LoadingWrapperContainer: hn,
|
|
118
|
+
SkeletonWrapper: mn
|
|
119
119
|
};
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
return e ? o ? /* @__PURE__ */ t("div", { className: p(
|
|
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 });
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
function
|
|
126
|
-
const { botId: n, redirectUri: o, requestAccess: r = "write" } = e,
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
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);
|
|
127
|
+
s.current = e.onSuccess;
|
|
128
|
+
const a = G(!1), [i, l] = N(!1), [f, d] = N(!1);
|
|
129
|
+
b(function() {
|
|
130
130
|
if (!n) return;
|
|
131
131
|
const m = o ?? window.location.origin;
|
|
132
|
-
|
|
132
|
+
d(!0), l(!1);
|
|
133
133
|
const g = document.createElement("script");
|
|
134
|
-
return g.src =
|
|
135
|
-
const
|
|
136
|
-
|
|
134
|
+
return g.src = gn, g.async = !0, g.onload = function() {
|
|
135
|
+
const y = window.Telegram;
|
|
136
|
+
y && (y.Login.init(
|
|
137
137
|
{ client_id: n, redirect_uri: m },
|
|
138
|
-
function(
|
|
139
|
-
|
|
138
|
+
function(x) {
|
|
139
|
+
a.current || (a.current = !0, s.current(x));
|
|
140
140
|
}
|
|
141
|
-
),
|
|
141
|
+
), l(!0)), d(!1);
|
|
142
142
|
}, g.onerror = function() {
|
|
143
|
-
|
|
143
|
+
d(!1);
|
|
144
144
|
}, document.head.appendChild(g), function() {
|
|
145
|
-
document.head.contains(g) && document.head.removeChild(g),
|
|
145
|
+
document.head.contains(g) && document.head.removeChild(g), l(!1), d(!1);
|
|
146
146
|
};
|
|
147
147
|
}, [n, o]);
|
|
148
148
|
function h() {
|
|
149
149
|
const m = window.Telegram;
|
|
150
150
|
if (!i || !m) return;
|
|
151
|
-
|
|
151
|
+
a.current = !1;
|
|
152
152
|
const g = o ?? window.location.origin;
|
|
153
153
|
m.Login.auth(
|
|
154
154
|
{ client_id: n, redirect_uri: g, request_access: r },
|
|
155
|
-
function(
|
|
156
|
-
|
|
155
|
+
function(y) {
|
|
156
|
+
a.current || (a.current = !0, s.current(y));
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
160
|
return { login: h, isReady: i, isLoading: f };
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
TelegramSignInButtonContainer:
|
|
164
|
-
FullSize:
|
|
165
|
-
Icon:
|
|
166
|
-
},
|
|
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 = {
|
|
167
167
|
en: "Continue with Telegram",
|
|
168
168
|
ru: "Войти через Telegram"
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function yn() {
|
|
171
171
|
return /* @__PURE__ */ t(
|
|
172
172
|
"svg",
|
|
173
173
|
{
|
|
@@ -176,172 +176,172 @@ function _n() {
|
|
|
176
176
|
height: "20",
|
|
177
177
|
fill: "currentColor",
|
|
178
178
|
"aria-hidden": "true",
|
|
179
|
-
className:
|
|
179
|
+
className: pe.Icon,
|
|
180
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" })
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function kn({
|
|
185
185
|
onClick: e,
|
|
186
186
|
disabled: n,
|
|
187
187
|
lang: o = "en",
|
|
188
188
|
title: r,
|
|
189
|
-
label:
|
|
190
|
-
fullSize:
|
|
189
|
+
label: s,
|
|
190
|
+
fullSize: a,
|
|
191
191
|
className: i
|
|
192
192
|
}) {
|
|
193
|
-
|
|
193
|
+
b(function() {
|
|
194
194
|
const h = "comfortaa-font";
|
|
195
195
|
if (document.getElementById(h)) return;
|
|
196
196
|
const m = document.createElement("link");
|
|
197
197
|
m.id = h, m.rel = "stylesheet", m.href = "https://fonts.googleapis.com/css2?family=Comfortaa:wght@600&display=swap", document.head.appendChild(m);
|
|
198
198
|
}, []);
|
|
199
|
-
const
|
|
200
|
-
return /* @__PURE__ */ _("button", { type: "button", className:
|
|
201
|
-
/* @__PURE__ */ t(
|
|
202
|
-
|
|
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
|
|
203
203
|
] });
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function zo({
|
|
206
206
|
botId: e,
|
|
207
207
|
onSuccess: n,
|
|
208
208
|
lang: o,
|
|
209
209
|
title: r,
|
|
210
|
-
redirectUri:
|
|
211
|
-
requestAccess:
|
|
210
|
+
redirectUri: s,
|
|
211
|
+
requestAccess: a,
|
|
212
212
|
children: i,
|
|
213
|
-
className:
|
|
213
|
+
className: l
|
|
214
214
|
}) {
|
|
215
|
-
const { login: f, isReady:
|
|
216
|
-
return i ? /* @__PURE__ */ t(
|
|
217
|
-
|
|
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,
|
|
218
218
|
{
|
|
219
219
|
onClick: f,
|
|
220
|
-
disabled: !
|
|
220
|
+
disabled: !d,
|
|
221
221
|
lang: o,
|
|
222
222
|
title: r,
|
|
223
|
-
className:
|
|
223
|
+
className: l
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
|
-
let
|
|
228
|
-
const
|
|
227
|
+
let Ln = 0;
|
|
228
|
+
const Re = Me((e, n) => ({
|
|
229
229
|
toasts: [],
|
|
230
230
|
bake: (o) => {
|
|
231
|
-
const r =
|
|
232
|
-
e((
|
|
231
|
+
const r = Ln++;
|
|
232
|
+
e((s) => ({ toasts: [...s.toasts, { ...o, id: r }] })), setTimeout(() => {
|
|
233
233
|
n().dismiss(r);
|
|
234
234
|
}, 5e3);
|
|
235
235
|
},
|
|
236
236
|
dismiss: (o) => {
|
|
237
237
|
e((r) => ({
|
|
238
|
-
toasts: r.toasts.filter((
|
|
238
|
+
toasts: r.toasts.filter((s) => s.id !== o)
|
|
239
239
|
}));
|
|
240
240
|
}
|
|
241
|
-
})),
|
|
242
|
-
ToastContainer:
|
|
243
|
-
Toast:
|
|
244
|
-
error:
|
|
245
|
-
warn:
|
|
246
|
-
info:
|
|
247
|
-
Description:
|
|
248
|
-
DismissButton:
|
|
249
|
-
slideIn:
|
|
250
|
-
slideOut:
|
|
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
|
|
251
251
|
};
|
|
252
|
-
function
|
|
253
|
-
const { toasts: n } =
|
|
254
|
-
return /* @__PURE__ */ t("div", { className: p(
|
|
255
|
-
|
|
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,
|
|
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(
|
|
262
|
+
children: /* @__PURE__ */ t(On, { ...r })
|
|
263
263
|
},
|
|
264
264
|
r.id
|
|
265
265
|
)) }) });
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
const [
|
|
269
|
-
return
|
|
267
|
+
function On({ id: e, title: n, description: o, level: r, isDismissable: s }) {
|
|
268
|
+
const [a, i] = N(!1), l = Re();
|
|
269
|
+
return b(() => () => {
|
|
270
270
|
i(!0);
|
|
271
271
|
}, []), /* @__PURE__ */ _(
|
|
272
272
|
"div",
|
|
273
273
|
{
|
|
274
|
-
className: p(
|
|
275
|
-
[
|
|
276
|
-
[
|
|
277
|
-
[
|
|
278
|
-
[
|
|
279
|
-
[
|
|
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
|
|
280
280
|
}),
|
|
281
281
|
children: [
|
|
282
282
|
/* @__PURE__ */ t("div", { children: n }),
|
|
283
|
-
/* @__PURE__ */ t("div", { className:
|
|
284
|
-
|
|
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: "×" })
|
|
285
285
|
]
|
|
286
286
|
}
|
|
287
287
|
);
|
|
288
288
|
}
|
|
289
|
-
const
|
|
290
|
-
InputContainer:
|
|
291
|
-
InputField:
|
|
292
|
-
hasStartIcon:
|
|
293
|
-
hasEndIcon:
|
|
294
|
-
StartIcon:
|
|
295
|
-
EndIcon:
|
|
296
|
-
hasError:
|
|
297
|
-
disabled:
|
|
298
|
-
Label:
|
|
299
|
-
lifted:
|
|
300
|
-
ErrorText:
|
|
301
|
-
Skeleton:
|
|
302
|
-
},
|
|
303
|
-
const [
|
|
304
|
-
return
|
|
305
|
-
h && /* @__PURE__ */ t("span", { className:
|
|
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
306
|
/* @__PURE__ */ t(
|
|
307
307
|
"input",
|
|
308
308
|
{
|
|
309
|
-
ref:
|
|
310
|
-
className: p(
|
|
311
|
-
type:
|
|
309
|
+
ref: y,
|
|
310
|
+
className: p(w.InputField, { [w.hasStartIcon]: !!h, [w.hasEndIcon]: !!m }, d),
|
|
311
|
+
type: a,
|
|
312
312
|
value: n,
|
|
313
313
|
onChange: (C) => o(C.target.value),
|
|
314
314
|
onFocus: (C) => {
|
|
315
|
-
|
|
315
|
+
W(!0), z?.(C);
|
|
316
316
|
},
|
|
317
317
|
onBlur: (C) => {
|
|
318
|
-
|
|
318
|
+
W(!1), K?.(C);
|
|
319
319
|
},
|
|
320
320
|
disabled: i,
|
|
321
|
-
...
|
|
321
|
+
...q
|
|
322
322
|
}
|
|
323
323
|
),
|
|
324
|
-
r && /* @__PURE__ */ t("label", { className: p(
|
|
325
|
-
m && /* @__PURE__ */ t("span", { className:
|
|
326
|
-
|
|
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 })
|
|
327
327
|
] });
|
|
328
|
-
}),
|
|
329
|
-
ToggleContainer:
|
|
330
|
-
disabled:
|
|
331
|
-
Track:
|
|
332
|
-
on:
|
|
333
|
-
Thumb:
|
|
334
|
-
Label:
|
|
335
|
-
LabelSkeleton:
|
|
336
|
-
Skeleton:
|
|
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
|
|
337
337
|
};
|
|
338
|
-
function
|
|
339
|
-
const f = !!o || i,
|
|
340
|
-
return
|
|
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
341
|
r === "left" && h,
|
|
342
342
|
/* @__PURE__ */ t("div", { className: L.Skeleton, "aria-hidden": "true" }),
|
|
343
343
|
r === "right" && h
|
|
344
|
-
] }) : /* @__PURE__ */ t("div", { className: p(L.Skeleton,
|
|
344
|
+
] }) : /* @__PURE__ */ t("div", { className: p(L.Skeleton, d), "aria-hidden": "true" }) : /* @__PURE__ */ _("label", { className: p(L.ToggleContainer, { [L.disabled]: s }, d), children: [
|
|
345
345
|
r === "left" && h,
|
|
346
346
|
/* @__PURE__ */ t(
|
|
347
347
|
"button",
|
|
@@ -349,8 +349,8 @@ function Co({ checked: e, onChange: n, label: o, labelPosition: r = "right", dis
|
|
|
349
349
|
role: "switch",
|
|
350
350
|
"aria-checked": e,
|
|
351
351
|
className: p(L.Track, { [L.on]: e }),
|
|
352
|
-
onClick: () => !
|
|
353
|
-
disabled:
|
|
352
|
+
onClick: () => !s && n(!e),
|
|
353
|
+
disabled: s,
|
|
354
354
|
type: "button",
|
|
355
355
|
children: /* @__PURE__ */ t("span", { className: L.Thumb })
|
|
356
356
|
}
|
|
@@ -358,101 +358,101 @@ function Co({ checked: e, onChange: n, label: o, labelPosition: r = "right", dis
|
|
|
358
358
|
r === "right" && h
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
const [e, n] =
|
|
363
|
-
return { isOpen: e, triggerRef: o, toggleOpen: r, close:
|
|
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 };
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
|
|
367
|
-
function r(
|
|
368
|
-
const i =
|
|
365
|
+
function ot(e, n, o) {
|
|
366
|
+
b(() => {
|
|
367
|
+
function r(a) {
|
|
368
|
+
const i = a.target;
|
|
369
369
|
e.current?.contains(i) || o?.current?.contains(i) || n();
|
|
370
370
|
}
|
|
371
|
-
function a
|
|
372
|
-
|
|
371
|
+
function s(a) {
|
|
372
|
+
a.key === "Escape" && n();
|
|
373
373
|
}
|
|
374
|
-
return document.addEventListener("mousedown", r, !0), document.addEventListener("keydown",
|
|
375
|
-
document.removeEventListener("mousedown", r, !0), document.removeEventListener("keydown",
|
|
374
|
+
return document.addEventListener("mousedown", r, !0), document.addEventListener("keydown", s), () => {
|
|
375
|
+
document.removeEventListener("mousedown", r, !0), document.removeEventListener("keydown", s);
|
|
376
376
|
};
|
|
377
377
|
}, [n, e, o]);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const [o, r] =
|
|
381
|
-
return
|
|
379
|
+
function rt(e, n) {
|
|
380
|
+
const [o, r] = N([]);
|
|
381
|
+
return b(() => {
|
|
382
382
|
if (!n) return;
|
|
383
|
-
let
|
|
384
|
-
return n(e).then((
|
|
385
|
-
|
|
383
|
+
let s = !1;
|
|
384
|
+
return n(e).then((a) => {
|
|
385
|
+
s || r(a);
|
|
386
386
|
}), () => {
|
|
387
|
-
|
|
387
|
+
s = !0;
|
|
388
388
|
};
|
|
389
389
|
}, [e, n]), o;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function J(e) {
|
|
392
392
|
return typeof e == "object" && e !== null && "group" in e;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
return e.flatMap((n) =>
|
|
394
|
+
function Se(e) {
|
|
395
|
+
return e.flatMap((n) => J(n) ? n.options : [n]);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function I(e) {
|
|
398
398
|
return typeof e == "string" ? e : e.id;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function ae(e) {
|
|
401
401
|
return typeof e == "string" ? e : e.name;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
return e.map((o) => n.find((r) =>
|
|
403
|
+
function st(e, n) {
|
|
404
|
+
return e.map((o) => n.find((r) => I(r) === o) ?? o);
|
|
405
405
|
}
|
|
406
|
-
const
|
|
407
|
-
DropdownContainer:
|
|
408
|
-
PanelWrapper:
|
|
409
|
-
Portal:
|
|
410
|
-
PanelContainer:
|
|
411
|
-
Glass:
|
|
412
|
-
Label:
|
|
413
|
-
lifted:
|
|
414
|
-
TriggerContainer:
|
|
415
|
-
Open:
|
|
416
|
-
TriggerPlaceholder:
|
|
417
|
-
TriggerValue:
|
|
418
|
-
TriggerIcon:
|
|
419
|
-
ChipsWrapper:
|
|
420
|
-
Expand:
|
|
421
|
-
MultiSelect:
|
|
422
|
-
ExpandHeight:
|
|
423
|
-
Chip:
|
|
424
|
-
SearchRow:
|
|
425
|
-
SearchBox:
|
|
426
|
-
SearchIcon:
|
|
427
|
-
SearchInput:
|
|
428
|
-
ResultsList:
|
|
429
|
-
OptionRow:
|
|
430
|
-
Selected:
|
|
431
|
-
Indented:
|
|
432
|
-
GroupHeader:
|
|
433
|
-
Checkmark:
|
|
434
|
-
CreateRow:
|
|
435
|
-
WithBorder:
|
|
436
|
-
CreateIcon:
|
|
437
|
-
CreateLabel:
|
|
438
|
-
EmptyHint:
|
|
439
|
-
SkeletonRow:
|
|
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
|
|
440
440
|
};
|
|
441
|
-
function
|
|
442
|
-
function r(
|
|
443
|
-
|
|
441
|
+
function zt({ query: e, withBorder: n, onCreate: o }) {
|
|
442
|
+
function r(s) {
|
|
443
|
+
s.preventDefault(), o();
|
|
444
444
|
}
|
|
445
445
|
return /* @__PURE__ */ _(
|
|
446
446
|
"div",
|
|
447
447
|
{
|
|
448
|
-
className: p(
|
|
448
|
+
className: p(u.CreateRow, n && u.WithBorder),
|
|
449
449
|
onMouseDown: r,
|
|
450
450
|
children: [
|
|
451
|
-
/* @__PURE__ */ t("span", { className:
|
|
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
452
|
/* @__PURE__ */ t("line", { x1: "5", y1: "1", x2: "5", y2: "9" }),
|
|
453
453
|
/* @__PURE__ */ t("line", { x1: "1", y1: "5", x2: "9", y2: "5" })
|
|
454
454
|
] }) }),
|
|
455
|
-
/* @__PURE__ */ _("span", { className:
|
|
455
|
+
/* @__PURE__ */ _("span", { className: u.CreateLabel, children: [
|
|
456
456
|
"create “",
|
|
457
457
|
e,
|
|
458
458
|
"”"
|
|
@@ -461,28 +461,28 @@ function Rt({ query: e, withBorder: n, onCreate: o }) {
|
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
465
|
-
return /* @__PURE__ */ t("div", { className:
|
|
464
|
+
function Mt({ label: e }) {
|
|
465
|
+
return /* @__PURE__ */ t("div", { className: u.GroupHeader, children: e });
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
function
|
|
467
|
+
function Ie({ opt: e, isSelected: n, multiSelect: o, onPick: r, indented: s = !1 }) {
|
|
468
|
+
function a(i) {
|
|
469
469
|
i.preventDefault(), r(e);
|
|
470
470
|
}
|
|
471
471
|
return /* @__PURE__ */ _(
|
|
472
472
|
"div",
|
|
473
473
|
{
|
|
474
|
-
className: p(
|
|
475
|
-
onMouseDown:
|
|
474
|
+
className: p(u.OptionRow, n && u.Selected, s && u.Indented),
|
|
475
|
+
onMouseDown: a,
|
|
476
476
|
children: [
|
|
477
|
-
o && n && /* @__PURE__ */ t("span", { className:
|
|
478
|
-
|
|
477
|
+
o && n && /* @__PURE__ */ t("span", { className: u.Checkmark, children: "✓" }),
|
|
478
|
+
ae(e)
|
|
479
479
|
]
|
|
480
480
|
}
|
|
481
481
|
);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
484
|
-
return /* @__PURE__ */ t("div", { className:
|
|
485
|
-
/* @__PURE__ */ t("span", { className:
|
|
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
486
|
/* @__PURE__ */ t("circle", { cx: "5", cy: "5", r: "3.5" }),
|
|
487
487
|
/* @__PURE__ */ t("line", { x1: "8", y1: "8", x2: "11", y2: "11" })
|
|
488
488
|
] }) }),
|
|
@@ -490,134 +490,143 @@ function jt({ inputRef: e, query: n, onChange: o, onKeyDown: r, placeholder: a }
|
|
|
490
490
|
"input",
|
|
491
491
|
{
|
|
492
492
|
ref: e,
|
|
493
|
-
className:
|
|
493
|
+
className: u.SearchInput,
|
|
494
494
|
value: n,
|
|
495
495
|
onChange: o,
|
|
496
496
|
onKeyDown: r,
|
|
497
|
-
placeholder:
|
|
497
|
+
placeholder: s
|
|
498
498
|
}
|
|
499
499
|
)
|
|
500
500
|
] }) });
|
|
501
501
|
}
|
|
502
|
-
function
|
|
503
|
-
return /* @__PURE__ */ t(
|
|
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)) });
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Gt({
|
|
506
506
|
onSearch: e,
|
|
507
507
|
onCreate: n,
|
|
508
508
|
onPick: o,
|
|
509
509
|
onClose: r,
|
|
510
|
-
anchorRef:
|
|
511
|
-
placeholder:
|
|
510
|
+
anchorRef: s,
|
|
511
|
+
placeholder: a,
|
|
512
512
|
options: i = [],
|
|
513
|
-
excluded:
|
|
513
|
+
excluded: l = [],
|
|
514
514
|
selected: f = [],
|
|
515
|
-
multiSelect:
|
|
515
|
+
multiSelect: d = !1,
|
|
516
516
|
selectedAtTop: h = !1,
|
|
517
517
|
isLoading: m = !1,
|
|
518
518
|
emptyHint: g = "no results found",
|
|
519
|
-
skeletonRowCount:
|
|
520
|
-
onError:
|
|
521
|
-
glass:
|
|
522
|
-
portal:
|
|
519
|
+
skeletonRowCount: y = 4,
|
|
520
|
+
onError: x = console.error,
|
|
521
|
+
glass: W = !1,
|
|
522
|
+
portal: V = !1,
|
|
523
|
+
renderOption: T
|
|
523
524
|
}) {
|
|
524
|
-
const [
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
if (!
|
|
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;
|
|
529
530
|
function c() {
|
|
530
|
-
|
|
531
|
+
s?.current && X(s.current.getBoundingClientRect());
|
|
531
532
|
}
|
|
532
533
|
return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
|
|
533
534
|
window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
|
|
534
535
|
};
|
|
535
|
-
}, [
|
|
536
|
-
|
|
537
|
-
}, [
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
540
|
-
const
|
|
541
|
-
return
|
|
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 }] : [];
|
|
542
543
|
}
|
|
543
|
-
return
|
|
544
|
-
}),
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
] :
|
|
548
|
-
(c) =>
|
|
549
|
-
),
|
|
550
|
-
async function
|
|
551
|
-
!
|
|
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)));
|
|
552
553
|
}
|
|
553
|
-
function
|
|
554
|
-
o(c),
|
|
554
|
+
function $(c) {
|
|
555
|
+
o(c), d || r();
|
|
555
556
|
}
|
|
556
|
-
function
|
|
557
|
-
|
|
557
|
+
function je(c) {
|
|
558
|
+
K(c.target.value);
|
|
558
559
|
}
|
|
559
|
-
function
|
|
560
|
-
c.key === "Enter" && (c.preventDefault(),
|
|
560
|
+
function Be(c) {
|
|
561
|
+
c.key === "Enter" && (c.preventDefault(), F.length > 0 ? $(F[0]) : le && me());
|
|
561
562
|
}
|
|
562
|
-
const
|
|
563
|
-
if (
|
|
564
|
-
const
|
|
563
|
+
const be = a ?? (n ? "search or add new…" : "search…");
|
|
564
|
+
if (A && !R) return null;
|
|
565
|
+
const ge = /* @__PURE__ */ t(
|
|
565
566
|
"div",
|
|
566
567
|
{
|
|
567
|
-
ref:
|
|
568
|
-
className: p(
|
|
569
|
-
style:
|
|
570
|
-
children: /* @__PURE__ */ _("div", { className: p(
|
|
571
|
-
|
|
572
|
-
|
|
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,
|
|
573
574
|
{
|
|
574
|
-
inputRef:
|
|
575
|
-
query:
|
|
576
|
-
onChange:
|
|
577
|
-
onKeyDown:
|
|
578
|
-
placeholder:
|
|
575
|
+
inputRef: Y,
|
|
576
|
+
query: z,
|
|
577
|
+
onChange: je,
|
|
578
|
+
onKeyDown: Be,
|
|
579
|
+
placeholder: be
|
|
579
580
|
}
|
|
580
581
|
),
|
|
581
|
-
/* @__PURE__ */ t("div", { className:
|
|
582
|
-
|
|
583
|
-
/* @__PURE__ */ t(
|
|
584
|
-
c.options.map((
|
|
585
|
-
|
|
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,
|
|
588
|
+
indented: !0,
|
|
589
|
+
onPick: () => $(S)
|
|
590
|
+
}) : /* @__PURE__ */ t(
|
|
591
|
+
Ie,
|
|
586
592
|
{
|
|
587
|
-
opt:
|
|
588
|
-
isSelected: f.includes(
|
|
589
|
-
multiSelect:
|
|
590
|
-
onPick:
|
|
593
|
+
opt: S,
|
|
594
|
+
isSelected: f.includes(I(S)),
|
|
595
|
+
multiSelect: d,
|
|
596
|
+
onPick: $,
|
|
591
597
|
indented: !0
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
598
|
+
}
|
|
599
|
+
) }, I(S)))
|
|
600
|
+
] }, `group:${c.group}`) : /* @__PURE__ */ t(de, { children: T ? T(c, {
|
|
601
|
+
isSelected: f.includes(I(c)),
|
|
602
|
+
multiSelect: d,
|
|
603
|
+
indented: !1,
|
|
604
|
+
onPick: () => $(c)
|
|
605
|
+
}) : /* @__PURE__ */ t(
|
|
606
|
+
Ie,
|
|
597
607
|
{
|
|
598
608
|
opt: c,
|
|
599
|
-
isSelected: f.includes(
|
|
600
|
-
multiSelect:
|
|
601
|
-
onPick:
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
Rt,
|
|
609
|
+
isSelected: f.includes(I(c)),
|
|
610
|
+
multiSelect: d,
|
|
611
|
+
onPick: $
|
|
612
|
+
}
|
|
613
|
+
) }, I(c))),
|
|
614
|
+
le && /* @__PURE__ */ t(
|
|
615
|
+
zt,
|
|
607
616
|
{
|
|
608
|
-
query:
|
|
609
|
-
withBorder:
|
|
610
|
-
onCreate:
|
|
617
|
+
query: k,
|
|
618
|
+
withBorder: F.length > 0,
|
|
619
|
+
onCreate: me
|
|
611
620
|
}
|
|
612
621
|
),
|
|
613
|
-
|
|
622
|
+
F.length === 0 && !le && /* @__PURE__ */ t("div", { className: u.EmptyHint, children: g })
|
|
614
623
|
] }) })
|
|
615
624
|
] })
|
|
616
625
|
}
|
|
617
626
|
);
|
|
618
|
-
return
|
|
627
|
+
return A ? Le(ge, document.body) : ge;
|
|
619
628
|
}
|
|
620
|
-
function
|
|
629
|
+
function qt({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
621
630
|
return /* @__PURE__ */ t(
|
|
622
631
|
"svg",
|
|
623
632
|
{
|
|
@@ -634,7 +643,7 @@ function bt({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
|
634
643
|
}
|
|
635
644
|
);
|
|
636
645
|
}
|
|
637
|
-
function
|
|
646
|
+
function Go({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
|
|
638
647
|
return /* @__PURE__ */ t(
|
|
639
648
|
"svg",
|
|
640
649
|
{
|
|
@@ -651,7 +660,7 @@ function vo({ size: e = 18, strokeWidth: n = 2.5, shrink: o = !0 }) {
|
|
|
651
660
|
}
|
|
652
661
|
);
|
|
653
662
|
}
|
|
654
|
-
function
|
|
663
|
+
function qo() {
|
|
655
664
|
return /* @__PURE__ */ _(
|
|
656
665
|
"svg",
|
|
657
666
|
{
|
|
@@ -670,7 +679,7 @@ function No() {
|
|
|
670
679
|
}
|
|
671
680
|
);
|
|
672
681
|
}
|
|
673
|
-
function
|
|
682
|
+
function $o() {
|
|
674
683
|
return /* @__PURE__ */ _(
|
|
675
684
|
"svg",
|
|
676
685
|
{
|
|
@@ -689,7 +698,7 @@ function Io() {
|
|
|
689
698
|
}
|
|
690
699
|
);
|
|
691
700
|
}
|
|
692
|
-
function
|
|
701
|
+
function Ho({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
693
702
|
return /* @__PURE__ */ _(
|
|
694
703
|
"svg",
|
|
695
704
|
{
|
|
@@ -709,194 +718,196 @@ function wo({ size: e = 14, strokeWidth: n = 2, className: o }) {
|
|
|
709
718
|
}
|
|
710
719
|
);
|
|
711
720
|
}
|
|
712
|
-
function
|
|
713
|
-
const
|
|
721
|
+
function $t({ triggerRef: e, isOpen: n, onClick: o, selectedOptions: r, multiSelect: s, placeholder: a, onOverflow: i = "scroll" }) {
|
|
722
|
+
const l = i === "expand";
|
|
714
723
|
return /* @__PURE__ */ _(
|
|
715
724
|
"button",
|
|
716
725
|
{
|
|
717
726
|
type: "button",
|
|
718
727
|
ref: e,
|
|
719
728
|
className: p(
|
|
720
|
-
|
|
721
|
-
n &&
|
|
722
|
-
|
|
723
|
-
|
|
729
|
+
u.TriggerContainer,
|
|
730
|
+
n && u.Open,
|
|
731
|
+
s && u.MultiSelect,
|
|
732
|
+
l && u.ExpandHeight
|
|
724
733
|
),
|
|
725
734
|
onClick: o,
|
|
726
735
|
"aria-expanded": n,
|
|
727
736
|
"aria-haspopup": "listbox",
|
|
728
737
|
children: [
|
|
729
|
-
|
|
730
|
-
/* @__PURE__ */ t("span", { className:
|
|
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 }) })
|
|
731
740
|
]
|
|
732
741
|
}
|
|
733
742
|
);
|
|
734
743
|
}
|
|
735
|
-
function
|
|
744
|
+
function Vo({
|
|
736
745
|
options: e = [],
|
|
737
746
|
value: n,
|
|
738
747
|
onChange: o,
|
|
739
748
|
onSearch: r,
|
|
740
|
-
onCreate:
|
|
741
|
-
excluded:
|
|
749
|
+
onCreate: s,
|
|
750
|
+
excluded: a,
|
|
742
751
|
multiSelect: i = !1,
|
|
743
|
-
selectedAtTop:
|
|
752
|
+
selectedAtTop: l = !1,
|
|
744
753
|
onOverflow: f = "scroll",
|
|
745
|
-
label:
|
|
754
|
+
label: d,
|
|
746
755
|
placeholder: h = "select…",
|
|
747
756
|
searchPlaceholder: m,
|
|
748
757
|
emptyHint: g,
|
|
749
|
-
isLoading:
|
|
750
|
-
skeletonRowCount:
|
|
751
|
-
onError:
|
|
752
|
-
className:
|
|
753
|
-
glass:
|
|
754
|
-
portal:
|
|
755
|
-
|
|
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
|
|
756
766
|
}) {
|
|
757
|
-
const { isOpen:
|
|
758
|
-
function
|
|
759
|
-
const
|
|
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);
|
|
760
770
|
o(
|
|
761
|
-
i ? n.includes(
|
|
771
|
+
i ? n.includes(k) ? n.filter((ce) => ce !== k) : [...n, k] : [k]
|
|
762
772
|
);
|
|
763
773
|
}
|
|
764
|
-
const
|
|
765
|
-
ref:
|
|
766
|
-
onClick:
|
|
767
|
-
"aria-expanded":
|
|
774
|
+
const te = {
|
|
775
|
+
ref: R,
|
|
776
|
+
onClick: X,
|
|
777
|
+
"aria-expanded": C,
|
|
768
778
|
"aria-haspopup": "listbox"
|
|
769
779
|
};
|
|
770
|
-
return /* @__PURE__ */ _("div", { className: p(
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
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,
|
|
774
784
|
{
|
|
775
|
-
triggerRef:
|
|
776
|
-
isOpen:
|
|
777
|
-
onClick:
|
|
778
|
-
selectedOptions:
|
|
785
|
+
triggerRef: R,
|
|
786
|
+
isOpen: C,
|
|
787
|
+
onClick: X,
|
|
788
|
+
selectedOptions: M,
|
|
779
789
|
multiSelect: i,
|
|
780
790
|
onOverflow: f,
|
|
781
|
-
placeholder:
|
|
791
|
+
placeholder: A
|
|
782
792
|
}
|
|
783
793
|
),
|
|
784
|
-
|
|
785
|
-
|
|
794
|
+
C && /* @__PURE__ */ t(
|
|
795
|
+
Gt,
|
|
786
796
|
{
|
|
787
797
|
options: e,
|
|
788
798
|
onSearch: r,
|
|
789
|
-
onCreate:
|
|
790
|
-
onPick:
|
|
791
|
-
onClose:
|
|
792
|
-
anchorRef:
|
|
793
|
-
excluded:
|
|
799
|
+
onCreate: s,
|
|
800
|
+
onPick: Q,
|
|
801
|
+
onClose: Y,
|
|
802
|
+
anchorRef: R,
|
|
803
|
+
excluded: a,
|
|
794
804
|
multiSelect: i,
|
|
795
|
-
selectedAtTop:
|
|
805
|
+
selectedAtTop: l,
|
|
796
806
|
selected: n,
|
|
797
807
|
placeholder: m,
|
|
798
808
|
emptyHint: g,
|
|
799
|
-
isLoading:
|
|
800
|
-
skeletonRowCount:
|
|
801
|
-
onError:
|
|
802
|
-
glass:
|
|
803
|
-
portal:
|
|
809
|
+
isLoading: y,
|
|
810
|
+
skeletonRowCount: x,
|
|
811
|
+
onError: W,
|
|
812
|
+
glass: T,
|
|
813
|
+
portal: z,
|
|
814
|
+
renderOption: K
|
|
804
815
|
}
|
|
805
816
|
)
|
|
806
817
|
] });
|
|
807
818
|
}
|
|
808
|
-
const
|
|
809
|
-
Btn:
|
|
810
|
-
Primary:
|
|
811
|
-
Secondary:
|
|
812
|
-
Ghost:
|
|
813
|
-
IconDanger:
|
|
814
|
-
Danger:
|
|
815
|
-
},
|
|
816
|
-
primary:
|
|
817
|
-
secondary:
|
|
818
|
-
danger:
|
|
819
|
-
ghost:
|
|
820
|
-
iconDanger:
|
|
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
|
|
821
832
|
};
|
|
822
|
-
function
|
|
823
|
-
const
|
|
833
|
+
function Ko({ variant: e = "default", className: n, children: o, ...r }) {
|
|
834
|
+
const s = v("Button", n), a = e === "unstyled";
|
|
824
835
|
return /* @__PURE__ */ t(
|
|
825
836
|
"button",
|
|
826
837
|
{
|
|
827
838
|
type: "button",
|
|
828
839
|
...r,
|
|
829
|
-
className: p(!
|
|
840
|
+
className: p(!a && H.Btn, !a && Jt[e], s),
|
|
830
841
|
children: o
|
|
831
842
|
}
|
|
832
843
|
);
|
|
833
844
|
}
|
|
834
|
-
const
|
|
835
|
-
ConfirmWrapper:
|
|
836
|
-
ConfirmContainer:
|
|
837
|
-
Glass:
|
|
838
|
-
ConfirmTitle:
|
|
839
|
-
ConfirmMessage:
|
|
840
|
-
ConfirmActions:
|
|
841
|
-
BtnCancel:
|
|
842
|
-
BtnConfirm:
|
|
843
|
-
BtnDanger:
|
|
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
|
|
844
855
|
};
|
|
845
|
-
function
|
|
856
|
+
function Xo({
|
|
846
857
|
title: e,
|
|
847
858
|
message: n,
|
|
848
859
|
confirmLabel: o = "Confirm",
|
|
849
860
|
cancelLabel: r = "Cancel",
|
|
850
|
-
danger:
|
|
851
|
-
onConfirm:
|
|
861
|
+
danger: s = !1,
|
|
862
|
+
onConfirm: a,
|
|
852
863
|
onClose: i,
|
|
853
|
-
className:
|
|
864
|
+
className: l,
|
|
854
865
|
glass: f = !1
|
|
855
866
|
}) {
|
|
856
|
-
const [
|
|
867
|
+
const [d, h] = N(!1), m = v("ConfirmDialog", l);
|
|
857
868
|
function g() {
|
|
858
|
-
h(!0), Promise.resolve(
|
|
869
|
+
h(!0), Promise.resolve(a()).finally(() => {
|
|
859
870
|
h(!1), i();
|
|
860
871
|
});
|
|
861
872
|
}
|
|
862
|
-
return /* @__PURE__ */ t("div", { className:
|
|
863
|
-
/* @__PURE__ */ t("h2", { className:
|
|
864
|
-
/* @__PURE__ */ t("p", { className:
|
|
865
|
-
/* @__PURE__ */ _("div", { className:
|
|
866
|
-
/* @__PURE__ */ t("button", { className:
|
|
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 }),
|
|
867
878
|
/* @__PURE__ */ t(
|
|
868
879
|
"button",
|
|
869
880
|
{
|
|
870
|
-
className: p(
|
|
881
|
+
className: p(s ? D.BtnDanger : D.BtnConfirm),
|
|
871
882
|
type: "button",
|
|
872
883
|
onClick: g,
|
|
873
|
-
disabled:
|
|
874
|
-
children:
|
|
884
|
+
disabled: d,
|
|
885
|
+
children: d ? "…" : o
|
|
875
886
|
}
|
|
876
887
|
)
|
|
877
888
|
] })
|
|
878
889
|
] }) });
|
|
879
890
|
}
|
|
880
|
-
const
|
|
881
|
-
InfoWrapper:
|
|
882
|
-
InfoContainer:
|
|
883
|
-
Glass:
|
|
884
|
-
InfoTitle:
|
|
885
|
-
InfoMessage:
|
|
886
|
-
InfoActions:
|
|
887
|
-
BtnClose:
|
|
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
|
|
888
899
|
};
|
|
889
|
-
function
|
|
890
|
-
const
|
|
891
|
-
return /* @__PURE__ */ t("div", { className:
|
|
892
|
-
/* @__PURE__ */ t("h2", { className:
|
|
893
|
-
/* @__PURE__ */ t("p", { className:
|
|
894
|
-
/* @__PURE__ */ t("div", { className:
|
|
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" }) })
|
|
895
906
|
] }) });
|
|
896
907
|
}
|
|
897
|
-
function
|
|
898
|
-
const o =
|
|
899
|
-
return /* @__PURE__ */ t("div", { className: o, children: e.map((r,
|
|
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(
|
|
900
911
|
"button",
|
|
901
912
|
{
|
|
902
913
|
className: r.className,
|
|
@@ -905,11 +916,11 @@ function So({ buttons: e, containerClassName: n }) {
|
|
|
905
916
|
disabled: r.disabled,
|
|
906
917
|
children: r.label
|
|
907
918
|
},
|
|
908
|
-
|
|
919
|
+
s
|
|
909
920
|
)) });
|
|
910
921
|
}
|
|
911
|
-
function
|
|
912
|
-
const r =
|
|
922
|
+
function Jo({ onClick: e, disabled: n, className: o }) {
|
|
923
|
+
const r = v("ModalClose", o);
|
|
913
924
|
return /* @__PURE__ */ t(
|
|
914
925
|
"button",
|
|
915
926
|
{
|
|
@@ -937,109 +948,203 @@ function Ro({ onClick: e, disabled: n, className: o }) {
|
|
|
937
948
|
}
|
|
938
949
|
);
|
|
939
950
|
}
|
|
940
|
-
|
|
941
|
-
|
|
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;
|
|
965
|
+
return;
|
|
966
|
+
}
|
|
967
|
+
const e = Z.pop();
|
|
968
|
+
Ee(), e && e.onBack();
|
|
969
|
+
}
|
|
970
|
+
function Lo() {
|
|
971
|
+
ie || (ie = !0, window.addEventListener("popstate", De));
|
|
972
|
+
}
|
|
973
|
+
function Ee() {
|
|
974
|
+
Z.length > 0 || !ie || (ie = !1, window.removeEventListener("popstate", De));
|
|
975
|
+
}
|
|
976
|
+
function To(e) {
|
|
977
|
+
const n = ko++;
|
|
978
|
+
return Z.push({ handle: n, onBack: e }), Lo(), window.history.pushState({ churesOverlayBackHandle: n }, ""), n;
|
|
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());
|
|
983
|
+
}
|
|
984
|
+
function Ro(e, n) {
|
|
985
|
+
const o = G([]), r = G(n);
|
|
986
|
+
r.current = n, b(() => {
|
|
987
|
+
const s = o.current;
|
|
988
|
+
for (; s.length < e; )
|
|
989
|
+
s.push(To(() => r.current()));
|
|
990
|
+
for (; s.length > e; ) {
|
|
991
|
+
const a = s.pop();
|
|
992
|
+
a !== void 0 && Ne(a);
|
|
993
|
+
}
|
|
994
|
+
}, [e]), b(() => () => {
|
|
995
|
+
const s = o.current;
|
|
996
|
+
for (; s.length > 0; ) {
|
|
997
|
+
const a = s.pop();
|
|
998
|
+
a !== void 0 && Ne(a);
|
|
999
|
+
}
|
|
1000
|
+
}, []);
|
|
1001
|
+
}
|
|
1002
|
+
const So = {
|
|
1003
|
+
top: P.Top,
|
|
1004
|
+
right: P.Right,
|
|
1005
|
+
bottom: P.Bottom,
|
|
1006
|
+
left: P.Left
|
|
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;
|
|
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(() => {
|
|
1015
|
+
if (!e) {
|
|
1016
|
+
l(!1);
|
|
1017
|
+
return;
|
|
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);
|
|
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(
|
|
1029
|
+
"div",
|
|
1030
|
+
{
|
|
1031
|
+
className: p(P.Backdrop, i && P.BackdropOpen),
|
|
1032
|
+
style: d,
|
|
1033
|
+
onClick: n
|
|
1034
|
+
}
|
|
1035
|
+
),
|
|
1036
|
+
/* @__PURE__ */ t("div", { className: p(P.Panel, So[r], i && P.PanelOpen, f), children: o })
|
|
1037
|
+
] }),
|
|
1038
|
+
ye()
|
|
1039
|
+
);
|
|
1040
|
+
}
|
|
1041
|
+
function er({ classNames: e, children: n }) {
|
|
1042
|
+
return /* @__PURE__ */ t(Te.Provider, { value: e, children: n });
|
|
942
1043
|
}
|
|
943
|
-
var
|
|
944
|
-
const
|
|
945
|
-
function
|
|
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) {
|
|
946
1047
|
return typeof e == "object" && e !== null;
|
|
947
1048
|
}
|
|
948
|
-
function
|
|
1049
|
+
function E(e) {
|
|
949
1050
|
return typeof e == "string" ? e : "";
|
|
950
1051
|
}
|
|
951
|
-
function
|
|
952
|
-
if (!
|
|
1052
|
+
function Bo(e) {
|
|
1053
|
+
if (!re(e))
|
|
953
1054
|
return { kind: "Unknown", typeUrl: "", raw: e };
|
|
954
|
-
const n =
|
|
1055
|
+
const n = E(e["@type"]);
|
|
955
1056
|
switch (n) {
|
|
956
|
-
case
|
|
957
|
-
const o =
|
|
958
|
-
for (const
|
|
959
|
-
r[
|
|
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]);
|
|
960
1061
|
return {
|
|
961
1062
|
kind: "ErrorInfo",
|
|
962
|
-
reason:
|
|
963
|
-
domain:
|
|
1063
|
+
reason: E(e.reason),
|
|
1064
|
+
domain: E(e.domain),
|
|
964
1065
|
metadata: r
|
|
965
1066
|
};
|
|
966
1067
|
}
|
|
967
|
-
case
|
|
968
|
-
return { kind: "BadRequest", fieldViolations: (Array.isArray(e.fieldViolations) ? e.fieldViolations : []).map((
|
|
969
|
-
const
|
|
1068
|
+
case Eo:
|
|
1069
|
+
return { kind: "BadRequest", fieldViolations: (Array.isArray(e.fieldViolations) ? e.fieldViolations : []).map((s) => {
|
|
1070
|
+
const a = re(s) ? s : {};
|
|
970
1071
|
return {
|
|
971
|
-
field:
|
|
972
|
-
description:
|
|
1072
|
+
field: E(a.field),
|
|
1073
|
+
description: E(a.description)
|
|
973
1074
|
};
|
|
974
1075
|
}) };
|
|
975
|
-
case
|
|
976
|
-
return { kind: "PreconditionFailure", violations: (Array.isArray(e.violations) ? e.violations : []).map((
|
|
977
|
-
const
|
|
1076
|
+
case jo:
|
|
1077
|
+
return { kind: "PreconditionFailure", violations: (Array.isArray(e.violations) ? e.violations : []).map((s) => {
|
|
1078
|
+
const a = re(s) ? s : {};
|
|
978
1079
|
return {
|
|
979
|
-
type:
|
|
980
|
-
subject:
|
|
981
|
-
description:
|
|
1080
|
+
type: E(a.type),
|
|
1081
|
+
subject: E(a.subject),
|
|
1082
|
+
description: E(a.description)
|
|
982
1083
|
};
|
|
983
1084
|
}) };
|
|
984
1085
|
default:
|
|
985
1086
|
return { kind: "Unknown", typeUrl: n, raw: e };
|
|
986
1087
|
}
|
|
987
1088
|
}
|
|
988
|
-
function
|
|
1089
|
+
function nr(e) {
|
|
989
1090
|
return e.kind === "ErrorInfo";
|
|
990
1091
|
}
|
|
991
|
-
function
|
|
1092
|
+
function tr(e) {
|
|
992
1093
|
return e.kind === "BadRequest";
|
|
993
1094
|
}
|
|
994
|
-
function
|
|
1095
|
+
function or(e) {
|
|
995
1096
|
return e.kind === "PreconditionFailure";
|
|
996
1097
|
}
|
|
997
|
-
class
|
|
1098
|
+
class se extends Error {
|
|
998
1099
|
constructor(n) {
|
|
999
1100
|
super(n.title), this.isRetryable = n.isRetryable ?? !1, this.grpcCode = n.grpcCode, this.details = n.details ?? [];
|
|
1000
1101
|
}
|
|
1001
1102
|
}
|
|
1002
|
-
function
|
|
1003
|
-
if (e instanceof
|
|
1103
|
+
function rr(e) {
|
|
1104
|
+
if (e instanceof se) return e;
|
|
1004
1105
|
if (e instanceof Error && e.message === "Failed to fetch")
|
|
1005
|
-
return new
|
|
1106
|
+
return new se({ title: "Server unavailable. Try again later", isRetryable: !0 });
|
|
1006
1107
|
if (typeof e == "object" && e !== null && "code" in e) {
|
|
1007
|
-
const n = e, o = n.code ===
|
|
1008
|
-
return new
|
|
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 });
|
|
1009
1110
|
}
|
|
1010
|
-
return new
|
|
1111
|
+
return new se({ title: String(e), isRetryable: !1 });
|
|
1011
1112
|
}
|
|
1012
1113
|
export {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
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
|
|
1045
1150
|
};
|