@billgangcom/theme-lib 1.39.0 → 1.41.0

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