@billgangcom/theme-lib 1.44.0 → 1.44.2

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