@everymatrix/cashier-page 1.53.12 → 1.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/components/CashierConfirmModal-BWwXFa2X.js +1052 -0
  2. package/components/CashierConfirmModal-DvPjAtJP.cjs +4 -0
  3. package/components/{CashierError-CNghn61_.js → CashierError-DNpUb5Mm.js} +16 -16
  4. package/components/CashierError-Dmdtq5Bw.cjs +5 -0
  5. package/components/CashierHeader-CQUqVL_i.cjs +1 -0
  6. package/components/{CashierHeader-Cukt_6q5.js → CashierHeader-jyno14ok.js} +2 -2
  7. package/components/{CashierIframeRedirect-CfOyb27d.js → CashierIframeRedirect-Cz4tv7-x.js} +6 -6
  8. package/components/CashierIframeRedirect-D-OfVohj.cjs +1 -0
  9. package/components/CashierMethodDetails-CBOh1gd0.cjs +18 -0
  10. package/components/{CashierMethodDetails-BIl7Is4q.js → CashierMethodDetails-DhPcp2tp.js} +1535 -1521
  11. package/components/CashierMethodsList-BXQ8slk2.cjs +1 -0
  12. package/components/{CashierMethodsList-sDyTLsi_.js → CashierMethodsList-tNPWey2d.js} +175 -164
  13. package/components/{CashierModal-BvsZYr3E.js → CashierModal-BZinftgA.js} +1 -1
  14. package/components/CashierModal-FVpPS0Cg.cjs +1 -0
  15. package/components/CashierNotifications-Dt9rQ2vt.cjs +1 -0
  16. package/components/{CashierNotifications-DLiOLPVS.js → CashierNotifications-VNlsq9BM.js} +1 -1
  17. package/components/{CashierPage-ChYGXNFh.js → CashierPage-Ci16qWoB.js} +16 -16
  18. package/components/CashierPage-_uE0Wp1v.cjs +1 -0
  19. package/components/{CashierReceiptPage-BnZNWRHD.js → CashierReceiptPage-BrSqthh1.js} +109 -108
  20. package/components/CashierReceiptPage-khlZnWa5.cjs +1 -0
  21. package/components/{CashierSessionExpirationModal-m8mfQG7I.js → CashierSessionExpirationModal-BaJ2BLlM.js} +64 -64
  22. package/components/CashierSessionExpirationModal-Ynzjj3_r.cjs +2 -0
  23. package/components/CashierSpinner-6i7TRj04.cjs +1 -0
  24. package/components/{CashierSpinner-BGK4UpXs.js → CashierSpinner-DLOGBpHm.js} +1 -1
  25. package/components/{CashierVerifications-ghULlvRf.js → CashierVerifications-CAlJv-1M.js} +149 -145
  26. package/components/CashierVerifications-KeQfHgf0.cjs +1 -0
  27. package/components/{CashierVideoModal-CIyp7q0i.js → CashierVideoModal-CdG4dnYx.js} +1 -1
  28. package/components/CashierVideoModal-Cgjg5Mzz.cjs +1 -0
  29. package/es2015/cashier-page.cjs +1 -0
  30. package/es2015/cashier-page.js +16 -0
  31. package/package.json +17 -12
  32. package/components/CashierConfirmModal-bl1anpXG.js +0 -1015
  33. package/esnext/cashier-page.js +0 -14
