@billgangcom/theme-lib 1.59.0 → 1.60.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 g, c as G, a as dt, S as it, R as yt, B as ot, O as ut, d as at, u as mt, e as ht, P as pt, D as _t, f as gt, v as ft, g as xt, C as bt, h as z, i as St, k as nt, l as wt, m as Bt, n as $t, o as rt, p as Y, L as Pt, q as lt, r as jt, t as H, w as Mt, M as vt, x as Nt, y as Tt, z as kt, A as qt } from "./index-Cs6Fcjy6.js";
2
- import { J as hi, F as pi, H as _i, E as gi, T as fi, G as xi } from "./index-Cs6Fcjy6.js";
1
+ import { j as t, I as f, c as W, a as ut, S as it, R as Nt, B as ot, O as mt, d as at, u as ht, e as pt, P as _t, D as gt, f as ft, v as xt, g as jt, C as bt, h as F, i as wt, k as st, l as $t, m as Bt, n as Pt, o as rt, p as G, L as Mt, q as lt, r as vt, t as H, w as Tt, M as yt, x as kt, y as qt, z as It, A as At, E as Ot } from "./index-VdHBtEiJ.js";
2
+ import { K as ji, G as bi, J as vi, F as yi, T as Ni, H as ki } from "./index-VdHBtEiJ.js";
3
3
  import _ from "react";
4
4
  import "@phosphor-icons/react";
