@everymatrix/cashier-method-details 1.53.12 → 1.54.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. package/components/CashierConfirmModal-BCFrtc41.js +1029 -0
  2. package/components/CashierConfirmModal-BPOCBgWd.cjs +4 -0
  3. package/components/CashierError-DJht4oPb.cjs +5 -0
  4. package/components/{CashierError-MwSUmltg.js → CashierError-DsrAZ7IP.js} +16 -16
  5. package/components/{CashierHeader-t-mKIY-_.js → CashierHeader-BQ4XCSyP.js} +2 -2
  6. package/components/CashierHeader-GmZvyCGt.cjs +1 -0
  7. package/components/{CashierIframeRedirect-OvWRLGOx.js → CashierIframeRedirect-BURzxRqb.js} +6 -6
  8. package/components/CashierIframeRedirect-DmTcvobN.cjs +1 -0
  9. package/components/{CashierMethodDetails-BcnSmVkq.js → CashierMethodDetails-DH9kVsIF.js} +887 -869
  10. package/components/CashierMethodDetails-Dnhdtcto.cjs +18 -0
  11. package/components/CashierModal-D7FMZ2Gy.cjs +1 -0
  12. package/components/{CashierModal-ClIRlRW4.js → CashierModal-DcNl8u1M.js} +1 -1
  13. package/components/{CashierNotifications-Ip7CfQWs.js → CashierNotifications-BOc2VfCm.js} +1 -1
  14. package/components/CashierNotifications-a_yYbXof.cjs +1 -0
  15. package/components/{CashierReceiptPage-CIlcvMvB.js → CashierReceiptPage-B-bW-hmW.js} +109 -108
  16. package/components/CashierReceiptPage-RF2yM8w0.cjs +1 -0
  17. package/components/{CashierSpinner-DjTQcN-x.js → CashierSpinner-BhoNpvFz.js} +1 -1
  18. package/components/CashierSpinner-spPx3NOj.cjs +1 -0
  19. package/es2015/cashier-method-details.cjs +1 -0
  20. package/es2015/cashier-method-details.js +16 -0
  21. package/package.json +16 -12
  22. package/components/CashierConfirmModal-agjo7360.js +0 -992
  23. package/esnext/cashier-method-details.js +0 -14
