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