5
- const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmyb_15", Rt = "_subtitle_1vmyb_22", Lt = "_alignmentContent_1vmyb_29", Dt = "_alignments_1vmyb_37", Ht = "_alignment_1vmyb_8", Ut = "_circle_1vmyb_60", zt = "_paddings_1vmyb_67", Ft = "_padding_1vmyb_67", Vt = "_active_1vmyb_91", Yt = "_input_1vmyb_98", W = {
6
- wrapper: At,
7
- alignmentBlock: Ot,
8
- title: Et,
9
- subtitle: Rt,
10
- alignmentContent: Lt,
11
- alignments: Dt,
5
+ const Et = "_wrapper_1vmyb_2", Rt = "_alignmentBlock_1vmyb_8", Dt = "_title_1vmyb_15", Lt = "_subtitle_1vmyb_22", zt = "_alignmentContent_1vmyb_29", Ut = "_alignments_1vmyb_37", Ht = "_alignment_1vmyb_8", Ft = "_circle_1vmyb_60", Vt = "_paddings_1vmyb_67", Yt = "_padding_1vmyb_67", Gt = "_active_1vmyb_91", Wt = "_input_1vmyb_98", J = {
6
+ wrapper: Et,
7
+ alignmentBlock: Rt,
8
+ title: Dt,
9
+ subtitle: Lt,
10
+ alignmentContent: zt,
11
+ alignments: Ut,
12
12
  alignment: Ht,
13
- circle: Ut,
14
- paddings: zt,
15
- padding: Ft,
16
- active: Vt,
17
- input: Yt
18
- }, Gt = [
13
+ circle: Ft,
14
+ paddings: Vt,
15
+ padding: Yt,
16
+ active: Gt,
17
+ input: Wt
18
+ }, Jt = [
19
19
  "topLeft",
20
20
  "top",
21
21
  "topRight",
@@ -25,10 +25,10 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
25
25
  "bottomLeft",
26
26
  "bottom",
27
27
  "bottomRight"
28
- ], Wt = ["left", "top", "right", "bottom"], Qn = (d) => {
29
- const { alignment: n, padding: e, setPadding: s, setAlignment: i } = d;
30
- function m(l) {
31
- switch (l) {
28
+ ], Xt = ["left", "top", "right", "bottom"], ni = (r) => {
29
+ const { alignment: s, padding: e, setPadding: n, setAlignment: i } = r;
30
+ function d(c) {
31
+ switch (c) {
32
32
  case "left":
33
33
  case "topLeft":
34
34
  case "bottomLeft":
@@ -45,8 +45,8 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
45
45
  return "TextAlignCenter";
46
46
  }
47
47
  }
48
- function h(l) {
49
- switch (l) {
48
+ function u(c) {
49
+ switch (c) {
50
50
  case "left":
51
51
  return "AlignLeft";
52
52
  case "right":
@@ -57,40 +57,40 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
57
57
  return "AlignBottom";
58
58
  }
59
59
  }
60
- const [o, u] = _.useState(null), [f, $] = _.useState(null);
61
- return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
62
- /* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout" }),
63
- /* @__PURE__ */ t.jsxs("div", { className: W.alignmentBlock, children: [
64
- /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Alignment" }),
65
- /* @__PURE__ */ t.jsxs("div", { className: W.alignmentContent, children: [
66
- /* @__PURE__ */ t.jsx("div", { className: W.alignments, children: Gt.map((l) => /* @__PURE__ */ t.jsxs(
60
+ const [o, m] = _.useState(null), [g, S] = _.useState(null);
61
+ return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
62
+ /* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
63
+ /* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
64
+ /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
65
+ /* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
66
+ /* @__PURE__ */ t.jsx("div", { className: J.alignments, children: Jt.map((c) => /* @__PURE__ */ t.jsxs(
67
67
  "div",
68
68
  {
69
69
  onClick: () => {
70
- i(l);
70
+ i(c);
71
71
  },
72
- className: W.alignment,
72
+ className: J.alignment,
73
73
  onMouseEnter: () => {
74
- u(l);
74
+ m(c);
75
75
  },
76
76
  onMouseLeave: () => {
77
- u(null);
77
+ m(null);
78
78
  },
79
79
  children: [
80
- l !== n && o !== l && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
81
- l !== n && o === l && /* @__PURE__ */ t.jsx(
82
- g,
80
+ c !== s && o !== c && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
81
+ c !== s && o === c && /* @__PURE__ */ t.jsx(
82
+ f,
83
83
  {
84
- name: m(o),
84
+ name: d(o),
85
85
  fill: "#c2c2c2",
86
86
  width: 22,
87
87
  height: 22
88
88
  }
89
89
  ),
90
- l === n && /* @__PURE__ */ t.jsx(
91
- g,
90
+ c === s && /* @__PURE__ */ t.jsx(
91
+ f,
92
92
  {
93
- name: m(n),
93
+ name: d(s),
94
94
  fill: "#FF3F19",
95
95
  width: 22,
96
96
  height: 22
@@ -98,37 +98,37 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
98
98
  )
99
99
  ]
100
100
  },
101
- l
101
+ c
102
102
  )) }),
103
- /* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((l) => /* @__PURE__ */ t.jsxs(
103
+ /* @__PURE__ */ t.jsx("div", { className: J.paddings, children: Xt.map((c) => /* @__PURE__ */ t.jsxs(
104
104
  "label",
105
105
  {
106
- className: G(W.padding, {
107
- [W.active]: f === l
106
+ className: W(J.padding, {
107
+ [J.active]: g === c
108
108
  }),
109
109
  onFocus: () => {
110
- $(l);
110
+ S(c);
111
111
  },
112
112
  onBlur: () => {
113
- $(null);
113
+ S(null);
114
114
  },
115
115
  children: [
116
116
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
117
- g,
117
+ f,
118
118
  {
119
- name: h(l),
119
+ name: u(c),
120
120
  width: 20,
121
121
  height: 20
122
122
  }
123
123
  ) }),
124
124
  /* @__PURE__ */ t.jsx(
125
- dt,
125
+ ut,
126
126
  {
127
127
  type: "number",
128
- value: String(e[l]),
129
- onChange: (r) => s({
128
+ value: String(e[c]),
129
+ onChange: (l) => n({
130
130
  ...e,
131
- [l]: Math.min(Number(r), 999)
131
+ [c]: Math.min(Number(l), 999)
132
132
  }),
133
133
  max: 999,
134
134
  paddingless: !0,
@@ -137,56 +137,56 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
137
137
  )
138
138
  ]
139
139
  },
140
- l
140
+ c
141
141
  )) })
142
142
  ] })
143
143
  ] })
144
144
  ] });
145
- }, Jt = "_title_82zux_1", Xt = "_subtitle_82zux_5", Qt = "_header_82zux_12", Kt = "_text_82zux_13", Zt = "_productsBlock_82zux_14", te = "_top_82zux_26", ee = "_itemsBlock_82zux_35", se = "_typeTexts_82zux_41", ne = "_block_82zux_48", ie = "_active_82zux_61", oe = "_products_82zux_14", ae = "_product_82zux_14", ce = "_button_82zux_80", le = "_disabled_82zux_91", re = "_image_82zux_95", de = "_info_82zux_102", ue = "_name_82zux_114", me = "_buttons_82zux_118", he = "_modal_82zux_125", pe = "_link_82zux_145", _e = "_modalOptions_82zux_151", ge = "_addButton_82zux_157", fe = "_deleteButton_82zux_179", J = {
146
- title: Jt,
147
- subtitle: Xt,
148
- header: Qt,
149
- text: Kt,
150
- productsBlock: Zt,
151
- top: te,
152
- itemsBlock: ee,
153
- typeTexts: se,
154
- block: ne,
155
- active: ie,
156
- products: oe,
157
- product: ae,
158
- button: ce,
159
- disabled: le,
160
- image: re,
161
- info: de,
162
- name: ue,
163
- buttons: me,
164
- modal: he,
165
- link: pe,
166
- modalOptions: _e,
167
- addButton: ge,
168
- deleteButton: fe
169
- }, Kn = (d) => {
145
+ }, Kt = "_title_82zux_1", Qt = "_subtitle_82zux_5", Zt = "_header_82zux_12", te = "_text_82zux_13", ee = "_productsBlock_82zux_14", ne = "_top_82zux_26", se = "_itemsBlock_82zux_35", ie = "_typeTexts_82zux_41", oe = "_block_82zux_48", ae = "_active_82zux_61", ce = "_products_82zux_14", le = "_product_82zux_14", re = "_button_82zux_80", de = "_disabled_82zux_91", ue = "_image_82zux_95", me = "_info_82zux_102", he = "_name_82zux_114", pe = "_buttons_82zux_118", _e = "_modal_82zux_125", ge = "_link_82zux_145", fe = "_modalOptions_82zux_151", xe = "_addButton_82zux_157", je = "_deleteButton_82zux_179", X = {
146
+ title: Kt,
147
+ subtitle: Qt,
148
+ header: Zt,
149
+ text: te,
150
+ productsBlock: ee,
151
+ top: ne,
152
+ itemsBlock: se,
153
+ typeTexts: ie,
154
+ block: oe,
155
+ active: ae,
156
+ products: ce,
157
+ product: le,
158
+ button: re,
159
+ disabled: de,
160
+ image: ue,
161
+ info: me,
162
+ name: he,
163
+ buttons: pe,
164
+ modal: _e,
165
+ link: ge,
166
+ modalOptions: fe,
167
+ addButton: xe,
168
+ deleteButton: je
169
+ }, si = (r) => {
170
170
  const {
171
- isActiveItems: n,
171
+ isActiveItems: s,
172
172
  setIsActiveItems: e,
173
- items: s,
173
+ items: n,
174
174
  setItems: i,
175
- other: m,
176
- title: h,
175
+ other: d,
176
+ title: u,
177
177
  subtitle: o,
178
- draggable: u = !1,
179
- withImage: f = !1,
180
- addable: $ = !0,
181
- itemsOptions: l,
182
- hasRangeSelector: r = !1,
178
+ draggable: m = !1,
179
+ withImage: g = !1,
180
+ addable: S = !0,
181
+ itemsOptions: c,
182
+ hasRangeSelector: l = !1,
183
183
  rangeSelectorOptions: T,
184
- limit: w,
185
- autoScrollInterval: C,
184
+ limit: $,
185
+ autoScrollInterval: M,
186
186
  deletable: x
187
- } = d;
188
- function B(b) {
189
- if (f)
187
+ } = r;
188
+ function k(b) {
189
+ if (g)
190
190
  return b ? /* @__PURE__ */ t.jsx(
191
191
  "img",
192
192
  {
@@ -196,7 +196,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
196
196
  height: 16
197
197
  }
198
198
  ) : /* @__PURE__ */ t.jsx(
199
- g,
199
+ f,
200
200
  {
201
201
  name: "Image",
202
202
  width: 16,
@@ -205,12 +205,12 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
205
205
  }
206
206
  );
207
207
  }
208
- const a = (b, q = !1) => {
209
- const M = l.find((S) => S.id === b);
210
- if (!M) return;
211
- const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
212
- u && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
213
- g,
208
+ const a = (b, D = !1) => {
209
+ const w = c.find((C) => C.id === b);
210
+ if (!w) return;
211
+ const z = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
212
+ m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
213
+ f,
214
214
  {
215
215
  name: "DotsSixVertical",
216
216
  hoverable: !0,
@@ -221,54 +221,54 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
221
221
  /* @__PURE__ */ t.jsx(
222
222
  at,
223
223
  {
224
- onChange: (S) => {
225
- const j = [...s], N = l.find((v) => v.name === S);
226
- if (!N) return;
227
- const O = N.id, c = j.map((v) => v === b ? O : v);
228
- i([...c]);
224
+ onChange: (C) => {
225
+ const v = [...n], I = c.find((p) => p.name === C);
226
+ if (!I) return;
227
+ const q = I.id, B = v.map((p) => p === b ? q : p);
228
+ i([...B]);
229
229
  },
230
- value: M.name,
231
- options: l.filter((S) => !s.find((j) => j === S.id)).map((S) => S.name),
232
- leftAddon: B(M.images)
230
+ value: w.name,
231
+ options: c.filter((C) => !n.find((v) => v === C.id)).map((C) => C.name),
232
+ leftAddon: k(w.images)
233
233
  }
234
234
  ),
235
- q && /* @__PURE__ */ t.jsx("div", { className: J.buttons, children: /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
236
- g,
235
+ D && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
236
+ f,
237
237
  {
238
238
  name: "Trash",
239
239
  hoverable: !0,
240
240
  width: 20,
241
241
  height: 20,
242
242
  fill: "#C12A2A",
243
- onClick: () => i(s.filter((S) => S !== b))
243
+ onClick: () => i(n.filter((C) => C !== b))
244
244
  }
245
245
  ) }) })
246
246
  ] });
247
247
  return /* @__PURE__ */ t.jsx(
248
248
  "div",
249
249
  {
250
- className: J.product,
251
- children: D
250
+ className: X.product,
251
+ children: z
252
252
  },
253
253
  b
254
254
  );
255
255
  };
256
- return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
257
- (h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
258
- h && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: h }),
259
- n !== void 0 && /* @__PURE__ */ t.jsx(
256
+ return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
257
+ (u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
258
+ u && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: u }),
259
+ s !== void 0 && /* @__PURE__ */ t.jsx(
260
260
  it,
261
261
  {
262
- current: n,
262
+ current: s,
263
263
  onChange: (b) => e == null ? void 0 : e(b)
264
264
  }
265
265
  )
266
266
  ] }),
267
- r && T && /* @__PURE__ */ t.jsx(yt, { ...T }),
268
- /* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
269
- o && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: o }),
270
- s.map((b) => a(b, x)),
271
- $ && /* @__PURE__ */ t.jsx(
267
+ l && T && /* @__PURE__ */ t.jsx(Nt, { ...T }),
268
+ /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
269
+ o && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: o }),
270
+ n.map((b) => a(b, x)),
271
+ S && /* @__PURE__ */ t.jsx(
272
272
  "div",
273
273
  {
274
274
  style: {
@@ -281,30 +281,30 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
281
281
  ot,
282
282
  {
283
283
  withoutHover: !0,
284
- className: G(J.button, {
285
- [J.disabled]: !!(w && w <= s.length || s.length === l.length)
284
+ className: W(X.button, {
285
+ [X.disabled]: !!($ && $ <= n.length || n.length === c.length)
286
286
  }),
287
287
  size: "s",
288
- disabled: !!(w && w <= s.length || s.length === l.length),
288
+ disabled: !!($ && $ <= n.length || n.length === c.length),
289
289
  onClick: () => {
290
- const b = [...s];
291
- let q = null;
292
- if (l) {
293
- for (let M = 0; M < l.length; M++)
294
- if (!s.find((D) => D === l[M].id)) {
295
- q = l[M];
290
+ const b = [...n];
291
+ let D = null;
292
+ if (c) {
293
+ for (let w = 0; w < c.length; w++)
294
+ if (!n.find((z) => z === c[w].id)) {
295
+ D = c[w];
296
296
  break;
297
297
  }
298
298
  }
299
- b.push((q == null ? void 0 : q.id) || l[0].id), i(b);
299
+ b.push((D == null ? void 0 : D.id) || c[0].id), i(b);
300
300
  },
301
301
  style: {
302
302
  width: "fit-content"
303
303
  },
304
- children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
304
+ children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
305
305
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
306
306
  /* @__PURE__ */ t.jsx(
307
- g,
307
+ f,
308
308
  {
309
309
  name: "Plus",
310
310
  width: 16,
@@ -317,14 +317,14 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
317
317
  }
318
318
  )
319
319
  ] }),
320
- m !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: m }),
321
- C !== void 0 && /* @__PURE__ */ t.jsx(
322
- dt,
320
+ d !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: d }),
321
+ M !== void 0 && /* @__PURE__ */ t.jsx(
322
+ ut,
323
323
  {
324
324
  label: "Auto scroll interval",
325
325
  type: "number",
326
- value: String(C.scrollInterval),
327
- onChange: (b) => C.setScrollInterval(Number(b)),
326
+ value: String(M.scrollInterval),
327
+ onChange: (b) => M.setScrollInterval(Number(b)),
328
328
  min: 0.1,
329
329
  max: 100,
330
330
  style: {
@@ -334,109 +334,109 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
334
334
  }
335
335
  )
336
336
  ] });
337
- }, xe = "_title_roi3a_1", be = "_subtitle_roi3a_5", je = "_header_roi3a_12", ve = "_text_roi3a_13", ye = "_productsBlock_roi3a_14", Ne = "_top_roi3a_26", ke = "_itemsBlock_roi3a_35", Ie = "_typeTexts_roi3a_41", Ce = "_block_roi3a_48", Se = "_active_roi3a_61", we = "_products_roi3a_14", Be = "_product_roi3a_14", $e = "_button_roi3a_80", Pe = "_disabled_roi3a_91", Me = "_image_roi3a_95", Te = "_info_roi3a_102", qe = "_name_roi3a_114", Ae = "_buttons_roi3a_118", Oe = "_modal_roi3a_125", Ee = "_link_roi3a_145", Re = "_modalOptions_roi3a_151", Le = "_addButton_roi3a_164", De = "_deleteButton_roi3a_179", He = "_closeIcon_roi3a_191", F = {
338
- title: xe,
339
- subtitle: be,
340
- header: je,
341
- text: ve,
342
- productsBlock: ye,
343
- top: Ne,
344
- itemsBlock: ke,
345
- typeTexts: Ie,
346
- block: Ce,
347
- active: Se,
348
- products: we,
349
- product: Be,
350
- button: $e,
351
- disabled: Pe,
352
- image: Me,
353
- info: Te,
354
- name: qe,
355
- buttons: Ae,
356
- modal: Oe,
357
- link: Ee,
358
- modalOptions: Re,
359
- addButton: Le,
360
- deleteButton: De,
337
+ }, be = "_title_roi3a_1", ve = "_subtitle_roi3a_5", ye = "_header_roi3a_12", Ne = "_text_roi3a_13", ke = "_productsBlock_roi3a_14", Ie = "_top_roi3a_26", Ce = "_itemsBlock_roi3a_35", Se = "_typeTexts_roi3a_41", we = "_block_roi3a_48", $e = "_active_roi3a_61", Be = "_products_roi3a_14", Pe = "_product_roi3a_14", Me = "_button_roi3a_80", Te = "_disabled_roi3a_91", qe = "_image_roi3a_95", Ae = "_info_roi3a_102", Oe = "_name_roi3a_114", Ee = "_buttons_roi3a_118", Re = "_modal_roi3a_125", De = "_link_roi3a_145", Le = "_modalOptions_roi3a_151", ze = "_addButton_roi3a_164", Ue = "_deleteButton_roi3a_179", He = "_closeIcon_roi3a_191", V = {
338
+ title: be,
339
+ subtitle: ve,
340
+ header: ye,
341
+ text: Ne,
342
+ productsBlock: ke,
343
+ top: Ie,
344
+ itemsBlock: Ce,
345
+ typeTexts: Se,
346
+ block: we,
347
+ active: $e,
348
+ products: Be,
349
+ product: Pe,
350
+ button: Me,
351
+ disabled: Te,
352
+ image: qe,
353
+ info: Ae,
354
+ name: Oe,
355
+ buttons: Ee,
356
+ modal: Re,
357
+ link: De,
358
+ modalOptions: Le,
359
+ addButton: ze,
360
+ deleteButton: Ue,
361
361
  closeIcon: He
362
362
  };
363
- function Ue({ product: d, children: n }) {
363
+ function Fe({ product: r, children: s }) {
364
364
  const {
365
365
  attributes: e,
366
- listeners: s,
366
+ listeners: n,
367
367
  setNodeRef: i,
368
- transform: m,
369
- transition: h,
368
+ transform: d,
369
+ transition: u,
370
370
  isDragging: o
371
- } = xt({
372
- id: d.id
373
- }), u = {
374
- transform: bt.Transform.toString(m),
375
- transition: h
371
+ } = jt({
372
+ id: r.id
373
+ }), m = {
374
+ transform: bt.Transform.toString(d),
375
+ transition: u
376
376
  };
377
377
  return /* @__PURE__ */ t.jsx(
378
378
  "div",
379
379
  {
380
380
  ref: i,
381
- style: u,
382
- className: `${F.product} ${o ? F.dragging : ""}`,
381
+ style: m,
382
+ className: `${V.product} ${o ? V.dragging : ""}`,
383
383
  ...e,
384
- ...s,
385
- children: n
384
+ ...n,
385
+ children: s
386
386
  }
387
387
  );
388
388
  }
389
- const Zn = (d) => {
389
+ const ii = (r) => {
390
390
  const {
391
- isActiveItems: n,
391
+ isActiveItems: s,
392
392
  setIsActiveItems: e,
393
- items: s,
393
+ items: n,
394
394
  setItems: i,
395
- title: m,
396
- subtitle: h,
395
+ title: d,
396
+ subtitle: u,
397
397
  editable: o = !0,
398
- draggable: u = !1,
399
- deletable: f = !0,
400
- addable: $ = !0,
401
- itemsType: l,
402
- itemsOptions: r,
398
+ draggable: m = !1,
399
+ deletable: g = !0,
400
+ addable: S = !0,
401
+ itemsType: c,
402
+ itemsOptions: l,
403
403
  addableOptions: T = {},
404
- limit: w
405
- } = d, [C, x] = _.useState(null), [B, a] = _.useState(null), b = _.useRef(null), q = mt(
406
- ht(pt, {
404
+ limit: $
405
+ } = r, [M, x] = _.useState(null), [k, a] = _.useState(null), b = _.useRef(null), D = ht(
406
+ pt(_t, {
407
407
  activationConstraint: {
408
408
  distance: 5
409
409
  }
410
410
  })
411
411
  );
412
412
  _.useEffect(() => {
413
- if (C) {
414
- const j = [...s].map((N) => N.id === C.id ? C : N);
415
- i(j);
413
+ if (M) {
414
+ const v = [...n].map((I) => I.id === M.id ? M : I);
415
+ i(v);
416
416
  }
417
- }, [C]), _.useEffect(() => {
418
- b.current && B && (b.current.getBoundingClientRect().height, B.top);
419
- }, [b.current, B]);
420
- const M = (j, N) => {
421
- j.stopPropagation();
422
- const O = j.target.getBoundingClientRect();
417
+ }, [M]), _.useEffect(() => {
418
+ b.current && k && (b.current.getBoundingClientRect().height, k.top);
419
+ }, [b.current, k]);
420
+ const w = (v, I) => {
421
+ v.stopPropagation();
422
+ const q = v.target.getBoundingClientRect();
423
423
  a({
424
- top: O.top + window.scrollY,
425
- left: O.left - 30
426
- }), x(N);
427
- }, D = (j) => {
428
- const { active: N, over: O } = j;
429
- if (O && N.id !== O.id) {
430
- const c = s.findIndex((I) => I.id === N.id), v = s.findIndex((I) => I.id === O.id);
431
- if (c !== -1 && v !== -1) {
432
- const I = [...s], [U] = I.splice(c, 1);
433
- I.splice(v, 0, U), i(I);
424
+ top: q.top + window.scrollY,
425
+ left: q.left - 30
426
+ }), x(I);
427
+ }, z = (v) => {
428
+ const { active: I, over: q } = v;
429
+ if (q && I.id !== q.id) {
430
+ const B = n.findIndex((j) => j.id === I.id), p = n.findIndex((j) => j.id === q.id);
431
+ if (B !== -1 && p !== -1) {
432
+ const j = [...n], [A] = j.splice(B, 1);
433
+ j.splice(p, 0, A), i(j);
434
434
  }
435
435
  }
436
- }, S = (j, N) => {
437
- const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
438
- u && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
439
- g,
436
+ }, C = (v, I) => {
437
+ const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
438
+ m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
439
+ f,
440
440
  {
441
441
  name: "DotsSixVertical",
442
442
  hoverable: !0,
@@ -444,99 +444,99 @@ const Zn = (d) => {
444
444
  height: 20
445
445
  }
446
446
  ) }),
447
- l === "select" && r && /* @__PURE__ */ t.jsx(
447
+ c === "select" && l && /* @__PURE__ */ t.jsx(
448
448
  at,
449
449
  {
450
- onChange: (c) => {
451
- const v = [...s], I = r.find((P) => P.name === c);
452
- if (!I) return;
453
- const U = v.map((P) => P.id === j.id ? {
454
- ...I,
450
+ onChange: (B) => {
451
+ const p = [...n], j = l.find((U) => U.name === B);
452
+ if (!j) return;
453
+ const A = p.map((U) => U.id === v.id ? {
454
+ ...j,
455
455
  name: {
456
- "en-US": c
456
+ "en-US": B
457
457
  }
458
- } : P);
458
+ } : U);
459
459
  x({
460
- ...j,
460
+ ...v,
461
461
  name: {
462
- "en-US": c
462
+ "en-US": B
463
463
  }
464
- }), i([...U]);
464
+ }), i([...A]);
465
465
  },
466
- value: j.name,
467
- options: r.filter((c) => !s.find((v) => v.name === c.name)).map((c) => c.name)
466
+ value: v.name,
467
+ options: l.filter((B) => !n.find((p) => p.name === B.name)).map((B) => B.name)
468
468
  }
469
469
  ),
470
- /* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
471
- o && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
472
- g,
470
+ /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
471
+ o && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
472
+ f,
473
473
  {
474
474
  name: "Sliders",
475
475
  hoverable: !0,
476
476
  width: 20,
477
477
  height: 20,
478
- onClick: (c) => M(c, j)
478
+ onClick: (B) => w(B, v)
479
479
  }
480
480
  ) }),
481
- f && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
482
- g,
481
+ g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
482
+ f,
483
483
  {
484
484
  name: "Trash",
485
485
  hoverable: !0,
486
486
  width: 20,
487
487
  height: 20,
488
488
  fill: "#C12A2A",
489
- onClick: () => i(s.filter((c) => c.id !== j.id))
489
+ onClick: () => i(n.filter((B) => B.id !== v.id))
490
490
  }
491
491
  ) })
492
492
  ] })
493
493
  ] });
494
- return u ? /* @__PURE__ */ t.jsx(
495
- Ue,
494
+ return m ? /* @__PURE__ */ t.jsx(
495
+ Fe,
496
496
  {
497
- product: j,
498
- index: N,
499
- children: O
497
+ product: v,
498
+ index: I,
499
+ children: q
500
500
  },
501
- j.id
501
+ v.id
502
502
  ) : /* @__PURE__ */ t.jsx(
503
503
  "div",
504
504
  {
505
- className: F.product,
506
- children: O
505
+ className: V.product,
506
+ children: q
507
507
  },
508
- j.id
508
+ v.id
509
509
  );
510
510
  };
511
- return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
512
- (m || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
513
- m && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: m }),
514
- n !== void 0 && /* @__PURE__ */ t.jsx(
511
+ return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
512
+ (d || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
513
+ d && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: d }),
514
+ s !== void 0 && /* @__PURE__ */ t.jsx(
515
515
  it,
516
516
  {
517
- current: n,
518
- onChange: (j) => e == null ? void 0 : e(j)
517
+ current: s,
518
+ onChange: (v) => e == null ? void 0 : e(v)
519
519
  }
520
520
  )
521
521
  ] }),
522
- /* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
523
- h && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: h }),
524
- u ? /* @__PURE__ */ t.jsx(
525
- _t,
522
+ /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
523
+ u && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: u }),
524
+ m ? /* @__PURE__ */ t.jsx(
525
+ gt,
526
526
  {
527
- sensors: q,
528
- onDragEnd: D,
527
+ sensors: D,
528
+ onDragEnd: z,
529
529
  children: /* @__PURE__ */ t.jsx(
530
- gt,
530
+ ft,
531
531
  {
532
- items: s.map((j) => j.id),
533
- strategy: ft,
534
- children: s.map((j, N) => S(j, N))
532
+ items: n.map((v) => v.id),
533
+ strategy: xt,
534
+ children: n.map((v, I) => C(v, I))
535
535
  }
536
536
  )
537
537
  }
538
- ) : s.map((j, N) => S(j, N)),
539
- $ && /* @__PURE__ */ t.jsx(
538
+ ) : n.map((v, I) => C(v, I)),
539
+ S && /* @__PURE__ */ t.jsx(
540
540
  "div",
541
541
  {
542
542
  style: {
@@ -548,34 +548,34 @@ const Zn = (d) => {
548
548
  ot,
549
549
  {
550
550
  withoutHover: !0,
551
- className: G(F.button, {
552
- [F.disabled]: !!(w && w <= s.length || s.length === (r == null ? void 0 : r.length))
551
+ className: W(V.button, {
552
+ [V.disabled]: !!($ && $ <= n.length || n.length === (l == null ? void 0 : l.length))
553
553
  }),
554
554
  size: "s",
555
- disabled: !!(w && w <= s.length || s.length === (r == null ? void 0 : r.length)),
555
+ disabled: !!($ && $ <= n.length || n.length === (l == null ? void 0 : l.length)),
556
556
  onClick: () => {
557
- const j = [...s];
558
- let N = null;
559
- if (r) {
560
- for (let O = 0; O < r.length; O++)
561
- if (!s.find((c) => c.id === r[O].id)) {
562
- N = r[O];
557
+ const v = [...n];
558
+ let I = null;
559
+ if (l) {
560
+ for (let q = 0; q < l.length; q++)
561
+ if (!n.find((B) => B.id === l[q].id)) {
562
+ I = l[q];
563
563
  break;
564
564
  }
565
565
  }
566
- l === "select" && r && j.push({
567
- name: N ? N.name : r[0].name,
568
- id: (N == null ? void 0 : N.id) || r[0].id,
566
+ c === "select" && l && v.push({
567
+ name: I ? I.name : l[0].name,
568
+ id: (I == null ? void 0 : I.id) || l[0].id,
569
569
  ...T
570
- }), i(j);
570
+ }), i(v);
571
571
  },
572
572
  style: {
573
573
  width: "fit-content"
574
574
  },
575
- children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
575
+ children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
576
576
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
577
577
  /* @__PURE__ */ t.jsx(
578
- g,
578
+ f,
579
579
  {
580
580
  name: "Plus",
581
581
  width: 16,
@@ -590,99 +590,99 @@ const Zn = (d) => {
590
590
  ] })
591
591
  ] });
592
592
  };
593
- function ze(d) {
594
- const { product: n, children: e } = d, { attributes: s, listeners: i, setNodeRef: m, transform: h, transition: o, isDragging: u } = xt({
595
- id: n.id
596
- }), f = {
597
- transform: bt.Transform.toString(h),
593
+ function Ve(r) {
594
+ const { product: s, children: e } = r, { attributes: n, listeners: i, setNodeRef: d, transform: u, transition: o, isDragging: m } = jt({
595
+ id: s.id
596
+ }), g = {
597
+ transform: bt.Transform.toString(u),
598
598
  transition: o
599
599
  };
600
600
  return /* @__PURE__ */ t.jsx(
601
601
  "div",
602
602
  {
603
- ref: m,
604
- style: f,
605
- className: `${z.product} ${u ? z.dragging : ""}`,
606
- ...s,
603
+ ref: d,
604
+ style: g,
605
+ className: `${F.product} ${m ? F.dragging : ""}`,
606
+ ...n,
607
607
  ...i,
608
608
  children: e
609
609
  }
610
610
  );
611
611
  }
612
- const ti = (d) => {
612
+ const oi = (r) => {
613
613
  const {
614
- isActiveItems: n,
614
+ isActiveItems: s,
615
615
  setIsActiveItems: e,
616
- items: s,
616
+ items: n,
617
617
  setItems: i,
618
- other: m,
619
- title: h,
618
+ other: d,
619
+ title: u,
620
620
  subtitle: o,
621
- editable: u = !0,
622
- draggable: f = !1,
623
- withImage: $ = !1,
624
- deletable: l = !0,
625
- addable: r = !0,
621
+ editable: m = !0,
622
+ draggable: g = !1,
623
+ withImage: S = !1,
624
+ deletable: c = !0,
625
+ addable: l = !0,
626
626
  itemsType: T,
627
- itemsPlaceholder: w = "",
628
- itemsOptions: C,
627
+ itemsPlaceholder: $ = "",
628
+ itemsOptions: M,
629
629
  hasRangeSelector: x = !1,
630
- rangeSelectorOptions: B,
630
+ rangeSelectorOptions: k,
631
631
  modalOptions: a,
632
632
  addableOptions: b = {},
633
- limit: q
634
- } = d, [M, D] = _.useState(null), [S, j] = _.useState({
633
+ limit: D
634
+ } = r, [w, z] = _.useState(null), [C, v] = _.useState({
635
635
  top: 0,
636
636
  left: 0
637
- }), [N, O] = _.useState(null), c = _.useRef(null), [v, I] = _.useState(!1), U = mt(
638
- ht(pt, {
637
+ }), [I, q] = _.useState(null), B = _.useRef(null), [p, j] = _.useState(!1), A = ht(
638
+ pt(_t, {
639
639
  activationConstraint: {
640
640
  distance: 5
641
641
  }
642
642
  })
643
643
  );
644
644
  _.useEffect(() => {
645
- const p = () => {
646
- D(null), I(!1);
645
+ const h = () => {
646
+ z(null), j(!1);
647
647
  };
648
- return document.body.addEventListener("click", p), D(null), I(!1), () => {
649
- D(null), I(!1), document.body.removeEventListener("click", p);
648
+ return document.body.addEventListener("click", h), z(null), j(!1), () => {
649
+ z(null), j(!1), document.body.removeEventListener("click", h);
650
650
  };
651
651
  }, []), _.useEffect(() => {
652
- if (M) {
653
- const p = [...s].map((A) => A.id === M.id ? M : A);
654
- i(p);
652
+ if (w) {
653
+ const h = [...n].map((E) => E.id === w.id ? w : E);
654
+ i(h);
655
655
  }
656
- }, [M]), _.useEffect(() => {
657
- if (c.current && N) {
658
- const p = c.current.getBoundingClientRect().height, A = window.innerHeight;
659
- let E = N.top;
660
- E + p > A + window.scrollY - 200 && (E = A + window.scrollY - p - 200), E < 0 && (E = 10), j({
661
- top: E,
662
- left: N.left
656
+ }, [w]), _.useEffect(() => {
657
+ if (B.current && I) {
658
+ const h = B.current.getBoundingClientRect().height, E = window.innerHeight;
659
+ let P = I.top;
660
+ P + h > E + window.scrollY - 200 && (P = E + window.scrollY - h - 200), P < 0 && (P = 10), v({
661
+ top: P,
662
+ left: I.left
663
663
  });
664
664
  }
665
- }, [c.current, N]);
666
- const P = (p, A) => {
667
- p.stopPropagation();
668
- const E = p.target.getBoundingClientRect();
669
- O({
670
- top: E.top + window.scrollY,
671
- left: E.left - 30
672
- }), D(A), I(!0);
665
+ }, [B.current, I]);
666
+ const U = (h, E) => {
667
+ h.stopPropagation();
668
+ const P = h.target.getBoundingClientRect();
669
+ q({
670
+ top: P.top + window.scrollY,
671
+ left: P.left - 30
672
+ }), z(E), j(!0);
673
673
  };
674
- function L(p) {
675
- if ($)
676
- return p ? /* @__PURE__ */ t.jsx(
674
+ function O(h) {
675
+ if (S)
676
+ return h ? /* @__PURE__ */ t.jsx(
677
677
  "img",
678
678
  {
679
- src: `https://imagedelivery.net/${p[0]}/w=1000`,
679
+ src: `https://imagedelivery.net/${h[0]}/w=1000`,
680
680
  alt: "image",
681
681
  width: 16,
682
682
  height: 16
683
683
  }
684
684
  ) : /* @__PURE__ */ t.jsx(
685
- g,
685
+ f,
686
686
  {
687
687
  name: "Image",
688
688
  width: 16,
@@ -691,20 +691,20 @@ const ti = (d) => {
691
691
  }
692
692
  );
693
693
  }
694
- const K = (p) => {
695
- const { active: A, over: E } = p;
696
- if (E && A.id !== E.id) {
697
- const R = s.findIndex((V) => V.id === A.id), tt = s.findIndex((V) => V.id === E.id);
698
- if (R !== -1 && tt !== -1) {
699
- const V = [...s], [X] = V.splice(R, 1);
700
- V.splice(tt, 0, X), i(V);
694
+ const L = (h) => {
695
+ const { active: E, over: P } = h;
696
+ if (P && E.id !== P.id) {
697
+ const R = n.findIndex((Y) => Y.id === E.id), et = n.findIndex((Y) => Y.id === P.id);
698
+ if (R !== -1 && et !== -1) {
699
+ const Y = [...n], [K] = Y.splice(R, 1);
700
+ Y.splice(et, 0, K), i(Y);
701
701
  }
702
702
  }
703
- }, et = (p) => {
704
- var E;
705
- const A = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
706
- f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
707
- g,
703
+ }, Q = (h) => {
704
+ var P;
705
+ const E = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
706
+ g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
707
+ f,
708
708
  {
709
709
  name: "DotsSixVertical",
710
710
  hoverable: !0,
@@ -712,140 +712,140 @@ const ti = (d) => {
712
712
  height: 20
713
713
  }
714
714
  ) }),
715
- T === "select" && C && /* @__PURE__ */ t.jsx(
715
+ T === "select" && M && /* @__PURE__ */ t.jsx(
716
716
  at,
717
717
  {
718
718
  onChange: (R) => {
719
- const V = [...s].map((X) => X.id === p.id ? {
720
- ...p,
719
+ const Y = [...n].map((K) => K.id === h.id ? {
720
+ ...h,
721
721
  name: {
722
722
  "en-US": R
723
723
  }
724
- } : X);
725
- D({
726
- ...p,
724
+ } : K);
725
+ z({
726
+ ...h,
727
727
  name: {
728
728
  "en-US": R
729
729
  }
730
- }), i([...V]);
730
+ }), i([...Y]);
731
731
  },
732
- value: p.name["en-US"],
733
- options: C.filter(
734
- (R) => !s.find((tt) => tt.name["en-US"] === R)
732
+ value: h.name["en-US"],
733
+ options: M.filter(
734
+ (R) => !n.find((et) => et.name["en-US"] === R)
735
735
  ),
736
- leftAddon: L(p.images)
736
+ leftAddon: O(h.images)
737
737
  }
738
738
  ),
739
739
  T === "input" && /* @__PURE__ */ t.jsx(
740
- dt,
740
+ ut,
741
741
  {
742
742
  onChange: (R) => {
743
- const V = [...s].map((X) => X.id === p.id ? {
744
- ...p,
743
+ const Y = [...n].map((K) => K.id === h.id ? {
744
+ ...h,
745
745
  name: {
746
746
  "en-US": R
747
747
  }
748
- } : X);
749
- i([...V]);
748
+ } : K);
749
+ i([...Y]);
750
750
  },
751
- value: p.name["en-US"],
752
- placeholder: w
751
+ value: h.name["en-US"],
752
+ placeholder: $
753
753
  }
754
754
  ),
755
755
  T === "image" && /* @__PURE__ */ t.jsx(
756
- wt,
756
+ $t,
757
757
  {
758
758
  onChange: (R) => {
759
- const V = [...s].map((X) => X.id === p.id ? {
760
- ...p,
759
+ const Y = [...n].map((K) => K.id === h.id ? {
760
+ ...h,
761
761
  images: R
762
- } : X);
763
- i([...V]);
762
+ } : K);
763
+ i([...Y]);
764
764
  },
765
- activeImage: (E = s.find((R) => R.id === p.id)) == null ? void 0 : E.images[0]
765
+ activeImage: (P = n.find((R) => R.id === h.id)) == null ? void 0 : P.images[0]
766
766
  }
767
767
  ),
768
- /* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
769
- u && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
770
- g,
768
+ /* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
769
+ m && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
770
+ f,
771
771
  {
772
772
  name: "Sliders",
773
773
  hoverable: !0,
774
774
  width: 20,
775
775
  height: 20,
776
- onClick: (R) => P(R, p)
776
+ onClick: (R) => U(R, h)
777
777
  }
778
778
  ) }),
779
- l && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
780
- g,
779
+ c && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
780
+ f,
781
781
  {
782
782
  name: "Trash",
783
783
  hoverable: !0,
784
784
  width: 20,
785
785
  height: 20,
786
786
  fill: "#C12A2A",
787
- onClick: () => i(s.filter((R) => R.id !== p.id))
787
+ onClick: () => i(n.filter((R) => R.id !== h.id))
788
788
  }
789
789
  ) })
790
790
  ] })
791
791
  ] });
792
- return f ? /* @__PURE__ */ t.jsx(
793
- ze,
792
+ return g ? /* @__PURE__ */ t.jsx(
793
+ Ve,
794
794
  {
795
- product: p,
796
- children: A
795
+ product: h,
796
+ children: E
797
797
  },
798
- p.id
798
+ h.id
799
799
  ) : /* @__PURE__ */ t.jsx(
800
800
  "div",
801
801
  {
802
- className: z.product,
803
- children: A
802
+ className: F.product,
803
+ children: E
804
804
  },
805
- p.id
805
+ h.id
806
806
  );
807
807
  };
808
- return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
809
- (h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
810
- h && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: h }),
811
- n !== void 0 && /* @__PURE__ */ t.jsx(
808
+ return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
809
+ (u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
810
+ u && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: u }),
811
+ s !== void 0 && /* @__PURE__ */ t.jsx(
812
812
  it,
813
813
  {
814
- current: n,
815
- onChange: (p) => e == null ? void 0 : e(p)
814
+ current: s,
815
+ onChange: (h) => e == null ? void 0 : e(h)
816
816
  }
817
817
  )
818
818
  ] }),
819
- M && u && a && v && /* @__PURE__ */ t.jsx(
820
- St,
819
+ w && m && a && p && /* @__PURE__ */ t.jsx(
820
+ wt,
821
821
  {
822
- ref: c,
823
- activeItem: M,
824
- setActiveItem: D,
825
- popupPosition: S,
822
+ ref: B,
823
+ activeItem: w,
824
+ setActiveItem: z,
825
+ popupPosition: C,
826
826
  modalOptions: a,
827
- setIsOpenModal: I
827
+ setIsOpenModal: j
828
828
  }
829
829
  ),
830
- x && B && /* @__PURE__ */ t.jsx(yt, { ...B }),
831
- /* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
832
- o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
833
- f ? /* @__PURE__ */ t.jsx(
834
- _t,
830
+ x && k && /* @__PURE__ */ t.jsx(Nt, { ...k }),
831
+ /* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
832
+ o && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: o }),
833
+ g ? /* @__PURE__ */ t.jsx(
834
+ gt,
835
835
  {
836
- sensors: U,
837
- onDragEnd: K,
836
+ sensors: A,
837
+ onDragEnd: L,
838
838
  children: /* @__PURE__ */ t.jsx(
839
- gt,
839
+ ft,
840
840
  {
841
- items: s.map((p) => p.id),
842
- strategy: ft,
843
- children: s.map((p) => et(p))
841
+ items: n.map((h) => h.id),
842
+ strategy: xt,
843
+ children: n.map((h) => Q(h))
844
844
  }
845
845
  )
846
846
  }
847
- ) : s.map((p) => et(p)),
848
- r && /* @__PURE__ */ t.jsx(
847
+ ) : n.map((h) => Q(h)),
848
+ l && /* @__PURE__ */ t.jsx(
849
849
  "div",
850
850
  {
851
851
  style: {
@@ -857,52 +857,52 @@ const ti = (d) => {
857
857
  ot,
858
858
  {
859
859
  withoutHover: !0,
860
- className: G(z.button, {
861
- [z.disabled]: !!(q && q <= s.length)
860
+ className: W(F.button, {
861
+ [F.disabled]: !!(D && D <= n.length)
862
862
  }),
863
863
  size: "s",
864
- disabled: !!(q && q <= s.length),
864
+ disabled: !!(D && D <= n.length),
865
865
  onClick: () => {
866
- const p = [...s];
867
- let A = null;
868
- if (C) {
869
- for (let E = 0; E < C.length; E++)
870
- if (!s.find((R) => R.name["en-US"] === C[E])) {
871
- A = C[E];
866
+ const h = [...n];
867
+ let E = null;
868
+ if (M) {
869
+ for (let P = 0; P < M.length; P++)
870
+ if (!n.find((R) => R.name["en-US"] === M[P])) {
871
+ E = M[P];
872
872
  break;
873
873
  }
874
874
  }
875
- T === "select" && C ? p.push({
875
+ T === "select" && M ? h.push({
876
876
  name: {
877
- "en-US": A || C[0]
877
+ "en-US": E || M[0]
878
878
  },
879
- id: nt(),
879
+ id: st(),
880
880
  ...b,
881
881
  maxSymbols: 100
882
882
  // пример значения
883
- }) : T === "input" ? p.push({
883
+ }) : T === "input" ? h.push({
884
884
  name: {
885
885
  "en-US": ""
886
886
  },
887
- id: nt(),
887
+ id: st(),
888
888
  ...b,
889
889
  maxSymbols: 100
890
- }) : p.push({
890
+ }) : h.push({
891
891
  name: {
892
- "en-US": `Image ${s.length + 1}`
892
+ "en-US": `Image ${n.length + 1}`
893
893
  },
894
- id: nt(),
894
+ id: st(),
895
895
  ...b,
896
896
  maxSymbols: 100
897
- }), i(p);
897
+ }), i(h);
898
898
  },
899
899
  style: {
900
900
  width: "fit-content"
901
901
  },
902
- children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
902
+ children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
903
903
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
904
904
  /* @__PURE__ */ t.jsx(
905
- g,
905
+ f,
906
906
  {
907
907
  name: "Plus",
908
908
  width: 16,
@@ -915,119 +915,119 @@ const ti = (d) => {
915
915
  }
916
916
  )
917
917
  ] }),
918
- m !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: m })
918
+ d !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: d })
919
919
  ] });
920
- }, Fe = "_subtitle_jql1y_1", Ve = "_header_jql1y_8", Ye = "_text_jql1y_9", Ge = "_productsBlock_jql1y_10", We = "_buttonsBlock_jql1y_11", Je = "_top_jql1y_23", Xe = "_itemsBlock_jql1y_32", Qe = "_typeTexts_jql1y_38", Ke = "_block_jql1y_45", Ze = "_active_jql1y_58", ts = "_products_jql1y_10", es = "_product_jql1y_10", ss = "_button_jql1y_11", ns = "_image_jql1y_88", is = "_info_jql1y_95", os = "_name_jql1y_107", as = "_buttons_jql1y_11", cs = "_modal_jql1y_118", ls = "_other_jql1y_138", rs = "_options_jql1y_144", ds = "_addButton_jql1y_150", us = "_deleteButton_jql1y_165", Q = {
921
- subtitle: Fe,
922
- header: Ve,
923
- text: Ye,
924
- productsBlock: Ge,
925
- buttonsBlock: We,
926
- top: Je,
927
- itemsBlock: Xe,
928
- typeTexts: Qe,
929
- block: Ke,
930
- active: Ze,
931
- products: ts,
932
- product: es,
933
- button: ss,
934
- image: ns,
935
- info: is,
936
- name: os,
937
- buttons: as,
938
- modal: cs,
939
- other: ls,
940
- options: rs,
941
- addButton: ds,
942
- deleteButton: us
943
- }, ms = (d) => {
944
- const { buttons: n, setButtons: e, deletable: s = !0, addable: i = !0, editableLink: m = !0 } = d, { pages: h } = Bt(), [o, u] = _.useState(null), [f, $] = _.useState({
920
+ }, Ye = "_subtitle_jql1y_1", Ge = "_header_jql1y_8", We = "_text_jql1y_9", Je = "_productsBlock_jql1y_10", Xe = "_buttonsBlock_jql1y_11", Ke = "_top_jql1y_23", Qe = "_itemsBlock_jql1y_32", Ze = "_typeTexts_jql1y_38", tn = "_block_jql1y_45", en = "_active_jql1y_58", nn = "_products_jql1y_10", sn = "_product_jql1y_10", on = "_button_jql1y_11", an = "_image_jql1y_88", cn = "_info_jql1y_95", ln = "_name_jql1y_107", rn = "_buttons_jql1y_11", dn = "_modal_jql1y_118", un = "_other_jql1y_138", mn = "_options_jql1y_144", hn = "_addButton_jql1y_150", pn = "_deleteButton_jql1y_165", Z = {
921
+ subtitle: Ye,
922
+ header: Ge,
923
+ text: We,
924
+ productsBlock: Je,
925
+ buttonsBlock: Xe,
926
+ top: Ke,
927
+ itemsBlock: Qe,
928
+ typeTexts: Ze,
929
+ block: tn,
930
+ active: en,
931
+ products: nn,
932
+ product: sn,
933
+ button: on,
934
+ image: an,
935
+ info: cn,
936
+ name: ln,
937
+ buttons: rn,
938
+ modal: dn,
939
+ other: un,
940
+ options: mn,
941
+ addButton: hn,
942
+ deleteButton: pn
943
+ }, _n = (r) => {
944
+ const { buttons: s, setButtons: e, deletable: n = !0, addable: i = !0, editableLink: d = !0 } = r, { pages: u } = Bt(), [o, m] = _.useState(null), [g, S] = _.useState({
945
945
  top: 0,
946
946
  left: 0
947
- }), [l, r] = _.useState(null), T = _.useRef(null);
947
+ }), [c, l] = _.useState(null), T = _.useRef(null);
948
948
  _.useEffect(() => {
949
949
  if (o) {
950
- const x = [...n].map((B) => B.id === o.id ? o : B);
950
+ const x = [...s].map((k) => k.id === o.id ? o : k);
951
951
  e(x);
952
952
  }
953
953
  }, [o]), _.useEffect(() => {
954
- if (T.current && l) {
955
- const x = T.current.getBoundingClientRect().height, B = window.innerHeight;
956
- let a = l.top;
957
- a + x > B + window.scrollY - 200 && (a = B + window.scrollY - x - 200), a < 0 && (a = 10), $({
954
+ if (T.current && c) {
955
+ const x = T.current.getBoundingClientRect().height, k = window.innerHeight;
956
+ let a = c.top;
957
+ a + x > k + window.scrollY - 200 && (a = k + window.scrollY - x - 200), a < 0 && (a = 10), S({
958
958
  top: a,
959
- left: l.left
959
+ left: c.left
960
960
  });
961
961
  }
962
- }, [T.current, l]);
963
- const w = (x, B) => {
962
+ }, [T.current, c]);
963
+ const $ = (x, k) => {
964
964
  x.stopPropagation();
965
965
  const a = x.target.getBoundingClientRect();
966
- r({
966
+ l({
967
967
  top: a.top + window.scrollY - 70,
968
968
  left: a.left - (i ? 30 : 65)
969
- }), u(B);
970
- }, C = (x, B) => {
971
- const a = [...n], b = {
969
+ }), m(k);
970
+ }, M = (x, k) => {
971
+ const a = [...s], b = {
972
972
  ...x,
973
973
  id: Math.random().toString(36).substr(2, 9)
974
974
  // Генерируем новый уникальный ID
975
975
  };
976
- a.splice(B + 1, 0, b), e(a);
976
+ a.splice(k + 1, 0, b), e(a);
977
977
  };
978
- return /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
979
- /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: "Button Type" }),
980
- n.map((x, B) => /* @__PURE__ */ t.jsxs(
978
+ return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
979
+ /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
980
+ s.map((x, k) => /* @__PURE__ */ t.jsxs(
981
981
  "div",
982
982
  {
983
- className: Q.product,
983
+ className: Z.product,
984
984
  children: [
985
985
  /* @__PURE__ */ t.jsx(
986
986
  at,
987
987
  {
988
988
  onChange: (a) => {
989
- const q = [...n].map((M) => M.id === x.id ? {
989
+ const D = [...s].map((w) => w.id === x.id ? {
990
990
  ...x,
991
991
  type: a
992
- } : M);
993
- e(q);
992
+ } : w);
993
+ e(D);
994
994
  },
995
995
  value: x.type,
996
996
  options: ["Primary", "Secondary", "Tertiary"]
997
997
  }
998
998
  ),
999
- /* @__PURE__ */ t.jsxs("div", { className: Q.buttons, children: [
1000
- /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
1001
- g,
999
+ /* @__PURE__ */ t.jsxs("div", { className: Z.buttons, children: [
1000
+ /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1001
+ f,
1002
1002
  {
1003
1003
  name: "Copy",
1004
1004
  hoverable: !0,
1005
1005
  width: 20,
1006
1006
  height: 20,
1007
1007
  onClick: () => {
1008
- C(x, B);
1008
+ M(x, k);
1009
1009
  }
1010
1010
  }
1011
1011
  ) }),
1012
- /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
1013
- g,
1012
+ /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1013
+ f,
1014
1014
  {
1015
1015
  name: "Sliders",
1016
1016
  hoverable: !0,
1017
1017
  width: 20,
1018
1018
  height: 20,
1019
1019
  onClick: (a) => {
1020
- w(a, x);
1020
+ $(a, x);
1021
1021
  }
1022
1022
  }
1023
1023
  ) }),
1024
- s && /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
1025
- g,
1024
+ n && /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1025
+ f,
1026
1026
  {
1027
1027
  name: "Trash",
1028
1028
  hoverable: !0,
1029
1029
  onClick: () => {
1030
- const a = n.filter((b) => b.id !== x.id);
1030
+ const a = s.filter((b) => b.id !== x.id);
1031
1031
  e(a);
1032
1032
  },
1033
1033
  width: 20,
@@ -1041,13 +1041,13 @@ const ti = (d) => {
1041
1041
  x.id
1042
1042
  )),
1043
1043
  o && /* @__PURE__ */ t.jsx(
1044
- $t,
1044
+ Pt,
1045
1045
  {
1046
1046
  ref: T,
1047
1047
  activeButton: o,
1048
- setActiveButton: u,
1049
- popupPosition: f,
1050
- editableLink: m
1048
+ setActiveButton: m,
1049
+ popupPosition: g,
1050
+ editableLink: d
1051
1051
  }
1052
1052
  ),
1053
1053
  i && /* @__PURE__ */ t.jsx(
@@ -1062,39 +1062,39 @@ const ti = (d) => {
1062
1062
  ot,
1063
1063
  {
1064
1064
  withoutHover: !0,
1065
- className: Q.button,
1065
+ className: Z.button,
1066
1066
  size: "s",
1067
1067
  onClick: () => {
1068
- const x = [...n];
1069
- m ? x.push({
1068
+ const x = [...s];
1069
+ d ? x.push({
1070
1070
  type: "Primary",
1071
- id: nt(),
1071
+ id: st(),
1072
1072
  typesText: [],
1073
1073
  text: {
1074
1074
  "en-US": "Button Name"
1075
1075
  },
1076
1076
  destination: "Go to Page",
1077
- page: h ? Object.values(h)[0].name : "Home",
1077
+ page: u ? Object.values(u)[0].name : "Home",
1078
1078
  openInNewTab: !1
1079
1079
  }) : x.push({
1080
1080
  type: "Primary",
1081
- id: nt(),
1081
+ id: st(),
1082
1082
  typesText: [],
1083
1083
  text: {
1084
1084
  "en-US": "Create Ticket"
1085
1085
  },
1086
1086
  destination: "Go to Page",
1087
- page: h ? Object.values(h)[0].name : "Home",
1087
+ page: u ? Object.values(u)[0].name : "Home",
1088
1088
  openInNewTab: !1
1089
1089
  }), e(x);
1090
1090
  },
1091
1091
  style: {
1092
1092
  width: "fit-content"
1093
1093
  },
1094
- children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
1094
+ children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
1095
1095
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1096
1096
  /* @__PURE__ */ t.jsx(
1097
- g,
1097
+ f,
1098
1098
  {
1099
1099
  name: "Plus",
1100
1100
  width: 16,
@@ -1107,120 +1107,121 @@ const ti = (d) => {
1107
1107
  }
1108
1108
  )
1109
1109
  ] });
1110
- }, ei = (d) => {
1110
+ }, ai = (r) => {
1111
1111
  const {
1112
- isActiveButtons: n,
1112
+ isActiveButtons: s,
1113
1113
  setIsActiveButtons: e,
1114
- buttons: s,
1114
+ buttons: n,
1115
1115
  setButtons: i,
1116
- editableLink: m = !0,
1117
- addable: h = !0,
1116
+ editableLink: d = !0,
1117
+ addable: u = !0,
1118
1118
  deletable: o = !0
1119
- } = d;
1119
+ } = r;
1120
1120
  return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
1121
1121
  /* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
1122
1122
  /* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
1123
1123
  /* @__PURE__ */ t.jsx(
1124
1124
  it,
1125
1125
  {
1126
- current: n,
1127
- onChange: (u) => e(u)
1126
+ current: s,
1127
+ onChange: (m) => e(m)
1128
1128
  }
1129
1129
  )
1130
1130
  ] }),
1131
- n && /* @__PURE__ */ t.jsx(
1132
- ms,
1131
+ s && /* @__PURE__ */ t.jsx(
1132
+ _n,
1133
1133
  {
1134
- buttons: s,
1134
+ buttons: n,
1135
1135
  setButtons: i,
1136
- editableLink: m,
1137
- addable: h,
1136
+ editableLink: d,
1137
+ addable: u,
1138
1138
  deletable: o
1139
1139
  }
1140
1140
  )
1141
1141
  ] }) });
1142
1142
  };
1143
- function hs(d) {
1144
- const { product: n, children: e } = d, { attributes: s, listeners: i, setNodeRef: m, transform: h, transition: o, isDragging: u } = xt({
1145
- id: String(n.listingId)
1146
- }), f = {
1147
- transform: bt.Transform.toString(h),
1143
+ function gn(r) {
1144
+ const { product: s, children: e } = r, { attributes: n, listeners: i, setNodeRef: d, transform: u, transition: o, isDragging: m } = jt({
1145
+ id: String(s.listingId)
1146
+ }), g = {
1147
+ transform: bt.Transform.toString(u),
1148
1148
  transition: o
1149
1149
  };
1150
1150
  return /* @__PURE__ */ t.jsx(
1151
1151
  "div",
1152
1152
  {
1153
- ref: m,
1154
- style: f,
1155
- className: `${Y.product} ${u ? Y.dragging : ""}`,
1156
- ...s,
1153
+ ref: d,
1154
+ style: g,
1155
+ className: `${G.product} ${m ? G.dragging : ""}`,
1156
+ ...n,
1157
1157
  ...i,
1158
1158
  children: e
1159
1159
  }
1160
1160
  );
1161
1161
  }
1162
- const si = (d) => {
1162
+ const ci = (r) => {
1163
1163
  const {
1164
- isActiveItems: n,
1164
+ isActiveItems: s,
1165
1165
  setIsActiveItems: e,
1166
- items: s,
1166
+ items: n,
1167
1167
  setItems: i,
1168
- other: m,
1169
- title: h,
1168
+ other: d,
1169
+ title: u,
1170
1170
  subtitle: o,
1171
- editable: u = !0,
1172
- draggable: f = !1,
1173
- withImage: $ = !1,
1174
- deletable: l = !0,
1175
- addable: r = !0,
1171
+ editable: m = !0,
1172
+ draggable: g = !1,
1173
+ withImage: S = !1,
1174
+ deletable: c = !0,
1175
+ addable: l = !0,
1176
1176
  itemsType: T,
1177
- itemsOptions: w
1178
- } = d, [C, x] = _.useState(
1177
+ itemsOptions: $,
1178
+ limit: M
1179
+ } = r, [x, k] = _.useState(
1179
1180
  null
1180
- ), [B, a] = _.useState({
1181
+ ), [a, b] = _.useState({
1181
1182
  top: 0,
1182
1183
  left: 0
1183
- }), [b, q] = _.useState(!1), M = mt(
1184
- ht(pt, {
1184
+ }), [D, w] = _.useState(!1), z = ht(
1185
+ pt(_t, {
1185
1186
  activationConstraint: {
1186
1187
  distance: 5
1187
1188
  }
1188
1189
  })
1189
1190
  );
1190
1191
  _.useEffect(() => {
1191
- const c = () => {
1192
- x(null), q(!1);
1192
+ const p = () => {
1193
+ k(null), w(!1);
1193
1194
  };
1194
- return document.body.addEventListener("click", c), x(null), q(!1), () => {
1195
- x(null), q(!1), document.body.removeEventListener("click", c);
1195
+ return document.body.addEventListener("click", p), k(null), w(!1), () => {
1196
+ k(null), w(!1), document.body.removeEventListener("click", p);
1196
1197
  };
1197
1198
  }, []), _.useEffect(() => {
1198
- if (C) {
1199
- const c = [...s].map((v) => v.listingId === C.listingId ? C : v);
1200
- i(c);
1199
+ if (x) {
1200
+ const p = [...n].map((j) => j.listingId === x.listingId ? x : j);
1201
+ i(p);
1201
1202
  }
1202
- }, [C]);
1203
- const D = (c, v) => {
1204
- c.stopPropagation();
1205
- const I = c.target.getBoundingClientRect(), U = 100, P = window.innerHeight;
1206
- let L = I.top + window.scrollY;
1207
- L + U > P && (L = P - U - 20), q(!0), a({
1203
+ }, [x]);
1204
+ const C = (p, j) => {
1205
+ p.stopPropagation();
1206
+ const A = p.target.getBoundingClientRect(), U = 100, O = window.innerHeight;
1207
+ let L = A.top + window.scrollY;
1208
+ L + U > O && (L = O - U - 20), w(!0), b({
1208
1209
  top: L - 80,
1209
- left: I.left - 30
1210
- }), x(v);
1210
+ left: A.left - 30
1211
+ }), k(j);
1211
1212
  };
1212
- function S(c) {
1213
- if ($)
1214
- return c ? /* @__PURE__ */ t.jsx(
1213
+ function v(p) {
1214
+ if (S)
1215
+ return p ? /* @__PURE__ */ t.jsx(
1215
1216
  "img",
1216
1217
  {
1217
- src: `https://imagedelivery.net/${c}/w=1000`,
1218
+ src: `https://imagedelivery.net/${p}/w=1000`,
1218
1219
  alt: "image",
1219
1220
  width: 16,
1220
1221
  height: 16
1221
1222
  }
1222
1223
  ) : /* @__PURE__ */ t.jsx(
1223
- g,
1224
+ f,
1224
1225
  {
1225
1226
  name: "Image",
1226
1227
  width: 16,
@@ -1229,21 +1230,21 @@ const si = (d) => {
1229
1230
  }
1230
1231
  );
1231
1232
  }
1232
- const j = (c) => {
1233
- const { active: v, over: I } = c;
1234
- if (I && v.id !== I.id) {
1235
- const U = s.findIndex((L) => String(L.listingId) === v.id), P = s.findIndex((L) => String(L.listingId) === I.id);
1236
- if (U !== -1 && P !== -1) {
1237
- const L = [...s], [K] = L.splice(U, 1);
1238
- L.splice(P, 0, K), i(L);
1233
+ const I = (p) => {
1234
+ const { active: j, over: A } = p;
1235
+ if (A && j.id !== A.id) {
1236
+ const U = n.findIndex((L) => String(L.listingId) === j.id), O = n.findIndex((L) => String(L.listingId) === A.id);
1237
+ if (U !== -1 && O !== -1) {
1238
+ const L = [...n], [Q] = L.splice(U, 1);
1239
+ L.splice(O, 0, Q), i(L);
1239
1240
  }
1240
1241
  }
1241
- }, N = (c, v) => {
1242
- const I = w.find((P) => c.listingId === P.id);
1243
- if (!I) return null;
1242
+ }, q = (p, j) => {
1243
+ const A = $.find((O) => p.listingId === O.id);
1244
+ if (!A) return null;
1244
1245
  const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1245
- f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1246
- g,
1246
+ g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1247
+ f,
1247
1248
  {
1248
1249
  name: "DotsSixVertical",
1249
1250
  hoverable: !0,
@@ -1254,105 +1255,105 @@ const si = (d) => {
1254
1255
  T === "select" && /* @__PURE__ */ t.jsx(
1255
1256
  at,
1256
1257
  {
1257
- onChange: (P) => {
1258
- const L = [...s], K = w.find((A) => A.productData.name === P);
1259
- if (!K) return;
1260
- const et = {
1261
- listingId: K.id,
1262
- image: K.productData.images.length > 0 ? K.productData.images[0].cfId : ""
1263
- }, p = L.map((A) => A.listingId === c.listingId ? et : A);
1264
- x(et), i([...p]);
1258
+ onChange: (O) => {
1259
+ const L = [...n], Q = $.find((P) => P.productData.name === O);
1260
+ if (!Q) return;
1261
+ const h = {
1262
+ listingId: Q.id,
1263
+ image: Q.productData.images.length > 0 ? Q.productData.images[0].cfId : ""
1264
+ }, E = L.map((P) => P.listingId === p.listingId ? h : P);
1265
+ k(h), i([...E]);
1265
1266
  },
1266
- value: I.productData.name,
1267
+ value: A.productData.name,
1267
1268
  options: [
1268
- ...w.filter((P) => !s.find((L) => L.listingId === P.id)).map((P) => P.productData.name)
1269
+ ...$.filter((O) => !n.find((L) => L.listingId === O.id)).map((O) => O.productData.name)
1269
1270
  ],
1270
- leftAddon: S(
1271
- c.image || I.productData.images.length > 0 && I.productData.images[0].cfId || ""
1271
+ leftAddon: v(
1272
+ p.image || A.productData.images.length > 0 && A.productData.images[0].cfId || ""
1272
1273
  )
1273
1274
  },
1274
- v
1275
+ j
1275
1276
  ),
1276
- /* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
1277
- u && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
1278
- g,
1277
+ /* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
1278
+ m && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1279
+ f,
1279
1280
  {
1280
1281
  name: "Sliders",
1281
1282
  hoverable: !0,
1282
1283
  width: 20,
1283
1284
  height: 20,
1284
- onClick: (P) => D(P, c)
1285
+ onClick: (O) => C(O, p)
1285
1286
  }
1286
1287
  ) }),
1287
- l && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
1288
- g,
1288
+ c && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1289
+ f,
1289
1290
  {
1290
1291
  name: "Trash",
1291
1292
  hoverable: !0,
1292
1293
  width: 20,
1293
1294
  height: 20,
1294
1295
  fill: "#C12A2A",
1295
- onClick: () => i(s.filter((P) => P !== c))
1296
+ onClick: () => i(n.filter((O) => O !== p))
1296
1297
  }
1297
1298
  ) })
1298
1299
  ] })
1299
1300
  ] });
1300
- return f ? /* @__PURE__ */ t.jsx(
1301
- hs,
1301
+ return g ? /* @__PURE__ */ t.jsx(
1302
+ gn,
1302
1303
  {
1303
- product: c,
1304
+ product: p,
1304
1305
  children: U
1305
1306
  },
1306
- c.listingId
1307
+ p.listingId
1307
1308
  ) : /* @__PURE__ */ t.jsx(
1308
1309
  "div",
1309
1310
  {
1310
- className: Y.product,
1311
+ className: G.product,
1311
1312
  children: U
1312
1313
  },
1313
- c.listingId
1314
+ p.listingId
1314
1315
  );
1315
- }, O = _.useRef(null);
1316
- return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
1317
- (h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
1318
- h && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: h }),
1319
- n !== void 0 && /* @__PURE__ */ t.jsx(
1316
+ }, B = _.useRef(null);
1317
+ return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
1318
+ (u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
1319
+ u && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: u }),
1320
+ s !== void 0 && /* @__PURE__ */ t.jsx(
1320
1321
  it,
1321
1322
  {
1322
- current: n,
1323
- onChange: (c) => e == null ? void 0 : e(c)
1323
+ current: s,
1324
+ onChange: (p) => e == null ? void 0 : e(p)
1324
1325
  }
1325
1326
  )
1326
1327
  ] }),
1327
- b && C && /* @__PURE__ */ t.jsx(
1328
- Pt,
1328
+ D && x && /* @__PURE__ */ t.jsx(
1329
+ Mt,
1329
1330
  {
1330
- ref: O,
1331
- activeItem: C,
1332
- setActiveItem: x,
1333
- setIsOpenModal: q,
1334
- popupPosition: B,
1335
- itemsOptions: w
1331
+ ref: B,
1332
+ activeItem: x,
1333
+ setActiveItem: k,
1334
+ setIsOpenModal: w,
1335
+ popupPosition: a,
1336
+ itemsOptions: $
1336
1337
  }
1337
1338
  ),
1338
- n && /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
1339
- o && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: o }),
1340
- f ? /* @__PURE__ */ t.jsx(
1341
- _t,
1339
+ s && /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
1340
+ o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
1341
+ g ? /* @__PURE__ */ t.jsx(
1342
+ gt,
1342
1343
  {
1343
- sensors: M,
1344
- onDragEnd: j,
1344
+ sensors: z,
1345
+ onDragEnd: I,
1345
1346
  children: /* @__PURE__ */ t.jsx(
1346
- gt,
1347
+ ft,
1347
1348
  {
1348
- items: s.map((c) => String(c.listingId)),
1349
- strategy: ft,
1350
- children: s.map((c, v) => N(c, v))
1349
+ items: n.map((p) => String(p.listingId)),
1350
+ strategy: xt,
1351
+ children: n.map((p, j) => q(p, j))
1351
1352
  }
1352
1353
  )
1353
1354
  }
1354
- ) : s.map((c, v) => N(c, v)),
1355
- r && /* @__PURE__ */ t.jsx(
1355
+ ) : n.map((p, j) => q(p, j)),
1356
+ l && /* @__PURE__ */ t.jsx(
1356
1357
  "div",
1357
1358
  {
1358
1359
  style: {
@@ -1364,28 +1365,28 @@ const si = (d) => {
1364
1365
  ot,
1365
1366
  {
1366
1367
  withoutHover: !0,
1367
- className: Y.button,
1368
+ className: G.button,
1368
1369
  size: "s",
1369
1370
  onClick: () => {
1370
- const c = [...s];
1371
- for (let v = 0; v < w.length; v++)
1372
- if (!s.find((I) => I.listingId === w[v].id)) {
1373
- c.push({
1374
- listingId: w[v].id,
1375
- image: w[v].productData.images.length > 0 ? w[v].productData.images[0].cfId : ""
1371
+ const p = [...n];
1372
+ for (let j = 0; j < $.length; j++)
1373
+ if (!n.find((A) => A.listingId === $[j].id)) {
1374
+ p.push({
1375
+ listingId: $[j].id,
1376
+ image: $[j].productData.images.length > 0 ? $[j].productData.images[0].cfId : ""
1376
1377
  });
1377
1378
  break;
1378
1379
  }
1379
- i(c);
1380
+ i(p);
1380
1381
  },
1381
- disabled: s.length === w.length,
1382
+ disabled: n.length === (M || $.length),
1382
1383
  style: {
1383
1384
  width: "fit-content"
1384
1385
  },
1385
- children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
1386
+ children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
1386
1387
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1387
1388
  /* @__PURE__ */ t.jsx(
1388
- g,
1389
+ f,
1389
1390
  {
1390
1391
  name: "Plus",
1391
1392
  width: 16,
@@ -1398,99 +1399,99 @@ const si = (d) => {
1398
1399
  }
1399
1400
  )
1400
1401
  ] }),
1401
- n && m !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: m })
1402
+ s && d !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: d })
1402
1403
  ] });
1403
- }, ps = "_options_6cemk_1", _s = "_price_6cemk_12", gs = "_oldPrice_6cemk_19", fs = "_newPrice_6cemk_27", xs = "_animate_6cemk_34", bs = "_appearAndBounce_6cemk_1", js = "_meta_6cemk_52", vs = "_info_6cemk_58", ys = "_infoRight_6cemk_66", Ns = "_buttons_6cemk_73", ks = "_variants_6cemk_80", Is = "_variant_6cemk_80", Cs = "_stock_6cemk_98", Ss = "_variantInfo_6cemk_105", ws = "_quantity_6cemk_111", Bs = "_count_6cemk_118", $s = "_focused_6cemk_135", Ps = "_button_6cemk_73", Ms = "_activeVariant_6cemk_161", Ts = "_chargeTypes_6cemk_165", qs = "_charge_6cemk_165", As = "_chargeActive_6cemk_190", Os = "_title_6cemk_198", k = {
1404
- options: ps,
1405
- price: _s,
1406
- oldPrice: gs,
1407
- newPrice: fs,
1408
- animate: xs,
1409
- appearAndBounce: bs,
1410
- meta: js,
1411
- info: vs,
1412
- infoRight: ys,
1413
- buttons: Ns,
1414
- variants: ks,
1415
- variant: Is,
1416
- stock: Cs,
1417
- variantInfo: Ss,
1418
- quantity: ws,
1419
- count: Bs,
1420
- focused: $s,
1421
- button: Ps,
1422
- activeVariant: Ms,
1423
- chargeTypes: Ts,
1424
- charge: qs,
1425
- chargeActive: As,
1426
- title: Os
1404
+ }, fn = "_options_6cemk_1", xn = "_price_6cemk_12", jn = "_oldPrice_6cemk_19", bn = "_newPrice_6cemk_27", vn = "_animate_6cemk_34", yn = "_appearAndBounce_6cemk_1", Nn = "_meta_6cemk_52", kn = "_info_6cemk_58", In = "_infoRight_6cemk_66", Cn = "_buttons_6cemk_73", Sn = "_variants_6cemk_80", wn = "_variant_6cemk_80", $n = "_stock_6cemk_98", Bn = "_variantInfo_6cemk_105", Pn = "_quantity_6cemk_111", Mn = "_count_6cemk_118", Tn = "_focused_6cemk_135", qn = "_button_6cemk_73", An = "_activeVariant_6cemk_161", On = "_chargeTypes_6cemk_165", En = "_charge_6cemk_165", Rn = "_chargeActive_6cemk_190", Dn = "_title_6cemk_198", N = {
1405
+ options: fn,
1406
+ price: xn,
1407
+ oldPrice: jn,
1408
+ newPrice: bn,
1409
+ animate: vn,
1410
+ appearAndBounce: yn,
1411
+ meta: Nn,
1412
+ info: kn,
1413
+ infoRight: In,
1414
+ buttons: Cn,
1415
+ variants: Sn,
1416
+ variant: wn,
1417
+ stock: $n,
1418
+ variantInfo: Bn,
1419
+ quantity: Pn,
1420
+ count: Mn,
1421
+ focused: Tn,
1422
+ button: qn,
1423
+ activeVariant: An,
1424
+ chargeTypes: On,
1425
+ charge: En,
1426
+ chargeActive: Rn,
1427
+ title: Dn
1427
1428
  };
1428
- var It = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(It || {});
1429
- const ni = (d) => {
1430
- var x, B;
1431
- const { variants: n } = d, [e, s] = _.useState(n[0]), [i, m] = _.useState(e.chargeTypes[0]), h = lt(), [o, u] = _.useState(1), { reset: f, addProductToCart: $ } = jt(), [l, r] = _.useState(!1);
1429
+ var Ct = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(Ct || {});
1430
+ const li = (r) => {
1431
+ var x, k;
1432
+ const { variants: s } = r, [e, n] = _.useState(s[0]), [i, d] = _.useState(e.chargeTypes[0]), u = lt(), [o, m] = _.useState(1), { reset: g, addProductToCart: S } = vt(), [c, l] = _.useState(!1);
1432
1433
  _.useEffect(() => {
1433
- r(!0);
1434
- const a = setTimeout(() => r(!1), 600);
1434
+ l(!0);
1435
+ const a = setTimeout(() => l(!1), 600);
1435
1436
  return () => clearTimeout(a);
1436
1437
  }, [o]);
1437
1438
  async function T() {
1438
- await $({
1439
- productId: d.id,
1439
+ await S({
1440
+ productId: r.id,
1440
1441
  productVariantId: e.id,
1441
1442
  quantity: o
1442
1443
  });
1443
1444
  }
1444
- function w() {
1445
- f(), T(), h("/checkout");
1445
+ function $() {
1446
+ g(), T(), u("/checkout");
1446
1447
  }
1447
- function C(a) {
1448
+ function M(a) {
1448
1449
  if (a >= 864e5) {
1449
- const S = Math.floor(a / 864e5);
1450
- return `${S} ${S === 1 ? "day" : "days"}`;
1450
+ const C = Math.floor(a / 864e5);
1451
+ return `${C} ${C === 1 ? "day" : "days"}`;
1451
1452
  } else if (a >= 36e5) {
1452
- const S = Math.floor(a / 36e5);
1453
- return `${S} ${S === 1 ? "hour" : "hours"}`;
1453
+ const C = Math.floor(a / 36e5);
1454
+ return `${C} ${C === 1 ? "hour" : "hours"}`;
1454
1455
  } else if (a >= 6e4) {
1455
- const S = Math.floor(a / 6e4);
1456
- return `${S} ${S === 1 ? "minute" : "minutes"}`;
1456
+ const C = Math.floor(a / 6e4);
1457
+ return `${C} ${C === 1 ? "minute" : "minutes"}`;
1457
1458
  } else {
1458
- const S = Math.floor(a / 1e3);
1459
- return `${S} ${S === 1 ? "second" : "seconds"}`;
1459
+ const C = Math.floor(a / 1e3);
1460
+ return `${C} ${C === 1 ? "second" : "seconds"}`;
1460
1461
  }
1461
1462
  }
1462
1463
  return _.useEffect(() => {
1463
- (e.quantity.available === 0 || !e.quantity.available) && u(0);
1464
- }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: k.options, children: [
1465
- e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: k.chargeTypes, children: e.chargeTypes.map((a) => /* @__PURE__ */ t.jsx(
1464
+ (e.quantity.available === 0 || !e.quantity.available) && m(0);
1465
+ }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: N.options, children: [
1466
+ e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: N.chargeTypes, children: e.chargeTypes.map((a) => /* @__PURE__ */ t.jsx(
1466
1467
  "div",
1467
1468
  {
1468
- className: G(k.charge, {
1469
- [k.chargeActive]: i === a
1469
+ className: W(N.charge, {
1470
+ [N.chargeActive]: i === a
1470
1471
  }),
1471
- onClick: () => m(a),
1472
- children: It[a]
1472
+ onClick: () => d(a),
1473
+ children: Ct[a]
1473
1474
  },
1474
1475
  a
1475
1476
  )) }),
1476
- /* @__PURE__ */ t.jsx("div", { className: k.variants, children: n.map((a) => {
1477
+ /* @__PURE__ */ t.jsx("div", { className: N.variants, children: s.map((a) => {
1477
1478
  var b;
1478
1479
  return /* @__PURE__ */ t.jsxs(
1479
1480
  "div",
1480
1481
  {
1481
- className: G(k.variant, {
1482
- [k.activeVariant]: e.id === a.id
1482
+ className: W(N.variant, {
1483
+ [N.activeVariant]: e.id === a.id
1483
1484
  }),
1484
- onClick: () => s(a),
1485
+ onClick: () => n(a),
1485
1486
  children: [
1486
- /* @__PURE__ */ t.jsxs("div", { className: k.variantInfo, children: [
1487
- /* @__PURE__ */ t.jsx("span", { className: k.title, children: a.name }),
1487
+ /* @__PURE__ */ t.jsxs("div", { className: N.variantInfo, children: [
1488
+ /* @__PURE__ */ t.jsx("span", { className: N.title, children: a.name }),
1488
1489
  /* @__PURE__ */ t.jsxs("span", { children: [
1489
1490
  "$",
1490
1491
  i === "ONE_TIME" ? a.price.amount : a.subscriptionSettings ? a.subscriptionSettings.price.amount : "Price Not Found"
1491
1492
  ] })
1492
1493
  ] }),
1493
- /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: k.stock, children: [
1494
+ /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: N.stock, children: [
1494
1495
  ((b = a.quantity.restrictions) == null ? void 0 : b.max) || a.quantity.available || 0,
1495
1496
  " in stock"
1496
1497
  ] }) })
@@ -1499,27 +1500,27 @@ const ni = (d) => {
1499
1500
  a.id
1500
1501
  );
1501
1502
  }) }),
1502
- i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: k.quantity, children: [
1503
+ i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: N.quantity, children: [
1503
1504
  /* @__PURE__ */ t.jsx(
1504
1505
  H,
1505
1506
  {
1506
1507
  type: "Secondary",
1507
1508
  onClick: () => {
1508
- o > 1 ? u((a) => a - 1) : u(1);
1509
+ o > 1 ? m((a) => a - 1) : m(1);
1509
1510
  },
1510
- className: k.button,
1511
+ className: N.button,
1511
1512
  disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1512
- children: /* @__PURE__ */ t.jsx(g, { name: "Minus" })
1513
+ children: /* @__PURE__ */ t.jsx(f, { name: "Minus" })
1513
1514
  }
1514
1515
  ),
1515
1516
  /* @__PURE__ */ t.jsx(
1516
- Mt,
1517
+ Tt,
1517
1518
  {
1518
1519
  type: "number",
1519
1520
  value: String(o),
1520
- onChange: (a) => u(Number(a)),
1521
+ onChange: (a) => m(Number(a)),
1521
1522
  max: ((x = e.quantity.restrictions) == null ? void 0 : x.max) || e.quantity.available || 1 / 0,
1522
- min: ((B = e.quantity.restrictions) == null ? void 0 : B.min) || 0,
1523
+ min: ((k = e.quantity.restrictions) == null ? void 0 : k.min) || 0,
1523
1524
  centered: !0,
1524
1525
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
1525
1526
  }
@@ -1529,20 +1530,20 @@ const ni = (d) => {
1529
1530
  {
1530
1531
  type: "Secondary",
1531
1532
  onClick: () => {
1532
- u((a) => a + 1);
1533
+ m((a) => a + 1);
1533
1534
  },
1534
- className: k.button,
1535
+ className: N.button,
1535
1536
  disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
1536
- children: /* @__PURE__ */ t.jsx(g, { name: "Plus" })
1537
+ children: /* @__PURE__ */ t.jsx(f, { name: "Plus" })
1537
1538
  }
1538
1539
  )
1539
1540
  ] }),
1540
- /* @__PURE__ */ t.jsxs("div", { className: k.meta, children: [
1541
- /* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
1541
+ /* @__PURE__ */ t.jsxs("div", { className: N.meta, children: [
1542
+ /* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
1542
1543
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1543
- /* @__PURE__ */ t.jsxs("div", { className: k.infoRight, children: [
1544
+ /* @__PURE__ */ t.jsxs("div", { className: N.infoRight, children: [
1544
1545
  /* @__PURE__ */ t.jsx(
1545
- g,
1546
+ f,
1546
1547
  {
1547
1548
  name: "Lightning",
1548
1549
  fill: "#FF3F19",
@@ -1550,44 +1551,44 @@ const ni = (d) => {
1550
1551
  height: 20
1551
1552
  }
1552
1553
  ),
1553
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : C(e.deliveryTime) })
1554
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : M(e.deliveryTime) })
1554
1555
  ] })
1555
1556
  ] }),
1556
- /* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
1557
+ /* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
1557
1558
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1558
- /* @__PURE__ */ t.jsx("div", { className: k.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
1559
- /* @__PURE__ */ t.jsxs("span", { className: G(k.newPrice, { [k.animate]: l }), children: [
1559
+ /* @__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: [
1560
+ /* @__PURE__ */ t.jsxs("span", { className: W(N.newPrice, { [N.animate]: c }), children: [
1560
1561
  "$ ",
1561
1562
  (e.price.amount || 0) * o
1562
1563
  ] }),
1563
- /* @__PURE__ */ t.jsxs("span", { className: k.oldPrice, children: [
1564
+ /* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
1564
1565
  "$ ",
1565
1566
  (e.compareAtPrice.amount || 0) * o
1566
1567
  ] })
1567
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: G(k.newPrice, { [k.animate]: l }), children: [
1568
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: W(N.newPrice, { [N.animate]: c }), children: [
1568
1569
  "$ ",
1569
1570
  (e.price.amount || 0) * o
1570
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
1571
- /* @__PURE__ */ t.jsxs("span", { className: G(k.newPrice, { [k.animate]: l }), children: [
1571
+ ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
1572
+ /* @__PURE__ */ t.jsxs("span", { className: W(N.newPrice, { [N.animate]: c }), children: [
1572
1573
  "$ ",
1573
1574
  e.subscriptionSettings.price.amount || 0
1574
1575
  ] }),
1575
- /* @__PURE__ */ t.jsxs("span", { className: k.oldPrice, children: [
1576
+ /* @__PURE__ */ t.jsxs("span", { className: N.oldPrice, children: [
1576
1577
  "$ ",
1577
1578
  e.subscriptionSettings.compareAtPrice.amount || 0
1578
1579
  ] })
1579
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: G(k.newPrice, { [k.animate]: l }), children: [
1580
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: W(N.newPrice, { [N.animate]: c }), children: [
1580
1581
  "$ ",
1581
1582
  e.subscriptionSettings.price.amount || 0
1582
1583
  ] }) })
1583
1584
  ] })
1584
1585
  ] }),
1585
- /* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
1586
+ /* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
1586
1587
  /* @__PURE__ */ t.jsx(
1587
1588
  H,
1588
1589
  {
1589
1590
  type: "Primary",
1590
- onClick: () => w(),
1591
+ onClick: () => $(),
1591
1592
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1592
1593
  children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1593
1594
  }
@@ -1603,59 +1604,59 @@ const ni = (d) => {
1603
1604
  )
1604
1605
  ] })
1605
1606
  ] });
1606
- }, Es = "_button_1tdo3_1", Rs = "_login_1tdo3_14", Ls = "_signUp_1tdo3_18", Ds = "_buttons_1tdo3_23", Hs = "_modal_1tdo3_32", Us = "_closing_1tdo3_64", zs = "_info_1tdo3_113", Fs = "_top_1tdo3_120", Vs = "_title_1tdo3_131", Ys = "_clear_1tdo3_138", Gs = "_activeClear_1tdo3_145", Ws = "_count_1tdo3_149", Js = "_cart_1tdo3_164", Xs = "_empty_1tdo3_172", Qs = "_product_1tdo3_198", Ks = "_products_1tdo3_207", Zs = "_image_1tdo3_215", tn = "_productInfo_1tdo3_221", en = "_content_1tdo3_228", sn = "_name_1tdo3_234", nn = "_price_1tdo3_240", on = "_productButtons_1tdo3_246", an = "_productButton_1tdo3_246", cn = "_productCount_1tdo3_266", ln = "_bottom_1tdo3_282", rn = "_subtotal_1tdo3_290", dn = "_block_1tdo3_298", un = "_shoppingCount_1tdo3_305", mn = "_total_1tdo3_325", hn = "_link_1tdo3_331", pn = "_userInfo_1tdo3_338", _n = "_pagesMobileModal_1tdo3_349", gn = "_pagesMobileModalContent_1tdo3_363", fn = "_pagesMobileModalHeader_1tdo3_369", xn = "_pagesMobileModalFooter_1tdo3_379", y = {
1607
- button: Es,
1608
- login: Rs,
1609
- signUp: Ls,
1610
- buttons: Ds,
1611
- modal: Hs,
1607
+ }, Ln = "_button_1tdo3_1", zn = "_login_1tdo3_14", Un = "_signUp_1tdo3_18", Hn = "_buttons_1tdo3_23", Fn = "_modal_1tdo3_32", Vn = "_closing_1tdo3_64", Yn = "_info_1tdo3_113", Gn = "_top_1tdo3_120", Wn = "_title_1tdo3_131", Jn = "_clear_1tdo3_138", Xn = "_activeClear_1tdo3_145", Kn = "_count_1tdo3_149", Qn = "_cart_1tdo3_164", Zn = "_empty_1tdo3_172", ts = "_product_1tdo3_198", es = "_products_1tdo3_207", ns = "_image_1tdo3_215", ss = "_productInfo_1tdo3_221", is = "_content_1tdo3_228", os = "_name_1tdo3_234", as = "_price_1tdo3_240", cs = "_productButtons_1tdo3_246", ls = "_productButton_1tdo3_246", rs = "_productCount_1tdo3_266", ds = "_bottom_1tdo3_282", us = "_subtotal_1tdo3_290", ms = "_block_1tdo3_298", hs = "_shoppingCount_1tdo3_305", ps = "_total_1tdo3_325", _s = "_link_1tdo3_331", gs = "_userInfo_1tdo3_338", fs = "_pagesMobileModal_1tdo3_349", xs = "_pagesMobileModalContent_1tdo3_363", js = "_pagesMobileModalHeader_1tdo3_369", bs = "_pagesMobileModalFooter_1tdo3_379", y = {
1608
+ button: Ln,
1609
+ login: zn,
1610
+ signUp: Un,
1611
+ buttons: Hn,
1612
+ modal: Fn,
1612
1613
  "slide-in-fade": "_slide-in-fade_1tdo3_1",
1613
1614
  "mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
1614
- closing: Us,
1615
+ closing: Vn,
1615
1616
  "mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
1616
1617
  "slide-out-fade": "_slide-out-fade_1tdo3_1",
1617
- info: zs,
1618
- top: Fs,
1619
- title: Vs,
1620
- clear: Ys,
1621
- activeClear: Gs,
1622
- count: Ws,
1623
- cart: Js,
1624
- empty: Xs,
1625
- product: Qs,
1626
- products: Ks,
1627
- image: Zs,
1628
- productInfo: tn,
1629
- content: en,
1630
- name: sn,
1631
- price: nn,
1632
- productButtons: on,
1633
- productButton: an,
1634
- productCount: cn,
1635
- bottom: ln,
1636
- subtotal: rn,
1637
- block: dn,
1638
- shoppingCount: un,
1639
- total: mn,
1640
- link: hn,
1641
- userInfo: pn,
1642
- pagesMobileModal: _n,
1643
- pagesMobileModalContent: gn,
1644
- pagesMobileModalHeader: fn,
1645
- pagesMobileModalFooter: xn
1646
- }, ii = (d) => {
1647
- const { shopping: n, signUp: e, isShowUserInfo: s = !0 } = d;
1618
+ info: Yn,
1619
+ top: Gn,
1620
+ title: Wn,
1621
+ clear: Jn,
1622
+ activeClear: Xn,
1623
+ count: Kn,
1624
+ cart: Qn,
1625
+ empty: Zn,
1626
+ product: ts,
1627
+ products: es,
1628
+ image: ns,
1629
+ productInfo: ss,
1630
+ content: is,
1631
+ name: os,
1632
+ price: as,
1633
+ productButtons: cs,
1634
+ productButton: ls,
1635
+ productCount: rs,
1636
+ bottom: ds,
1637
+ subtotal: us,
1638
+ block: ms,
1639
+ shoppingCount: hs,
1640
+ total: ps,
1641
+ link: _s,
1642
+ userInfo: gs,
1643
+ pagesMobileModal: fs,
1644
+ pagesMobileModalContent: xs,
1645
+ pagesMobileModalHeader: js,
1646
+ pagesMobileModalFooter: bs
1647
+ }, ri = (r) => {
1648
+ const { shopping: s, signUp: e, isShowUserInfo: n = !0 } = r;
1648
1649
  return /* @__PURE__ */ t.jsxs("div", { className: y.buttons, children: [
1649
- n && /* @__PURE__ */ t.jsx(bn, {}),
1650
- s && /* @__PURE__ */ t.jsx(Ct, { signUp: e })
1650
+ s && /* @__PURE__ */ t.jsx(vs, {}),
1651
+ n && /* @__PURE__ */ t.jsx(St, { signUp: e })
1651
1652
  ] });
1652
- }, bn = () => {
1653
- const [d, n] = _.useState(!1), [e, s] = _.useState([]), { cart: i } = jt();
1654
- function m(f) {
1655
- var $;
1656
- return !f || !(f != null && f.variants) ? !1 : ($ = f.variants.find((l) => l.id === f.activeVariantId)) == null ? void 0 : $.subscriptionSettings;
1653
+ }, vs = () => {
1654
+ const [r, s] = _.useState(!1), [e, n] = _.useState([]), { cart: i } = vt();
1655
+ function d(g) {
1656
+ var S;
1657
+ return !g || !(g != null && g.variants) ? !1 : (S = g.variants.find((c) => c.id === g.activeVariantId)) == null ? void 0 : S.subscriptionSettings;
1657
1658
  }
1658
- const h = i.parts.length > 0 && e.length > 0 && !m(e[0]), [o, u] = _.useState(!1);
1659
+ const u = i.parts.length > 0 && e.length > 0 && !d(e[0]), [o, m] = _.useState(!1);
1659
1660
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1660
1661
  /* @__PURE__ */ t.jsxs(
1661
1662
  H,
@@ -1664,67 +1665,67 @@ const ni = (d) => {
1664
1665
  style: {
1665
1666
  padding: 10
1666
1667
  },
1667
- onClick: (f) => {
1668
- f.stopPropagation(), window.location.pathname.includes("/admin/builder") || (n(!0), u(!0));
1668
+ onClick: (g) => {
1669
+ g.stopPropagation(), window.location.pathname.includes("/admin/builder") || (s(!0), m(!0));
1669
1670
  },
1670
1671
  children: [
1671
1672
  /* @__PURE__ */ t.jsx(
1672
- g,
1673
+ f,
1673
1674
  {
1674
1675
  name: "Handbag",
1675
1676
  fill: "var(--icon-primary)"
1676
1677
  }
1677
1678
  ),
1678
- h && /* @__PURE__ */ t.jsx("div", { className: y.shoppingCount, children: i.parts.length })
1679
+ u && /* @__PURE__ */ t.jsx("div", { className: y.shoppingCount, children: i.parts.length })
1679
1680
  ]
1680
1681
  }
1681
1682
  ),
1682
- d && /* @__PURE__ */ t.jsx(
1683
- vt,
1683
+ r && /* @__PURE__ */ t.jsx(
1684
+ yt,
1684
1685
  {
1685
1686
  close: () => {
1686
- u(!1), setTimeout(() => {
1687
- n(!1);
1687
+ m(!1), setTimeout(() => {
1688
+ s(!1);
1688
1689
  }, 300);
1689
1690
  },
1690
1691
  withAnimation: !1,
1691
1692
  children: /* @__PURE__ */ t.jsx(
1692
- jn,
1693
+ ys,
1693
1694
  {
1694
1695
  activeProducts: e,
1695
- isCartNotEmpty: h,
1696
+ isCartNotEmpty: u,
1696
1697
  isOpen: o
1697
1698
  }
1698
1699
  )
1699
1700
  }
1700
1701
  )
1701
1702
  ] });
1702
- }, jn = (d) => {
1703
- const { activeProducts: n, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: m, getTotalAndDiscount: h, updateQuantityOfProduct: o } = jt(), u = lt();
1704
- function f(r) {
1705
- u(r);
1703
+ }, ys = (r) => {
1704
+ const { activeProducts: s, isCartNotEmpty: e, isOpen: n } = r, { cart: i, reset: d, getTotalAndDiscount: u, updateQuantityOfProduct: o } = vt(), m = lt();
1705
+ function g(l) {
1706
+ m(l);
1706
1707
  }
1707
- function $(r) {
1708
+ function S(l) {
1708
1709
  o({
1709
- productId: r.id,
1710
- productVariantId: r.activeVariantId,
1711
- quantity: r.quantity + 1
1710
+ productId: l.id,
1711
+ productVariantId: l.activeVariantId,
1712
+ quantity: l.quantity + 1
1712
1713
  });
1713
1714
  }
1714
- function l(r) {
1715
+ function c(l) {
1715
1716
  o({
1716
- productId: r.id,
1717
- productVariantId: r.activeVariantId,
1718
- quantity: r.quantity - 1
1717
+ productId: l.id,
1718
+ productVariantId: l.activeVariantId,
1719
+ quantity: l.quantity - 1
1719
1720
  });
1720
1721
  }
1721
1722
  return /* @__PURE__ */ t.jsxs(
1722
1723
  "div",
1723
1724
  {
1724
- className: G(y.modal, {
1725
- [y.closing]: !s
1725
+ className: W(y.modal, {
1726
+ [y.closing]: !n
1726
1727
  }),
1727
- onClick: (r) => r.stopPropagation(),
1728
+ onClick: (l) => l.stopPropagation(),
1728
1729
  children: [
1729
1730
  /* @__PURE__ */ t.jsxs("div", { className: y.top, children: [
1730
1731
  /* @__PURE__ */ t.jsxs("div", { className: y.info, children: [
@@ -1734,17 +1735,17 @@ const ni = (d) => {
1734
1735
  /* @__PURE__ */ t.jsx(
1735
1736
  "button",
1736
1737
  {
1737
- className: G(y.clear, {
1738
+ className: W(y.clear, {
1738
1739
  [y.activeClear]: e
1739
1740
  }),
1740
1741
  disabled: !e,
1741
- onClick: m,
1742
+ onClick: d,
1742
1743
  children: "Clear all"
1743
1744
  }
1744
1745
  )
1745
1746
  ] }),
1746
1747
  e ? /* @__PURE__ */ t.jsxs("div", { className: y.cart, children: [
1747
- /* @__PURE__ */ t.jsx("div", { className: y.products, children: n.map((r) => /* @__PURE__ */ t.jsxs(
1748
+ /* @__PURE__ */ t.jsx("div", { className: y.products, children: s.map((l) => /* @__PURE__ */ t.jsxs(
1748
1749
  "div",
1749
1750
  {
1750
1751
  className: y.product,
@@ -1753,7 +1754,7 @@ const ni = (d) => {
1753
1754
  /* @__PURE__ */ t.jsx(
1754
1755
  "img",
1755
1756
  {
1756
- src: `https://imagedelivery.net/${r.images[0].cfId}/w=500`,
1757
+ src: `https://imagedelivery.net/${l.images[0].cfId}/w=500`,
1757
1758
  alt: "image",
1758
1759
  width: "100%",
1759
1760
  height: "100%",
@@ -1761,10 +1762,10 @@ const ni = (d) => {
1761
1762
  }
1762
1763
  ),
1763
1764
  /* @__PURE__ */ t.jsxs("div", { className: y.content, children: [
1764
- /* @__PURE__ */ t.jsx("div", { className: y.name, children: r.name }),
1765
+ /* @__PURE__ */ t.jsx("div", { className: y.name, children: l.name }),
1765
1766
  /* @__PURE__ */ t.jsxs("div", { className: y.price, children: [
1766
1767
  "$",
1767
- r.variants.find((T) => T.id === r.activeVariantId).price.amount * ((r == null ? void 0 : r.quantity) || 1)
1768
+ l.variants.find((T) => T.id === l.activeVariantId).price.amount * ((l == null ? void 0 : l.quantity) || 1)
1768
1769
  ] })
1769
1770
  ] })
1770
1771
  ] }),
@@ -1773,11 +1774,11 @@ const ni = (d) => {
1773
1774
  "div",
1774
1775
  {
1775
1776
  onClick: () => {
1776
- r.quantity !== 1 && l(r);
1777
+ l.quantity !== 1 && c(l);
1777
1778
  },
1778
1779
  className: y.productButton,
1779
1780
  children: /* @__PURE__ */ t.jsx(
1780
- g,
1781
+ f,
1781
1782
  {
1782
1783
  name: "Minus",
1783
1784
  fill: "#757575",
@@ -1787,14 +1788,14 @@ const ni = (d) => {
1787
1788
  )
1788
1789
  }
1789
1790
  ),
1790
- /* @__PURE__ */ t.jsx("div", { className: y.productCount, children: r.quantity }),
1791
+ /* @__PURE__ */ t.jsx("div", { className: y.productCount, children: l.quantity }),
1791
1792
  /* @__PURE__ */ t.jsx(
1792
1793
  "div",
1793
1794
  {
1794
- onClick: () => $(r),
1795
+ onClick: () => S(l),
1795
1796
  className: y.productButton,
1796
1797
  children: /* @__PURE__ */ t.jsx(
1797
- g,
1798
+ f,
1798
1799
  {
1799
1800
  name: "Plus",
1800
1801
  fill: "#757575",
@@ -1807,14 +1808,14 @@ const ni = (d) => {
1807
1808
  ] })
1808
1809
  ]
1809
1810
  },
1810
- r.id
1811
+ l.id
1811
1812
  )) }),
1812
1813
  /* @__PURE__ */ t.jsxs("div", { className: y.bottom, children: [
1813
1814
  /* @__PURE__ */ t.jsxs("div", { className: y.subtotal, children: [
1814
1815
  /* @__PURE__ */ t.jsxs("div", { className: y.block, children: [
1815
1816
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1816
1817
  /* @__PURE__ */ t.jsx(
1817
- g,
1818
+ f,
1818
1819
  {
1819
1820
  name: "Info",
1820
1821
  width: 20,
@@ -1825,18 +1826,18 @@ const ni = (d) => {
1825
1826
  ] }),
1826
1827
  /* @__PURE__ */ t.jsxs("div", { className: y.total, children: [
1827
1828
  "$",
1828
- h().total
1829
+ u().total
1829
1830
  ] })
1830
1831
  ] }),
1831
- /* @__PURE__ */ t.jsx(H, { onClick: () => f("/checkout"), children: "Checkout" })
1832
+ /* @__PURE__ */ t.jsx(H, { onClick: () => g("/checkout"), children: "Checkout" })
1832
1833
  ] })
1833
- ] }) : /* @__PURE__ */ t.jsx(vn, {})
1834
+ ] }) : /* @__PURE__ */ t.jsx(Ns, {})
1834
1835
  ]
1835
1836
  }
1836
1837
  );
1837
- }, vn = () => /* @__PURE__ */ t.jsxs("div", { className: y.empty, children: [
1838
+ }, Ns = () => /* @__PURE__ */ t.jsxs("div", { className: y.empty, children: [
1838
1839
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1839
- g,
1840
+ f,
1840
1841
  {
1841
1842
  name: "Handbag",
1842
1843
  fill: "var(--icon-secondary)"
@@ -1855,18 +1856,18 @@ const ni = (d) => {
1855
1856
  }
1856
1857
  )
1857
1858
  ] })
1858
- ] }), Ct = ({ signUp: d, close: n }) => {
1859
- const e = JSON.parse(localStorage.getItem("token") || "{}"), { data: s } = e, i = lt();
1860
- function m(u) {
1861
- window.location.pathname.includes("/admin/builder") || i(u);
1859
+ ] }), St = ({ signUp: r, close: s }) => {
1860
+ const e = JSON.parse(localStorage.getItem("token") || "{}"), { data: n } = e, i = lt();
1861
+ function d(m) {
1862
+ window.location.pathname.includes("/admin/builder") || i(m);
1862
1863
  }
1863
- if (!s)
1864
+ if (!n)
1864
1865
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1865
1866
  /* @__PURE__ */ t.jsx(
1866
1867
  H,
1867
1868
  {
1868
1869
  onClick: () => {
1869
- m("/customer-dash"), n == null || n();
1870
+ d("/customer-dash"), s == null || s();
1870
1871
  },
1871
1872
  type: "Secondary",
1872
1873
  style: {
@@ -1875,11 +1876,11 @@ const ni = (d) => {
1875
1876
  children: "Login"
1876
1877
  }
1877
1878
  ),
1878
- d && /* @__PURE__ */ t.jsx(
1879
+ r && /* @__PURE__ */ t.jsx(
1879
1880
  H,
1880
1881
  {
1881
1882
  onClick: () => {
1882
- m("/customer-dash"), n == null || n();
1883
+ d("/customer-dash"), s == null || s();
1883
1884
  },
1884
1885
  type: "Primary",
1885
1886
  style: {
@@ -1890,29 +1891,29 @@ const ni = (d) => {
1890
1891
  }
1891
1892
  )
1892
1893
  ] });
1893
- const [h, o] = _.useState("test-email@gmail.com");
1894
+ const [u, o] = _.useState("test-email@gmail.com");
1894
1895
  return _.useEffect(() => {
1895
1896
  (async () => {
1896
- const f = Tt(s);
1897
- o(f.email);
1897
+ const g = qt(n);
1898
+ o(g.email);
1898
1899
  })();
1899
- }, [s]), /* @__PURE__ */ t.jsx(
1900
+ }, [n]), /* @__PURE__ */ t.jsx(
1900
1901
  "div",
1901
1902
  {
1902
1903
  className: y.userInfo,
1903
1904
  onClick: () => {
1904
- m("/customer-dash"), n == null || n();
1905
+ d("/customer-dash"), s == null || s();
1905
1906
  },
1906
- children: /* @__PURE__ */ t.jsx("div", { children: h || "test-email@gmail.com" })
1907
+ children: /* @__PURE__ */ t.jsx("div", { children: u || "test-email@gmail.com" })
1907
1908
  }
1908
1909
  );
1909
- }, yn = ({
1910
- children: d,
1911
- logo: n,
1910
+ }, ks = ({
1911
+ children: r,
1912
+ logo: s,
1912
1913
  setIsOpen: e,
1913
- signUp: s
1914
+ signUp: n
1914
1915
  }) => {
1915
- const { setIsOpen: i } = Nt(), m = () => {
1916
+ const { setIsOpen: i } = kt(), d = () => {
1916
1917
  i(!1), setTimeout(() => {
1917
1918
  e(!1), i(!0);
1918
1919
  }, 300);
@@ -1921,17 +1922,17 @@ const ni = (d) => {
1921
1922
  "div",
1922
1923
  {
1923
1924
  className: y.pagesMobileModal,
1924
- onClick: (h) => h.stopPropagation(),
1925
+ onClick: (u) => u.stopPropagation(),
1925
1926
  children: [
1926
1927
  /* @__PURE__ */ t.jsxs("div", { className: y.pagesMobileModalHeader, children: [
1927
- /* @__PURE__ */ t.jsx("div", { children: n }),
1928
+ /* @__PURE__ */ t.jsx("div", { children: s }),
1928
1929
  /* @__PURE__ */ t.jsx(
1929
1930
  H,
1930
1931
  {
1931
1932
  type: "Secondary",
1932
- onClick: m,
1933
+ onClick: d,
1933
1934
  children: /* @__PURE__ */ t.jsx(
1934
- g,
1935
+ f,
1935
1936
  {
1936
1937
  name: "X",
1937
1938
  fill: "var(--icon-primary)"
@@ -1940,37 +1941,37 @@ const ni = (d) => {
1940
1941
  }
1941
1942
  )
1942
1943
  ] }),
1943
- /* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalContent, children: d }),
1944
+ /* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalContent, children: r }),
1944
1945
  /* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
1945
- Ct,
1946
+ St,
1946
1947
  {
1947
- signUp: s,
1948
- close: m
1948
+ signUp: n,
1949
+ close: d
1949
1950
  }
1950
1951
  ) })
1951
1952
  ]
1952
1953
  }
1953
1954
  );
1954
- }, oi = ({
1955
- children: d,
1956
- logo: n,
1955
+ }, di = ({
1956
+ children: r,
1957
+ logo: s,
1957
1958
  signUp: e
1958
1959
  }) => {
1959
- const [s, i] = _.useState(!1);
1960
+ const [n, i] = _.useState(!1);
1960
1961
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1961
- /* @__PURE__ */ t.jsx(Nn, { setIsOpenModal: i }),
1962
- s && /* @__PURE__ */ t.jsx(vt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
1963
- yn,
1962
+ /* @__PURE__ */ t.jsx(Is, { setIsOpenModal: i }),
1963
+ n && /* @__PURE__ */ t.jsx(yt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
1964
+ ks,
1964
1965
  {
1965
- logo: n,
1966
+ logo: s,
1966
1967
  setIsOpen: i,
1967
1968
  signUp: e,
1968
- children: d
1969
+ children: r
1969
1970
  }
1970
1971
  ) })
1971
1972
  ] });
1972
- }, Nn = (d) => {
1973
- const { setIsOpenModal: n } = d;
1973
+ }, Is = (r) => {
1974
+ const { setIsOpenModal: s } = r;
1974
1975
  return /* @__PURE__ */ t.jsx(
1975
1976
  H,
1976
1977
  {
@@ -1979,10 +1980,10 @@ const ni = (d) => {
1979
1980
  padding: 10
1980
1981
  },
1981
1982
  onClick: (e) => {
1982
- e.stopPropagation(), n(!0);
1983
+ e.stopPropagation(), s(!0);
1983
1984
  },
1984
1985
  children: /* @__PURE__ */ t.jsx(
1985
- g,
1986
+ f,
1986
1987
  {
1987
1988
  name: "List",
1988
1989
  fill: "var(--icon-primary)"
@@ -1990,34 +1991,34 @@ const ni = (d) => {
1990
1991
  )
1991
1992
  }
1992
1993
  );
1993
- }, kn = "_share_10urc_1", In = "_modal_10urc_9", Cn = "_header_10urc_21", Sn = "_socials_10urc_31", wn = "_social_10urc_31", Bn = "_copy_10urc_41", $n = "_title_10urc_48", Pn = "_copyWrapper_10urc_54", Mn = "_copyText_10urc_63", Tn = "_copyTextMobile_10urc_76", qn = "_copyTextMiniMobile_10urc_95", Z = {
1994
- share: kn,
1995
- modal: In,
1996
- header: Cn,
1997
- socials: Sn,
1998
- social: wn,
1999
- copy: Bn,
2000
- title: $n,
2001
- copyWrapper: Pn,
2002
- copyText: Mn,
2003
- copyTextMobile: Tn,
2004
- copyTextMiniMobile: qn
2005
- }, ai = () => {
2006
- const { isOpenModal: d, setIsOpenModal: n } = kt();
2007
- function e() {
2008
- n(!0);
1994
+ }, Cs = "_share_10urc_1", Ss = "_modal_10urc_9", ws = "_header_10urc_21", $s = "_socials_10urc_31", Bs = "_social_10urc_31", Ps = "_copy_10urc_41", Ms = "_title_10urc_48", Ts = "_copyWrapper_10urc_54", qs = "_copyText_10urc_63", As = "_copyTextMobile_10urc_76", Os = "_copyTextMiniMobile_10urc_95", tt = {
1995
+ share: Cs,
1996
+ modal: Ss,
1997
+ header: ws,
1998
+ socials: $s,
1999
+ social: Bs,
2000
+ copy: Ps,
2001
+ title: Ms,
2002
+ copyWrapper: Ts,
2003
+ copyText: qs,
2004
+ copyTextMobile: As,
2005
+ copyTextMiniMobile: Os
2006
+ }, ui = ({ title: r = "Copy Product Link" }) => {
2007
+ const { isOpenModal: s, setIsOpenModal: e } = It();
2008
+ function n() {
2009
+ e(!0);
2009
2010
  }
2010
2011
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2011
2012
  /* @__PURE__ */ t.jsx(
2012
2013
  H,
2013
2014
  {
2014
- className: Z.share,
2015
- onClick: (s) => {
2016
- s.stopPropagation(), e();
2015
+ className: tt.share,
2016
+ onClick: (i) => {
2017
+ i.stopPropagation(), n();
2017
2018
  },
2018
2019
  type: "Secondary",
2019
2020
  children: /* @__PURE__ */ t.jsx(
2020
- g,
2021
+ f,
2021
2022
  {
2022
2023
  name: "Share",
2023
2024
  fill: "#757575",
@@ -2026,55 +2027,55 @@ const ni = (d) => {
2026
2027
  )
2027
2028
  }
2028
2029
  ),
2029
- d && /* @__PURE__ */ t.jsx(vt, { close: n, children: /* @__PURE__ */ t.jsx(An, {}) })
2030
+ s && /* @__PURE__ */ t.jsx(yt, { close: e, children: /* @__PURE__ */ t.jsx(Es, { title: r }) })
2030
2031
  ] });
2031
- }, An = () => {
2032
- const { setIsOpenModal: d } = kt(), { notification: n, setNotification: e } = qt(), { setIsOpen: s } = Nt(), i = window.location.href;
2033
- function m() {
2034
- navigator.clipboard.writeText(i), e({
2032
+ }, Es = ({ title: r = "Copy Product Link" }) => {
2033
+ const { setIsOpenModal: s } = It(), { notification: e, setNotification: n } = At(), { setIsOpen: i } = kt(), d = window.location.href;
2034
+ function u() {
2035
+ navigator.clipboard.writeText(d), n({
2035
2036
  message: "Link copied to clipboard",
2036
2037
  status: "success"
2037
2038
  });
2038
2039
  }
2039
- function h() {
2040
- s(!1), setTimeout(() => {
2041
- d(!1), s(!0);
2040
+ function o() {
2041
+ i(!1), setTimeout(() => {
2042
+ s(!1), i(!0);
2042
2043
  }, 300);
2043
2044
  }
2044
- function o(u, f) {
2045
- return u.length > f ? u.slice(0, f) + "..." : u;
2045
+ function m(g, S) {
2046
+ return g.length > S ? g.slice(0, S) + "..." : g;
2046
2047
  }
2047
2048
  return /* @__PURE__ */ t.jsxs(
2048
2049
  "div",
2049
2050
  {
2050
- className: Z.modal,
2051
- onClick: (u) => u.stopPropagation(),
2051
+ className: tt.modal,
2052
+ onClick: (g) => g.stopPropagation(),
2052
2053
  children: [
2053
- /* @__PURE__ */ t.jsxs("div", { className: Z.header, children: [
2054
- /* @__PURE__ */ t.jsx("div", { className: Z.title, children: "Copy Product Link" }),
2054
+ /* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
2055
+ /* @__PURE__ */ t.jsx("div", { className: tt.title, children: r }),
2055
2056
  /* @__PURE__ */ t.jsx(
2056
- g,
2057
+ f,
2057
2058
  {
2058
2059
  name: "X",
2059
2060
  fill: "#757575",
2060
- onClick: h,
2061
+ onClick: o,
2061
2062
  hoverable: !0
2062
2063
  }
2063
2064
  )
2064
2065
  ] }),
2065
- /* @__PURE__ */ t.jsxs("div", { className: Z.copyWrapper, children: [
2066
+ /* @__PURE__ */ t.jsxs("div", { className: tt.copyWrapper, children: [
2066
2067
  /* @__PURE__ */ t.jsxs(
2067
2068
  H,
2068
2069
  {
2069
2070
  type: "Secondary",
2070
- onClick: m,
2071
+ onClick: u,
2071
2072
  style: {
2072
2073
  flex: 1
2073
2074
  },
2074
2075
  children: [
2075
- /* @__PURE__ */ t.jsx("div", { className: Z.copyText, children: o(i, 100) }),
2076
- /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMobile, children: o(i, 40) }),
2077
- /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMiniMobile, children: o(i, 20) })
2076
+ /* @__PURE__ */ t.jsx("div", { className: tt.copyText, children: m(d, 100) }),
2077
+ /* @__PURE__ */ t.jsx("div", { className: tt.copyTextMobile, children: m(d, 40) }),
2078
+ /* @__PURE__ */ t.jsx("div", { className: tt.copyTextMiniMobile, children: m(d, 20) })
2078
2079
  ]
2079
2080
  }
2080
2081
  ),
@@ -2082,35 +2083,35 @@ const ni = (d) => {
2082
2083
  H,
2083
2084
  {
2084
2085
  type: "Secondary",
2085
- onClick: m,
2086
- children: n ? /* @__PURE__ */ t.jsx(g, { name: "Check" }) : /* @__PURE__ */ t.jsx(g, { name: "Copy" })
2086
+ onClick: u,
2087
+ children: e ? /* @__PURE__ */ t.jsx(f, { name: "Check" }) : /* @__PURE__ */ t.jsx(f, { name: "Copy" })
2087
2088
  }
2088
2089
  )
2089
2090
  ] })
2090
2091
  ]
2091
2092
  }
2092
2093
  );
2093
- }, On = "_accordion_1s1lq_1", En = "_header_1s1lq_9", Rn = "_icon_1s1lq_18", Ln = "_open_1s1lq_21", Dn = "_content_1s1lq_25", st = {
2094
- accordion: On,
2095
- header: En,
2096
- icon: Rn,
2097
- open: Ln,
2098
- content: Dn
2099
- }, ci = ({ title: d, content: n, defaultOpen: e = !1 }) => {
2100
- const [s, i] = _.useState(e), [m, h] = _.useState(0), o = _.useRef(null), u = () => {
2101
- i(!s);
2094
+ }, Rs = "_accordion_1s1lq_1", Ds = "_header_1s1lq_9", Ls = "_icon_1s1lq_18", zs = "_open_1s1lq_21", Us = "_content_1s1lq_25", nt = {
2095
+ accordion: Rs,
2096
+ header: Ds,
2097
+ icon: Ls,
2098
+ open: zs,
2099
+ content: Us
2100
+ }, mi = ({ title: r, content: s, defaultOpen: e = !1 }) => {
2101
+ const [n, i] = _.useState(e), [d, u] = _.useState(0), o = _.useRef(null), m = () => {
2102
+ i(!n);
2102
2103
  };
2103
2104
  return _.useEffect(() => {
2104
- o.current && h(s ? o.current.scrollHeight : 0);
2105
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: st.accordion, children: [
2105
+ o.current && u(n ? o.current.scrollHeight : 0);
2106
+ }, [n]), /* @__PURE__ */ t.jsxs("div", { className: nt.accordion, children: [
2106
2107
  /* @__PURE__ */ t.jsxs(
2107
2108
  "div",
2108
2109
  {
2109
- className: st.header,
2110
- onClick: u,
2110
+ className: nt.header,
2111
+ onClick: m,
2111
2112
  children: [
2112
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
2113
- /* @__PURE__ */ t.jsx("div", { className: G(st.icon, { [st.open]: s }), children: /* @__PURE__ */ t.jsx(g, { name: "CaretDown" }) })
2113
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
2114
+ /* @__PURE__ */ t.jsx("div", { className: W(nt.icon, { [nt.open]: n }), children: /* @__PURE__ */ t.jsx(f, { name: "CaretDown" }) })
2114
2115
  ]
2115
2116
  }
2116
2117
  ),
@@ -2118,13 +2119,13 @@ const ni = (d) => {
2118
2119
  "div",
2119
2120
  {
2120
2121
  ref: o,
2121
- className: st.content,
2122
- style: { height: `${m}px` },
2123
- children: /* @__PURE__ */ t.jsx("p", { id: "p", children: n })
2122
+ className: nt.content,
2123
+ style: { height: `${d}px` },
2124
+ children: /* @__PURE__ */ t.jsx("p", { id: "p", children: s })
2124
2125
  }
2125
2126
  )
2126
2127
  ] });
2127
- }, li = ({ children: d, path: n, className: e, target: s = "_self", id: i }) => {
2128
+ }, hi = ({ children: r, path: s, className: e, target: n = "_self", id: i }) => {
2128
2129
  if (window.location.pathname.includes("/admin/builder"))
2129
2130
  return /* @__PURE__ */ t.jsx(
2130
2131
  "div",
@@ -2133,11 +2134,11 @@ const ni = (d) => {
2133
2134
  role: "link",
2134
2135
  style: { cursor: "pointer" },
2135
2136
  id: i,
2136
- children: d
2137
+ children: r
2137
2138
  }
2138
2139
  );
2139
- const m = lt(), h = /^https?:\/\//.test(n), o = (u) => {
2140
- h || s === "_blank" ? s === "_blank" ? window.open(n, "_blank") : window.location.href = n : (u.preventDefault(), m(n, { replace: !0 }));
2140
+ const d = lt(), u = /^https?:\/\//.test(s), o = (m) => {
2141
+ u || n === "_blank" ? n === "_blank" ? window.open(s, "_blank") : window.location.href = s : (m.preventDefault(), d(s, { replace: !0 }));
2141
2142
  };
2142
2143
  return /* @__PURE__ */ t.jsx(
2143
2144
  "div",
@@ -2147,13 +2148,13 @@ const ni = (d) => {
2147
2148
  role: "link",
2148
2149
  style: { cursor: "pointer" },
2149
2150
  id: i,
2150
- children: d
2151
+ children: r
2151
2152
  }
2152
2153
  );
2153
- }, Hn = "_buttonsBlock_1b2rb_1", Un = "_slideUp_1b2rb_1", zn = {
2154
- buttonsBlock: Hn,
2155
- slideUp: Un
2156
- }, ri = () => /* @__PURE__ */ t.jsxs("div", { className: zn.buttonsBlock, children: [
2154
+ }, Hs = "_buttonsBlock_1b2rb_1", Fs = "_slideUp_1b2rb_1", Vs = {
2155
+ buttonsBlock: Hs,
2156
+ slideUp: Fs
2157
+ }, pi = () => /* @__PURE__ */ t.jsxs("div", { className: Vs.buttonsBlock, children: [
2157
2158
  /* @__PURE__ */ t.jsx(
2158
2159
  H,
2159
2160
  {
@@ -2165,22 +2166,61 @@ const ni = (d) => {
2165
2166
  }
2166
2167
  ),
2167
2168
  /* @__PURE__ */ t.jsx(H, { type: "Secondary", children: "Buy" })
2168
- ] }), Fn = "_wrapper_st58d_1", Vn = "_label_st58d_10", Yn = "_textarea_st58d_18", Gn = "_length_st58d_33", ct = {
2169
- wrapper: Fn,
2170
- label: Vn,
2171
- textarea: Yn,
2172
- length: Gn
2173
- }, di = (d) => {
2169
+ ] }), Ys = "_wrapper_27wzz_1", Gs = "_logo_27wzz_8", Ws = "_info_27wzz_12", dt = {
2170
+ wrapper: Ys,
2171
+ logo: Gs,
2172
+ info: Ws
2173
+ }, _i = ({ date: r }) => {
2174
+ const { general: s } = Ot();
2175
+ if (!s) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2176
+ function e(n) {
2177
+ const i = new Date(n), d = {
2178
+ month: "short",
2179
+ day: "2-digit",
2180
+ year: "numeric",
2181
+ hour: "2-digit",
2182
+ minute: "2-digit",
2183
+ hour12: !1
2184
+ };
2185
+ return i.toLocaleDateString("en-US", d);
2186
+ }
2187
+ return /* @__PURE__ */ t.jsxs("div", { className: dt.wrapper, children: [
2188
+ /* @__PURE__ */ t.jsx("div", { className: dt.logo, children: s.info.logo ? /* @__PURE__ */ t.jsx(
2189
+ "img",
2190
+ {
2191
+ src: `https://imagedelivery.net/${s.info.logo.cfId}/w=500,h=500`,
2192
+ alt: "image",
2193
+ style: { objectFit: "contain", width: "48px", height: "48px" }
2194
+ }
2195
+ ) : /* @__PURE__ */ t.jsx(
2196
+ f,
2197
+ {
2198
+ name: "Image",
2199
+ width: 48,
2200
+ height: 48
2201
+ }
2202
+ ) }),
2203
+ /* @__PURE__ */ t.jsxs("div", { className: dt.info, children: [
2204
+ /* @__PURE__ */ t.jsx("h3", { id: "h4", children: s.info.name }),
2205
+ /* @__PURE__ */ t.jsx("p", { id: "p", children: e(r) })
2206
+ ] })
2207
+ ] });
2208
+ }, Js = "_wrapper_st58d_1", Xs = "_label_st58d_10", Ks = "_textarea_st58d_18", Qs = "_length_st58d_33", ct = {
2209
+ wrapper: Js,
2210
+ label: Xs,
2211
+ textarea: Ks,
2212
+ length: Qs
2213
+ }, gi = (r) => {
2174
2214
  const {
2175
- onChange: n,
2215
+ onChange: s,
2176
2216
  label: e,
2177
- value: s,
2217
+ value: n,
2178
2218
  maxLength: i,
2179
- placeholder: m = "Type something...",
2180
- type: h = "text"
2181
- } = d, [o, u] = _.useState(s.length);
2182
- function f($) {
2183
- return h === "number" ? $.replace(/[^\d\n]+/g, "") : $;
2219
+ placeholder: d = "Type something...",
2220
+ type: u = "text"
2221
+ } = r, [o, m] = _.useState(n.length);
2222
+ function g(S) {
2223
+ return u === "number" ? S.replace(/[^\d\n]+/g, "") : S;
2184
2224
  }
2185
2225
  return /* @__PURE__ */ t.jsxs("div", { className: ct.wrapper, children: [
2186
2226
  e && /* @__PURE__ */ t.jsx(
@@ -2195,12 +2235,12 @@ const ni = (d) => {
2195
2235
  "textarea",
2196
2236
  {
2197
2237
  id: e,
2198
- value: s,
2199
- onChange: ($) => {
2200
- const l = f($.target.value);
2201
- u(l.length), n(l);
2238
+ value: n,
2239
+ onChange: (S) => {
2240
+ const c = g(S.target.value);
2241
+ m(c.length), s(c);
2202
2242
  },
2203
- placeholder: m,
2243
+ placeholder: d,
2204
2244
  className: ct.textarea,
2205
2245
  maxLength: i
2206
2246
  }
@@ -2213,40 +2253,41 @@ const ni = (d) => {
2213
2253
  ] });
2214
2254
  };
2215
2255
  export {
2216
- ci as Accordion,
2217
- Nn as BurgerMenuButton,
2256
+ mi as Accordion,
2257
+ Is as BurgerMenuButton,
2218
2258
  H as Button,
2219
- ms as ButtonTypeSettings,
2220
- ei as ButtonsSettings,
2221
- Kn as CategorySettings,
2222
- wt as ChooseImage,
2223
- hi as ChooseImageModal,
2224
- vn as EmptyCart,
2225
- ti as FormSettings,
2226
- ii as HeaderButtons,
2227
- g as Icon,
2228
- dt as InputSettings,
2229
- Mt as InputUI,
2230
- pi as ItemsSettings,
2231
- Qn as LayoutSettings,
2232
- li as Link,
2233
- si as ListingSelector,
2234
- _i as Loader,
2235
- vt as Modal,
2236
- oi as PagesMobileMenu,
2237
- yn as PagesMobileModal,
2238
- Zn as PagesSettings,
2239
- ri as ProductCardButtons,
2240
- ni as ProductOptions,
2241
- yt as RangeSelector,
2259
+ _n as ButtonTypeSettings,
2260
+ ai as ButtonsSettings,
2261
+ si as CategorySettings,
2262
+ $t as ChooseImage,
2263
+ ji as ChooseImageModal,
2264
+ Ns as EmptyCart,
2265
+ oi as FormSettings,
2266
+ ri as HeaderButtons,
2267
+ f as Icon,
2268
+ ut as InputSettings,
2269
+ Tt as InputUI,
2270
+ bi as ItemsSettings,
2271
+ ni as LayoutSettings,
2272
+ hi as Link,
2273
+ ci as ListingSelector,
2274
+ vi as Loader,
2275
+ _i as MetaInfoPost,
2276
+ yt as Modal,
2277
+ di as PagesMobileMenu,
2278
+ ks as PagesMobileModal,
2279
+ ii as PagesSettings,
2280
+ pi as ProductCardButtons,
2281
+ li as ProductOptions,
2282
+ Nt as RangeSelector,
2242
2283
  at as Select,
2243
- ai as ShareLink,
2244
- bn as ShoppingButton,
2245
- jn as ShoppingModalCart,
2284
+ ui as ShareLink,
2285
+ vs as ShoppingButton,
2286
+ ys as ShoppingModalCart,
2246
2287
  it as Switch,
2247
- gi as TextSettings,
2248
- fi as TextareaSettings,
2249
- di as TextareaUI,
2250
- xi as TypesText,
2251
- Ct as UserInfo
2288
+ yi as TextSettings,
2289
+ Ni as TextareaSettings,
2290
+ gi as TextareaUI,
2291
+ ki as TypesText,
2292
+ St as UserInfo
2252
2293
  };