@@ -1,1015 +0,0 @@
1
- function k() {
2
- }
3
- const Et = (t) => t;
4
- function Mt(t, e) {
5
- for (const n in e) t[n] = e[n];
6
- return (
7
- /** @type {T & S} */
8
- t
9
- );
10
- }
11
- function mt(t) {
12
- return t();
13
- }
14
- function ct() {
15
- return /* @__PURE__ */ Object.create(null);
16
- }
17
- function L(t) {
18
- t.forEach(mt);
19
- }
20
- function st(t) {
21
- return typeof t == "function";
22
- }
23
- function kt(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 Lt(t) {
31
- return Object.keys(t).length === 0;
32
- }
33
- function jt(t, ...e) {
34
- if (t == null) {
35
- for (const s of e)
36
- s(void 0);
37
- return k;
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(jt(e, n));
44
- }
45
- function D(t, e, n, s) {
46
- if (t) {
47
- const i = pt(t, e, n, s);
48
- return t[0](i);
49
- }
50
- }
51
- function pt(t, e, n, s) {
52
- return t[1] && s ? Mt(n.ctx.slice(), t[1](s(e))) : n.ctx;
53
- }
54
- function W(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 = pt(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 gt = typeof window < "u";
85
- let Ot = gt ? () => window.performance.now() : () => Date.now(), it = gt ? (t) => requestAnimationFrame(t) : k;
86
- const S = /* @__PURE__ */ new Set();
87
- function yt(t) {
88
- S.forEach((e) => {
89
- e.c(t) || (S.delete(e), e.f());
90
- }), S.size !== 0 && it(yt);
91
- }
92
- function St(t) {
93
- let e;
94
- return S.size === 0 && it(yt), {
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 At(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, bt(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 Nt(t) {
127
- const e = x("style");
128
- return e.textContent = "/* empty */", bt(ot(t), e), e.sheet;
129
- }
130
- function bt(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 at(t) {
151
- return document.createElementNS("http://www.w3.org/2000/svg", t);
152
- }
153
- function wt(t) {
154
- return document.createTextNode(t);
155
- }
156
- function X() {
157
- return wt(" ");
158
- }
159
- function de() {
160
- return wt("");
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 Pt(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 zt() {
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 = zt();
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 Ct(t, e, { bubbles: n = !1, cancelable: s = !1 } = {}) {
231
- return new CustomEvent(t, { detail: e, bubbles: n, cancelable: s });
232
- }
233
- function Bt(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 Tt(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 Rt(t, e) {
250
- const n = { stylesheet: Nt(e), rules: {} };
251
- return G.set(t, n), n;
252
- }
253
- function ut(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_${Tt(p)}_${o}`, y = ot(t), { stylesheet: f, rules: d } = G.get(y) || Rt(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 Dt(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 lt() {
288
- if (!T) throw new Error("Function called outside component initialization");
289
- return T;
290
- }
291
- function we(t) {
292
- lt().$$.on_mount.push(t);
293
- }
294
- function Ce(t) {
295
- lt().$$.on_destroy.push(t);
296
- }
297
- function xe() {
298
- const t = lt();
299
- return (e, n, { cancelable: s = !1 } = {}) => {
300
- const i = t.$$.callbacks[e];
301
- if (i) {
302
- const r = Ct(
303
- /** @type {string} */
304
- e,
305
- n,
306
- { cancelable: s }
307
- );
308
- return i.slice().forEach((l) => {
309
- l.call(t, r);
310
- }), !r.defaultPrevented;
311
- }
312
- return !0;
313
- };
314
- }
315
- const O = [], et = [];
316
- let A = [];
317
- const ft = [], Ht = /* @__PURE__ */ Promise.resolve();
318
- let nt = !1;
319
- function It() {
320
- nt || (nt = !0, Ht.then(Z));
321
- }
322
- function Q(t) {
323
- A.push(t);
324
- }
325
- const Y = /* @__PURE__ */ new Set();
326
- let j = 0;
327
- function Z() {
328
- if (j !== 0)
329
- return;
330
- const t = T;
331
- do {
332
- try {
333
- for (; j < O.length; ) {
334
- const e = O[j];
335
- j++, B(e), qt(e.$$);
336
- }
337
- } catch (e) {
338
- throw O.length = 0, j = 0, e;
339
- }
340
- for (B(null), O.length = 0, j = 0; et.length; ) et.pop()();
341
- for (let e = 0; e < A.length; e += 1) {
342
- const n = A[e];
343
- Y.has(n) || (Y.add(n), n());
344
- }
345
- A.length = 0;
346
- } while (O.length);
347
- for (; ft.length; )
348
- ft.pop()();
349
- nt = !1, Y.clear(), B(t);
350
- }
351
- function qt(t) {
352
- if (t.fragment !== null) {
353
- t.update(), L(t.before_update);
354
- const e = t.dirty;
355
- t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(Q);
356
- }
357
- }
358
- function Ft(t) {
359
- const e = [], n = [];
360
- A.forEach((s) => t.indexOf(s) === -1 ? e.push(s) : n.push(s)), n.forEach((s) => s()), A = e;
361
- }
362
- let P;
363
- function Ut() {
364
- return P || (P = Promise.resolve(), P.then(() => {
365
- P = null;
366
- })), P;
367
- }
368
- function tt(t, e, n) {
369
- t.dispatchEvent(Ct(`${e ? "intro" : "outro"}${n}`));
370
- }
371
- const U = /* @__PURE__ */ new Set();
372
- let v;
373
- function ve() {
374
- v = {
375
- r: 0,
376
- c: [],
377
- p: v
378
- // parent group
379
- };
380
- }
381
- function Ee() {
382
- v.r || L(v.c), v = v.p;
383
- }
384
- function z(t, e) {
385
- t && t.i && (U.delete(t), t.i(e));
386
- }
387
- function F(t, e, n, s) {
388
- if (t && t.o) {
389
- if (U.has(t)) return;
390
- U.add(t), v.c.push(() => {
391
- U.delete(t), s && (n && t.d(1), s());
392
- }), t.o(e);
393
- } else s && s();
394
- }
395
- const Jt = { duration: 0 };
396
- function Me(t, e, n, s) {
397
- let r = e(t, n, { direction: "both" }), l = s ? 0 : 1, o = null, u = null, c = null, p;
398
- function $() {
399
- c && Dt(t, c);
400
- }
401
- function y(d, h) {
402
- const g = (
403
- /** @type {Program['d']} */
404
- d.b - l
405
- );
406
- return h *= Math.abs(g), {
407
- a: l,
408
- b: d.b,
409
- d: g,
410
- duration: h,
411
- start: d.start,
412
- end: d.start + h,
413
- group: d.group
414
- };
415
- }
416
- function f(d) {
417
- const {
418
- delay: h = 0,
419
- duration: g = 300,
420
- easing: m = Et,
421
- tick: M = k,
422
- css: E
423
- } = r || Jt, C = {
424
- start: Ot() + h,
425
- b: d
426
- };
427
- d || (C.group = v, v.r += 1), "inert" in t && (d ? p !== void 0 && (t.inert = p) : (p = /** @type {HTMLElement} */
428
- t.inert, t.inert = !0)), o || u ? u = C : (E && ($(), c = ut(t, l, d, g, h, m, E)), d && M(0, 1), o = y(C, g), Q(() => tt(t, d, "start")), St((a) => {
429
- if (u && a > u.start && (o = y(u, g), u = null, tt(t, o.b, "start"), E && ($(), c = ut(
430
- t,
431
- l,
432
- o.b,
433
- o.duration,
434
- 0,
435
- m,
436
- r.css
437
- ))), o) {
438
- if (a >= o.end)
439
- M(l = o.b, 1 - l), tt(t, o.b, "end"), u || (o.b ? $() : --o.group.r || L(o.group.c)), o = null;
440
- else if (a >= o.start) {
441
- const b = a - o.start;
442
- l = o.a + o.d * m(b / o.duration), M(l, 1 - l);
443
- }
444
- }
445
- return !!(o || u);
446
- }));
447
- }
448
- return {
449
- run(d) {
450
- st(r) ? Ut().then(() => {
451
- r = r({ direction: d ? "in" : "out" }), f(d);
452
- }) : f(d);
453
- },
454
- end() {
455
- $(), o = u = null;
456
- }
457
- };
458
- }
459
- function ke(t) {
460
- return t?.length !== void 0 ? t : Array.from(t);
461
- }
462
- function Vt(t, e, n) {
463
- const { fragment: s, after_update: i } = t.$$;
464
- s && s.m(e, n), Q(() => {
465
- const r = t.$$.on_mount.map(mt).filter(st);
466
- t.$$.on_destroy ? t.$$.on_destroy.push(...r) : L(r), t.$$.on_mount = [];
467
- }), i.forEach(Q);
468
- }
469
- function Gt(t, e) {
470
- const n = t.$$;
471
- n.fragment !== null && (Ft(n.after_update), L(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
472
- }
473
- function Kt(t, e) {
474
- t.$$.dirty[0] === -1 && (O.push(t), It(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
475
- }
476
- function Qt(t, e, n, s, i, r, l = null, o = [-1]) {
477
- const u = T;
478
- B(t);
479
- const c = t.$$ = {
480
- fragment: null,
481
- ctx: [],
482
- // state
483
- props: r,
484
- update: k,
485
- not_equal: i,
486
- bound: ct(),
487
- // lifecycle
488
- on_mount: [],
489
- on_destroy: [],
490
- on_disconnect: [],
491
- before_update: [],
492
- after_update: [],
493
- context: new Map(e.context || (u ? u.$$.context : [])),
494
- // everything else
495
- callbacks: ct(),
496
- dirty: o,
497
- skip_bound: !1,
498
- root: e.target || u.$$.root
499
- };
500
- l && l(c.root);
501
- let p = !1;
502
- if (c.ctx = n ? n(t, e.props || {}, ($, y, ...f) => {
503
- const d = f.length ? f[0] : y;
504
- return c.ctx && i(c.ctx[$], c.ctx[$] = d) && (!c.skip_bound && c.bound[$] && c.bound[$](d), p && Kt(t, $)), y;
505
- }) : [], c.update(), p = !0, L(c.before_update), c.fragment = s ? s(c.ctx) : !1, e.target) {
506
- if (e.hydrate) {
507
- const $ = Pt(e.target);
508
- c.fragment && c.fragment.l($), $.forEach(N);
509
- } else
510
- c.fragment && c.fragment.c();
511
- e.intro && z(t.$$.fragment), Vt(t, e.target, e.anchor), Z();
512
- }
513
- B(u);
514
- }
515
- let xt;
516
- typeof HTMLElement == "function" && (xt = class extends HTMLElement {
517
- /** The Svelte component constructor */
518
- $$ctor;
519
- /** Slots */
520
- $$s;
521
- /** The Svelte component instance */
522
- $$c;
523
- /** Whether or not the custom element is connected */
524
- $$cn = !1;
525
- /** Component props data */
526
- $$d = {};
527
- /** `true` if currently in the process of reflecting component props back to attributes */
528
- $$r = !1;
529
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
530
- $$p_d = {};
531
- /** @type {Record<string, Function[]>} Event listeners */
532
- $$l = {};
533
- /** @type {Map<Function, Function>} Event listener unsubscribe functions */
534
- $$l_u = /* @__PURE__ */ new Map();
535
- constructor(t, e, n) {
536
- super(), this.$$ctor = t, this.$$s = e, n && this.attachShadow({ mode: "open" });
537
- }
538
- addEventListener(t, e, n) {
539
- if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(e), this.$$c) {
540
- const s = this.$$c.$on(t, e);
541
- this.$$l_u.set(e, s);
542
- }
543
- super.addEventListener(t, e, n);
544
- }
545
- removeEventListener(t, e, n) {
546
- if (super.removeEventListener(t, e, n), this.$$c) {
547
- const s = this.$$l_u.get(e);
548
- s && (s(), this.$$l_u.delete(e));
549
- }
550
- }
551
- async connectedCallback() {
552
- if (this.$$cn = !0, !this.$$c) {
553
- let t = function(i) {
554
- return () => {
555
- let r;
556
- return {
557
- c: function() {
558
- r = x("slot"), i !== "default" && _(r, "name", i);
559
- },
560
- /**
561
- * @param {HTMLElement} target
562
- * @param {HTMLElement} [anchor]
563
- */
564
- m: function(u, c) {
565
- rt(u, r, c);
566
- },
567
- d: function(u) {
568
- u && N(r);
569
- }
570
- };
571
- };
572
- };
573
- if (await Promise.resolve(), !this.$$cn || this.$$c)
574
- return;
575
- const e = {}, n = Bt(this);
576
- for (const i of this.$$s)
577
- i in n && (e[i] = [t(i)]);
578
- for (const i of this.attributes) {
579
- const r = this.$$g_p(i.name);
580
- r in this.$$d || (this.$$d[r] = J(r, i.value, this.$$p_d, "toProp"));
581
- }
582
- for (const i in this.$$p_d)
583
- !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
584
- this.$$c = new this.$$ctor({
585
- target: this.shadowRoot || this,
586
- props: {
587
- ...this.$$d,
588
- $$slots: e,
589
- $$scope: {
590
- ctx: []
591
- }
592
- }
593
- });
594
- const s = () => {
595
- this.$$r = !0;
596
- for (const i in this.$$p_d)
597
- if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
598
- const r = J(
599
- i,
600
- this.$$d[i],
601
- this.$$p_d,
602
- "toAttribute"
603
- );
604
- r == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, r);
605
- }
606
- this.$$r = !1;
607
- };
608
- this.$$c.$$.after_update.push(s), s();
609
- for (const i in this.$$l)
610
- for (const r of this.$$l[i]) {
611
- const l = this.$$c.$on(i, r);
612
- this.$$l_u.set(r, l);
613
- }
614
- this.$$l = {};
615
- }
616
- }
617
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
618
- // and setting attributes through setAttribute etc, this is helpful
619
- attributeChangedCallback(t, e, n) {
620
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = J(t, n, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
621
- }
622
- disconnectedCallback() {
623
- this.$$cn = !1, Promise.resolve().then(() => {
624
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
625
- });
626
- }
627
- $$g_p(t) {
628
- return Object.keys(this.$$p_d).find(
629
- (e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t
630
- ) || t;
631
- }
632
- });
633
- function J(t, e, n, s) {
634
- const i = n[t]?.type;
635
- if (e = i === "Boolean" && typeof e != "boolean" ? e != null : e, !s || !n[t])
636
- return e;
637
- if (s === "toAttribute")
638
- switch (i) {
639
- case "Object":
640
- case "Array":
641
- return e == null ? null : JSON.stringify(e);
642
- case "Boolean":
643
- return e ? "" : null;
644
- case "Number":
645
- return e ?? null;
646
- default:
647
- return e;
648
- }
649
- else
650
- switch (i) {
651
- case "Object":
652
- case "Array":
653
- return e && JSON.parse(e);
654
- case "Boolean":
655
- return e;
656
- case "Number":
657
- return e != null ? +e : e;
658
- default:
659
- return e;
660
- }
661
- }
662
- function Zt(t, e, n, s, i, r) {
663
- let l = class extends xt {
664
- constructor() {
665
- super(t, n, i), this.$$p_d = e;
666
- }
667
- static get observedAttributes() {
668
- return Object.keys(e).map(
669
- (o) => (e[o].attribute || o).toLowerCase()
670
- );
671
- }
672
- };
673
- return Object.keys(e).forEach((o) => {
674
- Object.defineProperty(l.prototype, o, {
675
- get() {
676
- return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
677
- },
678
- set(u) {
679
- u = J(o, u, e), this.$$d[o] = u, this.$$c?.$set({ [o]: u });
680
- }
681
- });
682
- }), s.forEach((o) => {
683
- Object.defineProperty(l.prototype, o, {
684
- get() {
685
- return this.$$c?.[o];
686
- }
687
- });
688
- }), t.element = /** @type {any} */
689
- l, l;
690
- }
691
- class Xt {
692
- /**
693
- * ### PRIVATE API
694
- *
695
- * Do not use, may change at any time
696
- *
697
- * @type {any}
698
- */
699
- $$ = void 0;
700
- /**
701
- * ### PRIVATE API
702
- *
703
- * Do not use, may change at any time
704
- *
705
- * @type {any}
706
- */
707
- $$set = void 0;
708
- /** @returns {void} */
709
- $destroy() {
710
- Gt(this, 1), this.$destroy = k;
711
- }
712
- /**
713
- * @template {Extract<keyof Events, string>} K
714
- * @param {K} type
715
- * @param {((e: Events[K]) => void) | null | undefined} callback
716
- * @returns {() => void}
717
- */
718
- $on(e, n) {
719
- if (!st(n))
720
- return k;
721
- const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
722
- return s.push(n), () => {
723
- const i = s.indexOf(n);
724
- i !== -1 && s.splice(i, 1);
725
- };
726
- }
727
- /**
728
- * @param {Partial<Props>} props
729
- * @returns {void}
730
- */
731
- $set(e) {
732
- this.$$set && !Lt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
733
- }
734
- }
735
- const Yt = "4";
736
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Yt);
737
- function te(t) {
738
- At(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)}}");
739
- }
740
- const ee = (t) => ({}), dt = (t) => ({}), ne = (t) => ({}), ht = (t) => ({}), se = (t) => ({}), $t = (t) => ({ class: "CashierModalText" }), ie = (t) => ({}), _t = (t) => ({ class: "CashierModalTitle" });
741
- function oe(t) {
742
- let e, n;
743
- return {
744
- c() {
745
- e = at("svg"), n = at("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");
746
- },
747
- m(s, i) {
748
- rt(s, e, i), w(e, n);
749
- },
750
- p: k,
751
- d(s) {
752
- s && N(e);
753
- }
754
- };
755
- }
756
- function re(t) {
757
- let e, n, s, i, r, l, o, u, c, p, $;
758
- const y = (
759
- /*#slots*/
760
- t[6].title
761
- ), f = D(
762
- y,
763
- t,
764
- /*$$scope*/
765
- t[5],
766
- _t
767
- ), d = (
768
- /*#slots*/
769
- t[6].text
770
- ), h = D(
771
- d,
772
- t,
773
- /*$$scope*/
774
- t[5],
775
- $t
776
- ), g = (
777
- /*#slots*/
778
- t[6].confirm
779
- ), m = D(
780
- g,
781
- t,
782
- /*$$scope*/
783
- t[5],
784
- ht
785
- ), M = (
786
- /*#slots*/
787
- t[6].close
788
- ), E = D(
789
- M,
790
- t,
791
- /*$$scope*/
792
- t[5],
793
- dt
794
- ), C = E || oe();
795
- return {
796
- c() {
797
- 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");
798
- },
799
- m(a, b) {
800
- 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 || ($ = [
801
- V(
802
- l,
803
- "click",
804
- /*confirm*/
805
- t[2]
806
- ),
807
- V(
808
- u,
809
- "click",
810
- /*close*/
811
- t[1]
812
- )
813
- ], p = !0);
814
- },
815
- p(a, [b]) {
816
- f && f.p && (!c || b & /*$$scope*/
817
- 32) && H(
818
- f,
819
- y,
820
- a,
821
- /*$$scope*/
822
- a[5],
823
- c ? W(
824
- y,
825
- /*$$scope*/
826
- a[5],
827
- b,
828
- ie
829
- ) : I(
830
- /*$$scope*/
831
- a[5]
832
- ),
833
- _t
834
- ), h && h.p && (!c || b & /*$$scope*/
835
- 32) && H(
836
- h,
837
- d,
838
- a,
839
- /*$$scope*/
840
- a[5],
841
- c ? W(
842
- d,
843
- /*$$scope*/
844
- a[5],
845
- b,
846
- se
847
- ) : I(
848
- /*$$scope*/
849
- a[5]
850
- ),
851
- $t
852
- ), m && m.p && (!c || b & /*$$scope*/
853
- 32) && H(
854
- m,
855
- g,
856
- a,
857
- /*$$scope*/
858
- a[5],
859
- c ? W(
860
- g,
861
- /*$$scope*/
862
- a[5],
863
- b,
864
- ne
865
- ) : I(
866
- /*$$scope*/
867
- a[5]
868
- ),
869
- ht
870
- ), E && E.p && (!c || b & /*$$scope*/
871
- 32) && H(
872
- E,
873
- M,
874
- a,
875
- /*$$scope*/
876
- a[5],
877
- c ? W(
878
- M,
879
- /*$$scope*/
880
- a[5],
881
- b,
882
- ee
883
- ) : I(
884
- /*$$scope*/
885
- a[5]
886
- ),
887
- dt
888
- );
889
- },
890
- i(a) {
891
- c || (z(f, a), z(h, a), z(m, a), z(C, a), c = !0);
892
- },
893
- o(a) {
894
- F(f, a), F(h, a), F(m, a), F(C, a), c = !1;
895
- },
896
- d(a) {
897
- a && N(e), f && f.d(a), h && h.d(a), m && m.d(a), C.d(a), t[7](null), p = !1, L($);
898
- }
899
- };
900
- }
901
- function le(t, e, n) {
902
- let { $$slots: s = {}, $$scope: i } = e, { clientstyling: r = "" } = e, { clientstylingurl: l = "" } = e, o;
903
- const u = () => {
904
- window.postMessage({ type: "CloseModal" }, window.location.href);
905
- }, c = () => {
906
- window.postMessage({ type: "ConfirmModal" }, window.location.href), u();
907
- }, p = () => {
908
- let f = document.createElement("style");
909
- f.innerHTML = r, o.appendChild(f);
910
- }, $ = () => {
911
- let f = new URL(l), d = document.createElement("style");
912
- fetch(f.href).then((h) => h.text()).then((h) => {
913
- d.innerHTML = h, setTimeout(
914
- () => {
915
- o.appendChild(d);
916
- },
917
- 1
918
- );
919
- });
920
- };
921
- function y(f) {
922
- et[f ? "unshift" : "push"](() => {
923
- o = f, n(0, o);
924
- });
925
- }
926
- return t.$$set = (f) => {
927
- "clientstyling" in f && n(3, r = f.clientstyling), "clientstylingurl" in f && n(4, l = f.clientstylingurl), "$$scope" in f && n(5, i = f.$$scope);
928
- }, t.$$.update = () => {
929
- t.$$.dirty & /*clientstyling, customStylingContainer*/
930
- 9 && r && o && p(), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
931
- 17 && l && o && $();
932
- }, [
933
- o,
934
- u,
935
- c,
936
- r,
937
- l,
938
- i,
939
- s,
940
- y
941
- ];
942
- }
943
- class vt extends Xt {
944
- constructor(e) {
945
- super(), Qt(this, e, le, re, kt, { clientstyling: 3, clientstylingurl: 4 }, te);
946
- }
947
- get clientstyling() {
948
- return this.$$.ctx[3];
949
- }
950
- set clientstyling(e) {
951
- this.$$set({ clientstyling: e }), Z();
952
- }
953
- get clientstylingurl() {
954
- return this.$$.ctx[4];
955
- }
956
- set clientstylingurl(e) {
957
- this.$$set({ clientstylingurl: e }), Z();
958
- }
959
- }
960
- Zt(vt, { clientstyling: {}, clientstylingurl: {} }, ["title", "text", "confirm", "close"], [], !0);
961
- const Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
962
- __proto__: null,
963
- default: vt
964
- }, Symbol.toStringTag, { value: "Module" }));
965
- export {
966
- V as A,
967
- ve as B,
968
- et as C,
969
- ce as D,
970
- $e as E,
971
- Q as F,
972
- we as G,
973
- ue as H,
974
- be as I,
975
- _e as J,
976
- ke as K,
977
- he as L,
978
- fe as M,
979
- pe as N,
980
- at as O,
981
- ge as P,
982
- xe as Q,
983
- Et as R,
984
- Xt as S,
985
- ye as T,
986
- Me as U,
987
- Ce as V,
988
- Le as W,
989
- kt as a,
990
- Qt as b,
991
- Zt as c,
992
- At as d,
993
- D as e,
994
- Z as f,
995
- x as g,
996
- X as h,
997
- st as i,
998
- _ as j,
999
- rt as k,
1000
- w as l,
1001
- I as m,
1002
- k as n,
1003
- W as o,
1004
- F as p,
1005
- Ee as q,
1006
- L as r,
1007
- jt as s,
1008
- z as t,
1009
- H as u,
1010
- N as v,
1011
- ae as w,
1012
- de as x,
1013
- wt as y,
1014
- me as z
1015
- };