@everymatrix/cashier-modal 1.44.0 → 1.45.2

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.
@@ -0,0 +1,914 @@
1
+ var bt = Object.defineProperty, xt = Object.defineProperties;
2
+ var Ct = Object.getOwnPropertyDescriptors;
3
+ var nt = Object.getOwnPropertySymbols;
4
+ var Et = Object.prototype.hasOwnProperty, vt = Object.prototype.propertyIsEnumerable;
5
+ var q = (e, t, n) => t in e ? bt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, it = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ Et.call(t, n) && q(e, n, t[n]);
8
+ if (nt)
9
+ for (var n of nt(t))
10
+ vt.call(t, n) && q(e, n, t[n]);
11
+ return e;
12
+ }, st = (e, t) => xt(e, Ct(t));
13
+ var m = (e, t, n) => q(e, typeof t != "symbol" ? t + "" : t, n);
14
+ var rt = (e, t, n) => new Promise((i, r) => {
15
+ var s = (u) => {
16
+ try {
17
+ o(n.next(u));
18
+ } catch (c) {
19
+ r(c);
20
+ }
21
+ }, l = (u) => {
22
+ try {
23
+ o(n.throw(u));
24
+ } catch (c) {
25
+ r(c);
26
+ }
27
+ }, o = (u) => u.done ? i(u.value) : Promise.resolve(u.value).then(s, l);
28
+ o((n = n.apply(e, t)).next());
29
+ });
30
+ function W() {
31
+ }
32
+ const $t = (e) => e;
33
+ function Mt(e, t) {
34
+ for (const n in t) e[n] = t[n];
35
+ return (
36
+ /** @type {T & S} */
37
+ e
38
+ );
39
+ }
40
+ function _t(e) {
41
+ return e();
42
+ }
43
+ function ot() {
44
+ return /* @__PURE__ */ Object.create(null);
45
+ }
46
+ function L(e) {
47
+ e.forEach(_t);
48
+ }
49
+ function Y(e) {
50
+ return typeof e == "function";
51
+ }
52
+ function kt(e, t) {
53
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
54
+ }
55
+ function St(e) {
56
+ return Object.keys(e).length === 0;
57
+ }
58
+ function jt(e, t, n, i) {
59
+ if (e) {
60
+ const r = gt(e, t, n, i);
61
+ return e[0](r);
62
+ }
63
+ }
64
+ function gt(e, t, n, i) {
65
+ return e[1] && i ? Mt(n.ctx.slice(), e[1](i(t))) : n.ctx;
66
+ }
67
+ function Lt(e, t, n, i) {
68
+ if (e[2] && i) {
69
+ const r = e[2](i(n));
70
+ if (t.dirty === void 0)
71
+ return r;
72
+ if (typeof r == "object") {
73
+ const s = [], l = Math.max(t.dirty.length, r.length);
74
+ for (let o = 0; o < l; o += 1)
75
+ s[o] = t.dirty[o] | r[o];
76
+ return s;
77
+ }
78
+ return t.dirty | r;
79
+ }
80
+ return t.dirty;
81
+ }
82
+ function Ot(e, t, n, i, r, s) {
83
+ if (r) {
84
+ const l = gt(t, n, i, s);
85
+ e.p(l, r);
86
+ }
87
+ }
88
+ function At(e) {
89
+ if (e.ctx.length > 32) {
90
+ const t = [], n = e.ctx.length / 32;
91
+ for (let i = 0; i < n; i++)
92
+ t[i] = -1;
93
+ return t;
94
+ }
95
+ return -1;
96
+ }
97
+ const mt = typeof window != "undefined";
98
+ let Nt = mt ? () => window.performance.now() : () => Date.now(), Z = mt ? (e) => requestAnimationFrame(e) : W;
99
+ const k = /* @__PURE__ */ new Set();
100
+ function pt(e) {
101
+ k.forEach((t) => {
102
+ t.c(e) || (k.delete(t), t.f());
103
+ }), k.size !== 0 && Z(pt);
104
+ }
105
+ function zt(e) {
106
+ let t;
107
+ return k.size === 0 && Z(pt), {
108
+ promise: new Promise((n) => {
109
+ k.add(t = { c: e, f: n });
110
+ }),
111
+ abort() {
112
+ k.delete(t);
113
+ }
114
+ };
115
+ }
116
+ function F(e, t) {
117
+ e.appendChild(t);
118
+ }
119
+ function Pt(e, t, n) {
120
+ const i = tt(e);
121
+ if (!i.getElementById(t)) {
122
+ const r = E("style");
123
+ r.id = t, r.textContent = n, yt(i, r);
124
+ }
125
+ }
126
+ function tt(e) {
127
+ if (!e) return document;
128
+ const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
129
+ return t && /** @type {ShadowRoot} */
130
+ t.host ? (
131
+ /** @type {ShadowRoot} */
132
+ t
133
+ ) : e.ownerDocument;
134
+ }
135
+ function Bt(e) {
136
+ const t = E("style");
137
+ return t.textContent = "/* empty */", yt(tt(e), t), t.sheet;
138
+ }
139
+ function yt(e, t) {
140
+ return F(
141
+ /** @type {Document} */
142
+ e.head || e,
143
+ t
144
+ ), t.sheet;
145
+ }
146
+ function et(e, t, n) {
147
+ e.insertBefore(t, n || null);
148
+ }
149
+ function O(e) {
150
+ e.parentNode && e.parentNode.removeChild(e);
151
+ }
152
+ function E(e) {
153
+ return document.createElement(e);
154
+ }
155
+ function Rt(e) {
156
+ return document.createTextNode(e);
157
+ }
158
+ function Wt() {
159
+ return Rt("");
160
+ }
161
+ function lt(e, t, n, i) {
162
+ return e.addEventListener(t, n, i), () => e.removeEventListener(t, n, i);
163
+ }
164
+ function x(e, t, n) {
165
+ n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
166
+ }
167
+ function Ht(e) {
168
+ return Array.from(e.childNodes);
169
+ }
170
+ let T;
171
+ function Tt() {
172
+ if (T === void 0) {
173
+ T = !1;
174
+ try {
175
+ typeof window != "undefined" && window.parent && window.parent.document;
176
+ } catch (e) {
177
+ T = !0;
178
+ }
179
+ }
180
+ return T;
181
+ }
182
+ function Dt(e, t) {
183
+ getComputedStyle(e).position === "static" && (e.style.position = "relative");
184
+ const i = E("iframe");
185
+ i.setAttribute(
186
+ "style",
187
+ "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"
188
+ ), i.setAttribute("aria-hidden", "true"), i.tabIndex = -1;
189
+ const r = Tt();
190
+ let s;
191
+ return r ? (i.src = "data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>", s = lt(
192
+ window,
193
+ "message",
194
+ /** @param {MessageEvent} event */
195
+ (l) => {
196
+ l.source === i.contentWindow && t();
197
+ }
198
+ )) : (i.src = "about:blank", i.onload = () => {
199
+ s = lt(i.contentWindow, "resize", t), t();
200
+ }), F(e, i), () => {
201
+ (r || s && i.contentWindow) && s(), O(i);
202
+ };
203
+ }
204
+ function It(e, t, { bubbles: n = !1, cancelable: i = !1 } = {}) {
205
+ return new CustomEvent(e, { detail: t, bubbles: n, cancelable: i });
206
+ }
207
+ function Ft(e) {
208
+ const t = {};
209
+ return e.childNodes.forEach(
210
+ /** @param {Element} node */
211
+ (n) => {
212
+ t[n.slot || "default"] = !0;
213
+ }
214
+ ), t;
215
+ }
216
+ const U = /* @__PURE__ */ new Map();
217
+ let J = 0;
218
+ function Ut(e) {
219
+ let t = 5381, n = e.length;
220
+ for (; n--; ) t = (t << 5) - t ^ e.charCodeAt(n);
221
+ return t >>> 0;
222
+ }
223
+ function Jt(e, t) {
224
+ const n = { stylesheet: Bt(t), rules: {} };
225
+ return U.set(e, n), n;
226
+ }
227
+ function ct(e, t, n, i, r, s, l, o = 0) {
228
+ const u = 16.666 / i;
229
+ let c = `{
230
+ `;
231
+ for (let $ = 0; $ <= 1; $ += u) {
232
+ const w = t + (n - t) * s($);
233
+ c += $ * 100 + `%{${l(w, 1 - w)}}
234
+ `;
235
+ }
236
+ const h = c + `100% {${l(n, 1 - n)}}
237
+ }`, f = `__svelte_${Ut(h)}_${o}`, _ = tt(e), { stylesheet: p, rules: d } = U.get(_) || Jt(_, e);
238
+ d[f] || (d[f] = !0, p.insertRule(`@keyframes ${f} ${h}`, p.cssRules.length));
239
+ const g = e.style.animation || "";
240
+ return e.style.animation = `${g ? `${g}, ` : ""}${f} ${i}ms linear ${r}ms 1 both`, J += 1, f;
241
+ }
242
+ function Vt(e, t) {
243
+ const n = (e.style.animation || "").split(", "), i = n.filter(
244
+ t ? (s) => s.indexOf(t) < 0 : (s) => s.indexOf("__svelte") === -1
245
+ // remove all Svelte animations
246
+ ), r = n.length - i.length;
247
+ r && (e.style.animation = i.join(", "), J -= r, J || qt());
248
+ }
249
+ function qt() {
250
+ Z(() => {
251
+ J || (U.forEach((e) => {
252
+ const { ownerNode: t } = e.stylesheet;
253
+ t && O(t);
254
+ }), U.clear());
255
+ });
256
+ }
257
+ let H;
258
+ function B(e) {
259
+ H = e;
260
+ }
261
+ function Gt() {
262
+ if (!H) throw new Error("Function called outside component initialization");
263
+ return H;
264
+ }
265
+ function Kt(e) {
266
+ Gt().$$.on_mount.push(e);
267
+ }
268
+ const M = [], V = [];
269
+ let S = [];
270
+ const ut = [], Qt = /* @__PURE__ */ Promise.resolve();
271
+ let Q = !1;
272
+ function Xt() {
273
+ Q || (Q = !0, Qt.then(C));
274
+ }
275
+ function j(e) {
276
+ S.push(e);
277
+ }
278
+ const G = /* @__PURE__ */ new Set();
279
+ let v = 0;
280
+ function C() {
281
+ if (v !== 0)
282
+ return;
283
+ const e = H;
284
+ do {
285
+ try {
286
+ for (; v < M.length; ) {
287
+ const t = M[v];
288
+ v++, B(t), Yt(t.$$);
289
+ }
290
+ } catch (t) {
291
+ throw M.length = 0, v = 0, t;
292
+ }
293
+ for (B(null), M.length = 0, v = 0; V.length; ) V.pop()();
294
+ for (let t = 0; t < S.length; t += 1) {
295
+ const n = S[t];
296
+ G.has(n) || (G.add(n), n());
297
+ }
298
+ S.length = 0;
299
+ } while (M.length);
300
+ for (; ut.length; )
301
+ ut.pop()();
302
+ Q = !1, G.clear(), B(e);
303
+ }
304
+ function Yt(e) {
305
+ if (e.fragment !== null) {
306
+ e.update(), L(e.before_update);
307
+ const t = e.dirty;
308
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(j);
309
+ }
310
+ }
311
+ function Zt(e) {
312
+ const t = [], n = [];
313
+ S.forEach((i) => e.indexOf(i) === -1 ? t.push(i) : n.push(i)), n.forEach((i) => i()), S = t;
314
+ }
315
+ let P;
316
+ function te() {
317
+ return P || (P = Promise.resolve(), P.then(() => {
318
+ P = null;
319
+ })), P;
320
+ }
321
+ function K(e, t, n) {
322
+ e.dispatchEvent(It(`${t ? "intro" : "outro"}${n}`));
323
+ }
324
+ const D = /* @__PURE__ */ new Set();
325
+ let y;
326
+ function ee() {
327
+ y = {
328
+ r: 0,
329
+ c: [],
330
+ p: y
331
+ // parent group
332
+ };
333
+ }
334
+ function ne() {
335
+ y.r || L(y.c), y = y.p;
336
+ }
337
+ function R(e, t) {
338
+ e && e.i && (D.delete(e), e.i(t));
339
+ }
340
+ function X(e, t, n, i) {
341
+ if (e && e.o) {
342
+ if (D.has(e)) return;
343
+ D.add(e), y.c.push(() => {
344
+ D.delete(e), i && (n && e.d(1), i());
345
+ }), e.o(t);
346
+ } else i && i();
347
+ }
348
+ const ie = { duration: 0 };
349
+ function at(e, t, n, i) {
350
+ let s = t(e, n, { direction: "both" }), l = i ? 0 : 1, o = null, u = null, c = null, h;
351
+ function f() {
352
+ c && Vt(e, c);
353
+ }
354
+ function _(d, g) {
355
+ const $ = (
356
+ /** @type {Program['d']} */
357
+ d.b - l
358
+ );
359
+ return g *= Math.abs($), {
360
+ a: l,
361
+ b: d.b,
362
+ d: $,
363
+ duration: g,
364
+ start: d.start,
365
+ end: d.start + g,
366
+ group: d.group
367
+ };
368
+ }
369
+ function p(d) {
370
+ const {
371
+ delay: g = 0,
372
+ duration: $ = 300,
373
+ easing: w = $t,
374
+ tick: A = W,
375
+ css: N
376
+ } = s || ie, a = {
377
+ start: Nt() + g,
378
+ b: d
379
+ };
380
+ d || (a.group = y, y.r += 1), "inert" in e && (d ? h !== void 0 && (e.inert = h) : (h = /** @type {HTMLElement} */
381
+ e.inert, e.inert = !0)), o || u ? u = a : (N && (f(), c = ct(e, l, d, $, g, w, N)), d && A(0, 1), o = _(a, $), j(() => K(e, d, "start")), zt((b) => {
382
+ if (u && b > u.start && (o = _(u, $), u = null, K(e, o.b, "start"), N && (f(), c = ct(
383
+ e,
384
+ l,
385
+ o.b,
386
+ o.duration,
387
+ 0,
388
+ w,
389
+ s.css
390
+ ))), o) {
391
+ if (b >= o.end)
392
+ A(l = o.b, 1 - l), K(e, o.b, "end"), u || (o.b ? f() : --o.group.r || L(o.group.c)), o = null;
393
+ else if (b >= o.start) {
394
+ const z = b - o.start;
395
+ l = o.a + o.d * w(z / o.duration), A(l, 1 - l);
396
+ }
397
+ }
398
+ return !!(o || u);
399
+ }));
400
+ }
401
+ return {
402
+ run(d) {
403
+ Y(s) ? te().then(() => {
404
+ s = s({ direction: d ? "in" : "out" }), p(d);
405
+ }) : p(d);
406
+ },
407
+ end() {
408
+ f(), o = u = null;
409
+ }
410
+ };
411
+ }
412
+ function se(e, t, n) {
413
+ const { fragment: i, after_update: r } = e.$$;
414
+ i && i.m(t, n), j(() => {
415
+ const s = e.$$.on_mount.map(_t).filter(Y);
416
+ e.$$.on_destroy ? e.$$.on_destroy.push(...s) : L(s), e.$$.on_mount = [];
417
+ }), r.forEach(j);
418
+ }
419
+ function re(e, t) {
420
+ const n = e.$$;
421
+ n.fragment !== null && (Zt(n.after_update), L(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
422
+ }
423
+ function oe(e, t) {
424
+ e.$$.dirty[0] === -1 && (M.push(e), Xt(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
425
+ }
426
+ function le(e, t, n, i, r, s, l = null, o = [-1]) {
427
+ const u = H;
428
+ B(e);
429
+ const c = e.$$ = {
430
+ fragment: null,
431
+ ctx: [],
432
+ // state
433
+ props: s,
434
+ update: W,
435
+ not_equal: r,
436
+ bound: ot(),
437
+ // lifecycle
438
+ on_mount: [],
439
+ on_destroy: [],
440
+ on_disconnect: [],
441
+ before_update: [],
442
+ after_update: [],
443
+ context: new Map(t.context || (u ? u.$$.context : [])),
444
+ // everything else
445
+ callbacks: ot(),
446
+ dirty: o,
447
+ skip_bound: !1,
448
+ root: t.target || u.$$.root
449
+ };
450
+ l && l(c.root);
451
+ let h = !1;
452
+ if (c.ctx = n ? n(e, t.props || {}, (f, _, ...p) => {
453
+ const d = p.length ? p[0] : _;
454
+ return c.ctx && r(c.ctx[f], c.ctx[f] = d) && (!c.skip_bound && c.bound[f] && c.bound[f](d), h && oe(e, f)), _;
455
+ }) : [], c.update(), h = !0, L(c.before_update), c.fragment = i ? i(c.ctx) : !1, t.target) {
456
+ if (t.hydrate) {
457
+ const f = Ht(t.target);
458
+ c.fragment && c.fragment.l(f), f.forEach(O);
459
+ } else
460
+ c.fragment && c.fragment.c();
461
+ t.intro && R(e.$$.fragment), se(e, t.target, t.anchor), C();
462
+ }
463
+ B(u);
464
+ }
465
+ let wt;
466
+ typeof HTMLElement == "function" && (wt = class extends HTMLElement {
467
+ constructor(t, n, i) {
468
+ super();
469
+ /** The Svelte component constructor */
470
+ m(this, "$$ctor");
471
+ /** Slots */
472
+ m(this, "$$s");
473
+ /** The Svelte component instance */
474
+ m(this, "$$c");
475
+ /** Whether or not the custom element is connected */
476
+ m(this, "$$cn", !1);
477
+ /** Component props data */
478
+ m(this, "$$d", {});
479
+ /** `true` if currently in the process of reflecting component props back to attributes */
480
+ m(this, "$$r", !1);
481
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
482
+ m(this, "$$p_d", {});
483
+ /** @type {Record<string, Function[]>} Event listeners */
484
+ m(this, "$$l", {});
485
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
486
+ m(this, "$$l_u", /* @__PURE__ */ new Map());
487
+ this.$$ctor = t, this.$$s = n, i && this.attachShadow({ mode: "open" });
488
+ }
489
+ addEventListener(t, n, i) {
490
+ if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
491
+ const r = this.$$c.$on(t, n);
492
+ this.$$l_u.set(n, r);
493
+ }
494
+ super.addEventListener(t, n, i);
495
+ }
496
+ removeEventListener(t, n, i) {
497
+ if (super.removeEventListener(t, n, i), this.$$c) {
498
+ const r = this.$$l_u.get(n);
499
+ r && (r(), this.$$l_u.delete(n));
500
+ }
501
+ }
502
+ connectedCallback() {
503
+ return rt(this, null, function* () {
504
+ if (this.$$cn = !0, !this.$$c) {
505
+ let t = function(s) {
506
+ return () => {
507
+ let l;
508
+ return {
509
+ c: function() {
510
+ l = E("slot"), s !== "default" && x(l, "name", s);
511
+ },
512
+ /**
513
+ * @param {HTMLElement} target
514
+ * @param {HTMLElement} [anchor]
515
+ */
516
+ m: function(c, h) {
517
+ et(c, l, h);
518
+ },
519
+ d: function(c) {
520
+ c && O(l);
521
+ }
522
+ };
523
+ };
524
+ };
525
+ if (yield Promise.resolve(), !this.$$cn || this.$$c)
526
+ return;
527
+ const n = {}, i = Ft(this);
528
+ for (const s of this.$$s)
529
+ s in i && (n[s] = [t(s)]);
530
+ for (const s of this.attributes) {
531
+ const l = this.$$g_p(s.name);
532
+ l in this.$$d || (this.$$d[l] = I(l, s.value, this.$$p_d, "toProp"));
533
+ }
534
+ for (const s in this.$$p_d)
535
+ !(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
536
+ this.$$c = new this.$$ctor({
537
+ target: this.shadowRoot || this,
538
+ props: st(it({}, this.$$d), {
539
+ $$slots: n,
540
+ $$scope: {
541
+ ctx: []
542
+ }
543
+ })
544
+ });
545
+ const r = () => {
546
+ this.$$r = !0;
547
+ for (const s in this.$$p_d)
548
+ if (this.$$d[s] = this.$$c.$$.ctx[this.$$c.$$.props[s]], this.$$p_d[s].reflect) {
549
+ const l = I(
550
+ s,
551
+ this.$$d[s],
552
+ this.$$p_d,
553
+ "toAttribute"
554
+ );
555
+ l == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, l);
556
+ }
557
+ this.$$r = !1;
558
+ };
559
+ this.$$c.$$.after_update.push(r), r();
560
+ for (const s in this.$$l)
561
+ for (const l of this.$$l[s]) {
562
+ const o = this.$$c.$on(s, l);
563
+ this.$$l_u.set(l, o);
564
+ }
565
+ this.$$l = {};
566
+ }
567
+ });
568
+ }
569
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
570
+ // and setting attributes through setAttribute etc, this is helpful
571
+ attributeChangedCallback(t, n, i) {
572
+ var r;
573
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = I(t, i, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [t]: this.$$d[t] }));
574
+ }
575
+ disconnectedCallback() {
576
+ this.$$cn = !1, Promise.resolve().then(() => {
577
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
578
+ });
579
+ }
580
+ $$g_p(t) {
581
+ return Object.keys(this.$$p_d).find(
582
+ (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
583
+ ) || t;
584
+ }
585
+ });
586
+ function I(e, t, n, i) {
587
+ var s;
588
+ const r = (s = n[e]) == null ? void 0 : s.type;
589
+ if (t = r === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !n[e])
590
+ return t;
591
+ if (i === "toAttribute")
592
+ switch (r) {
593
+ case "Object":
594
+ case "Array":
595
+ return t == null ? null : JSON.stringify(t);
596
+ case "Boolean":
597
+ return t ? "" : null;
598
+ case "Number":
599
+ return t == null ? null : t;
600
+ default:
601
+ return t;
602
+ }
603
+ else
604
+ switch (r) {
605
+ case "Object":
606
+ case "Array":
607
+ return t && JSON.parse(t);
608
+ case "Boolean":
609
+ return t;
610
+ case "Number":
611
+ return t != null ? +t : t;
612
+ default:
613
+ return t;
614
+ }
615
+ }
616
+ function ce(e, t, n, i, r, s) {
617
+ let l = class extends wt {
618
+ constructor() {
619
+ super(e, n, r), this.$$p_d = t;
620
+ }
621
+ static get observedAttributes() {
622
+ return Object.keys(t).map(
623
+ (o) => (t[o].attribute || o).toLowerCase()
624
+ );
625
+ }
626
+ };
627
+ return Object.keys(t).forEach((o) => {
628
+ Object.defineProperty(l.prototype, o, {
629
+ get() {
630
+ return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
631
+ },
632
+ set(u) {
633
+ var c;
634
+ u = I(o, u, t), this.$$d[o] = u, (c = this.$$c) == null || c.$set({ [o]: u });
635
+ }
636
+ });
637
+ }), i.forEach((o) => {
638
+ Object.defineProperty(l.prototype, o, {
639
+ get() {
640
+ var u;
641
+ return (u = this.$$c) == null ? void 0 : u[o];
642
+ }
643
+ });
644
+ }), e.element = /** @type {any} */
645
+ l, l;
646
+ }
647
+ class ue {
648
+ constructor() {
649
+ /**
650
+ * ### PRIVATE API
651
+ *
652
+ * Do not use, may change at any time
653
+ *
654
+ * @type {any}
655
+ */
656
+ m(this, "$$");
657
+ /**
658
+ * ### PRIVATE API
659
+ *
660
+ * Do not use, may change at any time
661
+ *
662
+ * @type {any}
663
+ */
664
+ m(this, "$$set");
665
+ }
666
+ /** @returns {void} */
667
+ $destroy() {
668
+ re(this, 1), this.$destroy = W;
669
+ }
670
+ /**
671
+ * @template {Extract<keyof Events, string>} K
672
+ * @param {K} type
673
+ * @param {((e: Events[K]) => void) | null | undefined} callback
674
+ * @returns {() => void}
675
+ */
676
+ $on(t, n) {
677
+ if (!Y(n))
678
+ return W;
679
+ const i = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
680
+ return i.push(n), () => {
681
+ const r = i.indexOf(n);
682
+ r !== -1 && i.splice(r, 1);
683
+ };
684
+ }
685
+ /**
686
+ * @param {Partial<Props>} props
687
+ * @returns {void}
688
+ */
689
+ $set(t) {
690
+ this.$$set && !St(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
691
+ }
692
+ }
693
+ const ae = "4";
694
+ typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(ae);
695
+ function ft(e, { delay: t = 0, duration: n = 400, easing: i = $t } = {}) {
696
+ const r = +getComputedStyle(e).opacity;
697
+ return {
698
+ delay: t,
699
+ duration: n,
700
+ easing: i,
701
+ css: (s) => `opacity: ${s * r}`
702
+ };
703
+ }
704
+ function fe(e) {
705
+ Pt(e, "svelte-pil2bm", "*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:4;top:0;left:0;background-color:var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));container-type:inline-size;container-name:modal-window;border-radius:6px}.ModalContainer{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:400px}.ModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:10px;right:10px;padding:var(--emw--spacing-small-minus, 10px);border-radius:50%;color:var(--emw--color-white, #fff);background:var(--mmw--color-gray-transparency-85, rgba(255, 255, 255, 0.85));cursor:pointer;transition:all 150ms ease-in-out}.ModalCloseBtn svg{width:32px;height:32px}.ModalCloseBtn:hover{background:var(--emw--color-gray-transparency-20, rgba(255, 255, 255, 0.2))}@container modal-window (max-width:750px){.ModalWindow .ModalContainer{width:90%;max-width:400px}}");
706
+ }
707
+ const de = (e) => ({}), dt = (e) => ({});
708
+ function ht(e) {
709
+ let t, n, i, r, s, l;
710
+ const o = (
711
+ /*#slots*/
712
+ e[9].content
713
+ ), u = jt(
714
+ o,
715
+ e,
716
+ /*$$scope*/
717
+ e[8],
718
+ dt
719
+ );
720
+ return {
721
+ c() {
722
+ t = E("div"), n = E("div"), i = E("div"), u && u.c(), x(i, "class", "ModalContainer"), x(i, "part", "ModalContainer"), x(n, "class", "ModalWindow"), x(n, "part", "ModalWindow"), x(n, "id", "Modal"), j(() => (
723
+ /*div1_elementresize_handler*/
724
+ e[11].call(n)
725
+ )), x(t, "part", "CustomStylingContainer");
726
+ },
727
+ m(c, h) {
728
+ et(c, t, h), F(t, n), F(n, i), u && u.m(i, null), e[10](n), r = Dt(
729
+ n,
730
+ /*div1_elementresize_handler*/
731
+ e[11].bind(n)
732
+ ), e[12](t), l = !0;
733
+ },
734
+ p(c, h) {
735
+ e = c, u && u.p && (!l || h & /*$$scope*/
736
+ 256) && Ot(
737
+ u,
738
+ o,
739
+ e,
740
+ /*$$scope*/
741
+ e[8],
742
+ l ? Lt(
743
+ o,
744
+ /*$$scope*/
745
+ e[8],
746
+ h,
747
+ de
748
+ ) : At(
749
+ /*$$scope*/
750
+ e[8]
751
+ ),
752
+ dt
753
+ );
754
+ },
755
+ i(c) {
756
+ l || (R(u, c), c && j(() => {
757
+ l && (s || (s = at(n, ft, { duration: (
758
+ /*duration*/
759
+ e[2]
760
+ ) }, !0)), s.run(1));
761
+ }), l = !0);
762
+ },
763
+ o(c) {
764
+ X(u, c), c && (s || (s = at(n, ft, { duration: (
765
+ /*duration*/
766
+ e[2]
767
+ ) }, !1)), s.run(0)), l = !1;
768
+ },
769
+ d(c) {
770
+ c && O(t), u && u.d(c), e[10](null), r(), c && s && s.end(), e[12](null);
771
+ }
772
+ };
773
+ }
774
+ function he(e) {
775
+ let t, n, i = (
776
+ /*show*/
777
+ e[5] && ht(e)
778
+ );
779
+ return {
780
+ c() {
781
+ i && i.c(), t = Wt();
782
+ },
783
+ m(r, s) {
784
+ i && i.m(r, s), et(r, t, s), n = !0;
785
+ },
786
+ p(r, [s]) {
787
+ /*show*/
788
+ r[5] ? i ? (i.p(r, s), s & /*show*/
789
+ 32 && R(i, 1)) : (i = ht(r), i.c(), R(i, 1), i.m(t.parentNode, t)) : i && (ee(), X(i, 1, 1, () => {
790
+ i = null;
791
+ }), ne());
792
+ },
793
+ i(r) {
794
+ n || (R(i), n = !0);
795
+ },
796
+ o(r) {
797
+ X(i), n = !1;
798
+ },
799
+ d(r) {
800
+ r && O(t), i && i.d(r);
801
+ }
802
+ };
803
+ }
804
+ function $e(e, t, n) {
805
+ let { $$slots: i = {}, $$scope: r } = t, { clientstyling: s = "" } = t, { clientstylingurl: l = "" } = t, { duration: o = 200 } = t, { width: u } = t, { height: c } = t, h, f, _ = !1;
806
+ const p = () => {
807
+ n(5, _ = !1), window.postMessage({ type: "ClosedCashierModal" }, window.location.href), window.postMessage({ type: "EnableScroll" }, window.location.href);
808
+ }, d = (a) => {
809
+ a.data.type == "ShowCashierModal" && (n(5, _ = !0), window.postMessage({ type: "DisableScroll" }, window.location.href)), a.data.type == "HideCashierModal" && p();
810
+ }, g = () => {
811
+ let a = document.createElement("style");
812
+ a.innerHTML = s, f.appendChild(a);
813
+ }, $ = () => {
814
+ let a = new URL(l), b = document.createElement("style");
815
+ fetch(a.href).then((z) => z.text()).then((z) => {
816
+ b.innerHTML = z, setTimeout(
817
+ () => {
818
+ f.appendChild(b);
819
+ },
820
+ 1
821
+ );
822
+ });
823
+ };
824
+ Kt(() => (window.addEventListener("message", d, !1), () => {
825
+ window.removeEventListener("message", d);
826
+ }));
827
+ function w(a) {
828
+ V[a ? "unshift" : "push"](() => {
829
+ h = a, n(4, h);
830
+ });
831
+ }
832
+ function A() {
833
+ u = this.clientWidth, c = this.clientHeight, n(0, u), n(1, c);
834
+ }
835
+ function N(a) {
836
+ V[a ? "unshift" : "push"](() => {
837
+ f = a, n(3, f);
838
+ });
839
+ }
840
+ return e.$$set = (a) => {
841
+ "clientstyling" in a && n(6, s = a.clientstyling), "clientstylingurl" in a && n(7, l = a.clientstylingurl), "duration" in a && n(2, o = a.duration), "width" in a && n(0, u = a.width), "height" in a && n(1, c = a.height), "$$scope" in a && n(8, r = a.$$scope);
842
+ }, e.$$.update = () => {
843
+ e.$$.dirty & /*clientstyling, customStylingContainer*/
844
+ 72 && s && f && g(), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
845
+ 136 && l && f && $();
846
+ }, [
847
+ u,
848
+ c,
849
+ o,
850
+ f,
851
+ h,
852
+ _,
853
+ s,
854
+ l,
855
+ r,
856
+ i,
857
+ w,
858
+ A,
859
+ N
860
+ ];
861
+ }
862
+ class _e extends ue {
863
+ constructor(t) {
864
+ super(), le(
865
+ this,
866
+ t,
867
+ $e,
868
+ he,
869
+ kt,
870
+ {
871
+ clientstyling: 6,
872
+ clientstylingurl: 7,
873
+ duration: 2,
874
+ width: 0,
875
+ height: 1
876
+ },
877
+ fe
878
+ );
879
+ }
880
+ get clientstyling() {
881
+ return this.$$.ctx[6];
882
+ }
883
+ set clientstyling(t) {
884
+ this.$$set({ clientstyling: t }), C();
885
+ }
886
+ get clientstylingurl() {
887
+ return this.$$.ctx[7];
888
+ }
889
+ set clientstylingurl(t) {
890
+ this.$$set({ clientstylingurl: t }), C();
891
+ }
892
+ get duration() {
893
+ return this.$$.ctx[2];
894
+ }
895
+ set duration(t) {
896
+ this.$$set({ duration: t }), C();
897
+ }
898
+ get width() {
899
+ return this.$$.ctx[0];
900
+ }
901
+ set width(t) {
902
+ this.$$set({ width: t }), C();
903
+ }
904
+ get height() {
905
+ return this.$$.ctx[1];
906
+ }
907
+ set height(t) {
908
+ this.$$set({ height: t }), C();
909
+ }
910
+ }
911
+ ce(_e, { clientstyling: {}, clientstylingurl: {}, duration: {}, width: {}, height: {} }, ["content"], [], !0);
912
+ export {
913
+ _e as default
914
+ };