@billgangcom/theme-lib 1.69.6 → 1.69.8

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,18 +1,19 @@
1
- import { j as t, I as v, c as F, b as Nt, u as ht, d as pt, P as mt, S as rt, R as kt, D as gt, e as ft, v as xt, B as lt, f as nt, a as wt, g as Pt, O as ut, h as Z, i as _t, C as jt, k as V, l as $t, m as qt, n as vt, o as Ot, p as yt, q as X, L as At, r as Ct, t as bt, w as at, s as it, x as D, y as Et, M as dt, z as Dt, A as ot, E as Rt, F as Mt, G as Lt, H as Bt, J as zt } from "./index-D0Va9_Ca.js";
2
- import { Y as Gn, V as Wn, Q as Xn, X as Qn, N as Jn, U as Kn, T as Zn, K as ti, W as ei } from "./index-D0Va9_Ca.js";
3
- import m from "react";
4
- const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23", Vt = "_alignmentContent_kh9z8_30", Yt = "_alignments_kh9z8_39", Gt = "_alignment_kh9z8_30", Wt = "_circle_kh9z8_64", Xt = "_paddings_kh9z8_71", Qt = "_padding_kh9z8_71", Jt = "_active_kh9z8_97", G = {
5
- block: Ht,
6
- title: Ut,
1
+ import { j as t, I as b, c as V, b as Ct, d as pt, e as mt, P as gt, S as lt, g as wt, D as ft, h as xt, v as _t, B as dt, i as it, a as Pt, k as Mt, O as ht, l as J, m as jt, C as vt, n as H, o as $t, p as Ot, q as bt, r as At, t as It, w as W, L as Et, x as St, y as yt, z as ot, s as at, f as tt, A as R, E as Dt, M as ut, F as Rt, G as ct, H as Lt, J as Tt, K as Ut, N as Bt, Q as zt } from "./index-RnaHlebe.js";
2
+ import { $ as Xn, Y as Qn, W as Jn, _ as Kn, V as Zn, X as ti, T as ei, U as si, Z as ni } from "./index-RnaHlebe.js";
3
+ import g from "react";
4
+ import "react-dom";
5
+ const Vt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23", Yt = "_alignmentContent_kh9z8_30", Gt = "_alignments_kh9z8_39", Wt = "_alignment_kh9z8_30", Xt = "_circle_kh9z8_64", Qt = "_paddings_kh9z8_71", Jt = "_padding_kh9z8_71", Kt = "_active_kh9z8_97", Y = {
6
+ block: Vt,
7
+ title: Ht,
7
8
  subtitle: Ft,