@@ -1,992 +0,0 @@
1
- function L() {
2
- }
3
- const xt = (t) => t;
4
- function vt(t, e) {
5
- for (const n in e) t[n] = e[n];
6
- return (
7
- /** @type {T & S} */
8
- t
9
- );
10
- }
11
- function _t(t) {
12
- return t();
13
- }
14
- function lt() {
15
- return /* @__PURE__ */ Object.create(null);
16
- }
17
- function k(t) {
18
- t.forEach(_t);
19
- }
20
- function st(t) {
21
- return typeof t == "function";
22
- }
23
- function Mt(t, e) {
24
- return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
25
- }
26
- let R;
27
- function ce(t, e) {
28
- return t === e ? !0 : (R || (R = document.createElement("a")), R.href = e, t === R.href);
29
- }
30
- function Et(t) {
31
- return Object.keys(t).length === 0;
32
- }
33
- function Lt(t, ...e) {
34
- if (t == null) {
35
- for (const s of e)
36
- s(void 0);
37
- return L;
38
- }
39
- const n = t.subscribe(...e);
40
- return n.unsubscribe ? () => n.unsubscribe() : n;
41
- }
42
- function ae(t, e, n) {
43
- t.$$.on_destroy.push(Lt(e, n));
44
- }
45
- function W(t, e, n, s) {
46
- if (t) {
47
- const i = mt(t, e, n, s);
48
- return t[0](i);
49
- }
50
- }
51
- function mt(t, e, n, s) {
52
- return t[1] && s ? vt(n.ctx.slice(), t[1](s(e))) : n.ctx;
53
- }
54
- function D(t, e, n, s) {
55
- if (t[2] && s) {
56
- const i = t[2](s(n));
57
- if (e.dirty === void 0)
58
- return i;
59
- if (typeof i == "object") {
60
- const r = [], l = Math.max(e.dirty.length, i.length);
61
- for (let o = 0; o < l; o += 1)
62
- r[o] = e.dirty[o] | i[o];
63
- return r;
64
- }
65
- return e.dirty | i;
66
- }
67
- return e.dirty;
68
- }
69
- function H(t, e, n, s, i, r) {
70
- if (i) {
71
- const l = mt(e, n, s, r);
72
- t.p(l, i);
73
- }
74
- }
75
- function I(t) {
76
- if (t.ctx.length > 32) {
77
- const e = [], n = t.ctx.length / 32;
78
- for (let s = 0; s < n; s++)
79
- e[s] = -1;
80
- return e;
81
- }
82
- return -1;
83
- }
84
- const pt = typeof window < "u";
85
- let kt = pt ? () => window.performance.now() : () => Date.now(), it = pt ? (t) => requestAnimationFrame(t) : L;
86
- const S = /* @__PURE__ */ new Set();
87
- function gt(t) {
88
- S.forEach((e) => {
89
- e.c(t) || (S.delete(e), e.f());
90
- }), S.size !== 0 && it(gt);
91
- }
92
- function jt(t) {
93
- let e;
94
- return S.size === 0 && it(gt), {
95
- promise: new Promise((n) => {
96
- S.add(e = { c: t, f: n });
97
- }),
98
- abort() {
99
- S.delete(e);
100
- }
101
- };
102
- }
103
- const ue = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : (
104
- // @ts-ignore Node typings have this
105
- global
106
- );
107
- function w(t, e) {
108
- t.appendChild(e);
109
- }
110
- function Ot(t, e, n) {
111
- const s = ot(t);
112
- if (!s.getElementById(e)) {
113
- const i = x("style");
114
- i.id = e, i.textContent = n, yt(s, i);
115
- }
116
- }
117
- function ot(t) {
118
- if (!t) return document;
119
- const e = t.getRootNode ? t.getRootNode() : t.ownerDocument;
120
- return e && /** @type {ShadowRoot} */
121
- e.host ? (
122
- /** @type {ShadowRoot} */
123
- e
124
- ) : t.ownerDocument;
125
- }
126
- function St(t) {
127
- const e = x("style");
128
- return e.textContent = "/* empty */", yt(ot(t), e), e.sheet;
129
- }
130
- function yt(t, e) {
131
- return w(
132
- /** @type {Document} */
133
- t.head || t,
134
- e
135
- ), e.sheet;
136
- }
137
- function rt(t, e, n) {
138
- t.insertBefore(e, n || null);
139
- }
140
- function N(t) {
141
- t.parentNode && t.parentNode.removeChild(t);
142
- }
143
- function fe(t, e) {
144
- for (let n = 0; n < t.length; n += 1)
145
- t[n] && t[n].d(e);
146
- }
147
- function x(t) {
148
- return document.createElement(t);
149
- }
150
- function ct(t) {
151
- return document.createElementNS("http://www.w3.org/2000/svg", t);
152
- }
153
- function bt(t) {
154
- return document.createTextNode(t);
155
- }
156
- function X() {
157
- return bt(" ");
158
- }
159
- function de() {
160
- return bt("");
161
- }
162
- function V(t, e, n, s) {
163
- return t.addEventListener(e, n, s), () => t.removeEventListener(e, n, s);
164
- }
165
- function he(t) {
166
- return function(e) {
167
- return e.preventDefault(), t.call(this, e);
168
- };
169
- }
170
- function _(t, e, n) {
171
- n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
172
- }
173
- function $e(t, e, n) {
174
- const s = e.toLowerCase();
175
- s in t ? t[s] = typeof t[s] == "boolean" && n === "" ? !0 : n : e in t ? t[e] = typeof t[e] == "boolean" && n === "" ? !0 : n : _(t, e, n);
176
- }
177
- function _e(t) {
178
- return t === "" ? null : +t;
179
- }
180
- function At(t) {
181
- return Array.from(t.childNodes);
182
- }
183
- function me(t, e) {
184
- e = "" + e, t.data !== e && (t.data = /** @type {string} */
185
- e);
186
- }
187
- function pe(t, e) {
188
- t.value = e ?? "";
189
- }
190
- function ge(t, e, n, s) {
191
- n == null ? t.style.removeProperty(e) : t.style.setProperty(e, n, "");
192
- }
193
- let q;
194
- function Nt() {
195
- if (q === void 0) {
196
- q = !1;
197
- try {
198
- typeof window < "u" && window.parent && window.parent.document;
199
- } catch {
200
- q = !0;
201
- }
202
- }
203
- return q;
204
- }
205
- function ye(t, e) {
206
- getComputedStyle(t).position === "static" && (t.style.position = "relative");
207
- const s = x("iframe");
208
- s.setAttribute(
209
- "style",
210
- "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"
211
- ), s.setAttribute("aria-hidden", "true"), s.tabIndex = -1;
212
- const i = Nt();
213
- let r;
214
- return i ? (s.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>", r = V(
215
- window,
216
- "message",
217
- /** @param {MessageEvent} event */
218
- (l) => {
219
- l.source === s.contentWindow && e();
220
- }
221
- )) : (s.src = "about:blank", s.onload = () => {
222
- r = V(s.contentWindow, "resize", e), e();
223
- }), w(t, s), () => {
224
- (i || r && s.contentWindow) && r(), N(s);
225
- };
226
- }
227
- function be(t, e, n) {
228
- t.classList.toggle(e, !!n);
229
- }
230
- function zt(t, e, { bubbles: n = !1, cancelable: s = !1 } = {}) {
231
- return new CustomEvent(t, { detail: e, bubbles: n, cancelable: s });
232
- }
233
- function Pt(t) {
234
- const e = {};
235
- return t.childNodes.forEach(
236
- /** @param {Element} node */
237
- (n) => {
238
- e[n.slot || "default"] = !0;
239
- }
240
- ), e;
241
- }
242
- const G = /* @__PURE__ */ new Map();
243
- let K = 0;
244
- function Bt(t) {
245
- let e = 5381, n = t.length;
246
- for (; n--; ) e = (e << 5) - e ^ t.charCodeAt(n);
247
- return e >>> 0;
248
- }
249
- function Tt(t, e) {
250
- const n = { stylesheet: St(e), rules: {} };
251
- return G.set(t, n), n;
252
- }
253
- function at(t, e, n, s, i, r, l, o = 0) {
254
- const u = 16.666 / s;
255
- let c = `{
256
- `;
257
- for (let g = 0; g <= 1; g += u) {
258
- const m = e + (n - e) * r(g);
259
- c += g * 100 + `%{${l(m, 1 - m)}}
260
- `;
261
- }
262
- const p = c + `100% {${l(n, 1 - n)}}
263
- }`, $ = `__svelte_${Bt(p)}_${o}`, y = ot(t), { stylesheet: f, rules: d } = G.get(y) || Tt(y, t);
264
- d[$] || (d[$] = !0, f.insertRule(`@keyframes ${$} ${p}`, f.cssRules.length));
265
- const h = t.style.animation || "";
266
- return t.style.animation = `${h ? `${h}, ` : ""}${$} ${s}ms linear ${i}ms 1 both`, K += 1, $;
267
- }
268
- function Rt(t, e) {
269
- const n = (t.style.animation || "").split(", "), s = n.filter(
270
- e ? (r) => r.indexOf(e) < 0 : (r) => r.indexOf("__svelte") === -1
271
- // remove all Svelte animations
272
- ), i = n.length - s.length;
273
- i && (t.style.animation = s.join(", "), K -= i, K || Wt());
274
- }
275
- function Wt() {
276
- it(() => {
277
- K || (G.forEach((t) => {
278
- const { ownerNode: e } = t.stylesheet;
279
- e && N(e);
280
- }), G.clear());
281
- });
282
- }
283
- let T;
284
- function B(t) {
285
- T = t;
286
- }
287
- function Dt() {
288
- if (!T) throw new Error("Function called outside component initialization");
289
- return T;
290
- }
291
- function we(t) {
292
- Dt().$$.on_mount.push(t);
293
- }
294
- const O = [], et = [];
295
- let A = [];
296
- const ut = [], Ht = /* @__PURE__ */ Promise.resolve();
297
- let nt = !1;
298
- function It() {
299
- nt || (nt = !0, Ht.then(Z));
300
- }
301
- function Q(t) {
302
- A.push(t);
303
- }
304
- const Y = /* @__PURE__ */ new Set();
305
- let j = 0;
306
- function Z() {
307
- if (j !== 0)
308
- return;
309
- const t = T;
310
- do {
311
- try {
312
- for (; j < O.length; ) {
313
- const e = O[j];
314
- j++, B(e), qt(e.$$);
315
- }
316
- } catch (e) {
317
- throw O.length = 0, j = 0, e;
318
- }
319
- for (B(null), O.length = 0, j = 0; et.length; ) et.pop()();
320
- for (let e = 0; e < A.length; e += 1) {
321
- const n = A[e];
322
- Y.has(n) || (Y.add(n), n());
323
- }
324
- A.length = 0;
325
- } while (O.length);
326
- for (; ut.length; )
327
- ut.pop()();
328
- nt = !1, Y.clear(), B(t);
329
- }
330
- function qt(t) {
331
- if (t.fragment !== null) {
332
- t.update(), k(t.before_update);
333
- const e = t.dirty;
334
- t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(Q);
335
- }
336
- }
337
- function Ft(t) {
338
- const e = [], n = [];
339
- A.forEach((s) => t.indexOf(s) === -1 ? e.push(s) : n.push(s)), n.forEach((s) => s()), A = e;
340
- }
341
- let z;
342
- function Ut() {
343
- return z || (z = Promise.resolve(), z.then(() => {
344
- z = null;
345
- })), z;
346
- }
347
- function tt(t, e, n) {
348
- t.dispatchEvent(zt(`${e ? "intro" : "outro"}${n}`));
349
- }
350
- const U = /* @__PURE__ */ new Set();
351
- let v;
352
- function Ce() {
353
- v = {
354
- r: 0,
355
- c: [],
356
- p: v
357
- // parent group
358
- };
359
- }
360
- function xe() {
361
- v.r || k(v.c), v = v.p;
362
- }
363
- function P(t, e) {
364
- t && t.i && (U.delete(t), t.i(e));
365
- }
366
- function F(t, e, n, s) {
367
- if (t && t.o) {
368
- if (U.has(t)) return;
369
- U.add(t), v.c.push(() => {
370
- U.delete(t), s && (n && t.d(1), s());
371
- }), t.o(e);
372
- } else s && s();
373
- }
374
- const Jt = { duration: 0 };
375
- function ve(t, e, n, s) {
376
- let r = e(t, n, { direction: "both" }), l = s ? 0 : 1, o = null, u = null, c = null, p;
377
- function $() {
378
- c && Rt(t, c);
379
- }
380
- function y(d, h) {
381
- const g = (
382
- /** @type {Program['d']} */
383
- d.b - l
384
- );
385
- return h *= Math.abs(g), {
386
- a: l,
387
- b: d.b,
388
- d: g,
389
- duration: h,
390
- start: d.start,
391
- end: d.start + h,
392
- group: d.group
393
- };
394
- }
395
- function f(d) {
396
- const {
397
- delay: h = 0,
398
- duration: g = 300,
399
- easing: m = xt,
400
- tick: E = L,
401
- css: M
402
- } = r || Jt, C = {
403
- start: kt() + h,
404
- b: d
405
- };
406
- d || (C.group = v, v.r += 1), "inert" in t && (d ? p !== void 0 && (t.inert = p) : (p = /** @type {HTMLElement} */
407
- t.inert, t.inert = !0)), o || u ? u = C : (M && ($(), c = at(t, l, d, g, h, m, M)), d && E(0, 1), o = y(C, g), Q(() => tt(t, d, "start")), jt((a) => {
408
- if (u && a > u.start && (o = y(u, g), u = null, tt(t, o.b, "start"), M && ($(), c = at(
409
- t,
410
- l,
411
- o.b,
412
- o.duration,
413
- 0,
414
- m,
415
- r.css
416
- ))), o) {
417
- if (a >= o.end)
418
- E(l = o.b, 1 - l), tt(t, o.b, "end"), u || (o.b ? $() : --o.group.r || k(o.group.c)), o = null;
419
- else if (a >= o.start) {
420
- const b = a - o.start;
421
- l = o.a + o.d * m(b / o.duration), E(l, 1 - l);
422
- }
423
- }
424
- return !!(o || u);
425
- }));
426
- }
427
- return {
428
- run(d) {
429
- st(r) ? Ut().then(() => {
430
- r = r({ direction: d ? "in" : "out" }), f(d);
431
- }) : f(d);
432
- },
433
- end() {
434
- $(), o = u = null;
435
- }
436
- };
437
- }
438
- function Me(t) {
439
- return t?.length !== void 0 ? t : Array.from(t);
440
- }
441
- function Vt(t, e, n) {
442
- const { fragment: s, after_update: i } = t.$$;
443
- s && s.m(e, n), Q(() => {
444
- const r = t.$$.on_mount.map(_t).filter(st);
445
- t.$$.on_destroy ? t.$$.on_destroy.push(...r) : k(r), t.$$.on_mount = [];
446
- }), i.forEach(Q);
447
- }
448
- function Gt(t, e) {
449
- const n = t.$$;
450
- n.fragment !== null && (Ft(n.after_update), k(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
451
- }
452
- function Kt(t, e) {
453
- t.$$.dirty[0] === -1 && (O.push(t), It(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
454
- }
455
- function Qt(t, e, n, s, i, r, l = null, o = [-1]) {
456
- const u = T;
457
- B(t);
458
- const c = t.$$ = {
459
- fragment: null,
460
- ctx: [],
461
- // state
462
- props: r,
463
- update: L,
464
- not_equal: i,
465
- bound: lt(),
466
- // lifecycle
467
- on_mount: [],
468
- on_destroy: [],
469
- on_disconnect: [],
470
- before_update: [],
471
- after_update: [],
472
- context: new Map(e.context || (u ? u.$$.context : [])),
473
- // everything else
474
- callbacks: lt(),
475
- dirty: o,
476
- skip_bound: !1,
477
- root: e.target || u.$$.root
478
- };
479
- l && l(c.root);
480
- let p = !1;
481
- if (c.ctx = n ? n(t, e.props || {}, ($, y, ...f) => {
482
- const d = f.length ? f[0] : y;
483
- return c.ctx && i(c.ctx[$], c.ctx[$] = d) && (!c.skip_bound && c.bound[$] && c.bound[$](d), p && Kt(t, $)), y;
484
- }) : [], c.update(), p = !0, k(c.before_update), c.fragment = s ? s(c.ctx) : !1, e.target) {
485
- if (e.hydrate) {
486
- const $ = At(e.target);
487
- c.fragment && c.fragment.l($), $.forEach(N);
488
- } else
489
- c.fragment && c.fragment.c();
490
- e.intro && P(t.$$.fragment), Vt(t, e.target, e.anchor), Z();
491
- }
492
- B(u);
493
- }
494
- let wt;
495
- typeof HTMLElement == "function" && (wt = class extends HTMLElement {
496
- /** The Svelte component constructor */
497
- $$ctor;
498
- /** Slots */
499
- $$s;
500
- /** The Svelte component instance */
501
- $$c;
502
- /** Whether or not the custom element is connected */
503
- $$cn = !1;
504
- /** Component props data */
505
- $$d = {};
506
- /** `true` if currently in the process of reflecting component props back to attributes */
507
- $$r = !1;
508
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
509
- $$p_d = {};
510
- /** @type {Record<string, Function[]>} Event listeners */
511
- $$l = {};
512
- /** @type {Map<Function, Function>} Event listener unsubscribe functions */
513
- $$l_u = /* @__PURE__ */ new Map();
514
- constructor(t, e, n) {
515
- super(), this.$$ctor = t, this.$$s = e, n && this.attachShadow({ mode: "open" });
516
- }
517
- addEventListener(t, e, n) {
518
- if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(e), this.$$c) {
519
- const s = this.$$c.$on(t, e);
520
- this.$$l_u.set(e, s);
521
- }
522
- super.addEventListener(t, e, n);
523
- }
524
- removeEventListener(t, e, n) {
525
- if (super.removeEventListener(t, e, n), this.$$c) {
526
- const s = this.$$l_u.get(e);
527
- s && (s(), this.$$l_u.delete(e));
528
- }
529
- }
530
- async connectedCallback() {
531
- if (this.$$cn = !0, !this.$$c) {
532
- let t = function(i) {
533
- return () => {
534
- let r;
535
- return {
536
- c: function() {
537
- r = x("slot"), i !== "default" && _(r, "name", i);
538
- },
539
- /**
540
- * @param {HTMLElement} target
541
- * @param {HTMLElement} [anchor]
542
- */
543
- m: function(u, c) {
544
- rt(u, r, c);
545
- },
546
- d: function(u) {
547
- u && N(r);
548
- }
549
- };
550
- };
551
- };
552
- if (await Promise.resolve(), !this.$$cn || this.$$c)
553
- return;
554
- const e = {}, n = Pt(this);
555
- for (const i of this.$$s)
556
- i in n && (e[i] = [t(i)]);
557
- for (const i of this.attributes) {
558
- const r = this.$$g_p(i.name);
559
- r in this.$$d || (this.$$d[r] = J(r, i.value, this.$$p_d, "toProp"));
560
- }
561
- for (const i in this.$$p_d)
562
- !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
563
- this.$$c = new this.$$ctor({
564
- target: this.shadowRoot || this,
565
- props: {
566
- ...this.$$d,
567
- $$slots: e,
568
- $$scope: {
569
- ctx: []
570
- }
571
- }
572
- });
573
- const s = () => {
574
- this.$$r = !0;
575
- for (const i in this.$$p_d)
576
- if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
577
- const r = J(
578
- i,
579
- this.$$d[i],
580
- this.$$p_d,
581
- "toAttribute"
582
- );
583
- r == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, r);
584
- }
585
- this.$$r = !1;
586
- };
587
- this.$$c.$$.after_update.push(s), s();
588
- for (const i in this.$$l)
589
- for (const r of this.$$l[i]) {
590
- const l = this.$$c.$on(i, r);
591
- this.$$l_u.set(r, l);
592
- }
593
- this.$$l = {};
594
- }
595
- }
596
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
597
- // and setting attributes through setAttribute etc, this is helpful
598
- attributeChangedCallback(t, e, n) {
599
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = J(t, n, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
600
- }
601
- disconnectedCallback() {
602
- this.$$cn = !1, Promise.resolve().then(() => {
603
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
604
- });
605
- }
606
- $$g_p(t) {
607
- return Object.keys(this.$$p_d).find(
608
- (e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t
609
- ) || t;
610
- }
611
- });
612
- function J(t, e, n, s) {
613
- const i = n[t]?.type;
614
- if (e = i === "Boolean" && typeof e != "boolean" ? e != null : e, !s || !n[t])
615
- return e;
616
- if (s === "toAttribute")
617
- switch (i) {
618
- case "Object":
619
- case "Array":
620
- return e == null ? null : JSON.stringify(e);
621
- case "Boolean":
622
- return e ? "" : null;
623
- case "Number":
624
- return e ?? null;
625
- default:
626
- return e;
627
- }
628
- else
629
- switch (i) {
630
- case "Object":
631
- case "Array":
632
- return e && JSON.parse(e);
633
- case "Boolean":
634
- return e;
635
- case "Number":
636
- return e != null ? +e : e;
637
- default:
638
- return e;
639
- }
640
- }
641
- function Zt(t, e, n, s, i, r) {
642
- let l = class extends wt {
643
- constructor() {
644
- super(t, n, i), this.$$p_d = e;
645
- }
646
- static get observedAttributes() {
647
- return Object.keys(e).map(
648
- (o) => (e[o].attribute || o).toLowerCase()
649
- );
650
- }
651
- };
652
- return Object.keys(e).forEach((o) => {
653
- Object.defineProperty(l.prototype, o, {
654
- get() {
655
- return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
656
- },
657
- set(u) {
658
- u = J(o, u, e), this.$$d[o] = u, this.$$c?.$set({ [o]: u });
659
- }
660
- });
661
- }), s.forEach((o) => {
662
- Object.defineProperty(l.prototype, o, {
663
- get() {
664
- return this.$$c?.[o];
665
- }
666
- });
667
- }), t.element = /** @type {any} */
668
- l, l;
669
- }
670
- class Xt {
671
- /**
672
- * ### PRIVATE API
673
- *
674
- * Do not use, may change at any time
675
- *
676
- * @type {any}
677
- */
678
- $$ = void 0;
679
- /**
680
- * ### PRIVATE API
681
- *
682
- * Do not use, may change at any time
683
- *
684
- * @type {any}
685
- */
686
- $$set = void 0;
687
- /** @returns {void} */
688
- $destroy() {
689
- Gt(this, 1), this.$destroy = L;
690
- }
691
- /**
692
- * @template {Extract<keyof Events, string>} K
693
- * @param {K} type
694
- * @param {((e: Events[K]) => void) | null | undefined} callback
695
- * @returns {() => void}
696
- */
697
- $on(e, n) {
698
- if (!st(n))
699
- return L;
700
- const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
701
- return s.push(n), () => {
702
- const i = s.indexOf(n);
703
- i !== -1 && s.splice(i, 1);
704
- };
705
- }
706
- /**
707
- * @param {Partial<Props>} props
708
- * @returns {void}
709
- */
710
- $set(e) {
711
- this.$$set && !Et(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
712
- }
713
- }
714
- const Yt = "4";
715
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Yt);
716
- function te(t) {
717
- Ot(t, "svelte-1m890h5", "*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CashierModalWindow{container-type:inline-size;container-name:confirm-modal;display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:4;top:0;left:0;background-color:var(--emw--color-background, rgba(0, 0, 0, 0.1))}.CashierModalContainer{width:500px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:var(--emw--spacing-large, 20px);position:relative;padding:var(--emw--spacing-medium, 15px);min-height:200px;box-shadow:0 2px 6px 0 var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));border-radius:var(--mmw--border-radius-large-plus, 10px);background-color:var(--emw--color-white, #fff)}.ModalOkBtn{color:var(--emw--color-white, #fff);display:flex;align-items:center;justify-content:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:var(--emw--font-weight-normal, 400);font-family:inherit;height:46px;width:100%;border:none;border-radius:50px;line-height:125%;background-color:var(--emw--color-primary, #7EC51E);margin-top:var(--emw--spacing-small, 12px);cursor:pointer}.ModalCloseBtn{position:absolute;display:flex;justify-content:space-between;align-items:center;padding:var(--emw--spacing-small, 12px) var(--emw--spacing-small, 12px);height:inherit;right:0;top:0;cursor:pointer}@container confirm-modal (max-width: 750px){.CashierModalContainer{margin:var(--emw--spacing-x-large, 30px) var(--emw--spacing-small, 12px)}}");
718
- }
719
- const ee = (t) => ({}), ft = (t) => ({}), ne = (t) => ({}), dt = (t) => ({}), se = (t) => ({}), ht = (t) => ({ class: "CashierModalText" }), ie = (t) => ({}), $t = (t) => ({ class: "CashierModalTitle" });
720
- function oe(t) {
721
- let e, n;
722
- return {
723
- c() {
724
- e = ct("svg"), n = ct("path"), _(n, "d", "M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"), _(n, "fill", "#111111"), _(e, "xmlns", "http://www.w3.org/2000/svg"), _(e, "width", "13"), _(e, "height", "20"), _(e, "viewBox", "0 0 13 13"), _(e, "fill", "none");
725
- },
726
- m(s, i) {
727
- rt(s, e, i), w(e, n);
728
- },
729
- p: L,
730
- d(s) {
731
- s && N(e);
732
- }
733
- };
734
- }
735
- function re(t) {
736
- let e, n, s, i, r, l, o, u, c, p, $;
737
- const y = (
738
- /*#slots*/
739
- t[6].title
740
- ), f = W(
741
- y,
742
- t,
743
- /*$$scope*/
744
- t[5],
745
- $t
746
- ), d = (
747
- /*#slots*/
748
- t[6].text
749
- ), h = W(
750
- d,
751
- t,
752
- /*$$scope*/
753
- t[5],
754
- ht
755
- ), g = (
756
- /*#slots*/
757
- t[6].confirm
758
- ), m = W(
759
- g,
760
- t,
761
- /*$$scope*/
762
- t[5],
763
- dt
764
- ), E = (
765
- /*#slots*/
766
- t[6].close
767
- ), M = W(
768
- E,
769
- t,
770
- /*$$scope*/
771
- t[5],
772
- ft
773
- ), C = M || oe();
774
- return {
775
- c() {
776
- e = x("div"), n = x("div"), s = x("div"), f && f.c(), i = X(), h && h.c(), r = X(), l = x("span"), m && m.c(), o = X(), u = x("span"), C.c(), _(l, "class", "ModalOkBtn"), _(l, "role", "button"), _(u, "class", "ModalCloseBtn"), _(u, "role", "button"), _(s, "class", "CashierModalContainer"), _(s, "part", "CashierModalContainer"), _(n, "class", "CashierModalWindow"), _(n, "part", "CashierModalWindow"), _(n, "id", "Modal"), _(e, "part", "CustomStylingContainer");
777
- },
778
- m(a, b) {
779
- rt(a, e, b), w(e, n), w(n, s), f && f.m(s, null), w(s, i), h && h.m(s, null), w(s, r), w(s, l), m && m.m(l, null), w(s, o), w(s, u), C.m(u, null), t[7](e), c = !0, p || ($ = [
780
- V(
781
- l,
782
- "click",
783
- /*confirm*/
784
- t[2]
785
- ),
786
- V(
787
- u,
788
- "click",
789
- /*close*/
790
- t[1]
791
- )
792
- ], p = !0);
793
- },
794
- p(a, [b]) {
795
- f && f.p && (!c || b & /*$$scope*/
796
- 32) && H(
797
- f,
798
- y,
799
- a,
800
- /*$$scope*/
801
- a[5],
802
- c ? D(
803
- y,
804
- /*$$scope*/
805
- a[5],
806
- b,
807
- ie
808
- ) : I(
809
- /*$$scope*/
810
- a[5]
811
- ),
812
- $t
813
- ), h && h.p && (!c || b & /*$$scope*/
814
- 32) && H(
815
- h,
816
- d,
817
- a,
818
- /*$$scope*/
819
- a[5],
820
- c ? D(
821
- d,
822
- /*$$scope*/
823
- a[5],
824
- b,
825
- se
826
- ) : I(
827
- /*$$scope*/
828
- a[5]
829
- ),
830
- ht
831
- ), m && m.p && (!c || b & /*$$scope*/
832
- 32) && H(
833
- m,
834
- g,
835
- a,
836
- /*$$scope*/
837
- a[5],
838
- c ? D(
839
- g,
840
- /*$$scope*/
841
- a[5],
842
- b,
843
- ne
844
- ) : I(
845
- /*$$scope*/
846
- a[5]
847
- ),
848
- dt
849
- ), M && M.p && (!c || b & /*$$scope*/
850
- 32) && H(
851
- M,
852
- E,
853
- a,
854
- /*$$scope*/
855
- a[5],
856
- c ? D(
857
- E,
858
- /*$$scope*/
859
- a[5],
860
- b,
861
- ee
862
- ) : I(
863
- /*$$scope*/
864
- a[5]
865
- ),
866
- ft
867
- );
868
- },
869
- i(a) {
870
- c || (P(f, a), P(h, a), P(m, a), P(C, a), c = !0);
871
- },
872
- o(a) {
873
- F(f, a), F(h, a), F(m, a), F(C, a), c = !1;
874
- },
875
- d(a) {
876
- a && N(e), f && f.d(a), h && h.d(a), m && m.d(a), C.d(a), t[7](null), p = !1, k($);
877
- }
878
- };
879
- }
880
- function le(t, e, n) {
881
- let { $$slots: s = {}, $$scope: i } = e, { clientstyling: r = "" } = e, { clientstylingurl: l = "" } = e, o;
882
- const u = () => {
883
- window.postMessage({ type: "CloseModal" }, window.location.href);
884
- }, c = () => {
885
- window.postMessage({ type: "ConfirmModal" }, window.location.href), u();
886
- }, p = () => {
887
- let f = document.createElement("style");
888
- f.innerHTML = r, o.appendChild(f);
889
- }, $ = () => {
890
- let f = new URL(l), d = document.createElement("style");
891
- fetch(f.href).then((h) => h.text()).then((h) => {
892
- d.innerHTML = h, setTimeout(
893
- () => {
894
- o.appendChild(d);
895
- },
896
- 1
897
- );
898
- });
899
- };
900
- function y(f) {
901
- et[f ? "unshift" : "push"](() => {
902
- o = f, n(0, o);
903
- });
904
- }
905
- return t.$$set = (f) => {
906
- "clientstyling" in f && n(3, r = f.clientstyling), "clientstylingurl" in f && n(4, l = f.clientstylingurl), "$$scope" in f && n(5, i = f.$$scope);
907
- }, t.$$.update = () => {
908
- t.$$.dirty & /*clientstyling, customStylingContainer*/
909
- 9 && r && o && p(), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
910
- 17 && l && o && $();
911
- }, [
912
- o,
913
- u,
914
- c,
915
- r,
916
- l,
917
- i,
918
- s,
919
- y
920
- ];
921
- }
922
- class Ct extends Xt {
923
- constructor(e) {
924
- super(), Qt(this, e, le, re, Mt, { clientstyling: 3, clientstylingurl: 4 }, te);
925
- }
926
- get clientstyling() {
927
- return this.$$.ctx[3];
928
- }
929
- set clientstyling(e) {
930
- this.$$set({ clientstyling: e }), Z();
931
- }
932
- get clientstylingurl() {
933
- return this.$$.ctx[4];
934
- }
935
- set clientstylingurl(e) {
936
- this.$$set({ clientstylingurl: e }), Z();
937
- }
938
- }
939
- Zt(Ct, { clientstyling: {}, clientstylingurl: {} }, ["title", "text", "confirm", "close"], [], !0);
940
- const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
941
- __proto__: null,
942
- default: Ct
943
- }, Symbol.toStringTag, { value: "Module" }));
944
- export {
945
- V as A,
946
- Ce as B,
947
- et as C,
948
- ce as D,
949
- $e as E,
950
- Q as F,
951
- we as G,
952
- ue as H,
953
- be as I,
954
- _e as J,
955
- Me as K,
956
- he as L,
957
- fe as M,
958
- pe as N,
959
- ct as O,
960
- ge as P,
961
- xt as Q,
962
- ye as R,
963
- Xt as S,
964
- ve as T,
965
- Ee as U,
966
- Mt as a,
967
- Qt as b,
968
- Zt as c,
969
- Ot as d,
970
- W as e,
971
- Z as f,
972
- x as g,
973
- X as h,
974
- st as i,
975
- _ as j,
976
- rt as k,
977
- w as l,
978
- I as m,
979
- L as n,
980
- D as o,
981
- F as p,
982
- xe as q,
983
- k as r,
984
- Lt as s,
985
- P as t,
986
- H as u,
987
- N as v,
988
- ae as w,
989
- de as x,
990
- bt as y,
991
- me as z
992
- };