@billgangcom/theme-lib 1.44.1 → 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 v, 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-Dg3e7rFo.js";
2
- import { q as Aa, L as Ma } from "./index-Dg3e7rFo.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,9 +25,9 @@ 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(h) {
28
+ ], ae = ["left", "top", "right", "bottom"], ka = (d) => {
29
+ const { alignment: a, padding: e, setPadding: s, setAlignment: n } = d;
30
+ function c(h) {
31
31
  switch (h) {
32
32
  case "left":
33
33
  case "topLeft":
@@ -45,7 +45,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
45
45
  return "TextAlignCenter";
46
46
  }
47
47
  }
48
- function l(h) {
48
+ function r(h) {
49
49
  switch (h) {
50
50
  case "left":
51
51
  return "AlignLeft";
@@ -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((h) => /* @__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(h);
70
+ n(h);
71
71
  },
72
72
  className: J.alignment,
73
73
  onMouseEnter: () => {
74
- n(h);
74
+ i(h);
75
75
  },
76
76
  onMouseLeave: () => {
77
- n(null);
77
+ i(null);
78
78
  },
79
79
  children: [
80
- h !== o && r !== h && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
81
- h !== o && r === h && /* @__PURE__ */ t.jsx(
82
- v,
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
- h === o && /* @__PURE__ */ t.jsx(
91
- v,
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
@@ -100,23 +100,23 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
100
100
  },
101
101
  h
102
102
  )) }),
103
- /* @__PURE__ */ t.jsx("div", { className: J.paddings, children: oe.map((h) => /* @__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 === h
106
+ className: V(J.padding, {
107
+ [J.active]: l === h
108
108
  }),
109
109
  onFocus: () => {
110
- x(h);
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
- v,
117
+ b,
118
118
  {
119
- name: l(h),
119
+ name: r(h),
120
120
  width: 20,
121
121
  height: 20
122
122
  }
@@ -141,21 +141,21 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
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", ht = {
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", he = "_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,
154
- active: he
155
- }, pe = ["bold", "italic", "underline", "strike-through", "code"], Ht = (d) => {
156
- const { typesText: o, setTypesText: e } = d;
157
- function s(i) {
158
- switch (i) {
153
+ block: he,
154
+ active: pe
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,31 +168,31 @@ 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: pe.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
- v,
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
197
  }, pt = {
198
198
  h1: "Heading 1",
@@ -202,24 +202,24 @@ 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
- }, zt = (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
218
  return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
219
- (r || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
220
- r && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: r }),
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
225
  onChange: (h) => s(h)
@@ -227,229 +227,231 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
227
227
  )
228
228
  ] }),
229
229
  /* @__PURE__ */ t.jsxs("div", { className: ht.itemsBlock, children: [
230
- /* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: n }),
230
+ /* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: i }),
231
231
  /* @__PURE__ */ t.jsx(
232
232
  qt,
233
233
  {
234
- onChange: (h) => a(h),
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
250
  options: Object.values(pt).filter(
251
- (h) => h !== pt[c]
251
+ (h) => h !== pt[l]
252
252
  ),
253
- onChange: (h) => x(
253
+ onChange: (h) => j(
254
254
  Object.keys(pt).find(
255
255
  (p) => pt[p] === h
256
256
  )
257
257
  ),
258
- value: pt[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
- v,
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
- zt,
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(v, { 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
  }) })
@@ -462,123 +464,123 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
462
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,
514
+ setItems: n,
515
+ other: c,
516
+ title: r,
517
+ subtitle: o,
518
+ editable: i = !0,
519
+ draggable: l = !1,
520
+ withImage: j = !1,
519
521
  deletable: h = !0,
520
522
  addable: p = !0,
521
- itemsType: _,
522
- itemsPlaceholder: b = "",
523
+ itemsType: m,
524
+ itemsPlaceholder: f = "",
523
525
  itemsOptions: u,
524
- hasRangeSelector: B = !1,
525
- rangeSelectorOptions: H,
526
+ hasRangeSelector: S = !1,
527
+ rangeSelectorOptions: D,
526
528
  modalOptions: I,
527
- addableOptions: N = {},
528
- limit: g,
529
- autoScrollInterval: C
530
- } = d, [F, S] = f.useState(null), [Y, E] = f.useState({
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
- }), [y, M] = f.useState(null), T = f.useRef(null), [W, O] = f.useState(!1), z = $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
- S(null), O(!1);
542
+ x.useEffect(() => {
543
+ const _ = () => {
544
+ C(null), O(!1);
543
545
  };
544
- return document.body.addEventListener("click", m), S(null), O(!1), () => {
545
- S(null), O(!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((k) => k.id === F.id ? F : k);
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 (T.current && y) {
554
- const m = T.current.getBoundingClientRect().height, k = window.innerHeight;
555
- let P = y.top;
556
- P + m > k + window.scrollY - 200 && (P = k + window.scrollY - m - 200), P < 0 && (P = 10), E({
557
- top: P,
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,
558
560
  left: y.left
559
561
  });
560
562
  }
561
- }, [T.current, y]);
562
- const Z = (m, k) => {
563
- m.stopPropagation();
564
- const P = m.target.getBoundingClientRect();
563
+ }, [B.current, y]);
564
+ const Z = (_, k) => {
565
+ _.stopPropagation();
566
+ const T = _.target.getBoundingClientRect();
565
567
  M({
566
- top: P.top + window.scrollY,
567
- left: P.left - 30
568
- }), S(k), O(!0);
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
- v,
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 j = (m) => {
591
- const { active: k, over: P } = m;
592
- if (P && k.id !== P.id) {
593
- const D = s.findIndex((A) => A.id === k.id), G = s.findIndex((A) => A.id === P.id);
594
- if (D !== -1 && G !== -1) {
595
- const A = [...s], [dt] = A.splice(D, 1);
596
- A.splice(G, 0, dt), i(A);
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
- }, q = (m, k) => {
600
- var D, G;
601
- const P = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
602
- c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
603
- v,
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,134 +610,140 @@ 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
616
  onChange: (A) => {
615
- const dt = [...s], mt = u.find((bt) => bt.name === A);
616
- if (!mt) return;
617
- const ut = dt.map((bt) => bt.id === m.id ? {
618
- ...mt,
619
- name: 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
- S({
622
- ...m,
623
- name: A
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((A) => !s.find((dt) => dt.name === A.name)).map((A) => A.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
640
  onChange: (A) => {
635
- const mt = [...s].map((ut) => ut.id === m.id ? {
636
- ...m,
637
- name: 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
656
  onChange: (A) => {
649
- const mt = [...s].map((ut) => ut.id === m.id ? {
650
- ...m,
657
+ const _t = [...s].map((ut) => ut.id === _.id ? {
658
+ ..._,
651
659
  images: A
652
660
  } : ut);
653
- i([...mt]);
661
+ n([..._t]);
654
662
  },
655
- activeImage: (D = s.find((A) => A.id === m.id)) != null && D.images ? (G = s.find((A) => A.id === m.id)) == null ? void 0 : G.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
- v,
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: (A) => Z(A, m)
674
+ onClick: (A) => Z(A, _)
667
675
  }
668
676
  ) }),
669
- h && /* @__PURE__ */ t.jsx("div", { className: L.deleteButton, children: /* @__PURE__ */ t.jsx(
670
- v,
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((A) => A.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,
693
+ product: _,
686
694
  index: k,
687
- children: P
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: P
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 && I && W && /* @__PURE__ */ t.jsx(
711
- He,
718
+ R && i && I && X && /* @__PURE__ */ t.jsx(
719
+ Le,
712
720
  {
713
- ref: T,
714
- activeItem: F,
715
- setActiveItem: S,
716
- popupPosition: Y,
721
+ ref: B,
722
+ activeItem: R,
723
+ setActiveItem: C,
724
+ popupPosition: P,
717
725
  modalOptions: I,
718
726
  setIsOpenModal: O
719
727
  }
720
728
  ),
721
- B && 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: z,
728
- onDragEnd: j,
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, k) => q(m, k))
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, k) => q(m, k)),
746
+ ) : s.map((_, k) => q(_, k)),
739
747
  p && /* @__PURE__ */ t.jsx(
740
748
  "div",
741
749
  {
@@ -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];
765
+ const _ = [...s];
758
766
  let k = null;
759
767
  if (u) {
760
- for (let P = 0; P < u.length; P++)
761
- if (!s.find((D) => D.id === u[P].id)) {
762
- k = u[P];
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({
774
+ m === "select" && u ? _.push({
767
775
  name: k ? k.name : u[0].name,
768
776
  id: (k == null ? void 0 : k.id) || u[0].id,
769
- ...N
770
- }) : _ === "input" ? m.push({
771
- name: "",
772
- id: _t(),
773
- ...N
774
- }) : m.push({
775
- name: `Image ${s.length + 1}`,
776
- id: _t(),
777
- ...N
778
- }), i(m);
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
- v,
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
- C !== 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(C.scrollInterval),
806
- onChange: (m) => C.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,61 +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", hs = "_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,
839
- deleteButton: hs
840
- }, va = (d) => {
850
+ addButton: hs,
851
+ deleteButton: ps
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,
857
+ setItems: n,
858
+ other: c,
859
+ title: r,
860
+ subtitle: o,
861
+ draggable: i = !1,
862
+ withImage: l = !1,
863
+ addable: j = !0,
852
864
  itemsOptions: h,
853
865
  hasRangeSelector: p = !1,
854
- rangeSelectorOptions: _,
855
- limit: b,
866
+ rangeSelectorOptions: m,
867
+ limit: f,
856
868
  autoScrollInterval: u,
857
- deletable: B
869
+ deletable: S
858
870
  } = d;
859
- function H(N) {
860
- if (c)
861
- return N ? /* @__PURE__ */ t.jsx(
871
+ function D(g) {
872
+ if (l)
873
+ return g ? /* @__PURE__ */ t.jsx(
862
874
  "img",
863
875
  {
864
- src: `https://imagedelivery.net/${N[0]}/w=1000`,
876
+ src: `https://imagedelivery.net/${g[0]}/w=1000`,
865
877
  alt: "image",
866
878
  width: 16,
867
879
  height: 16
868
880
  }
869
881
  ) : /* @__PURE__ */ t.jsx(
870
- v,
882
+ b,
871
883
  {
872
884
  name: "Image",
873
885
  width: 16,
@@ -876,12 +888,12 @@ const Ue = (d) => {
876
888
  }
877
889
  );
878
890
  }
879
- const I = (N, g = !1) => {
880
- const C = h.find((S) => S.id === N);
881
- if (!C) return;
882
- const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
883
- n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
884
- v,
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,
885
897
  {
886
898
  name: "DotsSixVertical",
887
899
  hoverable: !0,
@@ -890,28 +902,28 @@ const Ue = (d) => {
890
902
  }
891
903
  ) }),
892
904
  /* @__PURE__ */ t.jsx(
893
- et,
905
+ tt,
894
906
  {
895
- onChange: (S) => {
896
- const Y = [...s], E = h.find((T) => T.name === S);
897
- if (!E) return;
898
- const y = E.id, M = Y.map((T) => T === N ? y : T);
899
- i([...M]);
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]);
900
912
  },
901
- value: C.name,
902
- options: h.filter((S) => !s.find((Y) => Y === S.id)).map((S) => S.name),
903
- leftAddon: H(C.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)
904
916
  }
905
917
  ),
906
- g && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
907
- v,
918
+ w && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
919
+ b,
908
920
  {
909
921
  name: "Trash",
910
922
  hoverable: !0,
911
923
  width: 20,
912
924
  height: 20,
913
925
  fill: "#C12A2A",
914
- onClick: () => i(s.filter((S) => S !== N))
926
+ onClick: () => n(s.filter((C) => C !== g))
915
927
  }
916
928
  ) }) })
917
929
  ] });
@@ -919,27 +931,27 @@ const Ue = (d) => {
919
931
  "div",
920
932
  {
921
933
  className: Q.product,
922
- children: F
934
+ children: R
923
935
  },
924
- N
936
+ g
925
937
  );
926
938
  };
927
939
  return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
928
- (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
929
- l && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: l }),
930
- o !== void 0 && /* @__PURE__ */ t.jsx(
931
- 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,
932
944
  {
933
- current: o,
934
- onChange: (N) => e == null ? void 0 : e(N)
945
+ current: a,
946
+ onChange: (g) => e == null ? void 0 : e(g)
935
947
  }
936
948
  )
937
949
  ] }),
938
- p && _ && /* @__PURE__ */ t.jsx(Ot, { ..._ }),
950
+ p && m && /* @__PURE__ */ t.jsx(Ot, { ...m }),
939
951
  /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
940
- r && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: r }),
941
- s.map((N) => I(N, B)),
942
- 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(
943
955
  "div",
944
956
  {
945
957
  style: {
@@ -952,22 +964,22 @@ const Ue = (d) => {
952
964
  lt,
953
965
  {
954
966
  withoutHover: !0,
955
- className: U(Q.button, {
956
- [Q.disabled]: !!(b && b <= s.length || s.length === h.length)
967
+ className: V(Q.button, {
968
+ [Q.disabled]: !!(f && f <= s.length || s.length === h.length)
957
969
  }),
958
970
  size: "s",
959
- disabled: !!(b && b <= s.length || s.length === h.length),
971
+ disabled: !!(f && f <= s.length || s.length === h.length),
960
972
  onClick: () => {
961
- const N = [...s];
962
- let g = null;
973
+ const g = [...s];
974
+ let w = null;
963
975
  if (h) {
964
- for (let C = 0; C < h.length; C++)
965
- if (!s.find((F) => F === h[C].id)) {
966
- g = h[C];
976
+ for (let E = 0; E < h.length; E++)
977
+ if (!s.find((R) => R === h[E].id)) {
978
+ w = h[E];
967
979
  break;
968
980
  }
969
981
  }
970
- N.push((g == null ? void 0 : g.id) || h[0].id), i(N);
982
+ g.push((w == null ? void 0 : w.id) || h[0].id), n(g);
971
983
  },
972
984
  style: {
973
985
  width: "fit-content"
@@ -975,7 +987,7 @@ const Ue = (d) => {
975
987
  children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
976
988
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
977
989
  /* @__PURE__ */ t.jsx(
978
- v,
990
+ b,
979
991
  {
980
992
  name: "Plus",
981
993
  width: 16,
@@ -988,14 +1000,14 @@ const Ue = (d) => {
988
1000
  }
989
1001
  )
990
1002
  ] }),
991
- a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a }),
1003
+ c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c }),
992
1004
  u !== void 0 && /* @__PURE__ */ t.jsx(
993
1005
  K,
994
1006
  {
995
1007
  label: "Auto scroll interval",
996
1008
  type: "number",
997
1009
  value: String(u.scrollInterval),
998
- onChange: (N) => u.setScrollInterval(Number(N)),
1010
+ onChange: (g) => u.setScrollInterval(Number(g)),
999
1011
  min: 0.1,
1000
1012
  max: 100,
1001
1013
  style: {
@@ -1005,176 +1017,175 @@ const Ue = (d) => {
1005
1017
  }
1006
1018
  )
1007
1019
  ] });
1008
- }, ps = "_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", R = {
1009
- title: ps,
1010
- subtitle: xs,
1011
- header: gs,
1012
- text: fs,
1013
- productsBlock: bs,
1014
- top: vs,
1015
- itemsBlock: js,
1016
- typeTexts: ys,
1017
- block: ks,
1018
- active: Is,
1019
- products: $s,
1020
- product: Ns,
1021
- 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,
1022
1034
  disabled: Cs,
1023
1035
  image: Bs,
1024
- info: Ss,
1025
- name: Ts,
1026
- buttons: Ps,
1027
- modal: As,
1028
- link: Ms,
1029
- modalOptions: Os,
1030
- addButton: qs,
1031
- 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,
1032
1044
  closeIcon: Ds
1033
- }, Ls = f.forwardRef(
1034
- (d, o) => {
1035
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = d;
1036
- function r(n, c) {
1037
- return n.length > c ? `${n.slice(0, c)}...` : n;
1038
- }
1045
+ }, Hs = x.forwardRef(
1046
+ (d, a) => {
1047
+ const { activeItem: e, setActiveItem: s, popupPosition: n, modalOptions: c, setIsOpenModal: r } = d;
1039
1048
  return /* @__PURE__ */ t.jsxs(
1040
1049
  "div",
1041
1050
  {
1042
- ref: o,
1043
- className: R.modal,
1044
- onClick: (n) => {
1045
- n.stopPropagation();
1051
+ ref: a,
1052
+ className: z.modal,
1053
+ onClick: (o) => {
1054
+ o.stopPropagation();
1046
1055
  },
1047
1056
  style: {
1048
- top: `${i.top}px`,
1049
- left: `${i.left}px`
1057
+ top: `${n.top}px`,
1058
+ left: `${n.left}px`
1050
1059
  },
1051
1060
  children: [
1052
- /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
1053
- /* @__PURE__ */ t.jsx("h3", { className: R.title, children: r(e.name, 20) }),
1054
- /* @__PURE__ */ t.jsx("div", { className: R.closeIcon, children: /* @__PURE__ */ t.jsx(
1055
- v,
1061
+ /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
1062
+ /* @__PURE__ */ t.jsx("h3", { className: z.title, children: e.name["en-US"] }),
1063
+ /* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
1064
+ b,
1056
1065
  {
1057
1066
  name: "X",
1058
1067
  height: 20,
1059
1068
  width: 20,
1060
1069
  hoverable: !0,
1061
1070
  onClick: () => {
1062
- s(null), l(!1);
1071
+ s(null), r(!1);
1063
1072
  }
1064
1073
  }
1065
1074
  ) })
1066
1075
  ] }),
1067
- /* @__PURE__ */ t.jsx("div", { className: R.modalOptions, children: a.map((n) => {
1068
- if (n.type === "image")
1076
+ /* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: c.map((o) => {
1077
+ if (o.type === "image")
1069
1078
  return /* @__PURE__ */ t.jsx(
1070
1079
  ft,
1071
1080
  {
1072
1081
  label: "Put up an attractive image",
1073
- activeImage: e[n.field],
1074
- onChange: (c) => {
1075
- const x = {
1082
+ activeImage: e[o.field],
1083
+ onChange: (i) => {
1084
+ const l = {
1076
1085
  ...e,
1077
- [n.field]: c
1086
+ [o.field]: i
1078
1087
  };
1079
- s(x);
1088
+ s(l);
1080
1089
  }
1081
1090
  },
1082
- String(n.field)
1091
+ String(o.field)
1083
1092
  );
1084
- if (n.type === "text")
1093
+ if (o.type === "text")
1085
1094
  return /* @__PURE__ */ t.jsx(
1086
- zt,
1095
+ Lt,
1087
1096
  {
1088
- typesText: e[n.field.type],
1089
- setTypesText: (c) => {
1090
- const x = {
1097
+ typesText: e[o.field.type],
1098
+ setTypesText: (i) => {
1099
+ const l = {
1091
1100
  ...e,
1092
- [n.field.type]: c
1101
+ [o.field.type]: i
1093
1102
  };
1094
- s(x);
1103
+ s(l);
1095
1104
  },
1096
- text: e[n.field.text] || "",
1097
- setText: (c) => {
1098
- const x = {
1105
+ text: e[o.field.text]["en-US"] || "",
1106
+ setText: (i) => {
1107
+ const l = {
1099
1108
  ...e,
1100
- [n.field.text]: c
1109
+ [o.field.text]: {
1110
+ "en-US": i
1111
+ }
1101
1112
  };
1102
- s(x);
1113
+ s(l);
1103
1114
  },
1104
- typeFont: e[n.field.type],
1105
- setTypeFont: (c) => {
1106
- const x = {
1115
+ typeFont: e[o.field.type],
1116
+ setTypeFont: (i) => {
1117
+ const l = {
1107
1118
  ...e,
1108
- [n.field.type]: c
1119
+ [o.field.type]: i
1109
1120
  };
1110
- s(x);
1121
+ s(l);
1111
1122
  },
1112
- subtitle: n.label
1123
+ subtitle: o.label
1113
1124
  }
1114
1125
  );
1115
- if (n.type === "input")
1126
+ if (o.type === "input")
1116
1127
  return /* @__PURE__ */ t.jsx(
1117
1128
  K,
1118
1129
  {
1119
- onChange: (c) => {
1120
- const x = {
1130
+ onChange: (i) => {
1131
+ const l = {
1121
1132
  ...e,
1122
- [n.field]: c
1133
+ [o.field]: i
1123
1134
  };
1124
- s(x);
1135
+ s(l);
1125
1136
  },
1126
- value: e[n.field] || "",
1127
- label: n.label,
1128
- placeholder: n.placeholder
1137
+ value: e[o.field] || "",
1138
+ label: o.label,
1139
+ placeholder: o.placeholder
1129
1140
  }
1130
1141
  );
1131
- if (n.type === "inputSwitch")
1132
- return /* @__PURE__ */ t.jsxs("div", { className: R.link, children: [
1142
+ if (o.type === "inputSwitch")
1143
+ return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
1133
1144
  /* @__PURE__ */ t.jsx(
1134
1145
  K,
1135
1146
  {
1136
- onChange: (c) => {
1137
- const x = {
1147
+ onChange: (i) => {
1148
+ const l = {
1138
1149
  ...e,
1139
- [n.field.text]: c
1150
+ [o.field.text]: i
1140
1151
  };
1141
- s(x);
1152
+ s(l);
1142
1153
  },
1143
- value: e[n.field.text] || "",
1144
- label: n.inputLabel,
1145
- placeholder: n.placeholder
1154
+ value: e[o.field.text] || "",
1155
+ label: o.inputLabel,
1156
+ placeholder: o.placeholder
1146
1157
  }
1147
1158
  ),
1148
1159
  /* @__PURE__ */ t.jsx(
1149
- st,
1160
+ et,
1150
1161
  {
1151
- current: !!e[n.field.switch] || !1,
1152
- label: n.switchLabel,
1153
- onChange: (c) => {
1154
- const x = {
1162
+ current: !!e[o.field.switch] || !1,
1163
+ label: o.switchLabel,
1164
+ onChange: (i) => {
1165
+ const l = {
1155
1166
  ...e,
1156
- [n.field.switch]: c
1167
+ [o.field.switch]: i
1157
1168
  };
1158
- s(x);
1169
+ s(l);
1159
1170
  }
1160
1171
  }
1161
1172
  )
1162
1173
  ] });
1163
- if (n.type === "select")
1174
+ if (o.type === "select")
1164
1175
  return /* @__PURE__ */ t.jsx(
1165
- et,
1176
+ tt,
1166
1177
  {
1167
- options: n.itemsOptions,
1168
- onChange: (c) => {
1169
- const x = {
1178
+ options: o.itemsOptions,
1179
+ onChange: (i) => {
1180
+ const l = {
1170
1181
  ...e,
1171
- [n.field]: c
1182
+ [o.field]: i
1172
1183
  };
1173
- s(x);
1184
+ s(l);
1174
1185
  },
1175
- label: n.label,
1176
- value: e[n.field] || "String",
1177
- leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(v, { 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] })
1178
1189
  }
1179
1190
  );
1180
1191
  }) })
@@ -1183,98 +1194,98 @@ const Ue = (d) => {
1183
1194
  );
1184
1195
  }
1185
1196
  );
1186
- function Hs(d) {
1187
- const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } = Tt({
1188
- id: o.id
1189
- }), c = {
1190
- transform: Pt.Transform.toString(l),
1191
- 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
1192
1203
  };
1193
1204
  return /* @__PURE__ */ t.jsx(
1194
1205
  "div",
1195
1206
  {
1196
- ref: a,
1197
- style: c,
1198
- className: `${R.product} ${n ? R.dragging : ""}`,
1207
+ ref: c,
1208
+ style: l,
1209
+ className: `${z.product} ${i ? z.dragging : ""}`,
1199
1210
  ...s,
1200
- ...i,
1211
+ ...n,
1201
1212
  children: e
1202
1213
  }
1203
1214
  );
1204
1215
  }
1205
- const ja = (d) => {
1216
+ const $a = (d) => {
1206
1217
  const {
1207
- isActiveItems: o,
1218
+ isActiveItems: a,
1208
1219
  setIsActiveItems: e,
1209
1220
  items: s,
1210
- setItems: i,
1211
- other: a,
1212
- title: l,
1213
- subtitle: r,
1214
- editable: n = !0,
1215
- draggable: c = !1,
1216
- withImage: x = !1,
1221
+ setItems: n,
1222
+ other: c,
1223
+ title: r,
1224
+ subtitle: o,
1225
+ editable: i = !0,
1226
+ draggable: l = !1,
1227
+ withImage: j = !1,
1217
1228
  deletable: h = !0,
1218
1229
  addable: p = !0,
1219
- itemsType: _,
1220
- itemsPlaceholder: b = "",
1230
+ itemsType: m,
1231
+ itemsPlaceholder: f = "",
1221
1232
  itemsOptions: u,
1222
- hasRangeSelector: B = !1,
1223
- rangeSelectorOptions: H,
1233
+ hasRangeSelector: S = !1,
1234
+ rangeSelectorOptions: D,
1224
1235
  modalOptions: I,
1225
- addableOptions: N = {}
1226
- } = d, [g, C] = f.useState(null), [F, S] = f.useState({
1236
+ addableOptions: g = {}
1237
+ } = d, [w, E] = x.useState(null), [R, C] = x.useState({
1227
1238
  top: 0,
1228
1239
  left: 0
1229
- }), [Y, E] = f.useState(null), y = f.useRef(null), [M, T] = f.useState(!1), W = $t(
1230
- Nt(St, {
1240
+ }), [P, st] = x.useState(null), y = x.useRef(null), [M, B] = x.useState(!1), X = $t(
1241
+ Nt(Bt, {
1231
1242
  activationConstraint: {
1232
1243
  distance: 5
1233
1244
  }
1234
1245
  })
1235
1246
  );
1236
- f.useEffect(() => {
1237
- const j = () => {
1238
- C(null), T(!1);
1247
+ x.useEffect(() => {
1248
+ const v = () => {
1249
+ E(null), B(!1);
1239
1250
  };
1240
- return document.body.addEventListener("click", j), C(null), T(!1), () => {
1241
- C(null), T(!1), document.body.removeEventListener("click", j);
1251
+ return document.body.addEventListener("click", v), E(null), B(!1), () => {
1252
+ E(null), B(!1), document.body.removeEventListener("click", v);
1242
1253
  };
1243
- }, []), f.useEffect(() => {
1244
- if (g) {
1245
- const j = [...s].map((q) => q.id === g.id ? g : q);
1246
- i(j);
1254
+ }, []), x.useEffect(() => {
1255
+ if (w) {
1256
+ const v = [...s].map((q) => q.id === w.id ? w : q);
1257
+ n(v);
1247
1258
  }
1248
- }, [g]), f.useEffect(() => {
1249
- if (y.current && Y) {
1250
- const j = y.current.getBoundingClientRect().height, q = window.innerHeight;
1251
- let m = Y.top;
1252
- m + j > q + window.scrollY - 200 && (m = q + window.scrollY - j - 200), m < 0 && (m = 10), S({
1253
- top: m,
1254
- left: Y.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
1255
1266
  });
1256
1267
  }
1257
- }, [y.current, Y]);
1258
- const O = (j, q) => {
1259
- j.stopPropagation();
1260
- const m = j.target.getBoundingClientRect();
1261
- E({
1262
- top: m.top + window.scrollY,
1263
- left: m.left - 30
1264
- }), C(q), T(!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);
1265
1276
  };
1266
- function z(j) {
1267
- if (x)
1268
- return j ? /* @__PURE__ */ t.jsx(
1277
+ function L(v) {
1278
+ if (j)
1279
+ return v ? /* @__PURE__ */ t.jsx(
1269
1280
  "img",
1270
1281
  {
1271
- src: `https://imagedelivery.net/${j[0]}/w=1000`,
1282
+ src: `https://imagedelivery.net/${v[0]}/w=1000`,
1272
1283
  alt: "image",
1273
1284
  width: 16,
1274
1285
  height: 16
1275
1286
  }
1276
1287
  ) : /* @__PURE__ */ t.jsx(
1277
- v,
1288
+ b,
1278
1289
  {
1279
1290
  name: "Image",
1280
1291
  width: 16,
@@ -1283,20 +1294,20 @@ const ja = (d) => {
1283
1294
  }
1284
1295
  );
1285
1296
  }
1286
- const Z = (j) => {
1287
- const { active: q, over: m } = j;
1288
- if (m && q.id !== m.id) {
1289
- const k = s.findIndex((D) => D.id === q.id), P = s.findIndex((D) => D.id === m.id);
1290
- if (k !== -1 && P !== -1) {
1291
- const D = [...s], [G] = D.splice(k, 1);
1292
- D.splice(P, 0, G), i(D);
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);
1293
1304
  }
1294
1305
  }
1295
- }, rt = (j) => {
1296
- var m;
1306
+ }, rt = (v) => {
1307
+ var _;
1297
1308
  const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1298
- c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1299
- v,
1309
+ l && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1310
+ b,
1300
1311
  {
1301
1312
  name: "DotsSixVertical",
1302
1313
  hoverable: !0,
@@ -1304,131 +1315,139 @@ const ja = (d) => {
1304
1315
  height: 20
1305
1316
  }
1306
1317
  ) }),
1307
- _ === "select" && u && /* @__PURE__ */ t.jsx(
1308
- et,
1318
+ m === "select" && u && /* @__PURE__ */ t.jsx(
1319
+ tt,
1309
1320
  {
1310
1321
  onChange: (k) => {
1311
- const D = [...s].map((G) => G.id === j.id ? {
1312
- ...j,
1313
- name: k
1314
- } : G);
1315
- C({
1316
- ...j,
1317
- name: k
1318
- }), i([...D]);
1322
+ const U = [...s].map((Y) => Y.id === v.id ? {
1323
+ ...v,
1324
+ name: {
1325
+ "en-US": k
1326
+ }
1327
+ } : Y);
1328
+ E({
1329
+ ...v,
1330
+ name: {
1331
+ "en-US": k
1332
+ }
1333
+ }), n([...U]);
1319
1334
  },
1320
- value: j.name,
1321
- options: u.filter((k) => !s.find((P) => P.name === k)),
1322
- leftAddon: z(j.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)
1323
1340
  }
1324
1341
  ),
1325
- _ === "input" && /* @__PURE__ */ t.jsx(
1342
+ m === "input" && /* @__PURE__ */ t.jsx(
1326
1343
  K,
1327
1344
  {
1328
1345
  onChange: (k) => {
1329
- const D = [...s].map((G) => G.id === j.id ? {
1330
- ...j,
1331
- name: k
1332
- } : G);
1333
- i([...D]);
1346
+ const U = [...s].map((Y) => Y.id === v.id ? {
1347
+ ...v,
1348
+ name: {
1349
+ "en-US": k
1350
+ }
1351
+ } : Y);
1352
+ n([...U]);
1334
1353
  },
1335
- value: j.name,
1336
- placeholder: b
1354
+ value: v.name["en-US"],
1355
+ placeholder: f
1337
1356
  }
1338
1357
  ),
1339
- _ === "image" && /* @__PURE__ */ t.jsx(
1358
+ m === "image" && /* @__PURE__ */ t.jsx(
1340
1359
  ft,
1341
1360
  {
1342
1361
  onChange: (k) => {
1343
- const D = [...s].map((G) => G.id === j.id ? {
1344
- ...j,
1362
+ const U = [...s].map((Y) => Y.id === v.id ? {
1363
+ ...v,
1345
1364
  images: k
1346
- } : G);
1347
- i([...D]);
1365
+ } : Y);
1366
+ n([...U]);
1348
1367
  },
1349
- activeImage: (m = s.find((k) => k.id === j.id)) == null ? void 0 : m.images[0]
1368
+ activeImage: (_ = s.find((k) => k.id === v.id)) == null ? void 0 : _.images[0]
1350
1369
  }
1351
1370
  ),
1352
- /* @__PURE__ */ t.jsxs("div", { className: R.buttons, children: [
1353
- n && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
1354
- v,
1371
+ /* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
1372
+ i && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
1373
+ b,
1355
1374
  {
1356
1375
  name: "Sliders",
1357
1376
  hoverable: !0,
1358
1377
  width: 20,
1359
1378
  height: 20,
1360
- onClick: (k) => O(k, j)
1379
+ onClick: (k) => O(k, v)
1361
1380
  }
1362
1381
  ) }),
1363
- h && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
1364
- v,
1382
+ h && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
1383
+ b,
1365
1384
  {
1366
1385
  name: "Trash",
1367
1386
  hoverable: !0,
1368
1387
  width: 20,
1369
1388
  height: 20,
1370
1389
  fill: "#C12A2A",
1371
- onClick: () => i(s.filter((k) => k.id !== j.id))
1390
+ onClick: () => n(s.filter((k) => k.id !== v.id))
1372
1391
  }
1373
1392
  ) })
1374
1393
  ] })
1375
1394
  ] });
1376
- return c ? /* @__PURE__ */ t.jsx(
1377
- Hs,
1395
+ return l ? /* @__PURE__ */ t.jsx(
1396
+ Ls,
1378
1397
  {
1379
- product: j,
1398
+ product: v,
1380
1399
  children: q
1381
1400
  },
1382
- j.id
1401
+ v.id
1383
1402
  ) : /* @__PURE__ */ t.jsx(
1384
1403
  "div",
1385
1404
  {
1386
- className: R.product,
1405
+ className: z.product,
1387
1406
  children: q
1388
1407
  },
1389
- j.id
1408
+ v.id
1390
1409
  );
1391
1410
  };
1392
- return /* @__PURE__ */ t.jsxs("div", { className: R.productsBlock, children: [
1393
- (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
1394
- l && /* @__PURE__ */ t.jsx("h3", { className: R.title, children: l }),
1395
- o !== void 0 && /* @__PURE__ */ t.jsx(
1396
- st,
1411
+ return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
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,
1397
1416
  {
1398
- current: o,
1399
- onChange: (j) => e == null ? void 0 : e(j)
1417
+ current: a,
1418
+ onChange: (v) => e == null ? void 0 : e(v)
1400
1419
  }
1401
1420
  )
1402
1421
  ] }),
1403
- g && n && I && M && /* @__PURE__ */ t.jsx(
1404
- Ls,
1422
+ w && i && I && M && /* @__PURE__ */ t.jsx(
1423
+ Hs,
1405
1424
  {
1406
1425
  ref: y,
1407
- activeItem: g,
1408
- setActiveItem: C,
1409
- popupPosition: F,
1426
+ activeItem: w,
1427
+ setActiveItem: E,
1428
+ popupPosition: R,
1410
1429
  modalOptions: I,
1411
- setIsOpenModal: T
1430
+ setIsOpenModal: B
1412
1431
  }
1413
1432
  ),
1414
- B && H && /* @__PURE__ */ t.jsx(Ot, { ...H }),
1415
- /* @__PURE__ */ t.jsxs("div", { className: R.products, children: [
1416
- r && /* @__PURE__ */ t.jsx("h5", { className: R.subtitle, children: r }),
1417
- c ? /* @__PURE__ */ t.jsx(
1433
+ S && D && /* @__PURE__ */ t.jsx(Ot, { ...D }),
1434
+ /* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
1435
+ o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
1436
+ l ? /* @__PURE__ */ t.jsx(
1418
1437
  wt,
1419
1438
  {
1420
- sensors: W,
1439
+ sensors: X,
1421
1440
  onDragEnd: Z,
1422
1441
  children: /* @__PURE__ */ t.jsx(
1423
- Ct,
1442
+ St,
1424
1443
  {
1425
- items: s.map((j) => j.id),
1426
- strategy: Bt,
1427
- children: s.map((j) => rt(j))
1444
+ items: s.map((v) => v.id),
1445
+ strategy: Ct,
1446
+ children: s.map((v) => rt(v))
1428
1447
  }
1429
1448
  )
1430
1449
  }
1431
- ) : s.map((j) => rt(j)),
1450
+ ) : s.map((v) => rt(v)),
1432
1451
  p && /* @__PURE__ */ t.jsx(
1433
1452
  "div",
1434
1453
  {
@@ -1441,43 +1460,49 @@ const ja = (d) => {
1441
1460
  lt,
1442
1461
  {
1443
1462
  withoutHover: !0,
1444
- className: R.button,
1463
+ className: z.button,
1445
1464
  size: "s",
1446
1465
  onClick: () => {
1447
- const j = [...s];
1466
+ const v = [...s];
1448
1467
  let q = null;
1449
1468
  if (u) {
1450
- for (let m = 0; m < u.length; m++)
1451
- if (!s.find((k) => k.name === u[m])) {
1452
- q = u[m];
1469
+ for (let _ = 0; _ < u.length; _++)
1470
+ if (!s.find((k) => k.name["en-US"] === u[_])) {
1471
+ q = u[_];
1453
1472
  break;
1454
1473
  }
1455
1474
  }
1456
- _ === "select" && u ? j.push({
1457
- name: q || u[0],
1458
- id: _t(),
1459
- ...N,
1475
+ m === "select" && u ? v.push({
1476
+ name: {
1477
+ "en-US": q || u[0]
1478
+ },
1479
+ id: mt(),
1480
+ ...g,
1460
1481
  maxSymbols: 100
1461
1482
  // пример значения
1462
- }) : _ === "input" ? j.push({
1463
- name: "",
1464
- id: _t(),
1465
- ...N,
1483
+ }) : m === "input" ? v.push({
1484
+ name: {
1485
+ "en-US": ""
1486
+ },
1487
+ id: mt(),
1488
+ ...g,
1466
1489
  maxSymbols: 100
1467
- }) : j.push({
1468
- name: `Image ${s.length + 1}`,
1469
- id: _t(),
1470
- ...N,
1490
+ }) : v.push({
1491
+ name: {
1492
+ "en-US": `Image ${s.length + 1}`
1493
+ },
1494
+ id: mt(),
1495
+ ...g,
1471
1496
  maxSymbols: 100
1472
- }), i(j);
1497
+ }), n(v);
1473
1498
  },
1474
1499
  style: {
1475
1500
  width: "fit-content"
1476
1501
  },
1477
- children: /* @__PURE__ */ t.jsxs("div", { className: R.addButton, children: [
1502
+ children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
1478
1503
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1479
1504
  /* @__PURE__ */ t.jsx(
1480
- v,
1505
+ b,
1481
1506
  {
1482
1507
  name: "Plus",
1483
1508
  width: 16,
@@ -1490,46 +1515,46 @@ const ja = (d) => {
1490
1515
  }
1491
1516
  )
1492
1517
  ] }),
1493
- a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a })
1518
+ c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c })
1494
1519
  ] });
1495
- }, zs = "_title_bn7sv_1", Rs = "_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 = {
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 = {
1496
1521
  title: zs,
1497
1522
  subtitle: Rs,
1498
1523
  header: Fs,
1499
1524
  text: Vs,
1500
- productsBlock: Us,
1501
- buttonsBlock: Ys,
1502
- top: Gs,
1503
- itemsBlock: Xs,
1504
- typeTexts: Ws,
1505
- block: Js,
1506
- active: Qs,
1507
- products: Ks,
1508
- product: Zs,
1509
- button: tn,
1510
- image: en,
1511
- info: sn,
1512
- name: nn,
1513
- buttons: on,
1514
- modal: an,
1515
- other: cn,
1516
- options: ln,
1517
- closeIcon: rn
1518
- }, dn = f.forwardRef((d, o) => {
1519
- 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), [h, p] = f.useState(e.link || ""), [_, b] = f.useState(e.text || ""), [u, B] = f.useState(e.openInNewTab), { pages: H } = Vt();
1520
- 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(() => {
1521
1546
  s({
1522
1547
  ...e,
1523
1548
  ...{
1524
- text: _,
1549
+ text: m,
1525
1550
  link: h,
1526
- destination: r,
1527
- typesText: a,
1528
- page: c,
1551
+ destination: o,
1552
+ typesText: c,
1553
+ page: l,
1529
1554
  openInNewTab: u
1530
1555
  }
1531
1556
  });
1532
- }, [a, r, h, _, c, u]), /* @__PURE__ */ t.jsxs(
1557
+ }, [c, o, h, m, l, u]), /* @__PURE__ */ t.jsxs(
1533
1558
  "div",
1534
1559
  {
1535
1560
  className: ct.modal,
@@ -1537,15 +1562,15 @@ const ja = (d) => {
1537
1562
  I.stopPropagation();
1538
1563
  },
1539
1564
  style: {
1540
- top: `${i.top}px`,
1541
- left: `${i.left}px`
1565
+ top: `${n.top}px`,
1566
+ left: `${n.left}px`
1542
1567
  },
1543
- ref: o,
1568
+ ref: a,
1544
1569
  children: [
1545
1570
  /* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
1546
1571
  /* @__PURE__ */ t.jsx("h3", { className: ct.title, children: e.type }),
1547
1572
  /* @__PURE__ */ t.jsx("div", { className: ct.closeIcon, children: /* @__PURE__ */ t.jsx(
1548
- v,
1573
+ b,
1549
1574
  {
1550
1575
  name: "X",
1551
1576
  height: 20,
@@ -1557,21 +1582,21 @@ const ja = (d) => {
1557
1582
  ] }),
1558
1583
  /* @__PURE__ */ t.jsxs("div", { className: ct.options, children: [
1559
1584
  /* @__PURE__ */ t.jsx(
1560
- et,
1585
+ tt,
1561
1586
  {
1562
1587
  label: "Destination",
1563
- onChange: (I) => n(I),
1564
- options: ["Go to Page", "Open Link"].filter((I) => I !== r),
1565
- value: r
1588
+ onChange: (I) => i(I),
1589
+ options: ["Go to Page", "Open Link"].filter((I) => I !== o),
1590
+ value: o
1566
1591
  }
1567
1592
  ),
1568
- r === "Go to Page" ? /* @__PURE__ */ t.jsx(
1569
- et,
1593
+ o === "Go to Page" ? /* @__PURE__ */ t.jsx(
1594
+ tt,
1570
1595
  {
1571
1596
  label: "Go to",
1572
- onChange: (I) => x(I),
1573
- options: H ? Object.values(H).filter((I) => I.name !== c).map((I) => I.name) : [],
1574
- 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
1575
1600
  }
1576
1601
  ) : /* @__PURE__ */ t.jsx(
1577
1602
  K,
@@ -1583,18 +1608,18 @@ const ja = (d) => {
1583
1608
  }
1584
1609
  ),
1585
1610
  /* @__PURE__ */ t.jsx(
1586
- st,
1611
+ et,
1587
1612
  {
1588
1613
  current: e.openInNewTab,
1589
1614
  label: "Open in new tab",
1590
- onChange: (I) => B(I)
1615
+ onChange: (I) => S(I)
1591
1616
  }
1592
1617
  ),
1593
1618
  /* @__PURE__ */ t.jsx(
1594
1619
  qt,
1595
1620
  {
1596
- onChange: (I) => b(I),
1597
- value: _,
1621
+ onChange: (I) => f({ "en-US": I }),
1622
+ value: m["en-US"],
1598
1623
  label: "Text",
1599
1624
  maxLength: 150
1600
1625
  }
@@ -1602,114 +1627,114 @@ const ja = (d) => {
1602
1627
  /* @__PURE__ */ t.jsx(
1603
1628
  Ht,
1604
1629
  {
1605
- typesText: a,
1606
- setTypesText: l
1630
+ typesText: c,
1631
+ setTypesText: r
1607
1632
  }
1608
1633
  )
1609
1634
  ] })
1610
1635
  ]
1611
1636
  }
1612
1637
  );
1613
- }), un = "_subtitle_jql1y_1", mn = "_header_jql1y_8", _n = "_text_jql1y_9", hn = "_productsBlock_jql1y_10", pn = "_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 = {
1614
- 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,
1615
1640
  header: mn,
1616
- text: _n,
1617
- productsBlock: hn,
1618
- buttonsBlock: pn,
1619
- top: xn,
1620
- itemsBlock: gn,
1621
- typeTexts: fn,
1622
- block: bn,
1623
- active: vn,
1624
- products: jn,
1625
- product: yn,
1626
- button: kn,
1627
- image: In,
1628
- info: $n,
1629
- name: Nn,
1630
- buttons: wn,
1641
+ text: hn,
1642
+ productsBlock: pn,
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,
1631
1656
  modal: Cn,
1632
1657
  other: Bn,
1633
- options: Sn,
1634
- addButton: Tn,
1635
- deleteButton: Pn
1636
- }, An = (d) => {
1637
- 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({
1638
1663
  top: 0,
1639
1664
  left: 0
1640
- }), [c, x] = f.useState(null), h = f.useRef(null);
1641
- f.useEffect(() => {
1642
- const _ = () => {
1643
- l(null);
1665
+ }), [l, j] = x.useState(null), h = x.useRef(null);
1666
+ x.useEffect(() => {
1667
+ const m = () => {
1668
+ r(null);
1644
1669
  };
1645
- return document.body.addEventListener("click", _), l(null), () => {
1646
- l(null), document.body.removeEventListener("click", _);
1670
+ return document.body.addEventListener("click", m), r(null), () => {
1671
+ r(null), document.body.removeEventListener("click", m);
1647
1672
  };
1648
- }, []), f.useEffect(() => {
1649
- if (a) {
1650
- const _ = [...o].map((b) => b.id === a.id ? a : b);
1651
- e(_);
1673
+ }, []), x.useEffect(() => {
1674
+ if (c) {
1675
+ const m = [...a].map((f) => f.id === c.id ? c : f);
1676
+ e(m);
1652
1677
  }
1653
- }, [a]), f.useEffect(() => {
1654
- if (h.current && c) {
1655
- const _ = h.current.getBoundingClientRect().height, b = window.innerHeight;
1656
- let u = c.top;
1657
- 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({
1658
1683
  top: u,
1659
- left: c.left
1684
+ left: l.left
1660
1685
  });
1661
1686
  }
1662
- }, [h.current, c]);
1663
- const p = (_, b) => {
1664
- _.stopPropagation();
1665
- const u = _.target.getBoundingClientRect();
1666
- x({
1687
+ }, [h.current, l]);
1688
+ const p = (m, f) => {
1689
+ m.stopPropagation();
1690
+ const u = m.target.getBoundingClientRect();
1691
+ j({
1667
1692
  top: u.top + window.scrollY,
1668
1693
  left: u.left - 30
1669
- }), l(b);
1694
+ }), r(f);
1670
1695
  };
1671
1696
  return /* @__PURE__ */ t.jsxs("div", { className: it.products, children: [
1672
1697
  /* @__PURE__ */ t.jsx("h5", { className: it.subtitle, children: "Button Type" }),
1673
- o.map((_) => /* @__PURE__ */ t.jsxs(
1698
+ a.map((m) => /* @__PURE__ */ t.jsxs(
1674
1699
  "div",
1675
1700
  {
1676
1701
  className: it.product,
1677
1702
  children: [
1678
1703
  /* @__PURE__ */ t.jsx(
1679
- et,
1704
+ tt,
1680
1705
  {
1681
- onChange: (b) => {
1682
- const B = [...o].map((H) => H.id === _.id ? {
1683
- ..._,
1684
- type: b
1685
- } : H);
1686
- e(B);
1706
+ onChange: (f) => {
1707
+ const S = [...a].map((D) => D.id === m.id ? {
1708
+ ...m,
1709
+ type: f
1710
+ } : D);
1711
+ e(S);
1687
1712
  },
1688
- value: _.type,
1713
+ value: m.type,
1689
1714
  options: ["Primary", "Secondary", "Tertiary"]
1690
1715
  }
1691
1716
  ),
1692
1717
  /* @__PURE__ */ t.jsxs("div", { className: it.buttons, children: [
1693
1718
  /* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
1694
- v,
1719
+ b,
1695
1720
  {
1696
1721
  name: "Sliders",
1697
1722
  hoverable: !0,
1698
1723
  width: 20,
1699
1724
  height: 20,
1700
- onClick: (b) => {
1701
- p(b, _);
1725
+ onClick: (f) => {
1726
+ p(f, m);
1702
1727
  }
1703
1728
  }
1704
1729
  ) }),
1705
1730
  s && /* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
1706
- v,
1731
+ b,
1707
1732
  {
1708
1733
  name: "Trash",
1709
1734
  hoverable: !0,
1710
1735
  onClick: () => {
1711
- const b = o.filter((u) => u.id !== _.id);
1712
- e(b);
1736
+ const f = a.filter((u) => u.id !== m.id);
1737
+ e(f);
1713
1738
  },
1714
1739
  width: 20,
1715
1740
  height: 20,
@@ -1719,18 +1744,18 @@ const ja = (d) => {
1719
1744
  ] })
1720
1745
  ]
1721
1746
  },
1722
- _.id
1747
+ m.id
1723
1748
  )),
1724
- a && /* @__PURE__ */ t.jsx(
1725
- dn,
1749
+ c && /* @__PURE__ */ t.jsx(
1750
+ un,
1726
1751
  {
1727
1752
  ref: h,
1728
- activeButton: a,
1729
- setActiveButton: l,
1730
- popupPosition: r
1753
+ activeButton: c,
1754
+ setActiveButton: r,
1755
+ popupPosition: o
1731
1756
  }
1732
1757
  ),
1733
- i && /* @__PURE__ */ t.jsx(
1758
+ n && /* @__PURE__ */ t.jsx(
1734
1759
  "div",
1735
1760
  {
1736
1761
  style: {
@@ -1745,16 +1770,18 @@ const ja = (d) => {
1745
1770
  className: it.button,
1746
1771
  size: "s",
1747
1772
  onClick: () => {
1748
- const _ = [...o];
1749
- _.push({
1773
+ const m = [...a];
1774
+ m.push({
1750
1775
  type: "Primary",
1751
- id: _t(),
1776
+ id: mt(),
1752
1777
  typesText: [],
1753
1778
  destination: "Go to Page",
1754
- text: "Button Name",
1779
+ text: {
1780
+ "en-US": "Button Name"
1781
+ },
1755
1782
  page: "home",
1756
1783
  openInNewTab: !0
1757
- }), e(_);
1784
+ }), e(m);
1758
1785
  },
1759
1786
  style: {
1760
1787
  width: "fit-content"
@@ -1762,7 +1789,7 @@ const ja = (d) => {
1762
1789
  children: /* @__PURE__ */ t.jsxs("div", { className: it.addButton, children: [
1763
1790
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1764
1791
  /* @__PURE__ */ t.jsx(
1765
- v,
1792
+ b,
1766
1793
  {
1767
1794
  name: "Plus",
1768
1795
  width: 16,
@@ -1775,75 +1802,75 @@ const ja = (d) => {
1775
1802
  }
1776
1803
  )
1777
1804
  ] });
1778
- }, ya = (d) => {
1779
- const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: i } = d;
1805
+ }, Na = (d) => {
1806
+ const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: n } = d;
1780
1807
  return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
1781
1808
  /* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
1782
1809
  /* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
1783
1810
  /* @__PURE__ */ t.jsx(
1784
- st,
1811
+ et,
1785
1812
  {
1786
- current: o,
1787
- onChange: (a) => e(a)
1813
+ current: a,
1814
+ onChange: (c) => e(c)
1788
1815
  }
1789
1816
  )
1790
1817
  ] }),
1791
1818
  /* @__PURE__ */ t.jsx(
1792
- An,
1819
+ Mn,
1793
1820
  {
1794
1821
  buttons: s,
1795
- setButtons: i
1822
+ setButtons: n
1796
1823
  }
1797
1824
  )
1798
1825
  ] }) });
1799
- }, 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", zn = "_dot_m18qi_46", Rn = "_active_m18qi_65", Fn = "_input_m18qi_77", Vn = "_countBlock_m18qi_91", Un = "_count_m18qi_91", Yn = "_controls_m18qi_107", Gn = "_button_m18qi_113", X = {
1800
- wrapper: Mn,
1801
- subtitle: On,
1802
- content: qn,
1803
- 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,
1804
1831
  track: Dn,
1805
- progress: Ln,
1806
- dots: Hn,
1832
+ progress: Hn,
1833
+ dots: Ln,
1807
1834
  dot: zn,
1808
1835
  active: Rn,
1809
1836
  input: Fn,
1810
1837
  countBlock: Vn,
1811
- count: Un,
1812
- controls: Yn,
1813
- button: Gn
1838
+ count: Yn,
1839
+ controls: Gn,
1840
+ button: Xn
1814
1841
  }, Ot = (d) => {
1815
- 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, h = () => {
1816
- a < s && l(a + i);
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);
1817
1844
  }, p = () => {
1818
- a > e && l(a - i);
1819
- }, _ = (b) => {
1820
- const u = e + b * i;
1821
- l(u);
1845
+ c > e && r(c - n);
1846
+ }, m = (f) => {
1847
+ const u = e + f * n;
1848
+ r(u);
1822
1849
  };
1823
- return /* @__PURE__ */ t.jsxs("div", { className: X.wrapper, children: [
1824
- o && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: o }),
1825
- /* @__PURE__ */ t.jsxs("div", { className: X.content, children: [
1826
- /* @__PURE__ */ t.jsxs("div", { className: X.range, children: [
1827
- /* @__PURE__ */ t.jsx("div", { className: X.track }),
1850
+ return /* @__PURE__ */ t.jsxs("div", { className: G.wrapper, children: [
1851
+ a && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: a }),
1852
+ /* @__PURE__ */ t.jsxs("div", { className: G.content, children: [
1853
+ /* @__PURE__ */ t.jsxs("div", { className: G.range, children: [
1854
+ /* @__PURE__ */ t.jsx("div", { className: G.track }),
1828
1855
  /* @__PURE__ */ t.jsx(
1829
1856
  "div",
1830
1857
  {
1831
- className: X.progress,
1832
- style: { width: `${x}%` }
1858
+ className: G.progress,
1859
+ style: { width: `${j}%` }
1833
1860
  }
1834
1861
  ),
1835
- /* @__PURE__ */ t.jsx("div", { className: X.dots, children: c.map((b, u) => {
1836
- const B = u <= (a - e) / i;
1862
+ /* @__PURE__ */ t.jsx("div", { className: G.dots, children: l.map((f, u) => {
1863
+ const S = u <= (c - e) / n;
1837
1864
  return /* @__PURE__ */ t.jsx(
1838
1865
  "button",
1839
1866
  {
1840
- onClick: () => _(u),
1841
- className: U(X.dot, {
1842
- [X.active]: B,
1843
- [X.inactive]: !B,
1844
- [X.dragging]: r
1867
+ onClick: () => m(u),
1868
+ className: V(G.dot, {
1869
+ [G.active]: S,
1870
+ [G.inactive]: !S,
1871
+ [G.dragging]: o
1845
1872
  }),
1846
- "aria-label": `Set value to ${e + u * i}`
1873
+ "aria-label": `Set value to ${e + u * n}`
1847
1874
  },
1848
1875
  u
1849
1876
  );
@@ -1854,18 +1881,18 @@ const ja = (d) => {
1854
1881
  type: "range",
1855
1882
  min: e,
1856
1883
  max: s,
1857
- step: i,
1858
- value: a,
1859
- onChange: (b) => l(Number(b.target.value)),
1860
- onMouseDown: () => n(!0),
1861
- onMouseUp: () => n(!1),
1862
- onTouchStart: () => n(!0),
1863
- onTouchEnd: () => n(!1),
1864
- className: X.input
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),
1891
+ className: G.input
1865
1892
  }
1866
1893
  )
1867
1894
  ] }),
1868
- /* @__PURE__ */ t.jsxs("div", { className: X.countBlock, children: [
1895
+ /* @__PURE__ */ t.jsxs("div", { className: G.countBlock, children: [
1869
1896
  /* @__PURE__ */ t.jsx(
1870
1897
  K,
1871
1898
  {
@@ -1873,23 +1900,23 @@ const ja = (d) => {
1873
1900
  min: e,
1874
1901
  max: s,
1875
1902
  paddingless: !0,
1876
- onChange: (b) => {
1877
- const u = Number(b);
1878
- 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);
1879
1906
  },
1880
- value: String(a)
1907
+ value: String(c)
1881
1908
  }
1882
1909
  ),
1883
- /* @__PURE__ */ t.jsxs("div", { className: X.controls, children: [
1910
+ /* @__PURE__ */ t.jsxs("div", { className: G.controls, children: [
1884
1911
  /* @__PURE__ */ t.jsx(
1885
1912
  "button",
1886
1913
  {
1887
1914
  onClick: h,
1888
- disabled: a >= s,
1889
- className: X.button,
1915
+ disabled: c >= s,
1916
+ className: G.button,
1890
1917
  "aria-label": "Increment count",
1891
1918
  children: /* @__PURE__ */ t.jsx(
1892
- v,
1919
+ b,
1893
1920
  {
1894
1921
  name: "CaretUp",
1895
1922
  width: 15,
@@ -1902,11 +1929,11 @@ const ja = (d) => {
1902
1929
  "button",
1903
1930
  {
1904
1931
  onClick: p,
1905
- disabled: a <= e,
1906
- className: X.button,
1932
+ disabled: c <= e,
1933
+ className: G.button,
1907
1934
  "aria-label": "Decrement count",
1908
1935
  children: /* @__PURE__ */ t.jsx(
1909
- v,
1936
+ b,
1910
1937
  {
1911
1938
  name: "CaretDown",
1912
1939
  width: 15,
@@ -1919,151 +1946,147 @@ const ja = (d) => {
1919
1946
  ] })
1920
1947
  ] })
1921
1948
  ] });
1922
- }, 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", hi = "_addButton_ix5ax_160", pi = "_deleteButton_ix5ax_175", xi = "_closeIcon_ix5ax_187", V = {
1923
- title: Xn,
1924
- subtitle: Wn,
1925
- header: Jn,
1926
- text: Qn,
1927
- productsBlock: Kn,
1928
- top: Zn,
1929
- itemsBlock: ti,
1930
- typeTexts: ei,
1931
- block: si,
1932
- active: ni,
1933
- products: ii,
1934
- product: oi,
1935
- button: ai,
1936
- image: ci,
1937
- info: li,
1938
- name: ri,
1939
- buttons: di,
1940
- 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,
1941
1968
  link: mi,
1942
- modalOptions: _i,
1943
- addButton: hi,
1944
- deleteButton: pi,
1945
- closeIcon: xi
1946
- }, gi = (d) => {
1947
- const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: a } = d, l = a.find((n) => n.id === o.listingId);
1948
- if (!l) return null;
1949
- function r(n, c) {
1950
- return n.length > c ? `${n.slice(0, c)}...` : n;
1951
- }
1952
- return /* @__PURE__ */ t.jsxs(
1969
+ modalOptions: hi,
1970
+ addButton: pi,
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(
1953
1976
  "div",
1954
1977
  {
1955
- className: V.modal,
1956
- onClick: (n) => {
1957
- n.stopPropagation();
1978
+ className: F.modal,
1979
+ onClick: (o) => {
1980
+ o.stopPropagation();
1958
1981
  },
1959
1982
  style: {
1960
1983
  top: `${s.top}px`,
1961
1984
  left: `${s.left}px`
1962
1985
  },
1963
1986
  children: [
1964
- /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1965
- /* @__PURE__ */ t.jsx("h3", { children: r(l.productData.name, 20) }),
1966
- /* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
1967
- v,
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,
1968
1991
  {
1969
1992
  name: "X",
1970
1993
  height: 20,
1971
1994
  width: 20,
1972
1995
  onClick: () => {
1973
- i(!1), e(null);
1996
+ n(!1), e(null);
1974
1997
  }
1975
1998
  }
1976
1999
  ) })
1977
2000
  ] }),
1978
- /* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: /* @__PURE__ */ t.jsx(
2001
+ /* @__PURE__ */ t.jsx("div", { className: F.modalOptions, children: /* @__PURE__ */ t.jsx(
1979
2002
  ft,
1980
2003
  {
1981
2004
  label: "Put up an attractive image",
1982
- activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
1983
- onChange: (n) => {
1984
- const c = {
1985
- ...o,
1986
- 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]
1987
2010
  };
1988
- e(c);
2011
+ e(i);
1989
2012
  }
1990
2013
  }
1991
2014
  ) })
1992
2015
  ]
1993
2016
  }
1994
- );
2017
+ ) : null;
1995
2018
  };
1996
- function fi(d) {
1997
- const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } = Tt({
1998
- id: String(o.listingId)
1999
- }), c = {
2000
- transform: Pt.Transform.toString(l),
2001
- 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
2002
2025
  };
2003
2026
  return /* @__PURE__ */ t.jsx(
2004
2027
  "div",
2005
2028
  {
2006
- ref: a,
2007
- style: c,
2008
- className: `${V.product} ${n ? V.dragging : ""}`,
2029
+ ref: c,
2030
+ style: l,
2031
+ className: `${F.product} ${i ? F.dragging : ""}`,
2009
2032
  ...s,
2010
- ...i,
2033
+ ...n,
2011
2034
  children: e
2012
2035
  }
2013
2036
  );
2014
2037
  }
2015
- const ka = (d) => {
2038
+ const wa = (d) => {
2016
2039
  const {
2017
- isActiveItems: o,
2040
+ isActiveItems: a,
2018
2041
  setIsActiveItems: e,
2019
2042
  items: s,
2020
- setItems: i,
2021
- other: a,
2022
- title: l,
2023
- subtitle: r,
2024
- editable: n = !0,
2025
- draggable: c = !1,
2026
- withImage: x = !1,
2043
+ setItems: n,
2044
+ other: c,
2045
+ title: r,
2046
+ subtitle: o,
2047
+ editable: i = !0,
2048
+ draggable: l = !1,
2049
+ withImage: j = !1,
2027
2050
  deletable: h = !0,
2028
2051
  addable: p = !0,
2029
- itemsType: _,
2030
- itemsOptions: b
2031
- } = d, [u, B] = f.useState(
2052
+ itemsType: m,
2053
+ itemsOptions: f
2054
+ } = d, [u, S] = x.useState(
2032
2055
  null
2033
- ), [H, I] = f.useState({
2056
+ ), [D, I] = x.useState({
2034
2057
  top: 0,
2035
2058
  left: 0
2036
- }), [N, g] = f.useState(!1), C = $t(
2037
- Nt(St, {
2059
+ }), [g, w] = x.useState(!1), E = $t(
2060
+ Nt(Bt, {
2038
2061
  activationConstraint: {
2039
2062
  distance: 5
2040
2063
  }
2041
2064
  })
2042
2065
  );
2043
- f.useEffect(() => {
2066
+ x.useEffect(() => {
2044
2067
  const y = () => {
2045
- B(null), g(!1);
2068
+ S(null), w(!1);
2046
2069
  };
2047
- return document.body.addEventListener("click", y), B(null), g(!1), () => {
2048
- B(null), g(!1), document.body.removeEventListener("click", y);
2070
+ return document.body.addEventListener("click", y), S(null), w(!1), () => {
2071
+ S(null), w(!1), document.body.removeEventListener("click", y);
2049
2072
  };
2050
- }, []), f.useEffect(() => {
2073
+ }, []), x.useEffect(() => {
2051
2074
  if (u) {
2052
2075
  const y = [...s].map((M) => M.listingId === u.listingId ? u : M);
2053
- i(y);
2076
+ n(y);
2054
2077
  }
2055
2078
  }, [u]);
2056
- const F = (y, M) => {
2079
+ const R = (y, M) => {
2057
2080
  y.stopPropagation();
2058
- const T = y.target.getBoundingClientRect(), W = 100, O = window.innerHeight;
2059
- let z = T.top + window.scrollY;
2060
- z + W > O && (z = O - W - 20), g(!0), I({
2061
- top: z - 80,
2062
- left: T.left - 30
2063
- }), B(M);
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);
2064
2087
  };
2065
- function S(y) {
2066
- if (x)
2088
+ function C(y) {
2089
+ if (j)
2067
2090
  return y ? /* @__PURE__ */ t.jsx(
2068
2091
  "img",
2069
2092
  {
@@ -2073,7 +2096,7 @@ const ka = (d) => {
2073
2096
  height: 16
2074
2097
  }
2075
2098
  ) : /* @__PURE__ */ t.jsx(
2076
- v,
2099
+ b,
2077
2100
  {
2078
2101
  name: "Image",
2079
2102
  width: 16,
@@ -2082,21 +2105,21 @@ const ka = (d) => {
2082
2105
  }
2083
2106
  );
2084
2107
  }
2085
- const Y = (y) => {
2086
- const { active: M, over: T } = y;
2087
- if (T && M.id !== T.id) {
2088
- const W = s.findIndex((z) => String(z.listingId) === M.id), O = s.findIndex((z) => String(z.listingId) === T.id);
2089
- if (W !== -1 && O !== -1) {
2090
- const z = [...s], [Z] = z.splice(W, 1);
2091
- z.splice(O, 0, Z), i(z);
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);
2092
2115
  }
2093
2116
  }
2094
- }, E = (y, M) => {
2095
- const T = b.find((O) => y.listingId === O.id);
2096
- if (!T) return null;
2097
- const W = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2098
- c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2099
- v,
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,
2100
2123
  {
2101
2124
  name: "DotsSixVertical",
2102
2125
  hoverable: !0,
@@ -2104,106 +2127,106 @@ const ka = (d) => {
2104
2127
  height: 20
2105
2128
  }
2106
2129
  ) }),
2107
- _ === "select" && /* @__PURE__ */ t.jsx(
2108
- et,
2130
+ m === "select" && /* @__PURE__ */ t.jsx(
2131
+ tt,
2109
2132
  {
2110
2133
  onChange: (O) => {
2111
- const z = [...s], Z = b.find((q) => q.productData.name === O);
2134
+ const L = [...s], Z = f.find((q) => q.productData.name === O);
2112
2135
  if (!Z) return;
2113
2136
  const rt = {
2114
2137
  listingId: Z.id,
2115
2138
  image: Z.productData.images.length > 0 ? Z.productData.images[0].cfId : ""
2116
- }, j = z.map((q) => q.listingId === y.listingId ? rt : q);
2117
- B(rt), i([...j]);
2139
+ }, v = L.map((q) => q.listingId === y.listingId ? rt : q);
2140
+ S(rt), n([...v]);
2118
2141
  },
2119
- value: T.productData.name,
2142
+ value: B.productData.name,
2120
2143
  options: [
2121
- ...b.filter((O) => !s.find((z) => z.listingId === O.id)).map((O) => O.productData.name)
2144
+ ...f.filter((O) => !s.find((L) => L.listingId === O.id)).map((O) => O.productData.name)
2122
2145
  ],
2123
- leftAddon: S(
2124
- y.image || T.productData.images.length > 0 && T.productData.images[0].cfId || ""
2146
+ leftAddon: C(
2147
+ y.image || B.productData.images.length > 0 && B.productData.images[0].cfId || ""
2125
2148
  )
2126
2149
  },
2127
2150
  M
2128
2151
  ),
2129
- /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
2130
- n && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
2131
- v,
2152
+ /* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
2153
+ i && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
2154
+ b,
2132
2155
  {
2133
2156
  name: "Sliders",
2134
2157
  hoverable: !0,
2135
2158
  width: 20,
2136
2159
  height: 20,
2137
- onClick: (O) => F(O, y)
2160
+ onClick: (O) => R(O, y)
2138
2161
  }
2139
2162
  ) }),
2140
- h && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
2141
- v,
2163
+ h && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
2164
+ b,
2142
2165
  {
2143
2166
  name: "Trash",
2144
2167
  hoverable: !0,
2145
2168
  width: 20,
2146
2169
  height: 20,
2147
2170
  fill: "#C12A2A",
2148
- onClick: () => i(s.filter((O) => O !== y))
2171
+ onClick: () => n(s.filter((O) => O !== y))
2149
2172
  }
2150
2173
  ) })
2151
2174
  ] })
2152
2175
  ] });
2153
- return c ? /* @__PURE__ */ t.jsx(
2154
- fi,
2176
+ return l ? /* @__PURE__ */ t.jsx(
2177
+ bi,
2155
2178
  {
2156
2179
  product: y,
2157
- children: W
2180
+ children: X
2158
2181
  },
2159
2182
  y.listingId
2160
2183
  ) : /* @__PURE__ */ t.jsx(
2161
2184
  "div",
2162
2185
  {
2163
- className: V.product,
2164
- children: W
2186
+ className: F.product,
2187
+ children: X
2165
2188
  },
2166
2189
  y.listingId
2167
2190
  );
2168
2191
  };
2169
- return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
2170
- (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
2171
- l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
2172
- o !== void 0 && /* @__PURE__ */ t.jsx(
2173
- 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,
2174
2197
  {
2175
- current: o,
2198
+ current: a,
2176
2199
  onChange: (y) => e == null ? void 0 : e(y)
2177
2200
  }
2178
2201
  )
2179
2202
  ] }),
2180
- N && u && /* @__PURE__ */ t.jsx(
2181
- gi,
2203
+ g && u && /* @__PURE__ */ t.jsx(
2204
+ fi,
2182
2205
  {
2183
2206
  activeItem: u,
2184
- setActiveItem: B,
2185
- setIsOpenModal: g,
2186
- popupPosition: H,
2187
- itemsOptions: b
2207
+ setActiveItem: S,
2208
+ setIsOpenModal: w,
2209
+ popupPosition: D,
2210
+ itemsOptions: f
2188
2211
  }
2189
2212
  ),
2190
- /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
2191
- r && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: r }),
2192
- 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(
2193
2216
  wt,
2194
2217
  {
2195
- sensors: C,
2196
- onDragEnd: Y,
2218
+ sensors: E,
2219
+ onDragEnd: P,
2197
2220
  children: /* @__PURE__ */ t.jsx(
2198
- Ct,
2221
+ St,
2199
2222
  {
2200
2223
  items: s.map((y) => String(y.listingId)),
2201
- strategy: Bt,
2202
- children: s.map((y, M) => E(y, M))
2224
+ strategy: Ct,
2225
+ children: s.map((y, M) => st(y, M))
2203
2226
  }
2204
2227
  )
2205
2228
  }
2206
- ) : s.map((y, M) => E(y, M)),
2229
+ ) : s.map((y, M) => st(y, M)),
2207
2230
  p && /* @__PURE__ */ t.jsx(
2208
2231
  "div",
2209
2232
  {
@@ -2216,28 +2239,28 @@ const ka = (d) => {
2216
2239
  lt,
2217
2240
  {
2218
2241
  withoutHover: !0,
2219
- className: V.button,
2242
+ className: F.button,
2220
2243
  size: "s",
2221
2244
  onClick: () => {
2222
2245
  const y = [...s];
2223
- for (let M = 0; M < b.length; M++)
2224
- if (!s.find((T) => T.listingId === b[M].id)) {
2246
+ for (let M = 0; M < f.length; M++)
2247
+ if (!s.find((B) => B.listingId === f[M].id)) {
2225
2248
  y.push({
2226
- listingId: b[M].id,
2227
- image: b[M].productData.images.length > 0 ? b[M].productData.images[0].cfId : ""
2249
+ listingId: f[M].id,
2250
+ image: f[M].productData.images.length > 0 ? f[M].productData.images[0].cfId : ""
2228
2251
  });
2229
2252
  break;
2230
2253
  }
2231
- i(y);
2254
+ n(y);
2232
2255
  },
2233
- disabled: s.length === b.length,
2256
+ disabled: s.length === f.length,
2234
2257
  style: {
2235
2258
  width: "fit-content"
2236
2259
  },
2237
- children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
2260
+ children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
2238
2261
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
2239
2262
  /* @__PURE__ */ t.jsx(
2240
- v,
2263
+ b,
2241
2264
  {
2242
2265
  name: "Plus",
2243
2266
  width: 16,
@@ -2250,65 +2273,65 @@ const ka = (d) => {
2250
2273
  }
2251
2274
  )
2252
2275
  ] }),
2253
- a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a })
2276
+ c !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: c })
2254
2277
  ] });
2255
- }, 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", zi = "_title_6cemk_198", w = {
2256
- options: bi,
2257
- price: vi,
2258
- oldPrice: ji,
2259
- newPrice: yi,
2260
- animate: ki,
2261
- appearAndBounce: Ii,
2262
- meta: $i,
2263
- info: Ni,
2264
- 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,
2265
2288
  buttons: Ci,
2266
2289
  variants: Bi,
2267
- variant: Si,
2268
- stock: Ti,
2269
- variantInfo: Pi,
2270
- quantity: Ai,
2271
- count: Mi,
2272
- focused: Oi,
2273
- button: qi,
2274
- 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,
2275
2298
  chargeTypes: Di,
2276
- charge: Li,
2277
- chargeActive: Hi,
2299
+ charge: Hi,
2300
+ chargeActive: Li,
2278
2301
  title: zi
2279
- }, Ri = "_wrapper_c1dht_1", Fi = "_label_c1dht_9", Vi = "_input_c1dht_18", Ui = "_paddingless_c1dht_31", Yi = "_content_c1dht_35", Gi = "_contentBorder_c1dht_47", Xi = "_borderless_c1dht_52", Wi = "_rightIcon_c1dht_57", nt = {
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 = {
2280
2303
  wrapper: Ri,
2281
2304
  label: Fi,
2282
2305
  input: Vi,
2283
- paddingless: Ui,
2284
- content: Yi,
2285
- contentBorder: Gi,
2286
- borderless: Xi,
2287
- rightIcon: Wi
2288
- }, Ji = (d) => {
2306
+ paddingless: Yi,
2307
+ content: Gi,
2308
+ contentBorder: Xi,
2309
+ borderless: Wi,
2310
+ rightIcon: Ji
2311
+ }, Qi = (d) => {
2289
2312
  const {
2290
- onChange: o,
2313
+ onChange: a,
2291
2314
  style: e,
2292
2315
  label: s,
2293
- value: i,
2294
- type: a,
2295
- min: l,
2296
- max: r,
2297
- placeholder: n,
2298
- disabled: c = !1,
2299
- required: x = !1,
2316
+ value: n,
2317
+ type: c,
2318
+ min: r,
2319
+ max: o,
2320
+ placeholder: i,
2321
+ disabled: l = !1,
2322
+ required: j = !1,
2300
2323
  regex: h,
2301
2324
  paddingless: p = !1,
2302
- borderless: _ = !1,
2303
- editable: b = !1,
2325
+ borderless: m = !1,
2326
+ editable: f = !1,
2304
2327
  isSearch: u = !1,
2305
- centered: B = !1
2306
- } = d, { themeSettings: H } = Et(), { inputs: I } = H, [N, g] = f.useState(!1);
2307
- function C(S) {
2308
- return Number(S) < 0 ? String(l) : S;
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;
2309
2332
  }
2310
- function F(S) {
2311
- return !x || !h ? !0 : new RegExp(h).test(S);
2333
+ function R(C) {
2334
+ return !j || !h ? !0 : new RegExp(h).test(C);
2312
2335
  }
2313
2336
  return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
2314
2337
  s && /* @__PURE__ */ t.jsx(
@@ -2322,7 +2345,7 @@ const ka = (d) => {
2322
2345
  /* @__PURE__ */ t.jsxs(
2323
2346
  "div",
2324
2347
  {
2325
- className: U(nt.content, {
2348
+ className: V(nt.content, {
2326
2349
  [nt.contentBorder]: I.border.active
2327
2350
  }),
2328
2351
  style: {
@@ -2335,33 +2358,33 @@ const ka = (d) => {
2335
2358
  "input",
2336
2359
  {
2337
2360
  id: s,
2338
- type: a || "text",
2339
- onChange: (S) => {
2340
- if (a === "text") o(S.target.value);
2361
+ type: c || "text",
2362
+ onChange: (C) => {
2363
+ if (c === "text") a(C.target.value);
2341
2364
  else {
2342
- const Y = C(S.target.value);
2343
- o(Y);
2365
+ const P = E(C.target.value);
2366
+ a(P);
2344
2367
  }
2345
2368
  },
2346
- value: i,
2369
+ value: n,
2347
2370
  autoComplete: "off",
2348
- placeholder: n || "Type something...",
2349
- className: U(nt.input, {
2350
- [nt.required]: N && x && !F(i),
2371
+ placeholder: i || "Type something...",
2372
+ className: V(nt.input, {
2373
+ [nt.required]: g && j && !R(n),
2351
2374
  [nt.paddingless]: p,
2352
- [nt.borderless]: _
2375
+ [nt.borderless]: m
2353
2376
  }),
2354
- min: a === "number" ? l : void 0,
2355
- max: a === "number" ? r : void 0,
2356
- disabled: c,
2357
- onFocus: () => g(!0),
2377
+ min: c === "number" ? r : void 0,
2378
+ max: c === "number" ? o : void 0,
2379
+ disabled: l,
2380
+ onFocus: () => w(!0),
2358
2381
  style: {
2359
- textAlign: B ? "center" : "left"
2382
+ textAlign: S ? "center" : "left"
2360
2383
  }
2361
2384
  }
2362
2385
  ),
2363
2386
  u && /* @__PURE__ */ t.jsx("div", { className: nt.rightIcon, children: /* @__PURE__ */ t.jsx(
2364
- v,
2387
+ b,
2365
2388
  {
2366
2389
  name: "MagnifyingGlass",
2367
2390
  fill: "var(--icon-secondary)",
@@ -2369,8 +2392,8 @@ const ka = (d) => {
2369
2392
  height: I.general.size
2370
2393
  }
2371
2394
  ) }),
2372
- b && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2373
- v,
2395
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2396
+ b,
2374
2397
  {
2375
2398
  name: "Sliders",
2376
2399
  width: 20,
@@ -2382,37 +2405,37 @@ const ka = (d) => {
2382
2405
  }
2383
2406
  )
2384
2407
  ] });
2385
- }, 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 = {
2386
- button: Qi,
2387
- primary: Ki,
2388
- primaryHovered: Zi,
2389
- secondary: to,
2390
- secondaryHovered: eo,
2391
- tertiary: so,
2392
- tertiaryHovered: no,
2393
- content: io
2394
- }, tt = (d) => {
2395
- 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();
2396
2419
  return /* @__PURE__ */ t.jsx(
2397
2420
  "button",
2398
2421
  {
2399
- className: U(ot.button, i, {
2400
- [ot.primary]: l === "Primary",
2401
- [ot.secondary]: l === "Secondary",
2402
- [ot.tertiary]: l === "Tertiary",
2403
- [ot.primaryHovered]: l === "Primary" && !a && r.buttons.primary.hover,
2404
- [ot.secondaryHovered]: l === "Secondary" && !a && r.buttons.secondary.hover,
2405
- [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
2406
2429
  }),
2407
2430
  onClick: e,
2408
2431
  style: {
2409
2432
  ...s
2410
2433
  },
2411
- disabled: a,
2412
- children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ot.content, children: [
2413
- o,
2434
+ disabled: c,
2435
+ children: r === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ot.content, children: [
2436
+ a,
2414
2437
  /* @__PURE__ */ t.jsx(
2415
- v,
2438
+ b,
2416
2439
  {
2417
2440
  name: "ArrowRight",
2418
2441
  fill: "var(--icon-tertiary)",
@@ -2420,78 +2443,77 @@ const ka = (d) => {
2420
2443
  height: 20
2421
2444
  }
2422
2445
  )
2423
- ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: o })
2446
+ ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
2424
2447
  }
2425
2448
  );
2426
2449
  };
2427
- var Rt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(Rt || {});
2428
- const Ia = (d) => {
2429
- var I, N;
2430
- 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: h } = At(), [p, _] = f.useState(!1);
2431
- f.useEffect(() => {
2432
- _(!0);
2433
- const g = setTimeout(() => _(!1), 600);
2450
+ var zt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(zt || {});
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);
2434
2457
  return () => clearTimeout(g);
2435
- }, [r]);
2436
- async function b() {
2437
- await h(), await x({
2458
+ }, [o]);
2459
+ async function f() {
2460
+ await h(), await j({
2438
2461
  productId: d.id,
2439
2462
  productVariantId: e.id,
2440
- quantity: r
2463
+ quantity: o
2441
2464
  });
2442
2465
  }
2443
2466
  function u() {
2444
- c(), b(), l("/checkout");
2467
+ l(), f(), r("/checkout");
2445
2468
  }
2446
- function B(g) {
2469
+ function S(g) {
2447
2470
  if (g >= 864e5) {
2448
- const E = Math.floor(g / 864e5);
2449
- return `${E} ${E === 1 ? "day" : "days"}`;
2471
+ const P = Math.floor(g / 864e5);
2472
+ return `${P} ${P === 1 ? "day" : "days"}`;
2450
2473
  } else if (g >= 36e5) {
2451
- const E = Math.floor(g / 36e5);
2452
- return `${E} ${E === 1 ? "hour" : "hours"}`;
2474
+ const P = Math.floor(g / 36e5);
2475
+ return `${P} ${P === 1 ? "hour" : "hours"}`;
2453
2476
  } else if (g >= 6e4) {
2454
- const E = Math.floor(g / 6e4);
2455
- return `${E} ${E === 1 ? "minute" : "minutes"}`;
2477
+ const P = Math.floor(g / 6e4);
2478
+ return `${P} ${P === 1 ? "minute" : "minutes"}`;
2456
2479
  } else {
2457
- const E = Math.floor(g / 1e3);
2458
- return `${E} ${E === 1 ? "second" : "seconds"}`;
2480
+ const P = Math.floor(g / 1e3);
2481
+ return `${P} ${P === 1 ? "second" : "seconds"}`;
2459
2482
  }
2460
2483
  }
2461
- function H(g, C) {
2462
- return g.length > C ? g.slice(0, C) + "..." : g;
2463
- }
2464
- return /* @__PURE__ */ t.jsxs("div", { className: w.options, children: [
2465
- 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(
2466
2488
  "div",
2467
2489
  {
2468
- className: U(w.charge, {
2469
- [w.chargeActive]: i === g
2490
+ className: V(N.charge, {
2491
+ [N.chargeActive]: n === g
2470
2492
  }),
2471
- onClick: () => a(g),
2472
- children: Rt[g]
2493
+ onClick: () => c(g),
2494
+ children: zt[g]
2473
2495
  },
2474
2496
  g
2475
2497
  )) }),
2476
- /* @__PURE__ */ t.jsx("div", { className: w.variants, children: o.map((g) => {
2477
- var C;
2498
+ /* @__PURE__ */ t.jsx("div", { className: N.variants, children: a.map((g) => {
2499
+ var w;
2478
2500
  return /* @__PURE__ */ t.jsxs(
2479
2501
  "div",
2480
2502
  {
2481
- className: U(w.variant, {
2482
- [w.activeVariant]: e.id === g.id
2503
+ className: V(N.variant, {
2504
+ [N.activeVariant]: e.id === g.id
2483
2505
  }),
2484
2506
  onClick: () => s(g),
2485
2507
  children: [
2486
- /* @__PURE__ */ t.jsxs("div", { className: w.variantInfo, children: [
2487
- /* @__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 }),
2488
2510
  /* @__PURE__ */ t.jsxs("span", { children: [
2489
2511
  "$",
2490
- 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"
2491
2513
  ] })
2492
2514
  ] }),
2493
- /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: w.stock, children: [
2494
- ((C = g.quantity.restrictions) == null ? void 0 : C.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,
2495
2517
  " in stock"
2496
2518
  ] }) })
2497
2519
  ]
@@ -2499,49 +2521,50 @@ const Ia = (d) => {
2499
2521
  g.id
2500
2522
  );
2501
2523
  }) }),
2502
- i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: w.quantity, children: [
2524
+ n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
2503
2525
  /* @__PURE__ */ t.jsx(
2504
- tt,
2526
+ W,
2505
2527
  {
2506
2528
  type: "Secondary",
2507
2529
  onClick: () => {
2508
- r > 1 ? n((g) => g - 1) : n(1);
2530
+ o > 1 ? i((g) => g - 1) : i(1);
2509
2531
  },
2510
- className: w.button,
2511
- disabled: e.quantity.restrictions && r <= e.quantity.restrictions.min,
2512
- children: /* @__PURE__ */ t.jsx(v, { 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" })
2513
2535
  }
2514
2536
  ),
2515
2537
  /* @__PURE__ */ t.jsx(
2516
- Ji,
2538
+ Qi,
2517
2539
  {
2518
2540
  type: "number",
2519
- value: String(r),
2520
- onChange: (g) => n(Number(g)),
2521
- max: ((I = e.quantity.restrictions) == null ? void 0 : I.max) || e.quantity.available || 1 / 0,
2522
- min: ((N = e.quantity.restrictions) == null ? void 0 : N.min) || 0,
2523
- 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
2524
2547
  }
2525
2548
  ),
2526
2549
  /* @__PURE__ */ t.jsx(
2527
- tt,
2550
+ W,
2528
2551
  {
2529
2552
  type: "Secondary",
2530
2553
  onClick: () => {
2531
- n((g) => g + 1);
2554
+ i((g) => g + 1);
2532
2555
  },
2533
- className: w.button,
2534
- disabled: !!(e.quantity.restrictions && r >= e.quantity.restrictions.max || e.quantity.available && r >= e.quantity.available),
2535
- children: /* @__PURE__ */ t.jsx(v, { 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" })
2536
2559
  }
2537
2560
  )
2538
2561
  ] }),
2539
- /* @__PURE__ */ t.jsxs("div", { className: w.meta, children: [
2540
- /* @__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: [
2541
2564
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
2542
- /* @__PURE__ */ t.jsxs("div", { className: w.infoRight, children: [
2565
+ /* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
2543
2566
  /* @__PURE__ */ t.jsx(
2544
- v,
2567
+ b,
2545
2568
  {
2546
2569
  name: "Lightning",
2547
2570
  fill: "#FF3F19",
@@ -2549,201 +2572,203 @@ const Ia = (d) => {
2549
2572
  height: 20
2550
2573
  }
2551
2574
  ),
2552
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : B(e.deliveryTime) })
2575
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : S(e.deliveryTime) })
2553
2576
  ] })
2554
2577
  ] }),
2555
- /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
2578
+ /* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
2556
2579
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
2557
- /* @__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: [
2558
- /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), 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: [
2559
2582
  "$ ",
2560
- (e.price.amount || 0) * r
2583
+ (e.price.amount || 0) * o
2561
2584
  ] }),
2562
- /* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
2585
+ /* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
2563
2586
  "$ ",
2564
- (e.compareAtPrice.amount || 0) * r
2587
+ (e.compareAtPrice.amount || 0) * o
2565
2588
  ] })
2566
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2589
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: p }), children: [
2567
2590
  "$ ",
2568
- (e.price.amount || 0) * r
2569
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
2570
- /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), 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: [
2571
2594
  "$ ",
2572
2595
  e.subscriptionSettings.price.amount || 0
2573
2596
  ] }),
2574
- /* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
2597
+ /* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
2575
2598
  "$ ",
2576
2599
  e.subscriptionSettings.compareAtPrice.amount || 0
2577
2600
  ] })
2578
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2601
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(N.newPrice, { [N.animate]: p }), children: [
2579
2602
  "$ ",
2580
2603
  e.subscriptionSettings.price.amount || 0
2581
2604
  ] }) })
2582
2605
  ] })
2583
2606
  ] }),
2584
- /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
2607
+ /* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
2585
2608
  /* @__PURE__ */ t.jsx(
2586
- tt,
2609
+ W,
2587
2610
  {
2588
2611
  type: "Primary",
2589
2612
  onClick: () => u(),
2590
- 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"
2591
2615
  }
2592
2616
  ),
2593
- i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
2594
- tt,
2617
+ n === "ONE_TIME" && /* @__PURE__ */ t.jsx(
2618
+ W,
2595
2619
  {
2596
2620
  type: "Secondary",
2597
- onClick: () => b(),
2621
+ onClick: () => f(),
2622
+ disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
2598
2623
  children: "Add to Cart"
2599
2624
  }
2600
2625
  )
2601
2626
  ] })
2602
2627
  ] });
2603
- }, 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", ho = "_title_1tdo3_131", po = "_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", $ = {
2604
- button: oo,
2605
- login: ao,
2606
- signUp: co,
2607
- buttons: lo,
2608
- 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,
2609
2634
  "slide-in-fade": "_slide-in-fade_1tdo3_1",
2610
2635
  "mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
2611
- closing: uo,
2636
+ closing: _o,
2612
2637
  "mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
2613
2638
  "slide-out-fade": "_slide-out-fade_1tdo3_1",
2614
2639
  info: mo,
2615
- top: _o,
2616
- title: ho,
2617
- clear: po,
2618
- activeClear: xo,
2619
- count: go,
2620
- cart: fo,
2621
- empty: bo,
2622
- product: vo,
2623
- products: jo,
2624
- image: yo,
2625
- productInfo: ko,
2626
- content: Io,
2627
- name: $o,
2628
- price: No,
2629
- productButtons: wo,
2640
+ top: ho,
2641
+ title: po,
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,
2630
2655
  productButton: Co,
2631
2656
  productCount: Bo,
2632
- bottom: So,
2633
- subtotal: To,
2634
- block: Po,
2635
- shoppingCount: Ao,
2636
- total: Mo,
2637
- link: Oo,
2638
- userInfo: qo,
2639
- 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,
2640
2665
  pagesMobileModalContent: Do,
2641
- pagesMobileModalHeader: Lo,
2642
- pagesMobileModalFooter: Ho
2666
+ pagesMobileModalHeader: Ho,
2667
+ pagesMobileModalFooter: Lo
2643
2668
  };
2644
2669
  class gt extends Error {
2645
2670
  }
2646
2671
  gt.prototype.name = "InvalidTokenError";
2647
2672
  function zo(d) {
2648
- return decodeURIComponent(atob(d).replace(/(.)/g, (o, e) => {
2673
+ return decodeURIComponent(atob(d).replace(/(.)/g, (a, e) => {
2649
2674
  let s = e.charCodeAt(0).toString(16).toUpperCase();
2650
2675
  return s.length < 2 && (s = "0" + s), "%" + s;
2651
2676
  }));
2652
2677
  }
2653
2678
  function Ro(d) {
2654
- let o = d.replace(/-/g, "+").replace(/_/g, "/");
2655
- switch (o.length % 4) {
2679
+ let a = d.replace(/-/g, "+").replace(/_/g, "/");
2680
+ switch (a.length % 4) {
2656
2681
  case 0:
2657
2682
  break;
2658
2683
  case 2:
2659
- o += "==";
2684
+ a += "==";
2660
2685
  break;
2661
2686
  case 3:
2662
- o += "=";
2687
+ a += "=";
2663
2688
  break;
2664
2689
  default:
2665
2690
  throw new Error("base64 string is not of the correct length");
2666
2691
  }
2667
2692
  try {
2668
- return zo(o);
2693
+ return zo(a);
2669
2694
  } catch {
2670
- return atob(o);
2695
+ return atob(a);
2671
2696
  }
2672
2697
  }
2673
- function Fo(d, o) {
2698
+ function Fo(d, a) {
2674
2699
  if (typeof d != "string")
2675
2700
  throw new gt("Invalid token specified: must be a string");
2676
- o || (o = {});
2677
- 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];
2678
2703
  if (typeof s != "string")
2679
2704
  throw new gt(`Invalid token specified: missing part #${e + 1}`);
2680
- let i;
2705
+ let n;
2681
2706
  try {
2682
- i = Ro(s);
2683
- } catch (a) {
2684
- 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})`);
2685
2710
  }
2686
2711
  try {
2687
- return JSON.parse(i);
2688
- } catch (a) {
2689
- 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})`);
2690
2715
  }
2691
2716
  }
2692
- const $a = (d) => {
2693
- const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = d;
2717
+ const Ca = (d) => {
2718
+ const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = d;
2694
2719
  return /* @__PURE__ */ t.jsxs("div", { className: $.buttons, children: [
2695
- o && /* @__PURE__ */ t.jsx(Vo, {}),
2696
- s && /* @__PURE__ */ t.jsx(Ft, { signUp: e })
2720
+ a && /* @__PURE__ */ t.jsx(Vo, {}),
2721
+ s && /* @__PURE__ */ t.jsx(Rt, { signUp: e })
2697
2722
  ] });
2698
2723
  }, Vo = () => {
2699
- const [d, o] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: a } = At();
2700
- function l(p) {
2701
- for (let _ = 0; _ < i.parts.length; _++)
2702
- for (let b = 0; b < p.variants.length; b++)
2703
- if (i.parts[_].productVariantId === p.variants[_].id)
2704
- return i.parts[_].productVariantId;
2705
- }
2724
+ const [d, a] = x.useState(!1), [e, s] = x.useState([]), { cart: n, getProducts: c } = At();
2706
2725
  function r(p) {
2707
- for (let _ = 0; _ < i.parts.length; _++)
2708
- for (let b = 0; b < p.variants.length; b++)
2709
- if (i.parts[_].productVariantId === p.variants[_].id)
2710
- return i.parts[_].quantity;
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;
2730
+ }
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;
2711
2736
  }
2712
- f.useEffect(() => {
2737
+ x.useEffect(() => {
2713
2738
  (async () => {
2714
- const _ = i.parts.map((B) => String(B.productId)), u = (await a([..._])).map((B) => ({
2715
- ...B,
2716
- activeVariantId: l(B),
2717
- quantity: r(B)
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)
2718
2743
  }));
2719
2744
  s(u);
2720
2745
  })();
2721
- }, [i.parts.length]);
2722
- function n(p) {
2723
- var _;
2724
- return !p || !(p != null && p.variants) ? !1 : (_ = p.variants.find((b) => b.id === p.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;
2725
2750
  }
2726
- const c = i.parts.length > 0 && e.length > 0 && !n(e[0]), [x, h] = f.useState(!1);
2751
+ const l = n.parts.length > 0 && e.length > 0 && !i(e[0]), [j, h] = x.useState(!1);
2727
2752
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2728
2753
  /* @__PURE__ */ t.jsxs(
2729
- tt,
2754
+ W,
2730
2755
  {
2731
2756
  type: "Secondary",
2732
2757
  style: {
2733
2758
  padding: 10
2734
2759
  },
2735
2760
  onClick: (p) => {
2736
- p.stopPropagation(), window.location.pathname !== "/admin/builder" && (o(!0), h(!0));
2761
+ p.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0), h(!0));
2737
2762
  },
2738
2763
  children: [
2739
2764
  /* @__PURE__ */ t.jsx(
2740
- v,
2765
+ b,
2741
2766
  {
2742
2767
  name: "Handbag",
2743
2768
  fill: "var(--icon-primary)"
2744
2769
  }
2745
2770
  ),
2746
- c && /* @__PURE__ */ t.jsx("div", { className: $.shoppingCount, children: i.parts.length })
2771
+ l && /* @__PURE__ */ t.jsx("div", { className: $.shoppingCount, children: n.parts.length })
2747
2772
  ]
2748
2773
  }
2749
2774
  ),
@@ -2752,35 +2777,35 @@ const $a = (d) => {
2752
2777
  {
2753
2778
  close: () => {
2754
2779
  h(!1), setTimeout(() => {
2755
- o(!1);
2780
+ a(!1);
2756
2781
  }, 300);
2757
2782
  },
2758
2783
  withAnimation: !1,
2759
2784
  children: /* @__PURE__ */ t.jsx(
2760
- Uo,
2785
+ Yo,
2761
2786
  {
2762
2787
  activeProducts: e,
2763
- isCartNotEmpty: c,
2764
- isOpen: x
2788
+ isCartNotEmpty: l,
2789
+ isOpen: j
2765
2790
  }
2766
2791
  )
2767
2792
  }
2768
2793
  )
2769
2794
  ] });
2770
- }, Uo = (d) => {
2771
- const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: r } = At(), n = jt();
2772
- function c(p) {
2773
- n(p);
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);
2774
2799
  }
2775
- function x(p) {
2776
- r({
2800
+ function j(p) {
2801
+ o({
2777
2802
  productId: p.id,
2778
2803
  productVariantId: p.activeVariantId,
2779
2804
  quantity: p.quantity + 1
2780
2805
  });
2781
2806
  }
2782
2807
  function h(p) {
2783
- r({
2808
+ o({
2784
2809
  productId: p.id,
2785
2810
  productVariantId: p.activeVariantId,
2786
2811
  quantity: p.quantity - 1
@@ -2789,7 +2814,7 @@ const $a = (d) => {
2789
2814
  return /* @__PURE__ */ t.jsxs(
2790
2815
  "div",
2791
2816
  {
2792
- className: U($.modal, {
2817
+ className: V($.modal, {
2793
2818
  [$.closing]: !s
2794
2819
  }),
2795
2820
  onClick: (p) => p.stopPropagation(),
@@ -2797,22 +2822,22 @@ const $a = (d) => {
2797
2822
  /* @__PURE__ */ t.jsxs("div", { className: $.top, children: [
2798
2823
  /* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
2799
2824
  /* @__PURE__ */ t.jsx("span", { className: $.title, children: "Cart" }),
2800
- e && /* @__PURE__ */ t.jsx("div", { className: $.count, children: i.parts.length })
2825
+ e && /* @__PURE__ */ t.jsx("div", { className: $.count, children: n.parts.length })
2801
2826
  ] }),
2802
2827
  /* @__PURE__ */ t.jsx(
2803
2828
  "button",
2804
2829
  {
2805
- className: U($.clear, {
2830
+ className: V($.clear, {
2806
2831
  [$.activeClear]: e
2807
2832
  }),
2808
2833
  disabled: !e,
2809
- onClick: a,
2834
+ onClick: c,
2810
2835
  children: "Clear all"
2811
2836
  }
2812
2837
  )
2813
2838
  ] }),
2814
2839
  e ? /* @__PURE__ */ t.jsxs("div", { className: $.cart, children: [
2815
- /* @__PURE__ */ t.jsx("div", { className: $.products, children: o.map((p) => /* @__PURE__ */ t.jsxs(
2840
+ /* @__PURE__ */ t.jsx("div", { className: $.products, children: a.map((p) => /* @__PURE__ */ t.jsxs(
2816
2841
  "div",
2817
2842
  {
2818
2843
  className: $.product,
@@ -2832,7 +2857,7 @@ const $a = (d) => {
2832
2857
  /* @__PURE__ */ t.jsx("div", { className: $.name, children: p.name }),
2833
2858
  /* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
2834
2859
  "$",
2835
- p.variants.find((_) => _.id === p.activeVariantId).price.amount * ((p == null ? void 0 : p.quantity) || 1)
2860
+ p.variants.find((m) => m.id === p.activeVariantId).price.amount * ((p == null ? void 0 : p.quantity) || 1)
2836
2861
  ] })
2837
2862
  ] })
2838
2863
  ] }),
@@ -2845,7 +2870,7 @@ const $a = (d) => {
2845
2870
  },
2846
2871
  className: $.productButton,
2847
2872
  children: /* @__PURE__ */ t.jsx(
2848
- v,
2873
+ b,
2849
2874
  {
2850
2875
  name: "Minus",
2851
2876
  fill: "#757575",
@@ -2859,10 +2884,10 @@ const $a = (d) => {
2859
2884
  /* @__PURE__ */ t.jsx(
2860
2885
  "div",
2861
2886
  {
2862
- onClick: () => x(p),
2887
+ onClick: () => j(p),
2863
2888
  className: $.productButton,
2864
2889
  children: /* @__PURE__ */ t.jsx(
2865
- v,
2890
+ b,
2866
2891
  {
2867
2892
  name: "Plus",
2868
2893
  fill: "#757575",
@@ -2882,7 +2907,7 @@ const $a = (d) => {
2882
2907
  /* @__PURE__ */ t.jsxs("div", { className: $.block, children: [
2883
2908
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
2884
2909
  /* @__PURE__ */ t.jsx(
2885
- v,
2910
+ b,
2886
2911
  {
2887
2912
  name: "Info",
2888
2913
  width: 20,
@@ -2893,18 +2918,18 @@ const $a = (d) => {
2893
2918
  ] }),
2894
2919
  /* @__PURE__ */ t.jsxs("div", { className: $.total, children: [
2895
2920
  "$",
2896
- l().total
2921
+ r().total
2897
2922
  ] })
2898
2923
  ] }),
2899
- /* @__PURE__ */ t.jsx(tt, { onClick: () => c("/checkout"), children: "Checkout" })
2924
+ /* @__PURE__ */ t.jsx(W, { onClick: () => l("/checkout"), children: "Checkout" })
2900
2925
  ] })
2901
- ] }) : /* @__PURE__ */ t.jsx(Yo, {})
2926
+ ] }) : /* @__PURE__ */ t.jsx(Go, {})
2902
2927
  ]
2903
2928
  }
2904
2929
  );
2905
- }, Yo = () => /* @__PURE__ */ t.jsxs("div", { className: $.empty, children: [
2930
+ }, Go = () => /* @__PURE__ */ t.jsxs("div", { className: $.empty, children: [
2906
2931
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2907
- v,
2932
+ b,
2908
2933
  {
2909
2934
  name: "Handbag",
2910
2935
  fill: "var(--icon-secondary)"
@@ -2923,17 +2948,17 @@ const $a = (d) => {
2923
2948
  }
2924
2949
  )
2925
2950
  ] })
2926
- ] }), Ft = ({ signUp: d }) => {
2927
- const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o, s = jt();
2928
- function i(r) {
2929
- 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);
2930
2955
  }
2931
2956
  if (!e)
2932
2957
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2933
2958
  /* @__PURE__ */ t.jsx(
2934
- tt,
2959
+ W,
2935
2960
  {
2936
- onClick: () => i("/customer-dash"),
2961
+ onClick: () => n("/customer-dash"),
2937
2962
  type: "Secondary",
2938
2963
  style: {
2939
2964
  padding: 10
@@ -2942,9 +2967,9 @@ const $a = (d) => {
2942
2967
  }
2943
2968
  ),
2944
2969
  d && /* @__PURE__ */ t.jsx(
2945
- tt,
2970
+ W,
2946
2971
  {
2947
- onClick: () => i("/customer-dash"),
2972
+ onClick: () => n("/customer-dash"),
2948
2973
  type: "Primary",
2949
2974
  style: {
2950
2975
  padding: 10
@@ -2953,46 +2978,46 @@ const $a = (d) => {
2953
2978
  }
2954
2979
  )
2955
2980
  ] });
2956
- const [a, l] = f.useState("test-email@gmail.com");
2957
- return f.useEffect(() => {
2981
+ const [c, r] = x.useState("test-email@gmail.com");
2982
+ return x.useEffect(() => {
2958
2983
  (async () => {
2959
- const n = Fo(e);
2960
- l(n.email);
2984
+ const i = Fo(e);
2985
+ r(i.email);
2961
2986
  })();
2962
2987
  }, [e]), /* @__PURE__ */ t.jsx(
2963
2988
  "div",
2964
2989
  {
2965
2990
  className: $.userInfo,
2966
- onClick: () => i("/customer-dash"),
2967
- children: /* @__PURE__ */ t.jsx("div", { children: a || "test-email@gmail.com" })
2991
+ onClick: () => n("/customer-dash"),
2992
+ children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
2968
2993
  }
2969
2994
  );
2970
- }, Go = ({
2995
+ }, Xo = ({
2971
2996
  children: d,
2972
- logo: o,
2997
+ logo: a,
2973
2998
  setIsOpen: e,
2974
2999
  signUp: s
2975
3000
  }) => {
2976
- const { setIsOpen: i } = Dt(), a = () => {
2977
- i(!1), setTimeout(() => {
2978
- e(!1), i(!0);
3001
+ const { setIsOpen: n } = Ut(), c = () => {
3002
+ n(!1), setTimeout(() => {
3003
+ e(!1), n(!0);
2979
3004
  }, 300);
2980
3005
  };
2981
3006
  return /* @__PURE__ */ t.jsxs(
2982
3007
  "div",
2983
3008
  {
2984
3009
  className: $.pagesMobileModal,
2985
- onClick: (l) => l.stopPropagation(),
3010
+ onClick: (r) => r.stopPropagation(),
2986
3011
  children: [
2987
3012
  /* @__PURE__ */ t.jsxs("div", { className: $.pagesMobileModalHeader, children: [
2988
- /* @__PURE__ */ t.jsx("div", { children: o }),
3013
+ /* @__PURE__ */ t.jsx("div", { children: a }),
2989
3014
  /* @__PURE__ */ t.jsx(
2990
- tt,
3015
+ W,
2991
3016
  {
2992
3017
  type: "Secondary",
2993
- onClick: a,
3018
+ onClick: c,
2994
3019
  children: /* @__PURE__ */ t.jsx(
2995
- v,
3020
+ b,
2996
3021
  {
2997
3022
  name: "X",
2998
3023
  fill: "var(--icon-primary)"
@@ -3002,42 +3027,42 @@ const $a = (d) => {
3002
3027
  )
3003
3028
  ] }),
3004
3029
  /* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalContent, children: d }),
3005
- /* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ft, { signUp: s }) })
3030
+ /* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Rt, { signUp: s }) })
3006
3031
  ]
3007
3032
  }
3008
3033
  );
3009
- }, Na = ({
3034
+ }, Ba = ({
3010
3035
  children: d,
3011
- logo: o,
3036
+ logo: a,
3012
3037
  signUp: e
3013
3038
  }) => {
3014
- const [s, i] = f.useState(!1);
3039
+ const [s, n] = x.useState(!1);
3015
3040
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
3016
- /* @__PURE__ */ t.jsx(Xo, { setIsOpenModal: i }),
3017
- s && /* @__PURE__ */ t.jsx(Mt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
3018
- Go,
3041
+ /* @__PURE__ */ t.jsx(Wo, { setIsOpenModal: n }),
3042
+ s && /* @__PURE__ */ t.jsx(Mt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
3043
+ Xo,
3019
3044
  {
3020
- logo: o,
3021
- setIsOpen: i,
3045
+ logo: a,
3046
+ setIsOpen: n,
3022
3047
  signUp: e,
3023
3048
  children: d
3024
3049
  }
3025
3050
  ) })
3026
3051
  ] });
3027
- }, Xo = (d) => {
3028
- const { setIsOpenModal: o } = d;
3052
+ }, Wo = (d) => {
3053
+ const { setIsOpenModal: a } = d;
3029
3054
  return /* @__PURE__ */ t.jsx(
3030
- tt,
3055
+ W,
3031
3056
  {
3032
3057
  type: "Secondary",
3033
3058
  style: {
3034
3059
  padding: 10
3035
3060
  },
3036
3061
  onClick: (e) => {
3037
- e.stopPropagation(), o(!0);
3062
+ e.stopPropagation(), a(!0);
3038
3063
  },
3039
3064
  children: /* @__PURE__ */ t.jsx(
3040
- v,
3065
+ b,
3041
3066
  {
3042
3067
  name: "List",
3043
3068
  fill: "var(--icon-primary)"
@@ -3045,22 +3070,22 @@ const $a = (d) => {
3045
3070
  )
3046
3071
  }
3047
3072
  );
3048
- }, 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 = {
3049
- share: Wo,
3050
- modal: Jo,
3051
- header: Qo,
3052
- socials: Ko,
3053
- social: Zo,
3054
- copy: ta,
3055
- title: ea,
3056
- copyWrapper: sa,
3057
- copyText: na,
3058
- copyTextMobile: ia,
3059
- copyTextMiniMobile: oa
3060
- }, wa = () => {
3061
- 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();
3062
3087
  function e() {
3063
- o(!0);
3088
+ a(!0);
3064
3089
  }
3065
3090
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
3066
3091
  /* @__PURE__ */ t.jsx(
@@ -3072,7 +3097,7 @@ const $a = (d) => {
3072
3097
  },
3073
3098
  type: "Secondary",
3074
3099
  children: /* @__PURE__ */ t.jsx(
3075
- v,
3100
+ b,
3076
3101
  {
3077
3102
  name: "Share",
3078
3103
  fill: "#757575",
@@ -3081,38 +3106,38 @@ const $a = (d) => {
3081
3106
  )
3082
3107
  }
3083
3108
  ),
3084
- 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, {}) })
3085
3110
  ] });
3086
- }, aa = () => {
3087
- const { setIsOpenModal: d } = Lt(), { notification: o, setNotification: e } = Ut(), { setIsOpen: s } = Dt(), i = window.location.href;
3088
- function a() {
3089
- 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({
3090
3115
  message: "Link copied to clipboard",
3091
3116
  status: "success"
3092
3117
  });
3093
3118
  }
3094
- function l() {
3119
+ function r() {
3095
3120
  s(!1), setTimeout(() => {
3096
3121
  d(!1), s(!0);
3097
3122
  }, 300);
3098
3123
  }
3099
- function r(n, c) {
3100
- return n.length > c ? n.slice(0, c) + "..." : n;
3124
+ function o(i, l) {
3125
+ return i.length > l ? i.slice(0, l) + "..." : i;
3101
3126
  }
3102
3127
  return /* @__PURE__ */ t.jsxs(
3103
3128
  "div",
3104
3129
  {
3105
3130
  className: at.modal,
3106
- onClick: (n) => n.stopPropagation(),
3131
+ onClick: (i) => i.stopPropagation(),
3107
3132
  children: [
3108
3133
  /* @__PURE__ */ t.jsxs("div", { className: at.header, children: [
3109
3134
  /* @__PURE__ */ t.jsx("div", { className: at.title, children: "Copy Product Link" }),
3110
3135
  /* @__PURE__ */ t.jsx(
3111
- v,
3136
+ b,
3112
3137
  {
3113
3138
  name: "X",
3114
3139
  fill: "#757575",
3115
- onClick: l,
3140
+ onClick: r,
3116
3141
  hoverable: !0
3117
3142
  }
3118
3143
  )
@@ -3122,14 +3147,14 @@ const $a = (d) => {
3122
3147
  lt,
3123
3148
  {
3124
3149
  type: "Secondary",
3125
- onClick: a,
3150
+ onClick: c,
3126
3151
  style: {
3127
3152
  flex: 1
3128
3153
  },
3129
3154
  children: [
3130
- /* @__PURE__ */ t.jsx("div", { className: at.copyText, children: r(i, 100) }),
3131
- /* @__PURE__ */ t.jsx("div", { className: at.copyTextMobile, children: r(i, 40) }),
3132
- /* @__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) })
3133
3158
  ]
3134
3159
  }
3135
3160
  ),
@@ -3137,70 +3162,88 @@ const $a = (d) => {
3137
3162
  lt,
3138
3163
  {
3139
3164
  type: "Secondary",
3140
- onClick: a,
3141
- children: o ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
3165
+ onClick: c,
3166
+ children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
3142
3167
  }
3143
3168
  )
3144
3169
  ] })
3145
3170
  ]
3146
3171
  }
3147
3172
  );
3148
- }, ca = "_accordion_1s1lq_1", la = "_header_1s1lq_9", ra = "_icon_1s1lq_18", da = "_open_1s1lq_21", ua = "_content_1s1lq_25", xt = {
3149
- accordion: ca,
3150
- header: la,
3151
- icon: ra,
3152
- open: da,
3153
- content: ua
3154
- }, Ca = ({ title: d, content: o, defaultOpen: e = !1 }) => {
3155
- const [s, i] = f.useState(e), [a, l] = f.useState(0), r = f.useRef(null), n = () => {
3156
- 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);
3157
3182
  };
3158
- return f.useEffect(() => {
3159
- r.current && l(s ? r.current.scrollHeight : 0);
3183
+ return x.useEffect(() => {
3184
+ o.current && r(s ? o.current.scrollHeight : 0);
3160
3185
  }, [s]), /* @__PURE__ */ t.jsxs("div", { className: xt.accordion, children: [
3161
3186
  /* @__PURE__ */ t.jsxs(
3162
3187
  "div",
3163
3188
  {
3164
3189
  className: xt.header,
3165
- onClick: n,
3190
+ onClick: i,
3166
3191
  children: [
3167
3192
  /* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
3168
- /* @__PURE__ */ t.jsx("div", { className: U(xt.icon, { [xt.open]: s }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
3193
+ /* @__PURE__ */ t.jsx("div", { className: V(xt.icon, { [xt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
3169
3194
  ]
3170
3195
  }
3171
3196
  ),
3172
3197
  /* @__PURE__ */ t.jsx(
3173
3198
  "div",
3174
3199
  {
3175
- ref: r,
3200
+ ref: o,
3176
3201
  className: xt.content,
3177
- style: { height: `${a}px` },
3178
- children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
3202
+ style: { height: `${c}px` },
3203
+ children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
3179
3204
  }
3180
3205
  )
3181
3206
  ] });
3182
- }, Ba = ({ children: d, path: o, className: e, target: s = "_self", id: i }) => {
3183
- const a = jt(), l = /^https?:\/\//.test(o), r = (n) => {
3184
- 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 }));
3185
3210
  };
3186
3211
  return /* @__PURE__ */ t.jsx(
3187
3212
  "div",
3188
3213
  {
3189
- onClick: r,
3214
+ onClick: o,
3190
3215
  className: e,
3191
3216
  role: "link",
3192
3217
  style: { cursor: "pointer" },
3193
- id: i,
3218
+ id: n,
3194
3219
  children: d
3195
3220
  }
3196
3221
  );
3197
- }, ma = "_wrapper_st58d_1", _a = "_label_st58d_10", ha = "_textarea_st58d_18", pa = "_length_st58d_33", vt = {
3198
- wrapper: ma,
3199
- label: _a,
3200
- textarea: ha,
3201
- length: pa
3202
- }, Sa = (d) => {
3203
- 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);
3204
3247
  return /* @__PURE__ */ t.jsxs("div", { className: vt.wrapper, children: [
3205
3248
  e && /* @__PURE__ */ t.jsx(
3206
3249
  "label",
@@ -3215,54 +3258,55 @@ const $a = (d) => {
3215
3258
  {
3216
3259
  id: e,
3217
3260
  defaultValue: s,
3218
- onChange: (n) => {
3219
- r(n.target.value.length), o(n.target.value);
3261
+ onChange: (i) => {
3262
+ o(i.target.value.length), a(i.target.value);
3220
3263
  },
3221
- placeholder: a,
3264
+ placeholder: c,
3222
3265
  className: vt.textarea,
3223
- maxLength: i
3266
+ maxLength: n
3224
3267
  }
3225
3268
  ),
3226
- i && /* @__PURE__ */ t.jsxs("div", { className: vt.length, children: [
3227
- l,
3269
+ n && /* @__PURE__ */ t.jsxs("div", { className: vt.length, children: [
3270
+ r,
3228
3271
  "/",
3229
- i
3272
+ n
3230
3273
  ] })
3231
3274
  ] });
3232
3275
  };
3233
3276
  export {
3234
- Ca as Accordion,
3235
- Xo as BurgerMenuButton,
3236
- tt as Button,
3237
- An as ButtonTypeSettings,
3238
- ya as ButtonsSettings,
3239
- 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,
3240
3283
  ft as ChooseImage,
3241
- Aa as ChooseImageModal,
3242
- Yo as EmptyCart,
3243
- ja as FormSettings,
3244
- $a as HeaderButtons,
3245
- v as Icon,
3284
+ Ua as ChooseImageModal,
3285
+ Go as EmptyCart,
3286
+ $a as FormSettings,
3287
+ Ca as HeaderButtons,
3288
+ b as Icon,
3246
3289
  K as InputSettings,
3247
- Ji as InputUI,
3248
- Ue as ItemsSettings,
3249
- ba as LayoutSettings,
3250
- Ba as Link,
3251
- ka as ListingSelector,
3252
- 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,
3253
3296
  Mt as Modal,
3254
- Na as PagesMobileMenu,
3255
- Go as PagesMobileModal,
3256
- Ia as ProductOptions,
3297
+ Ba as PagesMobileMenu,
3298
+ Xo as PagesMobileModal,
3299
+ Ma as ProductCardButtons,
3300
+ Sa as ProductOptions,
3257
3301
  Ot as RangeSelector,
3258
- et as Select,
3259
- wa as ShareLink,
3302
+ tt as Select,
3303
+ Ta as ShareLink,
3260
3304
  Vo as ShoppingButton,
3261
- Uo as ShoppingModalCart,
3262
- st as Switch,
3263
- zt as TextSettings,
3305
+ Yo as ShoppingModalCart,
3306
+ et as Switch,
3307
+ Lt as TextSettings,
3264
3308
  qt as TextareaSettings,
3265
- Sa as TextareaUI,
3309
+ Oa as TextareaUI,
3266
3310
  Ht as TypesText,
3267
- Ft as UserInfo
3311
+ Rt as UserInfo
3268
3312
  };