@billgangcom/theme-lib 1.44.1 → 1.44.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +2 -1
- package/dist/builder/components/Preview/Render/index.d.ts +16 -2
- package/dist/builder/components/Sidebar/Layers/AnnouncementLayer/index.d.ts +1 -0
- package/dist/builder/components/Sidebar/Layers/index.d.ts +1 -0
- package/dist/builder/constants/block-icons.d.ts +1 -0
- package/dist/builder/constants/blocks.d.ts +24 -0
- package/dist/builder/index.d.ts +1 -0
- package/dist/builder/store/useLayersStore.d.ts +2 -0
- package/dist/builder/ui/Select/index.d.ts +4 -0
- package/dist/builder/utils/index.d.ts +1 -0
- package/dist/builder/utils/splitTextIntoSpans.d.ts +1 -0
- package/dist/builder.cjs.js +49 -49
- package/dist/builder.es.js +1991 -1927
- package/dist/{index-BkqkB6IP.cjs → index-DFHUslAr.cjs} +31 -31
- package/dist/{index-Dg3e7rFo.js → index-FNbiNtjB.js} +5749 -5690
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -4
- package/dist/pages/builder/index.d.ts +1 -0
- package/dist/ui/ButtonTypeSettings/index.d.ts +1 -0
- package/dist/ui/ButtonsSettings/index.d.ts +4 -1
- package/dist/ui/FormSettings/index.d.ts +7 -3
- package/dist/ui/FormSettings/popup.d.ts +1 -0
- package/dist/ui/ItemsSettings/index.d.ts +7 -4
- package/dist/ui/ItemsSettings/popup.d.ts +4 -0
- package/dist/ui/PagesSettings/index.d.ts +26 -0
- package/dist/ui/ProductCardButtons/index.d.ts +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1835 -1519
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import { q as
|
|
1
|
+
import { j as t, I as b, c as Y, a as tt, S as st, T as Et, b as et, C as bt, u as yt, d as kt, D as $t, e as It, v as Nt, B as ot, f as ht, P as wt, g as Ct, h as St, i as Vt, s as Yt, k as Dt, l as Bt, m as Ot, M as Mt, n as Ut, o as Ht, p as Gt } from "./index-FNbiNtjB.js";
|
|
2
|
+
import { q as uc, L as _c } from "./index-FNbiNtjB.js";
|
|
3
3
|
import f 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
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
5
|
+
const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1ibay_15", Qt = "_subtitle_1ibay_22", Kt = "_alignmentContent_1ibay_29", Zt = "_alignments_1ibay_37", te = "_alignment_1ibay_8", ee = "_circle_1ibay_60", se = "_paddings_1ibay_67", ne = "_padding_1ibay_67", ie = "_active_1ibay_91", oe = "_input_1ibay_98", K = {
|
|
6
|
+
wrapper: Xt,
|
|
7
|
+
alignmentBlock: Wt,
|
|
8
|
+
title: Jt,
|
|
9
|
+
subtitle: Qt,
|
|
10
|
+
alignmentContent: Kt,
|
|
11
|
+
alignments: Zt,
|
|
12
|
+
alignment: te,
|
|
13
|
+
circle: ee,
|
|
14
|
+
paddings: se,
|
|
15
|
+
padding: ne,
|
|
16
|
+
active: ie,
|
|
17
|
+
input: oe
|
|
18
|
+
}, ae = [
|
|
19
19
|
"topLeft",
|
|
20
20
|
"top",
|
|
21
21
|
"topRight",
|
|
@@ -25,10 +25,10 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
],
|
|
29
|
-
const { alignment:
|
|
30
|
-
function
|
|
31
|
-
switch (
|
|
28
|
+
], ce = ["left", "top", "right", "bottom"], Wa = (u) => {
|
|
29
|
+
const { alignment: a, padding: e, setPadding: s, setAlignment: i } = u;
|
|
30
|
+
function c(p) {
|
|
31
|
+
switch (p) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function l(
|
|
49
|
-
switch (
|
|
48
|
+
function l(p) {
|
|
49
|
+
switch (p) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -57,40 +57,40 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [
|
|
61
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
62
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
63
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
64
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
65
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
60
|
+
const [o, n] = f.useState(null), [d, j] = f.useState(null);
|
|
61
|
+
return /* @__PURE__ */ t.jsxs("div", { className: K.layout, children: [
|
|
62
|
+
/* @__PURE__ */ t.jsx("h3", { className: K.title, children: "Layout" }),
|
|
63
|
+
/* @__PURE__ */ t.jsxs("div", { className: K.alignmentBlock, children: [
|
|
64
|
+
/* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Alignment" }),
|
|
65
|
+
/* @__PURE__ */ t.jsxs("div", { className: K.alignmentContent, children: [
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: K.alignments, children: ae.map((p) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
i(
|
|
70
|
+
i(p);
|
|
71
71
|
},
|
|
72
|
-
className:
|
|
72
|
+
className: K.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
n(
|
|
74
|
+
n(p);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
77
|
n(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
p !== a && o !== p && /* @__PURE__ */ t.jsx("div", { className: K.circle }),
|
|
81
|
+
p !== a && o === p && /* @__PURE__ */ t.jsx(
|
|
82
|
+
b,
|
|
83
83
|
{
|
|
84
|
-
name:
|
|
84
|
+
name: c(o),
|
|
85
85
|
fill: "#c2c2c2",
|
|
86
86
|
width: 22,
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
p === a && /* @__PURE__ */ t.jsx(
|
|
91
|
+
b,
|
|
92
92
|
{
|
|
93
|
-
name: a
|
|
93
|
+
name: c(a),
|
|
94
94
|
fill: "#FF3F19",
|
|
95
95
|
width: 22,
|
|
96
96
|
height: 22
|
|
@@ -98,37 +98,37 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
p
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: K.paddings, children: ce.map((p) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
107
|
-
[
|
|
106
|
+
className: Y(K.padding, {
|
|
107
|
+
[K.active]: d === p
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
|
|
110
|
+
j(p);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
|
-
|
|
113
|
+
j(null);
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
|
-
|
|
117
|
+
b,
|
|
118
118
|
{
|
|
119
|
-
name: l(
|
|
119
|
+
name: l(p),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
123
123
|
) }),
|
|
124
124
|
/* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
tt,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
129
|
-
onChange: (
|
|
128
|
+
value: String(e[p]),
|
|
129
|
+
onChange: (r) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[p]: Number(r)
|
|
132
132
|
}),
|
|
133
133
|
paddingless: !0,
|
|
134
134
|
borderless: !0
|
|
@@ -136,24 +136,24 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
136
136
|
)
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
p
|
|
140
140
|
)) })
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
143
143
|
] });
|
|
144
|
-
},
|
|
145
|
-
title:
|
|
146
|
-
subtitle:
|
|
147
|
-
header:
|
|
148
|
-
text:
|
|
149
|
-
top:
|
|
150
|
-
itemsBlock:
|
|
151
|
-
},
|
|
152
|
-
typeTexts:
|
|
153
|
-
block:
|
|
154
|
-
active:
|
|
155
|
-
},
|
|
156
|
-
const { typesText:
|
|
144
|
+
}, le = "_title_1jkiw_1", re = "_subtitle_1jkiw_5", de = "_header_1jkiw_12", ue = "_text_1jkiw_13", _e = "_top_1jkiw_20", me = "_itemsBlock_1jkiw_29", pt = {
|
|
145
|
+
title: le,
|
|
146
|
+
subtitle: re,
|
|
147
|
+
header: de,
|
|
148
|
+
text: ue,
|
|
149
|
+
top: _e,
|
|
150
|
+
itemsBlock: me
|
|
151
|
+
}, he = "_typeTexts_167ez_1", pe = "_block_167ez_8", fe = "_active_167ez_25", Pt = {
|
|
152
|
+
typeTexts: he,
|
|
153
|
+
block: pe,
|
|
154
|
+
active: fe
|
|
155
|
+
}, ge = ["bold", "italic", "underline", "strike-through", "code"], Rt = (u) => {
|
|
156
|
+
const { typesText: a, setTypesText: e } = u;
|
|
157
157
|
function s(i) {
|
|
158
158
|
switch (i) {
|
|
159
159
|
case "bold":
|
|
@@ -168,25 +168,25 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
168
168
|
return "TextUnderline";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: Pt.typeTexts, children: ge.map((i) => /* @__PURE__ */ t.jsx(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
175
|
-
[
|
|
174
|
+
className: Y(Pt.block, {
|
|
175
|
+
[Pt.active]: a.includes(i)
|
|
176
176
|
}),
|
|
177
177
|
onClick: () => {
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
180
|
-
const l =
|
|
178
|
+
const c = [...a];
|
|
179
|
+
if (c.includes(i)) {
|
|
180
|
+
const l = c.filter((o) => o !== i);
|
|
181
181
|
e(l);
|
|
182
182
|
} else
|
|
183
|
-
|
|
183
|
+
c.push(i), e(c);
|
|
184
184
|
},
|
|
185
185
|
children: /* @__PURE__ */ t.jsx(
|
|
186
|
-
|
|
186
|
+
b,
|
|
187
187
|
{
|
|
188
188
|
name: s(i),
|
|
189
|
-
fill:
|
|
189
|
+
fill: a.includes(i) ? "#252525" : "#757575",
|
|
190
190
|
width: 20,
|
|
191
191
|
height: 20
|
|
192
192
|
}
|
|
@@ -194,7 +194,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
194
194
|
},
|
|
195
195
|
String(i)
|
|
196
196
|
)) });
|
|
197
|
-
},
|
|
197
|
+
}, ft = {
|
|
198
198
|
h1: "Heading 1",
|
|
199
199
|
h2: "Heading 2",
|
|
200
200
|
h3: "Heading 3",
|
|
@@ -202,44 +202,44 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
202
202
|
h5: "Heading 5",
|
|
203
203
|
h6: "Heading 6",
|
|
204
204
|
p: "Paragraph"
|
|
205
|
-
},
|
|
205
|
+
}, Lt = (u) => {
|
|
206
206
|
const {
|
|
207
|
-
typesText:
|
|
207
|
+
typesText: a,
|
|
208
208
|
isActiveText: e,
|
|
209
209
|
setIsActiveText: s,
|
|
210
210
|
text: i,
|
|
211
|
-
setText:
|
|
211
|
+
setText: c,
|
|
212
212
|
setTypesText: l,
|
|
213
|
-
title:
|
|
213
|
+
title: o,
|
|
214
214
|
subtitle: n = "Items",
|
|
215
|
-
typeFont:
|
|
216
|
-
setTypeFont:
|
|
217
|
-
} =
|
|
218
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
219
|
-
(
|
|
220
|
-
|
|
215
|
+
typeFont: d,
|
|
216
|
+
setTypeFont: j
|
|
217
|
+
} = u;
|
|
218
|
+
return /* @__PURE__ */ t.jsxs("div", { className: pt.text, children: [
|
|
219
|
+
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: pt.top, children: [
|
|
220
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: pt.title, children: o }),
|
|
221
221
|
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
222
222
|
st,
|
|
223
223
|
{
|
|
224
224
|
current: e,
|
|
225
|
-
onChange: (
|
|
225
|
+
onChange: (p) => s(p)
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
229
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
230
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
229
|
+
/* @__PURE__ */ t.jsxs("div", { className: pt.itemsBlock, children: [
|
|
230
|
+
/* @__PURE__ */ t.jsx("h5", { className: pt.subtitle, children: n }),
|
|
231
231
|
/* @__PURE__ */ t.jsx(
|
|
232
|
-
|
|
232
|
+
Et,
|
|
233
233
|
{
|
|
234
|
-
onChange: (
|
|
234
|
+
onChange: (p) => c(p),
|
|
235
235
|
value: i,
|
|
236
236
|
maxLength: 150
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
239
|
/* @__PURE__ */ t.jsx(
|
|
240
|
-
|
|
240
|
+
Rt,
|
|
241
241
|
{
|
|
242
|
-
typesText:
|
|
242
|
+
typesText: a,
|
|
243
243
|
setTypesText: l
|
|
244
244
|
}
|
|
245
245
|
),
|
|
@@ -247,55 +247,55 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
247
247
|
et,
|
|
248
248
|
{
|
|
249
249
|
label: "Type Text",
|
|
250
|
-
options: Object.values(
|
|
251
|
-
(
|
|
250
|
+
options: Object.values(ft).filter(
|
|
251
|
+
(p) => p !== ft[d]
|
|
252
252
|
),
|
|
253
|
-
onChange: (
|
|
254
|
-
Object.keys(
|
|
255
|
-
(
|
|
253
|
+
onChange: (p) => j(
|
|
254
|
+
Object.keys(ft).find(
|
|
255
|
+
(r) => ft[r] === p
|
|
256
256
|
)
|
|
257
257
|
),
|
|
258
|
-
value:
|
|
258
|
+
value: ft[d]
|
|
259
259
|
}
|
|
260
260
|
)
|
|
261
261
|
] })
|
|
262
262
|
] });
|
|
263
|
-
}, xe = "
|
|
263
|
+
}, xe = "_title_pef24_1", be = "_subtitle_pef24_5", ve = "_header_pef24_12", je = "_text_pef24_13", ye = "_productsBlock_pef24_14", ke = "_top_pef24_26", $e = "_itemsBlock_pef24_35", Ie = "_typeTexts_pef24_41", Ne = "_block_pef24_48", we = "_active_pef24_61", Ce = "_products_pef24_14", Se = "_product_pef24_14", Be = "_button_pef24_80", Te = "_disabled_pef24_91", Pe = "_image_pef24_95", Ae = "_info_pef24_102", Oe = "_name_pef24_114", Me = "_buttons_pef24_118", qe = "_modal_pef24_125", Ee = "_link_pef24_145", De = "_modalOptions_pef24_151", Ue = "_addButton_pef24_164", He = "_deleteButton_pef24_179", Re = "_closeIcon_pef24_191", z = {
|
|
264
264
|
title: xe,
|
|
265
|
-
subtitle:
|
|
266
|
-
header:
|
|
267
|
-
text:
|
|
268
|
-
productsBlock:
|
|
269
|
-
top:
|
|
270
|
-
itemsBlock:
|
|
271
|
-
typeTexts:
|
|
272
|
-
block:
|
|
273
|
-
active:
|
|
274
|
-
products:
|
|
275
|
-
product:
|
|
276
|
-
button:
|
|
277
|
-
disabled:
|
|
278
|
-
image:
|
|
279
|
-
info:
|
|
280
|
-
name:
|
|
281
|
-
buttons:
|
|
282
|
-
modal:
|
|
283
|
-
link:
|
|
284
|
-
modalOptions:
|
|
285
|
-
addButton:
|
|
286
|
-
deleteButton:
|
|
287
|
-
closeIcon:
|
|
288
|
-
},
|
|
289
|
-
(
|
|
290
|
-
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions:
|
|
291
|
-
function
|
|
292
|
-
return n.length >
|
|
265
|
+
subtitle: be,
|
|
266
|
+
header: ve,
|
|
267
|
+
text: je,
|
|
268
|
+
productsBlock: ye,
|
|
269
|
+
top: ke,
|
|
270
|
+
itemsBlock: $e,
|
|
271
|
+
typeTexts: Ie,
|
|
272
|
+
block: Ne,
|
|
273
|
+
active: we,
|
|
274
|
+
products: Ce,
|
|
275
|
+
product: Se,
|
|
276
|
+
button: Be,
|
|
277
|
+
disabled: Te,
|
|
278
|
+
image: Pe,
|
|
279
|
+
info: Ae,
|
|
280
|
+
name: Oe,
|
|
281
|
+
buttons: Me,
|
|
282
|
+
modal: qe,
|
|
283
|
+
link: Ee,
|
|
284
|
+
modalOptions: De,
|
|
285
|
+
addButton: Ue,
|
|
286
|
+
deleteButton: He,
|
|
287
|
+
closeIcon: Re
|
|
288
|
+
}, Le = f.forwardRef(
|
|
289
|
+
(u, a) => {
|
|
290
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
|
|
291
|
+
function o(n, d) {
|
|
292
|
+
return n.length > d ? `${n.slice(0, d)}...` : n;
|
|
293
293
|
}
|
|
294
294
|
return /* @__PURE__ */ t.jsxs(
|
|
295
295
|
"div",
|
|
296
296
|
{
|
|
297
|
-
ref:
|
|
298
|
-
className:
|
|
297
|
+
ref: a,
|
|
298
|
+
className: z.modal,
|
|
299
299
|
onClick: (n) => {
|
|
300
300
|
n.stopPropagation();
|
|
301
301
|
},
|
|
@@ -304,10 +304,10 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
304
304
|
left: `${i.left}px`
|
|
305
305
|
},
|
|
306
306
|
children: [
|
|
307
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
308
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
309
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
310
|
-
|
|
307
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
308
|
+
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: o(e.name["en-US"], 20) }),
|
|
309
|
+
/* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
310
|
+
b,
|
|
311
311
|
{
|
|
312
312
|
name: "X",
|
|
313
313
|
height: 20,
|
|
@@ -318,64 +318,66 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
318
318
|
}
|
|
319
319
|
) })
|
|
320
320
|
] }),
|
|
321
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
321
|
+
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: c.map((n) => {
|
|
322
322
|
if (n.type === "image")
|
|
323
323
|
return /* @__PURE__ */ t.jsx(
|
|
324
|
-
|
|
324
|
+
bt,
|
|
325
325
|
{
|
|
326
326
|
label: "Put up an attractive image",
|
|
327
327
|
activeImage: e[n.field],
|
|
328
|
-
onChange: (
|
|
329
|
-
const
|
|
328
|
+
onChange: (d) => {
|
|
329
|
+
const j = {
|
|
330
330
|
...e,
|
|
331
|
-
[n.field]:
|
|
331
|
+
[n.field]: d
|
|
332
332
|
};
|
|
333
|
-
s(
|
|
333
|
+
s(j);
|
|
334
334
|
}
|
|
335
335
|
},
|
|
336
336
|
String(n.field)
|
|
337
337
|
);
|
|
338
338
|
if (n.type === "text")
|
|
339
339
|
return /* @__PURE__ */ t.jsx(
|
|
340
|
-
|
|
340
|
+
Lt,
|
|
341
341
|
{
|
|
342
342
|
typesText: e[n.field.type],
|
|
343
|
-
setTypesText: (
|
|
344
|
-
const
|
|
343
|
+
setTypesText: (d) => {
|
|
344
|
+
const j = {
|
|
345
345
|
...e,
|
|
346
|
-
[n.field.type]:
|
|
346
|
+
[n.field.type]: d
|
|
347
347
|
};
|
|
348
|
-
s(
|
|
348
|
+
s(j);
|
|
349
349
|
},
|
|
350
|
-
text: e[n.field.text] || "",
|
|
351
|
-
setText: (
|
|
352
|
-
const
|
|
350
|
+
text: e[n.field.text]["en-US"] || "",
|
|
351
|
+
setText: (d) => {
|
|
352
|
+
const j = {
|
|
353
353
|
...e,
|
|
354
|
-
[n.field.text]:
|
|
354
|
+
[n.field.text]: {
|
|
355
|
+
"en-US": d
|
|
356
|
+
}
|
|
355
357
|
};
|
|
356
|
-
s(
|
|
358
|
+
s(j);
|
|
357
359
|
},
|
|
358
|
-
typeFont: e[n.field.
|
|
359
|
-
setTypeFont: (
|
|
360
|
-
const
|
|
360
|
+
typeFont: e[n.field.typeFont],
|
|
361
|
+
setTypeFont: (d) => {
|
|
362
|
+
const j = {
|
|
361
363
|
...e,
|
|
362
|
-
[n.field.
|
|
364
|
+
[n.field.typeFont]: d
|
|
363
365
|
};
|
|
364
|
-
s(
|
|
366
|
+
s(j);
|
|
365
367
|
},
|
|
366
368
|
subtitle: n.label
|
|
367
369
|
}
|
|
368
370
|
);
|
|
369
371
|
if (n.type === "input")
|
|
370
372
|
return /* @__PURE__ */ t.jsx(
|
|
371
|
-
|
|
373
|
+
tt,
|
|
372
374
|
{
|
|
373
|
-
onChange: (
|
|
374
|
-
const
|
|
375
|
+
onChange: (d) => {
|
|
376
|
+
const j = {
|
|
375
377
|
...e,
|
|
376
|
-
[n.field]:
|
|
378
|
+
[n.field]: d
|
|
377
379
|
};
|
|
378
|
-
s(
|
|
380
|
+
s(j);
|
|
379
381
|
},
|
|
380
382
|
value: e[n.field] || "",
|
|
381
383
|
label: n.label,
|
|
@@ -383,16 +385,16 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
383
385
|
}
|
|
384
386
|
);
|
|
385
387
|
if (n.type === "inputSwitch")
|
|
386
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
388
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
|
|
387
389
|
/* @__PURE__ */ t.jsx(
|
|
388
|
-
|
|
390
|
+
tt,
|
|
389
391
|
{
|
|
390
|
-
onChange: (
|
|
391
|
-
const
|
|
392
|
+
onChange: (d) => {
|
|
393
|
+
const j = {
|
|
392
394
|
...e,
|
|
393
|
-
[n.field.text]:
|
|
395
|
+
[n.field.text]: d
|
|
394
396
|
};
|
|
395
|
-
s(
|
|
397
|
+
s(j);
|
|
396
398
|
},
|
|
397
399
|
value: e[n.field.text] || "",
|
|
398
400
|
label: n.inputLabel,
|
|
@@ -404,35 +406,36 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
404
406
|
{
|
|
405
407
|
current: !!e[n.field.switch] || !1,
|
|
406
408
|
label: n.switchLabel,
|
|
407
|
-
onChange: (
|
|
408
|
-
const
|
|
409
|
+
onChange: (d) => {
|
|
410
|
+
const j = {
|
|
409
411
|
...e,
|
|
410
|
-
[n.field.switch]:
|
|
412
|
+
[n.field.switch]: d
|
|
411
413
|
};
|
|
412
|
-
s(
|
|
414
|
+
s(j);
|
|
413
415
|
}
|
|
414
416
|
}
|
|
415
417
|
)
|
|
416
418
|
] });
|
|
417
419
|
if (n.type === "list")
|
|
418
420
|
return /* @__PURE__ */ t.jsx(
|
|
419
|
-
|
|
421
|
+
Ge,
|
|
420
422
|
{
|
|
421
423
|
items: e[n.field] || [],
|
|
422
|
-
setItems: (
|
|
423
|
-
const
|
|
424
|
+
setItems: (d) => {
|
|
425
|
+
const j = {
|
|
424
426
|
...e,
|
|
425
|
-
[n.field]:
|
|
427
|
+
[n.field]: d
|
|
426
428
|
};
|
|
427
|
-
s(
|
|
429
|
+
s(j);
|
|
428
430
|
},
|
|
429
431
|
itemsType: "select",
|
|
430
432
|
draggable: n.draggable || !1,
|
|
431
433
|
itemsOptions: n.itemsOptions,
|
|
432
434
|
deletable: n.deletable || !1,
|
|
433
|
-
editable: !1,
|
|
435
|
+
editable: n.editable || !1,
|
|
434
436
|
subtitle: n.label,
|
|
435
|
-
addableOptions: n.addableOptions
|
|
437
|
+
addableOptions: n.addableOptions,
|
|
438
|
+
modalOptions: n.modalOptions
|
|
436
439
|
}
|
|
437
440
|
);
|
|
438
441
|
if (n.type === "select")
|
|
@@ -440,16 +443,28 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
440
443
|
et,
|
|
441
444
|
{
|
|
442
445
|
options: n.itemsOptions,
|
|
443
|
-
onChange: (
|
|
444
|
-
const
|
|
446
|
+
onChange: (d) => {
|
|
447
|
+
const j = {
|
|
445
448
|
...e,
|
|
446
|
-
[n.field]:
|
|
449
|
+
[n.field]: d
|
|
447
450
|
};
|
|
448
|
-
s(
|
|
451
|
+
s(j);
|
|
449
452
|
},
|
|
450
453
|
label: n.label,
|
|
451
454
|
value: e[n.field] || "String",
|
|
452
|
-
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
455
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] }),
|
|
456
|
+
switcher: n.switcher ? {
|
|
457
|
+
value: !!e[n.switcher],
|
|
458
|
+
onChange: (d) => {
|
|
459
|
+
if (n.switcher === "isActive") {
|
|
460
|
+
const j = {
|
|
461
|
+
...e,
|
|
462
|
+
[n.switcher]: d
|
|
463
|
+
};
|
|
464
|
+
s(j);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
} : void 0
|
|
453
468
|
}
|
|
454
469
|
);
|
|
455
470
|
}) })
|
|
@@ -457,19 +472,19 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
457
472
|
}
|
|
458
473
|
);
|
|
459
474
|
}
|
|
460
|
-
), ze = "_other_g74jx_1",
|
|
475
|
+
), ze = "_other_g74jx_1", Fe = "_subtitle_g74jx_7", Ve = "_items_g74jx_14", At = {
|
|
461
476
|
other: ze,
|
|
462
|
-
subtitle:
|
|
463
|
-
items:
|
|
464
|
-
},
|
|
465
|
-
const { items:
|
|
466
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
467
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
468
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
477
|
+
subtitle: Fe,
|
|
478
|
+
items: Ve
|
|
479
|
+
}, Tt = (u) => {
|
|
480
|
+
const { items: a, title: e = "Other" } = u;
|
|
481
|
+
return /* @__PURE__ */ t.jsxs("div", { className: At.other, children: [
|
|
482
|
+
/* @__PURE__ */ t.jsx("h5", { className: At.subtitle, children: e }),
|
|
483
|
+
/* @__PURE__ */ t.jsx("div", { className: At.items, children: a.map((s, i) => /* @__PURE__ */ t.jsx(
|
|
469
484
|
st,
|
|
470
485
|
{
|
|
471
486
|
current: s.isItem,
|
|
472
|
-
onChange: (
|
|
487
|
+
onChange: (c) => s.setIsItem(c),
|
|
473
488
|
label: s.label,
|
|
474
489
|
hasBackground: !0,
|
|
475
490
|
paddingless: !1
|
|
@@ -478,18 +493,18 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
478
493
|
)) })
|
|
479
494
|
] });
|
|
480
495
|
};
|
|
481
|
-
function
|
|
496
|
+
function Ye({ product: u, children: a }) {
|
|
482
497
|
const {
|
|
483
498
|
attributes: e,
|
|
484
499
|
listeners: s,
|
|
485
500
|
setNodeRef: i,
|
|
486
|
-
transform:
|
|
501
|
+
transform: c,
|
|
487
502
|
transition: l,
|
|
488
|
-
isDragging:
|
|
489
|
-
} =
|
|
490
|
-
id:
|
|
503
|
+
isDragging: o
|
|
504
|
+
} = Ct({
|
|
505
|
+
id: u.id
|
|
491
506
|
}), n = {
|
|
492
|
-
transform:
|
|
507
|
+
transform: St.Transform.toString(c),
|
|
493
508
|
transition: l
|
|
494
509
|
};
|
|
495
510
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -497,41 +512,41 @@ function Ve({ product: d, children: o }) {
|
|
|
497
512
|
{
|
|
498
513
|
ref: i,
|
|
499
514
|
style: n,
|
|
500
|
-
className: `${
|
|
515
|
+
className: `${z.product} ${o ? z.dragging : ""}`,
|
|
501
516
|
...e,
|
|
502
517
|
...s,
|
|
503
|
-
children:
|
|
518
|
+
children: a
|
|
504
519
|
}
|
|
505
520
|
);
|
|
506
521
|
}
|
|
507
|
-
const
|
|
522
|
+
const Ge = (u) => {
|
|
508
523
|
const {
|
|
509
|
-
isActiveItems:
|
|
524
|
+
isActiveItems: a,
|
|
510
525
|
setIsActiveItems: e,
|
|
511
526
|
items: s,
|
|
512
527
|
setItems: i,
|
|
513
|
-
other:
|
|
528
|
+
other: c,
|
|
514
529
|
title: l,
|
|
515
|
-
subtitle:
|
|
530
|
+
subtitle: o,
|
|
516
531
|
editable: n = !0,
|
|
517
|
-
draggable:
|
|
518
|
-
withImage:
|
|
519
|
-
deletable:
|
|
520
|
-
addable:
|
|
521
|
-
itemsType:
|
|
522
|
-
itemsPlaceholder:
|
|
523
|
-
itemsOptions:
|
|
524
|
-
hasRangeSelector:
|
|
532
|
+
draggable: d = !1,
|
|
533
|
+
withImage: j = !1,
|
|
534
|
+
deletable: p = !0,
|
|
535
|
+
addable: r = !0,
|
|
536
|
+
itemsType: y,
|
|
537
|
+
itemsPlaceholder: h = "",
|
|
538
|
+
itemsOptions: _,
|
|
539
|
+
hasRangeSelector: w = !1,
|
|
525
540
|
rangeSelectorOptions: H,
|
|
526
|
-
modalOptions:
|
|
527
|
-
addableOptions:
|
|
528
|
-
limit:
|
|
529
|
-
|
|
530
|
-
} =
|
|
541
|
+
modalOptions: $,
|
|
542
|
+
addableOptions: g = {},
|
|
543
|
+
limit: B,
|
|
544
|
+
autoInterval: E
|
|
545
|
+
} = u, [F, T] = f.useState(null), [v, A] = f.useState({
|
|
531
546
|
top: 0,
|
|
532
547
|
left: 0
|
|
533
|
-
}), [
|
|
534
|
-
|
|
548
|
+
}), [x, I] = f.useState(null), C = f.useRef(null), [R, O] = f.useState(!1), U = yt(
|
|
549
|
+
kt(wt, {
|
|
535
550
|
activationConstraint: {
|
|
536
551
|
distance: 5
|
|
537
552
|
}
|
|
@@ -539,36 +554,36 @@ const Ue = (d) => {
|
|
|
539
554
|
);
|
|
540
555
|
f.useEffect(() => {
|
|
541
556
|
const m = () => {
|
|
542
|
-
|
|
557
|
+
T(null), O(!1);
|
|
543
558
|
};
|
|
544
|
-
return document.body.addEventListener("click", m),
|
|
545
|
-
|
|
559
|
+
return document.body.addEventListener("click", m), T(null), O(!1), () => {
|
|
560
|
+
T(null), O(!1), document.body.removeEventListener("click", m);
|
|
546
561
|
};
|
|
547
562
|
}, []), f.useEffect(() => {
|
|
548
563
|
if (F) {
|
|
549
|
-
const m = [...s].map((
|
|
564
|
+
const m = [...s].map((N) => N.id === F.id ? F : N);
|
|
550
565
|
i(m);
|
|
551
566
|
}
|
|
552
567
|
}, [F]), f.useEffect(() => {
|
|
553
|
-
if (
|
|
554
|
-
const m =
|
|
555
|
-
let
|
|
556
|
-
|
|
557
|
-
top:
|
|
558
|
-
left:
|
|
568
|
+
if (C.current && x) {
|
|
569
|
+
const m = C.current.getBoundingClientRect().height, N = window.innerHeight;
|
|
570
|
+
let M = x.top;
|
|
571
|
+
M + m > N + window.scrollY - 200 && (M = N + window.scrollY - m - 200), M < 0 && (M = 10), A({
|
|
572
|
+
top: M,
|
|
573
|
+
left: x.left
|
|
559
574
|
});
|
|
560
575
|
}
|
|
561
|
-
}, [
|
|
562
|
-
const
|
|
576
|
+
}, [C.current, x]);
|
|
577
|
+
const nt = (m, N) => {
|
|
563
578
|
m.stopPropagation();
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
top:
|
|
567
|
-
left:
|
|
568
|
-
}),
|
|
579
|
+
const M = m.target.getBoundingClientRect();
|
|
580
|
+
I({
|
|
581
|
+
top: M.top + window.scrollY - 70,
|
|
582
|
+
left: M.left - (r ? 30 : 65)
|
|
583
|
+
}), T(N), O(!0);
|
|
569
584
|
};
|
|
570
|
-
function
|
|
571
|
-
if (
|
|
585
|
+
function dt(m) {
|
|
586
|
+
if (j)
|
|
572
587
|
return m ? /* @__PURE__ */ t.jsx(
|
|
573
588
|
"img",
|
|
574
589
|
{
|
|
@@ -578,7 +593,7 @@ const Ue = (d) => {
|
|
|
578
593
|
height: 16
|
|
579
594
|
}
|
|
580
595
|
) : /* @__PURE__ */ t.jsx(
|
|
581
|
-
|
|
596
|
+
b,
|
|
582
597
|
{
|
|
583
598
|
name: "Image",
|
|
584
599
|
width: 16,
|
|
@@ -587,20 +602,20 @@ const Ue = (d) => {
|
|
|
587
602
|
}
|
|
588
603
|
);
|
|
589
604
|
}
|
|
590
|
-
const
|
|
591
|
-
const { active:
|
|
592
|
-
if (
|
|
593
|
-
const
|
|
594
|
-
if (
|
|
595
|
-
const
|
|
596
|
-
|
|
605
|
+
const k = (m) => {
|
|
606
|
+
const { active: N, over: M } = m;
|
|
607
|
+
if (M && N.id !== M.id) {
|
|
608
|
+
const L = s.findIndex((q) => q.id === N.id), X = s.findIndex((q) => q.id === M.id);
|
|
609
|
+
if (L !== -1 && X !== -1) {
|
|
610
|
+
const q = [...s], [ut] = q.splice(L, 1);
|
|
611
|
+
q.splice(X, 0, ut), i(q);
|
|
597
612
|
}
|
|
598
613
|
}
|
|
599
|
-
},
|
|
600
|
-
var
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
|
|
614
|
+
}, D = (m, N) => {
|
|
615
|
+
var L, X;
|
|
616
|
+
const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
617
|
+
d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
618
|
+
b,
|
|
604
619
|
{
|
|
605
620
|
name: "DotsSixVertical",
|
|
606
621
|
hoverable: !0,
|
|
@@ -608,135 +623,143 @@ const Ue = (d) => {
|
|
|
608
623
|
height: 20
|
|
609
624
|
}
|
|
610
625
|
) }),
|
|
611
|
-
|
|
626
|
+
y === "select" && _ && /* @__PURE__ */ t.jsx(
|
|
612
627
|
et,
|
|
613
628
|
{
|
|
614
|
-
onChange: (
|
|
615
|
-
const
|
|
629
|
+
onChange: (q) => {
|
|
630
|
+
const ut = [...s], mt = _.find((vt) => vt.name["en-US"] === q);
|
|
616
631
|
if (!mt) return;
|
|
617
|
-
const
|
|
632
|
+
const _t = ut.map((vt) => vt.id === m.id ? {
|
|
618
633
|
...mt,
|
|
619
|
-
name:
|
|
620
|
-
|
|
621
|
-
|
|
634
|
+
name: {
|
|
635
|
+
"en-US": q
|
|
636
|
+
}
|
|
637
|
+
} : vt);
|
|
638
|
+
T({
|
|
622
639
|
...m,
|
|
623
|
-
name:
|
|
624
|
-
|
|
640
|
+
name: {
|
|
641
|
+
"en-US": q
|
|
642
|
+
}
|
|
643
|
+
}), i([..._t]);
|
|
625
644
|
},
|
|
626
|
-
value: m.name,
|
|
627
|
-
options:
|
|
628
|
-
leftAddon:
|
|
645
|
+
value: m.name["en-US"],
|
|
646
|
+
options: _.filter((q) => !s.find((ut) => ut.name["en-US"] === q.name["en-US"])).map((q) => q.name["en-US"]),
|
|
647
|
+
leftAddon: dt(m.images)
|
|
629
648
|
}
|
|
630
649
|
),
|
|
631
|
-
|
|
632
|
-
|
|
650
|
+
y === "input" && /* @__PURE__ */ t.jsx(
|
|
651
|
+
tt,
|
|
633
652
|
{
|
|
634
|
-
onChange: (
|
|
635
|
-
const mt = [...s].map((
|
|
653
|
+
onChange: (q) => {
|
|
654
|
+
const mt = [...s].map((_t) => _t.id === m.id ? {
|
|
636
655
|
...m,
|
|
637
|
-
name:
|
|
638
|
-
|
|
656
|
+
name: {
|
|
657
|
+
"en-US": q
|
|
658
|
+
}
|
|
659
|
+
} : _t);
|
|
639
660
|
i([...mt]);
|
|
640
661
|
},
|
|
641
|
-
value: m.name,
|
|
642
|
-
placeholder:
|
|
662
|
+
value: m.name["en-US"],
|
|
663
|
+
placeholder: h
|
|
643
664
|
}
|
|
644
665
|
),
|
|
645
|
-
|
|
646
|
-
|
|
666
|
+
y === "image" && /* @__PURE__ */ t.jsx(
|
|
667
|
+
bt,
|
|
647
668
|
{
|
|
648
|
-
onChange: (
|
|
649
|
-
const mt = [...s].map((
|
|
669
|
+
onChange: (q) => {
|
|
670
|
+
const mt = [...s].map((_t) => _t.id === m.id ? {
|
|
650
671
|
...m,
|
|
651
|
-
images:
|
|
652
|
-
} :
|
|
672
|
+
images: q
|
|
673
|
+
} : _t);
|
|
653
674
|
i([...mt]);
|
|
654
675
|
},
|
|
655
|
-
activeImage: (
|
|
676
|
+
activeImage: (L = s.find((q) => q.id === m.id)) != null && L.images ? (X = s.find((q) => q.id === m.id)) == null ? void 0 : X.images[0] : void 0
|
|
656
677
|
}
|
|
657
678
|
),
|
|
658
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
659
|
-
n && /* @__PURE__ */ t.jsx("div", { className:
|
|
660
|
-
|
|
679
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
680
|
+
n && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
681
|
+
b,
|
|
661
682
|
{
|
|
662
683
|
name: "Sliders",
|
|
663
684
|
hoverable: !0,
|
|
664
685
|
width: 20,
|
|
665
686
|
height: 20,
|
|
666
|
-
onClick: (
|
|
687
|
+
onClick: (q) => {
|
|
688
|
+
console.log(q, m), nt(q, m);
|
|
689
|
+
}
|
|
667
690
|
}
|
|
668
691
|
) }),
|
|
669
|
-
|
|
670
|
-
|
|
692
|
+
p && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
693
|
+
b,
|
|
671
694
|
{
|
|
672
695
|
name: "Trash",
|
|
673
696
|
hoverable: !0,
|
|
674
697
|
width: 20,
|
|
675
698
|
height: 20,
|
|
676
699
|
fill: "#C12A2A",
|
|
677
|
-
onClick: () => i(s.filter((
|
|
700
|
+
onClick: () => i(s.filter((q) => q.id !== m.id))
|
|
678
701
|
}
|
|
679
702
|
) })
|
|
680
703
|
] })
|
|
681
704
|
] });
|
|
682
|
-
return
|
|
683
|
-
|
|
705
|
+
return d ? /* @__PURE__ */ t.jsx(
|
|
706
|
+
Ye,
|
|
684
707
|
{
|
|
685
708
|
product: m,
|
|
686
|
-
index:
|
|
687
|
-
children:
|
|
709
|
+
index: N,
|
|
710
|
+
children: M
|
|
688
711
|
},
|
|
689
712
|
m.id
|
|
690
713
|
) : /* @__PURE__ */ t.jsx(
|
|
691
714
|
"div",
|
|
692
715
|
{
|
|
693
|
-
className:
|
|
694
|
-
children:
|
|
716
|
+
className: z.product,
|
|
717
|
+
children: M
|
|
695
718
|
},
|
|
696
719
|
m.id
|
|
697
720
|
);
|
|
698
721
|
};
|
|
699
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
700
|
-
(l ||
|
|
701
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
702
|
-
|
|
722
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
723
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
724
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: l }),
|
|
725
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
703
726
|
st,
|
|
704
727
|
{
|
|
705
|
-
current:
|
|
728
|
+
current: a,
|
|
706
729
|
onChange: (m) => e == null ? void 0 : e(m)
|
|
707
730
|
}
|
|
708
731
|
)
|
|
709
732
|
] }),
|
|
710
|
-
F && n &&
|
|
711
|
-
|
|
733
|
+
F && n && $ && R && /* @__PURE__ */ t.jsx(
|
|
734
|
+
Le,
|
|
712
735
|
{
|
|
713
|
-
ref:
|
|
736
|
+
ref: C,
|
|
714
737
|
activeItem: F,
|
|
715
|
-
setActiveItem:
|
|
716
|
-
popupPosition:
|
|
717
|
-
modalOptions:
|
|
738
|
+
setActiveItem: T,
|
|
739
|
+
popupPosition: v,
|
|
740
|
+
modalOptions: $,
|
|
718
741
|
setIsOpenModal: O
|
|
719
742
|
}
|
|
720
743
|
),
|
|
721
|
-
|
|
722
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
744
|
+
w && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
|
|
745
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
746
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
|
|
747
|
+
d ? /* @__PURE__ */ t.jsx(
|
|
748
|
+
$t,
|
|
726
749
|
{
|
|
727
|
-
sensors:
|
|
728
|
-
onDragEnd:
|
|
750
|
+
sensors: U,
|
|
751
|
+
onDragEnd: k,
|
|
729
752
|
children: /* @__PURE__ */ t.jsx(
|
|
730
|
-
|
|
753
|
+
It,
|
|
731
754
|
{
|
|
732
755
|
items: s.map((m) => m.id),
|
|
733
|
-
strategy:
|
|
734
|
-
children: s.map((m,
|
|
756
|
+
strategy: Nt,
|
|
757
|
+
children: s.map((m, N) => D(m, N))
|
|
735
758
|
}
|
|
736
759
|
)
|
|
737
760
|
}
|
|
738
|
-
) : s.map((m,
|
|
739
|
-
|
|
761
|
+
) : s.map((m, N) => D(m, N)),
|
|
762
|
+
r && /* @__PURE__ */ t.jsx(
|
|
740
763
|
"div",
|
|
741
764
|
{
|
|
742
765
|
style: {
|
|
@@ -745,45 +768,49 @@ const Ue = (d) => {
|
|
|
745
768
|
justifyContent: "center"
|
|
746
769
|
},
|
|
747
770
|
children: /* @__PURE__ */ t.jsx(
|
|
748
|
-
|
|
771
|
+
ot,
|
|
749
772
|
{
|
|
750
773
|
withoutHover: !0,
|
|
751
|
-
className:
|
|
752
|
-
[
|
|
774
|
+
className: Y(z.button, {
|
|
775
|
+
[z.disabled]: !!(B && B <= s.length || s.length === (_ == null ? void 0 : _.length))
|
|
753
776
|
}),
|
|
754
777
|
size: "s",
|
|
755
|
-
disabled: !!(
|
|
778
|
+
disabled: !!(B && B <= s.length || s.length === (_ == null ? void 0 : _.length)),
|
|
756
779
|
onClick: () => {
|
|
757
780
|
const m = [...s];
|
|
758
|
-
let
|
|
759
|
-
if (
|
|
760
|
-
for (let
|
|
761
|
-
if (!s.find((
|
|
762
|
-
|
|
781
|
+
let N = null;
|
|
782
|
+
if (_) {
|
|
783
|
+
for (let M = 0; M < _.length; M++)
|
|
784
|
+
if (!s.find((L) => L.id === _[M].id)) {
|
|
785
|
+
N = _[M];
|
|
763
786
|
break;
|
|
764
787
|
}
|
|
765
788
|
}
|
|
766
|
-
|
|
767
|
-
name:
|
|
768
|
-
id: (
|
|
769
|
-
...
|
|
770
|
-
}) :
|
|
771
|
-
name:
|
|
772
|
-
|
|
773
|
-
|
|
789
|
+
y === "select" && _ ? m.push({
|
|
790
|
+
name: N ? N.name : _[0].name,
|
|
791
|
+
id: (N == null ? void 0 : N.id) || _[0].id,
|
|
792
|
+
...g
|
|
793
|
+
}) : y === "input" ? m.push({
|
|
794
|
+
name: {
|
|
795
|
+
"en-US": ""
|
|
796
|
+
},
|
|
797
|
+
id: ht(),
|
|
798
|
+
...g
|
|
774
799
|
}) : m.push({
|
|
775
|
-
name:
|
|
776
|
-
|
|
777
|
-
|
|
800
|
+
name: {
|
|
801
|
+
"en-US": `Image ${s.length + 1}`
|
|
802
|
+
},
|
|
803
|
+
id: ht(),
|
|
804
|
+
...g
|
|
778
805
|
}), i(m);
|
|
779
806
|
},
|
|
780
807
|
style: {
|
|
781
808
|
width: "fit-content"
|
|
782
809
|
},
|
|
783
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
810
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
|
|
784
811
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
785
812
|
/* @__PURE__ */ t.jsx(
|
|
786
|
-
|
|
813
|
+
b,
|
|
787
814
|
{
|
|
788
815
|
name: "Plus",
|
|
789
816
|
width: 16,
|
|
@@ -796,14 +823,14 @@ const Ue = (d) => {
|
|
|
796
823
|
}
|
|
797
824
|
)
|
|
798
825
|
] }),
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
826
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
|
|
827
|
+
E !== void 0 && /* @__PURE__ */ t.jsx(
|
|
828
|
+
tt,
|
|
802
829
|
{
|
|
803
|
-
label: "Auto scroll interval",
|
|
830
|
+
label: E.title || "Auto scroll interval",
|
|
804
831
|
type: "number",
|
|
805
|
-
value: String(
|
|
806
|
-
onChange: (m) =>
|
|
832
|
+
value: String(E.autoInterval),
|
|
833
|
+
onChange: (m) => E.setAutoInterval(Number(m)),
|
|
807
834
|
min: 0.1,
|
|
808
835
|
max: 100,
|
|
809
836
|
style: {
|
|
@@ -813,61 +840,61 @@ const Ue = (d) => {
|
|
|
813
840
|
}
|
|
814
841
|
)
|
|
815
842
|
] });
|
|
816
|
-
},
|
|
817
|
-
title:
|
|
818
|
-
subtitle:
|
|
819
|
-
header:
|
|
820
|
-
text:
|
|
821
|
-
productsBlock:
|
|
822
|
-
top:
|
|
823
|
-
itemsBlock:
|
|
824
|
-
typeTexts:
|
|
825
|
-
block:
|
|
826
|
-
active:
|
|
827
|
-
products:
|
|
828
|
-
product:
|
|
829
|
-
button:
|
|
830
|
-
disabled:
|
|
831
|
-
image:
|
|
832
|
-
info:
|
|
833
|
-
name:
|
|
834
|
-
buttons:
|
|
835
|
-
modal:
|
|
836
|
-
link:
|
|
837
|
-
modalOptions:
|
|
838
|
-
addButton:
|
|
839
|
-
deleteButton:
|
|
840
|
-
},
|
|
843
|
+
}, Xe = "_title_82zux_1", We = "_subtitle_82zux_5", Je = "_header_82zux_12", Qe = "_text_82zux_13", Ke = "_productsBlock_82zux_14", Ze = "_top_82zux_26", ts = "_itemsBlock_82zux_35", es = "_typeTexts_82zux_41", ss = "_block_82zux_48", ns = "_active_82zux_61", is = "_products_82zux_14", os = "_product_82zux_14", as = "_button_82zux_80", cs = "_disabled_82zux_91", ls = "_image_82zux_95", rs = "_info_82zux_102", ds = "_name_82zux_114", us = "_buttons_82zux_118", _s = "_modal_82zux_125", ms = "_link_82zux_145", hs = "_modalOptions_82zux_151", ps = "_addButton_82zux_157", fs = "_deleteButton_82zux_179", Z = {
|
|
844
|
+
title: Xe,
|
|
845
|
+
subtitle: We,
|
|
846
|
+
header: Je,
|
|
847
|
+
text: Qe,
|
|
848
|
+
productsBlock: Ke,
|
|
849
|
+
top: Ze,
|
|
850
|
+
itemsBlock: ts,
|
|
851
|
+
typeTexts: es,
|
|
852
|
+
block: ss,
|
|
853
|
+
active: ns,
|
|
854
|
+
products: is,
|
|
855
|
+
product: os,
|
|
856
|
+
button: as,
|
|
857
|
+
disabled: cs,
|
|
858
|
+
image: ls,
|
|
859
|
+
info: rs,
|
|
860
|
+
name: ds,
|
|
861
|
+
buttons: us,
|
|
862
|
+
modal: _s,
|
|
863
|
+
link: ms,
|
|
864
|
+
modalOptions: hs,
|
|
865
|
+
addButton: ps,
|
|
866
|
+
deleteButton: fs
|
|
867
|
+
}, Ja = (u) => {
|
|
841
868
|
const {
|
|
842
|
-
isActiveItems:
|
|
869
|
+
isActiveItems: a,
|
|
843
870
|
setIsActiveItems: e,
|
|
844
871
|
items: s,
|
|
845
872
|
setItems: i,
|
|
846
|
-
other:
|
|
873
|
+
other: c,
|
|
847
874
|
title: l,
|
|
848
|
-
subtitle:
|
|
875
|
+
subtitle: o,
|
|
849
876
|
draggable: n = !1,
|
|
850
|
-
withImage:
|
|
851
|
-
addable:
|
|
852
|
-
itemsOptions:
|
|
853
|
-
hasRangeSelector:
|
|
854
|
-
rangeSelectorOptions:
|
|
855
|
-
limit:
|
|
856
|
-
autoScrollInterval:
|
|
857
|
-
deletable:
|
|
858
|
-
} =
|
|
859
|
-
function H(
|
|
860
|
-
if (
|
|
861
|
-
return
|
|
877
|
+
withImage: d = !1,
|
|
878
|
+
addable: j = !0,
|
|
879
|
+
itemsOptions: p,
|
|
880
|
+
hasRangeSelector: r = !1,
|
|
881
|
+
rangeSelectorOptions: y,
|
|
882
|
+
limit: h,
|
|
883
|
+
autoScrollInterval: _,
|
|
884
|
+
deletable: w
|
|
885
|
+
} = u;
|
|
886
|
+
function H(g) {
|
|
887
|
+
if (d)
|
|
888
|
+
return g ? /* @__PURE__ */ t.jsx(
|
|
862
889
|
"img",
|
|
863
890
|
{
|
|
864
|
-
src: `https://imagedelivery.net/${
|
|
891
|
+
src: `https://imagedelivery.net/${g[0]}/w=1000`,
|
|
865
892
|
alt: "image",
|
|
866
893
|
width: 16,
|
|
867
894
|
height: 16
|
|
868
895
|
}
|
|
869
896
|
) : /* @__PURE__ */ t.jsx(
|
|
870
|
-
|
|
897
|
+
b,
|
|
871
898
|
{
|
|
872
899
|
name: "Image",
|
|
873
900
|
width: 16,
|
|
@@ -876,12 +903,12 @@ const Ue = (d) => {
|
|
|
876
903
|
}
|
|
877
904
|
);
|
|
878
905
|
}
|
|
879
|
-
const
|
|
880
|
-
const
|
|
881
|
-
if (!
|
|
906
|
+
const $ = (g, B = !1) => {
|
|
907
|
+
const E = p.find((T) => T.id === g);
|
|
908
|
+
if (!E) return;
|
|
882
909
|
const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
883
910
|
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
884
|
-
|
|
911
|
+
b,
|
|
885
912
|
{
|
|
886
913
|
name: "DotsSixVertical",
|
|
887
914
|
hoverable: !0,
|
|
@@ -892,54 +919,54 @@ const Ue = (d) => {
|
|
|
892
919
|
/* @__PURE__ */ t.jsx(
|
|
893
920
|
et,
|
|
894
921
|
{
|
|
895
|
-
onChange: (
|
|
896
|
-
const
|
|
897
|
-
if (!
|
|
898
|
-
const
|
|
899
|
-
i([...
|
|
922
|
+
onChange: (T) => {
|
|
923
|
+
const v = [...s], A = p.find((C) => C.name === T);
|
|
924
|
+
if (!A) return;
|
|
925
|
+
const x = A.id, I = v.map((C) => C === g ? x : C);
|
|
926
|
+
i([...I]);
|
|
900
927
|
},
|
|
901
|
-
value:
|
|
902
|
-
options:
|
|
903
|
-
leftAddon: H(
|
|
928
|
+
value: E.name,
|
|
929
|
+
options: p.filter((T) => !s.find((v) => v === T.id)).map((T) => T.name),
|
|
930
|
+
leftAddon: H(E.images)
|
|
904
931
|
}
|
|
905
932
|
),
|
|
906
|
-
|
|
907
|
-
|
|
933
|
+
B && /* @__PURE__ */ t.jsx("div", { className: Z.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
934
|
+
b,
|
|
908
935
|
{
|
|
909
936
|
name: "Trash",
|
|
910
937
|
hoverable: !0,
|
|
911
938
|
width: 20,
|
|
912
939
|
height: 20,
|
|
913
940
|
fill: "#C12A2A",
|
|
914
|
-
onClick: () => i(s.filter((
|
|
941
|
+
onClick: () => i(s.filter((T) => T !== g))
|
|
915
942
|
}
|
|
916
943
|
) }) })
|
|
917
944
|
] });
|
|
918
945
|
return /* @__PURE__ */ t.jsx(
|
|
919
946
|
"div",
|
|
920
947
|
{
|
|
921
|
-
className:
|
|
948
|
+
className: Z.product,
|
|
922
949
|
children: F
|
|
923
950
|
},
|
|
924
|
-
|
|
951
|
+
g
|
|
925
952
|
);
|
|
926
953
|
};
|
|
927
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
928
|
-
(l ||
|
|
929
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
930
|
-
|
|
954
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Z.productsBlock, children: [
|
|
955
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Z.top, children: [
|
|
956
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: Z.title, children: l }),
|
|
957
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
931
958
|
st,
|
|
932
959
|
{
|
|
933
|
-
current:
|
|
934
|
-
onChange: (
|
|
960
|
+
current: a,
|
|
961
|
+
onChange: (g) => e == null ? void 0 : e(g)
|
|
935
962
|
}
|
|
936
963
|
)
|
|
937
964
|
] }),
|
|
938
|
-
|
|
939
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
940
|
-
|
|
941
|
-
s.map((
|
|
942
|
-
|
|
965
|
+
r && y && /* @__PURE__ */ t.jsx(qt, { ...y }),
|
|
966
|
+
/* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
|
|
967
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: o }),
|
|
968
|
+
s.map((g) => $(g, w)),
|
|
969
|
+
j && /* @__PURE__ */ t.jsx(
|
|
943
970
|
"div",
|
|
944
971
|
{
|
|
945
972
|
style: {
|
|
@@ -949,33 +976,33 @@ const Ue = (d) => {
|
|
|
949
976
|
gap: 5
|
|
950
977
|
},
|
|
951
978
|
children: /* @__PURE__ */ t.jsx(
|
|
952
|
-
|
|
979
|
+
ot,
|
|
953
980
|
{
|
|
954
981
|
withoutHover: !0,
|
|
955
|
-
className:
|
|
956
|
-
[
|
|
982
|
+
className: Y(Z.button, {
|
|
983
|
+
[Z.disabled]: !!(h && h <= s.length || s.length === p.length)
|
|
957
984
|
}),
|
|
958
985
|
size: "s",
|
|
959
|
-
disabled: !!(
|
|
986
|
+
disabled: !!(h && h <= s.length || s.length === p.length),
|
|
960
987
|
onClick: () => {
|
|
961
|
-
const
|
|
962
|
-
let
|
|
963
|
-
if (
|
|
964
|
-
for (let
|
|
965
|
-
if (!s.find((F) => F ===
|
|
966
|
-
|
|
988
|
+
const g = [...s];
|
|
989
|
+
let B = null;
|
|
990
|
+
if (p) {
|
|
991
|
+
for (let E = 0; E < p.length; E++)
|
|
992
|
+
if (!s.find((F) => F === p[E].id)) {
|
|
993
|
+
B = p[E];
|
|
967
994
|
break;
|
|
968
995
|
}
|
|
969
996
|
}
|
|
970
|
-
|
|
997
|
+
g.push((B == null ? void 0 : B.id) || p[0].id), i(g);
|
|
971
998
|
},
|
|
972
999
|
style: {
|
|
973
1000
|
width: "fit-content"
|
|
974
1001
|
},
|
|
975
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1002
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
|
|
976
1003
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
977
1004
|
/* @__PURE__ */ t.jsx(
|
|
978
|
-
|
|
1005
|
+
b,
|
|
979
1006
|
{
|
|
980
1007
|
name: "Plus",
|
|
981
1008
|
width: 16,
|
|
@@ -988,14 +1015,14 @@ const Ue = (d) => {
|
|
|
988
1015
|
}
|
|
989
1016
|
)
|
|
990
1017
|
] }),
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1018
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
|
|
1019
|
+
_ !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1020
|
+
tt,
|
|
994
1021
|
{
|
|
995
1022
|
label: "Auto scroll interval",
|
|
996
1023
|
type: "number",
|
|
997
|
-
value: String(
|
|
998
|
-
onChange: (
|
|
1024
|
+
value: String(_.scrollInterval),
|
|
1025
|
+
onChange: (g) => _.setScrollInterval(Number(g)),
|
|
999
1026
|
min: 0.1,
|
|
1000
1027
|
max: 100,
|
|
1001
1028
|
style: {
|
|
@@ -1005,54 +1032,306 @@ const Ue = (d) => {
|
|
|
1005
1032
|
}
|
|
1006
1033
|
)
|
|
1007
1034
|
] });
|
|
1008
|
-
},
|
|
1009
|
-
title:
|
|
1035
|
+
}, gs = "_title_roi3a_1", xs = "_subtitle_roi3a_5", bs = "_header_roi3a_12", vs = "_text_roi3a_13", js = "_productsBlock_roi3a_14", ys = "_top_roi3a_26", ks = "_itemsBlock_roi3a_35", $s = "_typeTexts_roi3a_41", Is = "_block_roi3a_48", Ns = "_active_roi3a_61", ws = "_products_roi3a_14", Cs = "_product_roi3a_14", Ss = "_button_roi3a_80", Bs = "_disabled_roi3a_91", Ts = "_image_roi3a_95", Ps = "_info_roi3a_102", As = "_name_roi3a_114", Os = "_buttons_roi3a_118", Ms = "_modal_roi3a_125", qs = "_link_roi3a_145", Es = "_modalOptions_roi3a_151", Ds = "_addButton_roi3a_164", Us = "_deleteButton_roi3a_179", Hs = "_closeIcon_roi3a_191", J = {
|
|
1036
|
+
title: gs,
|
|
1010
1037
|
subtitle: xs,
|
|
1011
|
-
header:
|
|
1012
|
-
text:
|
|
1013
|
-
productsBlock:
|
|
1014
|
-
top:
|
|
1015
|
-
itemsBlock:
|
|
1016
|
-
typeTexts:
|
|
1017
|
-
block:
|
|
1018
|
-
active:
|
|
1019
|
-
products:
|
|
1020
|
-
product:
|
|
1021
|
-
button:
|
|
1022
|
-
disabled:
|
|
1023
|
-
image:
|
|
1024
|
-
info:
|
|
1025
|
-
name:
|
|
1026
|
-
buttons:
|
|
1027
|
-
modal:
|
|
1028
|
-
link:
|
|
1029
|
-
modalOptions:
|
|
1030
|
-
addButton:
|
|
1031
|
-
deleteButton:
|
|
1032
|
-
closeIcon:
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
+
header: bs,
|
|
1039
|
+
text: vs,
|
|
1040
|
+
productsBlock: js,
|
|
1041
|
+
top: ys,
|
|
1042
|
+
itemsBlock: ks,
|
|
1043
|
+
typeTexts: $s,
|
|
1044
|
+
block: Is,
|
|
1045
|
+
active: Ns,
|
|
1046
|
+
products: ws,
|
|
1047
|
+
product: Cs,
|
|
1048
|
+
button: Ss,
|
|
1049
|
+
disabled: Bs,
|
|
1050
|
+
image: Ts,
|
|
1051
|
+
info: Ps,
|
|
1052
|
+
name: As,
|
|
1053
|
+
buttons: Os,
|
|
1054
|
+
modal: Ms,
|
|
1055
|
+
link: qs,
|
|
1056
|
+
modalOptions: Es,
|
|
1057
|
+
addButton: Ds,
|
|
1058
|
+
deleteButton: Us,
|
|
1059
|
+
closeIcon: Hs
|
|
1060
|
+
};
|
|
1061
|
+
function Rs({ product: u, children: a }) {
|
|
1062
|
+
const {
|
|
1063
|
+
attributes: e,
|
|
1064
|
+
listeners: s,
|
|
1065
|
+
setNodeRef: i,
|
|
1066
|
+
transform: c,
|
|
1067
|
+
transition: l,
|
|
1068
|
+
isDragging: o
|
|
1069
|
+
} = Ct({
|
|
1070
|
+
id: u.id
|
|
1071
|
+
}), n = {
|
|
1072
|
+
transform: St.Transform.toString(c),
|
|
1073
|
+
transition: l
|
|
1074
|
+
};
|
|
1075
|
+
return /* @__PURE__ */ t.jsx(
|
|
1076
|
+
"div",
|
|
1077
|
+
{
|
|
1078
|
+
ref: i,
|
|
1079
|
+
style: n,
|
|
1080
|
+
className: `${J.product} ${o ? J.dragging : ""}`,
|
|
1081
|
+
...e,
|
|
1082
|
+
...s,
|
|
1083
|
+
children: a
|
|
1084
|
+
}
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
const Qa = (u) => {
|
|
1088
|
+
const {
|
|
1089
|
+
isActiveItems: a,
|
|
1090
|
+
setIsActiveItems: e,
|
|
1091
|
+
items: s,
|
|
1092
|
+
setItems: i,
|
|
1093
|
+
title: c,
|
|
1094
|
+
subtitle: l,
|
|
1095
|
+
editable: o = !0,
|
|
1096
|
+
draggable: n = !1,
|
|
1097
|
+
deletable: d = !0,
|
|
1098
|
+
addable: j = !0,
|
|
1099
|
+
itemsType: p,
|
|
1100
|
+
itemsOptions: r,
|
|
1101
|
+
addableOptions: y = {},
|
|
1102
|
+
limit: h
|
|
1103
|
+
} = u, [_, w] = f.useState(null), [H, $] = f.useState(null), g = f.useRef(null), B = yt(
|
|
1104
|
+
kt(wt, {
|
|
1105
|
+
activationConstraint: {
|
|
1106
|
+
distance: 5
|
|
1107
|
+
}
|
|
1108
|
+
})
|
|
1109
|
+
);
|
|
1110
|
+
f.useEffect(() => {
|
|
1111
|
+
if (_) {
|
|
1112
|
+
const v = [...s].map((A) => A.id === _.id ? _ : A);
|
|
1113
|
+
i(v);
|
|
1038
1114
|
}
|
|
1115
|
+
}, [_]), f.useEffect(() => {
|
|
1116
|
+
g.current && H && (g.current.getBoundingClientRect().height, H.top);
|
|
1117
|
+
}, [g.current, H]);
|
|
1118
|
+
const E = (v, A) => {
|
|
1119
|
+
v.stopPropagation();
|
|
1120
|
+
const x = v.target.getBoundingClientRect();
|
|
1121
|
+
$({
|
|
1122
|
+
top: x.top + window.scrollY,
|
|
1123
|
+
left: x.left - 30
|
|
1124
|
+
}), w(A);
|
|
1125
|
+
}, F = (v) => {
|
|
1126
|
+
const { active: A, over: x } = v;
|
|
1127
|
+
if (x && A.id !== x.id) {
|
|
1128
|
+
const I = s.findIndex((R) => R.id === A.id), C = s.findIndex((R) => R.id === x.id);
|
|
1129
|
+
if (I !== -1 && C !== -1) {
|
|
1130
|
+
const R = [...s], [O] = R.splice(I, 1);
|
|
1131
|
+
R.splice(C, 0, O), i(R);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
}, T = (v, A) => {
|
|
1135
|
+
const x = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1136
|
+
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1137
|
+
b,
|
|
1138
|
+
{
|
|
1139
|
+
name: "DotsSixVertical",
|
|
1140
|
+
hoverable: !0,
|
|
1141
|
+
width: 20,
|
|
1142
|
+
height: 20
|
|
1143
|
+
}
|
|
1144
|
+
) }),
|
|
1145
|
+
p === "select" && r && /* @__PURE__ */ t.jsx(
|
|
1146
|
+
et,
|
|
1147
|
+
{
|
|
1148
|
+
onChange: (I) => {
|
|
1149
|
+
const C = [...s], R = r.find((U) => U.name === I);
|
|
1150
|
+
if (!R) return;
|
|
1151
|
+
const O = C.map((U) => U.id === v.id ? {
|
|
1152
|
+
...R,
|
|
1153
|
+
name: {
|
|
1154
|
+
"en-US": I
|
|
1155
|
+
}
|
|
1156
|
+
} : U);
|
|
1157
|
+
w({
|
|
1158
|
+
...v,
|
|
1159
|
+
name: {
|
|
1160
|
+
"en-US": I
|
|
1161
|
+
}
|
|
1162
|
+
}), i([...O]);
|
|
1163
|
+
},
|
|
1164
|
+
value: v.name,
|
|
1165
|
+
options: r.filter((I) => !s.find((C) => C.name === I.name)).map((I) => I.name)
|
|
1166
|
+
}
|
|
1167
|
+
),
|
|
1168
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.buttons, children: [
|
|
1169
|
+
o && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1170
|
+
b,
|
|
1171
|
+
{
|
|
1172
|
+
name: "Sliders",
|
|
1173
|
+
hoverable: !0,
|
|
1174
|
+
width: 20,
|
|
1175
|
+
height: 20,
|
|
1176
|
+
onClick: (I) => E(I, v)
|
|
1177
|
+
}
|
|
1178
|
+
) }),
|
|
1179
|
+
d && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1180
|
+
b,
|
|
1181
|
+
{
|
|
1182
|
+
name: "Trash",
|
|
1183
|
+
hoverable: !0,
|
|
1184
|
+
width: 20,
|
|
1185
|
+
height: 20,
|
|
1186
|
+
fill: "#C12A2A",
|
|
1187
|
+
onClick: () => i(s.filter((I) => I.id !== v.id))
|
|
1188
|
+
}
|
|
1189
|
+
) })
|
|
1190
|
+
] })
|
|
1191
|
+
] });
|
|
1192
|
+
return n ? /* @__PURE__ */ t.jsx(
|
|
1193
|
+
Rs,
|
|
1194
|
+
{
|
|
1195
|
+
product: v,
|
|
1196
|
+
index: A,
|
|
1197
|
+
children: x
|
|
1198
|
+
},
|
|
1199
|
+
v.id
|
|
1200
|
+
) : /* @__PURE__ */ t.jsx(
|
|
1201
|
+
"div",
|
|
1202
|
+
{
|
|
1203
|
+
className: J.product,
|
|
1204
|
+
children: x
|
|
1205
|
+
},
|
|
1206
|
+
v.id
|
|
1207
|
+
);
|
|
1208
|
+
};
|
|
1209
|
+
return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
|
|
1210
|
+
(c || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
|
|
1211
|
+
c && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: c }),
|
|
1212
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1213
|
+
st,
|
|
1214
|
+
{
|
|
1215
|
+
current: a,
|
|
1216
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
1217
|
+
}
|
|
1218
|
+
)
|
|
1219
|
+
] }),
|
|
1220
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
|
|
1221
|
+
l && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: l }),
|
|
1222
|
+
n ? /* @__PURE__ */ t.jsx(
|
|
1223
|
+
$t,
|
|
1224
|
+
{
|
|
1225
|
+
sensors: B,
|
|
1226
|
+
onDragEnd: F,
|
|
1227
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1228
|
+
It,
|
|
1229
|
+
{
|
|
1230
|
+
items: s.map((v) => v.id),
|
|
1231
|
+
strategy: Nt,
|
|
1232
|
+
children: s.map((v, A) => T(v, A))
|
|
1233
|
+
}
|
|
1234
|
+
)
|
|
1235
|
+
}
|
|
1236
|
+
) : s.map((v, A) => T(v, A)),
|
|
1237
|
+
j && /* @__PURE__ */ t.jsx(
|
|
1238
|
+
"div",
|
|
1239
|
+
{
|
|
1240
|
+
style: {
|
|
1241
|
+
width: "100%",
|
|
1242
|
+
display: "flex",
|
|
1243
|
+
justifyContent: "center"
|
|
1244
|
+
},
|
|
1245
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1246
|
+
ot,
|
|
1247
|
+
{
|
|
1248
|
+
withoutHover: !0,
|
|
1249
|
+
className: Y(J.button, {
|
|
1250
|
+
[J.disabled]: !!(h && h <= s.length || s.length === (r == null ? void 0 : r.length))
|
|
1251
|
+
}),
|
|
1252
|
+
size: "s",
|
|
1253
|
+
disabled: !!(h && h <= s.length || s.length === (r == null ? void 0 : r.length)),
|
|
1254
|
+
onClick: () => {
|
|
1255
|
+
const v = [...s];
|
|
1256
|
+
let A = null;
|
|
1257
|
+
if (r) {
|
|
1258
|
+
for (let x = 0; x < r.length; x++)
|
|
1259
|
+
if (!s.find((I) => I.id === r[x].id)) {
|
|
1260
|
+
A = r[x];
|
|
1261
|
+
break;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
p === "select" && r && v.push({
|
|
1265
|
+
name: A ? A.name : r[0].name,
|
|
1266
|
+
id: (A == null ? void 0 : A.id) || r[0].id,
|
|
1267
|
+
...y
|
|
1268
|
+
}), i(v);
|
|
1269
|
+
},
|
|
1270
|
+
style: {
|
|
1271
|
+
width: "fit-content"
|
|
1272
|
+
},
|
|
1273
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
|
|
1274
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1275
|
+
/* @__PURE__ */ t.jsx(
|
|
1276
|
+
b,
|
|
1277
|
+
{
|
|
1278
|
+
name: "Plus",
|
|
1279
|
+
width: 16,
|
|
1280
|
+
height: 16
|
|
1281
|
+
}
|
|
1282
|
+
)
|
|
1283
|
+
] })
|
|
1284
|
+
}
|
|
1285
|
+
)
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1288
|
+
] })
|
|
1289
|
+
] });
|
|
1290
|
+
}, Ls = "_title_1vfw9_1", zs = "_subtitle_1vfw9_5", Fs = "_header_1vfw9_12", Vs = "_text_1vfw9_13", Ys = "_productsBlock_1vfw9_14", Gs = "_top_1vfw9_26", Xs = "_itemsBlock_1vfw9_35", Ws = "_typeTexts_1vfw9_41", Js = "_block_1vfw9_48", Qs = "_active_1vfw9_61", Ks = "_products_1vfw9_14", Zs = "_product_1vfw9_14", tn = "_button_1vfw9_80", en = "_disabled_1vfw9_91", sn = "_image_1vfw9_95", nn = "_info_1vfw9_102", on = "_name_1vfw9_114", an = "_buttons_1vfw9_118", cn = "_modal_1vfw9_125", ln = "_link_1vfw9_145", rn = "_modalOptions_1vfw9_151", dn = "_addButton_1vfw9_164", un = "_deleteButton_1vfw9_179", _n = "_closeIcon_1vfw9_191", V = {
|
|
1291
|
+
title: Ls,
|
|
1292
|
+
subtitle: zs,
|
|
1293
|
+
header: Fs,
|
|
1294
|
+
text: Vs,
|
|
1295
|
+
productsBlock: Ys,
|
|
1296
|
+
top: Gs,
|
|
1297
|
+
itemsBlock: Xs,
|
|
1298
|
+
typeTexts: Ws,
|
|
1299
|
+
block: Js,
|
|
1300
|
+
active: Qs,
|
|
1301
|
+
products: Ks,
|
|
1302
|
+
product: Zs,
|
|
1303
|
+
button: tn,
|
|
1304
|
+
disabled: en,
|
|
1305
|
+
image: sn,
|
|
1306
|
+
info: nn,
|
|
1307
|
+
name: on,
|
|
1308
|
+
buttons: an,
|
|
1309
|
+
modal: cn,
|
|
1310
|
+
link: ln,
|
|
1311
|
+
modalOptions: rn,
|
|
1312
|
+
addButton: dn,
|
|
1313
|
+
deleteButton: un,
|
|
1314
|
+
closeIcon: _n
|
|
1315
|
+
}, mn = f.forwardRef(
|
|
1316
|
+
(u, a) => {
|
|
1317
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
|
|
1039
1318
|
return /* @__PURE__ */ t.jsxs(
|
|
1040
1319
|
"div",
|
|
1041
1320
|
{
|
|
1042
|
-
ref:
|
|
1043
|
-
className:
|
|
1044
|
-
onClick: (
|
|
1045
|
-
|
|
1321
|
+
ref: a,
|
|
1322
|
+
className: V.modal,
|
|
1323
|
+
onClick: (o) => {
|
|
1324
|
+
o.stopPropagation();
|
|
1046
1325
|
},
|
|
1047
1326
|
style: {
|
|
1048
1327
|
top: `${i.top}px`,
|
|
1049
1328
|
left: `${i.left}px`
|
|
1050
1329
|
},
|
|
1051
1330
|
children: [
|
|
1052
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1053
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1054
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1055
|
-
|
|
1331
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1332
|
+
/* @__PURE__ */ t.jsx("h3", { className: V.title, children: e.name["en-US"] }),
|
|
1333
|
+
/* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1334
|
+
b,
|
|
1056
1335
|
{
|
|
1057
1336
|
name: "X",
|
|
1058
1337
|
height: 20,
|
|
@@ -1064,117 +1343,119 @@ const Ue = (d) => {
|
|
|
1064
1343
|
}
|
|
1065
1344
|
) })
|
|
1066
1345
|
] }),
|
|
1067
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1068
|
-
if (
|
|
1346
|
+
/* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: c.map((o) => {
|
|
1347
|
+
if (o.type === "image")
|
|
1069
1348
|
return /* @__PURE__ */ t.jsx(
|
|
1070
|
-
|
|
1349
|
+
bt,
|
|
1071
1350
|
{
|
|
1072
1351
|
label: "Put up an attractive image",
|
|
1073
|
-
activeImage: e[
|
|
1074
|
-
onChange: (
|
|
1075
|
-
const
|
|
1352
|
+
activeImage: e[o.field],
|
|
1353
|
+
onChange: (n) => {
|
|
1354
|
+
const d = {
|
|
1076
1355
|
...e,
|
|
1077
|
-
[
|
|
1356
|
+
[o.field]: n
|
|
1078
1357
|
};
|
|
1079
|
-
s(
|
|
1358
|
+
s(d);
|
|
1080
1359
|
}
|
|
1081
1360
|
},
|
|
1082
|
-
String(
|
|
1361
|
+
String(o.field)
|
|
1083
1362
|
);
|
|
1084
|
-
if (
|
|
1363
|
+
if (o.type === "text")
|
|
1085
1364
|
return /* @__PURE__ */ t.jsx(
|
|
1086
|
-
|
|
1365
|
+
Lt,
|
|
1087
1366
|
{
|
|
1088
|
-
typesText: e[
|
|
1089
|
-
setTypesText: (
|
|
1090
|
-
const
|
|
1367
|
+
typesText: e[o.field.type],
|
|
1368
|
+
setTypesText: (n) => {
|
|
1369
|
+
const d = {
|
|
1091
1370
|
...e,
|
|
1092
|
-
[
|
|
1371
|
+
[o.field.type]: n
|
|
1093
1372
|
};
|
|
1094
|
-
s(
|
|
1373
|
+
s(d);
|
|
1095
1374
|
},
|
|
1096
|
-
text: e[
|
|
1097
|
-
setText: (
|
|
1098
|
-
const
|
|
1375
|
+
text: e[o.field.text]["en-US"] || "",
|
|
1376
|
+
setText: (n) => {
|
|
1377
|
+
const d = {
|
|
1099
1378
|
...e,
|
|
1100
|
-
[
|
|
1379
|
+
[o.field.text]: {
|
|
1380
|
+
"en-US": n
|
|
1381
|
+
}
|
|
1101
1382
|
};
|
|
1102
|
-
s(
|
|
1383
|
+
s(d);
|
|
1103
1384
|
},
|
|
1104
|
-
typeFont: e[
|
|
1105
|
-
setTypeFont: (
|
|
1106
|
-
const
|
|
1385
|
+
typeFont: e[o.field.type],
|
|
1386
|
+
setTypeFont: (n) => {
|
|
1387
|
+
const d = {
|
|
1107
1388
|
...e,
|
|
1108
|
-
[
|
|
1389
|
+
[o.field.type]: n
|
|
1109
1390
|
};
|
|
1110
|
-
s(
|
|
1391
|
+
s(d);
|
|
1111
1392
|
},
|
|
1112
|
-
subtitle:
|
|
1393
|
+
subtitle: o.label
|
|
1113
1394
|
}
|
|
1114
1395
|
);
|
|
1115
|
-
if (
|
|
1396
|
+
if (o.type === "input")
|
|
1116
1397
|
return /* @__PURE__ */ t.jsx(
|
|
1117
|
-
|
|
1398
|
+
tt,
|
|
1118
1399
|
{
|
|
1119
|
-
onChange: (
|
|
1120
|
-
const
|
|
1400
|
+
onChange: (n) => {
|
|
1401
|
+
const d = {
|
|
1121
1402
|
...e,
|
|
1122
|
-
[
|
|
1403
|
+
[o.field]: n
|
|
1123
1404
|
};
|
|
1124
|
-
s(
|
|
1405
|
+
s(d);
|
|
1125
1406
|
},
|
|
1126
|
-
value: e[
|
|
1127
|
-
label:
|
|
1128
|
-
placeholder:
|
|
1407
|
+
value: e[o.field] || "",
|
|
1408
|
+
label: o.label,
|
|
1409
|
+
placeholder: o.placeholder
|
|
1129
1410
|
}
|
|
1130
1411
|
);
|
|
1131
|
-
if (
|
|
1132
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1412
|
+
if (o.type === "inputSwitch")
|
|
1413
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.link, children: [
|
|
1133
1414
|
/* @__PURE__ */ t.jsx(
|
|
1134
|
-
|
|
1415
|
+
tt,
|
|
1135
1416
|
{
|
|
1136
|
-
onChange: (
|
|
1137
|
-
const
|
|
1417
|
+
onChange: (n) => {
|
|
1418
|
+
const d = {
|
|
1138
1419
|
...e,
|
|
1139
|
-
[
|
|
1420
|
+
[o.field.text]: n
|
|
1140
1421
|
};
|
|
1141
|
-
s(
|
|
1422
|
+
s(d);
|
|
1142
1423
|
},
|
|
1143
|
-
value: e[
|
|
1144
|
-
label:
|
|
1145
|
-
placeholder:
|
|
1424
|
+
value: e[o.field.text] || "",
|
|
1425
|
+
label: o.inputLabel,
|
|
1426
|
+
placeholder: o.placeholder
|
|
1146
1427
|
}
|
|
1147
1428
|
),
|
|
1148
1429
|
/* @__PURE__ */ t.jsx(
|
|
1149
1430
|
st,
|
|
1150
1431
|
{
|
|
1151
|
-
current: !!e[
|
|
1152
|
-
label:
|
|
1153
|
-
onChange: (
|
|
1154
|
-
const
|
|
1432
|
+
current: !!e[o.field.switch] || !1,
|
|
1433
|
+
label: o.switchLabel,
|
|
1434
|
+
onChange: (n) => {
|
|
1435
|
+
const d = {
|
|
1155
1436
|
...e,
|
|
1156
|
-
[
|
|
1437
|
+
[o.field.switch]: n
|
|
1157
1438
|
};
|
|
1158
|
-
s(
|
|
1439
|
+
s(d);
|
|
1159
1440
|
}
|
|
1160
1441
|
}
|
|
1161
1442
|
)
|
|
1162
1443
|
] });
|
|
1163
|
-
if (
|
|
1444
|
+
if (o.type === "select")
|
|
1164
1445
|
return /* @__PURE__ */ t.jsx(
|
|
1165
1446
|
et,
|
|
1166
1447
|
{
|
|
1167
|
-
options:
|
|
1168
|
-
onChange: (
|
|
1169
|
-
const
|
|
1448
|
+
options: o.itemsOptions,
|
|
1449
|
+
onChange: (n) => {
|
|
1450
|
+
const d = {
|
|
1170
1451
|
...e,
|
|
1171
|
-
[
|
|
1452
|
+
[o.field]: n
|
|
1172
1453
|
};
|
|
1173
|
-
s(
|
|
1454
|
+
s(d);
|
|
1174
1455
|
},
|
|
1175
|
-
label:
|
|
1176
|
-
value: e[
|
|
1177
|
-
leftAddon:
|
|
1456
|
+
label: o.label,
|
|
1457
|
+
value: e[o.field] || "String",
|
|
1458
|
+
leftAddon: o.leftAddon && o.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[o.field] })
|
|
1178
1459
|
}
|
|
1179
1460
|
);
|
|
1180
1461
|
}) })
|
|
@@ -1183,98 +1464,98 @@ const Ue = (d) => {
|
|
|
1183
1464
|
);
|
|
1184
1465
|
}
|
|
1185
1466
|
);
|
|
1186
|
-
function
|
|
1187
|
-
const { product:
|
|
1188
|
-
id:
|
|
1189
|
-
}),
|
|
1190
|
-
transform:
|
|
1191
|
-
transition:
|
|
1467
|
+
function hn(u) {
|
|
1468
|
+
const { product: a, children: e } = u, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
|
|
1469
|
+
id: a.id
|
|
1470
|
+
}), d = {
|
|
1471
|
+
transform: St.Transform.toString(l),
|
|
1472
|
+
transition: o
|
|
1192
1473
|
};
|
|
1193
1474
|
return /* @__PURE__ */ t.jsx(
|
|
1194
1475
|
"div",
|
|
1195
1476
|
{
|
|
1196
|
-
ref:
|
|
1197
|
-
style:
|
|
1198
|
-
className: `${
|
|
1477
|
+
ref: c,
|
|
1478
|
+
style: d,
|
|
1479
|
+
className: `${V.product} ${n ? V.dragging : ""}`,
|
|
1199
1480
|
...s,
|
|
1200
1481
|
...i,
|
|
1201
1482
|
children: e
|
|
1202
1483
|
}
|
|
1203
1484
|
);
|
|
1204
1485
|
}
|
|
1205
|
-
const
|
|
1486
|
+
const Ka = (u) => {
|
|
1206
1487
|
const {
|
|
1207
|
-
isActiveItems:
|
|
1488
|
+
isActiveItems: a,
|
|
1208
1489
|
setIsActiveItems: e,
|
|
1209
1490
|
items: s,
|
|
1210
1491
|
setItems: i,
|
|
1211
|
-
other:
|
|
1492
|
+
other: c,
|
|
1212
1493
|
title: l,
|
|
1213
|
-
subtitle:
|
|
1494
|
+
subtitle: o,
|
|
1214
1495
|
editable: n = !0,
|
|
1215
|
-
draggable:
|
|
1216
|
-
withImage:
|
|
1217
|
-
deletable:
|
|
1218
|
-
addable:
|
|
1219
|
-
itemsType:
|
|
1220
|
-
itemsPlaceholder:
|
|
1221
|
-
itemsOptions:
|
|
1222
|
-
hasRangeSelector:
|
|
1496
|
+
draggable: d = !1,
|
|
1497
|
+
withImage: j = !1,
|
|
1498
|
+
deletable: p = !0,
|
|
1499
|
+
addable: r = !0,
|
|
1500
|
+
itemsType: y,
|
|
1501
|
+
itemsPlaceholder: h = "",
|
|
1502
|
+
itemsOptions: _,
|
|
1503
|
+
hasRangeSelector: w = !1,
|
|
1223
1504
|
rangeSelectorOptions: H,
|
|
1224
|
-
modalOptions:
|
|
1225
|
-
addableOptions:
|
|
1226
|
-
} =
|
|
1505
|
+
modalOptions: $,
|
|
1506
|
+
addableOptions: g = {}
|
|
1507
|
+
} = u, [B, E] = f.useState(null), [F, T] = f.useState({
|
|
1227
1508
|
top: 0,
|
|
1228
1509
|
left: 0
|
|
1229
|
-
}), [
|
|
1230
|
-
|
|
1510
|
+
}), [v, A] = f.useState(null), x = f.useRef(null), [I, C] = f.useState(!1), R = yt(
|
|
1511
|
+
kt(wt, {
|
|
1231
1512
|
activationConstraint: {
|
|
1232
1513
|
distance: 5
|
|
1233
1514
|
}
|
|
1234
1515
|
})
|
|
1235
1516
|
);
|
|
1236
1517
|
f.useEffect(() => {
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1518
|
+
const k = () => {
|
|
1519
|
+
E(null), C(!1);
|
|
1239
1520
|
};
|
|
1240
|
-
return document.body.addEventListener("click",
|
|
1241
|
-
|
|
1521
|
+
return document.body.addEventListener("click", k), E(null), C(!1), () => {
|
|
1522
|
+
E(null), C(!1), document.body.removeEventListener("click", k);
|
|
1242
1523
|
};
|
|
1243
1524
|
}, []), f.useEffect(() => {
|
|
1244
|
-
if (
|
|
1245
|
-
const
|
|
1246
|
-
i(
|
|
1525
|
+
if (B) {
|
|
1526
|
+
const k = [...s].map((D) => D.id === B.id ? B : D);
|
|
1527
|
+
i(k);
|
|
1247
1528
|
}
|
|
1248
|
-
}, [
|
|
1249
|
-
if (
|
|
1250
|
-
const
|
|
1251
|
-
let m =
|
|
1252
|
-
m +
|
|
1529
|
+
}, [B]), f.useEffect(() => {
|
|
1530
|
+
if (x.current && v) {
|
|
1531
|
+
const k = x.current.getBoundingClientRect().height, D = window.innerHeight;
|
|
1532
|
+
let m = v.top;
|
|
1533
|
+
m + k > D + window.scrollY - 200 && (m = D + window.scrollY - k - 200), m < 0 && (m = 10), T({
|
|
1253
1534
|
top: m,
|
|
1254
|
-
left:
|
|
1535
|
+
left: v.left
|
|
1255
1536
|
});
|
|
1256
1537
|
}
|
|
1257
|
-
}, [
|
|
1258
|
-
const O = (
|
|
1259
|
-
|
|
1260
|
-
const m =
|
|
1261
|
-
|
|
1538
|
+
}, [x.current, v]);
|
|
1539
|
+
const O = (k, D) => {
|
|
1540
|
+
k.stopPropagation();
|
|
1541
|
+
const m = k.target.getBoundingClientRect();
|
|
1542
|
+
A({
|
|
1262
1543
|
top: m.top + window.scrollY,
|
|
1263
1544
|
left: m.left - 30
|
|
1264
|
-
}),
|
|
1545
|
+
}), E(D), C(!0);
|
|
1265
1546
|
};
|
|
1266
|
-
function
|
|
1267
|
-
if (
|
|
1268
|
-
return
|
|
1547
|
+
function U(k) {
|
|
1548
|
+
if (j)
|
|
1549
|
+
return k ? /* @__PURE__ */ t.jsx(
|
|
1269
1550
|
"img",
|
|
1270
1551
|
{
|
|
1271
|
-
src: `https://imagedelivery.net/${
|
|
1552
|
+
src: `https://imagedelivery.net/${k[0]}/w=1000`,
|
|
1272
1553
|
alt: "image",
|
|
1273
1554
|
width: 16,
|
|
1274
1555
|
height: 16
|
|
1275
1556
|
}
|
|
1276
1557
|
) : /* @__PURE__ */ t.jsx(
|
|
1277
|
-
|
|
1558
|
+
b,
|
|
1278
1559
|
{
|
|
1279
1560
|
name: "Image",
|
|
1280
1561
|
width: 16,
|
|
@@ -1283,20 +1564,20 @@ const ja = (d) => {
|
|
|
1283
1564
|
}
|
|
1284
1565
|
);
|
|
1285
1566
|
}
|
|
1286
|
-
const
|
|
1287
|
-
const { active:
|
|
1288
|
-
if (m &&
|
|
1289
|
-
const
|
|
1290
|
-
if (
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1567
|
+
const nt = (k) => {
|
|
1568
|
+
const { active: D, over: m } = k;
|
|
1569
|
+
if (m && D.id !== m.id) {
|
|
1570
|
+
const N = s.findIndex((L) => L.id === D.id), M = s.findIndex((L) => L.id === m.id);
|
|
1571
|
+
if (N !== -1 && M !== -1) {
|
|
1572
|
+
const L = [...s], [X] = L.splice(N, 1);
|
|
1573
|
+
L.splice(M, 0, X), i(L);
|
|
1293
1574
|
}
|
|
1294
1575
|
}
|
|
1295
|
-
},
|
|
1576
|
+
}, dt = (k) => {
|
|
1296
1577
|
var m;
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
|
|
1578
|
+
const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1579
|
+
d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1580
|
+
b,
|
|
1300
1581
|
{
|
|
1301
1582
|
name: "DotsSixVertical",
|
|
1302
1583
|
hoverable: !0,
|
|
@@ -1304,132 +1585,140 @@ const ja = (d) => {
|
|
|
1304
1585
|
height: 20
|
|
1305
1586
|
}
|
|
1306
1587
|
) }),
|
|
1307
|
-
|
|
1588
|
+
y === "select" && _ && /* @__PURE__ */ t.jsx(
|
|
1308
1589
|
et,
|
|
1309
1590
|
{
|
|
1310
|
-
onChange: (
|
|
1311
|
-
const
|
|
1312
|
-
...
|
|
1313
|
-
name:
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1591
|
+
onChange: (N) => {
|
|
1592
|
+
const L = [...s].map((X) => X.id === k.id ? {
|
|
1593
|
+
...k,
|
|
1594
|
+
name: {
|
|
1595
|
+
"en-US": N
|
|
1596
|
+
}
|
|
1597
|
+
} : X);
|
|
1598
|
+
E({
|
|
1599
|
+
...k,
|
|
1600
|
+
name: {
|
|
1601
|
+
"en-US": N
|
|
1602
|
+
}
|
|
1603
|
+
}), i([...L]);
|
|
1319
1604
|
},
|
|
1320
|
-
value:
|
|
1321
|
-
options:
|
|
1322
|
-
|
|
1605
|
+
value: k.name["en-US"],
|
|
1606
|
+
options: _.filter(
|
|
1607
|
+
(N) => !s.find((M) => M.name["en-US"] === N)
|
|
1608
|
+
),
|
|
1609
|
+
leftAddon: U(k.images)
|
|
1323
1610
|
}
|
|
1324
1611
|
),
|
|
1325
|
-
|
|
1326
|
-
|
|
1612
|
+
y === "input" && /* @__PURE__ */ t.jsx(
|
|
1613
|
+
tt,
|
|
1327
1614
|
{
|
|
1328
|
-
onChange: (
|
|
1329
|
-
const
|
|
1330
|
-
...
|
|
1331
|
-
name:
|
|
1332
|
-
|
|
1333
|
-
|
|
1615
|
+
onChange: (N) => {
|
|
1616
|
+
const L = [...s].map((X) => X.id === k.id ? {
|
|
1617
|
+
...k,
|
|
1618
|
+
name: {
|
|
1619
|
+
"en-US": N
|
|
1620
|
+
}
|
|
1621
|
+
} : X);
|
|
1622
|
+
i([...L]);
|
|
1334
1623
|
},
|
|
1335
|
-
value:
|
|
1336
|
-
placeholder:
|
|
1624
|
+
value: k.name["en-US"],
|
|
1625
|
+
placeholder: h
|
|
1337
1626
|
}
|
|
1338
1627
|
),
|
|
1339
|
-
|
|
1340
|
-
|
|
1628
|
+
y === "image" && /* @__PURE__ */ t.jsx(
|
|
1629
|
+
bt,
|
|
1341
1630
|
{
|
|
1342
|
-
onChange: (
|
|
1343
|
-
const
|
|
1344
|
-
...
|
|
1345
|
-
images:
|
|
1346
|
-
} :
|
|
1347
|
-
i([...
|
|
1631
|
+
onChange: (N) => {
|
|
1632
|
+
const L = [...s].map((X) => X.id === k.id ? {
|
|
1633
|
+
...k,
|
|
1634
|
+
images: N
|
|
1635
|
+
} : X);
|
|
1636
|
+
i([...L]);
|
|
1348
1637
|
},
|
|
1349
|
-
activeImage: (m = s.find((
|
|
1638
|
+
activeImage: (m = s.find((N) => N.id === k.id)) == null ? void 0 : m.images[0]
|
|
1350
1639
|
}
|
|
1351
1640
|
),
|
|
1352
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1353
|
-
n && /* @__PURE__ */ t.jsx("div", { className:
|
|
1354
|
-
|
|
1641
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
1642
|
+
n && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1643
|
+
b,
|
|
1355
1644
|
{
|
|
1356
1645
|
name: "Sliders",
|
|
1357
1646
|
hoverable: !0,
|
|
1358
1647
|
width: 20,
|
|
1359
1648
|
height: 20,
|
|
1360
|
-
onClick: (
|
|
1649
|
+
onClick: (N) => O(N, k)
|
|
1361
1650
|
}
|
|
1362
1651
|
) }),
|
|
1363
|
-
|
|
1364
|
-
|
|
1652
|
+
p && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1653
|
+
b,
|
|
1365
1654
|
{
|
|
1366
1655
|
name: "Trash",
|
|
1367
1656
|
hoverable: !0,
|
|
1368
1657
|
width: 20,
|
|
1369
1658
|
height: 20,
|
|
1370
1659
|
fill: "#C12A2A",
|
|
1371
|
-
onClick: () => i(s.filter((
|
|
1660
|
+
onClick: () => i(s.filter((N) => N.id !== k.id))
|
|
1372
1661
|
}
|
|
1373
1662
|
) })
|
|
1374
1663
|
] })
|
|
1375
1664
|
] });
|
|
1376
|
-
return
|
|
1377
|
-
|
|
1665
|
+
return d ? /* @__PURE__ */ t.jsx(
|
|
1666
|
+
hn,
|
|
1378
1667
|
{
|
|
1379
|
-
product:
|
|
1380
|
-
children:
|
|
1668
|
+
product: k,
|
|
1669
|
+
children: D
|
|
1381
1670
|
},
|
|
1382
|
-
|
|
1671
|
+
k.id
|
|
1383
1672
|
) : /* @__PURE__ */ t.jsx(
|
|
1384
1673
|
"div",
|
|
1385
1674
|
{
|
|
1386
|
-
className:
|
|
1387
|
-
children:
|
|
1675
|
+
className: V.product,
|
|
1676
|
+
children: D
|
|
1388
1677
|
},
|
|
1389
|
-
|
|
1678
|
+
k.id
|
|
1390
1679
|
);
|
|
1391
1680
|
};
|
|
1392
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1393
|
-
(l ||
|
|
1394
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1395
|
-
|
|
1681
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
1682
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1683
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
|
|
1684
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1396
1685
|
st,
|
|
1397
1686
|
{
|
|
1398
|
-
current:
|
|
1399
|
-
onChange: (
|
|
1687
|
+
current: a,
|
|
1688
|
+
onChange: (k) => e == null ? void 0 : e(k)
|
|
1400
1689
|
}
|
|
1401
1690
|
)
|
|
1402
1691
|
] }),
|
|
1403
|
-
|
|
1404
|
-
|
|
1692
|
+
B && n && $ && I && /* @__PURE__ */ t.jsx(
|
|
1693
|
+
mn,
|
|
1405
1694
|
{
|
|
1406
|
-
ref:
|
|
1407
|
-
activeItem:
|
|
1408
|
-
setActiveItem:
|
|
1695
|
+
ref: x,
|
|
1696
|
+
activeItem: B,
|
|
1697
|
+
setActiveItem: E,
|
|
1409
1698
|
popupPosition: F,
|
|
1410
|
-
modalOptions:
|
|
1411
|
-
setIsOpenModal:
|
|
1699
|
+
modalOptions: $,
|
|
1700
|
+
setIsOpenModal: C
|
|
1412
1701
|
}
|
|
1413
1702
|
),
|
|
1414
|
-
|
|
1415
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1703
|
+
w && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
|
|
1704
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
1705
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
|
|
1706
|
+
d ? /* @__PURE__ */ t.jsx(
|
|
1707
|
+
$t,
|
|
1419
1708
|
{
|
|
1420
|
-
sensors:
|
|
1421
|
-
onDragEnd:
|
|
1709
|
+
sensors: R,
|
|
1710
|
+
onDragEnd: nt,
|
|
1422
1711
|
children: /* @__PURE__ */ t.jsx(
|
|
1423
|
-
|
|
1712
|
+
It,
|
|
1424
1713
|
{
|
|
1425
|
-
items: s.map((
|
|
1426
|
-
strategy:
|
|
1427
|
-
children: s.map((
|
|
1714
|
+
items: s.map((k) => k.id),
|
|
1715
|
+
strategy: Nt,
|
|
1716
|
+
children: s.map((k) => dt(k))
|
|
1428
1717
|
}
|
|
1429
1718
|
)
|
|
1430
1719
|
}
|
|
1431
|
-
) : s.map((
|
|
1432
|
-
|
|
1720
|
+
) : s.map((k) => dt(k)),
|
|
1721
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1433
1722
|
"div",
|
|
1434
1723
|
{
|
|
1435
1724
|
style: {
|
|
@@ -1438,46 +1727,52 @@ const ja = (d) => {
|
|
|
1438
1727
|
justifyContent: "center"
|
|
1439
1728
|
},
|
|
1440
1729
|
children: /* @__PURE__ */ t.jsx(
|
|
1441
|
-
|
|
1730
|
+
ot,
|
|
1442
1731
|
{
|
|
1443
1732
|
withoutHover: !0,
|
|
1444
|
-
className:
|
|
1733
|
+
className: V.button,
|
|
1445
1734
|
size: "s",
|
|
1446
1735
|
onClick: () => {
|
|
1447
|
-
const
|
|
1448
|
-
let
|
|
1449
|
-
if (
|
|
1450
|
-
for (let m = 0; m <
|
|
1451
|
-
if (!s.find((
|
|
1452
|
-
|
|
1736
|
+
const k = [...s];
|
|
1737
|
+
let D = null;
|
|
1738
|
+
if (_) {
|
|
1739
|
+
for (let m = 0; m < _.length; m++)
|
|
1740
|
+
if (!s.find((N) => N.name["en-US"] === _[m])) {
|
|
1741
|
+
D = _[m];
|
|
1453
1742
|
break;
|
|
1454
1743
|
}
|
|
1455
1744
|
}
|
|
1456
|
-
|
|
1457
|
-
name:
|
|
1458
|
-
|
|
1459
|
-
|
|
1745
|
+
y === "select" && _ ? k.push({
|
|
1746
|
+
name: {
|
|
1747
|
+
"en-US": D || _[0]
|
|
1748
|
+
},
|
|
1749
|
+
id: ht(),
|
|
1750
|
+
...g,
|
|
1460
1751
|
maxSymbols: 100
|
|
1461
1752
|
// пример значения
|
|
1462
|
-
}) :
|
|
1463
|
-
name:
|
|
1464
|
-
|
|
1465
|
-
|
|
1753
|
+
}) : y === "input" ? k.push({
|
|
1754
|
+
name: {
|
|
1755
|
+
"en-US": ""
|
|
1756
|
+
},
|
|
1757
|
+
id: ht(),
|
|
1758
|
+
...g,
|
|
1466
1759
|
maxSymbols: 100
|
|
1467
|
-
}) :
|
|
1468
|
-
name:
|
|
1469
|
-
|
|
1470
|
-
|
|
1760
|
+
}) : k.push({
|
|
1761
|
+
name: {
|
|
1762
|
+
"en-US": `Image ${s.length + 1}`
|
|
1763
|
+
},
|
|
1764
|
+
id: ht(),
|
|
1765
|
+
...g,
|
|
1471
1766
|
maxSymbols: 100
|
|
1472
|
-
}), i(
|
|
1767
|
+
}), i(k);
|
|
1473
1768
|
},
|
|
1474
1769
|
style: {
|
|
1475
1770
|
width: "fit-content"
|
|
1476
1771
|
},
|
|
1477
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1772
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
1478
1773
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1479
1774
|
/* @__PURE__ */ t.jsx(
|
|
1480
|
-
|
|
1775
|
+
b,
|
|
1481
1776
|
{
|
|
1482
1777
|
name: "Plus",
|
|
1483
1778
|
width: 16,
|
|
@@ -1490,62 +1785,62 @@ const ja = (d) => {
|
|
|
1490
1785
|
}
|
|
1491
1786
|
)
|
|
1492
1787
|
] }),
|
|
1493
|
-
|
|
1788
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
|
|
1494
1789
|
] });
|
|
1495
|
-
},
|
|
1496
|
-
title:
|
|
1497
|
-
subtitle:
|
|
1498
|
-
header:
|
|
1499
|
-
text:
|
|
1500
|
-
productsBlock:
|
|
1501
|
-
buttonsBlock:
|
|
1502
|
-
top:
|
|
1503
|
-
itemsBlock:
|
|
1504
|
-
typeTexts:
|
|
1505
|
-
block:
|
|
1506
|
-
active:
|
|
1507
|
-
products:
|
|
1508
|
-
product:
|
|
1509
|
-
button:
|
|
1510
|
-
image:
|
|
1511
|
-
info:
|
|
1512
|
-
name:
|
|
1513
|
-
buttons:
|
|
1514
|
-
modal:
|
|
1515
|
-
other:
|
|
1516
|
-
options:
|
|
1517
|
-
closeIcon:
|
|
1518
|
-
},
|
|
1519
|
-
const { activeButton: e, setActiveButton: s, popupPosition: i } =
|
|
1790
|
+
}, pn = "_title_bn7sv_1", fn = "_subtitle_bn7sv_5", gn = "_header_bn7sv_12", xn = "_text_bn7sv_13", bn = "_productsBlock_bn7sv_14", vn = "_buttonsBlock_bn7sv_15", jn = "_top_bn7sv_26", yn = "_itemsBlock_bn7sv_35", kn = "_typeTexts_bn7sv_41", $n = "_block_bn7sv_48", In = "_active_bn7sv_60", Nn = "_products_bn7sv_14", wn = "_product_bn7sv_14", Cn = "_button_bn7sv_15", Sn = "_image_bn7sv_90", Bn = "_info_bn7sv_97", Tn = "_name_bn7sv_109", Pn = "_buttons_bn7sv_15", An = "_modal_bn7sv_120", On = "_other_bn7sv_139", Mn = "_options_bn7sv_145", qn = "_closeIcon_bn7sv_153", rt = {
|
|
1791
|
+
title: pn,
|
|
1792
|
+
subtitle: fn,
|
|
1793
|
+
header: gn,
|
|
1794
|
+
text: xn,
|
|
1795
|
+
productsBlock: bn,
|
|
1796
|
+
buttonsBlock: vn,
|
|
1797
|
+
top: jn,
|
|
1798
|
+
itemsBlock: yn,
|
|
1799
|
+
typeTexts: kn,
|
|
1800
|
+
block: $n,
|
|
1801
|
+
active: In,
|
|
1802
|
+
products: Nn,
|
|
1803
|
+
product: wn,
|
|
1804
|
+
button: Cn,
|
|
1805
|
+
image: Sn,
|
|
1806
|
+
info: Bn,
|
|
1807
|
+
name: Tn,
|
|
1808
|
+
buttons: Pn,
|
|
1809
|
+
modal: An,
|
|
1810
|
+
other: On,
|
|
1811
|
+
options: Mn,
|
|
1812
|
+
closeIcon: qn
|
|
1813
|
+
}, En = f.forwardRef((u, a) => {
|
|
1814
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i } = u, [c, l] = f.useState(e.typesText), [o, n] = f.useState(e.destination), [d, j] = f.useState(e.page), [p, r] = f.useState(e.link || ""), [y, h] = f.useState(e.text || { "en-US": "" }), [_, w] = f.useState(e.openInNewTab), { pages: H } = Vt();
|
|
1520
1815
|
return f.useEffect(() => {
|
|
1521
1816
|
s({
|
|
1522
1817
|
...e,
|
|
1523
1818
|
...{
|
|
1524
|
-
text:
|
|
1525
|
-
link:
|
|
1526
|
-
destination:
|
|
1527
|
-
typesText:
|
|
1528
|
-
page:
|
|
1529
|
-
openInNewTab:
|
|
1819
|
+
text: y,
|
|
1820
|
+
link: p,
|
|
1821
|
+
destination: o,
|
|
1822
|
+
typesText: c,
|
|
1823
|
+
page: d,
|
|
1824
|
+
openInNewTab: _
|
|
1530
1825
|
}
|
|
1531
1826
|
});
|
|
1532
|
-
}, [
|
|
1827
|
+
}, [c, o, p, y, d, _]), console.log(y), /* @__PURE__ */ t.jsxs(
|
|
1533
1828
|
"div",
|
|
1534
1829
|
{
|
|
1535
|
-
className:
|
|
1536
|
-
onClick: (
|
|
1537
|
-
|
|
1830
|
+
className: rt.modal,
|
|
1831
|
+
onClick: ($) => {
|
|
1832
|
+
$.stopPropagation();
|
|
1538
1833
|
},
|
|
1539
1834
|
style: {
|
|
1540
1835
|
top: `${i.top}px`,
|
|
1541
1836
|
left: `${i.left}px`
|
|
1542
1837
|
},
|
|
1543
|
-
ref:
|
|
1838
|
+
ref: a,
|
|
1544
1839
|
children: [
|
|
1545
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1546
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1547
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1548
|
-
|
|
1840
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
1841
|
+
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: e.type }),
|
|
1842
|
+
/* @__PURE__ */ t.jsx("div", { className: rt.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1843
|
+
b,
|
|
1549
1844
|
{
|
|
1550
1845
|
name: "X",
|
|
1551
1846
|
height: 20,
|
|
@@ -1555,29 +1850,29 @@ const ja = (d) => {
|
|
|
1555
1850
|
}
|
|
1556
1851
|
) })
|
|
1557
1852
|
] }),
|
|
1558
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1853
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.options, children: [
|
|
1559
1854
|
/* @__PURE__ */ t.jsx(
|
|
1560
1855
|
et,
|
|
1561
1856
|
{
|
|
1562
1857
|
label: "Destination",
|
|
1563
|
-
onChange: (
|
|
1564
|
-
options: ["Go to Page", "Open Link"].filter((
|
|
1565
|
-
value:
|
|
1858
|
+
onChange: ($) => n($),
|
|
1859
|
+
options: ["Go to Page", "Open Link"].filter(($) => $ !== o),
|
|
1860
|
+
value: o
|
|
1566
1861
|
}
|
|
1567
1862
|
),
|
|
1568
|
-
|
|
1863
|
+
o === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1569
1864
|
et,
|
|
1570
1865
|
{
|
|
1571
1866
|
label: "Go to",
|
|
1572
|
-
onChange: (
|
|
1573
|
-
options: H ? Object.values(H).filter((
|
|
1574
|
-
value:
|
|
1867
|
+
onChange: ($) => j($),
|
|
1868
|
+
options: H ? Object.values(H).filter(($) => $.name !== d).map(($) => $.name) : [],
|
|
1869
|
+
value: d
|
|
1575
1870
|
}
|
|
1576
1871
|
) : /* @__PURE__ */ t.jsx(
|
|
1577
|
-
|
|
1872
|
+
tt,
|
|
1578
1873
|
{
|
|
1579
|
-
onChange: (
|
|
1580
|
-
value:
|
|
1874
|
+
onChange: ($) => r($),
|
|
1875
|
+
value: p,
|
|
1581
1876
|
placeholder: "https://",
|
|
1582
1877
|
label: "Link"
|
|
1583
1878
|
}
|
|
@@ -1587,22 +1882,22 @@ const ja = (d) => {
|
|
|
1587
1882
|
{
|
|
1588
1883
|
current: e.openInNewTab,
|
|
1589
1884
|
label: "Open in new tab",
|
|
1590
|
-
onChange: (
|
|
1885
|
+
onChange: ($) => w($)
|
|
1591
1886
|
}
|
|
1592
1887
|
),
|
|
1593
1888
|
/* @__PURE__ */ t.jsx(
|
|
1594
|
-
|
|
1889
|
+
Et,
|
|
1595
1890
|
{
|
|
1596
|
-
onChange: (
|
|
1597
|
-
value:
|
|
1891
|
+
onChange: ($) => h({ "en-US": $ }),
|
|
1892
|
+
value: y["en-US"],
|
|
1598
1893
|
label: "Text",
|
|
1599
1894
|
maxLength: 150
|
|
1600
1895
|
}
|
|
1601
1896
|
),
|
|
1602
1897
|
/* @__PURE__ */ t.jsx(
|
|
1603
|
-
|
|
1898
|
+
Rt,
|
|
1604
1899
|
{
|
|
1605
|
-
typesText:
|
|
1900
|
+
typesText: c,
|
|
1606
1901
|
setTypesText: l
|
|
1607
1902
|
}
|
|
1608
1903
|
)
|
|
@@ -1610,106 +1905,106 @@ const ja = (d) => {
|
|
|
1610
1905
|
]
|
|
1611
1906
|
}
|
|
1612
1907
|
);
|
|
1613
|
-
}),
|
|
1614
|
-
subtitle:
|
|
1615
|
-
header:
|
|
1616
|
-
text:
|
|
1617
|
-
productsBlock:
|
|
1618
|
-
buttonsBlock:
|
|
1619
|
-
top:
|
|
1620
|
-
itemsBlock:
|
|
1621
|
-
typeTexts:
|
|
1622
|
-
block:
|
|
1623
|
-
active:
|
|
1624
|
-
products:
|
|
1625
|
-
product:
|
|
1626
|
-
button:
|
|
1627
|
-
image:
|
|
1628
|
-
info:
|
|
1629
|
-
name:
|
|
1630
|
-
buttons:
|
|
1631
|
-
modal:
|
|
1632
|
-
other:
|
|
1633
|
-
options:
|
|
1634
|
-
addButton:
|
|
1635
|
-
deleteButton:
|
|
1636
|
-
},
|
|
1637
|
-
const { buttons:
|
|
1908
|
+
}), Dn = "_subtitle_jql1y_1", Un = "_header_jql1y_8", Hn = "_text_jql1y_9", Rn = "_productsBlock_jql1y_10", Ln = "_buttonsBlock_jql1y_11", zn = "_top_jql1y_23", Fn = "_itemsBlock_jql1y_32", Vn = "_typeTexts_jql1y_38", Yn = "_block_jql1y_45", Gn = "_active_jql1y_58", Xn = "_products_jql1y_10", Wn = "_product_jql1y_10", Jn = "_button_jql1y_11", Qn = "_image_jql1y_88", Kn = "_info_jql1y_95", Zn = "_name_jql1y_107", ti = "_buttons_jql1y_11", ei = "_modal_jql1y_118", si = "_other_jql1y_138", ni = "_options_jql1y_144", ii = "_addButton_jql1y_150", oi = "_deleteButton_jql1y_165", at = {
|
|
1909
|
+
subtitle: Dn,
|
|
1910
|
+
header: Un,
|
|
1911
|
+
text: Hn,
|
|
1912
|
+
productsBlock: Rn,
|
|
1913
|
+
buttonsBlock: Ln,
|
|
1914
|
+
top: zn,
|
|
1915
|
+
itemsBlock: Fn,
|
|
1916
|
+
typeTexts: Vn,
|
|
1917
|
+
block: Yn,
|
|
1918
|
+
active: Gn,
|
|
1919
|
+
products: Xn,
|
|
1920
|
+
product: Wn,
|
|
1921
|
+
button: Jn,
|
|
1922
|
+
image: Qn,
|
|
1923
|
+
info: Kn,
|
|
1924
|
+
name: Zn,
|
|
1925
|
+
buttons: ti,
|
|
1926
|
+
modal: ei,
|
|
1927
|
+
other: si,
|
|
1928
|
+
options: ni,
|
|
1929
|
+
addButton: ii,
|
|
1930
|
+
deleteButton: oi
|
|
1931
|
+
}, ai = (u) => {
|
|
1932
|
+
const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0, editable: c = !0 } = u, [l, o] = f.useState(null), [n, d] = f.useState({
|
|
1638
1933
|
top: 0,
|
|
1639
1934
|
left: 0
|
|
1640
|
-
}), [
|
|
1935
|
+
}), [j, p] = f.useState(null), r = f.useRef(null);
|
|
1641
1936
|
f.useEffect(() => {
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1937
|
+
const h = () => {
|
|
1938
|
+
o(null);
|
|
1644
1939
|
};
|
|
1645
|
-
return document.body.addEventListener("click",
|
|
1646
|
-
|
|
1940
|
+
return document.body.addEventListener("click", h), o(null), () => {
|
|
1941
|
+
o(null), document.body.removeEventListener("click", h);
|
|
1647
1942
|
};
|
|
1648
1943
|
}, []), f.useEffect(() => {
|
|
1649
|
-
if (
|
|
1650
|
-
const
|
|
1651
|
-
e(
|
|
1944
|
+
if (l) {
|
|
1945
|
+
const h = [...a].map((_) => _.id === l.id ? l : _);
|
|
1946
|
+
e(h);
|
|
1652
1947
|
}
|
|
1653
|
-
}, [
|
|
1654
|
-
if (
|
|
1655
|
-
const
|
|
1656
|
-
let
|
|
1657
|
-
|
|
1658
|
-
top:
|
|
1659
|
-
left:
|
|
1948
|
+
}, [l]), f.useEffect(() => {
|
|
1949
|
+
if (r.current && j) {
|
|
1950
|
+
const h = r.current.getBoundingClientRect().height, _ = window.innerHeight;
|
|
1951
|
+
let w = j.top;
|
|
1952
|
+
w + h > _ + window.scrollY - 200 && (w = _ + window.scrollY - h - 200), w < 0 && (w = 10), d({
|
|
1953
|
+
top: w,
|
|
1954
|
+
left: j.left
|
|
1660
1955
|
});
|
|
1661
1956
|
}
|
|
1662
|
-
}, [
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1667
|
-
top:
|
|
1668
|
-
left:
|
|
1669
|
-
}),
|
|
1957
|
+
}, [r.current, j]);
|
|
1958
|
+
const y = (h, _) => {
|
|
1959
|
+
h.stopPropagation();
|
|
1960
|
+
const w = h.target.getBoundingClientRect();
|
|
1961
|
+
p({
|
|
1962
|
+
top: w.top + window.scrollY - 70,
|
|
1963
|
+
left: w.left - (i ? 30 : 65)
|
|
1964
|
+
}), o(_);
|
|
1670
1965
|
};
|
|
1671
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1672
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1673
|
-
|
|
1966
|
+
return /* @__PURE__ */ t.jsxs("div", { className: at.products, children: [
|
|
1967
|
+
/* @__PURE__ */ t.jsx("h5", { className: at.subtitle, children: "Button Type" }),
|
|
1968
|
+
a.map((h) => /* @__PURE__ */ t.jsxs(
|
|
1674
1969
|
"div",
|
|
1675
1970
|
{
|
|
1676
|
-
className:
|
|
1971
|
+
className: at.product,
|
|
1677
1972
|
children: [
|
|
1678
1973
|
/* @__PURE__ */ t.jsx(
|
|
1679
1974
|
et,
|
|
1680
1975
|
{
|
|
1681
|
-
onChange: (
|
|
1682
|
-
const
|
|
1683
|
-
...
|
|
1684
|
-
type:
|
|
1685
|
-
} :
|
|
1686
|
-
e(
|
|
1976
|
+
onChange: (_) => {
|
|
1977
|
+
const H = [...a].map(($) => $.id === h.id ? {
|
|
1978
|
+
...h,
|
|
1979
|
+
type: _
|
|
1980
|
+
} : $);
|
|
1981
|
+
e(H);
|
|
1687
1982
|
},
|
|
1688
|
-
value:
|
|
1983
|
+
value: h.type,
|
|
1689
1984
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1690
1985
|
}
|
|
1691
1986
|
),
|
|
1692
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1693
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1694
|
-
|
|
1987
|
+
/* @__PURE__ */ t.jsxs("div", { className: at.buttons, children: [
|
|
1988
|
+
c && /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1989
|
+
b,
|
|
1695
1990
|
{
|
|
1696
1991
|
name: "Sliders",
|
|
1697
1992
|
hoverable: !0,
|
|
1698
1993
|
width: 20,
|
|
1699
1994
|
height: 20,
|
|
1700
|
-
onClick: (
|
|
1701
|
-
|
|
1995
|
+
onClick: (_) => {
|
|
1996
|
+
y(_, h);
|
|
1702
1997
|
}
|
|
1703
1998
|
}
|
|
1704
1999
|
) }),
|
|
1705
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
1706
|
-
|
|
2000
|
+
s && /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2001
|
+
b,
|
|
1707
2002
|
{
|
|
1708
2003
|
name: "Trash",
|
|
1709
2004
|
hoverable: !0,
|
|
1710
2005
|
onClick: () => {
|
|
1711
|
-
const
|
|
1712
|
-
e(
|
|
2006
|
+
const _ = a.filter((w) => w.id !== h.id);
|
|
2007
|
+
e(_);
|
|
1713
2008
|
},
|
|
1714
2009
|
width: 20,
|
|
1715
2010
|
height: 20,
|
|
@@ -1719,15 +2014,15 @@ const ja = (d) => {
|
|
|
1719
2014
|
] })
|
|
1720
2015
|
]
|
|
1721
2016
|
},
|
|
1722
|
-
|
|
2017
|
+
h.id
|
|
1723
2018
|
)),
|
|
1724
|
-
|
|
1725
|
-
|
|
2019
|
+
l && /* @__PURE__ */ t.jsx(
|
|
2020
|
+
En,
|
|
1726
2021
|
{
|
|
1727
|
-
ref:
|
|
1728
|
-
activeButton:
|
|
1729
|
-
setActiveButton:
|
|
1730
|
-
popupPosition:
|
|
2022
|
+
ref: r,
|
|
2023
|
+
activeButton: l,
|
|
2024
|
+
setActiveButton: o,
|
|
2025
|
+
popupPosition: n
|
|
1731
2026
|
}
|
|
1732
2027
|
),
|
|
1733
2028
|
i && /* @__PURE__ */ t.jsx(
|
|
@@ -1739,30 +2034,32 @@ const ja = (d) => {
|
|
|
1739
2034
|
justifyContent: "center"
|
|
1740
2035
|
},
|
|
1741
2036
|
children: /* @__PURE__ */ t.jsx(
|
|
1742
|
-
|
|
2037
|
+
ot,
|
|
1743
2038
|
{
|
|
1744
2039
|
withoutHover: !0,
|
|
1745
|
-
className:
|
|
2040
|
+
className: at.button,
|
|
1746
2041
|
size: "s",
|
|
1747
2042
|
onClick: () => {
|
|
1748
|
-
const
|
|
1749
|
-
|
|
2043
|
+
const h = [...a];
|
|
2044
|
+
h.push({
|
|
1750
2045
|
type: "Primary",
|
|
1751
|
-
id:
|
|
2046
|
+
id: ht(),
|
|
1752
2047
|
typesText: [],
|
|
1753
2048
|
destination: "Go to Page",
|
|
1754
|
-
text:
|
|
2049
|
+
text: {
|
|
2050
|
+
"en-US": "Button Name"
|
|
2051
|
+
},
|
|
1755
2052
|
page: "home",
|
|
1756
2053
|
openInNewTab: !0
|
|
1757
|
-
}), e(
|
|
2054
|
+
}), e(h);
|
|
1758
2055
|
},
|
|
1759
2056
|
style: {
|
|
1760
2057
|
width: "fit-content"
|
|
1761
2058
|
},
|
|
1762
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2059
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: at.addButton, children: [
|
|
1763
2060
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1764
2061
|
/* @__PURE__ */ t.jsx(
|
|
1765
|
-
|
|
2062
|
+
b,
|
|
1766
2063
|
{
|
|
1767
2064
|
name: "Plus",
|
|
1768
2065
|
width: 16,
|
|
@@ -1775,77 +2072,78 @@ const ja = (d) => {
|
|
|
1775
2072
|
}
|
|
1776
2073
|
)
|
|
1777
2074
|
] });
|
|
1778
|
-
},
|
|
1779
|
-
const { isActiveButtons:
|
|
1780
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1781
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1782
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
2075
|
+
}, Za = (u) => {
|
|
2076
|
+
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: i, editable: c = !0 } = u;
|
|
2077
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
|
|
2078
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
2079
|
+
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
|
|
1783
2080
|
/* @__PURE__ */ t.jsx(
|
|
1784
2081
|
st,
|
|
1785
2082
|
{
|
|
1786
|
-
current:
|
|
1787
|
-
onChange: (
|
|
2083
|
+
current: a,
|
|
2084
|
+
onChange: (l) => e(l)
|
|
1788
2085
|
}
|
|
1789
2086
|
)
|
|
1790
2087
|
] }),
|
|
1791
2088
|
/* @__PURE__ */ t.jsx(
|
|
1792
|
-
|
|
2089
|
+
ai,
|
|
1793
2090
|
{
|
|
1794
2091
|
buttons: s,
|
|
1795
|
-
setButtons: i
|
|
2092
|
+
setButtons: i,
|
|
2093
|
+
editable: c
|
|
1796
2094
|
}
|
|
1797
2095
|
)
|
|
1798
2096
|
] }) });
|
|
1799
|
-
},
|
|
1800
|
-
wrapper:
|
|
1801
|
-
subtitle:
|
|
1802
|
-
content:
|
|
1803
|
-
range:
|
|
1804
|
-
track:
|
|
1805
|
-
progress:
|
|
1806
|
-
dots:
|
|
1807
|
-
dot:
|
|
1808
|
-
active:
|
|
1809
|
-
input:
|
|
1810
|
-
countBlock:
|
|
1811
|
-
count:
|
|
1812
|
-
controls:
|
|
1813
|
-
button:
|
|
1814
|
-
},
|
|
1815
|
-
const { label:
|
|
1816
|
-
|
|
1817
|
-
},
|
|
1818
|
-
|
|
1819
|
-
},
|
|
1820
|
-
const
|
|
1821
|
-
l(
|
|
2097
|
+
}, ci = "_wrapper_m18qi_1", li = "_subtitle_m18qi_7", ri = "_content_m18qi_14", di = "_range_m18qi_22", ui = "_track_m18qi_27", _i = "_progress_m18qi_36", mi = "_dots_m18qi_46", hi = "_dot_m18qi_46", pi = "_active_m18qi_65", fi = "_input_m18qi_77", gi = "_countBlock_m18qi_91", xi = "_count_m18qi_91", bi = "_controls_m18qi_107", vi = "_button_m18qi_113", W = {
|
|
2098
|
+
wrapper: ci,
|
|
2099
|
+
subtitle: li,
|
|
2100
|
+
content: ri,
|
|
2101
|
+
range: di,
|
|
2102
|
+
track: ui,
|
|
2103
|
+
progress: _i,
|
|
2104
|
+
dots: mi,
|
|
2105
|
+
dot: hi,
|
|
2106
|
+
active: pi,
|
|
2107
|
+
input: fi,
|
|
2108
|
+
countBlock: gi,
|
|
2109
|
+
count: xi,
|
|
2110
|
+
controls: bi,
|
|
2111
|
+
button: vi
|
|
2112
|
+
}, qt = (u) => {
|
|
2113
|
+
const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = u, [o, n] = f.useState(!1), d = Array.from({ length: (s - e) / i + 1 }), j = (c - e) / (s - e) * 100, p = () => {
|
|
2114
|
+
c < s && l(c + i);
|
|
2115
|
+
}, r = () => {
|
|
2116
|
+
c > e && l(c - i);
|
|
2117
|
+
}, y = (h) => {
|
|
2118
|
+
const _ = e + h * i;
|
|
2119
|
+
l(_);
|
|
1822
2120
|
};
|
|
1823
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1824
|
-
|
|
1825
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1826
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1827
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2121
|
+
return /* @__PURE__ */ t.jsxs("div", { className: W.wrapper, children: [
|
|
2122
|
+
a && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: a }),
|
|
2123
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.content, children: [
|
|
2124
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.range, children: [
|
|
2125
|
+
/* @__PURE__ */ t.jsx("div", { className: W.track }),
|
|
1828
2126
|
/* @__PURE__ */ t.jsx(
|
|
1829
2127
|
"div",
|
|
1830
2128
|
{
|
|
1831
|
-
className:
|
|
1832
|
-
style: { width: `${
|
|
2129
|
+
className: W.progress,
|
|
2130
|
+
style: { width: `${j}%` }
|
|
1833
2131
|
}
|
|
1834
2132
|
),
|
|
1835
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1836
|
-
const
|
|
2133
|
+
/* @__PURE__ */ t.jsx("div", { className: W.dots, children: d.map((h, _) => {
|
|
2134
|
+
const w = _ <= (c - e) / i;
|
|
1837
2135
|
return /* @__PURE__ */ t.jsx(
|
|
1838
2136
|
"button",
|
|
1839
2137
|
{
|
|
1840
|
-
onClick: () => _
|
|
1841
|
-
className:
|
|
1842
|
-
[
|
|
1843
|
-
[
|
|
1844
|
-
[
|
|
2138
|
+
onClick: () => y(_),
|
|
2139
|
+
className: Y(W.dot, {
|
|
2140
|
+
[W.active]: w,
|
|
2141
|
+
[W.inactive]: !w,
|
|
2142
|
+
[W.dragging]: o
|
|
1845
2143
|
}),
|
|
1846
|
-
"aria-label": `Set value to ${e +
|
|
2144
|
+
"aria-label": `Set value to ${e + _ * i}`
|
|
1847
2145
|
},
|
|
1848
|
-
|
|
2146
|
+
_
|
|
1849
2147
|
);
|
|
1850
2148
|
}) }),
|
|
1851
2149
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1855,41 +2153,41 @@ const ja = (d) => {
|
|
|
1855
2153
|
min: e,
|
|
1856
2154
|
max: s,
|
|
1857
2155
|
step: i,
|
|
1858
|
-
value:
|
|
1859
|
-
onChange: (
|
|
2156
|
+
value: c,
|
|
2157
|
+
onChange: (h) => l(Number(h.target.value)),
|
|
1860
2158
|
onMouseDown: () => n(!0),
|
|
1861
2159
|
onMouseUp: () => n(!1),
|
|
1862
2160
|
onTouchStart: () => n(!0),
|
|
1863
2161
|
onTouchEnd: () => n(!1),
|
|
1864
|
-
className:
|
|
2162
|
+
className: W.input
|
|
1865
2163
|
}
|
|
1866
2164
|
)
|
|
1867
2165
|
] }),
|
|
1868
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2166
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.countBlock, children: [
|
|
1869
2167
|
/* @__PURE__ */ t.jsx(
|
|
1870
|
-
|
|
2168
|
+
tt,
|
|
1871
2169
|
{
|
|
1872
2170
|
type: "number",
|
|
1873
2171
|
min: e,
|
|
1874
2172
|
max: s,
|
|
1875
2173
|
paddingless: !0,
|
|
1876
|
-
onChange: (
|
|
1877
|
-
const
|
|
1878
|
-
|
|
2174
|
+
onChange: (h) => {
|
|
2175
|
+
const _ = Number(h);
|
|
2176
|
+
_ > s ? l(s) : _ < e ? l(e) : l(_);
|
|
1879
2177
|
},
|
|
1880
|
-
value: String(
|
|
2178
|
+
value: String(c)
|
|
1881
2179
|
}
|
|
1882
2180
|
),
|
|
1883
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2181
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.controls, children: [
|
|
1884
2182
|
/* @__PURE__ */ t.jsx(
|
|
1885
2183
|
"button",
|
|
1886
2184
|
{
|
|
1887
|
-
onClick:
|
|
1888
|
-
disabled:
|
|
1889
|
-
className:
|
|
2185
|
+
onClick: p,
|
|
2186
|
+
disabled: c >= s,
|
|
2187
|
+
className: W.button,
|
|
1890
2188
|
"aria-label": "Increment count",
|
|
1891
2189
|
children: /* @__PURE__ */ t.jsx(
|
|
1892
|
-
|
|
2190
|
+
b,
|
|
1893
2191
|
{
|
|
1894
2192
|
name: "CaretUp",
|
|
1895
2193
|
width: 15,
|
|
@@ -1901,12 +2199,12 @@ const ja = (d) => {
|
|
|
1901
2199
|
/* @__PURE__ */ t.jsx(
|
|
1902
2200
|
"button",
|
|
1903
2201
|
{
|
|
1904
|
-
onClick:
|
|
1905
|
-
disabled:
|
|
1906
|
-
className:
|
|
2202
|
+
onClick: r,
|
|
2203
|
+
disabled: c <= e,
|
|
2204
|
+
className: W.button,
|
|
1907
2205
|
"aria-label": "Decrement count",
|
|
1908
2206
|
children: /* @__PURE__ */ t.jsx(
|
|
1909
|
-
|
|
2207
|
+
b,
|
|
1910
2208
|
{
|
|
1911
2209
|
name: "CaretDown",
|
|
1912
2210
|
width: 15,
|
|
@@ -1919,52 +2217,48 @@ const ja = (d) => {
|
|
|
1919
2217
|
] })
|
|
1920
2218
|
] })
|
|
1921
2219
|
] });
|
|
1922
|
-
},
|
|
1923
|
-
title:
|
|
1924
|
-
subtitle:
|
|
1925
|
-
header:
|
|
1926
|
-
text:
|
|
1927
|
-
productsBlock:
|
|
1928
|
-
top:
|
|
1929
|
-
itemsBlock:
|
|
1930
|
-
typeTexts:
|
|
1931
|
-
block:
|
|
1932
|
-
active:
|
|
1933
|
-
products:
|
|
1934
|
-
product:
|
|
1935
|
-
button:
|
|
1936
|
-
image:
|
|
1937
|
-
info:
|
|
1938
|
-
name:
|
|
1939
|
-
buttons:
|
|
1940
|
-
modal:
|
|
1941
|
-
link:
|
|
1942
|
-
modalOptions:
|
|
1943
|
-
addButton:
|
|
1944
|
-
deleteButton:
|
|
1945
|
-
closeIcon:
|
|
1946
|
-
},
|
|
1947
|
-
const { activeItem:
|
|
1948
|
-
|
|
1949
|
-
function r(n, c) {
|
|
1950
|
-
return n.length > c ? `${n.slice(0, c)}...` : n;
|
|
1951
|
-
}
|
|
1952
|
-
return /* @__PURE__ */ t.jsxs(
|
|
2220
|
+
}, ji = "_title_ix5ax_1", yi = "_subtitle_ix5ax_5", ki = "_header_ix5ax_12", $i = "_text_ix5ax_13", Ii = "_productsBlock_ix5ax_14", Ni = "_top_ix5ax_26", wi = "_itemsBlock_ix5ax_35", Ci = "_typeTexts_ix5ax_41", Si = "_block_ix5ax_48", Bi = "_active_ix5ax_61", Ti = "_products_ix5ax_14", Pi = "_product_ix5ax_14", Ai = "_button_ix5ax_80", Oi = "_image_ix5ax_91", Mi = "_info_ix5ax_98", qi = "_name_ix5ax_110", Ei = "_buttons_ix5ax_114", Di = "_modal_ix5ax_121", Ui = "_link_ix5ax_141", Hi = "_modalOptions_ix5ax_147", Ri = "_addButton_ix5ax_160", Li = "_deleteButton_ix5ax_175", zi = "_closeIcon_ix5ax_187", G = {
|
|
2221
|
+
title: ji,
|
|
2222
|
+
subtitle: yi,
|
|
2223
|
+
header: ki,
|
|
2224
|
+
text: $i,
|
|
2225
|
+
productsBlock: Ii,
|
|
2226
|
+
top: Ni,
|
|
2227
|
+
itemsBlock: wi,
|
|
2228
|
+
typeTexts: Ci,
|
|
2229
|
+
block: Si,
|
|
2230
|
+
active: Bi,
|
|
2231
|
+
products: Ti,
|
|
2232
|
+
product: Pi,
|
|
2233
|
+
button: Ai,
|
|
2234
|
+
image: Oi,
|
|
2235
|
+
info: Mi,
|
|
2236
|
+
name: qi,
|
|
2237
|
+
buttons: Ei,
|
|
2238
|
+
modal: Di,
|
|
2239
|
+
link: Ui,
|
|
2240
|
+
modalOptions: Hi,
|
|
2241
|
+
addButton: Ri,
|
|
2242
|
+
deleteButton: Li,
|
|
2243
|
+
closeIcon: zi
|
|
2244
|
+
}, Fi = (u) => {
|
|
2245
|
+
const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = u, l = c.find((o) => o.id === a.listingId);
|
|
2246
|
+
return l ? /* @__PURE__ */ t.jsxs(
|
|
1953
2247
|
"div",
|
|
1954
2248
|
{
|
|
1955
|
-
className:
|
|
1956
|
-
onClick: (
|
|
1957
|
-
|
|
2249
|
+
className: G.modal,
|
|
2250
|
+
onClick: (o) => {
|
|
2251
|
+
o.stopPropagation();
|
|
1958
2252
|
},
|
|
1959
2253
|
style: {
|
|
1960
2254
|
top: `${s.top}px`,
|
|
1961
2255
|
left: `${s.left}px`
|
|
1962
2256
|
},
|
|
1963
2257
|
children: [
|
|
1964
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1965
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1966
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1967
|
-
|
|
2258
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
2259
|
+
/* @__PURE__ */ t.jsx("h3", { children: Yt(l.productData.name) }),
|
|
2260
|
+
/* @__PURE__ */ t.jsx("div", { className: G.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
2261
|
+
b,
|
|
1968
2262
|
{
|
|
1969
2263
|
name: "X",
|
|
1970
2264
|
height: 20,
|
|
@@ -1975,105 +2269,105 @@ const ja = (d) => {
|
|
|
1975
2269
|
}
|
|
1976
2270
|
) })
|
|
1977
2271
|
] }),
|
|
1978
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1979
|
-
|
|
2272
|
+
/* @__PURE__ */ t.jsx("div", { className: G.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
2273
|
+
bt,
|
|
1980
2274
|
{
|
|
1981
2275
|
label: "Put up an attractive image",
|
|
1982
2276
|
activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
|
|
1983
|
-
onChange: (
|
|
1984
|
-
const
|
|
1985
|
-
...
|
|
1986
|
-
image:
|
|
2277
|
+
onChange: (o) => {
|
|
2278
|
+
const n = {
|
|
2279
|
+
...a,
|
|
2280
|
+
image: o[0]
|
|
1987
2281
|
};
|
|
1988
|
-
e(
|
|
2282
|
+
e(n);
|
|
1989
2283
|
}
|
|
1990
2284
|
}
|
|
1991
2285
|
) })
|
|
1992
2286
|
]
|
|
1993
2287
|
}
|
|
1994
|
-
);
|
|
2288
|
+
) : null;
|
|
1995
2289
|
};
|
|
1996
|
-
function
|
|
1997
|
-
const { product:
|
|
1998
|
-
id: String(
|
|
1999
|
-
}),
|
|
2000
|
-
transform:
|
|
2001
|
-
transition:
|
|
2290
|
+
function Vi(u) {
|
|
2291
|
+
const { product: a, children: e } = u, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
|
|
2292
|
+
id: String(a.listingId)
|
|
2293
|
+
}), d = {
|
|
2294
|
+
transform: St.Transform.toString(l),
|
|
2295
|
+
transition: o
|
|
2002
2296
|
};
|
|
2003
2297
|
return /* @__PURE__ */ t.jsx(
|
|
2004
2298
|
"div",
|
|
2005
2299
|
{
|
|
2006
|
-
ref:
|
|
2007
|
-
style:
|
|
2008
|
-
className: `${
|
|
2300
|
+
ref: c,
|
|
2301
|
+
style: d,
|
|
2302
|
+
className: `${G.product} ${n ? G.dragging : ""}`,
|
|
2009
2303
|
...s,
|
|
2010
2304
|
...i,
|
|
2011
2305
|
children: e
|
|
2012
2306
|
}
|
|
2013
2307
|
);
|
|
2014
2308
|
}
|
|
2015
|
-
const
|
|
2309
|
+
const tc = (u) => {
|
|
2016
2310
|
const {
|
|
2017
|
-
isActiveItems:
|
|
2311
|
+
isActiveItems: a,
|
|
2018
2312
|
setIsActiveItems: e,
|
|
2019
2313
|
items: s,
|
|
2020
2314
|
setItems: i,
|
|
2021
|
-
other:
|
|
2315
|
+
other: c,
|
|
2022
2316
|
title: l,
|
|
2023
|
-
subtitle:
|
|
2317
|
+
subtitle: o,
|
|
2024
2318
|
editable: n = !0,
|
|
2025
|
-
draggable:
|
|
2026
|
-
withImage:
|
|
2027
|
-
deletable:
|
|
2028
|
-
addable:
|
|
2029
|
-
itemsType:
|
|
2030
|
-
itemsOptions:
|
|
2031
|
-
} =
|
|
2319
|
+
draggable: d = !1,
|
|
2320
|
+
withImage: j = !1,
|
|
2321
|
+
deletable: p = !0,
|
|
2322
|
+
addable: r = !0,
|
|
2323
|
+
itemsType: y,
|
|
2324
|
+
itemsOptions: h
|
|
2325
|
+
} = u, [_, w] = f.useState(
|
|
2032
2326
|
null
|
|
2033
|
-
), [H,
|
|
2327
|
+
), [H, $] = f.useState({
|
|
2034
2328
|
top: 0,
|
|
2035
2329
|
left: 0
|
|
2036
|
-
}), [
|
|
2037
|
-
|
|
2330
|
+
}), [g, B] = f.useState(!1), E = yt(
|
|
2331
|
+
kt(wt, {
|
|
2038
2332
|
activationConstraint: {
|
|
2039
2333
|
distance: 5
|
|
2040
2334
|
}
|
|
2041
2335
|
})
|
|
2042
2336
|
);
|
|
2043
2337
|
f.useEffect(() => {
|
|
2044
|
-
const
|
|
2045
|
-
|
|
2338
|
+
const x = () => {
|
|
2339
|
+
w(null), B(!1);
|
|
2046
2340
|
};
|
|
2047
|
-
return document.body.addEventListener("click",
|
|
2048
|
-
|
|
2341
|
+
return document.body.addEventListener("click", x), w(null), B(!1), () => {
|
|
2342
|
+
w(null), B(!1), document.body.removeEventListener("click", x);
|
|
2049
2343
|
};
|
|
2050
2344
|
}, []), f.useEffect(() => {
|
|
2051
|
-
if (
|
|
2052
|
-
const
|
|
2053
|
-
i(
|
|
2345
|
+
if (_) {
|
|
2346
|
+
const x = [...s].map((I) => I.listingId === _.listingId ? _ : I);
|
|
2347
|
+
i(x);
|
|
2054
2348
|
}
|
|
2055
|
-
}, [
|
|
2056
|
-
const F = (
|
|
2057
|
-
|
|
2058
|
-
const
|
|
2059
|
-
let
|
|
2060
|
-
|
|
2061
|
-
top:
|
|
2062
|
-
left:
|
|
2063
|
-
}),
|
|
2349
|
+
}, [_]);
|
|
2350
|
+
const F = (x, I) => {
|
|
2351
|
+
x.stopPropagation();
|
|
2352
|
+
const C = x.target.getBoundingClientRect(), R = 100, O = window.innerHeight;
|
|
2353
|
+
let U = C.top + window.scrollY;
|
|
2354
|
+
U + R > O && (U = O - R - 20), B(!0), $({
|
|
2355
|
+
top: U - 80,
|
|
2356
|
+
left: C.left - 30
|
|
2357
|
+
}), w(I);
|
|
2064
2358
|
};
|
|
2065
|
-
function
|
|
2066
|
-
if (
|
|
2067
|
-
return
|
|
2359
|
+
function T(x) {
|
|
2360
|
+
if (j)
|
|
2361
|
+
return x ? /* @__PURE__ */ t.jsx(
|
|
2068
2362
|
"img",
|
|
2069
2363
|
{
|
|
2070
|
-
src: `https://imagedelivery.net/${
|
|
2364
|
+
src: `https://imagedelivery.net/${x}/w=1000`,
|
|
2071
2365
|
alt: "image",
|
|
2072
2366
|
width: 16,
|
|
2073
2367
|
height: 16
|
|
2074
2368
|
}
|
|
2075
2369
|
) : /* @__PURE__ */ t.jsx(
|
|
2076
|
-
|
|
2370
|
+
b,
|
|
2077
2371
|
{
|
|
2078
2372
|
name: "Image",
|
|
2079
2373
|
width: 16,
|
|
@@ -2082,21 +2376,21 @@ const ka = (d) => {
|
|
|
2082
2376
|
}
|
|
2083
2377
|
);
|
|
2084
2378
|
}
|
|
2085
|
-
const
|
|
2086
|
-
const { active:
|
|
2087
|
-
if (
|
|
2088
|
-
const
|
|
2089
|
-
if (
|
|
2090
|
-
const
|
|
2091
|
-
|
|
2379
|
+
const v = (x) => {
|
|
2380
|
+
const { active: I, over: C } = x;
|
|
2381
|
+
if (C && I.id !== C.id) {
|
|
2382
|
+
const R = s.findIndex((U) => String(U.listingId) === I.id), O = s.findIndex((U) => String(U.listingId) === C.id);
|
|
2383
|
+
if (R !== -1 && O !== -1) {
|
|
2384
|
+
const U = [...s], [nt] = U.splice(R, 1);
|
|
2385
|
+
U.splice(O, 0, nt), i(U);
|
|
2092
2386
|
}
|
|
2093
2387
|
}
|
|
2094
|
-
},
|
|
2095
|
-
const
|
|
2096
|
-
if (!
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2099
|
-
|
|
2388
|
+
}, A = (x, I) => {
|
|
2389
|
+
const C = h.find((O) => x.listingId === O.id);
|
|
2390
|
+
if (!C) return null;
|
|
2391
|
+
const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2392
|
+
d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2393
|
+
b,
|
|
2100
2394
|
{
|
|
2101
2395
|
name: "DotsSixVertical",
|
|
2102
2396
|
hoverable: !0,
|
|
@@ -2104,107 +2398,107 @@ const ka = (d) => {
|
|
|
2104
2398
|
height: 20
|
|
2105
2399
|
}
|
|
2106
2400
|
) }),
|
|
2107
|
-
|
|
2401
|
+
y === "select" && /* @__PURE__ */ t.jsx(
|
|
2108
2402
|
et,
|
|
2109
2403
|
{
|
|
2110
2404
|
onChange: (O) => {
|
|
2111
|
-
const
|
|
2112
|
-
if (!
|
|
2113
|
-
const
|
|
2114
|
-
listingId:
|
|
2115
|
-
image:
|
|
2116
|
-
},
|
|
2117
|
-
|
|
2405
|
+
const U = [...s], nt = h.find((D) => D.productData.name === O);
|
|
2406
|
+
if (!nt) return;
|
|
2407
|
+
const dt = {
|
|
2408
|
+
listingId: nt.id,
|
|
2409
|
+
image: nt.productData.images.length > 0 ? nt.productData.images[0].cfId : ""
|
|
2410
|
+
}, k = U.map((D) => D.listingId === x.listingId ? dt : D);
|
|
2411
|
+
w(dt), i([...k]);
|
|
2118
2412
|
},
|
|
2119
|
-
value:
|
|
2413
|
+
value: C.productData.name,
|
|
2120
2414
|
options: [
|
|
2121
|
-
...
|
|
2415
|
+
...h.filter((O) => !s.find((U) => U.listingId === O.id)).map((O) => O.productData.name)
|
|
2122
2416
|
],
|
|
2123
|
-
leftAddon:
|
|
2124
|
-
|
|
2417
|
+
leftAddon: T(
|
|
2418
|
+
x.image || C.productData.images.length > 0 && C.productData.images[0].cfId || ""
|
|
2125
2419
|
)
|
|
2126
2420
|
},
|
|
2127
|
-
|
|
2421
|
+
I
|
|
2128
2422
|
),
|
|
2129
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2130
|
-
n && /* @__PURE__ */ t.jsx("div", { className:
|
|
2131
|
-
|
|
2423
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
|
|
2424
|
+
n && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2425
|
+
b,
|
|
2132
2426
|
{
|
|
2133
2427
|
name: "Sliders",
|
|
2134
2428
|
hoverable: !0,
|
|
2135
2429
|
width: 20,
|
|
2136
2430
|
height: 20,
|
|
2137
|
-
onClick: (O) => F(O,
|
|
2431
|
+
onClick: (O) => F(O, x)
|
|
2138
2432
|
}
|
|
2139
2433
|
) }),
|
|
2140
|
-
|
|
2141
|
-
|
|
2434
|
+
p && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2435
|
+
b,
|
|
2142
2436
|
{
|
|
2143
2437
|
name: "Trash",
|
|
2144
2438
|
hoverable: !0,
|
|
2145
2439
|
width: 20,
|
|
2146
2440
|
height: 20,
|
|
2147
2441
|
fill: "#C12A2A",
|
|
2148
|
-
onClick: () => i(s.filter((O) => O !==
|
|
2442
|
+
onClick: () => i(s.filter((O) => O !== x))
|
|
2149
2443
|
}
|
|
2150
2444
|
) })
|
|
2151
2445
|
] })
|
|
2152
2446
|
] });
|
|
2153
|
-
return
|
|
2154
|
-
|
|
2447
|
+
return d ? /* @__PURE__ */ t.jsx(
|
|
2448
|
+
Vi,
|
|
2155
2449
|
{
|
|
2156
|
-
product:
|
|
2157
|
-
children:
|
|
2450
|
+
product: x,
|
|
2451
|
+
children: R
|
|
2158
2452
|
},
|
|
2159
|
-
|
|
2453
|
+
x.listingId
|
|
2160
2454
|
) : /* @__PURE__ */ t.jsx(
|
|
2161
2455
|
"div",
|
|
2162
2456
|
{
|
|
2163
|
-
className:
|
|
2164
|
-
children:
|
|
2457
|
+
className: G.product,
|
|
2458
|
+
children: R
|
|
2165
2459
|
},
|
|
2166
|
-
|
|
2460
|
+
x.listingId
|
|
2167
2461
|
);
|
|
2168
2462
|
};
|
|
2169
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2170
|
-
(l ||
|
|
2171
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
2172
|
-
|
|
2463
|
+
return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
|
|
2464
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
2465
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: l }),
|
|
2466
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2173
2467
|
st,
|
|
2174
2468
|
{
|
|
2175
|
-
current:
|
|
2176
|
-
onChange: (
|
|
2469
|
+
current: a,
|
|
2470
|
+
onChange: (x) => e == null ? void 0 : e(x)
|
|
2177
2471
|
}
|
|
2178
2472
|
)
|
|
2179
2473
|
] }),
|
|
2180
|
-
|
|
2181
|
-
|
|
2474
|
+
g && _ && /* @__PURE__ */ t.jsx(
|
|
2475
|
+
Fi,
|
|
2182
2476
|
{
|
|
2183
|
-
activeItem:
|
|
2184
|
-
setActiveItem:
|
|
2185
|
-
setIsOpenModal:
|
|
2477
|
+
activeItem: _,
|
|
2478
|
+
setActiveItem: w,
|
|
2479
|
+
setIsOpenModal: B,
|
|
2186
2480
|
popupPosition: H,
|
|
2187
|
-
itemsOptions:
|
|
2481
|
+
itemsOptions: h
|
|
2188
2482
|
}
|
|
2189
2483
|
),
|
|
2190
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2484
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
2485
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
|
|
2486
|
+
d ? /* @__PURE__ */ t.jsx(
|
|
2487
|
+
$t,
|
|
2194
2488
|
{
|
|
2195
|
-
sensors:
|
|
2196
|
-
onDragEnd:
|
|
2489
|
+
sensors: E,
|
|
2490
|
+
onDragEnd: v,
|
|
2197
2491
|
children: /* @__PURE__ */ t.jsx(
|
|
2198
|
-
|
|
2492
|
+
It,
|
|
2199
2493
|
{
|
|
2200
|
-
items: s.map((
|
|
2201
|
-
strategy:
|
|
2202
|
-
children: s.map((
|
|
2494
|
+
items: s.map((x) => String(x.listingId)),
|
|
2495
|
+
strategy: Nt,
|
|
2496
|
+
children: s.map((x, I) => A(x, I))
|
|
2203
2497
|
}
|
|
2204
2498
|
)
|
|
2205
2499
|
}
|
|
2206
|
-
) : s.map((
|
|
2207
|
-
|
|
2500
|
+
) : s.map((x, I) => A(x, I)),
|
|
2501
|
+
r && /* @__PURE__ */ t.jsx(
|
|
2208
2502
|
"div",
|
|
2209
2503
|
{
|
|
2210
2504
|
style: {
|
|
@@ -2213,31 +2507,31 @@ const ka = (d) => {
|
|
|
2213
2507
|
justifyContent: "center"
|
|
2214
2508
|
},
|
|
2215
2509
|
children: /* @__PURE__ */ t.jsx(
|
|
2216
|
-
|
|
2510
|
+
ot,
|
|
2217
2511
|
{
|
|
2218
2512
|
withoutHover: !0,
|
|
2219
|
-
className:
|
|
2513
|
+
className: G.button,
|
|
2220
2514
|
size: "s",
|
|
2221
2515
|
onClick: () => {
|
|
2222
|
-
const
|
|
2223
|
-
for (let
|
|
2224
|
-
if (!s.find((
|
|
2225
|
-
|
|
2226
|
-
listingId:
|
|
2227
|
-
image:
|
|
2516
|
+
const x = [...s];
|
|
2517
|
+
for (let I = 0; I < h.length; I++)
|
|
2518
|
+
if (!s.find((C) => C.listingId === h[I].id)) {
|
|
2519
|
+
x.push({
|
|
2520
|
+
listingId: h[I].id,
|
|
2521
|
+
image: h[I].productData.images.length > 0 ? h[I].productData.images[0].cfId : ""
|
|
2228
2522
|
});
|
|
2229
2523
|
break;
|
|
2230
2524
|
}
|
|
2231
|
-
i(
|
|
2525
|
+
i(x);
|
|
2232
2526
|
},
|
|
2233
|
-
disabled: s.length ===
|
|
2527
|
+
disabled: s.length === h.length,
|
|
2234
2528
|
style: {
|
|
2235
2529
|
width: "fit-content"
|
|
2236
2530
|
},
|
|
2237
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2531
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
|
|
2238
2532
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2239
2533
|
/* @__PURE__ */ t.jsx(
|
|
2240
|
-
|
|
2534
|
+
b,
|
|
2241
2535
|
{
|
|
2242
2536
|
name: "Plus",
|
|
2243
2537
|
width: 16,
|
|
@@ -2250,71 +2544,71 @@ const ka = (d) => {
|
|
|
2250
2544
|
}
|
|
2251
2545
|
)
|
|
2252
2546
|
] }),
|
|
2253
|
-
|
|
2547
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
|
|
2254
2548
|
] });
|
|
2255
|
-
},
|
|
2256
|
-
options:
|
|
2257
|
-
price:
|
|
2258
|
-
oldPrice:
|
|
2259
|
-
newPrice:
|
|
2260
|
-
animate:
|
|
2261
|
-
appearAndBounce:
|
|
2262
|
-
meta:
|
|
2263
|
-
info:
|
|
2264
|
-
infoRight:
|
|
2265
|
-
buttons:
|
|
2266
|
-
variants:
|
|
2267
|
-
variant:
|
|
2268
|
-
stock:
|
|
2269
|
-
variantInfo:
|
|
2270
|
-
quantity:
|
|
2271
|
-
count:
|
|
2272
|
-
focused:
|
|
2273
|
-
button:
|
|
2274
|
-
activeVariant:
|
|
2275
|
-
chargeTypes:
|
|
2276
|
-
charge:
|
|
2277
|
-
chargeActive:
|
|
2278
|
-
title:
|
|
2279
|
-
},
|
|
2280
|
-
wrapper:
|
|
2281
|
-
label:
|
|
2282
|
-
input:
|
|
2283
|
-
paddingless:
|
|
2284
|
-
content:
|
|
2285
|
-
contentBorder:
|
|
2286
|
-
borderless:
|
|
2287
|
-
rightIcon:
|
|
2288
|
-
},
|
|
2549
|
+
}, Yi = "_options_6cemk_1", Gi = "_price_6cemk_12", Xi = "_oldPrice_6cemk_19", Wi = "_newPrice_6cemk_27", Ji = "_animate_6cemk_34", Qi = "_appearAndBounce_6cemk_1", Ki = "_meta_6cemk_52", Zi = "_info_6cemk_58", to = "_infoRight_6cemk_66", eo = "_buttons_6cemk_73", so = "_variants_6cemk_80", no = "_variant_6cemk_80", io = "_stock_6cemk_98", oo = "_variantInfo_6cemk_105", ao = "_quantity_6cemk_111", co = "_count_6cemk_118", lo = "_focused_6cemk_135", ro = "_button_6cemk_73", uo = "_activeVariant_6cemk_161", _o = "_chargeTypes_6cemk_165", mo = "_charge_6cemk_165", ho = "_chargeActive_6cemk_190", po = "_title_6cemk_198", P = {
|
|
2550
|
+
options: Yi,
|
|
2551
|
+
price: Gi,
|
|
2552
|
+
oldPrice: Xi,
|
|
2553
|
+
newPrice: Wi,
|
|
2554
|
+
animate: Ji,
|
|
2555
|
+
appearAndBounce: Qi,
|
|
2556
|
+
meta: Ki,
|
|
2557
|
+
info: Zi,
|
|
2558
|
+
infoRight: to,
|
|
2559
|
+
buttons: eo,
|
|
2560
|
+
variants: so,
|
|
2561
|
+
variant: no,
|
|
2562
|
+
stock: io,
|
|
2563
|
+
variantInfo: oo,
|
|
2564
|
+
quantity: ao,
|
|
2565
|
+
count: co,
|
|
2566
|
+
focused: lo,
|
|
2567
|
+
button: ro,
|
|
2568
|
+
activeVariant: uo,
|
|
2569
|
+
chargeTypes: _o,
|
|
2570
|
+
charge: mo,
|
|
2571
|
+
chargeActive: ho,
|
|
2572
|
+
title: po
|
|
2573
|
+
}, fo = "_wrapper_c1dht_1", go = "_label_c1dht_9", xo = "_input_c1dht_18", bo = "_paddingless_c1dht_31", vo = "_content_c1dht_35", jo = "_contentBorder_c1dht_47", yo = "_borderless_c1dht_52", ko = "_rightIcon_c1dht_57", it = {
|
|
2574
|
+
wrapper: fo,
|
|
2575
|
+
label: go,
|
|
2576
|
+
input: xo,
|
|
2577
|
+
paddingless: bo,
|
|
2578
|
+
content: vo,
|
|
2579
|
+
contentBorder: jo,
|
|
2580
|
+
borderless: yo,
|
|
2581
|
+
rightIcon: ko
|
|
2582
|
+
}, $o = (u) => {
|
|
2289
2583
|
const {
|
|
2290
|
-
onChange:
|
|
2584
|
+
onChange: a,
|
|
2291
2585
|
style: e,
|
|
2292
2586
|
label: s,
|
|
2293
2587
|
value: i,
|
|
2294
|
-
type:
|
|
2588
|
+
type: c,
|
|
2295
2589
|
min: l,
|
|
2296
|
-
max:
|
|
2590
|
+
max: o,
|
|
2297
2591
|
placeholder: n,
|
|
2298
|
-
disabled:
|
|
2299
|
-
required:
|
|
2300
|
-
regex:
|
|
2301
|
-
paddingless:
|
|
2302
|
-
borderless:
|
|
2303
|
-
editable:
|
|
2304
|
-
isSearch:
|
|
2305
|
-
centered:
|
|
2306
|
-
} =
|
|
2307
|
-
function
|
|
2308
|
-
return Number(
|
|
2592
|
+
disabled: d = !1,
|
|
2593
|
+
required: j = !1,
|
|
2594
|
+
regex: p,
|
|
2595
|
+
paddingless: r = !1,
|
|
2596
|
+
borderless: y = !1,
|
|
2597
|
+
editable: h = !1,
|
|
2598
|
+
isSearch: _ = !1,
|
|
2599
|
+
centered: w = !1
|
|
2600
|
+
} = u, { themeSettings: H } = Dt(), { inputs: $ } = H, [g, B] = f.useState(!1);
|
|
2601
|
+
function E(T) {
|
|
2602
|
+
return Number(T) < 0 ? String(l) : T;
|
|
2309
2603
|
}
|
|
2310
|
-
function F(
|
|
2311
|
-
return !
|
|
2604
|
+
function F(T) {
|
|
2605
|
+
return !j || !p ? !0 : new RegExp(p).test(T);
|
|
2312
2606
|
}
|
|
2313
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2607
|
+
return /* @__PURE__ */ t.jsxs("div", { className: it.wrapper, children: [
|
|
2314
2608
|
s && /* @__PURE__ */ t.jsx(
|
|
2315
2609
|
"label",
|
|
2316
2610
|
{
|
|
2317
|
-
className:
|
|
2611
|
+
className: it.label,
|
|
2318
2612
|
htmlFor: s,
|
|
2319
2613
|
children: s
|
|
2320
2614
|
}
|
|
@@ -2322,55 +2616,55 @@ const ka = (d) => {
|
|
|
2322
2616
|
/* @__PURE__ */ t.jsxs(
|
|
2323
2617
|
"div",
|
|
2324
2618
|
{
|
|
2325
|
-
className:
|
|
2326
|
-
[
|
|
2619
|
+
className: Y(it.content, {
|
|
2620
|
+
[it.contentBorder]: $.border.active
|
|
2327
2621
|
}),
|
|
2328
2622
|
style: {
|
|
2329
2623
|
...e,
|
|
2330
|
-
background:
|
|
2331
|
-
padding:
|
|
2624
|
+
background: $.field.active ? $.field.color : "transparent",
|
|
2625
|
+
padding: _ ? `7px ${Number($.general.size) + 20}px 7px 11px` : "7px 11px"
|
|
2332
2626
|
},
|
|
2333
2627
|
children: [
|
|
2334
2628
|
/* @__PURE__ */ t.jsx(
|
|
2335
2629
|
"input",
|
|
2336
2630
|
{
|
|
2337
2631
|
id: s,
|
|
2338
|
-
type:
|
|
2339
|
-
onChange: (
|
|
2340
|
-
if (
|
|
2632
|
+
type: c || "text",
|
|
2633
|
+
onChange: (T) => {
|
|
2634
|
+
if (c === "text") a(T.target.value);
|
|
2341
2635
|
else {
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2636
|
+
const v = E(T.target.value);
|
|
2637
|
+
a(v);
|
|
2344
2638
|
}
|
|
2345
2639
|
},
|
|
2346
2640
|
value: i,
|
|
2347
2641
|
autoComplete: "off",
|
|
2348
2642
|
placeholder: n || "Type something...",
|
|
2349
|
-
className:
|
|
2350
|
-
[
|
|
2351
|
-
[
|
|
2352
|
-
[
|
|
2643
|
+
className: Y(it.input, {
|
|
2644
|
+
[it.required]: g && j && !F(i),
|
|
2645
|
+
[it.paddingless]: r,
|
|
2646
|
+
[it.borderless]: y
|
|
2353
2647
|
}),
|
|
2354
|
-
min:
|
|
2355
|
-
max:
|
|
2356
|
-
disabled:
|
|
2357
|
-
onFocus: () =>
|
|
2648
|
+
min: c === "number" ? l : void 0,
|
|
2649
|
+
max: c === "number" ? o : void 0,
|
|
2650
|
+
disabled: d,
|
|
2651
|
+
onFocus: () => B(!0),
|
|
2358
2652
|
style: {
|
|
2359
|
-
textAlign:
|
|
2653
|
+
textAlign: w ? "center" : "left"
|
|
2360
2654
|
}
|
|
2361
2655
|
}
|
|
2362
2656
|
),
|
|
2363
|
-
|
|
2364
|
-
|
|
2657
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: it.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2658
|
+
b,
|
|
2365
2659
|
{
|
|
2366
2660
|
name: "MagnifyingGlass",
|
|
2367
2661
|
fill: "var(--icon-secondary)",
|
|
2368
|
-
width:
|
|
2369
|
-
height:
|
|
2662
|
+
width: $.general.size,
|
|
2663
|
+
height: $.general.size
|
|
2370
2664
|
}
|
|
2371
2665
|
) }),
|
|
2372
|
-
|
|
2373
|
-
|
|
2666
|
+
h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2667
|
+
b,
|
|
2374
2668
|
{
|
|
2375
2669
|
name: "Sliders",
|
|
2376
2670
|
width: 20,
|
|
@@ -2382,37 +2676,37 @@ const ka = (d) => {
|
|
|
2382
2676
|
}
|
|
2383
2677
|
)
|
|
2384
2678
|
] });
|
|
2385
|
-
},
|
|
2386
|
-
button:
|
|
2387
|
-
primary:
|
|
2388
|
-
primaryHovered:
|
|
2389
|
-
secondary:
|
|
2390
|
-
secondaryHovered:
|
|
2391
|
-
tertiary:
|
|
2392
|
-
tertiaryHovered:
|
|
2393
|
-
content:
|
|
2394
|
-
},
|
|
2395
|
-
const { children:
|
|
2679
|
+
}, Io = "_button_85085_1", No = "_primary_85085_20", wo = "_primaryHovered_85085_30", Co = "_secondary_85085_34", So = "_secondaryHovered_85085_44", Bo = "_tertiary_85085_48", To = "_tertiaryHovered_85085_58", Po = "_content_85085_62", ct = {
|
|
2680
|
+
button: Io,
|
|
2681
|
+
primary: No,
|
|
2682
|
+
primaryHovered: wo,
|
|
2683
|
+
secondary: Co,
|
|
2684
|
+
secondaryHovered: So,
|
|
2685
|
+
tertiary: Bo,
|
|
2686
|
+
tertiaryHovered: To,
|
|
2687
|
+
content: Po
|
|
2688
|
+
}, Q = (u) => {
|
|
2689
|
+
const { children: a, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = u, { themeSettings: o } = Dt();
|
|
2396
2690
|
return /* @__PURE__ */ t.jsx(
|
|
2397
2691
|
"button",
|
|
2398
2692
|
{
|
|
2399
|
-
className:
|
|
2400
|
-
[
|
|
2401
|
-
[
|
|
2402
|
-
[
|
|
2403
|
-
[
|
|
2404
|
-
[
|
|
2405
|
-
[
|
|
2693
|
+
className: Y(ct.button, i, {
|
|
2694
|
+
[ct.primary]: l === "Primary",
|
|
2695
|
+
[ct.secondary]: l === "Secondary",
|
|
2696
|
+
[ct.tertiary]: l === "Tertiary",
|
|
2697
|
+
[ct.primaryHovered]: l === "Primary" && !c && o.buttons.primary.hover,
|
|
2698
|
+
[ct.secondaryHovered]: l === "Secondary" && !c && o.buttons.secondary.hover,
|
|
2699
|
+
[ct.tertiaryHovered]: l === "Tertiary" && !c && o.buttons.tertiary.hover
|
|
2406
2700
|
}),
|
|
2407
2701
|
onClick: e,
|
|
2408
2702
|
style: {
|
|
2409
2703
|
...s
|
|
2410
2704
|
},
|
|
2411
|
-
disabled:
|
|
2412
|
-
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2413
|
-
|
|
2705
|
+
disabled: c,
|
|
2706
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ct.content, children: [
|
|
2707
|
+
a,
|
|
2414
2708
|
/* @__PURE__ */ t.jsx(
|
|
2415
|
-
|
|
2709
|
+
b,
|
|
2416
2710
|
{
|
|
2417
2711
|
name: "ArrowRight",
|
|
2418
2712
|
fill: "var(--icon-tertiary)",
|
|
@@ -2420,78 +2714,77 @@ const ka = (d) => {
|
|
|
2420
2714
|
height: 20
|
|
2421
2715
|
}
|
|
2422
2716
|
)
|
|
2423
|
-
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children:
|
|
2717
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
|
|
2424
2718
|
}
|
|
2425
2719
|
);
|
|
2426
2720
|
};
|
|
2427
|
-
var
|
|
2428
|
-
const
|
|
2429
|
-
var
|
|
2430
|
-
const { variants:
|
|
2721
|
+
var zt = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))(zt || {});
|
|
2722
|
+
const ec = (u) => {
|
|
2723
|
+
var H, $;
|
|
2724
|
+
const { variants: a } = u, [e, s] = f.useState(a[0]), [i, c] = f.useState(e.chargeTypes[0]), l = Bt(), [o, n] = f.useState(1), { reset: d, addProductToCart: j, getProducts: p } = Ot(), [r, y] = f.useState(!1);
|
|
2431
2725
|
f.useEffect(() => {
|
|
2432
|
-
|
|
2433
|
-
const g = setTimeout(() =>
|
|
2726
|
+
y(!0);
|
|
2727
|
+
const g = setTimeout(() => y(!1), 600);
|
|
2434
2728
|
return () => clearTimeout(g);
|
|
2435
|
-
}, [
|
|
2436
|
-
async function
|
|
2437
|
-
await
|
|
2438
|
-
productId:
|
|
2729
|
+
}, [o]);
|
|
2730
|
+
async function h() {
|
|
2731
|
+
await p(), await j({
|
|
2732
|
+
productId: u.id,
|
|
2439
2733
|
productVariantId: e.id,
|
|
2440
|
-
quantity:
|
|
2734
|
+
quantity: o
|
|
2441
2735
|
});
|
|
2442
2736
|
}
|
|
2443
|
-
function
|
|
2444
|
-
|
|
2737
|
+
function _() {
|
|
2738
|
+
d(), h(), l("/checkout");
|
|
2445
2739
|
}
|
|
2446
|
-
function
|
|
2740
|
+
function w(g) {
|
|
2447
2741
|
if (g >= 864e5) {
|
|
2448
|
-
const
|
|
2449
|
-
return `${
|
|
2742
|
+
const v = Math.floor(g / 864e5);
|
|
2743
|
+
return `${v} ${v === 1 ? "day" : "days"}`;
|
|
2450
2744
|
} else if (g >= 36e5) {
|
|
2451
|
-
const
|
|
2452
|
-
return `${
|
|
2745
|
+
const v = Math.floor(g / 36e5);
|
|
2746
|
+
return `${v} ${v === 1 ? "hour" : "hours"}`;
|
|
2453
2747
|
} else if (g >= 6e4) {
|
|
2454
|
-
const
|
|
2455
|
-
return `${
|
|
2748
|
+
const v = Math.floor(g / 6e4);
|
|
2749
|
+
return `${v} ${v === 1 ? "minute" : "minutes"}`;
|
|
2456
2750
|
} else {
|
|
2457
|
-
const
|
|
2458
|
-
return `${
|
|
2751
|
+
const v = Math.floor(g / 1e3);
|
|
2752
|
+
return `${v} ${v === 1 ? "second" : "seconds"}`;
|
|
2459
2753
|
}
|
|
2460
2754
|
}
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: w.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
|
|
2755
|
+
return f.useEffect(() => {
|
|
2756
|
+
(e.quantity.available === 0 || !e.quantity.available) && n(0);
|
|
2757
|
+
}, [e.quantity.available]), console.log(e.quantity), /* @__PURE__ */ t.jsxs("div", { className: P.options, children: [
|
|
2758
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: P.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
|
|
2466
2759
|
"div",
|
|
2467
2760
|
{
|
|
2468
|
-
className:
|
|
2469
|
-
[
|
|
2761
|
+
className: Y(P.charge, {
|
|
2762
|
+
[P.chargeActive]: i === g
|
|
2470
2763
|
}),
|
|
2471
|
-
onClick: () =>
|
|
2472
|
-
children:
|
|
2764
|
+
onClick: () => c(g),
|
|
2765
|
+
children: zt[g]
|
|
2473
2766
|
},
|
|
2474
2767
|
g
|
|
2475
2768
|
)) }),
|
|
2476
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2477
|
-
var
|
|
2769
|
+
/* @__PURE__ */ t.jsx("div", { className: P.variants, children: a.map((g) => {
|
|
2770
|
+
var B;
|
|
2478
2771
|
return /* @__PURE__ */ t.jsxs(
|
|
2479
2772
|
"div",
|
|
2480
2773
|
{
|
|
2481
|
-
className:
|
|
2482
|
-
[
|
|
2774
|
+
className: Y(P.variant, {
|
|
2775
|
+
[P.activeVariant]: e.id === g.id
|
|
2483
2776
|
}),
|
|
2484
2777
|
onClick: () => s(g),
|
|
2485
2778
|
children: [
|
|
2486
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2487
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2779
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.variantInfo, children: [
|
|
2780
|
+
/* @__PURE__ */ t.jsx("span", { className: P.title, children: g.name }),
|
|
2488
2781
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2489
2782
|
"$",
|
|
2490
2783
|
i === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
|
|
2491
2784
|
] })
|
|
2492
2785
|
] }),
|
|
2493
|
-
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2494
|
-
((
|
|
2786
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: P.stock, children: [
|
|
2787
|
+
((B = g.quantity.restrictions) == null ? void 0 : B.max) || g.quantity.available || 0,
|
|
2495
2788
|
" in stock"
|
|
2496
2789
|
] }) })
|
|
2497
2790
|
]
|
|
@@ -2499,49 +2792,50 @@ const Ia = (d) => {
|
|
|
2499
2792
|
g.id
|
|
2500
2793
|
);
|
|
2501
2794
|
}) }),
|
|
2502
|
-
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2795
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: P.quantity, children: [
|
|
2503
2796
|
/* @__PURE__ */ t.jsx(
|
|
2504
|
-
|
|
2797
|
+
Q,
|
|
2505
2798
|
{
|
|
2506
2799
|
type: "Secondary",
|
|
2507
2800
|
onClick: () => {
|
|
2508
|
-
|
|
2801
|
+
o > 1 ? n((g) => g - 1) : n(1);
|
|
2509
2802
|
},
|
|
2510
|
-
className:
|
|
2511
|
-
disabled: e.quantity.restrictions &&
|
|
2512
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2803
|
+
className: P.button,
|
|
2804
|
+
disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2805
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
2513
2806
|
}
|
|
2514
2807
|
),
|
|
2515
2808
|
/* @__PURE__ */ t.jsx(
|
|
2516
|
-
|
|
2809
|
+
$o,
|
|
2517
2810
|
{
|
|
2518
2811
|
type: "number",
|
|
2519
|
-
value: String(
|
|
2812
|
+
value: String(o),
|
|
2520
2813
|
onChange: (g) => n(Number(g)),
|
|
2521
|
-
max: ((
|
|
2522
|
-
min: ((
|
|
2523
|
-
centered: !0
|
|
2814
|
+
max: ((H = e.quantity.restrictions) == null ? void 0 : H.max) || e.quantity.available || 1 / 0,
|
|
2815
|
+
min: (($ = e.quantity.restrictions) == null ? void 0 : $.min) || 0,
|
|
2816
|
+
centered: !0,
|
|
2817
|
+
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
2524
2818
|
}
|
|
2525
2819
|
),
|
|
2526
2820
|
/* @__PURE__ */ t.jsx(
|
|
2527
|
-
|
|
2821
|
+
Q,
|
|
2528
2822
|
{
|
|
2529
2823
|
type: "Secondary",
|
|
2530
2824
|
onClick: () => {
|
|
2531
2825
|
n((g) => g + 1);
|
|
2532
2826
|
},
|
|
2533
|
-
className:
|
|
2534
|
-
disabled: !!(e.quantity.restrictions &&
|
|
2535
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2827
|
+
className: P.button,
|
|
2828
|
+
disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
|
|
2829
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
2536
2830
|
}
|
|
2537
2831
|
)
|
|
2538
2832
|
] }),
|
|
2539
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2540
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2833
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.meta, children: [
|
|
2834
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.info, children: [
|
|
2541
2835
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2542
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2836
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.infoRight, children: [
|
|
2543
2837
|
/* @__PURE__ */ t.jsx(
|
|
2544
|
-
|
|
2838
|
+
b,
|
|
2545
2839
|
{
|
|
2546
2840
|
name: "Lightning",
|
|
2547
2841
|
fill: "#FF3F19",
|
|
@@ -2549,303 +2843,305 @@ const Ia = (d) => {
|
|
|
2549
2843
|
height: 20
|
|
2550
2844
|
}
|
|
2551
2845
|
),
|
|
2552
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2846
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : w(e.deliveryTime) })
|
|
2553
2847
|
] })
|
|
2554
2848
|
] }),
|
|
2555
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2849
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.info, children: [
|
|
2556
2850
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2557
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2558
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2851
|
+
/* @__PURE__ */ t.jsx("div", { className: P.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: P.price, children: [
|
|
2852
|
+
/* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
|
|
2559
2853
|
"$ ",
|
|
2560
|
-
(e.price.amount || 0) *
|
|
2854
|
+
(e.price.amount || 0) * o
|
|
2561
2855
|
] }),
|
|
2562
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2856
|
+
/* @__PURE__ */ t.jsxs("span", { className: P.oldPrice, children: [
|
|
2563
2857
|
"$ ",
|
|
2564
|
-
(e.compareAtPrice.amount || 0) *
|
|
2858
|
+
(e.compareAtPrice.amount || 0) * o
|
|
2565
2859
|
] })
|
|
2566
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2860
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
|
|
2567
2861
|
"$ ",
|
|
2568
|
-
(e.price.amount || 0) *
|
|
2569
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2570
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2862
|
+
(e.price.amount || 0) * o
|
|
2863
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: P.price, children: [
|
|
2864
|
+
/* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
|
|
2571
2865
|
"$ ",
|
|
2572
2866
|
e.subscriptionSettings.price.amount || 0
|
|
2573
2867
|
] }),
|
|
2574
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2868
|
+
/* @__PURE__ */ t.jsxs("span", { className: P.oldPrice, children: [
|
|
2575
2869
|
"$ ",
|
|
2576
2870
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2577
2871
|
] })
|
|
2578
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2872
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
|
|
2579
2873
|
"$ ",
|
|
2580
2874
|
e.subscriptionSettings.price.amount || 0
|
|
2581
2875
|
] }) })
|
|
2582
2876
|
] })
|
|
2583
2877
|
] }),
|
|
2584
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2878
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
|
|
2585
2879
|
/* @__PURE__ */ t.jsx(
|
|
2586
|
-
|
|
2880
|
+
Q,
|
|
2587
2881
|
{
|
|
2588
2882
|
type: "Primary",
|
|
2589
|
-
onClick: () =>
|
|
2883
|
+
onClick: () => _(),
|
|
2884
|
+
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2590
2885
|
children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
2591
2886
|
}
|
|
2592
2887
|
),
|
|
2593
2888
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
2594
|
-
|
|
2889
|
+
Q,
|
|
2595
2890
|
{
|
|
2596
2891
|
type: "Secondary",
|
|
2597
|
-
onClick: () =>
|
|
2892
|
+
onClick: () => h(),
|
|
2893
|
+
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2598
2894
|
children: "Add to Cart"
|
|
2599
2895
|
}
|
|
2600
2896
|
)
|
|
2601
2897
|
] })
|
|
2602
2898
|
] });
|
|
2603
|
-
},
|
|
2604
|
-
button:
|
|
2605
|
-
login:
|
|
2606
|
-
signUp:
|
|
2607
|
-
buttons:
|
|
2608
|
-
modal:
|
|
2899
|
+
}, Ao = "_button_1tdo3_1", Oo = "_login_1tdo3_14", Mo = "_signUp_1tdo3_18", qo = "_buttons_1tdo3_23", Eo = "_modal_1tdo3_32", Do = "_closing_1tdo3_64", Uo = "_info_1tdo3_113", Ho = "_top_1tdo3_120", Ro = "_title_1tdo3_131", Lo = "_clear_1tdo3_138", zo = "_activeClear_1tdo3_145", Fo = "_count_1tdo3_149", Vo = "_cart_1tdo3_164", Yo = "_empty_1tdo3_172", Go = "_product_1tdo3_198", Xo = "_products_1tdo3_207", Wo = "_image_1tdo3_215", Jo = "_productInfo_1tdo3_221", Qo = "_content_1tdo3_228", Ko = "_name_1tdo3_234", Zo = "_price_1tdo3_240", ta = "_productButtons_1tdo3_246", ea = "_productButton_1tdo3_246", sa = "_productCount_1tdo3_266", na = "_bottom_1tdo3_282", ia = "_subtotal_1tdo3_290", oa = "_block_1tdo3_298", aa = "_shoppingCount_1tdo3_305", ca = "_total_1tdo3_325", la = "_link_1tdo3_331", ra = "_userInfo_1tdo3_338", da = "_pagesMobileModal_1tdo3_349", ua = "_pagesMobileModalContent_1tdo3_363", _a = "_pagesMobileModalHeader_1tdo3_369", ma = "_pagesMobileModalFooter_1tdo3_379", S = {
|
|
2900
|
+
button: Ao,
|
|
2901
|
+
login: Oo,
|
|
2902
|
+
signUp: Mo,
|
|
2903
|
+
buttons: qo,
|
|
2904
|
+
modal: Eo,
|
|
2609
2905
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
2610
2906
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
2611
|
-
closing:
|
|
2907
|
+
closing: Do,
|
|
2612
2908
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
2613
2909
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
2614
|
-
info:
|
|
2615
|
-
top:
|
|
2616
|
-
title:
|
|
2617
|
-
clear:
|
|
2618
|
-
activeClear:
|
|
2619
|
-
count:
|
|
2620
|
-
cart:
|
|
2621
|
-
empty:
|
|
2622
|
-
product:
|
|
2623
|
-
products:
|
|
2624
|
-
image:
|
|
2625
|
-
productInfo:
|
|
2626
|
-
content:
|
|
2627
|
-
name:
|
|
2628
|
-
price:
|
|
2629
|
-
productButtons:
|
|
2630
|
-
productButton:
|
|
2631
|
-
productCount:
|
|
2632
|
-
bottom:
|
|
2633
|
-
subtotal:
|
|
2634
|
-
block:
|
|
2635
|
-
shoppingCount:
|
|
2636
|
-
total:
|
|
2637
|
-
link:
|
|
2638
|
-
userInfo:
|
|
2639
|
-
pagesMobileModal:
|
|
2640
|
-
pagesMobileModalContent:
|
|
2641
|
-
pagesMobileModalHeader:
|
|
2642
|
-
pagesMobileModalFooter:
|
|
2910
|
+
info: Uo,
|
|
2911
|
+
top: Ho,
|
|
2912
|
+
title: Ro,
|
|
2913
|
+
clear: Lo,
|
|
2914
|
+
activeClear: zo,
|
|
2915
|
+
count: Fo,
|
|
2916
|
+
cart: Vo,
|
|
2917
|
+
empty: Yo,
|
|
2918
|
+
product: Go,
|
|
2919
|
+
products: Xo,
|
|
2920
|
+
image: Wo,
|
|
2921
|
+
productInfo: Jo,
|
|
2922
|
+
content: Qo,
|
|
2923
|
+
name: Ko,
|
|
2924
|
+
price: Zo,
|
|
2925
|
+
productButtons: ta,
|
|
2926
|
+
productButton: ea,
|
|
2927
|
+
productCount: sa,
|
|
2928
|
+
bottom: na,
|
|
2929
|
+
subtotal: ia,
|
|
2930
|
+
block: oa,
|
|
2931
|
+
shoppingCount: aa,
|
|
2932
|
+
total: ca,
|
|
2933
|
+
link: la,
|
|
2934
|
+
userInfo: ra,
|
|
2935
|
+
pagesMobileModal: da,
|
|
2936
|
+
pagesMobileModalContent: ua,
|
|
2937
|
+
pagesMobileModalHeader: _a,
|
|
2938
|
+
pagesMobileModalFooter: ma
|
|
2643
2939
|
};
|
|
2644
|
-
class
|
|
2940
|
+
class xt extends Error {
|
|
2645
2941
|
}
|
|
2646
|
-
|
|
2647
|
-
function
|
|
2648
|
-
return decodeURIComponent(atob(
|
|
2942
|
+
xt.prototype.name = "InvalidTokenError";
|
|
2943
|
+
function ha(u) {
|
|
2944
|
+
return decodeURIComponent(atob(u).replace(/(.)/g, (a, e) => {
|
|
2649
2945
|
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2650
2946
|
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2651
2947
|
}));
|
|
2652
2948
|
}
|
|
2653
|
-
function
|
|
2654
|
-
let
|
|
2655
|
-
switch (
|
|
2949
|
+
function pa(u) {
|
|
2950
|
+
let a = u.replace(/-/g, "+").replace(/_/g, "/");
|
|
2951
|
+
switch (a.length % 4) {
|
|
2656
2952
|
case 0:
|
|
2657
2953
|
break;
|
|
2658
2954
|
case 2:
|
|
2659
|
-
|
|
2955
|
+
a += "==";
|
|
2660
2956
|
break;
|
|
2661
2957
|
case 3:
|
|
2662
|
-
|
|
2958
|
+
a += "=";
|
|
2663
2959
|
break;
|
|
2664
2960
|
default:
|
|
2665
2961
|
throw new Error("base64 string is not of the correct length");
|
|
2666
2962
|
}
|
|
2667
2963
|
try {
|
|
2668
|
-
return
|
|
2964
|
+
return ha(a);
|
|
2669
2965
|
} catch {
|
|
2670
|
-
return atob(
|
|
2966
|
+
return atob(a);
|
|
2671
2967
|
}
|
|
2672
2968
|
}
|
|
2673
|
-
function
|
|
2674
|
-
if (typeof
|
|
2675
|
-
throw new
|
|
2676
|
-
|
|
2677
|
-
const e =
|
|
2969
|
+
function fa(u, a) {
|
|
2970
|
+
if (typeof u != "string")
|
|
2971
|
+
throw new xt("Invalid token specified: must be a string");
|
|
2972
|
+
a || (a = {});
|
|
2973
|
+
const e = a.header === !0 ? 0 : 1, s = u.split(".")[e];
|
|
2678
2974
|
if (typeof s != "string")
|
|
2679
|
-
throw new
|
|
2975
|
+
throw new xt(`Invalid token specified: missing part #${e + 1}`);
|
|
2680
2976
|
let i;
|
|
2681
2977
|
try {
|
|
2682
|
-
i =
|
|
2683
|
-
} catch (
|
|
2684
|
-
throw new
|
|
2978
|
+
i = pa(s);
|
|
2979
|
+
} catch (c) {
|
|
2980
|
+
throw new xt(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
|
|
2685
2981
|
}
|
|
2686
2982
|
try {
|
|
2687
2983
|
return JSON.parse(i);
|
|
2688
|
-
} catch (
|
|
2689
|
-
throw new
|
|
2984
|
+
} catch (c) {
|
|
2985
|
+
throw new xt(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
|
|
2690
2986
|
}
|
|
2691
2987
|
}
|
|
2692
|
-
const
|
|
2693
|
-
const { shopping:
|
|
2694
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2695
|
-
|
|
2988
|
+
const sc = (u) => {
|
|
2989
|
+
const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = u;
|
|
2990
|
+
return /* @__PURE__ */ t.jsxs("div", { className: S.buttons, children: [
|
|
2991
|
+
a && /* @__PURE__ */ t.jsx(ga, {}),
|
|
2696
2992
|
s && /* @__PURE__ */ t.jsx(Ft, { signUp: e })
|
|
2697
2993
|
] });
|
|
2698
|
-
},
|
|
2699
|
-
const [
|
|
2700
|
-
function l(
|
|
2701
|
-
for (let
|
|
2702
|
-
for (let
|
|
2703
|
-
if (i.parts[
|
|
2704
|
-
return i.parts[
|
|
2994
|
+
}, ga = () => {
|
|
2995
|
+
const [u, a] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: c } = Ot();
|
|
2996
|
+
function l(r) {
|
|
2997
|
+
for (let y = 0; y < i.parts.length; y++)
|
|
2998
|
+
for (let h = 0; h < r.variants.length; h++)
|
|
2999
|
+
if (i.parts[y].productVariantId === r.variants[y].id)
|
|
3000
|
+
return i.parts[y].productVariantId;
|
|
2705
3001
|
}
|
|
2706
|
-
function r
|
|
2707
|
-
for (let
|
|
2708
|
-
for (let
|
|
2709
|
-
if (i.parts[
|
|
2710
|
-
return i.parts[
|
|
3002
|
+
function o(r) {
|
|
3003
|
+
for (let y = 0; y < i.parts.length; y++)
|
|
3004
|
+
for (let h = 0; h < r.variants.length; h++)
|
|
3005
|
+
if (i.parts[y].productVariantId === r.variants[y].id)
|
|
3006
|
+
return i.parts[y].quantity;
|
|
2711
3007
|
}
|
|
2712
3008
|
f.useEffect(() => {
|
|
2713
3009
|
(async () => {
|
|
2714
|
-
const
|
|
2715
|
-
...
|
|
2716
|
-
activeVariantId: l(
|
|
2717
|
-
quantity:
|
|
3010
|
+
const y = i.parts.map((w) => String(w.productId)), _ = (await c([...y])).map((w) => ({
|
|
3011
|
+
...w,
|
|
3012
|
+
activeVariantId: l(w),
|
|
3013
|
+
quantity: o(w)
|
|
2718
3014
|
}));
|
|
2719
|
-
s(
|
|
3015
|
+
s(_);
|
|
2720
3016
|
})();
|
|
2721
3017
|
}, [i.parts.length]);
|
|
2722
|
-
function n(
|
|
2723
|
-
var
|
|
2724
|
-
return !
|
|
3018
|
+
function n(r) {
|
|
3019
|
+
var y;
|
|
3020
|
+
return !r || !(r != null && r.variants) ? !1 : (y = r.variants.find((h) => h.id === r.activeVariantId)) == null ? void 0 : y.subscriptionSettings;
|
|
2725
3021
|
}
|
|
2726
|
-
const
|
|
3022
|
+
const d = i.parts.length > 0 && e.length > 0 && !n(e[0]), [j, p] = f.useState(!1);
|
|
2727
3023
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2728
3024
|
/* @__PURE__ */ t.jsxs(
|
|
2729
|
-
|
|
3025
|
+
Q,
|
|
2730
3026
|
{
|
|
2731
3027
|
type: "Secondary",
|
|
2732
3028
|
style: {
|
|
2733
3029
|
padding: 10
|
|
2734
3030
|
},
|
|
2735
|
-
onClick: (
|
|
2736
|
-
|
|
3031
|
+
onClick: (r) => {
|
|
3032
|
+
r.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0), p(!0));
|
|
2737
3033
|
},
|
|
2738
3034
|
children: [
|
|
2739
3035
|
/* @__PURE__ */ t.jsx(
|
|
2740
|
-
|
|
3036
|
+
b,
|
|
2741
3037
|
{
|
|
2742
3038
|
name: "Handbag",
|
|
2743
3039
|
fill: "var(--icon-primary)"
|
|
2744
3040
|
}
|
|
2745
3041
|
),
|
|
2746
|
-
|
|
3042
|
+
d && /* @__PURE__ */ t.jsx("div", { className: S.shoppingCount, children: i.parts.length })
|
|
2747
3043
|
]
|
|
2748
3044
|
}
|
|
2749
3045
|
),
|
|
2750
|
-
|
|
3046
|
+
u && /* @__PURE__ */ t.jsx(
|
|
2751
3047
|
Mt,
|
|
2752
3048
|
{
|
|
2753
3049
|
close: () => {
|
|
2754
|
-
|
|
2755
|
-
|
|
3050
|
+
p(!1), setTimeout(() => {
|
|
3051
|
+
a(!1);
|
|
2756
3052
|
}, 300);
|
|
2757
3053
|
},
|
|
2758
3054
|
withAnimation: !1,
|
|
2759
3055
|
children: /* @__PURE__ */ t.jsx(
|
|
2760
|
-
|
|
3056
|
+
xa,
|
|
2761
3057
|
{
|
|
2762
3058
|
activeProducts: e,
|
|
2763
|
-
isCartNotEmpty:
|
|
2764
|
-
isOpen:
|
|
3059
|
+
isCartNotEmpty: d,
|
|
3060
|
+
isOpen: j
|
|
2765
3061
|
}
|
|
2766
3062
|
)
|
|
2767
3063
|
}
|
|
2768
3064
|
)
|
|
2769
3065
|
] });
|
|
2770
|
-
},
|
|
2771
|
-
const { activeProducts:
|
|
2772
|
-
function
|
|
2773
|
-
n(
|
|
3066
|
+
}, xa = (u) => {
|
|
3067
|
+
const { activeProducts: a, isCartNotEmpty: e, isOpen: s } = u, { cart: i, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: o } = Ot(), n = Bt();
|
|
3068
|
+
function d(r) {
|
|
3069
|
+
n(r);
|
|
2774
3070
|
}
|
|
2775
|
-
function
|
|
2776
|
-
|
|
2777
|
-
productId:
|
|
2778
|
-
productVariantId:
|
|
2779
|
-
quantity:
|
|
3071
|
+
function j(r) {
|
|
3072
|
+
o({
|
|
3073
|
+
productId: r.id,
|
|
3074
|
+
productVariantId: r.activeVariantId,
|
|
3075
|
+
quantity: r.quantity + 1
|
|
2780
3076
|
});
|
|
2781
3077
|
}
|
|
2782
|
-
function
|
|
2783
|
-
|
|
2784
|
-
productId:
|
|
2785
|
-
productVariantId:
|
|
2786
|
-
quantity:
|
|
3078
|
+
function p(r) {
|
|
3079
|
+
o({
|
|
3080
|
+
productId: r.id,
|
|
3081
|
+
productVariantId: r.activeVariantId,
|
|
3082
|
+
quantity: r.quantity - 1
|
|
2787
3083
|
});
|
|
2788
3084
|
}
|
|
2789
3085
|
return /* @__PURE__ */ t.jsxs(
|
|
2790
3086
|
"div",
|
|
2791
3087
|
{
|
|
2792
|
-
className:
|
|
2793
|
-
[
|
|
3088
|
+
className: Y(S.modal, {
|
|
3089
|
+
[S.closing]: !s
|
|
2794
3090
|
}),
|
|
2795
|
-
onClick: (
|
|
3091
|
+
onClick: (r) => r.stopPropagation(),
|
|
2796
3092
|
children: [
|
|
2797
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2798
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2799
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2800
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
3093
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
|
|
3094
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.info, children: [
|
|
3095
|
+
/* @__PURE__ */ t.jsx("span", { className: S.title, children: "Cart" }),
|
|
3096
|
+
e && /* @__PURE__ */ t.jsx("div", { className: S.count, children: i.parts.length })
|
|
2801
3097
|
] }),
|
|
2802
3098
|
/* @__PURE__ */ t.jsx(
|
|
2803
3099
|
"button",
|
|
2804
3100
|
{
|
|
2805
|
-
className:
|
|
2806
|
-
[
|
|
3101
|
+
className: Y(S.clear, {
|
|
3102
|
+
[S.activeClear]: e
|
|
2807
3103
|
}),
|
|
2808
3104
|
disabled: !e,
|
|
2809
|
-
onClick:
|
|
3105
|
+
onClick: c,
|
|
2810
3106
|
children: "Clear all"
|
|
2811
3107
|
}
|
|
2812
3108
|
)
|
|
2813
3109
|
] }),
|
|
2814
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2815
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3110
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: S.cart, children: [
|
|
3111
|
+
/* @__PURE__ */ t.jsx("div", { className: S.products, children: a.map((r) => /* @__PURE__ */ t.jsxs(
|
|
2816
3112
|
"div",
|
|
2817
3113
|
{
|
|
2818
|
-
className:
|
|
3114
|
+
className: S.product,
|
|
2819
3115
|
children: [
|
|
2820
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3116
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.productInfo, children: [
|
|
2821
3117
|
/* @__PURE__ */ t.jsx(
|
|
2822
3118
|
"img",
|
|
2823
3119
|
{
|
|
2824
|
-
src: `https://imagedelivery.net/${
|
|
3120
|
+
src: `https://imagedelivery.net/${r.images[0].cfId}/w=500`,
|
|
2825
3121
|
alt: "image",
|
|
2826
3122
|
width: "100%",
|
|
2827
3123
|
height: "100%",
|
|
2828
|
-
className:
|
|
3124
|
+
className: S.image
|
|
2829
3125
|
}
|
|
2830
3126
|
),
|
|
2831
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2832
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2833
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3127
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.content, children: [
|
|
3128
|
+
/* @__PURE__ */ t.jsx("div", { className: S.name, children: r.name }),
|
|
3129
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.price, children: [
|
|
2834
3130
|
"$",
|
|
2835
|
-
|
|
3131
|
+
r.variants.find((y) => y.id === r.activeVariantId).price.amount * ((r == null ? void 0 : r.quantity) || 1)
|
|
2836
3132
|
] })
|
|
2837
3133
|
] })
|
|
2838
3134
|
] }),
|
|
2839
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3135
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.productButtons, children: [
|
|
2840
3136
|
/* @__PURE__ */ t.jsx(
|
|
2841
3137
|
"div",
|
|
2842
3138
|
{
|
|
2843
3139
|
onClick: () => {
|
|
2844
|
-
|
|
3140
|
+
r.quantity !== 1 && p(r);
|
|
2845
3141
|
},
|
|
2846
|
-
className:
|
|
3142
|
+
className: S.productButton,
|
|
2847
3143
|
children: /* @__PURE__ */ t.jsx(
|
|
2848
|
-
|
|
3144
|
+
b,
|
|
2849
3145
|
{
|
|
2850
3146
|
name: "Minus",
|
|
2851
3147
|
fill: "#757575",
|
|
@@ -2855,14 +3151,14 @@ const $a = (d) => {
|
|
|
2855
3151
|
)
|
|
2856
3152
|
}
|
|
2857
3153
|
),
|
|
2858
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3154
|
+
/* @__PURE__ */ t.jsx("div", { className: S.productCount, children: r.quantity }),
|
|
2859
3155
|
/* @__PURE__ */ t.jsx(
|
|
2860
3156
|
"div",
|
|
2861
3157
|
{
|
|
2862
|
-
onClick: () =>
|
|
2863
|
-
className:
|
|
3158
|
+
onClick: () => j(r),
|
|
3159
|
+
className: S.productButton,
|
|
2864
3160
|
children: /* @__PURE__ */ t.jsx(
|
|
2865
|
-
|
|
3161
|
+
b,
|
|
2866
3162
|
{
|
|
2867
3163
|
name: "Plus",
|
|
2868
3164
|
fill: "#757575",
|
|
@@ -2875,14 +3171,14 @@ const $a = (d) => {
|
|
|
2875
3171
|
] })
|
|
2876
3172
|
]
|
|
2877
3173
|
},
|
|
2878
|
-
|
|
3174
|
+
r.id
|
|
2879
3175
|
)) }),
|
|
2880
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2881
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2882
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3176
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.bottom, children: [
|
|
3177
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.subtotal, children: [
|
|
3178
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.block, children: [
|
|
2883
3179
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2884
3180
|
/* @__PURE__ */ t.jsx(
|
|
2885
|
-
|
|
3181
|
+
b,
|
|
2886
3182
|
{
|
|
2887
3183
|
name: "Info",
|
|
2888
3184
|
width: 20,
|
|
@@ -2891,20 +3187,20 @@ const $a = (d) => {
|
|
|
2891
3187
|
}
|
|
2892
3188
|
)
|
|
2893
3189
|
] }),
|
|
2894
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3190
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.total, children: [
|
|
2895
3191
|
"$",
|
|
2896
3192
|
l().total
|
|
2897
3193
|
] })
|
|
2898
3194
|
] }),
|
|
2899
|
-
/* @__PURE__ */ t.jsx(
|
|
3195
|
+
/* @__PURE__ */ t.jsx(Q, { onClick: () => d("/checkout"), children: "Checkout" })
|
|
2900
3196
|
] })
|
|
2901
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
3197
|
+
] }) : /* @__PURE__ */ t.jsx(ba, {})
|
|
2902
3198
|
]
|
|
2903
3199
|
}
|
|
2904
3200
|
);
|
|
2905
|
-
},
|
|
3201
|
+
}, ba = () => /* @__PURE__ */ t.jsxs("div", { className: S.empty, children: [
|
|
2906
3202
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2907
|
-
|
|
3203
|
+
b,
|
|
2908
3204
|
{
|
|
2909
3205
|
name: "Handbag",
|
|
2910
3206
|
fill: "var(--icon-secondary)"
|
|
@@ -2918,20 +3214,20 @@ const $a = (d) => {
|
|
|
2918
3214
|
"a",
|
|
2919
3215
|
{
|
|
2920
3216
|
href: "/products",
|
|
2921
|
-
className:
|
|
3217
|
+
className: S.link,
|
|
2922
3218
|
children: "view products"
|
|
2923
3219
|
}
|
|
2924
3220
|
)
|
|
2925
3221
|
] })
|
|
2926
|
-
] }), Ft = ({ signUp:
|
|
2927
|
-
const
|
|
2928
|
-
function i(
|
|
2929
|
-
s(
|
|
3222
|
+
] }), Ft = ({ signUp: u }) => {
|
|
3223
|
+
const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = a, s = Bt();
|
|
3224
|
+
function i(o) {
|
|
3225
|
+
s(o);
|
|
2930
3226
|
}
|
|
2931
3227
|
if (!e)
|
|
2932
3228
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2933
3229
|
/* @__PURE__ */ t.jsx(
|
|
2934
|
-
|
|
3230
|
+
Q,
|
|
2935
3231
|
{
|
|
2936
3232
|
onClick: () => i("/customer-dash"),
|
|
2937
3233
|
type: "Secondary",
|
|
@@ -2941,8 +3237,8 @@ const $a = (d) => {
|
|
|
2941
3237
|
children: "Login"
|
|
2942
3238
|
}
|
|
2943
3239
|
),
|
|
2944
|
-
|
|
2945
|
-
|
|
3240
|
+
u && /* @__PURE__ */ t.jsx(
|
|
3241
|
+
Q,
|
|
2946
3242
|
{
|
|
2947
3243
|
onClick: () => i("/customer-dash"),
|
|
2948
3244
|
type: "Primary",
|
|
@@ -2953,27 +3249,27 @@ const $a = (d) => {
|
|
|
2953
3249
|
}
|
|
2954
3250
|
)
|
|
2955
3251
|
] });
|
|
2956
|
-
const [
|
|
3252
|
+
const [c, l] = f.useState("test-email@gmail.com");
|
|
2957
3253
|
return f.useEffect(() => {
|
|
2958
3254
|
(async () => {
|
|
2959
|
-
const n =
|
|
3255
|
+
const n = fa(e);
|
|
2960
3256
|
l(n.email);
|
|
2961
3257
|
})();
|
|
2962
3258
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
2963
3259
|
"div",
|
|
2964
3260
|
{
|
|
2965
|
-
className:
|
|
3261
|
+
className: S.userInfo,
|
|
2966
3262
|
onClick: () => i("/customer-dash"),
|
|
2967
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
3263
|
+
children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
|
|
2968
3264
|
}
|
|
2969
3265
|
);
|
|
2970
|
-
},
|
|
2971
|
-
children:
|
|
2972
|
-
logo:
|
|
3266
|
+
}, va = ({
|
|
3267
|
+
children: u,
|
|
3268
|
+
logo: a,
|
|
2973
3269
|
setIsOpen: e,
|
|
2974
3270
|
signUp: s
|
|
2975
3271
|
}) => {
|
|
2976
|
-
const { setIsOpen: i } =
|
|
3272
|
+
const { setIsOpen: i } = Ut(), c = () => {
|
|
2977
3273
|
i(!1), setTimeout(() => {
|
|
2978
3274
|
e(!1), i(!0);
|
|
2979
3275
|
}, 300);
|
|
@@ -2981,18 +3277,18 @@ const $a = (d) => {
|
|
|
2981
3277
|
return /* @__PURE__ */ t.jsxs(
|
|
2982
3278
|
"div",
|
|
2983
3279
|
{
|
|
2984
|
-
className:
|
|
3280
|
+
className: S.pagesMobileModal,
|
|
2985
3281
|
onClick: (l) => l.stopPropagation(),
|
|
2986
3282
|
children: [
|
|
2987
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2988
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
3283
|
+
/* @__PURE__ */ t.jsxs("div", { className: S.pagesMobileModalHeader, children: [
|
|
3284
|
+
/* @__PURE__ */ t.jsx("div", { children: a }),
|
|
2989
3285
|
/* @__PURE__ */ t.jsx(
|
|
2990
|
-
|
|
3286
|
+
Q,
|
|
2991
3287
|
{
|
|
2992
3288
|
type: "Secondary",
|
|
2993
|
-
onClick:
|
|
3289
|
+
onClick: c,
|
|
2994
3290
|
children: /* @__PURE__ */ t.jsx(
|
|
2995
|
-
|
|
3291
|
+
b,
|
|
2996
3292
|
{
|
|
2997
3293
|
name: "X",
|
|
2998
3294
|
fill: "var(--icon-primary)"
|
|
@@ -3001,43 +3297,43 @@ const $a = (d) => {
|
|
|
3001
3297
|
}
|
|
3002
3298
|
)
|
|
3003
3299
|
] }),
|
|
3004
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3005
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3300
|
+
/* @__PURE__ */ t.jsx("div", { className: S.pagesMobileModalContent, children: u }),
|
|
3301
|
+
/* @__PURE__ */ t.jsx("div", { className: S.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ft, { signUp: s }) })
|
|
3006
3302
|
]
|
|
3007
3303
|
}
|
|
3008
3304
|
);
|
|
3009
|
-
},
|
|
3010
|
-
children:
|
|
3011
|
-
logo:
|
|
3305
|
+
}, nc = ({
|
|
3306
|
+
children: u,
|
|
3307
|
+
logo: a,
|
|
3012
3308
|
signUp: e
|
|
3013
3309
|
}) => {
|
|
3014
3310
|
const [s, i] = f.useState(!1);
|
|
3015
3311
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3016
|
-
/* @__PURE__ */ t.jsx(
|
|
3312
|
+
/* @__PURE__ */ t.jsx(ja, { setIsOpenModal: i }),
|
|
3017
3313
|
s && /* @__PURE__ */ t.jsx(Mt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
|
|
3018
|
-
|
|
3314
|
+
va,
|
|
3019
3315
|
{
|
|
3020
|
-
logo:
|
|
3316
|
+
logo: a,
|
|
3021
3317
|
setIsOpen: i,
|
|
3022
3318
|
signUp: e,
|
|
3023
|
-
children:
|
|
3319
|
+
children: u
|
|
3024
3320
|
}
|
|
3025
3321
|
) })
|
|
3026
3322
|
] });
|
|
3027
|
-
},
|
|
3028
|
-
const { setIsOpenModal:
|
|
3323
|
+
}, ja = (u) => {
|
|
3324
|
+
const { setIsOpenModal: a } = u;
|
|
3029
3325
|
return /* @__PURE__ */ t.jsx(
|
|
3030
|
-
|
|
3326
|
+
Q,
|
|
3031
3327
|
{
|
|
3032
3328
|
type: "Secondary",
|
|
3033
3329
|
style: {
|
|
3034
3330
|
padding: 10
|
|
3035
3331
|
},
|
|
3036
3332
|
onClick: (e) => {
|
|
3037
|
-
e.stopPropagation(),
|
|
3333
|
+
e.stopPropagation(), a(!0);
|
|
3038
3334
|
},
|
|
3039
3335
|
children: /* @__PURE__ */ t.jsx(
|
|
3040
|
-
|
|
3336
|
+
b,
|
|
3041
3337
|
{
|
|
3042
3338
|
name: "List",
|
|
3043
3339
|
fill: "var(--icon-primary)"
|
|
@@ -3045,34 +3341,34 @@ const $a = (d) => {
|
|
|
3045
3341
|
)
|
|
3046
3342
|
}
|
|
3047
3343
|
);
|
|
3048
|
-
},
|
|
3049
|
-
share:
|
|
3050
|
-
modal:
|
|
3051
|
-
header:
|
|
3052
|
-
socials:
|
|
3053
|
-
social:
|
|
3054
|
-
copy:
|
|
3055
|
-
title:
|
|
3056
|
-
copyWrapper:
|
|
3057
|
-
copyText:
|
|
3058
|
-
copyTextMobile:
|
|
3059
|
-
copyTextMiniMobile:
|
|
3060
|
-
},
|
|
3061
|
-
const { isOpenModal:
|
|
3344
|
+
}, ya = "_share_xddz7_1", ka = "_modal_xddz7_8", $a = "_header_xddz7_20", Ia = "_socials_xddz7_30", Na = "_social_xddz7_30", wa = "_copy_xddz7_40", Ca = "_title_xddz7_47", Sa = "_copyWrapper_xddz7_53", Ba = "_copyText_xddz7_62", Ta = "_copyTextMobile_xddz7_75", Pa = "_copyTextMiniMobile_xddz7_94", lt = {
|
|
3345
|
+
share: ya,
|
|
3346
|
+
modal: ka,
|
|
3347
|
+
header: $a,
|
|
3348
|
+
socials: Ia,
|
|
3349
|
+
social: Na,
|
|
3350
|
+
copy: wa,
|
|
3351
|
+
title: Ca,
|
|
3352
|
+
copyWrapper: Sa,
|
|
3353
|
+
copyText: Ba,
|
|
3354
|
+
copyTextMobile: Ta,
|
|
3355
|
+
copyTextMiniMobile: Pa
|
|
3356
|
+
}, ic = () => {
|
|
3357
|
+
const { isOpenModal: u, setIsOpenModal: a } = Ht();
|
|
3062
3358
|
function e() {
|
|
3063
|
-
|
|
3359
|
+
a(!0);
|
|
3064
3360
|
}
|
|
3065
3361
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3066
3362
|
/* @__PURE__ */ t.jsx(
|
|
3067
|
-
|
|
3363
|
+
ot,
|
|
3068
3364
|
{
|
|
3069
|
-
className:
|
|
3365
|
+
className: lt.share,
|
|
3070
3366
|
onClick: (s) => {
|
|
3071
3367
|
s.stopPropagation(), e();
|
|
3072
3368
|
},
|
|
3073
3369
|
type: "Secondary",
|
|
3074
3370
|
children: /* @__PURE__ */ t.jsx(
|
|
3075
|
-
|
|
3371
|
+
b,
|
|
3076
3372
|
{
|
|
3077
3373
|
name: "Share",
|
|
3078
3374
|
fill: "#757575",
|
|
@@ -3081,11 +3377,11 @@ const $a = (d) => {
|
|
|
3081
3377
|
)
|
|
3082
3378
|
}
|
|
3083
3379
|
),
|
|
3084
|
-
|
|
3380
|
+
u && /* @__PURE__ */ t.jsx(Mt, { close: a, children: /* @__PURE__ */ t.jsx(Aa, {}) })
|
|
3085
3381
|
] });
|
|
3086
|
-
},
|
|
3087
|
-
const { setIsOpenModal:
|
|
3088
|
-
function
|
|
3382
|
+
}, Aa = () => {
|
|
3383
|
+
const { setIsOpenModal: u } = Ht(), { notification: a, setNotification: e } = Gt(), { setIsOpen: s } = Ut(), i = window.location.href;
|
|
3384
|
+
function c() {
|
|
3089
3385
|
navigator.clipboard.writeText(i), e({
|
|
3090
3386
|
message: "Link copied to clipboard",
|
|
3091
3387
|
status: "success"
|
|
@@ -3093,22 +3389,22 @@ const $a = (d) => {
|
|
|
3093
3389
|
}
|
|
3094
3390
|
function l() {
|
|
3095
3391
|
s(!1), setTimeout(() => {
|
|
3096
|
-
|
|
3392
|
+
u(!1), s(!0);
|
|
3097
3393
|
}, 300);
|
|
3098
3394
|
}
|
|
3099
|
-
function
|
|
3100
|
-
return n.length >
|
|
3395
|
+
function o(n, d) {
|
|
3396
|
+
return n.length > d ? n.slice(0, d) + "..." : n;
|
|
3101
3397
|
}
|
|
3102
3398
|
return /* @__PURE__ */ t.jsxs(
|
|
3103
3399
|
"div",
|
|
3104
3400
|
{
|
|
3105
|
-
className:
|
|
3401
|
+
className: lt.modal,
|
|
3106
3402
|
onClick: (n) => n.stopPropagation(),
|
|
3107
3403
|
children: [
|
|
3108
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3109
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3404
|
+
/* @__PURE__ */ t.jsxs("div", { className: lt.header, children: [
|
|
3405
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.title, children: "Copy Product Link" }),
|
|
3110
3406
|
/* @__PURE__ */ t.jsx(
|
|
3111
|
-
|
|
3407
|
+
b,
|
|
3112
3408
|
{
|
|
3113
3409
|
name: "X",
|
|
3114
3410
|
fill: "#757575",
|
|
@@ -3117,95 +3413,113 @@ const $a = (d) => {
|
|
|
3117
3413
|
}
|
|
3118
3414
|
)
|
|
3119
3415
|
] }),
|
|
3120
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3416
|
+
/* @__PURE__ */ t.jsxs("div", { className: lt.copyWrapper, children: [
|
|
3121
3417
|
/* @__PURE__ */ t.jsxs(
|
|
3122
|
-
|
|
3418
|
+
ot,
|
|
3123
3419
|
{
|
|
3124
3420
|
type: "Secondary",
|
|
3125
|
-
onClick:
|
|
3421
|
+
onClick: c,
|
|
3126
3422
|
style: {
|
|
3127
3423
|
flex: 1
|
|
3128
3424
|
},
|
|
3129
3425
|
children: [
|
|
3130
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3131
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3132
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3426
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyText, children: o(i, 100) }),
|
|
3427
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyTextMobile, children: o(i, 40) }),
|
|
3428
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyTextMiniMobile, children: o(i, 20) })
|
|
3133
3429
|
]
|
|
3134
3430
|
}
|
|
3135
3431
|
),
|
|
3136
3432
|
/* @__PURE__ */ t.jsx(
|
|
3137
|
-
|
|
3433
|
+
ot,
|
|
3138
3434
|
{
|
|
3139
3435
|
type: "Secondary",
|
|
3140
|
-
onClick:
|
|
3141
|
-
children:
|
|
3436
|
+
onClick: c,
|
|
3437
|
+
children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
3142
3438
|
}
|
|
3143
3439
|
)
|
|
3144
3440
|
] })
|
|
3145
3441
|
]
|
|
3146
3442
|
}
|
|
3147
3443
|
);
|
|
3148
|
-
},
|
|
3149
|
-
accordion:
|
|
3150
|
-
header:
|
|
3151
|
-
icon:
|
|
3152
|
-
open:
|
|
3153
|
-
content:
|
|
3154
|
-
},
|
|
3155
|
-
const [s, i] = f.useState(e), [
|
|
3444
|
+
}, Oa = "_accordion_1s1lq_1", Ma = "_header_1s1lq_9", qa = "_icon_1s1lq_18", Ea = "_open_1s1lq_21", Da = "_content_1s1lq_25", gt = {
|
|
3445
|
+
accordion: Oa,
|
|
3446
|
+
header: Ma,
|
|
3447
|
+
icon: qa,
|
|
3448
|
+
open: Ea,
|
|
3449
|
+
content: Da
|
|
3450
|
+
}, oc = ({ title: u, content: a, defaultOpen: e = !1 }) => {
|
|
3451
|
+
const [s, i] = f.useState(e), [c, l] = f.useState(0), o = f.useRef(null), n = () => {
|
|
3156
3452
|
i(!s);
|
|
3157
3453
|
};
|
|
3158
3454
|
return f.useEffect(() => {
|
|
3159
|
-
|
|
3160
|
-
}, [s]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
3455
|
+
o.current && l(s ? o.current.scrollHeight : 0);
|
|
3456
|
+
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: gt.accordion, children: [
|
|
3161
3457
|
/* @__PURE__ */ t.jsxs(
|
|
3162
3458
|
"div",
|
|
3163
3459
|
{
|
|
3164
|
-
className:
|
|
3460
|
+
className: gt.header,
|
|
3165
3461
|
onClick: n,
|
|
3166
3462
|
children: [
|
|
3167
|
-
/* @__PURE__ */ t.jsx("h5", { id: "h5", children:
|
|
3168
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3463
|
+
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
|
|
3464
|
+
/* @__PURE__ */ t.jsx("div", { className: Y(gt.icon, { [gt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
3169
3465
|
]
|
|
3170
3466
|
}
|
|
3171
3467
|
),
|
|
3172
3468
|
/* @__PURE__ */ t.jsx(
|
|
3173
3469
|
"div",
|
|
3174
3470
|
{
|
|
3175
|
-
ref:
|
|
3176
|
-
className:
|
|
3177
|
-
style: { height: `${
|
|
3178
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
3471
|
+
ref: o,
|
|
3472
|
+
className: gt.content,
|
|
3473
|
+
style: { height: `${c}px` },
|
|
3474
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
|
|
3179
3475
|
}
|
|
3180
3476
|
)
|
|
3181
3477
|
] });
|
|
3182
|
-
},
|
|
3183
|
-
const
|
|
3184
|
-
l || s === "_blank" ? s === "_blank" ? window.open(
|
|
3478
|
+
}, ac = ({ children: u, path: a, className: e, target: s = "_self", id: i }) => {
|
|
3479
|
+
const c = Bt(), l = /^https?:\/\//.test(a), o = (n) => {
|
|
3480
|
+
l || s === "_blank" ? s === "_blank" ? window.open(a, "_blank") : window.location.href = a : (n.preventDefault(), c(a, { replace: !0 }));
|
|
3185
3481
|
};
|
|
3186
3482
|
return /* @__PURE__ */ t.jsx(
|
|
3187
3483
|
"div",
|
|
3188
3484
|
{
|
|
3189
|
-
onClick:
|
|
3485
|
+
onClick: o,
|
|
3190
3486
|
className: e,
|
|
3191
3487
|
role: "link",
|
|
3192
3488
|
style: { cursor: "pointer" },
|
|
3193
3489
|
id: i,
|
|
3194
|
-
children:
|
|
3490
|
+
children: u
|
|
3195
3491
|
}
|
|
3196
3492
|
);
|
|
3197
|
-
},
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3493
|
+
}, Ua = "_buttonsBlock_1b2rb_1", Ha = "_slideUp_1b2rb_1", Ra = {
|
|
3494
|
+
buttonsBlock: Ua,
|
|
3495
|
+
slideUp: Ha
|
|
3496
|
+
}, cc = () => /* @__PURE__ */ t.jsxs("div", { className: Ra.buttonsBlock, children: [
|
|
3497
|
+
/* @__PURE__ */ t.jsx(
|
|
3498
|
+
Q,
|
|
3499
|
+
{
|
|
3500
|
+
type: "Primary",
|
|
3501
|
+
style: {
|
|
3502
|
+
width: "100%"
|
|
3503
|
+
},
|
|
3504
|
+
onClick: () => {
|
|
3505
|
+
console.log("add to cart");
|
|
3506
|
+
},
|
|
3507
|
+
children: "Add to Cart"
|
|
3508
|
+
}
|
|
3509
|
+
),
|
|
3510
|
+
/* @__PURE__ */ t.jsx(Q, { type: "Secondary", children: "Buy" })
|
|
3511
|
+
] }), La = "_wrapper_st58d_1", za = "_label_st58d_10", Fa = "_textarea_st58d_18", Va = "_length_st58d_33", jt = {
|
|
3512
|
+
wrapper: La,
|
|
3513
|
+
label: za,
|
|
3514
|
+
textarea: Fa,
|
|
3515
|
+
length: Va
|
|
3516
|
+
}, lc = (u) => {
|
|
3517
|
+
const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = u, [l, o] = f.useState(s.length);
|
|
3518
|
+
return /* @__PURE__ */ t.jsxs("div", { className: jt.wrapper, children: [
|
|
3205
3519
|
e && /* @__PURE__ */ t.jsx(
|
|
3206
3520
|
"label",
|
|
3207
3521
|
{
|
|
3208
|
-
className:
|
|
3522
|
+
className: jt.label,
|
|
3209
3523
|
htmlFor: e,
|
|
3210
3524
|
children: e
|
|
3211
3525
|
}
|
|
@@ -3216,14 +3530,14 @@ const $a = (d) => {
|
|
|
3216
3530
|
id: e,
|
|
3217
3531
|
defaultValue: s,
|
|
3218
3532
|
onChange: (n) => {
|
|
3219
|
-
|
|
3533
|
+
o(n.target.value.length), a(n.target.value);
|
|
3220
3534
|
},
|
|
3221
|
-
placeholder:
|
|
3222
|
-
className:
|
|
3535
|
+
placeholder: c,
|
|
3536
|
+
className: jt.textarea,
|
|
3223
3537
|
maxLength: i
|
|
3224
3538
|
}
|
|
3225
3539
|
),
|
|
3226
|
-
i && /* @__PURE__ */ t.jsxs("div", { className:
|
|
3540
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: jt.length, children: [
|
|
3227
3541
|
l,
|
|
3228
3542
|
"/",
|
|
3229
3543
|
i
|
|
@@ -3231,38 +3545,40 @@ const $a = (d) => {
|
|
|
3231
3545
|
] });
|
|
3232
3546
|
};
|
|
3233
3547
|
export {
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3548
|
+
oc as Accordion,
|
|
3549
|
+
ja as BurgerMenuButton,
|
|
3550
|
+
Q as Button,
|
|
3551
|
+
ai as ButtonTypeSettings,
|
|
3552
|
+
Za as ButtonsSettings,
|
|
3553
|
+
Ja as CategorySettings,
|
|
3554
|
+
bt as ChooseImage,
|
|
3555
|
+
uc as ChooseImageModal,
|
|
3556
|
+
ba as EmptyCart,
|
|
3557
|
+
Ka as FormSettings,
|
|
3558
|
+
sc as HeaderButtons,
|
|
3559
|
+
b as Icon,
|
|
3560
|
+
tt as InputSettings,
|
|
3561
|
+
$o as InputUI,
|
|
3562
|
+
Ge as ItemsSettings,
|
|
3563
|
+
Wa as LayoutSettings,
|
|
3564
|
+
ac as Link,
|
|
3565
|
+
tc as ListingSelector,
|
|
3566
|
+
_c as Loader,
|
|
3253
3567
|
Mt as Modal,
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3568
|
+
nc as PagesMobileMenu,
|
|
3569
|
+
va as PagesMobileModal,
|
|
3570
|
+
Qa as PagesSettings,
|
|
3571
|
+
cc as ProductCardButtons,
|
|
3572
|
+
ec as ProductOptions,
|
|
3573
|
+
qt as RangeSelector,
|
|
3258
3574
|
et as Select,
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3575
|
+
ic as ShareLink,
|
|
3576
|
+
ga as ShoppingButton,
|
|
3577
|
+
xa as ShoppingModalCart,
|
|
3262
3578
|
st as Switch,
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3579
|
+
Lt as TextSettings,
|
|
3580
|
+
Et as TextareaSettings,
|
|
3581
|
+
lc as TextareaUI,
|
|
3582
|
+
Rt as TypesText,
|
|
3267
3583
|
Ft as UserInfo
|
|
3268
3584
|
};
|