@billgangcom/theme-lib 1.25.0 → 1.27.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.
- package/dist/App.d.ts +1 -1
- package/dist/abstractions/Variable.d.ts +4 -1
- package/dist/{components → builder/components}/Sidebar/AddSections/RenderBlockSettings/settings.d.ts +1 -1
- package/dist/{constants → builder/constants}/blocks.d.ts +1 -1
- package/dist/{constants → builder/constants}/index.d.ts +1 -0
- package/dist/builder/constants/notification.d.ts +4 -0
- package/dist/{constants → builder/constants}/theme-settings.d.ts +43 -11
- package/dist/{store → builder/store}/index.d.ts +1 -0
- package/dist/{store → builder/store}/useBlocksStore.d.ts +1 -1
- package/dist/{store → builder/store}/useDeviceStore.d.ts +1 -1
- package/dist/{store → builder/store}/useLayersStore.d.ts +1 -1
- package/dist/{store → builder/store}/useLayoutStore.d.ts +1 -1
- package/dist/{store → builder/store}/useNavbarStore.d.ts +1 -1
- package/dist/builder/store/useNotificationStore.d.ts +7 -0
- package/dist/{store → builder/store}/usePagesStore.d.ts +2 -2
- package/dist/{store → builder/store}/useSettingsStore.d.ts +1 -1
- package/dist/{store → builder/store}/useThemeSettingsStore.d.ts +1 -1
- package/dist/{shared → builder}/ui/Icon/index.d.ts +1 -1
- package/dist/{shared → builder}/ui/Picker/index.d.ts +1 -1
- package/dist/{shared → builder}/ui/Tip/index.d.ts +1 -1
- package/dist/builder/ui/index.d.ts +6 -0
- package/dist/builder/utils/api.d.ts +21 -0
- package/dist/builder/utils/index.d.ts +2 -0
- package/dist/builder.cjs.js +14 -25
- package/dist/builder.es.js +1252 -1040
- package/dist/{index-BI8lyvsO.js → index-BJq5RiR5.js} +10199 -10306
- package/dist/index-BlxXgV9a.cjs +146 -0
- package/dist/lib/api.d.ts +16 -0
- package/dist/{shared/lib → lib}/index.d.ts +0 -1
- package/dist/ui/Button/index.d.ts +13 -0
- package/dist/ui/ButtonsSettings/index.d.ts +1 -1
- package/dist/ui/Input/index.d.ts +21 -0
- package/dist/ui/ListingSelector/index.d.ts +8 -3
- package/dist/ui/ListingSelector/popup.d.ts +11 -4
- package/dist/ui/Textarea/index.d.ts +11 -0
- package/dist/ui/index.d.ts +7 -2
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1045 -887
- package/package.json +1 -1
- package/dist/index-BaWZKIMU.cjs +0 -146
- package/dist/shared/lib/api.d.ts +0 -16
- package/dist/shared/ui/index.d.ts +0 -16
- /package/dist/{components → builder/components}/Header/Buttons/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/Devices/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/PreviewButton/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/Settings/Language/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/Settings/Pages/ModifyPage/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/Settings/Pages/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/Settings/Zoom/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/Settings/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/SwitchTheme/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Header/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Navbar/ExitButton/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Navbar/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Preview/PreviewBlockSidebar/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Preview/PreviewContent/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Preview/PreviewHeader/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Preview/Render/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Preview/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/AddSections/RenderBlockSettings/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/AddSections/SearchSections/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/AddSections/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Layers/FooterLayer/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Layers/HeaderLayer/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Layers/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Settings/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Colors/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Fonts/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Inputs/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Item/Border/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Item/Button/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Item/Font/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Item/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/Theme/index.d.ts +0 -0
- /package/dist/{components → builder/components}/Sidebar/index.d.ts +0 -0
- /package/dist/{components → builder/components}/index.d.ts +0 -0
- /package/dist/{components → builder/components}/layout.d.ts +0 -0
- /package/dist/{constants → builder/constants}/api.d.ts +0 -0
- /package/dist/{constants → builder/constants}/device.d.ts +0 -0
- /package/dist/{constants → builder/constants}/font.d.ts +0 -0
- /package/dist/{constants → builder/constants}/icon.d.ts +0 -0
- /package/dist/{constants → builder/constants}/navbar.d.ts +0 -0
- /package/dist/{constants → builder/constants}/pages.d.ts +0 -0
- /package/dist/{store → builder/store}/useChooseImageStore.d.ts +0 -0
- /package/dist/{store → builder/store}/useColorPickerStore.d.ts +0 -0
- /package/dist/{store → builder/store}/useFontsStore.d.ts +0 -0
- /package/dist/{store → builder/store}/useHistoryState.d.ts +0 -0
- /package/dist/{store → builder/store}/usePreviewStore.d.ts +0 -0
- /package/dist/{store → builder/store}/useShareLinkStore.d.ts +0 -0
- /package/dist/{store → builder/store}/useSubmodalStore.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Button/index.d.ts +0 -0
- /package/dist/{ui → builder/ui}/ChooseImage/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/ColorPicker/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/ColorPicker/modal.d.ts +0 -0
- /package/dist/{shared → builder}/ui/ErrorableBlock/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Input/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Loader/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Modal/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Radio/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Select/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Submodal/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Switch/index.d.ts +0 -0
- /package/dist/{shared → builder}/ui/Textarea/index.d.ts +0 -0
- /package/dist/{shared/lib → builder/utils}/formatLabel.d.ts +0 -0
- /package/dist/{shared/lib → lib}/checkAuth.d.ts +0 -0
- /package/dist/{shared/lib → lib}/clearQueryParams.d.ts +0 -0
- /package/dist/{shared/lib → lib}/generateDynamicStyles.d.ts +0 -0
- /package/dist/{shared/lib → lib}/getDynamicRoutes.d.ts +0 -0
- /package/dist/{shared/lib → lib}/injectStylesToDOM.d.ts +0 -0
- /package/dist/{shared/ui → ui}/Accordion/index.d.ts +0 -0
- /package/dist/{shared/ui → ui}/Checkbox/index.d.ts +0 -0
package/dist/ui.es.js
CHANGED
|
@@ -1,53 +1,19 @@
|
|
|
1
|
-
import { j as t,
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
icon: kt,
|
|
8
|
-
open: yt,
|
|
9
|
-
content: Nt
|
|
10
|
-
}, ei = ({ title: d, content: n }) => {
|
|
11
|
-
const [e, c] = f.useState(!1), [i, l] = f.useState(0), s = f.useRef(null), o = () => {
|
|
12
|
-
c(!e);
|
|
13
|
-
};
|
|
14
|
-
return f.useEffect(() => {
|
|
15
|
-
s.current && l(e ? s.current.scrollHeight : 0);
|
|
16
|
-
}, [e]), /* @__PURE__ */ t.jsxs("div", { className: K.accordion, children: [
|
|
17
|
-
/* @__PURE__ */ t.jsxs(
|
|
18
|
-
"div",
|
|
19
|
-
{
|
|
20
|
-
className: K.header,
|
|
21
|
-
onClick: o,
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ t.jsx("h3", { children: d }),
|
|
24
|
-
/* @__PURE__ */ t.jsx("div", { className: D(K.icon, { [K.open]: e }), children: /* @__PURE__ */ t.jsx(p, { name: "CaretDown" }) })
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
/* @__PURE__ */ t.jsx(
|
|
29
|
-
"div",
|
|
30
|
-
{
|
|
31
|
-
ref: s,
|
|
32
|
-
className: K.content,
|
|
33
|
-
style: { height: `${i}px` },
|
|
34
|
-
children: /* @__PURE__ */ t.jsx("p", { children: n })
|
|
35
|
-
}
|
|
36
|
-
)
|
|
37
|
-
] });
|
|
38
|
-
}, $t = "_wrapper_9rr5j_2", Ct = "_alignmentBlock_9rr5j_8", It = "_title_9rr5j_15", Pt = "_subtitle_9rr5j_22", Tt = "_alignmentContent_9rr5j_29", Bt = "_alignments_9rr5j_37", wt = "_alignment_9rr5j_8", St = "_circle_9rr5j_58", qt = "_paddings_9rr5j_65", At = "_padding_9rr5j_65", Ot = "_input_9rr5j_84", O = {
|
|
39
|
-
wrapper: $t,
|
|
40
|
-
alignmentBlock: Ct,
|
|
1
|
+
import { j as t, I as p, a as Y, c as q, S as W, T as pt, C as rt, b as Q, D as ht, H as gt, B as dt, v as ct, u as xt, d as ft, e as ut, f as _t, M as bt, g as jt } from "./index-BJq5RiR5.js";
|
|
2
|
+
import { h as qc, L as Ac } from "./index-BJq5RiR5.js";
|
|
3
|
+
import b from "react";
|
|
4
|
+
const Nt = "_wrapper_9rr5j_2", $t = "_alignmentBlock_9rr5j_8", It = "_title_9rr5j_15", Ct = "_subtitle_9rr5j_22", wt = "_alignmentContent_9rr5j_29", Tt = "_alignments_9rr5j_37", Bt = "_alignment_9rr5j_8", Pt = "_circle_9rr5j_58", St = "_paddings_9rr5j_65", qt = "_padding_9rr5j_65", At = "_input_9rr5j_84", D = {
|
|
5
|
+
wrapper: Nt,
|
|
6
|
+
alignmentBlock: $t,
|
|
41
7
|
title: It,
|
|
42
|
-
subtitle:
|
|
43
|
-
alignmentContent:
|
|
44
|
-
alignments:
|
|
45
|
-
alignment:
|
|
46
|
-
circle:
|
|
47
|
-
paddings:
|
|
48
|
-
padding:
|
|
49
|
-
input:
|
|
50
|
-
},
|
|
8
|
+
subtitle: Ct,
|
|
9
|
+
alignmentContent: wt,
|
|
10
|
+
alignments: Tt,
|
|
11
|
+
alignment: Bt,
|
|
12
|
+
circle: Pt,
|
|
13
|
+
paddings: St,
|
|
14
|
+
padding: qt,
|
|
15
|
+
input: At
|
|
16
|
+
}, Ot = [
|
|
51
17
|
"topLeft",
|
|
52
18
|
"top",
|
|
53
19
|
"topRight",
|
|
@@ -57,9 +23,9 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
57
23
|
"bottomLeft",
|
|
58
24
|
"bottom",
|
|
59
25
|
"bottomRight"
|
|
60
|
-
],
|
|
61
|
-
const { alignment: n, padding: e, setPadding:
|
|
62
|
-
function
|
|
26
|
+
], Lt = ["left", "top", "right", "bottom"], kc = (r) => {
|
|
27
|
+
const { alignment: n, padding: e, setPadding: o, setAlignment: i } = r;
|
|
28
|
+
function a() {
|
|
63
29
|
switch (n) {
|
|
64
30
|
case "left":
|
|
65
31
|
case "topLeft":
|
|
@@ -77,8 +43,8 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
77
43
|
return "TextAlignCenter";
|
|
78
44
|
}
|
|
79
45
|
}
|
|
80
|
-
function s(
|
|
81
|
-
switch (
|
|
46
|
+
function s(c) {
|
|
47
|
+
switch (c) {
|
|
82
48
|
case "left":
|
|
83
49
|
return "AlignLeft";
|
|
84
50
|
case "right":
|
|
@@ -89,24 +55,24 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
89
55
|
return "AlignBottom";
|
|
90
56
|
}
|
|
91
57
|
}
|
|
92
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
93
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
94
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
95
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
96
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
97
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
58
|
+
return /* @__PURE__ */ t.jsxs("div", { className: D.layout, children: [
|
|
59
|
+
/* @__PURE__ */ t.jsx("h3", { className: D.title, children: "Layout" }),
|
|
60
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.alignmentBlock, children: [
|
|
61
|
+
/* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: "Alignment" }),
|
|
62
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.alignmentContent, children: [
|
|
63
|
+
/* @__PURE__ */ t.jsx("div", { className: D.alignments, children: Ot.map((c) => /* @__PURE__ */ t.jsxs(
|
|
98
64
|
"div",
|
|
99
65
|
{
|
|
100
66
|
onClick: () => {
|
|
101
|
-
i(
|
|
67
|
+
i(c);
|
|
102
68
|
},
|
|
103
|
-
className:
|
|
69
|
+
className: D.alignment,
|
|
104
70
|
children: [
|
|
105
|
-
|
|
106
|
-
|
|
71
|
+
c !== n && /* @__PURE__ */ t.jsx("div", { className: D.circle }),
|
|
72
|
+
c === n && /* @__PURE__ */ t.jsx(
|
|
107
73
|
p,
|
|
108
74
|
{
|
|
109
|
-
name:
|
|
75
|
+
name: a(),
|
|
110
76
|
fill: "#FF3F19",
|
|
111
77
|
width: 22,
|
|
112
78
|
height: 22
|
|
@@ -114,29 +80,29 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
114
80
|
)
|
|
115
81
|
]
|
|
116
82
|
},
|
|
117
|
-
|
|
83
|
+
c
|
|
118
84
|
)) }),
|
|
119
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
85
|
+
/* @__PURE__ */ t.jsx("div", { className: D.paddings, children: Lt.map((c) => /* @__PURE__ */ t.jsxs(
|
|
120
86
|
"label",
|
|
121
87
|
{
|
|
122
|
-
className:
|
|
88
|
+
className: D.padding,
|
|
123
89
|
children: [
|
|
124
90
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
125
91
|
p,
|
|
126
92
|
{
|
|
127
|
-
name: s(
|
|
93
|
+
name: s(c),
|
|
128
94
|
width: 20,
|
|
129
95
|
height: 20
|
|
130
96
|
}
|
|
131
97
|
) }),
|
|
132
98
|
/* @__PURE__ */ t.jsx(
|
|
133
|
-
|
|
99
|
+
Y,
|
|
134
100
|
{
|
|
135
101
|
type: "text",
|
|
136
|
-
value: String(e[
|
|
137
|
-
onChange: (
|
|
102
|
+
value: String(e[c]),
|
|
103
|
+
onChange: (u) => o({
|
|
138
104
|
...e,
|
|
139
|
-
[
|
|
105
|
+
[c]: Number(u)
|
|
140
106
|
}),
|
|
141
107
|
paddingless: !0,
|
|
142
108
|
borderless: !0
|
|
@@ -144,24 +110,24 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
144
110
|
)
|
|
145
111
|
]
|
|
146
112
|
},
|
|
147
|
-
|
|
113
|
+
c
|
|
148
114
|
)) })
|
|
149
115
|
] })
|
|
150
116
|
] })
|
|
151
117
|
] });
|
|
152
|
-
},
|
|
153
|
-
subtitle:
|
|
154
|
-
header:
|
|
155
|
-
text:
|
|
156
|
-
top:
|
|
157
|
-
itemsBlock:
|
|
158
|
-
},
|
|
159
|
-
typeTexts:
|
|
160
|
-
block:
|
|
161
|
-
active:
|
|
162
|
-
},
|
|
163
|
-
const { typesText: n, setTypesText: e } =
|
|
164
|
-
function
|
|
118
|
+
}, Dt = "_subtitle_1qrz9_1", zt = "_header_1qrz9_8", Mt = "_text_1qrz9_9", Et = "_top_1qrz9_17", Rt = "_itemsBlock_1qrz9_26", K = {
|
|
119
|
+
subtitle: Dt,
|
|
120
|
+
header: zt,
|
|
121
|
+
text: Mt,
|
|
122
|
+
top: Et,
|
|
123
|
+
itemsBlock: Rt
|
|
124
|
+
}, Vt = "_typeTexts_rcw8p_1", Ht = "_block_rcw8p_8", Ft = "_active_rcw8p_21", ot = {
|
|
125
|
+
typeTexts: Vt,
|
|
126
|
+
block: Ht,
|
|
127
|
+
active: Ft
|
|
128
|
+
}, Ut = ["bold", "italic", "underline", "strike-through", "code"], vt = (r) => {
|
|
129
|
+
const { typesText: n, setTypesText: e } = r;
|
|
130
|
+
function o(i) {
|
|
165
131
|
switch (i) {
|
|
166
132
|
case "bold":
|
|
167
133
|
return "TextB";
|
|
@@ -175,24 +141,24 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
175
141
|
return "TextUnderline";
|
|
176
142
|
}
|
|
177
143
|
}
|
|
178
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
144
|
+
return /* @__PURE__ */ t.jsx("div", { className: ot.typeTexts, children: Ut.map((i) => /* @__PURE__ */ t.jsx(
|
|
179
145
|
"div",
|
|
180
146
|
{
|
|
181
|
-
className:
|
|
182
|
-
[
|
|
147
|
+
className: q(ot.block, {
|
|
148
|
+
[ot.active]: n.includes(i)
|
|
183
149
|
}),
|
|
184
150
|
onClick: () => {
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const s =
|
|
151
|
+
const a = [...n];
|
|
152
|
+
if (a.includes(i)) {
|
|
153
|
+
const s = a.filter((c) => c !== i);
|
|
188
154
|
e(s);
|
|
189
155
|
} else
|
|
190
|
-
|
|
156
|
+
a.push(i), e(a);
|
|
191
157
|
},
|
|
192
158
|
children: /* @__PURE__ */ t.jsx(
|
|
193
159
|
p,
|
|
194
160
|
{
|
|
195
|
-
name:
|
|
161
|
+
name: o(i),
|
|
196
162
|
fill: n.includes(i) ? "#252525" : "#757575",
|
|
197
163
|
width: 20,
|
|
198
164
|
height: 20
|
|
@@ -201,40 +167,40 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
201
167
|
},
|
|
202
168
|
String(i)
|
|
203
169
|
)) });
|
|
204
|
-
},
|
|
170
|
+
}, Gt = (r) => {
|
|
205
171
|
const {
|
|
206
172
|
typesText: n,
|
|
207
173
|
isActiveText: e,
|
|
208
|
-
setIsActiveText:
|
|
174
|
+
setIsActiveText: o,
|
|
209
175
|
text: i,
|
|
210
|
-
setText:
|
|
176
|
+
setText: a,
|
|
211
177
|
setTypesText: s,
|
|
212
|
-
title:
|
|
213
|
-
subtitle:
|
|
214
|
-
} =
|
|
215
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
216
|
-
(
|
|
217
|
-
|
|
218
|
-
e !== void 0 &&
|
|
219
|
-
|
|
178
|
+
title: c,
|
|
179
|
+
subtitle: u = "Items"
|
|
180
|
+
} = r;
|
|
181
|
+
return /* @__PURE__ */ t.jsxs("div", { className: K.text, children: [
|
|
182
|
+
(c || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: K.top, children: [
|
|
183
|
+
c && /* @__PURE__ */ t.jsx("h3", { className: K.title, children: c }),
|
|
184
|
+
e !== void 0 && o && /* @__PURE__ */ t.jsx(
|
|
185
|
+
W,
|
|
220
186
|
{
|
|
221
187
|
current: e,
|
|
222
|
-
onChange: (
|
|
188
|
+
onChange: (y) => o(y)
|
|
223
189
|
}
|
|
224
190
|
)
|
|
225
191
|
] }),
|
|
226
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
227
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
192
|
+
/* @__PURE__ */ t.jsxs("div", { className: K.itemsBlock, children: [
|
|
193
|
+
/* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: u }),
|
|
228
194
|
/* @__PURE__ */ t.jsx(
|
|
229
|
-
|
|
195
|
+
pt,
|
|
230
196
|
{
|
|
231
|
-
onChange: (
|
|
197
|
+
onChange: (y) => a(y),
|
|
232
198
|
value: i,
|
|
233
199
|
maxLength: 150
|
|
234
200
|
}
|
|
235
201
|
),
|
|
236
202
|
/* @__PURE__ */ t.jsx(
|
|
237
|
-
|
|
203
|
+
vt,
|
|
238
204
|
{
|
|
239
205
|
typesText: n,
|
|
240
206
|
setTypesText: s
|
|
@@ -242,42 +208,42 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
242
208
|
)
|
|
243
209
|
] })
|
|
244
210
|
] });
|
|
245
|
-
},
|
|
246
|
-
subtitle:
|
|
247
|
-
header:
|
|
248
|
-
text:
|
|
249
|
-
productsBlock:
|
|
250
|
-
top:
|
|
251
|
-
itemsBlock:
|
|
252
|
-
typeTexts:
|
|
253
|
-
block:
|
|
254
|
-
active:
|
|
255
|
-
products:
|
|
256
|
-
product:
|
|
211
|
+
}, Wt = "_subtitle_cuny2_1", Xt = "_header_cuny2_8", Yt = "_text_cuny2_9", Qt = "_productsBlock_cuny2_10", Jt = "_top_cuny2_22", Kt = "_itemsBlock_cuny2_31", Zt = "_typeTexts_cuny2_37", te = "_block_cuny2_44", ee = "_active_cuny2_57", se = "_products_cuny2_10", ne = "_product_cuny2_10", ce = "_button_cuny2_76", ie = "_disabled_cuny2_87", oe = "_image_cuny2_91", ae = "_info_cuny2_98", le = "_name_cuny2_110", re = "_buttons_cuny2_114", de = "_modal_cuny2_121", ue = "_link_cuny2_141", _e = "_modalOptions_cuny2_147", B = {
|
|
212
|
+
subtitle: Wt,
|
|
213
|
+
header: Xt,
|
|
214
|
+
text: Yt,
|
|
215
|
+
productsBlock: Qt,
|
|
216
|
+
top: Jt,
|
|
217
|
+
itemsBlock: Kt,
|
|
218
|
+
typeTexts: Zt,
|
|
219
|
+
block: te,
|
|
220
|
+
active: ee,
|
|
221
|
+
products: se,
|
|
222
|
+
product: ne,
|
|
257
223
|
button: ce,
|
|
258
|
-
disabled:
|
|
259
|
-
image:
|
|
260
|
-
info:
|
|
261
|
-
name:
|
|
262
|
-
buttons:
|
|
263
|
-
modal:
|
|
264
|
-
link:
|
|
265
|
-
modalOptions:
|
|
266
|
-
},
|
|
267
|
-
const { activeItem: n, setActiveItem: e, popupPosition:
|
|
224
|
+
disabled: ie,
|
|
225
|
+
image: oe,
|
|
226
|
+
info: ae,
|
|
227
|
+
name: le,
|
|
228
|
+
buttons: re,
|
|
229
|
+
modal: de,
|
|
230
|
+
link: ue,
|
|
231
|
+
modalOptions: _e
|
|
232
|
+
}, me = (r) => {
|
|
233
|
+
const { activeItem: n, setActiveItem: e, popupPosition: o, modalOptions: i, setIsOpenModal: a } = r;
|
|
268
234
|
return /* @__PURE__ */ t.jsxs(
|
|
269
235
|
"div",
|
|
270
236
|
{
|
|
271
|
-
className:
|
|
237
|
+
className: B.modal,
|
|
272
238
|
onClick: (s) => {
|
|
273
239
|
s.stopPropagation();
|
|
274
240
|
},
|
|
275
241
|
style: {
|
|
276
|
-
top: `${
|
|
277
|
-
left: `${
|
|
242
|
+
top: `${o.top}px`,
|
|
243
|
+
left: `${o.left}px`
|
|
278
244
|
},
|
|
279
245
|
children: [
|
|
280
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
246
|
+
/* @__PURE__ */ t.jsxs("div", { className: B.top, children: [
|
|
281
247
|
/* @__PURE__ */ t.jsx("h3", { children: n.name }),
|
|
282
248
|
/* @__PURE__ */ t.jsx(
|
|
283
249
|
p,
|
|
@@ -287,60 +253,60 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
287
253
|
width: 20,
|
|
288
254
|
hoverable: !0,
|
|
289
255
|
onClick: () => {
|
|
290
|
-
e(null),
|
|
256
|
+
e(null), a(!1);
|
|
291
257
|
}
|
|
292
258
|
}
|
|
293
259
|
)
|
|
294
260
|
] }),
|
|
295
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
261
|
+
/* @__PURE__ */ t.jsx("div", { className: B.modalOptions, children: i.map((s) => {
|
|
296
262
|
if (s.type === "image")
|
|
297
263
|
return /* @__PURE__ */ t.jsx(
|
|
298
|
-
|
|
264
|
+
rt,
|
|
299
265
|
{
|
|
300
266
|
label: "Put up an attractive image",
|
|
301
|
-
onChange: (
|
|
302
|
-
const
|
|
267
|
+
onChange: (c) => {
|
|
268
|
+
const u = {
|
|
303
269
|
...n,
|
|
304
|
-
[s.field]:
|
|
270
|
+
[s.field]: c
|
|
305
271
|
};
|
|
306
|
-
e(
|
|
272
|
+
e(u);
|
|
307
273
|
}
|
|
308
274
|
},
|
|
309
275
|
String(s.field)
|
|
310
276
|
);
|
|
311
277
|
if (s.type === "text")
|
|
312
278
|
return /* @__PURE__ */ t.jsx(
|
|
313
|
-
|
|
279
|
+
Gt,
|
|
314
280
|
{
|
|
315
281
|
typesText: n[s.field.type],
|
|
316
|
-
setTypesText: (
|
|
317
|
-
const
|
|
282
|
+
setTypesText: (c) => {
|
|
283
|
+
const u = {
|
|
318
284
|
...n,
|
|
319
|
-
[s.field.type]:
|
|
285
|
+
[s.field.type]: c
|
|
320
286
|
};
|
|
321
|
-
e(
|
|
287
|
+
e(u);
|
|
322
288
|
},
|
|
323
289
|
text: n[s.field.text] || "",
|
|
324
|
-
setText: (
|
|
325
|
-
const
|
|
290
|
+
setText: (c) => {
|
|
291
|
+
const u = {
|
|
326
292
|
...n,
|
|
327
|
-
[s.field.text]:
|
|
293
|
+
[s.field.text]: c
|
|
328
294
|
};
|
|
329
|
-
e(
|
|
295
|
+
e(u);
|
|
330
296
|
},
|
|
331
297
|
subtitle: s.label
|
|
332
298
|
}
|
|
333
299
|
);
|
|
334
300
|
if (s.type === "input")
|
|
335
301
|
return /* @__PURE__ */ t.jsx(
|
|
336
|
-
|
|
302
|
+
Y,
|
|
337
303
|
{
|
|
338
|
-
onChange: (
|
|
339
|
-
const
|
|
304
|
+
onChange: (c) => {
|
|
305
|
+
const u = {
|
|
340
306
|
...n,
|
|
341
|
-
[s.field]:
|
|
307
|
+
[s.field]: c
|
|
342
308
|
};
|
|
343
|
-
e(
|
|
309
|
+
e(u);
|
|
344
310
|
},
|
|
345
311
|
value: n[s.field] || "",
|
|
346
312
|
label: s.label,
|
|
@@ -348,16 +314,16 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
348
314
|
}
|
|
349
315
|
);
|
|
350
316
|
if (s.type === "inputSwitch")
|
|
351
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
317
|
+
return /* @__PURE__ */ t.jsxs("div", { className: B.link, children: [
|
|
352
318
|
/* @__PURE__ */ t.jsx(
|
|
353
|
-
|
|
319
|
+
Y,
|
|
354
320
|
{
|
|
355
|
-
onChange: (
|
|
356
|
-
const
|
|
321
|
+
onChange: (c) => {
|
|
322
|
+
const u = {
|
|
357
323
|
...n,
|
|
358
|
-
[s.field.text]:
|
|
324
|
+
[s.field.text]: c
|
|
359
325
|
};
|
|
360
|
-
e(
|
|
326
|
+
e(u);
|
|
361
327
|
},
|
|
362
328
|
value: n[s.field.text] || "",
|
|
363
329
|
label: s.inputLabel,
|
|
@@ -365,31 +331,31 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
365
331
|
}
|
|
366
332
|
),
|
|
367
333
|
/* @__PURE__ */ t.jsx(
|
|
368
|
-
|
|
334
|
+
W,
|
|
369
335
|
{
|
|
370
336
|
current: !!n[s.field.switch] || !1,
|
|
371
337
|
label: s.switchLabel,
|
|
372
|
-
onChange: (
|
|
373
|
-
const
|
|
338
|
+
onChange: (c) => {
|
|
339
|
+
const u = {
|
|
374
340
|
...n,
|
|
375
|
-
[s.field.switch]:
|
|
341
|
+
[s.field.switch]: c
|
|
376
342
|
};
|
|
377
|
-
e(
|
|
343
|
+
e(u);
|
|
378
344
|
}
|
|
379
345
|
}
|
|
380
346
|
)
|
|
381
347
|
] });
|
|
382
348
|
if (s.type === "list")
|
|
383
349
|
return /* @__PURE__ */ t.jsx(
|
|
384
|
-
|
|
350
|
+
fe,
|
|
385
351
|
{
|
|
386
352
|
items: n[s.field] || [],
|
|
387
|
-
setItems: (
|
|
388
|
-
const
|
|
353
|
+
setItems: (c) => {
|
|
354
|
+
const u = {
|
|
389
355
|
...n,
|
|
390
|
-
[s.field]:
|
|
356
|
+
[s.field]: c
|
|
391
357
|
};
|
|
392
|
-
e(
|
|
358
|
+
e(u);
|
|
393
359
|
},
|
|
394
360
|
itemsType: "select",
|
|
395
361
|
draggable: s.draggable || !1,
|
|
@@ -401,15 +367,15 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
401
367
|
);
|
|
402
368
|
if (s.type === "select")
|
|
403
369
|
return /* @__PURE__ */ t.jsx(
|
|
404
|
-
|
|
370
|
+
Q,
|
|
405
371
|
{
|
|
406
372
|
options: s.itemsOptions,
|
|
407
|
-
onChange: (
|
|
408
|
-
const
|
|
373
|
+
onChange: (c) => {
|
|
374
|
+
const u = {
|
|
409
375
|
...n,
|
|
410
|
-
[s.field]:
|
|
376
|
+
[s.field]: c
|
|
411
377
|
};
|
|
412
|
-
e(
|
|
378
|
+
e(u);
|
|
413
379
|
},
|
|
414
380
|
label: s.label,
|
|
415
381
|
value: n[s.field] || "String",
|
|
@@ -420,104 +386,104 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
420
386
|
]
|
|
421
387
|
}
|
|
422
388
|
);
|
|
423
|
-
},
|
|
424
|
-
other:
|
|
425
|
-
subtitle:
|
|
426
|
-
items:
|
|
427
|
-
},
|
|
428
|
-
const { items: n, title: e = "Other" } =
|
|
429
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
430
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
431
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
432
|
-
|
|
389
|
+
}, pe = "_other_g74jx_1", he = "_subtitle_g74jx_7", ge = "_items_g74jx_14", at = {
|
|
390
|
+
other: pe,
|
|
391
|
+
subtitle: he,
|
|
392
|
+
items: ge
|
|
393
|
+
}, kt = (r) => {
|
|
394
|
+
const { items: n, title: e = "Other" } = r;
|
|
395
|
+
return /* @__PURE__ */ t.jsxs("div", { className: at.other, children: [
|
|
396
|
+
/* @__PURE__ */ t.jsx("h5", { className: at.subtitle, children: e }),
|
|
397
|
+
/* @__PURE__ */ t.jsx("div", { className: at.items, children: n.map((o, i) => /* @__PURE__ */ t.jsx(
|
|
398
|
+
W,
|
|
433
399
|
{
|
|
434
|
-
current:
|
|
435
|
-
onChange: (
|
|
436
|
-
label:
|
|
400
|
+
current: o.isItem,
|
|
401
|
+
onChange: (a) => o.setIsItem(a),
|
|
402
|
+
label: o.label,
|
|
437
403
|
hasBackground: !0,
|
|
438
404
|
paddingless: !1
|
|
439
405
|
},
|
|
440
406
|
i
|
|
441
407
|
)) })
|
|
442
408
|
] });
|
|
443
|
-
},
|
|
444
|
-
const { index: n, moveProduct: e, children:
|
|
409
|
+
}, xe = (r) => {
|
|
410
|
+
const { index: n, moveProduct: e, children: o } = r, [, i] = xt({
|
|
445
411
|
accept: "product",
|
|
446
|
-
hover(
|
|
447
|
-
|
|
412
|
+
hover(c) {
|
|
413
|
+
c.index !== n && (e(c.index, n), c.index = n);
|
|
448
414
|
}
|
|
449
|
-
}), [{ isDragging:
|
|
415
|
+
}), [{ isDragging: a }, s] = ft({
|
|
450
416
|
type: "product",
|
|
451
417
|
item: { index: n },
|
|
452
|
-
collect: (
|
|
453
|
-
isDragging:
|
|
418
|
+
collect: (c) => ({
|
|
419
|
+
isDragging: c.isDragging()
|
|
454
420
|
})
|
|
455
421
|
});
|
|
456
422
|
return /* @__PURE__ */ t.jsx(
|
|
457
423
|
"div",
|
|
458
424
|
{
|
|
459
|
-
ref: (
|
|
460
|
-
className: `${
|
|
461
|
-
children:
|
|
425
|
+
ref: (c) => s(i(c)),
|
|
426
|
+
className: `${B.product} ${a ? B.dragging : ""}`,
|
|
427
|
+
children: o
|
|
462
428
|
}
|
|
463
429
|
);
|
|
464
|
-
},
|
|
430
|
+
}, fe = (r) => {
|
|
465
431
|
const {
|
|
466
432
|
isActiveItems: n,
|
|
467
433
|
setIsActiveItems: e,
|
|
468
|
-
items:
|
|
434
|
+
items: o,
|
|
469
435
|
setItems: i,
|
|
470
|
-
other:
|
|
436
|
+
other: a,
|
|
471
437
|
title: s,
|
|
472
|
-
subtitle:
|
|
473
|
-
editable:
|
|
474
|
-
draggable:
|
|
475
|
-
withImage:
|
|
476
|
-
deletable:
|
|
438
|
+
subtitle: c,
|
|
439
|
+
editable: u = !0,
|
|
440
|
+
draggable: y = !1,
|
|
441
|
+
withImage: _ = !1,
|
|
442
|
+
deletable: l = !0,
|
|
477
443
|
addable: h = !0,
|
|
478
|
-
itemsType:
|
|
479
|
-
itemsPlaceholder:
|
|
480
|
-
itemsOptions:
|
|
481
|
-
hasRangeSelector:
|
|
482
|
-
rangeSelectorOptions:
|
|
483
|
-
modalOptions:
|
|
484
|
-
addableOptions:
|
|
485
|
-
limit:
|
|
486
|
-
} =
|
|
444
|
+
itemsType: N,
|
|
445
|
+
itemsPlaceholder: g = "",
|
|
446
|
+
itemsOptions: d,
|
|
447
|
+
hasRangeSelector: P = !1,
|
|
448
|
+
rangeSelectorOptions: U,
|
|
449
|
+
modalOptions: G,
|
|
450
|
+
addableOptions: R = {},
|
|
451
|
+
limit: j
|
|
452
|
+
} = r, [A, V] = b.useState(null), [it, st] = b.useState({
|
|
487
453
|
top: 0,
|
|
488
454
|
left: 0
|
|
489
|
-
}), [
|
|
490
|
-
const
|
|
491
|
-
|
|
455
|
+
}), [f, k] = b.useState(!1), w = (m, T) => {
|
|
456
|
+
const O = [...o], [$] = O.splice(m, 1);
|
|
457
|
+
O.splice(T, 0, $), i(O);
|
|
492
458
|
};
|
|
493
|
-
|
|
494
|
-
const
|
|
495
|
-
|
|
459
|
+
b.useEffect(() => {
|
|
460
|
+
const m = () => {
|
|
461
|
+
V(null), k(!1);
|
|
496
462
|
};
|
|
497
|
-
return document.body.addEventListener("click",
|
|
498
|
-
|
|
463
|
+
return document.body.addEventListener("click", m), V(null), k(!1), () => {
|
|
464
|
+
V(null), k(!1), document.body.removeEventListener("click", m);
|
|
499
465
|
};
|
|
500
|
-
}, []),
|
|
501
|
-
if (
|
|
502
|
-
const
|
|
503
|
-
i(
|
|
466
|
+
}, []), b.useEffect(() => {
|
|
467
|
+
if (A) {
|
|
468
|
+
const m = [...o].map((T) => T.id === A.id ? A : T);
|
|
469
|
+
i(m);
|
|
504
470
|
}
|
|
505
|
-
}, [
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
let E =
|
|
510
|
-
E +
|
|
471
|
+
}, [A]);
|
|
472
|
+
const M = (m, T) => {
|
|
473
|
+
m.stopPropagation(), k(!0);
|
|
474
|
+
const O = m.target.getBoundingClientRect(), $ = 500, J = window.innerHeight;
|
|
475
|
+
let E = O.top + window.scrollY;
|
|
476
|
+
E + $ > J && (E = J - $ - 20), st({
|
|
511
477
|
top: E - 80,
|
|
512
|
-
left:
|
|
513
|
-
}),
|
|
478
|
+
left: O.left - 30
|
|
479
|
+
}), V(T);
|
|
514
480
|
};
|
|
515
|
-
function
|
|
516
|
-
if (
|
|
517
|
-
return
|
|
481
|
+
function I(m) {
|
|
482
|
+
if (_)
|
|
483
|
+
return m ? /* @__PURE__ */ t.jsx(
|
|
518
484
|
"img",
|
|
519
485
|
{
|
|
520
|
-
src: `https://imagedelivery.net/${
|
|
486
|
+
src: `https://imagedelivery.net/${m[0]}/w=1000`,
|
|
521
487
|
alt: "image",
|
|
522
488
|
width: 16,
|
|
523
489
|
height: 16
|
|
@@ -532,9 +498,9 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
532
498
|
}
|
|
533
499
|
);
|
|
534
500
|
}
|
|
535
|
-
const
|
|
536
|
-
const
|
|
537
|
-
|
|
501
|
+
const L = (m, T) => {
|
|
502
|
+
const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
503
|
+
y && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
538
504
|
p,
|
|
539
505
|
{
|
|
540
506
|
name: "DotsSixVertical",
|
|
@@ -543,62 +509,62 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
543
509
|
height: 20
|
|
544
510
|
}
|
|
545
511
|
) }),
|
|
546
|
-
|
|
547
|
-
|
|
512
|
+
N === "select" && /* @__PURE__ */ t.jsx(
|
|
513
|
+
Q,
|
|
548
514
|
{
|
|
549
|
-
onChange: (
|
|
550
|
-
const E = [...
|
|
551
|
-
...
|
|
552
|
-
name:
|
|
515
|
+
onChange: ($) => {
|
|
516
|
+
const E = [...o].map((H) => H.id === m.id ? {
|
|
517
|
+
...m,
|
|
518
|
+
name: $
|
|
553
519
|
} : H);
|
|
554
|
-
|
|
555
|
-
...
|
|
556
|
-
name:
|
|
520
|
+
V({
|
|
521
|
+
...m,
|
|
522
|
+
name: $
|
|
557
523
|
}), i([...E]);
|
|
558
524
|
},
|
|
559
|
-
value:
|
|
560
|
-
options:
|
|
561
|
-
leftAddon:
|
|
525
|
+
value: m.name,
|
|
526
|
+
options: d,
|
|
527
|
+
leftAddon: I(m.images)
|
|
562
528
|
}
|
|
563
529
|
),
|
|
564
|
-
|
|
565
|
-
|
|
530
|
+
N === "input" && /* @__PURE__ */ t.jsx(
|
|
531
|
+
Y,
|
|
566
532
|
{
|
|
567
|
-
onChange: (
|
|
568
|
-
const E = [...
|
|
569
|
-
...
|
|
570
|
-
name:
|
|
533
|
+
onChange: ($) => {
|
|
534
|
+
const E = [...o].map((H) => H.id === m.id ? {
|
|
535
|
+
...m,
|
|
536
|
+
name: $
|
|
571
537
|
} : H);
|
|
572
538
|
i([...E]);
|
|
573
539
|
},
|
|
574
|
-
value:
|
|
575
|
-
placeholder:
|
|
540
|
+
value: m.name,
|
|
541
|
+
placeholder: g
|
|
576
542
|
}
|
|
577
543
|
),
|
|
578
|
-
|
|
579
|
-
|
|
544
|
+
N === "image" && /* @__PURE__ */ t.jsx(
|
|
545
|
+
rt,
|
|
580
546
|
{
|
|
581
|
-
onChange: (
|
|
582
|
-
const E = [...
|
|
583
|
-
...
|
|
584
|
-
images:
|
|
547
|
+
onChange: ($) => {
|
|
548
|
+
const E = [...o].map((H) => H.id === m.id ? {
|
|
549
|
+
...m,
|
|
550
|
+
images: $
|
|
585
551
|
} : H);
|
|
586
552
|
i([...E]);
|
|
587
553
|
}
|
|
588
554
|
}
|
|
589
555
|
),
|
|
590
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
591
|
-
|
|
556
|
+
/* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
|
|
557
|
+
u && /* @__PURE__ */ t.jsx(
|
|
592
558
|
p,
|
|
593
559
|
{
|
|
594
560
|
name: "Sliders",
|
|
595
561
|
hoverable: !0,
|
|
596
562
|
width: 20,
|
|
597
563
|
height: 20,
|
|
598
|
-
onClick: (
|
|
564
|
+
onClick: ($) => M($, m)
|
|
599
565
|
}
|
|
600
566
|
),
|
|
601
|
-
|
|
567
|
+
l && /* @__PURE__ */ t.jsx(
|
|
602
568
|
p,
|
|
603
569
|
{
|
|
604
570
|
name: "Trash",
|
|
@@ -606,77 +572,77 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
606
572
|
width: 20,
|
|
607
573
|
height: 20,
|
|
608
574
|
fill: "#C12A2A",
|
|
609
|
-
onClick: () => i(
|
|
575
|
+
onClick: () => i(o.filter(($) => $.id !== m.id))
|
|
610
576
|
}
|
|
611
577
|
)
|
|
612
578
|
] })
|
|
613
579
|
] });
|
|
614
|
-
return
|
|
615
|
-
|
|
580
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
581
|
+
xe,
|
|
616
582
|
{
|
|
617
|
-
product:
|
|
583
|
+
product: m,
|
|
618
584
|
index: T,
|
|
619
|
-
moveProduct:
|
|
620
|
-
children:
|
|
585
|
+
moveProduct: w,
|
|
586
|
+
children: O
|
|
621
587
|
},
|
|
622
|
-
|
|
588
|
+
m.id
|
|
623
589
|
) : /* @__PURE__ */ t.jsx(
|
|
624
590
|
"div",
|
|
625
591
|
{
|
|
626
|
-
className:
|
|
627
|
-
children:
|
|
592
|
+
className: B.product,
|
|
593
|
+
children: O
|
|
628
594
|
},
|
|
629
|
-
|
|
595
|
+
m.id
|
|
630
596
|
);
|
|
631
597
|
};
|
|
632
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
633
|
-
(s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
634
|
-
s && /* @__PURE__ */ t.jsx("h3", { className:
|
|
598
|
+
return /* @__PURE__ */ t.jsxs("div", { className: B.productsBlock, children: [
|
|
599
|
+
(s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: B.top, children: [
|
|
600
|
+
s && /* @__PURE__ */ t.jsx("h3", { className: B.title, children: s }),
|
|
635
601
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
636
|
-
|
|
602
|
+
W,
|
|
637
603
|
{
|
|
638
604
|
current: n,
|
|
639
|
-
onChange: (
|
|
605
|
+
onChange: (m) => e == null ? void 0 : e(m)
|
|
640
606
|
}
|
|
641
607
|
)
|
|
642
608
|
] }),
|
|
643
|
-
|
|
644
|
-
|
|
609
|
+
A && u && G && f && /* @__PURE__ */ t.jsx(
|
|
610
|
+
me,
|
|
645
611
|
{
|
|
646
|
-
activeItem:
|
|
647
|
-
setActiveItem:
|
|
648
|
-
popupPosition:
|
|
649
|
-
modalOptions:
|
|
612
|
+
activeItem: A,
|
|
613
|
+
setActiveItem: V,
|
|
614
|
+
popupPosition: it,
|
|
615
|
+
modalOptions: G,
|
|
650
616
|
setIsOpenModal: k
|
|
651
617
|
}
|
|
652
618
|
),
|
|
653
|
-
|
|
654
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
655
|
-
|
|
656
|
-
|
|
619
|
+
P && U && /* @__PURE__ */ t.jsx(vs, { ...U }),
|
|
620
|
+
/* @__PURE__ */ t.jsxs("div", { className: B.products, children: [
|
|
621
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: B.subtitle, children: c }),
|
|
622
|
+
y ? /* @__PURE__ */ t.jsx(ht, { backend: gt, children: o.map((m, T) => L(m, T)) }) : o.map((m, T) => L(m, T)),
|
|
657
623
|
h && /* @__PURE__ */ t.jsxs(
|
|
658
|
-
|
|
624
|
+
dt,
|
|
659
625
|
{
|
|
660
|
-
className:
|
|
661
|
-
[
|
|
626
|
+
className: q(B.button, {
|
|
627
|
+
[B.disabled]: !!(j && j <= o.length)
|
|
662
628
|
}),
|
|
663
629
|
size: "s",
|
|
664
|
-
disabled: !!(
|
|
630
|
+
disabled: !!(j && j <= o.length),
|
|
665
631
|
onClick: () => {
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
name:
|
|
669
|
-
id:
|
|
670
|
-
...
|
|
671
|
-
}) :
|
|
632
|
+
const m = [...o];
|
|
633
|
+
N === "select" ? m.push({
|
|
634
|
+
name: d[0] || `Product ${o.length + 1}`,
|
|
635
|
+
id: ct(),
|
|
636
|
+
...R
|
|
637
|
+
}) : N === "input" ? m.push({
|
|
672
638
|
name: "",
|
|
673
|
-
id:
|
|
674
|
-
...
|
|
675
|
-
}) :
|
|
676
|
-
name: `Image ${
|
|
677
|
-
id:
|
|
678
|
-
...
|
|
679
|
-
}), i(
|
|
639
|
+
id: ct(),
|
|
640
|
+
...R
|
|
641
|
+
}) : m.push({
|
|
642
|
+
name: `Image ${o.length + 1}`,
|
|
643
|
+
id: ct(),
|
|
644
|
+
...R
|
|
645
|
+
}), i(m);
|
|
680
646
|
},
|
|
681
647
|
children: [
|
|
682
648
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
@@ -692,54 +658,54 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
692
658
|
}
|
|
693
659
|
)
|
|
694
660
|
] }),
|
|
695
|
-
|
|
661
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(kt, { items: a })
|
|
696
662
|
] });
|
|
697
|
-
},
|
|
698
|
-
subtitle:
|
|
699
|
-
header:
|
|
700
|
-
text:
|
|
701
|
-
productsBlock:
|
|
702
|
-
buttonsBlock:
|
|
703
|
-
top:
|
|
704
|
-
itemsBlock:
|
|
663
|
+
}, be = "_subtitle_1fb9q_1", je = "_header_1fb9q_8", ve = "_text_1fb9q_9", ke = "_productsBlock_1fb9q_10", ye = "_buttonsBlock_1fb9q_11", Ne = "_top_1fb9q_22", $e = "_itemsBlock_1fb9q_31", Ie = "_typeTexts_1fb9q_37", Ce = "_block_1fb9q_44", we = "_active_1fb9q_56", Te = "_products_1fb9q_10", Be = "_product_1fb9q_10", Pe = "_button_1fb9q_11", Se = "_image_1fb9q_86", qe = "_info_1fb9q_93", Ae = "_name_1fb9q_105", Oe = "_buttons_1fb9q_11", Le = "_modal_1fb9q_116", De = "_other_1fb9q_135", ze = "_options_1fb9q_141", X = {
|
|
664
|
+
subtitle: be,
|
|
665
|
+
header: je,
|
|
666
|
+
text: ve,
|
|
667
|
+
productsBlock: ke,
|
|
668
|
+
buttonsBlock: ye,
|
|
669
|
+
top: Ne,
|
|
670
|
+
itemsBlock: $e,
|
|
705
671
|
typeTexts: Ie,
|
|
706
|
-
block:
|
|
707
|
-
active:
|
|
708
|
-
products:
|
|
709
|
-
product:
|
|
710
|
-
button:
|
|
711
|
-
image:
|
|
712
|
-
info:
|
|
713
|
-
name:
|
|
714
|
-
buttons:
|
|
715
|
-
modal:
|
|
716
|
-
other:
|
|
717
|
-
options:
|
|
718
|
-
},
|
|
719
|
-
const { activeButton: n, setActiveButton: e, popupPosition:
|
|
720
|
-
return
|
|
672
|
+
block: Ce,
|
|
673
|
+
active: we,
|
|
674
|
+
products: Te,
|
|
675
|
+
product: Be,
|
|
676
|
+
button: Pe,
|
|
677
|
+
image: Se,
|
|
678
|
+
info: qe,
|
|
679
|
+
name: Ae,
|
|
680
|
+
buttons: Oe,
|
|
681
|
+
modal: Le,
|
|
682
|
+
other: De,
|
|
683
|
+
options: ze
|
|
684
|
+
}, Me = (r) => {
|
|
685
|
+
const { activeButton: n, setActiveButton: e, popupPosition: o } = r, [i, a] = b.useState(n.typesText), [s, c] = b.useState(n.destination), [u, y] = b.useState(n.link || ""), [_, l] = b.useState(n.text || "");
|
|
686
|
+
return b.useEffect(() => {
|
|
721
687
|
e({
|
|
722
688
|
...n,
|
|
723
689
|
...{
|
|
724
|
-
text:
|
|
725
|
-
link:
|
|
690
|
+
text: _,
|
|
691
|
+
link: u,
|
|
726
692
|
destination: s,
|
|
727
693
|
typesText: i
|
|
728
694
|
}
|
|
729
695
|
});
|
|
730
|
-
}, [i, s,
|
|
696
|
+
}, [i, s, u, _]), /* @__PURE__ */ t.jsxs(
|
|
731
697
|
"div",
|
|
732
698
|
{
|
|
733
|
-
className:
|
|
699
|
+
className: X.modal,
|
|
734
700
|
onClick: (h) => {
|
|
735
701
|
h.stopPropagation();
|
|
736
702
|
},
|
|
737
703
|
style: {
|
|
738
|
-
top: `${
|
|
739
|
-
left: `${
|
|
704
|
+
top: `${o.top}px`,
|
|
705
|
+
left: `${o.left}px`
|
|
740
706
|
},
|
|
741
707
|
children: [
|
|
742
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
708
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
|
|
743
709
|
/* @__PURE__ */ t.jsx("h3", { children: n.type }),
|
|
744
710
|
/* @__PURE__ */ t.jsx(
|
|
745
711
|
p,
|
|
@@ -752,18 +718,18 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
752
718
|
}
|
|
753
719
|
)
|
|
754
720
|
] }),
|
|
755
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
721
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.options, children: [
|
|
756
722
|
/* @__PURE__ */ t.jsx(
|
|
757
|
-
|
|
723
|
+
Q,
|
|
758
724
|
{
|
|
759
725
|
label: "Destination",
|
|
760
|
-
onChange: (h) =>
|
|
726
|
+
onChange: (h) => c(h),
|
|
761
727
|
options: ["Go to Page", "Open Link"],
|
|
762
728
|
value: s
|
|
763
729
|
}
|
|
764
730
|
),
|
|
765
731
|
s === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
766
|
-
|
|
732
|
+
Q,
|
|
767
733
|
{
|
|
768
734
|
label: "Go to",
|
|
769
735
|
onChange: () => {
|
|
@@ -772,111 +738,111 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
772
738
|
value: "Homepage"
|
|
773
739
|
}
|
|
774
740
|
) : /* @__PURE__ */ t.jsx(
|
|
775
|
-
|
|
741
|
+
Y,
|
|
776
742
|
{
|
|
777
|
-
onChange: (h) =>
|
|
778
|
-
value:
|
|
743
|
+
onChange: (h) => y(h),
|
|
744
|
+
value: u,
|
|
779
745
|
placeholder: "https://",
|
|
780
746
|
label: "Link"
|
|
781
747
|
}
|
|
782
748
|
),
|
|
783
749
|
/* @__PURE__ */ t.jsx(
|
|
784
|
-
|
|
750
|
+
W,
|
|
785
751
|
{
|
|
786
752
|
current: !1,
|
|
787
753
|
label: "Open in new tab"
|
|
788
754
|
}
|
|
789
755
|
),
|
|
790
756
|
/* @__PURE__ */ t.jsx(
|
|
791
|
-
|
|
757
|
+
pt,
|
|
792
758
|
{
|
|
793
|
-
onChange: (h) =>
|
|
794
|
-
value:
|
|
759
|
+
onChange: (h) => l(h),
|
|
760
|
+
value: _,
|
|
795
761
|
label: "Text",
|
|
796
762
|
maxLength: 150
|
|
797
763
|
}
|
|
798
764
|
),
|
|
799
765
|
/* @__PURE__ */ t.jsx(
|
|
800
|
-
|
|
766
|
+
vt,
|
|
801
767
|
{
|
|
802
768
|
typesText: i,
|
|
803
|
-
setTypesText:
|
|
769
|
+
setTypesText: a
|
|
804
770
|
}
|
|
805
771
|
)
|
|
806
772
|
] })
|
|
807
773
|
]
|
|
808
774
|
}
|
|
809
775
|
);
|
|
810
|
-
},
|
|
811
|
-
subtitle:
|
|
812
|
-
header:
|
|
813
|
-
text:
|
|
814
|
-
productsBlock:
|
|
815
|
-
buttonsBlock:
|
|
816
|
-
top:
|
|
817
|
-
itemsBlock:
|
|
818
|
-
typeTexts:
|
|
819
|
-
block:
|
|
820
|
-
active:
|
|
821
|
-
products:
|
|
822
|
-
product:
|
|
823
|
-
button:
|
|
824
|
-
image:
|
|
825
|
-
info:
|
|
826
|
-
name:
|
|
827
|
-
buttons:
|
|
828
|
-
modal:
|
|
776
|
+
}, Ee = "_subtitle_m8qel_1", Re = "_header_m8qel_8", Ve = "_text_m8qel_9", He = "_productsBlock_m8qel_10", Fe = "_buttonsBlock_m8qel_11", Ue = "_top_m8qel_23", Ge = "_itemsBlock_m8qel_32", We = "_typeTexts_m8qel_38", Xe = "_block_m8qel_45", Ye = "_active_m8qel_58", Qe = "_products_m8qel_10", Je = "_product_m8qel_10", Ke = "_button_m8qel_11", Ze = "_image_m8qel_88", ts = "_info_m8qel_95", es = "_name_m8qel_107", ss = "_buttons_m8qel_11", ns = "_modal_m8qel_118", cs = "_other_m8qel_137", is = "_options_m8qel_143", Z = {
|
|
777
|
+
subtitle: Ee,
|
|
778
|
+
header: Re,
|
|
779
|
+
text: Ve,
|
|
780
|
+
productsBlock: He,
|
|
781
|
+
buttonsBlock: Fe,
|
|
782
|
+
top: Ue,
|
|
783
|
+
itemsBlock: Ge,
|
|
784
|
+
typeTexts: We,
|
|
785
|
+
block: Xe,
|
|
786
|
+
active: Ye,
|
|
787
|
+
products: Qe,
|
|
788
|
+
product: Je,
|
|
789
|
+
button: Ke,
|
|
790
|
+
image: Ze,
|
|
791
|
+
info: ts,
|
|
792
|
+
name: es,
|
|
793
|
+
buttons: ss,
|
|
794
|
+
modal: ns,
|
|
829
795
|
other: cs,
|
|
830
|
-
options:
|
|
831
|
-
},
|
|
832
|
-
const { buttons: n, setButtons: e, deletable:
|
|
796
|
+
options: is
|
|
797
|
+
}, os = (r) => {
|
|
798
|
+
const { buttons: n, setButtons: e, deletable: o = !0, addable: i = !0 } = r, [a, s] = b.useState(null), [c, u] = b.useState({
|
|
833
799
|
top: 0,
|
|
834
800
|
left: 0
|
|
835
801
|
});
|
|
836
|
-
|
|
837
|
-
const
|
|
802
|
+
b.useEffect(() => {
|
|
803
|
+
const _ = () => {
|
|
838
804
|
s(null);
|
|
839
805
|
};
|
|
840
|
-
return document.body.addEventListener("click",
|
|
841
|
-
s(null), document.body.removeEventListener("click",
|
|
806
|
+
return document.body.addEventListener("click", _), s(null), () => {
|
|
807
|
+
s(null), document.body.removeEventListener("click", _);
|
|
842
808
|
};
|
|
843
|
-
}, []),
|
|
844
|
-
if (
|
|
845
|
-
const
|
|
846
|
-
e(
|
|
809
|
+
}, []), b.useEffect(() => {
|
|
810
|
+
if (a) {
|
|
811
|
+
const _ = [...n].map((l) => l.id === a.id ? a : l);
|
|
812
|
+
e(_);
|
|
847
813
|
}
|
|
848
|
-
}, [
|
|
849
|
-
const
|
|
850
|
-
|
|
851
|
-
const h =
|
|
852
|
-
let
|
|
853
|
-
|
|
854
|
-
top:
|
|
814
|
+
}, [a]);
|
|
815
|
+
const y = (_, l) => {
|
|
816
|
+
_.stopPropagation();
|
|
817
|
+
const h = _.target.getBoundingClientRect(), N = 490, g = window.innerHeight;
|
|
818
|
+
let d = h.top + window.scrollY;
|
|
819
|
+
d + N > g && (d = g - N - 20), u({
|
|
820
|
+
top: d,
|
|
855
821
|
left: h.left - 30
|
|
856
|
-
}), s(
|
|
822
|
+
}), s(l);
|
|
857
823
|
};
|
|
858
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
859
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
860
|
-
n.map((
|
|
824
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
|
|
825
|
+
/* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
|
|
826
|
+
n.map((_) => /* @__PURE__ */ t.jsxs(
|
|
861
827
|
"div",
|
|
862
828
|
{
|
|
863
|
-
className:
|
|
829
|
+
className: Z.product,
|
|
864
830
|
children: [
|
|
865
831
|
/* @__PURE__ */ t.jsx(
|
|
866
|
-
|
|
832
|
+
Q,
|
|
867
833
|
{
|
|
868
|
-
onChange: (
|
|
869
|
-
const
|
|
870
|
-
...
|
|
871
|
-
type:
|
|
872
|
-
} :
|
|
873
|
-
e(
|
|
834
|
+
onChange: (l) => {
|
|
835
|
+
const N = [...n].map((g) => g.id === _.id ? {
|
|
836
|
+
..._,
|
|
837
|
+
type: l
|
|
838
|
+
} : g);
|
|
839
|
+
e(N);
|
|
874
840
|
},
|
|
875
|
-
value:
|
|
841
|
+
value: _.type,
|
|
876
842
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
877
843
|
}
|
|
878
844
|
),
|
|
879
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
845
|
+
/* @__PURE__ */ t.jsxs("div", { className: Z.buttons, children: [
|
|
880
846
|
/* @__PURE__ */ t.jsx(
|
|
881
847
|
p,
|
|
882
848
|
{
|
|
@@ -884,19 +850,19 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
884
850
|
hoverable: !0,
|
|
885
851
|
width: 20,
|
|
886
852
|
height: 20,
|
|
887
|
-
onClick: (
|
|
888
|
-
|
|
853
|
+
onClick: (l) => {
|
|
854
|
+
y(l, _);
|
|
889
855
|
}
|
|
890
856
|
}
|
|
891
857
|
),
|
|
892
|
-
|
|
858
|
+
o && /* @__PURE__ */ t.jsx(
|
|
893
859
|
p,
|
|
894
860
|
{
|
|
895
861
|
name: "Trash",
|
|
896
862
|
hoverable: !0,
|
|
897
863
|
onClick: () => {
|
|
898
|
-
const
|
|
899
|
-
e(
|
|
864
|
+
const l = n.filter((h) => h.id !== _.id);
|
|
865
|
+
e(l);
|
|
900
866
|
},
|
|
901
867
|
width: 20,
|
|
902
868
|
height: 20,
|
|
@@ -906,30 +872,30 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
906
872
|
] })
|
|
907
873
|
]
|
|
908
874
|
},
|
|
909
|
-
|
|
875
|
+
_.id
|
|
910
876
|
)),
|
|
911
|
-
|
|
912
|
-
|
|
877
|
+
a && /* @__PURE__ */ t.jsx(
|
|
878
|
+
Me,
|
|
913
879
|
{
|
|
914
|
-
activeButton:
|
|
880
|
+
activeButton: a,
|
|
915
881
|
setActiveButton: s,
|
|
916
|
-
popupPosition:
|
|
882
|
+
popupPosition: c
|
|
917
883
|
}
|
|
918
884
|
),
|
|
919
885
|
i && /* @__PURE__ */ t.jsxs(
|
|
920
|
-
|
|
886
|
+
dt,
|
|
921
887
|
{
|
|
922
|
-
className:
|
|
888
|
+
className: Z.button,
|
|
923
889
|
size: "s",
|
|
924
890
|
onClick: () => {
|
|
925
|
-
const
|
|
926
|
-
|
|
891
|
+
const _ = [...n];
|
|
892
|
+
_.push({
|
|
927
893
|
type: "Primary",
|
|
928
|
-
id:
|
|
894
|
+
id: ct(),
|
|
929
895
|
typesText: [],
|
|
930
896
|
destination: "Go to Page",
|
|
931
897
|
text: "Button Name"
|
|
932
|
-
}), e(
|
|
898
|
+
}), e(_);
|
|
933
899
|
},
|
|
934
900
|
children: [
|
|
935
901
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
@@ -945,77 +911,77 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
945
911
|
}
|
|
946
912
|
)
|
|
947
913
|
] });
|
|
948
|
-
},
|
|
949
|
-
const { isActiveButtons: n, setIsActiveButtons: e, buttons:
|
|
950
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
951
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
952
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
914
|
+
}, yc = (r) => {
|
|
915
|
+
const { isActiveButtons: n, setIsActiveButtons: e, buttons: o, setButtons: i } = r;
|
|
916
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: X.buttonsBlock, children: [
|
|
917
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
|
|
918
|
+
/* @__PURE__ */ t.jsx("h3", { className: X.title, children: "Buttons" }),
|
|
953
919
|
/* @__PURE__ */ t.jsx(
|
|
954
|
-
|
|
920
|
+
W,
|
|
955
921
|
{
|
|
956
922
|
current: n,
|
|
957
|
-
onChange: (
|
|
923
|
+
onChange: (a) => e(a)
|
|
958
924
|
}
|
|
959
925
|
)
|
|
960
926
|
] }),
|
|
961
927
|
/* @__PURE__ */ t.jsx(
|
|
962
|
-
|
|
928
|
+
os,
|
|
963
929
|
{
|
|
964
|
-
buttons:
|
|
930
|
+
buttons: o,
|
|
965
931
|
setButtons: i
|
|
966
932
|
}
|
|
967
933
|
)
|
|
968
934
|
] }) });
|
|
969
|
-
},
|
|
970
|
-
wrapper:
|
|
971
|
-
subtitle:
|
|
972
|
-
content:
|
|
973
|
-
range:
|
|
974
|
-
track:
|
|
975
|
-
progress:
|
|
976
|
-
dots:
|
|
977
|
-
dot:
|
|
978
|
-
active:
|
|
979
|
-
input:
|
|
980
|
-
countBlock:
|
|
981
|
-
count:
|
|
982
|
-
controls:
|
|
983
|
-
button:
|
|
984
|
-
},
|
|
985
|
-
const { label: n, min: e = 1, max:
|
|
986
|
-
|
|
935
|
+
}, as = "_wrapper_m18qi_1", ls = "_subtitle_m18qi_7", rs = "_content_m18qi_14", ds = "_range_m18qi_22", us = "_track_m18qi_27", _s = "_progress_m18qi_36", ms = "_dots_m18qi_46", ps = "_dot_m18qi_46", hs = "_active_m18qi_65", gs = "_input_m18qi_77", xs = "_countBlock_m18qi_91", fs = "_count_m18qi_91", bs = "_controls_m18qi_107", js = "_button_m18qi_113", C = {
|
|
936
|
+
wrapper: as,
|
|
937
|
+
subtitle: ls,
|
|
938
|
+
content: rs,
|
|
939
|
+
range: ds,
|
|
940
|
+
track: us,
|
|
941
|
+
progress: _s,
|
|
942
|
+
dots: ms,
|
|
943
|
+
dot: ps,
|
|
944
|
+
active: hs,
|
|
945
|
+
input: gs,
|
|
946
|
+
countBlock: xs,
|
|
947
|
+
count: fs,
|
|
948
|
+
controls: bs,
|
|
949
|
+
button: js
|
|
950
|
+
}, vs = (r) => {
|
|
951
|
+
const { label: n, min: e = 1, max: o = 4, step: i = 1, count: a, setCount: s } = r, [c, u] = b.useState(!1), y = Array.from({ length: (o - e) / i + 1 }), _ = (a - e) / (o - e) * 100, l = () => {
|
|
952
|
+
a < o && s(a + i);
|
|
987
953
|
}, h = () => {
|
|
988
|
-
|
|
989
|
-
},
|
|
990
|
-
const
|
|
991
|
-
s(
|
|
954
|
+
a > e && s(a - i);
|
|
955
|
+
}, N = (g) => {
|
|
956
|
+
const d = e + g * i;
|
|
957
|
+
s(d);
|
|
992
958
|
};
|
|
993
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
994
|
-
n && /* @__PURE__ */ t.jsx("h5", { className:
|
|
995
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
996
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
997
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
959
|
+
return /* @__PURE__ */ t.jsxs("div", { className: C.wrapper, children: [
|
|
960
|
+
n && /* @__PURE__ */ t.jsx("h5", { className: C.subtitle, children: n }),
|
|
961
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
|
|
962
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.range, children: [
|
|
963
|
+
/* @__PURE__ */ t.jsx("div", { className: C.track }),
|
|
998
964
|
/* @__PURE__ */ t.jsx(
|
|
999
965
|
"div",
|
|
1000
966
|
{
|
|
1001
|
-
className:
|
|
1002
|
-
style: { width: `${
|
|
967
|
+
className: C.progress,
|
|
968
|
+
style: { width: `${_}%` }
|
|
1003
969
|
}
|
|
1004
970
|
),
|
|
1005
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1006
|
-
const
|
|
971
|
+
/* @__PURE__ */ t.jsx("div", { className: C.dots, children: y.map((g, d) => {
|
|
972
|
+
const P = d <= (a - e) / i;
|
|
1007
973
|
return /* @__PURE__ */ t.jsx(
|
|
1008
974
|
"button",
|
|
1009
975
|
{
|
|
1010
|
-
onClick: () =>
|
|
1011
|
-
className:
|
|
1012
|
-
[
|
|
1013
|
-
[
|
|
1014
|
-
[
|
|
976
|
+
onClick: () => N(d),
|
|
977
|
+
className: q(C.dot, {
|
|
978
|
+
[C.active]: P,
|
|
979
|
+
[C.inactive]: !P,
|
|
980
|
+
[C.dragging]: c
|
|
1015
981
|
}),
|
|
1016
|
-
"aria-label": `Set value to ${e +
|
|
982
|
+
"aria-label": `Set value to ${e + d * i}`
|
|
1017
983
|
},
|
|
1018
|
-
|
|
984
|
+
d
|
|
1019
985
|
);
|
|
1020
986
|
}) }),
|
|
1021
987
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1023,40 +989,40 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
1023
989
|
{
|
|
1024
990
|
type: "range",
|
|
1025
991
|
min: e,
|
|
1026
|
-
max:
|
|
992
|
+
max: o,
|
|
1027
993
|
step: i,
|
|
1028
|
-
value:
|
|
1029
|
-
onChange: (
|
|
1030
|
-
onMouseDown: () =>
|
|
1031
|
-
onMouseUp: () =>
|
|
1032
|
-
onTouchStart: () =>
|
|
1033
|
-
onTouchEnd: () =>
|
|
1034
|
-
className:
|
|
994
|
+
value: a,
|
|
995
|
+
onChange: (g) => s(Number(g.target.value)),
|
|
996
|
+
onMouseDown: () => u(!0),
|
|
997
|
+
onMouseUp: () => u(!1),
|
|
998
|
+
onTouchStart: () => u(!0),
|
|
999
|
+
onTouchEnd: () => u(!1),
|
|
1000
|
+
className: C.input
|
|
1035
1001
|
}
|
|
1036
1002
|
)
|
|
1037
1003
|
] }),
|
|
1038
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1004
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.countBlock, children: [
|
|
1039
1005
|
/* @__PURE__ */ t.jsx(
|
|
1040
|
-
|
|
1006
|
+
Y,
|
|
1041
1007
|
{
|
|
1042
1008
|
type: "number",
|
|
1043
1009
|
min: e,
|
|
1044
|
-
max:
|
|
1010
|
+
max: o,
|
|
1045
1011
|
paddingless: !0,
|
|
1046
|
-
onChange: (
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1012
|
+
onChange: (g) => {
|
|
1013
|
+
const d = Number(g);
|
|
1014
|
+
d > o ? s(o) : d < e ? s(e) : s(d);
|
|
1049
1015
|
},
|
|
1050
|
-
value: String(
|
|
1016
|
+
value: String(a)
|
|
1051
1017
|
}
|
|
1052
1018
|
),
|
|
1053
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1019
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.controls, children: [
|
|
1054
1020
|
/* @__PURE__ */ t.jsx(
|
|
1055
1021
|
"button",
|
|
1056
1022
|
{
|
|
1057
|
-
onClick:
|
|
1058
|
-
disabled:
|
|
1059
|
-
className:
|
|
1023
|
+
onClick: l,
|
|
1024
|
+
disabled: a >= o,
|
|
1025
|
+
className: C.button,
|
|
1060
1026
|
"aria-label": "Increment count",
|
|
1061
1027
|
children: /* @__PURE__ */ t.jsx(
|
|
1062
1028
|
p,
|
|
@@ -1072,8 +1038,8 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
1072
1038
|
"button",
|
|
1073
1039
|
{
|
|
1074
1040
|
onClick: h,
|
|
1075
|
-
disabled:
|
|
1076
|
-
className:
|
|
1041
|
+
disabled: a <= e,
|
|
1042
|
+
className: C.button,
|
|
1077
1043
|
"aria-label": "Decrement count",
|
|
1078
1044
|
children: /* @__PURE__ */ t.jsx(
|
|
1079
1045
|
p,
|
|
@@ -1089,42 +1055,42 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
1089
1055
|
] })
|
|
1090
1056
|
] })
|
|
1091
1057
|
] });
|
|
1092
|
-
},
|
|
1093
|
-
subtitle:
|
|
1094
|
-
header:
|
|
1095
|
-
text:
|
|
1096
|
-
productsBlock:
|
|
1058
|
+
}, ks = "_subtitle_16rdk_1", ys = "_header_16rdk_8", Ns = "_text_16rdk_9", $s = "_productsBlock_16rdk_10", Is = "_top_16rdk_22", Cs = "_itemsBlock_16rdk_31", ws = "_typeTexts_16rdk_37", Ts = "_block_16rdk_44", Bs = "_active_16rdk_57", Ps = "_products_16rdk_10", Ss = "_product_16rdk_10", qs = "_button_16rdk_76", As = "_image_16rdk_87", Os = "_info_16rdk_94", Ls = "_name_16rdk_106", Ds = "_buttons_16rdk_110", zs = "_modal_16rdk_117", Ms = "_link_16rdk_137", Es = "_modalOptions_16rdk_143", S = {
|
|
1059
|
+
subtitle: ks,
|
|
1060
|
+
header: ys,
|
|
1061
|
+
text: Ns,
|
|
1062
|
+
productsBlock: $s,
|
|
1097
1063
|
top: Is,
|
|
1098
|
-
itemsBlock:
|
|
1099
|
-
typeTexts:
|
|
1100
|
-
block:
|
|
1101
|
-
active:
|
|
1102
|
-
products:
|
|
1103
|
-
product:
|
|
1104
|
-
button:
|
|
1105
|
-
image:
|
|
1106
|
-
info:
|
|
1107
|
-
name:
|
|
1108
|
-
buttons:
|
|
1109
|
-
modal:
|
|
1110
|
-
link:
|
|
1111
|
-
modalOptions:
|
|
1112
|
-
},
|
|
1113
|
-
const { activeItem: n, setActiveItem: e, popupPosition:
|
|
1114
|
-
return /* @__PURE__ */ t.jsxs(
|
|
1064
|
+
itemsBlock: Cs,
|
|
1065
|
+
typeTexts: ws,
|
|
1066
|
+
block: Ts,
|
|
1067
|
+
active: Bs,
|
|
1068
|
+
products: Ps,
|
|
1069
|
+
product: Ss,
|
|
1070
|
+
button: qs,
|
|
1071
|
+
image: As,
|
|
1072
|
+
info: Os,
|
|
1073
|
+
name: Ls,
|
|
1074
|
+
buttons: Ds,
|
|
1075
|
+
modal: zs,
|
|
1076
|
+
link: Ms,
|
|
1077
|
+
modalOptions: Es
|
|
1078
|
+
}, Rs = (r) => {
|
|
1079
|
+
const { activeItem: n, setActiveItem: e, popupPosition: o, setIsOpenModal: i, itemsOptions: a } = r, s = a.find((c) => c.id === n.listingId);
|
|
1080
|
+
return s ? /* @__PURE__ */ t.jsxs(
|
|
1115
1081
|
"div",
|
|
1116
1082
|
{
|
|
1117
|
-
className:
|
|
1118
|
-
onClick: (
|
|
1119
|
-
|
|
1083
|
+
className: S.modal,
|
|
1084
|
+
onClick: (c) => {
|
|
1085
|
+
c.stopPropagation();
|
|
1120
1086
|
},
|
|
1121
1087
|
style: {
|
|
1122
|
-
top: `${
|
|
1123
|
-
left: `${
|
|
1088
|
+
top: `${o.top}px`,
|
|
1089
|
+
left: `${o.left}px`
|
|
1124
1090
|
},
|
|
1125
1091
|
children: [
|
|
1126
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1127
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1092
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
|
|
1093
|
+
/* @__PURE__ */ t.jsx("h3", { children: s.productData.name }),
|
|
1128
1094
|
/* @__PURE__ */ t.jsx(
|
|
1129
1095
|
p,
|
|
1130
1096
|
{
|
|
@@ -1138,95 +1104,94 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
1138
1104
|
}
|
|
1139
1105
|
)
|
|
1140
1106
|
] }),
|
|
1141
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1142
|
-
|
|
1107
|
+
/* @__PURE__ */ t.jsx("div", { className: S.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1108
|
+
rt,
|
|
1143
1109
|
{
|
|
1144
1110
|
label: "Put up an attractive image",
|
|
1145
|
-
onChange: (
|
|
1146
|
-
const
|
|
1111
|
+
onChange: (c) => {
|
|
1112
|
+
const u = {
|
|
1147
1113
|
...n,
|
|
1148
|
-
|
|
1149
|
-
imagePath: l[0]
|
|
1114
|
+
image: c[0]
|
|
1150
1115
|
};
|
|
1151
|
-
e(
|
|
1116
|
+
e(u);
|
|
1152
1117
|
}
|
|
1153
1118
|
}
|
|
1154
1119
|
) })
|
|
1155
1120
|
]
|
|
1156
1121
|
}
|
|
1157
|
-
);
|
|
1158
|
-
},
|
|
1159
|
-
const { index: n, moveProduct: e, children:
|
|
1122
|
+
) : null;
|
|
1123
|
+
}, Vs = (r) => {
|
|
1124
|
+
const { index: n, moveProduct: e, children: o } = r, [, i] = xt({
|
|
1160
1125
|
accept: "product",
|
|
1161
|
-
hover(
|
|
1162
|
-
|
|
1126
|
+
hover(c) {
|
|
1127
|
+
c.index !== n && (e(c.index, n), c.index = n);
|
|
1163
1128
|
}
|
|
1164
|
-
}), [{ isDragging:
|
|
1129
|
+
}), [{ isDragging: a }, s] = ft({
|
|
1165
1130
|
type: "product",
|
|
1166
1131
|
item: { index: n },
|
|
1167
|
-
collect: (
|
|
1168
|
-
isDragging:
|
|
1132
|
+
collect: (c) => ({
|
|
1133
|
+
isDragging: c.isDragging()
|
|
1169
1134
|
})
|
|
1170
1135
|
});
|
|
1171
1136
|
return /* @__PURE__ */ t.jsx(
|
|
1172
1137
|
"div",
|
|
1173
1138
|
{
|
|
1174
|
-
ref: (
|
|
1175
|
-
className: `${
|
|
1176
|
-
children:
|
|
1139
|
+
ref: (c) => s(i(c)),
|
|
1140
|
+
className: `${S.product} ${a ? S.dragging : ""}`,
|
|
1141
|
+
children: o
|
|
1177
1142
|
}
|
|
1178
1143
|
);
|
|
1179
|
-
},
|
|
1144
|
+
}, Nc = (r) => {
|
|
1180
1145
|
const {
|
|
1181
1146
|
isActiveItems: n,
|
|
1182
1147
|
setIsActiveItems: e,
|
|
1183
|
-
items:
|
|
1148
|
+
items: o,
|
|
1184
1149
|
setItems: i,
|
|
1185
|
-
other:
|
|
1150
|
+
other: a,
|
|
1186
1151
|
title: s,
|
|
1187
|
-
subtitle:
|
|
1188
|
-
editable:
|
|
1189
|
-
draggable:
|
|
1190
|
-
withImage:
|
|
1191
|
-
deletable:
|
|
1152
|
+
subtitle: c,
|
|
1153
|
+
editable: u = !0,
|
|
1154
|
+
draggable: y = !1,
|
|
1155
|
+
withImage: _ = !1,
|
|
1156
|
+
deletable: l = !0,
|
|
1192
1157
|
addable: h = !0,
|
|
1193
|
-
itemsType:
|
|
1194
|
-
itemsOptions:
|
|
1195
|
-
} =
|
|
1158
|
+
itemsType: N,
|
|
1159
|
+
itemsOptions: g
|
|
1160
|
+
} = r, [d, P] = b.useState(null), [U, G] = b.useState({
|
|
1196
1161
|
top: 0,
|
|
1197
1162
|
left: 0
|
|
1198
|
-
}), [
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1163
|
+
}), [R, j] = b.useState(!1), A = (f, k) => {
|
|
1164
|
+
const w = [...o], [M] = w.splice(f, 1);
|
|
1165
|
+
w.splice(k, 0, M), i(w);
|
|
1201
1166
|
};
|
|
1202
|
-
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1167
|
+
b.useEffect(() => {
|
|
1168
|
+
const f = () => {
|
|
1169
|
+
P(null), j(!1);
|
|
1205
1170
|
};
|
|
1206
|
-
return document.body.addEventListener("click",
|
|
1207
|
-
|
|
1171
|
+
return document.body.addEventListener("click", f), P(null), j(!1), () => {
|
|
1172
|
+
P(null), j(!1), document.body.removeEventListener("click", f);
|
|
1208
1173
|
};
|
|
1209
|
-
}, []),
|
|
1210
|
-
if (
|
|
1211
|
-
const
|
|
1212
|
-
i(
|
|
1174
|
+
}, []), b.useEffect(() => {
|
|
1175
|
+
if (d) {
|
|
1176
|
+
const f = [...o].map((k) => k.listingId === d.listingId ? d : k);
|
|
1177
|
+
i(f);
|
|
1213
1178
|
}
|
|
1214
|
-
}, [
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1217
|
-
const
|
|
1218
|
-
let
|
|
1219
|
-
|
|
1220
|
-
top:
|
|
1221
|
-
left:
|
|
1222
|
-
}),
|
|
1179
|
+
}, [d]);
|
|
1180
|
+
const V = (f, k) => {
|
|
1181
|
+
f.stopPropagation();
|
|
1182
|
+
const w = f.target.getBoundingClientRect(), M = 100, I = window.innerHeight;
|
|
1183
|
+
let L = w.top + window.scrollY;
|
|
1184
|
+
L + M > I && (L = I - M - 20), j(!0), G({
|
|
1185
|
+
top: L - 80,
|
|
1186
|
+
left: w.left - 30
|
|
1187
|
+
}), P(k);
|
|
1223
1188
|
};
|
|
1224
|
-
function
|
|
1225
|
-
if (
|
|
1226
|
-
return
|
|
1189
|
+
function it(f) {
|
|
1190
|
+
if (_)
|
|
1191
|
+
return f ? /* @__PURE__ */ t.jsx(
|
|
1227
1192
|
"img",
|
|
1228
1193
|
{
|
|
1229
|
-
src: `https://imagedelivery.net/${
|
|
1194
|
+
src: `https://imagedelivery.net/${f}/w=1000`,
|
|
1230
1195
|
alt: "image",
|
|
1231
1196
|
width: 16,
|
|
1232
1197
|
height: 16
|
|
@@ -1241,9 +1206,11 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
1241
1206
|
}
|
|
1242
1207
|
);
|
|
1243
1208
|
}
|
|
1244
|
-
const st = (
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1209
|
+
const st = (f, k) => {
|
|
1210
|
+
const w = g.find((I) => f.listingId === I.id);
|
|
1211
|
+
if (!w) return null;
|
|
1212
|
+
const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1213
|
+
y && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1247
1214
|
p,
|
|
1248
1215
|
{
|
|
1249
1216
|
name: "DotsSixVertical",
|
|
@@ -1252,46 +1219,40 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
1252
1219
|
height: 20
|
|
1253
1220
|
}
|
|
1254
1221
|
) }, k),
|
|
1255
|
-
|
|
1256
|
-
|
|
1222
|
+
N === "select" && /* @__PURE__ */ t.jsx(
|
|
1223
|
+
Q,
|
|
1257
1224
|
{
|
|
1258
|
-
onChange: (
|
|
1259
|
-
const
|
|
1260
|
-
if (!
|
|
1225
|
+
onChange: (I) => {
|
|
1226
|
+
const L = [...o], m = g.find(($) => $.productData.name === I);
|
|
1227
|
+
if (!m) return;
|
|
1261
1228
|
const T = {
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
...g,
|
|
1267
|
-
name: C,
|
|
1268
|
-
listingId: A,
|
|
1269
|
-
stats: T
|
|
1270
|
-
} : N);
|
|
1271
|
-
w({
|
|
1272
|
-
...g,
|
|
1273
|
-
name: C,
|
|
1274
|
-
listingId: A
|
|
1275
|
-
}), i([...q]);
|
|
1229
|
+
listingId: m.id,
|
|
1230
|
+
image: m.productData.images.length > 0 ? m.productData.images[0].cfId : ""
|
|
1231
|
+
}, O = L.map(($) => $.listingId === f.listingId ? T : $);
|
|
1232
|
+
P(T), i([...O]);
|
|
1276
1233
|
},
|
|
1277
|
-
value:
|
|
1278
|
-
options: [
|
|
1279
|
-
|
|
1234
|
+
value: w.productData.name,
|
|
1235
|
+
options: [
|
|
1236
|
+
...g.filter((I) => !o.find((L) => L.listingId === I.id)).map((I) => I.productData.name)
|
|
1237
|
+
],
|
|
1238
|
+
leftAddon: it(
|
|
1239
|
+
f.image || w.productData.images.length > 0 && w.productData.images[0].cfId || ""
|
|
1240
|
+
)
|
|
1280
1241
|
},
|
|
1281
1242
|
k
|
|
1282
1243
|
),
|
|
1283
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1284
|
-
|
|
1244
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.buttons, children: [
|
|
1245
|
+
u && /* @__PURE__ */ t.jsx(
|
|
1285
1246
|
p,
|
|
1286
1247
|
{
|
|
1287
1248
|
name: "Sliders",
|
|
1288
1249
|
hoverable: !0,
|
|
1289
1250
|
width: 20,
|
|
1290
1251
|
height: 20,
|
|
1291
|
-
onClick: (
|
|
1252
|
+
onClick: (I) => V(I, f)
|
|
1292
1253
|
}
|
|
1293
1254
|
),
|
|
1294
|
-
|
|
1255
|
+
l && /* @__PURE__ */ t.jsx(
|
|
1295
1256
|
p,
|
|
1296
1257
|
{
|
|
1297
1258
|
name: "Trash",
|
|
@@ -1299,72 +1260,71 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
1299
1260
|
width: 20,
|
|
1300
1261
|
height: 20,
|
|
1301
1262
|
fill: "#C12A2A",
|
|
1302
|
-
onClick: () => i(
|
|
1263
|
+
onClick: () => i(o.filter((I) => I !== f))
|
|
1303
1264
|
}
|
|
1304
1265
|
)
|
|
1305
1266
|
] })
|
|
1306
1267
|
] });
|
|
1307
|
-
return
|
|
1308
|
-
|
|
1268
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
1269
|
+
Vs,
|
|
1309
1270
|
{
|
|
1310
|
-
product:
|
|
1271
|
+
product: f,
|
|
1311
1272
|
index: k,
|
|
1312
|
-
moveProduct:
|
|
1313
|
-
children:
|
|
1273
|
+
moveProduct: A,
|
|
1274
|
+
children: M
|
|
1314
1275
|
},
|
|
1315
|
-
|
|
1276
|
+
f.listingId
|
|
1316
1277
|
) : /* @__PURE__ */ t.jsx(
|
|
1317
1278
|
"div",
|
|
1318
1279
|
{
|
|
1319
|
-
className:
|
|
1320
|
-
children:
|
|
1280
|
+
className: S.product,
|
|
1281
|
+
children: M
|
|
1321
1282
|
},
|
|
1322
|
-
|
|
1283
|
+
f.listingId
|
|
1323
1284
|
);
|
|
1324
1285
|
};
|
|
1325
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1326
|
-
(s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1327
|
-
s && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1286
|
+
return /* @__PURE__ */ t.jsxs("div", { className: S.productsBlock, children: [
|
|
1287
|
+
(s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
|
|
1288
|
+
s && /* @__PURE__ */ t.jsx("h3", { className: S.title, children: s }),
|
|
1328
1289
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1329
|
-
|
|
1290
|
+
W,
|
|
1330
1291
|
{
|
|
1331
1292
|
current: n,
|
|
1332
|
-
onChange: (
|
|
1293
|
+
onChange: (f) => e == null ? void 0 : e(f)
|
|
1333
1294
|
}
|
|
1334
1295
|
)
|
|
1335
1296
|
] }),
|
|
1336
|
-
|
|
1337
|
-
|
|
1297
|
+
R && d && /* @__PURE__ */ t.jsx(
|
|
1298
|
+
Rs,
|
|
1338
1299
|
{
|
|
1339
|
-
activeItem:
|
|
1340
|
-
setActiveItem:
|
|
1341
|
-
setIsOpenModal:
|
|
1342
|
-
popupPosition:
|
|
1300
|
+
activeItem: d,
|
|
1301
|
+
setActiveItem: P,
|
|
1302
|
+
setIsOpenModal: j,
|
|
1303
|
+
popupPosition: U,
|
|
1304
|
+
itemsOptions: g
|
|
1343
1305
|
}
|
|
1344
1306
|
),
|
|
1345
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1346
|
-
|
|
1347
|
-
|
|
1307
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.products, children: [
|
|
1308
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: S.subtitle, children: c }),
|
|
1309
|
+
y ? /* @__PURE__ */ t.jsx(ht, { backend: gt, children: o.map((f, k) => st(f, k)) }) : o.map((f, k) => st(f, k)),
|
|
1348
1310
|
h && /* @__PURE__ */ t.jsxs(
|
|
1349
|
-
|
|
1311
|
+
dt,
|
|
1350
1312
|
{
|
|
1351
|
-
className:
|
|
1313
|
+
className: S.button,
|
|
1352
1314
|
size: "s",
|
|
1353
1315
|
onClick: () => {
|
|
1354
|
-
const
|
|
1355
|
-
g.
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
...b[0].productData.stats,
|
|
1363
|
-
newPrice: b[0].productData.minPrice.amount,
|
|
1364
|
-
oldPrice: b[0].productData.compareAtPrice.amount
|
|
1316
|
+
const f = [...o];
|
|
1317
|
+
for (let k = 0; k < g.length; k++)
|
|
1318
|
+
if (!o.find((w) => w.listingId === g[k].id)) {
|
|
1319
|
+
f.push({
|
|
1320
|
+
listingId: g[k].id,
|
|
1321
|
+
image: g[k].productData.images.length > 0 ? g[k].productData.images[0].cfId : ""
|
|
1322
|
+
});
|
|
1323
|
+
break;
|
|
1365
1324
|
}
|
|
1366
|
-
|
|
1325
|
+
i(f);
|
|
1367
1326
|
},
|
|
1327
|
+
disabled: o.length === g.length,
|
|
1368
1328
|
children: [
|
|
1369
1329
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1370
1330
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1379,120 +1339,164 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
|
|
|
1379
1339
|
}
|
|
1380
1340
|
)
|
|
1381
1341
|
] }),
|
|
1382
|
-
|
|
1342
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(kt, { items: a })
|
|
1383
1343
|
] });
|
|
1384
|
-
},
|
|
1385
|
-
options:
|
|
1386
|
-
price:
|
|
1387
|
-
oldPrice:
|
|
1388
|
-
newPrice:
|
|
1389
|
-
meta:
|
|
1390
|
-
info:
|
|
1391
|
-
infoRight:
|
|
1392
|
-
buttons:
|
|
1393
|
-
variants:
|
|
1394
|
-
variant:
|
|
1395
|
-
stock:
|
|
1396
|
-
variantInfo:
|
|
1397
|
-
quantity:
|
|
1398
|
-
count:
|
|
1399
|
-
button:
|
|
1400
|
-
activeVariant:
|
|
1401
|
-
chargeTypes:
|
|
1402
|
-
charge:
|
|
1403
|
-
chargeActive:
|
|
1404
|
-
title:
|
|
1344
|
+
}, Hs = "_options_11lki_1", Fs = "_price_11lki_12", Us = "_oldPrice_11lki_19", Gs = "_newPrice_11lki_27", Ws = "_meta_11lki_34", Xs = "_info_11lki_40", Ys = "_infoRight_11lki_48", Qs = "_buttons_11lki_55", Js = "_variants_11lki_62", Ks = "_variant_11lki_62", Zs = "_stock_11lki_79", tn = "_variantInfo_11lki_86", en = "_quantity_11lki_92", sn = "_count_11lki_99", nn = "_button_11lki_55", cn = "_activeVariant_11lki_120", on = "_chargeTypes_11lki_124", an = "_charge_11lki_124", ln = "_chargeActive_11lki_145", rn = "_title_11lki_150", v = {
|
|
1345
|
+
options: Hs,
|
|
1346
|
+
price: Fs,
|
|
1347
|
+
oldPrice: Us,
|
|
1348
|
+
newPrice: Gs,
|
|
1349
|
+
meta: Ws,
|
|
1350
|
+
info: Xs,
|
|
1351
|
+
infoRight: Ys,
|
|
1352
|
+
buttons: Qs,
|
|
1353
|
+
variants: Js,
|
|
1354
|
+
variant: Ks,
|
|
1355
|
+
stock: Zs,
|
|
1356
|
+
variantInfo: tn,
|
|
1357
|
+
quantity: en,
|
|
1358
|
+
count: sn,
|
|
1359
|
+
button: nn,
|
|
1360
|
+
activeVariant: cn,
|
|
1361
|
+
chargeTypes: on,
|
|
1362
|
+
charge: an,
|
|
1363
|
+
chargeActive: ln,
|
|
1364
|
+
title: rn
|
|
1365
|
+
}, dn = "_button_143au_1", un = "_primary_143au_13", _n = "_secondary_143au_18", mn = "_tertiary_143au_23", pn = "_content_143au_28", tt = {
|
|
1366
|
+
button: dn,
|
|
1367
|
+
primary: un,
|
|
1368
|
+
secondary: _n,
|
|
1369
|
+
tertiary: mn,
|
|
1370
|
+
content: pn
|
|
1371
|
+
}, lt = (r) => {
|
|
1372
|
+
const {
|
|
1373
|
+
children: n,
|
|
1374
|
+
onClick: e,
|
|
1375
|
+
style: o,
|
|
1376
|
+
className: i,
|
|
1377
|
+
disabled: a = !1,
|
|
1378
|
+
size: s = "m",
|
|
1379
|
+
type: c = "Primary"
|
|
1380
|
+
} = r;
|
|
1381
|
+
return /* @__PURE__ */ t.jsx(
|
|
1382
|
+
"button",
|
|
1383
|
+
{
|
|
1384
|
+
className: q(tt.button, i, {
|
|
1385
|
+
[tt.primary]: c === "Primary",
|
|
1386
|
+
[tt.secondary]: c === "Secondary",
|
|
1387
|
+
[tt.tertiary]: c === "Tertiary"
|
|
1388
|
+
}),
|
|
1389
|
+
onClick: e,
|
|
1390
|
+
style: {
|
|
1391
|
+
...o,
|
|
1392
|
+
fontSize: s === "m" ? 14 : s === "s" ? 12 : 16
|
|
1393
|
+
},
|
|
1394
|
+
disabled: a,
|
|
1395
|
+
children: c === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: tt.content, children: [
|
|
1396
|
+
/* @__PURE__ */ t.jsx(
|
|
1397
|
+
p,
|
|
1398
|
+
{
|
|
1399
|
+
name: "ArrowRight",
|
|
1400
|
+
fill: "#757575",
|
|
1401
|
+
width: 20,
|
|
1402
|
+
height: 20
|
|
1403
|
+
}
|
|
1404
|
+
),
|
|
1405
|
+
n
|
|
1406
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: n })
|
|
1407
|
+
}
|
|
1408
|
+
);
|
|
1405
1409
|
};
|
|
1406
|
-
var
|
|
1407
|
-
const
|
|
1408
|
-
const { variants: n } =
|
|
1410
|
+
var yt = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(yt || {});
|
|
1411
|
+
const $c = (r) => {
|
|
1412
|
+
const { variants: n } = r, [e, o] = b.useState(n[0]), [i, a] = b.useState(e.chargeTypes[0]), s = ut(), [c, u] = b.useState(1), { reset: y, addProductToCart: _, getProducts: l } = _t();
|
|
1409
1413
|
async function h() {
|
|
1410
|
-
await
|
|
1411
|
-
productId:
|
|
1414
|
+
await l(), await _({
|
|
1415
|
+
productId: r.id,
|
|
1412
1416
|
productVariantId: e.id,
|
|
1413
|
-
quantity:
|
|
1417
|
+
quantity: c
|
|
1414
1418
|
});
|
|
1415
1419
|
}
|
|
1416
|
-
function
|
|
1417
|
-
|
|
1420
|
+
function N() {
|
|
1421
|
+
y(), h(), s("/checkout");
|
|
1418
1422
|
}
|
|
1419
|
-
function
|
|
1420
|
-
if (
|
|
1421
|
-
const
|
|
1422
|
-
return `${
|
|
1423
|
-
} else if (
|
|
1424
|
-
const
|
|
1425
|
-
return `${
|
|
1426
|
-
} else if (
|
|
1427
|
-
const
|
|
1428
|
-
return `${
|
|
1423
|
+
function g(d) {
|
|
1424
|
+
if (d >= 864e5) {
|
|
1425
|
+
const j = Math.floor(d / 864e5);
|
|
1426
|
+
return `${j} ${j === 1 ? "day" : "days"}`;
|
|
1427
|
+
} else if (d >= 36e5) {
|
|
1428
|
+
const j = Math.floor(d / 36e5);
|
|
1429
|
+
return `${j} ${j === 1 ? "hour" : "hours"}`;
|
|
1430
|
+
} else if (d >= 6e4) {
|
|
1431
|
+
const j = Math.floor(d / 6e4);
|
|
1432
|
+
return `${j} ${j === 1 ? "minute" : "minutes"}`;
|
|
1429
1433
|
} else {
|
|
1430
|
-
const
|
|
1431
|
-
return `${
|
|
1434
|
+
const j = Math.floor(d / 1e3);
|
|
1435
|
+
return `${j} ${j === 1 ? "second" : "seconds"}`;
|
|
1432
1436
|
}
|
|
1433
1437
|
}
|
|
1434
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1435
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
1438
|
+
return /* @__PURE__ */ t.jsxs("div", { className: v.options, children: [
|
|
1439
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: v.chargeTypes, children: e.chargeTypes.map((d) => /* @__PURE__ */ t.jsx(
|
|
1436
1440
|
"div",
|
|
1437
1441
|
{
|
|
1438
|
-
className:
|
|
1439
|
-
[
|
|
1442
|
+
className: q(v.charge, {
|
|
1443
|
+
[v.chargeActive]: i === d
|
|
1440
1444
|
}),
|
|
1441
|
-
onClick: () =>
|
|
1442
|
-
children:
|
|
1445
|
+
onClick: () => a(d),
|
|
1446
|
+
children: yt[d]
|
|
1443
1447
|
},
|
|
1444
|
-
|
|
1448
|
+
d
|
|
1445
1449
|
)) }),
|
|
1446
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1450
|
+
/* @__PURE__ */ t.jsx("div", { className: v.variants, children: n.map((d) => /* @__PURE__ */ t.jsxs(
|
|
1447
1451
|
"div",
|
|
1448
1452
|
{
|
|
1449
|
-
className:
|
|
1450
|
-
[
|
|
1453
|
+
className: q(v.variant, {
|
|
1454
|
+
[v.activeVariant]: e.id === d.id
|
|
1451
1455
|
}),
|
|
1452
|
-
onClick: () =>
|
|
1456
|
+
onClick: () => o(d),
|
|
1453
1457
|
children: [
|
|
1454
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1455
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1458
|
+
/* @__PURE__ */ t.jsxs("div", { className: v.variantInfo, children: [
|
|
1459
|
+
/* @__PURE__ */ t.jsx("span", { className: v.title, children: d.name }),
|
|
1456
1460
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1457
1461
|
"$",
|
|
1458
|
-
i === "ONE_TIME" ?
|
|
1462
|
+
i === "ONE_TIME" ? d.price.amount : d.subscriptionSettings.price.amount
|
|
1459
1463
|
] })
|
|
1460
1464
|
] }),
|
|
1461
|
-
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1462
|
-
|
|
1465
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: v.stock, children: [
|
|
1466
|
+
d.quantity.restrictions.max || 0,
|
|
1463
1467
|
" in stock"
|
|
1464
1468
|
] }) })
|
|
1465
1469
|
]
|
|
1466
1470
|
},
|
|
1467
|
-
|
|
1471
|
+
d.id
|
|
1468
1472
|
)) }),
|
|
1469
|
-
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1473
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: v.quantity, children: [
|
|
1470
1474
|
/* @__PURE__ */ t.jsx(
|
|
1471
1475
|
"div",
|
|
1472
1476
|
{
|
|
1473
1477
|
onClick: () => {
|
|
1474
|
-
|
|
1478
|
+
c > 1 ? u((d) => d - 1) : u(1);
|
|
1475
1479
|
},
|
|
1476
|
-
className:
|
|
1480
|
+
className: v.button,
|
|
1477
1481
|
children: /* @__PURE__ */ t.jsx(p, { name: "Minus" })
|
|
1478
1482
|
}
|
|
1479
1483
|
),
|
|
1480
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1484
|
+
/* @__PURE__ */ t.jsx("div", { className: v.count, children: c }),
|
|
1481
1485
|
/* @__PURE__ */ t.jsx(
|
|
1482
1486
|
"div",
|
|
1483
1487
|
{
|
|
1484
1488
|
onClick: () => {
|
|
1485
|
-
|
|
1489
|
+
u((d) => d + 1);
|
|
1486
1490
|
},
|
|
1487
|
-
className:
|
|
1491
|
+
className: v.button,
|
|
1488
1492
|
children: /* @__PURE__ */ t.jsx(p, { name: "Plus" })
|
|
1489
1493
|
}
|
|
1490
1494
|
)
|
|
1491
1495
|
] }),
|
|
1492
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1493
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1496
|
+
/* @__PURE__ */ t.jsxs("div", { className: v.meta, children: [
|
|
1497
|
+
/* @__PURE__ */ t.jsxs("div", { className: v.info, children: [
|
|
1494
1498
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1495
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1499
|
+
/* @__PURE__ */ t.jsxs("div", { className: v.infoRight, children: [
|
|
1496
1500
|
/* @__PURE__ */ t.jsx(
|
|
1497
1501
|
p,
|
|
1498
1502
|
{
|
|
@@ -1502,49 +1506,49 @@ const ci = (d) => {
|
|
|
1502
1506
|
height: 20
|
|
1503
1507
|
}
|
|
1504
1508
|
),
|
|
1505
|
-
/* @__PURE__ */ t.jsx("span", { children: e.deliveryTime === 0 ? "Instant" :
|
|
1509
|
+
/* @__PURE__ */ t.jsx("span", { children: e.deliveryTime === 0 ? "Instant" : g(e.deliveryTime) })
|
|
1506
1510
|
] })
|
|
1507
1511
|
] }),
|
|
1508
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1512
|
+
/* @__PURE__ */ t.jsxs("div", { className: v.info, children: [
|
|
1509
1513
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1510
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1511
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1514
|
+
/* @__PURE__ */ t.jsx("div", { className: v.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: v.price, children: [
|
|
1515
|
+
/* @__PURE__ */ t.jsxs("span", { className: v.newPrice, children: [
|
|
1512
1516
|
"$ ",
|
|
1513
|
-
(e.price.amount || 0) *
|
|
1517
|
+
(e.price.amount || 0) * c
|
|
1514
1518
|
] }),
|
|
1515
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1519
|
+
/* @__PURE__ */ t.jsxs("span", { className: v.oldPrice, children: [
|
|
1516
1520
|
"$ ",
|
|
1517
|
-
(e.compareAtPrice.amount || 0) *
|
|
1521
|
+
(e.compareAtPrice.amount || 0) * c
|
|
1518
1522
|
] })
|
|
1519
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1523
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: v.newPrice, children: [
|
|
1520
1524
|
"$ ",
|
|
1521
|
-
(e.price.amount || 0) *
|
|
1522
|
-
] }) : e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1523
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1525
|
+
(e.price.amount || 0) * c
|
|
1526
|
+
] }) : e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: v.price, children: [
|
|
1527
|
+
/* @__PURE__ */ t.jsxs("span", { className: v.newPrice, children: [
|
|
1524
1528
|
"$ ",
|
|
1525
1529
|
e.subscriptionSettings.price.amount || 0
|
|
1526
1530
|
] }),
|
|
1527
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1531
|
+
/* @__PURE__ */ t.jsxs("span", { className: v.oldPrice, children: [
|
|
1528
1532
|
"$ ",
|
|
1529
1533
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
1530
1534
|
] })
|
|
1531
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1535
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: v.newPrice, children: [
|
|
1532
1536
|
"$ ",
|
|
1533
1537
|
e.subscriptionSettings.price.amount || 0
|
|
1534
1538
|
] }) })
|
|
1535
1539
|
] })
|
|
1536
1540
|
] }),
|
|
1537
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1541
|
+
/* @__PURE__ */ t.jsxs("div", { className: v.buttons, children: [
|
|
1538
1542
|
/* @__PURE__ */ t.jsx(
|
|
1539
|
-
|
|
1543
|
+
lt,
|
|
1540
1544
|
{
|
|
1541
1545
|
type: "Primary",
|
|
1542
|
-
onClick: () =>
|
|
1543
|
-
children: "Buy Now"
|
|
1546
|
+
onClick: () => N(),
|
|
1547
|
+
children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
|
|
1544
1548
|
}
|
|
1545
1549
|
),
|
|
1546
1550
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
1547
|
-
|
|
1551
|
+
lt,
|
|
1548
1552
|
{
|
|
1549
1553
|
type: "Secondary",
|
|
1550
1554
|
onClick: () => h(),
|
|
@@ -1553,47 +1557,47 @@ const ci = (d) => {
|
|
|
1553
1557
|
)
|
|
1554
1558
|
] })
|
|
1555
1559
|
] });
|
|
1556
|
-
},
|
|
1557
|
-
button:
|
|
1558
|
-
login:
|
|
1559
|
-
signUp:
|
|
1560
|
-
buttons:
|
|
1561
|
-
modal:
|
|
1562
|
-
info:
|
|
1563
|
-
top:
|
|
1564
|
-
title:
|
|
1565
|
-
clear:
|
|
1566
|
-
activeClear:
|
|
1567
|
-
count:
|
|
1568
|
-
cart:
|
|
1569
|
-
empty:
|
|
1570
|
-
product:
|
|
1571
|
-
products:
|
|
1572
|
-
image:
|
|
1573
|
-
productInfo:
|
|
1574
|
-
content:
|
|
1575
|
-
name:
|
|
1576
|
-
price:
|
|
1577
|
-
productButtons:
|
|
1578
|
-
productButton:
|
|
1579
|
-
productCount:
|
|
1580
|
-
bottom:
|
|
1581
|
-
subtotal:
|
|
1582
|
-
block:
|
|
1583
|
-
shoppingCount:
|
|
1584
|
-
total:
|
|
1585
|
-
link:
|
|
1586
|
-
},
|
|
1587
|
-
const { shopping: n, signUp: e } =
|
|
1588
|
-
function i(
|
|
1589
|
-
|
|
1560
|
+
}, hn = "_button_1kcpz_1", gn = "_login_1kcpz_14", xn = "_signUp_1kcpz_18", fn = "_buttons_1kcpz_23", bn = "_modal_1kcpz_32", jn = "_info_1kcpz_48", vn = "_top_1kcpz_55", kn = "_title_1kcpz_66", yn = "_clear_1kcpz_72", Nn = "_activeClear_1kcpz_79", $n = "_count_1kcpz_83", In = "_cart_1kcpz_98", Cn = "_empty_1kcpz_106", wn = "_product_1kcpz_132", Tn = "_products_1kcpz_141", Bn = "_image_1kcpz_149", Pn = "_productInfo_1kcpz_155", Sn = "_content_1kcpz_162", qn = "_name_1kcpz_168", An = "_price_1kcpz_174", On = "_productButtons_1kcpz_180", Ln = "_productButton_1kcpz_180", Dn = "_productCount_1kcpz_200", zn = "_bottom_1kcpz_216", Mn = "_subtotal_1kcpz_224", En = "_block_1kcpz_232", Rn = "_shoppingCount_1kcpz_239", Vn = "_total_1kcpz_259", Hn = "_link_1kcpz_265", x = {
|
|
1561
|
+
button: hn,
|
|
1562
|
+
login: gn,
|
|
1563
|
+
signUp: xn,
|
|
1564
|
+
buttons: fn,
|
|
1565
|
+
modal: bn,
|
|
1566
|
+
info: jn,
|
|
1567
|
+
top: vn,
|
|
1568
|
+
title: kn,
|
|
1569
|
+
clear: yn,
|
|
1570
|
+
activeClear: Nn,
|
|
1571
|
+
count: $n,
|
|
1572
|
+
cart: In,
|
|
1573
|
+
empty: Cn,
|
|
1574
|
+
product: wn,
|
|
1575
|
+
products: Tn,
|
|
1576
|
+
image: Bn,
|
|
1577
|
+
productInfo: Pn,
|
|
1578
|
+
content: Sn,
|
|
1579
|
+
name: qn,
|
|
1580
|
+
price: An,
|
|
1581
|
+
productButtons: On,
|
|
1582
|
+
productButton: Ln,
|
|
1583
|
+
productCount: Dn,
|
|
1584
|
+
bottom: zn,
|
|
1585
|
+
subtotal: Mn,
|
|
1586
|
+
block: En,
|
|
1587
|
+
shoppingCount: Rn,
|
|
1588
|
+
total: Vn,
|
|
1589
|
+
link: Hn
|
|
1590
|
+
}, Ic = (r) => {
|
|
1591
|
+
const { shopping: n, signUp: e } = r, o = ut();
|
|
1592
|
+
function i(a) {
|
|
1593
|
+
o(a);
|
|
1590
1594
|
}
|
|
1591
1595
|
return /* @__PURE__ */ t.jsxs("div", { className: x.buttons, children: [
|
|
1592
|
-
n && /* @__PURE__ */ t.jsx(
|
|
1596
|
+
n && /* @__PURE__ */ t.jsx(Fn, {}),
|
|
1593
1597
|
/* @__PURE__ */ t.jsx(
|
|
1594
1598
|
"div",
|
|
1595
1599
|
{
|
|
1596
|
-
className:
|
|
1600
|
+
className: q(x.button, x.login),
|
|
1597
1601
|
onClick: () => i("/customer-dash"),
|
|
1598
1602
|
children: "Login"
|
|
1599
1603
|
}
|
|
@@ -1601,103 +1605,103 @@ const ci = (d) => {
|
|
|
1601
1605
|
e && /* @__PURE__ */ t.jsx(
|
|
1602
1606
|
"div",
|
|
1603
1607
|
{
|
|
1604
|
-
className:
|
|
1608
|
+
className: q(x.button, x.login, x.signUp),
|
|
1605
1609
|
onClick: () => i("/customer-dash"),
|
|
1606
1610
|
children: "Sign Up"
|
|
1607
1611
|
}
|
|
1608
1612
|
)
|
|
1609
1613
|
] });
|
|
1610
|
-
},
|
|
1611
|
-
const [
|
|
1612
|
-
function s(
|
|
1613
|
-
for (let
|
|
1614
|
-
for (let h = 0; h <
|
|
1615
|
-
if (i.parts[
|
|
1616
|
-
return i.parts[
|
|
1614
|
+
}, Fn = () => {
|
|
1615
|
+
const [r, n] = b.useState(!1), [e, o] = b.useState([]), { cart: i, getProducts: a } = _t();
|
|
1616
|
+
function s(_) {
|
|
1617
|
+
for (let l = 0; l < i.parts.length; l++)
|
|
1618
|
+
for (let h = 0; h < _.variants.length; h++)
|
|
1619
|
+
if (i.parts[l].productVariantId === _.variants[l].id)
|
|
1620
|
+
return i.parts[l].productVariantId;
|
|
1617
1621
|
}
|
|
1618
|
-
function
|
|
1619
|
-
for (let
|
|
1620
|
-
for (let h = 0; h <
|
|
1621
|
-
if (i.parts[
|
|
1622
|
-
return i.parts[
|
|
1622
|
+
function c(_) {
|
|
1623
|
+
for (let l = 0; l < i.parts.length; l++)
|
|
1624
|
+
for (let h = 0; h < _.variants.length; h++)
|
|
1625
|
+
if (i.parts[l].productVariantId === _.variants[l].id)
|
|
1626
|
+
return i.parts[l].quantity;
|
|
1623
1627
|
}
|
|
1624
|
-
|
|
1628
|
+
b.useEffect(() => {
|
|
1625
1629
|
(async () => {
|
|
1626
|
-
const
|
|
1627
|
-
...
|
|
1628
|
-
activeVariantId: s(
|
|
1629
|
-
quantity:
|
|
1630
|
+
const l = i.parts.map((g) => String(g.productId)), N = (await a([...l])).map((g) => ({
|
|
1631
|
+
...g,
|
|
1632
|
+
activeVariantId: s(g),
|
|
1633
|
+
quantity: c(g)
|
|
1630
1634
|
}));
|
|
1631
|
-
|
|
1635
|
+
o(N);
|
|
1632
1636
|
})();
|
|
1633
1637
|
}, [i]);
|
|
1634
|
-
function
|
|
1635
|
-
var
|
|
1636
|
-
return !
|
|
1638
|
+
function u(_) {
|
|
1639
|
+
var l;
|
|
1640
|
+
return !_ || !(_ != null && _.variants) ? !1 : (l = _.variants.find((h) => h.id === _.activeVariantId)) == null ? void 0 : l.subscriptionSettings;
|
|
1637
1641
|
}
|
|
1638
|
-
const
|
|
1642
|
+
const y = i.parts.length > 0 && e.length > 0 && !u(e[0]);
|
|
1639
1643
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1640
1644
|
/* @__PURE__ */ t.jsxs(
|
|
1641
1645
|
"div",
|
|
1642
1646
|
{
|
|
1643
1647
|
className: x.button,
|
|
1644
|
-
onClick: (
|
|
1645
|
-
|
|
1648
|
+
onClick: (_) => {
|
|
1649
|
+
_.stopPropagation(), n(!0);
|
|
1646
1650
|
},
|
|
1647
1651
|
children: [
|
|
1648
1652
|
/* @__PURE__ */ t.jsx(
|
|
1649
1653
|
p,
|
|
1650
1654
|
{
|
|
1651
1655
|
name: "Handbag",
|
|
1652
|
-
fill: "
|
|
1656
|
+
fill: "var(--icon-primary)"
|
|
1653
1657
|
}
|
|
1654
1658
|
),
|
|
1655
|
-
|
|
1659
|
+
y && /* @__PURE__ */ t.jsx("div", { className: x.shoppingCount, children: i.parts.length })
|
|
1656
1660
|
]
|
|
1657
1661
|
}
|
|
1658
1662
|
),
|
|
1659
|
-
|
|
1660
|
-
|
|
1663
|
+
r && /* @__PURE__ */ t.jsx(bt, { close: n, children: /* @__PURE__ */ t.jsx(
|
|
1664
|
+
Un,
|
|
1661
1665
|
{
|
|
1662
1666
|
activeProducts: e,
|
|
1663
|
-
isCartNotEmpty:
|
|
1667
|
+
isCartNotEmpty: y
|
|
1664
1668
|
}
|
|
1665
1669
|
) })
|
|
1666
1670
|
] });
|
|
1667
|
-
},
|
|
1668
|
-
const { activeProducts: n, isCartNotEmpty: e } =
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1671
|
+
}, Un = (r) => {
|
|
1672
|
+
const { activeProducts: n, isCartNotEmpty: e } = r, { cart: o, reset: i, getTotalAndDiscount: a, updateQuantityOfProduct: s } = _t(), c = ut();
|
|
1673
|
+
function u(l) {
|
|
1674
|
+
c(l);
|
|
1671
1675
|
}
|
|
1672
|
-
function
|
|
1676
|
+
function y(l) {
|
|
1673
1677
|
s({
|
|
1674
|
-
productId:
|
|
1675
|
-
productVariantId:
|
|
1676
|
-
quantity:
|
|
1678
|
+
productId: l.id,
|
|
1679
|
+
productVariantId: l.activeVariantId,
|
|
1680
|
+
quantity: l.quantity + 1
|
|
1677
1681
|
});
|
|
1678
1682
|
}
|
|
1679
|
-
function
|
|
1683
|
+
function _(l) {
|
|
1680
1684
|
s({
|
|
1681
|
-
productId:
|
|
1682
|
-
productVariantId:
|
|
1683
|
-
quantity:
|
|
1685
|
+
productId: l.id,
|
|
1686
|
+
productVariantId: l.activeVariantId,
|
|
1687
|
+
quantity: l.quantity - 1
|
|
1684
1688
|
});
|
|
1685
1689
|
}
|
|
1686
1690
|
return /* @__PURE__ */ t.jsxs(
|
|
1687
1691
|
"div",
|
|
1688
1692
|
{
|
|
1689
1693
|
className: x.modal,
|
|
1690
|
-
onClick: (
|
|
1694
|
+
onClick: (l) => l.stopPropagation(),
|
|
1691
1695
|
children: [
|
|
1692
1696
|
/* @__PURE__ */ t.jsxs("div", { className: x.top, children: [
|
|
1693
1697
|
/* @__PURE__ */ t.jsxs("div", { className: x.info, children: [
|
|
1694
1698
|
/* @__PURE__ */ t.jsx("span", { className: x.title, children: "Cart" }),
|
|
1695
|
-
e && /* @__PURE__ */ t.jsx("div", { className: x.count, children:
|
|
1699
|
+
e && /* @__PURE__ */ t.jsx("div", { className: x.count, children: o.parts.length })
|
|
1696
1700
|
] }),
|
|
1697
1701
|
/* @__PURE__ */ t.jsx(
|
|
1698
1702
|
"button",
|
|
1699
1703
|
{
|
|
1700
|
-
className:
|
|
1704
|
+
className: q(x.clear, {
|
|
1701
1705
|
[x.activeClear]: e
|
|
1702
1706
|
}),
|
|
1703
1707
|
disabled: !e,
|
|
@@ -1707,7 +1711,7 @@ const ci = (d) => {
|
|
|
1707
1711
|
)
|
|
1708
1712
|
] }),
|
|
1709
1713
|
e ? /* @__PURE__ */ t.jsxs("div", { className: x.cart, children: [
|
|
1710
|
-
/* @__PURE__ */ t.jsx("div", { className: x.products, children: n.map((
|
|
1714
|
+
/* @__PURE__ */ t.jsx("div", { className: x.products, children: n.map((l) => /* @__PURE__ */ t.jsxs(
|
|
1711
1715
|
"div",
|
|
1712
1716
|
{
|
|
1713
1717
|
className: x.product,
|
|
@@ -1716,7 +1720,7 @@ const ci = (d) => {
|
|
|
1716
1720
|
/* @__PURE__ */ t.jsx(
|
|
1717
1721
|
"img",
|
|
1718
1722
|
{
|
|
1719
|
-
src: `https://imagedelivery.net/${
|
|
1723
|
+
src: `https://imagedelivery.net/${l.images[0].cfId}/w=500`,
|
|
1720
1724
|
alt: "image",
|
|
1721
1725
|
width: "100%",
|
|
1722
1726
|
height: "100%",
|
|
@@ -1724,10 +1728,10 @@ const ci = (d) => {
|
|
|
1724
1728
|
}
|
|
1725
1729
|
),
|
|
1726
1730
|
/* @__PURE__ */ t.jsxs("div", { className: x.content, children: [
|
|
1727
|
-
/* @__PURE__ */ t.jsx("div", { className: x.name, children:
|
|
1731
|
+
/* @__PURE__ */ t.jsx("div", { className: x.name, children: l.name }),
|
|
1728
1732
|
/* @__PURE__ */ t.jsxs("div", { className: x.price, children: [
|
|
1729
1733
|
"$",
|
|
1730
|
-
|
|
1734
|
+
l.variants.find((h) => h.id === l.activeVariantId).price.amount * ((l == null ? void 0 : l.quantity) || 1)
|
|
1731
1735
|
] })
|
|
1732
1736
|
] })
|
|
1733
1737
|
] }),
|
|
@@ -1736,7 +1740,7 @@ const ci = (d) => {
|
|
|
1736
1740
|
"div",
|
|
1737
1741
|
{
|
|
1738
1742
|
onClick: () => {
|
|
1739
|
-
|
|
1743
|
+
l.quantity !== 1 && _(l);
|
|
1740
1744
|
},
|
|
1741
1745
|
className: x.productButton,
|
|
1742
1746
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -1750,11 +1754,11 @@ const ci = (d) => {
|
|
|
1750
1754
|
)
|
|
1751
1755
|
}
|
|
1752
1756
|
),
|
|
1753
|
-
/* @__PURE__ */ t.jsx("div", { className: x.productCount, children:
|
|
1757
|
+
/* @__PURE__ */ t.jsx("div", { className: x.productCount, children: l.quantity }),
|
|
1754
1758
|
/* @__PURE__ */ t.jsx(
|
|
1755
1759
|
"div",
|
|
1756
1760
|
{
|
|
1757
|
-
onClick: () =>
|
|
1761
|
+
onClick: () => y(l),
|
|
1758
1762
|
className: x.productButton,
|
|
1759
1763
|
children: /* @__PURE__ */ t.jsx(
|
|
1760
1764
|
p,
|
|
@@ -1770,7 +1774,7 @@ const ci = (d) => {
|
|
|
1770
1774
|
] })
|
|
1771
1775
|
]
|
|
1772
1776
|
},
|
|
1773
|
-
|
|
1777
|
+
l.id
|
|
1774
1778
|
)) }),
|
|
1775
1779
|
/* @__PURE__ */ t.jsxs("div", { className: x.bottom, children: [
|
|
1776
1780
|
/* @__PURE__ */ t.jsxs("div", { className: x.subtotal, children: [
|
|
@@ -1788,16 +1792,16 @@ const ci = (d) => {
|
|
|
1788
1792
|
] }),
|
|
1789
1793
|
/* @__PURE__ */ t.jsxs("div", { className: x.total, children: [
|
|
1790
1794
|
"$",
|
|
1791
|
-
|
|
1795
|
+
a().total
|
|
1792
1796
|
] })
|
|
1793
1797
|
] }),
|
|
1794
|
-
/* @__PURE__ */ t.jsx(
|
|
1798
|
+
/* @__PURE__ */ t.jsx(lt, { onClick: () => u("/checkout"), children: "Checkout" })
|
|
1795
1799
|
] })
|
|
1796
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1800
|
+
] }) : /* @__PURE__ */ t.jsx(Gn, {})
|
|
1797
1801
|
]
|
|
1798
1802
|
}
|
|
1799
1803
|
);
|
|
1800
|
-
},
|
|
1804
|
+
}, Gn = () => /* @__PURE__ */ t.jsxs("div", { className: x.empty, children: [
|
|
1801
1805
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(p, { name: "Handbag" }) }),
|
|
1802
1806
|
/* @__PURE__ */ t.jsx("span", { children: "Your cart is empty" }),
|
|
1803
1807
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
@@ -1812,28 +1816,28 @@ const ci = (d) => {
|
|
|
1812
1816
|
}
|
|
1813
1817
|
)
|
|
1814
1818
|
] })
|
|
1815
|
-
] }),
|
|
1816
|
-
share:
|
|
1817
|
-
modal:
|
|
1818
|
-
header:
|
|
1819
|
-
socials:
|
|
1820
|
-
social:
|
|
1821
|
-
copy:
|
|
1822
|
-
title:
|
|
1823
|
-
copyWrapper:
|
|
1824
|
-
copyText:
|
|
1825
|
-
},
|
|
1826
|
-
const { isOpenModal:
|
|
1819
|
+
] }), Wn = "_share_9g414_1", Xn = "_modal_9g414_8", Yn = "_header_9g414_14", Qn = "_socials_9g414_24", Jn = "_social_9g414_24", Kn = "_copy_9g414_34", Zn = "_title_9g414_41", tc = "_copyWrapper_9g414_47", ec = "_copyText_9g414_56", z = {
|
|
1820
|
+
share: Wn,
|
|
1821
|
+
modal: Xn,
|
|
1822
|
+
header: Yn,
|
|
1823
|
+
socials: Qn,
|
|
1824
|
+
social: Jn,
|
|
1825
|
+
copy: Kn,
|
|
1826
|
+
title: Zn,
|
|
1827
|
+
copyWrapper: tc,
|
|
1828
|
+
copyText: ec
|
|
1829
|
+
}, Cc = () => {
|
|
1830
|
+
const { isOpenModal: r, setIsOpenModal: n } = jt();
|
|
1827
1831
|
function e() {
|
|
1828
1832
|
n(!0);
|
|
1829
1833
|
}
|
|
1830
|
-
return
|
|
1834
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1831
1835
|
/* @__PURE__ */ t.jsx(
|
|
1832
1836
|
"div",
|
|
1833
1837
|
{
|
|
1834
|
-
className:
|
|
1835
|
-
onClick: (
|
|
1836
|
-
|
|
1838
|
+
className: z.share,
|
|
1839
|
+
onClick: (o) => {
|
|
1840
|
+
o.stopPropagation(), e();
|
|
1837
1841
|
},
|
|
1838
1842
|
children: /* @__PURE__ */ t.jsx(
|
|
1839
1843
|
p,
|
|
@@ -1844,43 +1848,43 @@ const ci = (d) => {
|
|
|
1844
1848
|
)
|
|
1845
1849
|
}
|
|
1846
1850
|
),
|
|
1847
|
-
|
|
1851
|
+
r && /* @__PURE__ */ t.jsx(bt, { close: n, children: /* @__PURE__ */ t.jsx(sc, {}) })
|
|
1848
1852
|
] });
|
|
1849
|
-
},
|
|
1853
|
+
}, mt = {
|
|
1850
1854
|
facebook: "FacebookLogo",
|
|
1851
1855
|
"x.com": "TwitterLogo",
|
|
1852
1856
|
telegram: "TelegramLogo",
|
|
1853
1857
|
instagram: "InstagramLogo",
|
|
1854
1858
|
discord: "MessengerLogo",
|
|
1855
1859
|
tiktok: "TiktokLogo"
|
|
1856
|
-
},
|
|
1857
|
-
const { setIsOpenModal:
|
|
1860
|
+
}, sc = () => {
|
|
1861
|
+
const { setIsOpenModal: r } = jt(), n = window.location.href;
|
|
1858
1862
|
function e() {
|
|
1859
1863
|
navigator.clipboard.writeText(n);
|
|
1860
1864
|
}
|
|
1861
1865
|
return /* @__PURE__ */ t.jsxs(
|
|
1862
1866
|
"div",
|
|
1863
1867
|
{
|
|
1864
|
-
className:
|
|
1865
|
-
onClick: (
|
|
1868
|
+
className: z.modal,
|
|
1869
|
+
onClick: (o) => o.stopPropagation(),
|
|
1866
1870
|
children: [
|
|
1867
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1868
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1871
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.header, children: [
|
|
1872
|
+
/* @__PURE__ */ t.jsx("div", { className: z.title, children: "Share this Post" }),
|
|
1869
1873
|
/* @__PURE__ */ t.jsx(
|
|
1870
1874
|
p,
|
|
1871
1875
|
{
|
|
1872
1876
|
name: "X",
|
|
1873
1877
|
fill: "#757575",
|
|
1874
|
-
onClick: () =>
|
|
1878
|
+
onClick: () => r(!1)
|
|
1875
1879
|
}
|
|
1876
1880
|
)
|
|
1877
1881
|
] }),
|
|
1878
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1879
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1882
|
+
/* @__PURE__ */ t.jsx("div", { className: z.socials, children: Object.keys(mt).map((o) => /* @__PURE__ */ t.jsx("div", { className: z.social, children: /* @__PURE__ */ t.jsx(p, { name: mt[o] }) })) }),
|
|
1883
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.copyWrapper, children: [
|
|
1880
1884
|
/* @__PURE__ */ t.jsx(
|
|
1881
1885
|
"div",
|
|
1882
1886
|
{
|
|
1883
|
-
className:
|
|
1887
|
+
className: q(z.copy, z.copyText),
|
|
1884
1888
|
onClick: e,
|
|
1885
1889
|
children: n
|
|
1886
1890
|
}
|
|
@@ -1889,7 +1893,7 @@ const ci = (d) => {
|
|
|
1889
1893
|
"div",
|
|
1890
1894
|
{
|
|
1891
1895
|
onClick: e,
|
|
1892
|
-
className:
|
|
1896
|
+
className: z.copy,
|
|
1893
1897
|
children: /* @__PURE__ */ t.jsx(p, { name: "Copy" })
|
|
1894
1898
|
}
|
|
1895
1899
|
)
|
|
@@ -1897,38 +1901,192 @@ const ci = (d) => {
|
|
|
1897
1901
|
]
|
|
1898
1902
|
}
|
|
1899
1903
|
);
|
|
1904
|
+
}, nc = "_accordion_9e4oa_1", cc = "_header_9e4oa_9", ic = "_icon_9e4oa_18", oc = "_open_9e4oa_21", ac = "_content_9e4oa_25", et = {
|
|
1905
|
+
accordion: nc,
|
|
1906
|
+
header: cc,
|
|
1907
|
+
icon: ic,
|
|
1908
|
+
open: oc,
|
|
1909
|
+
content: ac
|
|
1910
|
+
}, wc = ({ title: r, content: n }) => {
|
|
1911
|
+
const [e, o] = b.useState(!1), [i, a] = b.useState(0), s = b.useRef(null), c = () => {
|
|
1912
|
+
o(!e);
|
|
1913
|
+
};
|
|
1914
|
+
return b.useEffect(() => {
|
|
1915
|
+
s.current && a(e ? s.current.scrollHeight : 0);
|
|
1916
|
+
}, [e]), /* @__PURE__ */ t.jsxs("div", { className: et.accordion, children: [
|
|
1917
|
+
/* @__PURE__ */ t.jsxs(
|
|
1918
|
+
"div",
|
|
1919
|
+
{
|
|
1920
|
+
className: et.header,
|
|
1921
|
+
onClick: c,
|
|
1922
|
+
children: [
|
|
1923
|
+
/* @__PURE__ */ t.jsx("h3", { children: r }),
|
|
1924
|
+
/* @__PURE__ */ t.jsx("div", { className: q(et.icon, { [et.open]: e }), children: /* @__PURE__ */ t.jsx(p, { name: "CaretDown" }) })
|
|
1925
|
+
]
|
|
1926
|
+
}
|
|
1927
|
+
),
|
|
1928
|
+
/* @__PURE__ */ t.jsx(
|
|
1929
|
+
"div",
|
|
1930
|
+
{
|
|
1931
|
+
ref: s,
|
|
1932
|
+
className: et.content,
|
|
1933
|
+
style: { height: `${i}px` },
|
|
1934
|
+
children: /* @__PURE__ */ t.jsx("p", { children: n })
|
|
1935
|
+
}
|
|
1936
|
+
)
|
|
1937
|
+
] });
|
|
1938
|
+
}, lc = "_wrapper_1mken_1", rc = "_label_1mken_9", dc = "_input_1mken_17", uc = "_required_1mken_36", _c = "_paddingless_1mken_40", mc = "_content_1mken_44", pc = "_borderless_1mken_52", hc = "_rightIcon_1mken_57", F = {
|
|
1939
|
+
wrapper: lc,
|
|
1940
|
+
label: rc,
|
|
1941
|
+
input: dc,
|
|
1942
|
+
required: uc,
|
|
1943
|
+
paddingless: _c,
|
|
1944
|
+
content: mc,
|
|
1945
|
+
borderless: pc,
|
|
1946
|
+
rightIcon: hc
|
|
1947
|
+
}, Tc = (r) => {
|
|
1948
|
+
const {
|
|
1949
|
+
onChange: n,
|
|
1950
|
+
style: e,
|
|
1951
|
+
label: o,
|
|
1952
|
+
value: i,
|
|
1953
|
+
type: a,
|
|
1954
|
+
min: s,
|
|
1955
|
+
max: c,
|
|
1956
|
+
placeholder: u,
|
|
1957
|
+
disabled: y = !1,
|
|
1958
|
+
required: _ = !1,
|
|
1959
|
+
regex: l,
|
|
1960
|
+
paddingless: h = !1,
|
|
1961
|
+
borderless: N = !1,
|
|
1962
|
+
editable: g = !1,
|
|
1963
|
+
isSearch: d = !1
|
|
1964
|
+
} = r, [P, U] = b.useState(!1);
|
|
1965
|
+
function G(j) {
|
|
1966
|
+
return Number(j) < 0 ? String(s) : j;
|
|
1967
|
+
}
|
|
1968
|
+
function R(j) {
|
|
1969
|
+
return !_ || !l ? !0 : new RegExp(l).test(j);
|
|
1970
|
+
}
|
|
1971
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.wrapper, children: [
|
|
1972
|
+
o && /* @__PURE__ */ t.jsx(
|
|
1973
|
+
"label",
|
|
1974
|
+
{
|
|
1975
|
+
className: F.label,
|
|
1976
|
+
htmlFor: o,
|
|
1977
|
+
children: o
|
|
1978
|
+
}
|
|
1979
|
+
),
|
|
1980
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.content, children: [
|
|
1981
|
+
/* @__PURE__ */ t.jsx(
|
|
1982
|
+
"input",
|
|
1983
|
+
{
|
|
1984
|
+
id: o,
|
|
1985
|
+
type: a || "text",
|
|
1986
|
+
onChange: (j) => {
|
|
1987
|
+
if (a === "text") n(j.target.value);
|
|
1988
|
+
else {
|
|
1989
|
+
const A = G(j.target.value);
|
|
1990
|
+
n(A);
|
|
1991
|
+
}
|
|
1992
|
+
},
|
|
1993
|
+
value: i,
|
|
1994
|
+
autoComplete: "off",
|
|
1995
|
+
placeholder: u || "Type something...",
|
|
1996
|
+
className: q(F.input, {
|
|
1997
|
+
[F.required]: P && _ && !R(i),
|
|
1998
|
+
[F.paddingless]: h,
|
|
1999
|
+
[F.borderless]: N
|
|
2000
|
+
}),
|
|
2001
|
+
min: a === "number" ? s : void 0,
|
|
2002
|
+
max: a === "number" ? c : void 0,
|
|
2003
|
+
disabled: y,
|
|
2004
|
+
onFocus: () => U(!0),
|
|
2005
|
+
style: e
|
|
2006
|
+
}
|
|
2007
|
+
),
|
|
2008
|
+
d && /* @__PURE__ */ t.jsx("div", { className: F.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2009
|
+
p,
|
|
2010
|
+
{
|
|
2011
|
+
name: "MagnifyingGlass",
|
|
2012
|
+
fill: "var(--icon-secondary)",
|
|
2013
|
+
width: 20,
|
|
2014
|
+
height: 20
|
|
2015
|
+
}
|
|
2016
|
+
) }),
|
|
2017
|
+
g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2018
|
+
p,
|
|
2019
|
+
{
|
|
2020
|
+
name: "Sliders",
|
|
2021
|
+
width: 20,
|
|
2022
|
+
height: 20,
|
|
2023
|
+
hoverable: !0
|
|
2024
|
+
}
|
|
2025
|
+
) })
|
|
2026
|
+
] })
|
|
2027
|
+
] });
|
|
2028
|
+
}, gc = "_wrapper_st58d_1", xc = "_label_st58d_10", fc = "_textarea_st58d_18", bc = "_length_st58d_33", nt = {
|
|
2029
|
+
wrapper: gc,
|
|
2030
|
+
label: xc,
|
|
2031
|
+
textarea: fc,
|
|
2032
|
+
length: bc
|
|
2033
|
+
}, Bc = (r) => {
|
|
2034
|
+
const { onChange: n, label: e, value: o, maxLength: i, placeholder: a = "Type something..." } = r, [s, c] = b.useState(o.length);
|
|
2035
|
+
return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
|
|
2036
|
+
e && /* @__PURE__ */ t.jsx(
|
|
2037
|
+
"label",
|
|
2038
|
+
{
|
|
2039
|
+
className: nt.label,
|
|
2040
|
+
htmlFor: e,
|
|
2041
|
+
children: e
|
|
2042
|
+
}
|
|
2043
|
+
),
|
|
2044
|
+
/* @__PURE__ */ t.jsx(
|
|
2045
|
+
"textarea",
|
|
2046
|
+
{
|
|
2047
|
+
id: e,
|
|
2048
|
+
defaultValue: o,
|
|
2049
|
+
onChange: (u) => {
|
|
2050
|
+
c(u.target.value.length), n(u.target.value);
|
|
2051
|
+
},
|
|
2052
|
+
placeholder: a,
|
|
2053
|
+
className: nt.textarea,
|
|
2054
|
+
maxLength: i
|
|
2055
|
+
}
|
|
2056
|
+
),
|
|
2057
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: nt.length, children: [
|
|
2058
|
+
s,
|
|
2059
|
+
"/",
|
|
2060
|
+
i
|
|
2061
|
+
] })
|
|
2062
|
+
] });
|
|
1900
2063
|
};
|
|
1901
2064
|
export {
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
Vn as EmptyCart,
|
|
1911
|
-
mi as ErrorableBlock,
|
|
1912
|
-
oi as HeaderButtons,
|
|
2065
|
+
wc as Accordion,
|
|
2066
|
+
lt as Button,
|
|
2067
|
+
os as ButtonTypeSettings,
|
|
2068
|
+
yc as ButtonsSettings,
|
|
2069
|
+
rt as ChooseImage,
|
|
2070
|
+
qc as ChooseImageModal,
|
|
2071
|
+
Gn as EmptyCart,
|
|
2072
|
+
Ic as HeaderButtons,
|
|
1913
2073
|
p as Icon,
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
fi as Tip,
|
|
1933
|
-
xt as TypesText
|
|
2074
|
+
Y as InputSettings,
|
|
2075
|
+
Tc as InputUI,
|
|
2076
|
+
fe as ItemsSettings,
|
|
2077
|
+
kc as LayoutSettings,
|
|
2078
|
+
Nc as ListingSelector,
|
|
2079
|
+
Ac as Loader,
|
|
2080
|
+
bt as Modal,
|
|
2081
|
+
$c as ProductOptions,
|
|
2082
|
+
vs as RangeSelector,
|
|
2083
|
+
Q as Select,
|
|
2084
|
+
Cc as ShareLink,
|
|
2085
|
+
Fn as ShoppingButton,
|
|
2086
|
+
Un as ShoppingModalCart,
|
|
2087
|
+
W as Switch,
|
|
2088
|
+
Gt as TextSettings,
|
|
2089
|
+
pt as TextareaSettings,
|
|
2090
|
+
Bc as TextareaUI,
|
|
2091
|
+
vt as TypesText
|
|
1934
2092
|
};
|