@billgangcom/theme-lib 1.32.0 → 1.33.1
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/builder/constants/theme-settings.d.ts +15 -1
- package/dist/builder/store/useColorPickerStore.d.ts +19 -0
- package/dist/builder/store/useThemeSettingsStore.d.ts +1 -1
- package/dist/builder/ui/ColorPicker/index.d.ts +1 -0
- package/dist/builder.cjs.js +31 -11
- package/dist/builder.es.js +2002 -1590
- package/dist/{index-CC_0JpL1.js → index-CqF7deZx.js} +869 -765
- package/dist/{index-8_Sn0J5j.cjs → index-J6kEvjGE.cjs} +18 -18
- package/dist/ui/ButtonsSettings/index.d.ts +2 -0
- package/dist/ui/ItemsSettings/popup.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1501 -1459
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I as b, a as W, c as F, S as K, T as Ct, C as ht, b as Z, D as yt, H as kt, B as it, v as dt, u as $t, d as wt, e as qt, f as ft, g as Nt, h as Bt, M as St, i as Pt, k as Dt } from "./index-CqF7deZx.js";
|
|
2
|
+
import { l as no, L as io } from "./index-CqF7deZx.js";
|
|
3
|
+
import p from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
input:
|
|
17
|
-
},
|
|
5
|
+
const Et = "_wrapper_9rr5j_2", Lt = "_alignmentBlock_9rr5j_8", Rt = "_title_9rr5j_15", Mt = "_subtitle_9rr5j_22", Ht = "_alignmentContent_9rr5j_29", zt = "_alignments_9rr5j_37", Vt = "_alignment_9rr5j_8", Ft = "_circle_9rr5j_58", Ut = "_paddings_9rr5j_65", Yt = "_padding_9rr5j_65", Gt = "_input_9rr5j_84", J = {
|
|
6
|
+
wrapper: Et,
|
|
7
|
+
alignmentBlock: Lt,
|
|
8
|
+
title: Rt,
|
|
9
|
+
subtitle: Mt,
|
|
10
|
+
alignmentContent: Ht,
|
|
11
|
+
alignments: zt,
|
|
12
|
+
alignment: Vt,
|
|
13
|
+
circle: Ft,
|
|
14
|
+
paddings: Ut,
|
|
15
|
+
padding: Yt,
|
|
16
|
+
input: Gt
|
|
17
|
+
}, Wt = [
|
|
18
18
|
"topLeft",
|
|
19
19
|
"top",
|
|
20
20
|
"topRight",
|
|
@@ -24,10 +24,10 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
24
24
|
"bottomLeft",
|
|
25
25
|
"bottom",
|
|
26
26
|
"bottomRight"
|
|
27
|
-
],
|
|
28
|
-
const { alignment:
|
|
29
|
-
function
|
|
30
|
-
switch (
|
|
27
|
+
], Xt = ["left", "top", "right", "bottom"], Fa = (u) => {
|
|
28
|
+
const { alignment: a, padding: e, setPadding: s, setAlignment: i } = u;
|
|
29
|
+
function c() {
|
|
30
|
+
switch (a) {
|
|
31
31
|
case "left":
|
|
32
32
|
case "topLeft":
|
|
33
33
|
case "bottomLeft":
|
|
@@ -44,8 +44,8 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
44
44
|
return "TextAlignCenter";
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
switch (
|
|
47
|
+
function l(o) {
|
|
48
|
+
switch (o) {
|
|
49
49
|
case "left":
|
|
50
50
|
return "AlignLeft";
|
|
51
51
|
case "right":
|
|
@@ -61,19 +61,19 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
61
61
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
62
62
|
/* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
|
|
64
|
-
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children:
|
|
64
|
+
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: Wt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
67
|
onClick: () => {
|
|
68
|
-
i(
|
|
68
|
+
i(o);
|
|
69
69
|
},
|
|
70
70
|
className: J.alignment,
|
|
71
71
|
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
o !== a && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
73
|
+
o === a && /* @__PURE__ */ t.jsx(
|
|
74
|
+
b,
|
|
75
75
|
{
|
|
76
|
-
name:
|
|
76
|
+
name: c(),
|
|
77
77
|
fill: "#FF3F19",
|
|
78
78
|
width: 22,
|
|
79
79
|
height: 22
|
|
@@ -81,17 +81,17 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
81
81
|
)
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
|
|
84
|
+
o
|
|
85
85
|
)) }),
|
|
86
|
-
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children:
|
|
86
|
+
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: Xt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
87
87
|
"label",
|
|
88
88
|
{
|
|
89
89
|
className: J.padding,
|
|
90
90
|
children: [
|
|
91
91
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
92
|
-
|
|
92
|
+
b,
|
|
93
93
|
{
|
|
94
|
-
name:
|
|
94
|
+
name: l(o),
|
|
95
95
|
width: 20,
|
|
96
96
|
height: 20
|
|
97
97
|
}
|
|
@@ -99,11 +99,11 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
99
99
|
/* @__PURE__ */ t.jsx(
|
|
100
100
|
W,
|
|
101
101
|
{
|
|
102
|
-
type: "
|
|
103
|
-
value: String(e[
|
|
104
|
-
onChange: (
|
|
102
|
+
type: "number",
|
|
103
|
+
value: String(e[o]),
|
|
104
|
+
onChange: (n) => s({
|
|
105
105
|
...e,
|
|
106
|
-
[
|
|
106
|
+
[o]: Number(n)
|
|
107
107
|
}),
|
|
108
108
|
paddingless: !0,
|
|
109
109
|
borderless: !0
|
|
@@ -111,25 +111,25 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
111
111
|
)
|
|
112
112
|
]
|
|
113
113
|
},
|
|
114
|
-
|
|
114
|
+
o
|
|
115
115
|
)) })
|
|
116
116
|
] })
|
|
117
117
|
] })
|
|
118
118
|
] });
|
|
119
|
-
},
|
|
120
|
-
title:
|
|
121
|
-
subtitle:
|
|
122
|
-
header:
|
|
123
|
-
text:
|
|
124
|
-
top:
|
|
125
|
-
itemsBlock:
|
|
126
|
-
},
|
|
127
|
-
typeTexts:
|
|
128
|
-
block:
|
|
129
|
-
active:
|
|
130
|
-
},
|
|
131
|
-
const { typesText:
|
|
132
|
-
function
|
|
119
|
+
}, Jt = "_title_voimd_1", Qt = "_subtitle_voimd_5", Kt = "_header_voimd_12", Zt = "_text_voimd_13", te = "_top_voimd_20", ee = "_itemsBlock_voimd_29", ut = {
|
|
120
|
+
title: Jt,
|
|
121
|
+
subtitle: Qt,
|
|
122
|
+
header: Kt,
|
|
123
|
+
text: Zt,
|
|
124
|
+
top: te,
|
|
125
|
+
itemsBlock: ee
|
|
126
|
+
}, se = "_typeTexts_167ez_1", ne = "_block_167ez_8", ie = "_active_167ez_25", bt = {
|
|
127
|
+
typeTexts: se,
|
|
128
|
+
block: ne,
|
|
129
|
+
active: ie
|
|
130
|
+
}, ae = ["bold", "italic", "underline", "strike-through", "code"], Tt = (u) => {
|
|
131
|
+
const { typesText: a, setTypesText: e } = u;
|
|
132
|
+
function s(i) {
|
|
133
133
|
switch (i) {
|
|
134
134
|
case "bold":
|
|
135
135
|
return "TextB";
|
|
@@ -143,25 +143,25 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
143
143
|
return "TextUnderline";
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
146
|
+
return /* @__PURE__ */ t.jsx("div", { className: bt.typeTexts, children: ae.map((i) => /* @__PURE__ */ t.jsx(
|
|
147
147
|
"div",
|
|
148
148
|
{
|
|
149
|
-
className:
|
|
150
|
-
[
|
|
149
|
+
className: F(bt.block, {
|
|
150
|
+
[bt.active]: a.includes(i)
|
|
151
151
|
}),
|
|
152
152
|
onClick: () => {
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
e(
|
|
153
|
+
const c = [...a];
|
|
154
|
+
if (c.includes(i)) {
|
|
155
|
+
const l = c.filter((o) => o !== i);
|
|
156
|
+
e(l);
|
|
157
157
|
} else
|
|
158
|
-
|
|
158
|
+
c.push(i), e(c);
|
|
159
159
|
},
|
|
160
160
|
children: /* @__PURE__ */ t.jsx(
|
|
161
|
-
|
|
161
|
+
b,
|
|
162
162
|
{
|
|
163
|
-
name:
|
|
164
|
-
fill:
|
|
163
|
+
name: s(i),
|
|
164
|
+
fill: a.includes(i) ? "#252525" : "#757575",
|
|
165
165
|
width: 20,
|
|
166
166
|
height: 20
|
|
167
167
|
}
|
|
@@ -169,34 +169,34 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
169
169
|
},
|
|
170
170
|
String(i)
|
|
171
171
|
)) });
|
|
172
|
-
},
|
|
172
|
+
}, At = (u) => {
|
|
173
173
|
const {
|
|
174
|
-
typesText:
|
|
174
|
+
typesText: a,
|
|
175
175
|
isActiveText: e,
|
|
176
|
-
setIsActiveText:
|
|
176
|
+
setIsActiveText: s,
|
|
177
177
|
text: i,
|
|
178
|
-
setText:
|
|
179
|
-
setTypesText:
|
|
180
|
-
title:
|
|
181
|
-
subtitle:
|
|
178
|
+
setText: c,
|
|
179
|
+
setTypesText: l,
|
|
180
|
+
title: o,
|
|
181
|
+
subtitle: n = "Items"
|
|
182
182
|
} = u;
|
|
183
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
184
|
-
(
|
|
185
|
-
|
|
186
|
-
e !== void 0 &&
|
|
183
|
+
return /* @__PURE__ */ t.jsxs("div", { className: ut.text, children: [
|
|
184
|
+
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ut.top, children: [
|
|
185
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: ut.title, children: o }),
|
|
186
|
+
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
187
187
|
K,
|
|
188
188
|
{
|
|
189
189
|
current: e,
|
|
190
|
-
onChange: (
|
|
190
|
+
onChange: (r) => s(r)
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
193
|
] }),
|
|
194
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
195
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
194
|
+
/* @__PURE__ */ t.jsxs("div", { className: ut.itemsBlock, children: [
|
|
195
|
+
/* @__PURE__ */ t.jsx("h5", { className: ut.subtitle, children: n }),
|
|
196
196
|
/* @__PURE__ */ t.jsx(
|
|
197
|
-
|
|
197
|
+
Ct,
|
|
198
198
|
{
|
|
199
|
-
onChange: (
|
|
199
|
+
onChange: (r) => c(r),
|
|
200
200
|
value: i,
|
|
201
201
|
maxLength: 150
|
|
202
202
|
}
|
|
@@ -204,188 +204,193 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
204
204
|
/* @__PURE__ */ t.jsx(
|
|
205
205
|
Tt,
|
|
206
206
|
{
|
|
207
|
-
typesText:
|
|
208
|
-
setTypesText:
|
|
207
|
+
typesText: a,
|
|
208
|
+
setTypesText: l
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
] })
|
|
212
212
|
] });
|
|
213
|
-
},
|
|
214
|
-
title:
|
|
215
|
-
subtitle:
|
|
216
|
-
header:
|
|
217
|
-
text:
|
|
218
|
-
productsBlock:
|
|
219
|
-
top:
|
|
220
|
-
itemsBlock:
|
|
221
|
-
typeTexts:
|
|
222
|
-
block:
|
|
213
|
+
}, oe = "_title_vzbkd_1", ce = "_subtitle_vzbkd_5", le = "_header_vzbkd_12", re = "_text_vzbkd_13", de = "_productsBlock_vzbkd_14", ue = "_top_vzbkd_26", me = "_itemsBlock_vzbkd_35", _e = "_typeTexts_vzbkd_41", he = "_block_vzbkd_48", pe = "_active_vzbkd_61", ge = "_products_vzbkd_14", fe = "_product_vzbkd_14", xe = "_button_vzbkd_80", be = "_disabled_vzbkd_91", ve = "_image_vzbkd_95", je = "_info_vzbkd_102", ye = "_name_vzbkd_114", ke = "_buttons_vzbkd_118", $e = "_modal_vzbkd_125", we = "_link_vzbkd_145", Ne = "_modalOptions_vzbkd_151", Ie = "_addButton_vzbkd_163", H = {
|
|
214
|
+
title: oe,
|
|
215
|
+
subtitle: ce,
|
|
216
|
+
header: le,
|
|
217
|
+
text: re,
|
|
218
|
+
productsBlock: de,
|
|
219
|
+
top: ue,
|
|
220
|
+
itemsBlock: me,
|
|
221
|
+
typeTexts: _e,
|
|
222
|
+
block: he,
|
|
223
223
|
active: pe,
|
|
224
|
-
products:
|
|
225
|
-
product:
|
|
226
|
-
button:
|
|
227
|
-
disabled:
|
|
228
|
-
image:
|
|
229
|
-
info:
|
|
230
|
-
name:
|
|
231
|
-
buttons:
|
|
232
|
-
modal:
|
|
233
|
-
link:
|
|
234
|
-
modalOptions:
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
224
|
+
products: ge,
|
|
225
|
+
product: fe,
|
|
226
|
+
button: xe,
|
|
227
|
+
disabled: be,
|
|
228
|
+
image: ve,
|
|
229
|
+
info: je,
|
|
230
|
+
name: ye,
|
|
231
|
+
buttons: ke,
|
|
232
|
+
modal: $e,
|
|
233
|
+
link: we,
|
|
234
|
+
modalOptions: Ne,
|
|
235
|
+
addButton: Ie
|
|
236
|
+
}, Ce = p.forwardRef(
|
|
237
|
+
(u, a) => {
|
|
238
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
|
|
239
|
+
function o(n, r) {
|
|
240
|
+
return n.length > r ? `${n.slice(0, r)}...` : n;
|
|
241
|
+
}
|
|
238
242
|
return /* @__PURE__ */ t.jsxs(
|
|
239
243
|
"div",
|
|
240
244
|
{
|
|
241
|
-
ref:
|
|
242
|
-
className:
|
|
243
|
-
onClick: (
|
|
244
|
-
|
|
245
|
+
ref: a,
|
|
246
|
+
className: H.modal,
|
|
247
|
+
onClick: (n) => {
|
|
248
|
+
n.stopPropagation();
|
|
245
249
|
},
|
|
246
250
|
style: {
|
|
247
251
|
top: `${i.top}px`,
|
|
248
252
|
left: `${i.left}px`
|
|
249
253
|
},
|
|
250
254
|
children: [
|
|
251
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
252
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
255
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
256
|
+
/* @__PURE__ */ t.jsx("h3", { className: H.title, children: o(e.name, 20) }),
|
|
253
257
|
/* @__PURE__ */ t.jsx(
|
|
254
|
-
|
|
258
|
+
b,
|
|
255
259
|
{
|
|
256
260
|
name: "X",
|
|
257
261
|
height: 20,
|
|
258
262
|
width: 20,
|
|
259
263
|
hoverable: !0,
|
|
260
264
|
onClick: () => {
|
|
261
|
-
|
|
265
|
+
s(null), l(!1);
|
|
262
266
|
}
|
|
263
267
|
}
|
|
264
268
|
)
|
|
265
269
|
] }),
|
|
266
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
267
|
-
if (
|
|
270
|
+
/* @__PURE__ */ t.jsx("div", { className: H.modalOptions, children: c.map((n) => {
|
|
271
|
+
if (n.type === "image")
|
|
268
272
|
return /* @__PURE__ */ t.jsx(
|
|
269
273
|
ht,
|
|
270
274
|
{
|
|
271
275
|
label: "Put up an attractive image",
|
|
272
|
-
activeImage: e[
|
|
273
|
-
onChange: (
|
|
274
|
-
const
|
|
276
|
+
activeImage: e[n.field],
|
|
277
|
+
onChange: (r) => {
|
|
278
|
+
const m = {
|
|
275
279
|
...e,
|
|
276
|
-
[
|
|
280
|
+
[n.field]: r
|
|
277
281
|
};
|
|
278
|
-
|
|
282
|
+
s(m);
|
|
279
283
|
}
|
|
280
284
|
},
|
|
281
|
-
String(
|
|
285
|
+
String(n.field)
|
|
282
286
|
);
|
|
283
|
-
if (
|
|
287
|
+
if (n.type === "text")
|
|
284
288
|
return /* @__PURE__ */ t.jsx(
|
|
285
|
-
|
|
289
|
+
At,
|
|
286
290
|
{
|
|
287
|
-
typesText: e[
|
|
288
|
-
setTypesText: (
|
|
289
|
-
const
|
|
291
|
+
typesText: e[n.field.type],
|
|
292
|
+
setTypesText: (r) => {
|
|
293
|
+
const m = {
|
|
290
294
|
...e,
|
|
291
|
-
[
|
|
295
|
+
[n.field.type]: r
|
|
292
296
|
};
|
|
293
|
-
|
|
297
|
+
s(m);
|
|
294
298
|
},
|
|
295
|
-
text: e[
|
|
296
|
-
setText: (
|
|
297
|
-
const
|
|
299
|
+
text: e[n.field.text] || "",
|
|
300
|
+
setText: (r) => {
|
|
301
|
+
const m = {
|
|
298
302
|
...e,
|
|
299
|
-
[
|
|
303
|
+
[n.field.text]: r
|
|
300
304
|
};
|
|
301
|
-
|
|
305
|
+
s(m);
|
|
302
306
|
},
|
|
303
|
-
subtitle:
|
|
307
|
+
subtitle: n.label
|
|
304
308
|
}
|
|
305
309
|
);
|
|
306
|
-
if (
|
|
310
|
+
if (n.type === "input")
|
|
307
311
|
return /* @__PURE__ */ t.jsx(
|
|
308
312
|
W,
|
|
309
313
|
{
|
|
310
|
-
onChange: (
|
|
311
|
-
const
|
|
314
|
+
onChange: (r) => {
|
|
315
|
+
const m = {
|
|
312
316
|
...e,
|
|
313
|
-
[
|
|
317
|
+
[n.field]: r
|
|
314
318
|
};
|
|
315
|
-
|
|
319
|
+
s(m);
|
|
316
320
|
},
|
|
317
|
-
value: e[
|
|
318
|
-
label:
|
|
319
|
-
placeholder:
|
|
321
|
+
value: e[n.field] || "",
|
|
322
|
+
label: n.label,
|
|
323
|
+
placeholder: n.placeholder
|
|
320
324
|
}
|
|
321
325
|
);
|
|
322
|
-
if (
|
|
323
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
326
|
+
if (n.type === "inputSwitch")
|
|
327
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.link, children: [
|
|
324
328
|
/* @__PURE__ */ t.jsx(
|
|
325
329
|
W,
|
|
326
330
|
{
|
|
327
|
-
onChange: (
|
|
328
|
-
const
|
|
331
|
+
onChange: (r) => {
|
|
332
|
+
const m = {
|
|
329
333
|
...e,
|
|
330
|
-
[
|
|
334
|
+
[n.field.text]: r
|
|
331
335
|
};
|
|
332
|
-
|
|
336
|
+
s(m);
|
|
333
337
|
},
|
|
334
|
-
value: e[
|
|
335
|
-
label:
|
|
336
|
-
placeholder:
|
|
338
|
+
value: e[n.field.text] || "",
|
|
339
|
+
label: n.inputLabel,
|
|
340
|
+
placeholder: n.placeholder
|
|
337
341
|
}
|
|
338
342
|
),
|
|
339
343
|
/* @__PURE__ */ t.jsx(
|
|
340
344
|
K,
|
|
341
345
|
{
|
|
342
|
-
current: !!e[
|
|
343
|
-
label:
|
|
344
|
-
onChange: (
|
|
345
|
-
const
|
|
346
|
+
current: !!e[n.field.switch] || !1,
|
|
347
|
+
label: n.switchLabel,
|
|
348
|
+
onChange: (r) => {
|
|
349
|
+
const m = {
|
|
346
350
|
...e,
|
|
347
|
-
[
|
|
351
|
+
[n.field.switch]: r
|
|
348
352
|
};
|
|
349
|
-
|
|
353
|
+
s(m);
|
|
350
354
|
}
|
|
351
355
|
}
|
|
352
356
|
)
|
|
353
357
|
] });
|
|
354
|
-
if (
|
|
358
|
+
if (n.type === "list")
|
|
355
359
|
return /* @__PURE__ */ t.jsx(
|
|
356
|
-
|
|
360
|
+
Ae,
|
|
357
361
|
{
|
|
358
|
-
items: e[
|
|
359
|
-
setItems: (
|
|
360
|
-
const
|
|
362
|
+
items: e[n.field] || [],
|
|
363
|
+
setItems: (r) => {
|
|
364
|
+
const m = {
|
|
361
365
|
...e,
|
|
362
|
-
[
|
|
366
|
+
[n.field]: r
|
|
363
367
|
};
|
|
364
|
-
|
|
368
|
+
s(m);
|
|
365
369
|
},
|
|
366
370
|
itemsType: "select",
|
|
367
|
-
draggable:
|
|
368
|
-
itemsOptions:
|
|
369
|
-
deletable:
|
|
371
|
+
draggable: n.draggable || !1,
|
|
372
|
+
itemsOptions: n.itemsOptions,
|
|
373
|
+
deletable: n.deletable || !1,
|
|
370
374
|
editable: !1,
|
|
371
|
-
subtitle:
|
|
375
|
+
subtitle: n.label,
|
|
376
|
+
addableOptions: n.addableOptions
|
|
372
377
|
}
|
|
373
378
|
);
|
|
374
|
-
if (
|
|
379
|
+
if (n.type === "select")
|
|
375
380
|
return /* @__PURE__ */ t.jsx(
|
|
376
|
-
|
|
381
|
+
Z,
|
|
377
382
|
{
|
|
378
|
-
options:
|
|
379
|
-
onChange: (
|
|
380
|
-
const
|
|
383
|
+
options: n.itemsOptions,
|
|
384
|
+
onChange: (r) => {
|
|
385
|
+
const m = {
|
|
381
386
|
...e,
|
|
382
|
-
[
|
|
387
|
+
[n.field]: r
|
|
383
388
|
};
|
|
384
|
-
|
|
389
|
+
s(m);
|
|
385
390
|
},
|
|
386
|
-
label:
|
|
387
|
-
value: e[
|
|
388
|
-
leftAddon:
|
|
391
|
+
label: n.label,
|
|
392
|
+
value: e[n.field] || "String",
|
|
393
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] })
|
|
389
394
|
}
|
|
390
395
|
);
|
|
391
396
|
}) })
|
|
@@ -393,119 +398,119 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
393
398
|
}
|
|
394
399
|
);
|
|
395
400
|
}
|
|
396
|
-
),
|
|
397
|
-
other:
|
|
398
|
-
subtitle:
|
|
399
|
-
items:
|
|
401
|
+
), Be = "_other_g74jx_1", Se = "_subtitle_g74jx_7", Pe = "_items_g74jx_14", vt = {
|
|
402
|
+
other: Be,
|
|
403
|
+
subtitle: Se,
|
|
404
|
+
items: Pe
|
|
400
405
|
}, xt = (u) => {
|
|
401
|
-
const { items:
|
|
402
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
403
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
404
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
406
|
+
const { items: a, title: e = "Other" } = u;
|
|
407
|
+
return /* @__PURE__ */ t.jsxs("div", { className: vt.other, children: [
|
|
408
|
+
/* @__PURE__ */ t.jsx("h5", { className: vt.subtitle, children: e }),
|
|
409
|
+
/* @__PURE__ */ t.jsx("div", { className: vt.items, children: a.map((s, i) => /* @__PURE__ */ t.jsx(
|
|
405
410
|
K,
|
|
406
411
|
{
|
|
407
|
-
current:
|
|
408
|
-
onChange: (
|
|
409
|
-
label:
|
|
412
|
+
current: s.isItem,
|
|
413
|
+
onChange: (c) => s.setIsItem(c),
|
|
414
|
+
label: s.label,
|
|
410
415
|
hasBackground: !0,
|
|
411
416
|
paddingless: !1
|
|
412
417
|
},
|
|
413
418
|
i
|
|
414
419
|
)) })
|
|
415
420
|
] });
|
|
416
|
-
},
|
|
417
|
-
const { index:
|
|
421
|
+
}, Te = (u) => {
|
|
422
|
+
const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
|
|
418
423
|
accept: "product",
|
|
419
|
-
hover(
|
|
420
|
-
|
|
424
|
+
hover(o) {
|
|
425
|
+
o.index !== a && (e(o.index, a), o.index = a);
|
|
421
426
|
}
|
|
422
|
-
}), [{ isDragging:
|
|
427
|
+
}), [{ isDragging: c }, l] = wt({
|
|
423
428
|
type: "product",
|
|
424
|
-
item: { index:
|
|
425
|
-
collect: (
|
|
426
|
-
isDragging:
|
|
429
|
+
item: { index: a },
|
|
430
|
+
collect: (o) => ({
|
|
431
|
+
isDragging: o.isDragging()
|
|
427
432
|
})
|
|
428
433
|
});
|
|
429
434
|
return /* @__PURE__ */ t.jsx(
|
|
430
435
|
"div",
|
|
431
436
|
{
|
|
432
|
-
ref: (
|
|
433
|
-
className: `${
|
|
434
|
-
children:
|
|
437
|
+
ref: (o) => l(i(o)),
|
|
438
|
+
className: `${H.product} ${c ? H.dragging : ""}`,
|
|
439
|
+
children: s
|
|
435
440
|
}
|
|
436
441
|
);
|
|
437
|
-
},
|
|
442
|
+
}, Ae = (u) => {
|
|
438
443
|
const {
|
|
439
|
-
isActiveItems:
|
|
444
|
+
isActiveItems: a,
|
|
440
445
|
setIsActiveItems: e,
|
|
441
|
-
items:
|
|
446
|
+
items: s,
|
|
442
447
|
setItems: i,
|
|
443
|
-
other:
|
|
444
|
-
title:
|
|
445
|
-
subtitle:
|
|
446
|
-
editable:
|
|
447
|
-
draggable:
|
|
448
|
-
withImage:
|
|
449
|
-
deletable:
|
|
450
|
-
addable:
|
|
451
|
-
itemsType:
|
|
448
|
+
other: c,
|
|
449
|
+
title: l,
|
|
450
|
+
subtitle: o,
|
|
451
|
+
editable: n = !0,
|
|
452
|
+
draggable: r = !1,
|
|
453
|
+
withImage: m = !1,
|
|
454
|
+
deletable: d = !0,
|
|
455
|
+
addable: T = !0,
|
|
456
|
+
itemsType: x,
|
|
452
457
|
itemsPlaceholder: g = "",
|
|
453
|
-
itemsOptions:
|
|
458
|
+
itemsOptions: h,
|
|
454
459
|
hasRangeSelector: O = !1,
|
|
455
|
-
rangeSelectorOptions:
|
|
456
|
-
modalOptions:
|
|
457
|
-
addableOptions:
|
|
460
|
+
rangeSelectorOptions: q,
|
|
461
|
+
modalOptions: v,
|
|
462
|
+
addableOptions: E = {},
|
|
458
463
|
limit: C,
|
|
459
|
-
autoScrollInterval:
|
|
460
|
-
} = u, [
|
|
464
|
+
autoScrollInterval: B
|
|
465
|
+
} = u, [f, y] = p.useState(null), [M, $] = p.useState({
|
|
461
466
|
top: 0,
|
|
462
467
|
left: 0
|
|
463
|
-
}), [
|
|
464
|
-
const
|
|
465
|
-
|
|
468
|
+
}), [k, N] = p.useState(null), L = p.useRef(null), [R, U] = p.useState(!1), tt = (_, S) => {
|
|
469
|
+
const w = [...s], [X] = w.splice(_, 1);
|
|
470
|
+
w.splice(S, 0, X), i(w);
|
|
466
471
|
};
|
|
467
|
-
|
|
468
|
-
const
|
|
469
|
-
|
|
472
|
+
p.useEffect(() => {
|
|
473
|
+
const _ = () => {
|
|
474
|
+
y(null), U(!1);
|
|
470
475
|
};
|
|
471
|
-
return document.body.addEventListener("click",
|
|
472
|
-
|
|
476
|
+
return document.body.addEventListener("click", _), y(null), U(!1), () => {
|
|
477
|
+
y(null), U(!1), document.body.removeEventListener("click", _);
|
|
473
478
|
};
|
|
474
|
-
}, []),
|
|
475
|
-
if (
|
|
476
|
-
const
|
|
477
|
-
i(
|
|
479
|
+
}, []), p.useEffect(() => {
|
|
480
|
+
if (f) {
|
|
481
|
+
const _ = [...s].map((S) => S.id === f.id ? f : S);
|
|
482
|
+
i(_);
|
|
478
483
|
}
|
|
479
|
-
}, [
|
|
480
|
-
if (
|
|
481
|
-
const
|
|
482
|
-
let
|
|
483
|
-
|
|
484
|
-
top:
|
|
485
|
-
left:
|
|
484
|
+
}, [f]), p.useEffect(() => {
|
|
485
|
+
if (L.current && k) {
|
|
486
|
+
const _ = L.current.getBoundingClientRect().height, S = window.innerHeight;
|
|
487
|
+
let w = k.top;
|
|
488
|
+
w + _ > S + window.scrollY - 200 && (w = S + window.scrollY - _ - 200), w < 0 && (w = 10), $({
|
|
489
|
+
top: w,
|
|
490
|
+
left: k.left
|
|
486
491
|
});
|
|
487
492
|
}
|
|
488
|
-
}, [
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
top:
|
|
494
|
-
left:
|
|
495
|
-
}),
|
|
493
|
+
}, [L.current, k]);
|
|
494
|
+
const at = (_, S) => {
|
|
495
|
+
_.stopPropagation();
|
|
496
|
+
const w = _.target.getBoundingClientRect();
|
|
497
|
+
N({
|
|
498
|
+
top: w.top + window.scrollY,
|
|
499
|
+
left: w.left - 30
|
|
500
|
+
}), y(S), U(!0);
|
|
496
501
|
};
|
|
497
|
-
function
|
|
498
|
-
if (
|
|
499
|
-
return
|
|
502
|
+
function j(_) {
|
|
503
|
+
if (m)
|
|
504
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
500
505
|
"img",
|
|
501
506
|
{
|
|
502
|
-
src: `https://imagedelivery.net/${
|
|
507
|
+
src: `https://imagedelivery.net/${_[0]}/w=1000`,
|
|
503
508
|
alt: "image",
|
|
504
509
|
width: 16,
|
|
505
510
|
height: 16
|
|
506
511
|
}
|
|
507
512
|
) : /* @__PURE__ */ t.jsx(
|
|
508
|
-
|
|
513
|
+
b,
|
|
509
514
|
{
|
|
510
515
|
name: "Image",
|
|
511
516
|
width: 16,
|
|
@@ -514,11 +519,11 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
514
519
|
}
|
|
515
520
|
);
|
|
516
521
|
}
|
|
517
|
-
const A = (
|
|
522
|
+
const A = (_, S) => {
|
|
518
523
|
var X;
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
|
|
524
|
+
const w = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
525
|
+
r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
526
|
+
b,
|
|
522
527
|
{
|
|
523
528
|
name: "DotsSixVertical",
|
|
524
529
|
hoverable: !0,
|
|
@@ -526,156 +531,161 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
526
531
|
height: 20
|
|
527
532
|
}
|
|
528
533
|
) }),
|
|
529
|
-
|
|
530
|
-
|
|
534
|
+
x === "select" && /* @__PURE__ */ t.jsx(
|
|
535
|
+
Z,
|
|
531
536
|
{
|
|
532
|
-
onChange: (
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
537
|
+
onChange: (D) => {
|
|
538
|
+
const Y = [...s], lt = h.find((pt) => pt.name === D);
|
|
539
|
+
if (!lt) return;
|
|
540
|
+
const ot = Y.map((pt) => pt.id === _.id ? {
|
|
541
|
+
...lt,
|
|
542
|
+
name: D
|
|
543
|
+
} : pt);
|
|
544
|
+
y({
|
|
545
|
+
..._,
|
|
546
|
+
name: D
|
|
547
|
+
}), i([...ot]);
|
|
541
548
|
},
|
|
542
|
-
value:
|
|
543
|
-
options:
|
|
544
|
-
leftAddon:
|
|
549
|
+
value: _.name,
|
|
550
|
+
options: h.filter((D) => !s.find((Y) => Y.name === D.name)).map((D) => D.name),
|
|
551
|
+
leftAddon: j(_.images)
|
|
545
552
|
}
|
|
546
553
|
),
|
|
547
|
-
|
|
554
|
+
x === "input" && /* @__PURE__ */ t.jsx(
|
|
548
555
|
W,
|
|
549
556
|
{
|
|
550
|
-
onChange: (
|
|
551
|
-
const lt = [...
|
|
552
|
-
...
|
|
553
|
-
name:
|
|
554
|
-
} :
|
|
557
|
+
onChange: (D) => {
|
|
558
|
+
const lt = [...s].map((ot) => ot.id === _.id ? {
|
|
559
|
+
..._,
|
|
560
|
+
name: D
|
|
561
|
+
} : ot);
|
|
555
562
|
i([...lt]);
|
|
556
563
|
},
|
|
557
|
-
value:
|
|
564
|
+
value: _.name,
|
|
558
565
|
placeholder: g
|
|
559
566
|
}
|
|
560
567
|
),
|
|
561
|
-
|
|
568
|
+
x === "image" && /* @__PURE__ */ t.jsx(
|
|
562
569
|
ht,
|
|
563
570
|
{
|
|
564
|
-
onChange: (
|
|
565
|
-
const lt = [...
|
|
566
|
-
...
|
|
567
|
-
images:
|
|
568
|
-
} :
|
|
571
|
+
onChange: (D) => {
|
|
572
|
+
const lt = [...s].map((ot) => ot.id === _.id ? {
|
|
573
|
+
..._,
|
|
574
|
+
images: D
|
|
575
|
+
} : ot);
|
|
569
576
|
i([...lt]);
|
|
570
577
|
},
|
|
571
|
-
activeImage: (X =
|
|
578
|
+
activeImage: (X = s.find((D) => D.id === _.id)) == null ? void 0 : X.images[0]
|
|
572
579
|
}
|
|
573
580
|
),
|
|
574
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
575
|
-
|
|
576
|
-
|
|
581
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
|
|
582
|
+
n && /* @__PURE__ */ t.jsx(
|
|
583
|
+
b,
|
|
577
584
|
{
|
|
578
585
|
name: "Sliders",
|
|
579
586
|
hoverable: !0,
|
|
580
587
|
width: 20,
|
|
581
588
|
height: 20,
|
|
582
|
-
onClick: (
|
|
589
|
+
onClick: (D) => at(D, _)
|
|
583
590
|
}
|
|
584
591
|
),
|
|
585
|
-
|
|
586
|
-
|
|
592
|
+
d && /* @__PURE__ */ t.jsx(
|
|
593
|
+
b,
|
|
587
594
|
{
|
|
588
595
|
name: "Trash",
|
|
589
596
|
hoverable: !0,
|
|
590
597
|
width: 20,
|
|
591
598
|
height: 20,
|
|
592
599
|
fill: "#C12A2A",
|
|
593
|
-
onClick: () => i(
|
|
600
|
+
onClick: () => i(s.filter((D) => D.id !== _.id))
|
|
594
601
|
}
|
|
595
602
|
)
|
|
596
603
|
] })
|
|
597
604
|
] });
|
|
598
|
-
return
|
|
599
|
-
|
|
605
|
+
return r ? /* @__PURE__ */ t.jsx(
|
|
606
|
+
Te,
|
|
600
607
|
{
|
|
601
|
-
product:
|
|
602
|
-
index:
|
|
603
|
-
moveProduct:
|
|
604
|
-
children:
|
|
608
|
+
product: _,
|
|
609
|
+
index: S,
|
|
610
|
+
moveProduct: tt,
|
|
611
|
+
children: w
|
|
605
612
|
},
|
|
606
|
-
|
|
613
|
+
_.id
|
|
607
614
|
) : /* @__PURE__ */ t.jsx(
|
|
608
615
|
"div",
|
|
609
616
|
{
|
|
610
|
-
className:
|
|
611
|
-
children:
|
|
617
|
+
className: H.product,
|
|
618
|
+
children: w
|
|
612
619
|
},
|
|
613
|
-
|
|
620
|
+
_.id
|
|
614
621
|
);
|
|
615
622
|
};
|
|
616
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
617
|
-
(
|
|
618
|
-
|
|
619
|
-
|
|
623
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
|
|
624
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
625
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: l }),
|
|
626
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
620
627
|
K,
|
|
621
628
|
{
|
|
622
|
-
current:
|
|
623
|
-
onChange: (
|
|
629
|
+
current: a,
|
|
630
|
+
onChange: (_) => e == null ? void 0 : e(_)
|
|
624
631
|
}
|
|
625
632
|
)
|
|
626
633
|
] }),
|
|
627
|
-
|
|
628
|
-
|
|
634
|
+
f && n && v && R && /* @__PURE__ */ t.jsx(
|
|
635
|
+
Ce,
|
|
629
636
|
{
|
|
630
|
-
ref:
|
|
631
|
-
activeItem:
|
|
632
|
-
setActiveItem:
|
|
637
|
+
ref: L,
|
|
638
|
+
activeItem: f,
|
|
639
|
+
setActiveItem: y,
|
|
633
640
|
popupPosition: M,
|
|
634
|
-
modalOptions:
|
|
641
|
+
modalOptions: v,
|
|
635
642
|
setIsOpenModal: U
|
|
636
643
|
}
|
|
637
644
|
),
|
|
638
|
-
O &&
|
|
639
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
645
|
+
O && q && /* @__PURE__ */ t.jsx(It, { ...q }),
|
|
646
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
|
|
647
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: o }),
|
|
648
|
+
r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((_, S) => A(_, S)) }) : s.map((_, S) => A(_, S)),
|
|
649
|
+
T && /* @__PURE__ */ t.jsx("div", { className: H.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
643
650
|
it,
|
|
644
651
|
{
|
|
645
652
|
withoutHover: !0,
|
|
646
|
-
className: H
|
|
647
|
-
[
|
|
653
|
+
className: F(H.button, {
|
|
654
|
+
[H.disabled]: !!(C && C <= s.length || s.length === (h == null ? void 0 : h.length))
|
|
648
655
|
}),
|
|
649
656
|
size: "s",
|
|
650
|
-
disabled: !!(C && C <=
|
|
657
|
+
disabled: !!(C && C <= s.length || s.length === (h == null ? void 0 : h.length)),
|
|
651
658
|
onClick: () => {
|
|
652
|
-
const
|
|
653
|
-
let
|
|
654
|
-
if (
|
|
655
|
-
for (let
|
|
656
|
-
if (!
|
|
657
|
-
|
|
659
|
+
const _ = [...s];
|
|
660
|
+
let S = null;
|
|
661
|
+
if (h) {
|
|
662
|
+
for (let w = 0; w < h.length; w++)
|
|
663
|
+
if (!s.find((X) => X.id === h[w].id)) {
|
|
664
|
+
S = h[w];
|
|
658
665
|
break;
|
|
659
666
|
}
|
|
660
667
|
}
|
|
661
|
-
|
|
662
|
-
name:
|
|
663
|
-
id: (
|
|
664
|
-
...
|
|
665
|
-
}) :
|
|
668
|
+
x === "select" ? _.push({
|
|
669
|
+
name: S ? S.name : h[0].name,
|
|
670
|
+
id: (S == null ? void 0 : S.id) || h[0].id,
|
|
671
|
+
...E
|
|
672
|
+
}) : x === "input" ? _.push({
|
|
666
673
|
name: "",
|
|
667
|
-
id:
|
|
668
|
-
...
|
|
669
|
-
}) :
|
|
670
|
-
name: `Image ${
|
|
671
|
-
id:
|
|
672
|
-
...
|
|
673
|
-
}), i(
|
|
674
|
+
id: dt(),
|
|
675
|
+
...E
|
|
676
|
+
}) : _.push({
|
|
677
|
+
name: `Image ${s.length + 1}`,
|
|
678
|
+
id: dt(),
|
|
679
|
+
...E
|
|
680
|
+
}), i(_);
|
|
681
|
+
},
|
|
682
|
+
style: {
|
|
683
|
+
width: "fit-content"
|
|
674
684
|
},
|
|
675
685
|
children: [
|
|
676
686
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
677
687
|
/* @__PURE__ */ t.jsx(
|
|
678
|
-
|
|
688
|
+
b,
|
|
679
689
|
{
|
|
680
690
|
name: "Plus",
|
|
681
691
|
width: 16,
|
|
@@ -684,16 +694,16 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
684
694
|
)
|
|
685
695
|
]
|
|
686
696
|
}
|
|
687
|
-
)
|
|
697
|
+
) })
|
|
688
698
|
] }),
|
|
689
|
-
|
|
690
|
-
|
|
699
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c }),
|
|
700
|
+
B !== void 0 && /* @__PURE__ */ t.jsx(
|
|
691
701
|
W,
|
|
692
702
|
{
|
|
693
703
|
label: "Auto scroll interval",
|
|
694
704
|
type: "number",
|
|
695
|
-
value: String(
|
|
696
|
-
onChange: (
|
|
705
|
+
value: String(B.scrollInterval),
|
|
706
|
+
onChange: (_) => B.setScrollInterval(Number(_)),
|
|
697
707
|
min: 0.1,
|
|
698
708
|
max: 100,
|
|
699
709
|
style: {
|
|
@@ -703,58 +713,59 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
703
713
|
}
|
|
704
714
|
)
|
|
705
715
|
] });
|
|
706
|
-
},
|
|
707
|
-
title:
|
|
708
|
-
subtitle:
|
|
709
|
-
header:
|
|
710
|
-
text:
|
|
711
|
-
productsBlock:
|
|
712
|
-
top:
|
|
713
|
-
itemsBlock:
|
|
714
|
-
typeTexts:
|
|
715
|
-
block:
|
|
716
|
-
active:
|
|
717
|
-
products:
|
|
718
|
-
product:
|
|
719
|
-
button:
|
|
720
|
-
disabled:
|
|
721
|
-
image:
|
|
722
|
-
info:
|
|
723
|
-
name:
|
|
724
|
-
buttons:
|
|
725
|
-
modal:
|
|
726
|
-
link:
|
|
727
|
-
modalOptions:
|
|
728
|
-
|
|
716
|
+
}, Oe = "_title_1jjcw_1", qe = "_subtitle_1jjcw_5", De = "_header_1jjcw_12", Ee = "_text_1jjcw_13", Le = "_productsBlock_1jjcw_14", Re = "_top_1jjcw_26", Me = "_itemsBlock_1jjcw_35", He = "_typeTexts_1jjcw_41", ze = "_block_1jjcw_48", Ve = "_active_1jjcw_61", Fe = "_products_1jjcw_14", Ue = "_product_1jjcw_14", Ye = "_button_1jjcw_80", Ge = "_disabled_1jjcw_91", We = "_image_1jjcw_95", Xe = "_info_1jjcw_102", Je = "_name_1jjcw_114", Qe = "_buttons_1jjcw_118", Ke = "_modal_1jjcw_125", Ze = "_link_1jjcw_145", ts = "_modalOptions_1jjcw_151", es = "_addButton_1jjcw_157", Q = {
|
|
717
|
+
title: Oe,
|
|
718
|
+
subtitle: qe,
|
|
719
|
+
header: De,
|
|
720
|
+
text: Ee,
|
|
721
|
+
productsBlock: Le,
|
|
722
|
+
top: Re,
|
|
723
|
+
itemsBlock: Me,
|
|
724
|
+
typeTexts: He,
|
|
725
|
+
block: ze,
|
|
726
|
+
active: Ve,
|
|
727
|
+
products: Fe,
|
|
728
|
+
product: Ue,
|
|
729
|
+
button: Ye,
|
|
730
|
+
disabled: Ge,
|
|
731
|
+
image: We,
|
|
732
|
+
info: Xe,
|
|
733
|
+
name: Je,
|
|
734
|
+
buttons: Qe,
|
|
735
|
+
modal: Ke,
|
|
736
|
+
link: Ze,
|
|
737
|
+
modalOptions: ts,
|
|
738
|
+
addButton: es
|
|
739
|
+
}, Ua = (u) => {
|
|
729
740
|
const {
|
|
730
|
-
isActiveItems:
|
|
741
|
+
isActiveItems: a,
|
|
731
742
|
setIsActiveItems: e,
|
|
732
|
-
items:
|
|
743
|
+
items: s,
|
|
733
744
|
setItems: i,
|
|
734
|
-
other:
|
|
735
|
-
title:
|
|
736
|
-
subtitle:
|
|
737
|
-
draggable:
|
|
738
|
-
withImage:
|
|
739
|
-
addable:
|
|
740
|
-
itemsOptions:
|
|
741
|
-
hasRangeSelector:
|
|
742
|
-
rangeSelectorOptions:
|
|
745
|
+
other: c,
|
|
746
|
+
title: l,
|
|
747
|
+
subtitle: o,
|
|
748
|
+
draggable: n = !1,
|
|
749
|
+
withImage: r = !1,
|
|
750
|
+
addable: m = !0,
|
|
751
|
+
itemsOptions: d,
|
|
752
|
+
hasRangeSelector: T = !1,
|
|
753
|
+
rangeSelectorOptions: x,
|
|
743
754
|
limit: g,
|
|
744
|
-
autoScrollInterval:
|
|
755
|
+
autoScrollInterval: h
|
|
745
756
|
} = u;
|
|
746
|
-
function O(
|
|
747
|
-
if (
|
|
748
|
-
return
|
|
757
|
+
function O(v) {
|
|
758
|
+
if (r)
|
|
759
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
749
760
|
"img",
|
|
750
761
|
{
|
|
751
|
-
src: `https://imagedelivery.net/${
|
|
762
|
+
src: `https://imagedelivery.net/${v[0]}/w=1000`,
|
|
752
763
|
alt: "image",
|
|
753
764
|
width: 16,
|
|
754
765
|
height: 16
|
|
755
766
|
}
|
|
756
767
|
) : /* @__PURE__ */ t.jsx(
|
|
757
|
-
|
|
768
|
+
b,
|
|
758
769
|
{
|
|
759
770
|
name: "Image",
|
|
760
771
|
width: 16,
|
|
@@ -763,12 +774,12 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
763
774
|
}
|
|
764
775
|
);
|
|
765
776
|
}
|
|
766
|
-
const
|
|
767
|
-
const
|
|
768
|
-
if (!
|
|
777
|
+
const q = (v) => {
|
|
778
|
+
const E = d.find((B) => B.id === v);
|
|
779
|
+
if (!E) return;
|
|
769
780
|
const C = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
770
|
-
|
|
771
|
-
|
|
781
|
+
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
782
|
+
b,
|
|
772
783
|
{
|
|
773
784
|
name: "DotsSixVertical",
|
|
774
785
|
hoverable: !0,
|
|
@@ -777,80 +788,83 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
777
788
|
}
|
|
778
789
|
) }),
|
|
779
790
|
/* @__PURE__ */ t.jsx(
|
|
780
|
-
|
|
791
|
+
Z,
|
|
781
792
|
{
|
|
782
|
-
onChange: (
|
|
783
|
-
const
|
|
784
|
-
if (!
|
|
785
|
-
const M =
|
|
786
|
-
i([
|
|
793
|
+
onChange: (B) => {
|
|
794
|
+
const f = [...s], y = d.find((k) => k.name === B);
|
|
795
|
+
if (!y) return;
|
|
796
|
+
const M = y.id, $ = f.map((k) => k === v ? M : k);
|
|
797
|
+
i([...$]);
|
|
787
798
|
},
|
|
788
|
-
value:
|
|
789
|
-
options:
|
|
790
|
-
leftAddon: O(
|
|
799
|
+
value: E.name,
|
|
800
|
+
options: d.filter((B) => !s.find((f) => f === B.id)).map((B) => B.name),
|
|
801
|
+
leftAddon: O(E.images)
|
|
791
802
|
}
|
|
792
803
|
),
|
|
793
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
794
|
-
|
|
804
|
+
/* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx(
|
|
805
|
+
b,
|
|
795
806
|
{
|
|
796
807
|
name: "Trash",
|
|
797
808
|
hoverable: !0,
|
|
798
809
|
width: 20,
|
|
799
810
|
height: 20,
|
|
800
811
|
fill: "#C12A2A",
|
|
801
|
-
onClick: () => i(
|
|
812
|
+
onClick: () => i(s.filter((B) => B !== v))
|
|
802
813
|
}
|
|
803
814
|
) })
|
|
804
815
|
] });
|
|
805
816
|
return /* @__PURE__ */ t.jsx(
|
|
806
817
|
"div",
|
|
807
818
|
{
|
|
808
|
-
className:
|
|
819
|
+
className: Q.product,
|
|
809
820
|
children: C
|
|
810
821
|
},
|
|
811
|
-
|
|
822
|
+
v
|
|
812
823
|
);
|
|
813
824
|
};
|
|
814
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
815
|
-
(
|
|
816
|
-
|
|
817
|
-
|
|
825
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
|
|
826
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
|
|
827
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: l }),
|
|
828
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
818
829
|
K,
|
|
819
830
|
{
|
|
820
|
-
current:
|
|
821
|
-
onChange: (
|
|
831
|
+
current: a,
|
|
832
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
822
833
|
}
|
|
823
834
|
)
|
|
824
835
|
] }),
|
|
825
|
-
|
|
826
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
836
|
+
T && x && /* @__PURE__ */ t.jsx(It, { ...x }),
|
|
837
|
+
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
838
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: o }),
|
|
839
|
+
s.map((v) => q(v)),
|
|
840
|
+
m && /* @__PURE__ */ t.jsx("div", { className: Q.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
830
841
|
it,
|
|
831
842
|
{
|
|
832
843
|
withoutHover: !0,
|
|
833
|
-
className:
|
|
834
|
-
[
|
|
844
|
+
className: F(Q.button, {
|
|
845
|
+
[Q.disabled]: !!(g && g <= s.length || s.length === d.length)
|
|
835
846
|
}),
|
|
836
847
|
size: "s",
|
|
837
|
-
disabled: !!(g && g <=
|
|
848
|
+
disabled: !!(g && g <= s.length || s.length === d.length),
|
|
838
849
|
onClick: () => {
|
|
839
|
-
const
|
|
840
|
-
let
|
|
841
|
-
if (
|
|
842
|
-
for (let C = 0; C <
|
|
843
|
-
if (!
|
|
844
|
-
|
|
850
|
+
const v = [...s];
|
|
851
|
+
let E = null;
|
|
852
|
+
if (d) {
|
|
853
|
+
for (let C = 0; C < d.length; C++)
|
|
854
|
+
if (!s.find((B) => B === d[C].id)) {
|
|
855
|
+
E = d[C];
|
|
845
856
|
break;
|
|
846
857
|
}
|
|
847
858
|
}
|
|
848
|
-
|
|
859
|
+
v.push((E == null ? void 0 : E.id) || d[0].id), i(v);
|
|
860
|
+
},
|
|
861
|
+
style: {
|
|
862
|
+
width: "fit-content"
|
|
849
863
|
},
|
|
850
864
|
children: [
|
|
851
865
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
852
866
|
/* @__PURE__ */ t.jsx(
|
|
853
|
-
|
|
867
|
+
b,
|
|
854
868
|
{
|
|
855
869
|
name: "Plus",
|
|
856
870
|
width: 16,
|
|
@@ -859,16 +873,16 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
859
873
|
)
|
|
860
874
|
]
|
|
861
875
|
}
|
|
862
|
-
)
|
|
876
|
+
) })
|
|
863
877
|
] }),
|
|
864
|
-
|
|
865
|
-
|
|
878
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c }),
|
|
879
|
+
h !== void 0 && /* @__PURE__ */ t.jsx(
|
|
866
880
|
W,
|
|
867
881
|
{
|
|
868
882
|
label: "Auto scroll interval",
|
|
869
883
|
type: "number",
|
|
870
|
-
value: String(
|
|
871
|
-
onChange: (
|
|
884
|
+
value: String(h.scrollInterval),
|
|
885
|
+
onChange: (v) => h.setScrollInterval(Number(v)),
|
|
872
886
|
min: 0.1,
|
|
873
887
|
max: 100,
|
|
874
888
|
style: {
|
|
@@ -878,162 +892,166 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
878
892
|
}
|
|
879
893
|
)
|
|
880
894
|
] });
|
|
881
|
-
},
|
|
882
|
-
title:
|
|
883
|
-
subtitle:
|
|
884
|
-
header:
|
|
885
|
-
text:
|
|
886
|
-
productsBlock:
|
|
887
|
-
top:
|
|
888
|
-
itemsBlock:
|
|
889
|
-
typeTexts:
|
|
890
|
-
block:
|
|
891
|
-
active:
|
|
892
|
-
products:
|
|
893
|
-
product:
|
|
894
|
-
button:
|
|
895
|
-
disabled:
|
|
896
|
-
image:
|
|
897
|
-
info:
|
|
898
|
-
name:
|
|
899
|
-
buttons:
|
|
900
|
-
modal:
|
|
901
|
-
link:
|
|
902
|
-
modalOptions:
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
895
|
+
}, ss = "_title_iqcxl_1", ns = "_subtitle_iqcxl_5", is = "_header_iqcxl_12", as = "_text_iqcxl_13", os = "_productsBlock_iqcxl_14", cs = "_top_iqcxl_26", ls = "_itemsBlock_iqcxl_35", rs = "_typeTexts_iqcxl_41", ds = "_block_iqcxl_48", us = "_active_iqcxl_61", ms = "_products_iqcxl_14", _s = "_product_iqcxl_14", hs = "_button_iqcxl_80", ps = "_disabled_iqcxl_91", gs = "_image_iqcxl_95", fs = "_info_iqcxl_102", xs = "_name_iqcxl_114", bs = "_buttons_iqcxl_118", vs = "_modal_iqcxl_125", js = "_link_iqcxl_146", ys = "_modalOptions_iqcxl_152", ks = "_addButton_iqcxl_164", V = {
|
|
896
|
+
title: ss,
|
|
897
|
+
subtitle: ns,
|
|
898
|
+
header: is,
|
|
899
|
+
text: as,
|
|
900
|
+
productsBlock: os,
|
|
901
|
+
top: cs,
|
|
902
|
+
itemsBlock: ls,
|
|
903
|
+
typeTexts: rs,
|
|
904
|
+
block: ds,
|
|
905
|
+
active: us,
|
|
906
|
+
products: ms,
|
|
907
|
+
product: _s,
|
|
908
|
+
button: hs,
|
|
909
|
+
disabled: ps,
|
|
910
|
+
image: gs,
|
|
911
|
+
info: fs,
|
|
912
|
+
name: xs,
|
|
913
|
+
buttons: bs,
|
|
914
|
+
modal: vs,
|
|
915
|
+
link: js,
|
|
916
|
+
modalOptions: ys,
|
|
917
|
+
addButton: ks
|
|
918
|
+
}, $s = p.forwardRef(
|
|
919
|
+
(u, a) => {
|
|
920
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
|
|
921
|
+
function o(n, r) {
|
|
922
|
+
return n.length > r ? `${n.slice(0, r)}...` : n;
|
|
923
|
+
}
|
|
906
924
|
return /* @__PURE__ */ t.jsxs(
|
|
907
925
|
"div",
|
|
908
926
|
{
|
|
909
|
-
ref:
|
|
910
|
-
className:
|
|
911
|
-
onClick: (
|
|
912
|
-
|
|
927
|
+
ref: a,
|
|
928
|
+
className: V.modal,
|
|
929
|
+
onClick: (n) => {
|
|
930
|
+
n.stopPropagation();
|
|
913
931
|
},
|
|
914
932
|
style: {
|
|
915
933
|
top: `${i.top}px`,
|
|
916
934
|
left: `${i.left}px`
|
|
917
935
|
},
|
|
918
936
|
children: [
|
|
919
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
920
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
937
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
938
|
+
/* @__PURE__ */ t.jsx("h3", { className: V.title, children: o(e.name, 20) }),
|
|
921
939
|
/* @__PURE__ */ t.jsx(
|
|
922
|
-
|
|
940
|
+
b,
|
|
923
941
|
{
|
|
924
942
|
name: "X",
|
|
925
943
|
height: 20,
|
|
926
944
|
width: 20,
|
|
927
945
|
hoverable: !0,
|
|
928
946
|
onClick: () => {
|
|
929
|
-
|
|
947
|
+
s(null), l(!1);
|
|
930
948
|
}
|
|
931
949
|
}
|
|
932
950
|
)
|
|
933
951
|
] }),
|
|
934
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
935
|
-
if (
|
|
952
|
+
/* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: c.map((n) => {
|
|
953
|
+
if (n.type === "image")
|
|
936
954
|
return /* @__PURE__ */ t.jsx(
|
|
937
955
|
ht,
|
|
938
956
|
{
|
|
939
957
|
label: "Put up an attractive image",
|
|
940
|
-
activeImage: e[
|
|
941
|
-
onChange: (
|
|
942
|
-
const
|
|
958
|
+
activeImage: e[n.field],
|
|
959
|
+
onChange: (r) => {
|
|
960
|
+
const m = {
|
|
943
961
|
...e,
|
|
944
|
-
[
|
|
962
|
+
[n.field]: r
|
|
945
963
|
};
|
|
946
|
-
|
|
964
|
+
s(m);
|
|
947
965
|
}
|
|
948
966
|
},
|
|
949
|
-
String(
|
|
967
|
+
String(n.field)
|
|
950
968
|
);
|
|
951
|
-
if (
|
|
969
|
+
if (n.type === "text")
|
|
952
970
|
return /* @__PURE__ */ t.jsx(
|
|
953
|
-
|
|
971
|
+
At,
|
|
954
972
|
{
|
|
955
|
-
typesText: e[
|
|
956
|
-
setTypesText: (
|
|
957
|
-
const
|
|
973
|
+
typesText: e[n.field.type],
|
|
974
|
+
setTypesText: (r) => {
|
|
975
|
+
const m = {
|
|
958
976
|
...e,
|
|
959
|
-
[
|
|
977
|
+
[n.field.type]: r
|
|
960
978
|
};
|
|
961
|
-
|
|
979
|
+
s(m);
|
|
962
980
|
},
|
|
963
|
-
text: e[
|
|
964
|
-
setText: (
|
|
965
|
-
const
|
|
981
|
+
text: e[n.field.text] || "",
|
|
982
|
+
setText: (r) => {
|
|
983
|
+
const m = {
|
|
966
984
|
...e,
|
|
967
|
-
[
|
|
985
|
+
[n.field.text]: r
|
|
968
986
|
};
|
|
969
|
-
|
|
987
|
+
s(m);
|
|
970
988
|
},
|
|
971
|
-
subtitle:
|
|
989
|
+
subtitle: n.label
|
|
972
990
|
}
|
|
973
991
|
);
|
|
974
|
-
if (
|
|
992
|
+
if (n.type === "input")
|
|
975
993
|
return /* @__PURE__ */ t.jsx(
|
|
976
994
|
W,
|
|
977
995
|
{
|
|
978
|
-
onChange: (
|
|
979
|
-
const
|
|
996
|
+
onChange: (r) => {
|
|
997
|
+
const m = {
|
|
980
998
|
...e,
|
|
981
|
-
[
|
|
999
|
+
[n.field]: r
|
|
982
1000
|
};
|
|
983
|
-
|
|
1001
|
+
s(m);
|
|
984
1002
|
},
|
|
985
|
-
value: e[
|
|
986
|
-
label:
|
|
987
|
-
placeholder:
|
|
1003
|
+
value: e[n.field] || "",
|
|
1004
|
+
label: n.label,
|
|
1005
|
+
placeholder: n.placeholder
|
|
988
1006
|
}
|
|
989
1007
|
);
|
|
990
|
-
if (
|
|
991
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1008
|
+
if (n.type === "inputSwitch")
|
|
1009
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.link, children: [
|
|
992
1010
|
/* @__PURE__ */ t.jsx(
|
|
993
1011
|
W,
|
|
994
1012
|
{
|
|
995
|
-
onChange: (
|
|
996
|
-
const
|
|
1013
|
+
onChange: (r) => {
|
|
1014
|
+
const m = {
|
|
997
1015
|
...e,
|
|
998
|
-
[
|
|
1016
|
+
[n.field.text]: r
|
|
999
1017
|
};
|
|
1000
|
-
|
|
1018
|
+
s(m);
|
|
1001
1019
|
},
|
|
1002
|
-
value: e[
|
|
1003
|
-
label:
|
|
1004
|
-
placeholder:
|
|
1020
|
+
value: e[n.field.text] || "",
|
|
1021
|
+
label: n.inputLabel,
|
|
1022
|
+
placeholder: n.placeholder
|
|
1005
1023
|
}
|
|
1006
1024
|
),
|
|
1007
1025
|
/* @__PURE__ */ t.jsx(
|
|
1008
1026
|
K,
|
|
1009
1027
|
{
|
|
1010
|
-
current: !!e[
|
|
1011
|
-
label:
|
|
1012
|
-
onChange: (
|
|
1013
|
-
const
|
|
1028
|
+
current: !!e[n.field.switch] || !1,
|
|
1029
|
+
label: n.switchLabel,
|
|
1030
|
+
onChange: (r) => {
|
|
1031
|
+
const m = {
|
|
1014
1032
|
...e,
|
|
1015
|
-
[
|
|
1033
|
+
[n.field.switch]: r
|
|
1016
1034
|
};
|
|
1017
|
-
|
|
1035
|
+
s(m);
|
|
1018
1036
|
}
|
|
1019
1037
|
}
|
|
1020
1038
|
)
|
|
1021
1039
|
] });
|
|
1022
|
-
if (
|
|
1040
|
+
if (n.type === "select")
|
|
1023
1041
|
return /* @__PURE__ */ t.jsx(
|
|
1024
|
-
|
|
1042
|
+
Z,
|
|
1025
1043
|
{
|
|
1026
|
-
options:
|
|
1027
|
-
onChange: (
|
|
1028
|
-
const
|
|
1044
|
+
options: n.itemsOptions,
|
|
1045
|
+
onChange: (r) => {
|
|
1046
|
+
const m = {
|
|
1029
1047
|
...e,
|
|
1030
|
-
[
|
|
1048
|
+
[n.field]: r
|
|
1031
1049
|
};
|
|
1032
|
-
|
|
1050
|
+
s(m);
|
|
1033
1051
|
},
|
|
1034
|
-
label:
|
|
1035
|
-
value: e[
|
|
1036
|
-
leftAddon:
|
|
1052
|
+
label: n.label,
|
|
1053
|
+
value: e[n.field] || "String",
|
|
1054
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] })
|
|
1037
1055
|
}
|
|
1038
1056
|
);
|
|
1039
1057
|
}) })
|
|
@@ -1041,97 +1059,97 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1041
1059
|
}
|
|
1042
1060
|
);
|
|
1043
1061
|
}
|
|
1044
|
-
),
|
|
1045
|
-
const { index:
|
|
1062
|
+
), ws = (u) => {
|
|
1063
|
+
const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
|
|
1046
1064
|
accept: "product",
|
|
1047
|
-
hover(
|
|
1048
|
-
|
|
1065
|
+
hover(o) {
|
|
1066
|
+
o.index !== a && (e(o.index, a), o.index = a);
|
|
1049
1067
|
}
|
|
1050
|
-
}), [{ isDragging:
|
|
1068
|
+
}), [{ isDragging: c }, l] = wt({
|
|
1051
1069
|
type: "product",
|
|
1052
|
-
item: { index:
|
|
1053
|
-
collect: (
|
|
1054
|
-
isDragging:
|
|
1070
|
+
item: { index: a },
|
|
1071
|
+
collect: (o) => ({
|
|
1072
|
+
isDragging: o.isDragging()
|
|
1055
1073
|
})
|
|
1056
1074
|
});
|
|
1057
1075
|
return /* @__PURE__ */ t.jsx(
|
|
1058
1076
|
"div",
|
|
1059
1077
|
{
|
|
1060
|
-
ref: (
|
|
1061
|
-
className: `${
|
|
1062
|
-
children:
|
|
1078
|
+
ref: (o) => l(i(o)),
|
|
1079
|
+
className: `${V.product} ${c ? V.dragging : ""}`,
|
|
1080
|
+
children: s
|
|
1063
1081
|
}
|
|
1064
1082
|
);
|
|
1065
|
-
},
|
|
1083
|
+
}, Ya = (u) => {
|
|
1066
1084
|
const {
|
|
1067
|
-
isActiveItems:
|
|
1085
|
+
isActiveItems: a,
|
|
1068
1086
|
setIsActiveItems: e,
|
|
1069
|
-
items:
|
|
1087
|
+
items: s,
|
|
1070
1088
|
setItems: i,
|
|
1071
|
-
other:
|
|
1072
|
-
title:
|
|
1073
|
-
subtitle:
|
|
1074
|
-
editable:
|
|
1075
|
-
draggable:
|
|
1076
|
-
withImage:
|
|
1077
|
-
deletable:
|
|
1078
|
-
addable:
|
|
1079
|
-
itemsType:
|
|
1089
|
+
other: c,
|
|
1090
|
+
title: l,
|
|
1091
|
+
subtitle: o,
|
|
1092
|
+
editable: n = !0,
|
|
1093
|
+
draggable: r = !1,
|
|
1094
|
+
withImage: m = !1,
|
|
1095
|
+
deletable: d = !0,
|
|
1096
|
+
addable: T = !0,
|
|
1097
|
+
itemsType: x,
|
|
1080
1098
|
itemsPlaceholder: g = "",
|
|
1081
|
-
itemsOptions:
|
|
1099
|
+
itemsOptions: h,
|
|
1082
1100
|
hasRangeSelector: O = !1,
|
|
1083
|
-
rangeSelectorOptions:
|
|
1084
|
-
modalOptions:
|
|
1085
|
-
addableOptions:
|
|
1086
|
-
} = u, [C,
|
|
1101
|
+
rangeSelectorOptions: q,
|
|
1102
|
+
modalOptions: v,
|
|
1103
|
+
addableOptions: E = {}
|
|
1104
|
+
} = u, [C, B] = p.useState(null), [f, y] = p.useState({
|
|
1087
1105
|
top: 0,
|
|
1088
1106
|
left: 0
|
|
1089
|
-
}), [M,
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1107
|
+
}), [M, $] = p.useState(null), k = p.useRef(null), [N, L] = p.useState(!1), R = (j, A) => {
|
|
1108
|
+
const _ = [...s], [S] = _.splice(j, 1);
|
|
1109
|
+
_.splice(A, 0, S), i(_);
|
|
1092
1110
|
};
|
|
1093
|
-
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1111
|
+
p.useEffect(() => {
|
|
1112
|
+
const j = () => {
|
|
1113
|
+
B(null), L(!1);
|
|
1096
1114
|
};
|
|
1097
|
-
return document.body.addEventListener("click",
|
|
1098
|
-
|
|
1115
|
+
return document.body.addEventListener("click", j), B(null), L(!1), () => {
|
|
1116
|
+
B(null), L(!1), document.body.removeEventListener("click", j);
|
|
1099
1117
|
};
|
|
1100
|
-
}, []),
|
|
1118
|
+
}, []), p.useEffect(() => {
|
|
1101
1119
|
if (C) {
|
|
1102
|
-
const
|
|
1103
|
-
i(
|
|
1120
|
+
const j = [...s].map((A) => A.id === C.id ? C : A);
|
|
1121
|
+
i(j);
|
|
1104
1122
|
}
|
|
1105
|
-
}, [C]),
|
|
1106
|
-
if (
|
|
1107
|
-
const
|
|
1108
|
-
let
|
|
1109
|
-
|
|
1110
|
-
top:
|
|
1123
|
+
}, [C]), p.useEffect(() => {
|
|
1124
|
+
if (k.current && M) {
|
|
1125
|
+
const j = k.current.getBoundingClientRect().height, A = window.innerHeight;
|
|
1126
|
+
let _ = M.top;
|
|
1127
|
+
_ + j > A + window.scrollY - 200 && (_ = A + window.scrollY - j - 200), _ < 0 && (_ = 10), y({
|
|
1128
|
+
top: _,
|
|
1111
1129
|
left: M.left
|
|
1112
1130
|
});
|
|
1113
1131
|
}
|
|
1114
|
-
}, [
|
|
1115
|
-
const U = (
|
|
1116
|
-
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1119
|
-
top:
|
|
1120
|
-
left:
|
|
1121
|
-
}),
|
|
1132
|
+
}, [k.current, M]);
|
|
1133
|
+
const U = (j, A) => {
|
|
1134
|
+
j.stopPropagation();
|
|
1135
|
+
const _ = j.target.getBoundingClientRect();
|
|
1136
|
+
$({
|
|
1137
|
+
top: _.top + window.scrollY,
|
|
1138
|
+
left: _.left - 30
|
|
1139
|
+
}), B(A), L(!0);
|
|
1122
1140
|
};
|
|
1123
|
-
function
|
|
1124
|
-
if (
|
|
1125
|
-
return
|
|
1141
|
+
function tt(j) {
|
|
1142
|
+
if (m)
|
|
1143
|
+
return j ? /* @__PURE__ */ t.jsx(
|
|
1126
1144
|
"img",
|
|
1127
1145
|
{
|
|
1128
|
-
src: `https://imagedelivery.net/${
|
|
1146
|
+
src: `https://imagedelivery.net/${j[0]}/w=1000`,
|
|
1129
1147
|
alt: "image",
|
|
1130
1148
|
width: 16,
|
|
1131
1149
|
height: 16
|
|
1132
1150
|
}
|
|
1133
1151
|
) : /* @__PURE__ */ t.jsx(
|
|
1134
|
-
|
|
1152
|
+
b,
|
|
1135
1153
|
{
|
|
1136
1154
|
name: "Image",
|
|
1137
1155
|
width: 16,
|
|
@@ -1140,11 +1158,11 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1140
1158
|
}
|
|
1141
1159
|
);
|
|
1142
1160
|
}
|
|
1143
|
-
const
|
|
1144
|
-
var
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1147
|
-
|
|
1161
|
+
const at = (j, A) => {
|
|
1162
|
+
var S;
|
|
1163
|
+
const _ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1164
|
+
r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1165
|
+
b,
|
|
1148
1166
|
{
|
|
1149
1167
|
name: "DotsSixVertical",
|
|
1150
1168
|
hoverable: !0,
|
|
@@ -1152,153 +1170,156 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1152
1170
|
height: 20
|
|
1153
1171
|
}
|
|
1154
1172
|
) }),
|
|
1155
|
-
|
|
1156
|
-
|
|
1173
|
+
x === "select" && /* @__PURE__ */ t.jsx(
|
|
1174
|
+
Z,
|
|
1157
1175
|
{
|
|
1158
|
-
onChange: (
|
|
1159
|
-
const
|
|
1160
|
-
...
|
|
1161
|
-
name:
|
|
1176
|
+
onChange: (w) => {
|
|
1177
|
+
const D = [...s].map((Y) => Y.id === j.id ? {
|
|
1178
|
+
...j,
|
|
1179
|
+
name: w
|
|
1162
1180
|
} : Y);
|
|
1163
|
-
|
|
1164
|
-
...
|
|
1165
|
-
name:
|
|
1166
|
-
}), i([...
|
|
1181
|
+
B({
|
|
1182
|
+
...j,
|
|
1183
|
+
name: w
|
|
1184
|
+
}), i([...D]);
|
|
1167
1185
|
},
|
|
1168
|
-
value:
|
|
1169
|
-
options:
|
|
1170
|
-
leftAddon:
|
|
1186
|
+
value: j.name,
|
|
1187
|
+
options: h.filter((w) => !s.find((X) => X.name === w)),
|
|
1188
|
+
leftAddon: tt(j.images)
|
|
1171
1189
|
}
|
|
1172
1190
|
),
|
|
1173
|
-
|
|
1191
|
+
x === "input" && /* @__PURE__ */ t.jsx(
|
|
1174
1192
|
W,
|
|
1175
1193
|
{
|
|
1176
|
-
onChange: (
|
|
1177
|
-
const
|
|
1178
|
-
...
|
|
1179
|
-
name:
|
|
1194
|
+
onChange: (w) => {
|
|
1195
|
+
const D = [...s].map((Y) => Y.id === j.id ? {
|
|
1196
|
+
...j,
|
|
1197
|
+
name: w
|
|
1180
1198
|
} : Y);
|
|
1181
|
-
i([...
|
|
1199
|
+
i([...D]);
|
|
1182
1200
|
},
|
|
1183
|
-
value:
|
|
1201
|
+
value: j.name,
|
|
1184
1202
|
placeholder: g
|
|
1185
1203
|
}
|
|
1186
1204
|
),
|
|
1187
|
-
|
|
1205
|
+
x === "image" && /* @__PURE__ */ t.jsx(
|
|
1188
1206
|
ht,
|
|
1189
1207
|
{
|
|
1190
|
-
onChange: (
|
|
1191
|
-
const
|
|
1192
|
-
...
|
|
1193
|
-
images:
|
|
1208
|
+
onChange: (w) => {
|
|
1209
|
+
const D = [...s].map((Y) => Y.id === j.id ? {
|
|
1210
|
+
...j,
|
|
1211
|
+
images: w
|
|
1194
1212
|
} : Y);
|
|
1195
|
-
i([...
|
|
1213
|
+
i([...D]);
|
|
1196
1214
|
},
|
|
1197
|
-
activeImage: (
|
|
1215
|
+
activeImage: (S = s.find((w) => w.id === j.id)) == null ? void 0 : S.images[0]
|
|
1198
1216
|
}
|
|
1199
1217
|
),
|
|
1200
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1201
|
-
|
|
1202
|
-
|
|
1218
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
1219
|
+
n && /* @__PURE__ */ t.jsx(
|
|
1220
|
+
b,
|
|
1203
1221
|
{
|
|
1204
1222
|
name: "Sliders",
|
|
1205
1223
|
hoverable: !0,
|
|
1206
1224
|
width: 20,
|
|
1207
1225
|
height: 20,
|
|
1208
|
-
onClick: (
|
|
1226
|
+
onClick: (w) => U(w, j)
|
|
1209
1227
|
}
|
|
1210
1228
|
),
|
|
1211
|
-
|
|
1212
|
-
|
|
1229
|
+
d && /* @__PURE__ */ t.jsx(
|
|
1230
|
+
b,
|
|
1213
1231
|
{
|
|
1214
1232
|
name: "Trash",
|
|
1215
1233
|
hoverable: !0,
|
|
1216
1234
|
width: 20,
|
|
1217
1235
|
height: 20,
|
|
1218
1236
|
fill: "#C12A2A",
|
|
1219
|
-
onClick: () => i(
|
|
1237
|
+
onClick: () => i(s.filter((w) => w.id !== j.id))
|
|
1220
1238
|
}
|
|
1221
1239
|
)
|
|
1222
1240
|
] })
|
|
1223
1241
|
] });
|
|
1224
|
-
return
|
|
1225
|
-
|
|
1242
|
+
return r ? /* @__PURE__ */ t.jsx(
|
|
1243
|
+
ws,
|
|
1226
1244
|
{
|
|
1227
|
-
product:
|
|
1245
|
+
product: j,
|
|
1228
1246
|
index: A,
|
|
1229
|
-
moveProduct:
|
|
1230
|
-
children:
|
|
1247
|
+
moveProduct: R,
|
|
1248
|
+
children: _
|
|
1231
1249
|
},
|
|
1232
|
-
|
|
1250
|
+
j.id
|
|
1233
1251
|
) : /* @__PURE__ */ t.jsx(
|
|
1234
1252
|
"div",
|
|
1235
1253
|
{
|
|
1236
|
-
className:
|
|
1237
|
-
children:
|
|
1254
|
+
className: V.product,
|
|
1255
|
+
children: _
|
|
1238
1256
|
},
|
|
1239
|
-
|
|
1257
|
+
j.id
|
|
1240
1258
|
);
|
|
1241
1259
|
};
|
|
1242
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1243
|
-
(
|
|
1244
|
-
|
|
1245
|
-
|
|
1260
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
1261
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1262
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
|
|
1263
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1246
1264
|
K,
|
|
1247
1265
|
{
|
|
1248
|
-
current:
|
|
1249
|
-
onChange: (
|
|
1266
|
+
current: a,
|
|
1267
|
+
onChange: (j) => e == null ? void 0 : e(j)
|
|
1250
1268
|
}
|
|
1251
1269
|
)
|
|
1252
1270
|
] }),
|
|
1253
|
-
C &&
|
|
1254
|
-
|
|
1271
|
+
C && n && v && N && /* @__PURE__ */ t.jsx(
|
|
1272
|
+
$s,
|
|
1255
1273
|
{
|
|
1256
|
-
ref:
|
|
1274
|
+
ref: k,
|
|
1257
1275
|
activeItem: C,
|
|
1258
|
-
setActiveItem:
|
|
1259
|
-
popupPosition:
|
|
1260
|
-
modalOptions:
|
|
1261
|
-
setIsOpenModal:
|
|
1276
|
+
setActiveItem: B,
|
|
1277
|
+
popupPosition: f,
|
|
1278
|
+
modalOptions: v,
|
|
1279
|
+
setIsOpenModal: L
|
|
1262
1280
|
}
|
|
1263
1281
|
),
|
|
1264
|
-
O &&
|
|
1265
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1282
|
+
O && q && /* @__PURE__ */ t.jsx(It, { ...q }),
|
|
1283
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
1284
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
|
|
1285
|
+
r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map((j, A) => at(j, A)) }) : s.map((j, A) => at(j, A)),
|
|
1286
|
+
T && /* @__PURE__ */ t.jsx("div", { className: V.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
1269
1287
|
it,
|
|
1270
1288
|
{
|
|
1271
1289
|
withoutHover: !0,
|
|
1272
|
-
className:
|
|
1290
|
+
className: V.button,
|
|
1273
1291
|
size: "s",
|
|
1274
1292
|
onClick: () => {
|
|
1275
|
-
const
|
|
1293
|
+
const j = [...s];
|
|
1276
1294
|
let A = null;
|
|
1277
|
-
if (
|
|
1278
|
-
for (let
|
|
1279
|
-
if (!
|
|
1280
|
-
A =
|
|
1295
|
+
if (h) {
|
|
1296
|
+
for (let _ = 0; _ < h.length; _++)
|
|
1297
|
+
if (!s.find((S) => S.name === h[_])) {
|
|
1298
|
+
A = h[_];
|
|
1281
1299
|
break;
|
|
1282
1300
|
}
|
|
1283
1301
|
}
|
|
1284
|
-
|
|
1285
|
-
name: A ||
|
|
1286
|
-
id:
|
|
1287
|
-
...
|
|
1288
|
-
}) :
|
|
1302
|
+
x === "select" ? j.push({
|
|
1303
|
+
name: A || h[0],
|
|
1304
|
+
id: dt(),
|
|
1305
|
+
...E
|
|
1306
|
+
}) : x === "input" ? j.push({
|
|
1289
1307
|
name: "",
|
|
1290
|
-
id:
|
|
1291
|
-
...
|
|
1292
|
-
}) :
|
|
1293
|
-
name: `Image ${
|
|
1294
|
-
id:
|
|
1295
|
-
...
|
|
1296
|
-
}), i(
|
|
1308
|
+
id: dt(),
|
|
1309
|
+
...E
|
|
1310
|
+
}) : j.push({
|
|
1311
|
+
name: `Image ${s.length + 1}`,
|
|
1312
|
+
id: dt(),
|
|
1313
|
+
...E
|
|
1314
|
+
}), i(j);
|
|
1315
|
+
},
|
|
1316
|
+
style: {
|
|
1317
|
+
width: "fit-content"
|
|
1297
1318
|
},
|
|
1298
1319
|
children: [
|
|
1299
1320
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1300
1321
|
/* @__PURE__ */ t.jsx(
|
|
1301
|
-
|
|
1322
|
+
b,
|
|
1302
1323
|
{
|
|
1303
1324
|
name: "Plus",
|
|
1304
1325
|
width: 16,
|
|
@@ -1307,93 +1328,94 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1307
1328
|
)
|
|
1308
1329
|
]
|
|
1309
1330
|
}
|
|
1310
|
-
)
|
|
1331
|
+
) })
|
|
1311
1332
|
] }),
|
|
1312
|
-
|
|
1333
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c })
|
|
1313
1334
|
] });
|
|
1314
|
-
},
|
|
1315
|
-
title:
|
|
1316
|
-
subtitle:
|
|
1317
|
-
header:
|
|
1318
|
-
text:
|
|
1319
|
-
productsBlock:
|
|
1320
|
-
buttonsBlock:
|
|
1321
|
-
top:
|
|
1322
|
-
itemsBlock:
|
|
1323
|
-
typeTexts:
|
|
1324
|
-
block:
|
|
1325
|
-
active:
|
|
1326
|
-
products:
|
|
1327
|
-
product:
|
|
1328
|
-
button:
|
|
1329
|
-
image:
|
|
1330
|
-
info:
|
|
1331
|
-
name:
|
|
1332
|
-
buttons:
|
|
1333
|
-
modal:
|
|
1334
|
-
other:
|
|
1335
|
-
options:
|
|
1336
|
-
},
|
|
1337
|
-
const { activeButton: e, setActiveButton:
|
|
1338
|
-
return
|
|
1339
|
-
|
|
1335
|
+
}, Ns = "_title_oravb_1", Is = "_subtitle_oravb_5", Cs = "_header_oravb_12", Bs = "_text_oravb_13", Ss = "_productsBlock_oravb_14", Ps = "_buttonsBlock_oravb_15", Ts = "_top_oravb_26", As = "_itemsBlock_oravb_35", Os = "_typeTexts_oravb_41", qs = "_block_oravb_48", Ds = "_active_oravb_60", Es = "_products_oravb_14", Ls = "_product_oravb_14", Rs = "_button_oravb_15", Ms = "_image_oravb_90", Hs = "_info_oravb_97", zs = "_name_oravb_109", Vs = "_buttons_oravb_15", Fs = "_modal_oravb_120", Us = "_other_oravb_139", Ys = "_options_oravb_145", ct = {
|
|
1336
|
+
title: Ns,
|
|
1337
|
+
subtitle: Is,
|
|
1338
|
+
header: Cs,
|
|
1339
|
+
text: Bs,
|
|
1340
|
+
productsBlock: Ss,
|
|
1341
|
+
buttonsBlock: Ps,
|
|
1342
|
+
top: Ts,
|
|
1343
|
+
itemsBlock: As,
|
|
1344
|
+
typeTexts: Os,
|
|
1345
|
+
block: qs,
|
|
1346
|
+
active: Ds,
|
|
1347
|
+
products: Es,
|
|
1348
|
+
product: Ls,
|
|
1349
|
+
button: Rs,
|
|
1350
|
+
image: Ms,
|
|
1351
|
+
info: Hs,
|
|
1352
|
+
name: zs,
|
|
1353
|
+
buttons: Vs,
|
|
1354
|
+
modal: Fs,
|
|
1355
|
+
other: Us,
|
|
1356
|
+
options: Ys
|
|
1357
|
+
}, Gs = p.forwardRef((u, a) => {
|
|
1358
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i } = u, [c, l] = p.useState(e.typesText), [o, n] = p.useState(e.destination), [r, m] = p.useState(e.page), [d, T] = p.useState(e.link || ""), [x, g] = p.useState(e.text || ""), [h, O] = p.useState(e.openInNewTab), { pages: q } = qt();
|
|
1359
|
+
return p.useEffect(() => {
|
|
1360
|
+
s({
|
|
1340
1361
|
...e,
|
|
1341
1362
|
...{
|
|
1342
|
-
text:
|
|
1363
|
+
text: x,
|
|
1343
1364
|
link: d,
|
|
1344
|
-
destination:
|
|
1345
|
-
typesText:
|
|
1365
|
+
destination: o,
|
|
1366
|
+
typesText: c,
|
|
1367
|
+
page: r,
|
|
1368
|
+
openInNewTab: h
|
|
1346
1369
|
}
|
|
1347
1370
|
});
|
|
1348
|
-
}, [
|
|
1371
|
+
}, [c, o, d, x, r, h]), /* @__PURE__ */ t.jsxs(
|
|
1349
1372
|
"div",
|
|
1350
1373
|
{
|
|
1351
|
-
className:
|
|
1352
|
-
onClick: (
|
|
1353
|
-
|
|
1374
|
+
className: ct.modal,
|
|
1375
|
+
onClick: (v) => {
|
|
1376
|
+
v.stopPropagation();
|
|
1354
1377
|
},
|
|
1355
1378
|
style: {
|
|
1356
1379
|
top: `${i.top}px`,
|
|
1357
1380
|
left: `${i.left}px`
|
|
1358
1381
|
},
|
|
1359
|
-
ref:
|
|
1382
|
+
ref: a,
|
|
1360
1383
|
children: [
|
|
1361
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1362
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1384
|
+
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1385
|
+
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: e.type }),
|
|
1363
1386
|
/* @__PURE__ */ t.jsx(
|
|
1364
|
-
|
|
1387
|
+
b,
|
|
1365
1388
|
{
|
|
1366
1389
|
name: "X",
|
|
1367
1390
|
height: 20,
|
|
1368
1391
|
width: 20,
|
|
1369
1392
|
hoverable: !0,
|
|
1370
|
-
onClick: () =>
|
|
1393
|
+
onClick: () => s(null)
|
|
1371
1394
|
}
|
|
1372
1395
|
)
|
|
1373
1396
|
] }),
|
|
1374
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1397
|
+
/* @__PURE__ */ t.jsxs("div", { className: ct.options, children: [
|
|
1375
1398
|
/* @__PURE__ */ t.jsx(
|
|
1376
|
-
|
|
1399
|
+
Z,
|
|
1377
1400
|
{
|
|
1378
1401
|
label: "Destination",
|
|
1379
|
-
onChange: (
|
|
1380
|
-
options: ["Go to Page", "Open Link"],
|
|
1381
|
-
value:
|
|
1402
|
+
onChange: (v) => n(v),
|
|
1403
|
+
options: ["Go to Page", "Open Link"].filter((v) => v !== o),
|
|
1404
|
+
value: o
|
|
1382
1405
|
}
|
|
1383
1406
|
),
|
|
1384
|
-
|
|
1385
|
-
|
|
1407
|
+
o === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1408
|
+
Z,
|
|
1386
1409
|
{
|
|
1387
1410
|
label: "Go to",
|
|
1388
|
-
onChange: () =>
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
value: "Homepage"
|
|
1411
|
+
onChange: (v) => m(v),
|
|
1412
|
+
options: q ? Object.values(q).filter((v) => v.name !== r).map((v) => v.name) : [],
|
|
1413
|
+
value: r
|
|
1392
1414
|
}
|
|
1393
1415
|
) : /* @__PURE__ */ t.jsx(
|
|
1394
1416
|
W,
|
|
1395
1417
|
{
|
|
1396
|
-
onChange: (
|
|
1418
|
+
onChange: (v) => T(v),
|
|
1397
1419
|
value: d,
|
|
1398
1420
|
placeholder: "https://",
|
|
1399
1421
|
label: "Link"
|
|
@@ -1402,15 +1424,16 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1402
1424
|
/* @__PURE__ */ t.jsx(
|
|
1403
1425
|
K,
|
|
1404
1426
|
{
|
|
1405
|
-
current:
|
|
1406
|
-
label: "Open in new tab"
|
|
1427
|
+
current: e.openInNewTab,
|
|
1428
|
+
label: "Open in new tab",
|
|
1429
|
+
onChange: (v) => O(v)
|
|
1407
1430
|
}
|
|
1408
1431
|
),
|
|
1409
1432
|
/* @__PURE__ */ t.jsx(
|
|
1410
|
-
|
|
1433
|
+
Ct,
|
|
1411
1434
|
{
|
|
1412
|
-
onChange: (
|
|
1413
|
-
value:
|
|
1435
|
+
onChange: (v) => g(v),
|
|
1436
|
+
value: x,
|
|
1414
1437
|
label: "Text",
|
|
1415
1438
|
maxLength: 150
|
|
1416
1439
|
}
|
|
@@ -1418,111 +1441,112 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1418
1441
|
/* @__PURE__ */ t.jsx(
|
|
1419
1442
|
Tt,
|
|
1420
1443
|
{
|
|
1421
|
-
typesText:
|
|
1422
|
-
setTypesText:
|
|
1444
|
+
typesText: c,
|
|
1445
|
+
setTypesText: l
|
|
1423
1446
|
}
|
|
1424
1447
|
)
|
|
1425
1448
|
] })
|
|
1426
1449
|
]
|
|
1427
1450
|
}
|
|
1428
1451
|
);
|
|
1429
|
-
}),
|
|
1430
|
-
subtitle:
|
|
1431
|
-
header:
|
|
1432
|
-
text:
|
|
1433
|
-
productsBlock:
|
|
1434
|
-
buttonsBlock:
|
|
1435
|
-
top:
|
|
1436
|
-
itemsBlock:
|
|
1437
|
-
typeTexts:
|
|
1438
|
-
block:
|
|
1439
|
-
active:
|
|
1440
|
-
products:
|
|
1441
|
-
product:
|
|
1442
|
-
button:
|
|
1443
|
-
image:
|
|
1444
|
-
info:
|
|
1445
|
-
name:
|
|
1446
|
-
buttons:
|
|
1447
|
-
modal:
|
|
1448
|
-
other:
|
|
1449
|
-
options:
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
+
}), Ws = "_subtitle_w0d5g_1", Xs = "_header_w0d5g_8", Js = "_text_w0d5g_9", Qs = "_productsBlock_w0d5g_10", Ks = "_buttonsBlock_w0d5g_11", Zs = "_top_w0d5g_23", tn = "_itemsBlock_w0d5g_32", en = "_typeTexts_w0d5g_38", sn = "_block_w0d5g_45", nn = "_active_w0d5g_58", an = "_products_w0d5g_10", on = "_product_w0d5g_10", cn = "_button_w0d5g_11", ln = "_image_w0d5g_88", rn = "_info_w0d5g_95", dn = "_name_w0d5g_107", un = "_buttons_w0d5g_11", mn = "_modal_w0d5g_118", _n = "_other_w0d5g_138", hn = "_options_w0d5g_144", pn = "_addButton_w0d5g_150", rt = {
|
|
1453
|
+
subtitle: Ws,
|
|
1454
|
+
header: Xs,
|
|
1455
|
+
text: Js,
|
|
1456
|
+
productsBlock: Qs,
|
|
1457
|
+
buttonsBlock: Ks,
|
|
1458
|
+
top: Zs,
|
|
1459
|
+
itemsBlock: tn,
|
|
1460
|
+
typeTexts: en,
|
|
1461
|
+
block: sn,
|
|
1462
|
+
active: nn,
|
|
1463
|
+
products: an,
|
|
1464
|
+
product: on,
|
|
1465
|
+
button: cn,
|
|
1466
|
+
image: ln,
|
|
1467
|
+
info: rn,
|
|
1468
|
+
name: dn,
|
|
1469
|
+
buttons: un,
|
|
1470
|
+
modal: mn,
|
|
1471
|
+
other: _n,
|
|
1472
|
+
options: hn,
|
|
1473
|
+
addButton: pn
|
|
1474
|
+
}, gn = (u) => {
|
|
1475
|
+
const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0 } = u, [c, l] = p.useState(null), [o, n] = p.useState({
|
|
1452
1476
|
top: 0,
|
|
1453
1477
|
left: 0
|
|
1454
|
-
}), [
|
|
1455
|
-
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1478
|
+
}), [r, m] = p.useState(null), d = p.useRef(null);
|
|
1479
|
+
p.useEffect(() => {
|
|
1480
|
+
const x = () => {
|
|
1481
|
+
l(null);
|
|
1458
1482
|
};
|
|
1459
|
-
return document.body.addEventListener("click",
|
|
1460
|
-
|
|
1483
|
+
return document.body.addEventListener("click", x), l(null), () => {
|
|
1484
|
+
l(null), document.body.removeEventListener("click", x);
|
|
1461
1485
|
};
|
|
1462
|
-
}, []),
|
|
1463
|
-
if (
|
|
1464
|
-
const
|
|
1465
|
-
e(
|
|
1486
|
+
}, []), p.useEffect(() => {
|
|
1487
|
+
if (c) {
|
|
1488
|
+
const x = [...a].map((g) => g.id === c.id ? c : g);
|
|
1489
|
+
e(x);
|
|
1466
1490
|
}
|
|
1467
|
-
}, [
|
|
1468
|
-
if (
|
|
1469
|
-
const
|
|
1470
|
-
let
|
|
1471
|
-
|
|
1472
|
-
top:
|
|
1473
|
-
left:
|
|
1491
|
+
}, [c]), p.useEffect(() => {
|
|
1492
|
+
if (d.current && r) {
|
|
1493
|
+
const x = d.current.getBoundingClientRect().height, g = window.innerHeight;
|
|
1494
|
+
let h = r.top;
|
|
1495
|
+
h + x > g + window.scrollY - 200 && (h = g + window.scrollY - x - 200), h < 0 && (h = 10), n({
|
|
1496
|
+
top: h,
|
|
1497
|
+
left: r.left
|
|
1474
1498
|
});
|
|
1475
1499
|
}
|
|
1476
|
-
}, [
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1479
|
-
const
|
|
1480
|
-
|
|
1481
|
-
top:
|
|
1482
|
-
left:
|
|
1483
|
-
}),
|
|
1500
|
+
}, [d.current, r]);
|
|
1501
|
+
const T = (x, g) => {
|
|
1502
|
+
x.stopPropagation();
|
|
1503
|
+
const h = x.target.getBoundingClientRect();
|
|
1504
|
+
m({
|
|
1505
|
+
top: h.top + window.scrollY,
|
|
1506
|
+
left: h.left - 30
|
|
1507
|
+
}), l(g);
|
|
1484
1508
|
};
|
|
1485
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1486
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1487
|
-
|
|
1509
|
+
return /* @__PURE__ */ t.jsxs("div", { className: rt.products, children: [
|
|
1510
|
+
/* @__PURE__ */ t.jsx("h5", { className: rt.subtitle, children: "Button Type" }),
|
|
1511
|
+
a.map((x) => /* @__PURE__ */ t.jsxs(
|
|
1488
1512
|
"div",
|
|
1489
1513
|
{
|
|
1490
|
-
className:
|
|
1514
|
+
className: rt.product,
|
|
1491
1515
|
children: [
|
|
1492
1516
|
/* @__PURE__ */ t.jsx(
|
|
1493
|
-
|
|
1517
|
+
Z,
|
|
1494
1518
|
{
|
|
1495
1519
|
onChange: (g) => {
|
|
1496
|
-
const O = [...
|
|
1497
|
-
...
|
|
1520
|
+
const O = [...a].map((q) => q.id === x.id ? {
|
|
1521
|
+
...x,
|
|
1498
1522
|
type: g
|
|
1499
|
-
} :
|
|
1523
|
+
} : q);
|
|
1500
1524
|
e(O);
|
|
1501
1525
|
},
|
|
1502
|
-
value:
|
|
1526
|
+
value: x.type,
|
|
1503
1527
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1504
1528
|
}
|
|
1505
1529
|
),
|
|
1506
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1530
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.buttons, children: [
|
|
1507
1531
|
/* @__PURE__ */ t.jsx(
|
|
1508
|
-
|
|
1532
|
+
b,
|
|
1509
1533
|
{
|
|
1510
1534
|
name: "Sliders",
|
|
1511
1535
|
hoverable: !0,
|
|
1512
1536
|
width: 20,
|
|
1513
1537
|
height: 20,
|
|
1514
1538
|
onClick: (g) => {
|
|
1515
|
-
|
|
1539
|
+
T(g, x);
|
|
1516
1540
|
}
|
|
1517
1541
|
}
|
|
1518
1542
|
),
|
|
1519
|
-
|
|
1520
|
-
|
|
1543
|
+
s && /* @__PURE__ */ t.jsx(
|
|
1544
|
+
b,
|
|
1521
1545
|
{
|
|
1522
1546
|
name: "Trash",
|
|
1523
1547
|
hoverable: !0,
|
|
1524
1548
|
onClick: () => {
|
|
1525
|
-
const g =
|
|
1549
|
+
const g = a.filter((h) => h.id !== x.id);
|
|
1526
1550
|
e(g);
|
|
1527
1551
|
},
|
|
1528
1552
|
width: 20,
|
|
@@ -1533,37 +1557,42 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1533
1557
|
] })
|
|
1534
1558
|
]
|
|
1535
1559
|
},
|
|
1536
|
-
|
|
1560
|
+
x.id
|
|
1537
1561
|
)),
|
|
1538
|
-
|
|
1539
|
-
|
|
1562
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1563
|
+
Gs,
|
|
1540
1564
|
{
|
|
1541
|
-
ref:
|
|
1542
|
-
activeButton:
|
|
1543
|
-
setActiveButton:
|
|
1544
|
-
popupPosition:
|
|
1565
|
+
ref: d,
|
|
1566
|
+
activeButton: c,
|
|
1567
|
+
setActiveButton: l,
|
|
1568
|
+
popupPosition: o
|
|
1545
1569
|
}
|
|
1546
1570
|
),
|
|
1547
|
-
i && /* @__PURE__ */ t.jsxs(
|
|
1571
|
+
i && /* @__PURE__ */ t.jsx("div", { className: rt.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
1548
1572
|
it,
|
|
1549
1573
|
{
|
|
1550
1574
|
withoutHover: !0,
|
|
1551
|
-
className:
|
|
1575
|
+
className: rt.button,
|
|
1552
1576
|
size: "s",
|
|
1553
1577
|
onClick: () => {
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1578
|
+
const x = [...a];
|
|
1579
|
+
x.push({
|
|
1556
1580
|
type: "Primary",
|
|
1557
|
-
id:
|
|
1581
|
+
id: dt(),
|
|
1558
1582
|
typesText: [],
|
|
1559
1583
|
destination: "Go to Page",
|
|
1560
|
-
text: "Button Name"
|
|
1561
|
-
|
|
1584
|
+
text: "Button Name",
|
|
1585
|
+
page: "home",
|
|
1586
|
+
openInNewTab: !0
|
|
1587
|
+
}), e(x);
|
|
1588
|
+
},
|
|
1589
|
+
style: {
|
|
1590
|
+
width: "fit-content"
|
|
1562
1591
|
},
|
|
1563
1592
|
children: [
|
|
1564
1593
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1565
1594
|
/* @__PURE__ */ t.jsx(
|
|
1566
|
-
|
|
1595
|
+
b,
|
|
1567
1596
|
{
|
|
1568
1597
|
name: "Plus",
|
|
1569
1598
|
width: 16,
|
|
@@ -1572,79 +1601,79 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1572
1601
|
)
|
|
1573
1602
|
]
|
|
1574
1603
|
}
|
|
1575
|
-
)
|
|
1604
|
+
) })
|
|
1576
1605
|
] });
|
|
1577
|
-
},
|
|
1578
|
-
const { isActiveButtons:
|
|
1579
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1580
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1581
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1606
|
+
}, Ga = (u) => {
|
|
1607
|
+
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: i } = u;
|
|
1608
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
|
|
1609
|
+
/* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
|
|
1610
|
+
/* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
|
|
1582
1611
|
/* @__PURE__ */ t.jsx(
|
|
1583
1612
|
K,
|
|
1584
1613
|
{
|
|
1585
|
-
current:
|
|
1586
|
-
onChange: (
|
|
1614
|
+
current: a,
|
|
1615
|
+
onChange: (c) => e(c)
|
|
1587
1616
|
}
|
|
1588
1617
|
)
|
|
1589
1618
|
] }),
|
|
1590
1619
|
/* @__PURE__ */ t.jsx(
|
|
1591
|
-
|
|
1620
|
+
gn,
|
|
1592
1621
|
{
|
|
1593
|
-
buttons:
|
|
1622
|
+
buttons: s,
|
|
1594
1623
|
setButtons: i
|
|
1595
1624
|
}
|
|
1596
1625
|
)
|
|
1597
1626
|
] }) });
|
|
1598
|
-
},
|
|
1599
|
-
wrapper:
|
|
1600
|
-
subtitle:
|
|
1601
|
-
content:
|
|
1602
|
-
range:
|
|
1603
|
-
track:
|
|
1604
|
-
progress:
|
|
1605
|
-
dots:
|
|
1606
|
-
dot:
|
|
1607
|
-
active:
|
|
1608
|
-
input:
|
|
1609
|
-
countBlock:
|
|
1610
|
-
count:
|
|
1611
|
-
controls:
|
|
1612
|
-
button:
|
|
1613
|
-
},
|
|
1614
|
-
const { label:
|
|
1615
|
-
|
|
1616
|
-
},
|
|
1617
|
-
|
|
1618
|
-
},
|
|
1619
|
-
const
|
|
1620
|
-
|
|
1627
|
+
}, fn = "_wrapper_m18qi_1", xn = "_subtitle_m18qi_7", bn = "_content_m18qi_14", vn = "_range_m18qi_22", jn = "_track_m18qi_27", yn = "_progress_m18qi_36", kn = "_dots_m18qi_46", $n = "_dot_m18qi_46", wn = "_active_m18qi_65", Nn = "_input_m18qi_77", In = "_countBlock_m18qi_91", Cn = "_count_m18qi_91", Bn = "_controls_m18qi_107", Sn = "_button_m18qi_113", z = {
|
|
1628
|
+
wrapper: fn,
|
|
1629
|
+
subtitle: xn,
|
|
1630
|
+
content: bn,
|
|
1631
|
+
range: vn,
|
|
1632
|
+
track: jn,
|
|
1633
|
+
progress: yn,
|
|
1634
|
+
dots: kn,
|
|
1635
|
+
dot: $n,
|
|
1636
|
+
active: wn,
|
|
1637
|
+
input: Nn,
|
|
1638
|
+
countBlock: In,
|
|
1639
|
+
count: Cn,
|
|
1640
|
+
controls: Bn,
|
|
1641
|
+
button: Sn
|
|
1642
|
+
}, It = (u) => {
|
|
1643
|
+
const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = u, [o, n] = p.useState(!1), r = Array.from({ length: (s - e) / i + 1 }), m = (c - e) / (s - e) * 100, d = () => {
|
|
1644
|
+
c < s && l(c + i);
|
|
1645
|
+
}, T = () => {
|
|
1646
|
+
c > e && l(c - i);
|
|
1647
|
+
}, x = (g) => {
|
|
1648
|
+
const h = e + g * i;
|
|
1649
|
+
l(h);
|
|
1621
1650
|
};
|
|
1622
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1623
|
-
|
|
1624
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1625
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1626
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1651
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.wrapper, children: [
|
|
1652
|
+
a && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: a }),
|
|
1653
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.content, children: [
|
|
1654
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.range, children: [
|
|
1655
|
+
/* @__PURE__ */ t.jsx("div", { className: z.track }),
|
|
1627
1656
|
/* @__PURE__ */ t.jsx(
|
|
1628
1657
|
"div",
|
|
1629
1658
|
{
|
|
1630
|
-
className:
|
|
1631
|
-
style: { width: `${
|
|
1659
|
+
className: z.progress,
|
|
1660
|
+
style: { width: `${m}%` }
|
|
1632
1661
|
}
|
|
1633
1662
|
),
|
|
1634
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1635
|
-
const O =
|
|
1663
|
+
/* @__PURE__ */ t.jsx("div", { className: z.dots, children: r.map((g, h) => {
|
|
1664
|
+
const O = h <= (c - e) / i;
|
|
1636
1665
|
return /* @__PURE__ */ t.jsx(
|
|
1637
1666
|
"button",
|
|
1638
1667
|
{
|
|
1639
|
-
onClick: () => h
|
|
1640
|
-
className:
|
|
1641
|
-
[
|
|
1642
|
-
[
|
|
1643
|
-
[
|
|
1668
|
+
onClick: () => x(h),
|
|
1669
|
+
className: F(z.dot, {
|
|
1670
|
+
[z.active]: O,
|
|
1671
|
+
[z.inactive]: !O,
|
|
1672
|
+
[z.dragging]: o
|
|
1644
1673
|
}),
|
|
1645
|
-
"aria-label": `Set value to ${e +
|
|
1674
|
+
"aria-label": `Set value to ${e + h * i}`
|
|
1646
1675
|
},
|
|
1647
|
-
|
|
1676
|
+
h
|
|
1648
1677
|
);
|
|
1649
1678
|
}) }),
|
|
1650
1679
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1652,43 +1681,43 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1652
1681
|
{
|
|
1653
1682
|
type: "range",
|
|
1654
1683
|
min: e,
|
|
1655
|
-
max:
|
|
1684
|
+
max: s,
|
|
1656
1685
|
step: i,
|
|
1657
|
-
value:
|
|
1658
|
-
onChange: (g) =>
|
|
1659
|
-
onMouseDown: () =>
|
|
1660
|
-
onMouseUp: () =>
|
|
1661
|
-
onTouchStart: () =>
|
|
1662
|
-
onTouchEnd: () =>
|
|
1663
|
-
className:
|
|
1686
|
+
value: c,
|
|
1687
|
+
onChange: (g) => l(Number(g.target.value)),
|
|
1688
|
+
onMouseDown: () => n(!0),
|
|
1689
|
+
onMouseUp: () => n(!1),
|
|
1690
|
+
onTouchStart: () => n(!0),
|
|
1691
|
+
onTouchEnd: () => n(!1),
|
|
1692
|
+
className: z.input
|
|
1664
1693
|
}
|
|
1665
1694
|
)
|
|
1666
1695
|
] }),
|
|
1667
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1696
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.countBlock, children: [
|
|
1668
1697
|
/* @__PURE__ */ t.jsx(
|
|
1669
1698
|
W,
|
|
1670
1699
|
{
|
|
1671
1700
|
type: "number",
|
|
1672
1701
|
min: e,
|
|
1673
|
-
max:
|
|
1702
|
+
max: s,
|
|
1674
1703
|
paddingless: !0,
|
|
1675
1704
|
onChange: (g) => {
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1705
|
+
const h = Number(g);
|
|
1706
|
+
h > s ? l(s) : h < e ? l(e) : l(h);
|
|
1678
1707
|
},
|
|
1679
|
-
value: String(
|
|
1708
|
+
value: String(c)
|
|
1680
1709
|
}
|
|
1681
1710
|
),
|
|
1682
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1711
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.controls, children: [
|
|
1683
1712
|
/* @__PURE__ */ t.jsx(
|
|
1684
1713
|
"button",
|
|
1685
1714
|
{
|
|
1686
|
-
onClick:
|
|
1687
|
-
disabled:
|
|
1688
|
-
className:
|
|
1715
|
+
onClick: d,
|
|
1716
|
+
disabled: c >= s,
|
|
1717
|
+
className: z.button,
|
|
1689
1718
|
"aria-label": "Increment count",
|
|
1690
1719
|
children: /* @__PURE__ */ t.jsx(
|
|
1691
|
-
|
|
1720
|
+
b,
|
|
1692
1721
|
{
|
|
1693
1722
|
name: "CaretUp",
|
|
1694
1723
|
width: 15,
|
|
@@ -1700,12 +1729,12 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1700
1729
|
/* @__PURE__ */ t.jsx(
|
|
1701
1730
|
"button",
|
|
1702
1731
|
{
|
|
1703
|
-
onClick:
|
|
1704
|
-
disabled:
|
|
1705
|
-
className:
|
|
1732
|
+
onClick: T,
|
|
1733
|
+
disabled: c <= e,
|
|
1734
|
+
className: z.button,
|
|
1706
1735
|
"aria-label": "Decrement count",
|
|
1707
1736
|
children: /* @__PURE__ */ t.jsx(
|
|
1708
|
-
|
|
1737
|
+
b,
|
|
1709
1738
|
{
|
|
1710
1739
|
name: "CaretDown",
|
|
1711
1740
|
width: 15,
|
|
@@ -1718,49 +1747,50 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1718
1747
|
] })
|
|
1719
1748
|
] })
|
|
1720
1749
|
] });
|
|
1721
|
-
},
|
|
1722
|
-
title:
|
|
1723
|
-
subtitle:
|
|
1724
|
-
header:
|
|
1725
|
-
text:
|
|
1726
|
-
productsBlock:
|
|
1727
|
-
top:
|
|
1728
|
-
itemsBlock:
|
|
1729
|
-
typeTexts:
|
|
1730
|
-
block:
|
|
1731
|
-
active:
|
|
1732
|
-
products:
|
|
1733
|
-
product:
|
|
1734
|
-
button:
|
|
1735
|
-
image:
|
|
1736
|
-
info:
|
|
1737
|
-
name:
|
|
1738
|
-
buttons:
|
|
1739
|
-
modal:
|
|
1740
|
-
link:
|
|
1741
|
-
modalOptions:
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1750
|
+
}, Pn = "_title_w64fy_1", Tn = "_subtitle_w64fy_5", An = "_header_w64fy_12", On = "_text_w64fy_13", qn = "_productsBlock_w64fy_14", Dn = "_top_w64fy_26", En = "_itemsBlock_w64fy_35", Ln = "_typeTexts_w64fy_41", Rn = "_block_w64fy_48", Mn = "_active_w64fy_61", Hn = "_products_w64fy_14", zn = "_product_w64fy_14", Vn = "_button_w64fy_80", Fn = "_image_w64fy_91", Un = "_info_w64fy_98", Yn = "_name_w64fy_110", Gn = "_buttons_w64fy_114", Wn = "_modal_w64fy_121", Xn = "_link_w64fy_141", Jn = "_modalOptions_w64fy_147", Qn = "_addButton_w64fy_159", G = {
|
|
1751
|
+
title: Pn,
|
|
1752
|
+
subtitle: Tn,
|
|
1753
|
+
header: An,
|
|
1754
|
+
text: On,
|
|
1755
|
+
productsBlock: qn,
|
|
1756
|
+
top: Dn,
|
|
1757
|
+
itemsBlock: En,
|
|
1758
|
+
typeTexts: Ln,
|
|
1759
|
+
block: Rn,
|
|
1760
|
+
active: Mn,
|
|
1761
|
+
products: Hn,
|
|
1762
|
+
product: zn,
|
|
1763
|
+
button: Vn,
|
|
1764
|
+
image: Fn,
|
|
1765
|
+
info: Un,
|
|
1766
|
+
name: Yn,
|
|
1767
|
+
buttons: Gn,
|
|
1768
|
+
modal: Wn,
|
|
1769
|
+
link: Xn,
|
|
1770
|
+
modalOptions: Jn,
|
|
1771
|
+
addButton: Qn
|
|
1772
|
+
}, Kn = (u) => {
|
|
1773
|
+
const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = u, l = c.find((n) => n.id === a.listingId);
|
|
1774
|
+
if (!l) return null;
|
|
1775
|
+
function o(n, r) {
|
|
1776
|
+
return n.length > r ? `${n.slice(0, r)}...` : n;
|
|
1747
1777
|
}
|
|
1748
1778
|
return /* @__PURE__ */ t.jsxs(
|
|
1749
1779
|
"div",
|
|
1750
1780
|
{
|
|
1751
1781
|
className: G.modal,
|
|
1752
|
-
onClick: (
|
|
1753
|
-
|
|
1782
|
+
onClick: (n) => {
|
|
1783
|
+
n.stopPropagation();
|
|
1754
1784
|
},
|
|
1755
1785
|
style: {
|
|
1756
|
-
top: `${
|
|
1757
|
-
left: `${
|
|
1786
|
+
top: `${s.top}px`,
|
|
1787
|
+
left: `${s.left}px`
|
|
1758
1788
|
},
|
|
1759
1789
|
children: [
|
|
1760
1790
|
/* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
1761
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1791
|
+
/* @__PURE__ */ t.jsx("h3", { children: o(l.productData.name, 20) }),
|
|
1762
1792
|
/* @__PURE__ */ t.jsx(
|
|
1763
|
-
|
|
1793
|
+
b,
|
|
1764
1794
|
{
|
|
1765
1795
|
name: "X",
|
|
1766
1796
|
height: 20,
|
|
@@ -1776,97 +1806,97 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1776
1806
|
ht,
|
|
1777
1807
|
{
|
|
1778
1808
|
label: "Put up an attractive image",
|
|
1779
|
-
activeImage:
|
|
1780
|
-
onChange: (
|
|
1781
|
-
const
|
|
1782
|
-
...
|
|
1783
|
-
image:
|
|
1809
|
+
activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
|
|
1810
|
+
onChange: (n) => {
|
|
1811
|
+
const r = {
|
|
1812
|
+
...a,
|
|
1813
|
+
image: n[0]
|
|
1784
1814
|
};
|
|
1785
|
-
e(
|
|
1815
|
+
e(r);
|
|
1786
1816
|
}
|
|
1787
1817
|
}
|
|
1788
1818
|
) })
|
|
1789
1819
|
]
|
|
1790
1820
|
}
|
|
1791
1821
|
);
|
|
1792
|
-
},
|
|
1793
|
-
const { index:
|
|
1822
|
+
}, Zn = (u) => {
|
|
1823
|
+
const { index: a, moveProduct: e, children: s } = u, [, i] = $t({
|
|
1794
1824
|
accept: "product",
|
|
1795
|
-
hover(
|
|
1796
|
-
|
|
1825
|
+
hover(o) {
|
|
1826
|
+
o.index !== a && (e(o.index, a), o.index = a);
|
|
1797
1827
|
}
|
|
1798
|
-
}), [{ isDragging:
|
|
1828
|
+
}), [{ isDragging: c }, l] = wt({
|
|
1799
1829
|
type: "product",
|
|
1800
|
-
item: { index:
|
|
1801
|
-
collect: (
|
|
1802
|
-
isDragging:
|
|
1830
|
+
item: { index: a },
|
|
1831
|
+
collect: (o) => ({
|
|
1832
|
+
isDragging: o.isDragging()
|
|
1803
1833
|
})
|
|
1804
1834
|
});
|
|
1805
1835
|
return /* @__PURE__ */ t.jsx(
|
|
1806
1836
|
"div",
|
|
1807
1837
|
{
|
|
1808
|
-
ref: (
|
|
1809
|
-
className: `${G.product} ${
|
|
1810
|
-
children:
|
|
1838
|
+
ref: (o) => l(i(o)),
|
|
1839
|
+
className: `${G.product} ${c ? G.dragging : ""}`,
|
|
1840
|
+
children: s
|
|
1811
1841
|
}
|
|
1812
1842
|
);
|
|
1813
|
-
},
|
|
1843
|
+
}, Wa = (u) => {
|
|
1814
1844
|
const {
|
|
1815
|
-
isActiveItems:
|
|
1845
|
+
isActiveItems: a,
|
|
1816
1846
|
setIsActiveItems: e,
|
|
1817
|
-
items:
|
|
1847
|
+
items: s,
|
|
1818
1848
|
setItems: i,
|
|
1819
|
-
other:
|
|
1820
|
-
title:
|
|
1821
|
-
subtitle:
|
|
1822
|
-
editable:
|
|
1823
|
-
draggable:
|
|
1824
|
-
withImage:
|
|
1825
|
-
deletable:
|
|
1826
|
-
addable:
|
|
1827
|
-
itemsType:
|
|
1849
|
+
other: c,
|
|
1850
|
+
title: l,
|
|
1851
|
+
subtitle: o,
|
|
1852
|
+
editable: n = !0,
|
|
1853
|
+
draggable: r = !1,
|
|
1854
|
+
withImage: m = !1,
|
|
1855
|
+
deletable: d = !0,
|
|
1856
|
+
addable: T = !0,
|
|
1857
|
+
itemsType: x,
|
|
1828
1858
|
itemsOptions: g
|
|
1829
|
-
} = u, [
|
|
1859
|
+
} = u, [h, O] = p.useState(null), [q, v] = p.useState({
|
|
1830
1860
|
top: 0,
|
|
1831
1861
|
left: 0
|
|
1832
|
-
}), [
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1862
|
+
}), [E, C] = p.useState(!1), B = ($, k) => {
|
|
1863
|
+
const N = [...s], [L] = N.splice($, 1);
|
|
1864
|
+
N.splice(k, 0, L), i(N);
|
|
1835
1865
|
};
|
|
1836
|
-
|
|
1837
|
-
const
|
|
1866
|
+
p.useEffect(() => {
|
|
1867
|
+
const $ = () => {
|
|
1838
1868
|
O(null), C(!1);
|
|
1839
1869
|
};
|
|
1840
|
-
return document.body.addEventListener("click",
|
|
1841
|
-
O(null), C(!1), document.body.removeEventListener("click",
|
|
1870
|
+
return document.body.addEventListener("click", $), O(null), C(!1), () => {
|
|
1871
|
+
O(null), C(!1), document.body.removeEventListener("click", $);
|
|
1842
1872
|
};
|
|
1843
|
-
}, []),
|
|
1844
|
-
if (
|
|
1845
|
-
const
|
|
1846
|
-
i(
|
|
1873
|
+
}, []), p.useEffect(() => {
|
|
1874
|
+
if (h) {
|
|
1875
|
+
const $ = [...s].map((k) => k.listingId === h.listingId ? h : k);
|
|
1876
|
+
i($);
|
|
1847
1877
|
}
|
|
1848
|
-
}, [
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1851
|
-
const
|
|
1852
|
-
let U =
|
|
1853
|
-
U +
|
|
1878
|
+
}, [h]);
|
|
1879
|
+
const f = ($, k) => {
|
|
1880
|
+
$.stopPropagation();
|
|
1881
|
+
const N = $.target.getBoundingClientRect(), L = 100, R = window.innerHeight;
|
|
1882
|
+
let U = N.top + window.scrollY;
|
|
1883
|
+
U + L > R && (U = R - L - 20), C(!0), v({
|
|
1854
1884
|
top: U - 80,
|
|
1855
|
-
left:
|
|
1856
|
-
}), O(
|
|
1885
|
+
left: N.left - 30
|
|
1886
|
+
}), O(k);
|
|
1857
1887
|
};
|
|
1858
|
-
function
|
|
1859
|
-
if (
|
|
1860
|
-
return
|
|
1888
|
+
function y($) {
|
|
1889
|
+
if (m)
|
|
1890
|
+
return $ ? /* @__PURE__ */ t.jsx(
|
|
1861
1891
|
"img",
|
|
1862
1892
|
{
|
|
1863
|
-
src: `https://imagedelivery.net/${
|
|
1893
|
+
src: `https://imagedelivery.net/${$}/w=1000`,
|
|
1864
1894
|
alt: "image",
|
|
1865
1895
|
width: 16,
|
|
1866
1896
|
height: 16
|
|
1867
1897
|
}
|
|
1868
1898
|
) : /* @__PURE__ */ t.jsx(
|
|
1869
|
-
|
|
1899
|
+
b,
|
|
1870
1900
|
{
|
|
1871
1901
|
name: "Image",
|
|
1872
1902
|
width: 16,
|
|
@@ -1875,130 +1905,133 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
1875
1905
|
}
|
|
1876
1906
|
);
|
|
1877
1907
|
}
|
|
1878
|
-
const M = (
|
|
1879
|
-
const
|
|
1880
|
-
if (!
|
|
1881
|
-
const
|
|
1882
|
-
|
|
1883
|
-
|
|
1908
|
+
const M = ($, k) => {
|
|
1909
|
+
const N = g.find((R) => $.listingId === R.id);
|
|
1910
|
+
if (!N) return null;
|
|
1911
|
+
const L = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1912
|
+
r && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1913
|
+
b,
|
|
1884
1914
|
{
|
|
1885
1915
|
name: "DotsSixVertical",
|
|
1886
1916
|
hoverable: !0,
|
|
1887
1917
|
width: 20,
|
|
1888
1918
|
height: 20
|
|
1889
1919
|
}
|
|
1890
|
-
) },
|
|
1891
|
-
|
|
1892
|
-
|
|
1920
|
+
) }, k),
|
|
1921
|
+
x === "select" && /* @__PURE__ */ t.jsx(
|
|
1922
|
+
Z,
|
|
1893
1923
|
{
|
|
1894
|
-
onChange: (
|
|
1895
|
-
const U = [...
|
|
1896
|
-
if (!
|
|
1897
|
-
const
|
|
1898
|
-
listingId:
|
|
1899
|
-
image:
|
|
1900
|
-
},
|
|
1901
|
-
O(
|
|
1924
|
+
onChange: (R) => {
|
|
1925
|
+
const U = [...s], tt = g.find((A) => A.productData.name === R);
|
|
1926
|
+
if (!tt) return;
|
|
1927
|
+
const at = {
|
|
1928
|
+
listingId: tt.id,
|
|
1929
|
+
image: tt.productData.images.length > 0 ? tt.productData.images[0].cfId : ""
|
|
1930
|
+
}, j = U.map((A) => A.listingId === $.listingId ? at : A);
|
|
1931
|
+
O(at), i([...j]);
|
|
1902
1932
|
},
|
|
1903
|
-
value:
|
|
1933
|
+
value: N.productData.name,
|
|
1904
1934
|
options: [
|
|
1905
|
-
...g.filter((
|
|
1935
|
+
...g.filter((R) => !s.find((U) => U.listingId === R.id)).map((R) => R.productData.name)
|
|
1906
1936
|
],
|
|
1907
|
-
leftAddon:
|
|
1908
|
-
|
|
1937
|
+
leftAddon: y(
|
|
1938
|
+
$.image || N.productData.images.length > 0 && N.productData.images[0].cfId || ""
|
|
1909
1939
|
)
|
|
1910
1940
|
},
|
|
1911
|
-
|
|
1941
|
+
k
|
|
1912
1942
|
),
|
|
1913
1943
|
/* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
|
|
1914
|
-
|
|
1915
|
-
|
|
1944
|
+
n && /* @__PURE__ */ t.jsx(
|
|
1945
|
+
b,
|
|
1916
1946
|
{
|
|
1917
1947
|
name: "Sliders",
|
|
1918
1948
|
hoverable: !0,
|
|
1919
1949
|
width: 20,
|
|
1920
1950
|
height: 20,
|
|
1921
|
-
onClick: (
|
|
1951
|
+
onClick: (R) => f(R, $)
|
|
1922
1952
|
}
|
|
1923
1953
|
),
|
|
1924
|
-
|
|
1925
|
-
|
|
1954
|
+
d && /* @__PURE__ */ t.jsx(
|
|
1955
|
+
b,
|
|
1926
1956
|
{
|
|
1927
1957
|
name: "Trash",
|
|
1928
1958
|
hoverable: !0,
|
|
1929
1959
|
width: 20,
|
|
1930
1960
|
height: 20,
|
|
1931
1961
|
fill: "#C12A2A",
|
|
1932
|
-
onClick: () => i(
|
|
1962
|
+
onClick: () => i(s.filter((R) => R !== $))
|
|
1933
1963
|
}
|
|
1934
1964
|
)
|
|
1935
1965
|
] })
|
|
1936
1966
|
] });
|
|
1937
|
-
return
|
|
1938
|
-
|
|
1967
|
+
return r ? /* @__PURE__ */ t.jsx(
|
|
1968
|
+
Zn,
|
|
1939
1969
|
{
|
|
1940
|
-
product:
|
|
1941
|
-
index:
|
|
1942
|
-
moveProduct:
|
|
1943
|
-
children:
|
|
1970
|
+
product: $,
|
|
1971
|
+
index: k,
|
|
1972
|
+
moveProduct: B,
|
|
1973
|
+
children: L
|
|
1944
1974
|
},
|
|
1945
|
-
|
|
1975
|
+
$.listingId
|
|
1946
1976
|
) : /* @__PURE__ */ t.jsx(
|
|
1947
1977
|
"div",
|
|
1948
1978
|
{
|
|
1949
1979
|
className: G.product,
|
|
1950
|
-
children:
|
|
1980
|
+
children: L
|
|
1951
1981
|
},
|
|
1952
|
-
|
|
1982
|
+
$.listingId
|
|
1953
1983
|
);
|
|
1954
1984
|
};
|
|
1955
1985
|
return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
|
|
1956
|
-
(
|
|
1957
|
-
|
|
1958
|
-
|
|
1986
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
1987
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: l }),
|
|
1988
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1959
1989
|
K,
|
|
1960
1990
|
{
|
|
1961
|
-
current:
|
|
1962
|
-
onChange: (
|
|
1991
|
+
current: a,
|
|
1992
|
+
onChange: ($) => e == null ? void 0 : e($)
|
|
1963
1993
|
}
|
|
1964
1994
|
)
|
|
1965
1995
|
] }),
|
|
1966
|
-
|
|
1967
|
-
|
|
1996
|
+
E && h && /* @__PURE__ */ t.jsx(
|
|
1997
|
+
Kn,
|
|
1968
1998
|
{
|
|
1969
|
-
activeItem:
|
|
1999
|
+
activeItem: h,
|
|
1970
2000
|
setActiveItem: O,
|
|
1971
2001
|
setIsOpenModal: C,
|
|
1972
|
-
popupPosition:
|
|
2002
|
+
popupPosition: q,
|
|
1973
2003
|
itemsOptions: g
|
|
1974
2004
|
}
|
|
1975
2005
|
),
|
|
1976
2006
|
/* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
2007
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
|
|
2008
|
+
r ? /* @__PURE__ */ t.jsx(yt, { backend: kt, children: s.map(($, k) => M($, k)) }) : s.map(($, k) => M($, k)),
|
|
2009
|
+
T && /* @__PURE__ */ t.jsx("div", { className: G.addButton, children: /* @__PURE__ */ t.jsxs(
|
|
1980
2010
|
it,
|
|
1981
2011
|
{
|
|
1982
2012
|
withoutHover: !0,
|
|
1983
2013
|
className: G.button,
|
|
1984
2014
|
size: "s",
|
|
1985
2015
|
onClick: () => {
|
|
1986
|
-
const
|
|
1987
|
-
for (let
|
|
1988
|
-
if (!
|
|
1989
|
-
|
|
1990
|
-
listingId: g[
|
|
1991
|
-
image: g[
|
|
2016
|
+
const $ = [...s];
|
|
2017
|
+
for (let k = 0; k < g.length; k++)
|
|
2018
|
+
if (!s.find((N) => N.listingId === g[k].id)) {
|
|
2019
|
+
$.push({
|
|
2020
|
+
listingId: g[k].id,
|
|
2021
|
+
image: g[k].productData.images.length > 0 ? g[k].productData.images[0].cfId : ""
|
|
1992
2022
|
});
|
|
1993
2023
|
break;
|
|
1994
2024
|
}
|
|
1995
|
-
i(
|
|
2025
|
+
i($);
|
|
2026
|
+
},
|
|
2027
|
+
disabled: s.length === g.length,
|
|
2028
|
+
style: {
|
|
2029
|
+
width: "fit-content"
|
|
1996
2030
|
},
|
|
1997
|
-
disabled: n.length === g.length,
|
|
1998
2031
|
children: [
|
|
1999
2032
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2000
2033
|
/* @__PURE__ */ t.jsx(
|
|
2001
|
-
|
|
2034
|
+
b,
|
|
2002
2035
|
{
|
|
2003
2036
|
name: "Plus",
|
|
2004
2037
|
width: 16,
|
|
@@ -2007,138 +2040,138 @@ const Ot = "_wrapper_9rr5j_2", qt = "_alignmentBlock_9rr5j_8", Dt = "_title_9rr5
|
|
|
2007
2040
|
)
|
|
2008
2041
|
]
|
|
2009
2042
|
}
|
|
2010
|
-
)
|
|
2043
|
+
) })
|
|
2011
2044
|
] }),
|
|
2012
|
-
|
|
2045
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(xt, { items: c })
|
|
2013
2046
|
] });
|
|
2014
|
-
},
|
|
2015
|
-
options:
|
|
2016
|
-
price:
|
|
2017
|
-
oldPrice:
|
|
2018
|
-
newPrice:
|
|
2019
|
-
animate:
|
|
2020
|
-
appearAndBounce:
|
|
2021
|
-
meta:
|
|
2022
|
-
info:
|
|
2023
|
-
infoRight:
|
|
2024
|
-
buttons:
|
|
2025
|
-
variants:
|
|
2026
|
-
variant:
|
|
2027
|
-
stock:
|
|
2028
|
-
variantInfo:
|
|
2029
|
-
quantity:
|
|
2030
|
-
count:
|
|
2031
|
-
focused:
|
|
2032
|
-
button:
|
|
2033
|
-
activeVariant:
|
|
2034
|
-
chargeTypes:
|
|
2035
|
-
charge:
|
|
2036
|
-
chargeActive:
|
|
2037
|
-
title:
|
|
2047
|
+
}, ti = "_options_jdafm_1", ei = "_price_jdafm_12", si = "_oldPrice_jdafm_19", ni = "_newPrice_jdafm_27", ii = "_animate_jdafm_34", ai = "_appearAndBounce_jdafm_1", oi = "_meta_jdafm_52", ci = "_info_jdafm_58", li = "_infoRight_jdafm_66", ri = "_buttons_jdafm_73", di = "_variants_jdafm_80", ui = "_variant_jdafm_80", mi = "_stock_jdafm_97", _i = "_variantInfo_jdafm_104", hi = "_quantity_jdafm_110", pi = "_count_jdafm_117", gi = "_focused_jdafm_134", fi = "_button_jdafm_73", xi = "_activeVariant_jdafm_160", bi = "_chargeTypes_jdafm_164", vi = "_charge_jdafm_164", ji = "_chargeActive_jdafm_189", yi = "_title_jdafm_197", I = {
|
|
2048
|
+
options: ti,
|
|
2049
|
+
price: ei,
|
|
2050
|
+
oldPrice: si,
|
|
2051
|
+
newPrice: ni,
|
|
2052
|
+
animate: ii,
|
|
2053
|
+
appearAndBounce: ai,
|
|
2054
|
+
meta: oi,
|
|
2055
|
+
info: ci,
|
|
2056
|
+
infoRight: li,
|
|
2057
|
+
buttons: ri,
|
|
2058
|
+
variants: di,
|
|
2059
|
+
variant: ui,
|
|
2060
|
+
stock: mi,
|
|
2061
|
+
variantInfo: _i,
|
|
2062
|
+
quantity: hi,
|
|
2063
|
+
count: pi,
|
|
2064
|
+
focused: gi,
|
|
2065
|
+
button: fi,
|
|
2066
|
+
activeVariant: xi,
|
|
2067
|
+
chargeTypes: bi,
|
|
2068
|
+
charge: vi,
|
|
2069
|
+
chargeActive: ji,
|
|
2070
|
+
title: yi
|
|
2038
2071
|
};
|
|
2039
|
-
var
|
|
2040
|
-
const
|
|
2041
|
-
var C,
|
|
2042
|
-
const { variants:
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
const
|
|
2046
|
-
return () => clearTimeout(
|
|
2047
|
-
}, [
|
|
2072
|
+
var Ot = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))(Ot || {});
|
|
2073
|
+
const Xa = (u) => {
|
|
2074
|
+
var C, B;
|
|
2075
|
+
const { variants: a } = u, [e, s] = p.useState(a[0]), [i, c] = p.useState(e.chargeTypes[0]), l = ft(), [o, n] = p.useState(1), [r, m] = p.useState(!1), { reset: d, addProductToCart: T, getProducts: x } = Nt(), [g, h] = p.useState(!1);
|
|
2076
|
+
p.useEffect(() => {
|
|
2077
|
+
h(!0);
|
|
2078
|
+
const f = setTimeout(() => h(!1), 600);
|
|
2079
|
+
return () => clearTimeout(f);
|
|
2080
|
+
}, [o]);
|
|
2048
2081
|
async function O() {
|
|
2049
|
-
await
|
|
2082
|
+
await x(), await T({
|
|
2050
2083
|
productId: u.id,
|
|
2051
2084
|
productVariantId: e.id,
|
|
2052
|
-
quantity:
|
|
2085
|
+
quantity: o
|
|
2053
2086
|
});
|
|
2054
2087
|
}
|
|
2055
|
-
function
|
|
2056
|
-
|
|
2088
|
+
function q() {
|
|
2089
|
+
d(), O(), l("/checkout");
|
|
2057
2090
|
}
|
|
2058
|
-
function
|
|
2059
|
-
if (
|
|
2060
|
-
const
|
|
2061
|
-
return `${
|
|
2062
|
-
} else if (
|
|
2063
|
-
const
|
|
2064
|
-
return `${
|
|
2065
|
-
} else if (
|
|
2066
|
-
const
|
|
2067
|
-
return `${
|
|
2091
|
+
function v(f) {
|
|
2092
|
+
if (f >= 864e5) {
|
|
2093
|
+
const N = Math.floor(f / 864e5);
|
|
2094
|
+
return `${N} ${N === 1 ? "day" : "days"}`;
|
|
2095
|
+
} else if (f >= 36e5) {
|
|
2096
|
+
const N = Math.floor(f / 36e5);
|
|
2097
|
+
return `${N} ${N === 1 ? "hour" : "hours"}`;
|
|
2098
|
+
} else if (f >= 6e4) {
|
|
2099
|
+
const N = Math.floor(f / 6e4);
|
|
2100
|
+
return `${N} ${N === 1 ? "minute" : "minutes"}`;
|
|
2068
2101
|
} else {
|
|
2069
|
-
const
|
|
2070
|
-
return `${
|
|
2102
|
+
const N = Math.floor(f / 1e3);
|
|
2103
|
+
return `${N} ${N === 1 ? "second" : "seconds"}`;
|
|
2071
2104
|
}
|
|
2072
2105
|
}
|
|
2073
|
-
function
|
|
2074
|
-
return
|
|
2106
|
+
function E(f, y) {
|
|
2107
|
+
return f.length > y ? f.slice(0, y) + "..." : f;
|
|
2075
2108
|
}
|
|
2076
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2077
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
2109
|
+
return /* @__PURE__ */ t.jsxs("div", { className: I.options, children: [
|
|
2110
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: I.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
|
|
2078
2111
|
"div",
|
|
2079
2112
|
{
|
|
2080
|
-
className:
|
|
2081
|
-
[
|
|
2113
|
+
className: F(I.charge, {
|
|
2114
|
+
[I.chargeActive]: i === f
|
|
2082
2115
|
}),
|
|
2083
|
-
onClick: () =>
|
|
2084
|
-
children:
|
|
2116
|
+
onClick: () => c(f),
|
|
2117
|
+
children: Ot[f]
|
|
2085
2118
|
},
|
|
2086
|
-
|
|
2119
|
+
f
|
|
2087
2120
|
)) }),
|
|
2088
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2089
|
-
var
|
|
2121
|
+
/* @__PURE__ */ t.jsx("div", { className: I.variants, children: a.map((f) => {
|
|
2122
|
+
var y;
|
|
2090
2123
|
return /* @__PURE__ */ t.jsxs(
|
|
2091
2124
|
"div",
|
|
2092
2125
|
{
|
|
2093
|
-
className:
|
|
2094
|
-
[
|
|
2126
|
+
className: F(I.variant, {
|
|
2127
|
+
[I.activeVariant]: e.id === f.id
|
|
2095
2128
|
}),
|
|
2096
|
-
onClick: () =>
|
|
2129
|
+
onClick: () => s(f),
|
|
2097
2130
|
children: [
|
|
2098
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2099
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2131
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.variantInfo, children: [
|
|
2132
|
+
/* @__PURE__ */ t.jsx("span", { className: I.title, children: E(f.name, 15) }),
|
|
2100
2133
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2101
2134
|
"$",
|
|
2102
|
-
i === "ONE_TIME" ?
|
|
2135
|
+
i === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : "Price Not Found"
|
|
2103
2136
|
] })
|
|
2104
2137
|
] }),
|
|
2105
|
-
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2106
|
-
((
|
|
2138
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: I.stock, children: [
|
|
2139
|
+
((y = f.quantity.restrictions) == null ? void 0 : y.max) || f.quantity.available || 0,
|
|
2107
2140
|
" in stock"
|
|
2108
2141
|
] }) })
|
|
2109
2142
|
]
|
|
2110
2143
|
},
|
|
2111
|
-
|
|
2144
|
+
f.id
|
|
2112
2145
|
);
|
|
2113
2146
|
}) }),
|
|
2114
|
-
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2147
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: I.quantity, children: [
|
|
2115
2148
|
/* @__PURE__ */ t.jsx(
|
|
2116
2149
|
"button",
|
|
2117
2150
|
{
|
|
2118
2151
|
onClick: () => {
|
|
2119
|
-
|
|
2152
|
+
o > 1 ? n((f) => f - 1) : n(1);
|
|
2120
2153
|
},
|
|
2121
|
-
className:
|
|
2122
|
-
disabled: e.quantity.restrictions &&
|
|
2123
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2154
|
+
className: I.button,
|
|
2155
|
+
disabled: e.quantity.restrictions && o <= e.quantity.restrictions.min,
|
|
2156
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
2124
2157
|
}
|
|
2125
2158
|
),
|
|
2126
2159
|
/* @__PURE__ */ t.jsx(
|
|
2127
2160
|
"label",
|
|
2128
2161
|
{
|
|
2129
|
-
className:
|
|
2130
|
-
[
|
|
2162
|
+
className: F(I.count, {
|
|
2163
|
+
[I.focused]: r
|
|
2131
2164
|
}),
|
|
2132
|
-
onFocus: () =>
|
|
2133
|
-
onBlur: () =>
|
|
2165
|
+
onFocus: () => m(!0),
|
|
2166
|
+
onBlur: () => m(!1),
|
|
2134
2167
|
children: /* @__PURE__ */ t.jsx(
|
|
2135
2168
|
W,
|
|
2136
2169
|
{
|
|
2137
2170
|
type: "number",
|
|
2138
|
-
value: String(
|
|
2139
|
-
onChange: (
|
|
2171
|
+
value: String(o),
|
|
2172
|
+
onChange: (f) => n(Number(f)),
|
|
2140
2173
|
max: ((C = e.quantity.restrictions) == null ? void 0 : C.max) || e.quantity.available || 1 / 0,
|
|
2141
|
-
min: ((
|
|
2174
|
+
min: ((B = e.quantity.restrictions) == null ? void 0 : B.min) || 0,
|
|
2142
2175
|
style: {
|
|
2143
2176
|
backgroundColor: "transparent",
|
|
2144
2177
|
border: "none",
|
|
@@ -2152,20 +2185,20 @@ const Mo = (u) => {
|
|
|
2152
2185
|
"button",
|
|
2153
2186
|
{
|
|
2154
2187
|
onClick: () => {
|
|
2155
|
-
|
|
2188
|
+
n((f) => f + 1);
|
|
2156
2189
|
},
|
|
2157
|
-
className:
|
|
2158
|
-
disabled: !!(e.quantity.restrictions &&
|
|
2159
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2190
|
+
className: I.button,
|
|
2191
|
+
disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available && o >= e.quantity.available),
|
|
2192
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
2160
2193
|
}
|
|
2161
2194
|
)
|
|
2162
2195
|
] }),
|
|
2163
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2164
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2196
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.meta, children: [
|
|
2197
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.info, children: [
|
|
2165
2198
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2166
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2199
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.infoRight, children: [
|
|
2167
2200
|
/* @__PURE__ */ t.jsx(
|
|
2168
|
-
|
|
2201
|
+
b,
|
|
2169
2202
|
{
|
|
2170
2203
|
name: "Lightning",
|
|
2171
2204
|
fill: "#FF3F19",
|
|
@@ -2173,44 +2206,44 @@ const Mo = (u) => {
|
|
|
2173
2206
|
height: 20
|
|
2174
2207
|
}
|
|
2175
2208
|
),
|
|
2176
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2209
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : v(e.deliveryTime) })
|
|
2177
2210
|
] })
|
|
2178
2211
|
] }),
|
|
2179
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2212
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.info, children: [
|
|
2180
2213
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2181
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2182
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2214
|
+
/* @__PURE__ */ t.jsx("div", { className: I.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: I.price, children: [
|
|
2215
|
+
/* @__PURE__ */ t.jsxs("span", { className: F(I.newPrice, { [I.animate]: g }), children: [
|
|
2183
2216
|
"$ ",
|
|
2184
|
-
(e.price.amount || 0) *
|
|
2217
|
+
(e.price.amount || 0) * o
|
|
2185
2218
|
] }),
|
|
2186
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2219
|
+
/* @__PURE__ */ t.jsxs("span", { className: I.oldPrice, children: [
|
|
2187
2220
|
"$ ",
|
|
2188
|
-
(e.compareAtPrice.amount || 0) *
|
|
2221
|
+
(e.compareAtPrice.amount || 0) * o
|
|
2189
2222
|
] })
|
|
2190
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2223
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: F(I.newPrice, { [I.animate]: g }), children: [
|
|
2191
2224
|
"$ ",
|
|
2192
|
-
(e.price.amount || 0) *
|
|
2193
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2194
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2225
|
+
(e.price.amount || 0) * o
|
|
2226
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: I.price, children: [
|
|
2227
|
+
/* @__PURE__ */ t.jsxs("span", { className: F(I.newPrice, { [I.animate]: g }), children: [
|
|
2195
2228
|
"$ ",
|
|
2196
2229
|
e.subscriptionSettings.price.amount || 0
|
|
2197
2230
|
] }),
|
|
2198
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2231
|
+
/* @__PURE__ */ t.jsxs("span", { className: I.oldPrice, children: [
|
|
2199
2232
|
"$ ",
|
|
2200
2233
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2201
2234
|
] })
|
|
2202
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2235
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(I.newPrice, { [I.animate]: g }), children: [
|
|
2203
2236
|
"$ ",
|
|
2204
2237
|
e.subscriptionSettings.price.amount || 0
|
|
2205
2238
|
] }) })
|
|
2206
2239
|
] })
|
|
2207
2240
|
] }),
|
|
2208
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2241
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.buttons, children: [
|
|
2209
2242
|
/* @__PURE__ */ t.jsx(
|
|
2210
2243
|
it,
|
|
2211
2244
|
{
|
|
2212
2245
|
type: "Primary",
|
|
2213
|
-
onClick: () =>
|
|
2246
|
+
onClick: () => q(),
|
|
2214
2247
|
children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
|
|
2215
2248
|
}
|
|
2216
2249
|
),
|
|
@@ -2224,61 +2257,67 @@ const Mo = (u) => {
|
|
|
2224
2257
|
)
|
|
2225
2258
|
] })
|
|
2226
2259
|
] });
|
|
2227
|
-
},
|
|
2228
|
-
button:
|
|
2229
|
-
login:
|
|
2230
|
-
signUp:
|
|
2231
|
-
buttons:
|
|
2232
|
-
modal:
|
|
2233
|
-
info:
|
|
2234
|
-
top:
|
|
2235
|
-
title:
|
|
2236
|
-
clear:
|
|
2237
|
-
activeClear:
|
|
2238
|
-
count:
|
|
2239
|
-
cart:
|
|
2240
|
-
empty:
|
|
2241
|
-
product:
|
|
2242
|
-
products:
|
|
2243
|
-
image:
|
|
2244
|
-
productInfo:
|
|
2245
|
-
content:
|
|
2246
|
-
name:
|
|
2247
|
-
price:
|
|
2248
|
-
productButtons:
|
|
2249
|
-
productButton:
|
|
2250
|
-
productCount:
|
|
2251
|
-
bottom:
|
|
2252
|
-
subtotal:
|
|
2253
|
-
block:
|
|
2254
|
-
shoppingCount:
|
|
2255
|
-
total:
|
|
2256
|
-
link:
|
|
2257
|
-
userInfo:
|
|
2258
|
-
},
|
|
2259
|
-
button:
|
|
2260
|
-
primary:
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2260
|
+
}, ki = "_button_1861a_1", $i = "_login_1861a_14", wi = "_signUp_1861a_18", Ni = "_buttons_1861a_23", Ii = "_modal_1861a_32", Ci = "_info_1861a_60", Bi = "_top_1861a_67", Si = "_title_1861a_78", Pi = "_clear_1861a_84", Ti = "_activeClear_1861a_91", Ai = "_count_1861a_95", Oi = "_cart_1861a_110", qi = "_empty_1861a_118", Di = "_product_1861a_144", Ei = "_products_1861a_153", Li = "_image_1861a_161", Ri = "_productInfo_1861a_167", Mi = "_content_1861a_174", Hi = "_name_1861a_180", zi = "_price_1861a_186", Vi = "_productButtons_1861a_192", Fi = "_productButton_1861a_192", Ui = "_productCount_1861a_212", Yi = "_bottom_1861a_228", Gi = "_subtotal_1861a_236", Wi = "_block_1861a_244", Xi = "_shoppingCount_1861a_251", Ji = "_total_1861a_271", Qi = "_link_1861a_277", Ki = "_userInfo_1861a_284", P = {
|
|
2261
|
+
button: ki,
|
|
2262
|
+
login: $i,
|
|
2263
|
+
signUp: wi,
|
|
2264
|
+
buttons: Ni,
|
|
2265
|
+
modal: Ii,
|
|
2266
|
+
info: Ci,
|
|
2267
|
+
top: Bi,
|
|
2268
|
+
title: Si,
|
|
2269
|
+
clear: Pi,
|
|
2270
|
+
activeClear: Ti,
|
|
2271
|
+
count: Ai,
|
|
2272
|
+
cart: Oi,
|
|
2273
|
+
empty: qi,
|
|
2274
|
+
product: Di,
|
|
2275
|
+
products: Ei,
|
|
2276
|
+
image: Li,
|
|
2277
|
+
productInfo: Ri,
|
|
2278
|
+
content: Mi,
|
|
2279
|
+
name: Hi,
|
|
2280
|
+
price: zi,
|
|
2281
|
+
productButtons: Vi,
|
|
2282
|
+
productButton: Fi,
|
|
2283
|
+
productCount: Ui,
|
|
2284
|
+
bottom: Yi,
|
|
2285
|
+
subtotal: Gi,
|
|
2286
|
+
block: Wi,
|
|
2287
|
+
shoppingCount: Xi,
|
|
2288
|
+
total: Ji,
|
|
2289
|
+
link: Qi,
|
|
2290
|
+
userInfo: Ki
|
|
2291
|
+
}, Zi = "_button_bymeg_1", ta = "_primary_bymeg_19", ea = "_primaryHovered_bymeg_30", sa = "_secondary_bymeg_34", na = "_secondaryHovered_bymeg_44", ia = "_tertiary_bymeg_48", aa = "_tertiaryHovered_bymeg_58", oa = "_content_bymeg_62", et = {
|
|
2292
|
+
button: Zi,
|
|
2293
|
+
primary: ta,
|
|
2294
|
+
primaryHovered: ea,
|
|
2295
|
+
secondary: sa,
|
|
2296
|
+
secondaryHovered: na,
|
|
2297
|
+
tertiary: ia,
|
|
2298
|
+
tertiaryHovered: aa,
|
|
2299
|
+
content: oa
|
|
2300
|
+
}, jt = (u) => {
|
|
2301
|
+
const { children: a, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = u, { themeSettings: o } = Bt();
|
|
2266
2302
|
return /* @__PURE__ */ t.jsx(
|
|
2267
2303
|
"button",
|
|
2268
2304
|
{
|
|
2269
|
-
className:
|
|
2270
|
-
[
|
|
2271
|
-
[
|
|
2272
|
-
[
|
|
2305
|
+
className: F(et.button, i, {
|
|
2306
|
+
[et.primary]: l === "Primary",
|
|
2307
|
+
[et.secondary]: l === "Secondary",
|
|
2308
|
+
[et.tertiary]: l === "Tertiary",
|
|
2309
|
+
[et.primaryHovered]: l === "Primary" && !c && o.buttons.primary.hover,
|
|
2310
|
+
[et.secondaryHovered]: l === "Secondary" && !c && o.buttons.secondary.hover,
|
|
2311
|
+
[et.tertiaryHovered]: l === "Tertiary" && !c && o.buttons.tertiary.hover
|
|
2273
2312
|
}),
|
|
2274
2313
|
onClick: e,
|
|
2275
2314
|
style: {
|
|
2276
|
-
...
|
|
2315
|
+
...s
|
|
2277
2316
|
},
|
|
2278
|
-
disabled:
|
|
2279
|
-
children:
|
|
2317
|
+
disabled: c,
|
|
2318
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: et.content, children: [
|
|
2280
2319
|
/* @__PURE__ */ t.jsx(
|
|
2281
|
-
|
|
2320
|
+
b,
|
|
2282
2321
|
{
|
|
2283
2322
|
name: "ArrowRight",
|
|
2284
2323
|
fill: "#757575",
|
|
@@ -2286,177 +2325,183 @@ const Mo = (u) => {
|
|
|
2286
2325
|
height: 20
|
|
2287
2326
|
}
|
|
2288
2327
|
),
|
|
2289
|
-
|
|
2290
|
-
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children:
|
|
2328
|
+
a
|
|
2329
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
|
|
2291
2330
|
}
|
|
2292
2331
|
);
|
|
2293
2332
|
};
|
|
2294
|
-
class
|
|
2333
|
+
class _t extends Error {
|
|
2295
2334
|
}
|
|
2296
|
-
|
|
2297
|
-
function
|
|
2298
|
-
return decodeURIComponent(atob(u).replace(/(.)/g, (
|
|
2299
|
-
let
|
|
2300
|
-
return
|
|
2335
|
+
_t.prototype.name = "InvalidTokenError";
|
|
2336
|
+
function ca(u) {
|
|
2337
|
+
return decodeURIComponent(atob(u).replace(/(.)/g, (a, e) => {
|
|
2338
|
+
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2339
|
+
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2301
2340
|
}));
|
|
2302
2341
|
}
|
|
2303
|
-
function
|
|
2304
|
-
let
|
|
2305
|
-
switch (
|
|
2342
|
+
function la(u) {
|
|
2343
|
+
let a = u.replace(/-/g, "+").replace(/_/g, "/");
|
|
2344
|
+
switch (a.length % 4) {
|
|
2306
2345
|
case 0:
|
|
2307
2346
|
break;
|
|
2308
2347
|
case 2:
|
|
2309
|
-
|
|
2348
|
+
a += "==";
|
|
2310
2349
|
break;
|
|
2311
2350
|
case 3:
|
|
2312
|
-
|
|
2351
|
+
a += "=";
|
|
2313
2352
|
break;
|
|
2314
2353
|
default:
|
|
2315
2354
|
throw new Error("base64 string is not of the correct length");
|
|
2316
2355
|
}
|
|
2317
2356
|
try {
|
|
2318
|
-
return
|
|
2357
|
+
return ca(a);
|
|
2319
2358
|
} catch {
|
|
2320
|
-
return atob(
|
|
2359
|
+
return atob(a);
|
|
2321
2360
|
}
|
|
2322
2361
|
}
|
|
2323
|
-
function
|
|
2362
|
+
function ra(u, a) {
|
|
2324
2363
|
if (typeof u != "string")
|
|
2325
|
-
throw new
|
|
2326
|
-
|
|
2327
|
-
const e =
|
|
2328
|
-
if (typeof
|
|
2329
|
-
throw new
|
|
2364
|
+
throw new _t("Invalid token specified: must be a string");
|
|
2365
|
+
a || (a = {});
|
|
2366
|
+
const e = a.header === !0 ? 0 : 1, s = u.split(".")[e];
|
|
2367
|
+
if (typeof s != "string")
|
|
2368
|
+
throw new _t(`Invalid token specified: missing part #${e + 1}`);
|
|
2330
2369
|
let i;
|
|
2331
2370
|
try {
|
|
2332
|
-
i =
|
|
2333
|
-
} catch (
|
|
2334
|
-
throw new
|
|
2371
|
+
i = la(s);
|
|
2372
|
+
} catch (c) {
|
|
2373
|
+
throw new _t(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
|
|
2335
2374
|
}
|
|
2336
2375
|
try {
|
|
2337
2376
|
return JSON.parse(i);
|
|
2338
|
-
} catch (
|
|
2339
|
-
throw new
|
|
2377
|
+
} catch (c) {
|
|
2378
|
+
throw new _t(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
|
|
2340
2379
|
}
|
|
2341
2380
|
}
|
|
2342
|
-
const
|
|
2343
|
-
const { shopping:
|
|
2344
|
-
function i(
|
|
2345
|
-
|
|
2381
|
+
const Ja = (u) => {
|
|
2382
|
+
const { shopping: a, signUp: e } = u, s = ft();
|
|
2383
|
+
function i(l) {
|
|
2384
|
+
s(l);
|
|
2346
2385
|
}
|
|
2347
|
-
const
|
|
2348
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2349
|
-
|
|
2350
|
-
!
|
|
2351
|
-
|
|
2386
|
+
const c = JSON.parse(localStorage.getItem("token") || "{}");
|
|
2387
|
+
return /* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
|
|
2388
|
+
a && /* @__PURE__ */ t.jsx(da, {}),
|
|
2389
|
+
!c.data && /* @__PURE__ */ t.jsx(
|
|
2390
|
+
jt,
|
|
2352
2391
|
{
|
|
2353
|
-
className: H(N.button, N.login),
|
|
2354
2392
|
onClick: () => i("/customer-dash"),
|
|
2393
|
+
type: "Secondary",
|
|
2394
|
+
style: {
|
|
2395
|
+
padding: 10
|
|
2396
|
+
},
|
|
2355
2397
|
children: "Login"
|
|
2356
2398
|
}
|
|
2357
2399
|
),
|
|
2358
|
-
!
|
|
2359
|
-
|
|
2400
|
+
!c.data && e && /* @__PURE__ */ t.jsx(
|
|
2401
|
+
jt,
|
|
2360
2402
|
{
|
|
2361
|
-
className: H(N.button, N.login, N.signUp),
|
|
2362
2403
|
onClick: () => i("/customer-dash"),
|
|
2404
|
+
type: "Primary",
|
|
2405
|
+
style: {
|
|
2406
|
+
padding: 10
|
|
2407
|
+
},
|
|
2363
2408
|
children: "Sign Up"
|
|
2364
2409
|
}
|
|
2365
2410
|
),
|
|
2366
|
-
|
|
2411
|
+
c.data && /* @__PURE__ */ t.jsx(_a, { token: c.data })
|
|
2367
2412
|
] });
|
|
2368
|
-
},
|
|
2369
|
-
const [u,
|
|
2370
|
-
function
|
|
2371
|
-
for (let
|
|
2372
|
-
for (let
|
|
2373
|
-
if (i.parts[
|
|
2374
|
-
return i.parts[
|
|
2413
|
+
}, da = () => {
|
|
2414
|
+
const [u, a] = p.useState(!1), [e, s] = p.useState([]), { cart: i, getProducts: c } = Nt();
|
|
2415
|
+
function l(m) {
|
|
2416
|
+
for (let d = 0; d < i.parts.length; d++)
|
|
2417
|
+
for (let T = 0; T < m.variants.length; T++)
|
|
2418
|
+
if (i.parts[d].productVariantId === m.variants[d].id)
|
|
2419
|
+
return i.parts[d].productVariantId;
|
|
2375
2420
|
}
|
|
2376
|
-
function
|
|
2377
|
-
for (let
|
|
2378
|
-
for (let
|
|
2379
|
-
if (i.parts[
|
|
2380
|
-
return i.parts[
|
|
2421
|
+
function o(m) {
|
|
2422
|
+
for (let d = 0; d < i.parts.length; d++)
|
|
2423
|
+
for (let T = 0; T < m.variants.length; T++)
|
|
2424
|
+
if (i.parts[d].productVariantId === m.variants[d].id)
|
|
2425
|
+
return i.parts[d].quantity;
|
|
2381
2426
|
}
|
|
2382
|
-
|
|
2427
|
+
p.useEffect(() => {
|
|
2383
2428
|
(async () => {
|
|
2384
|
-
const
|
|
2429
|
+
const d = i.parts.map((g) => String(g.productId)), x = (await c([...d])).map((g) => ({
|
|
2385
2430
|
...g,
|
|
2386
|
-
activeVariantId:
|
|
2387
|
-
quantity:
|
|
2431
|
+
activeVariantId: l(g),
|
|
2432
|
+
quantity: o(g)
|
|
2388
2433
|
}));
|
|
2389
|
-
|
|
2434
|
+
s(x);
|
|
2390
2435
|
})();
|
|
2391
2436
|
}, [i]);
|
|
2392
|
-
function
|
|
2393
|
-
var
|
|
2394
|
-
return !
|
|
2437
|
+
function n(m) {
|
|
2438
|
+
var d;
|
|
2439
|
+
return !m || !(m != null && m.variants) ? !1 : (d = m.variants.find((T) => T.id === m.activeVariantId)) == null ? void 0 : d.subscriptionSettings;
|
|
2395
2440
|
}
|
|
2396
|
-
const
|
|
2441
|
+
const r = i.parts.length > 0 && e.length > 0 && !n(e[0]);
|
|
2397
2442
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2398
2443
|
/* @__PURE__ */ t.jsxs(
|
|
2399
2444
|
"div",
|
|
2400
2445
|
{
|
|
2401
|
-
className:
|
|
2402
|
-
onClick: (
|
|
2403
|
-
|
|
2446
|
+
className: P.button,
|
|
2447
|
+
onClick: (m) => {
|
|
2448
|
+
m.stopPropagation(), window.location.pathname !== "/admin/builder" && a(!0);
|
|
2404
2449
|
},
|
|
2405
2450
|
children: [
|
|
2406
2451
|
/* @__PURE__ */ t.jsx(
|
|
2407
|
-
|
|
2452
|
+
b,
|
|
2408
2453
|
{
|
|
2409
2454
|
name: "Handbag",
|
|
2410
2455
|
fill: "var(--icon-primary)"
|
|
2411
2456
|
}
|
|
2412
2457
|
),
|
|
2413
|
-
|
|
2458
|
+
r && /* @__PURE__ */ t.jsx("div", { className: P.shoppingCount, children: i.parts.length })
|
|
2414
2459
|
]
|
|
2415
2460
|
}
|
|
2416
2461
|
),
|
|
2417
|
-
u && /* @__PURE__ */ t.jsx(
|
|
2418
|
-
|
|
2462
|
+
u && /* @__PURE__ */ t.jsx(St, { close: a, children: /* @__PURE__ */ t.jsx(
|
|
2463
|
+
ua,
|
|
2419
2464
|
{
|
|
2420
2465
|
activeProducts: e,
|
|
2421
|
-
isCartNotEmpty:
|
|
2466
|
+
isCartNotEmpty: r
|
|
2422
2467
|
}
|
|
2423
2468
|
) })
|
|
2424
2469
|
] });
|
|
2425
|
-
},
|
|
2426
|
-
const { activeProducts:
|
|
2427
|
-
function
|
|
2428
|
-
|
|
2470
|
+
}, ua = (u) => {
|
|
2471
|
+
const { activeProducts: a, isCartNotEmpty: e } = u, { cart: s, reset: i, getTotalAndDiscount: c, updateQuantityOfProduct: l } = Nt(), o = ft();
|
|
2472
|
+
function n(d) {
|
|
2473
|
+
o(d);
|
|
2429
2474
|
}
|
|
2430
|
-
function d
|
|
2431
|
-
|
|
2432
|
-
productId:
|
|
2433
|
-
productVariantId:
|
|
2434
|
-
quantity:
|
|
2475
|
+
function r(d) {
|
|
2476
|
+
l({
|
|
2477
|
+
productId: d.id,
|
|
2478
|
+
productVariantId: d.activeVariantId,
|
|
2479
|
+
quantity: d.quantity + 1
|
|
2435
2480
|
});
|
|
2436
2481
|
}
|
|
2437
|
-
function
|
|
2438
|
-
|
|
2439
|
-
productId:
|
|
2440
|
-
productVariantId:
|
|
2441
|
-
quantity:
|
|
2482
|
+
function m(d) {
|
|
2483
|
+
l({
|
|
2484
|
+
productId: d.id,
|
|
2485
|
+
productVariantId: d.activeVariantId,
|
|
2486
|
+
quantity: d.quantity - 1
|
|
2442
2487
|
});
|
|
2443
2488
|
}
|
|
2444
2489
|
return /* @__PURE__ */ t.jsxs(
|
|
2445
2490
|
"div",
|
|
2446
2491
|
{
|
|
2447
|
-
className:
|
|
2448
|
-
onClick: (
|
|
2492
|
+
className: P.modal,
|
|
2493
|
+
onClick: (d) => d.stopPropagation(),
|
|
2449
2494
|
children: [
|
|
2450
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2451
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2452
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2453
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
2495
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
|
|
2496
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.info, children: [
|
|
2497
|
+
/* @__PURE__ */ t.jsx("span", { className: P.title, children: "Cart" }),
|
|
2498
|
+
e && /* @__PURE__ */ t.jsx("div", { className: P.count, children: s.parts.length })
|
|
2454
2499
|
] }),
|
|
2455
2500
|
/* @__PURE__ */ t.jsx(
|
|
2456
2501
|
"button",
|
|
2457
2502
|
{
|
|
2458
|
-
className:
|
|
2459
|
-
[
|
|
2503
|
+
className: F(P.clear, {
|
|
2504
|
+
[P.activeClear]: e
|
|
2460
2505
|
}),
|
|
2461
2506
|
disabled: !e,
|
|
2462
2507
|
onClick: () => i(),
|
|
@@ -2464,41 +2509,41 @@ const Ho = (u) => {
|
|
|
2464
2509
|
}
|
|
2465
2510
|
)
|
|
2466
2511
|
] }),
|
|
2467
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2468
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2512
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: P.cart, children: [
|
|
2513
|
+
/* @__PURE__ */ t.jsx("div", { className: P.products, children: a.map((d) => /* @__PURE__ */ t.jsxs(
|
|
2469
2514
|
"div",
|
|
2470
2515
|
{
|
|
2471
|
-
className:
|
|
2516
|
+
className: P.product,
|
|
2472
2517
|
children: [
|
|
2473
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2518
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.productInfo, children: [
|
|
2474
2519
|
/* @__PURE__ */ t.jsx(
|
|
2475
2520
|
"img",
|
|
2476
2521
|
{
|
|
2477
|
-
src: `https://imagedelivery.net/${
|
|
2522
|
+
src: `https://imagedelivery.net/${d.images[0].cfId}/w=500`,
|
|
2478
2523
|
alt: "image",
|
|
2479
2524
|
width: "100%",
|
|
2480
2525
|
height: "100%",
|
|
2481
|
-
className:
|
|
2526
|
+
className: P.image
|
|
2482
2527
|
}
|
|
2483
2528
|
),
|
|
2484
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2485
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2486
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2529
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.content, children: [
|
|
2530
|
+
/* @__PURE__ */ t.jsx("div", { className: P.name, children: d.name }),
|
|
2531
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.price, children: [
|
|
2487
2532
|
"$",
|
|
2488
|
-
|
|
2533
|
+
d.variants.find((T) => T.id === d.activeVariantId).price.amount * ((d == null ? void 0 : d.quantity) || 1)
|
|
2489
2534
|
] })
|
|
2490
2535
|
] })
|
|
2491
2536
|
] }),
|
|
2492
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2537
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.productButtons, children: [
|
|
2493
2538
|
/* @__PURE__ */ t.jsx(
|
|
2494
2539
|
"div",
|
|
2495
2540
|
{
|
|
2496
2541
|
onClick: () => {
|
|
2497
|
-
|
|
2542
|
+
d.quantity !== 1 && m(d);
|
|
2498
2543
|
},
|
|
2499
|
-
className:
|
|
2544
|
+
className: P.productButton,
|
|
2500
2545
|
children: /* @__PURE__ */ t.jsx(
|
|
2501
|
-
|
|
2546
|
+
b,
|
|
2502
2547
|
{
|
|
2503
2548
|
name: "Minus",
|
|
2504
2549
|
fill: "#757575",
|
|
@@ -2508,14 +2553,14 @@ const Ho = (u) => {
|
|
|
2508
2553
|
)
|
|
2509
2554
|
}
|
|
2510
2555
|
),
|
|
2511
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2556
|
+
/* @__PURE__ */ t.jsx("div", { className: P.productCount, children: d.quantity }),
|
|
2512
2557
|
/* @__PURE__ */ t.jsx(
|
|
2513
2558
|
"div",
|
|
2514
2559
|
{
|
|
2515
|
-
onClick: () => d
|
|
2516
|
-
className:
|
|
2560
|
+
onClick: () => r(d),
|
|
2561
|
+
className: P.productButton,
|
|
2517
2562
|
children: /* @__PURE__ */ t.jsx(
|
|
2518
|
-
|
|
2563
|
+
b,
|
|
2519
2564
|
{
|
|
2520
2565
|
name: "Plus",
|
|
2521
2566
|
fill: "#757575",
|
|
@@ -2528,14 +2573,14 @@ const Ho = (u) => {
|
|
|
2528
2573
|
] })
|
|
2529
2574
|
]
|
|
2530
2575
|
},
|
|
2531
|
-
|
|
2576
|
+
d.id
|
|
2532
2577
|
)) }),
|
|
2533
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2534
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2535
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2578
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.bottom, children: [
|
|
2579
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.subtotal, children: [
|
|
2580
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.block, children: [
|
|
2536
2581
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2537
2582
|
/* @__PURE__ */ t.jsx(
|
|
2538
|
-
|
|
2583
|
+
b,
|
|
2539
2584
|
{
|
|
2540
2585
|
name: "Info",
|
|
2541
2586
|
width: 20,
|
|
@@ -2544,19 +2589,19 @@ const Ho = (u) => {
|
|
|
2544
2589
|
}
|
|
2545
2590
|
)
|
|
2546
2591
|
] }),
|
|
2547
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2592
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.total, children: [
|
|
2548
2593
|
"$",
|
|
2549
|
-
|
|
2594
|
+
c().total
|
|
2550
2595
|
] })
|
|
2551
2596
|
] }),
|
|
2552
|
-
/* @__PURE__ */ t.jsx(
|
|
2597
|
+
/* @__PURE__ */ t.jsx(jt, { onClick: () => n("/checkout"), children: "Checkout" })
|
|
2553
2598
|
] })
|
|
2554
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2599
|
+
] }) : /* @__PURE__ */ t.jsx(ma, {})
|
|
2555
2600
|
]
|
|
2556
2601
|
}
|
|
2557
2602
|
);
|
|
2558
|
-
},
|
|
2559
|
-
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2603
|
+
}, ma = () => /* @__PURE__ */ t.jsxs("div", { className: P.empty, children: [
|
|
2604
|
+
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(b, { name: "Handbag" }) }),
|
|
2560
2605
|
/* @__PURE__ */ t.jsx("span", { children: "Your cart is empty" }),
|
|
2561
2606
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2562
2607
|
"Check out the store's products and add them",
|
|
@@ -2565,254 +2610,251 @@ const Ho = (u) => {
|
|
|
2565
2610
|
"a",
|
|
2566
2611
|
{
|
|
2567
2612
|
href: "/products",
|
|
2568
|
-
className:
|
|
2613
|
+
className: P.link,
|
|
2569
2614
|
children: "here"
|
|
2570
2615
|
}
|
|
2571
2616
|
)
|
|
2572
2617
|
] })
|
|
2573
|
-
] }),
|
|
2574
|
-
const [
|
|
2575
|
-
|
|
2618
|
+
] }), _a = ({ token: u }) => {
|
|
2619
|
+
const [a, e] = p.useState("test-email@gmail.com"), s = ft();
|
|
2620
|
+
p.useEffect(() => {
|
|
2576
2621
|
(async () => {
|
|
2577
|
-
const
|
|
2578
|
-
e(
|
|
2622
|
+
const l = ra(u);
|
|
2623
|
+
e(l.email);
|
|
2579
2624
|
})();
|
|
2580
2625
|
}, [u]);
|
|
2581
|
-
function i(
|
|
2582
|
-
|
|
2626
|
+
function i(c) {
|
|
2627
|
+
s(c);
|
|
2583
2628
|
}
|
|
2584
2629
|
return /* @__PURE__ */ t.jsx(
|
|
2585
2630
|
"div",
|
|
2586
2631
|
{
|
|
2587
|
-
className:
|
|
2632
|
+
className: P.userInfo,
|
|
2588
2633
|
onClick: () => i("/customer-dash"),
|
|
2589
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
2634
|
+
children: /* @__PURE__ */ t.jsx("div", { children: a || "test-email@gmail.com" })
|
|
2590
2635
|
}
|
|
2591
2636
|
);
|
|
2592
|
-
},
|
|
2593
|
-
share:
|
|
2594
|
-
modal:
|
|
2595
|
-
header:
|
|
2596
|
-
socials:
|
|
2597
|
-
social:
|
|
2598
|
-
copy:
|
|
2599
|
-
title:
|
|
2600
|
-
copyWrapper:
|
|
2601
|
-
copyText:
|
|
2602
|
-
},
|
|
2603
|
-
const { isOpenModal: u, setIsOpenModal:
|
|
2637
|
+
}, ha = "_share_11u0d_1", pa = "_modal_11u0d_8", ga = "_header_11u0d_14", fa = "_socials_11u0d_24", xa = "_social_11u0d_24", ba = "_copy_11u0d_34", va = "_title_11u0d_41", ja = "_copyWrapper_11u0d_47", ya = "_copyText_11u0d_56", nt = {
|
|
2638
|
+
share: ha,
|
|
2639
|
+
modal: pa,
|
|
2640
|
+
header: ga,
|
|
2641
|
+
socials: fa,
|
|
2642
|
+
social: xa,
|
|
2643
|
+
copy: ba,
|
|
2644
|
+
title: va,
|
|
2645
|
+
copyWrapper: ja,
|
|
2646
|
+
copyText: ya
|
|
2647
|
+
}, Qa = () => {
|
|
2648
|
+
const { isOpenModal: u, setIsOpenModal: a } = Pt();
|
|
2604
2649
|
function e() {
|
|
2605
|
-
|
|
2650
|
+
a(!0);
|
|
2606
2651
|
}
|
|
2607
2652
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2608
2653
|
/* @__PURE__ */ t.jsx(
|
|
2609
2654
|
it,
|
|
2610
2655
|
{
|
|
2611
|
-
className:
|
|
2612
|
-
onClick: (
|
|
2613
|
-
|
|
2656
|
+
className: nt.share,
|
|
2657
|
+
onClick: (s) => {
|
|
2658
|
+
s.stopPropagation(), e();
|
|
2614
2659
|
},
|
|
2615
2660
|
type: "Secondary",
|
|
2616
2661
|
children: /* @__PURE__ */ t.jsx(
|
|
2617
|
-
|
|
2662
|
+
b,
|
|
2618
2663
|
{
|
|
2619
2664
|
name: "Share",
|
|
2620
|
-
fill: "#757575"
|
|
2665
|
+
fill: "#757575",
|
|
2666
|
+
hoverable: !0
|
|
2621
2667
|
}
|
|
2622
2668
|
)
|
|
2623
2669
|
}
|
|
2624
2670
|
),
|
|
2625
|
-
u && /* @__PURE__ */ t.jsx(
|
|
2671
|
+
u && /* @__PURE__ */ t.jsx(St, { close: a, children: /* @__PURE__ */ t.jsx(ka, {}) })
|
|
2626
2672
|
] });
|
|
2627
|
-
},
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
}, ho = () => {
|
|
2635
|
-
const { setIsOpenModal: u } = St(), o = window.location.href;
|
|
2636
|
-
function e() {
|
|
2637
|
-
navigator.clipboard.writeText(o);
|
|
2673
|
+
}, ka = () => {
|
|
2674
|
+
const { setIsOpenModal: u } = Pt(), { notification: a, setNotification: e } = Dt(), s = window.location.href;
|
|
2675
|
+
function i() {
|
|
2676
|
+
navigator.clipboard.writeText(s), e({
|
|
2677
|
+
message: "Link copied to clipboard",
|
|
2678
|
+
status: "success"
|
|
2679
|
+
});
|
|
2638
2680
|
}
|
|
2639
2681
|
return /* @__PURE__ */ t.jsxs(
|
|
2640
2682
|
"div",
|
|
2641
2683
|
{
|
|
2642
|
-
className:
|
|
2643
|
-
onClick: (
|
|
2684
|
+
className: nt.modal,
|
|
2685
|
+
onClick: (c) => c.stopPropagation(),
|
|
2644
2686
|
children: [
|
|
2645
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2646
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2687
|
+
/* @__PURE__ */ t.jsxs("div", { className: nt.header, children: [
|
|
2688
|
+
/* @__PURE__ */ t.jsx("div", { className: nt.title, children: "Share this Post" }),
|
|
2647
2689
|
/* @__PURE__ */ t.jsx(
|
|
2648
|
-
|
|
2690
|
+
b,
|
|
2649
2691
|
{
|
|
2650
2692
|
name: "X",
|
|
2651
2693
|
fill: "#757575",
|
|
2652
|
-
onClick: () => u(!1)
|
|
2694
|
+
onClick: () => u(!1),
|
|
2695
|
+
hoverable: !0
|
|
2653
2696
|
}
|
|
2654
2697
|
)
|
|
2655
2698
|
] }),
|
|
2656
|
-
/* @__PURE__ */ t.
|
|
2657
|
-
/* @__PURE__ */ t.jsxs("div", { className: Q.copyWrapper, children: [
|
|
2699
|
+
/* @__PURE__ */ t.jsxs("div", { className: nt.copyWrapper, children: [
|
|
2658
2700
|
/* @__PURE__ */ t.jsx(
|
|
2659
2701
|
"div",
|
|
2660
2702
|
{
|
|
2661
|
-
className:
|
|
2662
|
-
onClick:
|
|
2663
|
-
children:
|
|
2703
|
+
className: F(nt.copy, nt.copyText),
|
|
2704
|
+
onClick: i,
|
|
2705
|
+
children: s
|
|
2664
2706
|
}
|
|
2665
2707
|
),
|
|
2666
2708
|
/* @__PURE__ */ t.jsx(
|
|
2667
2709
|
"div",
|
|
2668
2710
|
{
|
|
2669
|
-
onClick:
|
|
2670
|
-
className:
|
|
2671
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2711
|
+
onClick: i,
|
|
2712
|
+
className: nt.copy,
|
|
2713
|
+
children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
2672
2714
|
}
|
|
2673
2715
|
)
|
|
2674
2716
|
] })
|
|
2675
2717
|
]
|
|
2676
2718
|
}
|
|
2677
2719
|
);
|
|
2678
|
-
},
|
|
2679
|
-
accordion:
|
|
2680
|
-
header:
|
|
2681
|
-
icon:
|
|
2682
|
-
open:
|
|
2683
|
-
content:
|
|
2684
|
-
},
|
|
2685
|
-
const [e,
|
|
2686
|
-
|
|
2720
|
+
}, $a = "_accordion_1s1lq_1", wa = "_header_1s1lq_9", Na = "_icon_1s1lq_18", Ia = "_open_1s1lq_21", Ca = "_content_1s1lq_25", mt = {
|
|
2721
|
+
accordion: $a,
|
|
2722
|
+
header: wa,
|
|
2723
|
+
icon: Na,
|
|
2724
|
+
open: Ia,
|
|
2725
|
+
content: Ca
|
|
2726
|
+
}, Ka = ({ title: u, content: a }) => {
|
|
2727
|
+
const [e, s] = p.useState(!1), [i, c] = p.useState(0), l = p.useRef(null), o = () => {
|
|
2728
|
+
s(!e);
|
|
2687
2729
|
};
|
|
2688
|
-
return
|
|
2689
|
-
|
|
2690
|
-
}, [e]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
2730
|
+
return p.useEffect(() => {
|
|
2731
|
+
l.current && c(e ? l.current.scrollHeight : 0);
|
|
2732
|
+
}, [e]), /* @__PURE__ */ t.jsxs("div", { className: mt.accordion, children: [
|
|
2691
2733
|
/* @__PURE__ */ t.jsxs(
|
|
2692
2734
|
"div",
|
|
2693
2735
|
{
|
|
2694
|
-
className:
|
|
2695
|
-
onClick:
|
|
2736
|
+
className: mt.header,
|
|
2737
|
+
onClick: o,
|
|
2696
2738
|
children: [
|
|
2697
2739
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
|
|
2698
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2740
|
+
/* @__PURE__ */ t.jsx("div", { className: F(mt.icon, { [mt.open]: e }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
2699
2741
|
]
|
|
2700
2742
|
}
|
|
2701
2743
|
),
|
|
2702
2744
|
/* @__PURE__ */ t.jsx(
|
|
2703
2745
|
"div",
|
|
2704
2746
|
{
|
|
2705
|
-
ref:
|
|
2706
|
-
className:
|
|
2747
|
+
ref: l,
|
|
2748
|
+
className: mt.content,
|
|
2707
2749
|
style: { height: `${i}px` },
|
|
2708
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
2750
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
|
|
2709
2751
|
}
|
|
2710
2752
|
)
|
|
2711
2753
|
] });
|
|
2712
|
-
},
|
|
2713
|
-
wrapper:
|
|
2714
|
-
label:
|
|
2715
|
-
input:
|
|
2716
|
-
required:
|
|
2717
|
-
paddingless:
|
|
2718
|
-
content:
|
|
2719
|
-
borderless:
|
|
2720
|
-
rightIcon:
|
|
2721
|
-
},
|
|
2754
|
+
}, Ba = "_wrapper_1r14x_1", Sa = "_label_1r14x_9", Pa = "_input_1r14x_18", Ta = "_required_1r14x_35", Aa = "_paddingless_1r14x_39", Oa = "_content_1r14x_43", qa = "_borderless_1r14x_58", Da = "_rightIcon_1r14x_63", st = {
|
|
2755
|
+
wrapper: Ba,
|
|
2756
|
+
label: Sa,
|
|
2757
|
+
input: Pa,
|
|
2758
|
+
required: Ta,
|
|
2759
|
+
paddingless: Aa,
|
|
2760
|
+
content: Oa,
|
|
2761
|
+
borderless: qa,
|
|
2762
|
+
rightIcon: Da
|
|
2763
|
+
}, Za = (u) => {
|
|
2722
2764
|
const {
|
|
2723
|
-
onChange:
|
|
2765
|
+
onChange: a,
|
|
2724
2766
|
style: e,
|
|
2725
|
-
label:
|
|
2767
|
+
label: s,
|
|
2726
2768
|
value: i,
|
|
2727
|
-
type:
|
|
2728
|
-
min:
|
|
2729
|
-
max:
|
|
2730
|
-
placeholder:
|
|
2731
|
-
disabled:
|
|
2732
|
-
required:
|
|
2733
|
-
regex:
|
|
2734
|
-
paddingless:
|
|
2735
|
-
borderless:
|
|
2769
|
+
type: c,
|
|
2770
|
+
min: l,
|
|
2771
|
+
max: o,
|
|
2772
|
+
placeholder: n,
|
|
2773
|
+
disabled: r = !1,
|
|
2774
|
+
required: m = !1,
|
|
2775
|
+
regex: d,
|
|
2776
|
+
paddingless: T = !1,
|
|
2777
|
+
borderless: x = !1,
|
|
2736
2778
|
editable: g = !1,
|
|
2737
|
-
isSearch:
|
|
2738
|
-
} = u, { themeSettings: O } =
|
|
2739
|
-
function C(
|
|
2740
|
-
if (
|
|
2741
|
-
let
|
|
2742
|
-
return
|
|
2779
|
+
isSearch: h = !1
|
|
2780
|
+
} = u, { themeSettings: O } = Bt(), { inputs: q } = O, [v, E] = p.useState(!1);
|
|
2781
|
+
function C(y, M) {
|
|
2782
|
+
if (y.startsWith("#")) {
|
|
2783
|
+
let N, L, R;
|
|
2784
|
+
return y.length === 7 ? (N = parseInt(y.slice(1, 3), 16), L = parseInt(y.slice(3, 5), 16), R = parseInt(y.slice(5, 7), 16)) : y.length === 4 && (N = parseInt(y[1] + y[1], 16), L = parseInt(y[2] + y[2], 16), R = parseInt(y[3] + y[3], 16)), `rgba(${N}, ${L}, ${R}, ${M})`;
|
|
2743
2785
|
}
|
|
2744
|
-
const
|
|
2786
|
+
const k = {
|
|
2745
2787
|
black: "#000000",
|
|
2746
2788
|
white: "#ffffff",
|
|
2747
2789
|
red: "#ff0000",
|
|
2748
2790
|
green: "#00ff00",
|
|
2749
2791
|
blue: "#0000ff"
|
|
2750
2792
|
// Можно добавить больше цветов
|
|
2751
|
-
}[
|
|
2752
|
-
return
|
|
2793
|
+
}[y.toLowerCase()];
|
|
2794
|
+
return k ? C(k, M) : y;
|
|
2753
2795
|
}
|
|
2754
|
-
function
|
|
2755
|
-
return Number(
|
|
2796
|
+
function B(y) {
|
|
2797
|
+
return Number(y) < 0 ? String(l) : y;
|
|
2756
2798
|
}
|
|
2757
|
-
function
|
|
2758
|
-
return !
|
|
2799
|
+
function f(y) {
|
|
2800
|
+
return !m || !d ? !0 : new RegExp(d).test(y);
|
|
2759
2801
|
}
|
|
2760
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2761
|
-
|
|
2802
|
+
return /* @__PURE__ */ t.jsxs("div", { className: st.wrapper, children: [
|
|
2803
|
+
s && /* @__PURE__ */ t.jsx(
|
|
2762
2804
|
"label",
|
|
2763
2805
|
{
|
|
2764
|
-
className:
|
|
2765
|
-
htmlFor:
|
|
2766
|
-
children:
|
|
2806
|
+
className: st.label,
|
|
2807
|
+
htmlFor: s,
|
|
2808
|
+
children: s
|
|
2767
2809
|
}
|
|
2768
2810
|
),
|
|
2769
2811
|
/* @__PURE__ */ t.jsxs(
|
|
2770
2812
|
"div",
|
|
2771
2813
|
{
|
|
2772
|
-
className:
|
|
2814
|
+
className: st.content,
|
|
2773
2815
|
style: {
|
|
2774
|
-
paddingRight:
|
|
2816
|
+
paddingRight: q.general.height + 15,
|
|
2775
2817
|
...e,
|
|
2776
|
-
backgroundColor: C(
|
|
2818
|
+
backgroundColor: C(q.field.color, q.field.opacity / 100)
|
|
2777
2819
|
},
|
|
2778
2820
|
children: [
|
|
2779
2821
|
/* @__PURE__ */ t.jsx(
|
|
2780
2822
|
"input",
|
|
2781
2823
|
{
|
|
2782
|
-
id:
|
|
2783
|
-
type:
|
|
2784
|
-
onChange: (
|
|
2785
|
-
if (
|
|
2824
|
+
id: s,
|
|
2825
|
+
type: c || "text",
|
|
2826
|
+
onChange: (y) => {
|
|
2827
|
+
if (c === "text") a(y.target.value);
|
|
2786
2828
|
else {
|
|
2787
|
-
const M =
|
|
2788
|
-
|
|
2829
|
+
const M = B(y.target.value);
|
|
2830
|
+
a(M);
|
|
2789
2831
|
}
|
|
2790
2832
|
},
|
|
2791
2833
|
value: i,
|
|
2792
2834
|
autoComplete: "off",
|
|
2793
|
-
placeholder:
|
|
2794
|
-
className:
|
|
2795
|
-
[
|
|
2796
|
-
[
|
|
2797
|
-
[
|
|
2835
|
+
placeholder: n || "Type something...",
|
|
2836
|
+
className: F(st.input, {
|
|
2837
|
+
[st.required]: v && m && !f(i),
|
|
2838
|
+
[st.paddingless]: T,
|
|
2839
|
+
[st.borderless]: x
|
|
2798
2840
|
}),
|
|
2799
|
-
min:
|
|
2800
|
-
max:
|
|
2801
|
-
disabled:
|
|
2802
|
-
onFocus: () =>
|
|
2841
|
+
min: c === "number" ? l : void 0,
|
|
2842
|
+
max: c === "number" ? o : void 0,
|
|
2843
|
+
disabled: r,
|
|
2844
|
+
onFocus: () => E(!0)
|
|
2803
2845
|
}
|
|
2804
2846
|
),
|
|
2805
|
-
|
|
2806
|
-
|
|
2847
|
+
h && /* @__PURE__ */ t.jsx("div", { className: st.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2848
|
+
b,
|
|
2807
2849
|
{
|
|
2808
2850
|
name: "MagnifyingGlass",
|
|
2809
2851
|
fill: "var(--icon-secondary)",
|
|
2810
|
-
width:
|
|
2811
|
-
height:
|
|
2852
|
+
width: q.general.height,
|
|
2853
|
+
height: q.general.height
|
|
2812
2854
|
}
|
|
2813
2855
|
) }),
|
|
2814
2856
|
g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2815
|
-
|
|
2857
|
+
b,
|
|
2816
2858
|
{
|
|
2817
2859
|
name: "Sliders",
|
|
2818
2860
|
width: 20,
|
|
@@ -2824,18 +2866,18 @@ const Ho = (u) => {
|
|
|
2824
2866
|
}
|
|
2825
2867
|
)
|
|
2826
2868
|
] });
|
|
2827
|
-
},
|
|
2828
|
-
wrapper:
|
|
2829
|
-
label:
|
|
2830
|
-
textarea:
|
|
2831
|
-
length:
|
|
2832
|
-
},
|
|
2833
|
-
const { onChange:
|
|
2834
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2869
|
+
}, Ea = "_wrapper_st58d_1", La = "_label_st58d_10", Ra = "_textarea_st58d_18", Ma = "_length_st58d_33", gt = {
|
|
2870
|
+
wrapper: Ea,
|
|
2871
|
+
label: La,
|
|
2872
|
+
textarea: Ra,
|
|
2873
|
+
length: Ma
|
|
2874
|
+
}, to = (u) => {
|
|
2875
|
+
const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = u, [l, o] = p.useState(s.length);
|
|
2876
|
+
return /* @__PURE__ */ t.jsxs("div", { className: gt.wrapper, children: [
|
|
2835
2877
|
e && /* @__PURE__ */ t.jsx(
|
|
2836
2878
|
"label",
|
|
2837
2879
|
{
|
|
2838
|
-
className:
|
|
2880
|
+
className: gt.label,
|
|
2839
2881
|
htmlFor: e,
|
|
2840
2882
|
children: e
|
|
2841
2883
|
}
|
|
@@ -2844,51 +2886,51 @@ const Ho = (u) => {
|
|
|
2844
2886
|
"textarea",
|
|
2845
2887
|
{
|
|
2846
2888
|
id: e,
|
|
2847
|
-
defaultValue:
|
|
2848
|
-
onChange: (
|
|
2849
|
-
|
|
2889
|
+
defaultValue: s,
|
|
2890
|
+
onChange: (n) => {
|
|
2891
|
+
o(n.target.value.length), a(n.target.value);
|
|
2850
2892
|
},
|
|
2851
|
-
placeholder:
|
|
2852
|
-
className:
|
|
2893
|
+
placeholder: c,
|
|
2894
|
+
className: gt.textarea,
|
|
2853
2895
|
maxLength: i
|
|
2854
2896
|
}
|
|
2855
2897
|
),
|
|
2856
|
-
i && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2857
|
-
|
|
2898
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: gt.length, children: [
|
|
2899
|
+
l,
|
|
2858
2900
|
"/",
|
|
2859
2901
|
i
|
|
2860
2902
|
] })
|
|
2861
2903
|
] });
|
|
2862
2904
|
};
|
|
2863
2905
|
export {
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2906
|
+
Ka as Accordion,
|
|
2907
|
+
jt as Button,
|
|
2908
|
+
gn as ButtonTypeSettings,
|
|
2909
|
+
Ga as ButtonsSettings,
|
|
2910
|
+
Ua as CategorySettings,
|
|
2869
2911
|
ht as ChooseImage,
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2912
|
+
no as ChooseImageModal,
|
|
2913
|
+
ma as EmptyCart,
|
|
2914
|
+
Ya as FormSettings,
|
|
2915
|
+
Ja as HeaderButtons,
|
|
2916
|
+
b as Icon,
|
|
2875
2917
|
W as InputSettings,
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2918
|
+
Za as InputUI,
|
|
2919
|
+
Ae as ItemsSettings,
|
|
2920
|
+
Fa as LayoutSettings,
|
|
2921
|
+
Wa as ListingSelector,
|
|
2922
|
+
io as Loader,
|
|
2923
|
+
St as Modal,
|
|
2924
|
+
Xa as ProductOptions,
|
|
2925
|
+
It as RangeSelector,
|
|
2926
|
+
Z as Select,
|
|
2927
|
+
Qa as ShareLink,
|
|
2928
|
+
da as ShoppingButton,
|
|
2929
|
+
ua as ShoppingModalCart,
|
|
2888
2930
|
K as Switch,
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2931
|
+
At as TextSettings,
|
|
2932
|
+
Ct as TextareaSettings,
|
|
2933
|
+
to as TextareaUI,
|
|
2892
2934
|
Tt as TypesText,
|
|
2893
|
-
|
|
2935
|
+
_a as UserInfo
|
|
2894
2936
|
};
|