@billgangcom/theme-lib 1.0.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,11 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&display=swap";._icon_21b8w_1 path{fill:var(--icon-fill)}._hoverable_21b8w_5{cursor:pointer}._button_rcjso_1{background-color:#ff3f19;padding:10px 16px;color:#fff;border-radius:12px;cursor:pointer;font-size:16px}._button_rcjso_1:disabled{opacity:.7;cursor:auto}._wrapper_x5ap4_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_x5ap4_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_x5ap4_17{width:100%;background-color:var(--background-color);border-radius:12px;padding:7px 11px;font-size:16px;line-height:24px;border:1px solid var(--background-color)}._input_x5ap4_17::placeholder{color:#c2c2c2}._input_x5ap4_17:disabled{background-color:var(--background-color);opacity:.7}._required_x5ap4_36{border:1px solid #ff3f19}._wrapper_dmzhr_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_dmzhr_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._select_dmzhr_17{width:100%;background-color:var(--background-color);border-radius:12px;padding:10px 12px;font-size:14px;line-height:20px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}._icon_dmzhr_30{transition:.2s}._rotate_dmzhr_34{transform:rotate(180deg)}._content_dmzhr_38{position:relative}._options_dmzhr_42{position:absolute;top:45px;width:100%;background-color:var(--background-color);border-radius:12px;font-size:14px;line-height:20px;display:flex;flex-direction:column;max-height:200px;z-index:10;overflow-y:scroll;cursor:pointer}._option_dmzhr_42{padding:10px 12px;border-radius:12px}._option_dmzhr_42:hover{background-color:#e6e6e6}._switch_1gvxu_1{width:40px;height:24px;background-color:#ccc;border-radius:25px;display:flex;align-items:center;padding:2px;cursor:pointer;transition:background-color .2s}._switch_1gvxu_1._active_1gvxu_12{background:#ff3f19}._switch_1gvxu_1 ._toggle_1gvxu_15{width:14px;height:14px;background-color:#fff;border-radius:16px;transition:transform .2s;transform:translate(2px)}._switch_1gvxu_1._active_1gvxu_12 ._toggle_1gvxu_15{transform:translate(18px)}._wrapper_1inu5_1{border:var(--default-border);width:fit-content;height:fit-content;max-height:500px;max-width:500px;min-width:300px;padding:10px;left:10px;top:10px;position:absolute;z-index:1000;background-color:#fff;display:flex;border-radius:8px;justify-content:center;align-items:center;overflow:hidden}._blocks_1op3c_1{display:flex;align-items:center;gap:8px}._block_1op3c_1{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1op3c_18{border:1px solid #ff3f19}._applyButton_1cqw4_2{flex:0 1 50%;font-weight:400}._cancelButton_1cqw4_7{background-color:#f8f8f8;color:var(--accent-color)}._content_1cqw4_12{display:flex;flex-direction:column;width:100%}._label_1cqw4_18{padding:8px 12px;border-radius:8px;display:flex;align-items:center;position:relative;gap:8px;width:100%;background-color:var(--background-color);cursor:pointer}._colorValue_1cqw4_30{width:20px;height:20px;padding:2.5px;border-radius:2px}._modal_1cqw4_37{left:15px;width:288px;overflow-y:auto;z-index:100000000;position:fixed;background-color:#fff;border-radius:12px;padding:10px;border:1px solid #e6e6e6;height:400px;display:flex;flex-direction:column;gap:10px;font-size:16px;line-height:24px;font-weight:700}._colorMap_1cqw4_56{position:relative;width:100%;height:300px;cursor:pointer;border-radius:4px}._indicator_1cqw4_64{position:absolute;width:20px;height:20px;border:4px solid white;border-radius:50%;pointer-events:none}._hueSlider_1cqw4_73{width:80%;left:30px;height:8px;position:absolute;bottom:80px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red,red);border-radius:5px}input[type=range]{-webkit-appearance:none;height:8px;outline:none;border-radius:5px;position:relative;display:flex;justify-content:center}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border:5px solid #fff;border-radius:50%;cursor:pointer}._slider_1cqw4_102{width:100%;cursor:pointer}._buttons_1cqw4_107{display:flex;gap:5px;width:100%}._name_1cqw4_113{line-height:20px;padding:0 4px 4px}._secondary_1cqw4_118{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_1cqw4_126{line-height:20px;font-size:14px;font-weight:400}._modal_1t5at_1{position:fixed;top:0;left:0;right:0;bottom:0;background:#2525253d;z-index:100;display:flex;padding:20px;justify-content:center;align-items:center;overflow:hidden}._wrapper_1qvfi_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%;position:relative}._label_1qvfi_10{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._textarea_1qvfi_18{width:100%;background-color:var(--background-color);border-radius:12px;padding:8px 12px;font-size:16px;line-height:24px;resize:none;min-height:80px}._textarea_1qvfi_18::placeholder{color:#c2c2c2}._length_1qvfi_33{position:absolute;bottom:12px;right:12px;color:#c2c2c2;line-height:20px}._wrapper_1fcne_2{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1fcne_10{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._options_1fcne_18{display:flex;gap:20px}._radioLabel_1fcne_23{display:flex;align-items:center;cursor:pointer;position:relative}._radio_1fcne_23{position:absolute;opacity:0;cursor:pointer}._custom_1fcne_36{height:20px;width:20px;border-radius:50%;border:1px solid #e6e6e6;display:inline-block;margin-right:8px;position:relative}._radio_1fcne_23:checked+._custom_1fcne_36{border-color:#ff3f19;background:#ffeae5}._custom_1fcne_36:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:8px;height:8px;border-radius:50%;background-color:#e53e3e;opacity:0}._radio_1fcne_23:checked+._custom_1fcne_36:after{opacity:1}._option_1fcne_18{font-size:16px;line-height:24px;font-weight:400}._tip_pl6k0_1{display:flex;align-items:center;padding:8px;border-radius:12px;gap:8px}._text_pl6k0_9{flex:1 1 auto;line-height:20px;font-size:14px}._warning_pl6k0_15{background:#faf8e6;color:#c1972a}._error_pl6k0_20{background:#ffc3b7;color:#ff3f19}._hide_pl6k0_25{display:none}._buttons_1gn8m_1{display:flex;align-items:center;gap:16px}._button_1gn8m_1{cursor:pointer;padding:10px}._devices_hxl12_1{display:flex;gap:4px;background:var(--background-color);padding:4px;border-radius:16px}._device_hxl12_1{padding:6px 8px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:12px;border:1px solid var(--background-color)}._device_hxl12_1:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_hxl12_23{background-color:#fff}._active_hxl12_23:hover{border:1px solid var(--background-color);box-shadow:none}._header_ltoxx_1{position:absolute;top:0;left:0;width:100%;padding:11px 22px;line-height:20px;border-bottom:var(--default-border);display:flex;align-items:center;justify-content:space-between;gap:24px;z-index:5}._left_ltoxx_16,._right_ltoxx_17{display:flex;align-items:center;gap:24px}._preview_vijvm_2{display:flex;align-items:center;gap:4px;color:var(--accent-color);line-height:20px;padding:10px 16px;cursor:pointer;border:1px solid #fff;border-radius:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}._preview_vijvm_2:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_vijvm_22{background-color:var(--background-color)}._active_vijvm_22:hover{border:1px solid #fff;box-shadow:none}._settings_q79q3_1{display:flex;gap:20px;align-items:center;color:var(--accent-color)}._language_1mbvp_1{display:flex;align-items:center;gap:4px;background-color:var(--background-color);padding:10px 12px;border-radius:12px;cursor:pointer}._text_1mbvp_11{padding-right:4px;color:var(--main-color)}._pages_x8pw2_1{position:relative}._default_x8pw2_5{display:flex;align-items:center;gap:4px;padding:10px 12px;background-color:var(--background-color);border-radius:8px;cursor:pointer;position:relative}._text_x8pw2_16{padding-right:4px;color:var(--main-color);flex:1 1 auto}._modal_x8pw2_22{position:absolute;top:45px;width:320px;left:0;z-index:100;background-color:#fff;border:1px solid #e6e6e6;border-radius:8px;padding:8px 12px;display:flex;flex-direction:column}._page_x8pw2_1{display:flex;align-items:center;gap:8px;padding:12px 8px;border-radius:8px;cursor:pointer}._hoverable_x8pw2_45{background-color:var(--background-color)}._separator_x8pw2_49{border-bottom:1px solid #f0f0f0}._button_x8pw2_53{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:start;gap:8px;padding:16px 8px 12px;transition:.2s}._button_x8pw2_53:hover{background-color:var(--background-color)}._zoom_a77cn_1{display:flex;align-items:center;gap:4px;background-color:var(--background-color);padding:10px 12px;border-radius:12px;cursor:pointer}._theme_3wxbf_1{display:flex;align-items:center;gap:4px;padding:9px 12px;background:#e5fadd;color:#338b13;border-radius:100px}._exit_2ce42_1{border-bottom:var(--default-border);display:flex;gap:8px;align-items:center;padding:22px;cursor:pointer}._text_2ce42_10{color:#252525;line-height:20px}._navbar_2ac63_1{width:100px;border-right:var(--default-border)}._main_2ac63_6{display:flex;flex-direction:column;gap:8px;padding:16px 12px}._block_2ac63_13{display:flex;align-items:center;flex-direction:column;gap:4px;color:var(--accent-color);line-height:20px;padding:12px 24px;cursor:pointer;border:1px solid #fff;border-radius:16px}._block_2ac63_13:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_2ac63_30{background-color:var(--background-color);color:#252525}._active_2ac63_30:hover{border:1px solid #fff;box-shadow:none}._preview_1jv6k_1{width:100%;background-color:var(--background-color);padding:16px 32px 0;position:relative}._main_1jv6k_8{width:100%;display:flex;flex-direction:column;overflow-y:auto;height:100%;position:relative;z-index:1}._content_1jv6k_18{background-color:#fff;border:var(--default-border);border-bottom:none;height:100%}._loading_1jv6k_25{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._loader_1jv6k_33{border:4px solid rgba(0,0,0,.1);border-left-color:#fff;border-radius:50%;width:40px;height:40px;animation:_spin_1jv6k_1 1s linear infinite}@keyframes _spin_1jv6k_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._header_1t64j_1{display:flex;width:100%;padding:18px;justify-content:center;border:var(--default-border);background-color:#fff;border-top-left-radius:16px;border-top-right-radius:16px;border-bottom:none;z-index:5}._circles_1t64j_14{left:28px;top:28px;position:absolute;display:flex;align-items:center;gap:8px}._circle_1t64j_14{width:12px;height:12px;border-radius:50%;border:.5px solid #e6e6e6}._red_1t64j_30{background:#ff5f57}._green_1t64j_34{background:#28c840}._yellow_1t64j_38{background:#febc2e}._input_1t64j_42{background-color:var(--background-color);padding:6px 8px;display:flex;max-width:480px;width:100%;border-radius:6px}._main_1t64j_51{flex:1 1 auto;display:flex;align-items:center;justify-content:center;gap:4px}._text_1t64j_59{font-weight:600;font-size:12px;line-height:16px;margin:0 0 0 4px}._content_92dk8_1{width:100%;height:100%}._block_92dk8_6{position:relative;cursor:pointer;border-left:1px solid #e6e6e6;border-right:1px solid #e6e6e6}._active_92dk8_13{border:2px solid #ff3f19}._name_92dk8_17{z-index:10;position:absolute;top:-28px;left:-2px;border-top-left-radius:8px;border-top-right-radius:8px;color:#fff;background:#ff3f19;padding:4px 12px;line-height:20px;text-align:center}._empty_92dk8_31{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._icon_92dk8_42{width:64px;height:64px;background-color:var(--background-color);display:flex;border-radius:50%;justify-content:center;align-items:center;margin:0 0 8px}._title_92dk8_53{font-weight:700;font-size:24px;line-height:32px}._text_92dk8_59{font-size:16px;line-height:24px;color:var(--accent-color)}._sections_92dk8_65{padding:0 20px;margin:20px 0 0;display:flex;flex-wrap:wrap;justify-content:center;gap:24px}._section_92dk8_65{cursor:pointer;display:flex;gap:10px;max-width:288px;width:100%;align-items:center;justify-content:space-between;padding:24px;background-color:var(--background-color);border-radius:24px;color:var(--accent-color)}._sidebar_1f3hk_1{position:absolute;display:flex;height:fit-content();flex-direction:column;right:10px;z-index:20;padding:10px;cursor:auto}._content_1f3hk_12{height:100%;border:1px solid #e6e6e6;border-radius:8px;background-color:#fff;padding:8px;max-width:60px;width:100%}._button_1f3hk_22{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._moveButton_1f3hk_30:hover{background-color:var(--background-color)}._border_1f3hk_34{border-bottom:var(--default-border)}._deleteButton_1f3hk_38:hover{background-color:#dd6363;color:#fff}._results_f488n_1{display:flex;flex-direction:column;padding:8px;gap:20px}._name_f488n_8{color:var(--main-color);font-weight:600;font-size:16px;line-height:24px}._product_f488n_15{display:flex;align-items:center;justify-content:space-between;cursor:pointer}._search_1s0qp_1{background:var(--background-color);padding:8px 12px;display:flex;align-items:center;border-radius:12px;width:100%;gap:10px;margin:8px 0}._input_1s0qp_12{width:100%;font-size:16px;line-height:24px;color:#252525}._input_1s0qp_12::placeholder{color:#c2c2c2}._sidebar_xqbqi_1{max-width:320px;width:100%;padding:16px;border-right:var(--default-border);height:100%;position:relative;overflow:hidden}._title_xqbqi_11{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px;padding-bottom:8px}._active_xqbqi_19{display:flex;align-items:center;gap:8px}._layers_62wod_1{display:flex;flex-direction:column;position:relative;height:100%}._block_62wod_8{position:relative;display:flex;align-items:center;gap:4px;font-size:16px;line-height:24px;padding:8px 12px;border-radius:8px;cursor:pointer}._block_62wod_8:hover{background-color:var(--background-color)}._dragging_62wod_23{box-shadow:0 2.1px 4.36px #00000004;box-shadow:0 5.3px 10.22px #00000005;border:var(--default-border);box-shadow:0 10.81px 19.93px #00000006;cursor:grabbing}._active_62wod_31{background:#ffeae5}._add_62wod_35{z-index:2;position:absolute;display:flex;justify-content:center;align-items:center;bottom:0;left:0;border-bottom:2px solid #ff3f19;width:100%}._button_62wod_47{position:relative;display:flex;justify-content:center;align-items:center;top:12px;background-color:#ff3f19;width:24px;height:24px;border-radius:50%;padding:4px}._empty_62wod_60{display:flex;flex-direction:column;justify-content:center;height:100%;width:100%;align-items:center;text-align:center;gap:4px;color:var(--accent-color)}._title_62wod_72{font-size:16px;line-height:24px;font-weight:700;color:var(--accent-color)}._icon_62wod_79{margin:0 0 12px}._text_62wod_83{font-size:16px;font-weight:400;line-height:24px}._highlight_62wod_89{color:#ff3f19;cursor:pointer}._theme_1xj36_1{display:flex;flex-direction:column}._block_1xj36_6{justify-content:start;display:flex;align-items:center;gap:8px;width:100%;padding:16px 8px;cursor:pointer;border-radius:8px}._block_1xj36_6:hover{background-color:var(--background-color)}._name_1xj36_20{flex:1 1 auto}._back_1m2pj_1{display:flex;align-items:center;gap:8px;padding-bottom:8px}._render_1m2pj_8{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:3}._open_1m2pj_23{transform:translate(0)}._close_1m2pj_27{transform:translate(320px)}._clicked_1m2pj_31{opacity:0}._title_1m2pj_35{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px}._button_1m2pj_42{align-self:center;flex:1}._settings_1m2pj_47{flex:1 1 auto}._buttons_1m2pj_51{justify-content:space-between;display:flex;gap:10px}._deleteButton_1m2pj_57{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._deleteButton_1m2pj_57:hover{background-color:#dd6363;color:#fff}._settings_1r85j_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:3}._open_1r85j_16{transform:translate(0)}._close_1r85j_20{transform:translate(320px)}._header_1r85j_24{display:flex;align-items:center;gap:8px}._title_1r85j_30{font-weight:700;font-size:20px;line-height:24px;flex:1 1 auto}._addButton_1r85j_37{color:#ff3f19;display:flex;align-items:center;gap:4px;cursor:pointer}._wrapper_n1a7x_1{overflow-y:scroll}._category_n1a7x_5{display:flex;flex-direction:column}._categoryTitle_n1a7x_10{font-weight:600;font-size:16px;line-height:24px}._color_n1a7x_16{display:flex;flex-direction:column}._color_n1a7x_16:not(:last-child){border-bottom:1px solid #f0f0f0}._content_n1a7x_24{padding:12px 0;gap:8px;display:flex;align-items:center;flex:1 1 auto}._preview_n1a7x_32{width:39px;height:39px;flex:0 0 39px;padding:5px;border-radius:50%;border:1px solid #e6e6e6}._wrapper_kb55x_2{overflow-y:scroll}._category_kb55x_6{display:flex;flex-direction:column}._categoryTitle_kb55x_11{font-weight:600;font-size:16px;line-height:24px}._color_kb55x_17{gap:8px;display:flex;flex-direction:column}._name_kb55x_23{line-height:20px;padding:0 4px 4px}._content_kb55x_28{display:flex;flex-direction:column;width:100%}._label_kb55x_34{padding:8px 12px;border-radius:12px;display:flex;align-items:center;gap:5px;width:100%;background-color:var(--background-color);cursor:pointer}._input_kb55x_45[type=color]{width:20px;height:20px;padding:1px}._input_kb55x_45{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:100%;border:none;padding:0;cursor:pointer;border-radius:50%}._input_kb55x_45::-webkit-color-swatch{border-radius:50%;border:none}._input_kb55x_45::-webkit-color-swatch-wrapper{padding:0;border-radius:50%}._title_kb55x_71{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._field_kb55x_79{display:flex;flex-direction:column;gap:10px;padding:16px 0}._field_kb55x_79:not(:last-child){border-bottom:1px solid #f0f0f0}._alignments_kb55x_89{display:flex;flex-direction:column;gap:10px}._lineField_kb55x_95{display:flex;justify-content:space-between;align-items:center}._style_kb55x_101{flex:1 0 50%;display:flex;flex-direction:column;gap:8px}._header_kb55x_108{display:flex;align-items:center;justify-content:space-between}._wrapper_k9on2_1{overflow-y:scroll}._category_k9on2_5{display:flex;flex-direction:column}._categoryTitle_k9on2_10{font-weight:600;font-size:16px;line-height:24px}._font_k9on2_16{padding:12px 0;gap:8px;display:flex;align-items:center;position:relative;flex:1 1 auto;cursor:pointer}._font_k9on2_16:hover{background-color:#f8f8f8;border-radius:8px}._font_k9on2_16:not(:last-child){border-bottom:var(--default-border)}._font_k9on2_16:not(:last-child):hover{border-bottom:1px solid #f8f8f8}._content_k9on2_36{display:flex;flex-direction:column;width:100%}._icon_k9on2_42{padding:8px;border-radius:8px;background-color:#f8f8f8;display:flex;align-items:center;justify-content:center}._paragraph_k9on2_51{padding:12px}._deleteIcon_k9on2_55{position:absolute;right:10px;width:20px;height:20px}._iconButton_k9on2_62{width:32px;height:32px}._wrapper_94fpv_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:5}._open_94fpv_16{transform:translate(0)}._close_94fpv_20{transform:translate(320px)}._header_94fpv_24{display:flex;align-items:center;gap:8px;margin:0 0 10px}._title_94fpv_31{font-weight:700;font-size:20px;line-height:24px}._options_94fpv_37{display:flex;flex-direction:column;gap:10px;flex:1 1 auto}._clicked_94fpv_44{opacity:0}._wrapper_1j33r_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:5}._open_1j33r_16{transform:translate(0)}._close_1j33r_20{transform:translate(320px)}._header_1j33r_24{display:flex;align-items:center;gap:8px;margin:0 0 10px}._title_1j33r_31{font-weight:700;font-size:20px;line-height:24px}._options_1j33r_37{display:flex;flex-direction:column;gap:10px;flex:1 1 auto}._clicked_1j33r_44{opacity:0}._label_1j33r_48{font-size:14px;font-weight:400;line-height:20px;color:var(--accent-color)}._alignments_1j33r_55{display:flex;flex-direction:column;gap:10px}._blocks_1j33r_61{display:flex;align-items:center;gap:8px}._alignment_1j33r_55{padding:8px;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1j33r_75{border:1px solid #ff3f19}._wrapper_jjfwh_1{display:flex;flex-direction:column;gap:20px;background:#fff;max-width:640px;width:100%;padding:16px 24px;border-radius:16px}._header_jjfwh_12{display:flex;justify-content:space-between;align-items:center;font-size:24px;font-weight:700;line-height:32px}._content_jjfwh_21{display:flex;flex-direction:column;gap:10px;overflow-y:scroll;max-height:500px}._buttons_jjfwh_29{display:flex;justify-content:end;gap:12px}._cancel_jjfwh_35{background-color:var(--background-color);color:var(--accent-color)}._label_jjfwh_40,._description_jjfwh_41{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._preview_jjfwh_49{display:flex;flex-direction:column;gap:10px}._block_jjfwh_55{padding:24px;display:flex;flex-direction:column;border:1px solid var(--background-color);border-radius:8px}._slug_jjfwh_63{line-height:20px;color:#ff3f19;margin-bottom:4px}._title_jjfwh_69{font-weight:600;font-size:16px;line-height:24px}._layout_kjedu_1{width:100%;height:100%;display:flex;position:relative}._main_kjedu_8{display:flex;flex-direction:column;width:100%;position:relative}._content_kjedu_15{position:relative;padding-top:64px;height:100%;display:flex}*{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}*{padding:0;margin:0;border:0}*,*:before,*:after{box-sizing:border-box}:focus,:active{outline:none}a:focus,a:active{outline:none}nav,footer,header,aside{display:block}html,body{width:100%;line-height:1;font-size:16px;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}input,button,textarea{font-family:inherit}input::-ms-clear{display:none}button{background-color:transparent;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}a,a:visited,a:hover{text-decoration:none}ul li{list-style:none}img{vertical-align:top}h1,h2,h3,h4,h5,h6,a{font-size:inherit}a{color:inherit}*{-webkit-tap-highlight-color:transparent}input{border:none;background:none;outline:none;padding:0}input[type=color]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:40px;height:40px;border:none;background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}*{-ms-overflow-style:none;scrollbar-width:none}* ::-webkit-scrollbar{display:none}:root{--default-border: 1px solid #f0f0f0;--accent-color: #757575;--main-color: #252525;--background-color: #f8f8f8}#root{height:100vh}body,html{background-color:#fff;font-family:Archivo,sans-serif;max-height:100vh;overflow:hidden}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react");function Vr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hn={exports:{}},Ge={};/**
3
- * @license React
4
- * react-jsx-runtime.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var ir;function go(){if(ir)return Ge;ir=1;var t=E,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(c,u,d){var f,h={},y=null,v=null;d!==void 0&&(y=""+d),u.key!==void 0&&(y=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)r.call(u,f)&&!o.hasOwnProperty(f)&&(h[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:e,type:c,key:y,ref:v,props:h,_owner:s.current}}return Ge.Fragment=n,Ge.jsx=i,Ge.jsxs=i,Ge}var Je={};/**
11
- * @license React
12
- * react-jsx-runtime.development.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var ar;function mo(){return ar||(ar=1,process.env.NODE_ENV!=="production"&&function(){var t=E,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),g=Symbol.iterator,p="@@iterator";function b(l){if(l===null||typeof l!="object")return null;var _=g&&l[g]||l[p];return typeof _=="function"?_:null}var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(l){{for(var _=arguments.length,S=new Array(_>1?_-1:0),T=1;T<_;T++)S[T-1]=arguments[T];O("error",l,S)}}function O(l,_,S){{var T=x.ReactDebugCurrentFrame,M=T.getStackAddendum();M!==""&&(_+="%s",S=S.concat([M]));var F=S.map(function(I){return String(I)});F.unshift("Warning: "+_),Function.prototype.apply.call(console[l],console,F)}}var A=!1,B=!1,q=!1,z=!1,G=!1,C;C=Symbol.for("react.module.reference");function R(l){return!!(typeof l=="string"||typeof l=="function"||l===r||l===o||G||l===s||l===d||l===f||z||l===v||A||B||q||typeof l=="object"&&l!==null&&(l.$$typeof===y||l.$$typeof===h||l.$$typeof===i||l.$$typeof===c||l.$$typeof===u||l.$$typeof===C||l.getModuleId!==void 0))}function $(l,_,S){var T=l.displayName;if(T)return T;var M=_.displayName||_.name||"";return M!==""?S+"("+M+")":S}function W(l){return l.displayName||"Context"}function N(l){if(l==null)return null;if(typeof l.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case s:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case c:var _=l;return W(_)+".Consumer";case i:var S=l;return W(S._context)+".Provider";case u:return $(l,l.render,"ForwardRef");case h:var T=l.displayName||null;return T!==null?T:N(l.type)||"Memo";case y:{var M=l,F=M._payload,I=M._init;try{return N(I(F))}catch{return null}}}return null}var J=Object.assign,me=0,ut,Ce,Fn,qn,Un,Hn,zn;function Vn(){}Vn.__reactDisabledLog=!0;function qs(){{if(me===0){ut=console.log,Ce=console.info,Fn=console.warn,qn=console.error,Un=console.group,Hn=console.groupCollapsed,zn=console.groupEnd;var l={configurable:!0,enumerable:!0,value:Vn,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}me++}}function Us(){{if(me--,me===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},l,{value:ut}),info:J({},l,{value:Ce}),warn:J({},l,{value:Fn}),error:J({},l,{value:qn}),group:J({},l,{value:Un}),groupCollapsed:J({},l,{value:Hn}),groupEnd:J({},l,{value:zn})})}me<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ft=x.ReactCurrentDispatcher,qt;function dt(l,_,S){{if(qt===void 0)try{throw Error()}catch(M){var T=M.stack.trim().match(/\n( *(at )?)/);qt=T&&T[1]||""}return`
19
- `+qt+l}}var Ut=!1,ft;{var Hs=typeof WeakMap=="function"?WeakMap:Map;ft=new Hs}function Wn(l,_){if(!l||Ut)return"";{var S=ft.get(l);if(S!==void 0)return S}var T;Ut=!0;var M=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var F;F=Ft.current,Ft.current=null,qs();try{if(_){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(Q){T=Q}Reflect.construct(l,[],I)}else{try{I.call()}catch(Q){T=Q}l.call(I.prototype)}}else{try{throw Error()}catch(Q){T=Q}l()}}catch(Q){if(Q&&T&&typeof Q.stack=="string"){for(var P=Q.stack.split(`
20
- `),K=T.stack.split(`
21
- `),H=P.length-1,V=K.length-1;H>=1&&V>=0&&P[H]!==K[V];)V--;for(;H>=1&&V>=0;H--,V--)if(P[H]!==K[V]){if(H!==1||V!==1)do if(H--,V--,V<0||P[H]!==K[V]){var ne=`
22
- `+P[H].replace(" at new "," at ");return l.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",l.displayName)),typeof l=="function"&&ft.set(l,ne),ne}while(H>=1&&V>=0);break}}}finally{Ut=!1,Ft.current=F,Us(),Error.prepareStackTrace=M}var Ae=l?l.displayName||l.name:"",Te=Ae?dt(Ae):"";return typeof l=="function"&&ft.set(l,Te),Te}function zs(l,_,S){return Wn(l,!1)}function Vs(l){var _=l.prototype;return!!(_&&_.isReactComponent)}function ht(l,_,S){if(l==null)return"";if(typeof l=="function")return Wn(l,Vs(l));if(typeof l=="string")return dt(l);switch(l){case d:return dt("Suspense");case f:return dt("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case u:return zs(l.render);case h:return ht(l.type,_,S);case y:{var T=l,M=T._payload,F=T._init;try{return ht(F(M),_,S)}catch{}}}return""}var We=Object.prototype.hasOwnProperty,Yn={},Gn=x.ReactDebugCurrentFrame;function pt(l){if(l){var _=l._owner,S=ht(l.type,l._source,_?_.type:null);Gn.setExtraStackFrame(S)}else Gn.setExtraStackFrame(null)}function Ws(l,_,S,T,M){{var F=Function.call.bind(We);for(var I in l)if(F(l,I)){var P=void 0;try{if(typeof l[I]!="function"){var K=Error((T||"React class")+": "+S+" type `"+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[I]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw K.name="Invariant Violation",K}P=l[I](_,I,T,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(H){P=H}P&&!(P instanceof Error)&&(pt(M),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",S,I,typeof P),pt(null)),P instanceof Error&&!(P.message in Yn)&&(Yn[P.message]=!0,pt(M),w("Failed %s type: %s",S,P.message),pt(null))}}}var Ys=Array.isArray;function Ht(l){return Ys(l)}function Gs(l){{var _=typeof Symbol=="function"&&Symbol.toStringTag,S=_&&l[Symbol.toStringTag]||l.constructor.name||"Object";return S}}function Js(l){try{return Jn(l),!1}catch{return!0}}function Jn(l){return""+l}function Xn(l){if(Js(l))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Gs(l)),Jn(l)}var Ye=x.ReactCurrentOwner,Xs={key:!0,ref:!0,__self:!0,__source:!0},Kn,Qn,zt;zt={};function Ks(l){if(We.call(l,"ref")){var _=Object.getOwnPropertyDescriptor(l,"ref").get;if(_&&_.isReactWarning)return!1}return l.ref!==void 0}function Qs(l){if(We.call(l,"key")){var _=Object.getOwnPropertyDescriptor(l,"key").get;if(_&&_.isReactWarning)return!1}return l.key!==void 0}function Zs(l,_){if(typeof l.ref=="string"&&Ye.current&&_&&Ye.current.stateNode!==_){var S=N(Ye.current.type);zt[S]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',N(Ye.current.type),l.ref),zt[S]=!0)}}function eo(l,_){{var S=function(){Kn||(Kn=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};S.isReactWarning=!0,Object.defineProperty(l,"key",{get:S,configurable:!0})}}function to(l,_){{var S=function(){Qn||(Qn=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};S.isReactWarning=!0,Object.defineProperty(l,"ref",{get:S,configurable:!0})}}var no=function(l,_,S,T,M,F,I){var P={$$typeof:e,type:l,key:_,ref:S,props:I,_owner:F};return P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(P,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(P,"_source",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P};function ro(l,_,S,T,M){{var F,I={},P=null,K=null;S!==void 0&&(Xn(S),P=""+S),Qs(_)&&(Xn(_.key),P=""+_.key),Ks(_)&&(K=_.ref,Zs(_,M));for(F in _)We.call(_,F)&&!Xs.hasOwnProperty(F)&&(I[F]=_[F]);if(l&&l.defaultProps){var H=l.defaultProps;for(F in H)I[F]===void 0&&(I[F]=H[F])}if(P||K){var V=typeof l=="function"?l.displayName||l.name||"Unknown":l;P&&eo(I,V),K&&to(I,V)}return no(l,P,K,M,T,Ye.current,I)}}var Vt=x.ReactCurrentOwner,Zn=x.ReactDebugCurrentFrame;function Re(l){if(l){var _=l._owner,S=ht(l.type,l._source,_?_.type:null);Zn.setExtraStackFrame(S)}else Zn.setExtraStackFrame(null)}var Wt;Wt=!1;function Yt(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function er(){{if(Vt.current){var l=N(Vt.current.type);if(l)return`
23
-
24
- Check the render method of \``+l+"`."}return""}}function so(l){return""}var tr={};function oo(l){{var _=er();if(!_){var S=typeof l=="string"?l:l.displayName||l.name;S&&(_=`
25
-
26
- Check the top-level render call using <`+S+">.")}return _}}function nr(l,_){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var S=oo(_);if(tr[S])return;tr[S]=!0;var T="";l&&l._owner&&l._owner!==Vt.current&&(T=" It was passed a child from "+N(l._owner.type)+"."),Re(l),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,T),Re(null)}}function rr(l,_){{if(typeof l!="object")return;if(Ht(l))for(var S=0;S<l.length;S++){var T=l[S];Yt(T)&&nr(T,_)}else if(Yt(l))l._store&&(l._store.validated=!0);else if(l){var M=b(l);if(typeof M=="function"&&M!==l.entries)for(var F=M.call(l),I;!(I=F.next()).done;)Yt(I.value)&&nr(I.value,_)}}}function io(l){{var _=l.type;if(_==null||typeof _=="string")return;var S;if(typeof _=="function")S=_.propTypes;else if(typeof _=="object"&&(_.$$typeof===u||_.$$typeof===h))S=_.propTypes;else return;if(S){var T=N(_);Ws(S,l.props,"prop",T,l)}else if(_.PropTypes!==void 0&&!Wt){Wt=!0;var M=N(_);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",M||"Unknown")}typeof _.getDefaultProps=="function"&&!_.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ao(l){{for(var _=Object.keys(l.props),S=0;S<_.length;S++){var T=_[S];if(T!=="children"&&T!=="key"){Re(l),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),Re(null);break}}l.ref!==null&&(Re(l),w("Invalid attribute `ref` supplied to `React.Fragment`."),Re(null))}}var sr={};function or(l,_,S,T,M,F){{var I=R(l);if(!I){var P="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(P+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var K=so();K?P+=K:P+=er();var H;l===null?H="null":Ht(l)?H="array":l!==void 0&&l.$$typeof===e?(H="<"+(N(l.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):H=typeof l,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",H,P)}var V=ro(l,_,S,M,F);if(V==null)return V;if(I){var ne=_.children;if(ne!==void 0)if(T)if(Ht(ne)){for(var Ae=0;Ae<ne.length;Ae++)rr(ne[Ae],l);Object.freeze&&Object.freeze(ne)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else rr(ne,l)}if(We.call(_,"key")){var Te=N(l),Q=Object.keys(_).filter(function(po){return po!=="key"}),Gt=Q.length>0?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}";if(!sr[Te+Gt]){var ho=Q.length>0?"{"+Q.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
27
- let props = %s;
28
- <%s {...props} />
29
- React keys must be passed directly to JSX without using spread:
30
- let props = %s;
31
- <%s key={someKey} {...props} />`,Gt,Te,ho,Te),sr[Te+Gt]=!0}}return l===r?ao(V):io(V),V}}function co(l,_,S){return or(l,_,S,!0)}function lo(l,_,S){return or(l,_,S,!1)}var uo=lo,fo=co;Je.Fragment=r,Je.jsx=uo,Je.jsxs=fo}()),Je}process.env.NODE_ENV==="production"?hn.exports=go():hn.exports=mo();var a=hn.exports;const cr=t=>{let e;const n=new Set,r=(d,f)=>{const h=typeof d=="function"?d(e):d;if(!Object.is(h,e)){const y=e;e=f??(typeof h!="object"||h===null)?h:Object.assign({},e,h),n.forEach(v=>v(e,y))}},s=()=>e,c={setState:r,getState:s,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d))},u=e=t(r,s,c);return c},vo=t=>t?cr(t):cr,bo=t=>t;function yo(t,e=bo){const n=E.useSyncExternalStore(t.subscribe,()=>e(t.getState()),()=>e(t.getInitialState()));return E.useDebugValue(n),n}const lr=t=>{const e=vo(t),n=r=>yo(e,r);return Object.assign(n,e),n},ae=t=>t?lr(t):lr,Se=ae(t=>({blocks:{},setBlocks:e=>t(()=>({blocks:e})),activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e})),sourceBlocks:{},setSourceBlocks:e=>t(()=>({sourceBlocks:e}))})),_o=ae(t=>({currentDevice:"desktop",setCurrentDevice:e=>t(()=>({currentDevice:e}))}));ae(t=>({pageData:null,setPageData:e=>t(()=>({pageData:e}))}));const Wr=[{icon:"layers",name:"Layers"},{icon:"plus",name:"Add"},{icon:"palette",name:"Theme"},{icon:"settings",name:"Settings"}],wo=["desktop","tablet","mobile"],xo=[{icon:"paint",name:"Colors"},{icon:"font",name:"Fonts"},{icon:"corners-out",name:"Borders"},{icon:"arrow-square",name:"Buttons"},{icon:"textbox",name:"Inputs"}],So="https://g-api.billgang.com",Eo="https://www.googleapis.com/webfonts/v1/webfonts",Ct=Array.from({length:122/2+1},(t,e)=>String(6+e*2)),Oo=["100","200","300","400","500","600","700","800","900"],tt=["home","reviews","faqs","contact","product","ticket","login"],Co={home:{path:"/",name:"home",icon:"house",seo:{description:"",title:""},visibility:"public"},product:{path:"/product",name:"product",icon:"squares",seo:{description:"",title:""},visibility:"public"},faqs:{path:"/faqs",name:"faqs",icon:"faqs",seo:{description:"",title:""},visibility:"public"},reviews:{path:"/reviews",name:"reviews",icon:"star",seo:{description:"",title:""},visibility:"public"},contact:{path:"/contact",name:"contact",icon:"chat",seo:{description:"",title:""},visibility:"public"},ticket:{path:"/ticket",name:"ticket",icon:"ticket",seo:{description:"",title:""},visibility:"public"},login:{path:"/login",name:"login",icon:"user-circle-gear",seo:{description:"",title:""},visibility:"public"}},st=ae(t=>({activeBlock:Wr[0],setActiveBlock:e=>t(()=>({activeBlock:e}))}));function To(t,e){let n;try{n=t()}catch{return}return{getItem:s=>{var o;const i=u=>u===null?null:JSON.parse(u,void 0),c=(o=n.getItem(s))!=null?o:null;return c instanceof Promise?c.then(i):i(c)},setItem:(s,o)=>n.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>n.removeItem(s)}}const pn=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return pn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return pn(r)(n)}}}},jo=(t,e)=>(n,r,s)=>{let o={storage:To(()=>localStorage),partialize:p=>p,version:0,merge:(p,b)=>({...b,...p}),...e},i=!1;const c=new Set,u=new Set;let d=o.storage;if(!d)return t((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...p)},r,s);const f=()=>{const p=o.partialize({...r()});return d.setItem(o.name,{state:p,version:o.version})},h=s.setState;s.setState=(p,b)=>{h(p,b),f()};const y=t((...p)=>{n(...p),f()},r,s);s.getInitialState=()=>y;let v;const g=()=>{var p,b;if(!d)return;i=!1,c.forEach(w=>{var O;return w((O=r())!=null?O:y)});const x=((b=o.onRehydrateStorage)==null?void 0:b.call(o,(p=r())!=null?p:y))||void 0;return pn(d.getItem.bind(d))(o.name).then(w=>{if(w)if(typeof w.version=="number"&&w.version!==o.version){if(o.migrate)return[!0,o.migrate(w.state,w.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,w.state];return[!1,void 0]}).then(w=>{var O;const[A,B]=w;if(v=o.merge(B,(O=r())!=null?O:y),n(v,!0),A)return f()}).then(()=>{x==null||x(v,void 0),v=r(),i=!0,u.forEach(w=>w(v))}).catch(w=>{x==null||x(void 0,w)})};return s.persist={setOptions:p=>{o={...o,...p},p.storage&&(d=p.storage)},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:p=>(c.add(p),()=>{c.delete(p)}),onFinishHydration:p=>(u.add(p),()=>{u.delete(p)})},o.skipHydration||g(),v||y},Dt=jo,ot=ae(Dt(t=>({onPreview:!1,setOnPreview:e=>t(()=>({onPreview:e})),activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e}))}),{name:"preview-storage",partialize:t=>{const{onPreview:e}=t;return{onPreview:e}}}));var Y=[];for(var Jt=0;Jt<256;++Jt)Y.push((Jt+256).toString(16).slice(1));function Do(t,e=0){return(Y[t[e+0]]+Y[t[e+1]]+Y[t[e+2]]+Y[t[e+3]]+"-"+Y[t[e+4]]+Y[t[e+5]]+"-"+Y[t[e+6]]+Y[t[e+7]]+"-"+Y[t[e+8]]+Y[t[e+9]]+"-"+Y[t[e+10]]+Y[t[e+11]]+Y[t[e+12]]+Y[t[e+13]]+Y[t[e+14]]+Y[t[e+15]]).toLowerCase()}var gt,ko=new Uint8Array(16);function No(){if(!gt&&(gt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gt(ko)}var Po=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const ur={randomUUID:Po};function gn(t,e,n){if(ur.randomUUID&&!e&&!t)return ur.randomUUID();t=t||{};var r=t.random||(t.rng||No)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Do(r)}const he=ae(Dt((t,e)=>({blocks:{home:{},contact:{},product:{},faqs:{},reviews:{},ticket:{},login:{}},currentBlock:null,positionBlock:null,createPage:n=>{const r=e().blocks;r[n]={},t({blocks:r})},deletePage:n=>{const r=e().blocks;delete r[n],t({blocks:r})},updatePage:(n,r)=>{const s=e().blocks;if(s[r])return;const o=s[n];delete s[n],s[r]=o,t({blocks:s})},setCurrentBlock:n=>{t({currentBlock:n})},setPositionBlock:n=>{t({positionBlock:n})},addBlock:(n,r)=>{const s=e().blocks,o=s[n]||{},i=e().positionBlock,c=gn(),u=Object.keys(o);if(i===null||i>=u.length)o[c]={name:r.name,value:{...r.value}},t({blocks:{...s,[n]:o}});else{const d={name:r.name,value:{...r.value}},f=u.slice(0,i),h=u.slice(i),y={...f.reduce((v,g)=>(v[g]=o[g],v),{}),[c]:d,...h.reduce((v,g)=>(v[g]=o[g],v),{})};t({blocks:{...s,[n]:y}})}},editBlock:(n,r,s)=>{const o=e().blocks,i=o[n]||{};i[r]={name:s.name,value:{...s.value}},t({blocks:{...o,[n]:i}})},removeBlock:(n,r)=>{const s=e().blocks,o=s[n]||{};delete o[r],t({blocks:{...s,[n]:o}})},moveBlock:(n,r,s)=>t(o=>{const i={...o.blocks[n]},c=Object.keys(i),[u]=c.splice(r,1);c.splice(s,0,u);const d=c.reduce((f,h)=>(f[h]=i[h],f),{});return{blocks:{...o.blocks,[n]:d}}}),duplicateBlock:(n,r)=>{const{blocks:s}=e(),o=s[n],i=o[r],c=gn(),u={name:i.name,value:{...i.value}},d=Object.keys(o),f=d.indexOf(r),h=d.slice(0,f+1),y=d.slice(f+1),v={...h.reduce((g,p)=>(g[p]=o[p],g),{}),[c]:u,...y.reduce((g,p)=>(g[p]=o[p],g),{})};t({blocks:{...s,[n]:v}})}}),{name:"layers-storage",partialize:t=>{const{blocks:e}=t;return{blocks:e}}})),it=ae((t,e)=>({isModalVisible:!1,hoverBlockId:null,isMouseOverModal:!1,hideTimeout:null,showModal:n=>{e().hideTimeout&&clearTimeout(e().hideTimeout),t({isModalVisible:!0,hoverBlockId:n})},hideModal:()=>{t({isModalVisible:!1,hoverBlockId:null})},startHideTimeout:()=>{if(!e().isMouseOverModal){const n=setTimeout(()=>{t({isModalVisible:!1,hoverBlockId:null})},500);t({hideTimeout:n})}},clearHideTimeout:()=>{e().hideTimeout&&(clearTimeout(e().hideTimeout),t({hideTimeout:null}))},setMouseOverModal:n=>{t({isMouseOverModal:n})},isPreviewVisible:!1,showPreview:n=>{t({isPreviewVisible:!0,hoverBlockId:n})},hidePreview:()=>{t({isPreviewVisible:!1,hoverBlockId:null})}})),ce=ae(t=>({activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e})),activeFont:null,setActiveFont:e=>t(()=>({activeFont:e})),themeSettings:{colors:{brand:{primary:"#fefefe",secondary:"#fefefe",toner:"#ffffff"},background:{primary:"#fefefe",secondary:"#000000"},text_icons:{primary:"#000000",secondary:"#fefefe",tertiary:"#fefefe",disabled:"#ffffff"},lines:{divider:"#000000",border:"#fefefe"},others:{link:"#000000"}},fonts:{heading:{h1:{font:"Archivo",weight:"900",size:48},h2:{font:"Archivo",weight:"700",size:32},h3:{font:"Archivo",weight:"600",size:24},h4:{font:"Archivo",weight:"500",size:16},h5:{font:"Archivo",weight:"400",size:16},h6:{font:"Archivo",weight:"400",size:16}},paragraph:{text:{font:"Archivo",size:48,weight:"400"}}},borders:{radius:52,thickness:52},buttons:{size:26,alignment:"left",radius:32,height:40},inputs:{general:{height:48,name:"Style Name",size:48,color:"black"},field:{active:!0,color:"black",opacity:40},border:{active:!0,style:"solid",radius:0,thickness:0,color:"black"},label:{height:48,size:48,color:"black",alignment:"left"}}},updateColor:(e,n,r)=>t(s=>{const o={...s.themeSettings.colors,[e]:{...s.themeSettings.colors[e],[n]:r}};return{themeSettings:{...s.themeSettings,colors:o}}}),updateFont:(e,n,r,s)=>t(o=>{const i={...o.themeSettings.fonts,[e]:{...o.themeSettings.fonts[e],[n]:{...o.themeSettings.fonts[e][n],[r]:s}}};return{themeSettings:{...o.themeSettings,fonts:i}}}),updateBorder:(e,n)=>t(r=>{const s={...r.themeSettings.borders,[e]:n};return{themeSettings:{...r.themeSettings,borders:s}}}),updateButton:(e,n)=>t(r=>{const s={...r.themeSettings.buttons,[e]:n};return{themeSettings:{...r.themeSettings,buttons:s}}}),updateInput:(e,n,r)=>t(s=>({themeSettings:{...s.themeSettings,inputs:{...s.themeSettings.inputs,[e]:{...s.themeSettings.inputs[e],[r]:n}}}}))})),Yr=ae(Dt(t=>({fonts:[],setFonts:e=>t(()=>({fonts:e}))}),{name:"fonts-storage"})),at=ae(t=>({settings:null,setSettings:e=>t(()=>({settings:e}))})),jn=ae()(t=>({color:"default",initialColor:"",setInitialColor:e=>t(()=>({initialColor:e})),colorChange:()=>{},update:()=>{},activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,setModalPosition:e=>t(()=>({modalPosition:e})),setHue:e=>t(()=>({hue:e})),setSaturation:e=>t(()=>({saturation:e})),setBrightness:e=>t(()=>({brightness:e})),setShowModal:e=>t(()=>({showModal:e})),setDragging:e=>t(()=>({dragging:e})),setActiveLabel:e=>t(()=>({activeLabel:e})),setColor:e=>t(()=>({color:e})),setUpdate:e=>t(()=>({update:e})),setColorChange:e=>t(()=>({colorChange:e}))})),pe=ae(Dt((t,e)=>({pages:Co,currentPage:"home",pageContext:{listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0},isOpenModal:!1,isOpenSelectModal:!1,isEdit:!1,editedPage:null,setEditedPage:n=>t(()=>({editedPage:n})),setCurrentPage:n=>t(()=>({currentPage:n})),setPageContext:n=>t(()=>({pageContext:n})),setIsOpenModal:n=>t(()=>({isOpenModal:n})),setIsOpenSelectModal:n=>t(()=>({isOpenSelectModal:n})),setIsEdit:n=>t(()=>({isEdit:n})),createPage:n=>{const r=e().pages,s=gn();r[s]=n,t({pages:r})},updatePage:(n,r)=>{const s=e().pages;s[n]={...r},t({pages:s})},deletePage:n=>{const r=e().pages;delete r[n],t({pages:r})}}),{name:"pages-storage",partialize:t=>{const{pages:e}=t;return{pages:e}}})),Io=(t,e,n)=>{const r=t[e];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((s,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},Ro="_icon_21b8w_1",Ao="_hoverable_21b8w_5",dr={icon:Ro,hoverable:Ao};var Gr={exports:{}};/*!
32
- Copyright (c) 2018 Jed Watson.
33
- Licensed under the MIT License (MIT), see
34
- http://jedwatson.github.io/classnames
35
- */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(o=s(o,r(c)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var c in o)e.call(o,c)&&o[c]&&(i=s(i,c));return i}function s(o,i){return i?o?o+" "+i:o+i:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Gr);var Bo=Gr.exports;const L=Vr(Bo),j=t=>{const{name:e,fill:n="currentColor",hoverable:r=!1,onClick:s,className:o,width:i,height:c}=t,[u,d]=E.useState(null);return E.useEffect(()=>{(async()=>{try{const{default:h}=await Io(Object.assign({"../../../assets/icons/align-center.svg":()=>Promise.resolve().then(()=>require("./align-center-DEANXdAS.cjs")),"../../../assets/icons/align-left.svg":()=>Promise.resolve().then(()=>require("./align-left-Cm-uab8B.cjs")),"../../../assets/icons/align-right.svg":()=>Promise.resolve().then(()=>require("./align-right-3l34PJVv.cjs")),"../../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>require("./arrow-down-BVZ1P_L9.cjs")),"../../../assets/icons/arrow-left.svg":()=>Promise.resolve().then(()=>require("./arrow-left-CXb5pfjn.cjs")),"../../../assets/icons/arrow-preview-down.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-down-DaEiSgZ5.cjs")),"../../../assets/icons/arrow-preview-up.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-up-DaNjYolK.cjs")),"../../../assets/icons/arrow-right.svg":()=>Promise.resolve().then(()=>require("./arrow-right-QxBPnNiY.cjs")),"../../../assets/icons/arrow-square.svg":()=>Promise.resolve().then(()=>require("./arrow-square-BQEpI5Xn.cjs")),"../../../assets/icons/arrow-up-right.svg":()=>Promise.resolve().then(()=>require("./arrow-up-right-BAHL0rjI.cjs")),"../../../assets/icons/border-dashed.svg":()=>Promise.resolve().then(()=>require("./border-dashed-hzn9HgjT.cjs")),"../../../assets/icons/border-solid.svg":()=>Promise.resolve().then(()=>require("./border-solid-7GLUyhD0.cjs")),"../../../assets/icons/cards.svg":()=>Promise.resolve().then(()=>require("./cards-DsOTH3J4.cjs")),"../../../assets/icons/chat.svg":()=>Promise.resolve().then(()=>require("./chat-B_av70HO.cjs")),"../../../assets/icons/check.svg":()=>Promise.resolve().then(()=>require("./check-b4m73KG0.cjs")),"../../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>require("./copy-D4o494-8.cjs")),"../../../assets/icons/corners-out.svg":()=>Promise.resolve().then(()=>require("./corners-out-4-FEW-w_.cjs")),"../../../assets/icons/desktop.svg":()=>Promise.resolve().then(()=>require("./desktop-BaS7MtSb.cjs")),"../../../assets/icons/faqs.svg":()=>Promise.resolve().then(()=>require("./faqs-BqOuvjUH.cjs")),"../../../assets/icons/file.svg":()=>Promise.resolve().then(()=>require("./file-8wBLPxbL.cjs")),"../../../assets/icons/font.svg":()=>Promise.resolve().then(()=>require("./font-DkMBoXe1.cjs")),"../../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>require("./globe-Dc76Xp4l.cjs")),"../../../assets/icons/heading.svg":()=>Promise.resolve().then(()=>require("./heading-CPq36T7M.cjs")),"../../../assets/icons/house.svg":()=>Promise.resolve().then(()=>require("./house-CZ2u4ZpK.cjs")),"../../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>require("./info-circle-DxyEtmA8.cjs")),"../../../assets/icons/layers.svg":()=>Promise.resolve().then(()=>require("./layers-D-nS2yjm.cjs")),"../../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>require("./lock-BmgYa3ZA.cjs")),"../../../assets/icons/mobile.svg":()=>Promise.resolve().then(()=>require("./mobile-jT12AeF2.cjs")),"../../../assets/icons/paint.svg":()=>Promise.resolve().then(()=>require("./paint-onR-PyLb.cjs")),"../../../assets/icons/palette.svg":()=>Promise.resolve().then(()=>require("./palette-BOR3Eq6r.cjs")),"../../../assets/icons/paragraph.svg":()=>Promise.resolve().then(()=>require("./paragraph-BYRArpHX.cjs")),"../../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>require("./plus-7zIw2qu6.cjs")),"../../../assets/icons/radius.svg":()=>Promise.resolve().then(()=>require("./radius-CRLmETG0.cjs")),"../../../assets/icons/redo.svg":()=>Promise.resolve().then(()=>require("./redo-C-M_xJyP.cjs")),"../../../assets/icons/search.svg":()=>Promise.resolve().then(()=>require("./search-kPFRd0TJ.cjs")),"../../../assets/icons/settings.svg":()=>Promise.resolve().then(()=>require("./settings-BqG-9m9d.cjs")),"../../../assets/icons/sign-out.svg":()=>Promise.resolve().then(()=>require("./sign-out-vR-y-Fk7.cjs")),"../../../assets/icons/squares.svg":()=>Promise.resolve().then(()=>require("./squares-BaUyzSBO.cjs")),"../../../assets/icons/star.svg":()=>Promise.resolve().then(()=>require("./star-DX6bHsl_.cjs")),"../../../assets/icons/tablet.svg":()=>Promise.resolve().then(()=>require("./tablet-BvEDp-eu.cjs")),"../../../assets/icons/textbox.svg":()=>Promise.resolve().then(()=>require("./textbox-CeYJQP_1.cjs")),"../../../assets/icons/thickness.svg":()=>Promise.resolve().then(()=>require("./thickness-DSnQHY5N.cjs")),"../../../assets/icons/ticket.svg":()=>Promise.resolve().then(()=>require("./ticket-BFI6P_1c.cjs")),"../../../assets/icons/trash.svg":()=>Promise.resolve().then(()=>require("./trash-Cy0hsvys.cjs")),"../../../assets/icons/undo.svg":()=>Promise.resolve().then(()=>require("./undo-D2eH1UgJ.cjs")),"../../../assets/icons/user-circle-gear.svg":()=>Promise.resolve().then(()=>require("./user-circle-gear-DeMV7Apx.cjs")),"../../../assets/icons/x.svg":()=>Promise.resolve().then(()=>require("./x-DW1UBLIF.cjs")),"../../../assets/icons/zoom-minus.svg":()=>Promise.resolve().then(()=>require("./zoom-minus-TiFzxDhk.cjs"))}),`../../../assets/icons/${e}.svg`,6);d(()=>h)}catch{console.error(`Icon "${e}" not found in assets.`),d(null)}})()},[e]),u?a.jsx(u,{fill:n,style:{"--icon-fill":n},className:L(dr.icon,o,{[dr.hoverable]:r}),onClick:s,width:i||"24",height:c||"24"}):null},$o="_button_rcjso_1",Mo={button:$o},Ne=t=>{const{children:e,onClick:n,style:r,className:s,disabled:o=!1,size:i="m"}=t;return a.jsx("button",{className:L(Mo.button,s),onClick:n,style:{...r,fontSize:i==="m"?14:16},disabled:o,children:e})},Lo="_wrapper_x5ap4_1",Fo="_label_x5ap4_9",qo="_input_x5ap4_17",Uo="_required_x5ap4_36",mt={wrapper:Lo,label:Fo,input:qo,required:Uo},oe=t=>{const{onChange:e,label:n,value:r,type:s,min:o,placeholder:i,disabled:c=!1,required:u=!1,regex:d}=t,[f,h]=E.useState(!1);function y(g){return Number(g)<0?"0":g}function v(g){return!u||!d?!0:new RegExp(d).test(g)}return a.jsxs("div",{className:mt.wrapper,children:[n&&a.jsx("label",{className:mt.label,htmlFor:n,children:n}),a.jsx("input",{id:n,type:s||"text",defaultValue:r,onChange:g=>{if(s==="text")e(g.target.value);else{const p=y(g.target.value);e(p)}},autoComplete:"off",placeholder:i,className:L(mt.input,{[mt.required]:f&&u&&!v(r)}),min:s==="number"?o:void 0,disabled:c,onFocus:()=>h(!0)})]})},Ho="_wrapper_dmzhr_1",zo="_label_dmzhr_9",Vo="_select_dmzhr_17",Wo="_icon_dmzhr_30",Yo="_rotate_dmzhr_34",Go="_content_dmzhr_38",Jo="_options_dmzhr_42",Xo="_option_dmzhr_42",Ee={wrapper:Ho,label:zo,select:Vo,icon:Wo,rotate:Yo,content:Go,options:Jo,option:Xo},Ue=t=>{const{leftAddon:e,onChange:n,label:r,value:s,options:o,style:i}=t,[c,u]=E.useState(!1);function d(f){n(f),u(!1)}return E.useEffect(()=>{const f=()=>{u(!1)};return f(),document.body.addEventListener("click",f),()=>{document.body.removeEventListener("click",f)}},[]),a.jsxs("div",{className:Ee.wrapper,style:{...i},children:[r&&a.jsx("label",{className:Ee.label,htmlFor:r,children:r}),a.jsxs("div",{className:Ee.content,onClick:f=>f.stopPropagation(),children:[a.jsxs("div",{className:Ee.select,onClick:()=>u(f=>!f),children:[e,a.jsx("span",{children:s}),a.jsx(j,{name:"arrow-down",className:L(Ee.icon,{[Ee.rotate]:c})})]}),c&&a.jsx("div",{className:Ee.options,onClick:()=>u(!1),children:o.filter(f=>f!==s).map(f=>a.jsx("div",{className:Ee.option,onClick:()=>d(f),children:f},f))})]})]})},Ko="_active_1gvxu_12",Qo="_toggle_1gvxu_15",Xt={switch:"_switch_1gvxu_1",active:Ko,toggle:Qo},fr=({onChange:t,style:e,current:n})=>{const[r,s]=E.useState(n),o=()=>{s(i=>!i),t==null||t(!r)};return a.jsx("div",{className:L(Xt.switch,{[Xt.active]:r}),onClick:o,style:e,children:a.jsx("div",{className:Xt.toggle})})},Zo="_wrapper_1inu5_1",ei={wrapper:Zo},hr=({children:t})=>{const{hoverBlockId:e,startHideTimeout:n,clearHideTimeout:r,setMouseOverModal:s}=it();return e?a.jsx("div",{className:ei.wrapper,onMouseEnter:()=>{r(),s(!0)},onMouseLeave:()=>{s(!1),n()},children:t}):null},ti="_blocks_1op3c_1",ni="_block_1op3c_1",ri="_active_1op3c_18",Kt={blocks:ti,block:ni,active:ri},pr=t=>{const{items:e,selectedItem:n,onSelect:r,getIconName:s}=t;return a.jsx("div",{className:Kt.blocks,children:e.map(o=>a.jsx("div",{className:L(Kt.block,{[Kt.active]:n===o}),onClick:()=>r(o),children:a.jsx(j,{name:s(o),fill:n===o?"#252525":"#757575"})},String(o)))})},si="_applyButton_1cqw4_2",oi="_cancelButton_1cqw4_7",ii="_content_1cqw4_12",ai="_label_1cqw4_18",ci="_colorValue_1cqw4_30",li="_modal_1cqw4_37",ui="_colorMap_1cqw4_56",di="_indicator_1cqw4_64",fi="_hueSlider_1cqw4_73",hi="_slider_1cqw4_102",pi="_buttons_1cqw4_107",gi="_name_1cqw4_113",mi="_secondary_1cqw4_118",vi="_input_1cqw4_126",X={applyButton:si,cancelButton:oi,content:ii,label:ai,colorValue:ci,modal:li,colorMap:ui,indicator:di,hueSlider:fi,slider:hi,buttons:pi,name:gi,secondary:mi,input:vi},et=t=>{const{initialColor:e,onChange:n,title:r,labelStyle:s="primary"}=t,[o,i]=E.useState(e),{setActiveLabel:c,setModalPosition:u,setInitialColor:d,setShowModal:f,setUpdate:h,setColor:y,setColorChange:v,colorChange:g}=jn();E.useEffect(()=>{const b=()=>{f(!1),c(null),d(e),h(()=>{}),y(e),v(()=>{})};return document.body.addEventListener("click",b),()=>{document.body.removeEventListener("click",b)}},[]);const p=b=>{b.stopPropagation(),f(!0),v(i),h(n),d(e),y(o);const x=b.currentTarget.getBoundingClientRect(),w=400,O=288,A=10,B=20,q=window.innerHeight-x.bottom,z=x.top,G=window.innerWidth-x.right,C=x.left;let R,$;R=x.bottom+A+window.scrollY,$=x.left,(q<w||q<B)&&(z>=w?R=x.top-w-A+window.scrollY:R=window.scrollY+(window.innerHeight-w)/2),G<O&&(C>=O?$=x.right-O:$=(window.innerWidth-O)/2),$<x.right&&$+O>x.left&&R<x.bottom&&R+w>x.top&&(G>=O?$=x.right+A+100:q>=w?R=x.bottom+A+window.scrollY:(R=window.scrollY+(window.innerHeight-w)/2,$=(window.innerWidth-O)/2)),u({top:R,left:$})};return a.jsxs("div",{className:X.content,children:[a.jsx("span",{className:L(X.name,{[X.secondary]:s==="secondary"}),children:r}),a.jsxs("label",{htmlFor:"color",className:X.label,children:[a.jsx("div",{className:X.colorValue,style:{background:o},onClick:p}),a.jsx("input",{type:"text",defaultValue:o,value:o,onChange:b=>{const x=b.target.value;n(x),y(x),i(x),g(x)},className:X.input})]})]})},bi="_modal_1t5at_1",yi={modal:bi},_i=t=>{const{close:e,children:n}=t;return E.useEffect(()=>{const r=()=>{e(!1)};return document.body.addEventListener("click",r),()=>{document.body.removeEventListener("click",r)}},[]),a.jsx("div",{className:yi.modal,children:n})},wi="_wrapper_1qvfi_1",xi="_label_1qvfi_10",Si="_textarea_1qvfi_18",Ei="_length_1qvfi_33",vt={wrapper:wi,label:xi,textarea:Si,length:Ei},Oi=t=>{const{onChange:e,label:n,value:r,maxLength:s,placeholder:o}=t,[i,c]=E.useState(0);return a.jsxs("div",{className:vt.wrapper,children:[n&&a.jsx("label",{className:vt.label,htmlFor:n,children:n}),a.jsx("textarea",{id:n,defaultValue:r,onChange:u=>{c(u.target.value.length),e(u.target.value)},placeholder:o,className:vt.textarea,maxLength:s}),s&&a.jsxs("div",{className:vt.length,children:[i,"/",s]})]})},Ci="_wrapper_1fcne_2",Ti="_label_1fcne_10",ji="_options_1fcne_18",Di="_radioLabel_1fcne_23",ki="_radio_1fcne_23",Ni="_custom_1fcne_36",Pi="_option_1fcne_18",je={wrapper:Ci,label:Ti,options:ji,radioLabel:Di,radio:ki,custom:Ni,option:Pi},Ii=t=>{const{defaultValue:e,options:n,onChange:r,label:s}=t,[o,i]=E.useState(e),c=u=>{const d=u.target.value;i(d),r(d)};return a.jsxs("div",{className:je.wrapper,children:[a.jsx("span",{className:je.label,children:s}),a.jsx("div",{className:je.options,children:n.map(u=>a.jsxs("label",{className:je.radioLabel,children:[a.jsx("input",{type:"radio",value:u.value,checked:o===u.value,onChange:c,className:je.radio}),a.jsx("span",{className:je.custom}),a.jsx("span",{className:je.option,children:u.label})]},u.value))})]})},Ri="_tip_pl6k0_1",Ai="_text_pl6k0_9",Bi="_warning_pl6k0_15",$i="_error_pl6k0_20",Mi="_hide_pl6k0_25",Xe={tip:Ri,text:Ai,warning:Bi,error:$i,hide:Mi},Li=t=>{const{type:e,message:n,style:r}=t,[s,o]=E.useState(!1);return a.jsxs("div",{className:L(Xe.tip,{[Xe.warning]:e==="warning",[Xe.error]:e==="error",[Xe.hide]:s}),style:r,children:[a.jsx("div",{children:a.jsx(j,{name:"info-circle",fill:e==="warning"?"#C1972A":"#FF3F19",width:20,height:20})}),a.jsx("div",{className:Xe.text,children:n}),a.jsx("div",{children:a.jsx(j,{name:"x",fill:e==="warning"?"#C1972A":"#FF3F19",width:20,height:20,hoverable:!0,onClick:()=>o(!0)})})]})},Fi="_buttons_1gn8m_1",qi="_button_1gn8m_1",Ui={buttons:Fi,button:qi},Hi=()=>a.jsxs("div",{className:Ui.buttons,children:[a.jsx(j,{name:"undo",hoverable:!0,width:20,height:20}),a.jsx(j,{name:"redo",hoverable:!0,width:20,height:20})]}),zi="_devices_hxl12_1",Vi="_device_hxl12_1",Wi="_active_hxl12_23",Qt={devices:zi,device:Vi,active:Wi},Yi=()=>{const{currentDevice:t,setCurrentDevice:e}=_o();return a.jsx("div",{className:Qt.devices,children:wo.map(n=>a.jsx("div",{className:L(Qt.device,{[Qt.active]:t===n}),onClick:()=>e(n),children:a.jsx(j,{name:n,fill:t===n?"#252525":"#757575",width:20,height:20})},n))})},Gi="_header_ltoxx_1",Ji="_left_ltoxx_16",Xi="_right_ltoxx_17",bt={header:Gi,left:Ji,right:Xi},Ki="_preview_vijvm_2",Qi="_active_vijvm_22",Zt={preview:Ki,active:Qi},Zi=()=>{const{onPreview:t,setOnPreview:e}=ot();return a.jsxs("div",{className:L(Zt.preview,{[Zt.active]:t}),onClick:()=>e(!t),children:[a.jsx(j,{name:"arrow-up-right",width:20,height:20}),a.jsx("span",{className:Zt.text,children:"Preview"})]})},ea="_settings_q79q3_1",ta={settings:ea},na="_language_1mbvp_1",ra="_text_1mbvp_11",gr={language:na,text:ra},sa=()=>a.jsxs("div",{className:gr.language,children:[a.jsx(j,{name:"globe",fill:"#252525",width:20,height:20}),a.jsx("span",{className:gr.text,children:"Default"}),a.jsx(j,{name:"arrow-down",width:20,height:20})]}),oa="_pages_x8pw2_1",ia="_text_x8pw2_16",aa="_modal_x8pw2_22",ca="_page_x8pw2_1",la="_hoverable_x8pw2_45",ua="_separator_x8pw2_49",da="_button_x8pw2_53",ye={pages:oa,default:"_default_x8pw2_5",text:ia,modal:aa,page:ca,hoverable:la,separator:ua,button:da},be=t=>t?t.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" and "):"";function Jr(t,e){return function(){return t.apply(e,arguments)}}const{toString:fa}=Object.prototype,{getPrototypeOf:Dn}=Object,kt=(t=>e=>{const n=fa.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ge=t=>(t=t.toLowerCase(),e=>kt(e)===t),Nt=t=>e=>typeof e===t,{isArray:He}=Array,rt=Nt("undefined");function ha(t){return t!==null&&!rt(t)&&t.constructor!==null&&!rt(t.constructor)&&te(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Xr=ge("ArrayBuffer");function pa(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Xr(t.buffer),e}const ga=Nt("string"),te=Nt("function"),Kr=Nt("number"),Pt=t=>t!==null&&typeof t=="object",ma=t=>t===!0||t===!1,St=t=>{if(kt(t)!=="object")return!1;const e=Dn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},va=ge("Date"),ba=ge("File"),ya=ge("Blob"),_a=ge("FileList"),wa=t=>Pt(t)&&te(t.pipe),xa=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||te(t.append)&&((e=kt(t))==="formdata"||e==="object"&&te(t.toString)&&t.toString()==="[object FormData]"))},Sa=ge("URLSearchParams"),[Ea,Oa,Ca,Ta]=["ReadableStream","Request","Response","Headers"].map(ge),ja=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ct(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),He(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let c;for(r=0;r<i;r++)c=o[r],e.call(null,t[c],c,t)}}function Qr(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const De=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zr=t=>!rt(t)&&t!==De;function mn(){const{caseless:t}=Zr(this)&&this||{},e={},n=(r,s)=>{const o=t&&Qr(e,s)||s;St(e[o])&&St(r)?e[o]=mn(e[o],r):St(r)?e[o]=mn({},r):He(r)?e[o]=r.slice():e[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ct(arguments[r],n);return e}const Da=(t,e,n,{allOwnKeys:r}={})=>(ct(e,(s,o)=>{n&&te(s)?t[o]=Jr(s,n):t[o]=s},{allOwnKeys:r}),t),ka=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Na=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Pa=(t,e,n,r)=>{let s,o,i;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!c[i]&&(e[i]=t[i],c[i]=!0);t=n!==!1&&Dn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Ia=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Ra=t=>{if(!t)return null;if(He(t))return t;let e=t.length;if(!Kr(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Aa=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Dn(Uint8Array)),Ba=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},$a=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Ma=ge("HTMLFormElement"),La=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),mr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Fa=ge("RegExp"),es=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ct(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},qa=t=>{es(t,(e,n)=>{if(te(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(te(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ua=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return He(t)?r(t):r(String(t).split(e)),n},Ha=()=>{},za=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,en="abcdefghijklmnopqrstuvwxyz",vr="0123456789",ts={DIGIT:vr,ALPHA:en,ALPHA_DIGIT:en+en.toUpperCase()+vr},Va=(t=16,e=ts.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Wa(t){return!!(t&&te(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Ya=t=>{const e=new Array(10),n=(r,s)=>{if(Pt(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const o=He(r)?[]:{};return ct(r,(i,c)=>{const u=n(i,s+1);!rt(u)&&(o[c]=u)}),e[s]=void 0,o}}return r};return n(t,0)},Ga=ge("AsyncFunction"),Ja=t=>t&&(Pt(t)||te(t))&&te(t.then)&&te(t.catch),ns=((t,e)=>t?setImmediate:e?((n,r)=>(De.addEventListener("message",({source:s,data:o})=>{s===De&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),De.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",te(De.postMessage)),Xa=typeof queueMicrotask<"u"?queueMicrotask.bind(De):typeof process<"u"&&process.nextTick||ns,m={isArray:He,isArrayBuffer:Xr,isBuffer:ha,isFormData:xa,isArrayBufferView:pa,isString:ga,isNumber:Kr,isBoolean:ma,isObject:Pt,isPlainObject:St,isReadableStream:Ea,isRequest:Oa,isResponse:Ca,isHeaders:Ta,isUndefined:rt,isDate:va,isFile:ba,isBlob:ya,isRegExp:Fa,isFunction:te,isStream:wa,isURLSearchParams:Sa,isTypedArray:Aa,isFileList:_a,forEach:ct,merge:mn,extend:Da,trim:ja,stripBOM:ka,inherits:Na,toFlatObject:Pa,kindOf:kt,kindOfTest:ge,endsWith:Ia,toArray:Ra,forEachEntry:Ba,matchAll:$a,isHTMLForm:Ma,hasOwnProperty:mr,hasOwnProp:mr,reduceDescriptors:es,freezeMethods:qa,toObjectSet:Ua,toCamelCase:La,noop:Ha,toFiniteNumber:za,findKey:Qr,global:De,isContextDefined:Zr,ALPHABET:ts,generateString:Va,isSpecCompliantForm:Wa,toJSONObject:Ya,isAsyncFn:Ga,isThenable:Ja,setImmediate:ns,asap:Xa};function D(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}m.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:m.toJSONObject(this.config),code:this.code,status:this.status}}});const rs=D.prototype,ss={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{ss[t]={value:t}});Object.defineProperties(D,ss);Object.defineProperty(rs,"isAxiosError",{value:!0});D.from=(t,e,n,r,s,o)=>{const i=Object.create(rs);return m.toFlatObject(t,i,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),D.call(i,t.message,e,n,r,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const Ka=null;function vn(t){return m.isPlainObject(t)||m.isArray(t)}function os(t){return m.endsWith(t,"[]")?t.slice(0,-2):t}function br(t,e,n){return t?t.concat(e).map(function(s,o){return s=os(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function Qa(t){return m.isArray(t)&&!t.some(vn)}const Za=m.toFlatObject(m,{},null,function(e){return/^is[A-Z]/.test(e)});function It(t,e,n){if(!m.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=m.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!m.isUndefined(b[p])});const r=n.metaTokens,s=n.visitor||f,o=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&m.isSpecCompliantForm(e);if(!m.isFunction(s))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(m.isDate(g))return g.toISOString();if(!u&&m.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return m.isArrayBuffer(g)||m.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,p,b){let x=g;if(g&&!b&&typeof g=="object"){if(m.endsWith(p,"{}"))p=r?p:p.slice(0,-2),g=JSON.stringify(g);else if(m.isArray(g)&&Qa(g)||(m.isFileList(g)||m.endsWith(p,"[]"))&&(x=m.toArray(g)))return p=os(p),x.forEach(function(O,A){!(m.isUndefined(O)||O===null)&&e.append(i===!0?br([p],A,o):i===null?p:p+"[]",d(O))}),!1}return vn(g)?!0:(e.append(br(b,p,o),d(g)),!1)}const h=[],y=Object.assign(Za,{defaultVisitor:f,convertValue:d,isVisitable:vn});function v(g,p){if(!m.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(g),m.forEach(g,function(x,w){(!(m.isUndefined(x)||x===null)&&s.call(e,x,m.isString(w)?w.trim():w,p,y))===!0&&v(x,p?p.concat(w):[w])}),h.pop()}}if(!m.isObject(t))throw new TypeError("data must be an object");return v(t),e}function yr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function kn(t,e){this._pairs=[],t&&It(t,this,e)}const is=kn.prototype;is.append=function(e,n){this._pairs.push([e,n])};is.toString=function(e){const n=e?function(r){return e.call(this,r,yr)}:yr;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function ec(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function as(t,e,n){if(!e)return t;const r=n&&n.encode||ec,s=n&&n.serialize;let o;if(s?o=s(e,n):o=m.isURLSearchParams(e)?e.toString():new kn(e,n).toString(r),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class _r{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){m.forEach(this.handlers,function(r){r!==null&&e(r)})}}const cs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tc=typeof URLSearchParams<"u"?URLSearchParams:kn,nc=typeof FormData<"u"?FormData:null,rc=typeof Blob<"u"?Blob:null,sc={isBrowser:!0,classes:{URLSearchParams:tc,FormData:nc,Blob:rc},protocols:["http","https","file","blob","url","data"]},Nn=typeof window<"u"&&typeof document<"u",bn=typeof navigator=="object"&&navigator||void 0,oc=Nn&&(!bn||["ReactNative","NativeScript","NS"].indexOf(bn.product)<0),ic=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ac=Nn&&window.location.href||"http://localhost",cc=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Nn,hasStandardBrowserEnv:oc,hasStandardBrowserWebWorkerEnv:ic,navigator:bn,origin:ac},Symbol.toStringTag,{value:"Module"})),Z={...cc,...sc};function lc(t,e){return It(t,new Z.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return Z.isNode&&m.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function uc(t){return m.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function dc(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function ls(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),u=o>=n.length;return i=!i&&m.isArray(s)?s.length:i,u?(m.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!m.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&m.isArray(s[i])&&(s[i]=dc(s[i])),!c)}if(m.isFormData(t)&&m.isFunction(t.entries)){const n={};return m.forEachEntry(t,(r,s)=>{e(uc(r),s,n,0)}),n}return null}function fc(t,e,n){if(m.isString(t))try{return(e||JSON.parse)(t),m.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const lt={transitional:cs,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=m.isObject(e);if(o&&m.isHTMLForm(e)&&(e=new FormData(e)),m.isFormData(e))return s?JSON.stringify(ls(e)):e;if(m.isArrayBuffer(e)||m.isBuffer(e)||m.isStream(e)||m.isFile(e)||m.isBlob(e)||m.isReadableStream(e))return e;if(m.isArrayBufferView(e))return e.buffer;if(m.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return lc(e,this.formSerializer).toString();if((c=m.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return It(c?{"files[]":e}:e,u&&new u,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),fc(e)):e}],transformResponse:[function(e){const n=this.transitional||lt.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(m.isResponse(e)||m.isReadableStream(e))return e;if(e&&m.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(i)throw c.name==="SyntaxError"?D.from(c,D.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};m.forEach(["delete","get","head","post","put","patch"],t=>{lt.headers[t]={}});const hc=m.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pc=t=>{const e={};let n,r,s;return t&&t.split(`
36
- `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&hc[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},wr=Symbol("internals");function Ke(t){return t&&String(t).trim().toLowerCase()}function Et(t){return t===!1||t==null?t:m.isArray(t)?t.map(Et):String(t)}function gc(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const mc=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function tn(t,e,n,r,s){if(m.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!m.isString(e)){if(m.isString(r))return e.indexOf(r)!==-1;if(m.isRegExp(r))return r.test(e)}}function vc(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function bc(t,e){const n=m.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,o,i){return this[r].call(this,e,s,o,i)},configurable:!0})})}class ee{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function o(c,u,d){const f=Ke(u);if(!f)throw new Error("header name must be a non-empty string");const h=m.findKey(s,f);(!h||s[h]===void 0||d===!0||d===void 0&&s[h]!==!1)&&(s[h||u]=Et(c))}const i=(c,u)=>m.forEach(c,(d,f)=>o(d,f,u));if(m.isPlainObject(e)||e instanceof this.constructor)i(e,n);else if(m.isString(e)&&(e=e.trim())&&!mc(e))i(pc(e),n);else if(m.isHeaders(e))for(const[c,u]of e.entries())o(u,c,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=Ke(e),e){const r=m.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return gc(s);if(m.isFunction(n))return n.call(this,s,r);if(m.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ke(e),e){const r=m.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||tn(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function o(i){if(i=Ke(i),i){const c=m.findKey(r,i);c&&(!n||tn(r,r[c],c,n))&&(delete r[c],s=!0)}}return m.isArray(e)?e.forEach(o):o(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!e||tn(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const n=this,r={};return m.forEach(this,(s,o)=>{const i=m.findKey(r,o);if(i){n[i]=Et(s),delete n[o];return}const c=e?vc(o):String(o).trim();c!==o&&delete n[o],n[c]=Et(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return m.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&m.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
37
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[wr]=this[wr]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=Ke(i);r[c]||(bc(s,i),r[c]=!0)}return m.isArray(e)?e.forEach(o):o(e),this}}ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);m.reduceDescriptors(ee.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});m.freezeMethods(ee);function nn(t,e){const n=this||lt,r=e||n,s=ee.from(r.headers);let o=r.data;return m.forEach(t,function(c){o=c.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function us(t){return!!(t&&t.__CANCEL__)}function ze(t,e,n){D.call(this,t??"canceled",D.ERR_CANCELED,e,n),this.name="CanceledError"}m.inherits(ze,D,{__CANCEL__:!0});function ds(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yc(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function _c(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(u){const d=Date.now(),f=r[o];i||(i=d),n[s]=u,r[s]=d;let h=o,y=0;for(;h!==s;)y+=n[h++],h=h%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),d-i<e)return;const v=f&&d-f;return v?Math.round(y*1e3/v):void 0}}function wc(t,e){let n=0,r=1e3/e,s,o;const i=(d,f=Date.now())=>{n=f,s=null,o&&(clearTimeout(o),o=null),t.apply(null,d)};return[(...d)=>{const f=Date.now(),h=f-n;h>=r?i(d,f):(s=d,o||(o=setTimeout(()=>{o=null,i(s)},r-h)))},()=>s&&i(s)]}const Tt=(t,e,n=3)=>{let r=0;const s=_c(50,250);return wc(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,u=i-r,d=s(u),f=i<=c;r=i;const h={loaded:i,total:c,progress:c?i/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&f?(c-i)/d:void 0,event:o,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(h)},n)},xr=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Sr=t=>(...e)=>m.asap(()=>t(...e)),xc=Z.hasStandardBrowserEnv?function(){const e=Z.navigator&&/(msie|trident)/i.test(Z.navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=m.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Sc=Z.hasStandardBrowserEnv?{write(t,e,n,r,s,o){const i=[t+"="+encodeURIComponent(e)];m.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),m.isString(r)&&i.push("path="+r),m.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ec(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Oc(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function fs(t,e){return t&&!Ec(e)?Oc(t,e):e}const Er=t=>t instanceof ee?{...t}:t;function Pe(t,e){e=e||{};const n={};function r(d,f,h){return m.isPlainObject(d)&&m.isPlainObject(f)?m.merge.call({caseless:h},d,f):m.isPlainObject(f)?m.merge({},f):m.isArray(f)?f.slice():f}function s(d,f,h){if(m.isUndefined(f)){if(!m.isUndefined(d))return r(void 0,d,h)}else return r(d,f,h)}function o(d,f){if(!m.isUndefined(f))return r(void 0,f)}function i(d,f){if(m.isUndefined(f)){if(!m.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function c(d,f,h){if(h in e)return r(d,f);if(h in t)return r(void 0,d)}const u={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(d,f)=>s(Er(d),Er(f),!0)};return m.forEach(Object.keys(Object.assign({},t,e)),function(f){const h=u[f]||s,y=h(t[f],e[f],f);m.isUndefined(y)&&h!==c||(n[f]=y)}),n}const hs=t=>{const e=Pe({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=e;e.headers=i=ee.from(i),e.url=as(fs(e.baseURL,e.url),t.params,t.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(m.isFormData(n)){if(Z.hasStandardBrowserEnv||Z.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((u=i.getContentType())!==!1){const[d,...f]=u?u.split(";").map(h=>h.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...f].join("; "))}}if(Z.hasStandardBrowserEnv&&(r&&m.isFunction(r)&&(r=r(e)),r||r!==!1&&xc(e.url))){const d=s&&o&&Sc.read(o);d&&i.set(s,d)}return e},Cc=typeof XMLHttpRequest<"u",Tc=Cc&&function(t){return new Promise(function(n,r){const s=hs(t);let o=s.data;const i=ee.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:d}=s,f,h,y,v,g;function p(){v&&v(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function x(){if(!b)return;const O=ee.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),B={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:O,config:t,request:b};ds(function(z){n(z),p()},function(z){r(z),p()},B),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(r(new D("Request aborted",D.ECONNABORTED,t,b)),b=null)},b.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let A=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const B=s.transitional||cs;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),r(new D(A,B.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,t,b)),b=null},o===void 0&&i.setContentType(null),"setRequestHeader"in b&&m.forEach(i.toJSON(),function(A,B){b.setRequestHeader(B,A)}),m.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),c&&c!=="json"&&(b.responseType=s.responseType),d&&([y,g]=Tt(d,!0),b.addEventListener("progress",y)),u&&b.upload&&([h,v]=Tt(u),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",v)),(s.cancelToken||s.signal)&&(f=O=>{b&&(r(!O||O.type?new ze(null,t,b):O),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const w=yc(s.url);if(w&&Z.protocols.indexOf(w)===-1){r(new D("Unsupported protocol "+w+":",D.ERR_BAD_REQUEST,t));return}b.send(o||null)})},jc=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const o=function(d){if(!s){s=!0,c();const f=d instanceof Error?d:this.reason;r.abort(f instanceof D?f:new ze(f instanceof Error?f.message:f))}};let i=e&&setTimeout(()=>{i=null,o(new D(`timeout ${e} of ms exceeded`,D.ETIMEDOUT))},e);const c=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),t=null)};t.forEach(d=>d.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>m.asap(c),u}},Dc=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},kc=async function*(t,e){for await(const n of Nc(t))yield*Dc(n,e)},Nc=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Or=(t,e,n,r)=>{const s=kc(t,e);let o=0,i,c=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:d,value:f}=await s.next();if(d){c(),u.close();return}let h=f.byteLength;if(n){let y=o+=h;n(y)}u.enqueue(new Uint8Array(f))}catch(d){throw c(d),d}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},Rt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ps=Rt&&typeof ReadableStream=="function",Pc=Rt&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),gs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ic=ps&&gs(()=>{let t=!1;const e=new Request(Z.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Cr=64*1024,yn=ps&&gs(()=>m.isReadableStream(new Response("").body)),jt={stream:yn&&(t=>t.body)};Rt&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!jt[e]&&(jt[e]=m.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new D(`Response type '${e}' is not supported`,D.ERR_NOT_SUPPORT,r)})})})(new Response);const Rc=async t=>{if(t==null)return 0;if(m.isBlob(t))return t.size;if(m.isSpecCompliantForm(t))return(await new Request(Z.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(m.isArrayBufferView(t)||m.isArrayBuffer(t))return t.byteLength;if(m.isURLSearchParams(t)&&(t=t+""),m.isString(t))return(await Pc(t)).byteLength},Ac=async(t,e)=>{const n=m.toFiniteNumber(t.getContentLength());return n??Rc(e)},Bc=Rt&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:u,responseType:d,headers:f,withCredentials:h="same-origin",fetchOptions:y}=hs(t);d=d?(d+"").toLowerCase():"text";let v=jc([s,o&&o.toAbortSignal()],i),g;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(u&&Ic&&n!=="get"&&n!=="head"&&(b=await Ac(f,r))!==0){let B=new Request(e,{method:"POST",body:r,duplex:"half"}),q;if(m.isFormData(r)&&(q=B.headers.get("content-type"))&&f.setContentType(q),B.body){const[z,G]=xr(b,Tt(Sr(u)));r=Or(B.body,Cr,z,G)}}m.isString(h)||(h=h?"include":"omit");const x="credentials"in Request.prototype;g=new Request(e,{...y,signal:v,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:x?h:void 0});let w=await fetch(g);const O=yn&&(d==="stream"||d==="response");if(yn&&(c||O&&p)){const B={};["status","statusText","headers"].forEach(C=>{B[C]=w[C]});const q=m.toFiniteNumber(w.headers.get("content-length")),[z,G]=c&&xr(q,Tt(Sr(c),!0))||[];w=new Response(Or(w.body,Cr,z,()=>{G&&G(),p&&p()}),B)}d=d||"text";let A=await jt[m.findKey(jt,d)||"text"](w,t);return!O&&p&&p(),await new Promise((B,q)=>{ds(B,q,{data:A,headers:ee.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:g})})}catch(x){throw p&&p(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,t,g),{cause:x.cause||x}):D.from(x,x&&x.code,t,g)}}),_n={http:Ka,xhr:Tc,fetch:Bc};m.forEach(_n,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Tr=t=>`- ${t}`,$c=t=>m.isFunction(t)||t===null||t===!1,ms={getAdapter:t=>{t=m.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let o=0;o<e;o++){n=t[o];let i;if(r=n,!$c(n)&&(r=_n[(i=String(n)).toLowerCase()],r===void 0))throw new D(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=e?o.length>1?`since :
38
- `+o.map(Tr).join(`
39
- `):" "+Tr(o[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:_n};function rn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ze(null,t)}function jr(t){return rn(t),t.headers=ee.from(t.headers),t.data=nn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ms.getAdapter(t.adapter||lt.adapter)(t).then(function(r){return rn(t),r.data=nn.call(t,t.transformResponse,r),r.headers=ee.from(r.headers),r},function(r){return us(r)||(rn(t),r&&r.response&&(r.response.data=nn.call(t,t.transformResponse,r.response),r.response.headers=ee.from(r.response.headers))),Promise.reject(r)})}const vs="1.7.7",Pn={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Pn[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Dr={};Pn.transitional=function(e,n,r){function s(o,i){return"[Axios v"+vs+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(e===!1)throw new D(s(i," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!Dr[i]&&(Dr[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,i,c):!0}};function Mc(t,e,n){if(typeof t!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],i=e[o];if(i){const c=t[o],u=c===void 0||i(c,o,t);if(u!==!0)throw new D("option "+o+" must be "+u,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}const wn={assertOptions:Mc,validators:Pn},Oe=wn.validators;class ke{constructor(e){this.defaults=e,this.interceptors={request:new _r,response:new _r}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
40
- `+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Pe(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&wn.assertOptions(r,{silentJSONParsing:Oe.transitional(Oe.boolean),forcedJSONParsing:Oe.transitional(Oe.boolean),clarifyTimeoutError:Oe.transitional(Oe.boolean)},!1),s!=null&&(m.isFunction(s)?n.paramsSerializer={serialize:s}:wn.assertOptions(s,{encode:Oe.function,serialize:Oe.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&m.merge(o.common,o[n.method]);o&&m.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=ee.concat(i,o);const c=[];let u=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(u=u&&p.synchronous,c.unshift(p.fulfilled,p.rejected))});const d=[];this.interceptors.response.forEach(function(p){d.push(p.fulfilled,p.rejected)});let f,h=0,y;if(!u){const g=[jr.bind(this),void 0];for(g.unshift.apply(g,c),g.push.apply(g,d),y=g.length,f=Promise.resolve(n);h<y;)f=f.then(g[h++],g[h++]);return f}y=c.length;let v=n;for(h=0;h<y;){const g=c[h++],p=c[h++];try{v=g(v)}catch(b){p.call(this,b);break}}try{f=jr.call(this,v)}catch(g){return Promise.reject(g)}for(h=0,y=d.length;h<y;)f=f.then(d[h++],d[h++]);return f}getUri(e){e=Pe(this.defaults,e);const n=fs(e.baseURL,e.url);return as(n,e.params,e.paramsSerializer)}}m.forEach(["delete","get","head","options"],function(e){ke.prototype[e]=function(n,r){return this.request(Pe(r||{},{method:e,url:n,data:(r||{}).data}))}});m.forEach(["post","put","patch"],function(e){function n(r){return function(o,i,c){return this.request(Pe(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}ke.prototype[e]=n(),ke.prototype[e+"Form"]=n(!0)});class In{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},e(function(o,i,c){r.reason||(r.reason=new ze(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new In(function(s){e=s}),cancel:e}}}function Lc(t){return function(n){return t.apply(null,n)}}function Fc(t){return m.isObject(t)&&t.isAxiosError===!0}const xn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xn).forEach(([t,e])=>{xn[e]=t});function bs(t){const e=new ke(t),n=Jr(ke.prototype.request,e);return m.extend(n,ke.prototype,e,{allOwnKeys:!0}),m.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return bs(Pe(t,s))},n}const U=bs(lt);U.Axios=ke;U.CanceledError=ze;U.CancelToken=In;U.isCancel=us;U.VERSION=vs;U.toFormData=It;U.AxiosError=D;U.Cancel=U.CanceledError;U.all=function(e){return Promise.all(e)};U.spread=Lc;U.isAxiosError=Fc;U.mergeConfig=Pe;U.AxiosHeaders=ee;U.formToJSON=t=>ls(m.isHTMLForm(t)?new FormData(t):t);U.getAdapter=ms.getAdapter;U.HttpStatusCode=xn;U.default=U;const qc="https://g-api.billgang.com",Uc=async(t="get",e,n)=>{const r=localStorage.getItem("shopId")||void 0,s=`${qc}/v2/builder/shops/${r}/${e}`;if(t.toUpperCase()==="GET")return(await U.get(s,{headers:{Authorization:"Bearer undefined"}})).data;t.toUpperCase()==="POST"&&await U.post(s,{...n},{headers:{Authorization:"Bearer undefined"}})},Hc=()=>{const{currentPage:t,setCurrentPage:e,setIsOpenModal:n,pages:r,setIsEdit:s,setEditedPage:o,deletePage:i,isOpenSelectModal:c,setIsOpenSelectModal:u}=pe(),{deletePage:d}=he(),[f,h]=E.useState("");return E.useEffect(()=>{const y=()=>{u(!1)};return document.body.addEventListener("click",y),()=>{document.body.removeEventListener("click",y)}},[]),a.jsxs("div",{className:ye.pages,children:[a.jsxs("div",{className:ye.default,onClick:y=>{y.stopPropagation(),u(!c)},children:[a.jsx(j,{name:r[t].icon,fill:"#252525",width:20,height:20}),a.jsx("span",{className:ye.text,children:tt.includes(r[t].name)?`${be(r[t].name)} page`:r[t].name}),a.jsx(j,{name:"arrow-down",width:20,height:20})]}),c&&a.jsxs("div",{className:ye.modal,onClick:y=>y.stopPropagation(),children:[Object.keys(r).map(y=>{const v=r[y];return a.jsxs("div",{className:L(ye.page,{[ye.hoverable]:f===y}),onMouseEnter:()=>h(y),onMouseLeave:()=>h(""),onClick:()=>{h(""),s(!1),e(y),u(!1)},children:[a.jsx(j,{name:v.icon,fill:"#252525"}),a.jsx("span",{className:ye.text,children:tt.includes(v.name)?`${be(v.name)} page`:v.name}),f===y&&a.jsxs(a.Fragment,{children:[a.jsx(j,{name:"settings",fill:"#757575",onClick:g=>{g.stopPropagation(),s(!0),o(y),n(!0)}}),!tt.includes(v.name)&&a.jsx(j,{name:"trash",fill:"#C12A2A",onClick:g=>{r[t].name===v.name&&e("home"),g.stopPropagation(),i(y),d(v.name)}})]}),r[t].name===v.name&&a.jsx(j,{name:"check",fill:"#FF3F19"})]},y)}),a.jsx("div",{className:ye.separator}),a.jsxs(Ne,{className:ye.button,onClick:y=>{y.stopPropagation(),n(!0)},size:"l",children:[a.jsx(j,{name:"plus",fill:"#ff3f19"}),a.jsx("span",{children:"Create Page Blank"})]})]})]})},zc="_zoom_a77cn_1",Vc={zoom:zc},Wc=()=>{const[t,e]=E.useState(),n=()=>{e(Number(Math.round(window.devicePixelRatio*50).toFixed(0)))};return E.useEffect(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),a.jsxs("div",{className:Vc.zoom,children:[a.jsx(j,{name:"zoom-minus",width:20,height:20}),a.jsxs("span",{children:[t," %"]})]})},Yc=()=>a.jsxs("div",{className:ta.settings,children:[a.jsx(sa,{}),a.jsx(Hc,{}),a.jsx(Wc,{})]}),Gc="_theme_3wxbf_1",Jc={theme:Gc},Xc=()=>a.jsxs("div",{className:Jc.theme,children:[a.jsx(j,{name:"check",width:18,height:18}),a.jsx("div",{children:"Current Theme"})]}),Kc=()=>{const{themeSettings:t}=ce(),{settings:e}=at(),[n,r]=E.useState(null),[s,o]=E.useState(!1),{pages:i}=pe(),{blocks:c}=he();function u(v,g){return g.map(b=>Object.values(b.value).filter(x=>x.type===v).map(x=>x.value).flat()).flat()}function d(v,g){return u(v,g).some(b=>b)}function f(v,g){const p=u(v,g);return Array.isArray(p)&&p.length>0?Math.max(...p):0}function h(v){const g=Object.keys(i).find(p=>i[p].name===v);return g?i[g]:null}const y=()=>{if(s)n&&clearTimeout(n);else{const g=Object.keys(c).map(p=>{const b=h(p);return{name:b?b.name:p,path:p==="home"?"/":(b==null?void 0:b.path)||p,layout:{...c[p]},neededProductIds:[...u("ProductId",Object.values(c[p]))],neededCategoryIds:[...u("CategoryId",Object.values(c[p]))],neededAnnouncementIds:[...u("AnnouncementId",Object.values(c[p]))],neededListingIds:[...u("ListingId",Object.values(c[p]))],neededFaqs:d("Faqs",Object.values(c[p])),neededReviewCount:f("ReviewCount",Object.values(c[p])),seo:{pageTitle:b?b.seo.title:"",pageDescription:b?b.seo.description:""}}});Uc("POST","save",{themeSettings:t,settings:e,updatedPages:g})}o(!0);const v=setTimeout(()=>{o(!1)},2e3);r(v)};return a.jsxs("div",{className:bt.header,children:[a.jsxs("div",{className:bt.left,children:[a.jsx(Yi,{}),a.jsx(Zi,{})]}),a.jsx("div",{className:bt.center,children:a.jsx(Yc,{})}),a.jsxs("div",{className:bt.right,children:[a.jsx(Xc,{}),a.jsx(Hi,{}),a.jsx(Ne,{onClick:y,children:"Save"})]})]})},Qc="_exit_2ce42_1",Zc="_text_2ce42_10",kr={exit:Qc,text:Zc},el=()=>a.jsxs("div",{className:kr.exit,children:[a.jsx(j,{name:"sign-out",width:20,height:20}),a.jsx("span",{className:kr.text,children:"Exit"})]}),tl="_navbar_2ac63_1",nl="_main_2ac63_6",rl="_block_2ac63_13",sl="_active_2ac63_30",yt={navbar:tl,main:nl,block:rl,active:sl},ol=()=>{const{activeBlock:t,setActiveBlock:e}=st(),{setActiveBlock:n}=Se(),{setCurrentBlock:r}=he(),{setActiveBlock:s}=ce();function o(i){n(null),e(i),r(null),s(null)}return a.jsxs("div",{className:yt.navbar,children:[a.jsx(el,{}),a.jsx("div",{className:yt.main,children:Wr.map(i=>a.jsxs("div",{className:L(yt.block,{[yt.active]:t.icon===i.icon}),onClick:()=>o(i),children:[a.jsx(j,{name:i.icon,fill:t.icon===i.icon?"#252525":"#757575"}),a.jsx("span",{children:i.name})]},i.icon))})]})},il="_preview_1jv6k_1",al="_main_1jv6k_8",cl="_content_1jv6k_18",ll="_loading_1jv6k_25",ul="_loader_1jv6k_33",dl="_spin_1jv6k_1",Qe={preview:il,main:al,content:cl,loading:ll,loader:ul,spin:dl},fl="_header_1t64j_1",hl="_circles_1t64j_14",pl="_circle_1t64j_14",gl="_red_1t64j_30",ml="_green_1t64j_34",vl="_yellow_1t64j_38",bl="_input_1t64j_42",yl="_main_1t64j_51",_l="_text_1t64j_59",_e={header:fl,circles:hl,circle:pl,red:gl,green:ml,yellow:vl,input:bl,main:yl,text:_l},wl="data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20x='0.5'%20width='16'%20height='16'%20fill='url(%23pattern0_4042_718)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_4042_718'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_4042_718'%20transform='scale(0.015625)'/%3e%3c/pattern%3e%3cimage%20id='image0_4042_718'%20width='64'%20height='64'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAONJREFUeF7t20EOhEAIRFG4/6F7DvEnYeFzryQIv6pBd2behOu9dPvsbog+k+NLgArQAqmJcw9iAAhSgZKB3IJkkAySQTJ4CiE+gA8oBeg0mH3Ai084P89HhqwEqIA209ICsQdjAeaZIgaAYKxBDMCAYy8fXwAIgiAIcoJpJEYGI4VjB3YrbC9gL2AvkCB43cM5PgZgAAZgQFnNZAhdGykQBEEQBEEQDBmgAm2glM/z+QUYisYUGoldO7kY32IEAzCg6RgIRgjFAsw+AgRBMNYgBmCAT2TCYfoPPz/HCqQCX1eBHzHnv7C7WhBSAAAAAElFTkSuQmCC'/%3e%3c/defs%3e%3c/svg%3e",xl=["red","yellow","green"],Sl=()=>a.jsxs("div",{className:_e.header,children:[a.jsx("div",{className:_e.circles,children:xl.map(t=>a.jsx("div",{className:L(_e.circle,{[_e.red]:t==="red",[_e.yellow]:t==="yellow",[_e.green]:t==="green"})},t))}),a.jsxs("div",{className:_e.input,children:[a.jsxs("div",{className:_e.main,children:[a.jsx("img",{src:wl,alt:""}),a.jsx("span",{className:_e.text,children:"lorem.ipsum"}),a.jsx(j,{name:"lock",fill:"#757575",width:15,height:16})]}),a.jsx(j,{name:"copy",width:20,height:20})]})]}),El="_content_92dk8_1",Ol="_block_92dk8_6",Cl="_active_92dk8_13",Tl="_name_92dk8_17",jl="_empty_92dk8_31",Dl="_icon_92dk8_42",kl="_title_92dk8_53",Nl="_text_92dk8_59",Pl="_sections_92dk8_65",Il="_section_92dk8_65",de={content:El,block:Ol,active:Cl,name:Tl,empty:jl,icon:Dl,title:kl,text:Nl,sections:Pl,section:Il},Rl="_sidebar_1f3hk_1",Al="_content_1f3hk_12",Bl="_button_1f3hk_22",$l="_moveButton_1f3hk_30",Ml="_border_1f3hk_34",Ll="_deleteButton_1f3hk_38",re={sidebar:Rl,content:Al,button:Bl,moveButton:$l,border:Ml,deleteButton:Ll},Fl=()=>{const{activeBlock:t}=ot(),{blocks:e,removeBlock:n,moveBlock:r,duplicateBlock:s}=he(),{currentPage:o,pages:i}=pe(),c=Object.keys(e[i[o].name]),u=c.indexOf(t),d=()=>{u>0&&r(i[o].name,u,u-1)},f=()=>{u<c.length-1&&r(i[o].name,u,u+1)},h=()=>{s(i[o].name,t)};return a.jsx("div",{className:re.sidebar,children:a.jsxs("div",{className:re.content,children:[a.jsx("button",{onClick:d,className:L(re.button,re.moveButton),disabled:u===0,children:a.jsx(j,{name:"arrow-preview-up"})}),a.jsx("button",{onClick:f,className:L(re.button,re.moveButton),disabled:u===c.length-1,children:a.jsx(j,{name:"arrow-preview-down"})}),a.jsx("div",{className:re.border}),a.jsx("button",{onClick:h,className:L(re.button,re.moveButton),children:a.jsx(j,{name:"copy"})}),a.jsx("div",{className:re.border}),a.jsx("button",{onClick:()=>n(i[o].name,t),className:L(re.button,re.deleteButton),children:a.jsx(j,{name:"trash",hoverable:!0})})]})})},ys=({render:t,block:e})=>t(e),ql=()=>{const{blocks:t,setActiveBlock:e}=Se(),{hideModal:n}=it();function r(s){e(s),n()}return a.jsxs("div",{className:de.empty,children:[a.jsx("div",{className:de.icon,children:a.jsx(j,{name:"file",width:32,height:32,fill:"#757575"})}),a.jsx("div",{className:de.title,children:"Empty Page"}),a.jsx("div",{className:de.text,children:"Here are the recommended sections for you"}),a.jsxs("div",{className:de.sections,children:[Object.keys(t).map(s=>a.jsxs("div",{className:de.section,onClick:()=>r(s),children:[a.jsxs("span",{children:[s," Sections"]}),a.jsx(j,{name:"plus"})]})),Object.keys(t).map(s=>a.jsxs("div",{className:de.section,onClick:()=>r(s),children:[a.jsxs("span",{children:[s," Sections"]}),a.jsx(j,{name:"plus"})]}))]})]})},Ul=E.memo(()=>{const{setActiveBlock:t,activeBlock:e}=ot(),{blocks:n}=Se(),{blocks:r}=he(),{settings:s}=at(),{currentPage:o,pages:i,setIsOpenSelectModal:c}=pe(),u=h=>{const y=n[h.name],v=h.value;for(const g in v)y[g]=v[g];return y.renderBlock(s)},d=E.useRef(e);E.useEffect(()=>{d.current=e},[e]),E.useEffect(()=>{const h=()=>{d.current&&t(null)};return document.body.addEventListener("click",h),()=>{document.body.removeEventListener("click",h)}},[]);const f=E.useCallback(h=>u(h),[r]);return a.jsxs("div",{onClick:h=>{h.stopPropagation(),c(!1)},className:de.content,children:[r[i[o].name]&&Object.keys(r[i[o].name]).map(h=>a.jsxs("div",{onClick:()=>t(h),className:L(de.block,{[de.active]:e===h}),children:[e===h&&a.jsx("div",{className:de.name,children:r[i[o].name][h].name}),e===h&&a.jsx(Fl,{}),a.jsx(ys,{render:f,block:r[i[o].name][h]})]})),(!r[i[o].name]||Object.keys(r[i[o].name]).length===0)&&a.jsx(ql,{})]})}),Hl="_results_f488n_1",zl="_name_f488n_8",Vl="_product_f488n_15",_t={results:Hl,name:zl,product:Vl},Wl="_search_1s0qp_1",Yl="_input_1s0qp_12",Nr={search:Wl,input:Yl},Gl=()=>a.jsxs("label",{className:Nr.search,children:[a.jsx("input",{type:"text",placeholder:"Search for sections",className:Nr.input}),a.jsx(j,{name:"search",fill:"#757575"})]}),_s=()=>{const{blocks:t,setActiveBlock:e}=Se(),{hideModal:n}=it();function r(s){e(s),n()}return a.jsxs("div",{className:_t.add,children:[a.jsx(Gl,{}),a.jsx("div",{className:_t.results,children:Object.keys(t).map(s=>a.jsxs("div",{className:_t.product,onClick:()=>r(s),children:[a.jsx("span",{className:_t.name,children:s}),a.jsx(j,{name:"arrow-right"})]},s))})]})},Jl=()=>{const{modalPosition:t,color:e,initialColor:n,setShowModal:r,hue:s,saturation:o,brightness:i,dragging:c,setDragging:u,setHue:d,setSaturation:f,setBrightness:h,colorChange:y,setColor:v,update:g}=jn(),p=C=>{const{offsetX:R,offsetY:$}=C.nativeEvent;u(!0),w(R,$,C.currentTarget)},b=C=>{if(c){const R=document.querySelector(`.${X.colorMap}`),{left:$,top:W}=R.getBoundingClientRect(),N=C.clientX-$,J=C.clientY-W;w(N,J,R)}},x=()=>{u(!1)},w=(C,R,$)=>{const{width:W,height:N}=$.getBoundingClientRect(),J=Math.max(0,Math.min(C/W*100,100)),me=Math.max(0,Math.min(100-R/N*100,100));f(J),h(me),O(J,me)},O=(C,R)=>{const $=q(s,C,R);y($),v($)},A=(C,R,$)=>{R/=100,$/=100;const W=Ce=>(Ce+C/60)%6,N=Ce=>$*(1-R*Math.max(0,Math.min(W(Ce),4-W(Ce),1))),J=Math.round(255*N(5)),me=Math.round(255*N(3)),ut=Math.round(255*N(1));return{r:J,g:me,b:ut}},B=(C,R,$)=>{const W=N=>N.toString(16).padStart(2,"0");return`#${W(C)}${W(R)}${W($)}`},q=(C,R,$)=>{const{r:W,g:N,b:J}=A(C,R,$);return B(W,N,J)};E.useEffect(()=>{const C=$=>b($),R=()=>x();return c?(document.addEventListener("mousemove",C),document.addEventListener("mouseup",R)):(document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",R)),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",R)}},[c]);function z(){g(e),r(!1)}function G(){r(!1),y(n)}return a.jsxs("div",{className:X.modal,onClick:C=>C.stopPropagation(),style:{top:`${t.top}px`,left:`${t.left}px`},children:[a.jsx("div",{children:"Color"}),a.jsx("div",{className:X.colorMap,onMouseDown:p,style:{background:`
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-3IJeySWj.cjs"),E=require("react"),Xn=["desktop","tablet","mobile"],Kn=[{icon:"paint",name:"Colors"},{icon:"font",name:"Fonts"},{icon:"corners-out",name:"Borders"},{icon:"arrow-square",name:"Buttons"},{icon:"textbox",name:"Inputs"}],Qn="https://g-api.billgang.com",Zn="https://www.googleapis.com/webfonts/v1/webfonts",er="_buttons_1gn8m_1",tr="_button_1gn8m_1",nr={buttons:er,button:tr},rr=()=>o.jsxRuntimeExports.jsxs("div",{className:nr.buttons,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"undo",hoverable:!0,width:20,height:20}),o.jsxRuntimeExports.jsx(o.Icon,{name:"redo",hoverable:!0,width:20,height:20})]}),sr="_devices_hxl12_1",or="_device_hxl12_1",ir="_active_hxl12_23",qe={devices:sr,device:or,active:ir},ar=()=>{const{currentDevice:t,setCurrentDevice:e}=o.useDeviceStore();return o.jsxRuntimeExports.jsx("div",{className:qe.devices,children:Xn.map(n=>o.jsxRuntimeExports.jsx("div",{className:o.clx(qe.device,{[qe.active]:t===n}),onClick:()=>e(n),children:o.jsxRuntimeExports.jsx(o.Icon,{name:n,fill:t===n?"#252525":"#757575",width:20,height:20})},n))})},cr="_header_ltoxx_1",ur="_left_ltoxx_16",lr="_right_ltoxx_17",Se={header:cr,left:ur,right:lr},dr="_preview_vijvm_2",fr="_active_vijvm_22",ze={preview:dr,active:fr},pr=()=>{const{onPreview:t,setOnPreview:e}=o.usePreviewStore();return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ze.preview,{[ze.active]:t}),onClick:()=>e(!t),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-up-right",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:ze.text,children:"Preview"})]})},hr="_settings_q79q3_1",gr={settings:hr},mr="_language_1mbvp_1",xr="_text_1mbvp_11",Rt={language:mr,text:xr},vr=()=>o.jsxRuntimeExports.jsxs("div",{className:Rt.language,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"globe",fill:"#252525",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:Rt.text,children:"Default"}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-down",width:20,height:20})]}),Er="_pages_x8pw2_1",jr="_text_x8pw2_16",br="_modal_x8pw2_22",yr="_page_x8pw2_1",Sr="_hoverable_x8pw2_45",_r="_separator_x8pw2_49",wr="_button_x8pw2_53",J={pages:Er,default:"_default_x8pw2_5",text:jr,modal:br,page:yr,hoverable:Sr,separator:_r,button:wr},Y=t=>t?t.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" and "):"";function nn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Rr}=Object.prototype,{getPrototypeOf:gt}=Object,Pe=(t=>e=>{const n=Rr.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),G=t=>(t=t.toLowerCase(),e=>Pe(e)===t),ke=t=>e=>typeof e===t,{isArray:de}=Array,ve=ke("undefined");function Or(t){return t!==null&&!ve(t)&&t.constructor!==null&&!ve(t.constructor)&&L(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rn=G("ArrayBuffer");function Tr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rn(t.buffer),e}const Dr=ke("string"),L=ke("function"),sn=ke("number"),Ae=t=>t!==null&&typeof t=="object",Cr=t=>t===!0||t===!1,Te=t=>{if(Pe(t)!=="object")return!1;const e=gt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Nr=G("Date"),Ir=G("File"),Pr=G("Blob"),kr=G("FileList"),Ar=t=>Ae(t)&&L(t.pipe),Br=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||L(t.append)&&((e=Pe(t))==="formdata"||e==="object"&&L(t.toString)&&t.toString()==="[object FormData]"))},Lr=G("URLSearchParams"),[Mr,$r,Fr,Ur]=["ReadableStream","Request","Response","Headers"].map(G),Hr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ee(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),de(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),a=i.length;let c;for(r=0;r<a;r++)c=i[r],e.call(null,t[c],c,t)}}function on(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const te=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,an=t=>!ve(t)&&t!==te;function rt(){const{caseless:t}=an(this)&&this||{},e={},n=(r,s)=>{const i=t&&on(e,s)||s;Te(e[i])&&Te(r)?e[i]=rt(e[i],r):Te(r)?e[i]=rt({},r):de(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Ee(arguments[r],n);return e}const qr=(t,e,n,{allOwnKeys:r}={})=>(Ee(e,(s,i)=>{n&&L(s)?t[i]=nn(s,n):t[i]=s},{allOwnKeys:r}),t),zr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vr=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Gr=(t,e,n,r)=>{let s,i,a;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)a=s[i],(!r||r(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&gt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Yr=t=>{if(!t)return null;if(de(t))return t;let e=t.length;if(!sn(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Jr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gt(Uint8Array)),Xr=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Kr=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Qr=G("HTMLFormElement"),Zr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ot=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),es=G("RegExp"),cn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ee(n,(s,i)=>{let a;(a=e(s,i,t))!==!1&&(r[i]=a||s)}),Object.defineProperties(t,r)},ts=t=>{cn(t,(e,n)=>{if(L(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(L(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ns=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return de(t)?r(t):r(String(t).split(e)),n},rs=()=>{},ss=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ve="abcdefghijklmnopqrstuvwxyz",Tt="0123456789",un={DIGIT:Tt,ALPHA:Ve,ALPHA_DIGIT:Ve+Ve.toUpperCase()+Tt},os=(t=16,e=un.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function is(t){return!!(t&&L(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const as=t=>{const e=new Array(10),n=(r,s)=>{if(Ae(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=de(r)?[]:{};return Ee(r,(a,c)=>{const u=n(a,s+1);!ve(u)&&(i[c]=u)}),e[s]=void 0,i}}return r};return n(t,0)},cs=G("AsyncFunction"),us=t=>t&&(Ae(t)||L(t))&&L(t.then)&&L(t.catch),ln=((t,e)=>t?setImmediate:e?((n,r)=>(te.addEventListener("message",({source:s,data:i})=>{s===te&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),te.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",L(te.postMessage)),ls=typeof queueMicrotask<"u"?queueMicrotask.bind(te):typeof process<"u"&&process.nextTick||ln,f={isArray:de,isArrayBuffer:rn,isBuffer:Or,isFormData:Br,isArrayBufferView:Tr,isString:Dr,isNumber:sn,isBoolean:Cr,isObject:Ae,isPlainObject:Te,isReadableStream:Mr,isRequest:$r,isResponse:Fr,isHeaders:Ur,isUndefined:ve,isDate:Nr,isFile:Ir,isBlob:Pr,isRegExp:es,isFunction:L,isStream:Ar,isURLSearchParams:Lr,isTypedArray:Jr,isFileList:kr,forEach:Ee,merge:rt,extend:qr,trim:Hr,stripBOM:zr,inherits:Vr,toFlatObject:Gr,kindOf:Pe,kindOfTest:G,endsWith:Wr,toArray:Yr,forEachEntry:Xr,matchAll:Kr,isHTMLForm:Qr,hasOwnProperty:Ot,hasOwnProp:Ot,reduceDescriptors:cn,freezeMethods:ts,toObjectSet:ns,toCamelCase:Zr,noop:rs,toFiniteNumber:ss,findKey:on,global:te,isContextDefined:an,ALPHABET:un,generateString:os,isSpecCompliantForm:is,toJSONObject:as,isAsyncFn:cs,isThenable:us,setImmediate:ln,asap:ls};function S(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const dn=S.prototype,fn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{fn[t]={value:t}});Object.defineProperties(S,fn);Object.defineProperty(dn,"isAxiosError",{value:!0});S.from=(t,e,n,r,s,i)=>{const a=Object.create(dn);return f.toFlatObject(t,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),S.call(a,t.message,e,n,r,s),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const ds=null;function st(t){return f.isPlainObject(t)||f.isArray(t)}function pn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function Dt(t,e,n){return t?t.concat(e).map(function(s,i){return s=pn(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function fs(t){return f.isArray(t)&&!t.some(st)}const ps=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Be(t,e,n){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,g){return!f.isUndefined(g[h])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(f.isDate(m))return m.toISOString();if(!u&&f.isBlob(m))throw new S("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(m)||f.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,g){let j=m;if(m&&!g&&typeof m=="object"){if(f.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(f.isArray(m)&&fs(m)||(f.isFileList(m)||f.endsWith(h,"[]"))&&(j=f.toArray(m)))return h=pn(h),j.forEach(function(y,D){!(f.isUndefined(y)||y===null)&&e.append(a===!0?Dt([h],D,i):a===null?h:h+"[]",l(y))}),!1}return st(m)?!0:(e.append(Dt(g,h,i),l(m)),!1)}const p=[],v=Object.assign(ps,{defaultVisitor:d,convertValue:l,isVisitable:st});function x(m,h){if(!f.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(m),f.forEach(m,function(j,b){(!(f.isUndefined(j)||j===null)&&s.call(e,j,f.isString(b)?b.trim():b,h,v))===!0&&x(j,h?h.concat(b):[b])}),p.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return x(t),e}function Ct(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function mt(t,e){this._pairs=[],t&&Be(t,this,e)}const hn=mt.prototype;hn.append=function(e,n){this._pairs.push([e,n])};hn.toString=function(e){const n=e?function(r){return e.call(this,r,Ct)}:Ct;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function hs(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gn(t,e,n){if(!e)return t;const r=n&&n.encode||hs,s=n&&n.serialize;let i;if(s?i=s(e,n):i=f.isURLSearchParams(e)?e.toString():new mt(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Nt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(r){r!==null&&e(r)})}}const mn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gs=typeof URLSearchParams<"u"?URLSearchParams:mt,ms=typeof FormData<"u"?FormData:null,xs=typeof Blob<"u"?Blob:null,vs={isBrowser:!0,classes:{URLSearchParams:gs,FormData:ms,Blob:xs},protocols:["http","https","file","blob","url","data"]},xt=typeof window<"u"&&typeof document<"u",ot=typeof navigator=="object"&&navigator||void 0,Es=xt&&(!ot||["ReactNative","NativeScript","NS"].indexOf(ot.product)<0),js=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bs=xt&&window.location.href||"http://localhost",ys=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xt,hasStandardBrowserEnv:Es,hasStandardBrowserWebWorkerEnv:js,navigator:ot,origin:bs},Symbol.toStringTag,{value:"Module"})),A={...ys,...vs};function Ss(t,e){return Be(t,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return A.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function _s(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ws(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function xn(t){function e(n,r,s,i){let a=n[i++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),u=i>=n.length;return a=!a&&f.isArray(s)?s.length:a,u?(f.hasOwnProp(s,a)?s[a]=[s[a],r]:s[a]=r,!c):((!s[a]||!f.isObject(s[a]))&&(s[a]=[]),e(n,r,s[a],i)&&f.isArray(s[a])&&(s[a]=ws(s[a])),!c)}if(f.isFormData(t)&&f.isFunction(t.entries)){const n={};return f.forEachEntry(t,(r,s)=>{e(_s(r),s,n,0)}),n}return null}function Rs(t,e,n){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const je={transitional:mn,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=f.isObject(e);if(i&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return s?JSON.stringify(xn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ss(e,this.formSerializer).toString();if((c=f.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Be(c?{"files[]":e}:e,u&&new u,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Rs(e)):e}],transformResponse:[function(e){const n=this.transitional||je.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(r&&!this.responseType||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(a)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{je.headers[t]={}});const Os=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ts=t=>{const e={};let n,r,s;return t&&t.split(`
3
+ `).forEach(function(a){s=a.indexOf(":"),n=a.substring(0,s).trim().toLowerCase(),r=a.substring(s+1).trim(),!(!n||e[n]&&Os[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},It=Symbol("internals");function he(t){return t&&String(t).trim().toLowerCase()}function De(t){return t===!1||t==null?t:f.isArray(t)?t.map(De):String(t)}function Ds(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Cs=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ge(t,e,n,r,s){if(f.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!f.isString(e)){if(f.isString(r))return e.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(e)}}function Ns(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Is(t,e){const n=f.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,i,a){return this[r].call(this,e,s,i,a)},configurable:!0})})}class B{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function i(c,u,l){const d=he(u);if(!d)throw new Error("header name must be a non-empty string");const p=f.findKey(s,d);(!p||s[p]===void 0||l===!0||l===void 0&&s[p]!==!1)&&(s[p||u]=De(c))}const a=(c,u)=>f.forEach(c,(l,d)=>i(l,d,u));if(f.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(f.isString(e)&&(e=e.trim())&&!Cs(e))a(Ts(e),n);else if(f.isHeaders(e))for(const[c,u]of e.entries())i(u,c,r);else e!=null&&i(n,e,r);return this}get(e,n){if(e=he(e),e){const r=f.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return Ds(s);if(f.isFunction(n))return n.call(this,s,r);if(f.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=he(e),e){const r=f.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ge(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(a){if(a=he(a),a){const c=f.findKey(r,a);c&&(!n||Ge(r,r[c],c,n))&&(delete r[c],s=!0)}}return f.isArray(e)?e.forEach(i):i(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!e||Ge(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};return f.forEach(this,(s,i)=>{const a=f.findKey(r,i);if(a){n[a]=De(s),delete n[i];return}const c=e?Ns(i):String(i).trim();c!==i&&delete n[i],n[c]=De(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return f.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&f.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
4
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[It]=this[It]={accessors:{}}).accessors,s=this.prototype;function i(a){const c=he(a);r[c]||(Is(s,a),r[c]=!0)}return f.isArray(e)?e.forEach(i):i(e),this}}B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(B.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});f.freezeMethods(B);function We(t,e){const n=this||je,r=e||n,s=B.from(r.headers);let i=r.data;return f.forEach(t,function(c){i=c.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function vn(t){return!!(t&&t.__CANCEL__)}function fe(t,e,n){S.call(this,t??"canceled",S.ERR_CANCELED,e,n),this.name="CanceledError"}f.inherits(fe,S,{__CANCEL__:!0});function En(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ps(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ks(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(u){const l=Date.now(),d=r[i];a||(a=l),n[s]=u,r[s]=l;let p=i,v=0;for(;p!==s;)v+=n[p++],p=p%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),l-a<e)return;const x=d&&l-d;return x?Math.round(v*1e3/x):void 0}}function As(t,e){let n=0,r=1e3/e,s,i;const a=(l,d=Date.now())=>{n=d,s=null,i&&(clearTimeout(i),i=null),t.apply(null,l)};return[(...l)=>{const d=Date.now(),p=d-n;p>=r?a(l,d):(s=l,i||(i=setTimeout(()=>{i=null,a(s)},r-p)))},()=>s&&a(s)]}const Ne=(t,e,n=3)=>{let r=0;const s=ks(50,250);return As(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,u=a-r,l=s(u),d=a<=c;r=a;const p={loaded:a,total:c,progress:c?a/c:void 0,bytes:u,rate:l||void 0,estimated:l&&c&&d?(c-a)/l:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(p)},n)},Pt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},kt=t=>(...e)=>f.asap(()=>t(...e)),Bs=A.hasStandardBrowserEnv?function(){const e=A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent),n=document.createElement("a");let r;function s(i){let a=i;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(a){const c=f.isString(a)?s(a):a;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Ls=A.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const a=[t+"="+encodeURIComponent(e)];f.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),f.isString(r)&&a.push("path="+r),f.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ms(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $s(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function jn(t,e){return t&&!Ms(e)?$s(t,e):e}const At=t=>t instanceof B?{...t}:t;function re(t,e){e=e||{};const n={};function r(l,d,p){return f.isPlainObject(l)&&f.isPlainObject(d)?f.merge.call({caseless:p},l,d):f.isPlainObject(d)?f.merge({},d):f.isArray(d)?d.slice():d}function s(l,d,p){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l,p)}else return r(l,d,p)}function i(l,d){if(!f.isUndefined(d))return r(void 0,d)}function a(l,d){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function c(l,d,p){if(p in e)return r(l,d);if(p in t)return r(void 0,l)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(l,d)=>s(At(l),At(d),!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(d){const p=u[d]||s,v=p(t[d],e[d],d);f.isUndefined(v)&&p!==c||(n[d]=v)}),n}const bn=t=>{const e=re({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=e;e.headers=a=B.from(a),e.url=gn(jn(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(f.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...d]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...d].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(e)),r||r!==!1&&Bs(e.url))){const l=s&&i&&Ls.read(i);l&&a.set(s,l)}return e},Fs=typeof XMLHttpRequest<"u",Us=Fs&&function(t){return new Promise(function(n,r){const s=bn(t);let i=s.data;const a=B.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:l}=s,d,p,v,x,m;function h(){x&&x(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(s.method.toUpperCase(),s.url,!0),g.timeout=s.timeout;function j(){if(!g)return;const y=B.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),R={data:!c||c==="text"||c==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:y,config:t,request:g};En(function(P){n(P),h()},function(P){r(P),h()},R),g=null}"onloadend"in g?g.onloadend=j:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(j)},g.onabort=function(){g&&(r(new S("Request aborted",S.ECONNABORTED,t,g)),g=null)},g.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||mn;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new S(D,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,t,g)),g=null},i===void 0&&a.setContentType(null),"setRequestHeader"in g&&f.forEach(a.toJSON(),function(D,R){g.setRequestHeader(R,D)}),f.isUndefined(s.withCredentials)||(g.withCredentials=!!s.withCredentials),c&&c!=="json"&&(g.responseType=s.responseType),l&&([v,m]=Ne(l,!0),g.addEventListener("progress",v)),u&&g.upload&&([p,x]=Ne(u),g.upload.addEventListener("progress",p),g.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(d=y=>{g&&(r(!y||y.type?new fe(null,t,g):y),g.abort(),g=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const b=Ps(s.url);if(b&&A.protocols.indexOf(b)===-1){r(new S("Unsupported protocol "+b+":",S.ERR_BAD_REQUEST,t));return}g.send(i||null)})},Hs=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,c();const d=l instanceof Error?l:this.reason;r.abort(d instanceof S?d:new fe(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new S(`timeout ${e} of ms exceeded`,S.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>f.asap(c),u}},qs=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},zs=async function*(t,e){for await(const n of Vs(t))yield*qs(n,e)},Vs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Bt=(t,e,n,r)=>{const s=zs(t,e);let i=0,a,c=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:d}=await s.next();if(l){c(),u.close();return}let p=d.byteLength;if(n){let v=i+=p;n(v)}u.enqueue(new Uint8Array(d))}catch(l){throw c(l),l}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},Le=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",yn=Le&&typeof ReadableStream=="function",Gs=Le&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Sn=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ws=yn&&Sn(()=>{let t=!1;const e=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Lt=64*1024,it=yn&&Sn(()=>f.isReadableStream(new Response("").body)),Ie={stream:it&&(t=>t.body)};Le&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ie[e]&&(Ie[e]=f.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new S(`Response type '${e}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const Ys=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(A.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await Gs(t)).byteLength},Js=async(t,e)=>{const n=f.toFiniteNumber(t.getContentLength());return n??Ys(e)},Xs=Le&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:l,headers:d,withCredentials:p="same-origin",fetchOptions:v}=bn(t);l=l?(l+"").toLowerCase():"text";let x=Hs([s,i&&i.toAbortSignal()],a),m;const h=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let g;try{if(u&&Ws&&n!=="get"&&n!=="head"&&(g=await Js(d,r))!==0){let R=new Request(e,{method:"POST",body:r,duplex:"half"}),I;if(f.isFormData(r)&&(I=R.headers.get("content-type"))&&d.setContentType(I),R.body){const[P,U]=Pt(g,Ne(kt(u)));r=Bt(R.body,Lt,P,U)}}f.isString(p)||(p=p?"include":"omit");const j="credentials"in Request.prototype;m=new Request(e,{...v,signal:x,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:j?p:void 0});let b=await fetch(m);const y=it&&(l==="stream"||l==="response");if(it&&(c||y&&h)){const R={};["status","statusText","headers"].forEach(w=>{R[w]=b[w]});const I=f.toFiniteNumber(b.headers.get("content-length")),[P,U]=c&&Pt(I,Ne(kt(c),!0))||[];b=new Response(Bt(b.body,Lt,P,()=>{U&&U(),h&&h()}),R)}l=l||"text";let D=await Ie[f.findKey(Ie,l)||"text"](b,t);return!y&&h&&h(),await new Promise((R,I)=>{En(R,I,{data:D,headers:B.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:m})})}catch(j){throw h&&h(),j&&j.name==="TypeError"&&/fetch/i.test(j.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,t,m),{cause:j.cause||j}):S.from(j,j&&j.code,t,m)}}),at={http:ds,xhr:Us,fetch:Xs};f.forEach(at,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Mt=t=>`- ${t}`,Ks=t=>f.isFunction(t)||t===null||t===!1,_n={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let i=0;i<e;i++){n=t[i];let a;if(r=n,!Ks(n)&&(r=at[(a=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${a}'`);if(r)break;s[a||"#"+i]=r}if(!r){const i=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since :
5
+ `+i.map(Mt).join(`
6
+ `):" "+Mt(i[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:at};function Ye(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new fe(null,t)}function $t(t){return Ye(t),t.headers=B.from(t.headers),t.data=We.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),_n.getAdapter(t.adapter||je.adapter)(t).then(function(r){return Ye(t),r.data=We.call(t,t.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return vn(r)||(Ye(t),r&&r.response&&(r.response.data=We.call(t,t.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const wn="1.7.7",vt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{vt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ft={};vt.transitional=function(e,n,r){function s(i,a){return"[Axios v"+wn+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,c)=>{if(e===!1)throw new S(s(a," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!Ft[a]&&(Ft[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,a,c):!0}};function Qs(t,e,n){if(typeof t!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],a=e[i];if(a){const c=t[i],u=c===void 0||a(c,i,t);if(u!==!0)throw new S("option "+i+" must be "+u,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const ct={assertOptions:Qs,validators:vt},ee=ct.validators;class ne{constructor(e){this.defaults=e,this.interceptors={request:new Nt,response:new Nt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
+ `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=re(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ct.assertOptions(r,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),s!=null&&(f.isFunction(s)?n.paramsSerializer={serialize:s}:ct.assertOptions(s,{encode:ee.function,serialize:ee.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&f.merge(i.common,i[n.method]);i&&f.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=B.concat(a,i);const c=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let d,p=0,v;if(!u){const m=[$t.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,l),v=m.length,d=Promise.resolve(n);p<v;)d=d.then(m[p++],m[p++]);return d}v=c.length;let x=n;for(p=0;p<v;){const m=c[p++],h=c[p++];try{x=m(x)}catch(g){h.call(this,g);break}}try{d=$t.call(this,x)}catch(m){return Promise.reject(m)}for(p=0,v=l.length;p<v;)d=d.then(l[p++],l[p++]);return d}getUri(e){e=re(this.defaults,e);const n=jn(e.baseURL,e.url);return gn(n,e.params,e.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(e){ne.prototype[e]=function(n,r){return this.request(re(r||{},{method:e,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(e){function n(r){return function(i,a,c){return this.request(re(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ne.prototype[e]=n(),ne.prototype[e+"Form"]=n(!0)});class Et{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(c=>{r.subscribe(c),i=c}).then(s);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,c){r.reason||(r.reason=new fe(i,a,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Et(function(s){e=s}),cancel:e}}}function Zs(t){return function(n){return t.apply(null,n)}}function eo(t){return f.isObject(t)&&t.isAxiosError===!0}const ut={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ut).forEach(([t,e])=>{ut[e]=t});function Rn(t){const e=new ne(t),n=nn(ne.prototype.request,e);return f.extend(n,ne.prototype,e,{allOwnKeys:!0}),f.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return Rn(re(t,s))},n}const T=Rn(je);T.Axios=ne;T.CanceledError=fe;T.CancelToken=Et;T.isCancel=vn;T.VERSION=wn;T.toFormData=Be;T.AxiosError=S;T.Cancel=T.CanceledError;T.all=function(e){return Promise.all(e)};T.spread=Zs;T.isAxiosError=eo;T.mergeConfig=re;T.AxiosHeaders=B;T.formToJSON=t=>xn(f.isHTMLForm(t)?new FormData(t):t);T.getAdapter=_n.getAdapter;T.HttpStatusCode=ut;T.default=T;const to="https://g-api.billgang.com",no=async(t="get",e,n)=>{const r=localStorage.getItem("shopId")||void 0,s=`${to}/v2/builder/shops/${r}/${e}`,i=localStorage.getItem("accessToken")||void 0;if(t.toUpperCase()==="GET")return(await T.get(s,{headers:{Authorization:`Bearer ${i}`}})).data;t.toUpperCase()==="POST"&&await T.post(s,{...n},{headers:{Authorization:`Bearer ${i}`}}),t.toUpperCase()==="PUT"&&await T.put(s,{...n},{headers:{Authorization:`Bearer ${i}`}})},ro=()=>{const{currentPage:t,setCurrentPage:e,setIsOpenModal:n,pages:r,setIsEdit:s,setEditedPage:i,deletePage:a,isOpenSelectModal:c,setIsOpenSelectModal:u}=o.usePagesStore(),{deletePage:l}=o.useLayersStore(),[d,p]=E.useState("");return E.useEffect(()=>{const v=()=>{u(!1)};return document.body.addEventListener("click",v),()=>{document.body.removeEventListener("click",v)}},[]),o.jsxRuntimeExports.jsxs("div",{className:J.pages,children:[o.jsxRuntimeExports.jsxs("div",{className:J.default,onClick:v=>{v.stopPropagation(),u(!c)},children:[o.jsxRuntimeExports.jsx(o.Icon,{name:r[t].icon,fill:"#252525",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:J.text,children:o.defaultPageNames.includes(r[t].name)?`${Y(r[t].name)} page`:r[t].name}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-down",width:20,height:20})]}),c&&o.jsxRuntimeExports.jsxs("div",{className:J.modal,onClick:v=>v.stopPropagation(),children:[Object.keys(r).map(v=>{const x=r[v];return o.jsxRuntimeExports.jsxs("div",{className:o.clx(J.page,{[J.hoverable]:d===v}),onMouseEnter:()=>p(v),onMouseLeave:()=>p(""),onClick:()=>{p(""),s(!1),e(v),u(!1)},children:[o.jsxRuntimeExports.jsx(o.Icon,{name:x.icon,fill:"#252525"}),o.jsxRuntimeExports.jsx("span",{className:J.text,children:o.defaultPageNames.includes(x.name)?`${Y(x.name)} page`:x.name}),d===v&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"settings",fill:"#757575",onClick:m=>{m.stopPropagation(),s(!0),i(v),n(!0)}}),!o.defaultPageNames.includes(x.name)&&o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",fill:"#C12A2A",onClick:m=>{r[t].name===x.name&&e("home"),m.stopPropagation(),a(v),l(x.name)}})]}),r[t].name===x.name&&o.jsxRuntimeExports.jsx(o.Icon,{name:"check",fill:"#FF3F19"})]},v)}),o.jsxRuntimeExports.jsx("div",{className:J.separator}),o.jsxRuntimeExports.jsxs(o.Button,{className:J.button,onClick:v=>{v.stopPropagation(),n(!0)},size:"l",children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"plus",fill:"#ff3f19"}),o.jsxRuntimeExports.jsx("span",{children:"Create Page Blank"})]})]})]})},so="_zoom_a77cn_1",oo={zoom:so},io=()=>{const[t,e]=E.useState(),n=()=>{e(Number(Math.round(window.devicePixelRatio*50).toFixed(0)))};return E.useEffect(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),o.jsxRuntimeExports.jsxs("div",{className:oo.zoom,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"zoom-minus",width:20,height:20}),o.jsxRuntimeExports.jsxs("span",{children:[t," %"]})]})},ao=()=>o.jsxRuntimeExports.jsxs("div",{className:gr.settings,children:[o.jsxRuntimeExports.jsx(vr,{}),o.jsxRuntimeExports.jsx(ro,{}),o.jsxRuntimeExports.jsx(io,{})]}),co="_theme_3wxbf_1",uo={theme:co},lo=()=>o.jsxRuntimeExports.jsxs("div",{className:uo.theme,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"check",width:18,height:18}),o.jsxRuntimeExports.jsx("div",{children:"Current Theme"})]}),fo=()=>{const{themeSettings:t}=o.useThemeSettingsStore(),{settings:e}=o.useSettingsStore(),[n,r]=E.useState(null),[s,i]=E.useState(!1),{pages:a}=o.usePagesStore(),{blocks:c}=o.useLayersStore();function u(x,m){return m.map(g=>Object.values(g.value).filter(j=>j.type===x).map(j=>j.value).flat()).flat()}function l(x,m){return u(x,m).some(g=>g)}function d(x,m){const h=u(x,m);return Array.isArray(h)&&h.length>0?Math.max(...h):0}function p(x){const m=Object.keys(a).find(h=>a[h].name===x);return m?a[m]:null}const v=()=>{if(s)n&&clearTimeout(n);else{const m=Object.keys(c).map(h=>{const g=p(h);return{name:g?g.name:h,path:h==="home"?"/":(g==null?void 0:g.path)||h,layout:{...c[h]},neededProductIds:[...u("ProductId",Object.values(c[h]))],neededCategoryIds:[...u("CategoryId",Object.values(c[h]))],neededAnnouncementIds:[...u("AnnouncementId",Object.values(c[h]))],neededListingIds:[...u("ListingId",Object.values(c[h]))],neededFaqs:l("Faqs",Object.values(c[h])),neededReviewCount:d("ReviewCount",Object.values(c[h])),seo:{pageTitle:g?g.seo.title:"",pageDescription:g?g.seo.description:""}}});no("POST","save",{themeSettings:t,settings:e,updatedPages:m})}i(!0);const x=setTimeout(()=>{i(!1)},2e3);r(x)};return o.jsxRuntimeExports.jsxs("div",{className:Se.header,children:[o.jsxRuntimeExports.jsxs("div",{className:Se.left,children:[o.jsxRuntimeExports.jsx(ar,{}),o.jsxRuntimeExports.jsx(pr,{})]}),o.jsxRuntimeExports.jsx("div",{className:Se.center,children:o.jsxRuntimeExports.jsx(ao,{})}),o.jsxRuntimeExports.jsxs("div",{className:Se.right,children:[o.jsxRuntimeExports.jsx(lo,{}),o.jsxRuntimeExports.jsx(rr,{}),o.jsxRuntimeExports.jsx(o.Button,{onClick:v,children:"Save"})]})]})},po="_exit_2ce42_1",ho="_text_2ce42_10",Ut={exit:po,text:ho},go=()=>o.jsxRuntimeExports.jsxs("div",{className:Ut.exit,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"sign-out",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:Ut.text,children:"Exit"})]}),mo="_navbar_2ac63_1",xo="_main_2ac63_6",vo="_block_2ac63_13",Eo="_active_2ac63_30",_e={navbar:mo,main:xo,block:vo,active:Eo},jo=()=>{const{activeBlock:t,setActiveBlock:e}=o.useNavbarStore(),{setActiveBlock:n}=o.useBlocksStore(),{setCurrentBlock:r}=o.useLayersStore(),{setActiveBlock:s}=o.useThemeSettingsStore();function i(a){n(null),e(a),r(null),s(null)}return o.jsxRuntimeExports.jsxs("div",{className:_e.navbar,children:[o.jsxRuntimeExports.jsx(go,{}),o.jsxRuntimeExports.jsx("div",{className:_e.main,children:o.navbarBlocks.map(a=>o.jsxRuntimeExports.jsxs("div",{className:o.clx(_e.block,{[_e.active]:t.icon===a.icon}),onClick:()=>i(a),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:a.icon,fill:t.icon===a.icon?"#252525":"#757575"}),o.jsxRuntimeExports.jsx("span",{children:a.name})]},a.icon))})]})},bo="_preview_1jv6k_1",yo="_main_1jv6k_8",So="_content_1jv6k_18",_o="_loading_1jv6k_25",wo="_loader_1jv6k_33",Ro="_spin_1jv6k_1",ge={preview:bo,main:yo,content:So,loading:_o,loader:wo,spin:Ro},Oo="_header_1t64j_1",To="_circles_1t64j_14",Do="_circle_1t64j_14",Co="_red_1t64j_30",No="_green_1t64j_34",Io="_yellow_1t64j_38",Po="_input_1t64j_42",ko="_main_1t64j_51",Ao="_text_1t64j_59",X={header:Oo,circles:To,circle:Do,red:Co,green:No,yellow:Io,input:Po,main:ko,text:Ao},Bo="data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20x='0.5'%20width='16'%20height='16'%20fill='url(%23pattern0_4042_718)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_4042_718'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_4042_718'%20transform='scale(0.015625)'/%3e%3c/pattern%3e%3cimage%20id='image0_4042_718'%20width='64'%20height='64'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAONJREFUeF7t20EOhEAIRFG4/6F7DvEnYeFzryQIv6pBd2behOu9dPvsbog+k+NLgArQAqmJcw9iAAhSgZKB3IJkkAySQTJ4CiE+gA8oBeg0mH3Ai084P89HhqwEqIA209ICsQdjAeaZIgaAYKxBDMCAYy8fXwAIgiAIcoJpJEYGI4VjB3YrbC9gL2AvkCB43cM5PgZgAAZgQFnNZAhdGykQBEEQBEEQDBmgAm2glM/z+QUYisYUGoldO7kY32IEAzCg6RgIRgjFAsw+AgRBMNYgBmCAT2TCYfoPPz/HCqQCX1eBHzHnv7C7WhBSAAAAAElFTkSuQmCC'/%3e%3c/defs%3e%3c/svg%3e",Lo=["red","yellow","green"],Mo=()=>o.jsxRuntimeExports.jsxs("div",{className:X.header,children:[o.jsxRuntimeExports.jsx("div",{className:X.circles,children:Lo.map(t=>o.jsxRuntimeExports.jsx("div",{className:o.clx(X.circle,{[X.red]:t==="red",[X.yellow]:t==="yellow",[X.green]:t==="green"})},t))}),o.jsxRuntimeExports.jsxs("div",{className:X.input,children:[o.jsxRuntimeExports.jsxs("div",{className:X.main,children:[o.jsxRuntimeExports.jsx("img",{src:Bo,alt:""}),o.jsxRuntimeExports.jsx("span",{className:X.text,children:"lorem.ipsum"}),o.jsxRuntimeExports.jsx(o.Icon,{name:"lock",fill:"#757575",width:15,height:16})]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"copy",width:20,height:20})]})]}),$o="_content_92dk8_1",Fo="_block_92dk8_6",Uo="_active_92dk8_13",Ho="_name_92dk8_17",qo="_empty_92dk8_31",zo="_icon_92dk8_42",Vo="_title_92dk8_53",Go="_text_92dk8_59",Wo="_sections_92dk8_65",Yo="_section_92dk8_65",z={content:$o,block:Fo,active:Uo,name:Ho,empty:qo,icon:zo,title:Vo,text:Go,sections:Wo,section:Yo},Jo="_sidebar_1f3hk_1",Xo="_content_1f3hk_12",Ko="_button_1f3hk_22",Qo="_moveButton_1f3hk_30",Zo="_border_1f3hk_34",ei="_deleteButton_1f3hk_38",M={sidebar:Jo,content:Xo,button:Ko,moveButton:Qo,border:Zo,deleteButton:ei},ti=()=>{const{activeBlock:t}=o.usePreviewStore(),{blocks:e,removeBlock:n,moveBlock:r,duplicateBlock:s}=o.useLayersStore(),{currentPage:i,pages:a}=o.usePagesStore(),c=Object.keys(e[a[i].name]),u=c.indexOf(t),l=()=>{u>0&&r(a[i].name,u,u-1)},d=()=>{u<c.length-1&&r(a[i].name,u,u+1)},p=()=>{s(a[i].name,t)};return o.jsxRuntimeExports.jsx("div",{className:M.sidebar,children:o.jsxRuntimeExports.jsxs("div",{className:M.content,children:[o.jsxRuntimeExports.jsx("button",{onClick:l,className:o.clx(M.button,M.moveButton),disabled:u===0,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-preview-up"})}),o.jsxRuntimeExports.jsx("button",{onClick:d,className:o.clx(M.button,M.moveButton),disabled:u===c.length-1,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-preview-down"})}),o.jsxRuntimeExports.jsx("div",{className:M.border}),o.jsxRuntimeExports.jsx("button",{onClick:p,className:o.clx(M.button,M.moveButton),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"copy"})}),o.jsxRuntimeExports.jsx("div",{className:M.border}),o.jsxRuntimeExports.jsx("button",{onClick:()=>n(a[i].name,t),className:o.clx(M.button,M.deleteButton),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",hoverable:!0})})]})})},On=({render:t,block:e})=>t(e),ni=()=>{const{blocks:t,setActiveBlock:e}=o.useBlocksStore(),{hideModal:n}=o.useSubmodalStore();function r(s){e(s),n()}return o.jsxRuntimeExports.jsxs("div",{className:z.empty,children:[o.jsxRuntimeExports.jsx("div",{className:z.icon,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"file",width:32,height:32,fill:"#757575"})}),o.jsxRuntimeExports.jsx("div",{className:z.title,children:"Empty Page"}),o.jsxRuntimeExports.jsx("div",{className:z.text,children:"Here are the recommended sections for you"}),o.jsxRuntimeExports.jsxs("div",{className:z.sections,children:[Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:z.section,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsxs("span",{children:[s," Sections"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"plus"})]})),Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:z.section,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsxs("span",{children:[s," Sections"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"plus"})]}))]})]})},ri=E.memo(()=>{const{setActiveBlock:t,activeBlock:e}=o.usePreviewStore(),{blocks:n}=o.useBlocksStore(),{blocks:r}=o.useLayersStore(),{settings:s}=o.useSettingsStore(),{currentPage:i,pages:a,setIsOpenSelectModal:c}=o.usePagesStore(),u=p=>{const v=n[p.name],x=p.value;for(const m in x)v[m]=x[m];return v.renderBlock(s)},l=E.useRef(e);E.useEffect(()=>{l.current=e},[e]),E.useEffect(()=>{const p=()=>{l.current&&t(null)};return document.body.addEventListener("click",p),()=>{document.body.removeEventListener("click",p)}},[]);const d=E.useCallback(p=>u(p),[r]);return o.jsxRuntimeExports.jsxs("div",{onClick:p=>{p.stopPropagation(),c(!1)},className:z.content,children:[r[a[i].name]&&Object.keys(r[a[i].name]).map(p=>o.jsxRuntimeExports.jsxs("div",{onClick:()=>t(p),className:o.clx(z.block,{[z.active]:e===p}),children:[e===p&&o.jsxRuntimeExports.jsx("div",{className:z.name,children:r[a[i].name][p].name}),e===p&&o.jsxRuntimeExports.jsx(ti,{}),o.jsxRuntimeExports.jsx(On,{render:d,block:r[a[i].name][p]})]})),(!r[a[i].name]||Object.keys(r[a[i].name]).length===0)&&o.jsxRuntimeExports.jsx(ni,{})]})}),si="_results_f488n_1",oi="_name_f488n_8",ii="_product_f488n_15",we={results:si,name:oi,product:ii},ai="_search_1s0qp_1",ci="_input_1s0qp_12",Ht={search:ai,input:ci},ui=()=>o.jsxRuntimeExports.jsxs("label",{className:Ht.search,children:[o.jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search for sections",className:Ht.input}),o.jsxRuntimeExports.jsx(o.Icon,{name:"search",fill:"#757575"})]}),Tn=()=>{const{blocks:t,setActiveBlock:e}=o.useBlocksStore(),{hideModal:n}=o.useSubmodalStore();function r(s){e(s),n()}return o.jsxRuntimeExports.jsxs("div",{className:we.add,children:[o.jsxRuntimeExports.jsx(ui,{}),o.jsxRuntimeExports.jsx("div",{className:we.results,children:Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:we.product,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsx("span",{className:we.name,children:s}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-right"})]},s))})]})},li=()=>{const{modalPosition:t,color:e,initialColor:n,setShowModal:r,hue:s,saturation:i,brightness:a,dragging:c,setDragging:u,setHue:l,setSaturation:d,setBrightness:p,colorChange:v,setColor:x,update:m}=o.useColorPickerStore(),h=w=>{const{offsetX:C,offsetY:N}=w.nativeEvent;u(!0),b(C,N,w.currentTarget)},g=w=>{if(c){const C=document.querySelector(`.${o.styles.colorMap}`),{left:N,top:k}=C.getBoundingClientRect(),O=w.clientX-N,Z=w.clientY-k;b(O,Z,C)}},j=()=>{u(!1)},b=(w,C,N)=>{const{width:k,height:O}=N.getBoundingClientRect(),Z=Math.max(0,Math.min(w/k*100,100)),be=Math.max(0,Math.min(100-C/O*100,100));d(Z),p(be),y(Z,be)},y=(w,C)=>{const N=I(s,w,C);v(N),x(N)},D=(w,C,N)=>{C/=100,N/=100;const k=ye=>(ye+w/60)%6,O=ye=>N*(1-C*Math.max(0,Math.min(k(ye),4-k(ye),1))),Z=Math.round(255*O(5)),be=Math.round(255*O(3)),Jn=Math.round(255*O(1));return{r:Z,g:be,b:Jn}},R=(w,C,N)=>{const k=O=>O.toString(16).padStart(2,"0");return`#${k(w)}${k(C)}${k(N)}`},I=(w,C,N)=>{const{r:k,g:O,b:Z}=D(w,C,N);return R(k,O,Z)};E.useEffect(()=>{const w=N=>g(N),C=()=>j();return c?(document.addEventListener("mousemove",w),document.addEventListener("mouseup",C)):(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C)),()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C)}},[c]);function P(){m(e),r(!1)}function U(){r(!1),v(n)}return o.jsxRuntimeExports.jsxs("div",{className:o.styles.modal,onClick:w=>w.stopPropagation(),style:{top:`${t.top}px`,left:`${t.left}px`},children:[o.jsxRuntimeExports.jsx("div",{children:"Color"}),o.jsxRuntimeExports.jsx("div",{className:o.styles.colorMap,onMouseDown:h,style:{background:`
41
8
  linear-gradient(to top, black, transparent),
42
9
  linear-gradient(to right, hsl(${s}, 100%, 100%), hsl(${s}, 100%, 50%))
43
- `},children:a.jsx("div",{className:X.indicator,style:{position:"absolute",left:`${o}%`,top:`${100-i}%`,transform:"translate(-50%, -50%)"}})}),a.jsx("div",{className:X.hueSlider,children:a.jsx("input",{type:"range",min:"0",max:"360",value:s,onChange:C=>{d(Number(C.target.value)),O(o,i)},className:X.slider})}),a.jsxs("div",{className:X.buttons,children:[a.jsx(Ne,{onClick:G,className:L(X.applyButton,X.cancelButton),children:"Cancel"}),a.jsx(Ne,{onClick:z,className:X.applyButton,children:"Apply"})]})]})},Xl=()=>{const{onPreview:t}=ot(),{hoverBlockId:e,isModalVisible:n,isPreviewVisible:r}=it(),{settings:s}=at(),{blocks:o}=Se(),{blocks:i}=he(),{currentPage:c,pages:u}=pe(),{showModal:d}=jn(),[f,h]=E.useState(!0);E.useEffect(()=>{t&&setTimeout(()=>{h(!1)},100)},[t]);const y=v=>{if(!v)return;const g=o[v.name],p=v.value;for(const b in p)g[b]=p[b];return g.renderBlock(s)};return a.jsxs("div",{className:Qe.preview,children:[n&&a.jsx(hr,{children:a.jsx(_s,{})}),r&&e&&a.jsx(hr,{children:a.jsx(ys,{render:y,block:i[u[c].name][e]})}),d&&a.jsx(Jl,{}),t&&a.jsxs("div",{className:Qe.main,children:[a.jsx(Sl,{}),a.jsx("div",{className:Qe.content,children:f?a.jsx("div",{className:Qe.loading,children:a.jsx("div",{className:Qe.loader})}):a.jsx(Ul,{})})]})]})},Kl="_sidebar_xqbqi_1",Ql="_title_xqbqi_11",Zl="_active_xqbqi_19",Pr={sidebar:Kl,title:Ql,active:Zl},ws=E.createContext({dragDropManager:void 0});function se(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ir=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),sn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Rr={INIT:"@@redux/INIT"+sn(),REPLACE:"@@redux/REPLACE"+sn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sn()}};function eu(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function tu(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(su(t))return"date";if(ru(t))return"error";var n=nu(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function nu(t){return typeof t.constructor=="function"?t.constructor.name:null}function ru(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function su(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function Be(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=tu(t)),e}function xs(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?se(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?se(1):"Expected the enhancer to be a function. Instead, received: '"+Be(n)+"'");return n(xs)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?se(2):"Expected the root reducer to be a function. Instead, received: '"+Be(t)+"'");var s=t,o=e,i=[],c=i,u=!1;function d(){c===i&&(c=i.slice())}function f(){if(u)throw new Error(process.env.NODE_ENV==="production"?se(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function h(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?se(4):"Expected the listener to be a function. Instead, received: '"+Be(p)+"'");if(u)throw new Error(process.env.NODE_ENV==="production"?se(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var b=!0;return d(),c.push(p),function(){if(b){if(u)throw new Error(process.env.NODE_ENV==="production"?se(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");b=!1,d();var w=c.indexOf(p);c.splice(w,1),i=null}}}function y(p){if(!eu(p))throw new Error(process.env.NODE_ENV==="production"?se(7):"Actions must be plain objects. Instead, the actual type was: '"+Be(p)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof p.type>"u")throw new Error(process.env.NODE_ENV==="production"?se(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error(process.env.NODE_ENV==="production"?se(9):"Reducers may not dispatch actions.");try{u=!0,o=s(o,p)}finally{u=!1}for(var b=i=c,x=0;x<b.length;x++){var w=b[x];w()}return p}function v(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?se(10):"Expected the nextReducer to be a function. Instead, received: '"+Be(p));s=p,y({type:Rr.REPLACE})}function g(){var p,b=h;return p={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(process.env.NODE_ENV==="production"?se(11):"Expected the observer to be an object. Instead, received: '"+Be(w)+"'");function O(){w.next&&w.next(f())}O();var A=b(O);return{unsubscribe:A}}},p[Ir]=function(){return this},p}return y({type:Rr.INIT}),r={dispatch:y,subscribe:h,getState:f,replaceReducer:v},r[Ir]=g,r}function k(t,e,...n){if(ou()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;r=new Error(e.replace(/%s/g,function(){return n[s++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function ou(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function iu(t,e,n){return e.split(".").reduce((r,s)=>r&&r[s]?r[s]:n||null,t)}function au(t,e){return t.filter(n=>n!==e)}function Ss(t){return typeof t=="object"}function cu(t,e){const n=new Map,r=o=>{n.set(o,n.has(o)?n.get(o)+1:1)};t.forEach(r),e.forEach(r);const s=[];return n.forEach((o,i)=>{o===1&&s.push(i)}),s}function lu(t,e){return t.filter(n=>e.indexOf(n)>-1)}const Rn="dnd-core/INIT_COORDS",At="dnd-core/BEGIN_DRAG",An="dnd-core/PUBLISH_DRAG_SOURCE",Bt="dnd-core/HOVER",$t="dnd-core/DROP",Mt="dnd-core/END_DRAG";function Ar(t,e){return{type:Rn,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const uu={type:Rn,payload:{clientOffset:null,sourceClientOffset:null}};function du(t){return function(n=[],r={publishSource:!0}){const{publishSource:s=!0,clientOffset:o,getSourceClientOffset:i}=r,c=t.getMonitor(),u=t.getRegistry();t.dispatch(Ar(o)),fu(n,c,u);const d=gu(n,c);if(d==null){t.dispatch(uu);return}let f=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");hu(i),f=i(d)}t.dispatch(Ar(o,f));const y=u.getSource(d).beginDrag(c,d);if(y==null)return;pu(y),u.pinSource(d);const v=u.getSourceType(d);return{type:At,payload:{itemType:v,item:y,sourceId:d,clientOffset:o||null,sourceClientOffset:f||null,isSourcePublic:!!s}}}}function fu(t,e,n){k(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){k(n.getSource(r),"Expected sourceIds to be registered.")})}function hu(t){k(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function pu(t){k(Ss(t),"Item must be an object.")}function gu(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function mu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){mu(t,s,n[s])})}return t}function bu(t){return function(n={}){const r=t.getMonitor(),s=t.getRegistry();yu(r),xu(r).forEach((i,c)=>{const u=_u(i,c,s,r),d={type:$t,payload:{dropResult:vu({},n,u)}};t.dispatch(d)})}}function yu(t){k(t.isDragging(),"Cannot call drop while not dragging."),k(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function _u(t,e,n,r){const s=n.getTarget(t);let o=s?s.drop(r,t):void 0;return wu(o),typeof o>"u"&&(o=e===0?{}:r.getDropResult()),o}function wu(t){k(typeof t>"u"||Ss(t),"Drop result must either be an object or undefined.")}function xu(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Su(t){return function(){const n=t.getMonitor(),r=t.getRegistry();Eu(n);const s=n.getSourceId();return s!=null&&(r.getSource(s,!0).endDrag(n,s),r.unpinSource()),{type:Mt}}}function Eu(t){k(t.isDragging(),"Cannot call endDrag while not dragging.")}function Sn(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function Ou(t){return function(n,{clientOffset:r}={}){Cu(n);const s=n.slice(0),o=t.getMonitor(),i=t.getRegistry(),c=o.getItemType();return ju(s,i,c),Tu(s,o,i),Du(s,o,i),{type:Bt,payload:{targetIds:s,clientOffset:r||null}}}}function Cu(t){k(Array.isArray(t),"Expected targetIds to be an array.")}function Tu(t,e,n){k(e.isDragging(),"Cannot call hover while not dragging."),k(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const s=t[r];k(t.lastIndexOf(s)===r,"Expected targetIds to be unique in the passed array.");const o=n.getTarget(s);k(o,"Expected targetIds to be registered.")}}function ju(t,e,n){for(let r=t.length-1;r>=0;r--){const s=t[r],o=e.getTargetType(s);Sn(o,n)||t.splice(r,1)}}function Du(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function ku(t){return function(){if(t.getMonitor().isDragging())return{type:An}}}function Nu(t){return{beginDrag:du(t),publishDragSource:ku(t),hover:Ou(t),drop:bu(t),endDrag:Su(t)}}class Pu{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(o){return(...i)=>{const c=o.apply(e,i);typeof c<"u"&&n(c)}}const s=Nu(this);return Object.keys(s).reduce((o,i)=>{const c=s[i];return o[i]=r(c),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Iu(t,e){return{x:t.x+e.x,y:t.y+e.y}}function Es(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ru(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:Es(Iu(e,r),n)}function Au(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:Es(e,n)}const nt=[],Bn=[];nt.__IS_NONE__=!0;Bn.__IS_ALL__=!0;function Bu(t,e){return t===nt?!1:t===Bn||typeof e>"u"?!0:lu(e,t).length>0}class $u{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;k(typeof e=="function","listener must be a function."),k(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const o=()=>{const i=this.store.getState(),c=i.stateId;try{c===s||c===s+1&&!Bu(i.dirtyHandlerIds,r)||e()}finally{s=c}};return this.store.subscribe(o)}subscribeToOffsetChange(e){k(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const s=this.store.getState().dragOffset;s!==n&&(n=s,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return k(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(k(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),s=this.getItemType();return Sn(r,s)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(k(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),s=this.getItemType();return r!==s?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),o=this.getItemType();if(o&&!Sn(s,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const c=i.indexOf(e);return r?c===i.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ru(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Au(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const Br=typeof global<"u"?global:self,Os=Br.MutationObserver||Br.WebKitMutationObserver;function Cs(t){return function(){const n=setTimeout(s,0),r=setInterval(s,50);function s(){clearTimeout(n),clearInterval(r),t()}}}function Mu(t){let e=1;const n=new Os(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Lu=typeof Os=="function"?Mu:Cs;class Fu{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,s=e.length-this.index;r<s;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Lu(this.flush),this.requestErrorThrow=Cs(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class qu{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Uu{create(e){const n=this.freeTasks,r=n.length?n.pop():new qu(this.onError,s=>n[n.length]=s);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Ts=new Fu,Hu=new Uu(Ts.registerPendingError);function zu(t){Ts.enqueueTask(Hu.create(t))}const $n="dnd-core/ADD_SOURCE",Mn="dnd-core/ADD_TARGET",Ln="dnd-core/REMOVE_SOURCE",Lt="dnd-core/REMOVE_TARGET";function Vu(t){return{type:$n,payload:{sourceId:t}}}function Wu(t){return{type:Mn,payload:{targetId:t}}}function Yu(t){return{type:Ln,payload:{sourceId:t}}}function Gu(t){return{type:Lt,payload:{targetId:t}}}function Ju(t){k(typeof t.canDrag=="function","Expected canDrag to be a function."),k(typeof t.beginDrag=="function","Expected beginDrag to be a function."),k(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Xu(t){k(typeof t.canDrop=="function","Expected canDrop to be a function."),k(typeof t.hover=="function","Expected hover to be a function."),k(typeof t.drop=="function","Expected beginDrag to be a function.")}function En(t,e){if(e&&Array.isArray(t)){t.forEach(n=>En(n,!1));return}k(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ie;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ie||(ie={}));let Ku=0;function Qu(){return Ku++}function Zu(t){const e=Qu().toString();switch(t){case ie.SOURCE:return`S${e}`;case ie.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function $r(t){switch(t[0]){case"S":return ie.SOURCE;case"T":return ie.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Mr(t,e){const n=t.entries();let r=!1;do{const{done:s,value:[,o]}=n.next();if(o===e)return!0;r=!!s}while(!r);return!1}class ed{addSource(e,n){En(e),Ju(n);const r=this.addHandler(ie.SOURCE,e,n);return this.store.dispatch(Vu(r)),r}addTarget(e,n){En(e,!0),Xu(n);const r=this.addHandler(ie.TARGET,e,n);return this.store.dispatch(Wu(r)),r}containsHandler(e){return Mr(this.dragSources,e)||Mr(this.dropTargets,e)}getSource(e,n=!1){return k(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return k(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return k(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return k(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return $r(e)===ie.SOURCE}isTargetId(e){return $r(e)===ie.TARGET}removeSource(e){k(this.getSource(e),"Expected an existing source."),this.store.dispatch(Yu(e)),zu(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){k(this.getTarget(e),"Expected an existing target."),this.store.dispatch(Gu(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);k(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){k(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const s=Zu(e);return this.types.set(s,n),e===ie.SOURCE?this.dragSources.set(s,r):e===ie.TARGET&&this.dropTargets.set(s,r),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const td=(t,e)=>t===e;function nd(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function rd(t,e,n=td){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function sd(t=nt,e){switch(e.type){case Bt:break;case $n:case Mn:case Lt:case Ln:return nt;case At:case An:case Mt:case $t:default:return Bn}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,s=cu(n,r);if(!(s.length>0||!rd(n,r)))return nt;const i=r[r.length-1],c=n[n.length-1];return i!==c&&(i&&s.push(i),c&&s.push(c)),s}function od(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function id(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){od(t,s,n[s])})}return t}const Lr={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ad(t=Lr,e){const{payload:n}=e;switch(e.type){case Rn:case At:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Bt:return nd(t.clientOffset,n.clientOffset)?t:id({},t,{clientOffset:n.clientOffset});case Mt:case $t:return Lr;default:return t}}function cd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $e(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){cd(t,s,n[s])})}return t}const ld={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function ud(t=ld,e){const{payload:n}=e;switch(e.type){case At:return $e({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case An:return $e({},t,{isSourcePublic:!0});case Bt:return $e({},t,{targetIds:n.targetIds});case Lt:return t.targetIds.indexOf(n.targetId)===-1?t:$e({},t,{targetIds:au(t.targetIds,n.targetId)});case $t:return $e({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Mt:return $e({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function dd(t=0,e){switch(e.type){case $n:case Mn:return t+1;case Ln:case Lt:return t-1;default:return t}}function fd(t=0){return t+1}function hd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){hd(t,s,n[s])})}return t}function gd(t={},e){return{dirtyHandlerIds:sd(t.dirtyHandlerIds,{type:e.type,payload:pd({},e.payload,{prevTargetIds:iu(t,"dragOperation.targetIds",[])})}),dragOffset:ad(t.dragOffset,e),refCount:dd(t.refCount,e),dragOperation:ud(t.dragOperation,e),stateId:fd(t.stateId)}}function md(t,e=void 0,n={},r=!1){const s=vd(r),o=new $u(s,new ed(s)),i=new Pu(s,o),c=t(i,e,n);return i.receiveBackend(c),i}function vd(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return xs(gd,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function bd(t,e){if(t==null)return{};var n=yd(t,e),r,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(s=0;s<o.length;s++)r=o[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function yd(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}let Fr=0;const Ot=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var _d=E.memo(function(e){var{children:n}=e,r=bd(e,["children"]);const[s,o]=wd(r);return E.useEffect(()=>{if(o){const i=js();return++Fr,()=>{--Fr===0&&(i[Ot]=null)}}},[]),a.jsx(ws.Provider,{value:s,children:n})});function wd(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=xd(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function xd(t,e=js(),n,r){const s=e;return s[Ot]||(s[Ot]={dragDropManager:md(t,e,n,r)}),s[Ot]}function js(){return typeof global<"u"?global:window}var Sd=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!t(e[i],n[i]))return!1}return!0}return e!==e&&n!==n};const Ed=Vr(Sd),Ie=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Od(t,e,n){const[r,s]=E.useState(()=>e(t)),o=E.useCallback(()=>{const i=e(t);Ed(r,i)||(s(i),n&&n())},[r,t,n]);return Ie(o),[r,o]}function Cd(t,e,n){const[r,s]=Od(t,e,n);return Ie(function(){const i=t.getHandlerId();if(i!=null)return t.subscribeToStateChange(s,{handlerIds:[i]})},[t,s]),r}function Ds(t,e,n){return Cd(e,t||(()=>({})),()=>n.reconnect())}function ks(t,e){const n=[];return typeof t!="function"&&n.push(t),E.useMemo(()=>typeof t=="function"?t():t,n)}function Td(t){return E.useMemo(()=>t.hooks.dragSource(),[t])}function jd(t){return E.useMemo(()=>t.hooks.dragPreview(),[t])}let on=!1,an=!1;class Dd{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){k(!on,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return on=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{on=!1}}isDragging(){if(!this.sourceId)return!1;k(!an,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return an=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{an=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let cn=!1;class kd{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;k(!cn,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return cn=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{cn=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Nd(t,e,n){const r=n.getRegistry(),s=r.addTarget(t,e);return[s,()=>r.removeTarget(s)]}function Pd(t,e,n){const r=n.getRegistry(),s=r.addSource(t,e);return[s,()=>r.removeSource(s)]}function On(t,e,n,r){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;const c=Object.prototype.hasOwnProperty.bind(e);for(let u=0;u<o.length;u++){const d=o[u];if(!c(d))return!1;const f=t[d],h=e[d];if(s=void 0,s===!1||s===void 0&&f!==h)return!1}return!0}function Cn(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Id(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Rd(t){return(e=null,n=null)=>{if(!E.isValidElement(e)){const o=e;return t(o,n),o}const r=e;return Id(r),Ad(r,n?o=>t(o,n):t)}}function Ns(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const s=Rd(r);e[n]=()=>s}}),e}function qr(t,e){typeof t=="function"?t(e):t.current=e}function Ad(t,e){const n=t.ref;return k(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?E.cloneElement(t,{ref:r=>{qr(n,r),qr(e,r)}}):E.cloneElement(t,{ref:e})}class Bd{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!On(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!On(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Ns({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,Cn(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,Cn(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class $d{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!On(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Ns({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,Cn(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Ve(){const{dragDropManager:t}=E.useContext(ws);return k(t!=null,"Expected drag drop context"),t}function Md(t,e){const n=Ve(),r=E.useMemo(()=>new Bd(n.getBackend()),[n]);return Ie(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),Ie(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Ld(){const t=Ve();return E.useMemo(()=>new Dd(t),[t])}class Fd{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,s=this.monitor,{isDragging:o}=r;return o?o(s):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:s}=e;s&&s(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function qd(t,e,n){const r=E.useMemo(()=>new Fd(t,e,n),[e,n]);return E.useEffect(()=>{r.spec=t},[t]),r}function Ud(t){return E.useMemo(()=>{const e=t.type;return k(e!=null,"spec.type must be defined"),e},[t])}function Hd(t,e,n){const r=Ve(),s=qd(t,e,n),o=Ud(t);Ie(function(){if(o!=null){const[c,u]=Pd(o,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u}},[r,e,n,s,o])}function zd(t,e){const n=ks(t);k(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Ld(),s=Md(n.options,n.previewOptions);return Hd(n,r,s),[Ds(n.collect,r,s),Td(s),jd(s)]}function Vd(t){return E.useMemo(()=>t.hooks.dropTarget(),[t])}function Wd(t){const e=Ve(),n=E.useMemo(()=>new $d(e.getBackend()),[e]);return Ie(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function Yd(){const t=Ve();return E.useMemo(()=>new kd(t),[t])}function Gd(t){const{accept:e}=t;return E.useMemo(()=>(k(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Jd{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function Xd(t,e){const n=E.useMemo(()=>new Jd(t,e),[e]);return E.useEffect(()=>{n.spec=t},[t]),n}function Kd(t,e,n){const r=Ve(),s=Xd(t,e),o=Gd(t);Ie(function(){const[c,u]=Nd(o,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u},[r,e,s,n,o.map(i=>i.toString()).join("|")])}function Qd(t,e){const n=ks(t),r=Yd(),s=Wd(n.options);return Kd(n,r,s),[Ds(n.collect,r,s),Vd(s)]}function Ps(t){let e=null;return()=>(e==null&&(e=t()),e)}function Zd(t,e){return t.filter(n=>n!==e)}function ef(t,e){const n=new Set,r=o=>n.add(o);t.forEach(r),e.forEach(r);const s=[];return n.forEach(o=>s.push(o)),s}class tf{enter(e){const n=this.entered.length,r=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=ef(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Zd(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class nf{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const s=this.config.exposeProperties[r];s!=null&&(n[r]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Is="__NATIVE_FILE__",Rs="__NATIVE_URL__",As="__NATIVE_TEXT__",Bs="__NATIVE_HTML__",Ur=Object.freeze(Object.defineProperty({__proto__:null,FILE:Is,HTML:Bs,TEXT:As,URL:Rs},Symbol.toStringTag,{value:"Module"}));function ln(t,e,n){const r=e.reduce((s,o)=>s||t.getData(o),"");return r??n}const Tn={[Is]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Bs]:{exposeProperties:{html:(t,e)=>ln(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Rs]:{exposeProperties:{urls:(t,e)=>ln(t,e,"").split(`
44
- `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[As]:{exposeProperties:{text:(t,e)=>ln(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function rf(t,e){const n=Tn[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new nf(n);return r.loadDataTransfer(e),r}function un(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Tn).filter(n=>{const r=Tn[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const sf=Ps(()=>/firefox/i.test(navigator.userAgent)),$s=Ps(()=>!!window.safari);class Hr{interpolate(e){const{xs:n,ys:r,c1s:s,c2s:o,c3s:i}=this;let c=n.length-1;if(e===n[c])return r[c];let u=0,d=i.length-1,f;for(;u<=d;){f=Math.floor(.5*(u+d));const v=n[f];if(v<e)u=f+1;else if(v>e)d=f-1;else return r[f]}c=Math.max(0,d);const h=e-n[c],y=h*h;return r[c]+s[c]*h+o[c]*y+i[c]*h*y}constructor(e,n){const{length:r}=e,s=[];for(let v=0;v<r;v++)s.push(v);s.sort((v,g)=>e[v]<e[g]?-1:1);const o=[],i=[];let c,u;for(let v=0;v<r-1;v++)c=e[v+1]-e[v],u=n[v+1]-n[v],o.push(c),i.push(u/c);const d=[i[0]];for(let v=0;v<o.length-1;v++){const g=i[v],p=i[v+1];if(g*p<=0)d.push(0);else{c=o[v];const b=o[v+1],x=c+b;d.push(3*x/((x+b)/g+(x+c)/p))}}d.push(i[i.length-1]);const f=[],h=[];let y;for(let v=0;v<d.length-1;v++){y=i[v];const g=d[v],p=1/o[v],b=g+d[v+1]-y-y;f.push((y-g-b)*p),h.push(b*p*p)}this.xs=e,this.ys=n,this.c1s=d,this.c2s=f,this.c3s=h}}const of=1;function Ms(t){const e=t.nodeType===of?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function wt(t){return{x:t.clientX,y:t.clientY}}function af(t){var e;return t.nodeName==="IMG"&&(sf()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function cf(t,e,n,r){let s=t?e.width:n,o=t?e.height:r;return $s()&&t&&(o/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:o}}function lf(t,e,n,r,s){const o=af(e),c=Ms(o?t:e),u={x:n.x-c.x,y:n.y-c.y},{offsetWidth:d,offsetHeight:f}=t,{anchorX:h,anchorY:y}=r,{dragPreviewWidth:v,dragPreviewHeight:g}=cf(o,e,d,f),p=()=>{let q=new Hr([0,.5,1],[u.y,u.y/f*g,u.y+g-f]).interpolate(y);return $s()&&o&&(q+=(window.devicePixelRatio-1)*g),q},b=()=>new Hr([0,.5,1],[u.x,u.x/d*v,u.x+v-d]).interpolate(h),{offsetX:x,offsetY:w}=s,O=x===0||x,A=w===0||w;return{x:O?x:b(),y:A?w:p()}}class uf{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function df(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){df(t,s,n[s])})}return t}class ff{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const s=i=>this.handleDragStart(i,e),o=i=>this.handleSelectStart(i);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",s),n.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",s),n.removeEventListener("selectstart",o),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=i=>this.handleDragEnter(i,e),s=i=>this.handleDragOver(i,e),o=i=>this.handleDrop(i,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",s),n.addEventListener("drop",o),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",s),n.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return zr({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return zr({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Ur).some(n=>Ur[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=rf(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const o=this.sourceNodes.get(s);return o&&Ms(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const i=wt(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});const{dataTransfer:c}=s,u=un(c);if(this.monitor.isDragging()){if(c&&typeof c.setDragImage=="function"){const f=this.monitor.getSourceId(),h=this.sourceNodes.get(f),y=this.sourcePreviewNodes.get(f)||h;if(y){const{anchorX:v,anchorY:g,offsetX:p,offsetY:b}=this.getCurrentSourcePreviewNodeOptions(),O=lf(h,y,i,{anchorX:v,anchorY:g},{offsetX:p,offsetY:b});c.setDragImage(y,O.x,O.y)}}try{c==null||c.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(c&&!c.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:c}=s,u=un(c);u&&this.beginDragNativeItem(u,c)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,o.length>0&&this.actions.hover(o,{clientOffset:wt(s)}),o.some(c=>this.monitor.canDropOnTarget(c))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=wt(s),this.scheduleHover(o),(o||[]).some(c=>this.monitor.canDropOnTarget(c))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;s.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}else un(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:wt(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const o=s.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(s.preventDefault(),o.dragDrop()))},this.options=new uf(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new tf(this.isNodeInDocument)}}const hf=function(e,n,r){return new ff(e,n,r)},pf="_layers_62wod_1",gf="_block_62wod_8",mf="_dragging_62wod_23",vf="_active_62wod_31",bf="_add_62wod_35",yf="_button_62wod_47",_f="_empty_62wod_60",wf="_title_62wod_72",xf="_icon_62wod_79",Sf="_text_62wod_83",Ef="_highlight_62wod_89",fe={layers:pf,block:gf,dragging:mf,active:vf,add:bf,button:yf,empty:_f,title:wf,icon:xf,text:Sf,highlight:Ef},Of=({id:t,name:e,index:n,moveBlock:r,onClick:s})=>{const{currentPage:o,pages:i}=pe(),{activeBlock:c}=ot(),{showPreview:u,hidePreview:d,showModal:f,hideModal:h,clearHideTimeout:y,startHideTimeout:v,hoverBlockId:g,isModalVisible:p}=it(),{setPositionBlock:b}=he(),[x,w]=E.useState(!1),O=()=>{p&&h(),u(t),w(!0),y()},A=C=>{C.stopPropagation(),d(),f(t),y(),b(n+1)},B=()=>{p?v():(w(!1),d())};E.useEffect(()=>{p||w(!1)},[p]);const[,q]=Qd({accept:"block",hover(C){C.index!==n&&(r(i[o].name,C.index,n),C.index=n)}}),[{isDragging:z},G]=zd({type:"block",item:{id:t,index:n},collect:C=>({isDragging:C.isDragging()})});return a.jsxs("div",{ref:C=>G(q(C)),className:L(fe.block,{[fe.dragging]:z,[fe.active]:!z&&c===t}),onClick:()=>s(t),onMouseEnter:O,onMouseLeave:B,children:[a.jsx(j,{name:"cards"}),a.jsx("span",{children:e}),(x||g===t)&&!z&&a.jsx("div",{className:fe.add,children:a.jsx("button",{className:fe.button,onClick:C=>A(C),children:a.jsx(j,{name:"plus",fill:"#fff"})})})]})},Cf=()=>{const{setActiveBlock:t}=st();return a.jsxs("div",{className:fe.empty,children:[a.jsx("div",{className:fe.icon,children:a.jsx(j,{name:"layers",width:32,height:32,fill:"#757575"})}),a.jsx("div",{className:fe.title,children:"Layers is empty"}),a.jsxs("div",{className:fe.text,children:["Try adding"," ",a.jsx("span",{className:fe.highlight,onClick:()=>t({icon:"plus",name:"Add"}),children:"sections"})," ","and recreate your own design"]})]})},Tf=()=>{const{blocks:t,setCurrentBlock:e,moveBlock:n}=he(),{currentPage:r,pages:s}=pe();function o(i){e(i)}return a.jsx(_d,{backend:hf,children:a.jsxs("div",{className:fe.layers,children:[t[s[r].name]&&Object.keys(t[s[r].name]).map((i,c)=>a.jsx(Of,{id:i,name:t[s[r].name][i].name,index:c,moveBlock:n,onClick:o},i)),(!t[s[r].name]||Object.keys(t[s[r].name]).length===0)&&a.jsx(Cf,{})]})})},jf=()=>{const{settings:t}=at();return t==null?void 0:t.renderSettings()},Df="_theme_1xj36_1",kf="_block_1xj36_6",Nf="_name_1xj36_20",dn={theme:Df,block:kf,name:Nf},Pf=()=>{const{setActiveBlock:t}=ce();function e(n){t(n)}return a.jsx("div",{className:dn.theme,children:xo.map(n=>a.jsxs("div",{onClick:()=>e(n),className:L(dn.block),children:[a.jsx(j,{name:n.icon}),a.jsx("span",{className:dn.name,children:n.name}),a.jsx(j,{name:"arrow-right"})]},n.icon))})},If="_back_1m2pj_1",Rf="_render_1m2pj_8",Af="_open_1m2pj_23",Bf="_close_1m2pj_27",$f="_clicked_1m2pj_31",Mf="_title_1m2pj_35",Lf="_button_1m2pj_42",Ff="_settings_1m2pj_47",qf="_buttons_1m2pj_51",Uf="_deleteButton_1m2pj_57",we={back:If,render:Rf,open:Af,close:Bf,clicked:$f,title:Mf,button:Lf,settings:Ff,buttons:qf,deleteButton:Uf},Hf=({block:t})=>{if(!t)return;const{blocks:e,sourceBlocks:n,activeBlock:r}=Se(),{currentBlock:s}=he();if(!r&&!s)return null;if(t!=null&&t.name){const o=e[t.name],i=t.value;for(const c in i)o[c]=i[c];return o.renderSettings()}else{const o=n[r];for(const i in o)t[i]=o[i];return t.renderSettings()}},zf=t=>{var A;const{isAdd:e}=t,[n,r]=E.useState(!1),{setActiveBlock:s}=st(),{blocks:o,activeBlock:i,setActiveBlock:c}=Se(),{blocks:u,addBlock:d,editBlock:f,currentBlock:h,setCurrentBlock:y,removeBlock:v,setPositionBlock:g}=he(),{currentPage:p,pages:b}=pe();function x(){c(null),y(null),setTimeout(()=>{r(!1)},150)}function w(){x(),s({name:"Layers",icon:"layers"})}function O(){return e?o[i]:o[u[b[p].name]&&u[b[p].name][h]?u[b[p].name][h].name:"null"]}return a.jsxs("div",{className:L(we.render,{[we.open]:O(),[we.close]:!O(),[we.clicked]:n}),children:[a.jsxs("div",{className:we.back,children:[a.jsx(j,{name:"arrow-left",hoverable:!0,onClick:x}),a.jsx("h3",{className:we.title,children:i||u[b[p].name]&&((A=u[b[p].name][h])==null?void 0:A.name)||"Loading"})]}),a.jsx("div",{className:we.settings,children:O()?a.jsx(Hf,{block:e?O():u[b[p].name][h]}):a.jsx(a.Fragment,{children:"Loading"})}),a.jsxs("div",{className:we.buttons,children:[a.jsx(Ne,{style:{width:"100%"},onClick:()=>{r(!0);const B=O();e?(d(b[p].name,{name:i,value:{...B}}),g(null)):f(b[p].name,h,{name:u[b[p].name][h].name,value:{...B}}),w()},children:e?"Add Section":"Edit Section"}),!e&&a.jsx("button",{onClick:()=>{r(!0),v(b[p].name,h),setTimeout(()=>{r(!1)},150)},className:we.deleteButton,children:a.jsx(j,{name:"trash",hoverable:!0})})]})]})},Vf="_settings_1r85j_1",Wf="_open_1r85j_16",Yf="_close_1r85j_20",Gf="_header_1r85j_24",Jf="_title_1r85j_30",Xf="_addButton_1r85j_37",Ze={settings:Vf,open:Wf,close:Yf,header:Gf,title:Jf,addButton:Xf},Kf="_wrapper_n1a7x_1",Qf="_category_n1a7x_5",Zf="_categoryTitle_n1a7x_10",eh="_color_n1a7x_16",th="_content_n1a7x_24",nh="_preview_n1a7x_32",Me={wrapper:Kf,category:Qf,categoryTitle:Zf,color:eh,content:th,preview:nh},rh=()=>{const{themeSettings:t,updateColor:e}=ce();async function n(s,o,i){e(s,o,i)}const r=E.useMemo(()=>{const s={};return Object.entries(t.colors).forEach(([o,i])=>{Object.entries(i).forEach(([c,u])=>{s[u]||(s[u]=[]),s[u].push(`${o}-${c}`)})}),Object.keys(s).filter(o=>s[o].length>1)},[t.colors]);return a.jsx("div",{className:Me.wrapper,children:Object.entries(t.colors).map(([s,o])=>a.jsxs("div",{className:Me.category,children:[a.jsx("h2",{className:Me.categoryTitle,children:be(s)}),Object.entries(o).map(([i,c])=>a.jsxs("div",{className:Me.color,children:[a.jsxs("div",{className:Me.content,children:[a.jsx("div",{className:Me.preview,style:{background:c}}),a.jsx(et,{title:be(i),initialColor:c,onChange:u=>n(s,i,u)})]}),r.includes(c)&&a.jsx(Li,{type:"warning",message:"To avoid contrast problems, please use a different color",style:{marginBottom:12}})]},i))]},s))})},sh="_wrapper_kb55x_2",oh="_category_kb55x_6",ih="_categoryTitle_kb55x_11",ah="_color_kb55x_17",ch="_name_kb55x_23",lh="_content_kb55x_28",uh="_label_kb55x_34",dh="_input_kb55x_45",fh="_title_kb55x_71",hh="_field_kb55x_79",ph="_alignments_kb55x_89",gh="_lineField_kb55x_95",mh="_style_kb55x_101",vh="_header_kb55x_108",ve={wrapper:sh,category:oh,categoryTitle:ih,color:ah,name:ch,content:lh,label:uh,input:dh,title:fh,field:hh,alignments:ph,lineField:gh,style:mh,header:vh},bh=["left","center","right"],yh=["solid","dashed"],xt=t=>{const{title:e,children:n,rightAddon:r}=t;return a.jsxs("div",{className:ve.field,children:[a.jsxs("div",{className:ve.header,children:[a.jsx("h4",{children:e}),r]}),n]})},_h=()=>{const{themeSettings:t,updateInput:e}=ce(),n=E.useMemo(()=>t.inputs,[t]),r=(o,i,c)=>{e(o,i,c)},s=o=>i=>{e(o,i,"color")};return a.jsxs("div",{className:ve.wrapper,children:[a.jsxs(xt,{title:"General",children:[a.jsx(oe,{label:"Height (px)",value:String(n.general.height),onChange:o=>r("general",o,"height"),type:"number",min:0}),a.jsx(oe,{label:"Style name",value:n.general.name,onChange:o=>r("general",o,"name")}),a.jsx(Ue,{label:"Font Size (px)",onChange:o=>r("general",o,"size"),value:String(n.general.size),options:Ct}),a.jsx(et,{initialColor:be(n.general.color),onChange:s("general"),title:"Font Color",labelStyle:"secondary"})]}),a.jsxs(xt,{title:"Field Fill",rightAddon:a.jsx("div",{className:ve.switch,children:a.jsx(fr,{onChange:o=>r("field",o,"active"),current:n.field.active})}),children:[a.jsx(et,{initialColor:be(n.field.color),onChange:s("field"),title:"Color",labelStyle:"secondary"}),a.jsx(oe,{label:"Opacity (%)",value:String(n.field.opacity),onChange:o=>r("field",o,"opacity"),type:"number",min:0})]}),a.jsxs(xt,{title:"Border",rightAddon:a.jsx("div",{className:ve.switch,children:a.jsx(fr,{onChange:o=>r("border",o,"active"),current:n.border.active})}),children:[a.jsxs("div",{className:ve.lineField,children:[a.jsxs("div",{className:ve.style,children:[a.jsx("span",{className:ve.title,children:"Style"}),a.jsx(pr,{items:yh,selectedItem:n.border.style,onSelect:o=>r("border",o,"style"),getIconName:o=>`border-${o}`})]}),a.jsx(oe,{label:"Radius (px)",value:String(n.border.radius),onChange:o=>r("border",o,"radius"),type:"number",min:0})]}),a.jsx(oe,{label:"Thickness (px)",value:String(n.border.thickness),onChange:o=>r("border",o,"thickness"),type:"number",min:0}),a.jsx(et,{initialColor:be(n.border.color),onChange:s("border"),title:"Color",labelStyle:"secondary"})]}),a.jsxs(xt,{title:"Label",children:[a.jsx(oe,{label:"Line Height (px)",value:String(n.label.height),onChange:o=>r("label",o,"height"),type:"number",min:0}),a.jsx(Ue,{label:"Font Size (px)",onChange:o=>r("label",o,"size"),value:String(n.label.size),options:Ct}),a.jsx(et,{initialColor:be(n.label.color),onChange:s("label"),title:"Color",labelStyle:"secondary"}),a.jsxs("div",{className:ve.alignments,children:[a.jsx("h4",{className:ve.title,children:"Alignment Type"}),a.jsx(pr,{items:bh,selectedItem:n.label.alignment,onSelect:o=>r("label",o,"alignment"),getIconName:o=>`align-${o}`})]})]})]})},wh="_wrapper_k9on2_1",xh="_category_k9on2_5",Sh="_categoryTitle_k9on2_10",Eh="_font_k9on2_16",Oh="_content_k9on2_36",Ch="_icon_k9on2_42",Th="_paragraph_k9on2_51",jh="_deleteIcon_k9on2_55",Dh="_iconButton_k9on2_62",xe={wrapper:wh,category:xh,categoryTitle:Sh,font:Eh,content:Oh,icon:Ch,paragraph:Th,deleteIcon:jh,iconButton:Dh},kh=t=>{const{font:e,size:n,id:r,category:s}=t,{setActiveFont:o}=ce();return a.jsxs("div",{className:xe.font,onClick:()=>o(r),children:[a.jsx("div",{className:L(xe.icon,{[xe.paragraph]:s==="paragraph"}),children:a.jsx(j,{name:s})}),a.jsxs("div",{className:xe.content,children:[a.jsx("h2",{className:xe.categoryTitle,children:be(r)}),a.jsx("span",{className:xe.value,children:`${e}, ${n}px`})]})]})},Nh=()=>{const{themeSettings:t,setActiveFont:e,activeBlock:n}=ce();E.useEffect(()=>(r(),()=>{r()}),[]);function r(){e(null)}if(n!=null&&n.name)return a.jsx("div",{className:xe.wrapper,children:Object.entries(t.fonts).map(([s,o])=>a.jsxs("div",{className:xe.category,children:[a.jsx("h2",{className:xe.categoryTitle,children:be(s)}),Object.entries(o).map(([i,c])=>a.jsx(kh,{id:i,category:s,...c},i))]},s))})},Ph="_wrapper_94fpv_1",Ih="_open_94fpv_16",Rh="_close_94fpv_20",Ah="_header_94fpv_24",Bh="_title_94fpv_31",$h="_options_94fpv_37",Mh="_clicked_94fpv_44",Le={wrapper:Ph,open:Ih,close:Rh,header:Ah,title:Bh,options:$h,clicked:Mh},Lh=()=>{const{activeBlock:t,setActiveFont:e,activeFont:n,themeSettings:r,updateFont:s}=ce(),{fonts:o}=Yr(),[i,c]=E.useState(null);function u(){e(null)}function d(h,y){i&&n&&s(i,n,y,h)}const f=E.useMemo(()=>n?r.fonts.heading[n]?(c("heading"),r.fonts.heading[n]):r.fonts.paragraph[n]?(c("paragraph"),r.fonts.paragraph[n]):(c(null),null):null,[n,r]);return a.jsxs("div",{className:L(Le.wrapper,{[Le.open]:(t==null?void 0:t.name)==="Fonts"&&n,[Le.close]:(t==null?void 0:t.name)!=="Fonts"||!n}),children:[a.jsxs("div",{className:Le.header,onClick:u,children:[a.jsx(j,{name:"arrow-left",hoverable:!0}),a.jsx("span",{className:Le.title,children:"Font Style"})]}),n&&f&&a.jsxs("div",{className:Le.options,children:[a.jsx(Ue,{label:"Font",value:f.font,onChange:h=>d(h,"font"),options:[...o.filter(h=>h!==f.font)]}),a.jsx(Ue,{label:"Size",value:String(f.size),onChange:h=>d(h,"size"),options:Ct}),a.jsx(Ue,{label:"Weight",value:String(f.weight),onChange:h=>d(h,"weight"),options:Oo})]})]})},Fh="_wrapper_94fpv_1",qh="_open_94fpv_16",Uh="_close_94fpv_20",Hh="_header_94fpv_24",zh="_title_94fpv_31",Vh="_options_94fpv_37",Wh="_clicked_94fpv_44",Fe={wrapper:Fh,open:qh,close:Uh,header:Hh,title:zh,options:Vh,clicked:Wh},Ls=()=>{const{activeBlock:t,themeSettings:e,updateBorder:n,setActiveBlock:r}=ce();function s(c,u){n(u,c)}function o(){r(null)}const i=E.useMemo(()=>e.borders,[e]);return a.jsxs("div",{className:L(Fe.wrapper,{[Fe.open]:(t==null?void 0:t.name)==="Borders",[Fe.close]:(t==null?void 0:t.name)!=="Borders"}),children:[a.jsxs("div",{className:Fe.header,children:[a.jsx(j,{name:"arrow-left",hoverable:!0,onClick:o}),a.jsx("span",{className:Fe.title,children:"Borders Style"})]}),a.jsxs("div",{className:Fe.options,children:[a.jsx(oe,{label:"Border Radius (px)",value:String(i.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),a.jsx(oe,{label:"Border Thickness (px)",value:String(i.thickness),onChange:c=>s(Number(c),"thickness"),type:"number",min:0})]})]})},Yh="_wrapper_1j33r_1",Gh="_open_1j33r_16",Jh="_close_1j33r_20",Xh="_header_1j33r_24",Kh="_title_1j33r_31",Qh="_options_1j33r_37",Zh="_clicked_1j33r_44",ep="_label_1j33r_48",tp="_alignments_1j33r_55",np="_blocks_1j33r_61",rp="_alignment_1j33r_55",sp="_active_1j33r_75",le={wrapper:Yh,open:Gh,close:Jh,header:Xh,title:Kh,options:Qh,clicked:Zh,label:ep,alignments:tp,blocks:np,alignment:rp,active:sp},op=["left","center","right"],Fs=()=>{const{activeBlock:t,themeSettings:e,updateButton:n,setActiveBlock:r}=ce();function s(c,u){n(u,c)}function o(){r(null)}const i=E.useMemo(()=>e.buttons,[e]);return a.jsxs("div",{className:L(le.wrapper,{[le.open]:(t==null?void 0:t.name)==="Buttons",[le.close]:(t==null?void 0:t.name)!=="Buttons"}),children:[a.jsxs("div",{className:le.header,children:[a.jsx(j,{name:"arrow-left",hoverable:!0,onClick:o}),a.jsx("span",{className:le.title,children:"Buttons Style"})]}),i&&a.jsxs("div",{className:le.options,children:[a.jsx(oe,{label:"Height (px)",value:String(i.height),onChange:c=>s(c,"height"),type:"number",min:0}),a.jsx(Ue,{label:"Font Size (px)",value:String(i.size),onChange:c=>s(c,"size"),options:Ct}),a.jsx(oe,{label:"Border Radius (px)",value:String(i.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),a.jsxs("div",{className:le.alignments,children:[a.jsx("h4",{className:le.label,children:"Alignment Type"}),a.jsx("div",{className:le.blocks,children:op.map(c=>a.jsx("div",{className:L(le.alignment,{[le.active]:i.alignment===c}),onClick:()=>{s(c,"alignment")},children:a.jsx(j,{name:`align-${c}`,fill:i.alignment===c?"#252525":"#757575"})},c))})]})]})]})},ip=()=>{const{activeBlock:t}=ce();return a.jsxs(a.Fragment,{children:[(t==null?void 0:t.name)==="Fonts"&&a.jsx(Lh,{}),(t==null?void 0:t.name)==="Borders"&&a.jsx(Ls,{}),(t==null?void 0:t.name)==="Buttons"&&a.jsx(Fs,{})]})},ap=()=>{const{activeBlock:t,setActiveBlock:e}=ce(),{activeBlock:n}=st();function r(){e(null)}return a.jsxs("div",{className:L(Ze.settings,{[Ze.open]:t,[Ze.close]:!t||n.name!=="Theme"}),children:[a.jsxs("div",{className:Ze.header,children:[a.jsx(j,{name:"arrow-left",hoverable:!0,onClick:r}),a.jsx("span",{className:Ze.title,children:t==null?void 0:t.name})]}),(t==null?void 0:t.name)==="Fonts"&&a.jsx(Nh,{}),(t==null?void 0:t.name)==="Colors"&&a.jsx(rh,{}),(t==null?void 0:t.name)==="Inputs"&&a.jsx(_h,{}),(t==null?void 0:t.name)==="Borders"&&a.jsx(Ls,{}),(t==null?void 0:t.name)==="Borders"&&a.jsx(Fs,{}),a.jsx(ip,{})]})},cp=()=>{const{activeBlock:t}=st(),{activeBlock:e}=Se();function n(){switch(t.name){case"Layers":return"Layers";case"Add":return"Add Sections";case"Theme":return"Theme Settings";case"Settings":return"Settings"}}return a.jsxs("div",{className:Pr.sidebar,children:[a.jsx("h3",{className:Pr.title,children:n()}),t.name==="Layers"&&a.jsx(Tf,{}),t.name==="Add"&&a.jsx(_s,{}),a.jsx(zf,{isAdd:!!e}),a.jsx(ap,{}),t.name==="Theme"&&a.jsx(Pf,{}),t.name==="Settings"&&a.jsx(jf,{})]})},lp="_wrapper_jjfwh_1",up="_header_jjfwh_12",dp="_content_jjfwh_21",fp="_buttons_jjfwh_29",hp="_cancel_jjfwh_35",pp="_label_jjfwh_40",gp="_description_jjfwh_41",mp="_preview_jjfwh_49",vp="_block_jjfwh_55",bp="_slug_jjfwh_63",yp="_title_jjfwh_69",ue={wrapper:lp,header:up,content:dp,buttons:fp,cancel:hp,label:pp,description:gp,preview:mp,block:vp,slug:bp,title:yp},_p=()=>{var z,G,C,R,$,W;const{setIsOpenModal:t,pages:e,createPage:n,updatePage:r,isEdit:s,setIsEdit:o,editedPage:i,setEditedPage:c}=pe(),{createPage:u,updatePage:d}=he(),[f,h]=E.useState(i?(z=e[i])==null?void 0:z.path:""),[y,v]=E.useState(i?(G=e[i])==null?void 0:G.name:""),[g,p]=E.useState(i?(C=e[i])==null?void 0:C.seo.description:""),[b,x]=E.useState(i?(R=e[i])==null?void 0:R.visibility:"public");function w(){h(""),v(""),p(""),x("public"),o(!1),c(null)}function O(){w(),t(!1)}function A(N){return N[0]==="/"?N:"/"+N}function B(){n({path:A(f),name:y||f,icon:"file",seo:{title:y,description:g},visibility:b}),u(y),O()}function q(){d(e[i].name,y||f),r(i,{path:A(f),name:y||f,icon:e[i].icon||"file",seo:{title:y,description:g},visibility:b}),O()}return a.jsxs("div",{className:ue.wrapper,onClick:N=>N.stopPropagation(),children:[a.jsxs("div",{className:ue.header,children:[a.jsxs("h2",{children:[s?"Edit":"Create"," Blank Page"]}),a.jsx(j,{name:"x",fill:"#757575",hoverable:!0,onClick:O})]}),a.jsxs("div",{className:ue.content,children:[a.jsx(oe,{label:"Page Slug",onChange:N=>h(N),value:f,placeholder:"path-to-page",disabled:!!(i&&(($=e[i])!=null&&$.name)&&tt.includes(e[i].name)),required:!0,regex:"^.+$"}),a.jsx(oe,{label:"Page Title",onChange:N=>v(N),value:y,placeholder:"Contact us",disabled:!!(i&&((W=e[i])!=null&&W.name)&&tt.includes(e[i].name))}),a.jsx(Oi,{label:"Description",onChange:N=>p(N),value:g,placeholder:"Contact us at any time of the day or night. You are always welcome",maxLength:150}),a.jsx(Ii,{label:"Visibility",defaultValue:b,options:[{value:"public",label:"Public"},{value:"private",label:"Private"}],onChange:N=>x(N)}),a.jsxs("div",{className:ue.preview,children:[a.jsx("span",{className:ue.label,children:"Preview"}),a.jsxs("div",{className:ue.block,children:[a.jsx("span",{className:ue.slug,children:f||"yoursite.url"}),a.jsx("span",{className:ue.title,children:y||"My Blank Page"}),a.jsx("span",{className:ue.description,children:g||"It is My Description"})]})]})]}),a.jsxs("div",{className:ue.buttons,children:[a.jsx(Ne,{className:ue.cancel,onClick:O,children:"Cancel"}),a.jsx(Ne,{onClick:s?q:B,disabled:f.length===0,children:s?"Update":"Create"})]})]})},wp="_layout_kjedu_1",xp="_main_kjedu_8",Sp="_content_kjedu_15",fn={layout:wp,main:xp,content:Sp},Ep=()=>{const{isOpenModal:t,setIsOpenModal:e}=pe();return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:fn.layout,children:[a.jsx(ol,{}),a.jsxs("main",{className:fn.main,children:[a.jsx(Kc,{}),a.jsxs("div",{className:fn.content,children:[a.jsx(cp,{}),a.jsx(Xl,{})]})]})]}),t&&a.jsx(_i,{close:e,children:a.jsx(_p,{})})]})};async function qe(t,e){const n=localStorage.getItem("shopId")||void 0,r=`${So}/${t}/builder/shops/${n}/${e}`;return(await U.get(r,{headers:{Authorization:"Bearer undefined"}})).data}async function Op(){try{const[t,e,n,r,s,o]=await Promise.allSettled([qe("v1","general"),qe("v1","faqs"),qe("v1","listings"),qe("v1","products"),qe("v1","reviews"),qe("v1","categories")]);return{general:t,faqs:e,listings:n,products:r,reviews:s,categories:o}}catch(t){throw console.error("Error fetching page data:",t),t}}async function Cp(){try{const{data:t}=await U.get(`${Eo}?key=undefined`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}const Tp=t=>{const{blocks:e,settings:n}=t,{setBlocks:r,setSourceBlocks:s}=Se(),{fonts:o,setFonts:i}=Yr(),{setSettings:c}=at(),{setPageContext:u}=pe();return E.useEffect(()=>{const d={};Object.keys(e).map(h=>{d[h]={...e[h]}}),c(n),s(d),r(e),(async()=>{if(o.length===0){const v=await Cp();i([...v.map(g=>g.family)])}let h={listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0};const y=await Op();Object.keys(y).map(v=>{const g=v;h[g]=y[g].value.data}),u(h)})()},[]),a.jsx(Ep,{})};exports.Builder=Tp;
10
+ `},children:o.jsxRuntimeExports.jsx("div",{className:o.styles.indicator,style:{position:"absolute",left:`${i}%`,top:`${100-a}%`,transform:"translate(-50%, -50%)"}})}),o.jsxRuntimeExports.jsx("div",{className:o.styles.hueSlider,children:o.jsxRuntimeExports.jsx("input",{type:"range",min:"0",max:"360",value:s,onChange:w=>{l(Number(w.target.value)),y(i,a)},className:o.styles.slider})}),o.jsxRuntimeExports.jsxs("div",{className:o.styles.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{onClick:U,className:o.clx(o.styles.applyButton,o.styles.cancelButton),children:"Cancel"}),o.jsxRuntimeExports.jsx(o.Button,{onClick:P,className:o.styles.applyButton,children:"Apply"})]})]})},di=()=>{const{onPreview:t}=o.usePreviewStore(),{hoverBlockId:e,isModalVisible:n,isPreviewVisible:r}=o.useSubmodalStore(),{settings:s}=o.useSettingsStore(),{blocks:i}=o.useBlocksStore(),{blocks:a}=o.useLayersStore(),{currentPage:c,pages:u}=o.usePagesStore(),{showModal:l}=o.useColorPickerStore(),[d,p]=E.useState(!0);E.useEffect(()=>{t&&setTimeout(()=>{p(!1)},100)},[t]);const v=x=>{if(!x)return;const m=i[x.name],h=x.value;for(const g in h)m[g]=h[g];return m.renderBlock(s)};return o.jsxRuntimeExports.jsxs("div",{className:ge.preview,children:[n&&o.jsxRuntimeExports.jsx(o.Submodal,{children:o.jsxRuntimeExports.jsx(Tn,{})}),r&&e&&o.jsxRuntimeExports.jsx(o.Submodal,{children:o.jsxRuntimeExports.jsx(On,{render:v,block:a[u[c].name][e]})}),l&&o.jsxRuntimeExports.jsx(li,{}),t&&o.jsxRuntimeExports.jsxs("div",{className:ge.main,children:[o.jsxRuntimeExports.jsx(Mo,{}),o.jsxRuntimeExports.jsx("div",{className:ge.content,children:d?o.jsxRuntimeExports.jsx("div",{className:ge.loading,children:o.jsxRuntimeExports.jsx("div",{className:ge.loader})}):o.jsxRuntimeExports.jsx(ri,{})})]})]})},fi="_sidebar_xqbqi_1",pi="_title_xqbqi_11",hi="_active_xqbqi_19",qt={sidebar:fi,title:pi,active:hi},Dn=E.createContext({dragDropManager:void 0});function $(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var zt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Je=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vt={INIT:"@@redux/INIT"+Je(),REPLACE:"@@redux/REPLACE"+Je(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Je()}};function gi(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function mi(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(Ei(t))return"date";if(vi(t))return"error";var n=xi(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function xi(t){return typeof t.constructor=="function"?t.constructor.name:null}function vi(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function Ei(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function oe(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=mi(t)),e}function Cn(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?$(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?$(1):"Expected the enhancer to be a function. Instead, received: '"+oe(n)+"'");return n(Cn)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?$(2):"Expected the root reducer to be a function. Instead, received: '"+oe(t)+"'");var s=t,i=e,a=[],c=a,u=!1;function l(){c===a&&(c=a.slice())}function d(){if(u)throw new Error(process.env.NODE_ENV==="production"?$(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function p(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?$(4):"Expected the listener to be a function. Instead, received: '"+oe(h)+"'");if(u)throw new Error(process.env.NODE_ENV==="production"?$(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var g=!0;return l(),c.push(h),function(){if(g){if(u)throw new Error(process.env.NODE_ENV==="production"?$(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");g=!1,l();var b=c.indexOf(h);c.splice(b,1),a=null}}}function v(h){if(!gi(h))throw new Error(process.env.NODE_ENV==="production"?$(7):"Actions must be plain objects. Instead, the actual type was: '"+oe(h)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?$(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error(process.env.NODE_ENV==="production"?$(9):"Reducers may not dispatch actions.");try{u=!0,i=s(i,h)}finally{u=!1}for(var g=a=c,j=0;j<g.length;j++){var b=g[j];b()}return h}function x(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?$(10):"Expected the nextReducer to be a function. Instead, received: '"+oe(h));s=h,v({type:Vt.REPLACE})}function m(){var h,g=p;return h={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?$(11):"Expected the observer to be an object. Instead, received: '"+oe(b)+"'");function y(){b.next&&b.next(d())}y();var D=g(y);return{unsubscribe:D}}},h[zt]=function(){return this},h}return v({type:Vt.INIT}),r={dispatch:v,subscribe:p,getState:d,replaceReducer:x},r[zt]=m,r}function _(t,e,...n){if(ji()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;r=new Error(e.replace(/%s/g,function(){return n[s++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function ji(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function bi(t,e,n){return e.split(".").reduce((r,s)=>r&&r[s]?r[s]:n||null,t)}function yi(t,e){return t.filter(n=>n!==e)}function Nn(t){return typeof t=="object"}function Si(t,e){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};t.forEach(r),e.forEach(r);const s=[];return n.forEach((i,a)=>{i===1&&s.push(a)}),s}function _i(t,e){return t.filter(n=>e.indexOf(n)>-1)}const jt="dnd-core/INIT_COORDS",Me="dnd-core/BEGIN_DRAG",bt="dnd-core/PUBLISH_DRAG_SOURCE",$e="dnd-core/HOVER",Fe="dnd-core/DROP",Ue="dnd-core/END_DRAG";function Gt(t,e){return{type:jt,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const wi={type:jt,payload:{clientOffset:null,sourceClientOffset:null}};function Ri(t){return function(n=[],r={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:a}=r,c=t.getMonitor(),u=t.getRegistry();t.dispatch(Gt(i)),Oi(n,c,u);const l=Ci(n,c);if(l==null){t.dispatch(wi);return}let d=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");Ti(a),d=a(l)}t.dispatch(Gt(i,d));const v=u.getSource(l).beginDrag(c,l);if(v==null)return;Di(v),u.pinSource(l);const x=u.getSourceType(l);return{type:Me,payload:{itemType:x,item:v,sourceId:l,clientOffset:i||null,sourceClientOffset:d||null,isSourcePublic:!!s}}}}function Oi(t,e,n){_(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){_(n.getSource(r),"Expected sourceIds to be registered.")})}function Ti(t){_(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Di(t){_(Nn(t),"Item must be an object.")}function Ci(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function Ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ii(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ni(t,s,n[s])})}return t}function Pi(t){return function(n={}){const r=t.getMonitor(),s=t.getRegistry();ki(r),Li(r).forEach((a,c)=>{const u=Ai(a,c,s,r),l={type:Fe,payload:{dropResult:Ii({},n,u)}};t.dispatch(l)})}}function ki(t){_(t.isDragging(),"Cannot call drop while not dragging."),_(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Ai(t,e,n,r){const s=n.getTarget(t);let i=s?s.drop(r,t):void 0;return Bi(i),typeof i>"u"&&(i=e===0?{}:r.getDropResult()),i}function Bi(t){_(typeof t>"u"||Nn(t),"Drop result must either be an object or undefined.")}function Li(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Mi(t){return function(){const n=t.getMonitor(),r=t.getRegistry();$i(n);const s=n.getSourceId();return s!=null&&(r.getSource(s,!0).endDrag(n,s),r.unpinSource()),{type:Ue}}}function $i(t){_(t.isDragging(),"Cannot call endDrag while not dragging.")}function lt(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function Fi(t){return function(n,{clientOffset:r}={}){Ui(n);const s=n.slice(0),i=t.getMonitor(),a=t.getRegistry(),c=i.getItemType();return qi(s,a,c),Hi(s,i,a),zi(s,i,a),{type:$e,payload:{targetIds:s,clientOffset:r||null}}}}function Ui(t){_(Array.isArray(t),"Expected targetIds to be an array.")}function Hi(t,e,n){_(e.isDragging(),"Cannot call hover while not dragging."),_(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const s=t[r];_(t.lastIndexOf(s)===r,"Expected targetIds to be unique in the passed array.");const i=n.getTarget(s);_(i,"Expected targetIds to be registered.")}}function qi(t,e,n){for(let r=t.length-1;r>=0;r--){const s=t[r],i=e.getTargetType(s);lt(i,n)||t.splice(r,1)}}function zi(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Vi(t){return function(){if(t.getMonitor().isDragging())return{type:bt}}}function Gi(t){return{beginDrag:Ri(t),publishDragSource:Vi(t),hover:Fi(t),drop:Pi(t),endDrag:Mi(t)}}class Wi{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(i){return(...a)=>{const c=i.apply(e,a);typeof c<"u"&&n(c)}}const s=Gi(this);return Object.keys(s).reduce((i,a)=>{const c=s[a];return i[a]=r(c),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Yi(t,e){return{x:t.x+e.x,y:t.y+e.y}}function In(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ji(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:In(Yi(e,r),n)}function Xi(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:In(e,n)}const xe=[],yt=[];xe.__IS_NONE__=!0;yt.__IS_ALL__=!0;function Ki(t,e){return t===xe?!1:t===yt||typeof e>"u"?!0:_i(e,t).length>0}class Qi{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;_(typeof e=="function","listener must be a function."),_(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),c=a.stateId;try{c===s||c===s+1&&!Ki(a.dirtyHandlerIds,r)||e()}finally{s=c}};return this.store.subscribe(i)}subscribeToOffsetChange(e){_(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const s=this.store.getState().dragOffset;s!==n&&(n=s,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return _(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(_(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),s=this.getItemType();return lt(r,s)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(_(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),s=this.getItemType();return r!==s?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),i=this.getItemType();if(i&&!lt(s,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return r?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ji(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Xi(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const Wt=typeof global<"u"?global:self,Pn=Wt.MutationObserver||Wt.WebKitMutationObserver;function kn(t){return function(){const n=setTimeout(s,0),r=setInterval(s,50);function s(){clearTimeout(n),clearInterval(r),t()}}}function Zi(t){let e=1;const n=new Pn(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const ea=typeof Pn=="function"?Zi:kn;class ta{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,s=e.length-this.index;r<s;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ea(this.flush),this.requestErrorThrow=kn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class na{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class ra{create(e){const n=this.freeTasks,r=n.length?n.pop():new na(this.onError,s=>n[n.length]=s);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const An=new ta,sa=new ra(An.registerPendingError);function oa(t){An.enqueueTask(sa.create(t))}const St="dnd-core/ADD_SOURCE",_t="dnd-core/ADD_TARGET",wt="dnd-core/REMOVE_SOURCE",He="dnd-core/REMOVE_TARGET";function ia(t){return{type:St,payload:{sourceId:t}}}function aa(t){return{type:_t,payload:{targetId:t}}}function ca(t){return{type:wt,payload:{sourceId:t}}}function ua(t){return{type:He,payload:{targetId:t}}}function la(t){_(typeof t.canDrag=="function","Expected canDrag to be a function."),_(typeof t.beginDrag=="function","Expected beginDrag to be a function."),_(typeof t.endDrag=="function","Expected endDrag to be a function.")}function da(t){_(typeof t.canDrop=="function","Expected canDrop to be a function."),_(typeof t.hover=="function","Expected hover to be a function."),_(typeof t.drop=="function","Expected beginDrag to be a function.")}function dt(t,e){if(e&&Array.isArray(t)){t.forEach(n=>dt(n,!1));return}_(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var F;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(F||(F={}));let fa=0;function pa(){return fa++}function ha(t){const e=pa().toString();switch(t){case F.SOURCE:return`S${e}`;case F.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Yt(t){switch(t[0]){case"S":return F.SOURCE;case"T":return F.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Jt(t,e){const n=t.entries();let r=!1;do{const{done:s,value:[,i]}=n.next();if(i===e)return!0;r=!!s}while(!r);return!1}class ga{addSource(e,n){dt(e),la(n);const r=this.addHandler(F.SOURCE,e,n);return this.store.dispatch(ia(r)),r}addTarget(e,n){dt(e,!0),da(n);const r=this.addHandler(F.TARGET,e,n);return this.store.dispatch(aa(r)),r}containsHandler(e){return Jt(this.dragSources,e)||Jt(this.dropTargets,e)}getSource(e,n=!1){return _(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return _(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return _(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return _(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Yt(e)===F.SOURCE}isTargetId(e){return Yt(e)===F.TARGET}removeSource(e){_(this.getSource(e),"Expected an existing source."),this.store.dispatch(ca(e)),oa(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){_(this.getTarget(e),"Expected an existing target."),this.store.dispatch(ua(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);_(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){_(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const s=ha(e);return this.types.set(s,n),e===F.SOURCE?this.dragSources.set(s,r):e===F.TARGET&&this.dropTargets.set(s,r),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const ma=(t,e)=>t===e;function xa(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function va(t,e,n=ma){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Ea(t=xe,e){switch(e.type){case $e:break;case St:case _t:case He:case wt:return xe;case Me:case bt:case Ue:case Fe:default:return yt}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,s=Si(n,r);if(!(s.length>0||!va(n,r)))return xe;const a=r[r.length-1],c=n[n.length-1];return a!==c&&(a&&s.push(a),c&&s.push(c)),s}function ja(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ba(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){ja(t,s,n[s])})}return t}const Xt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ya(t=Xt,e){const{payload:n}=e;switch(e.type){case jt:case Me:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case $e:return xa(t.clientOffset,n.clientOffset)?t:ba({},t,{clientOffset:n.clientOffset});case Ue:case Fe:return Xt;default:return t}}function Sa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ie(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Sa(t,s,n[s])})}return t}const _a={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function wa(t=_a,e){const{payload:n}=e;switch(e.type){case Me:return ie({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case bt:return ie({},t,{isSourcePublic:!0});case $e:return ie({},t,{targetIds:n.targetIds});case He:return t.targetIds.indexOf(n.targetId)===-1?t:ie({},t,{targetIds:yi(t.targetIds,n.targetId)});case Fe:return ie({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ue:return ie({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Ra(t=0,e){switch(e.type){case St:case _t:return t+1;case wt:case He:return t-1;default:return t}}function Oa(t=0){return t+1}function Ta(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Da(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ta(t,s,n[s])})}return t}function Ca(t={},e){return{dirtyHandlerIds:Ea(t.dirtyHandlerIds,{type:e.type,payload:Da({},e.payload,{prevTargetIds:bi(t,"dragOperation.targetIds",[])})}),dragOffset:ya(t.dragOffset,e),refCount:Ra(t.refCount,e),dragOperation:wa(t.dragOperation,e),stateId:Oa(t.stateId)}}function Na(t,e=void 0,n={},r=!1){const s=Ia(r),i=new Qi(s,new ga(s)),a=new Wi(s,i),c=t(a,e,n);return a.receiveBackend(c),a}function Ia(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Cn(Ca,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function Pa(t,e){if(t==null)return{};var n=ka(t,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ka(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}let Kt=0;const Ce=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Aa=E.memo(function(e){var{children:n}=e,r=Pa(e,["children"]);const[s,i]=Ba(r);return E.useEffect(()=>{if(i){const a=Bn();return++Kt,()=>{--Kt===0&&(a[Ce]=null)}}},[]),o.jsxRuntimeExports.jsx(Dn.Provider,{value:s,children:n})});function Ba(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=La(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function La(t,e=Bn(),n,r){const s=e;return s[Ce]||(s[Ce]={dragDropManager:Na(t,e,n,r)}),s[Ce]}function Bn(){return typeof global<"u"?global:window}var Ma=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var a=i[s];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n};const $a=o.getDefaultExportFromCjs(Ma),se=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Fa(t,e,n){const[r,s]=E.useState(()=>e(t)),i=E.useCallback(()=>{const a=e(t);$a(r,a)||(s(a),n&&n())},[r,t,n]);return se(i),[r,i]}function Ua(t,e,n){const[r,s]=Fa(t,e,n);return se(function(){const a=t.getHandlerId();if(a!=null)return t.subscribeToStateChange(s,{handlerIds:[a]})},[t,s]),r}function Ln(t,e,n){return Ua(e,t||(()=>({})),()=>n.reconnect())}function Mn(t,e){const n=[];return typeof t!="function"&&n.push(t),E.useMemo(()=>typeof t=="function"?t():t,n)}function Ha(t){return E.useMemo(()=>t.hooks.dragSource(),[t])}function qa(t){return E.useMemo(()=>t.hooks.dragPreview(),[t])}let Xe=!1,Ke=!1;class za{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){_(!Xe,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Xe=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Xe=!1}}isDragging(){if(!this.sourceId)return!1;_(!Ke,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ke=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Ke=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Qe=!1;class Va{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;_(!Qe,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Qe=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Qe=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Ga(t,e,n){const r=n.getRegistry(),s=r.addTarget(t,e);return[s,()=>r.removeTarget(s)]}function Wa(t,e,n){const r=n.getRegistry(),s=r.addSource(t,e);return[s,()=>r.removeSource(s)]}function ft(t,e,n,r){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const c=Object.prototype.hasOwnProperty.bind(e);for(let u=0;u<i.length;u++){const l=i[u];if(!c(l))return!1;const d=t[l],p=e[l];if(s=void 0,s===!1||s===void 0&&d!==p)return!1}return!0}function pt(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ya(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Ja(t){return(e=null,n=null)=>{if(!E.isValidElement(e)){const i=e;return t(i,n),i}const r=e;return Ya(r),Xa(r,n?i=>t(i,n):t)}}function $n(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const s=Ja(r);e[n]=()=>s}}),e}function Qt(t,e){typeof t=="function"?t(e):t.current=e}function Xa(t,e){const n=t.ref;return _(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?E.cloneElement(t,{ref:r=>{Qt(n,r),Qt(e,r)}}):E.cloneElement(t,{ref:e})}class Ka{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ft(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ft(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=$n({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,pt(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,pt(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Qa{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ft(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=$n({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,pt(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function pe(){const{dragDropManager:t}=E.useContext(Dn);return _(t!=null,"Expected drag drop context"),t}function Za(t,e){const n=pe(),r=E.useMemo(()=>new Ka(n.getBackend()),[n]);return se(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),se(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function ec(){const t=pe();return E.useMemo(()=>new za(t),[t])}class tc{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,s=this.monitor,{isDragging:i}=r;return i?i(s):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:s}=e;s&&s(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function nc(t,e,n){const r=E.useMemo(()=>new tc(t,e,n),[e,n]);return E.useEffect(()=>{r.spec=t},[t]),r}function rc(t){return E.useMemo(()=>{const e=t.type;return _(e!=null,"spec.type must be defined"),e},[t])}function sc(t,e,n){const r=pe(),s=nc(t,e,n),i=rc(t);se(function(){if(i!=null){const[c,u]=Wa(i,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u}},[r,e,n,s,i])}function oc(t,e){const n=Mn(t);_(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=ec(),s=Za(n.options,n.previewOptions);return sc(n,r,s),[Ln(n.collect,r,s),Ha(s),qa(s)]}function ic(t){return E.useMemo(()=>t.hooks.dropTarget(),[t])}function ac(t){const e=pe(),n=E.useMemo(()=>new Qa(e.getBackend()),[e]);return se(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function cc(){const t=pe();return E.useMemo(()=>new Va(t),[t])}function uc(t){const{accept:e}=t;return E.useMemo(()=>(_(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class lc{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function dc(t,e){const n=E.useMemo(()=>new lc(t,e),[e]);return E.useEffect(()=>{n.spec=t},[t]),n}function fc(t,e,n){const r=pe(),s=dc(t,e),i=uc(t);se(function(){const[c,u]=Ga(i,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u},[r,e,s,n,i.map(a=>a.toString()).join("|")])}function pc(t,e){const n=Mn(t),r=cc(),s=ac(n.options);return fc(n,r,s),[Ln(n.collect,r,s),ic(s)]}function Fn(t){let e=null;return()=>(e==null&&(e=t()),e)}function hc(t,e){return t.filter(n=>n!==e)}function gc(t,e){const n=new Set,r=i=>n.add(i);t.forEach(r),e.forEach(r);const s=[];return n.forEach(i=>s.push(i)),s}class mc{enter(e){const n=this.entered.length,r=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=gc(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=hc(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class xc{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const s=this.config.exposeProperties[r];s!=null&&(n[r]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Un="__NATIVE_FILE__",Hn="__NATIVE_URL__",qn="__NATIVE_TEXT__",zn="__NATIVE_HTML__",Zt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Un,HTML:zn,TEXT:qn,URL:Hn},Symbol.toStringTag,{value:"Module"}));function Ze(t,e,n){const r=e.reduce((s,i)=>s||t.getData(i),"");return r??n}const ht={[Un]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[zn]:{exposeProperties:{html:(t,e)=>Ze(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Hn]:{exposeProperties:{urls:(t,e)=>Ze(t,e,"").split(`
11
+ `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[qn]:{exposeProperties:{text:(t,e)=>Ze(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function vc(t,e){const n=ht[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new xc(n);return r.loadDataTransfer(e),r}function et(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(ht).filter(n=>{const r=ht[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const Ec=Fn(()=>/firefox/i.test(navigator.userAgent)),Vn=Fn(()=>!!window.safari);class en{interpolate(e){const{xs:n,ys:r,c1s:s,c2s:i,c3s:a}=this;let c=n.length-1;if(e===n[c])return r[c];let u=0,l=a.length-1,d;for(;u<=l;){d=Math.floor(.5*(u+l));const x=n[d];if(x<e)u=d+1;else if(x>e)l=d-1;else return r[d]}c=Math.max(0,l);const p=e-n[c],v=p*p;return r[c]+s[c]*p+i[c]*v+a[c]*p*v}constructor(e,n){const{length:r}=e,s=[];for(let x=0;x<r;x++)s.push(x);s.sort((x,m)=>e[x]<e[m]?-1:1);const i=[],a=[];let c,u;for(let x=0;x<r-1;x++)c=e[x+1]-e[x],u=n[x+1]-n[x],i.push(c),a.push(u/c);const l=[a[0]];for(let x=0;x<i.length-1;x++){const m=a[x],h=a[x+1];if(m*h<=0)l.push(0);else{c=i[x];const g=i[x+1],j=c+g;l.push(3*j/((j+g)/m+(j+c)/h))}}l.push(a[a.length-1]);const d=[],p=[];let v;for(let x=0;x<l.length-1;x++){v=a[x];const m=l[x],h=1/i[x],g=m+l[x+1]-v-v;d.push((v-m-g)*h),p.push(g*h*h)}this.xs=e,this.ys=n,this.c1s=l,this.c2s=d,this.c3s=p}}const jc=1;function Gn(t){const e=t.nodeType===jc?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Re(t){return{x:t.clientX,y:t.clientY}}function bc(t){var e;return t.nodeName==="IMG"&&(Ec()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function yc(t,e,n,r){let s=t?e.width:n,i=t?e.height:r;return Vn()&&t&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function Sc(t,e,n,r,s){const i=bc(e),c=Gn(i?t:e),u={x:n.x-c.x,y:n.y-c.y},{offsetWidth:l,offsetHeight:d}=t,{anchorX:p,anchorY:v}=r,{dragPreviewWidth:x,dragPreviewHeight:m}=yc(i,e,l,d),h=()=>{let I=new en([0,.5,1],[u.y,u.y/d*m,u.y+m-d]).interpolate(v);return Vn()&&i&&(I+=(window.devicePixelRatio-1)*m),I},g=()=>new en([0,.5,1],[u.x,u.x/l*x,u.x+x-l]).interpolate(p),{offsetX:j,offsetY:b}=s,y=j===0||j,D=b===0||b;return{x:y?j:g(),y:D?b:h()}}class _c{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function wc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){wc(t,s,n[s])})}return t}class Rc{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const s=a=>this.handleDragStart(a,e),i=a=>this.handleSelectStart(a);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",s),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",s),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=a=>this.handleDragEnter(a,e),s=a=>this.handleDragOver(a,e),i=a=>this.handleDrop(a,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",s),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",s),n.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return tn({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return tn({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Zt).some(n=>Zt[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=vc(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&Gn(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=Re(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:c}=s,u=et(c);if(this.monitor.isDragging()){if(c&&typeof c.setDragImage=="function"){const d=this.monitor.getSourceId(),p=this.sourceNodes.get(d),v=this.sourcePreviewNodes.get(d)||p;if(v){const{anchorX:x,anchorY:m,offsetX:h,offsetY:g}=this.getCurrentSourcePreviewNodeOptions(),y=Sc(p,v,a,{anchorX:x,anchorY:m},{offsetX:h,offsetY:g});c.setDragImage(v,y.x,y.y)}}try{c==null||c.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(c&&!c.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:c}=s,u=et(c);u&&this.beginDragNativeItem(u,c)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:Re(s)}),i.some(c=>this.monitor.canDropOnTarget(c))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=Re(s),this.scheduleHover(i),(i||[]).some(c=>this.monitor.canDropOnTarget(c))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else et(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:Re(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new _c(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new mc(this.isNodeInDocument)}}const Oc=function(e,n,r){return new Rc(e,n,r)},Tc="_layers_62wod_1",Dc="_block_62wod_8",Cc="_dragging_62wod_23",Nc="_active_62wod_31",Ic="_add_62wod_35",Pc="_button_62wod_47",kc="_empty_62wod_60",Ac="_title_62wod_72",Bc="_icon_62wod_79",Lc="_text_62wod_83",Mc="_highlight_62wod_89",V={layers:Tc,block:Dc,dragging:Cc,active:Nc,add:Ic,button:Pc,empty:kc,title:Ac,icon:Bc,text:Lc,highlight:Mc},$c=({id:t,name:e,index:n,moveBlock:r,onClick:s})=>{const{currentPage:i,pages:a}=o.usePagesStore(),{activeBlock:c}=o.usePreviewStore(),{showPreview:u,hidePreview:l,showModal:d,hideModal:p,clearHideTimeout:v,startHideTimeout:x,hoverBlockId:m,isModalVisible:h}=o.useSubmodalStore(),{setPositionBlock:g}=o.useLayersStore(),[j,b]=E.useState(!1),y=()=>{h&&p(),u(t),b(!0),v()},D=w=>{w.stopPropagation(),l(),d(t),v(),g(n+1)},R=()=>{h?x():(b(!1),l())};E.useEffect(()=>{h||b(!1)},[h]);const[,I]=pc({accept:"block",hover(w){w.index!==n&&(r(a[i].name,w.index,n),w.index=n)}}),[{isDragging:P},U]=oc({type:"block",item:{id:t,index:n},collect:w=>({isDragging:w.isDragging()})});return o.jsxRuntimeExports.jsxs("div",{ref:w=>U(I(w)),className:o.clx(V.block,{[V.dragging]:P,[V.active]:!P&&c===t}),onClick:()=>s(t),onMouseEnter:y,onMouseLeave:R,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"cards"}),o.jsxRuntimeExports.jsx("span",{children:e}),(j||m===t)&&!P&&o.jsxRuntimeExports.jsx("div",{className:V.add,children:o.jsxRuntimeExports.jsx("button",{className:V.button,onClick:w=>D(w),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"plus",fill:"#fff"})})})]})},Fc=()=>{const{setActiveBlock:t}=o.useNavbarStore();return o.jsxRuntimeExports.jsxs("div",{className:V.empty,children:[o.jsxRuntimeExports.jsx("div",{className:V.icon,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"layers",width:32,height:32,fill:"#757575"})}),o.jsxRuntimeExports.jsx("div",{className:V.title,children:"Layers is empty"}),o.jsxRuntimeExports.jsxs("div",{className:V.text,children:["Try adding"," ",o.jsxRuntimeExports.jsx("span",{className:V.highlight,onClick:()=>t({icon:"plus",name:"Add"}),children:"sections"})," ","and recreate your own design"]})]})},Uc=()=>{const{blocks:t,setCurrentBlock:e,moveBlock:n}=o.useLayersStore(),{currentPage:r,pages:s}=o.usePagesStore();function i(a){e(a)}return o.jsxRuntimeExports.jsx(Aa,{backend:Oc,children:o.jsxRuntimeExports.jsxs("div",{className:V.layers,children:[t[s[r].name]&&Object.keys(t[s[r].name]).map((a,c)=>o.jsxRuntimeExports.jsx($c,{id:a,name:t[s[r].name][a].name,index:c,moveBlock:n,onClick:i},a)),(!t[s[r].name]||Object.keys(t[s[r].name]).length===0)&&o.jsxRuntimeExports.jsx(Fc,{})]})})},Hc=()=>{const{settings:t}=o.useSettingsStore();return t==null?void 0:t.renderSettings()},qc="_theme_1xj36_1",zc="_block_1xj36_6",Vc="_name_1xj36_20",tt={theme:qc,block:zc,name:Vc},Gc=()=>{const{setActiveBlock:t}=o.useThemeSettingsStore();function e(n){t(n)}return o.jsxRuntimeExports.jsx("div",{className:tt.theme,children:Kn.map(n=>o.jsxRuntimeExports.jsxs("div",{onClick:()=>e(n),className:o.clx(tt.block),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:n.icon}),o.jsxRuntimeExports.jsx("span",{className:tt.name,children:n.name}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-right"})]},n.icon))})},Wc="_back_1m2pj_1",Yc="_render_1m2pj_8",Jc="_open_1m2pj_23",Xc="_close_1m2pj_27",Kc="_clicked_1m2pj_31",Qc="_title_1m2pj_35",Zc="_button_1m2pj_42",eu="_settings_1m2pj_47",tu="_buttons_1m2pj_51",nu="_deleteButton_1m2pj_57",K={back:Wc,render:Yc,open:Jc,close:Xc,clicked:Kc,title:Qc,button:Zc,settings:eu,buttons:tu,deleteButton:nu},ru=({block:t})=>{if(!t)return;const{blocks:e,sourceBlocks:n,activeBlock:r}=o.useBlocksStore(),{currentBlock:s}=o.useLayersStore();if(!r&&!s)return null;if(t!=null&&t.name){const i=e[t.name],a=t.value;for(const c in a)i[c]=a[c];return i.renderSettings()}else{const i=n[r];for(const a in i)t[a]=i[a];return t.renderSettings()}},su=t=>{var D;const{isAdd:e}=t,[n,r]=E.useState(!1),{setActiveBlock:s}=o.useNavbarStore(),{blocks:i,activeBlock:a,setActiveBlock:c}=o.useBlocksStore(),{blocks:u,addBlock:l,editBlock:d,currentBlock:p,setCurrentBlock:v,removeBlock:x,setPositionBlock:m}=o.useLayersStore(),{currentPage:h,pages:g}=o.usePagesStore();function j(){c(null),v(null),setTimeout(()=>{r(!1)},150)}function b(){j(),s({name:"Layers",icon:"layers"})}function y(){return e?i[a]:i[u[g[h].name]&&u[g[h].name][p]?u[g[h].name][p].name:"null"]}return o.jsxRuntimeExports.jsxs("div",{className:o.clx(K.render,{[K.open]:y(),[K.close]:!y(),[K.clicked]:n}),children:[o.jsxRuntimeExports.jsxs("div",{className:K.back,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:j}),o.jsxRuntimeExports.jsx("h3",{className:K.title,children:a||u[g[h].name]&&((D=u[g[h].name][p])==null?void 0:D.name)||"Loading"})]}),o.jsxRuntimeExports.jsx("div",{className:K.settings,children:y()?o.jsxRuntimeExports.jsx(ru,{block:e?y():u[g[h].name][p]}):o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:"Loading"})}),o.jsxRuntimeExports.jsxs("div",{className:K.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{style:{width:"100%"},onClick:()=>{r(!0);const R=y();e?(l(g[h].name,{name:a,value:{...R}}),m(null)):d(g[h].name,p,{name:u[g[h].name][p].name,value:{...R}}),b()},children:e?"Add Section":"Edit Section"}),!e&&o.jsxRuntimeExports.jsx("button",{onClick:()=>{r(!0),x(g[h].name,p),setTimeout(()=>{r(!1)},150)},className:K.deleteButton,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",hoverable:!0})})]})]})},ou="_settings_1r85j_1",iu="_open_1r85j_16",au="_close_1r85j_20",cu="_header_1r85j_24",uu="_title_1r85j_30",lu="_addButton_1r85j_37",me={settings:ou,open:iu,close:au,header:cu,title:uu,addButton:lu},du="_wrapper_n1a7x_1",fu="_category_n1a7x_5",pu="_categoryTitle_n1a7x_10",hu="_color_n1a7x_16",gu="_content_n1a7x_24",mu="_preview_n1a7x_32",ae={wrapper:du,category:fu,categoryTitle:pu,color:hu,content:gu,preview:mu},xu=()=>{const{themeSettings:t,updateColor:e}=o.useThemeSettingsStore();async function n(s,i,a){e(s,i,a)}const r=E.useMemo(()=>{const s={};return Object.entries(t.colors).forEach(([i,a])=>{Object.entries(a).forEach(([c,u])=>{s[u]||(s[u]=[]),s[u].push(`${i}-${c}`)})}),Object.keys(s).filter(i=>s[i].length>1)},[t.colors]);return o.jsxRuntimeExports.jsx("div",{className:ae.wrapper,children:Object.entries(t.colors).map(([s,i])=>o.jsxRuntimeExports.jsxs("div",{className:ae.category,children:[o.jsxRuntimeExports.jsx("h2",{className:ae.categoryTitle,children:Y(s)}),Object.entries(i).map(([a,c])=>o.jsxRuntimeExports.jsxs("div",{className:ae.color,children:[o.jsxRuntimeExports.jsxs("div",{className:ae.content,children:[o.jsxRuntimeExports.jsx("div",{className:ae.preview,style:{background:c}}),o.jsxRuntimeExports.jsx(o.ColorPicker,{title:Y(a),initialColor:c,onChange:u=>n(s,a,u)})]}),r.includes(c)&&o.jsxRuntimeExports.jsx(o.Tip,{type:"warning",message:"To avoid contrast problems, please use a different color",style:{marginBottom:12}})]},a))]},s))})},vu="_wrapper_kb55x_2",Eu="_category_kb55x_6",ju="_categoryTitle_kb55x_11",bu="_color_kb55x_17",yu="_name_kb55x_23",Su="_content_kb55x_28",_u="_label_kb55x_34",wu="_input_kb55x_45",Ru="_title_kb55x_71",Ou="_field_kb55x_79",Tu="_alignments_kb55x_89",Du="_lineField_kb55x_95",Cu="_style_kb55x_101",Nu="_header_kb55x_108",W={wrapper:vu,category:Eu,categoryTitle:ju,color:bu,name:yu,content:Su,label:_u,input:wu,title:Ru,field:Ou,alignments:Tu,lineField:Du,style:Cu,header:Nu},Iu=["left","center","right"],Pu=["solid","dashed"],Oe=t=>{const{title:e,children:n,rightAddon:r}=t;return o.jsxRuntimeExports.jsxs("div",{className:W.field,children:[o.jsxRuntimeExports.jsxs("div",{className:W.header,children:[o.jsxRuntimeExports.jsx("h4",{children:e}),r]}),n]})},ku=()=>{const{themeSettings:t,updateInput:e}=o.useThemeSettingsStore(),n=E.useMemo(()=>t.inputs,[t]),r=(i,a,c)=>{e(i,a,c)},s=i=>a=>{e(i,a,"color")};return o.jsxRuntimeExports.jsxs("div",{className:W.wrapper,children:[o.jsxRuntimeExports.jsxs(Oe,{title:"General",children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Height (px)",value:String(n.general.height),onChange:i=>r("general",i,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Input,{label:"Style name",value:n.general.name,onChange:i=>r("general",i,"name")}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",onChange:i=>r("general",i,"size"),value:String(n.general.size),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:Y(n.general.color),onChange:s("general"),title:"Font Color",labelStyle:"secondary"})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Field Fill",rightAddon:o.jsxRuntimeExports.jsx("div",{className:W.switch,children:o.jsxRuntimeExports.jsx(o.Switch,{onChange:i=>r("field",i,"active"),current:n.field.active})}),children:[o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:Y(n.field.color),onChange:s("field"),title:"Color",labelStyle:"secondary"}),o.jsxRuntimeExports.jsx(o.Input,{label:"Opacity (%)",value:String(n.field.opacity),onChange:i=>r("field",i,"opacity"),type:"number",min:0})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Border",rightAddon:o.jsxRuntimeExports.jsx("div",{className:W.switch,children:o.jsxRuntimeExports.jsx(o.Switch,{onChange:i=>r("border",i,"active"),current:n.border.active})}),children:[o.jsxRuntimeExports.jsxs("div",{className:W.lineField,children:[o.jsxRuntimeExports.jsxs("div",{className:W.style,children:[o.jsxRuntimeExports.jsx("span",{className:W.title,children:"Style"}),o.jsxRuntimeExports.jsx(o.Picker,{items:Pu,selectedItem:n.border.style,onSelect:i=>r("border",i,"style"),getIconName:i=>`border-${i}`})]}),o.jsxRuntimeExports.jsx(o.Input,{label:"Radius (px)",value:String(n.border.radius),onChange:i=>r("border",i,"radius"),type:"number",min:0})]}),o.jsxRuntimeExports.jsx(o.Input,{label:"Thickness (px)",value:String(n.border.thickness),onChange:i=>r("border",i,"thickness"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:Y(n.border.color),onChange:s("border"),title:"Color",labelStyle:"secondary"})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Label",children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Line Height (px)",value:String(n.label.height),onChange:i=>r("label",i,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",onChange:i=>r("label",i,"size"),value:String(n.label.size),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:Y(n.label.color),onChange:s("label"),title:"Color",labelStyle:"secondary"}),o.jsxRuntimeExports.jsxs("div",{className:W.alignments,children:[o.jsxRuntimeExports.jsx("h4",{className:W.title,children:"Alignment Type"}),o.jsxRuntimeExports.jsx(o.Picker,{items:Iu,selectedItem:n.label.alignment,onSelect:i=>r("label",i,"alignment"),getIconName:i=>`align-${i}`})]})]})]})},Au="_wrapper_k9on2_1",Bu="_category_k9on2_5",Lu="_categoryTitle_k9on2_10",Mu="_font_k9on2_16",$u="_content_k9on2_36",Fu="_icon_k9on2_42",Uu="_paragraph_k9on2_51",Hu="_deleteIcon_k9on2_55",qu="_iconButton_k9on2_62",Q={wrapper:Au,category:Bu,categoryTitle:Lu,font:Mu,content:$u,icon:Fu,paragraph:Uu,deleteIcon:Hu,iconButton:qu},zu=t=>{const{font:e,size:n,id:r,category:s}=t,{setActiveFont:i}=o.useThemeSettingsStore();return o.jsxRuntimeExports.jsxs("div",{className:Q.font,onClick:()=>i(r),children:[o.jsxRuntimeExports.jsx("div",{className:o.clx(Q.icon,{[Q.paragraph]:s==="paragraph"}),children:o.jsxRuntimeExports.jsx(o.Icon,{name:s})}),o.jsxRuntimeExports.jsxs("div",{className:Q.content,children:[o.jsxRuntimeExports.jsx("h2",{className:Q.categoryTitle,children:Y(r)}),o.jsxRuntimeExports.jsx("span",{className:Q.value,children:`${e}, ${n}px`})]})]})},Vu=()=>{const{themeSettings:t,setActiveFont:e,activeBlock:n}=o.useThemeSettingsStore();E.useEffect(()=>(r(),()=>{r()}),[]);function r(){e(null)}if(n!=null&&n.name)return o.jsxRuntimeExports.jsx("div",{className:Q.wrapper,children:Object.entries(t.fonts).map(([s,i])=>o.jsxRuntimeExports.jsxs("div",{className:Q.category,children:[o.jsxRuntimeExports.jsx("h2",{className:Q.categoryTitle,children:Y(s)}),Object.entries(i).map(([a,c])=>o.jsxRuntimeExports.jsx(zu,{id:a,category:s,...c},a))]},s))})},Gu="_wrapper_94fpv_1",Wu="_open_94fpv_16",Yu="_close_94fpv_20",Ju="_header_94fpv_24",Xu="_title_94fpv_31",Ku="_options_94fpv_37",Qu="_clicked_94fpv_44",ce={wrapper:Gu,open:Wu,close:Yu,header:Ju,title:Xu,options:Ku,clicked:Qu},Zu=()=>{const{activeBlock:t,setActiveFont:e,activeFont:n,themeSettings:r,updateFont:s}=o.useThemeSettingsStore(),{fonts:i}=o.useFontsStore(),[a,c]=E.useState(null);function u(){e(null)}function l(p,v){a&&n&&s(a,n,v,p)}const d=E.useMemo(()=>n?r.fonts.heading[n]?(c("heading"),r.fonts.heading[n]):r.fonts.paragraph[n]?(c("paragraph"),r.fonts.paragraph[n]):(c(null),null):null,[n,r]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ce.wrapper,{[ce.open]:(t==null?void 0:t.name)==="Fonts"&&n,[ce.close]:(t==null?void 0:t.name)!=="Fonts"||!n}),children:[o.jsxRuntimeExports.jsxs("div",{className:ce.header,onClick:u,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0}),o.jsxRuntimeExports.jsx("span",{className:ce.title,children:"Font Style"})]}),n&&d&&o.jsxRuntimeExports.jsxs("div",{className:ce.options,children:[o.jsxRuntimeExports.jsx(o.Select,{label:"Font",value:d.font,onChange:p=>l(p,"font"),options:[...i.filter(p=>p!==d.font)]}),o.jsxRuntimeExports.jsx(o.Select,{label:"Size",value:String(d.size),onChange:p=>l(p,"size"),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.Select,{label:"Weight",value:String(d.weight),onChange:p=>l(p,"weight"),options:o.weightOptions})]})]})},el="_wrapper_94fpv_1",tl="_open_94fpv_16",nl="_close_94fpv_20",rl="_header_94fpv_24",sl="_title_94fpv_31",ol="_options_94fpv_37",il="_clicked_94fpv_44",ue={wrapper:el,open:tl,close:nl,header:rl,title:sl,options:ol,clicked:il},Wn=()=>{const{activeBlock:t,themeSettings:e,updateBorder:n,setActiveBlock:r}=o.useThemeSettingsStore();function s(c,u){n(u,c)}function i(){r(null)}const a=E.useMemo(()=>e.borders,[e]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ue.wrapper,{[ue.open]:(t==null?void 0:t.name)==="Borders",[ue.close]:(t==null?void 0:t.name)!=="Borders"}),children:[o.jsxRuntimeExports.jsxs("div",{className:ue.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),o.jsxRuntimeExports.jsx("span",{className:ue.title,children:"Borders Style"})]}),o.jsxRuntimeExports.jsxs("div",{className:ue.options,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Input,{label:"Border Thickness (px)",value:String(a.thickness),onChange:c=>s(Number(c),"thickness"),type:"number",min:0})]})]})},al="_wrapper_1j33r_1",cl="_open_1j33r_16",ul="_close_1j33r_20",ll="_header_1j33r_24",dl="_title_1j33r_31",fl="_options_1j33r_37",pl="_clicked_1j33r_44",hl="_label_1j33r_48",gl="_alignments_1j33r_55",ml="_blocks_1j33r_61",xl="_alignment_1j33r_55",vl="_active_1j33r_75",H={wrapper:al,open:cl,close:ul,header:ll,title:dl,options:fl,clicked:pl,label:hl,alignments:gl,blocks:ml,alignment:xl,active:vl},El=["left","center","right"],Yn=()=>{const{activeBlock:t,themeSettings:e,updateButton:n,setActiveBlock:r}=o.useThemeSettingsStore();function s(c,u){n(u,c)}function i(){r(null)}const a=E.useMemo(()=>e.buttons,[e]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(H.wrapper,{[H.open]:(t==null?void 0:t.name)==="Buttons",[H.close]:(t==null?void 0:t.name)!=="Buttons"}),children:[o.jsxRuntimeExports.jsxs("div",{className:H.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),o.jsxRuntimeExports.jsx("span",{className:H.title,children:"Buttons Style"})]}),a&&o.jsxRuntimeExports.jsxs("div",{className:H.options,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Height (px)",value:String(a.height),onChange:c=>s(c,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",value:String(a.size),onChange:c=>s(c,"size"),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),o.jsxRuntimeExports.jsxs("div",{className:H.alignments,children:[o.jsxRuntimeExports.jsx("h4",{className:H.label,children:"Alignment Type"}),o.jsxRuntimeExports.jsx("div",{className:H.blocks,children:El.map(c=>o.jsxRuntimeExports.jsx("div",{className:o.clx(H.alignment,{[H.active]:a.alignment===c}),onClick:()=>{s(c,"alignment")},children:o.jsxRuntimeExports.jsx(o.Icon,{name:`align-${c}`,fill:a.alignment===c?"#252525":"#757575"})},c))})]})]})]})},jl=()=>{const{activeBlock:t}=o.useThemeSettingsStore();return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(t==null?void 0:t.name)==="Fonts"&&o.jsxRuntimeExports.jsx(Zu,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Wn,{}),(t==null?void 0:t.name)==="Buttons"&&o.jsxRuntimeExports.jsx(Yn,{})]})},bl=()=>{const{activeBlock:t,setActiveBlock:e}=o.useThemeSettingsStore(),{activeBlock:n}=o.useNavbarStore();function r(){e(null)}return o.jsxRuntimeExports.jsxs("div",{className:o.clx(me.settings,{[me.open]:t,[me.close]:!t||n.name!=="Theme"}),children:[o.jsxRuntimeExports.jsxs("div",{className:me.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:r}),o.jsxRuntimeExports.jsx("span",{className:me.title,children:t==null?void 0:t.name})]}),(t==null?void 0:t.name)==="Fonts"&&o.jsxRuntimeExports.jsx(Vu,{}),(t==null?void 0:t.name)==="Colors"&&o.jsxRuntimeExports.jsx(xu,{}),(t==null?void 0:t.name)==="Inputs"&&o.jsxRuntimeExports.jsx(ku,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Wn,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Yn,{}),o.jsxRuntimeExports.jsx(jl,{})]})},yl=()=>{const{activeBlock:t}=o.useNavbarStore(),{activeBlock:e}=o.useBlocksStore();function n(){switch(t.name){case"Layers":return"Layers";case"Add":return"Add Sections";case"Theme":return"Theme Settings";case"Settings":return"Settings"}}return o.jsxRuntimeExports.jsxs("div",{className:qt.sidebar,children:[o.jsxRuntimeExports.jsx("h3",{className:qt.title,children:n()}),t.name==="Layers"&&o.jsxRuntimeExports.jsx(Uc,{}),t.name==="Add"&&o.jsxRuntimeExports.jsx(Tn,{}),o.jsxRuntimeExports.jsx(su,{isAdd:!!e}),o.jsxRuntimeExports.jsx(bl,{}),t.name==="Theme"&&o.jsxRuntimeExports.jsx(Gc,{}),t.name==="Settings"&&o.jsxRuntimeExports.jsx(Hc,{})]})},Sl="_wrapper_jjfwh_1",_l="_header_jjfwh_12",wl="_content_jjfwh_21",Rl="_buttons_jjfwh_29",Ol="_cancel_jjfwh_35",Tl="_label_jjfwh_40",Dl="_description_jjfwh_41",Cl="_preview_jjfwh_49",Nl="_block_jjfwh_55",Il="_slug_jjfwh_63",Pl="_title_jjfwh_69",q={wrapper:Sl,header:_l,content:wl,buttons:Rl,cancel:Ol,label:Tl,description:Dl,preview:Cl,block:Nl,slug:Il,title:Pl},kl=()=>{var P,U,w,C,N,k;const{setIsOpenModal:t,pages:e,createPage:n,updatePage:r,isEdit:s,setIsEdit:i,editedPage:a,setEditedPage:c}=o.usePagesStore(),{createPage:u,updatePage:l}=o.useLayersStore(),[d,p]=E.useState(a?(P=e[a])==null?void 0:P.path:""),[v,x]=E.useState(a?(U=e[a])==null?void 0:U.name:""),[m,h]=E.useState(a?(w=e[a])==null?void 0:w.seo.description:""),[g,j]=E.useState(a?(C=e[a])==null?void 0:C.visibility:"public");function b(){p(""),x(""),h(""),j("public"),i(!1),c(null)}function y(){b(),t(!1)}function D(O){return O[0]==="/"?O:"/"+O}function R(){n({path:D(d),name:v||d,icon:"file",seo:{title:v,description:m},visibility:g}),u(v),y()}function I(){l(e[a].name,v||d),r(a,{path:D(d),name:v||d,icon:e[a].icon||"file",seo:{title:v,description:m},visibility:g}),y()}return o.jsxRuntimeExports.jsxs("div",{className:q.wrapper,onClick:O=>O.stopPropagation(),children:[o.jsxRuntimeExports.jsxs("div",{className:q.header,children:[o.jsxRuntimeExports.jsxs("h2",{children:[s?"Edit":"Create"," Blank Page"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"x",fill:"#757575",hoverable:!0,onClick:y})]}),o.jsxRuntimeExports.jsxs("div",{className:q.content,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Page Slug",onChange:O=>p(O),value:d,placeholder:"path-to-page",disabled:!!(a&&((N=e[a])!=null&&N.name)&&o.defaultPageNames.includes(e[a].name)),required:!0,regex:"^.+$"}),o.jsxRuntimeExports.jsx(o.Input,{label:"Page Title",onChange:O=>x(O),value:v,placeholder:"Contact us",disabled:!!(a&&((k=e[a])!=null&&k.name)&&o.defaultPageNames.includes(e[a].name))}),o.jsxRuntimeExports.jsx(o.Textarea,{label:"Description",onChange:O=>h(O),value:m,placeholder:"Contact us at any time of the day or night. You are always welcome",maxLength:150}),o.jsxRuntimeExports.jsx(o.Radio,{label:"Visibility",defaultValue:g,options:[{value:"public",label:"Public"},{value:"private",label:"Private"}],onChange:O=>j(O)}),o.jsxRuntimeExports.jsxs("div",{className:q.preview,children:[o.jsxRuntimeExports.jsx("span",{className:q.label,children:"Preview"}),o.jsxRuntimeExports.jsxs("div",{className:q.block,children:[o.jsxRuntimeExports.jsx("span",{className:q.slug,children:d||"yoursite.url"}),o.jsxRuntimeExports.jsx("span",{className:q.title,children:v||"My Blank Page"}),o.jsxRuntimeExports.jsx("span",{className:q.description,children:m||"It is My Description"})]})]})]}),o.jsxRuntimeExports.jsxs("div",{className:q.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{className:q.cancel,onClick:y,children:"Cancel"}),o.jsxRuntimeExports.jsx(o.Button,{onClick:s?I:R,disabled:d.length===0,children:s?"Update":"Create"})]})]})},Al="_layout_kjedu_1",Bl="_main_kjedu_8",Ll="_content_kjedu_15",nt={layout:Al,main:Bl,content:Ll},Ml=()=>{const{isOpenModal:t,setIsOpenModal:e}=o.usePagesStore();return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:nt.layout,children:[o.jsxRuntimeExports.jsx(jo,{}),o.jsxRuntimeExports.jsxs("main",{className:nt.main,children:[o.jsxRuntimeExports.jsx(fo,{}),o.jsxRuntimeExports.jsxs("div",{className:nt.content,children:[o.jsxRuntimeExports.jsx(yl,{}),o.jsxRuntimeExports.jsx(di,{})]})]})]}),t&&o.jsxRuntimeExports.jsx(o.Modal,{close:e,children:o.jsxRuntimeExports.jsx(kl,{})})]})};async function le(t,e){const n=localStorage.getItem("shopId")||void 0,r=`${Qn}/${t}/builder/shops/${n}/${e}`,s=localStorage.getItem("accessToken")||void 0;return(await T.get(r,{headers:{Authorization:`Bearer ${s}`}})).data}async function $l(){try{const[t,e,n,r,s,i]=await Promise.allSettled([le("v1","general"),le("v1","faqs"),le("v1","listings"),le("v1","products"),le("v1","reviews"),le("v1","categories")]);return{general:t,faqs:e,listings:n,products:r,reviews:s,categories:i}}catch(t){throw console.error("Error fetching page data:",t),t}}async function Fl(){try{const{data:t}=await T.get(`${Zn}?key=undefined`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}const Ul=t=>{const{blocks:e,settings:n}=t,{setBlocks:r,setSourceBlocks:s}=o.useBlocksStore(),{fonts:i,setFonts:a}=o.useFontsStore(),{setSettings:c}=o.useSettingsStore(),{setPageContext:u}=o.usePagesStore();return E.useEffect(()=>{const l={};Object.keys(e).map(p=>{l[p]={...e[p]}}),c(n),s(l),r(e),(async()=>{if(i.length===0){const x=await Fl();a([...x.map(m=>m.family)])}let p={listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0};const v=await $l();Object.keys(v).map(x=>{const m=x;p[m]=v[m].value.data}),u(p)})()},[]),o.jsxRuntimeExports.jsx(Ml,{})};exports.Builder=Ul;