8
- alignmentContent: Vt,
9
- alignments: Yt,
10
- alignment: Gt,
11
- circle: Wt,
12
- paddings: Xt,
13
- padding: Qt,
14
- active: Jt
15
- }, Kt = [
9
+ alignmentContent: Yt,
10
+ alignments: Gt,
11
+ alignment: Wt,
12
+ circle: Xt,
13
+ paddings: Qt,
14
+ padding: Jt,
15
+ active: Kt
16
+ }, Zt = [
16
17
  "topLeft",
17
18
  "top",
18
19
  "topRight",
@@ -22,16 +23,16 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
22
23
  "bottomLeft",
23
24
  "bottom",
24
25
  "bottomRight"
25
- ], Zt = ["left", "top", "right", "bottom"], Bn = (r) => {
26
+ ], te = ["left", "top", "right", "bottom"], qn = (d) => {
26
27
  const {
27
28
  alignment: i,
28
29
  padding: a,
29
30
  setPadding: s,
30
31
  setAlignment: e,
31
- isAlignment: c = !0,
32
- isPadding: d = !0
33
- } = r;
34
- function u(o) {
32
+ isAlignment: l = !0,
33
+ isPadding: r = !0
34
+ } = d;
35
+ function h(o) {
35
36
  switch (o) {
36
37
  case "left":
37
38
  case "topLeft":
@@ -49,7 +50,7 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
49
50
  return "TextAlignCenter";
50
51
  }
51
52
  }
52
- function g(o) {
53
+ function f(o) {
53
54
  switch (o) {
54
55
  case "left":
55
56
  return "AlignLeft";
@@ -61,40 +62,40 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
61
62
  return "AlignBottom";
62
63
  }
63
64
  }
64
- const [f, P] = m.useState(null), [j, n] = m.useState(null);
65
- return /* @__PURE__ */ t.jsxs("div", { className: G.layout, children: [
66
- /* @__PURE__ */ t.jsx("h3", { className: G.title, children: "Layout (for Desktop version)" }),
67
- /* @__PURE__ */ t.jsxs("div", { className: G.alignmentContent, children: [
68
- c && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
69
- /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Alignment" }),
70
- /* @__PURE__ */ t.jsx("div", { className: G.alignments, children: Kt.map((o) => /* @__PURE__ */ t.jsxs(
65
+ const [v, M] = g.useState(null), [x, c] = g.useState(null);
66
+ return /* @__PURE__ */ t.jsxs("div", { className: Y.layout, children: [
67
+ /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: "Layout (for Desktop version)" }),
68
+ /* @__PURE__ */ t.jsxs("div", { className: Y.alignmentContent, children: [
69
+ l && /* @__PURE__ */ t.jsxs("div", { className: Y.block, children: [
70
+ /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Alignment" }),
71
+ /* @__PURE__ */ t.jsx("div", { className: Y.alignments, children: Zt.map((o) => /* @__PURE__ */ t.jsxs(
71
72
  "div",
72
73
  {
73
74
  onClick: () => {
74
75
  e(o);
75
76
  },
76
- className: G.alignment,
77
+ className: Y.alignment,
77
78
  onMouseEnter: () => {
78
- P(o);
79
+ M(o);
79
80
  },
80
81
  onMouseLeave: () => {
81
- P(null);
82
+ M(null);
82
83
  },
83
84
  children: [
84
- o !== i && f !== o && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
85
- o !== i && f === o && /* @__PURE__ */ t.jsx(
86
- v,
85
+ o !== i && v !== o && /* @__PURE__ */ t.jsx("div", { className: Y.circle }),
86
+ o !== i && v === o && /* @__PURE__ */ t.jsx(
87
+ b,
87
88
  {
88
- name: u(f),
89
+ name: h(v),
89
90
  fill: "#c2c2c2",
90
91
  width: 22,
91
92
  height: 22
92
93
  }
93
94
  ),
94
95
  o === i && /* @__PURE__ */ t.jsx(
95
- v,
96
+ b,
96
97
  {
97
- name: u(i),
98
+ name: h(i),
98
99
  fill: "#FF3F19",
99
100
  width: 22,
100
101
  height: 22
@@ -105,37 +106,37 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
105
106
  o
106
107
  )) })
107
108
  ] }),
108
- d && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
109
- /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Paddings" }),
110
- /* @__PURE__ */ t.jsx("div", { className: G.paddings, children: Zt.map((o) => /* @__PURE__ */ t.jsxs(
109
+ r && /* @__PURE__ */ t.jsxs("div", { className: Y.block, children: [
110
+ /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Paddings" }),
111
+ /* @__PURE__ */ t.jsx("div", { className: Y.paddings, children: te.map((o) => /* @__PURE__ */ t.jsxs(
111
112
  "label",
112
113
  {
113
- className: F(G.padding, {
114
- [G.active]: j === o
114
+ className: V(Y.padding, {
115
+ [Y.active]: x === o
115
116
  }),
116
117
  onFocus: () => {
117
- n(o);
118
+ c(o);
118
119
  },
119
120
  onBlur: () => {
120
- n(null);
121
+ c(null);
121
122
  },
122
123
  children: [
123
124
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
124
- v,
125
+ b,
125
126
  {
126
- name: g(o),
127
+ name: f(o),
127
128
  width: 20,
128
129
  height: 20
129
130
  }
130
131
  ) }),
131
132
  /* @__PURE__ */ t.jsx(
132
- Nt,
133
+ Ct,
133
134
  {
134
135
  type: "number",
135
136
  value: String(a[o]),
136
- onChange: (p) => s({
137
+ onChange: (n) => s({
137
138
  ...a,
138
- [o]: Math.min(Number(p), 999)
139
+ [o]: Math.min(Number(n), 999)
139
140
  }),
140
141
  max: 999,
141
142
  paddingless: !0,
@@ -149,94 +150,94 @@ const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23",
149
150
  ] })
150
151
  ] })
151
152
  ] });
152
- }, te = "_title_82zux_1", ee = "_subtitle_82zux_5", se = "_productsBlock_82zux_14", ne = "_top_82zux_26", ie = "_products_82zux_14", ae = "_product_82zux_14", oe = "_button_82zux_80", ce = "_disabled_82zux_91", re = "_buttons_82zux_118", le = "_addButton_82zux_157", de = "_deleteButton_82zux_179", Q = {
153
- title: te,
154
- subtitle: ee,
155
- productsBlock: se,
156
- top: ne,
157
- products: ie,
158
- product: ae,
159
- button: oe,
160
- disabled: ce,
161
- buttons: re,
162
- addButton: le,
163
- deleteButton: de
153
+ }, ee = "_title_82zux_1", se = "_subtitle_82zux_5", ne = "_productsBlock_82zux_14", ie = "_top_82zux_26", ae = "_products_82zux_14", oe = "_product_82zux_14", ce = "_button_82zux_80", re = "_disabled_82zux_91", le = "_buttons_82zux_118", de = "_addButton_82zux_157", ue = "_deleteButton_82zux_179", X = {
154
+ title: ee,
155
+ subtitle: se,
156
+ productsBlock: ne,
157
+ top: ie,
158
+ products: ae,
159
+ product: oe,
160
+ button: ce,
161
+ disabled: re,
162
+ buttons: le,
163
+ addButton: de,
164
+ deleteButton: ue
164
165
  };
165
- function ue({ id: r, children: i }) {
166
+ function he({ id: d, children: i }) {
166
167
  const {
167
168
  attributes: a,
168
169
  listeners: s,
169
170
  setNodeRef: e,
170
- transform: c,
171
- transition: d,
172
- isDragging: u
173
- } = _t({
174
- id: r
175
- }), g = {
176
- transform: jt.Transform.toString(c),
177
- transition: d
171
+ transform: l,
172
+ transition: r,
173
+ isDragging: h
174
+ } = jt({
175
+ id: d
176
+ }), f = {
177
+ transform: vt.Transform.toString(l),
178
+ transition: r
178
179
  };
179
180
  return /* @__PURE__ */ t.jsx(
180
181
  "div",
181
182
  {
182
183
  ref: e,
183
- style: g,
184
- className: `${Q.product} ${u ? Q.dragging : ""}`,
184
+ style: f,
185
+ className: `${X.product} ${h ? X.dragging : ""}`,
185
186
  ...a,
186
187
  ...s,
187
188
  children: i
188
189
  }
189
190
  );
190
191
  }
191
- const Tn = (r) => {
192
+ const $n = (d) => {
192
193
  const {
193
194
  isActiveItems: i,
194
195
  setIsActiveItems: a,
195
196
  items: s,
196
197
  setItems: e,
197
- other: c,
198
- tags: d,
199
- title: u,
200
- subtitle: g,
201
- draggable: f = !1,
202
- withImage: P = !1,
203
- addable: j = !0,
204
- itemsOptions: n,
198
+ other: l,
199
+ tags: r,
200
+ title: h,
201
+ subtitle: f,
202
+ draggable: v = !1,
203
+ withImage: M = !1,
204
+ addable: x = !0,
205
+ itemsOptions: c,
205
206
  hasRangeSelector: o = !1,
206
- rangeSelectorOptions: p,
207
+ rangeSelectorOptions: n,
207
208
  limit: q,
208
- autoScrollInterval: x,
209
- deletable: _,
210
- aspectRatio: y,
211
- setAspectRatio: M
212
- } = r, z = ht(
213
- pt(mt, {
209
+ autoScrollInterval: _,
210
+ deletable: j,
211
+ aspectRatio: N,
212
+ setAspectRatio: k
213
+ } = d, D = pt(
214
+ mt(gt, {
214
215
  activationConstraint: {
215
216
  distance: 5
216
217
  }
217
218
  })
218
- ), R = (h) => {
219
- const { active: S, over: k } = h;
220
- if (k && S.id !== k.id) {
221
- const N = s.findIndex((O) => O === S.id), B = s.findIndex((O) => O === k.id);
222
- if (N !== -1 && B !== -1) {
223
- const O = [...s], [b] = O.splice(N, 1);
224
- O.splice(B, 0, b), e(O);
219
+ ), L = (p) => {
220
+ const { active: C, over: w } = p;
221
+ if (w && C.id !== w.id) {
222
+ const $ = s.findIndex((O) => O === C.id), I = s.findIndex((O) => O === w.id);
223
+ if ($ !== -1 && I !== -1) {
224
+ const O = [...s], [y] = O.splice($, 1);
225
+ O.splice(I, 0, y), e(O);
225
226
  }
226
227
  }
227
228
  };
228
- function I(h) {
229
- if (P)
230
- return h ? /* @__PURE__ */ t.jsx(
229
+ function K(p) {
230
+ if (M)
231
+ return p ? /* @__PURE__ */ t.jsx(
231
232
  "img",
232
233
  {
233
- src: `https://imagedelivery.net/${h[0]}/w=1000`,
234
+ src: `https://imagedelivery.net/${p[0]}/w=1000`,
234
235
  alt: "image",
235
236
  width: 16,
236
237
  height: 16
237
238
  }
238
239
  ) : /* @__PURE__ */ t.jsx(
239
- v,
240
+ b,
240
241
  {
241
242
  name: "Image",
242
243
  width: 16,
@@ -245,12 +246,12 @@ const Tn = (r) => {
245
246
  }
246
247
  );
247
248
  }
248
- const H = (h, S = !1) => {
249
- const k = n.find((B) => B.id === h);
250
- if (!k) return;
251
- const N = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
252
- f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
253
- v,
249
+ const m = (p, C = !1) => {
250
+ const w = c.find((I) => I.id === p);
251
+ if (!w) return;
252
+ const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
253
+ v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
254
+ b,
254
255
  {
255
256
  name: "DotsSixVertical",
256
257
  hoverable: !0,
@@ -259,80 +260,80 @@ const Tn = (r) => {
259
260
  }
260
261
  ) }),
261
262
  /* @__PURE__ */ t.jsx(
262
- nt,
263
+ it,
263
264
  {
264
- onChange: (B) => {
265
- const O = [...s], b = n.find((l) => l.name === B);
266
- if (!b) return;
267
- const A = b.id, U = O.map((l) => l === h ? A : l);
268
- e([...U]);
265
+ onChange: (I) => {
266
+ const O = [...s], y = c.find((u) => u.name === I);
267
+ if (!y) return;
268
+ const A = y.id, z = O.map((u) => u === p ? A : u);
269
+ e([...z]);
269
270
  },
270
- value: k.name,
271
- options: n.filter((B) => !s.find((O) => O === B.id)).map((B) => B.name),
272
- leftAddonOptions: n.map((B) => ({
273
- value: B.name,
274
- addon: I(B.images)
271
+ value: w.name,
272
+ options: c.filter((I) => !s.find((O) => O === I.id)).map((I) => I.name),
273
+ leftAddonOptions: c.map((I) => ({
274
+ value: I.name,
275
+ addon: K(I.images)
275
276
  }))
276
277
  }
277
278
  ),
278
- S && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
279
- v,
279
+ C && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
280
+ b,
280
281
  {
281
282
  name: "Trash",
282
283
  hoverable: !0,
283
284
  width: 20,
284
285
  height: 20,
285
286
  fill: "#C12A2A",
286
- onClick: () => e(s.filter((B) => B !== h))
287
+ onClick: () => e(s.filter((I) => I !== p))
287
288
  }
288
289
  ) }) })
289
290
  ] });
290
- return f ? /* @__PURE__ */ t.jsx(
291
- ue,
291
+ return v ? /* @__PURE__ */ t.jsx(
292
+ he,
292
293
  {
293
- id: h,
294
- children: N
294
+ id: p,
295
+ children: $
295
296
  },
296
- Z()
297
+ J()
297
298
  ) : /* @__PURE__ */ t.jsx(
298
299
  "div",
299
300
  {
300
- className: Q.product,
301
- children: N
301
+ className: X.product,
302
+ children: $
302
303
  },
303
- Z()
304
+ J()
304
305
  );
305
306
  };
306
- return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
307
- (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
308
- u && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: u }),
307
+ return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
308
+ (h || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
309
+ h && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: h }),
309
310
  i !== void 0 && /* @__PURE__ */ t.jsx(
310
- rt,
311
+ lt,
311
312
  {
312
313
  current: i,
313
- onChange: (h) => a == null ? void 0 : a(h)
314
+ onChange: (p) => a == null ? void 0 : a(p)
314
315
  }
315
316
  )
316
317
  ] }),
317
- o && p && /* @__PURE__ */ t.jsx(kt, { ...p }),
318
- /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
319
- g && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: g }),
320
- f ? /* @__PURE__ */ t.jsx(
321
- gt,
318
+ o && n && /* @__PURE__ */ t.jsx(wt, { ...n }),
319
+ /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
320
+ f && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: f }),
321
+ v ? /* @__PURE__ */ t.jsx(
322
+ ft,
322
323
  {
323
- sensors: z,
324
- onDragEnd: R,
324
+ sensors: D,
325
+ onDragEnd: L,
325
326
  children: /* @__PURE__ */ t.jsx(
326
- ft,
327
+ xt,
327
328
  {
328
329
  items: s,
329
- strategy: xt,
330
- children: s.map((h) => H(h, _))
330
+ strategy: _t,
331
+ children: s.map((p) => m(p, j))
331
332
  }
332
333
  )
333
334
  }
334
- ) : s.map((h) => H(h, _)),
335
- j && /* @__PURE__ */ t.jsx(
335
+ ) : s.map((p) => m(p, j)),
336
+ x && /* @__PURE__ */ t.jsx(
336
337
  "div",
337
338
  {
338
339
  style: {
@@ -342,33 +343,33 @@ const Tn = (r) => {
342
343
  gap: 5
343
344
  },
344
345
  children: /* @__PURE__ */ t.jsx(
345
- lt,
346
+ dt,
346
347
  {
347
348
  withoutHover: !0,
348
- className: F(Q.button, {
349
- [Q.disabled]: !!(q && q <= s.length || s.length === n.length)
349
+ className: V(X.button, {
350
+ [X.disabled]: !!(q && q <= s.length || s.length === c.length)
350
351
  }),
351
352
  size: "s",
352
- disabled: !!(q && q <= s.length || s.length === n.length),
353
+ disabled: !!(q && q <= s.length || s.length === c.length),
353
354
  onClick: () => {
354
- const h = [...s];
355
- let S = null;
356
- if (n) {
357
- for (let k = 0; k < n.length; k++)
358
- if (!s.find((N) => N === n[k].id)) {
359
- S = n[k];
355
+ const p = [...s];
356
+ let C = null;
357
+ if (c) {
358
+ for (let w = 0; w < c.length; w++)
359
+ if (!s.find(($) => $ === c[w].id)) {
360
+ C = c[w];
360
361
  break;
361
362
  }
362
363
  }
363
- h.push((S == null ? void 0 : S.id) || n[0].id), e(h);
364
+ p.push((C == null ? void 0 : C.id) || c[0].id), e(p);
364
365
  },
365
366
  style: {
366
367
  width: "fit-content"
367
368
  },
368
- children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
369
+ children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
369
370
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
370
371
  /* @__PURE__ */ t.jsx(
371
- v,
372
+ b,
372
373
  {
373
374
  name: "Plus",
374
375
  width: 16,
@@ -381,37 +382,37 @@ const Tn = (r) => {
381
382
  }
382
383
  )
383
384
  ] }),
384
- y && M && /* @__PURE__ */ t.jsx(
385
- nt,
385
+ N && k && /* @__PURE__ */ t.jsx(
386
+ it,
386
387
  {
387
- value: y,
388
+ value: N,
388
389
  label: "Aspect Ratio",
389
- options: Object.keys(Pt),
390
- onChange: (h) => M(h),
391
- leftAddonOptions: wt
390
+ options: Object.keys(Mt),
391
+ onChange: (p) => k(p),
392
+ leftAddonOptions: Pt
392
393
  }
393
394
  ),
394
- d !== void 0 && /* @__PURE__ */ t.jsx(
395
- ut,
395
+ r !== void 0 && /* @__PURE__ */ t.jsx(
396
+ ht,
396
397
  {
397
398
  tagsTitle: "Tags",
398
- items: d
399
+ items: r
399
400
  }
400
401
  ),
401
- c !== void 0 && /* @__PURE__ */ t.jsx(
402
- ut,
402
+ l !== void 0 && /* @__PURE__ */ t.jsx(
403
+ ht,
403
404
  {
404
405
  otherTitle: "Other",
405
- items: c
406
+ items: l
406
407
  }
407
408
  ),
408
- x !== void 0 && /* @__PURE__ */ t.jsx(
409
- Nt,
409
+ _ !== void 0 && /* @__PURE__ */ t.jsx(
410
+ Ct,
410
411
  {
411
412
  label: "Auto scroll interval",
412
413
  type: "number",
413
- value: String(x.scrollInterval),
414
- onChange: (h) => x.setScrollInterval(Number(h)),
414
+ value: String(_.scrollInterval),
415
+ onChange: (p) => _.setScrollInterval(Number(p)),
415
416
  min: 0.1,
416
417
  max: 100,
417
418
  style: {
@@ -421,96 +422,96 @@ const Tn = (r) => {
421
422
  }
422
423
  )
423
424
  ] });
424
- }, he = "_title_roi3a_1", pe = "_subtitle_roi3a_5", me = "_productsBlock_roi3a_14", ge = "_top_roi3a_26", fe = "_products_roi3a_14", xe = "_product_roi3a_14", _e = "_button_roi3a_80", je = "_disabled_roi3a_91", ve = "_buttons_roi3a_118", be = "_addButton_roi3a_164", ye = "_deleteButton_roi3a_179", Y = {
425
- title: he,
426
- subtitle: pe,
427
- productsBlock: me,
428
- top: ge,
429
- products: fe,
430
- product: xe,
431
- button: _e,
432
- disabled: je,
433
- buttons: ve,
434
- addButton: be,
435
- deleteButton: ye
425
+ }, pe = "_title_roi3a_1", me = "_subtitle_roi3a_5", ge = "_productsBlock_roi3a_14", fe = "_top_roi3a_26", xe = "_products_roi3a_14", _e = "_product_roi3a_14", je = "_button_roi3a_80", ve = "_disabled_roi3a_91", be = "_buttons_roi3a_118", ye = "_addButton_roi3a_164", Ie = "_deleteButton_roi3a_179", F = {
426
+ title: pe,
427
+ subtitle: me,
428
+ productsBlock: ge,
429
+ top: fe,
430
+ products: xe,
431
+ product: _e,
432
+ button: je,
433
+ disabled: ve,
434
+ buttons: be,
435
+ addButton: ye,
436
+ deleteButton: Ie
436
437
  };
437
- function Ie({ product: r, children: i }) {
438
+ function Ne({ product: d, children: i }) {
438
439
  const {
439
440
  attributes: a,
440
441
  listeners: s,
441
442
  setNodeRef: e,
442
- transform: c,
443
- transition: d,
444
- isDragging: u
445
- } = _t({
446
- id: r.id
447
- }), g = {
448
- transform: jt.Transform.toString(c),
449
- transition: d
443
+ transform: l,
444
+ transition: r,
445
+ isDragging: h
446
+ } = jt({
447
+ id: d.id
448
+ }), f = {
449
+ transform: vt.Transform.toString(l),
450
+ transition: r
450
451
  };
451
452
  return /* @__PURE__ */ t.jsx(
452
453
  "div",
453
454
  {
454
455
  ref: e,
455
- style: g,
456
- className: `${Y.product} ${u ? Y.dragging : ""}`,
456
+ style: f,
457
+ className: `${F.product} ${h ? F.dragging : ""}`,
457
458
  ...a,
458
459
  ...s,
459
460
  children: i
460
461
  }
461
462
  );
462
463
  }
463
- const $n = (r) => {
464
+ const On = (d) => {
464
465
  const {
465
466
  isActiveItems: i,
466
467
  setIsActiveItems: a,
467
468
  items: s,
468
469
  setItems: e,
469
- title: c,
470
- subtitle: d,
471
- editable: u = !0,
472
- draggable: g = !1,
473
- deletable: f = !0,
474
- addable: P = !0,
475
- itemsType: j,
476
- itemsOptions: n,
470
+ title: l,
471
+ subtitle: r,
472
+ editable: h = !0,
473
+ draggable: f = !1,
474
+ deletable: v = !0,
475
+ addable: M = !0,
476
+ itemsType: x,
477
+ itemsOptions: c,
477
478
  addableOptions: o = {},
478
- limit: p
479
- } = r, [q, x] = m.useState(null), [_, y] = m.useState(null), M = m.useRef(null), z = ht(
480
- pt(mt, {
479
+ limit: n
480
+ } = d, [q, _] = g.useState(null), [j, N] = g.useState(null), k = g.useRef(null), D = pt(
481
+ mt(gt, {
481
482
  activationConstraint: {
482
483
  distance: 5
483
484
  }
484
485
  })
485
486
  );
486
- m.useEffect(() => {
487
+ g.useEffect(() => {
487
488
  if (q) {
488
- const h = [...s].map((S) => S.id === q.id ? q : S);
489
- e(h);
489
+ const p = [...s].map((C) => C.id === q.id ? q : C);
490
+ e(p);
490
491
  }
491
- }, [q]), m.useEffect(() => {
492
- M.current && _ && (M.current.getBoundingClientRect().height, _.top);
493
- }, [M.current, _]);
494
- const R = (h, S) => {
495
- h.stopPropagation();
496
- const k = h.target.getBoundingClientRect();
497
- y({
498
- top: k.top + window.scrollY,
499
- left: k.left - 30
500
- }), x(S);
501
- }, I = (h) => {
502
- const { active: S, over: k } = h;
503
- if (k && S.id !== k.id) {
504
- const N = s.findIndex((O) => O.id === S.id), B = s.findIndex((O) => O.id === k.id);
505
- if (N !== -1 && B !== -1) {
506
- const O = [...s], [b] = O.splice(N, 1);
507
- O.splice(B, 0, b), e(O);
492
+ }, [q]), g.useEffect(() => {
493
+ k.current && j && (k.current.getBoundingClientRect().height, j.top);
494
+ }, [k.current, j]);
495
+ const L = (p, C) => {
496
+ p.stopPropagation();
497
+ const w = p.target.getBoundingClientRect();
498
+ N({
499
+ top: w.top + window.scrollY,
500
+ left: w.left - 30
501
+ }), _(C);
502
+ }, K = (p) => {
503
+ const { active: C, over: w } = p;
504
+ if (w && C.id !== w.id) {
505
+ const $ = s.findIndex((O) => O.id === C.id), I = s.findIndex((O) => O.id === w.id);
506
+ if ($ !== -1 && I !== -1) {
507
+ const O = [...s], [y] = O.splice($, 1);
508
+ O.splice(I, 0, y), e(O);
508
509
  }
509
510
  }
510
- }, H = (h, S) => {
511
- const k = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
512
- g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
513
- v,
511
+ }, m = (p, C) => {
512
+ const w = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
513
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
514
+ b,
514
515
  {
515
516
  name: "DotsSixVertical",
516
517
  hoverable: !0,
@@ -518,99 +519,99 @@ const $n = (r) => {
518
519
  height: 20
519
520
  }
520
521
  ) }),
521
- j === "select" && n && /* @__PURE__ */ t.jsx(
522
- nt,
522
+ x === "select" && c && /* @__PURE__ */ t.jsx(
523
+ it,
523
524
  {
524
- onChange: (N) => {
525
- const B = [...s], O = n.find((A) => A.name === N);
525
+ onChange: ($) => {
526
+ const I = [...s], O = c.find((A) => A.name === $);
526
527
  if (!O) return;
527
- const b = B.map((A) => A.id === h.id ? {
528
+ const y = I.map((A) => A.id === p.id ? {
528
529
  ...O,
529
530
  name: {
530
- "en-US": N
531
+ "en-US": $
531
532
  }
532
533
  } : A);
533
- x({
534
- ...h,
534
+ _({
535
+ ...p,
535
536
  name: {
536
- "en-US": N
537
+ "en-US": $
537
538
  }
538
- }), e([...b]);
539
+ }), e([...y]);
539
540
  },
540
- value: h.name,
541
- options: n.filter((N) => !s.find((B) => B.name === N.name)).map((N) => N.name)
541
+ value: p.name,
542
+ options: c.filter(($) => !s.find((I) => I.name === $.name)).map(($) => $.name)
542
543
  }
543
544
  ),
544
- /* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
545
- u && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
546
- v,
545
+ /* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
546
+ h && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
547
+ b,
547
548
  {
548
549
  name: "Sliders",
549
550
  hoverable: !0,
550
551
  width: 20,
551
552
  height: 20,
552
- onClick: (N) => R(N, h)
553
+ onClick: ($) => L($, p)
553
554
  }
554
555
  ) }),
555
- f && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
556
- v,
556
+ v && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
557
+ b,
557
558
  {
558
559
  name: "Trash",
559
560
  hoverable: !0,
560
561
  width: 20,
561
562
  height: 20,
562
563
  fill: "#C12A2A",
563
- onClick: () => e(s.filter((N) => N.id !== h.id))
564
+ onClick: () => e(s.filter(($) => $.id !== p.id))
564
565
  }
565
566
  ) })
566
567
  ] })
567
568
  ] });
568
- return g ? /* @__PURE__ */ t.jsx(
569
- Ie,
569
+ return f ? /* @__PURE__ */ t.jsx(
570
+ Ne,
570
571
  {
571
- product: h,
572
- index: S,
573
- children: k
572
+ product: p,
573
+ index: C,
574
+ children: w
574
575
  },
575
- h.id
576
+ p.id
576
577
  ) : /* @__PURE__ */ t.jsx(
577
578
  "div",
578
579
  {
579
- className: Y.product,
580
- children: k
580
+ className: F.product,
581
+ children: w
581
582
  },
582
- h.id
583
+ p.id
583
584
  );
584
585
  };
585
- return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
586
- (c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
587
- c && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: c }),
586
+ return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
587
+ (l || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
588
+ l && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: l }),
588
589
  i !== void 0 && /* @__PURE__ */ t.jsx(
589
- rt,
590
+ lt,
590
591
  {
591
592
  current: i,
592
- onChange: (h) => a == null ? void 0 : a(h)
593
+ onChange: (p) => a == null ? void 0 : a(p)
593
594
  }
594
595
  )
595
596
  ] }),
596
- /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
597
- d && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: d }),
598
- g ? /* @__PURE__ */ t.jsx(
599
- gt,
597
+ /* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
598
+ r && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: r }),
599
+ f ? /* @__PURE__ */ t.jsx(
600
+ ft,
600
601
  {
601
- sensors: z,
602
- onDragEnd: I,
602
+ sensors: D,
603
+ onDragEnd: K,
603
604
  children: /* @__PURE__ */ t.jsx(
604
- ft,
605
+ xt,
605
606
  {
606
- items: s.map((h) => h.id),
607
- strategy: xt,
608
- children: s.map((h, S) => H(h, S))
607
+ items: s.map((p) => p.id),
608
+ strategy: _t,
609
+ children: s.map((p, C) => m(p, C))
609
610
  }
610
611
  )
611
612
  }
612
- ) : s.map((h, S) => H(h, S)),
613
- P && /* @__PURE__ */ t.jsx(
613
+ ) : s.map((p, C) => m(p, C)),
614
+ M && /* @__PURE__ */ t.jsx(
614
615
  "div",
615
616
  {
616
617
  style: {
@@ -619,37 +620,37 @@ const $n = (r) => {
619
620
  justifyContent: "center"
620
621
  },
621
622
  children: /* @__PURE__ */ t.jsx(
622
- lt,
623
+ dt,
623
624
  {
624
625
  withoutHover: !0,
625
- className: F(Y.button, {
626
- [Y.disabled]: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length))
626
+ className: V(F.button, {
627
+ [F.disabled]: !!(n && n <= s.length || s.length === (c == null ? void 0 : c.length))
627
628
  }),
628
629
  size: "s",
629
- disabled: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length)),
630
+ disabled: !!(n && n <= s.length || s.length === (c == null ? void 0 : c.length)),
630
631
  onClick: () => {
631
- const h = [...s];
632
- let S = null;
633
- if (n) {
634
- for (let k = 0; k < n.length; k++)
635
- if (!s.find((N) => N.id === n[k].id)) {
636
- S = n[k];
632
+ const p = [...s];
633
+ let C = null;
634
+ if (c) {
635
+ for (let w = 0; w < c.length; w++)
636
+ if (!s.find(($) => $.id === c[w].id)) {
637
+ C = c[w];
637
638
  break;
638
639
  }
639
640
  }
640
- j === "select" && n && h.push({
641
- name: S ? S.name : n[0].name,
642
- id: (S == null ? void 0 : S.id) || n[0].id,
641
+ x === "select" && c && p.push({
642
+ name: C ? C.name : c[0].name,
643
+ id: (C == null ? void 0 : C.id) || c[0].id,
643
644
  ...o
644
- }), e(h);
645
+ }), e(p);
645
646
  },
646
647
  style: {
647
648
  width: "fit-content"
648
649
  },
649
- children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
650
+ children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
650
651
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
651
652
  /* @__PURE__ */ t.jsx(
652
- v,
653
+ b,
653
654
  {
654
655
  name: "Plus",
655
656
  width: 16,
@@ -664,99 +665,99 @@ const $n = (r) => {
664
665
  ] })
665
666
  ] });
666
667
  };
667
- function Ne(r) {
668
- const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
668
+ function Ce(d) {
669
+ const { product: i, children: a } = d, { attributes: s, listeners: e, setNodeRef: l, transform: r, transition: h, isDragging: f } = jt({
669
670
  id: i.id
670
- }), f = {
671
- transform: jt.Transform.toString(d),
672
- transition: u
671
+ }), v = {
672
+ transform: vt.Transform.toString(r),
673
+ transition: h
673
674
  };
674
675
  return /* @__PURE__ */ t.jsx(
675
676
  "div",
676
677
  {
677
- ref: c,
678
- style: f,
679
- className: `${V.product} ${g ? V.dragging : ""}`,
678
+ ref: l,
679
+ style: v,
680
+ className: `${H.product} ${f ? H.dragging : ""}`,
680
681
  ...s,
681
682
  ...e,
682
683
  children: a
683
684
  }
684
685
  );
685
686
  }
686
- const qn = (r) => {
687
+ const An = (d) => {
687
688
  const {
688
689
  isActiveItems: i,
689
690
  setIsActiveItems: a,
690
691
  items: s,
691
692
  setItems: e,
692
- other: c,
693
- title: d,
694
- subtitle: u,
695
- editable: g = !0,
696
- draggable: f = !1,
697
- deletable: P = !0,
698
- addable: j = !0,
699
- itemsType: n,
693
+ other: l,
694
+ title: r,
695
+ subtitle: h,
696
+ editable: f = !0,
697
+ draggable: v = !1,
698
+ deletable: M = !0,
699
+ addable: x = !0,
700
+ itemsType: c,
700
701
  itemsPlaceholder: o = "",
701
- itemsOptions: p,
702
+ itemsOptions: n,
702
703
  hasRangeSelector: q = !1,
703
- rangeSelectorOptions: x,
704
- modalOptions: _,
705
- addableOptions: y = {},
706
- limit: M
707
- } = r, [z, R] = m.useState(null), [I, H] = m.useState({
704
+ rangeSelectorOptions: _,
705
+ modalOptions: j,
706
+ addableOptions: N = {},
707
+ limit: k
708
+ } = d, [D, L] = g.useState(null), [K, m] = g.useState({
708
709
  top: 0,
709
710
  left: 0
710
- }), [h, S] = m.useState(null), k = m.useRef(null), [N, B] = m.useState(!1), O = ht(
711
- pt(mt, {
711
+ }), [p, C] = g.useState(null), w = g.useRef(null), [$, I] = g.useState(!1), O = pt(
712
+ mt(gt, {
712
713
  activationConstraint: {
713
714
  distance: 5
714
715
  }
715
716
  })
716
717
  );
717
- m.useEffect(() => {
718
- const l = () => {
719
- R(null), B(!1);
718
+ g.useEffect(() => {
719
+ const u = () => {
720
+ L(null), I(!1);
720
721
  };
721
- return document.body.addEventListener("click", l), R(null), B(!1), () => {
722
- R(null), B(!1), document.body.removeEventListener("click", l);
722
+ return document.body.addEventListener("click", u), L(null), I(!1), () => {
723
+ L(null), I(!1), document.body.removeEventListener("click", u);
723
724
  };
724
- }, []), m.useEffect(() => {
725
- if (z) {
726
- const l = [...s].map(($) => $.id === z.id ? z : $);
727
- e(l);
725
+ }, []), g.useEffect(() => {
726
+ if (D) {
727
+ const u = [...s].map((B) => B.id === D.id ? D : B);
728
+ e(u);
728
729
  }
729
- }, [z]), m.useEffect(() => {
730
- if (k.current && h) {
731
- const l = k.current.getBoundingClientRect().height, $ = window.innerHeight;
732
- let C = h.top;
733
- C + l > $ + window.scrollY - 200 && (C = $ + window.scrollY - l - 200), C < 0 && (C = 10), H({
734
- top: C,
735
- left: h.left
730
+ }, [D]), g.useEffect(() => {
731
+ if (w.current && p) {
732
+ const u = w.current.getBoundingClientRect().height, B = window.innerHeight;
733
+ let S = p.top;
734
+ S + u > B + window.scrollY - 200 && (S = B + window.scrollY - u - 200), S < 0 && (S = 10), m({
735
+ top: S,
736
+ left: p.left
736
737
  });
737
738
  }
738
- }, [k.current, h]);
739
- const b = (l, $) => {
740
- l.stopPropagation();
741
- const C = l.target.getBoundingClientRect();
742
- S({
743
- top: C.top + window.scrollY,
744
- left: C.left - 30
745
- }), R($), B(!0);
746
- }, A = (l) => {
747
- const { active: $, over: C } = l;
748
- if (C && $.id !== C.id) {
749
- const E = s.findIndex((L) => L.id === $.id), tt = s.findIndex((L) => L.id === C.id);
750
- if (E !== -1 && tt !== -1) {
751
- const L = [...s], [K] = L.splice(E, 1);
752
- L.splice(tt, 0, K), e(L);
739
+ }, [w.current, p]);
740
+ const y = (u, B) => {
741
+ u.stopPropagation();
742
+ const S = u.target.getBoundingClientRect();
743
+ C({
744
+ top: S.top + window.scrollY,
745
+ left: S.left - 30
746
+ }), L(B), I(!0);
747
+ }, A = (u) => {
748
+ const { active: B, over: S } = u;
749
+ if (S && B.id !== S.id) {
750
+ const E = s.findIndex((U) => U.id === B.id), et = s.findIndex((U) => U.id === S.id);
751
+ if (E !== -1 && et !== -1) {
752
+ const U = [...s], [Z] = U.splice(E, 1);
753
+ U.splice(et, 0, Z), e(U);
753
754
  }
754
755
  }
755
- }, U = (l) => {
756
- var C;
757
- const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
758
- f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
759
- v,
756
+ }, z = (u) => {
757
+ var S;
758
+ const B = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
759
+ v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
760
+ b,
760
761
  {
761
762
  name: "DotsSixVertical",
762
763
  hoverable: !0,
@@ -764,139 +765,139 @@ const qn = (r) => {
764
765
  height: 20
765
766
  }
766
767
  ) }),
767
- n === "select" && p && /* @__PURE__ */ t.jsx(
768
- nt,
768
+ c === "select" && n && /* @__PURE__ */ t.jsx(
769
+ it,
769
770
  {
770
771
  onChange: (E) => {
771
- const L = [...s].map((K) => K.id === l.id ? {
772
- ...l,
772
+ const U = [...s].map((Z) => Z.id === u.id ? {
773
+ ...u,
773
774
  name: {
774
775
  "en-US": E
775
776
  }
776
- } : K);
777
- R({
778
- ...l,
777
+ } : Z);
778
+ L({
779
+ ...u,
779
780
  name: {
780
781
  "en-US": E
781
782
  }
782
- }), e([...L]);
783
+ }), e([...U]);
783
784
  },
784
- value: l.name["en-US"],
785
- options: p.filter(
786
- (E) => !s.find((tt) => tt.name["en-US"] === E)
785
+ value: u.name["en-US"],
786
+ options: n.filter(
787
+ (E) => !s.find((et) => et.name["en-US"] === E)
787
788
  )
788
789
  }
789
790
  ),
790
- n === "input" && /* @__PURE__ */ t.jsx(
791
- Nt,
791
+ c === "input" && /* @__PURE__ */ t.jsx(
792
+ Ct,
792
793
  {
793
794
  onChange: (E) => {
794
- const L = [...s].map((K) => K.id === l.id ? {
795
- ...l,
795
+ const U = [...s].map((Z) => Z.id === u.id ? {
796
+ ...u,
796
797
  name: {
797
798
  "en-US": E
798
799
  }
799
- } : K);
800
- e([...L]);
800
+ } : Z);
801
+ e([...U]);
801
802
  },
802
- value: l.name["en-US"],
803
+ value: u.name["en-US"],
803
804
  placeholder: o
804
805
  }
805
806
  ),
806
- n === "image" && /* @__PURE__ */ t.jsx(
807
- qt,
807
+ c === "image" && /* @__PURE__ */ t.jsx(
808
+ Ot,
808
809
  {
809
810
  onChange: (E) => {
810
- const L = [...s].map((K) => K.id === l.id ? {
811
- ...l,
811
+ const U = [...s].map((Z) => Z.id === u.id ? {
812
+ ...u,
812
813
  images: E
813
- } : K);
814
- e([...L]);
814
+ } : Z);
815
+ e([...U]);
815
816
  },
816
- activeImage: (C = s.find((E) => E.id === l.id)) == null ? void 0 : C.images[0]
817
+ activeImage: (S = s.find((E) => E.id === u.id)) == null ? void 0 : S.images[0]
817
818
  }
818
819
  ),
819
- /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
820
- g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
821
- v,
820
+ /* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
821
+ f && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
822
+ b,
822
823
  {
823
824
  name: "Sliders",
824
825
  hoverable: !0,
825
826
  width: 20,
826
827
  height: 20,
827
- onClick: (E) => b(E, l)
828
+ onClick: (E) => y(E, u)
828
829
  }
829
830
  ) }),
830
- P && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
831
- v,
831
+ M && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
832
+ b,
832
833
  {
833
834
  name: "Trash",
834
835
  hoverable: !0,
835
836
  width: 20,
836
837
  height: 20,
837
838
  fill: "#C12A2A",
838
- onClick: () => e(s.filter((E) => E.id !== l.id))
839
+ onClick: () => e(s.filter((E) => E.id !== u.id))
839
840
  }
840
841
  ) })
841
842
  ] })
842
843
  ] });
843
- return f ? /* @__PURE__ */ t.jsx(
844
- Ne,
844
+ return v ? /* @__PURE__ */ t.jsx(
845
+ Ce,
845
846
  {
846
- product: l,
847
- children: $
847
+ product: u,
848
+ children: B
848
849
  },
849
- l.id
850
+ u.id
850
851
  ) : /* @__PURE__ */ t.jsx(
851
852
  "div",
852
853
  {
853
- className: V.product,
854
- children: $
854
+ className: H.product,
855
+ children: B
855
856
  },
856
- l.id
857
+ u.id
857
858
  );
858
859
  };
859
- return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
860
- (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
861
- d && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: d }),
860
+ return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
861
+ (r || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
862
+ r && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: r }),
862
863
  i !== void 0 && /* @__PURE__ */ t.jsx(
863
- rt,
864
+ lt,
864
865
  {
865
866
  current: i,
866
- onChange: (l) => a == null ? void 0 : a(l)
867
+ onChange: (u) => a == null ? void 0 : a(u)
867
868
  }
868
869
  )
869
870
  ] }),
870
- z && g && _ && N && /* @__PURE__ */ t.jsx(
871
+ D && f && j && $ && /* @__PURE__ */ t.jsx(
871
872
  $t,
872
873
  {
873
- ref: k,
874
- activeItem: z,
875
- setActiveItem: R,
876
- popupPosition: I,
877
- modalOptions: _,
878
- setIsOpenModal: B
874
+ ref: w,
875
+ activeItem: D,
876
+ setActiveItem: L,
877
+ popupPosition: K,
878
+ modalOptions: j,
879
+ setIsOpenModal: I
879
880
  }
880
881
  ),
881
- q && x && /* @__PURE__ */ t.jsx(kt, { ...x }),
882
- /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
883
- u && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: u }),
884
- f ? /* @__PURE__ */ t.jsx(
885
- gt,
882
+ q && _ && /* @__PURE__ */ t.jsx(wt, { ..._ }),
883
+ /* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
884
+ h && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: h }),
885
+ v ? /* @__PURE__ */ t.jsx(
886
+ ft,
886
887
  {
887
888
  sensors: O,
888
889
  onDragEnd: A,
889
890
  children: /* @__PURE__ */ t.jsx(
890
- ft,
891
+ xt,
891
892
  {
892
- items: s.map((l) => l.id),
893
- strategy: xt,
894
- children: s.map((l) => U(l))
893
+ items: s.map((u) => u.id),
894
+ strategy: _t,
895
+ children: s.map((u) => z(u))
895
896
  }
896
897
  )
897
898
  }
898
- ) : s.map((l) => U(l)),
899
- j && /* @__PURE__ */ t.jsx(
899
+ ) : s.map((u) => z(u)),
900
+ x && /* @__PURE__ */ t.jsx(
900
901
  "div",
901
902
  {
902
903
  style: {
@@ -905,55 +906,55 @@ const qn = (r) => {
905
906
  justifyContent: "center"
906
907
  },
907
908
  children: /* @__PURE__ */ t.jsx(
908
- lt,
909
+ dt,
909
910
  {
910
911
  withoutHover: !0,
911
- className: F(V.button, {
912
- [V.disabled]: !!(M && M <= s.length)
912
+ className: V(H.button, {
913
+ [H.disabled]: !!(k && k <= s.length)
913
914
  }),
914
915
  size: "s",
915
- disabled: !!(M && M <= s.length),
916
+ disabled: !!(k && k <= s.length),
916
917
  onClick: () => {
917
- const l = [...s];
918
- let $ = null;
919
- if (p) {
920
- for (let C = 0; C < p.length; C++)
921
- if (!s.find((E) => E.name["en-US"] === p[C])) {
922
- $ = p[C];
918
+ const u = [...s];
919
+ let B = null;
920
+ if (n) {
921
+ for (let S = 0; S < n.length; S++)
922
+ if (!s.find((E) => E.name["en-US"] === n[S])) {
923
+ B = n[S];
923
924
  break;
924
925
  }
925
926
  }
926
- n === "select" && p ? l.push({
927
+ c === "select" && n ? u.push({
927
928
  name: {
928
- "en-US": $ || p[0]
929
+ "en-US": B || n[0]
929
930
  },
930
- id: Z(),
931
- ...y,
931
+ id: J(),
932
+ ...N,
932
933
  maxSymbols: 100
933
934
  // пример значения
934
- }) : n === "input" ? l.push({
935
+ }) : c === "input" ? u.push({
935
936
  name: {
936
937
  "en-US": ""
937
938
  },
938
- id: Z(),
939
- ...y,
939
+ id: J(),
940
+ ...N,
940
941
  maxSymbols: 100
941
- }) : l.push({
942
+ }) : u.push({
942
943
  name: {
943
944
  "en-US": `Image ${s.length + 1}`
944
945
  },
945
- id: Z(),
946
- ...y,
946
+ id: J(),
947
+ ...N,
947
948
  maxSymbols: 100
948
- }), e(l);
949
+ }), e(u);
949
950
  },
950
951
  style: {
951
952
  width: "fit-content"
952
953
  },
953
- children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
954
+ children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
954
955
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
955
956
  /* @__PURE__ */ t.jsx(
956
- v,
957
+ b,
957
958
  {
958
959
  name: "Plus",
959
960
  width: 16,
@@ -966,111 +967,111 @@ const qn = (r) => {
966
967
  }
967
968
  )
968
969
  ] }),
969
- c !== void 0 && /* @__PURE__ */ t.jsx(
970
- ut,
970
+ l !== void 0 && /* @__PURE__ */ t.jsx(
971
+ ht,
971
972
  {
972
973
  otherTitle: "Other",
973
- items: c
974
+ items: l
974
975
  }
975
976
  )
976
977
  ] });
977
- }, Ce = "_subtitle_jql1y_1", Se = "_products_jql1y_10", ke = "_product_jql1y_10", we = "_button_jql1y_11", Pe = "_buttons_jql1y_11", Me = "_addButton_jql1y_150", Be = "_deleteButton_jql1y_165", et = {
978
- subtitle: Ce,
979
- products: Se,
980
- product: ke,
981
- button: we,
982
- buttons: Pe,
983
- addButton: Me,
978
+ }, Se = "_subtitle_jql1y_1", ke = "_products_jql1y_10", we = "_product_jql1y_10", Pe = "_button_jql1y_11", Me = "_buttons_jql1y_11", Te = "_addButton_jql1y_150", Be = "_deleteButton_jql1y_165", st = {
979
+ subtitle: Se,
980
+ products: ke,
981
+ product: we,
982
+ button: Pe,
983
+ buttons: Me,
984
+ addButton: Te,
984
985
  deleteButton: Be
985
- }, Te = (r) => {
986
- const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: c = !0 } = r, { pages: d } = vt(), [u, g] = m.useState(null), [f, P] = m.useState({
986
+ }, qe = (d) => {
987
+ const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: l = !0 } = d, { pages: r } = bt(), [h, f] = g.useState(null), [v, M] = g.useState({
987
988
  top: 0,
988
989
  left: 0
989
- }), [j, n] = m.useState(null), o = m.useRef(null);
990
- m.useEffect(() => {
991
- if (u) {
992
- const x = [...i].map((_) => _.id === u.id ? u : _);
993
- a(x);
990
+ }), [x, c] = g.useState(null), o = g.useRef(null);
991
+ g.useEffect(() => {
992
+ if (h) {
993
+ const _ = [...i].map((j) => j.id === h.id ? h : j);
994
+ a(_);
994
995
  }
995
- }, [u]), m.useEffect(() => {
996
- if (o.current && j) {
997
- const x = o.current.getBoundingClientRect().height, _ = window.innerHeight;
998
- let y = j.top;
999
- y + x > _ + window.scrollY - 200 && (y = _ + window.scrollY - x - 200), y < 0 && (y = 10), P({
1000
- top: y,
1001
- left: j.left
996
+ }, [h]), g.useEffect(() => {
997
+ if (o.current && x) {
998
+ const _ = o.current.getBoundingClientRect().height, j = window.innerHeight;
999
+ let N = x.top;
1000
+ N + _ > j + window.scrollY - 200 && (N = j + window.scrollY - _ - 200), N < 0 && (N = 10), M({
1001
+ top: N,
1002
+ left: x.left
1002
1003
  });
1003
1004
  }
1004
- }, [o.current, j]);
1005
- const p = (x, _) => {
1006
- x.stopPropagation();
1007
- const y = x.target.getBoundingClientRect();
1008
- n({
1009
- top: y.top + window.scrollY - 70,
1010
- left: y.left - (e ? 30 : 65)
1011
- }), g(_);
1012
- }, q = (x, _) => {
1013
- const y = [...i], M = {
1014
- ...x,
1005
+ }, [o.current, x]);
1006
+ const n = (_, j) => {
1007
+ _.stopPropagation();
1008
+ const N = _.target.getBoundingClientRect();
1009
+ c({
1010
+ top: N.top + window.scrollY - 70,
1011
+ left: N.left - (e ? 30 : 65)
1012
+ }), f(j);
1013
+ }, q = (_, j) => {
1014
+ const N = [...i], k = {
1015
+ ..._,
1015
1016
  id: Math.random().toString(36).substr(2, 9)
1016
1017
  // Генерируем новый уникальный ID
1017
1018
  };
1018
- y.splice(_ + 1, 0, M), a(y);
1019
+ N.splice(j + 1, 0, k), a(N);
1019
1020
  };
1020
- return /* @__PURE__ */ t.jsxs("div", { className: et.products, children: [
1021
- /* @__PURE__ */ t.jsx("h5", { className: et.subtitle, children: "Button Type" }),
1022
- i.map((x, _) => /* @__PURE__ */ t.jsxs(
1021
+ return /* @__PURE__ */ t.jsxs("div", { className: st.products, children: [
1022
+ /* @__PURE__ */ t.jsx("h5", { className: st.subtitle, children: "Button Type" }),
1023
+ i.map((_, j) => /* @__PURE__ */ t.jsxs(
1023
1024
  "div",
1024
1025
  {
1025
- className: et.product,
1026
+ className: st.product,
1026
1027
  children: [
1027
1028
  /* @__PURE__ */ t.jsx(
1028
- nt,
1029
+ it,
1029
1030
  {
1030
- onChange: (y) => {
1031
- const z = [...i].map((R) => R.id === x.id ? {
1032
- ...x,
1033
- type: y
1034
- } : R);
1035
- a(z);
1031
+ onChange: (N) => {
1032
+ const D = [...i].map((L) => L.id === _.id ? {
1033
+ ..._,
1034
+ type: N
1035
+ } : L);
1036
+ a(D);
1036
1037
  },
1037
- value: x.type,
1038
+ value: _.type,
1038
1039
  options: ["Primary", "Secondary", "Tertiary"]
1039
1040
  }
1040
1041
  ),
1041
- /* @__PURE__ */ t.jsxs("div", { className: et.buttons, children: [
1042
- /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1043
- v,
1042
+ /* @__PURE__ */ t.jsxs("div", { className: st.buttons, children: [
1043
+ /* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
1044
+ b,
1044
1045
  {
1045
1046
  name: "Copy",
1046
1047
  hoverable: !0,
1047
1048
  width: 20,
1048
1049
  height: 20,
1049
1050
  onClick: () => {
1050
- q(x, _);
1051
+ q(_, j);
1051
1052
  }
1052
1053
  }
1053
1054
  ) }),
1054
- /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1055
- v,
1055
+ /* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
1056
+ b,
1056
1057
  {
1057
1058
  name: "Sliders",
1058
1059
  hoverable: !0,
1059
1060
  width: 20,
1060
1061
  height: 20,
1061
- onClick: (y) => {
1062
- p(y, x);
1062
+ onClick: (N) => {
1063
+ n(N, _);
1063
1064
  }
1064
1065
  }
1065
1066
  ) }),
1066
- s && /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
1067
- v,
1067
+ s && /* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
1068
+ b,
1068
1069
  {
1069
1070
  name: "Trash",
1070
1071
  hoverable: !0,
1071
1072
  onClick: () => {
1072
- const y = i.filter((M) => M.id !== x.id);
1073
- a(y);
1073
+ const N = i.filter((k) => k.id !== _.id);
1074
+ a(N);
1074
1075
  },
1075
1076
  width: 20,
1076
1077
  height: 20,
@@ -1080,16 +1081,16 @@ const qn = (r) => {
1080
1081
  ] })
1081
1082
  ]
1082
1083
  },
1083
- x.id
1084
+ _.id
1084
1085
  )),
1085
- u && /* @__PURE__ */ t.jsx(
1086
- Ot,
1086
+ h && /* @__PURE__ */ t.jsx(
1087
+ At,
1087
1088
  {
1088
1089
  ref: o,
1089
- activeButton: u,
1090
- setActiveButton: g,
1091
- popupPosition: f,
1092
- editableLink: c
1090
+ activeButton: h,
1091
+ setActiveButton: f,
1092
+ popupPosition: v,
1093
+ editableLink: l
1093
1094
  }
1094
1095
  ),
1095
1096
  e && /* @__PURE__ */ t.jsx(
@@ -1101,42 +1102,42 @@ const qn = (r) => {
1101
1102
  justifyContent: "center"
1102
1103
  },
1103
1104
  children: /* @__PURE__ */ t.jsx(
1104
- lt,
1105
+ dt,
1105
1106
  {
1106
1107
  withoutHover: !0,
1107
- className: et.button,
1108
+ className: st.button,
1108
1109
  size: "s",
1109
1110
  onClick: () => {
1110
- const x = [...i];
1111
- c ? x.push({
1111
+ const _ = [...i];
1112
+ l ? _.push({
1112
1113
  type: "Primary",
1113
- id: Z(),
1114
+ id: J(),
1114
1115
  typesText: [],
1115
1116
  text: {
1116
1117
  "en-US": "Button Name"
1117
1118
  },
1118
1119
  destination: "Go to Page",
1119
- page: d ? Object.values(d)[0].path : "/",
1120
+ page: r ? Object.values(r)[0].path : "/",
1120
1121
  openInNewTab: !1
1121
- }) : x.push({
1122
+ }) : _.push({
1122
1123
  type: "Primary",
1123
- id: Z(),
1124
+ id: J(),
1124
1125
  typesText: [],
1125
1126
  text: {
1126
1127
  "en-US": "Create Ticket"
1127
1128
  },
1128
1129
  destination: "Go to Page",
1129
- page: d ? Object.values(d)[0].path : "/",
1130
+ page: r ? Object.values(r)[0].path : "/",
1130
1131
  openInNewTab: !1
1131
- }), a(x);
1132
+ }), a(_);
1132
1133
  },
1133
1134
  style: {
1134
1135
  width: "fit-content"
1135
1136
  },
1136
- children: /* @__PURE__ */ t.jsxs("div", { className: et.addButton, children: [
1137
+ children: /* @__PURE__ */ t.jsxs("div", { className: st.addButton, children: [
1137
1138
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1138
1139
  /* @__PURE__ */ t.jsx(
1139
- v,
1140
+ b,
1140
1141
  {
1141
1142
  name: "Plus",
1142
1143
  width: 16,
@@ -1149,123 +1150,123 @@ const qn = (r) => {
1149
1150
  }
1150
1151
  )
1151
1152
  ] });
1152
- }, On = (r) => {
1153
+ }, En = (d) => {
1153
1154
  const {
1154
1155
  isActiveButtons: i,
1155
1156
  setIsActiveButtons: a,
1156
1157
  buttons: s,
1157
1158
  setButtons: e,
1158
- editableLink: c = !0,
1159
- addable: d = !0,
1160
- deletable: u = !0
1161
- } = r;
1162
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: yt.buttonsBlock, children: [
1163
- /* @__PURE__ */ t.jsxs("div", { className: yt.top, children: [
1164
- /* @__PURE__ */ t.jsx("h3", { className: yt.title, children: "Buttons" }),
1159
+ editableLink: l = !0,
1160
+ addable: r = !0,
1161
+ deletable: h = !0
1162
+ } = d;
1163
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: It.buttonsBlock, children: [
1164
+ /* @__PURE__ */ t.jsxs("div", { className: It.top, children: [
1165
+ /* @__PURE__ */ t.jsx("h3", { className: It.title, children: "Buttons" }),
1165
1166
  /* @__PURE__ */ t.jsx(
1166
- rt,
1167
+ lt,
1167
1168
  {
1168
1169
  current: i,
1169
- onChange: (g) => a(g)
1170
+ onChange: (f) => a(f)
1170
1171
  }
1171
1172
  )
1172
1173
  ] }),
1173
1174
  i && /* @__PURE__ */ t.jsx(
1174
- Te,
1175
+ qe,
1175
1176
  {
1176
1177
  buttons: s,
1177
1178
  setButtons: e,
1178
- editableLink: c,
1179
- addable: d,
1180
- deletable: u
1179
+ editableLink: l,
1180
+ addable: r,
1181
+ deletable: h
1181
1182
  }
1182
1183
  )
1183
1184
  ] }) });
1184
1185
  };
1185
- function $e(r) {
1186
- const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
1186
+ function $e(d) {
1187
+ const { product: i, children: a } = d, { attributes: s, listeners: e, setNodeRef: l, transform: r, transition: h, isDragging: f } = jt({
1187
1188
  id: String(i.listingId)
1188
- }), f = {
1189
- transform: jt.Transform.toString(d),
1190
- transition: u
1189
+ }), v = {
1190
+ transform: vt.Transform.toString(r),
1191
+ transition: h
1191
1192
  };
1192
1193
  return /* @__PURE__ */ t.jsx(
1193
1194
  "div",
1194
1195
  {
1195
- ref: c,
1196
- style: f,
1197
- className: `${X.product} ${g ? X.dragging : ""}`,
1196
+ ref: l,
1197
+ style: v,
1198
+ className: `${W.product} ${f ? W.dragging : ""}`,
1198
1199
  ...s,
1199
1200
  ...e,
1200
1201
  children: a
1201
1202
  }
1202
1203
  );
1203
1204
  }
1204
- const An = (r) => {
1205
+ const Dn = (d) => {
1205
1206
  const {
1206
1207
  isActiveItems: i,
1207
1208
  setIsActiveItems: a,
1208
1209
  items: s,
1209
1210
  setItems: e,
1210
- other: c,
1211
- title: d,
1212
- subtitle: u,
1213
- editable: g = !0,
1214
- draggable: f = !1,
1215
- withImage: P = !1,
1216
- deletable: j = !0,
1217
- addable: n = !0,
1211
+ other: l,
1212
+ title: r,
1213
+ subtitle: h,
1214
+ editable: f = !0,
1215
+ draggable: v = !1,
1216
+ withImage: M = !1,
1217
+ deletable: x = !0,
1218
+ addable: c = !0,
1218
1219
  itemsType: o,
1219
- itemsOptions: p,
1220
+ itemsOptions: n,
1220
1221
  limit: q,
1221
- aspectRatio: x,
1222
- setAspectRatio: _
1223
- } = r, [y, M] = m.useState(
1222
+ aspectRatio: _,
1223
+ setAspectRatio: j
1224
+ } = d, [N, k] = g.useState(
1224
1225
  null
1225
- ), [z, R] = m.useState({
1226
+ ), [D, L] = g.useState({
1226
1227
  top: 0,
1227
1228
  left: 0
1228
- }), [I, H] = m.useState(!1), h = ht(
1229
- pt(mt, {
1229
+ }), [K, m] = g.useState(!1), p = pt(
1230
+ mt(gt, {
1230
1231
  activationConstraint: {
1231
1232
  distance: 5
1232
1233
  }
1233
1234
  })
1234
1235
  );
1235
- m.useEffect(() => {
1236
- const b = () => {
1237
- M(null), H(!1);
1236
+ g.useEffect(() => {
1237
+ const y = () => {
1238
+ k(null), m(!1);
1238
1239
  };
1239
- return document.body.addEventListener("click", b), M(null), H(!1), () => {
1240
- M(null), H(!1), document.body.removeEventListener("click", b);
1240
+ return document.body.addEventListener("click", y), k(null), m(!1), () => {
1241
+ k(null), m(!1), document.body.removeEventListener("click", y);
1241
1242
  };
1242
- }, []), m.useEffect(() => {
1243
- if (y) {
1244
- const b = [...s].map((A) => A.listingId === y.listingId ? y : A);
1245
- e(b);
1243
+ }, []), g.useEffect(() => {
1244
+ if (N) {
1245
+ const y = [...s].map((A) => A.listingId === N.listingId ? N : A);
1246
+ e(y);
1246
1247
  }
1247
- }, [y]);
1248
- const S = (b, A) => {
1249
- b.stopPropagation();
1250
- const U = b.target.getBoundingClientRect(), l = 100, $ = window.innerHeight;
1251
- let C = U.top + window.scrollY;
1252
- C + l > $ && (C = $ - l - 20), H(!0), R({
1253
- top: C - 80,
1254
- left: U.left - 30
1255
- }), M(A);
1248
+ }, [N]);
1249
+ const C = (y, A) => {
1250
+ y.stopPropagation();
1251
+ const z = y.target.getBoundingClientRect(), u = 100, B = window.innerHeight;
1252
+ let S = z.top + window.scrollY;
1253
+ S + u > B && (S = B - u - 20), m(!0), L({
1254
+ top: S - 80,
1255
+ left: z.left - 30
1256
+ }), k(A);
1256
1257
  };
1257
- function k(b) {
1258
- if (P)
1259
- return b ? /* @__PURE__ */ t.jsx(
1258
+ function w(y) {
1259
+ if (M)
1260
+ return y ? /* @__PURE__ */ t.jsx(
1260
1261
  "img",
1261
1262
  {
1262
- src: `https://imagedelivery.net/${b}/w=1000`,
1263
+ src: `https://imagedelivery.net/${y}/w=1000`,
1263
1264
  alt: "image",
1264
1265
  width: 16,
1265
1266
  height: 16
1266
1267
  }
1267
1268
  ) : /* @__PURE__ */ t.jsx(
1268
- v,
1269
+ b,
1269
1270
  {
1270
1271
  name: "Image",
1271
1272
  width: 16,
@@ -1274,21 +1275,21 @@ const An = (r) => {
1274
1275
  }
1275
1276
  );
1276
1277
  }
1277
- const N = (b) => {
1278
- const { active: A, over: U } = b;
1279
- if (U && A.id !== U.id) {
1280
- const l = s.findIndex((C) => String(C.listingId) === A.id), $ = s.findIndex((C) => String(C.listingId) === U.id);
1281
- if (l !== -1 && $ !== -1) {
1282
- const C = [...s], [E] = C.splice(l, 1);
1283
- C.splice($, 0, E), e(C);
1278
+ const $ = (y) => {
1279
+ const { active: A, over: z } = y;
1280
+ if (z && A.id !== z.id) {
1281
+ const u = s.findIndex((S) => String(S.listingId) === A.id), B = s.findIndex((S) => String(S.listingId) === z.id);
1282
+ if (u !== -1 && B !== -1) {
1283
+ const S = [...s], [E] = S.splice(u, 1);
1284
+ S.splice(B, 0, E), e(S);
1284
1285
  }
1285
1286
  }
1286
- }, B = (b) => {
1287
- const A = p.find((l) => b.listingId === l.id);
1287
+ }, I = (y) => {
1288
+ const A = n.find((u) => y.listingId === u.id);
1288
1289
  if (!A) return null;
1289
- const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1290
- f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1291
- v,
1290
+ const z = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1291
+ v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1292
+ b,
1292
1293
  {
1293
1294
  name: "DotsSixVertical",
1294
1295
  hoverable: !0,
@@ -1297,110 +1298,110 @@ const An = (r) => {
1297
1298
  }
1298
1299
  ) }),
1299
1300
  o === "select" && /* @__PURE__ */ t.jsx(
1300
- nt,
1301
+ it,
1301
1302
  {
1302
- onChange: (l) => {
1303
- const $ = [...s], C = p.find((L) => L.productData.name === l);
1304
- if (!C) return;
1303
+ onChange: (u) => {
1304
+ const B = [...s], S = n.find((U) => U.productData.name === u);
1305
+ if (!S) return;
1305
1306
  const E = {
1306
- listingId: C.id,
1307
- image: C.productData.images.length > 0 ? C.productData.images[0].cfId : ""
1308
- }, tt = $.map((L) => L.listingId === b.listingId ? E : L);
1309
- M(E), e([...tt]);
1307
+ listingId: S.id,
1308
+ image: S.productData.images.length > 0 ? S.productData.images[0].cfId : ""
1309
+ }, et = B.map((U) => U.listingId === y.listingId ? E : U);
1310
+ k(E), e([...et]);
1310
1311
  },
1311
1312
  value: A.productData.name,
1312
1313
  options: [
1313
- ...p.filter((l) => !s.find(($) => $.listingId === l.id)).map((l) => l.productData.name)
1314
+ ...n.filter((u) => !s.find((B) => B.listingId === u.id)).map((u) => u.productData.name)
1314
1315
  ],
1315
- leftAddonOptions: p.map((l) => {
1316
- var $;
1316
+ leftAddonOptions: n.map((u) => {
1317
+ var B;
1317
1318
  return {
1318
- value: l.productData.name,
1319
- addon: k((($ = l.productData.images[0]) == null ? void 0 : $.cfId) || "")
1319
+ value: u.productData.name,
1320
+ addon: w(((B = u.productData.images[0]) == null ? void 0 : B.cfId) || "")
1320
1321
  };
1321
1322
  })
1322
1323
  }
1323
1324
  ),
1324
- /* @__PURE__ */ t.jsxs("div", { className: X.buttons, children: [
1325
- g && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1326
- v,
1325
+ /* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
1326
+ f && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
1327
+ b,
1327
1328
  {
1328
1329
  name: "Sliders",
1329
1330
  hoverable: !0,
1330
1331
  width: 20,
1331
1332
  height: 20,
1332
- onClick: (l) => S(l, b)
1333
+ onClick: (u) => C(u, y)
1333
1334
  }
1334
1335
  ) }),
1335
- j && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1336
- v,
1336
+ x && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
1337
+ b,
1337
1338
  {
1338
1339
  name: "Trash",
1339
1340
  hoverable: !0,
1340
1341
  width: 20,
1341
1342
  height: 20,
1342
1343
  fill: "#C12A2A",
1343
- onClick: () => e(s.filter((l) => l !== b))
1344
+ onClick: () => e(s.filter((u) => u !== y))
1344
1345
  }
1345
1346
  ) })
1346
1347
  ] })
1347
1348
  ] });
1348
- return f ? /* @__PURE__ */ t.jsx(
1349
+ return v ? /* @__PURE__ */ t.jsx(
1349
1350
  $e,
1350
1351
  {
1351
- product: b,
1352
- children: U
1352
+ product: y,
1353
+ children: z
1353
1354
  },
1354
- b.listingId
1355
+ y.listingId
1355
1356
  ) : /* @__PURE__ */ t.jsx(
1356
1357
  "div",
1357
1358
  {
1358
- className: X.product,
1359
- children: U
1359
+ className: W.product,
1360
+ children: z
1360
1361
  },
1361
- b.listingId
1362
+ y.listingId
1362
1363
  );
1363
- }, O = m.useRef(null);
1364
- return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
1365
- (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
1366
- d && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: d }),
1364
+ }, O = g.useRef(null);
1365
+ return /* @__PURE__ */ t.jsxs("div", { className: W.productsBlock, children: [
1366
+ (r || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
1367
+ r && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: r }),
1367
1368
  i !== void 0 && /* @__PURE__ */ t.jsx(
1368
- rt,
1369
+ lt,
1369
1370
  {
1370
1371
  current: i,
1371
- onChange: (b) => a == null ? void 0 : a(b)
1372
+ onChange: (y) => a == null ? void 0 : a(y)
1372
1373
  }
1373
1374
  )
1374
1375
  ] }),
1375
- I && y && /* @__PURE__ */ t.jsx(
1376
- At,
1376
+ K && N && /* @__PURE__ */ t.jsx(
1377
+ Et,
1377
1378
  {
1378
1379
  ref: O,
1379
- activeItem: y,
1380
- setActiveItem: M,
1381
- setIsOpenModal: H,
1382
- popupPosition: z,
1383
- itemsOptions: p
1380
+ activeItem: N,
1381
+ setActiveItem: k,
1382
+ setIsOpenModal: m,
1383
+ popupPosition: D,
1384
+ itemsOptions: n
1384
1385
  }
1385
1386
  ),
1386
- i && /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
1387
- u && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: u }),
1388
- f ? /* @__PURE__ */ t.jsx(
1389
- gt,
1387
+ i && /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
1388
+ h && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: h }),
1389
+ v ? /* @__PURE__ */ t.jsx(
1390
+ ft,
1390
1391
  {
1391
- sensors: h,
1392
- onDragEnd: N,
1392
+ sensors: p,
1393
+ onDragEnd: $,
1393
1394
  children: /* @__PURE__ */ t.jsx(
1394
- ft,
1395
+ xt,
1395
1396
  {
1396
- items: s.map((b) => String(b.listingId)),
1397
- strategy: xt,
1398
- children: s.map((b) => B(b))
1397
+ items: s.map((y) => String(y.listingId)),
1398
+ strategy: _t,
1399
+ children: s.map((y) => I(y))
1399
1400
  }
1400
1401
  )
1401
1402
  }
1402
- ) : s.map((b) => B(b)),
1403
- n && /* @__PURE__ */ t.jsx(
1403
+ ) : s.map((y) => I(y)),
1404
+ c && /* @__PURE__ */ t.jsx(
1404
1405
  "div",
1405
1406
  {
1406
1407
  style: {
@@ -1409,31 +1410,31 @@ const An = (r) => {
1409
1410
  justifyContent: "center"
1410
1411
  },
1411
1412
  children: /* @__PURE__ */ t.jsx(
1412
- lt,
1413
+ dt,
1413
1414
  {
1414
1415
  withoutHover: !0,
1415
- className: X.button,
1416
+ className: W.button,
1416
1417
  size: "s",
1417
1418
  onClick: () => {
1418
- const b = [...s];
1419
- for (let A = 0; A < p.length; A++)
1420
- if (!s.find((U) => U.listingId === p[A].id)) {
1421
- b.push({
1422
- listingId: p[A].id,
1423
- image: p[A].productData.images.length > 0 ? p[A].productData.images[0].cfId : ""
1419
+ const y = [...s];
1420
+ for (let A = 0; A < n.length; A++)
1421
+ if (!s.find((z) => z.listingId === n[A].id)) {
1422
+ y.push({
1423
+ listingId: n[A].id,
1424
+ image: n[A].productData.images.length > 0 ? n[A].productData.images[0].cfId : ""
1424
1425
  });
1425
1426
  break;
1426
1427
  }
1427
- e(b);
1428
+ e(y);
1428
1429
  },
1429
- disabled: s.length === (q || p.length),
1430
+ disabled: s.length === (q || n.length),
1430
1431
  style: {
1431
1432
  width: "fit-content"
1432
1433
  },
1433
- children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
1434
+ children: /* @__PURE__ */ t.jsxs("div", { className: W.addButton, children: [
1434
1435
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1435
1436
  /* @__PURE__ */ t.jsx(
1436
- v,
1437
+ b,
1437
1438
  {
1438
1439
  name: "Plus",
1439
1440
  width: 16,
@@ -1446,164 +1447,178 @@ const An = (r) => {
1446
1447
  }
1447
1448
  )
1448
1449
  ] }),
1449
- x && _ && /* @__PURE__ */ t.jsx(
1450
- nt,
1450
+ _ && j && /* @__PURE__ */ t.jsx(
1451
+ it,
1451
1452
  {
1452
- value: x,
1453
- options: Object.keys(Pt),
1454
- onChange: (b) => _(b),
1455
- leftAddonOptions: wt
1453
+ value: _,
1454
+ options: Object.keys(Mt),
1455
+ onChange: (y) => j(y),
1456
+ leftAddonOptions: Pt
1456
1457
  }
1457
1458
  ),
1458
- i && c !== void 0 && /* @__PURE__ */ t.jsx(
1459
- ut,
1459
+ i && l !== void 0 && /* @__PURE__ */ t.jsx(
1460
+ ht,
1460
1461
  {
1461
1462
  otherTitle: "Other",
1462
- items: c
1463
+ items: l
1463
1464
  }
1464
1465
  )
1465
1466
  ] });
1466
- }, qe = "_options_167h8_1", Oe = "_price_167h8_18", Ae = "_oldPrice_167h8_25", Ee = "_newPrice_167h8_33", De = "_animate_167h8_40", Re = "_meta_167h8_58", Le = "_info_167h8_64", ze = "_infoRight_167h8_73", He = "_buttons_167h8_80", Ue = "_variants_167h8_87", Fe = "_variant_167h8_87", Ve = "_stock_167h8_105", Ye = "_variantInfo_167h8_112", Ge = "_quantity_167h8_119", We = "_button_167h8_80", Xe = "_activeVariant_167h8_165", Qe = "_chargeTypes_167h8_169", Je = "_charge_167h8_169", Ke = "_chargeActive_167h8_194", Ze = "_title_167h8_202", T = {
1467
- options: qe,
1468
- price: Oe,
1469
- oldPrice: Ae,
1470
- newPrice: Ee,
1471
- animate: De,
1472
- meta: Re,
1473
- info: Le,
1467
+ }, Oe = "_options_167h8_1", Ae = "_price_167h8_18", Ee = "_oldPrice_167h8_25", De = "_newPrice_167h8_33", Re = "_animate_167h8_40", Le = "_meta_167h8_58", Ue = "_info_167h8_64", ze = "_infoRight_167h8_73", Ve = "_buttons_167h8_80", He = "_variants_167h8_87", Fe = "_variant_167h8_87", Ye = "_stock_167h8_105", Ge = "_variantInfo_167h8_112", We = "_quantity_167h8_119", Xe = "_button_167h8_80", Qe = "_activeVariant_167h8_165", Je = "_chargeTypes_167h8_169", Ke = "_charge_167h8_169", Ze = "_chargeActive_167h8_194", ts = "_title_167h8_202", T = {
1468
+ options: Oe,
1469
+ price: Ae,
1470
+ oldPrice: Ee,
1471
+ newPrice: De,
1472
+ animate: Re,
1473
+ meta: Le,
1474
+ info: Ue,
1474
1475
  infoRight: ze,
1475
- buttons: He,
1476
- variants: Ue,
1476
+ buttons: Ve,
1477
+ variants: He,
1477
1478
  variant: Fe,
1478
- stock: Ve,
1479
- variantInfo: Ye,
1480
- quantity: Ge,
1481
- button: We,
1482
- activeVariant: Xe,
1483
- chargeTypes: Qe,
1484
- charge: Je,
1485
- chargeActive: Ke,
1486
- title: Ze
1479
+ stock: Ye,
1480
+ variantInfo: Ge,
1481
+ quantity: We,
1482
+ button: Xe,
1483
+ activeVariant: Qe,
1484
+ chargeTypes: Je,
1485
+ charge: Ke,
1486
+ chargeActive: Ze,
1487
+ title: ts
1487
1488
  };
1488
- var St = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(St || {});
1489
- const ts = (r) => {
1490
- var z, R;
1491
- const { product: i, setIsOpen: a } = r, { variants: s } = i, [e, c] = m.useState(s[0]), [d, u] = m.useState(
1489
+ var kt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(kt || {});
1490
+ const es = (d) => {
1491
+ var L, K;
1492
+ const { product: i, setIsOpen: a } = d, { variants: s } = i, [e, l] = g.useState(s[0]), [r, h] = g.useState(
1492
1493
  e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
1493
- ), { notifications: g, setNotifications: f } = Ct(), P = bt(), [j, n] = m.useState(1), { reset: o, addProductToCart: p } = at(), [q, x] = m.useState(!1);
1494
- m.useEffect(() => {
1495
- x(!0);
1496
- const I = setTimeout(() => x(!1), 600);
1497
- return () => clearTimeout(I);
1498
- }, [j]);
1499
- async function _() {
1500
- await p({
1501
- productId: i.id,
1502
- productVariantId: e.id,
1503
- quantity: j
1504
- }), a == null || a(!1), f([
1505
- ...g,
1506
- {
1507
- id: Z(),
1508
- message: "Product added to cart",
1509
- status: "success"
1510
- }
1511
- ]);
1494
+ ), { notifications: f, setNotifications: v } = St(), M = yt(), [x, c] = g.useState(1), { cart: o, reset: n, addProductToCart: q } = ot(), [_, j] = g.useState(!1);
1495
+ g.useEffect(() => {
1496
+ j(!0);
1497
+ const m = setTimeout(() => j(!1), 600);
1498
+ return () => clearTimeout(m);
1499
+ }, [x]);
1500
+ async function N() {
1501
+ try {
1502
+ q({
1503
+ productId: i.id,
1504
+ productVariantId: e.id,
1505
+ quantity: x
1506
+ }), v([
1507
+ ...f,
1508
+ {
1509
+ id: J(),
1510
+ message: "Product added to cart",
1511
+ status: "success"
1512
+ }
1513
+ ]);
1514
+ } catch (m) {
1515
+ v([
1516
+ ...f,
1517
+ {
1518
+ id: J(),
1519
+ message: `Product failed to add to cart: ${m}`,
1520
+ status: "error"
1521
+ }
1522
+ ]);
1523
+ }
1524
+ a == null || a(!1);
1512
1525
  }
1513
- function y() {
1514
- o(), _(), P("/checkout");
1526
+ function k() {
1527
+ n(), N(), M("/checkout");
1515
1528
  }
1516
- function M(I) {
1517
- if (I >= 864e5) {
1518
- const N = Math.floor(I / 864e5);
1519
- return `${N} ${N === 1 ? "day" : "days"}`;
1520
- } else if (I >= 36e5) {
1521
- const N = Math.floor(I / 36e5);
1522
- return `${N} ${N === 1 ? "hour" : "hours"}`;
1523
- } else if (I >= 6e4) {
1524
- const N = Math.floor(I / 6e4);
1525
- return `${N} ${N === 1 ? "minute" : "minutes"}`;
1529
+ function D(m) {
1530
+ if (m >= 864e5) {
1531
+ const I = Math.floor(m / 864e5);
1532
+ return `${I} ${I === 1 ? "day" : "days"}`;
1533
+ } else if (m >= 36e5) {
1534
+ const I = Math.floor(m / 36e5);
1535
+ return `${I} ${I === 1 ? "hour" : "hours"}`;
1536
+ } else if (m >= 6e4) {
1537
+ const I = Math.floor(m / 6e4);
1538
+ return `${I} ${I === 1 ? "minute" : "minutes"}`;
1526
1539
  } else {
1527
- const N = Math.floor(I / 1e3);
1528
- return `${N} ${N === 1 ? "second" : "seconds"}`;
1540
+ const I = Math.floor(m / 1e3);
1541
+ return `${I} ${I === 1 ? "second" : "seconds"}`;
1529
1542
  }
1530
1543
  }
1531
- return m.useEffect(() => {
1532
- e.quantity && e.quantity.available === 0 ? n(0) : n(1);
1544
+ return g.useEffect(() => {
1545
+ e.quantity && e.quantity.available === 0 ? c(0) : c(1);
1533
1546
  }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: T.options, children: [
1534
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: T.chargeTypes, children: e.chargeTypes.map((I) => /* @__PURE__ */ t.jsx(
1547
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: T.chargeTypes, children: e.chargeTypes.map((m) => /* @__PURE__ */ t.jsx(
1535
1548
  "div",
1536
1549
  {
1537
- className: F(T.charge, {
1538
- [T.chargeActive]: d === I
1550
+ className: V(T.charge, {
1551
+ [T.chargeActive]: r === m
1539
1552
  }),
1540
- onClick: () => u(I),
1541
- children: St[I]
1553
+ onClick: () => h(m),
1554
+ children: kt[m]
1542
1555
  },
1543
- I
1556
+ m
1544
1557
  )) }),
1545
- /* @__PURE__ */ t.jsx("div", { className: T.variants, children: s.map((I) => {
1546
- var H, h;
1558
+ /* @__PURE__ */ t.jsx("div", { className: T.variants, children: s.map((m) => {
1559
+ var p, C;
1547
1560
  return /* @__PURE__ */ t.jsxs(
1548
1561
  "div",
1549
1562
  {
1550
- className: F(T.variant, {
1551
- [T.activeVariant]: e.id === I.id
1563
+ className: V(T.variant, {
1564
+ [T.activeVariant]: e.id === m.id
1552
1565
  }),
1553
- onClick: () => c(I),
1566
+ onClick: () => l(m),
1554
1567
  children: [
1555
1568
  /* @__PURE__ */ t.jsxs("div", { className: T.variantInfo, children: [
1556
- /* @__PURE__ */ t.jsx("span", { className: T.title, children: it(I.name) }),
1557
- /* @__PURE__ */ t.jsxs("span", { children: [
1558
- "$",
1559
- d === "ONE_TIME" ? I.price.amount : I.subscriptionSettings ? I.subscriptionSettings.price.amount : "Price Not Found"
1560
- ] })
1569
+ /* @__PURE__ */ t.jsx("span", { className: T.title, children: at(m.name) }),
1570
+ /* @__PURE__ */ t.jsx("span", { children: tt({
1571
+ amount: r === "ONE_TIME" ? m.price.amount : m.subscriptionSettings ? m.subscriptionSettings.price.amount : 0,
1572
+ currency: r === "ONE_TIME" ? m.price.currency : m.subscriptionSettings ? m.subscriptionSettings.price.currency : "USD"
1573
+ }) })
1561
1574
  ] }),
1562
- /* @__PURE__ */ t.jsx("div", { children: d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: T.stock, children: [
1563
- (H = I.quantity.restrictions) != null && H.max || I.quantity.available !== void 0 ? ((h = I.quantity.restrictions) == null ? void 0 : h.max) || I.quantity.available : "∞",
1575
+ /* @__PURE__ */ t.jsx("div", { children: r === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: T.stock, children: [
1576
+ (p = m.quantity.restrictions) != null && p.max || m.quantity.available !== void 0 ? ((C = m.quantity.restrictions) == null ? void 0 : C.max) || m.quantity.available : "∞",
1564
1577
  " ",
1565
1578
  "in stock"
1566
1579
  ] }) })
1567
1580
  ]
1568
1581
  },
1569
- I.id
1582
+ m.id
1570
1583
  );
1571
1584
  }) }),
1572
- d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: T.quantity, children: [
1585
+ r === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: T.quantity, children: [
1573
1586
  /* @__PURE__ */ t.jsx(
1574
- D,
1587
+ R,
1575
1588
  {
1576
1589
  type: "Secondary",
1577
1590
  onClick: () => {
1578
- j > 1 ? n((I) => I - 1) : n(1);
1591
+ x > 1 ? c((m) => m - 1) : c(1);
1579
1592
  },
1580
1593
  className: T.button,
1581
- disabled: e.quantity.available && e.quantity.restrictions && j <= e.quantity.restrictions.min || e.quantity.available === 0,
1582
- children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
1594
+ disabled: e.quantity.available && e.quantity.restrictions && x <= e.quantity.restrictions.min || e.quantity.available === 0,
1595
+ children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
1583
1596
  }
1584
1597
  ),
1585
1598
  /* @__PURE__ */ t.jsx(
1586
- Et,
1599
+ Dt,
1587
1600
  {
1588
1601
  type: "number",
1589
- value: String(j),
1590
- onChange: (I) => n(Number(I)),
1591
- max: ((z = e.quantity.restrictions) == null ? void 0 : z.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1592
- min: ((R = e.quantity.restrictions) == null ? void 0 : R.min) || 0,
1602
+ value: String(x),
1603
+ onChange: (m) => {
1604
+ e.quantity.available && Number(m) > e.quantity.available ? c(e.quantity.available) : c(Number(m));
1605
+ },
1606
+ max: ((L = e.quantity.restrictions) == null ? void 0 : L.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1607
+ min: ((K = e.quantity.restrictions) == null ? void 0 : K.min) || 0,
1593
1608
  centered: !0,
1594
- disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && j >= e.quantity.restrictions.max
1609
+ disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && x >= e.quantity.restrictions.max
1595
1610
  }
1596
1611
  ),
1597
1612
  /* @__PURE__ */ t.jsx(
1598
- D,
1613
+ R,
1599
1614
  {
1600
1615
  type: "Secondary",
1601
1616
  onClick: () => {
1602
- n((I) => I + 1);
1617
+ c((m) => m + 1);
1603
1618
  },
1604
1619
  className: T.button,
1605
- disabled: !!(e.quantity.available && e.quantity.restrictions && j >= e.quantity.restrictions.max || e.quantity.available === 0),
1606
- children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
1620
+ disabled: !!(e.quantity.available && e.quantity.restrictions && x >= e.quantity.restrictions.max || e.quantity.available === 0 || e.quantity.available && x >= e.quantity.available),
1621
+ children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
1607
1622
  }
1608
1623
  )
1609
1624
  ] }),
@@ -1612,7 +1627,7 @@ const ts = (r) => {
1612
1627
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1613
1628
  /* @__PURE__ */ t.jsxs("div", { className: T.infoRight, children: [
1614
1629
  /* @__PURE__ */ t.jsx(
1615
- v,
1630
+ b,
1616
1631
  {
1617
1632
  name: "Lightning",
1618
1633
  fill: "var(--text-action)",
@@ -1620,224 +1635,229 @@ const ts = (r) => {
1620
1635
  height: 20
1621
1636
  }
1622
1637
  ),
1623
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : M(e.deliveryTime) })
1638
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : D(e.deliveryTime) })
1624
1639
  ] })
1625
1640
  ] }),
1626
1641
  /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1627
1642
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1628
- /* @__PURE__ */ t.jsx("div", { className: T.infoRight, children: d === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
1629
- /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1630
- "$ ",
1631
- (e.price.amount || 0) * j
1632
- ] }),
1633
- /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1634
- "$ ",
1635
- (e.compareAtPrice.amount || 0) * j
1636
- ] })
1637
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1638
- "$ ",
1639
- (e.price.amount || 0) * j
1640
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
1641
- /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1642
- "$ ",
1643
- e.subscriptionSettings.price.amount || 0
1644
- ] }),
1645
- /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1646
- "$ ",
1647
- e.subscriptionSettings.compareAtPrice.amount || 0
1648
- ] })
1649
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(T.newPrice, { [T.animate]: q }), children: [
1650
- "$ ",
1651
- e.subscriptionSettings.price.amount || 0
1652
- ] }) })
1643
+ /* @__PURE__ */ t.jsx("div", { className: T.infoRight, children: r === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
1644
+ /* @__PURE__ */ t.jsx("span", { className: V(T.newPrice, { [T.animate]: _ }), children: tt({
1645
+ amount: e.price.amount * x,
1646
+ currency: e.price.currency
1647
+ }) }),
1648
+ /* @__PURE__ */ t.jsx("span", { className: T.oldPrice, children: tt({
1649
+ amount: e.compareAtPrice.amount * x,
1650
+ currency: e.compareAtPrice.currency
1651
+ }) })
1652
+ ] }) : /* @__PURE__ */ t.jsx("span", { className: V(T.newPrice, { [T.animate]: _ }), children: tt({
1653
+ amount: e.price.amount * x,
1654
+ currency: e.price.currency
1655
+ }) }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
1656
+ /* @__PURE__ */ t.jsx("span", { className: V(T.newPrice, { [T.animate]: _ }), children: tt({
1657
+ amount: e.subscriptionSettings.price.amount * x,
1658
+ currency: e.subscriptionSettings.price.currency
1659
+ }) }),
1660
+ /* @__PURE__ */ t.jsx("span", { className: T.oldPrice, children: tt({
1661
+ amount: e.subscriptionSettings.compareAtPrice.amount * x,
1662
+ currency: e.subscriptionSettings.compareAtPrice.currency
1663
+ }) })
1664
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsx("span", { className: V(T.newPrice, { [T.animate]: _ }), children: tt({
1665
+ amount: e.subscriptionSettings.price.amount * x,
1666
+ currency: e.subscriptionSettings.price.currency
1667
+ }) }) })
1653
1668
  ] })
1654
1669
  ] }),
1655
1670
  /* @__PURE__ */ t.jsxs("div", { className: T.buttons, children: [
1656
1671
  /* @__PURE__ */ t.jsx(
1657
- D,
1672
+ R,
1658
1673
  {
1659
1674
  type: "Primary",
1660
- onClick: () => y(),
1675
+ onClick: () => k(),
1661
1676
  disabled: e.quantity && e.quantity.available === 0,
1662
- children: d === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1677
+ children: r === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1663
1678
  }
1664
1679
  ),
1665
- d === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1666
- D,
1680
+ r === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1681
+ R,
1667
1682
  {
1668
1683
  type: "Secondary",
1669
- onClick: () => _(),
1684
+ onClick: () => N(),
1670
1685
  disabled: e.quantity && e.quantity.available === 0,
1671
- children: "Add to Cart"
1686
+ children: o.parts.some(
1687
+ (m) => m.productId === i.id && m.productVariantId === e.id
1688
+ ) ? "Add More" : "Add to Cart"
1672
1689
  }
1673
1690
  )
1674
1691
  ] })
1675
1692
  ] });
1676
- }, es = "_buttons_qns27_23", ss = "_modal_qns27_32", ns = "_closing_qns27_64", is = "_info_qns27_113", as = "_top_qns27_120", os = "_title_qns27_131", cs = "_clear_qns27_138", rs = "_activeClear_qns27_145", ls = "_count_qns27_149", ds = "_cart_qns27_164", us = "_empty_qns27_172", hs = "_product_qns27_198", ps = "_products_qns27_207", ms = "_image_qns27_215", gs = "_productInfo_qns27_231", fs = "_content_qns27_238", xs = "_name_qns27_244", _s = "_price_qns27_250", js = "_productButtons_qns27_256", vs = "_productButton_qns27_256", bs = "_productCount_qns27_273", ys = "_bottom_qns27_290", Is = "_subtotal_qns27_298", Ns = "_block_qns27_306", Cs = "_shoppingCount_qns27_313", Ss = "_total_qns27_333", ks = "_link_qns27_339", ws = "_userInfo_qns27_346", Ps = "_pagesMobileModal_qns27_358", Ms = "_pagesMobileModalContent_qns27_372", Bs = "_pagesMobileModalHeader_qns27_378", Ts = "_pagesMobileModalFooter_qns27_388", w = {
1677
- buttons: es,
1678
- modal: ss,
1679
- closing: ns,
1680
- info: is,
1681
- top: as,
1682
- title: os,
1683
- clear: cs,
1684
- activeClear: rs,
1685
- count: ls,
1686
- cart: ds,
1687
- empty: us,
1688
- product: hs,
1689
- products: ps,
1690
- image: ms,
1691
- productInfo: gs,
1692
- content: fs,
1693
- name: xs,
1694
- price: _s,
1695
- productButtons: js,
1696
- productButton: vs,
1697
- productCount: bs,
1698
- bottom: ys,
1699
- subtotal: Is,
1700
- block: Ns,
1701
- shoppingCount: Cs,
1702
- total: Ss,
1703
- link: ks,
1704
- userInfo: ws,
1705
- pagesMobileModal: Ps,
1706
- pagesMobileModalContent: Ms,
1693
+ }, ss = "_buttons_qns27_23", ns = "_modal_qns27_32", is = "_closing_qns27_64", as = "_info_qns27_113", os = "_top_qns27_120", cs = "_title_qns27_131", rs = "_clear_qns27_138", ls = "_activeClear_qns27_145", ds = "_count_qns27_149", us = "_cart_qns27_164", hs = "_empty_qns27_172", ps = "_product_qns27_198", ms = "_products_qns27_207", gs = "_image_qns27_215", fs = "_productInfo_qns27_231", xs = "_content_qns27_238", _s = "_name_qns27_244", js = "_price_qns27_250", vs = "_productButtons_qns27_256", bs = "_productButton_qns27_256", ys = "_productCount_qns27_273", Is = "_bottom_qns27_290", Ns = "_subtotal_qns27_298", Cs = "_block_qns27_306", Ss = "_shoppingCount_qns27_313", ks = "_total_qns27_333", ws = "_link_qns27_339", Ps = "_userInfo_qns27_346", Ms = "_pagesMobileModal_qns27_358", Ts = "_pagesMobileModalContent_qns27_372", Bs = "_pagesMobileModalHeader_qns27_378", qs = "_pagesMobileModalFooter_qns27_388", P = {
1694
+ buttons: ss,
1695
+ modal: ns,
1696
+ closing: is,
1697
+ info: as,
1698
+ top: os,
1699
+ title: cs,
1700
+ clear: rs,
1701
+ activeClear: ls,
1702
+ count: ds,
1703
+ cart: us,
1704
+ empty: hs,
1705
+ product: ps,
1706
+ products: ms,
1707
+ image: gs,
1708
+ productInfo: fs,
1709
+ content: xs,
1710
+ name: _s,
1711
+ price: js,
1712
+ productButtons: vs,
1713
+ productButton: bs,
1714
+ productCount: ys,
1715
+ bottom: Is,
1716
+ subtotal: Ns,
1717
+ block: Cs,
1718
+ shoppingCount: Ss,
1719
+ total: ks,
1720
+ link: ws,
1721
+ userInfo: Ps,
1722
+ pagesMobileModal: Ms,
1723
+ pagesMobileModalContent: Ts,
1707
1724
  pagesMobileModalHeader: Bs,
1708
- pagesMobileModalFooter: Ts
1709
- }, En = (r) => {
1710
- const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = r;
1711
- return /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
1725
+ pagesMobileModalFooter: qs
1726
+ }, Rn = (d) => {
1727
+ const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = d;
1728
+ return /* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
1712
1729
  i && /* @__PURE__ */ t.jsx($s, {}),
1713
- s && /* @__PURE__ */ t.jsx(Tt, { signUp: a })
1730
+ s && /* @__PURE__ */ t.jsx(qt, { signUp: a })
1714
1731
  ] });
1715
1732
  }, $s = () => {
1716
- const [r, i] = m.useState(!1), [a, s] = m.useState([]), { cart: e, products: c } = at();
1717
- function d(n) {
1718
- if (n.variants.length > 0) {
1719
- for (let o = 0; o < e.parts.length; o++)
1720
- for (let p = 0; p < n.variants.length; p++)
1721
- if (n.variants[p] && e.parts[o].productVariantId === n.variants[p].id)
1722
- return e.parts[o].productVariantId;
1733
+ const [d, i] = g.useState(!1), [a, s] = g.useState([]), [e, l] = g.useState(!1), { cart: r, products: h } = ot();
1734
+ function f(c) {
1735
+ if (c.variants.length > 0) {
1736
+ for (let o = 0; o < r.parts.length; o++)
1737
+ for (let n = 0; n < c.variants.length; n++)
1738
+ if (c.variants[n] && r.parts[o].productVariantId === c.variants[n].id)
1739
+ return r.parts[o].productVariantId;
1723
1740
  }
1724
- return n.variants[0].id;
1741
+ return c.variants[0].id;
1725
1742
  }
1726
- function u(n) {
1727
- for (let o = 0; o < e.parts.length; o++)
1728
- for (let p = 0; p < n.variants.length; p++)
1729
- if (n.variants[p] && e.parts[o].productVariantId === n.variants[p].id)
1730
- return e.parts[o].quantity;
1743
+ function v(c) {
1744
+ for (let o = 0; o < r.parts.length; o++)
1745
+ for (let n = 0; n < c.variants.length; n++)
1746
+ if (c.variants[n] && r.parts[o].productVariantId === c.variants[n].id)
1747
+ return r.parts[o].quantity;
1731
1748
  }
1732
- m.useEffect(() => {
1749
+ g.useEffect(() => {
1733
1750
  (async () => {
1734
- const o = e.parts.map((x) => String(x.productId)), q = (c.filter((x) => o.includes(String(x.id))) || []).map((x) => ({
1735
- ...x,
1736
- activeVariantId: d(x),
1737
- quantity: u(x)
1751
+ const o = r.parts.map((_) => String(_.productId)), n = h.filter((_) => o.includes(String(_.id))) || [];
1752
+ console.log(h, "products"), console.log(o), console.log(n, "productsBuffer");
1753
+ const q = n.map((_) => ({
1754
+ ..._,
1755
+ activeVariantId: f(_),
1756
+ quantity: v(_)
1738
1757
  }));
1739
1758
  s(q);
1740
1759
  })();
1741
- }, [e.parts]);
1742
- function g(n) {
1760
+ }, [r.parts]);
1761
+ function M(c) {
1743
1762
  var o;
1744
- return !n || !(n != null && n.variants) ? !1 : (o = n.variants.find((p) => p.id === n.activeVariantId)) == null ? void 0 : o.subscriptionSettings;
1763
+ return !c || !(c != null && c.variants) ? !1 : (o = c.variants.find((n) => n.id === c.activeVariantId)) == null ? void 0 : o.subscriptionSettings;
1745
1764
  }
1746
- const f = e.parts.length > 0 && a.length > 0 && !g(a[0]), [P, j] = m.useState(!1);
1765
+ const x = r.parts.length > 0 && a.length > 0 && !M(a[0]);
1747
1766
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1748
1767
  /* @__PURE__ */ t.jsxs(
1749
- D,
1768
+ R,
1750
1769
  {
1751
1770
  type: "Secondary",
1752
1771
  style: {
1753
1772
  padding: 10,
1754
1773
  position: "relative"
1755
1774
  },
1756
- onClick: (n) => {
1757
- n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), j(!0));
1775
+ onClick: (c) => {
1776
+ c.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), l(!0));
1758
1777
  },
1759
1778
  children: [
1760
1779
  /* @__PURE__ */ t.jsx(
1761
- v,
1780
+ b,
1762
1781
  {
1763
1782
  name: "Handbag"
1764
1783
  }
1765
1784
  ),
1766
- f && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: e.parts.length })
1785
+ x && /* @__PURE__ */ t.jsx("div", { className: P.shoppingCount, children: r.parts.length })
1767
1786
  ]
1768
1787
  }
1769
1788
  ),
1770
- r && /* @__PURE__ */ t.jsx(
1771
- dt,
1789
+ d && /* @__PURE__ */ t.jsx(
1790
+ ut,
1772
1791
  {
1773
1792
  close: () => {
1774
- j(!1), setTimeout(() => {
1793
+ l(!1), setTimeout(() => {
1775
1794
  i(!1);
1776
1795
  }, 300);
1777
1796
  },
1778
1797
  withAnimation: !1,
1779
1798
  children: /* @__PURE__ */ t.jsx(
1780
- qs,
1799
+ Os,
1781
1800
  {
1782
1801
  activeProducts: a,
1783
- isCartNotEmpty: f,
1784
- isOpen: P
1802
+ isCartNotEmpty: x,
1803
+ isOpen: e
1785
1804
  }
1786
1805
  )
1787
1806
  }
1788
1807
  )
1789
1808
  ] });
1790
- }, qs = (r) => {
1791
- const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = r, { cart: e, reset: c, getTotalAndDiscount: d, updateQuantityOfProduct: u } = at(), g = bt();
1792
- function f(n) {
1793
- g(n);
1809
+ }, Os = (d) => {
1810
+ var c, o;
1811
+ const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = d, { cart: e, reset: l, getTotalAndDiscount: r, updateQuantityOfProduct: h } = ot(), f = yt();
1812
+ function v(n) {
1813
+ f(n);
1794
1814
  }
1795
- function P(n) {
1796
- n.quantity && u({
1815
+ function M(n) {
1816
+ n.quantity && h({
1797
1817
  productId: n.id,
1798
1818
  productVariantId: n.activeVariantId,
1799
1819
  quantity: n.quantity + 1
1800
1820
  });
1801
1821
  }
1802
- function j(n) {
1803
- n.quantity && u({
1822
+ function x(n) {
1823
+ n.quantity && h({
1804
1824
  productId: n.id,
1805
1825
  productVariantId: n.activeVariantId,
1806
1826
  quantity: n.quantity - 1
1807
1827
  });
1808
1828
  }
1809
- return /* @__PURE__ */ t.jsxs(
1829
+ return console.log(i), /* @__PURE__ */ t.jsxs(
1810
1830
  "div",
1811
1831
  {
1812
- className: F(w.modal, {
1813
- [w.closing]: !s
1832
+ className: V(P.modal, {
1833
+ [P.closing]: !s
1814
1834
  }),
1815
1835
  onClick: (n) => n.stopPropagation(),
1816
1836
  children: [
1817
- /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
1818
- /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
1819
- /* @__PURE__ */ t.jsx("span", { className: w.title, children: "Cart" }),
1820
- a && /* @__PURE__ */ t.jsx("div", { className: w.count, children: e.parts.length })
1837
+ /* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
1838
+ /* @__PURE__ */ t.jsxs("div", { className: P.info, children: [
1839
+ /* @__PURE__ */ t.jsx("span", { className: P.title, children: "Cart" }),
1840
+ a && /* @__PURE__ */ t.jsx("div", { className: P.count, children: e.parts.length })
1821
1841
  ] }),
1822
1842
  /* @__PURE__ */ t.jsx(
1823
1843
  "button",
1824
1844
  {
1825
- className: F(w.clear, {
1826
- [w.activeClear]: a
1845
+ className: V(P.clear, {
1846
+ [P.activeClear]: a
1827
1847
  }),
1828
1848
  disabled: !a,
1829
- onClick: c,
1849
+ onClick: l,
1830
1850
  children: "Clear all"
1831
1851
  }
1832
1852
  )
1833
1853
  ] }),
1834
- a ? /* @__PURE__ */ t.jsxs("div", { className: w.cart, children: [
1835
- /* @__PURE__ */ t.jsx("div", { className: w.products, children: [...new Map(i.map((n) => [n.id, n])).values()].map((n) => /* @__PURE__ */ t.jsxs(
1854
+ a ? /* @__PURE__ */ t.jsxs("div", { className: P.cart, children: [
1855
+ /* @__PURE__ */ t.jsx("div", { className: P.products, children: [...new Map(i.map((n) => [n.id, n])).values()].map((n) => /* @__PURE__ */ t.jsxs(
1836
1856
  "div",
1837
1857
  {
1838
- className: w.product,
1858
+ className: P.product,
1839
1859
  children: [
1840
- /* @__PURE__ */ t.jsxs("div", { className: w.productInfo, children: [
1860
+ /* @__PURE__ */ t.jsxs("div", { className: P.productInfo, children: [
1841
1861
  n.images.length > 0 ? /* @__PURE__ */ t.jsx(
1842
1862
  "img",
1843
1863
  {
@@ -1845,35 +1865,39 @@ const ts = (r) => {
1845
1865
  alt: "image",
1846
1866
  width: "100%",
1847
1867
  height: "100%",
1848
- className: w.image
1868
+ className: P.image
1849
1869
  }
1850
- ) : /* @__PURE__ */ t.jsx("div", { className: w.image, children: /* @__PURE__ */ t.jsx(
1851
- v,
1870
+ ) : /* @__PURE__ */ t.jsx("div", { className: P.image, children: /* @__PURE__ */ t.jsx(
1871
+ b,
1852
1872
  {
1853
1873
  name: "Image",
1854
1874
  fill: "var(--text-secondary)"
1855
1875
  }
1856
1876
  ) }),
1857
- /* @__PURE__ */ t.jsxs("div", { className: w.content, children: [
1858
- /* @__PURE__ */ t.jsx("div", { className: w.name, children: it(n.name) }),
1859
- /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
1860
- "$",
1861
- n.variants.find((o) => o.id === n.activeVariantId).price.amount * ((n == null ? void 0 : n.quantity) || 1)
1862
- ] })
1877
+ /* @__PURE__ */ t.jsxs("div", { className: P.content, children: [
1878
+ /* @__PURE__ */ t.jsx("div", { className: P.name, children: at(n.name) }),
1879
+ /* @__PURE__ */ t.jsx("div", { className: P.price, children: tt({
1880
+ amount: n.variants.find(
1881
+ (q) => q.id === n.activeVariantId
1882
+ ).price.amount * ((n == null ? void 0 : n.quantity) || 1),
1883
+ currency: n.variants.find(
1884
+ (q) => q.id === n.activeVariantId
1885
+ ).price.currency
1886
+ }) })
1863
1887
  ] })
1864
1888
  ] }),
1865
- /* @__PURE__ */ t.jsxs("div", { className: w.productButtons, children: [
1889
+ /* @__PURE__ */ t.jsxs("div", { className: P.productButtons, children: [
1866
1890
  /* @__PURE__ */ t.jsx(
1867
- D,
1891
+ R,
1868
1892
  {
1869
1893
  type: "Secondary",
1870
1894
  onClick: () => {
1871
- n.quantity !== 1 && j(n);
1895
+ n.quantity !== 1 && x(n);
1872
1896
  },
1873
- className: w.productButton,
1897
+ className: P.productButton,
1874
1898
  disabled: n.quantity === 1,
1875
1899
  children: /* @__PURE__ */ t.jsx(
1876
- v,
1900
+ b,
1877
1901
  {
1878
1902
  name: "Minus",
1879
1903
  fill: "#757575",
@@ -1883,16 +1907,16 @@ const ts = (r) => {
1883
1907
  )
1884
1908
  }
1885
1909
  ),
1886
- /* @__PURE__ */ t.jsx("div", { className: w.productCount, children: n.quantity }),
1910
+ /* @__PURE__ */ t.jsx("div", { className: P.productCount, children: n.quantity }),
1887
1911
  /* @__PURE__ */ t.jsx(
1888
- D,
1912
+ R,
1889
1913
  {
1890
1914
  type: "Secondary",
1891
- onClick: () => P(n),
1892
- className: w.productButton,
1893
- disabled: n.quantity === n.variants.find((o) => o.id === n.activeVariantId).quantity.available,
1915
+ onClick: () => M(n),
1916
+ className: P.productButton,
1917
+ disabled: n.quantity === n.variants.find((q) => q.id === n.activeVariantId).quantity.available,
1894
1918
  children: /* @__PURE__ */ t.jsx(
1895
- v,
1919
+ b,
1896
1920
  {
1897
1921
  name: "Plus",
1898
1922
  fill: "#757575",
@@ -1907,12 +1931,12 @@ const ts = (r) => {
1907
1931
  },
1908
1932
  n.id
1909
1933
  )) }),
1910
- /* @__PURE__ */ t.jsxs("div", { className: w.bottom, children: [
1911
- /* @__PURE__ */ t.jsxs("div", { className: w.subtotal, children: [
1912
- /* @__PURE__ */ t.jsxs("div", { className: w.block, children: [
1934
+ /* @__PURE__ */ t.jsxs("div", { className: P.bottom, children: [
1935
+ /* @__PURE__ */ t.jsxs("div", { className: P.subtotal, children: [
1936
+ /* @__PURE__ */ t.jsxs("div", { className: P.block, children: [
1913
1937
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1914
1938
  /* @__PURE__ */ t.jsx(
1915
- v,
1939
+ b,
1916
1940
  {
1917
1941
  name: "Info",
1918
1942
  width: 20,
@@ -1921,20 +1945,20 @@ const ts = (r) => {
1921
1945
  }
1922
1946
  )
1923
1947
  ] }),
1924
- /* @__PURE__ */ t.jsxs("div", { className: w.total, children: [
1925
- "$",
1926
- d().total
1927
- ] })
1948
+ /* @__PURE__ */ t.jsx("div", { className: P.total, children: tt({
1949
+ amount: r().total,
1950
+ currency: e.parts.length > 0 && ((o = (c = i.find((n) => n.id === e.parts[0].productId)) == null ? void 0 : c.variants.find((n) => n.id === e.parts[0].productVariantId)) == null ? void 0 : o.price.currency) || "USD"
1951
+ }) })
1928
1952
  ] }),
1929
- /* @__PURE__ */ t.jsx(D, { onClick: () => f("/checkout"), children: "Checkout" })
1953
+ /* @__PURE__ */ t.jsx(R, { onClick: () => v("/checkout"), children: "Checkout" })
1930
1954
  ] })
1931
- ] }) : /* @__PURE__ */ t.jsx(Os, {})
1955
+ ] }) : /* @__PURE__ */ t.jsx(As, {})
1932
1956
  ]
1933
1957
  }
1934
1958
  );
1935
- }, Os = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
1959
+ }, As = () => /* @__PURE__ */ t.jsxs("div", { className: P.empty, children: [
1936
1960
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1937
- v,
1961
+ b,
1938
1962
  {
1939
1963
  name: "Handbag",
1940
1964
  fill: "var(--text-secondary)"
@@ -1948,38 +1972,38 @@ const ts = (r) => {
1948
1972
  "a",
1949
1973
  {
1950
1974
  href: "/products",
1951
- className: w.link,
1975
+ className: P.link,
1952
1976
  children: "view products"
1953
1977
  }
1954
1978
  )
1955
1979
  ] })
1956
- ] }), Tt = ({ signUp: r, close: i }) => {
1957
- const { token: a } = Dt(), s = bt(), [e, c] = m.useState("test-email@gmail.com");
1958
- m.useEffect(() => {
1980
+ ] }), qt = ({ signUp: d, close: i }) => {
1981
+ const { token: a } = Rt(), s = yt(), [e, l] = g.useState("test-email@gmail.com");
1982
+ g.useEffect(() => {
1959
1983
  a && (async () => {
1960
1984
  if (!a) return;
1961
- const g = Rt(a);
1962
- c(g.email);
1985
+ const f = Lt(a);
1986
+ l(f.email);
1963
1987
  })();
1964
1988
  }, [a]);
1965
- function d(u) {
1966
- window.location.pathname.includes("/admin/builder") || s(u);
1989
+ function r(h) {
1990
+ window.location.pathname.includes("/admin/builder") || s(h);
1967
1991
  }
1968
1992
  return a ? /* @__PURE__ */ t.jsx(
1969
1993
  "div",
1970
1994
  {
1971
- className: w.userInfo,
1995
+ className: P.userInfo,
1972
1996
  onClick: () => {
1973
- d("/customer-dash"), i == null || i();
1997
+ r("/customer-dash"), i == null || i();
1974
1998
  },
1975
1999
  children: /* @__PURE__ */ t.jsx("div", { children: e || "test-email@gmail.com" })
1976
2000
  }
1977
2001
  ) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1978
2002
  /* @__PURE__ */ t.jsx(
1979
- D,
2003
+ R,
1980
2004
  {
1981
2005
  onClick: () => {
1982
- d("/customer-dash"), i == null || i();
2006
+ r("/customer-dash"), i == null || i();
1983
2007
  },
1984
2008
  type: "Secondary",
1985
2009
  style: {
@@ -1988,11 +2012,11 @@ const ts = (r) => {
1988
2012
  children: "Login"
1989
2013
  }
1990
2014
  ),
1991
- r && /* @__PURE__ */ t.jsx(
1992
- D,
2015
+ d && /* @__PURE__ */ t.jsx(
2016
+ R,
1993
2017
  {
1994
2018
  onClick: () => {
1995
- d("/customer-dash"), i == null || i();
2019
+ r("/customer-dash"), i == null || i();
1996
2020
  },
1997
2021
  type: "Primary",
1998
2022
  style: {
@@ -2003,13 +2027,13 @@ const ts = (r) => {
2003
2027
  }
2004
2028
  )
2005
2029
  ] });
2006
- }, As = ({
2007
- children: r,
2030
+ }, Es = ({
2031
+ children: d,
2008
2032
  logo: i,
2009
2033
  setIsOpen: a,
2010
2034
  signUp: s
2011
2035
  }) => {
2012
- const { setIsOpen: e } = ot(), c = () => {
2036
+ const { setIsOpen: e } = ct(), l = () => {
2013
2037
  e(!1), setTimeout(() => {
2014
2038
  a(!1), e(!0);
2015
2039
  }, 300);
@@ -2017,60 +2041,60 @@ const ts = (r) => {
2017
2041
  return /* @__PURE__ */ t.jsxs(
2018
2042
  "div",
2019
2043
  {
2020
- className: w.pagesMobileModal,
2021
- onClick: (d) => d.stopPropagation(),
2044
+ className: P.pagesMobileModal,
2045
+ onClick: (r) => r.stopPropagation(),
2022
2046
  children: [
2023
- /* @__PURE__ */ t.jsxs("div", { className: w.pagesMobileModalHeader, children: [
2047
+ /* @__PURE__ */ t.jsxs("div", { className: P.pagesMobileModalHeader, children: [
2024
2048
  /* @__PURE__ */ t.jsx("div", { children: i }),
2025
2049
  /* @__PURE__ */ t.jsx(
2026
- D,
2050
+ R,
2027
2051
  {
2028
2052
  type: "Secondary",
2029
- onClick: c,
2030
- children: /* @__PURE__ */ t.jsx(v, { name: "X" })
2053
+ onClick: l,
2054
+ children: /* @__PURE__ */ t.jsx(b, { name: "X" })
2031
2055
  }
2032
2056
  )
2033
2057
  ] }),
2034
- /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: r }),
2035
- /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2036
- Tt,
2058
+ /* @__PURE__ */ t.jsx("div", { className: P.pagesMobileModalContent, children: d }),
2059
+ /* @__PURE__ */ t.jsx("div", { className: P.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2060
+ qt,
2037
2061
  {
2038
2062
  signUp: s,
2039
- close: c
2063
+ close: l
2040
2064
  }
2041
2065
  ) })
2042
2066
  ]
2043
2067
  }
2044
2068
  );
2045
- }, Dn = ({
2046
- children: r,
2069
+ }, Ln = ({
2070
+ children: d,
2047
2071
  logo: i,
2048
2072
  signUp: a
2049
2073
  }) => {
2050
- const [s, e] = m.useState(!1);
2074
+ const [s, e] = g.useState(!1);
2051
2075
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2052
- /* @__PURE__ */ t.jsx(Es, { setIsOpenModal: e }),
2076
+ /* @__PURE__ */ t.jsx(Ds, { setIsOpenModal: e }),
2053
2077
  s && /* @__PURE__ */ t.jsx(
2054
- dt,
2078
+ ut,
2055
2079
  {
2056
2080
  close: () => e(!1),
2057
2081
  hasPadding: !1,
2058
2082
  children: /* @__PURE__ */ t.jsx(
2059
- As,
2083
+ Es,
2060
2084
  {
2061
2085
  logo: i,
2062
2086
  setIsOpen: e,
2063
2087
  signUp: a,
2064
- children: r
2088
+ children: d
2065
2089
  }
2066
2090
  )
2067
2091
  }
2068
2092
  )
2069
2093
  ] });
2070
- }, Es = (r) => {
2071
- const { setIsOpenModal: i } = r;
2094
+ }, Ds = (d) => {
2095
+ const { setIsOpenModal: i } = d;
2072
2096
  return /* @__PURE__ */ t.jsx(
2073
- D,
2097
+ R,
2074
2098
  {
2075
2099
  type: "Secondary",
2076
2100
  style: {
@@ -2079,34 +2103,34 @@ const ts = (r) => {
2079
2103
  onClick: (a) => {
2080
2104
  a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
2081
2105
  },
2082
- children: /* @__PURE__ */ t.jsx(v, { name: "List" })
2106
+ children: /* @__PURE__ */ t.jsx(b, { name: "List" })
2083
2107
  }
2084
2108
  );
2085
- }, Ds = "_share_rlgln_1", Rs = "_modal_rlgln_8", Ls = "_header_rlgln_20", zs = "_title_rlgln_46", Hs = "_copyWrapper_rlgln_52", Us = "_copyText_rlgln_61", Fs = "_copyTextMobile_rlgln_74", Vs = "_copyTextMiniMobile_rlgln_93", st = {
2086
- share: Ds,
2087
- modal: Rs,
2088
- header: Ls,
2109
+ }, Rs = "_share_rlgln_1", Ls = "_modal_rlgln_8", Us = "_header_rlgln_20", zs = "_title_rlgln_46", Vs = "_copyWrapper_rlgln_52", Hs = "_copyText_rlgln_61", Fs = "_copyTextMobile_rlgln_74", Ys = "_copyTextMiniMobile_rlgln_93", nt = {
2110
+ share: Rs,
2111
+ modal: Ls,
2112
+ header: Us,
2089
2113
  title: zs,
2090
- copyWrapper: Hs,
2091
- copyText: Us,
2114
+ copyWrapper: Vs,
2115
+ copyText: Hs,
2092
2116
  copyTextMobile: Fs,
2093
- copyTextMiniMobile: Vs
2094
- }, Rn = ({ title: r = "Copy Product Link" }) => {
2095
- const { isOpenModal: i, setIsOpenModal: a } = Mt();
2117
+ copyTextMiniMobile: Ys
2118
+ }, Un = ({ title: d = "Copy Product Link" }) => {
2119
+ const { isOpenModal: i, setIsOpenModal: a } = Tt();
2096
2120
  function s() {
2097
2121
  a(!0);
2098
2122
  }
2099
2123
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2100
2124
  /* @__PURE__ */ t.jsx(
2101
- D,
2125
+ R,
2102
2126
  {
2103
- className: st.share,
2127
+ className: nt.share,
2104
2128
  onClick: (e) => {
2105
2129
  e.stopPropagation(), s();
2106
2130
  },
2107
2131
  type: "Secondary",
2108
2132
  children: /* @__PURE__ */ t.jsx(
2109
- v,
2133
+ b,
2110
2134
  {
2111
2135
  name: "Share",
2112
2136
  fill: "#757575",
@@ -2115,111 +2139,111 @@ const ts = (r) => {
2115
2139
  )
2116
2140
  }
2117
2141
  ),
2118
- i && /* @__PURE__ */ t.jsx(dt, { close: a, children: /* @__PURE__ */ t.jsx(Ys, { title: r }) })
2142
+ i && /* @__PURE__ */ t.jsx(ut, { close: a, children: /* @__PURE__ */ t.jsx(Gs, { title: d }) })
2119
2143
  ] });
2120
- }, Ys = ({ title: r = "Copy Product Link" }) => {
2121
- const { setIsOpenModal: i } = Mt(), { notifications: a, setNotifications: s } = Ct(), { setIsOpen: e } = ot(), c = window.location.href;
2122
- function d() {
2123
- navigator.clipboard.writeText(c), s([
2144
+ }, Gs = ({ title: d = "Copy Product Link" }) => {
2145
+ const { setIsOpenModal: i } = Tt(), { notifications: a, setNotifications: s } = St(), { setIsOpen: e } = ct(), l = window.location.href;
2146
+ function r() {
2147
+ navigator.clipboard.writeText(l), s([
2124
2148
  ...a,
2125
2149
  {
2126
- id: Z(),
2150
+ id: J(),
2127
2151
  message: "Link copied to clipboard",
2128
2152
  status: "success"
2129
2153
  }
2130
2154
  ]);
2131
2155
  }
2132
- function u() {
2156
+ function h() {
2133
2157
  e(!1), setTimeout(() => {
2134
2158
  i(!1), e(!0);
2135
2159
  }, 300);
2136
2160
  }
2137
- function g(f, P) {
2138
- return f.length > P ? f.slice(0, P) + "..." : f;
2161
+ function f(v, M) {
2162
+ return v.length > M ? v.slice(0, M) + "..." : v;
2139
2163
  }
2140
2164
  return /* @__PURE__ */ t.jsxs(
2141
2165
  "div",
2142
2166
  {
2143
- className: st.modal,
2144
- onClick: (f) => f.stopPropagation(),
2167
+ className: nt.modal,
2168
+ onClick: (v) => v.stopPropagation(),
2145
2169
  children: [
2146
- /* @__PURE__ */ t.jsxs("div", { className: st.header, children: [
2147
- /* @__PURE__ */ t.jsx("div", { className: st.title, children: r }),
2170
+ /* @__PURE__ */ t.jsxs("div", { className: nt.header, children: [
2171
+ /* @__PURE__ */ t.jsx("div", { className: nt.title, children: d }),
2148
2172
  /* @__PURE__ */ t.jsx(
2149
- v,
2173
+ b,
2150
2174
  {
2151
2175
  name: "X",
2152
2176
  fill: "#757575",
2153
- onClick: u,
2177
+ onClick: h,
2154
2178
  hoverable: !0
2155
2179
  }
2156
2180
  )
2157
2181
  ] }),
2158
- /* @__PURE__ */ t.jsxs("div", { className: st.copyWrapper, children: [
2182
+ /* @__PURE__ */ t.jsxs("div", { className: nt.copyWrapper, children: [
2159
2183
  /* @__PURE__ */ t.jsxs(
2160
- D,
2184
+ R,
2161
2185
  {
2162
2186
  type: "Secondary",
2163
- onClick: d,
2187
+ onClick: r,
2164
2188
  style: {
2165
2189
  flex: 1
2166
2190
  },
2167
2191
  children: [
2168
- /* @__PURE__ */ t.jsx("div", { className: st.copyText, children: g(c, 100) }),
2169
- /* @__PURE__ */ t.jsx("div", { className: st.copyTextMobile, children: g(c, 40) }),
2170
- /* @__PURE__ */ t.jsx("div", { className: st.copyTextMiniMobile, children: g(c, 20) })
2192
+ /* @__PURE__ */ t.jsx("div", { className: nt.copyText, children: f(l, 100) }),
2193
+ /* @__PURE__ */ t.jsx("div", { className: nt.copyTextMobile, children: f(l, 40) }),
2194
+ /* @__PURE__ */ t.jsx("div", { className: nt.copyTextMiniMobile, children: f(l, 20) })
2171
2195
  ]
2172
2196
  }
2173
2197
  ),
2174
2198
  /* @__PURE__ */ t.jsx(
2175
- D,
2199
+ R,
2176
2200
  {
2177
2201
  type: "Secondary",
2178
- onClick: d,
2202
+ onClick: r,
2179
2203
  children: a.find(
2180
- (f) => f.message === "Link copied to clipboard"
2181
- ) ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
2204
+ (v) => v.message === "Link copied to clipboard"
2205
+ ) ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2182
2206
  }
2183
2207
  )
2184
2208
  ] })
2185
2209
  ]
2186
2210
  }
2187
2211
  );
2188
- }, Gs = "_accordion_1s1lq_1", Ws = "_header_1s1lq_9", Xs = "_icon_1s1lq_18", Qs = "_open_1s1lq_21", Js = "_content_1s1lq_25", ct = {
2189
- accordion: Gs,
2190
- header: Ws,
2191
- icon: Xs,
2192
- open: Qs,
2193
- content: Js
2194
- }, Ln = ({ title: r, content: i, defaultOpen: a = !1 }) => {
2195
- const [s, e] = m.useState(a), [c, d] = m.useState(0), u = m.useRef(null), g = () => {
2212
+ }, Ws = "_accordion_1s1lq_1", Xs = "_header_1s1lq_9", Qs = "_icon_1s1lq_18", Js = "_open_1s1lq_21", Ks = "_content_1s1lq_25", rt = {
2213
+ accordion: Ws,
2214
+ header: Xs,
2215
+ icon: Qs,
2216
+ open: Js,
2217
+ content: Ks
2218
+ }, zn = ({ title: d, content: i, defaultOpen: a = !1 }) => {
2219
+ const [s, e] = g.useState(a), [l, r] = g.useState(0), h = g.useRef(null), f = () => {
2196
2220
  e(!s);
2197
2221
  };
2198
- return m.useEffect(() => {
2199
- u.current && d(s ? u.current.scrollHeight : 0);
2200
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: ct.accordion, children: [
2222
+ return g.useEffect(() => {
2223
+ h.current && r(s ? h.current.scrollHeight : 0);
2224
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: rt.accordion, children: [
2201
2225
  /* @__PURE__ */ t.jsxs(
2202
2226
  "div",
2203
2227
  {
2204
- className: ct.header,
2205
- onClick: g,
2228
+ className: rt.header,
2229
+ onClick: f,
2206
2230
  children: [
2207
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
2208
- /* @__PURE__ */ t.jsx("div", { className: F(ct.icon, { [ct.open]: s }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
2231
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
2232
+ /* @__PURE__ */ t.jsx("div", { className: V(rt.icon, { [rt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2209
2233
  ]
2210
2234
  }
2211
2235
  ),
2212
2236
  /* @__PURE__ */ t.jsx(
2213
2237
  "div",
2214
2238
  {
2215
- ref: u,
2216
- className: ct.content,
2217
- style: { height: `${c}px` },
2239
+ ref: h,
2240
+ className: rt.content,
2241
+ style: { height: `${l}px` },
2218
2242
  children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
2219
2243
  }
2220
2244
  )
2221
2245
  ] });
2222
- }, Ks = ({ children: r, path: i, className: a, target: s = "_self", id: e }) => {
2246
+ }, Zs = ({ children: d, path: i, className: a, target: s = "_self", id: e }) => {
2223
2247
  if (window.location.pathname.includes("/admin/builder"))
2224
2248
  return /* @__PURE__ */ t.jsx(
2225
2249
  "div",
@@ -2228,44 +2252,44 @@ const ts = (r) => {
2228
2252
  role: "link",
2229
2253
  style: { cursor: "pointer" },
2230
2254
  id: e,
2231
- children: r
2255
+ children: d
2232
2256
  }
2233
2257
  );
2234
- const c = bt(), d = /^https?:\/\//.test(i), u = (g) => {
2235
- d || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.open(i, "_self") : (g.preventDefault(), c(i));
2258
+ const l = yt(), r = /^https?:\/\//.test(i), h = (f) => {
2259
+ r || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.open(i, "_self") : (f.preventDefault(), l(i));
2236
2260
  };
2237
2261
  return /* @__PURE__ */ t.jsx(
2238
2262
  "div",
2239
2263
  {
2240
- onClick: u,
2264
+ onClick: h,
2241
2265
  className: a,
2242
2266
  role: "link",
2243
2267
  style: { cursor: "pointer" },
2244
2268
  id: e,
2245
- children: r
2269
+ children: d
2246
2270
  }
2247
2271
  );
2248
- }, Zs = "_buttonsBlock_1b2rb_1", tn = {
2249
- buttonsBlock: Zs
2250
- }, zn = (r) => {
2251
- var f, P;
2252
- const { setIsOpen: i, setModalType: a, productId: s } = r, { cart: e } = at(), { pageContext: c } = vt(), d = (f = c == null ? void 0 : c.listings) == null ? void 0 : f.find((j) => j.id === s);
2253
- if (!d)
2272
+ }, tn = "_buttonsBlock_1b2rb_1", en = {
2273
+ buttonsBlock: tn
2274
+ }, Vn = (d) => {
2275
+ var v, M;
2276
+ const { setIsOpen: i, setModalType: a, productId: s } = d, { cart: e } = ot(), { pageContext: l } = bt(), r = (v = l == null ? void 0 : l.listings) == null ? void 0 : v.find((x) => x.id === s);
2277
+ if (!r)
2254
2278
  return null;
2255
- const u = (P = c == null ? void 0 : c.products) == null ? void 0 : P.find(
2256
- (j) => j.uniquePath === d.productData.uniquePath
2279
+ const h = (M = l == null ? void 0 : l.products) == null ? void 0 : M.find(
2280
+ (x) => x.uniquePath === r.productData.uniquePath
2257
2281
  );
2258
- if (!u)
2282
+ if (!h)
2259
2283
  return null;
2260
- const g = e.parts.find((j) => j.productId === u.id);
2284
+ const f = e.parts.find((x) => x.productId === h.id);
2261
2285
  return /* @__PURE__ */ t.jsxs(
2262
2286
  "div",
2263
2287
  {
2264
- className: tn.buttonsBlock,
2265
- onClick: (j) => j.stopPropagation(),
2288
+ className: en.buttonsBlock,
2289
+ onClick: (x) => x.stopPropagation(),
2266
2290
  children: [
2267
2291
  /* @__PURE__ */ t.jsx(
2268
- D,
2292
+ R,
2269
2293
  {
2270
2294
  type: "Secondary",
2271
2295
  style: {
@@ -2274,11 +2298,11 @@ const ts = (r) => {
2274
2298
  onClick: () => {
2275
2299
  a("Add To Cart"), i(!0);
2276
2300
  },
2277
- children: g ? "Add More" : "Add To Cart"
2301
+ children: f ? "Add More" : "Add To Cart"
2278
2302
  }
2279
2303
  ),
2280
2304
  /* @__PURE__ */ t.jsx(
2281
- D,
2305
+ R,
2282
2306
  {
2283
2307
  type: "Primary",
2284
2308
  onClick: () => {
@@ -2290,15 +2314,15 @@ const ts = (r) => {
2290
2314
  ]
2291
2315
  }
2292
2316
  );
2293
- }, en = "_wrapper_27wzz_1", sn = "_logo_27wzz_8", nn = "_info_27wzz_12", It = {
2294
- wrapper: en,
2295
- logo: sn,
2296
- info: nn
2297
- }, Hn = ({ date: r }) => {
2298
- const { general: i } = Lt();
2317
+ }, sn = "_wrapper_27wzz_1", nn = "_logo_27wzz_8", an = "_info_27wzz_12", Nt = {
2318
+ wrapper: sn,
2319
+ logo: nn,
2320
+ info: an
2321
+ }, Hn = ({ date: d }) => {
2322
+ const { general: i } = Ut();
2299
2323
  if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2300
2324
  function a(s) {
2301
- const e = new Date(s), c = {
2325
+ const e = new Date(s), l = {
2302
2326
  month: "short",
2303
2327
  day: "2-digit",
2304
2328
  year: "numeric",
@@ -2306,10 +2330,10 @@ const ts = (r) => {
2306
2330
  minute: "2-digit",
2307
2331
  hour12: !1
2308
2332
  };
2309
- return e.toLocaleDateString("en-US", c);
2333
+ return e.toLocaleDateString("en-US", l);
2310
2334
  }
2311
- return /* @__PURE__ */ t.jsxs("div", { className: It.wrapper, children: [
2312
- /* @__PURE__ */ t.jsx("div", { className: It.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2335
+ return /* @__PURE__ */ t.jsxs("div", { className: Nt.wrapper, children: [
2336
+ /* @__PURE__ */ t.jsx("div", { className: Nt.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2313
2337
  "img",
2314
2338
  {
2315
2339
  src: `https://imagedelivery.net/${i.info.logo.cfId}/w=500,h=500`,
@@ -2317,108 +2341,124 @@ const ts = (r) => {
2317
2341
  style: { objectFit: "contain", width: "48px", height: "48px" }
2318
2342
  }
2319
2343
  ) : /* @__PURE__ */ t.jsx(
2320
- v,
2344
+ b,
2321
2345
  {
2322
2346
  name: "Image",
2323
2347
  width: 48,
2324
2348
  height: 48
2325
2349
  }
2326
2350
  ) }),
2327
- /* @__PURE__ */ t.jsxs("div", { className: It.info, children: [
2351
+ /* @__PURE__ */ t.jsxs("div", { className: Nt.info, children: [
2328
2352
  /* @__PURE__ */ t.jsx("h3", { id: "h4", children: i.info.name }),
2329
- /* @__PURE__ */ t.jsx("p", { id: "p", children: a(r) })
2353
+ /* @__PURE__ */ t.jsx("p", { id: "p", children: a(d) })
2330
2354
  ] })
2331
2355
  ] });
2332
- }, an = "_variants_puxd1_80", on = "_variant_puxd1_80", cn = "_stock_puxd1_98", rn = "_variantInfo_puxd1_105", ln = "_chargeTypes_puxd1_165", dn = "_charge_puxd1_165", un = "_chargeActive_puxd1_190", hn = "_title_puxd1_198", pn = "_modal_puxd1_204", mn = "_header_puxd1_224", gn = "_productOptions_puxd1_232", fn = "_loading_puxd1_236", J = {
2333
- variants: an,
2334
- variant: on,
2335
- stock: cn,
2336
- variantInfo: rn,
2337
- chargeTypes: ln,
2338
- charge: dn,
2339
- chargeActive: un,
2340
- title: hn,
2341
- modal: pn,
2342
- header: mn,
2343
- productOptions: gn,
2344
- loading: fn
2345
- }, Un = (r) => {
2346
- var n;
2347
- const { pageContext: i } = vt(), a = (n = i == null ? void 0 : i.listings) == null ? void 0 : n.find((o) => o.id === r.productId), [s, e] = m.useState(!0), [c, d] = m.useState(null), u = (c == null ? void 0 : c.variants[0]) || null, [g, f] = m.useState(
2348
- u != null && u.chargeTypes && u.chargeTypes.length > 1 ? u.chargeTypes[0] : "ONE_TIME"
2349
- ), { addProducts: P } = at(), { setIsOpen: j } = ot();
2350
- return m.useEffect(() => {
2356
+ }, on = "_variants_puxd1_80", cn = "_variant_puxd1_80", rn = "_stock_puxd1_98", ln = "_variantInfo_puxd1_105", dn = "_chargeTypes_puxd1_165", un = "_charge_puxd1_165", hn = "_chargeActive_puxd1_190", pn = "_title_puxd1_198", mn = "_modal_puxd1_204", gn = "_header_puxd1_224", fn = "_productOptions_puxd1_232", xn = "_loading_puxd1_236", Q = {
2357
+ variants: on,
2358
+ variant: cn,
2359
+ stock: rn,
2360
+ variantInfo: ln,
2361
+ chargeTypes: dn,
2362
+ charge: un,
2363
+ chargeActive: hn,
2364
+ title: pn,
2365
+ modal: mn,
2366
+ header: gn,
2367
+ productOptions: fn,
2368
+ loading: xn
2369
+ }, Fn = (d) => {
2370
+ var c;
2371
+ const { pageContext: i } = bt(), a = (c = i == null ? void 0 : i.listings) == null ? void 0 : c.find((o) => o.id === d.productId), [s, e] = g.useState(!0), [l, r] = g.useState(null), h = (l == null ? void 0 : l.variants[0]) || null, [f, v] = g.useState(
2372
+ h != null && h.chargeTypes && h.chargeTypes.length > 1 ? h.chargeTypes[0] : "ONE_TIME"
2373
+ ), { addProducts: M } = ot(), { setIsOpen: x } = ct();
2374
+ return g.useEffect(() => {
2351
2375
  (async () => {
2352
2376
  e(!0);
2353
- const p = await zt(
2377
+ const n = await zt(
2354
2378
  encodeURIComponent(
2355
2379
  `/product/${a.productData.uniquePath}`
2356
2380
  )
2357
2381
  );
2358
- P(p == null ? void 0 : p.data.products), d(p == null ? void 0 : p.data.products[0]), e(!1);
2382
+ M(n == null ? void 0 : n.data.products), r(n == null ? void 0 : n.data.products[0]), e(!1);
2359
2383
  })();
2360
- }, []), m.useEffect(() => {
2361
- j(!0);
2362
- }, []), /* @__PURE__ */ t.jsx(dt, { close: r.setIsOpen, children: /* @__PURE__ */ t.jsxs(
2384
+ }, []), g.useEffect(() => {
2385
+ x(!0);
2386
+ }, []), /* @__PURE__ */ t.jsx(ut, { close: d.setIsOpen, children: /* @__PURE__ */ t.jsxs(
2363
2387
  "div",
2364
2388
  {
2365
- className: J.modal,
2389
+ className: Q.modal,
2366
2390
  onClick: (o) => o.stopPropagation(),
2367
2391
  children: [
2368
- s && /* @__PURE__ */ t.jsx("div", { className: J.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
2369
- r.type === "Add To Cart" && c && u && !s && /* @__PURE__ */ t.jsx(
2370
- xn,
2392
+ s && /* @__PURE__ */ t.jsx("div", { className: Q.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
2393
+ d.type === "Add To Cart" && l && h && !s && /* @__PURE__ */ t.jsx(
2394
+ _n,
2371
2395
  {
2372
- variants: c.variants,
2373
- activeVariant: u,
2374
- activeChargeType: g,
2375
- setActiveChargeType: f,
2376
- productId: c.id,
2377
- setIsOpen: r.setIsOpen
2396
+ variants: l.variants,
2397
+ activeVariant: h,
2398
+ activeChargeType: f,
2399
+ setActiveChargeType: v,
2400
+ productId: l.id,
2401
+ setIsOpen: d.setIsOpen
2378
2402
  }
2379
2403
  ),
2380
- r.type === "Buy Now" && c && !s && /* @__PURE__ */ t.jsx(
2381
- _n,
2404
+ d.type === "Buy Now" && l && !s && /* @__PURE__ */ t.jsx(
2405
+ jn,
2382
2406
  {
2383
- product: c,
2384
- setIsOpen: r.setIsOpen
2407
+ product: l,
2408
+ setIsOpen: d.setIsOpen
2385
2409
  }
2386
2410
  )
2387
2411
  ]
2388
2412
  }
2389
2413
  ) });
2390
- }, xn = (r) => {
2391
- const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: c, setIsOpen: d } = r, { cart: u, addProductToCart: g, addProducts: f, updateQuantityOfProduct: P } = at(), { notifications: j, setNotifications: n } = Ct(), { pageContext: o } = vt(), { setIsOpen: p } = ot(), q = () => {
2392
- p(!1), setTimeout(() => {
2393
- d(!1);
2414
+ }, _n = (d) => {
2415
+ const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: l, setIsOpen: r } = d, { cart: h, addProductToCart: f, addProducts: v, updateQuantityOfProduct: M } = ot(), { notifications: x, setNotifications: c } = St(), { pageContext: o } = bt(), { setIsOpen: n } = ct(), q = () => {
2416
+ n(!1), setTimeout(() => {
2417
+ r(!1);
2394
2418
  }, 300);
2395
2419
  };
2396
- async function x(_) {
2397
- const y = u.parts.find(
2398
- (M) => M.productId === r.productId && M.productVariantId === _
2420
+ async function _(j) {
2421
+ const N = h.parts.find(
2422
+ (k) => k.productId === d.productId && k.productVariantId === j
2399
2423
  );
2400
- y ? P({
2401
- productId: c,
2402
- productVariantId: _,
2403
- quantity: y.quantity + 1
2404
- }) : (o != null && o.products && await f(o.products), await g({
2405
- productId: c,
2406
- productVariantId: _,
2407
- quantity: 1
2408
- })), n([
2409
- ...j,
2410
- {
2411
- id: Z(),
2412
- message: "Product added to cart",
2413
- status: "success"
2424
+ if (N)
2425
+ M({
2426
+ productId: l,
2427
+ productVariantId: j,
2428
+ quantity: N.quantity + 1
2429
+ });
2430
+ else {
2431
+ o != null && o.products && (console.log("pageContext.products in product card modal", o.products), v(o.products));
2432
+ try {
2433
+ f({
2434
+ productId: l,
2435
+ productVariantId: j,
2436
+ quantity: 1
2437
+ }), c([
2438
+ ...x,
2439
+ {
2440
+ id: J(),
2441
+ message: "Product added to cart",
2442
+ status: "success"
2443
+ }
2444
+ ]);
2445
+ } catch (k) {
2446
+ console.log(k, "error"), c([
2447
+ ...x,
2448
+ {
2449
+ id: J(),
2450
+ message: `Product failed to add to cart: ${k}`,
2451
+ status: "error"
2452
+ }
2453
+ ]);
2414
2454
  }
2415
- ]);
2455
+ }
2416
2456
  }
2417
2457
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2418
- /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2419
- /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
2458
+ /* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
2459
+ /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a Variant" }),
2420
2460
  /* @__PURE__ */ t.jsx(
2421
- v,
2461
+ b,
2422
2462
  {
2423
2463
  name: "X",
2424
2464
  width: 24,
@@ -2429,59 +2469,59 @@ const ts = (r) => {
2429
2469
  }
2430
2470
  )
2431
2471
  ] }),
2432
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: J.chargeTypes, children: e.chargeTypes.map((_) => /* @__PURE__ */ t.jsx(
2472
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: Q.chargeTypes, children: e.chargeTypes.map((j) => /* @__PURE__ */ t.jsx(
2433
2473
  "div",
2434
2474
  {
2435
- className: F(J.charge, {
2436
- [J.chargeActive]: a === _
2475
+ className: V(Q.charge, {
2476
+ [Q.chargeActive]: a === j
2437
2477
  }),
2438
- onClick: () => s(_),
2439
- children: St[_]
2478
+ onClick: () => s(j),
2479
+ children: kt[j]
2440
2480
  },
2441
- _
2481
+ j
2442
2482
  )) }),
2443
- /* @__PURE__ */ t.jsx("div", { className: J.variants, children: i.map((_) => {
2444
- var y, M;
2483
+ /* @__PURE__ */ t.jsx("div", { className: Q.variants, children: i.map((j) => {
2484
+ var N, k, D;
2445
2485
  return /* @__PURE__ */ t.jsxs(
2446
2486
  "div",
2447
2487
  {
2448
- className: F(J.variant),
2488
+ className: V(Q.variant),
2449
2489
  onClick: () => {
2450
- x(_.id), d(!1);
2490
+ _(j.id), r(!1);
2451
2491
  },
2452
2492
  children: [
2453
- /* @__PURE__ */ t.jsxs("div", { className: J.variantInfo, children: [
2454
- /* @__PURE__ */ t.jsx("span", { className: J.title, children: _.name }),
2455
- /* @__PURE__ */ t.jsxs("span", { children: [
2456
- "$",
2457
- a === "ONE_TIME" ? _.price.amount : _.subscriptionSettings ? _.subscriptionSettings.price.amount : "Price Not Found"
2458
- ] })
2493
+ /* @__PURE__ */ t.jsxs("div", { className: Q.variantInfo, children: [
2494
+ /* @__PURE__ */ t.jsx("span", { className: Q.title, children: j.name }),
2495
+ /* @__PURE__ */ t.jsx("span", { children: tt({
2496
+ amount: a === "ONE_TIME" ? j.price.amount : j.subscriptionSettings ? j.subscriptionSettings.price.amount : 0,
2497
+ currency: a === "ONE_TIME" ? j.price.currency : ((N = j.subscriptionSettings) == null ? void 0 : N.price.currency) || "USD"
2498
+ }) })
2459
2499
  ] }),
2460
- /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: J.stock, children: [
2461
- (y = _.quantity.restrictions) != null && y.max || _.quantity.available !== void 0 ? ((M = _.quantity.restrictions) == null ? void 0 : M.max) || _.quantity.available : "∞",
2500
+ /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: Q.stock, children: [
2501
+ (k = j.quantity.restrictions) != null && k.max || j.quantity.available !== void 0 ? ((D = j.quantity.restrictions) == null ? void 0 : D.max) || j.quantity.available : "∞",
2462
2502
  " ",
2463
2503
  "in stock"
2464
2504
  ] }) })
2465
2505
  ]
2466
2506
  },
2467
- _.id
2507
+ j.id
2468
2508
  );
2469
2509
  }) })
2470
2510
  ] });
2471
- }, _n = (r) => {
2472
- const { product: i, setIsOpen: a } = r, { setIsOpen: s } = ot(), e = () => {
2511
+ }, jn = (d) => {
2512
+ const { product: i, setIsOpen: a } = d, { setIsOpen: s } = ct(), e = () => {
2473
2513
  s(!1), setTimeout(() => {
2474
2514
  a(!1);
2475
2515
  }, 300);
2476
2516
  };
2477
2517
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2478
- /* @__PURE__ */ t.jsxs("div", { className: J.header, children: [
2518
+ /* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
2479
2519
  /* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
2480
2520
  "Buy ",
2481
- it(i.name)
2521
+ at(i.name)
2482
2522
  ] }),
2483
2523
  /* @__PURE__ */ t.jsx(
2484
- v,
2524
+ b,
2485
2525
  {
2486
2526
  name: "X",
2487
2527
  width: 24,
@@ -2496,73 +2536,73 @@ const ts = (r) => {
2496
2536
  }
2497
2537
  )
2498
2538
  ] }),
2499
- /* @__PURE__ */ t.jsx("div", { className: J.productOptions, children: /* @__PURE__ */ t.jsx(
2500
- ts,
2539
+ /* @__PURE__ */ t.jsx("div", { className: Q.productOptions, children: /* @__PURE__ */ t.jsx(
2540
+ es,
2501
2541
  {
2502
2542
  product: i,
2503
2543
  setIsOpen: a
2504
2544
  }
2505
2545
  ) })
2506
2546
  ] });
2507
- }, jn = "_contentModal_2a136_1", vn = "_modalTop_2a136_13", bn = "_loading_2a136_19", yn = "_modalCards_2a136_27", In = "_modalImage_2a136_32", Nn = "_card_2a136_37", Cn = "_cardInfo_2a136_48", Sn = "_cardButtons_2a136_55", kn = "_title_2a136_61", wn = "_blockImage_2a136_68", W = {
2508
- contentModal: jn,
2509
- modalTop: vn,
2510
- loading: bn,
2511
- modalCards: yn,
2512
- modalImage: In,
2513
- card: Nn,
2514
- cardInfo: Cn,
2515
- cardButtons: Sn,
2516
- title: kn,
2517
- blockImage: wn
2518
- }, Fn = (r) => {
2519
- const { setIsOpen: i, pageContext: a, groupData: s, setProductId: e, setIsProductModalOpen: c } = r, [d, u] = m.useState(null), [g, f] = m.useState(!0), { setIsOpen: P } = ot();
2520
- m.useEffect(() => {
2521
- var p;
2522
- f(!0);
2523
- const o = (p = a.listings) == null ? void 0 : p.filter(
2547
+ }, vn = "_contentModal_2a136_1", bn = "_modalTop_2a136_13", yn = "_loading_2a136_19", In = "_modalCards_2a136_27", Nn = "_modalImage_2a136_32", Cn = "_card_2a136_37", Sn = "_cardInfo_2a136_48", kn = "_cardButtons_2a136_55", wn = "_title_2a136_61", Pn = "_blockImage_2a136_68", G = {
2548
+ contentModal: vn,
2549
+ modalTop: bn,
2550
+ loading: yn,
2551
+ modalCards: In,
2552
+ modalImage: Nn,
2553
+ card: Cn,
2554
+ cardInfo: Sn,
2555
+ cardButtons: kn,
2556
+ title: wn,
2557
+ blockImage: Pn
2558
+ }, Yn = (d) => {
2559
+ const { setIsOpen: i, pageContext: a, groupData: s, setProductId: e, setIsProductModalOpen: l } = d, [r, h] = g.useState(null), [f, v] = g.useState(!0), { setIsOpen: M } = ct();
2560
+ g.useEffect(() => {
2561
+ var n;
2562
+ v(!0);
2563
+ const o = (n = a.listings) == null ? void 0 : n.filter(
2524
2564
  (q) => s.listingIdList.includes(q.id)
2525
2565
  );
2526
- o && u([...o]), f(!1);
2527
- }, [a]), m.useEffect(() => {
2528
- P(!0);
2566
+ o && h([...o]), v(!1);
2567
+ }, [a]), g.useEffect(() => {
2568
+ M(!0);
2529
2569
  }, []);
2530
- const j = () => {
2531
- P(!1), setTimeout(() => {
2570
+ const x = () => {
2571
+ M(!1), setTimeout(() => {
2532
2572
  i(!1);
2533
2573
  }, 300);
2534
2574
  };
2535
- function n(o) {
2575
+ function c(o) {
2536
2576
  return o.productData.compareAtPrice ? o.productData.compareAtPrice.amount : 0;
2537
2577
  }
2538
- return /* @__PURE__ */ t.jsx(dt, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
2578
+ return /* @__PURE__ */ t.jsx(ut, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
2539
2579
  "div",
2540
2580
  {
2541
- className: W.contentModal,
2581
+ className: G.contentModal,
2542
2582
  onClick: (o) => o.stopPropagation(),
2543
2583
  children: [
2544
- /* @__PURE__ */ t.jsxs("div", { className: W.modalTop, children: [
2584
+ /* @__PURE__ */ t.jsxs("div", { className: G.modalTop, children: [
2545
2585
  /* @__PURE__ */ t.jsx(
2546
2586
  "span",
2547
2587
  {
2548
- className: W.title,
2588
+ className: G.title,
2549
2589
  id: "h4",
2550
- children: it(s.name)
2590
+ children: at(s.name)
2551
2591
  }
2552
2592
  ),
2553
2593
  /* @__PURE__ */ t.jsx(
2554
- v,
2594
+ b,
2555
2595
  {
2556
2596
  name: "X",
2557
2597
  hoverable: !0,
2558
- onClick: j
2598
+ onClick: x
2559
2599
  }
2560
2600
  )
2561
2601
  ] }),
2562
- !g && d && /* @__PURE__ */ t.jsx("div", { className: W.modalCards, children: d.map((o) => /* @__PURE__ */ t.jsxs(
2602
+ !f && r && /* @__PURE__ */ t.jsx("div", { className: G.modalCards, children: r.map((o) => /* @__PURE__ */ t.jsxs(
2563
2603
  "div",
2564
2604
  {
2565
- className: W.card,
2605
+ className: G.card,
2566
2606
  children: [
2567
2607
  /* @__PURE__ */ t.jsx("div", { children: o.productData.images[0] ? /* @__PURE__ */ t.jsx(
2568
2608
  "img",
@@ -2571,99 +2611,99 @@ const ts = (r) => {
2571
2611
  alt: "",
2572
2612
  width: 64,
2573
2613
  height: 64,
2574
- className: W.modalImage
2614
+ className: G.modalImage
2575
2615
  }
2576
- ) : /* @__PURE__ */ t.jsx("div", { className: F(W.blockImage, W.modalImage), children: /* @__PURE__ */ t.jsx(v, { name: "Image" }) }) }),
2577
- /* @__PURE__ */ t.jsxs("div", { className: W.cardInfo, children: [
2616
+ ) : /* @__PURE__ */ t.jsx("div", { className: V(G.blockImage, G.modalImage), children: /* @__PURE__ */ t.jsx(b, { name: "Image" }) }) }),
2617
+ /* @__PURE__ */ t.jsxs("div", { className: G.cardInfo, children: [
2578
2618
  /* @__PURE__ */ t.jsxs(
2579
2619
  "span",
2580
2620
  {
2581
- className: W.name,
2621
+ className: G.name,
2582
2622
  id: "h5",
2583
2623
  children: [
2584
- it(o.productData.name),
2624
+ at(o.productData.name),
2585
2625
  " $",
2586
2626
  o.productData.minPrice.amount,
2587
2627
  " ",
2588
2628
  "- $",
2589
- n(o)
2629
+ c(o)
2590
2630
  ]
2591
2631
  }
2592
2632
  ),
2593
2633
  o.productData.shortDescription && /* @__PURE__ */ t.jsx(
2594
2634
  "span",
2595
2635
  {
2596
- className: W.short,
2636
+ className: G.short,
2597
2637
  id: "md",
2598
- children: it(o.productData.shortDescription)
2638
+ children: at(o.productData.shortDescription)
2599
2639
  }
2600
2640
  ),
2601
2641
  /* @__PURE__ */ t.jsx("span", {})
2602
2642
  ] }),
2603
- /* @__PURE__ */ t.jsxs("div", { className: W.cardButtons, children: [
2643
+ /* @__PURE__ */ t.jsxs("div", { className: G.cardButtons, children: [
2604
2644
  /* @__PURE__ */ t.jsx(
2605
- D,
2645
+ R,
2606
2646
  {
2607
2647
  type: "Secondary",
2608
2648
  onClick: () => {
2609
- e(o.id), i(!1), c(!0);
2649
+ e(o.id), i(!1), l(!0);
2610
2650
  },
2611
2651
  children: "Buy"
2612
2652
  }
2613
2653
  ),
2614
- /* @__PURE__ */ t.jsx(Ks, { path: `/product/${o.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(D, { type: "Primary", children: "View Details" }) })
2654
+ /* @__PURE__ */ t.jsx(Zs, { path: `/product/${o.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(R, { type: "Primary", children: "View Details" }) })
2615
2655
  ] })
2616
2656
  ]
2617
2657
  },
2618
2658
  o.id
2619
2659
  )) }),
2620
- g && /* @__PURE__ */ t.jsx("div", { className: W.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
2660
+ f && /* @__PURE__ */ t.jsx("div", { className: G.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
2621
2661
  ]
2622
2662
  }
2623
2663
  ) });
2624
2664
  };
2625
2665
  export {
2626
- Ln as Accordion,
2627
- Es as BurgerMenuButton,
2628
- D as Button,
2629
- Te as ButtonTypeSettings,
2630
- On as ButtonsSettings,
2631
- Tn as CategorySettings,
2632
- St as ChargeTypes,
2633
- qt as ChooseImage,
2634
- Gn as ChooseImageModal,
2635
- Os as EmptyCart,
2636
- qn as FormSettings,
2637
- Fn as GroupCardModal,
2638
- En as HeaderButtons,
2639
- v as Icon,
2640
- Nt as InputSettings,
2641
- Et as InputUI,
2642
- Wn as ItemsSettings,
2643
- Bn as LayoutSettings,
2644
- Ks as Link,
2645
- An as ListingSelector,
2666
+ zn as Accordion,
2667
+ Ds as BurgerMenuButton,
2668
+ R as Button,
2669
+ qe as ButtonTypeSettings,
2670
+ En as ButtonsSettings,
2671
+ $n as CategorySettings,
2672
+ kt as ChargeTypes,
2673
+ Ot as ChooseImage,
2674
+ Xn as ChooseImageModal,
2675
+ As as EmptyCart,
2676
+ An as FormSettings,
2677
+ Yn as GroupCardModal,
2678
+ Rn as HeaderButtons,
2679
+ b as Icon,
2680
+ Ct as InputSettings,
2681
+ Dt as InputUI,
2682
+ Qn as ItemsSettings,
2683
+ qn as LayoutSettings,
2684
+ Zs as Link,
2685
+ Dn as ListingSelector,
2646
2686
  Bt as Loader,
2647
2687
  Hn as MetaInfoPost,
2648
- dt as Modal,
2649
- Dn as PagesMobileMenu,
2650
- As as PagesMobileModal,
2651
- $n as PagesSettings,
2652
- zn as ProductCardButtons,
2653
- Un as ProductCardModal,
2654
- ts as ProductOptions,
2655
- Xn as RadioUI,
2656
- kt as RangeSelector,
2657
- nt as Select,
2658
- Qn as SelectInfiniteList,
2659
- Jn as SelectUI,
2660
- Rn as ShareLink,
2688
+ ut as Modal,
2689
+ Ln as PagesMobileMenu,
2690
+ Es as PagesMobileModal,
2691
+ On as PagesSettings,
2692
+ Vn as ProductCardButtons,
2693
+ Fn as ProductCardModal,
2694
+ es as ProductOptions,
2695
+ Jn as RadioUI,
2696
+ wt as RangeSelector,
2697
+ it as Select,
2698
+ Kn as SelectInfiniteList,
2699
+ Zn as SelectUI,
2700
+ Un as ShareLink,
2661
2701
  $s as ShoppingButton,
2662
- qs as ShoppingModalCart,
2663
- rt as Switch,
2664
- Kn as TextSettings,
2665
- Zn as TextareaSettings,
2666
- ti as TextareaUI,
2667
- ei as TypesText,
2668
- Tt as UserInfo
2702
+ Os as ShoppingModalCart,
2703
+ lt as Switch,
2704
+ ti as TextSettings,
2705
+ ei as TextareaSettings,
2706
+ si as TextareaUI,
2707
+ ni as TypesText,
2708
+ qt as UserInfo
2669
2709
  };